问题描述及原因分析
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>
error: ‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope文章来源:https://www.toymoban.com/news/detail-518010.html
Use cv::FONT_HERSHEY_SIMPLEX instead of CV_FONT_HERSHEY_SIMPLEX文章来源地址https://www.toymoban.com/news/detail-518010.html
到了这里,关于【Opencv】CV_* was not declared in this scope 的部分解决方法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!