We have been spending some time on AF lately (when we can… most of our time is actually spent on support). Circle detection, in and of itself, is not a complex process, but the quality of the circles, as you can imagine, has a dramatic effect on the success of finding these circles. Furthermore, donuts appear when an image is out of focus and the further from focus you are, the less pronounced the star circles.
So… we are having some trouble with this. Lots of methods tried… none super great. Circular Hough Transform, generalized blob detection, custom methods. This sample is pretty typical of the results we have been seeing (hit or miss):
You can see that some stars are found and others are passed over completely. The general process:
- Convert 16bpp to 8bpp
- Convert 8pp grayscale image to a binary image
- Run blob / hough transform on the binary image
Ultimately, it is the process of converting an image to binary that is troubling us. Dark / bias subtraction don’t really help here (they do a little). The binary images end up looking like this:
This obviously makes it very difficult to detect circles…
So… while we cannot accept code directly from folks, it is certainly permissible to offer suggestions or point to code published elsewhere. We spend a lot of time with hardware and automation, but image processing is not something we have a great deal of expertise with…
So… Any ideas on how to get a solid binary image where most of the noise junk is effectively stripped away, leaving just the star donuts? In terms of intensity, the noise artifacts are pretty close to that of the actual stars.