Foundation (CVFoundation.dll) 14.0
Wavelet Transformation

Functions

cvbres_t ForwardWaveletTransform (IMG ImgIn, TWaveletFilter FilterType, cvbdim_t AnchorLow, cvbdim_t AnchorHigh, double LowpassFilter[], double HighpassFilter[], cvbdim_t LengthFilter, IMG &ImgApproximation, IMG &ImgDetailX, IMG &ImgDetailY, IMG &ImgDetailXY)
 This function performs the two-dimensional wavelet decomposition on the input image. More...
 
cvbres_t InverseWaveletTransform (TWaveletFilter FilterType, cvbdim_t AnchorLow, cvbdim_t AnchorHigh, double LowpassFilter[], double HighpassFilter[], cvbdim_t LengthFilter, IMG ImgApproximation, IMG ImgDetailX, IMG ImgDetailY, IMG ImgDetailXY, IMG &ImgOut)
 This function performs the two-dimensional inverse wavelet transform on the sub-images. More...
 

Detailed Description

Function Documentation

◆ ForwardWaveletTransform()

cvbres_t ForwardWaveletTransform ( IMG  ImgIn,
TWaveletFilter  FilterType,
cvbdim_t  AnchorLow,
cvbdim_t  AnchorHigh,
double  LowpassFilter[],
double  HighpassFilter[],
cvbdim_t  LengthFilter,
IMG ImgApproximation,
IMG ImgDetailX,
IMG ImgDetailY,
IMG ImgDetailXY 
)

This function performs the two-dimensional wavelet decomposition on the input image.

Multi-resolution transformation has been recognised as a very useful approach to analyse the information content of images. The wavelet transform is a signal analysis tool that provides a multi-resolution decomposition of an image using (bi-)orthogonal base functions and results in a non-redundant image representation. The base functions are called wavelets, and they are generated from one single function, called mother wavelet, by dilations and translations.
In a two-dimensional transform, the wavelets measure intensity variations along different directions (along columns and rows) highlighting details in three different orientations (horizontal, vertical, and diagonal).

The forward/inverse wavelet transform use the fast polyphase algorithm which is equivalent to traditional application of separable convolution and dyadic resampling in different order. The following image shows the discrete wavelet decomposition:

ForwardWaveletTransform Image: Intel Integrated Performance Primitives, Reference Manual, Volume 2: Image and Video Processing. Ipp 7.0

The decomposition components have following meaning:

  • The "approximation" (ImgApproximation) image shows the intensity/grey-level intensities of the low-pass sub-image and is obtained by vertical and horizontal low-pass filtering.
  • The "horizontal detail" (ImgDetailX) image measures the vertical variations (like horizontal edges) and is obtained by vertical high-pass and horizontal low-pass filtering.
  • The "vertical detail" (ImgDetailY) image measures the horizontal variations (like vertical edges) and is obtained by vertical low-pass and horizontal high-pass filtering.
  • The "diagonal detail" (ImgDetailXY) image measures the variations along diagonals (like corners) and is obtained by vertical and horizontal high-pass filtering.

The filter bank consists of two analysis filters and includes the low-pass decomposition filter (or coarse filter) and the high-pass decomposition filter (or detail filter). The parameters AnchorLow and AnchorHigh describe the filter offset within the low-pass/high-pass filter. The anchor value sets the initial leftmost filter position
relative to image row or column as shown in the following image (where N is LengthFilter):

FilterPosition Image: Intel Integrated Performance Primitives, Reference Manual, Volume 2: Image and Video Processing. Ipp 7.0

If you use the pre-defined filters (see #TWaveletFilter for more information) you can pass 0 to the properties LowpassFilter, HighpassFilter, and LengthFilter.

Parameters
[in]ImgInHandle of source image to compute wavelet decomposition for.
[in]FilterTypeWavelet/Scaling filters to be applied in the filter bank. Choose either pre-defined filters or apply a custom defined filter. See #TWaveletFilter for more information.
[in]AnchorLowAnchor position within low-pass (scaling) filter. This value must be between 0 and LengthFilter - 1.
[in]AnchorHighAnchor position within high-pass (wavelet) filter. This value must be between 0 and LengthFilter - 1.
[in]LowpassFilterFilter coefficients of low-pass filter. This parameter is only used when WT_CUSTOM is used as filter type
(FilterType).
[in]HighpassFilterFilter coefficients of high-pass filter. This parameter is only used when WT_CUSTOM is used as filter type
(FilterType).
[in]LengthFilterLength of high-pass and low-pass filter.
[out]ImgApproximationHandle off low-pass sub-image (approximation).
[out]ImgDetailXHandle of detail image representing vertical variations.
[out]ImgDetailYHandle of detail image representing horizontal variations.
[out]ImgDetailXYHandle of detail image representing diagonal variations.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64
Related Topics:
InverseWaveletTransform, #TWaveletFilter

◆ InverseWaveletTransform()

cvbres_t InverseWaveletTransform ( TWaveletFilter  FilterType,
cvbdim_t  AnchorLow,
cvbdim_t  AnchorHigh,
double  LowpassFilter[],
double  HighpassFilter[],
cvbdim_t  LengthFilter,
IMG  ImgApproximation,
IMG  ImgDetailX,
IMG  ImgDetailY,
IMG  ImgDetailXY,
IMG ImgOut 
)

This function performs the two-dimensional inverse wavelet transform on the sub-images.

The following image shows the discrete wavelet reconstruction:

InverseWaveletTransform Image: Intel Integrated Performance Primitives, Reference Manual, Volume 2: Image and Video Processing. Ipp 7.0

The filter bank consists of two synthesis filters and includes the low-pass reconstruction filter (or coarse filter) and the high-pass reconstruction filter (or detail filter). The parameters AnchorLow and AnchorHigh describe the filter offset within the low-pass/high-pass filter. The anchor value sets the initial leftmost filter position relative to image row or column as shown in the following image (where N is LengthFilter):

FilterPosition Image: Intel Integrated Performance Primitives, Reference Manual, Volume 2: Image and Video Processing. Ipp 7.0

Note
To achieve perfect reconstruction the offset within the reconstruction filters is defined as AnchorLow = LengthFilter - AnchorLowAnalysis - 1.
Where AnchorLowAnalysis is the offset used in the ForwardWaveletTransform. The same rule applies for the high-pass synthesis filter.
Parameters
[in]FilterTypeWavelet/Scaling filters to be applied in the filter bank. Choose either pre-defined filters or apply a custom defined filter. See #TWaveletFilter for more information.
[in]AnchorLowAnchor position within low-pass (scaling) filter. This value must be between 0 and LengthFilter - 1.
[in]AnchorHighAnchor position within high-pass (wavelet) filter. This value must be between 0 and LengthFilter - 1.
[in]LowpassFilterFilter coefficients of low-pass filter. This parameter is only used when WT_CUSTOM is used as filter type
(FilterType).
[in]HighpassFilterFilter coefficients of high-pass filter. This parameter is only used when WT_CUSTOM is used as filter type
(FilterType).
[in]LengthFilterLength of high-pass and low-pass filter.
[in]ImgApproximationHandle off low-pass sub-image (approximation).
[in]ImgDetailXHandle of detail image representing vertical variations.
[in]ImgDetailYHandle of detail image representing horizontal variations.
[in]ImgDetailXYHandle of detail image representing diagonal variations.
[out]ImgOutHandle of result image to store reconstructed image in.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64
Related Topics:
ForwardWaveletTransform, #TWaveletFilter