Skip to content

Commit

Permalink
Update logic to allow split default when path set (#1782)
Browse files Browse the repository at this point in the history
* Update logic to allow split default when path set

* Fix default split-image-groups case

---------

Co-authored-by: Piero Toffanin <pt@masseranolabs.com>
  • Loading branch information
smathermather and pierotofy authored Jul 22, 2024
1 parent 0979e42 commit 971a1fd
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions stages/splitmerge.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ def process(self, args, outputs):
photos = reconstruction.photos
outputs['large'] = False

should_split = len(photos) > args.split

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():
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):
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.')
Expand Down

0 comments on commit 971a1fd

Please sign in to comment.