简体   繁体   English

阅读矢量 <Mat> 还是视频? (Opencv和C ++)

[英]Reading vector<Mat> or Video ? (Opencv & C++)


I'm currently on a project where I have several picture taken with a camera. 我目前正在进行一个项目,我用照相机拍摄了几张照片。
My goal here is to make a video out of those pictures. 我的目标是用这些图片制作视频。
The problem is that pictures are not continuous ( there are some pictures missing in between). 问题是图片不连续(两者之间缺少一些图片)。
And so when I'm trying to use Videowriter functions to create (obviously) a video the result is really messy and very speedy. 因此,当我尝试使用Videowriter功能创建(显然)视频时,结果非常混乱且速度非常快。
So I had an idea about creating an equivalent of a video reader but by reading a vector instead of a video: the display speed would depending on a cooldown between every pictures of my vector. 所以我想到了创建一个等效的视频阅读器,但通过阅读矢量而不是视频:显示速度取决于我的矢量的每张图片之间的冷却时间。
I would like to know your opinion about my solution and what would be your solution? 我想知道您对我的解决方案的看法以及您的解决方案是什么?
Thanking you. 感谢您。

Reduce the FPS in the VideoWriter object, 减少VideoWriter对象中的FPS,

VideoWriter video(videoname, CV_FOURCC('M','J','P','G'), FPS, Size, true);

Try with FPS = 5 or even lesser, this might work 尝试FPS = 5甚至更低,这可能会有效

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

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