【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>

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
心中带点小风骚的头像心中带点小风骚普通用户
上一篇 2023年11月9日
下一篇 2023年11月9日

相关推荐