How to find ht:width ratio of a connected component?

Sucheta asked on 7 Feb 2012
Latest activity: Answer by David Young on 7 Feb 2012

Application: Face detection by skin color I have separated out the connected components in a BW image. All I want to do is find out the ratio of height:width ratio of individual component. The Matlab version I am using is 2010. Please help asap.

0 comments

Products

    1 answer

    David Young answered on 7 Feb 2012
    Accepted answer

    Have a look at regionprops. It will give you an aspect ratio for each blob, or the bounding box.

    2 comments

    Sucheta on 8 Feb 2012

    Thanks, I will check it out and get back to you.

    Sucheta on 27 Feb 2012

    **I am unable to follow. Can you explain me with an example//

    **How to upload an image. It will be easy for me to explain.

    **Also,
    I have this BW image. Black backround and white blob.
    I want to find out the centroid of that blob.
    After this process I want to find out its y-axis and x-axis distance.

    Contact us at files@mathworks.com