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

Function pad_poses

utils/pose_utils.py:248–251  ·  view source on GitHub ↗

Pad [..., 3, 4] pose matrices with a homogeneous bottom row [0,0,0,1].

(p)

Source from the content-addressed store, hash-verified

246
247
248def pad_poses(p):
249 """Pad [..., 3, 4] pose matrices with a homogeneous bottom row [0,0,0,1]."""
250 bottom = np.broadcast_to([0, 0, 0, 1.], p[..., :1, :4].shape)
251 return np.concatenate([p[..., :3, :4], bottom], axis=-2)
252
253def unpad_poses(p):
254 """Remove the homogeneous bottom row from [..., 4, 4] pose matrices."""

Callers 2

transform_poses_pcaFunction · 0.70
recenter_posesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected