00001
00002
00003
00004
00005
00006
00007
00008 #ifndef CHAARFEATURE_H_
00009 #define CHAARFEATURE_H_
00010
00011 #include <vector>
00012 #include <opencv2/opencv.hpp>
00013 using namespace std;
00014
00015 class CHaarFeature
00016 {
00017 public:
00018 int nr_reg;
00019 vector<double> weights;
00020 vector<int> regions;
00021
00022
00023 CHaarFeature(int r1x1, int r1x2, int r1y1, int r1y2, int r2x1, int r2x2, int r2y1, int r2y2, double r1weight, double r2weight );
00024
00025 CHaarFeature(int r1x1, int r1x2, int r1y1, int r1y2, int r2x1, int r2x2,int r2y1, int r2y2, int r3x1, int r3x2, int r3y1, int r3y2, double r1weight, double r2weight, double r3weight);
00026
00027 CHaarFeature(int r1x1, int r1x2, int r1y1, int r1y2,
00028 int r2x1, int r2x2, int r2y1, int r2y2,
00029 int r3x1, int r3x2, int r3y1, int r3y2,
00030 int r4x1, int r4x2, int r4y1, int r4y2,
00031 double r1weight, double r2weight, double r3weight, double r4weight);
00032
00033
00034 double calcFval(cv::Mat heightsIntegral, int pos_x, int pos_y);
00035 };
00036
00037 #endif