--
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/c319208d-4290-4418-b1bb-6f4ed2d01b80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
1.67332e+13
Ceres Solver Report: Iterations: 0, Initial cost: 3.979339e+00, Final cost: 3.979339e+00, Termination: CONVERGENCE
double B_start[6] = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0};
Problem problem;
CostFunction* cost_function =
new NumericDiffCostFunction<Objfun, CENTRAL, 1, 6>(new Objfun(mtx1, mtx2),
TAKE_OWNERSHIP);
problem.AddResidualBlock(cost_function,
new CauchyLoss(0.5),
B_start);
Solver::Options options;
options.linear_solver_type = ceres::DENSE_QR;
options.minimizer_progress_to_stdout = true;
Solver::Summary summary;
Solve(options, &problem, &summary);
std::cout << summary.BriefReport() << "\n";
bool operator()(const double* const B,
double* residual) const {
residual[0] = findDistance(_mtx1, _mtx2, B);
return true;
}
--
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/270f7fd9-5ae2-4417-a11c-d7ca901387d8%40googlegroups.com.
Original Reduced
Parameter blocks 1 1
Parameters 6 6
Residual blocks 1 1
Residual 1 1
Minimizer TRUST_REGION
Dense linear algebra library EIGEN
Trust region strategy LEVENBERG_MARQUARDT
Given Used
Linear solver DENSE_QR DENSE_QR
Threads 1 1
Linear solver threads 1 1
Cost:
Initial 3.979339e+00
Final 3.979339e+00
Change 0.000000e+00
Minimizer iterations 0
Successful steps 0
Unsuccessful steps 0
Time (in seconds):
Preprocessor 0.0001
Residual evaluation 0.0000
Jacobian evaluation 0.0084
Linear solver 0.0000
Minimizer 0.0084
Postprocessor 0.0000
Total 0.0085
Termination: CONVERGENCE (Gradient tolerance reached. Gradient max norm: 0.000000e+00 <= 1.000000e-10)
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/270f7fd9-5ae2-4417-a11c-d7ca901387d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUDSM5%2BT8XBXDtPF5BdxHpHetpwHYMpDYynA-ou5kPmgDw%40mail.gmail.com.
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/270f7fd9-5ae2-4417-a11c-d7ca901387d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUDSM5%2BT8XBXDtPF5BdxHpHetpwHYMpDYynA-ou5kPmgDw%40mail.gmail.com.
--
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/CACWOBK6J8AAEFuii%3DP6DZH6hZw_25QYbW3rCsj3cnRSN2Cg7hw%40mail.gmail.com.
"
iter cost cost_change |gradient| |step| tr_ratio tr_radius ls_iter iter_time total_time
0 2.933624e+00 0.00e+00 1.43e+00 0.00e+00 0.00e+00 1.00e+04 0 7.11e-03 7.20e-03
1 2.933624e+00 -8.95e-01 0.00e+00 7.80e-01 -7.16e+00 5.00e+03 1 6.65e-04 7.89e-03
2 2.933624e+00 -8.95e-01 0.00e+00 7.80e-01 -7.16e+00 1.25e+03 1 6.01e-04 8.50e-03
3 2.933624e+00 -8.95e-01 0.00e+00 7.80e-01 -7.16e+00 1.56e+02 1 6.00e-04 9.11e-03
4 2.933624e+00 -8.94e-01 0.00e+00 7.79e-01 -7.15e+00 9.77e+00 1 5.97e-04 9.71e-03
5 2.933624e+00 -8.83e-01 0.00e+00 7.67e-01 -7.07e+00 3.05e-01 1 5.98e-04 1.03e-02
6 2.933624e+00 -6.07e-01 0.00e+00 5.04e-01 -5.55e+00 4.77e-03 1 5.97e-04 1.09e-02
7 2.930928e+00 2.70e-03 1.46e+00 2.17e-02 3.93e-01 4.72e-03 1 7.74e-03 1.87e-02
8 2.925629e+00 5.30e-03 1.28e+00 1.04e-02 7.80e-01 5.73e-03 1 7.89e-03 2.66e-02
9 2.923932e+00 1.70e-03 1.51e+00 1.61e-02 2.08e-01 4.77e-03 1 9.14e-03 3.57e-02
10 2.918368e+00 5.56e-03 1.48e+00 8.09e-03 8.11e-01 6.28e-03 1 7.89e-03 4.36e-02
11 2.918368e+00 -4.77e-02 0.00e+00 7.35e-02 -5.35e+00 3.14e-03 1 6.03e-04 4.43e-02
12 2.918368e+00 -1.11e-02 0.00e+00 3.74e-02 -2.43e+00 7.85e-04 1 5.99e-04 4.49e-02
13 2.918188e+00 1.79e-04 1.40e+00 9.49e-03 1.53e-01 5.89e-04 1 7.65e-03 5.25e-02
14 2.917306e+00 8.82e-04 1.45e+00 2.47e-03 1.00e+00 1.77e-03 1 7.63e-03 6.02e-02
15 2.917306e+00 -3.96e-01 0.00e+00 1.71e-01 -1.80e+02 8.83e-04 1 5.99e-04 6.08e-02
16 2.917306e+00 -1.14e-01 0.00e+00 8.59e-02 -1.02e+02 2.21e-04 1 5.98e-04 6.14e-02
17 2.917306e+00 -6.09e-03 0.00e+00 2.16e-02 -2.18e+01 2.76e-05 1 6.01e-04 6.20e-02
18 2.917306e+00 -6.32e-05 0.00e+00 2.70e-03 -1.81e+00 1.72e-06 1 5.97e-04 6.26e-02
Solver Summary (v 1.11.0-eigen-(3.2.9)-lapack-suitesparse-(4.5.3)-cxsparse-(3.1.9)-no_openmp)
Original Reduced
Parameter blocks 1 1
Parameters 6 6
Residual blocks 1 1
Residual 1 1
Minimizer TRUST_REGION
Dense linear algebra library EIGEN
Trust region strategy LEVENBERG_MARQUARDT
Given Used
Linear solver DENSE_QR DENSE_QR
Threads 1 1
Linear solver threads 1 1
Cost:
Initial 2.933624e+00
Final 2.917306e+00
Change 1.631806e-02
Minimizer iterations 18
Successful steps 6
Unsuccessful steps 12
Time (in seconds):
Preprocessor 0.0001
Residual evaluation 0.0113
Jacobian evaluation 0.0514
Linear solver 0.0001
Minimizer 0.0631
Postprocessor 0.0000
Total 0.0632
Termination: CONVERGENCE (Function tolerance reached. |cost_change|/cost: 5.499025e-07 <= 1.000000e-06)
"
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/270f7fd9-5ae2-4417-a11c-d7ca901387d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUDSM5%2BT8XBXDtPF5BdxHpHetpwHYMpDYynA-ou5kPmgDw%40mail.gmail.com.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CACWOBK6J8AAEFuii%3DP6DZH6hZw_25QYbW3rCsj3cnRSN2Cg7hw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUDfZwODvB4Jg9z0ovuGaiQ_dfM%2BYpfX6Xe_31e6H6k4Lg%40mail.gmail.com.
Two questions:1. how is "ceres-solver" different from Matlab's "lsqnonlin"? I used the same input and user-defined evaluation functions, the results are quite different.
2. Can I specify the maximum number of iterations? or the evaluation model (e.g., Jacobian), or tolerance value to stop iteration?
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/270f7fd9-5ae2-4417-a11c-d7ca901387d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUDSM5%2BT8XBXDtPF5BdxHpHetpwHYMpDYynA-ou5kPmgDw%40mail.gmail.com.
--
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/CACWOBK6J8AAEFuii%3DP6DZH6hZw_25QYbW3rCsj3cnRSN2Cg7hw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUDfZwODvB4Jg9z0ovuGaiQ_dfM%2BYpfX6Xe_31e6H6k4Lg%40mail.gmail.com.
--
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/CACWOBK5dPNmeHD%2B57oVoumALZtkkXMPeBMQr-Jypz36VOYXB%3DQ%40mail.gmail.com.
Miaoqi,
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/270f7fd9-5ae2-4417-a11c-d7ca901387d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUDSM5%2BT8XBXDtPF5BdxHpHetpwHYMpDYynA-ou5kPmgDw%40mail.gmail.com.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CACWOBK6J8AAEFuii%3DP6DZH6hZw_25QYbW3rCsj3cnRSN2Cg7hw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUDfZwODvB4Jg9z0ovuGaiQ_dfM%2BYpfX6Xe_31e6H6k4Lg%40mail.gmail.com.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CACWOBK5dPNmeHD%2B57oVoumALZtkkXMPeBMQr-Jypz36VOYXB%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUBJvUqy%2BoqgQRbdb82zawe4mOmGC6z64NBhRfthGkVboQ%40mail.gmail.com.
<p class="gmail-
---------------------------------------------------------------------
Software 1:
0.693995 0.235209 0.0707957
0.0578681 1.06262 -0.120487
0.0303731 -0.13349 1.10312
Software 2:
0.7147 0.2166 0.0687
0.0613 1.0690 -0.1303
0.0391 -0.1520 1.1129
Ceres-solver (LINEAR_SEARCH):
0.785592 0.123477 0.090931
0.161999 1.023926 -0.185925
0.054799 -0.142472 1.087673
Ceres-solver (TRUST_REGION):
0.991713 0.003293 0.004995
0.004799 1.010738 -0.015537
0.005578 -0.006325 1.000747
---------------------------------------------------------------------
options.linear_solver_type = ceres::DENSE_QR;
options.minimizer_progress_to_stdout = false;
options.parameter_tolerance = 1e-17;
options.gradient_tolerance = 1e-17;
options.function_tolerance = 1e-17;
options.max_num_iterations = 100;
options.minimizer_type = LINE_SEARCH;
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0131 02:27:41.086499 3368346560 line_search.cc:772] Line search failed: Wolfe zoom phase failed to find a point satisfying strong Wolfe conditions within specified max_num_iterations: 20, (num iterations taken for bracketing: 1).
Solver Summary (v 1.11.0-eigen-(3.2.9)-lapack-suitesparse-(4.5.3)-cxsparse-(3.1.9)-no_openmp)
Original Reduced
Parameter blocks 1 1
Parameters 6 6
Residual blocks 1 1
Residual 1 1
Minimizer LINE_SEARCH
Line search direction LBFGS (20)
Line search type CUBIC WOLFE
Given Used
Threads 1 1
Cost:
Initial 2.933624e+00
Final 2.145195e+00
Change 7.884290e-01
Minimizer iterations 24
Time (in seconds):
Preprocessor 0.0099
Residual evaluation 0.0000
Line search cost evaluation 0.0000
Jacobian evaluation 0.7445
Line search gradient evaluation 0.5244
Line search polynomial minimization 0.0009
Minimizer 0.7482
Postprocessor 0.0000
Total 0.7582
Termination: CONVERGENCE (Parameter tolerance reached. Relative step_norm: 0.000000e+00 <= 1.000000e-17.)
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUC-TOw0xZq4jFt%2BTNUk09vgVMdJXuas8dgWVfOG8RBa-A%40mail.gmail.com.
<p class="gmail-m_4207801860427233401m_2196912409207102399gmail-m_-694494835841506484m_-2486113374190896943gmail-m_-1293162012962535022m_-9173210972260113196gmail-p1 gmail-m_4207801860427233401m_2196912409207102399gmail-m_-694494835841506484m_-2486113374190896943gmail-m_-1293162012962535022gmail_msg gmail-m_4207801860427233401m_21969124
bool operator( )( const double* const B, double* residual) const
{
residual[0] = distance(RGB, XYZtoLAB(XYZ), B);
return true;
}
----------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------
/usr/local/include/ceres/internal/numeric_diff.h:65:68: note: in instantiation
of member function 'ceres::internal::VariadicEvaluate<rta::Objfun, double,
6, 0, 0, 0, 0, 0, 0, 0, 0, 0>::Call' requested here
N0, N1, N2, N3, N4, N5, N6, N7, N8, N9>::Call(
^
/usr/local/include/ceres/numeric_diff_cost_function.h:250:20: note: in
instantiation of function template specialization
'ceres::internal::EvaluateImpl<rta::Objfun, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0>'
requested here
if (!internal::EvaluateImpl<CostFunctor,
^
/usr/local/include/ceres/numeric_diff_cost_function.h:193:3: note: in
instantiation of member function
'ceres::NumericDiffCostFunction<rta::Objfun,
ceres::NumericDiffMethodType::CENTRAL, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0>::Evaluate' requested here
NumericDiffCostFunction(
^
/Users/miaoqizhu/Source/rawtoaces_IDT/lib/rta.cpp:872:21: note: in instantiation
of member function 'ceres::NumericDiffCostFunction<rta::Objfun,
ceres::NumericDiffMethodType::CENTRAL, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0,
0>::NumericDiffCostFunction' requested here
new NumericDiffCostFunction<Objfun, CENTRAL, 1, 6>(new O...
^
/Users/miaoqizhu/Source/rawtoaces_IDT/lib/rta.h:292:18: note: candidate function
not viable: no known conversion from 'double *' to 'double' for 2nd
argument; dereference the argument with *
bool operator()(const double* const B,
----------------------------------------------------------------------------------------------------------------------
Max: 11.872147, Mean: 3.127676
Just for comparison, another math software has:
Max: 9.8977, Mean: 2.62073
Thanks a lot,
Miaoqi
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUAaJC%2B4UtBanqa0uB0F5GvGOoXYW9n4fjAo_AmmHCbGqA%40mail.gmail.com.
<span class="gmail-m_5907150343361746964m_-8412558515063367664gmail-m_4207801860427233401m_2196912409207102399gmail-m_-694494835841506484m_-2486113374190896943gmail-s1 gmail-m_5907150343361746964m_-8412558515063367664gmail-m_4207801860427233401m_2196912409207102399gmail-m_-694494835841506484gmail_msg gmail-m_5907150343361746964m_-8412558515063367664
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUBmO%3DVX33_1uYDTskgSbPSkSvS6V2GvWOOLUQGTyYaRuQ%40mail.gmail.com.
FORI(190) {
residual[0] = 0.0;
FORJ(3) residual[0] += std::pow((target[i][j] - ref[i][j]), 2.0);
residual[0] = std::pow(residual[0], 1.0/4.0);
}
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0131 20:43:20.208451 2910708672 line_search.cc:772] Line search failed: Wolfe zoom phase failed to find a point satisfying strong Wolfe conditions within specified max_num_iterations: 20, (num iterations taken for bracketing: 1).
Solver Summary (v 1.11.0-eigen-(3.2.9)-lapack-suitesparse-(4.5.3)-cxsparse-(3.1.9)-no_openmp)
Original Reduced
Parameter blocks 1 1
Parameters 6 6
Residual blocks 1 1
Residual 1 1
Minimizer LINE_SEARCH
Line search direction LBFGS (20)
Line search type CUBIC WOLFE
Given Used
Threads 1 1
Cost:
Initial 5.174013e-01
Final 3.883969e-01
Change 1.290044e-01
Minimizer iterations 3
Time (in seconds):
Preprocessor 0.0001
Residual evaluation 0.0000
Line search cost evaluation 0.0000
Jacobian evaluation 0.2542
Line search gradient evaluation 0.2215
Line search polynomial minimization 0.0003
Minimizer 0.2549
Postprocessor 0.0000
Total 0.2549
Termination: CONVERGENCE (Parameter tolerance reached. Relative step_norm: 0.000000e+00 <= 1.000000e-17.)
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUADKUyCzLTAkJdGZ7JK%2B4Ba%3D3io%2BTPzyJ2UGp65zsukSg%40mail.gmail.com.
where each cost function has just one target and one ref.
options.linear_solver_type = ceres::DENSE_QR;
options.minimizer_progress_to_stdout = false;
options.parameter_tolerance = 1e-17;
options.gradient_tolerance = 1e-17;
options.function_tolerance = 1e-17;
Solver Summary (v 1.11.0-eigen-(3.2.9)-lapack-suitesparse-(4.5.3)-cxsparse-(3.1.9)-no_openmp)
Original Reduced
Parameter blocks 1 1
Parameters 6 6
Residual blocks 10 10
Residual 30 30
Minimizer TRUST_REGION
Dense linear algebra library EIGEN
Trust region strategy LEVENBERG_MARQUARDT
Given Used
Linear solver DENSE_QR DENSE_QR
Threads 1 1
Linear solver threads 1 1
Cost:
Initial 5.305099e-06
Final 5.305063e-06
Change 3.539728e-11
Minimizer iterations 10
Successful steps 1
Unsuccessful steps 9
Time (in seconds):
Preprocessor 0.0001
Residual evaluation 0.0015
Jacobian evaluation 0.0039
Linear solver 0.0001
Minimizer 0.0056
Postprocessor 0.0000
Total 0.0057
Termination: CONVERGENCE (Function tolerance reached. |cost_change|/cost: 0.000000e+00 <= 1.000000e-17)
you should create one costfunction/residual block for each observation. There should be no loops inside your cost function.basically for every row in your matrix, you should have a single cost function.also why are you squaring and adding the norm, it is better to expose the 3 dimensional residual to ceres and it will automatically square and add them into the final residual so in fact your cost function should have a three dimensional residualwherefor (j = 0; j < 3; ++j) {residual[j] = target[j] - ref[j];}where each cost function has just one target and one ref.
--
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/CACWOBK7kVj-Bb8SuvANRdO9m0H66n8j3Q_R-EPN-DqnUX2yN1Q%40mail.gmail.com.
function test_regression()
% Define some random values
in = [0.0192 0.0186 0.0213;
0.0896 0.0894 0.0891;
0.7882 0.7807 0.7835;
0.1995 0.1995 0.1995;
0.5940 0.5911 0.5902;
0.4274 0.4276 0.4263;
0.3004 0.2990 0.2962;
0.1960 0.1955 0.1948;
0.1122 0.1130 0.1129;
0.0644 0.0654 0.0653];
% Create a ground truth matrix
ground_truth = [0.8 0.3 -0.1; -0.25 0.8 0.45; 0.01 0.19 0.8];
% Determine the output values when multiplied by the ground truth
out = (ground_truth * in')';
% Create an objective function
function y = objfun(in, out, mat_vector)
B = [mat_vector(1) mat_vector(2) 1-mat_vector(1)-mat_vector(2); ...
mat_vector(3) mat_vector(4) 1-mat_vector(3)-mat_vector(4); ...
mat_vector(5) mat_vector(6) 1-mat_vector(5)-mat_vector(6)];
out_calc = (B * in')';
% y is the element-wise subtraction matrix
y = out - out_calc;
end
% Define some starting guess
mat_coeff_starting_guess = [1 0 0 1 0 0];
% The Anonymous function ... @(variable want to solve
% for)function(variables function requires)
anon_fun = @(mat_coeff_vector)objfun(in, out, mat_coeff_vector);
% Regression options
options = optimset('Display','iter','TolFun',1e-17,'TolX',1e-17);
% Go do the work ... pass lsqnonlin the objective function, the starting values, the bounds, and the options
[mat_coeff_vector_result, res_error] = lsqnonlin(anon_fun, mat_coeff_starting_guess, [], [], options);
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CACWOBK7kVj-Bb8SuvANRdO9m0H66n8j3Q_R-EPN-DqnUX2yN1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUCGnp26foQYrJ5WC_U3ks2L2qPt_e9Y2%3DEN_StJvP-yEg%40mail.gmail.com.
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/CACWOBK7kVj-Bb8SuvANRdO9m0H66n8j3Q_R-EPN-DqnUX2yN1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUCGnp26foQYrJ5WC_U3ks2L2qPt_e9Y2%3DEN_StJvP-yEg%40mail.gmail.com.
--
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/CACWOBK7KEtwKaxbFa%2B4GPKgwaUp7_UdFuXrS_qLzmD_wEi608A%40mail.gmail.com.
Miaoqi,
TAKE_OWNERSHIP,
570);
The result still does not match. Then I changed "CENTRAL" to "FORWARD" and "RIDDERS", it is still not improving much.
The thing is that to convert "Mt_IN" to something else, there are two other quite complex routines. It is hard to place them outside, as B (to be improved) is one parameter in one routine.
Thanks,
Miaoqi
--
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/CACWOBK4f2G7Un1MvGaf%2Bq5EW2XG_MDZdUBSxouaysXi4M5XAaA%40mail.gmail.com.
Miaoqi,
I have been traveling so I have not had a chance to look at this. I hope to look at it tomorrow.
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/CACWOBK4-LnYYpdv4YWzh0J-Yhxdk%3D4TuAQ9BVTAPoLxJtkS6%3DA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CAK0oyEq91oCLBg8wuDpefAVZwaFL%3D18xCLPHN67GJw9D8jq%2BUQ%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CACWOBK4-LnYYpdv4YWzh0J-Yhxdk%3D4TuAQ9BVTAPoLxJtkS6%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CAK0oyEq91oCLBg8wuDpefAVZwaFL%3D18xCLPHN67GJw9D8jq%2BUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUCcbGW71B5D6y1iHFMQx_RWDxnEVfPyNR9yEuF1QVH1XA%40mail.gmail.com.To unsubscribe from this group and all its topics, send an email to ceres-solver+unsubscribe@googlegroups.com.
Great. I think if you are going to use Ceres you are going to be depending on eigen anyways. It is a well engineered performant and well supported library.
I strongly recommend using it. Plus it's header only, so no compilation needed.
Sameer
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/CACWOBK4-LnYYpdv4YWzh0J-Yhxdk%3D4TuAQ9BVTAPoLxJtkS6%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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/CAK0oyEq91oCLBg8wuDpefAVZwaFL%3D18xCLPHN67GJw9D8jq%2BUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Ceres Solver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ceres-solver/qasIhdM2nQg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUCcbGW71B5D6y1iHFMQx_RWDxnEVfPyNR9yEuF1QVH1XA%40mail.gmail.com.
--
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/CACWOBK6JmzYyCMFiVdoG-C38r-fEW%3DtFE1JoLSB7UtagiynTqA%40mail.gmail.com.