MTF
ESM.h
1 #ifndef MTF_ESM_H
2 #define MTF_ESM_H
3 
4 #include "SearchMethod.h"
5 #include "ESMParams.h"
6 
7 _MTF_BEGIN_NAMESPACE
8 
9 template<class AM, class SSM>
10 class ESM : public SearchMethod < AM, SSM > {
11 
12 public:
13  typedef ESMParams ParamType;
14 
15  typedef typename ParamType::JacType JacType;
16  typedef typename ParamType::HessType HessType;
17 
18  using SearchMethod<AM, SSM> ::am;
19  using SearchMethod<AM, SSM> ::ssm;
20  using typename SearchMethod<AM, SSM> ::AMParams;
21  using typename SearchMethod<AM, SSM> ::SSMParams;
22  using SearchMethod<AM, SSM> ::cv_corners_mat;
23  using SearchMethod<AM, SSM> ::name;
24  using SearchMethod<AM, SSM> ::initialize;
25  using SearchMethod<AM, SSM> ::update;
26 
27  ESM(const ParamType *esm_params = nullptr,
28  const AMParams *am_params = nullptr,
29  const SSMParams *ssm_params = nullptr);
30 
31  void initialize(const cv::Mat &corners) override;
32  void update() override;
33  void setRegion(const cv::Mat& corners) override;
34 
35 protected:
36  ParamType params;
37 
40  MatrixXd dI0_dpssm, dIt_dpssm, mean_dI_dpssm;
41  MatrixXd d2I0_dpssm2, d2It_dpssm2, mean_d2I_dpssm2;
42 
44  RowVectorXd df_dp;
46  MatrixXd d2f_dp2, init_d2f_dp2;
47 
48  VectorXd state_update, ssm_update, am_update;
49  VectorXd inv_ssm_update, inv_am_update;
50  int state_size, ssm_state_size, am_state_size;
51 
52  int frame_id;
53 
54  Matrix24d prev_corners;
55 
56  init_profiling();
57  char *time_fname;
58  char *log_fname;
59 };
60 _MTF_END_NAMESPACE
61 
62 #endif
63 
Definition: ESM.h:10
Definition: StateSpaceModel.h:35
Definition: ESMParams.h:11
RowVectorXd df_dp
1 x S Jacobian of the AM error norm w.r.t. SSM state vector
Definition: ESM.h:44
Definition: AMParams.h:12
Definition: SearchMethod.h:10
MatrixXd dI0_dpssm
N x S jacobians of the pixel values w.r.t the SSM state vector where N = resx * resy is the no...
Definition: ESM.h:40
MatrixXd d2f_dp2
S x S Hessian of the AM error norm w.r.t. SSM state vector.
Definition: ESM.h:46