0

i want to analyse videos given in avi format. For that I need to represent video as series of matrices. Every matrix represents one frame from the video. How can I do it? I prefer to use Python and Java but other options are also welcomed.

Roman
  • 124,451
  • 167
  • 349
  • 456

1 Answers1

1

You can try OpenCV. It has C, C++ and Python API. It treats images as matrices, so reading the video will result in matrices.

Talking about the C++-Interface (Python is similar), there is cv::VideoCapture class. You can initialize such an object with your video file name. Then you can grab each frame separately and retrieve it into a matrix (cv::Mat).

ypnos
  • 50,202
  • 14
  • 95
  • 141
  • Actually, I tried to use OpenCV and could not manage to do it (more details are here: http://stackoverflow.com/questions/5030362/how-to-use-opencv-in-python). So, it is why I started to search for an alternative. – Roman Feb 17 '11 at 16:30