The script assert_ndk_version.sh used to require that the user
either define ANDROID_NDK_ROOT or ndk-build be in the path
so that ANDROID_NDK_ROOT can be inferred.
But since we are always calling this script from within an
Android.mk file, ndk-build already defines a variable called
NDK_ROOT, which we can pass to the script, thereby simplifying it
and making it more robust.
Change-Id: I31d66529a36a93e760e0dd0f17cfe61428fbac55
Create the glog include directories and library directories
only if we've already checked that the user is using
glog (and not miniglog).
Otherwise, @GLOG_INCLUDE_DIR@ and @GLOG_LIBRARY@ will be
empty and the generated files will cause Cmake errors.
Change-Id: Ia0ce9cf98f7d56c83b2285f72f45b8e0d5dc34c4
- Ceres now requires Android NDK version >= r9d to compile, Jørgen's
script allows a clean way to verify this condition is met before
trying to compile for Android.
- Note that this is a modified version of the original script, which
adds support for versions >= 10, and fixes extraction of the version
number now that the architecture is also included.
Change-Id: Icd7ffd25407bcf29af007e30b5da5d18eb799adf
CreateReducedProgram is a safer API, reduces the possibility of
memory leaks and produces valid programs.
Change-Id: I094d53d207fced970a4d9ea0b66cdb09ce5f0657
A number of typos in solver.cc which were hidden behind ifdefs
and were only revealed when building under android.
Change-Id: I89cbe8056da071479d2d1a251a8919b0be1f1cd4
Program::RemoveFixedBocks will happily drop all fixed parameter
and residual blocks. So if it is called on the one and only copy
of a program, like it was being called in the tests, this will
result in a memory leak because we would have lost track of the
fixed parameter and residual blocks.
This is not a problem in actual usage since CreateReducedProgram
will first create a copy of the program and then remove the fixed
blocks from it. But in the tests, we were creating a ProblemImpl
and then calling RemovedFixedBlocks on the underlying program
object causing a memory leak.
The fix to make a copy in the tests and then work on that. I
have also added a warning in program.h
Change-Id: I03a5f7a7f5453aec848451a5c0ace4b065f71e9b
Inner iterations require specific constraints on parameter
block orderings. The creation and validation routines for
these orderings are not static methods in CoordinateDescentMinimizer.
Change-Id: Ifc89491c9a8672e08523191b74b53058cbfa1db3
Move functions that determine alternatives to Schur type linear
solver and preconditioners into the LinearSolver and Preconditioner
interfaces.
Change-Id: Iae900afb7db17cdbeb7753497005a48c3144e2d7
This replaces the broken CERES_VERSION and CERES_ABI_VERSION
defines with a different set, including integer versions for
MAJOR/MINOR/etc.
This also adds the Ceres version to Solver::FullReport().
Example report from powell:
Ceres Solver v1.10.0 Solve Report
----------------------------------
Original Reduced
Parameter blocks 4 4
Parameters 4 4
Residual blocks 4 4
Residual 4 4
Minimizer TRUST_REGION
Dense linear algebra library EIGEN
Trust region strategy LEVENBERG_MARQUARDT
Given Used
Linear solver DENSE_QR DENSE_QR
Threads 1 1
Linear solver threads 1 1
Cost:
Initial 1.075000e+02
Final 1.791438e-14
Change 1.075000e+02
Minimizer iterations 14
Successful steps 14
Unsuccessful steps 0
Time (in seconds):
Preprocessor 0.001
Residual evaluation 0.000
Jacobian evaluation 0.000
Linear solver 0.000
Minimizer 0.001
Postprocessor 0.000
Total 0.003
Change-Id: I5bf0e8023693e9195276b1f1e881b13121ba1196
Termination: CONVERGENCE (Gradient tolerance reached. Gradient max norm: 3.642190e-11 <= 1.000000e-10)
Move
ParameterBlocksAreFinite
IsBoundsConstrained
IsFeasible
RemoveFixedBlocks
IsParameterBlockSetIndependent
CreateJacobianBlockSparsity
from being static methods in SolverImpl to member functions
in the Program class.
Change-Id: I80fa4a429a716ea4371ad6c67864adad438e1553
1. Merge TrustRegionLoggingCallback and LineSearchLoggingCallback
into a single callback.
2. Move the callbacks into callback.h
3. Update SolverImpl to use the new callbacks.
Change-Id: I9e82173cf2b828d023d96c57d1cba17f4832aeae
This allows checking for the availability of CAMD without depending
on a preprocessor symbol, which can be the source of subtle bugs
if the file defining that symbol was not included.
Change-Id: I6f1ef91a20baeecf68e8dd467ebe707dde8c5f79
1. Add the ability to bulk remove elements.
2. Add accessor for elements_to_group.
3. Early exit in Remove if there are no elements.
Change-Id: I3df1f00de05338a42e9907423b674469a022d3bc
1. Update ceres-solver.spec with version bump
and a new package description.
2. Update the docs to refer to 1.9.0
3. Update version history.
4. Change build requirements for Android to be r9d.
Change-Id: Ibab27976b214a11549cb2688b91f791a6388b0b5
- A number of users are now successfully using the
suitesparse-metis-for-windows project to build Ceres with SuiteSparse
on Windows.
- Also fixing missing requirement for sphinx_rdm_theme if building
the Ceres docs.
Change-Id: I1a36c13166f96743557de2ac3b7c9b84531d1f24
- Previously we set CMAKE_MODULE_PATH explicitly rather than appending
to it when adding our local cmake directory.
- This meant the user could not easily pass their own directory which
would also be used. This would be useful if they had their own
custom FindBLAS / FindLAPACK scripts that they wanted to overload
the defaults shipped with CMake.
Change-Id: I0c1fda1b6fd81eab68755aa036f64af3efbb226d
Add an example application of homography matrix estimation
from a 2D euclidean correspondences which is done in two
steps:
- Coarse algebraic estimation
- Fine refinement using Ceres minimizer
Nothing terribly exciting apart from an example of how to
use user callbacks.
User callback is used here to stop minimizer when average
of symmetric geometric distance becomes good enough.
This might be arguable whether it's the best way to go
(in some cases you would want to stop minimizer when
maximal symmetric distance is lower than a threshold) but
for a callback usage example it's good enough to stick
to current logic.
Change-Id: I60c8559cb10b001a0eb64ab71920c08bd68455b8
Do not propagate 3d party libs through
IMPORTED_LINK_INTERFACE_LIBRARIES_[DEBUG/RELEASE] mechanism
when building shared libraries. SuiteSparse, lapack & co
are considered private. Glog still gets propagated since
it is part of the public interface. See documentation of
TARGET_LINK_LIBRARIES().
Change-Id: If0563b0c705b102876f5190e9a86694d10f79283