@kbarni - Thanks that’s great. Applying the laplacian operator first looks to be improving the accuracy of the HoughCircles detection, which was already pretty good for these images, but could be a bit intermittent (see subsequent posts below). That is a considerable bonus. But, could you clarify your suggestion:
iterate in several directions from this point, and check the distance to the maximum gradient value…
Now this seems to be the crux of what is needed. Are you suggesting a pixel-level iteration? e.g. One of the following methods
https://docs.opencv.org/2.4/doc/tutorials/core/how_to_scan_images/how_to_scan_images.html
If doing pixel iteration, then looking at the output of the laplacian operator below, I’d be nervous about the bit at the top of the circle where there is a ‘disconnect’. i.e. When exactly to stop? Is there a different type of iterator that might be more appropriate for this purpose?
Laplacian output: