PedestrainCounting
RGIIntegralImage.h
1 
8 #ifndef RGI_INTEGRALIMAGE_HEADER
9 #define RGI_INTEGRALIMAGE_HEADER
10 
11 #define NUM_RGI_BINS 9
12 
13 #include "IntegralImage.h"
14 
16 public:
20  RGIIntegralImage(const cv::Mat &img);
21  RGIIntegralImage(int w, int h);
23 
24  void CalculateInt(const cv::Mat &img);
25 
26  void GetSum(const Rect &roi, float *result) const;
27 
28 private:
29 
30  unsigned int *intImage;
31 
32  cv::Mat gray;
33 
34  int step;
35 
39  inline int FindBin(uchar x) {
40  if (x <= 85)
41  return 0;
42  if (x <= 170)
43  return 1;
44  return 2;
45  }
46 
47 };
48 
49 #endif
Definition: Geometry.h:34
Definition: RGIIntegralImage.h:15
Definition: IntegralImage.h:11
RGIIntegralImage(const cv::Mat &img)
Definition: RGIIntegralImage.cpp:3