【发布时间】:2020-03-28 18:31:15
【问题描述】:
有谁知道在openCV中保存视频的任何功能。
最好是能够使用它的函数。
我尝试过实现,但我做不到
【问题讨论】:
-
到底是什么问题?你做过研究吗?
-
我已经解决了。谢谢,如果你想看到这个问题 hihi stackoverflow.com/questions/60907884/…
有谁知道在openCV中保存视频的任何功能。
最好是能够使用它的函数。
我尝试过实现,但我做不到
【问题讨论】:
OpenCV 有您可以使用的 VideoWriter API。 请参见下面的示例代码:
##define the video writer
out = cv2.VideoWriter(<filename_with_extention>,<compression_format>, <frames_per_second>, (frame_width,frame_height))
## write a frame in the loop
out.write(<your_frame>)
## Release the video writer outside of the scope of the loop
out.release()
【讨论】: