Converts from pose matrices to (position, lookat, up) format.
(poses, dist)
| 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.""" |
no outgoing calls
no test coverage detected