编译时报错:

error: ‘CV_RETR_EXTERNAL’ was not declared in this scope; did you mean ‘CV_DEPRECATED_EXTERNAL’?cv::findContours(mid, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE);

在对应cpp里添加头文件即可:

#include <opencv2/imgproc/types_c.h>

参考:
https://blog.csdn.net/weixin_43738246/article/details/116521150

CV_RETR_TREE’ was not declared in this scope相关推荐

  1. catkin_make时出现‘CV_RETR_TREE’ was not declared in this scope

    catkin_make时出现'CV_RETR_TREE' was not declared in this scope,是cv::findcontours的API更新问题,返回值数量发生了变化: /h ...

  2. 【C++】mingw32-make+cmake:error: ‘nullptr‘ was not declared in this scope解决方法

    ###问题 使用cmake成功(Configuring done Generating done)后,在cmd终端中执行 mingw32-make报错: error: 'nullptr' was no ...

  3. ndk error: malloc was not declared in this scope

    error: 'malloc' was not declared in this scope 解决方法: NDK_TOOLCHAIN_VERSION=4.8 APP_CPPFLAGS += -frtt ...

  4. 'imread' was not declared in this scope

    在opencv3中,会报这个异常: 'imread' was not declared in this scope 解决方法: #include <opencv2/core/core.hpp&g ...

  5. 'htons' was not declared in this scope 解决

    'htons' was not declared in this scope ndk 如果是在ndk下,引用如下即可: /* Must include in android ndk env */ #i ...

  6. 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题

    环境工具:Win10.VS2013.cocos2d-x-2.2.6.Cygwin.ADT 问题来源:写了一个小游戏,VS2013上运行成功,就尝试着打包apk,项目导入到ADT里面,添加了cocos2 ...

  7. 调用ffmpeg库编译时出现common.h:175:47: error: 'UINT64_C' was not declared in this scope

    解决办法 出现错误:jni/ffmpeg/libavutil/common.h:175:47: error: 'UINT64_C' was not declared in this scope 解决: ...

  8. ‘close’ was not declared in this scope

    'close' was not declared in this scope 'read' was not declared in this scope 'sysconf' was not decla ...

  9. 文档源代码opencv 中的错误error: ‘SurfFeatureDetector’ was not declared in this scope

    本篇文章朋友在青岛游玩的时候突然想到的...最近就有想写几篇关于文档源代码的文章,所以回家到之后就奋笔疾书的写出来发布了     这是文档中的源代码,:但是译编的时候会有一下错误:     error ...

最新文章

  1. 前端开发中的性能那点事
  2. 关于PHP中Session文件过多的问题
  3. 在ASP.NET2.0中的的UrlRewrite
  4. Async和Await如何简化异步编程几个实例
  5. input添加float样式后位置偏移的解决
  6. Matlab常用函数流水账
  7. 第17课:循环神经网络(RNN)
  8. stringstream的用法
  9. 据说很多女生都想知道男生是如何上厕所的?
  10. svn mysql_SVN使用MySQL验证用户名密码(HTTP)
  11. Window命令行工具操作文件
  12. 你或许不知道SDP 但它能改变IaaS安全现状 - 2017.09.05
  13. NeHe_Lesson8 Blending
  14. 关于protues仿真中的OLED显示模块的使用
  15. ug产品摆正高级技巧_UG8.0工件怎么摆正角度教程?
  16. 自用软件系列之:迅雷X ,无广告,纯净版
  17. 昂达平板不能开机刷机_手把手教你平板电脑刷机方法
  18. 使用栈实现中缀表达式转后缀表达式
  19. 手机摄像头基础知识-1-缩写篇
  20. C++:map.insert插入重复键(已存在键)将忽略,而非值覆盖

热门文章

  1. 十二个“一”的特征与剑三中十二门派风格相对应
  2. 生信分析、数据库网站集合
  3. 点到点的距离、点到直线的距离、点是否在直线上
  4. 视觉检测系统是怎么检测尺寸的?
  5. T045基于51单片机温湿度检测系统无线蓝牙传输Proteus仿真原理图PCB
  6. 高逼格的年终总结怎么写?这是我见过最系统的写法
  7. 与欢聚十年终成就百度 不吃老本的YY直播还能有“黄金时代吗?
  8. 【面试题】闭包是什么?this 到底指向谁?
  9. 面试题之Bug的生命周期
  10. 全球与中国激光光导鼓市场深度分析及发展研究预测报告