diff --git a/VERSION b/VERSION index 94ff29cc..ef538c28 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.1 +3.1.2 diff --git a/opendm/config.py b/opendm/config.py index c9ee5787..93e7a098 100755 --- a/opendm/config.py +++ b/opendm/config.py @@ -175,7 +175,7 @@ def config(argv=None, parser=None): metavar='', action=StoreValue, default='auto', - choices=['auto', 'perspective', 'brown', 'fisheye', 'spherical', 'equirectangular', 'dual'], + choices=['auto', 'perspective', 'brown', 'fisheye', 'fisheye_opencv', 'spherical', 'equirectangular', 'dual'], help=('Set a camera projection type. Manually setting a value ' 'can help improve geometric undistortion. By default the application ' 'tries to determine a lens type from the images metadata. Can be one of: %(choices)s. Default: ' diff --git a/opendm/photo.py b/opendm/photo.py index 53f55d19..17a983a7 100644 --- a/opendm/photo.py +++ b/opendm/photo.py @@ -19,7 +19,7 @@ from xml.parsers.expat import ExpatError from opensfm.sensors import sensor_data from opensfm.geo import ecef_from_lla -projections = ['perspective', 'fisheye', 'brown', 'dual', 'equirectangular', 'spherical'] +projections = ['perspective', 'fisheye', 'fisheye_opencv', 'brown', 'dual', 'equirectangular', 'spherical'] def find_largest_photo_dims(photos): max_mp = 0 @@ -428,6 +428,11 @@ class ODM_Photo: camera_projection = self.get_xmp_tag(xtags, ['@Camera:ModelType', 'Camera:ModelType']) if camera_projection is not None: camera_projection = camera_projection.lower() + + # Parrot Sequoia's "fisheye" model maps to "fisheye_opencv" + if camera_projection == "fisheye" and self.camera_make.lower() == "parrot" and self.camera_model.lower() == "sequoia": + camera_projection = "fisheye_opencv" + if camera_projection in projections: self.camera_projection = camera_projection