How can i make sure that using imfindcircles will result in non-overlap circles?

조회 수: 8 (최근 30일)
asnida
asnida 2014년 6월 18일
댓글: Image Analyst 2022년 1월 6일
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?

답변 (2개)

yonatan gerufi
yonatan gerufi 2014년 8월 24일
Hi Asnida, Use "Circles overlap remover" function (see on file exchange here )
I also recommend reading this example
good luck!

Image Analyst
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
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
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 CenterFile Exchange에서 Detection에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by