Why does the Jacobian always have onl 6 columns?

47 views
Skip to first unread message

Diego Coelho

unread,
Jun 15, 2016, 5:01:00 PM6/15/16
to Ceres Solver
Hi All

I am studying and trying to modify some Ceres linear system solver routines for bundle adjustment problems. During my investigation, I noticed that every time I call ceres with SPARSE_NORMAL_CHOLESKY option, the Jacobian have only six columns. Why that is happening? The Jacobian is supposed to have as much columns as the number of parameters of the associated minimization problem (usually way more than 6). But it is not clear to me why it is just 6 (both Jacobian columns and parameters).

But if I ran with other option, for example, DENSE_SCHUR, the number of parameters is way more than 6.

Best,
D.

Sameer Agarwal

unread,
Jun 15, 2016, 5:02:58 PM6/15/16
to Ceres Solver
check to see how many parameters are constant and how many are variable.
This information should be visible in the output of Summary::FullReport. 
Guessing from the fact that you are seeing six parameters, I think you are seeing some camera pose estimation problems being solved. OpenMVG solves a number of different optimization problems of different sizes when doing 3d reconstruction. Large bundle adjustment is just one of them.
Sameer


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/5a186720-7d06-456d-a39d-8f5ffd6aecb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Diego Coelho

unread,
Jun 15, 2016, 5:23:40 PM6/15/16
to Ceres Solver
Hi Sameer,

Many thanks. I checked full report. I noticed that every time that ceres execute with SPARSE_NORMAL_CHOLESKY the number of reduced parameters is always 6. For example, in one of the executions I have 5958 parameters, which are reduced to 6. Is it always the case for BA problems with SPARSE_NORMAL_CHOLESKY? See one copy of a part of full report below.


Solver Summary (v 1.12.0-eigen-(3.2.8)-lapack-suitesparse-(4.4.6)-openmp)

                                     Original                  Reduced
Parameter blocks                         1984                        1
Parameters                               5958                        6
Residual blocks                          1982                     1982
Residual                                 3964                     3964

Minimizer                        TRUST_REGION

Sparse linear algebra library    SUITE_SPARSE
Trust region strategy     LEVENBERG_MARQUARDT

                                        Given                     Used
Linear solver          SPARSE_NORMAL_CHOLESKY   SPARSE_NORMAL_CHOLESKY
Threads                                     4                        4
Linear solver threads                       4                        4

Cost:
Initial                          1.856405e+04
Final                            1.203406e+04
Change                           6.529985e+03

Minimizer iterations                        3
Successful steps                            3
Unsuccessful steps                          0

Time (in seconds):
Preprocessor                           0.0008

  Residual evaluation                  0.0067
  Jacobian evaluation                  0.0052
  Linear solver                        0.0821
Minimizer                              0.0978

Postprocessor                          0.0001
Total                                  0.0987

Termination:                      CONVERGENCE (Function tolerance reached. |cost_change|/cost: 5.108553e-09 <= 1.000000e-06)

Sameer Agarwal

unread,
Jun 15, 2016, 5:25:02 PM6/15/16
to Ceres Solver
It is most likely that all these parameter blocks are in the problem but they are constant.

Diego Coelho

unread,
Jun 15, 2016, 7:15:35 PM6/15/16
to Ceres Solver
Hi Sameer,

You are right. I made an experiment changing from SPARSE_NORMAL_CHOLESKY to SPARSE_SCHUR and I got the same number of reduced parameters.

Best,
D. 
Reply all
Reply to author
Forward
0 new messages