mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Make the robust curve fitting example robust.
Change-Id: Iffcde8f168b7cd68e56f351c43088d7aef1e5e2f
This commit is contained in:
@@ -147,7 +147,9 @@ int main(int argc, char** argv) {
|
||||
CostFunction* cost_function =
|
||||
new AutoDiffCostFunction<ExponentialResidual, 1, 1, 1>(
|
||||
new ExponentialResidual(data[2 * i], data[2 * i + 1]));
|
||||
problem.AddResidualBlock(cost_function, NULL, &m, &c);
|
||||
problem.AddResidualBlock(cost_function,
|
||||
new CauchyLoss(0.5),
|
||||
&m, &c);
|
||||
}
|
||||
|
||||
Solver::Options options;
|
||||
|
||||
Reference in New Issue
Block a user