Allocates memory and initializes the structure for standard Haar classifiers.
IppStatus ippiHaarClassifierInitAlloc_32f(IppiHaarClassifier_32f** pState, const IppiRect* pFeature, const Ipp32f* pWeight, const Ipp32f* pThreshold, const Ipp32f* pVal1, const Ipp32f* pVal2, const int* pNum, int length);
IppStatus ippiHaarClassifierInitAlloc_32s(IppiHaarClassifier_32s** pState, const IppiRect* pFeature, const Ipp32s* pWeight, const Ipp32s* pThreshold, const Ipp32s* pVal1, const Ipp32s* pVal2, const int* pNum, int length);
The function ippiHaarClassifierInitAlloc is
declared in the ippcv.h file. This function allocates
memory and initializes the structure for the sequence of Haar classifiers
- classification stage. i-th classifier
in the stage has pNum[i] rectangular features. Each feature
is defined by the certain rectangle with horizontal and vertical
sides. The length of vectors pThreshold,
pVal1, and pVal2 is
equal to length, the length
of vectors pFeature, pWeight is
equal to:
Result of applying classifiers to the image is computed using the formula.
All features of the classifier initialized by the function ippiHaarClassifierInitAlloc have vertical and horizontal sides (left part of Figure “Representing Haar Features”). Some of these features later can be tilted using the function ippiTiltHaarFeatures.
ippStsNoErr |
Indicates no error. |
ippStsNullPtrErr |
Indicates an error if one of the specified pointer is NULL. |
ippStsSizeErr |
Indicates an error condition if length or one of pNum[i] is less than or equal to 0. |
ippStsBadArgErr |
Indicates an error condition if one of features is defined incorrectly. |
ippStsMemAllocErr |
Memory allocation error |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.