[−][src]Trait opencv::hub_prelude::LMSolver
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
pub fn as_raw_LMSolver(&self) -> *const c_void
[src]
pub fn as_raw_mut_LMSolver(&mut self) -> *mut c_void
[src]
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]
pub fn get_max_iters(&self) -> Result<i32>
[src]
Retrieves the current maximum number of iterations
Implementations
impl<'_> dyn LMSolver + '_
[src]
pub fn create(
cb: &Ptr<dyn LMSolver_Callback>,
max_iters: i32
) -> Result<Ptr<dyn LMSolver>>
[src]
cb: &Ptr<dyn LMSolver_Callback>,
max_iters: i32
) -> Result<Ptr<dyn LMSolver>>
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]
cb: &Ptr<dyn LMSolver_Callback>,
max_iters: i32,
eps: f64
) -> Result<Ptr<dyn LMSolver>>