Add camera-lens fisheye_opencv, better support for Parrot Sequoia

pull/1632/head
Piero Toffanin 2023-04-17 12:04:40 -04:00
rodzic 2361fce01d
commit bd0f33f978
3 zmienionych plików z 8 dodań i 3 usunięć

Wyświetl plik

@ -1 +1 @@
3.1.1
3.1.2

Wyświetl plik

@ -175,7 +175,7 @@ def config(argv=None, parser=None):
metavar='<string>',
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: '

Wyświetl plik

@ -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