Blob Blame History Raw


<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Why? &mdash; Ceres Solver</title>
  

  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="Ceres Solver" href="index.html"/>
        <link rel="next" title="Installation" href="installation.html"/>
        <link rel="prev" title="Ceres Solver" href="index.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="index.html" class="icon icon-home"> Ceres Solver
          

          
          </a>

          
            
            
              <div class="version">
                1.13
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
                <ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Why?</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="derivatives.html">On Derivatives</a></li>
<li class="toctree-l1"><a class="reference internal" href="nnls_modeling.html">Modeling Non-linear Least Squares</a></li>
<li class="toctree-l1"><a class="reference internal" href="nnls_solving.html">Solving Non-linear Least Squares</a></li>
<li class="toctree-l1"><a class="reference internal" href="nnls_covariance.html">Covariance Estimation</a></li>
<li class="toctree-l1"><a class="reference internal" href="gradient_solver.html">General Unconstrained Minimization</a></li>
<li class="toctree-l1"><a class="reference internal" href="faqs.html">FAQS, Tips &amp; Tricks</a></li>
<li class="toctree-l1"><a class="reference internal" href="users.html">Users</a></li>
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="version_history.html">Version History</a></li>
<li class="toctree-l1"><a class="reference internal" href="bibliography.html">Bibliography</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="index.html">Ceres Solver</a>
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          

 



<div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="index.html">Docs</a> &raquo;</li>
      
    <li>Why?</li>
      <li class="wy-breadcrumbs-aside">
        
          
        
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="why">
<h1>Why?<a class="headerlink" href="#why" title="Permalink to this headline">ΒΆ</a></h1>
<ul class="simple" id="chapter-features">
<li><strong>Code Quality</strong> - Ceres Solver has been used in production at
Google for more than four years now. It is clean, extensively tested
and well documented code that is actively developed and supported.</li>
<li><strong>Modeling API</strong> - It is rarely the case that one starts with the
exact and complete formulation of the problem that one is trying to
solve. Ceres&#8217;s modeling API has been designed so that the user can
easily build and modify the objective function, one term at a
time. And to do so without worrying about how the solver is going to
deal with the resulting changes in the sparsity/structure of the
underlying problem.<ul>
<li><strong>Derivatives</strong> Supplying derivatives is perhaps the most tedious
and error prone part of using an optimization library.  Ceres
ships with <a class="reference external" href="http://en.wikipedia.org/wiki/Automatic_differentiation">automatic</a> and <a class="reference external" href="http://en.wikipedia.org/wiki/Numerical_differentiation">numeric</a> differentiation. So you
never have to compute derivatives by hand (unless you really want
to). Not only this, Ceres allows you to mix automatic, numeric and
analytical derivatives in any combination that you want.</li>
<li><strong>Robust Loss Functions</strong> Most non-linear least squares problems
involve data. If there is data, there will be outliers. Ceres
allows the user to <em>shape</em> their residuals using a
<code class="xref py py-class docutils literal"><span class="pre">LossFunction</span></code> to reduce the influence of outliers.</li>
<li><strong>Local Parameterization</strong> In many cases, some parameters lie on a
manifold other than Euclidean space, e.g., rotation matrices. In
such cases, the user can specify the geometry of the local tangent
space by specifying a <code class="xref py py-class docutils literal"><span class="pre">LocalParameterization</span></code> object.</li>
</ul>
</li>
<li><strong>Solver Choice</strong> Depending on the size, sparsity structure, time &amp;
memory budgets, and solution quality requiremnts, different
optimization algorithms will suit different needs. To this end,
Ceres Solver comes with a variety of optimization algorithms:<ul>
<li><strong>Trust Region Solvers</strong> - Ceres supports Levenberg-Marquardt,
Powell&#8217;s Dogleg, and Subspace dogleg methods. The key
computational cost in all of these methods is the solution of a
linear system. To this end Ceres ships with a variety of linear
solvers - dense QR and dense Cholesky factorization (using
<a class="reference external" href="http://eigen.tuxfamily.org/">Eigen</a> or <a class="reference external" href="http://www.netlib.org/lapack/">LAPACK</a>) for dense problems, sparse Cholesky
factorization (<a class="reference external" href="http://www.cise.ufl.edu/research/sparse/SuiteSparse/">SuiteSparse</a>, <a class="reference external" href="https://www.cise.ufl.edu/research/sparse/CXSparse/">CXSparse</a> or <a class="reference external" href="http://eigen.tuxfamily.org/">Eigen</a>) for large
sparse problems custom Schur complement based dense, sparse, and
iterative linear solvers for <a class="reference external" href="http://en.wikipedia.org/wiki/Bundle_adjustment">bundle adjustment</a> problems.</li>
<li><strong>Line Search Solvers</strong> - When the problem size is so large that
storing and factoring the Jacobian is not feasible or a low
accuracy solution is required cheaply, Ceres offers a number of
line search based algorithms. This includes a number of variants
of Non-linear Conjugate Gradients, BFGS and LBFGS.</li>
</ul>
</li>
<li><strong>Speed</strong> - Ceres Solver has been extensively optimized, with C++
templating, hand written linear algebra routines and OpenMP based
multithreading of the Jacobian evaluation and the linear solvers.</li>
<li><strong>Solution Quality</strong> Ceres is the <a class="reference external" href="https://groups.google.com/forum/#!topic/ceres-solver/UcicgMPgbXw">best performing</a> solver on the NIST
problem set used by Mondragon and Borchers for benchmarking
non-linear least squares solvers.</li>
<li><strong>Covariance estimation</strong> - Evaluate the sensitivity/uncertainty of
the solution by evaluating all or part of the covariance
matrix. Ceres is one of the few solvers that allows you to to do
this analysis at scale.</li>
<li><strong>Community</strong> Since its release as an open source software, Ceres
has developed an active developer community that contributes new
features, bug fixes and support.</li>
<li><strong>Portability</strong> - Runs on <em>Linux</em>, <em>Windows</em>, <em>Mac OS X</em>, <em>Android</em>
<em>and iOS</em>.</li>
<li><strong>BSD Licensed</strong> The BSD license offers the flexibility to ship your
application</li>
</ul>
</div>


           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="installation.html" class="btn btn-neutral float-right" title="Installation" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="index.html" class="btn btn-neutral" title="Ceres Solver" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016 Google Inc.

    </p>
  </div> 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'1.13.0',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>
      <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
      MathJax.Hub.Config({
          "HTML-CSS": {
            availableFonts: ["TeX"]
          }
        });
      </script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
  
 
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-49769510-1', 'ceres-solver.org');
  ga('send', 'pageview');
</script>


</body>
</html>