背景扣除

发布于 2024-08-27 01:00:11 字数 91 浏览 6 评论 0原文

我正在使用 opencv 进行背景减法。问题是前景物体并不总是被正确检测到。为了解决这个问题,我想使用四到五张图像,并将它们的平均值作为背景图像。我怎样才能做到这一点?

I'm doing background subtraction using opencv. The problem is the foreground object is not always detected correctly. To deal with this I would like to use four or five images, and take their average as the background image. How can I do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

甜`诱少女 2024-09-03 01:00:11

也许遍历所有图像,如果有问题的像素在所有图像的颜色变化范围内,是否将其视为背景?

然后我想范围的大小将决定你的挑剔程度以及你对相机的稳定性和一致性的信心。

Perhaps go through all the images, and if the pixel in question is within a certain range of colour variation for all the images, disregard it as background?

Then I suppose the size of the range would determine how picky you were and how confident you are in the stability and consistency of your camera.

善良天后 2024-09-03 01:00:11

您应该尝试使用 OpenCV 中包含的背景检测器(在 cvaux.h 下)。如果你想找到物体斑点,他们还有斑点探测器。

通过结合斑点信息和光流信息,通常可以找到前景物体。

You should try using the included background detector in OpenCV (under cvaux.h). They also have blob detector if you want to find object blob.

By combining blob information and optical flow information, you can usually find the foreground object.

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