MATLAB Answers

0

regionprops circularity value >1 and 0 ?

Asked by Lightisthenight on 22 Apr 2019 at 20:44
Latest activity Commented on by Walter Roberson
on 24 Apr 2019 at 8:03
Hello,
I calculated for a binary image the circularity using the regionprops function with this formula:
allCircularities1 = allPerimeters1.^2 ./ (4* pi*allAreas1);
I got the following circularity values : 2.933 ; 1.5260 ; 3.4890 ; 0.5380 ; 1.1568 0 ; 0 ; 0.5591.
I know that a circle has a circularity of nearly 1. As i understand the circularity is the roundness of an object / blob ? So my question is what the values greater 1 implicate? There isn't an object available that is 'rounder' than a circle.
My second question is the circularity value = 0. I checked the perimeter for that small blob. It also has the value 0. Why is that so ? Is the blob too small for the regionprops perimeter function ?

  2 Comments

(It looks to me as if you have already been examining the discussion at https://www.mathworks.com/matlabcentral/answers/167366-how-to-measure-circularity )
Yes, sir. I did examine this discussion and others.

Sign in to comment.

1 Answer

Answer by Image Analyst
on 22 Apr 2019 at 21:20
 Accepted Answer

It seems like you're getting circularities less than 1 for perfectly rectangular blocks. The formula is not that accurate for small blobs due to digitization errors and you might need to filter on something in addition to circularity, such as area. Try the attached program to see. Be sure to change the filename if you need to.
0000 Screenshot.png

  5 Comments

regionprops https://www.mathworks.com/help/images/ref/regionprops.html#buoixjn-1-properties calculates perimeter as the sum of the distance between each adjacent pair of perimeter pixels. That calculates sqrt(2) on diagonal pixels, and ends up counting some sections more than once. For example,
***
****
the drop down might be approximating an angled line, but it gets counts 1 for each segment.
For small regions, the exterior can get badly overcounted.
Hey, @image analyst
sir i have find the region props on image.
propied= regionprops(Image, 'Area', 'BoundingBox', 'PixelIdxList');
now i have Structure in which i have 3 field. in BoundingBox field i want sort the 3rd column values. can you please tell how can i do that?
Please sir help me..
allBB = vertcat(propied.BoundingBox);
[~, sortorder] = sort(allBB(:,3));
sorted_propied = propied(sortorder);
Now sorted_propied would be all of the properties that you asked for, sorted according to increasing width of the region.

Sign in to comment.