版本信息:OpenCV4.2.0,开发工具:VS2019
错误:未定义标识符 "CV_WINDOW_AUTOSIZE"
原因:未引用库 ,
解决:在源文件开头输入 #include <opencv2/highgui/highgui_c.h>
错误:未定义标识符 "CV_CAP_PROP_FRAME_WIDTH"
未定义标识符 "CV_CAP_PROP_FRAME_HEIGHT"
原因:新版本已经改名
解决:改为
CAP_PROP_FRAME_WIDTH
CAP_PROP_FRAME_HEIGHT
错误:未定义标识符 CV_FOURCC('M', 'J', 'P', 'G')
原因:改名
解决:改为 CAP_OPENCV_MJPEG
错误:未定义标识符 "CV_BGR2GRAY"
未定义标识符 "CV_MOP_CLOSE"
未定义标识符 "CV_MOP_OPEN"
原因:缺少头文件。
解决:#include <opencv2\imgproc\types_c.h>
错误:The build tools for Visual Studio 2017 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install Visual Studio 2017 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the sol