Applies a mixed Haar classifier to an image.
IppStatus ippiApplyMixedHaarClassifier_32f_C1R(const Ipp32f* pSrc, int srcStep, const Ipp32f* pTilt, int tiltStep, const Ipp32f* pNorm, int normStep, Ipp8u* pMask, int maskStep, IppiSize roiSize, int* pPositive, Ipp32f threshold, IppiHaarClassifier_32f* pState);
IppStatus ippiApplyMixedHaarClassifier_32s32f_C1R(const Ipp32s* pSrc, int srcStep, const Ipp32s* pTilt, int tiltStep, const Ipp32f* pNorm, int normStep, Ipp8u* pMask, int maskStep, IppiSize roiSize, int* pPositive, Ipp32f threshold, IppiHaarClassifier_32f* pState);
IppStatus ippiApplyMixedHaarClassifier_32s_C1RSfs(const Ipp32s* pSrc, int srcStep, const Ipp32s* pTilt, int tiltStep, const Ipp32s* pNorm, int normStep, Ipp8u* pMask, int maskStep, IppiSize roiSize, int* pPositive, Ipp32s threshold, IppiHaarClassifier_32s* pState, int scaleFactor);
The function ippiApplyMixedHaarClassifier is declared in the ippcv.h file. It operates with ROI (see Regions of Interest in Intel IPP).
This function applies the mixed Haar classifier
pState to the ROI of the source
images pSrc and
pTilt. The mixed Haar classifier
is a classifier initialized by the function ippiHaarClassifierInitAlloc and then modified by the function ippiTiltHaarFeatures. The source images must be in the integral representation, they
can be obtained by calling one of the
integral functions beforehand. Common features are applied to the
pSrc image, and tilted features
are applied to the pTilt image.The
sum of pixels on feature rectangles is computed as:
Here (yl, xl) and (Yl, Xl) are coordinates of top left and right bottom pixels of l-th rectangle of the feature , and wl is the feature weight. For i = 0. roiSize.height - 1, j = 0. roiSize.width - 1 all pixels referred in the above formula should be allocated in memory.
The input value of pPositive [0] is used as a hint to choose the calculation algorithm. If it is greater than or equal to roiSize.width*roiSize.height the value of the classifier is calculated in accordance with the above formula for all pixels of the input image. Otherwise the value of the classifier is calculated for all non-zero pixels of pMask image. If the sum is less than threshold than the negative decision is made and the value of the corresponding pixel of the pMask image is set to zero. The number of positive decisions is assigned to the pPositive[0].
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error if one of the specified pointer is NULL. |
ippStsSizeErr |
Indicates an error condition if roiSize has a field with zero or negative value. |
ippStsStepErr |
Indicates an error condition if one of the image step values is less than roiSize.width*< pixelSize>. |
ippStsNorEvenStepErr |
Indicates an error condition if one of the image step values is not divisible by 4 for 32-bit images. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.