nicetoolbox.detectors.method_detectors.sam_3d_body.sam_3d_body_mesh_viz

Project MHR mesh vertices onto camera frames (visualization_3d).

Uses cv2.solvePnPRansac on pred_keypoints_3d pred_keypoints_2d then cv2.projectPoints for pred_vertices. Falls back to a crude focal length if calibration is missing.

Functions

draw_mesh_wireframe_on_image

Draw mesh wireframe on image (in place).

nicetoolbox.detectors.method_detectors.sam_3d_body.sam_3d_body_mesh_viz.draw_mesh_wireframe_on_image(image: ndarray, vertices: ndarray, faces: ndarray, kp3: ndarray, kp2: ndarray, K: ndarray, dist: ndarray, color_bgr: tuple[int, int, int], line_thickness: int = 1) bool[source]

Draw mesh wireframe on image (in place). Returns True if anything was drawn.