Which one is best for calculating circularity ?

조회 수: 77 (최근 30일)
Muhammet
Muhammet 2013년 8월 22일
댓글: Image Analyst 2021년 6월 15일
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 :
  댓글 수: 4
RAKESH KUCHANA
RAKESH KUCHANA 2021년 6월 15일
Can you explain code for how to remove small white dot areas (in the red colour bounded areas) in the given image?
Image Analyst
Image Analyst 2021년 6월 15일
@RAKESH KUCHANA, no, not here in Muhammet's 8 year old question (he's probably not interested in your problem), but we will in your new question if you post it.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2013년 8월 22일
편집: Image Analyst 2021년 6월 15일
I use circularity quite a bit. The formula I use is the inverse of the one you use:
props = regionprops(mask, 'Area', 'Perimeter');
allAreas = [props.Area];
allPerimeters = [props.Perimeter];
circularity = (allPerimeters .^ 2) ./ (4 * pi * allAreas);
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.
  댓글 수: 5
Rai_313
Rai_313 2015년 4월 24일
hi Image Analyst ,
Im would like to ask, why shouldnt we use the haralick circularity?
thank you.
Image Analyst
Image Analyst 2021년 6월 15일
it looks like it's the inverse of the coefficient of variation or the mean radius divided by the standard deviation of the radii = [(mean R) / (stddev R)]. So for a circle, the value is infinity since the standard deviation would be zero. He claims it's more accurate for small, digitized polygons, and that may be true.
I prefer the other definition - what he calls the Rosenfield formula P^2/(4*pi*Area). I like that it's simpler to compute plus it's nicely intuitive in that the value for a circle is 1, not some big undefined number. How big does the number need to be to be circular for Haralick? 10? 100? 1000? I don't know. I guess you could create randomly shaped blobs and compute it both ways and see what values each way produces.
But it comes down to whatever one you want to use. I don't think it's like one is better than another, though Haralick claims his is better for small circles where it's so quantized that it's more octagonal than circular. I mean a circle with a radius of 1 pixel would essentially be a cross + shape, not a circle. So if you have very small blobs then you might use Haralick's formula, though I might counter that comparing blobs based on circularity when the blobs are so tiny they can't really be circular in the first place is not a proper comparison.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Amith Kamath
Amith Kamath 2013년 8월 22일
I would do one of the following:
1. Use the 'solidity' option in REGIONPROPS to estimate how 'curvy' the blob is, and solidity is defined as the area/convexArea.
2. Use the 'MajorAxisLength' and 'MinorAxisLength' properties in REGIONPROPS and compare the two. If they are close to equal, the object would be more circular (in most cases).
3. Use 'Area' and 'Perimeter' from REGIONPROPS to estimate circularity in my custom code. http://www.mathworks.com/matlabcentral/newsreader/view_thread/292521 may be useful to see.

Shashank Prasanna
Shashank Prasanna 2013년 8월 22일
  댓글 수: 1
Muhammet
Muhammet 2013년 8월 23일
I am not looking for perfect circular objects almost with same radius.Objects are differing both in size,in circularity.Thank you for your concern.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by