Measuring Circle Centre point and Radius!! Finding a fixed threshold parameter

asked 2015-04-28 07:52:15 -0500

Karthikeyan gravatar image

updated 2015-04-28 09:43:20 -0500

Hi everyone,

I want to detect and measure the centre of circles and their corresponding radius. The radius measurement is critical in my application with 0 pixel deviation ideally. Because even 1pixel deviation of measured radius is resulting in a 0.2-0.5 mm deviation in real world which is not desirable in my case.

Methods tried so far,

  1. Tried Hough circles with varying parameters.(Since, in real time the environment will be varying, cant able to choose a set of parameters for a general ideal case. Moreover, this method was giving a lot of false circles)
  2. Contour based approach : Finding contours of threshold image and checking whether the contour satisfies certain circle properties. Getting the radius and center using minEnclosing circle with this contour. Tried binary thresholding, adaptive thresholding and HSV masking to create the threshold image.

Here I am attaching few of my input images. Circle of different radii taken at varying conditions

The colour of the board in this case is green. But the board colours are not fixed.

Issues in the current contour approach :

  1. Can't set a fixed threshold value(blocksize and constant parameter incase of adaptive thresholding) for all sets of colour boards.
  2. For certain parameters set for thresholding, not all circles are thresholded equally.
  3. The lighting is also affecting the accuracy to greater extent.

Since the accuracy of measurement depends on this threshold stage, Direct me through the right direction. Are there any ways to set the threshold parameters fixed for different colour boards and lighting conditions?? Or if there are other methods available in detecting the circles, so that I can achieve the ideal zero pixel deviation??

Any help could be really appreciated. Thanks in advance!

edit retag flag offensive close merge delete