[][src]Trait opencv::hub_prelude::LMSolver

pub trait LMSolver: AlgorithmTrait {
    pub fn as_raw_LMSolver(&self) -> *const c_void;
pub fn as_raw_mut_LMSolver(&mut self) -> *mut c_void; pub fn run(&self, param: &mut dyn ToInputOutputArray) -> Result<i32> { ... }
pub fn set_max_iters(&mut self, max_iters: i32) -> Result<()> { ... }
pub fn get_max_iters(&self) -> Result<i32> { ... } }

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

Loading content...

Provided methods

pub fn run(&self, param: &mut dyn ToInputOutputArray) -> Result<i32>[src]

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.

pub fn set_max_iters(&mut self, max_iters: i32) -> Result<()>[src]

Sets the maximum number of iterations

Parameters

  • maxIters: the number of iterations

pub fn get_max_iters(&self) -> Result<i32>[src]

Retrieves the current maximum number of iterations

Loading content...

Implementations

impl<'_> dyn LMSolver + '_[src]

pub fn create(
    cb: &Ptr<dyn LMSolver_Callback>,
    max_iters: i32
) -> Result<Ptr<dyn LMSolver>>
[src]

Creates Levenberg-Marquard solver

Parameters

  • cb: callback
  • maxIters: maximum number of iterations that can be further modified using setMaxIters() method.

pub fn create_ext(
    cb: &Ptr<dyn LMSolver_Callback>,
    max_iters: i32,
    eps: f64
) -> Result<Ptr<dyn LMSolver>>
[src]

Implementors

impl LMSolver for PtrOfLMSolver[src]

Loading content...