Finding small circles

I am trying to locate white circles on a dark, consistent and static background. I was originally using a standard lens and find_circles pretty successfully. I experimented with a fisheye and realized how much more area I can cover. The downside is that the circles are so small that the find_circles algorithm doesn’t seem to find them (as low as a 2 pixel radius.) I looked at find_blobs, but unlike the find_circles method there is only a minimum blob size and no upper bound. I know I can filter after the fact with blob.area, but I was wondering if putting an upper bound to the find_blobs would improve performance like it does withe find_circles.


A 2 pixel radius is not really seeable. Um, can you post some pictures from the camera?

Also, find_circles is scheduled for optimization. We can get some massive gains on its performance.

Picture attached with an arrow pointing at what I’m trying to locate. This is in my (messy) shop, but when it’s in its intended environment, the background will be very consistent.

If I can figure out how to reliably find something this small, then I can use a fisheye lens and reduce the camera count from 4 to 2 in my product. If I can’t then I need to use 4 cameras and will go back to find_circles. I’d still like to contribute to it, and will send you an email.


The circle detector technically can see those… but the noise floor from other things is so high that it will pickup a lot of other stuff too… i.e. there is a white patch near the top right that would be detected too.

Anyway, just use find_blobs(). Regarding detection speed… the algorithm iterates over all blobs it finds and then applies the size filter on blobs. The lower bound doesn’t improve the speed, it just filters out smaller blobs from the result. If you want to make it go faster there’s a stride option that can speed it up but then it might miss small objects. Find_blobs() hits 20 FPS on grayscale VGA however. it should be fast enough.