Hi everyone,
I want to detect and measure the centre of circles and their corresponding radius in a vector. 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,
- 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)
- 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.
The colour of the board in this case is green. But the board colours are not fixed.
Issues in the current contour approach :
- Can't set a fixed threshold value(blocksize and constant parameter incase of adaptive thresholding) for all sets of colour boards.
- 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!