diff --git a/VERSION b/VERSION index 005119ba..8e8299dc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.4.1 +2.4.2 diff --git a/opendm/config.py b/opendm/config.py index 14278bf2..d4b860d2 100755 --- a/opendm/config.py +++ b/opendm/config.py @@ -608,6 +608,14 @@ def config(argv=None, parser=None): 'are added to the cluster. This is done to ensure ' 'that neighboring submodels overlap. Default: %(default)s') + parser.add_argument('--split-image-groups', + metavar='', + action=StoreValue, + default=None, + help=('Path to the image groups file that controls how images should be split into groups. ' + 'The file needs to use the following format: \n' + 'image_name group_name\n' + 'Default: %(default)s')) # parser.add_argument('--split-multitracks', # action=StoreTrue, # nargs=0, diff --git a/opendm/osfm.py b/opendm/osfm.py index 8ada2144..a3a48342 100644 --- a/opendm/osfm.py +++ b/opendm/osfm.py @@ -93,9 +93,13 @@ class OSFMContext: # check for image_groups.txt (split-merge) 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): - log.ODM_INFO("Copied image_groups.txt to OpenSfM directory") - io.copy(image_groups_file, os.path.join(self.opensfm_project_path, "image_groups.txt")) + dst_groups_file = os.path.join(self.opensfm_project_path, "image_groups.txt") + io.copy(image_groups_file, dst_groups_file) + log.ODM_INFO("Copied %s to %s" % (image_groups_file, dst_groups_file)) # check for cameras if args.cameras: