OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Wed, 08 Jul 2020 04:43:24 -0500Nonlinear solver such as Levenberg- Marquardthttp://answers.opencv.org/question/232234/nonlinear-solver-such-as-levenberg-marquardt/ Hi,
I need to use a nonlinear solver in OpenCV. Does OpenCV support it or I need to use 3rd lib such as Ceres or Dlib?
Thanks a lot.
YLARYL518Wed, 08 Jul 2020 04:43:24 -0500http://answers.opencv.org/question/232234/Is nonlinear minimization (like Levenbergâ€“Marquardt) directly available?http://answers.opencv.org/question/17181/is-nonlinear-minimization-like-levenberg-marquardt-directly-available/I need to minimize a function `f` of 3 variables (or more). `f` has a particular form because it is a sum of squares of nonlinear function of the 3 variables, for example:
double f(double x1, double x2, double x3)
{
double acc = 0;
for ( size_t i = 0; i < N; i++ ) {
acc += pow(g(x1,x2,x3,i),2);
}
return acc;
}
std::vector< double > data;
double g(double x1, double x2, double x3, size_t i)
{
return some nonlinear function of x1, x2, x3, data[i]
}
Is there any direct available algorithm for this kind of minimization?
For example I read [here](http://docs.opencv.org/modules/stitching/doc/motion_estimation.html) that the C++ class `detail::BundleAdjusterBase` uses Levenbergâ€“Marquardt algorithm but it doesn't seem to me that this algorithm is directly available.uvts_cvsSat, 20 Jul 2013 07:08:04 -0500http://answers.opencv.org/question/17181/