Add the ability to normalize BALProblem.

Refactor some of the perturbation code so that the
normalization and perturbation code can share the
camera decomposition code.

Change-Id: I084064976804a92f9240d8f5e10d1bb23dcb5ff2
This commit is contained in:
Sameer Agarwal
2012-08-10 19:52:09 -07:00
parent 214561083b
commit 36a3309c84
3 changed files with 130 additions and 44 deletions
+3
View File
@@ -347,6 +347,7 @@ void SolveProblem(const char* filename) {
Problem problem;
SetRandomState(FLAGS_random_seed);
bal_problem.Normalize();
bal_problem.Perturb(FLAGS_rotation_sigma,
FLAGS_translation_sigma,
FLAGS_point_sigma);
@@ -355,6 +356,8 @@ void SolveProblem(const char* filename) {
Solver::Options options;
SetSolverOptionsFromFlags(&bal_problem, &options);
options.solver_log = FLAGS_solver_log;
options.gradient_tolerance *= 1e-3;
Solver::Summary summary;
Solve(options, &problem, &summary);
std::cout << summary.FullReport() << "\n";