问题: AttributeError: module ‘cv2.cv2’ has no attribute ‘estimateRigidTransform’
分析: 出现该问题的原因可能是opencv的版本太高,不存在estimateRigidTransform方法,查看文档后我们可以发现,该方法已被弃用,如下表述所示。

Deprecated:
Use cv::estimateAffine2D, cv::estimateAffinePartial2D instead.
If you are using this fuction with images, extract points using
cv::calcOpticalFlowPyrLK and then use the estimation fuctions.

根据表述我们可以使用estimateAffine2DestimateAffinePartial2D两个方法代替使用,但是到底应该选择哪一个方法进行替代,还需要看estimateRigidTransform方法的第三个参数fullAffine的取值。

  • fullAffine为true表示的是六自由度的仿射变换,对应的方法为estimateAffine2D
  • fullAffine为false表示的是四自由度的仿射变换,对应的方法为estimateAffinePartial2D

注意: 使用estimateAffine2DestimateAffinePartial2D方法需要两个返回值,第一个返回值对应的是方法estimateRigidTransform的返回值,第二个返回值表示的是内点inliers,它的具体作用尚未得知。

我是直接修改的:

mat_,inlier = cv2.estimateAffine2D(org_pts, target_pts)

欢迎关注公众号:算法工程师的学习日志,获取算法工程师的学习资料。如果有技术咨询,提供有偿咨询,联系qq(1762016542)或者公众号留言

解决AttributeError: module ‘cv2.cv2‘ has no attribute ‘estimateRigidTransform‘相关推荐

  1. 成功解决AttributeError: module ‘tornado.web‘ has no attribute ‘asynchronous‘

    成功解决AttributeError: module 'tornado.web' has no attribute 'asynchronous' 目录 解决问题 解决思路 解决方法 解决问题 Attr ...

  2. 成功解决AttributeError: module tensorflow.sets has no attribute intersection

    成功解决AttributeError: module tensorflow.sets   has no attribute intersection 目录 解决问题 解决思路 解决方法 T1.更新 t ...

  3. 成功解决AttributeError: module tensorflow.image has no attribute resize

    成功解决AttributeError: module tensorflow.image has no attribute resize 目录 解决问题 解决思路 解决方法 解决问题 Attribute ...

  4. 成功解决AttributeError: module tensorflow.compat has no attribute v1

    成功解决AttributeError: module 'tensorflow.compat' has no attribute 'v1' 目录 解决问题 解决思路 解决方法 1.tf.Session ...

  5. 成功解决AttributeError: module 'torch.utils' has no attribute 'data'

    成功解决AttributeError: module 'torch.utils' has no attribute 'data' 目录 解决问题 解决思路 解决方法 解决问题 AttributeErr ...

  6. 成功解决AttributeError: module ‘scipy.sparse‘ has no attribute ‘coo_array‘

    成功解决AttributeError: module 'scipy.sparse' has no attribute 'coo_array' 目录 解决问题 解决思路 解决方法 T1.conda直接下 ...

  7. 解决AttributeError: module ‘matplotlib.mlab‘ has no attribute ‘normpdf‘

    解决AttributeError: module 'matplotlib.mlab' has no attribute 'normpdf' 报错代码 y = mlab.normpdf(bins, mu ...

  8. 不降低scipy版本解决AttributeError: module ‘scipy.misc‘ has no attribute ‘imresize‘问题

    问题描述 在Tensorflow2.1.0上运行代码出现 AttributeError: module 'scipy.misc' has no attribute 'imresize' 查阅资料大多都 ...

  9. 解决AttributeError: module ‘scipy.misc‘ has no attribute ‘imread‘报错问题

    运行python程序报错:AttributeError: module 'scipy.misc' has no attribute 'imread' 报错原因1:scipy版本过高 解决方案:降低sc ...

  10. 解决AttributeError: module ‘scipy.misc‘ has no attribute ‘imread‘问题

    在跑FCN时报错 AttributeError: module 'scipy.misc' has no attribute 'imread'. 查阅网上资料之后发现,大部分解决办法都是说没有安装PIL ...

最新文章

  1. 不追逐标准化产品,360数科的一站式风控体系有何不同?
  2. Containers vs Serverless:怎么选择?
  3. 故障排除:硬盘坏道修复术
  4. Java自学手记——servlet3.0新特性
  5. ncbi查找目的基因序列_基于PrimerBank和NCBI数据库的引物查找与设计
  6. 如何测试网络视频服务器(DVS)
  7. C++运算符重载(成员函数方式)
  8. matlab 连接mysql数据库_【转】matlab 连接 mysql 数据库
  9. JavaJDK中的命令行工具
  10. 如何使计算机为您读取文档
  11. shell中执行某条语句失败能不能重复执行_如何理解Mysql中的事务隔离级别?
  12. oracle 类似decode,类似于ORACLE decode 的用法
  13. 【转】三星8552 手机提示升级系统 完成后重启 开机画面一直停留在三星的LOGO 一闪一闪 怎么办...
  14. SWIFT IOS开发 部分compile error
  15. 缓存击穿 穿透 雪崩_缓存雪崩、缓存穿透、缓存击穿的问题
  16. 【收集】个人认为比较实用的电脑工具软件(附带安装包下载)
  17. scratch和平使者 电子学会图形化编程scratch等级考试一级真题和答案解析2022年12月
  18. 在线ico图标制作、python代码实现ico格式转换
  19. 宏碁笔记本u盘装系统如何进入bios设置u盘启动图文教程
  20. R语言命令行写linux,如何在Linux上编写和使用R脚本

热门文章

  1. tableau应用实战案例(三)-如何用Tableau制作网络关系图
  2. python 函数的*args,**kwargs
  3. win7 安装openssh_Win732位旗舰版老友纯净版安装OpenSSH的方法
  4. react 调用组件方法_React源码分析1 — 组件和对象的创建(createClass,createElement)...
  5. Python3--爬取数据之911网站信息爬取
  6. ServletContext的作用
  7. 【android-tips】关于android应用R文件无法读取
  8. 第二周 数据分析之展示 Matplotlib基础绘图函数实例
  9. window下不用安装虚拟机,也可以玩转linux,玩转最新redis
  10. 搜索引擎solr系列---多字段匹配的实现方法