Update haarfeatures.cpp
This commit is contained in:
parent
8a36402ec0
commit
efacf7b6de
@ -101,12 +101,13 @@ void CvHaarEvaluator::setImage(const Mat& img, uchar clsLabel, int idx)
|
||||
CvFeatureEvaluator::setImage( img, clsLabel, idx);
|
||||
Mat innSum(winSize.height + 1, winSize.width + 1, sum.type(), sum.ptr<int>((int)idx));
|
||||
Mat innSqSum;
|
||||
if (((const CvHaarFeatureParams*)featureParams)->mode == CvHaarFeatureParams::ALL) {
|
||||
Mat innTilted(winSize.height + 1, winSize.width + 1, tilted.type(), tilted.ptr<int>((int)idx));
|
||||
integral(img, innSum, innSqSum, innTilted);
|
||||
if (((const CvHaarFeatureParams*)featureParams)->mode == CvHaarFeatureParams::ALL)
|
||||
{
|
||||
Mat innTilted(winSize.height + 1, winSize.width + 1, tilted.type(), tilted.ptr<int>((int)idx));
|
||||
integral(img, innSum, innSqSum, innTilted);
|
||||
}
|
||||
else
|
||||
integral(img, innSum, innSqSum);
|
||||
integral(img, innSum, innSqSum);
|
||||
normfactor.ptr<float>(0)[idx] = calcNormFactor( innSum, innSqSum );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user