4 #include "SearchMethod.h" 7 #define HACLK_MAX_ITERS 10 8 #define HACLK_EPSILON 0.01 9 #define HACLK_REC_INIT_ERR_GRAD false 10 #define HACLK_DEBUG_MODE false 11 #define HACLK_HESS_TYPE 0 23 std::vector<cv::Mat> converged_corners;
26 bool _rec_init_err_grad,
bool _debug_mode,
27 int _hess_type,
const std::vector<cv::Mat> &_converged_corners){
28 this->max_iters = _max_iters;
29 this->epsilon = _epsilon;
30 this->rec_init_err_grad = _rec_init_err_grad;
31 this->debug_mode = _debug_mode;
32 this->hess_type = _hess_type;
33 this->converged_corners = _converged_corners;
36 max_iters(HACLK_MAX_ITERS),
42 max_iters = params->max_iters;
43 epsilon = params->epsilon;
44 rec_init_err_grad = params->rec_init_err_grad;
45 debug_mode = params->debug_mode;
46 hess_type = params->hess_type;
47 converged_corners = params->converged_corners;
52 template<
class AM,
class SSM>
56 enum { GaussNewton, Newton, InitialNewton, CurrentNewton, ConvergedNewton};
69 HACLK(
const ParamType *haclk_params =
nullptr,
72 void initialize(
const cv::Mat &corners)
override;
73 void update()
override;
78 bool use_newton_method;
82 MatrixXd init_pix_jacobian, curr_pix_jacobian;
84 MatrixXd init_pix_hessian, curr_pix_hessian;
87 RowVectorXd similarity_jacobian;
91 Matrix24d curr_conv_corners;
92 Matrix24d prev_corners;
103 ClockType start_time, end_time;
104 std::vector<double> proc_times;
105 std::vector<char*> proc_labels;
108 inline void updateSSM(VectorXd &state_update){
109 ssm.compositionalUpdate(state_update);
111 inline void resetSSM(VectorXd &state_update){
112 ssm.invertState(inv_state, state_update);
113 ssm.compositionalUpdate(inv_state);
Definition: StateSpaceModel.h:35
bool rec_init_err_grad
maximum L1 norm of the state update vector at which to stop the iterations
Definition: HACLK.h:18
Definition: AMParams.h:12
Definition: SearchMethod.h:10
int hess_type
decides whether logging data will be printed for debugging purposes;
Definition: HACLK.h:22
bool debug_mode
decides if the gradient of the error vector w.r.t.
Definition: HACLK.h:20
double epsilon
maximum iterations of the HACLK algorithm to run for each frame
Definition: HACLK.h:17