Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting multiple circles in an image

Hi,

 

I know this thread is getting a few days old, but I figured it was better to post here rather than to open a new thread.

 

So now I've RGB-tresholded the image, and applied watershed segmentation to separate the objects (as indicated in the solution wizard, big kudos to ChristopheC). However, "cracks" are appearing in some of the circles after the separation resulting in them not being detected as circles. I've tried to dilate the objects so that the fragmented parts may again form a circle, but this makes the objects join together rendering the watershed useless.

 

The script is attached

 

 

0 Kudos
Message 11 of 15
(1,806 Views)

In the Image Processing Handbook, John C Russ explains a technique that should help with what you're describing (on page 496).

 

http://books.google.com/books?id=Vs2AM2cWl1AC&pg=PA494&lpg=PA494&dq=watershed+segmentation+image+pro...

 

Give it a try.

 

-Christophe

0 Kudos
Message 12 of 15
(1,790 Views)

Unfortunately, the book is not available online in my country (stupid limitations) 😕

0 Kudos
Message 13 of 15
(1,786 Views)

I just managed to get hold of a copy, trying out a solution as we speak.

0 Kudos
Message 14 of 15
(1,781 Views)

So I've been trying different settings to achieve optimum result, however cracks seem to appear no matter how much I try to filter out unwanted particles. I've tried the solution indicated in the Image Processing Handbook. The process I've created is as follows:

 

RGB to binary > binary inversion > keep small particles within the circles > mask the original binary image to fill the holes in circles > watershed segmentation to separate > remove small particles > remove border objects > object separation > object dilation > processing

 

The part in italics is what I've implemented to avoid cracking in the watershed segmented image. In spite of this, the circles are cracking up (fewer than before though). The script and an image is attached.

Download All
0 Kudos
Message 15 of 15
(1,756 Views)