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 fi开发者_Python百科le that I have (*.avi) into separate frames.
Does anyone know how to do it?
Thanks!!
Take a look at cvCaptureFromFile
, cvQueryFrame
and cvSaveImage
! 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.
精彩评论