pub trait LMSolverConst: AlgorithmTraitConst {
    fn as_raw_LMSolver(&self) -> *const c_void;

    fn run(&self, param: &mut dyn ToInputOutputArray) -> Result<i32> { ... }
    fn get_max_iters(&self) -> Result<i32> { ... }
}
Expand description

Levenberg-Marquardt solver. Starting with the specified vector of parameters it optimizes the target vector criteria “err” (finds local minima of each target vector component absolute value).

When needed, it calls user-provided callback.

Required Methods

Provided Methods

Runs Levenberg-Marquardt algorithm using the passed vector of parameters as the start point. The final vector of parameters (whether the algorithm converged or not) is stored at the same vector. The method returns the number of iterations used. If it’s equal to the previously specified maxIters, there is a big chance the algorithm did not converge.

Parameters
  • param: initial/final vector of parameters.

Note that the dimensionality of parameter space is defined by the size of param vector, and the dimensionality of optimized criteria is defined by the size of err vector computed by the callback.

Retrieves the current maximum number of iterations

Implementors