Asked by Lightisthenight
on 22 Apr 2019 at 20:44

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 ?

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

Accepted Answer

Walter Roberson
on 22 Apr 2019 at 22:42

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
on 24 Apr 2019 at 7:19

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..

Walter Roberson
on 24 Apr 2019 at 8:03

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.

Opportunities for recent engineering grads.

Apply Today
## 2 Comments

## Walter Roberson (view profile)

Direct link to this comment:https://nl.mathworks.com/matlabcentral/answers/457873-regionprops-circularity-value-1-and-0#comment_696966

## Lightisthenight (view profile)

Direct link to this comment:https://nl.mathworks.com/matlabcentral/answers/457873-regionprops-circularity-value-1-and-0#comment_696984

Sign in to comment.