【Opencv】CV_* was not declared in this scope 的部分解决方法

问题描述及原因分析

Opencv在更新到 新版本 后,在运行有些 旧版本 的代码时会出现此类情况

解决方案:

error: ‘CV_AA’ was not declared in this scope

在头文件中添加 #include <opencv2/imgproc/imgproc_c.h>


error: ‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope

在头文件中添加 #include <opencv2/calib3d/calib3d_c.h>


error: ‘CV_GRAY2BGR’ was not declared in this scope

在头文件中添加 #include <opencv2/imgproc/types_c.h>

Guess you like

Origin blog.csdn.net/weixin_56917387/article/details/128965270