PyramidLayerDownInitAlloc

Allocates memory and initializes a structure for creating a lower pyramid layer.

Syntax

Case 1: Operation on integer data

IppStatus ippiPyramidLayerDownInitAlloc_<mod>(IppiPyramidDownState_<mod>** ppState, IppiSize srcRoiSize, Ipp32f rate, Ipp16s* pKernel, int kerSize, int mode);

Supported values for mod:

8u_C1R

16u_C1R

8u_C3R

16u_C3R

Case 2: Operation on floating point data

IppStatus ippiPyramidLayerDownInitAlloc_<mod>(IppiPyramidDownState_<mod>** ppState, IppiSize srcRoiSize, Ipp32f rate, Ipp32f* pKernel, int kerSize, int mode);

Supported values for mod:

32f_C1R

32f_C3R

Parameters

ppState
Pointer to the pointer to the pyramid layer structure.
srcRoiSize
Maximal size of source image ROI in pixels.
rate
Ratio between neighbouring levels (1 < rate 10).
pKernel
Pointer to the symmetric separable convolution kernel.
kerSize
Size of the convolution kernel, should be odd and greater than 2.
mode
Specifies the type of interpolation for image downsampling; should be set to IPPI_INTER_LINEAR to perform bilinear interpolation.

Description

The function ippiPyramidLayerDownInitAlloc is declared in the ippcv.h file. It operates with ROI (see Regions of Interest in Intel IPP)

This function allocates memory and initializes the structure pState to build a lower pyramid layer. This structure is used by the function ippiPyramidLayerDown and can be applied to process images with size not greater than srcRoiSize. Generally the specified kernel pKernel should be symmetric. However if it is not symmetric, the function builds the symmetric kernel using its first half, and returns the warning. For integer rates downsampling is performed by discarding rows and columns that are not multiples of the rate value. For non-integer rate bilinear interpolation is used (see appendix B “Linear Interpolation” for more information). The symmetric separable kernel of odd size can be not Gaussian. If the sum of kernel elements is not equal to zero, then the kernel is normalized.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

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

ippStsSizeErr

Indicates an error condition if srcRoiSize has a field with zero or negative value.

ippStsBadArgErr

Indicates an error condition if one of the parameters rate, kerSize, mode has wrong value.

ippStsMemAllocErr

Memory allocation error.

ippStsSymKernelExpected

Indicates a warning if the specified kernel is not symmetric.

Submit feedback on this help topic

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