MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / average_pose

Function average_pose

examples/datasets/traj.py:34–40  ·  view source on GitHub ↗

New pose using average position, z-axis, and up vector of input poses.

(poses: np.ndarray)

Source from the content-addressed store, hash-verified

32
33
34def average_pose(poses: np.ndarray) -> np.ndarray:
35 """New pose using average position, z-axis, and up vector of input poses."""
36 position = poses[:, :3, 3].mean(0)
37 z_axis = poses[:, :3, 2].mean(0)
38 up = poses[:, :3, 1].mean(0)
39 cam2world = viewmatrix(z_axis, up, position)
40 return cam2world
41
42
43def generate_spiral_path(

Callers 1

generate_spiral_pathFunction · 0.85

Calls 1

viewmatrixFunction · 0.85

Tested by

no test coverage detected