kopia lustrzana https://github.com/OpenDroneMap/ODM
Update logic to allow split default when path set (#1782)
* Update logic to allow split default when path set * Fix default split-image-groups case --------- Co-authored-by: Piero Toffanin <pt@masseranolabs.com>pull/1783/head
rodzic
0979e42db3
commit
971a1fd29b
|
@ -29,14 +29,15 @@ class ODMSplitStage(types.ODM_Stage):
|
|||
photos = reconstruction.photos
|
||||
outputs['large'] = False
|
||||
|
||||
should_split = len(photos) > args.split
|
||||
image_groups_file = os.path.join(args.project_path, "image_groups.txt")
|
||||
if 'split_image_groups_is_set' in args:
|
||||
image_groups_file = os.path.abspath(args.split_image_groups)
|
||||
|
||||
if should_split:
|
||||
# check for availability of either image_groups.txt (split-merge) or geotagged photos
|
||||
image_groups_file = os.path.join(args.project_path, "image_groups.txt")
|
||||
if 'split_image_groups_is_set' in args:
|
||||
image_groups_file = os.path.abspath(args.split_image_groups)
|
||||
if io.file_exists(image_groups_file) or reconstruction.has_geotagged_photos():
|
||||
if io.file_exists(image_groups_file):
|
||||
outputs['large'] = True
|
||||
elif len(photos) > args.split:
|
||||
# check for availability of geotagged photos
|
||||
if reconstruction.has_geotagged_photos():
|
||||
outputs['large'] = True
|
||||
else:
|
||||
log.ODM_WARNING('Could not perform split-merge as GPS information in photos or image_groups.txt is missing.')
|
||||
|
|
Ładowanie…
Reference in New Issue