具体教程在这里:
https://blog.csdn.net/qinchang1/article/details/87528245
我这里写一些注意事项和我遇到的问题。
这里需要自己新建
一个:comboBox,名字不需修改
两个按钮:pussButton。播放:displayButton。停止:stopButton。
一个label显示视频画面,这个名字也无需修改。
代码直接复制好就可以运行。
如果出错,大概率是附加依赖项配置问题。
以下为我的配置,我的opencv版本为2.4.9,需要更改成自己版本:
qtmaind.lib
Qt5Cored.lib
Qt5Guid.lib
Qt5UiToolsd.lib
Qt5Widgetsd.lib
opencv_ml249d.lib
opencv_calib3d249d.lib
opencv_contrib249d.lib
opencv_core249d.lib
opencv_features2d249d.lib
opencv_flann249d.lib
opencv_gpu249d.lib
opencv_highgui249d.lib
opencv_imgproc249d.lib
opencv_legacy249d.lib
opencv_objdetect249d.lib
opencv_ts249d.lib
opencv_video249d.lib
opencv_nonfree249d.lib
opencv_ocl249d.lib
opencv_photo249d.lib
opencv_stitching249d.lib
opencv_superres249d.lib
opencv_videostab249d.lib
opencv_objdetect249.lib
opencv_ts249.lib
opencv_video249.lib
opencv_nonfree249.lib
opencv_ocl249.lib
opencv_photo249.lib
opencv_stitching249.lib
opencv_superres249.lib
opencv_videostab249.lib
opencv_calib3d249.lib
opencv_contrib249.lib
opencv_core249.lib
opencv_features2d249.lib
opencv_flann249.lib
opencv_gpu249.lib
opencv_highgui249.lib
opencv_imgproc249.lib
opencv_legacy249.lib
opencv_ml249.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
下面是我的opencv依赖项路径: