This is an 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 on the video). 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 grayscaled 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.

  • $\begingroup$ Actually I am going to buy a new camera, and I am thinking which one is better: this one or this one. P.S. I am sorry if it looks like ads. $\endgroup$ Sep 4, 2015 at 13:50
  • $\begingroup$ BTW: Welcome to DSP.SE! $\endgroup$
    – Peter K.
    Sep 4, 2015 at 13:51
  • $\begingroup$ Hmm. If light is an issue, I'd go with the monochrome option. More photons measured, might be better in that case. $\endgroup$
    – Peter K.
    Sep 4, 2015 at 13:56

1 Answer 1


The key here is how well your acquisition system can differentiate the ball from everything else. The other key is that the larger number of pixels on the object the better.

From a look at the video, and without seeing the grayscale version, I would think that a color camera (with the same pixel density as the greyscale camera) would do better.

One trick is: greyscale cameras are often more sensitive to IR and, as a result, have an IR filter inserted just above the image sensor. Your ball might be close enough to that so that, by removing the IR filter, the greyscale camera would do as well at seeing the ball as the color camera.

Another trick is: Try illuminating the field of view of either camera with a different colored light. You may find that the ball shows up better with one light source over the others (in one camera or the other).

Finally: try zooming in on the ball. That will get you more pixels and either the color or greyscale camera will benefit from the extra pixels.

  • $\begingroup$ I doubt that the Bayer Filter Image link can measures better than grayscale. If the both images have the same pixels density, the bayer image has the lower actual resolution than grayscale. It's because of mosaic filter. Am I right? $\endgroup$ Sep 4, 2015 at 13:47
  • $\begingroup$ Well, that's why I meant "resolution" by "pixel density" (i.e. if the grayscale filter has 100 pixels per unit area of 16 bit greyscale then the color camera also needs to have 100 pixels per unit area of 16bit (?) color). Otherwise, yes, the greyscale camera will have higher pixels per unit area than the bayer filtered color camera. $\endgroup$
    – Peter K.
    Sep 4, 2015 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.