MCPcopy Create free account
hub / github.com/NVlabs/InstantSplat / poses_to_points

Function poses_to_points

utils/pose_utils.py:466–471  ·  view source on GitHub ↗

Converts from pose matrices to (position, lookat, up) format.

(poses, dist)

Source from the content-addressed store, hash-verified

464 poses = np.stack(poses, 0)
465
466 def poses_to_points(poses, dist):
467 """Converts from pose matrices to (position, lookat, up) format."""
468 pos = poses[:, :3, -1]
469 lookat = poses[:, :3, -1] - dist * poses[:, :3, 2]
470 up = poses[:, :3, -1] + dist * poses[:, :3, 1]
471 return np.stack([pos, lookat, up], 1)
472
473 def points_to_poses(points):
474 """Converts from (position, lookat, up) format to pose matrices."""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected