使用 OpenCV 补偿自动白平衡
我正在开发一个应用程序,它接收网络摄像头数据,应用各种转换,模糊,然后进行背景减法和阈值过滤。这是一种光学触摸屏改装系统(设计差异很大,无法使用tbeta/touchlib)。
相机的白平衡会破坏阈值滤镜,只要看到用户的手,所有东西都会变亮,而当它离开时,所有东西都会变暗,导致其中一只手表现出大量的静电。
有没有好的办法来抵消呢?取一个角,假设它是恒定的,然后调整图像的其余部分的亮度以使其保持恒定是一个好主意吗?
I'm working on an app that takes in webcam data, applies various transformations, blurs and then does a background subtraction and threshold filter. It's a type of optical touch screen retrofitting system (the design is so different that tbeta/touchlib can't be used).
The camera's white balance is screwing up the threshold filter by brightening everything whenever a user's hand is seen and darkening when it leaves, causing one of those to exhibit immense quantities of static.
Is there a good way to counteract it? Is taking a corner, assuming it's constant and adjusting the rest of the image's brightness so that it stays constant a good idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试通过 DirectShow 连接相机并通过代码关闭自动白平衡,或者您可以首先尝试使用随其部署的相机软件。它通常使您能够进行某些修改,如白平衡和类似的东西。
You could try interfacing your camera through DirectShow and turn off Auto White Balance through your code or you could try first with the camera software deployed with it. It often gives you ability to do certain modifications as white balance and similar stuff.