bazar
1.3.1
|
#include <ls_minimizer.h>
Public Member Functions | |
ls_minimizer (int state_size, int maximum_scalar_measure_number) | |
~ls_minimizer () | |
void | set_max_number_of_observations_2data_1measure (int n) |
void | set_max_number_of_observations_2data_2measures (int n) |
void | set_max_number_of_observations_3data_2measures (int n) |
for example a 3D point projected on a 2D plane | |
void | set_scales (double *scales) |
void | desactivate_automated_scaling (void) |
void | set_verbose_level (int vl) |
void | set_user_data (int slot_index, void *ptr) |
void | reset_observations (void) |
call that before adding observations for a new optimization. | |
bool | add_observation (function_2data_1measure f, const double d0, const double d1, const double b0) |
bool | add_observation (function_2data_2measures f, const double d0, const double d1, const double b0, const double b1) |
bool | add_observation (function_3data_2measures f, const double d0, const double d1, const double d2, const double b0, const double b1) |
void | set_new_iteration_callback (callback_function callback) |
this callback is called each time the state vector changes. | |
void | set_default_c (double c) |
void | set_last_observation_c (double c) |
void | set_last_observation_c_max_c_min (double c_max, double c_min) |
For robust estimation using Julien' method (default = +inf for both): | |
void | set_last_observation_weight (double weight) |
Set observation weight (default = 1): | |
void | set_last_observation_confidence (double confidence) |
Set observation confidence (default = 1). Only used for PROSAC and cat tail. | |
int | minimize_using_steepest_descent_from (double *initial_state) |
int | minimize_using_levenberg_marquardt_from (double *initial_state) |
void | lm_set_max_iterations (int it) |
void | lm_set_max_failures_in_a_row (int f) |
if f iterations do not decrease the function, stop. | |
void | lm_set_tol_cos (double t) |
stop condition. Very restrictive: 0.999 less restrictive: 0.9 | |
bool | minimize_using_gauss_newton_from (double *initial_state) |
int | minimize_using_dogleg_from (double *initial_state) |
Dogleg (not convincing). | |
int | minimize_using_cattail_from (double *initial_state) |
void | ct_set_max_iterations (int it) |
void | set_line_search_parameters (double lambda0, double k_rough, double k_fine) |
double | minimize_using_prosac (prosac_function_20scalars f, int observation_type, int min_number_of_inliers, int max_number_of_iterations) |
double | minimize_using_julien_method_from (double *state, int nb_steps, int nb_iterations_per_step) |
void | check_jacobians_around (double *state, double state_step) |
void | set_last_observation_as_outlier (void) |
void | set_ground_truth (double *state) |
void | compare_outliers_with_ground_truth (void) |
void | compare_state_with_ground_truth (void) |
Public Attributes | |
ls_minimizer_type * | state |
state vector |
Non-linear Minimizer
Definition at line 45 of file ls_minimizer.h.
ls_minimizer::ls_minimizer | ( | int | state_size, |
int | maximum_scalar_measure_number | ||
) |
ls_minimizer::~ls_minimizer | ( | ) |
bool ls_minimizer::add_observation | ( | function_2data_1measure | f, |
const double | d0, | ||
const double | d1, | ||
const double | b0 | ||
) |
bool ls_minimizer::add_observation | ( | function_2data_2measures | f, |
const double | d0, | ||
const double | d1, | ||
const double | b0, | ||
const double | b1 | ||
) |
bool ls_minimizer::add_observation | ( | function_3data_2measures | f, |
const double | d0, | ||
const double | d1, | ||
const double | d2, | ||
const double | b0, | ||
const double | b1 | ||
) |
In the case of a 3d point projected on a 2d plane: d0 = X, d1 = Y, d2 = Z (b0,b1) projection goal f : f(d0,d1,d2,state, ..) is the function computing the projection and its gradient.
void ls_minimizer::check_jacobians_around | ( | double * | state, |
double | state_step | ||
) |
Checking derivatives: compares finite difference jacobian and analytical jacobian computed by the user provided functions.
void ls_minimizer::compare_outliers_with_ground_truth | ( | void | ) |
void ls_minimizer::compare_state_with_ground_truth | ( | void | ) |
|
inline |
Definition at line 140 of file ls_minimizer.h.
|
inline |
Definition at line 62 of file ls_minimizer.h.
void ls_minimizer::lm_set_max_failures_in_a_row | ( | int | f | ) |
if f iterations do not decrease the function, stop.
void ls_minimizer::lm_set_max_iterations | ( | int | it | ) |
void ls_minimizer::lm_set_tol_cos | ( | double | t | ) |
stop condition. Very restrictive: 0.999 less restrictive: 0.9
int ls_minimizer::minimize_using_cattail_from | ( | double * | initial_state | ) |
Cat Tail (experimental) a mix between gauss-newton and line search.
int ls_minimizer::minimize_using_dogleg_from | ( | double * | initial_state | ) |
Dogleg (not convincing).
bool ls_minimizer::minimize_using_gauss_newton_from | ( | double * | initial_state | ) |
double ls_minimizer::minimize_using_julien_method_from | ( | double * | state, |
int | nb_steps, | ||
int | nb_iterations_per_step | ||
) |
int ls_minimizer::minimize_using_levenberg_marquardt_from | ( | double * | initial_state | ) |
double ls_minimizer::minimize_using_prosac | ( | prosac_function_20scalars | f, |
int | observation_type, | ||
int | min_number_of_inliers, | ||
int | max_number_of_iterations | ||
) |
int ls_minimizer::minimize_using_steepest_descent_from | ( | double * | initial_state | ) |
void ls_minimizer::reset_observations | ( | void | ) |
call that before adding observations for a new optimization.
void ls_minimizer::set_default_c | ( | double | c | ) |
For robust estimation (default = +inf) residual = max( ||b-f(d,state)||^2, c^2 ) This value will be applied to next added observations
void ls_minimizer::set_ground_truth | ( | double * | state | ) |
void ls_minimizer::set_last_observation_as_outlier | ( | void | ) |
void ls_minimizer::set_last_observation_c | ( | double | c | ) |
For robust estimation (default = +inf): change the last added observation robust estimator value
void ls_minimizer::set_last_observation_c_max_c_min | ( | double | c_max, |
double | c_min | ||
) |
For robust estimation using Julien' method (default = +inf for both):
void ls_minimizer::set_last_observation_confidence | ( | double | confidence | ) |
Set observation confidence (default = 1). Only used for PROSAC and cat tail.
void ls_minimizer::set_last_observation_weight | ( | double | weight | ) |
Set observation weight (default = 1):
void ls_minimizer::set_line_search_parameters | ( | double | lambda0, |
double | k_rough, | ||
double | k_fine | ||
) |
void ls_minimizer::set_max_number_of_observations_2data_1measure | ( | int | n | ) |
void ls_minimizer::set_max_number_of_observations_2data_2measures | ( | int | n | ) |
void ls_minimizer::set_max_number_of_observations_3data_2measures | ( | int | n | ) |
for example a 3D point projected on a 2D plane
void ls_minimizer::set_new_iteration_callback | ( | callback_function | callback | ) |
this callback is called each time the state vector changes.
void ls_minimizer::set_scales | ( | double * | scales | ) |
Scale applied to each optimized parameter (each dimension of the optimization space). Not used by default, but an automated method is used.
void ls_minimizer::set_user_data | ( | int | slot_index, |
void * | ptr | ||
) |
user arbitrary pointers. slot_index should be in [0,9] this pointer array is passed to the callback functions
void ls_minimizer::set_verbose_level | ( | int | vl | ) |
0 = nothing 1 = messages before and after minimization 2 = message at each iteration. 3 = debug
ls_minimizer_type* ls_minimizer::state |
state vector
Definition at line 116 of file ls_minimizer.h.