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

Function poses_to_points

utils/camera_utils.py:144–149  ·  view source on GitHub ↗

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

(poses, dist)

Source from the content-addressed store, hash-verified

142 """
143
144 def poses_to_points(poses, dist):
145 """Converts from pose matrices to (position, lookat, up) format."""
146 pos = poses[:, :3, -1]
147 lookat = poses[:, :3, -1] - dist * poses[:, :3, 2]
148 up = poses[:, :3, -1] + dist * poses[:, :3, 1]
149 return np.stack([pos, lookat, up], 1)
150
151 def points_to_poses(points):
152 """Converts from (position, lookat, up) format to pose matrices."""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected