Home | History | Annotate | Download | only in examples

Lines Matching refs:bal_problem

61 #include "bal_problem.h"
141 void SetOrdering(BALProblem* bal_problem, Solver::Options* options) {
142 const int num_points = bal_problem->num_points();
143 const int point_block_size = bal_problem->point_block_size();
144 double* points = bal_problem->mutable_points();
146 const int num_cameras = bal_problem->num_cameras();
147 const int camera_block_size = bal_problem->camera_block_size();
148 double* cameras = bal_problem->mutable_cameras();
243 void SetSolverOptionsFromFlags(BALProblem* bal_problem,
247 SetOrdering(bal_problem, options);
250 void BuildProblem(BALProblem* bal_problem, Problem* problem) {
251 const int point_block_size = bal_problem->point_block_size();
252 const int camera_block_size = bal_problem->camera_block_size();
253 double* points = bal_problem->mutable_points();
254 double* cameras = bal_problem->mutable_cameras();
259 const double* observations = bal_problem->observations();
261 for (int i = 0; i < bal_problem->num_observations(); ++i) {
281 cameras + camera_block_size * bal_problem->camera_index()[i];
282 double* point = points + point_block_size * bal_problem->point_index()[i];
302 for (int i = 0; i < bal_problem->num_cameras(); ++i) {
310 BALProblem bal_problem(filename, FLAGS_use_quaternions);
314 bal_problem.Normalize();
315 bal_problem.Perturb(FLAGS_rotation_sigma,
319 BuildProblem(&bal_problem, &problem);
321 SetSolverOptionsFromFlags(&bal_problem, &options);
336 LOG(ERROR) << "Usage: bundle_adjustment_example --input=bal_problem";