Developer Reference for Intel® Integrated Performance Primitives 2018

HOG

Computes the HOG descriptor.

Syntax

IppStatus ippiHOG_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, IppiSize roiSize, const IppiPoint* pLocation, int nLocations, Ipp32f* pDst, const IppiHOGSpec* pHOGSpec, IppiBorderType borderID, Ipp<srcDatatype> borderValue, Ipp8u* pBuffer);

Supported values for mod:

8u32f_C1R

16u32f_C1R

16s32f_C1R

32f_C1R

IppStatus ippiHOG_<mod>(const Ipp<srcDatatype>* pSrc, int srcStep, IppiSize roiSize, const IppiPoint* pLocation, int nLocations, Ipp32f* pDst, const IppiHOGSpec* pHOGCtx, IppiBorderType borderID, Ipp<srcDatatype> borderValue[3], Ipp8u* pBuffer);

Supported values for mod:

8u32f_C3R

16u32f_C3R

16s32f_C3R

32f_C3R

Include Files

ippi.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

pSrc
Pointer to the source image ROI.
srcStep
Distance, in bytes, between the starting points of consecutive lines in the source image.
roiSize
Size of the source image ROI, in pixels.
pLocation
Pointer to the array with detection window locations.
nLocations
Number of locations.
pDst
Pointer to the HOG descriptor.
pHOGCtx, pHOGSpec
Pointer to the HOG context/specification structure.
borderID

Type of border. Possible values are:

ippBorderConst

Values of all border pixels are set to a constant.

ippBorderRepl

Border is replicated from the edge pixels.

ippBorderInMem

Border is obtained from the source image pixels in memory.

ippBorderMirror

Border pixels are mirrored from the source image boundary pixels.

Mixed borders are also supported. They can be obtained by the bitwise operation OR between ippBorderRepl and ippBorderInMemTop, ippBorderInMemBottom, ippBorderInMemLeft, ippBorderInMemRight.

borderValue

Constant value to assign to pixels of the constant border. This parameter is applicable only to the ippBorderConst border type.

pBuffer
Pointer to the work buffer.

Description

This function computes the HOG descriptor over defined locations of the detection window. Flavors with the C1 suffix operate on one-channel (gray) images, and C3 flavors operate on color images.

Before using this function, compute the size of the context structure, work buffer, and descriptor using the HOGGetSize, HOGGetBufferSize, and HOGGetDescriptorSize functions, respectively. To initialize the HOG context structure, use the HOGInit function.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsContextmatchErr

Indicates an error when the context parameter does not match the operation.

ippStsStepErr

Indicates an error when srcStep is less than, or equal to zero.

ippStsNotEvenStepErr

Indicates an error when srcStep is not divisible by input data type size.

ippStsBorderErr

Indicates an error when borderID has an illegal value.

ippStsSizeErr

Indicates an error when roiSize is less than, or equal to zero.

Example

HOG.c

See Also