使用 PyQT / OpenCV 进行交互式电影/视频处理

发布于 2024-11-10 12:32:30 字数 732 浏览 4 评论 0原文

我正在开始一个项目,在该项目中我需要为电影和视频构建一个定制的注释工具。有些人(不懂技术)需要打开我创建的 GUI,打开视频文件或由切碎视频文件产生的帧目录,然后使用窗口(很像 QuickTime 或 VLC 播放器,等,即带有简单滑动条的视频窗口,允许用户随意前后移动)。在此窗口中,用户将能够单击感兴趣的点,为它们提供语义标签和元数据(例如该点是否被图片中的其他内容遮挡),然后基本上“按开始”并开始一个追踪器。跟踪器将逐帧跟踪这些点,用户可以按空格键或其他东西来向前和向后移动。这个想法是让人类在跟踪器感到困惑时进行干预,但希望跟踪器工作得足够好,以至于人类不必手动标记整个数千帧视频序列中的每一帧。

我计划用 Python 来完成这一切,(a)因为它是我最了解的非平凡编程语言,(b)我可以轻松访问 OpenCV Python(用于图像处理算法)和 PyQt,它似乎有一个足够强大的 GUI 工具箱,可以满足我想要做的事情,并且 (c) 其他程序员正在开发同一项目的一些其他方面,以在 Python 和 MySQL 数据库中工作。 Python 似乎是简化这一切的自然选择。

我有使用计算机视觉算法进行跟踪的经验,并且我有理由相信我可以找出简单的 PyQt GUI 设备来使点可点击、按钮、输入简单的文本数据等。但是,我无法理解的部分是如何实际构建我自己的带有滑动条的视频窗口,该滑动条要么根据帧的编号向前移动,要么实际上操作视频文件。在使用 Python 编程时,我可以在 PyQt 中利用其他电影播放器​​(例如 VLC)吗?任何描述类似电影/视频编辑 GUI 以及如何在家开发它们的建议或链接将不胜感激。

I am starting out on a project in which I need to build a customized annotation tool for movies and video. Some person (not technically minded) will need to pop open a GUI that I create, open either a video file or a directory of frames that result from chopping up a video file, and then use a window (much like QuickTime or VLC player, etc., i.e. a video window with a simple slider bar allowing the user to move back and forth at will). In this window, the user will be able to click on interesting points, give them semantic labels and meta-data (such as whether or not the point is occluded by something else in the picture), and then basically "press go" and start a tracker. The tracker will follow the points, frame by frame and the user can press the space bar or something to move forward and backward. The idea is to allow the human to intervene any time the tracker gets confused, but hopefully the tracker works well enough that humans don't have to hand-label every frame in an entire multi-thousand frame video sequence.

I am planning to do this all in Python, (a) because it is the language I know best for non-trivial programming, (b) I have easy access to both OpenCV Python (for image processing algorithms) and PyQt which seems to have a powerful enough GUI toolbox for what I want to do and (c) some other aspects of this same project are being developed by other programmers to work in Python and with MySQL databases. Python just seems like the natural choice to streamline it all together.

I am experienced using computer vision algorithms for the tracking, and I am reasonably sure that I can figure out simple PyQt GUI devices for making points clickable, buttons, entering simple text data, etc. However, the part I am having trouble understanding is how to actually construct my own video window with a slider bar that either moves ahead according to a frame's number or else is actually manipulating a video file. Can I leverage other movie players like VLC from within PyQt when programming in Python? Any suggestions or links that describe similar movie/video editing GUIs and how to develop them at home would be greatly appreciated.

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

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

发布评论

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

评论(1

命硬 2024-11-17 12:32:30

Qt(PyQt) has a good multimedia support via Phonon module. You can easily use that module to achieve Video window, it can provide an easy-to-use video player and you can get playing position etc.

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