For problems with a small number of variables, but a large
number of residuals, it is sometimes beneficial to use the
Cholesky factorization on the normal equations, instead of
the dense QR factorization of the Jacobian, even though it
is numerically the better thing to do.
Change-Id: I3506b006195754018deec964e6e190b7e8c9ac8f
Gather
* all executables in ${CMAKE_BINARY_DIR}/bin
* all libraries (static and dynamic) in ${CMAKE_BINARY_DIR}/lib
Change-Id: Ibc2fa1adfb6f0aea65d66d570259b79546bf3b07
SuiteSparse 4 requires linking to libsuitesparseconfig.a.
Both SuiteSparse 3 and SuiteSparse 4 require an additional header
(either UFconfig.h or SuiteSparse_config.h) that is not found if it is
in a separate path. Therefore, add explicit checks.
Change-Id: I699902b5db4f1b7f17134b5a54f9aa681445e294
In the TrustRegionMinimizer, the step is currently implicitly negated.
This is done so that the linearized residual is |r - J*step|^2, which
corresponds to J*step = r, so neither J nor r have to be modified.
However, it leads to the rather unintuitive situation that the strategy
returns a step in positive gradient direction, which you would expect to
increase the function value. One way is to rename the "step" parameter in
the strategy to "negative_step" and document it.
This patch instead moves the negation inside the strategy, just around
the linear solver call, so that it is done in a local context and easier
to document.
Change-Id: Idb258149a01f61c64e22128ea221c5a30cd89c89
This adds a Android.mk build that builds a Ceres static library
suitable for embetting in larger Android applications. This is
useful when needing to build Ceres without GPL'd components, since
the standalone toolchain (needed for the CMake Android build) does
not work with STLPort.
Change-Id: I8d857237f6f82658741017d161b2e31d9a20e5a7
In StepAccepted, reuse_ was not cleared if the improvement was not good
enough. This is obviously wrong as the step was taken nevertheless and
the computed entities may be completely different at the new iterate.
Change-Id: I4bf3441f71550a0595dd8c5565aedd38d03e8b2f
In the Levenberg-Marquardt algorithm, the diagonal of J^T J is used to
regularize the problem. This corresponds to an elliptical trust region
|| D step || <= r, where D = sqrt(diag(J^T J)).
This commit adds the same elliptical trust region to the dogleg
strategy. The trust region problem becomes
min. x^T H x + g^T x
s.t. || D x || <= r
By substituting y = D x, it becomes
min. y^T D^-1 H D^-1 y + g^T D^-1 y
s.t. || y || <= r
which is the traditional spherical trust region problem.
This commit changes the DoglegStrategy so that the Gauss-Newton point,
the gradient, and the Cauchy point are scaled correctly (without
modifying the Jacobian directly). Then the dogleg step is computed the
same way as before, and finally the step is rescaled to obtain
x = D^-1 y.
Change-Id: Iea25a9113ecba911b746e269bc6e6fe51cb59003
Refactor some of the perturbation code so that the
normalization and perturbation code can share the
camera decomposition code.
Change-Id: I084064976804a92f9240d8f5e10d1bb23dcb5ff2
The camera perturbation is now done so that after
the perturbation, the translation vector can still
be transformed back into the perturbed camera center.
Change-Id: Ib9e854e2456b2b33669724f348bb37c2d3b40dcd
There are cases where one wishes to link Ceres against another
application or library which uses a mutex implementation with
similar ancestry to the one in Ceres. In those cases there are
problems due to macro interactions which can't be contained with
namespaces.
This further isolates the Ceres Mutex class by adding CERES_
prefix to all the macros and also working around a macro name
clash with MutexLock by renaming the MutexLock class to
CeresMutexLock.
Change-Id: I923f4427d5939823ea67d48005a90391736d7751
This is a workaround for anyone building Ceres in an environment
where there is a non-standard string implementation in the global
namespace. Due to the way the standard is written, a "using
namespace X" import is not high enough precedence to resolve a
naked reference to "string". Instead, by explicitly importing
string, the lookup becomes unambiguous.
Change-Id: I8d70463de01c482796c5bc09da05b37d21e7af96
1. Add the ability to perturb the camera pose and the
point positions using user specified parameters.
2. Re-order the flags.
3. Minor name correction.
4. Added Box-Mueller generator to random.h
Change-Id: I2c9ce74c237f5bde9a7299cc71b205d1ca9bc742