MTF
ParallelSM.h
1 #ifndef MTF_PARALLEL_SM_H
2 #define MTF_PARALLEL_SM_H
3 
4 #include "CompositeSM.h"
5 #include "mtf/SM/ParallelParams.h"
6 
7 _MTF_BEGIN_NAMESPACE
8 
15 template<class AM, class SSM>
16 class ParallelSM : public CompositeSM<AM, SSM> {
17 
18 public:
19  typedef ParallelParams ParamType;
20  typedef ParamType::PrlEstMethod PrlEstMethod;
21 
22  using typename CompositeSM<AM, SSM>::SM;
23  typedef typename SM::SSMParams SSMParams;
29 
30  ParallelSM(const vector<SM*> _trackers, const ParamType *parl_params,
31  const SSMParams *ssm_params);
32  void setImage(const cv::Mat &img) override;
33  void initialize(const cv::Mat &corners) override;
34  void update() override;
35  const cv::Mat& getRegion() override { return cv_corners_mat; }
36  void setRegion(const cv::Mat& corners) override;
37 
38 protected:
39 
40  SSM ssm;
41  ParamType params;
42 
43  bool failure_detected;
44 
45  int buffer_id;
46  bool buffer_filled;
47  vector<cv::Mat> img_buffer, corners_buffer;
48 
49  cv::Mat curr_img;
50  cv::Mat mean_corners_cv;
51 
52  int ssm_state_size;
53  std::vector<VectorXd> ssm_states;
54  VectorXd mean_state;
55 
56 };
57 
58 
59 _MTF_END_NAMESPACE
60 
61 #endif
62 
Definition: StateSpaceModel.h:35
run multiple search methods in parallel with the same AM/SSM; although the code here is currently ide...
Definition: ParallelSM.h:16
base class for all composite search methods
Definition: CompositeSM.h:11
Definition: SearchMethod.h:10
Definition: ParallelParams.h:14