Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

rvecs and tvecs are NoneType?

I saw a python code online for detecting aruco markers, this is part of that code:

 for i in range(len(tvecs)):
    imaxis = aruco.drawAxis(imaxis, mtx, dist, rvecs[i], tvecs[i], length_of_axis)

I wanted to draw the x-, y-, z-axis too, but I got an error saying:
for i in range(len(tvecs)):
TypeError: object of type 'NoneType' has no len()

So why rvecs and tvecs are NoneType? How can I get two arrays?

rvecs and tvecs are NoneType?

I saw a some python code codes online for detecting aruco markers, this and I combined them together. This is part of that code:the code:https://github.com/czjczjczj1/aruco/blob/780d4e724494893d45c0e9f39605081378e8c54a/aruco_detection_test.py#L21-L22

 for i in range(len(tvecs)):
    imaxis = aruco.drawAxis(imaxis, mtx, dist, rvecs[i], tvecs[i], length_of_axis)

I wanted to draw the x-, y-, z-axis too, but I got an error saying:
for i in range(len(tvecs)):
TypeError: object of type 'NoneType' has no len()

So why rvecs and tvecs are NoneType? How can I get two arrays? arrays?

rvecs and tvecs are NoneType?

I saw some python codes online for detecting aruco markers, and I combined them together. This is the code:https://github.com/czjczjczj1/aruco/blob/780d4e724494893d45c0e9f39605081378e8c54a/aruco_detection_test.py#L21-L22code: https://github.com/czjczjczj1/aruco/blob/780d4e724494893d45c0e9f39605081378e8c54a/aruco_detection_test.py#L21-L22

I wanted to draw the x-, y-, z-axis too, but I got an error saying:
for i in range(len(tvecs)):
TypeError: object of type 'NoneType' has no len()

So why rvecs and tvecs are NoneType? How can I get two arrays?