How to get the dimensions of objects after image processing?

3 visualizaciones (últimos 30 días)
Shahad
Shahad el 14 de Nov. de 2015
Comentada: Shahad el 14 de Nov. de 2015
Hi everyone, I'm a newbie to MatLab and i need to get the dimensions(width & hight) of colored labeled objects. How to do so? attached an image of detected objects in my project. another question, do i need to fill holes to have a perfect rectangles to have exact dimentions?
thanks in advance.

Respuesta aceptada

Walter Roberson
Walter Roberson el 14 de Nov. de 2015
See regionprops(), in particular BoundingBox and Area .
Notice, though, that your blobs are not aligned vertically or horizontally. You might want to ask regionprops for the Orientation and then imrotate() the blob by the negative of that in order to align it and then regionprops() the result to get the height and width.

Más respuestas (0)

Categorías

Más información sobre Get Started with Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by