123456789101112131415161718 |
- def show_frames(flags, data):
- """
- Returns a list of meshes of coordinate axes that have been transformed to represent the camera matrix
- at each --every:th frame.
- flags: Command line arguments
- data: dict with keys ['poses', 'intrinsics']
- returns: [open3d.geometry.TriangleMesh]
- """
- frames = [o3d.geometry.TriangleMesh.create_coordinate_frame().scale(0.25, np.zeros(3))]
- for i, T_WC in enumerate(data['poses']):
- if not i % flags.every == 0:
- continue
- print(f"Frame {i}", end="\r")
- mesh = o3d.geometry.TriangleMesh.create_coordinate_frame().scale(0.1, np.zeros(3))
- frames.append(mesh.transform(T_WC))
- return frames
|