1 | initial version |
I have not done this exactly before but how I would do it is to capture your image then process it thresholding to prepare for contour extraction. once you have done that find the length of contours. according to the results of your image processing so far you can specify that the contours are closed or else you will need to combine close enough contours. Next find the centroid of your contours and view the results if in centre of circles then you can find the radius and knowing the circumference (length of contour) divide contour length by 2пr for a circle the value should be close to 1.