From 4a26aa1c9c26fd6502afb1def3bff1c91b9e587c Mon Sep 17 00:00:00 2001 From: rexliuser Date: Wed, 17 May 2023 15:18:24 +0800 Subject: [PATCH 1/3] added argument: matcher-order-neighbors --- opendm/config.py | 7 +++++++ opendm/osfm.py | 3 +++ 2 files changed, 10 insertions(+) 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()) From 8e735e01d30bddd63b7048104bb6b08f78f57f9f Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Fri, 19 May 2023 15:14:44 -0400 Subject: [PATCH 2/3] Rename option, misc refactor --- opendm/config.py | 12 ++++++------ opendm/osfm.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/opendm/config.py b/opendm/config.py index 4c41a223..87425eee 100755 --- a/opendm/config.py +++ b/opendm/config.py @@ -154,12 +154,12 @@ def config(argv=None, parser=None): 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('--matcher-order', + metavar='', + action=StoreValue, + default=0, + type=int, + help='Perform image matching with the nearest images based on image filenames 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 bbc9138d..226be84c 100644 --- a/opendm/osfm.py +++ b/opendm/osfm.py @@ -247,8 +247,8 @@ class OSFMContext: "retriangulation_ratio: 2", ] - if args.matcher_order_neighbors > 0: - config.append(f"matching_order_neighbors: {args.matcher_order_neighbors}") + if args.matcher_order > 0: + config.append("matching_order_neighbors: %s" % args.matcher_order) if args.camera_lens != 'auto': config.append("camera_projection_type: %s" % args.camera_lens.upper()) From 3535c64347808f75d9125be61cd358af431170dc Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Fri, 19 May 2023 15:21:22 -0400 Subject: [PATCH 3/3] Update description --- opendm/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendm/config.py b/opendm/config.py index 87425eee..5db0b2b3 100755 --- a/opendm/config.py +++ b/opendm/config.py @@ -159,7 +159,7 @@ def config(argv=None, parser=None): action=StoreValue, default=0, type=int, - help='Perform image matching with the nearest images based on image filenames order. Set to 0 to disable. Default: %(default)s') + help='Perform image matching with the nearest N images based on image filename order. Can speed up processing of sequential images, such as those extracted from video. Set to 0 to disable. Default: %(default)s') parser.add_argument('--use-fixed-camera-params', action=StoreTrue,