diff --git a/opensfm/synthetic_data/synthetic_generator.py b/opensfm/synthetic_data/synthetic_generator.py index fcfe34ccc..de1aa47a8 100644 --- a/opensfm/synthetic_data/synthetic_generator.py +++ b/opensfm/synthetic_data/synthetic_generator.py @@ -167,7 +167,7 @@ def add_shots_to_reconstruction(positions, rotations, shift = len(reconstruction.shots) for i, item in enumerate(zip(positions, rotations)): shot = types.Shot() - shot.id = 'shot' + str(shift+i) + shot.id = 'shot%04d' % (shift + i) shot.camera = camera shot.pose = types.Pose() shot.pose.set_rotation_matrix(item[1]) diff --git a/opensfm/synthetic_data/synthetic_scene.py b/opensfm/synthetic_data/synthetic_scene.py index 9d0b12077..164ca3f08 100644 --- a/opensfm/synthetic_data/synthetic_scene.py +++ b/opensfm/synthetic_data/synthetic_scene.py @@ -86,7 +86,7 @@ def __init__(self, num_cameras, num_points, noise): self.cameras = {} for i in range(num_cameras): camera = camera = pygeometry.Camera.create_perspective(0.9, -0.1, 0.01) - camera.id = 'camera' + str(i) + camera.id = 'camera%04d' % i camera.height = 600 camera.width = 800 self.cameras[camera.id] = camera @@ -106,8 +106,8 @@ def __init__(self, num_cameras, num_points, noise): up = [alpha * 0.2, alpha * 0.2, 1.0] shot = types.Shot() - shot.id = 'shot' + str(i) - shot.camera = self.cameras['camera' + str(i)] + shot.id = 'shot%04d' % i + shot.camera = self.cameras['camera%04d' % i] shot.pose = camera_pose(position, lookat, up) self.shots[shot.id] = shot