Segmenting circular shapes from a binary image

I have several binary images, and my task is to segment the circular shape. The circles are not a perfect rounded circle, but they will all look like a circle. Here are some sample images and what I need:

enter image description here

As you can see above, the left images are the original images, and the correct images are what I need to do. The circles intersect with other shapes, but I only need a circle, as indicated in red. Imaginary lines are required to close the circle. What can I do in this case when processing images?

EDIT: in case the image above is broken, here: http://imageshack.us/photo/my-images/835/circleonly.jpg/

+7
source share
2 answers
+6
source

Do you know the radii of the discs you are looking for? If so, morphological discoveries (erosion, then dilatation) would be simple and very quick. The result of using Mathematica:

Opening[img, DiskMatrix[15]] 

enter image description here

If not, as expected, computing a contour image and then using the Hough transform would be an appropriate method. The image shown above shows the outline image.

+7
source

All Articles