Merge pull request #1451 from pierotofy/copc

Improve matcher-neighbors logic
pull/1454/head
Piero Toffanin 2022-04-15 11:43:09 -04:00 zatwierdzone przez GitHub
commit d893727f1f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 12 dodań i 6 usunięć

Wyświetl plik

@ -157,12 +157,11 @@ def config(argv=None, parser=None):
'%(default)s'))
parser.add_argument('--matcher-neighbors',
metavar='<integer>',
metavar='<positive integer>',
action=StoreValue,
default=8,
default=0,
type=int,
help='Number of nearest images to pre-match based on GPS '
'exif data. Set to 0 to skip pre-matching. Default: %(default)s')
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('--use-fixed-camera-params',
action=StoreTrue,

Wyświetl plik

@ -199,15 +199,22 @@ class OSFMContext:
log.ODM_WARNING("Cannot compute max image dimensions, going with defaults")
# create config file for OpenSfM
if args.matcher_neighbors > 0:
matcher_graph_rounds = 0
matcher_neighbors = args.matcher_neighbors
else:
matcher_graph_rounds = 50
matcher_neighbors = 0
config = [
"use_exif_size: no",
"flann_algorithm: KDTREE", # more stable, faster than KMEANS
"feature_process_size: %s" % feature_process_size,
"feature_min_frames: %s" % args.min_num_features,
"processes: %s" % args.max_concurrency,
"matching_gps_neighbors: %s" % args.matcher_neighbors,
"matching_gps_neighbors: %s" % matcher_neighbors,
"matching_gps_distance: 0",
"matching_graph_rounds: 50",
"matching_graph_rounds: %s" % matcher_graph_rounds,
"optimize_camera_parameters: %s" % ('no' if args.use_fixed_camera_params or args.cameras else 'yes'),
"reconstruction_algorithm: %s" % (args.sfm_algorithm),
"undistorted_image_format: tif",