Skip to content Skip to sidebar Skip to footer

Color Detection Not Efficient On Webcam Images

I am working on a project where I'm trying to detect green and red circles on a specific surface (arena). When I try to do so with the digital version of that arena (PNG image), I

Solution 1:

It is definitely worth trying to improve initial conditions (perspective, light, resolution, etc). Current result produced by the webcam is somewhat awful, so instead of spending lots of time fixing that it might be better to use less cheaper hardware.

You can use some fancy methods to improve your image, but still, it is better to have more valuable input.

enter image description here Anyway, here is the useful part. Your markers are not unique, so any attempt to use color will require additional shape analysis. Here are some results using color segmentation:

enter image description here

As you can see some areas have pretty similar colors. I use a bit more advanced color similarity function to handle complex cases. Basically, I specified red and green with some thresholds. Delta E will be the right starting point. Let's see the actual shapes:

enter image description here

With those results you can do a simple shape analysis or just compare areas to find your markers. I'd prefer to have a bit more unique colors and better initial conditions.

Anyway, any real-life scene will require you to be really careful working with colors:

enter image description here

(see in action)

Similar problem:

Issue of the recognize people by their clothes color with not severe illumination environments

Solution 2:

Because of the light changes, hard thresholding won't help you to find the desired circles, you should consider an interval for the target color. For example find all the pixels that their green value are between 200 and 255 (set these by trial and error) to make sure you always catch the little circels.

Now some other parts of the image too, may survive the thresholding. In this situation you can filter those unwanted parts by shape analysis methods like Hough Circle detector or based on their sizes.

Post a Comment for "Color Detection Not Efficient On Webcam Images"