New pose using average position, z-axis, and up vector of input poses.
(poses: np.ndarray)
| 32 | |
| 33 | |
| 34 | def 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 | |
| 43 | def generate_spiral_path( |
no test coverage detected