MATLAB: Which one is best for calculating circularity

circularityeccentricityImage Processing Toolboxroundnessshape description

Hi all, I need to calculate objects roundness.I am not sure about which of the below ones is the best choice for this purpose.
– R= 4*pi*A/P^2; where A is area in pixels, P is Perimeter.
-Eccentricity
Thank you for your opinions.particles I need to measure are like this :

Best Answer

I use circularity quite a bit. The formula I use is the inverse of the one you use:
circularity = (Perimeter .^ 2) ./ (4 * pi * area);
so for me the circularity of a circle is 1 and the higher it goes, the less circular it it. For you the lower it goes (closer to zero) the less circular the blob is. You can do it either way.
I don't often use eccentricity because you can get the same eccentricity for a perfectly smooth ellipse as for some tortuous-shaped blob because it fits the perimeter shape to an ellipse. For example an asterisk and a disc might both have the same eccentricity but there is a dramatic difference in shape that is not picked up by eccentricity. Don't use eccentricity unless you know that your blobs are fairly close to ellipses.