使用 OpenCV 补偿自动白平衡

发布于 2024-09-18 03:37:03 字数 231 浏览 7 评论 0原文

我正在开发一个应用程序,它接收网络摄像头数据,应用各种转换,模糊,然后进行背景减法和阈值过滤。这是一种光学触摸屏改装系统(设计差异很大,无法使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空城之時有危險 2024-09-25 03:37:07

您可以尝试通过 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文