Issues Detecting Circle From Spotlight

It seems to be working fine for a range of the images now, but there are still a number of images that I am continuing to struggle with:

The original looks like this:

While the processed image looks like this:

And it is throwing an error indicating that it was unable to detect circles, by saying that the circles output was empty.

There also seems to be an issue with the smaller images, as the result for most of the instances with the small images looks like this with the center being correct, but the outer part of the circle being overshot :
Screenshot 2023-06-17 at 9.11.57 PM

For the majority of the images, it is finally starting to look like this after playing around with the parameters a little bit.

The parameters passed through through circles looked as follows:

circles = cv.HoughCircles(blur, cv.HOUGH_GRADIENT, 1, 30, param1=200, param2=45)

The other parameters I tried with the minDist, and the param1 and 2 values began detecting false circles, not giving me circles at all, etc.

not once have you linked to your entire stash of pictures. don’t be surprised if people can’t come up with perfect approaches if you give us tiny pieces of your data and insufficient detail on how these pictures were made. your latest error description ends at “it was unable to detect images”. I don’t know how others can muster the patience. I’m just letting you know that you have room for improvement that you have yet to step into.