简体   繁体   English

Opencv / c ++-在线程中录制实时视频,在另一个线程中进行图像处理?

[英]Opencv/c++ - Record live video in thread, image processing in another thread?

I am hoping to write a program that records a live video from a webcam at a constant frame-rate, while performing image processing between video recording. 我希望编写一个程序,以恒定的帧速率记录来自网络摄像机的实时视频,同时在视频记录之间执行图像处理。

The image processing algorithm will take longer than the frame rate, so the video recording would take priority. 图像处理算法所花费的时间将比帧速率长,因此视频记录将具有优先权。

I am guessing that the answer is threading, although I am new to this concept. 我想答案是线程化的,尽管我是这个概念的新手。 Is this achievable using threading? 使用线程可以实现吗? What might a template look like for this? 模板可能是什么样子?

Any help would be greatly appreciated. 任何帮助将不胜感激。

You could have a look at this: 您可以看一下:

https://code.google.com/p/qt-opencv-multithreaded/ https://code.google.com/p/qt-opencv-multithreaded/

Is is done in Qt thread, but I think Qt thread is very easy to understand: 是在Qt线程中完成的,但是我认为Qt线程很容易理解:

http://qt-project.org/doc/qt-5/thread-basics.html http://qt-project.org/doc/qt-5/thread-basics.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM