imgidwt [-w wavelet] [-b boundary] [-pw pcpfile] [-m mask] [-l last_subband] subband_pyramid imgfile
imgdwt implements a 2D separable discrete wavelet transform (DWT) of grayscale image imgfile. This wavelet decomposition is accomplished by applying a 1D DWT, first along every row and then along every column. The output of this process is a low-resolution approximation (the baseband image) to the original image, as well as highpass subbands in the horizontal, vertical, and diagonal directions. The baseband and the highpass subbands are each one quarter the size of the original image. If levels is greater than 1, then this process is repeated on the baseband; i.e., the baseband subband is recursively decomposed. The resulting subbands of these decompositions are recursively nested in the upper-left of subband_pyramid in a so-called dyadic, or octave, subband-pyramid structure. subband_pyramid has the same number of rows and columns as imgfile.
wavelet is the name of a file containing either the filter bank (FBK format) or lifting scheme (LFT format) to use in performing the DWT. The name of the filter-bank/lifting-scheme file is given by wavelet; this file must be found in the path given by the environment variable QCCPACK_WAVELET_PATH. The appropriate transform implementation (filter bank, lifting) is used based upon the type (FBK, LFT) of the found file. If the user does not specify a wavelet, the default wavelet is a lifting implementation of the Cohen-Feauveau-Daubechies 9/7 spline with less dissimilar lengths, a biorthogonal wavelet popular wavelet for image-processing applications (see Cohen et al., Antonini et al.).
boundary gives the method for handling the image boundaries. Possible values for boundary are described in the page for QccWAVWavelet(3) . Not all boundary methods are permitted for all wavelets; check the comments at the start of FBK or LFT files for possible values for particular wavelets. The default boundary-extension method is "symmetric".
If the -pw option is specified, then each wavelet coefficient is perceptually weighted after the DWT is performed. Perceptual weights are given by the file pcpfile (PCP format); this file must be found in the path given by the environment variable QCCPACK_WAVELET_PATH. The perceptual weights in pcpfile are the reciprocals of the just-noticeable distortions (JND) for the subbands. That is, perceptual weighting is accomplished by multiplying each wavelet coefficient by the appropriate weight given in pcpfile (see QccWAVPerceptualWeights(3) and Hontsch et al.). In the absense of the -pw option, no perceptual weighting is used (the default).
If the -m option is specified, imgdwt performs a shape-adaptive DWT (SA-DWT), in which case, mask gives the transparency mask indicating which pixels are to be transformed. mask must be a grayscale image in which black in this image indicates transparency, white indicates full opacity, and gray tones are degrees of translucence (see QccAlpha(3) ). If the -m option is not given, the usual DWT is used. See QccWAVSubbandPyramidShapeAdaptiveDWT2D(3) and Li and Li for more information on the SA-DWT. Note that imgdist (1) can perform "shape-adaptive" distortion calculations, i.e., distortion only over non-transparent regions, as needed for measuring performance of SA-DWT based operations.
Note: sbpsplit may be used to split a subband pyramid into separate subband files.
imgidwt implements the corresponding inverse DWT or inverse SA-DWT. Perceptual weighting (if any) is removed before the inverse transform is performed. The transparency mask, if used, should be the same as used by imgdwt. The number of levels of inverse DWT to be performed is extracted from the header of subband_pyramid. If the -l option is specified, last_subband gives the last subband to include in the inverse DWT. That is, imgidwt will zero out the subbands numbered greater than or equal to last_subband + 1 in the subband pyramid before taking the inverse transform. The subband zeroing is performed via a call to QccWAVSubbandPyramidZeroSubband(3) . For example, to see what retaining only the baseband coefficients looks like, use last_subband = 0.
A. Cohen, I. Daubechies, J. C. Feauveau, "Biorthogonal Bases of Compactly Supported Wavelets," Communications on Pure and Applied Mathematics, vol. 45, no. 5, pp. 485-560, May 1992.
M. Antonini, M. Barlaud, P. Mathieu, I. Daubechies, "Image Coding Using Wavelet Transform," IEEE Transactions on Image Processing, vol. 1, no. 2, pp. 205-220, April 1992.
I. Hontsch, L. J. Karam, and R. J. Safranek, "A Perceptually Tuned Embedded Zerotree Image Coder," Proceedings of the IEEE International Conference on Image Processing, vol. 1, pp. 41-44, October 1997.
S. Li and W. Li, "Shape-Adaptive Discrete Wavelet Transforms for Arbitrarily Shaped Visual Object Coding," IEEE Transactions on Circuits and Systems for Video Coding, vol. 10, pp. 725-743, August 2000.