从视频中删除分割(例如人或鸟)的标准技术是什么?

发布于 2024-09-26 17:51:43 字数 94 浏览 2 评论 0原文

假设您正在拍摄视频(相机处于稳定位置),并且一只鸟飞过相机的视野。应该可以进行图像分割并自动从视频中删除这只鸟。

这些类型的算法叫什么?它们通常是如何实现的?

Let's say you are taking a video (with the camera in a steady position) and a bird flies through the view of the camera. It should be possible to do image segmentation and automatically remove this bird from the video.

What are these styles of algorithms called and how are they normally accomplished?

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

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

发布评论

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

评论(2

流云如水 2024-10-03 17:51:43

有一种名为简单图像对象提取 (SIOX) 的技术 - 它使用一种识别静态和视频图像中的前景与背景对象的技术。开源 GIMP 编辑器有它的实现,并且有 GIMP 编辑器。 siox.org/" rel="nofollow">更多信息请参见此处。

从概述来看:

SIOX 代表简单交互式对象提取,是一种无需用户交互即可从静态图像中提取前景的解决方案。 SIOX 速度快、抗噪能力强,因此也可用于视频分割。它避免了基于图的分割方法的许多缺点,但在不同的基准上表现大致相同。 SIOX 是开放且免费的(Apache 许可证),作者有意未对该技术的任何部分申请专利。因此,在过去的几年里,它已被集成到多个开源图像处理程序中。 SIOX 是 GNU 图像处理程序 (GIMP) 中前景提取工具的底层算法,也是 Inkscape 中跟踪器工具的一部分。 SIOX 源自 E-Chalk,其中站在电子黑板前的讲师被分段。 SIOX 的变体用于机器人视觉和改进 3D 飞行时间相机分割。

这里是 SIOX 的 Java 参考实现的链接。

< strong>这是PDF 的链接,其中详细介绍了如何该算法的变体有效。

您应该能够对其进行调整,以使用帧间插值,通过使用周围帧的时间数据从视频的每个帧中删除特定的前景对象。

There's a technique called Simple Image Object Extraction (SIOX) - it uses a technique to identify foreground vs. background objects in still and video images. The open source GIMP editor has an implementation of it, and there's more information about it here.

From the overview:

SIOX stands for Simple Interactive Object Extraction and is a solution for extracting foreground from still images with very little user interaction. SIOX is fast, noise robust, and can therefore also be used for the segmentation of videos. It avoids many of the drawbacks of graph-based segmentation methods but performs about equally well on different benchmarks. SIOX is open and free (Apache License) and the authors have intentionally not patented any part of the technology. As a result, it has been integrated into several open-source image manipulation programs over the past years. SIOX is the underlying algorithm of the foreground extraction tool in the GNU Image Manipulation Program (GIMP) and is part of the tracer tool in Inkscape. SIOX originates from E-Chalk where an instructor standing in front of an electronic chalkboard is segmented. Variants of SIOX are being used for robotic vision and for improving 3D time-of-flight camera segmentation.

Here's a link to the Java Reference Implementation of SIOX.

Here's a link to the PDF with details about how a variation of the algorithm works.

You should be able to adapt it to use inter-frame interpolation to remove a specific foreground object from each frame of a video by using temporal data from surrounding frames.

放低过去 2024-10-03 17:51:43

如果相机是固定的并且场景中没有太多运动,那么我会建议一种基于背景减法的方法。

步骤 1:计算视频每一帧的背景。有复杂的算法可以实现此目的,但一种非常简单且有效的算法是计算 3 秒时间窗口内图像中每个像素的中值。如果所讨论的物体移动缓慢,则时间更长。顺便说一句,如果您只是执行这种过滤,如果相机是固定的,它将从视频中删除大多数移动对象,因此我之前提出了关于所有对象与一个对象的问题。

步骤2:用画笔工具标记每帧中要删除的区域,并用背景像素替换它们。不必费心使用精细画笔或套索工具,因为您标记的任何非对象像素都将被其过滤后的版本替换。您可能可以对多个帧使用相同的画笔标记,因为边界并不那么重要。如果该对象是场景中唯一移动的物体,您可以标记整个帧并将其替换为背景。

无论如何,为了回答您更普遍的问题,您想要研究的主题称为图像修复视频。关于这个主题有很多文献,我所描述的只是一个超级简单的方法,你可以用 opencv 在一个小时左右的时间内实现。

If the camera is fixed and there isn't too much motion in the scene, then I would suggest a method based on background subtraction.

Step 1: Compute background for each frame of the video. There are complicated algorithms for doing this, but a very simple and effective one would be to compute the median value of every pixel in the image across a 3 second time window. Longer if the object in question is moving slowly. Incidentally, if you just perform this kind of filtering it will remove most moving objects from the video if the camera is fixed, hence my earlier question about all objects vs. one object.

Step 2: Mark the regions you want to remove in each frame with a brush tool, and replace them with the background pixels. Don't bother with a fine brush or lasso tool as any non-object pixels you mark will just be replaced with their filtered version. You could probably use the same brush marks for several frames since the boundary is not so important. If the object is the only thing moving in the scene, you could just mark the entire frame and have it replaced with the background.

Anyways, to answer your more general question, the topic you want to research is called inpainting for images and video. There is quite a bit of literature out there on the subject, what I described was just a super simple method you could implement in an hour or so with opencv.

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