PedestrainCounting
ParticleFilterConstVelocity.h
1 
7 #ifndef PARTICLEFILTER_CONSTVELOCITY_HEADER
8 #define PARTICLEFILTER_CONSTVELOCITY_HEADER
9 
10 #define PFCV_DEBUG
11 
12 #include "ParticleFilter.h"
13 #include "Pool.h"
14 
16 public:
17  ParticleFilterConstVelocity(int n, float velocityThre, float distWeight);
18 
20 
21  void InitBuffer();
22  void InitTarget(const Rect &target, const Point2D &initVelocity);
23 
24  void Propagate(const Size &imgSize);
25 
26  void CalculateMatchScore(const IntegralImage *intImage,
27  const StrongClassifier *classifier, const Pool<Rect> &dets,
28  std::vector<MatchMatrix::MatchScore>::iterator &matchArray) const;
29 
30  //inline void SetVelocity(const Point2D &initV) {
31  // velocity = initV;
32  //}
33  void SetVelocitySigma(float sigma);
34 
35 protected:
36  // The sizeof particles. Here it should be 2. Its structure like:
37  // struct Particle {
38  // int upper;
39  // int left;
40  // int vUpper;
41  // int vLeft;
42  // }
43 
44  Point2D velocity;
45 
46  // The threshold of velocity used in gate function.
47  const float velocityThre;
48 
49  // The weight of distance score in match score formula.
50  const float distWeight;
51 
52  // Gaussian noise used in velocity.
53  std::normal_distribution<float> gaussianVelocity;
54 
55  void InitParticles();
56 };
57 
58 #endif
Definition: Geometry.h:34
Definition: ParticleFilterConstVelocity.h:15
Definition: Geometry.h:14
Definition: IntegralImage.h:11
Definition: ParticleFilter.h:19
Definition: StrongClassifier.h:15
Definition: Geometry.h:69