## regionprops circularity value >1 and 0 ?

### Lightisthenight (view profile)

on 22 Apr 2019
Latest activity Commented on by Walter Roberson

on 24 Apr 2019

### Image Analyst (view profile)

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 ?

Walter Roberson

### Walter Roberson (view profile)

on 22 Apr 2019
(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 )
Lightisthenight

### Lightisthenight (view profile)

on 22 Apr 2019
Yes, sir. I did examine this discussion and others.

### Image Analyst (view profile)

on 22 Apr 2019

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.

Walter Roberson

### Walter Roberson (view profile)

on 22 Apr 2019
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.
Umar Awan

### Umar Awan (view profile)

on 24 Apr 2019
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?