# How can I find the round polygons

2 views (last 30 days)
Neil Liu on 1 Apr 2015
Commented: Neil Liu on 13 Apr 2015
Hello everybody!Wish you have a good day!
I want to automatically find the round polygons (it is the binary information of myocardium) in these images in order to locote and get their centers. But "imfindcircles" won't find it. Could you please tell me how to find these polygons? The following is the images and what I want to get (I marked the parts I wanted manually) The 3 orignal images:
The images I want:
Thank you for helping!
Best regards Neil
##### 7 CommentsShow 5 older commentsHide 5 older comments
Neil Liu on 2 Apr 2015
@Mohammad Abouali, dear sir, this is the point. I have no idea how to get the criteria. In fact, I just need to know the center of the object I marked.
Michael Haderlein on 2 Apr 2015
Ok, but only given these processed images, how do you as an expert know that the object of interest are the ones you have marked an not the other ones? We cannot find the criterion because we have no idea of myocardia and I guess most people here would have chosen the ones I have described in my first comment. A criterion could also be that these nearly perfect octagons are not the correct objects. Then you can first filter them out and then find the roundest element. But if then you have a fourth image and there is a hexagon which isn't what we're looking for, this will mess up everything again. So we first need a good criterion.

Sign in to comment.

### Accepted Answer

Image Analyst on 11 Apr 2015
This is really not very hard. Circularity is the usual method that works pretty well in most cases.
circularities = perimeters .^ 2 ./ (4 * pi * areas); % <= ~3 or 4 is pretty rounded
There are other criteria you can use if you need to: http://en.wikipedia.org/wiki/Roundness_%28object%29. Let me know if you still need help and I can whip out a program in a few minutes.
##### 3 CommentsShow 1 older commentHide 1 older comment
Image Analyst on 11 Apr 2015
Well they're certainly close. You'd have to look at a bunch of properties and see exactly which values describe the one you want and not the others. You might have to have very close/tight thresholds. You're the one who picked that particular blob so I would not think you would ask - I think you would know what's different about that one. Maybe your criteria is to pick only one blob, and you pick the one blob that is round enough and is closest to the center of the image. Who knows? I don't know - it's your image and your decision. You should know.
Neil Liu on 13 Apr 2015
Thank you Mr Image Analyst. I know the coordinate range of the blob. So it could be the criteria

Sign in to comment.

### Categories

Find more on Labeling, Segmentation, and Detection in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!