4 #include "SearchMethod.h" 6 #define FESM_MAX_ITERS 10 7 #define FESM_UPD_THRESH 0.01 8 #define FESM_SEC_ORD_HESS false 9 #define FESM_ENABLE_SPI false 10 #define FESM_SPI_THRESH 10 11 #define FESM_DEBUG_MODE false 17 enum class JacType{ Original, DiffOfJacs };
19 Original, SumOfStd, SumOfSelf,
20 InitialSelf, CurrentSelf, Std
35 bool _enable_spi,
double _spi_thresh,
37 max_iters = _max_iters;
38 upd_thresh = _upd_thresh;
39 sec_ord_hess = _sec_ord_hess;
40 enable_spi = _enable_spi;
41 spi_thresh = _spi_thresh;
42 debug_mode = _debug_mode;
46 max_iters(FESM_MAX_ITERS),
49 enable_spi(FESM_ENABLE_SPI),
50 spi_thresh(FESM_SPI_THRESH),
51 debug_mode(FESM_DEBUG_MODE){
53 max_iters = params->max_iters;
54 upd_thresh = params->upd_thresh;
55 sec_ord_hess = params->sec_ord_hess;
56 enable_spi = params->enable_spi;
57 spi_thresh = params->spi_thresh;
58 debug_mode = params->debug_mode;
63 template<
class AM,
class SSM>
76 FESMBase(
const ParamType *nesm_params =
nullptr,
80 void initialize(
const cv::Mat &corners)
override;
81 void update()
override;
83 virtual void initializeHessian(){}
84 virtual void updateJacobian();
85 virtual void updateHessian();
88 void initializePixJacobian();
89 void updatePixJacobian();
90 void initializePixHessian();
91 void updatePixHessian();
100 VectorXd rel_pix_diff;
101 cv::Mat pix_mask_img;
105 Matrix24d prev_corners;
110 MatrixXd init_pix_hessian, curr_pix_hessian, mean_pix_hessian;
125 void initializeSPIMask();
126 void updateSPIMask();
double upd_thresh
maximum iterations of the FESMBase algorithm to run for each frame
Definition: FESMBase.h:24
RowVectorXd jacobian
1 x S Jacobian of the AM error norm w.r.t. SSM state vector
Definition: FESMBase.h:115
Definition: StateSpaceModel.h:35
Definition: AMParams.h:12
bool sec_ord_hess
maximum L1 norm of the state update vector at which to stop the iterations
Definition: FESMBase.h:25
FESMParams(int _max_iters, double _upd_thresh, bool _sec_ord_hess, bool _enable_spi, double _spi_thresh, bool _debug_mode)
decides whether logging data will be printed for debugging purposes;
Definition: FESMBase.h:33
Definition: SearchMethod.h:10
MatrixXd init_pix_jacobian
N x S jacobians of the pixel values w.r.t the SSM state vector where N = resx * resy is the no...
Definition: FESMBase.h:109
MatrixXd hessian
S x S Hessian of the AM error norm w.r.t. SSM state vector.
Definition: FESMBase.h:117
Definition: FESMBase.h:64
Definition: FESMBase.h:15