The snavely reprojection error is wrong both in the sample code and
in the documentation. It should not multiply by the focal length
before calculating the distortion.
Change-Id: I292af962e634506a7cc57af9ce72b08f81ce3425
The warnings got disabled at some point; this re-enables some of them, and
fixes some of the warnings.
Change-Id: I290a4fdfad18cea85e9177ba57744d97b6856bb2
Using Ceres in your application involves linking several dependent
libraries, depending on how you compiled Ceres. The example makes
it easier for users to leverage Ceres in their applications.
Change-Id: I6331fd9c6e36c3eac464be2a7a6b905cc76ed843
Remove the old ordering API, and modify solver_impl.cc
to use the new API everywhere.
In the process also clean up the linear solver instantion
logic in solver_impl.cc a bit too.
Change-Id: Ia66898abc7f622070b184b21fce8cc6140c4cebf
This causes the release script to abort if the
Ceres version in the headers, command line,
and CMake files don't match.
Change-Id: I38c4f1b4ebf3499d2ba4f698fa3f4936538c3de7
This will make it possible to write code which detects Ceres
versions and does different things with different versions.
Ideally this wouldn't be necessary, but in practice it is
sometimes useful.
Change-Id: I8d9f56d664ef75706e87c9bd7954e709dd7c0278
We have permission from Stefan Roth to use the coefficients from his
Matlab toolbox. They have been added as *.foe files.
Change-Id: Ice529e5cab0302b9f27648dd3c8e5ed7b9662aba
Previously, the return status was ignored, which meant that e.g. a
numerical failure (which returns 0 final error) would be counted as
correct answer (as the final error is at least as good as the certified
error).
Change-Id: Ia627d5fadf9b20100e628519af794ce0c0b195f4
More flexible testing.
Read and parse the certified cost value from the data file.
Remove the ugly hack for computing the certified cost.
Refactored the flags parsing logic
Change-Id: I8f2e6be183b758b2453302fcdc6696bfa0db5eb8
If the norm of a column in the jacobian is near zero.
The jacobian scaling could in trying to avoid division
by zero actually make things much worse. It made it
appear that the column actually had mass when in fact
it did not.
This leads to inflated values for the parameters for
that column when we get some numerical garbage back
from the linear solver.
This should also address the case where users are setting
some columns to zero to hold some parameter constant.
The fix is a bit delicate, and frankly I am not
completely sure that it fixes the issue. But right now
I am quite certain that the current implementation is
better than what we had earlier. Whether this is the
best fix is not entirely certain.
To test the fix, I converted Arnaud Gelas' original
code which triggered this bug into a test case.
Change-Id: Idbbd8177269bdc06338e0f54410f93ddc127c8ca
Extend nist.cc to test more nonlinear and linear solvers.
(Thanks to Markus Moll for finding the Roszman1 bug)
Change-Id: I92b4bab0771de85f7fe711fb0853f155991f4aaf
1. CostFunction returning false is handled better.
If only the cost is being evaluated, it is possible to
use the false value as an infinite value signal/outside
a region of validity. This allows a weak form of constraint
handling. Useful for example in handling infinities.
2. Changed the way how the slop around zero when model_cost
is larger than the current cost. Relative instead of absolute
tolerances are used. The same logic is propagated how the
corresponding clamping of the model_cost is done.
3. Fixed a minor indexing bug in nist.cc.
4. Some minor logging fixes to nist.cc to make it more
compatible with the rest of ceres.
Together these changes, take the successful solve count from
41/54 to 46/54 and eliminate all NUMERICAL_FAILURE problems.
Change-Id: If94170ea4731af5b243805c0200963dd31aa94a7
Average factorization times for bundle adjustment test problem:
SuiteSparse: 0.2794 s.
CXSparse: 0.4039 s.
CXSparse cached: 0.2399 s.
CXSparse will still be slower, though, because it has to compute
the transpose and J^T * J.
Change-Id: If9cdaa3dd520bee84b56e5fd4953b56a93db6bde
Linking currently fails in Visual Studio due to a missing library
"gomp.lib". This is not needed in Visual Studio. OpenMP works
without it.
Change-Id: I39e204a8dd4f1b7425df7d4b222d86a8bb961432
The overload for pointers in hash tables was applied in normal
usage of schur_ordering.cc. However, the tests did not include the
overload since they only included collections_port.h. As a result,
the routines in schur_ordering.cc were using a different hash
function than that inside the tests.
The fix is to remove the specialization. If this breaks one of the
compiler configurations, we will find a workaround at that time.
Change-Id: Idbf60415d5e2aec0c865b514ad0c577d21b91405
On certain NDK build configurations, one of the innermost
parts of the Schur eliminator would get compiled
incorrectly. The compiler changed a -= to a +=.
The normal Ceres unit tests caught the problem; however,
since it is not possible to build the tests with the NDK
(only with the standalone toolchain) this was difficult to
track down. Finding the issue involved pasting the schur
eliminator unit test inside of solver_impl.cc and other such
hacks.
Change-Id: Ie91bb545d74fe39f0c8cbd1a6eb69ee4d8b25fb2
Eigen3 does not allow column vectors to be stored in row-major
format. NumericDiffCostFunction by default stores its Jacobian
matrices in row-major format. This works fine if the residual
contains more than one variable. But if the residual block
depends on one variable and has more than one residuals, the
resulting Jacobian matrix is a column matrix in row-major format
resulting in a compile time error.
The fix is to check the template parameters and switch to column-major
storage as needed.
Thanks to Lena Gieseke for reporting this.
Change-Id: Icc51c5b38e1f3609e0e1ecb3c4e4a02aecd72c3b
This way, setting the lower and upper bound both to 1.0, one can disable
the automatic trust region scaling.
Change-Id: Ifa317a6911b813a89c1cf7fdfde25af603705319