How can i make sure that using imfindcircles will result in non-overlap circles?
10 次查看(过去 30 天)
显示 更早的评论
Hi, Im trying to calculate an irregular shape area. However the pattern is not perfect circle from a converted BW image. shape to be calculated is the white area using regionprops. Im using imfindcircle to find the possible circle and use the radius given to calculate the approximate area. however, for certain irregular patterns there will be few circles detected and they are overlapping each other. Is there any way to make sure the circles detected are not overlapping so that i can use them all (within the boundary) to approximate the area?
0 个评论
回答(2 个)
Image Analyst
2014-8-24
You can go through the circles and remove one (you decide which one) if any two centers are closer to each other than the sum of their radii. Of course that leaves one or two blobs that do not have the proper area. You might look into watershed to separate them without removing either one. http://blogs.mathworks.com/steve/2013/11/19/watershed-transform-question-from-tech-support/
3 个评论
Erik Schiferle
2022-1-6
编辑:Erik Schiferle
2022-1-6
Very nice idea!
Do you have any suggestions for bounding box?
Basically, I'm binerizing images, using regionprops to get the long and short axis lengths, then storing those values in 2 different vectors to be plotted in a historgram.
However, as you can see in the attached picture, there are bounding boxes inside of bigger boxes... I can't figure out how to exclude the small within big ones. Also, I'm not sure if I want to totally exclude the minor overlap cases...
I will likely also try your solution above tomorrow too.
Thanks!
Image Analyst
2022-1-6
You can make a list of the (x,y) coordinates of all the box corners for all blobs. Then loop over them all finding out which one is inside another one using the inpolygon() function. Then compare the areas of the two and delete the smaller one.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Detection 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!