识别移动物体并将其与背景区分开来?

发布于 2024-10-07 01:16:30 字数 87 浏览 0 评论 0原文

我正在从事一个项目,我用相机拍摄视频并将该视频转换为帧(项目的这部分已完成) 我现在面临的是如何检测这些帧中的移动物体并将它们与背景区分开,以便我可以区分它们?

iam working in a project that i take a vedio by a camera and convert this vedio to frames (this part of project is done )
what iam facing now is how to detect moving object in these frames and differentiate them from the background so that i can distinguish between them ?

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

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

发布评论

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

评论(2

云雾 2024-10-14 01:16:30

我最近阅读了一篇关于此的精彩 CodeProject 文章。它讨论了解决该问题的几种方法,然后使用完整的代码逐步引导您完成其中一种解决方案。它的编写水平非常容易理解,应该足以让您入门。

I recently read an awesome CodeProject article about this. It discusses several approaches to the problem and then walks you step by step through one of the solutions, with complete code. It's written at a very accessible level and should be enough to get you started.

别闹i 2024-10-14 01:16:30

一种简单的方法(如果存在很少的噪声,我建议平滑内核思想)是计算两个连续帧的绝对差。您将获得已“移动”的事物的图像。背景需要非常静态才能工作。如果您始终获得从当前帧到第 n 帧的绝对差异,您将获得包含移动对象的灰度图像。该物体必须与背景颜色不同,否则它就会消失......

One simple way to do this (if little noise is present, I recommend smoothing kernel thought) is to compute the absolute difference of two consecutive frames. You'll get an image of things that have "moved". The background needs to be pretty static in order to work. If you always get the abs diff from the current frame to the nth frame you'll have a grayscale image with the object that moved. The object has to be different from the background color or it will disappear...

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