SRBA: Sparser Relative Bundle Adjustment
|
A generic symbolic and numeric Schur-complement handler for builing reduced systems of equations.
#include <schur.h>
Classes | |
struct | TGradApSymbolicEntry |
struct | THApSymbolicEntry |
struct | TInfoPerHfBlock |
Public Member Functions | |
SchurComplement (HESS_Ap &_HAp, HESS_f &_Hf, HESS_Apf &_HApf, double *_minus_grad_Ap, double *_minus_grad_f) | |
void | realize_HAp_changed () |
size_t | getNumFeatures () const |
size_t | getNumFeaturesFullRank () const |
void | numeric_build_reduced_system (const double lambda) |
void | numeric_solve_for_features (double *in_deltas_Ap, double *out_deltas_feats) |
bool | was_ith_feature_invertible (const size_t i) const |
srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::SchurComplement | ( | HESS_Ap & | _HAp, |
HESS_f & | _Hf, | ||
HESS_Apf & | _HApf, | ||
double * | _minus_grad_Ap, | ||
double * | _minus_grad_f | ||
) | [inline] |
Constructor: builds the symbolic representations Note: HApf must be in row-compressed form; HAp & Hf in column-compressed form.
[in] | _minus_grad_f | Can be NULL if there're no observations of landmarks with unknown positions (may still be of LMs with known ones). |
size_t srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::getNumFeatures | ( | ) | const [inline] |
After calling numeric_build_reduced_system() one can get the stats on how many features are actually estimable
void srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::numeric_build_reduced_system | ( | const double | lambda | ) | [inline] |
Replace the HAp matrix with its Schur reduced version. The lambda value is used to sum it to the diagonal of Hf (features), but it's NOT added to the output HAp. This is intentional, so the caller can add different lamdba values as needed in different trials if an ill conditioned matrix is found.
void srba::SchurComplement< HESS_Ap, HESS_f, HESS_Apf >::realize_HAp_changed | ( | ) | [inline] |
Must be called after the numerical values of the Hessian HAp change, typically after an optimization update which led to re-evaluation of the Jacobians around a new linearization point. This method latches the current value of HAp for reseting it again if we later need to recompute the reduced Schur system for different values of lambda.