cv::VideoCapture capture(filename); if (!capture.isOpened()) { cout << "open video error"; }
每次总是显示open失败
解决办法:
1) filename的路径写的不对
2)工程下没有相应版本的dll,比如我是3.3.1版本就要增加opencv_ffmpeg331_64.dll 这个动态库