Make the robust curve fitting example robust.

Change-Id: Iffcde8f168b7cd68e56f351c43088d7aef1e5e2f
This commit is contained in:
Sameer Agarwal
2015-04-27 06:54:12 -07:00
parent 239dd59ea5
commit 2175d025a6
+3 -1
View File
@@ -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;