OpenCV frame capture from AVI
问题 I am working on a project with openCV 2.2. I need to do processing on each frame of an AVI file but when I run my code it only grabs the first frame of the file. The CV_CAP_PROP_POS_FRAMES does not seem to be working. Any ideas why not? CvCapture* capture = cvCaptureFromAVI("test1.avi"); IplImage *img = 0; if (!cvGrabFrame(capture)) { printf("Error: Couldn't open the image file.\n"); return 1; } int numFrames = (int) cvGetCaptureProperty(capture, CV_CAP_PROP_FRAME_COUNT); int posFrame = 1;