Commit Graph

423 Commits

Author SHA1 Message Date
Sergiu Deitsch 849f854ff9 Clarify building from Git sources
Explain that release archive directory names in the installation guide
must be replaced with the actual Git checkout directory.

Fixes #1209

Change-Id: I66f2246aacd3b5223dcc3792c2cf4670cd6248c5
2026-07-28 01:03:39 +02:00
reprojection.calibration bac1127f9e Update GradientChecker docs
* Use GradientChecker::ProbeResults instead of GradientCheckResults
* Add missing parenthesis in if statement

Change-Id: I900608eb806753ec8f42c09d395fa3b93f012e76
2026-06-23 11:46:15 +02:00
brettmichaelgreen 0c70ed3a1a Document DumpLinearLeastSquaresProblem
Add documentation on the output of DumpLinearLeastSquaresProblem.
This is to clarify confusion brought up on #608

Change-Id: I935cacee1e4345a1d0250aaac322ca2f8e794e66
2025-11-08 15:56:10 -05:00
Sergiu Deitsch 370631f01f Use Euler parameters in QuaternionPlusImpl
Define the relation between the axis-angle representation of a rotation
and the corresponding unit quaternion as

  q(𝐞) = cos(𝜃/2) + sin(𝜃/2)/𝜃·𝐞

where 𝐞 = 𝜃𝛚 is the rotation vector given by the rotation angle 𝜃 and
the unit axis of rotation 𝛚 instead of

  q(𝐞) = cos(𝜃) + sin(𝜃)/𝜃·𝐞 .

This brings the former relation closer to the available functionality
provided by ceres/rotation.h.

Fixes #941

Change-Id: Id40c065f78593887ecc52e67a068737d7eb5bda6
2025-06-13 16:23:24 -07:00
Sergiu Deitsch 0e760e0453 Use subsections instead of an enumeration in solving FAQ
This is a follow-up to related changes made in 018bb49e80.

Change-Id: Ife3befe85d7cea5dad5185a424508d590c0d77f7
2025-06-09 09:07:03 -07:00
Sergiu Deitsch 3c3400342b Fix docs typo
Change-Id: Ib3967dc7413455ccb2a1211d892fd1150514522a
2025-06-09 15:20:17 +02:00
Sergiu Deitsch f0720aeb84 Raise minimum required Eigen version to 3.3.4
Ubuntu 22.04 ships with Eigen 3.4.0. The MinGW workaround for -O3
related crashes has been available in Eigen since at least version
3.2.0, see https://gitlab.com/libeigen/eigen/-/commit/cc03c9d68354ea3fed03481de045c185ddc1fc49.

Change-Id: Iebfd6ed1fa55a6b0f5bd57bd920188e7b486d8cb
2025-02-17 17:07:27 -08:00
Sergiu Deitsch fc3699d675 Cleanup Sphinx config
Change-Id: Iea63ec709fda82685c5f484d643627213cdc1496
2025-02-17 07:42:57 -08:00
Sergiu Deitsch 533bcfd694 Avoid incorrect member reference warning
Change-Id: I6f1b271c3a7b805dd4e539d0d44e2cbc626ef1f7
2025-02-17 07:41:21 -08:00
Sergiu Deitsch f86747f66d Remove unreferenced footnote
Change-Id: I6988ef4f0c6a98c7cbf44a45c3c11c81ab26466e
2025-02-17 11:20:54 +01:00
Sergiu Deitsch 018bb49e80 Use subsections instead of an enumeration for FAQs
Change-Id: I37c1256417240bf7decec1f756df8a8402f5c586
2025-02-16 15:35:49 -08:00
Sergiu Deitsch 80e466994b Fix FAQs spelling
Change-Id: I53f69875cc8e82e39602f0aae80e30d456c933c1
2025-02-16 15:35:04 -08:00
Sergiu Deitsch 3fb154795d Use console syntax highlighting for application output
Change-Id: I75c5a4bef55416e456528fde5485264c8c7545aa
2025-02-16 15:34:34 -08:00
Sergiu Deitsch d1c79cbd1c Fix docs indent
Change-Id: I4cc8bfb1883439cf91322e6383fb5107e31cc7d4
2025-02-16 15:34:04 -08:00
Sameer Agarwal 07651df0ad Partially update the installation docs
1. Update dependencies
2. Mention submodules

Change-Id: I2f238c92a3a1eeee3277e3ec6f973fc2d50fe008
2024-09-15 15:00:25 -07:00
Sameer Agarwal 8f1b6123ad GradientProblem & related classes use std::unique_ptr
Previously these classes in analogy with ceres::Problem's interface
had interfaces to allow bare pointers as well as unique_ptrs. This
CL changes the API to always use unique_ptr, this is less error prone
and makes the default ownership semantics clearer.

Change-Id: I7577a90761f341c7e009c248c820f0fec2e6f32d
2024-09-15 21:57:23 +00:00
Ian Muldoon ea4400cd57 Update reference from Project Tango to ARCore
Change-Id: Idcba8afc980561bfc9444c375f573e388a53e85f
2024-09-05 10:23:05 -07:00
Sameer Agarwal 80fce72bfd Add mixed precision solves for SUITE_SPARSE
Starting with SuiteSparse version 7.4.0 CHOLMOD has support for single
precision matrices. This allows us to have single precision and mixed
precision solves when using the SUITE_SPARSE backend.

This CL also fixes sparse_cholesky_test which was completely broken for
single precision testing.

Sample performance on my Mac.
/usr/bin/time -l ./bin/bundle_adjuster --input=../../Downloads/problem-3068-310854-pre.txt
<SNIP>

Cost:
Initial                          9.099334e+07
Final                            4.161838e+06
Change                           8.683150e+07

Minimizer iterations                        6
Successful steps                            4
Unsuccessful steps                          2

Time (in seconds):
Preprocessor                         2.528222

  Residual only evaluation           0.142804 (5)
  Jacobian & residual evaluation     0.424014 (4)
  Linear solver                     54.083396 (5)
Minimizer                           54.895752

Postprocessor                        0.024564
Total                               57.448539

Termination:                   NO_CONVERGENCE (Maximum number of iterations reached. Number of iterations: 5.)

       59.04 real       341.24 user         5.49 sys
          5776375808  maximum resident set size
<SNIP>
        616329634071  instructions retired
        929475980510  cycles elapsed
          5375034560  peak memory footprint

/usr/bin/time -l ./bin/bundle_adjuster --input=../../Downloads/problem-3068-310854-pre.txt  -mixed_precision_solves
<SNIP>

Cost:
Initial                          9.099334e+07
Final                            4.148930e+06
Change                           8.684441e+07

Minimizer iterations                        6
Successful steps                            4
Unsuccessful steps                          2

Time (in seconds):
Preprocessor                         2.580217

  Residual only evaluation           0.144098 (5)
  Jacobian & residual evaluation     0.396723 (4)
  Linear solver                     23.636074 (5)
Minimizer                           24.427163

Postprocessor                        0.023790
Total                               27.031170

Termination:                   NO_CONVERGENCE (Maximum number of iterations reached. Number of iterations: 5.)

       28.58 real       128.53 user         2.37 sys
          4818386944  maximum resident set size
<SNIP>
        395186936091  instructions retired
        368802808856  cycles elapsed
          4327029824  peak memory footprint

Change-Id: I1f137b0dd12da8da7f9ced338dd8f20f4bbdf99d
2024-08-24 21:12:54 -07:00
Sameer Agarwal 8f85014dcf Change the version from 2.2.0 to 2.3.0
The dependencies and the API have changed enough that
it is worth incrementing the version number.

Change-Id: I4e2911a91988d97f47320c56072ad1546e20030b
2024-08-24 09:29:51 -07:00
Sameer Agarwal 1b2ebabf5d Typo fixes in the documentation
Contributed by @sarlinpe

Change-Id: I26435bbcb4b99886c7df76cfb798fcf13589db2d
2024-01-30 09:11:24 -08:00
MaximSmolskiy 2ffeb943ad Fix typo in AutoDiffManifold comment and docs
Change-Id: I0b50e3e10661578e68f713e34a59f65b3692e745
2024-01-29 03:19:37 +03:00
Sergiu Deitsch 91773746be Simplify instantiation of cost functions and their functors
If arguments are passed to a cost function that can be used to construct
the functor, the latter will be instantiated by the cost function using
std::make_unique to ensure exception safety. This not only avoids static
analysis warnings caused by calling new but also spelling the cost
functor type name multiple times.

Also expand deduction guides for instantiating
Dynamic(Auto|Numeric)DiffCostFunction from std::unique_ptr enabled
constructor overloads.

Finally, make CostFunction default move constructible and assignable but
only through derived classes. This in turn allows derived classes to be
movable without relying on custom implementations of corresponding
operators.

Change-Id: Idee8b9871d862bc9f9f8b5a8d0bedc52863e93c0
2024-01-23 01:34:27 +01:00
Sameer Agarwal 7749737319 Fix search on ceres-solver.org
Thanks to Roger Labbe for reporting this and Sergiu Deitsch for
debugging it

Change-Id: I7f53b339a1e4d6862b341c60bcf81b77770052bf
2023-10-13 14:26:12 -07:00
Sameer Agarwal 85331393dc Update docs for 2.2.0.
Change-Id: Ib8fd3918d7bfda52212aa02c3c7573eb4dace270
2023-10-12 18:12:09 -07:00
Dmitriy Korchemkin 611b139b1b Fix Solver::Options::callbacks type in documentation
Change-Id: I66374bd1b45670a1bcd5924287d855d9c44826e2
2023-10-11 14:30:10 +00:00
Sameer Agarwal 76af132d02 Update docs for 2.2.0RC3
Change-Id: I56a7ac2fdc33293c5abb3685de21811caa37997c
2023-10-09 08:59:17 -07:00
Sameer Agarwal a9b3fcff42 Minor update to docs
Change-Id: I886f5aa1614f66b57d7fa33233afca9bb7fabb72
2023-10-05 09:12:33 -07:00
Sameer Agarwal c8bed4b932 Update version_history for 2.2.0rc2
Change-Id: I5ab74706e699f74213a78ee7ccb2389a5c44034e
2023-09-30 16:02:23 -07:00
Sameer Agarwal 8e3b7d89e4 Fix a copy-pasta error
Change-Id: I2f7f7e98364f3f28245e5c379c7fe143c21d825b
2023-09-29 14:54:34 -07:00
Sameer Agarwal dc0bb8508c Various cleanups to the documentation
Fixes https://github.com/ceres-solver/ceres-solver/issues/208

Change-Id: I62c575b646260f801c95188910910ecf441fa9ac
2023-09-29 14:01:42 -07:00
Sameer Agarwal 4588b0fbbf Add an example for EvaluationCallback
Change-Id: Ia488f8b181118c8d07861149c4bd52f7217336ce
2023-09-28 21:49:32 +00:00
Sameer Agarwal 59182a42c3 Update documentation
Update the linear solver documentation thoroughly as it had
bit rotted and was flat out wrong in some places and incomplete
in others.

https://github.com/ceres-solver/ceres-solver/issues/865
https://github.com/ceres-solver/ceres-solver/issues/862

Change-Id: Ic395efabd0589a401e2b971c45869bd881b68a34
2023-09-27 09:27:29 -07:00
Sameer Agarwal d4db6e6fe6 Fix typos in the documentation for EvaluationCallback
https: //github.com/ceres-solver/ceres-solver/issues/953
Change-Id: I6631c152f794c9492e527ceff11d7d9e598b92f8
2023-09-27 09:23:46 -07:00
Sameer Agarwal 5a30cae583 Preparing for 2.2.0rc1
1. Add a version history
2. Update copyright years across the code base
3. Run format_all.sh
4. Update version strings from 2.1.0 to 2.2.0 in the docs and
   elsewhere.

Change-Id: I46d8d479d54bd6002d532785e67342106e73c9ac
2023-09-21 11:23:38 -07:00
Sergiu Deitsch a1c02e8d37 Rework the Sphinx find module
* Make sphinx_rtd_theme a find module component to avoid hard-wiring it
  into the module and allowing to report the theme in case it is missing
  using the standard CMake package mechanism.
* Adjust find module cache variables names case to match the find module
  name.
* Also report sphinx-build version for completeness.
* Invoke the find module only once. Calling find_package on the same
  module is not needed.

Change-Id: I9d1bf0fcc0d44b9b37e624128812f348c5442ada
2023-09-12 20:51:48 +02:00
Sergiu Deitsch a57e35bbab Require at least CMake 3.16
Given we no longer support Ubuntu 18.04 due to packaged GCC lacking
C++17 support we can bump the minimum required CMake version to the one
provided by Ubuntu 20.04 which is CMake 3.16. Consequently, this allows
to drop some of the legacy CMake logic.

Change-Id: I1f05d4c5681d10aa7faa0800ef4a803be2f5b7dd
2023-09-12 19:33:00 +02:00
MaximSmolskiy ed9921fc24 Fix Solver::Options in documentation
Change-Id: Ia01fdba7561aac539ce96f09b3d404cbe061de11
2023-08-29 05:53:36 +03:00
MaximSmolskiy 5f97455bea Fix typos in documentation
Change-Id: I1d39fe777c87d3480bc403ec4602dd2dd9284839
2023-08-20 20:42:05 +03:00
MaximSmolskiy 908b5b1b53 Fix type mismatch in documentation
Change-Id: Ief4d6a5039ea7af6f0b318df5146abe804611ca3
2023-07-16 00:49:42 +03:00
Dmitriy Korchemkin 54ad3dd03c Reorganize ParallelFor source files
Change-Id: Ic4941919e59210b48e447cbb61e539200c8c89df
2023-04-11 00:33:55 +03:00
MaximSmolskiy 3cdfae110f Replace Hertzberg mentions with citations
Change-Id: Ife1b9c2b321593912bc18a5c57c39fbda27da51f
2023-03-04 04:10:45 +03:00
MaximSmolskiy 0af38a9fc2 Fix typos in documentation
Change-Id: I748c9c3d6cd1c5906daa9f68aea92d8ad536bf3b
2023-03-04 03:56:54 +03:00
MaximSmolskiy 4c969a6c1c Improve image of loss functions shape
Change-Id: Id226323a736038fb3c9b9009448e5ece12dc63ee
2023-03-03 04:07:01 +03:00
MaximSmolskiy b54f05b8ee Add missing TukeyLoss to documentation
Change-Id: I0b0a84c0a21b672f0414eb6b2283bb27e06cd266
2023-03-03 00:19:51 +03:00
Alex Stewart ccf32d70c7 Purge all remaining references to (defunct) LocalParameterization
Change-Id: Iad2a49bfa6916c22929d822e07f754ef77ed023d
2022-10-19 20:00:20 +01:00
Sergiu Deitsch 79e403b15c Expand vcpkg installation instructions
Change-Id: Iad83869b1411b126beb26cfbbf5f6e9f717ff591
2022-08-13 19:04:17 +02:00
Sameer Agarwal 6483a2b4c2 Add Sergiu's name to the list of maintainers
Change-Id: I2e8c6af08bf6b718ab81e84a77df6f72592a954b
2022-08-09 15:23:30 -07:00
Sameer Agarwal c801192d47 Minor fixes
Change-Id: I4c825bbd19b2d902d17dce37d228e23a808c87fb
2022-07-18 06:43:12 -07:00
Joydeep Biswas 88e08cfe71 Mixed-precision Iterative Refinement Cholesky With CUDA
* Created a new class CUDADenseCholeskyMixedPrecision, which performs
  Cholesky factorization and solving in single (fp32) precision, and
  optionally performs iterative refinement.
* Added CUDA kernels for mixed-precision solve operations
* Added more detailed timing information to the FullReport about Schur
  elimination, reduced system solves, and back-substitution.

Some test performance numbers follow.
All tests were performed on an Ubuntu 20.04 desktop with an
Intel Core i9-9940X CPU and Nvidia Quadro RTX 6000 GPU.

Tests were launched as:
./bin/bundle_adjuster --input (problem_file) \
    --num_iterations 20
    --num_threads 28
    --linear_solver dense_schur
    --dense_linear_algebra_library (cuda|lapack)
    [--mixed_precision_solves]

==================================================
problem-21-11315-pre.txt
==================================================

--------------------------------------------------
Cuda Mixed Precision
--------------------------------------------------
Cost:
Initial                          4.413239e+06
Final                            3.037864e+04
Change                           4.382861e+06
  Linear solver                      0.250703 (14)
  ├ Schur eliminate                  0.234025 (14)
  ├ Reduced solve                    0.006643 (14)
  └ Backsubstitute                   0.006598 (12)

--------------------------------------------------
Cuda
--------------------------------------------------
Cost:
Initial                          4.413239e+06
Final                            3.037864e+04
Change                           4.382861e+06
  Linear solver                      0.257517 (12)
  ├ Schur eliminate                  0.233518 (12)
  ├ Reduced solve                    0.010621 (12)
  └ Backsubstitute                   0.007124 (12)

--------------------------------------------------
Lapack (OpenBLAS)
--------------------------------------------------
Cost:
Initial                          4.413239e+06
Final                            3.037864e+04
Change                           4.382861e+06
  Linear solver                      0.332349 (12)
  ├ Schur eliminate                  0.274748 (12)
  ├ Reduced solve                    0.015966 (12)
  └ Backsubstitute                   0.034192 (12)

==================================================
problem-257-65132-pre.txt
==================================================

--------------------------------------------------
Cuda Mixed Precision
--------------------------------------------------
Cost:
Initial                          2.456242e+07
Final                            9.677593e+04
Change                           2.446565e+07
  Linear solver                      1.332367 (20)
  ├ Schur eliminate                  1.021365 (20)
  ├ Reduced solve                    0.195472 (20)
  └ Backsubstitute                   0.075582 (20)

--------------------------------------------------
Cuda
--------------------------------------------------
Cost:
Initial                          2.456242e+07
Final                            9.677547e+04
Change                           2.446565e+07
  Linear solver                      1.810176 (20)
  ├ Schur eliminate                  1.012862 (20)
  ├ Reduced solve                    0.678704 (20)
  └ Backsubstitute                   0.083925 (20)

--------------------------------------------------
Lapack (OpenBLAS)
--------------------------------------------------
Cost:
Initial                          2.456242e+07
Final                            9.677547e+04
Change                           2.446565e+07
  Linear solver                      2.376273 (20)
  ├ Schur eliminate                  0.987613 (20)
  ├ Reduced solve                    1.043873 (20)
  └ Backsubstitute                   0.310402 (20)

==================================================
problem-744-543562-pre.txt
==================================================

--------------------------------------------------
Cuda Mixed Precision
--------------------------------------------------
Cost:
Initial                          1.434881e+08
Final                            1.546895e+06
Change                           1.419412e+08
  Linear solver                     27.010088 (20)
  ├ Schur eliminate                 24.362433 (20)
  ├ Reduced solve                    1.428542 (20)
  └ Backsubstitute                   0.814266 (20)

--------------------------------------------------
Cuda
--------------------------------------------------
Cost:
Initial                          1.434881e+08
Final                            1.546895e+06
Change                           1.419412e+08
  Linear solver                     32.342513 (20)
  ├ Schur eliminate                 24.638819 (20)
  ├ Reduced solve                    6.492090 (20)
  └ Backsubstitute                   0.802184 (20)

--------------------------------------------------
Lapack (OpenBLAS)
--------------------------------------------------
Cost:
Initial                          1.434881e+08
Final                            1.546895e+06
Change                           1.419412e+08
  Linear solver                     34.152224 (20)
  ├ Schur eliminate                 24.183723 (20)
  ├ Reduced solve                    8.784413 (20)
  └ Backsubstitute                   0.795044 (20)

Change-Id: I178887e776d8f4a1e8abb99bbc205bf8c278bf79
2022-07-13 06:55:31 -05:00
Sameer Agarwal b4803778c3 Update documentation for linear_solver_ordering_type
Also update obsolete documentation related to building and
using sparse linear algebra libraries.

Change-Id: I83682b43472e6a6ec4e4dad32fa21c089d518c06
2022-06-07 14:08:26 -07:00