我正在使用 ros melodic、opencv 4.5.5、ubuntu 18.04。我绘制了标记 aruco 的 3 轴以显示在 rqt_image_view 上。运行时出现此问题 AttributeError: 'module' object has no attribute 'drawAxis'
这是我的轴图的代码:
......................
frame_out = aruco.drawAxis( img, self.K, self.distCoeffs, rvecs, tvecs, axisLength)
...................
self.aruco_marker_img_pub.publish(self.bridge.cv2_to_imgmsg(frame_out, "bgr8"))
.......................
当我在没有 ros 的情况下做 aruco aruco 这是正常的,当它正确时它看起来像这样最佳答案
我想你的意思是使用 cv2.drawFrameAxes
而不是 cv2.drawAxes
.
关于python - 属性错误 : 'module' object has no attribute 'drawAxis' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72466209/