Developer Reference

  • 2020
  • 10/21/2020
  • Public Content
Contents

HaarClassifierInit

Initializes the structure for standard Haar classifiers.

Syntax

IppStatus ippiHaarClassifierInit_32f(IppiHaarClassifier_32f**
ppState
, const IppiRect*
pFeature
, const Ipp32f*
pWeight
, const Ipp32f*
pThreshold
, const Ipp32f*
pVal1
, const Ipp32f*
pVal2
, const int*
pNum
, int
length
);
IppStatus ippiHaarClassifierInit_32s(IppiHaarClassifier_32s**
ppState
, const IppiRect*
pFeature
, const Ipp32s*
pWeight
, const Ipp32s*
pThreshold
, const Ipp32s*
pVal1
, const Ipp32s*
pVal2
, const int*
pNum
, int
length
);
Include Files
ippcv.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
,
ippi.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
,
ippi.lib
Parameters
ppState
Double 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 Haar classifier lengths.
length
Number of classifiers in the stage.
Description
This function initializes the state structure that is required to calculate the sequence of Haar classifiers - classification stage. The
i
-th classifier in the stage has
pNum[i]
rectangular features. Each feature is defined by a certain rectangle with horizontal and vertical sides. The length of the
pThreshold
,
pVal1
, and
pVal2
vectors is equal to
length
. The length of
pFeature
and
pWeight
is equal to:
Result of applying classifiers to the image is computed using the formula in "Object Detection Using Haar-like Features".
All features of the classifier initialized by the
ippiHaarClassifierInit
function have vertical and horizontal sides (left part of Figure
“Representing Haar Features”
). Some of these features then can be tilted using the
ippiTiltHaarFeatures
function.
Return Values
ippStsNoErr
Indicates no error. Any other value indicates an error or a warning.
ippStsNullPtrErr
Indicates an error when any of the specified pointers is
NULL
.
ippStsSizeErr
Indicates an error when
length
or one of the
pNum[i]
values is less than, or equal to zero.
ippStsBadArgErr
Indicates an error when one of the features is defined incorrectly.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804