Developer Reference

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

ApplyMixedHaarClassifier

Applies a mixed Haar classifier to an image.

Syntax

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
);
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
pSrc
Pointer to the ROI in the source image of integrals.
srcStep
Distance, in bytes, between the starting points of consecutive lines in the source image of integrals.
pTilt
Pointer to the ROI in the source image of tilted integrals.
tiltStep
Distance, in bytes, between the starting points of consecutive lines in the source image of tilted integrals.
pNorm
Pointer to the ROI in the source image of norm factors.
normStep
Distance, in bytes, between the starting points of consecutive lines in the image of the norm factors.
pMask
Pointer to the source and destination image of classification decisions.
maskStep
Distance, in bytes, between the starting points of consecutive lines in the image of classification decisions.
pPositive
Pointer to the number of positive decisions.
roiSize
Size of the source and destination images ROI in pixels.
threshold
Stage threshold value.
pState
Pointer to the mixed Haar classifier structure.
scaleFactor
Scale factor (see Integer Integer Result Scaling).
Description
This function 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 HaarClassifierInit and then modified by the TiltHaarFeatures function. 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 (
y
l
,
x
l
) and (
Y
l
,
X
l
) are coordinates of top left and right bottom pixels of
l
-th rectangle of the feature , and
w
l
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]
.
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error when one of the specified pointers is
NULL
.
ippStsSizeErr
Indicates an error when
roiSize
has a field with a zero or negative value.
ippStsStepErr
Indicates an error when one of the image step values is less than
roiSize.width
*<
pixelSize
>
.
ippStsNorEvenStepErr
Indicates an error when one of the image step values is not divisible by 4 for 32-bit images.

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