Skip to content

Commit 641e29a

Browse files
committed
fix(undistort): make perspective views of panos the same size as the depthmaps
1 parent bb96b2f commit 641e29a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

opensfm/commands/undistort.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ def undistort_images(self, graph, reconstruction, data):
5050
urec.add_shot(shot)
5151
elif shot.camera.projection_type in ['equirectangular', 'spherical']:
5252
original = data.image_as_array(shot.id)
53-
width = 4 * int(data.config['depthmap_resolution'])
53+
subshot_width = int(data.config['depthmap_resolution'])
54+
width = 4 * subshot_width
5455
height = width / 2
5556
image = cv2.resize(original, (width, height), interpolation=cv2.INTER_AREA)
56-
shots = perspective_views_of_a_panorama(shot, width)
57-
for subshot in shots:
57+
subshots = perspective_views_of_a_panorama(shot, subshot_width)
58+
for subshot in subshots:
5859
urec.add_camera(subshot.camera)
5960
urec.add_shot(subshot)
6061
undistorted = render_perspective_view_of_a_panorama(

0 commit comments

Comments
 (0)