OpenCV中文网站

 找回密码
 立即注册
搜索
热搜: 安装 配置
查看: 2771|回复: 1

使用boxPoints它时报错说没有这个函数怎么回事?

[复制链接]
发表于 2019-2-13 22:16:17 | 显示全部楼层 |阅读模式
opencv 的版本时  2.4.11
在进行旋转边界矩形的学习的时候用到了boxPoints
部分代码:
import cv2
....

rect = cv2.minAreaRect(cnt)
print(rect)
box = cv2.cv.boxPoints(rect)
box = np.int0(box)
print(box)
cv2.drawContours(img,[box],i,(0,255,0),1)
....

运行的时候报错
box = cv2.BoxPoints(rect)
AttributeError: 'module' object has no attribute 'BoxPoints'
经百度找贴都无果因此来求助各位前辈大佬


回复

使用道具 举报

发表于 2019-2-16 09:55:14 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|OpenCV中文网站

GMT+8, 2024-4-25 20:20 , Processed in 0.008018 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表