Files

400 lines
17 KiB
C++
Raw Permalink Normal View History

2012-04-30 23:09:08 -07:00
// Ceres Solver - A fast non-linear least squares minimizer
2023-09-19 15:29:34 -07:00
// Copyright 2023 Google Inc. All rights reserved.
// http://ceres-solver.org/
2012-04-30 23:09:08 -07:00
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of Google Inc. nor the names of its contributors may be
// used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Author: sameeragarwal@google.com (Sameer Agarwal)
//
// An example of solving a dynamically sized problem with various
// solvers and loss functions.
//
// For a simpler bare bones example of doing bundle adjustment with
// Ceres, please see simple_bundle_adjuster.cc.
//
// NOTE: This example will not compile without gflags and SuiteSparse.
//
// The problem being solved here is known as a Bundle Adjustment
// problem in computer vision. Given a set of 3d points X_1, ..., X_n,
// a set of cameras P_1, ..., P_m. If the point X_i is visible in
// image j, then there is a 2D observation u_ij that is the expected
// projection of X_i using P_j. The aim of this optimization is to
// find values of X_i and P_j such that the reprojection error
//
// E(X,P) = sum_ij |u_ij - P_j X_i|^2
//
// is minimized.
//
// The problem used here comes from a collection of bundle adjustment
// problems published at University of Washington.
// http://grail.cs.washington.edu/projects/bal
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
2022-04-21 17:41:10 -07:00
#include <memory>
2012-04-30 23:09:08 -07:00
#include <string>
2022-08-17 10:37:13 -07:00
#include <thread>
2012-04-30 23:09:08 -07:00
#include <vector>
2024-07-07 10:24:18 -07:00
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
#include "absl/log/check.h"
#include "absl/log/initialize.h"
#include "absl/log/log.h"
2024-09-18 21:41:18 -07:00
#include "absl/time/clock.h"
2024-09-17 10:27:46 -07:00
#include "absl/time/time.h"
2012-04-30 23:09:08 -07:00
#include "bal_problem.h"
#include "ceres/ceres.h"
2012-08-13 14:38:41 -07:00
#include "snavely_reprojection_error.h"
2012-04-30 23:09:08 -07:00
2020-09-08 17:51:32 +02:00
// clang-format makes the gflags definitions too verbose
// clang-format off
2024-07-07 10:24:18 -07:00
ABSL_FLAG(std::string, input, "", "Input File name");
ABSL_FLAG(std::string, trust_region_strategy, "levenberg_marquardt",
2012-09-17 12:06:57 -07:00
"Options are: levenberg_marquardt, dogleg.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(std::string, dogleg, "traditional_dogleg", "Options are: traditional_dogleg,"
"subspace_dogleg.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(bool, inner_iterations, false, "Use inner iterations to non-linearly "
"refine each successful trust region step.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(std::string, blocks_for_inner_iterations, "automatic", "Options are: "
2020-09-08 17:51:32 +02:00
"automatic, cameras, points, cameras,points, points,cameras");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(std::string, linear_solver, "sparse_schur", "Options are: "
2022-08-14 19:14:04 -05:00
"sparse_schur, dense_schur, iterative_schur, "
"sparse_normal_cholesky, dense_qr, dense_normal_cholesky, "
"and cgnr.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(bool, explicit_schur_complement, false, "If using ITERATIVE_SCHUR "
"then explicitly compute the Schur complement.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(std::string, preconditioner, "jacobi", "Options are: "
"identity, jacobi, schur_jacobi, schur_power_series_expansion, cluster_jacobi, "
2012-09-17 12:06:57 -07:00
"cluster_tridiagonal.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(std::string, visibility_clustering, "canonical_views",
"single_linkage, canonical_views");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(bool, use_spse_initialization, false,
"Use power series expansion to initialize the solution in ITERATIVE_SCHUR linear solver.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(std::string, sparse_linear_algebra_library, "suite_sparse",
2024-05-01 11:00:58 +02:00
"Options are: suite_sparse, accelerate_sparse, eigen_sparse and cuda_sparse");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(std::string, dense_linear_algebra_library, "eigen",
2022-02-03 08:09:10 -06:00
"Options are: eigen, lapack, and cuda");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(std::string, ordering_type, "amd", "Options are: amd, nesdis");
ABSL_FLAG(std::string, linear_solver_ordering, "user",
2022-08-14 19:14:04 -05:00
"Options are: automatic and user");
2012-09-02 13:50:43 -07:00
2024-07-07 10:24:18 -07:00
ABSL_FLAG(bool, use_quaternions, false, "If true, uses quaternions to represent "
2012-09-17 12:06:57 -07:00
"rotations. If false, angle axis is used.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(bool, use_manifolds, false, "For quaternions, use a manifold.");
ABSL_FLAG(bool, robustify, false, "Use a robust loss function.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(double, eta, 1e-2, "Default value for eta. Eta determines the "
2020-09-08 17:51:32 +02:00
"accuracy of each linear solve of the truncated newton step. "
"Changing this parameter can affect solve performance.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(int32_t, num_threads, -1, "Number of threads. -1 = std::thread::hardware_concurrency.");
ABSL_FLAG(int32_t, num_iterations, 5, "Number of iterations.");
ABSL_FLAG(int32_t, max_linear_solver_iterations, 500, "Maximum number of iterations"
" for solution of linear system.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(double, spse_tolerance, 0.1,
"Tolerance to reach during the iterations of power series expansion initialization or preconditioning.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(int32_t, max_num_spse_iterations, 5,
"Maximum number of iterations for power series expansion initialization or preconditioning.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(double, max_solver_time, 1e32, "Maximum solve time in seconds.");
ABSL_FLAG(bool, nonmonotonic_steps, false, "Trust region algorithm can use"
2012-09-17 12:06:57 -07:00
" nonmonotic steps.");
2012-04-30 23:09:08 -07:00
2024-07-07 10:24:18 -07:00
ABSL_FLAG(double, rotation_sigma, 0.0, "Standard deviation of camera rotation "
"perturbation.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(double, translation_sigma, 0.0, "Standard deviation of the camera "
"translation perturbation.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(double, point_sigma, 0.0, "Standard deviation of the point "
2012-09-17 12:06:57 -07:00
"perturbation.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(int32_t, random_seed, 38401, "Random seed used to set the state "
"of the pseudo random number generator used to generate "
2022-04-24 19:07:37 -07:00
"the perturbations.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(bool, line_search, false, "Use a line search instead of trust region "
"algorithm.");
2024-07-07 10:24:18 -07:00
ABSL_FLAG(bool, mixed_precision_solves, false, "Use mixed precision solves.");
ABSL_FLAG(int32_t, max_num_refinement_iterations, 0, "Iterative refinement iterations");
ABSL_FLAG(std::string, initial_ply, "", "Export the BAL file data as a PLY file.");
ABSL_FLAG(std::string, final_ply, "", "Export the refined BAL file data as a PLY "
2015-04-16 12:35:51 -07:00
"file.");
2020-09-08 17:51:32 +02:00
// clang-format on
2022-04-21 17:41:10 -07:00
namespace ceres::examples {
namespace {
2012-04-30 23:09:08 -07:00
void SetLinearSolver(Solver::Options* options) {
2024-07-07 10:24:18 -07:00
CHECK(StringToLinearSolverType(absl::GetFlag(FLAGS_linear_solver),
2012-09-02 13:50:43 -07:00
&options->linear_solver_type));
2024-07-07 10:24:18 -07:00
CHECK(StringToPreconditionerType(absl::GetFlag(FLAGS_preconditioner),
2012-09-02 13:50:43 -07:00
&options->preconditioner_type));
2021-03-18 07:12:36 -07:00
CHECK(StringToVisibilityClusteringType(
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_visibility_clustering),
2021-03-18 07:12:36 -07:00
&options->visibility_clustering_type));
2012-09-02 13:50:43 -07:00
CHECK(StringToSparseLinearAlgebraLibraryType(
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_sparse_linear_algebra_library),
2020-09-08 17:51:32 +02:00
&options->sparse_linear_algebra_library_type));
2013-08-09 10:35:37 -07:00
CHECK(StringToDenseLinearAlgebraLibraryType(
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_dense_linear_algebra_library),
2020-09-08 17:51:32 +02:00
&options->dense_linear_algebra_library_type));
CHECK(
2024-07-07 10:24:18 -07:00
StringToLinearSolverOrderingType(absl::GetFlag(FLAGS_ordering_type),
&options->linear_solver_ordering_type));
2021-03-18 07:12:36 -07:00
options->use_explicit_schur_complement =
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_explicit_schur_complement);
2021-03-18 07:12:36 -07:00
options->use_mixed_precision_solves =
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_mixed_precision_solves);
2021-03-18 07:12:36 -07:00
options->max_num_refinement_iterations =
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_max_num_refinement_iterations);
options->max_linear_solver_iterations =
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_max_linear_solver_iterations);
2022-08-13 11:59:16 -07:00
options->use_spse_initialization =
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_use_spse_initialization);
options->spse_tolerance = absl::GetFlag(FLAGS_spse_tolerance);
options->max_num_spse_iterations =
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_max_num_spse_iterations);
2012-04-30 23:09:08 -07:00
}
void SetOrdering(BALProblem* bal_problem, Solver::Options* options) {
const int num_points = bal_problem->num_points();
const int point_block_size = bal_problem->point_block_size();
double* points = bal_problem->mutable_points();
const int num_cameras = bal_problem->num_cameras();
const int camera_block_size = bal_problem->camera_block_size();
double* cameras = bal_problem->mutable_cameras();
if (options->use_inner_iterations) {
2024-07-07 10:24:18 -07:00
if (absl::GetFlag(FLAGS_blocks_for_inner_iterations) == "cameras") {
LOG(INFO) << "Camera blocks for inner iterations";
2022-04-21 17:41:10 -07:00
options->inner_iteration_ordering =
std::make_shared<ParameterBlockOrdering>();
for (int i = 0; i < num_cameras; ++i) {
2020-09-08 17:51:32 +02:00
options->inner_iteration_ordering->AddElementToGroup(
cameras + camera_block_size * i, 0);
}
2024-07-07 10:24:18 -07:00
} else if (absl::GetFlag(FLAGS_blocks_for_inner_iterations) == "points") {
LOG(INFO) << "Point blocks for inner iterations";
2022-04-21 17:41:10 -07:00
options->inner_iteration_ordering =
std::make_shared<ParameterBlockOrdering>();
for (int i = 0; i < num_points; ++i) {
2020-09-08 17:51:32 +02:00
options->inner_iteration_ordering->AddElementToGroup(
points + point_block_size * i, 0);
}
2024-07-07 10:24:18 -07:00
} else if (absl::GetFlag(FLAGS_blocks_for_inner_iterations) ==
2021-03-18 07:12:36 -07:00
"cameras,points") {
LOG(INFO) << "Camera followed by point blocks for inner iterations";
2022-04-21 17:41:10 -07:00
options->inner_iteration_ordering =
std::make_shared<ParameterBlockOrdering>();
for (int i = 0; i < num_cameras; ++i) {
2020-09-08 17:51:32 +02:00
options->inner_iteration_ordering->AddElementToGroup(
cameras + camera_block_size * i, 0);
}
for (int i = 0; i < num_points; ++i) {
2020-09-08 17:51:32 +02:00
options->inner_iteration_ordering->AddElementToGroup(
points + point_block_size * i, 1);
}
2024-07-07 10:24:18 -07:00
} else if (absl::GetFlag(FLAGS_blocks_for_inner_iterations) ==
2021-03-18 07:12:36 -07:00
"points,cameras") {
LOG(INFO) << "Point followed by camera blocks for inner iterations";
2022-04-21 17:41:10 -07:00
options->inner_iteration_ordering =
std::make_shared<ParameterBlockOrdering>();
for (int i = 0; i < num_cameras; ++i) {
2020-09-08 17:51:32 +02:00
options->inner_iteration_ordering->AddElementToGroup(
cameras + camera_block_size * i, 1);
}
for (int i = 0; i < num_points; ++i) {
2020-09-08 17:51:32 +02:00
options->inner_iteration_ordering->AddElementToGroup(
points + point_block_size * i, 0);
}
2024-07-07 10:24:18 -07:00
} else if (absl::GetFlag(FLAGS_blocks_for_inner_iterations) ==
2021-03-18 07:12:36 -07:00
"automatic") {
LOG(INFO) << "Choosing automatic blocks for inner iterations";
} else {
LOG(FATAL) << "Unknown block type for inner iterations: "
2024-07-07 10:24:18 -07:00
<< absl::GetFlag(FLAGS_blocks_for_inner_iterations);
}
}
2012-04-30 23:09:08 -07:00
// Bundle adjustment problems have a sparsity structure that makes
// them amenable to more specialized and much more efficient
// solution strategies. The SPARSE_SCHUR, DENSE_SCHUR and
// ITERATIVE_SCHUR solvers make use of this specialized
2012-09-17 12:06:57 -07:00
// structure.
2012-04-30 23:09:08 -07:00
//
// This can either be done by specifying a
// Options::linear_solver_ordering or having Ceres figure it out
// automatically using a greedy maximum independent set algorithm.
2024-07-07 10:24:18 -07:00
if (absl::GetFlag(FLAGS_linear_solver_ordering) == "user") {
auto* ordering = new ceres::ParameterBlockOrdering;
2012-04-30 23:09:08 -07:00
// The points come before the cameras.
for (int i = 0; i < num_points; ++i) {
ordering->AddElementToGroup(points + point_block_size * i, 0);
}
2012-09-10 17:41:38 -07:00
for (int i = 0; i < num_cameras; ++i) {
// When using axis-angle, there is a single parameter block for
// the entire camera.
ordering->AddElementToGroup(cameras + camera_block_size * i, 1);
}
2012-04-30 23:09:08 -07:00
options->linear_solver_ordering.reset(ordering);
2012-04-30 23:09:08 -07:00
}
}
void SetMinimizerOptions(Solver::Options* options) {
2024-07-07 10:24:18 -07:00
options->max_num_iterations = absl::GetFlag(FLAGS_num_iterations);
2012-04-30 23:09:08 -07:00
options->minimizer_progress_to_stdout = true;
2024-07-07 10:24:18 -07:00
if (absl::GetFlag(FLAGS_num_threads) == -1) {
2022-08-17 10:37:13 -07:00
const int num_available_threads =
static_cast<int>(std::thread::hardware_concurrency());
if (num_available_threads > 0) {
options->num_threads = num_available_threads;
}
} else {
2024-07-07 10:24:18 -07:00
options->num_threads = absl::GetFlag(FLAGS_num_threads);
2022-08-17 10:37:13 -07:00
}
CHECK_GE(options->num_threads, 1);
2024-07-07 10:24:18 -07:00
options->eta = absl::GetFlag(FLAGS_eta);
options->max_solver_time_in_seconds = absl::GetFlag(FLAGS_max_solver_time);
options->use_nonmonotonic_steps = absl::GetFlag(FLAGS_nonmonotonic_steps);
if (absl::GetFlag(FLAGS_line_search)) {
options->minimizer_type = ceres::LINE_SEARCH;
}
2021-03-18 07:12:36 -07:00
CHECK(StringToTrustRegionStrategyType(
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_trust_region_strategy),
2021-03-18 07:12:36 -07:00
&options->trust_region_strategy_type));
2024-07-07 10:24:18 -07:00
CHECK(StringToDoglegType(absl::GetFlag(FLAGS_dogleg), &options->dogleg_type));
options->use_inner_iterations = absl::GetFlag(FLAGS_inner_iterations);
2012-04-30 23:09:08 -07:00
}
void SetSolverOptionsFromFlags(BALProblem* bal_problem,
Solver::Options* options) {
2012-05-29 17:40:17 -07:00
SetMinimizerOptions(options);
2012-04-30 23:09:08 -07:00
SetLinearSolver(options);
SetOrdering(bal_problem, options);
}
void BuildProblem(BALProblem* bal_problem, Problem* problem) {
2024-09-17 10:27:46 -07:00
const absl::Time start_time = absl::Now();
2012-04-30 23:09:08 -07:00
const int point_block_size = bal_problem->point_block_size();
const int camera_block_size = bal_problem->camera_block_size();
double* points = bal_problem->mutable_points();
double* cameras = bal_problem->mutable_cameras();
// Observations is 2*num_observations long array observations =
// [u_1, u_2, ... , u_n], where each u_i is two dimensional, the x
// and y positions of the observation.
const double* observations = bal_problem->observations();
for (int i = 0; i < bal_problem->num_observations(); ++i) {
CostFunction* cost_function;
// Each Residual block takes a point and a camera as input and
// outputs a 2 dimensional residual.
2024-07-07 10:24:18 -07:00
cost_function = (absl::GetFlag(FLAGS_use_quaternions))
2020-09-08 17:51:32 +02:00
? SnavelyReprojectionErrorWithQuaternions::Create(
observations[2 * i + 0], observations[2 * i + 1])
: SnavelyReprojectionError::Create(
observations[2 * i + 0], observations[2 * i + 1]);
2012-04-30 23:09:08 -07:00
// If enabled use Huber's loss function.
2021-03-18 07:12:36 -07:00
LossFunction* loss_function =
2024-07-07 10:24:18 -07:00
absl::GetFlag(FLAGS_robustify) ? new HuberLoss(1.0) : nullptr;
2012-04-30 23:09:08 -07:00
2022-04-24 19:07:37 -07:00
// Each observation corresponds to a pair of a camera and a point
2012-04-30 23:09:08 -07:00
// which are identified by camera_index()[i] and point_index()[i]
// respectively.
double* camera =
cameras + camera_block_size * bal_problem->camera_index()[i];
double* point = points + point_block_size * bal_problem->point_index()[i];
problem->AddResidualBlock(cost_function, loss_function, camera, point);
2012-04-30 23:09:08 -07:00
}
2024-07-07 10:24:18 -07:00
if (absl::GetFlag(FLAGS_use_quaternions) &&
absl::GetFlag(FLAGS_use_manifolds)) {
2022-01-18 16:26:47 -08:00
Manifold* camera_manifold =
2022-03-03 10:52:16 +01:00
new ProductManifold<QuaternionManifold, EuclideanManifold<6>>{};
2012-04-30 23:09:08 -07:00
for (int i = 0; i < bal_problem->num_cameras(); ++i) {
2022-01-18 16:26:47 -08:00
problem->SetManifold(cameras + camera_block_size * i, camera_manifold);
2012-04-30 23:09:08 -07:00
}
}
2024-09-17 10:27:46 -07:00
LOG(INFO) << "Time to build problem: " << absl::Now() - start_time;
2012-04-30 23:09:08 -07:00
}
void SolveProblem(const char* filename) {
2024-07-07 10:24:18 -07:00
BALProblem bal_problem(filename, absl::GetFlag(FLAGS_use_quaternions));
if (!absl::GetFlag(FLAGS_initial_ply).empty()) {
bal_problem.WriteToPLYFile(absl::GetFlag(FLAGS_initial_ply));
}
2012-04-30 23:09:08 -07:00
Problem problem;
2024-07-07 10:24:18 -07:00
srand(absl::GetFlag(FLAGS_random_seed));
2012-08-10 19:52:09 -07:00
bal_problem.Normalize();
2024-07-07 10:24:18 -07:00
bal_problem.Perturb(absl::GetFlag(FLAGS_rotation_sigma),
absl::GetFlag(FLAGS_translation_sigma),
absl::GetFlag(FLAGS_point_sigma));
2012-04-30 23:09:08 -07:00
BuildProblem(&bal_problem, &problem);
Solver::Options options;
SetSolverOptionsFromFlags(&bal_problem, &options);
options.gradient_tolerance = 1e-16;
options.function_tolerance = 1e-16;
2022-08-14 19:14:04 -05:00
options.parameter_tolerance = 1e-16;
2012-04-30 23:09:08 -07:00
Solver::Summary summary;
Solve(options, &problem, &summary);
std::cout << summary.FullReport() << "\n";
2024-07-07 10:24:18 -07:00
if (!absl::GetFlag(FLAGS_final_ply).empty()) {
bal_problem.WriteToPLYFile(absl::GetFlag(FLAGS_final_ply));
}
2012-04-30 23:09:08 -07:00
}
} // namespace
2022-04-21 17:41:10 -07:00
} // namespace ceres::examples
2012-04-30 23:09:08 -07:00
int main(int argc, char** argv) {
2024-07-07 10:24:18 -07:00
absl::InitializeLog();
absl::ParseCommandLine(argc, argv);
2024-05-01 11:00:58 +02:00
2024-07-07 10:24:18 -07:00
if (absl::GetFlag(FLAGS_input).empty()) {
LOG(ERROR) << "Usage: bundle_adjuster --input=bal_problem";
2012-04-30 23:09:08 -07:00
return 1;
}
2024-07-07 10:24:18 -07:00
CHECK(absl::GetFlag(FLAGS_use_quaternions) ||
!absl::GetFlag(FLAGS_use_manifolds))
2022-01-18 16:26:47 -08:00
<< "--use_manifolds can only be used with --use_quaternions.";
2024-07-07 10:24:18 -07:00
ceres::examples::SolveProblem(absl::GetFlag(FLAGS_input).c_str());
2012-04-30 23:09:08 -07:00
return 0;
}