Merge pull request #1632 from pierotofy/sequoia

Add  camera-lens fisheye_opencv, better support for Parrot Sequoia
pull/1636/head
Piero Toffanin 2023-04-17 16:09:39 -04:00 zatwierdzone przez GitHub
commit 7048dd86fd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
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