Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Pattern recognition in bayer and mono cameras

It's experience-related question about cameras and image processing.

 

I have a laboratory setup. Under some simplifications it looks like a red ball rolling on a white table (the real setup is shown here https://www.youtube.com/watch?v=kyvW5sOcZHU). A computer vision system should measure X and Y positions of the ball.

 

For now I use a color camera (with Bayered output) and I find the ball by applying a simple color filter (InRange for R, G, and B components) to the frames. It works, but I would like to increase precision of the measurements.

 

Question:

Would accuracy of measurements be better in a case I used a mono camera with the same parameters as bayer-camera?

 

I guess it should be so in a perfect case, i.e. when the ball is definitely highlighted on the frames. But in reality brightness filter usually works worse than color filter. On the other side I can change the shooting conditions, because this is laboratory setup. I can change the color of the objects, I can change lighting.

0 Kudos
Message 1 of 5
(4,376 Views)

Theoretically i think it is more precise, due to the absence of the debayering filter. I think it's better to choose complementary colors for the ball and the background (black on white?). 

0 Kudos
Message 2 of 5
(4,365 Views)

Edges are a lot fuzzier with color cameras due to bayer filtering, but I suspect finding a large circular object works pretty well due to the large number of edge pixels.  Theorectically, a grayscale image would work better because the edges are more clearly defined.  When using color, I would probably use the hue and saturation images with any color other than red.  Red's hue is zero, which is the same as grayscale.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 5
(4,362 Views)

Thank you guys for the answers. According to your comments it's better to use grayscaled camera, and shooting conditions should be as good as possible.

 

I thought about drawing the ball by fluorescence paint. I can install ultraviolet lighting so that the only ball re-emits this light. So, the camera can see the only re-emitted light from the ball and reflected from other objects this re-emitted light. The ball should be much brighter than other objects. What do you think about this?

0 Kudos
Message 4 of 5
(4,357 Views)

Probably overly complex.  I would stick with one of two approaches.  Black/white contrast between ball and background, or paint the ball with a color with a significantly different wavelength than the background, and use a color filter on the lens so you only see the ball.  Don't use a white background in this case, because part of the white wavelength matches the ball color.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 5 of 5
(4,294 Views)