MTF
CascadeSM.h
1 #ifndef MTF_CASCADE_SM_H
2 #define MTF_CASCADE_SM_H
3 
4 #include "CompositeSM.h"
5 #include "mtf/SM/CascadeParams.h"
6 
7 _MTF_BEGIN_NAMESPACE
8 
15 template<class AM, class SSM>
16 class CascadeSM : public CompositeSM < AM, SSM > {
17 
18 public:
19  typedef CascadeParams ParamType;
20 
21  using typename CompositeSM<AM, SSM>::SM;
22  typedef typename SM::SSMParams SSMParams;
28 
29  CascadeSM(const vector<SM*> _trackers, const ParamType *casc_params);
30  void initialize(const cv::Mat &corners) override;
31  void update() override;
32  void setImage(const cv::Mat &img) override;
33  const cv::Mat& getRegion() override{ return trackers[n_trackers - 1]->getRegion(); }
34  void setRegion(const cv::Mat& corners) override;
35 
36 protected:
37 
38  ParamType params;
39 
40  bool failure_detected;
41  vector<cv::Mat> img_buffer, corners_buffer;
42  int buffer_id;
43  bool buffer_filled;
44  cv::Mat curr_img;
45 
46  void updateTrackers(const cv::Mat &img);
47 };
48 _MTF_END_NAMESPACE
49 
50 #endif
51 
Definition: CascadeParams.h:14
Definition: StateSpaceModel.h:35
base class for all composite search methods
Definition: CompositeSM.h:11
run multiple search methods in cascade with the same AM/SSM; although the code here is currently iden...
Definition: CascadeSM.h:16
Definition: SearchMethod.h:10