PedestrainCounting
MultiTracker.h
1 
27 #ifndef MULTITRACKER_HEADER
28 #define MULTITRACKER_HEADER
29 
30 #define MT_DEBUG
31 #define MTPRINTF(...) printf(__VA_ARGS__)
32 
33 #include "Tracker.h"
34 #include "RGIIntegralImage.h"
35 #include "HoGIntegralImage.h"
36 #include "TargetsFreeList.h"
37 #include "ImageDetector.h"
38 #include "SingleSampler.h"
39 
40 class MultiTracker : public Tracker {
41 public:
42 
48  MultiTracker(ImageDetector *detector, const Size &imgSize, const Options &opts);
49 
50  ~MultiTracker();
51 
52  void Track(cv::VideoCapture &in, cv::VideoWriter &out, const cv::Mat &bkg = defaultBackground);
53 
54 private:
55 
60  void Control(int curFrame);
61 
65  void Reset();
66 
70  int curNumPedestrains;
71  int totalNumPedestrains;
72 
76  Rect inner;
77 
82  Rect outer;
83 
84  // Integral Images.
85  RGIIntegralImage *rgiIntImage;
86  HoGIntegralImage *hogIntImage;
87 
88  // Detector.
89  ImageDetector *detector;
90 
91  // Target pool.
92  TargetsFreeList *targets;
93 
94  // Size of the frame.
95  const Size imgSize;
96 
97  // Match matrix.
98  MatchMatrix *matches;
99 
100  // MultiSampler.
101  MultiSampler *sampler;
102  // SingleSampler *sampler;
103 
104 
105  // Threshold for matching.
106  const float matchThre;
107 };
108 
109 #endif
Definition: TargetsFreeList.h:22
MultiTracker(ImageDetector *detector, const Size &imgSize, const Options &opts)
Definition: MultiTracker.cpp:3
Definition: Geometry.h:34
Definition: MultiSampler.h:18
Definition: RGIIntegralImage.h:15
Definition: Geometry.h:14
Definition: ImageDetector.h:30
Definition: HoGIntegralImage.h:13
Definition: MultiTracker.h:40
Definition: MatchMatrix.h:10
Definition: Options.h:14
Definition: Tracker.h:10