34
34
35
35
#include " theia/sfm/global_pose_estimation/nonlinear_position_estimator.h"
36
36
37
- #include < ceres/ceres.h>
38
- #include < ceres/rotation.h>
39
37
#include < Eigen/Core>
40
38
#include < algorithm>
39
+ #include < ceres/ceres.h>
40
+ #include < ceres/rotation.h>
41
41
#include < unordered_map>
42
42
#include < unordered_set>
43
43
#include < utility>
@@ -134,7 +134,6 @@ bool NonlinearPositionEstimator::EstimatePositions(
134
134
// Set the solver options.
135
135
ceres::Solver::Summary summary;
136
136
solver_options_.num_threads = options_.num_threads ;
137
- solver_options_.num_linear_solver_threads = options_.num_threads ;
138
137
solver_options_.max_num_iterations = options_.max_num_iterations ;
139
138
140
139
// Choose the type of linear solver. For sufficiently large problems, we want
@@ -208,9 +207,10 @@ void NonlinearPositionEstimator::AddCameraToCameraConstraints(
208
207
position2->data ());
209
208
}
210
209
211
- VLOG (2 ) << problem_->NumResidualBlocks () << " camera to camera constraints "
212
- " were added to the position "
213
- " estimation problem." ;
210
+ VLOG (2 ) << problem_->NumResidualBlocks ()
211
+ << " camera to camera constraints "
212
+ " were added to the position "
213
+ " estimation problem." ;
214
214
}
215
215
216
216
void NonlinearPositionEstimator::AddPointToCameraConstraints (
@@ -233,15 +233,14 @@ void NonlinearPositionEstimator::AddPointToCameraConstraints(
233
233
for (const TrackId track_id : tracks_to_add) {
234
234
triangulated_points_[track_id] = 100.0 * rng_->RandVector3d ();
235
235
236
- AddTrackToProblem (track_id,
237
- orientations,
238
- point_to_camera_weight,
239
- positions);
236
+ AddTrackToProblem (
237
+ track_id, orientations, point_to_camera_weight, positions);
240
238
}
241
239
242
- VLOG (2 ) << num_point_to_camera_constraints << " point to camera constriants "
243
- " were added to the position "
244
- " estimation problem." ;
240
+ VLOG (2 ) << num_point_to_camera_constraints
241
+ << " point to camera constriants "
242
+ " were added to the position "
243
+ " estimation problem." ;
245
244
}
246
245
247
246
int NonlinearPositionEstimator::FindTracksForProblem (
@@ -269,8 +268,8 @@ int NonlinearPositionEstimator::FindTracksForProblem(
269
268
GetTracksSortedByNumViews (reconstruction_, *view, *tracks_to_add);
270
269
271
270
for (int i = 0 ;
272
- i < sorted_tracks.size () && tracks_per_camera[position. first ] <
273
- options_.min_num_points_per_view ;
271
+ i < sorted_tracks.size () &&
272
+ tracks_per_camera[position. first ] < options_.min_num_points_per_view ;
274
273
i++) {
275
274
// Update the number of point to camera constraints for each camera.
276
275
tracks_to_add->insert (sorted_tracks[i]);
@@ -320,7 +319,8 @@ std::vector<TrackId> NonlinearPositionEstimator::GetTracksSortedByNumViews(
320
319
options_.min_num_points_per_view );
321
320
std::partial_sort (views_per_track.begin (),
322
321
views_per_track.begin () + num_tracks_to_sort,
323
- views_per_track.end (), CompareViewsPerTrack);
322
+ views_per_track.end (),
323
+ CompareViewsPerTrack);
324
324
325
325
for (int i = 0 ; i < num_tracks_to_sort; i++) {
326
326
sorted_tracks[i] = views_per_track[i].first ;
0 commit comments