what parameters to use to identify shapes?

3 visualizzazioni (ultimi 30 giorni)
Nagarajan sivathanu
Nagarajan sivathanu il 6 Feb 2012
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?

Risposte (2)

Image Analyst
Image Analyst il 6 Feb 2012
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 il 27 Feb 2012
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 Commento
Image Analyst
Image Analyst il 27 Feb 2012
Then try the eccentricity, majoraxislength, minor axis length, etc. Look at what regionprops offers you.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by