attributeError:模块' cv2.aruco'没有属性' drawframeaxes'
我正在使用VSCODE 1.68.1,Ubuntu 20.04 我正在关注链接( https> https:// 。
Aruco.DrawFrameAxes(DST1,MTX,DIST,RVEC [i,:,:],tvec [i,:,:,:],0.03) attributeError:模块'cv2.aruco'没有属性'drawframeaxes'
- 我尝试使用aruco.drawaxis,同样的错误
- 还尝试卸载opencv-python,卸载opencv-contrib-python,然后卸载opencv-contrib-python,然后启用pip3安装opencv-python&amp& amp; amp; amp; amp; pip3安装opencv-contrib-python,同样的错误
I am working with VSCode 1.68.1, Ubuntu 20.04
I am following link (https://programming.vip/docs/3d-pose-estimation-using-aruco-tag-in-python.html) to achieve pose estimation for aruco marker
But I am getting below error:
aruco.drawFrameAxes(dst1, mtx, dist, rvec[i, :, :], tvec[i, :, :],0.03)
AttributeError: module 'cv2.aruco' has no attribute 'drawFrameAxes'
- I tried using aruco.drawaxis as well, same error
- Also tried uninstall opencv-python, uninstall opencv-contrib-python, then pip3 install opencv-python & pip3 install opencv-contrib-python, same error
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
drawframeaxes
是OPENCV中可用的独立模块。它在aruco
软件包中找不到。命令:
help(cv2.drawframeaxes)
为您提供有关其用法和参数所需的所有详细信息。在代码中尝试以下内容:
drawFrameAxes
is an independent module available in OpenCV. It isn't found withinaruco
package.The command:
help(cv2.drawFrameAxes)
gives you all the details you need regarding its usage and parameters.Try the following in your code:
Documentation Link
您是否尝试过从源来编译OpenCV?我是出于绝望而做到的,此后的功能似乎起作用了。
我也无法使用替代性贡献 - opencv-python软件包。
Did you try compiling opencv from source? I did this out of desperation and the function seemed to work afterwards.
I was not able to get this working with the alternative contrib-opencv-python package either.
我在GitHub页面上将更新的代码上传到Python。
(github -ritabrata -chakraborty/aruco)
I have uploaded the updated code in python on my github page.
(GitHub - Ritabrata-Chakraborty/ArUco)
生成Aruco图像:
https://chev.me/arucogen/
to generate Aruco images:
https://chev.me/arucogen/