Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

PyramidLayerDownInit

Initializes the structure for creating a lower pyramid layer.

Syntax

Case 1: Operating on integer data

IppStatus ippiPyramidLayerDownInit_8u_C1R(IppiPyramidDownState_8u_C1R** ppState, IppiSize srcRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf, Ipp8u* pBuffer);

IppStatus ippiPyramidLayerDownInit_8u_C3R(IppiPyramidDownState_8u_C3R** ppState, IppiSize srcRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf, Ipp8u* pBuffer);

IppStatus ippiPyramidLayerDownInit_16u_C1R(IppiPyramidDownState_16u_C1R** ppState, IppiSize srcRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf, Ipp8u* pBuffer);

IppStatus ippiPyramidLayerDownInit_16u_C3R(IppiPyramidDownState_16u_C3R** ppState, IppiSize srcRoi, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode, Ipp8u* pStateBuf, Ipp8u* pBuffer);

Case 2: Operating on floating point data

IppStatus ippiPyramidLayerDownInit_32f_C1R(IppiPyramidDownState_32f_C1R** ppState, IppiSize srcRoi, Ipp32f rate, Ipp32f* pKernel, int kerSize, int mode, Ipp8u* pStateBuf, Ipp8u* pBuffer);

IppStatus ippiPyramidLayerDownInit_32f_C3R(IppiPyramidDownState_32f_C3R** ppState, IppiSize srcRoi, Ipp32f rate, Ipp32f* pKernel, int kerSize, int mode, Ipp8u* pStateBuf, Ipp8u* pBuffer);

Platform-aware functions

IppStatus ippiPyramidLayerDownInit_32f_C1R_L(IppiPyramidDownState_32f_C1R_L** pState, IppiSizeL srcRoi, Ipp32f rate, const Ipp32f* pKernel, int kerSize, int mode, Ipp8u* StateBuf, Ipp8u* Buffer);

Include Files

ippcv.h

Flavors with the _L suffix: ippcv_l.h

Domain Dependencies

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

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

Parameters

ppState
Pointer to the pointer to the initialized pyramid layer state structure.
srcRoi
Size of the source image ROI.
rate
Ratio between neighbouring levels (1 < rate 10).
pKernel
Separable symmetric kernel of odd length.
kerSize
Size of the kernel.
mode
Interpolation method, possible value is:

IPPI_INTER_LINEAR

Bilinear interpolation.
pStateBuf
Pointer to the buffer to initialize the pyramid layer state structure.
pBuffer
Pointer to the external buffer.

Description

This function operates with ROI (see Regions of Interest in Intel IPP).

This function initializes the pState structure to build a lower pyramid layer. This structure is used by the ippiPyramidLayerDown function and can be applied to process images with size not greater than dstRoi.

The specified kernel pKernel should be symmetric. If it is not symmetric, the function builds the symmetric kernel using the first part of the specified kernel and returns a warning. The symmetric separable kernel can be not Gaussian. If the sum of kernel elements is not equal to zero, the kernel is normalized.

For integer rates, the function performs downsampling by discarding rows and columns that are not multiples of the rate value. For non-integer rates, the function uses bilinear interpolation (see Linear Interpolation for more information).

For an example on how to use this function, refer to the example provided with the ippiPyramidLayerDown function description.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when at least one of the pointers is NULL.

ippStsSizeErr

Indicates an error when the width or height of images is less than, or equal to zero.

ippStsBadArgErr

Indicates an error when kerSize is even, or equal to or less than 0; or when rate is out of the range.