24 #ifndef OPTIMIZATION_H
25 #define OPTIMIZATION_H
29 #include <opencv2/core/mat.hpp>
47 void * estimate_param;
61 double CalcTukeyWeight(
double residual,
double c);
62 double CalcTukeyWeightSimple(
double residual,
double c);
97 typedef void (*EstimateCallback)(cv::Mat &state, cv::Mat &projection,
void *param);
120 cv::Mat & measurements,
123 EstimateCallback Estimate,
126 const cv::Mat & parameters_mask = cv::Mat(),
127 const cv::Mat & J_mat = cv::Mat(),
128 const cv::Mat & weights = cv::Mat());
This file defines library export definitions, version numbers and build information.
Non-linear optimization routines. There are three methods implemented that include Gauss-Newton,...
Optimization(int n_params, int n_meas)
Constructor.
OptimizeMethod
Selection between the algorithm used in optimization. Following should be noticed:
cv::Mat GetErr()
Returns the current residual vector.
void CalcJacobian(cv::Mat &x, cv::Mat &J, EstimateCallback Estimate)
Numerically differentiates and calculates the Jacobian around x.
double Optimize(cv::Mat ¶meters, cv::Mat &measurements, double stop, int max_iter, EstimateCallback Estimate, void *param=0, OptimizeMethod method=LEVENBERGMARQUARDT, const cv::Mat ¶meters_mask=cv::Mat(), const cv::Mat &J_mat=cv::Mat(), const cv::Mat &weights=cv::Mat())
Runs the optimization loop with selected parameters.