MTF
FCLK.h
1 #ifndef MTF_FCLK_H
2 #define MTF_FCLK_H
3 
4 #include "SearchMethod.h"
5 #include "FCLKParams.h"
6 
7 _MTF_BEGIN_NAMESPACE
8 
9 template<class AM, class SSM>
10 class FCLK : public SearchMethod < AM, SSM > {
11 public:
12 
13  typedef FCLKParams ParamType;
14  typedef ParamType::HessType HessType;
15 
16  using SearchMethod<AM, SSM> ::am;
17  using SearchMethod<AM, SSM> ::ssm;
18  using typename SearchMethod<AM, SSM> ::AMParams;
19  using typename SearchMethod<AM, SSM> ::SSMParams;
20  using SearchMethod<AM, SSM> ::cv_corners_mat;
21  using SearchMethod<AM, SSM> ::name;
22  using SearchMethod<AM, SSM> ::initialize;
23  using SearchMethod<AM, SSM> ::update;
24 
25  FCLK(const ParamType *fclk_params = nullptr,
26  const AMParams *am_params = nullptr, const SSMParams *ssm_params = nullptr);
27 
28  void initialize(const cv::Mat &corners) override;
29  void update() override;
30  void setRegion(const cv::Mat& corners) override;
31 
32 protected:
33  ParamType params;
34 
35  // Let S = size of SSM state vector and N = resx * resy = no. of pixels in the object patch
36 
38  RowVectorXd df_dp;
40  MatrixXd d2f_dp2, init_d2f_dp2;
42  MatrixXd dI0_dpssm, dIt_dpssm;
43 
45  MatrixXd d2I0_dpssm2, d2It_dpssm2;
46 
47  Matrix24d prev_corners;
48 
49  VectorXd state_update, ssm_update, am_update;
50  VectorXd inv_ssm_update, inv_am_update;
51 
52  int state_size, ssm_state_size, am_state_size;
53 
54  int frame_id;
55 
56  init_profiling();
57  char *log_fname;
58  char *time_fname;
59 };
60 
61 
62 
63 _MTF_END_NAMESPACE
64 
65 #endif
66 
Definition: FCLKParams.h:7
Definition: StateSpaceModel.h:35
Definition: FCLK.h:10
Definition: AMParams.h:12
RowVectorXd df_dp
1 x S Jacobian of the appearance model w.r.t. SSM state vector
Definition: FCLK.h:38
Definition: SearchMethod.h:10
MatrixXd d2f_dp2
S x S Hessian of the appearance model w.r.t. SSM state vector.
Definition: FCLK.h:40
MatrixXd d2I0_dpssm2
N x S x S hessians of the pixel values w.r.t the SSM state vector stored as a (S*S) x N 2D matrix...
Definition: FCLK.h:45
MatrixXd dI0_dpssm
N x S jacobians of the pix values w.r.t the SSM state vector.
Definition: FCLK.h:42