Skip to content

Commit

Permalink
fix(undistort): make perspective views of panos the same size as the …
Browse files Browse the repository at this point in the history
…depthmaps
  • Loading branch information
paulinus committed Jun 22, 2017
1 parent bb96b2f commit 641e29a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions opensfm/commands/undistort.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ def undistort_images(self, graph, reconstruction, data):
urec.add_shot(shot)
elif shot.camera.projection_type in ['equirectangular', 'spherical']:
original = data.image_as_array(shot.id)
width = 4 * int(data.config['depthmap_resolution'])
subshot_width = int(data.config['depthmap_resolution'])
width = 4 * subshot_width
height = width / 2
image = cv2.resize(original, (width, height), interpolation=cv2.INTER_AREA)
shots = perspective_views_of_a_panorama(shot, width)
for subshot in shots:
subshots = perspective_views_of_a_panorama(shot, subshot_width)
for subshot in subshots:
urec.add_camera(subshot.camera)
urec.add_shot(subshot)
undistorted = render_perspective_view_of_a_panorama(
Expand Down

0 comments on commit 641e29a

Please sign in to comment.