def transform(time_poses): pose_table = tables.expand_views( struct(camera=camera_poses, times=time_poses)) return tables.transform_points( tables.expand_dims(pose_table, (2, 3)), tables.expand_dims(world_points, (0, 1)))
def project_points(pose_table, cameras, camera_poses, world_points): pose_estimates = struct(camera=camera_poses, times=pose_table) pose_table = tables.expand_views(pose_estimates) points = tables.transform_points(tables.expand_dims(pose_table, (2, 3)), tables.expand_dims(world_points, (0, 1))) return project_cameras(cameras, points)
def world_points(self): return tables.transform_points( tables.expand_dims(self.board_poses.pose_table, 1), self.board_points)