-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathflags_1dsfm.yaml
163 lines (132 loc) · 6.73 KB
/
flags_1dsfm.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# -flagfile
############### Input/Output ###############
# Input/output files.
1dsfm_dataset_directory: ../datasets/Madrid_Metropolis
# If a matches file has already been created, set the filepath here. This avoids
# having to recompute all features and matches.
matches_file:
# The calibration file indicates possibly known calibration e.g, from EXIF or
# explicit calibration. Theia attempts to extract EXIF focal lengths if calibration
# is not supplied for a given image.
calibration_file:
output_reconstruction: ../output/Madrid_Metropolis
############### Multithreading ###############
# Set to the number of threads you want to use.
num_threads: 16
############### Matching Options ###############
# Perform matching out-of-core. If set to true, the matching_working_directory
# must be set to a valid, writable directory (the directory will be created if
# it does not exits) Set to false to perform all-in-memory matching.
match_out_of_core: true
# During feature matching, features are saved to disk so that out-of-core
# matching may be performed. This directory specifies which directory those
# features should be saved to.
matching_working_directory:
# During feature matching we utilize an LRU cache for out-of-core matching. The size
# of that cache (in terms of number of images) is controlled by this parameter. The
# higher this number the more memory is required.
matching_max_num_images_in_cache: 128
matching_strategy: CASCADE_HASHING
lowes_ratio: 0.75
min_num_inliers_for_valid_match: 30
# NOTE: This threshold is relative to an image with a width of 1024 pixels. It
# will be scaled appropriately based on the image resolutions. This allows a
# single threshold to be used for images with different resolutions.
max_sampson_error_for_verified_match: 6.0
bundle_adjust_two_view_geometry: true
keep_only_symmetric_matches: true
# Global descriptor extractor settings. The global image descriptors are used to
# speed up matching by selected the K most similar images for each image, and
# only performing feature matching with these images.
num_nearest_neighbors_for_global_descriptor_matching: 100
num_gmm_clusters_for_fisher_vector: 16
max_num_features_for_fisher_vector_training: 1000000
############### General SfM Options ###############
reconstruction_estimator: GLOBAL
min_track_length: 2
max_track_length: 50
reconstruct_largest_connected_component: false
# Set to true if all views were captured with the same camera. If true, then a
# single set of camera intrinsic parameters will be used for all views in the
# reconstruction.
shared_calibration: false
# If set to true, only views with known calibration are reconstructed.
only_calibrated_views: false
############### Global SfM Options ###############
global_position_estimator: NONLINEAR
global_rotation_estimator: NONLINEAR
post_rotation_filtering_degrees: 15.0
# This refinement is very unstable for rotation-only motions so
# it is advised that this is set to false for these motions.
refine_relative_translations_after_rotation_estimation: true
# If true, only cameras that are well-conditioned for position estimation will
# be used for global position estimation
extract_maximal_rigid_subgraph: false
# Filter the relative translations with the 1DSfM filter to remove potential
# outliers in the relative pose measurements.
filter_relative_translations_with_1dsfm: true
# Nonlinear position estimation options
position_estimation_min_num_tracks_per_view: 0
position_estimation_robust_loss_width: 0.1
# If true, perform a single iteration of bundle adjustment only on the camera
# positions and 3D points (rotation and camera intrinsics are held
# constant). This helps often to constrain inaccurate intrinsics.
refine_camera_positions_and_points_after_position_estimation: true
# After estimating camera poses, we perform trianguation, then BA,
# then filter out bad points. This controls how many times we repeat
# this process.
num_retriangulation_iterations: 1
############### Incremental SfM Options ###############
# NOTE: This threshold is relative to an image with a width of 1024 pixels. It
# will be scaled appropriately based on the image resolutions. This allows a
# single threshold to be used for images with different resolutions.
absolute_pose_reprojection_error_threshold: 4
partial_bundle_adjustment_num_views: 20
full_bundle_adjustment_growth_percent: 5
min_num_absolute_pose_inliers: 30
############### Bundle Adjustment Options ###############
# Set this parameter to a value other than NONE if you want to utilize a robust
# cost function during bundle adjustment. This can increase robustness to outliers
# during the optimization.
bundle_adjustment_robust_loss_function: HUBER
# Set this value to the determine the reprojection error in pixelst at which
# robustness begins (if a robust cost function is being used).
bundle_adjustment_robust_loss_width: 10.0
# Set this parameter to change which camera intrinsics should be
# optimized. Valid options are NONE, ALL, FOCAL_LENGTH, PRINCIPAL_POINTS,
# RADIAL_DISTORTION, ASPECT_RATIO, and SKEW. This parameter can be set using a
# bitmask (with no spaces) e.g., FOCAL_LENGTH|RADIAL_DISTORTION
intrinsics_to_optimize: NONE
# After BA, remove any points that have a reprojection error greater
# than this.
max_reprojection_error_pixels: 4.0
############### Track Subsampling Options ###############
# If true, the estimated tracks are subsampled for bundle adjustment to increase
# the efficiency of BA. Tracks are chosen in a way which attempts to constraint
# BA as best as possible. This has been shown to provide a significant speedup
# without reducing the accuracy much (in fact, it increases the accuracy in some
# cases).
subsample_tracks_for_bundle_adjustment: false
# Subsampled tracks are chosen with a probability related to their track
# length. We limit the effect of long tracks by capping the track length at this
# value for the purpose of selecting tracks.
track_subset_selection_long_track_length_threshold: 10
# Tracks are chosen in a way that ensures each view is spatially
# constraind. Tracks are first binned in an image grid and the top ranked track
# is chosen for optimization from each grid cell to ensure good spatial coverage
# of the image. The grid cells are set to be this size.
track_selection_image_grid_cell_size_pixels: 100
# Tracks are chosen such that each image observes at least this many tracks
# which are being optimized. This ensures that each image is well-constrained.
min_num_optimized_tracks_per_view: 100
############### Triangulation Options ###############
min_triangulation_angle_degrees: 4.0
triangulation_reprojection_error_pixels: 15.0
bundle_adjust_tracks: true
############### Logging Options ###############
# Logging verbosity.
# logtostderr
# Increase this number to get more verbose logging.
v: 1
glog_directory: ./log
log_to_stderr: false