kopia lustrzana https://github.com/OpenDroneMap/ODM
Fix --camera-lens
rodzic
3e64c715fe
commit
37886f77c2
|
@ -185,7 +185,7 @@ def config(argv=None, parser=None):
|
|||
metavar='<string>',
|
||||
action=StoreValue,
|
||||
default='auto',
|
||||
choices=['auto', 'perspective', 'brown', 'fisheye', 'spherical'],
|
||||
choices=['auto', 'perspective', 'brown', 'fisheye', '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: '
|
||||
|
|
|
@ -617,6 +617,10 @@ class ODM_Photo:
|
|||
def override_gps_dop(self, dop):
|
||||
self.gps_xy_stddev = self.gps_z_stddev = dop
|
||||
|
||||
def override_camera_projection(self, camera_projection):
|
||||
if camera_projection in projections:
|
||||
self.camera_projection = camera_projection
|
||||
|
||||
def is_thermal(self):
|
||||
#Added for support M2EA camera sensor
|
||||
if(self.camera_make == "DJI"):
|
||||
|
|
|
@ -137,6 +137,13 @@ class ODMLoadDatasetStage(types.ODM_Stage):
|
|||
for p in photos:
|
||||
p.override_gps_dop(args.gps_accuracy)
|
||||
|
||||
# Override projection type
|
||||
if args.camera_lens != "auto":
|
||||
log.ODM_INFO("Setting camera lens to %s for all images" % args.camera_lens)
|
||||
|
||||
for p in photos:
|
||||
p.override_camera_projection(args.camera_lens)
|
||||
|
||||
# Save image database for faster restart
|
||||
save_images_database(photos, images_database_file)
|
||||
else:
|
||||
|
|
Ładowanie…
Reference in New Issue