简体   繁体   English

如何使用 OpenCV 而不是 C++ 将视频分成帧

[英]How to break a video into frames using OpenCV over C++

I am really new to openCV and I would like to break a video file that I have (*.avi) into separate frames.我对 openCV 真的很陌生,我想将我拥有的视频文件 (*.avi) 分成单独的帧。

Does anyone know how to do it?有谁知道该怎么做?

Thanks!!谢谢!!

Take a look at cvCaptureFromFile , cvQueryFrame and cvSaveImage .看看cvCaptureFromFilecvQueryFramecvSaveImage They'll do everything you need.他们会做你需要的一切。

If you're more comfortable with using the C++ API, the VideoCapture class (see http://opencv.jp/opencv-2.2_org/cpp/highgui_reading_and_writing_images_and_video.html#videocapture ) is very convenient to use. If you're more comfortable with using the C++ API, the VideoCapture class (see http://opencv.jp/opencv-2.2_org/cpp/highgui_reading_and_writing_images_and_video.html#videocapture ) is very convenient to use.

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

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