#define CV_HAAR_FEATURE_MAX 3 //提前定义的一个宏,在程序中表示一个haar特征由至多三个矩形组成 #define CV_HAAR_FEATURE_DESC_MAX 20 //提前定义的一个宏,描写叙述haar特征的一个类型 typedef int sum_type; typedef double sqsum_type; typedef short idx_type; #define CV_SUM_MAT_TYPE CV_32SC1 #define CV_SQSUM_MAT_TYPE CV_64FC1 #define CV_IDX_MAT_TYPE CV_16SC1 #define CV_STUMP_TRAIN_PORTION 100 #define CV_THRESHOLD_EPS (0.00001F) typedef struct CvTHaarFeature { char desc[CV_HAAR_FEATURE_DESC_MAX]; int tilted; struct { CvRect r; float weight; } rect[CV_HAAR_FEATURE_MAX]; } CvTHaarFeature; typedef struct CvFastHaarFeature { int tilted; struct { int p0, p1, p2, p3; float weight; } rect[CV_HAAR_FEATURE_MAX]; } CvFastHaarFeature; typedef struct CvIntHaarFeatures { CvSize winsize; int count; CvTHaarFeature* feature; CvFastHaarFeature* fastfeature; } CvIntHaarFeatures;
时间: 2024-10-10 01:32:22