WTFwdInitAlloc

Allocates memory and initializes the forward wavelet transform context structure.

Syntax

IppStatus ippiWTFwdInitAlloc_32f_C1R(IppiWTFwdSpec_32f_C1R** ppSpec, const Ipp32f* pTapsLow, int lenLow, int anchorLow, const Ipp32f* pTapsHigh, int lenHigh, int anchorHigh);

IppStatus ippiWTFwdInitAlloc_32f_C3R(IppiWTFwdSpec_32f_C3R** ppSpec, const Ipp32f* pTapsLow, int lenLow, int anchorLow, const Ipp32f* pTapsHigh, int lenHigh, int anchorHigh);

Parameters

ppSpec
Double pointer to the forward DWT context structure.
pTapsLow
Pointer to lowpass filter taps.
lenLow
Length of the lowpass filter.
anchorLow
Anchor position of the lowpass filter.
pTapsHigh
Pointer to highpass filter taps.
lenHigh
Length of the highpass filter.
anchorHigh
Anchor position of the highpass filter.

Description

The function ippiWTFwdInitAlloc is declared in the ippi.h file. This function allocates memory for the context structure pSpec of a one-level wavelet decomposition and initializes this structure.

The forward wavelet transform context structure contains parameters of a wavelet filter bank used for image decomposition. The filter bank consists of two analysis filters and includes the lowpass decomposition filter (or coarse filter) and the highpass decomposition filter (or detail filter).

The parameters pTapsLow and pTapsHigh specify coefficients, and anchorLow and anchorHigh - anchor positions for two synthesis filters. The anchor value sets the initial leftmost filter position relative to image row or column as shown in the Figure “Anchor Value and Initial Filter Position for Wavelet Decomposition”:

Anchor Value and Initial Filter Position for Wavelet Decomposition

Here a stands for anchor value, N is filter length, x0 is the starting pixel of the processed row or column, and x-1, x-2 ,... are the additional border pixels that are needed for calculations. The anchor value and filter length completely determine right, left, top, and bottom border sizes for the source image used in decomposition. The corresponding C-language expressions to calculate border sizes are given in the description of ippiWTFwd function.

Once allocated and initialized the context structure can be used in several threads of calculations as well as in a number of wavelet decomposition levels.

Example “Using Intel IPP Functions for Wavelet Transforms” shows how to use the function ippiWTFwdInitAlloc_32f_C1R.

Return Values

ippStsNoErr

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

ippStsNullPtrErr

Indicates an error condition if pTapsLow, pTapsHigh, or pSpec pointer is NULL.

ippStsSizeErr

Indicates an error condition if filter length lenLow or lenHigh is less then 2.

ippStsAnchorErr

Indicates an error condition if anchor position anchorLow or anchorHigh is less then zero.

ippStsMemAllocErr

Indicates an error condition in case of memory allocation failure for the context structure.

Submit feedback on this help topic

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