这是来自O'Reilly的opencv学习的代码片段,对于CV_CAP_PROP_FRAME_COUNT,cvGetCaptureProperty始终返回0!
cvNamedWindow("Example3", CV_WINDOW_AUTOSIZE);
g_capture = cvCreateFileCapture(argv[1]);
int frames = (int) cvGetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_COUNT);
if (frames != 0) {
cvCreateTrackbar("Position", "Example3", &g_slider_postion, frames, onTrackbarSlide);
}
但不幸的是,cvGetCaptureProperty始终返回0找遍了OpenCV的组中的雅虎,发现了同样的问题。