what parameters to use to identify shapes?

3 次查看(过去 30 天)
Hi, I have a binary image which contains both desired and undesired objects. I counted the valid pixels in both region and compared. That did not work out since both came within threshhold.
What are the other parameters or properties that I can consider for object detection?

回答(2 个)

Image Analyst
Image Analyst 2012-2-6
Counting the valid pixels in each region gives you the area in pixels. That is completely separate than them both being within the threshold. OF COURSE they are both within the threshold - that's how you got them but the area is not really related to that. You say comparing areas did not work out. . . well area has nothing to do with shape. You can have circles and squares and either can be bigger or smaller than the other so obviously you can't use area to determine shape, but it's not because they're in the threshold range as you said. Look at the different things that regionprops() can measure. There are a number of things there that can distinguish shapes, like major and minor axis lengths, solidity, ratio of perimeter^2/(4*pi*area), etc. See which work for your particular shapes.

Sucheta
Sucheta 2012-2-27
Can you tell me how to find out the aspect ratio of a particular connected component specifically. The BoundingBox explanation is not proper in help section of MATLAB. An example for a BW image would be appreciated. Hoping for a reply ASAP.
  1 个评论
Image Analyst
Image Analyst 2012-2-27
Then try the eccentricity, majoraxislength, minor axis length, etc. Look at what regionprops offers you.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by