nicetoolbox.detectors.method_detectors.sam_3d_body.sam_3d_body_stereo_triangulation

Two-view stereo triangulation for SAM 3D Body body_joints exports.

Functions

apply_stereo_triangulation_to_body_joints_payload

Replace primary 3d with stereo triangulation when enabled.

calibration_usable_for_stereo_triangulation

Intrinsics and projection for the first two cameras.

prepare_2d_for_triangulation

Low-confidence 2D coords → NaN, then temporal interpolation (pose_utils.interpolate_data).

triangulate_stereo_body_joints_from_two_cameras

Stereo 3d column (n_sub, 1, n_frames, n_kp, 4); NaN when subject missing in either camera.

nicetoolbox.detectors.method_detectors.sam_3d_body.sam_3d_body_stereo_triangulation.apply_stereo_triangulation_to_body_joints_payload(body_payload: dict[str, Any], *, calibration: dict[str, Any] | None, camera_names: list[str], mode: str, cam_sees_subjects: dict[str, list[int]], video_start_frame_index: int, enabled: bool, min_confidence: float) bool[source]

Replace primary 3d with stereo triangulation when enabled. Returns True if applied.

nicetoolbox.detectors.method_detectors.sam_3d_body.sam_3d_body_stereo_triangulation.calibration_usable_for_stereo_triangulation(calibration: dict[str, Any] | None, camera_names: list[str]) bool[source]

Intrinsics and projection for the first two cameras.

nicetoolbox.detectors.method_detectors.sam_3d_body.sam_3d_body_stereo_triangulation.prepare_2d_for_triangulation(arr_2d: ndarray, min_confidence: float) ndarray[source]

Low-confidence 2D coords → NaN, then temporal interpolation (pose_utils.interpolate_data).

nicetoolbox.detectors.method_detectors.sam_3d_body.sam_3d_body_stereo_triangulation.triangulate_stereo_body_joints_from_two_cameras(arr_2d_interpolated: ndarray, *, calibration: dict[str, Any], camera_names: list[str], cam_sees_subjects: dict[str, list[int]]) ndarray | None[source]

Stereo 3d column (n_sub, 1, n_frames, n_kp, 4); NaN when subject missing in either camera.