diff --git a/opendm/config.py b/opendm/config.py index 4c787a13..4c41a223 100755 --- a/opendm/config.py +++ b/opendm/config.py @@ -153,6 +153,13 @@ def config(argv=None, parser=None): default=0, type=int, help='Perform image matching with the nearest images based on GPS exif data. Set to 0 to match by triangulation. Default: %(default)s') + + parser.add_argument('--matcher-order-neighbors', + metavar='', + action=StoreValue, + default=0, + type=int, + help='Perform image matching with the nearest images based on image order. Set to 0 to disable. Default: %(default)s') parser.add_argument('--use-fixed-camera-params', action=StoreTrue, diff --git a/opendm/osfm.py b/opendm/osfm.py index 8ea666ca..bbc9138d 100644 --- a/opendm/osfm.py +++ b/opendm/osfm.py @@ -246,6 +246,9 @@ class OSFMContext: "triangulation_type: ROBUST", "retriangulation_ratio: 2", ] + + if args.matcher_order_neighbors > 0: + config.append(f"matching_order_neighbors: {args.matcher_order_neighbors}") if args.camera_lens != 'auto': config.append("camera_projection_type: %s" % args.camera_lens.upper())