从HighGUI的一段代码中看OpenCV打开视频的方式
OpenCV的HighGUI提供了视频和摄像头的直接打开。那么它是如何实现的了?这里进行初步分析。 /*** Videoreader dispatching method: it tries to find the first* API that can access a given filename.*/ CV_IMPL CvCapture * cvCreateFileCaptureWithPreference ( const char * filename, int apiPreference) { CvCapture * result = 0; switch(apiPreference) { default : // user specified an API we do not know // bail out to let the user know that it is not available if (apiPreference) break; # ifdef HAVE_FFMPEG case CV_CAP_FFMPEG : ...