MCPcopy Create free account
hub / github.com/apple/ml-pointersect / get_o3d_camera_frame

Function get_o3d_camera_frame

plib/utils.py:2551–2562  ·  view source on GitHub ↗

Create a camera coordinate frame (as a mesh) in the world coordinate.

(
        H_c2w: T.Union[torch.Tensor, np.ndarray],
        frame_size: float = 1.0,
)

Source from the content-addressed store, hash-verified

2549
2550
2551def get_o3d_camera_frame(
2552 H_c2w: T.Union[torch.Tensor, np.ndarray],
2553 frame_size: float = 1.0,
2554) -> o3d.geometry.TriangleMesh:
2555 """Create a camera coordinate frame (as a mesh) in the world coordinate."""
2556
2557 if isinstance(H_c2w, torch.Tensor):
2558 H_c2w = H_c2w.detach().cpu().numpy()
2559 cam_frame = o3d.geometry.TriangleMesh.create_coordinate_frame(size=frame_size)
2560 cam_frame.transform(H_c2w)
2561
2562 return cam_frame
2563
2564
2565def draw_geometries(

Callers

nothing calls this directly

Calls 1

detachMethod · 0.45

Tested by

no test coverage detected