mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
Variety of changes to documentation and example code.
1. Update version history. 2. Minor changes to the tutorial to reflect the bounds constrained problem. 3. Added static factory methods to the SnavelyReprojectionError. 4. Removed relative gradient tolerance from types.h as it is not true anymore. Change-Id: I8de386e5278a008c84ef2d3290d2c4351417a9f1
This commit is contained in:
@@ -263,18 +263,14 @@ void BuildProblem(BALProblem* bal_problem, Problem* problem) {
|
||||
CostFunction* cost_function;
|
||||
// Each Residual block takes a point and a camera as input and
|
||||
// outputs a 2 dimensional residual.
|
||||
if (FLAGS_use_quaternions) {
|
||||
cost_function = new AutoDiffCostFunction<
|
||||
SnavelyReprojectionErrorWithQuaternions, 2, 4, 6, 3>(
|
||||
new SnavelyReprojectionErrorWithQuaternions(
|
||||
observations[2 * i + 0],
|
||||
observations[2 * i + 1]));
|
||||
} else {
|
||||
cost_function =
|
||||
new AutoDiffCostFunction<SnavelyReprojectionError, 2, 9, 3>(
|
||||
new SnavelyReprojectionError(observations[2 * i + 0],
|
||||
observations[2 * i + 1]));
|
||||
}
|
||||
cost_function =
|
||||
(FLAGS_use_quaternions)
|
||||
? SnavelyReprojectionErrorWithQuaternions::Create(
|
||||
observations[2 * i + 0],
|
||||
observations[2 * i + 1])
|
||||
: SnavelyReprojectionError::Create(
|
||||
observations[2 * i + 0],
|
||||
observations[2 * i + 1]);
|
||||
|
||||
// If enabled use Huber's loss function.
|
||||
LossFunction* loss_function = FLAGS_robustify ? new HuberLoss(1.0) : NULL;
|
||||
|
||||
Reference in New Issue
Block a user