TiltedHaarClassifierInitAlloc

Allocates memory and initializes the structure for tilted Haar classifiers.

Syntax

IppStatus ippiTiltedHaarClassifierInitAlloc_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 ippiTiltedHaarClassifierInitAlloc_32s(IppiHaarClassifier_32s** pState, const IppiRect* pFeature, const Ipp32s* pWeight, const Ipp32s* pThreshold, const Ipp32s* pVal1, const Ipp32s* pVal2, const int* pNum, int length);

Parameters

ppState
Pointer to the pointer to the Haar classifier structure.
pFeature
Pointer to the array of features.
pWeight
Pointer to the array of feature weights.
pThreshold
Pointer to the array of classifier threshold values.
pVal1, pVal2
Pointers to the arrays of classifier result values.
pNum
Pointer to the array of classifier lengths.
length
Number of classifiers in the stage.

Description

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. t-th classifier in the stage has pNum[i] rectangular features. Each feature is defined by the certain rectangle with sides tilted by 45 degrees. The points with minimum and maximum row numbers should be specified. The length of vectors pFeature, pWeight, pThreshold, pVal1, and pVal2 is equal to:

Result of applying classifiers to the image are computed using the the formula.

All features of the classifier initialized by the function ippiHaarClassifierInitAlloc have tilted sides (right part of Figure “Representing Haar Features”).

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition 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; or if the sum of all elements of pNum is not equal to length.

ippStsBadArgErr

Indicates an error condition if one of features is defined incorrectly.

ippStsMemAllocErr

Memory allocation error

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.