mp.tasks.vision.drawing_utils.draw_axis

Draws the 3D axis on the image.

image A three channel BGR image represented as numpy ndarray.
rotation Rotation matrix from object to camera coordinate frame.
translation Translation vector from object to camera coordinate frame.
focal_length camera focal length along x and y directions.
principal_point camera principal point in x and y.
axis_length length of the axis in the drawing.
axis_drawing_spec A DrawingSpec object that specifies the xyz axis drawing settings such as line thickness.

ValueError If one of the followings: a) If the input image is not three channel BGR.