1

The function cvCaptureFromAVI allocates and initializes a CvCapture structure in order to read a video stream from the specified file. The function cvCaptureFromCAM works in a similar way, but the source of the video is a webcam. Once the CvCapture structure has been allocated and initialized properly, the reading of each frame is performed using the function cvQueryFrame.

Since I have a sequence of frames as images saved on disk, I would allocate a CvCapture structure for reading an image stream from the specified file list. How should I initialize the CvCapture structure?

karlphillip
  • 92,053
  • 36
  • 243
  • 426
enzom83
  • 8,080
  • 10
  • 68
  • 114

1 Answers1

1

Since you mentioned OpenCV's C API, the magic is done by cvCreateVideoWriter().

Here's a demo using Python.

Community
  • 1
  • 1
karlphillip
  • 92,053
  • 36
  • 243
  • 426