camshiftKalman
 All Classes Files Functions Variables Enumerations Enumerator Macros
camshiftkalman.h
Go to the documentation of this file.
1 
9 #ifndef CAMSHIFTKALMAN_H
10 #define CAMSHIFTKALMAN_H
11 
12 #include <opencv2/highgui/highgui.hpp>
13 #include <opencv/cv.hpp>
14 
15 #include <string>
16 
17 #include "LBP.h"
18 
19 using namespace std;
20 using namespace cv;
21 
26  HUE = 0,
30  };
31 
36 {
37 public:
38  camShiftKalman(const string videoName_, double start, const Mat target, const Rect targetWindow, featureType type_);
39  ~camShiftKalman();
40 
44  void extractTargetModel();
45 
49  void track();
50 
55  Point getCurrentObjectCenter() const;
56 
61  Rect getCurrentTrackWindow() const;
62 
63 private :
67  void initKalman(double);
68 
73  Point getCurrentState() const;
74 
78  void setCurrentTrackWindow();
79 
86  Mat drawHist1d(const Mat hist, int histSize) const;
87 
95  Mat drawHist2d(const Mat hist, int histSizeX, int histSizeY) const;
96 
100  void drawTrackResult();
101 
106  void normalizeHist(Mat &hist);
107 
108 private :
110 
111  string videoName;
112 
114  Mat hist;
116 
117  Point camCenter;
121 
123  int vMin;
124  int vMax;
125  int sMin;
126 
127  KalmanFilter KF;
128  Mat_<float> measurement;
129 
130  string winName;
131 
134 };
135 
136 #endif // CAMSHIFTKALMAN_H