File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,12 @@ void OptionManager::AddInlierThresholdOptions() {
234234 return ;
235235 }
236236 added_inliers_options_ = true ;
237+ AddAndRegisterDefaultOption (" Thresholds.max_angle_error" ,
238+ &mapper->inlier_thresholds .max_angle_error );
239+ AddAndRegisterDefaultOption (" Thresholds.max_reprojection_error" ,
240+ &mapper->inlier_thresholds .max_reprojection_error );
241+ AddAndRegisterDefaultOption (" Thresholds.min_triangulation_angle" ,
242+ &mapper->inlier_thresholds .min_triangulation_angle );
237243 AddAndRegisterDefaultOption (" Thresholds.max_epipolar_error_E" ,
238244 &mapper->inlier_thresholds .max_epipolar_error_E );
239245 AddAndRegisterDefaultOption (" Thresholds.max_epipolar_error_F" ,
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ void BundleAdjuster::ParameterizeVariables(
161161 images[center].cam_from_world .translation .data ());
162162
163163 // Parameterize the camera parameters, or set them to be constant if desired
164- if (options_.optimize_intrinsics ) {
164+ if (options_.optimize_intrinsics && !options_. optimize_principal_point ) {
165165 for (auto & [camera_id, camera] : cameras) {
166166 if (problem_->HasParameterBlock (camera.params .data ())) {
167167 std::vector<int > principal_point_idxs;
@@ -174,8 +174,8 @@ void BundleAdjuster::ParameterizeVariables(
174174 camera.params .data ());
175175 }
176176 }
177-
178- } else {
177+ } else if (!options_. optimize_intrinsics &&
178+ !options_. optimize_principal_point ) {
179179 for (auto & [camera_id, camera] : cameras) {
180180 if (problem_->HasParameterBlock (camera.params .data ())) {
181181 problem_->SetParameterBlockConstant (camera.params .data ());
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ struct BundleAdjusterOptions : public OptimizationBaseOptions {
1414 bool optimize_rotations = true ;
1515 bool optimize_translation = true ;
1616 bool optimize_intrinsics = true ;
17+ bool optimize_principal_point = true ;
1718 bool optimize_points = true ;
1819
1920 // Constrain the minimum number of views per track
You can’t perform that action at this time.
0 commit comments