Detecting Coloured Circles With a Noisy Background

Hi,

I’m completely new to the world of machine vision and I’ve recently been trying to create a program that can get the location of coloured circles painted on a white ring with a messy background.

So far, I’ve tried various methods such as thresholding and creating masks based on HSV values. This was then followed by erosion and dilation of the image. I’ve also performed simple blob detection and Hough circle transforms to try and locate the circular shapes.

No combination of these methods has worked perfectly, but the method that has worked the best for me so far is: Dilation → Mask (of the coloured circles) → Erosion → Dilation → Simple Blob Detection.

I was wondering if anyone else might know of some other techniques that could be used to detect these circles without detecting other objects.

I’ve attached a few sample images where I’m trying to perform this task in (turns out I can only upload a single image but there’s other examples where the coloured circles on the ring are more clear).

Kind Regards,
Conor.