Compensate for Auto White Balance with OpenCV

I am working on an application that receives webcam data, applies various transformations, blurs, and then performs background subtraction and threshold filter. This is a type of optical touch screen system (the design is so different that tbeta / touchlib cannot be used).

The white balance of the camera tightens the threshold filter, brightening everything when the user's hand is visible and darkens when it leaves, which leads to the fact that one of them shows huge amounts of static.

Is there a good way to counteract this? Does it take an angle, considering it constant and adjusting the rest of the image brightness so that it remains a constant good idea?

+4
source share
1 answer

You can try to connect the camera via DirectShow and disable automatic white balance through your code, or you can try first using the camera software deployed with it. This often gives you the ability to make certain changes like white balance and similar material.

+1
source

All Articles