siposcsaba89 / ocam-calib-cpp

Omnidirectional camera calibration implementation c++
38 stars 21 forks source link

How can I get "calib_data.ocam_model.c", "calib_data.ocam_model.d" and "calib_data.ocam_model.e"? #5

Open weseu0131 opened 1 year ago

weseu0131 commented 1 year ago

In Matlab tool, It can calculate parameter c,d and e. Did you know how to get it?

weseu0131 commented 1 year ago

I try to do it by myself. But I get a error "trust_region_minimizer.cc:72] Terminating: Residual and Jacobian evaluation failed." when I run "ceres::Solve(options, &problem, &summary);". image

siposcsaba89 commented 1 year ago

Hi, sorry for the late reply. Those parameters are not calculated currently but they are usually very close to c=1, d=0 and e=0 for fisheye cameras.

weseu0131 commented 1 year ago

Thank you for your reply. But why did I get the error "trust_region_minimizer.cc:72] Terminating: Residual and Jacobian evaluation failed." when I run "ceres::Solve(options, &problem, &summary);". Did you have any idea? image

the following image is about the"summary.FullReport()".

Solver Summary (v 1.14.0-eigen-(3.3.9)-no_lapack-eigensparse-openmp-no_tbb)

                                 Original                  Reduced

Parameter blocks 1 1 Parameters 7 7 Residual blocks 1 1 Residuals 1 1

Minimizer TRUST_REGION

Dense linear algebra library EIGEN Trust region strategy LEVENBERG_MARQUARDT

                                    Given                     Used

Linear solver DENSE_SCHUR DENSE_SCHUR Threads 1 1 Linear solver ordering AUTOMATIC 1 Schur structure 1,7,0 d,d,d

Cost: Initial -1.000000e+00

Minimizer iterations 0 Successful steps 0 Unsuccessful steps 0

Time (in seconds): Preprocessor 0.000220

Residual only evaluation 0.000000 (0) Jacobian & residual evaluation 0.154436 (1) Linear solver 0.000000 (0) Minimizer 0.155279

Postprocessor 0.000041 Total 0.155540

Termination: FAILURE (Residual and Jacobian evaluation failed.)

weseu0131 commented 1 year ago

I find the error "Termination: FAILURE (Residual and Jacobian evaluation failed.)". If I try to refine the parameter of ss[4], I will get the error. The error come from "Newton's method for finding roots". If I just refine ss[0] to ss[3], it will be fine. Did you have any idea? image