Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fisheye62 projection_type to undistort #957

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions opensfm/undistort.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@ def undistort_reconstruction(
elif shot.camera.projection_type == "brown":
urec.add_camera(perspective_camera_from_brown(shot.camera))
subshots = [get_shot_with_different_camera(urec, shot, image_format)]
elif shot.camera.projection_type in ["fisheye", "fisheye_opencv"]:
elif shot.camera.projection_type == "fisheye":
urec.add_camera(perspective_camera_from_fisheye(shot.camera))
subshots = [get_shot_with_different_camera(urec, shot, image_format)]
elif shot.camera.projection_type == "fisheye_opencv":
urec.add_camera(perspective_camera_from_fisheye_opencv(shot.camera))
subshots = [get_shot_with_different_camera(urec, shot, image_format)]
elif shot.camera.projection_type == "fisheye62":
urec.add_camera(perspective_camera_from_fisheye62(shot.camera))
subshots = [get_shot_with_different_camera(urec, shot, image_format)]
elif pygeometry.Camera.is_panorama(shot.camera.projection_type):
subshot_width = int(data.config["depthmap_resolution"])
subshots = perspective_views_of_a_panorama(
Expand Down Expand Up @@ -173,7 +179,7 @@ def undistort_image(
return {}

projection_type = shot.camera.projection_type
if projection_type in ["perspective", "brown", "fisheye", "fisheye_opencv"]:
if projection_type in ["perspective", "brown", "fisheye", "fisheye_opencv", "fisheye62"]:
[undistorted_shot] = undistorted_shots
new_camera = undistorted_shot.camera
height, width = original.shape[:2]
Expand Down