转载自: http://blog.csdn.net/wuxiaoyao12/article/details/48088999
上图显示的参数,大多与opencv_traincascade.exe的输入参数已知。其中maxCatCount和featSize定义如下
maxCatCount:int maxCatCount; // 0 in case of numerical features
featSize:int featSize; // 1 in case of simple features (HAAR,LBP) and N_BINS(9)*N_CELLS(4) in case of Dalal's HOG features
feature结构对于上两值默认的是:
CvFeatureParams::CvFeatureParams() : maxCatCount( 0 ),featSize( 1 ) {...};
其中
LBP:maxCatCount = 256;
HOG:featSize = N_BINS * N_CELLS;
其他情况均用默认值。
关于maxWeakCount、stageThreshold和weakClassifiers,如下:
@H_404_85@
[cpp] view plain copy
- voidCvCascadeBoost::write(FileStorage&fs,constMat&featureMap)const
- {
- CvCascadeBoostTree*weakTree;
- fs<<CC_WEAK_COUNT<<weak->total;//弱分类器总数
- fs<<CC_STAGE_THRESHOLD<<threshold;//见后续补充
- fs<<CC_WEAK_CLASSIFIERS<<"[";
- for(intwi=0;wi<weak->total;wi++)
- {
- weakTree=*((CvCascadeBoostTree**)cvGetSeqElem(weak,wi));
- weakTree->write(fs,featureMap);
- }
- fs<<"]";
- }