我最近安装了opencv 2.4.9,但函数cvCaptureFromFile(" tunnel.avi");不管用。 opencv 2.4.9中包含哪些标题以使其运行此功能。请帮助。
#include <cv.h>
#include <highgui.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
CvCapture * capture = cvCaptureFromAVI("tunnel.avi");
if (capture == NULL)
{
printf("Error: Can't open video.\n");
return -1;
}
double fps = cvGetCaptureProperty( capture, CV_CAP_PROP_FPS );
printf("fps = %f",fps);
}