//定义一个宏。宏里面是指针函数
#define CV_INT_HAAR_CLASSIFIER_FIELDS() \
float (*eval)( CvIntHaarClassifier*, sum_type*, sum_type*, float ); \ //计算分类器haar特征值
void (*save)( CvIntHaarClassifier*, FILE* file ); \ //保存haar特征值
void (*release)( CvIntHaarClassifier** ); //释放特征值
/* internal weak classifier*/
typedef struct CvIntHaarClassifier//内部弱分类器
{
CV_INT_HAAR_CLASSIFIER_FIELDS()
} CvIntHaarClassifier;
/*
* CART classifier
*/
typedef struct CvCARTHaarClassifier
{
CV_INT_HAAR_CLASSIFIER_FIELDS()
int count;
int* compidx;
CvTHaarFeature* feature;
CvFastHaarFeature* fastfeature;
float* threshold;
int* left;
int* right;
float* val;
} CvCARTHaarClassifier;