next up previous contents index
Next: owtrans_fimage Up: Reference Previous: owave1   Contents   Index

owave2

$ \bigcirc$Name


owave2 Computes the orthogonal wavelet transform of an image




$ \bigcirc$Command Synopsis


owave2 [-r NLevel] [-h HaarNLevel] [-e EdgeMode] [-p PrecondMode] [-i] [-n FilterNorm] Image WavTrans ImpulseResponse [EdgeIR ]



-r NLevel : Number of levels (default 1)

-h HaarNLevel : Continue decomposition with Haar filter until level HaarNLevel

-e EdgeMode : Edge processing mode (0/1/2/3, default 3)

-p PrecondMode : Edge preconditionning mode (0/1/2, default 0)

-i : Invertible transform

-n FilterNorm : Filter taps normalization. 0: no normalization, 1: sum equal to 1.0, 2: squares sum equal to 1.0 (default)

Image : Input image (fimage)

WavTrans : Output wavelet transform of Image (wtrans2d)

ImpulseResponse : Impulse response of inner filters (fsignal)

EdgeIR : Impulse reponses of edge and preconditionning filters (fimage)




$ \bigcirc$Function Summary


void owave2 (NumRec , Haar , Edge , Precond , Inverse , FilterNorm , Image , Output , Ri , Edge_Ri )

int *NumRec ;

int *Haar ;

int *Edge ;

int *Precond ;

int *Inverse ;

int *FilterNorm ;

Fimage Image ;

Wtrans2d Output ;

Fsignal Ri ;

Fimage Edge_Ri ;




$ \bigcirc$Description


owave2 computes the two-dimensional discrete wavelet transform of the floating point image stored in the file Image, according to the pyramidal algorithm of S. Mallat [Mal89].

This module is a generalisation to the 2D case of the owave1 module. This generalisation is done in the same way as in [Mal89], i.e. owave2 performs a semi-separable transform. More precisely, it can be decomposed at each level in two one-level and one-dimensional wavelet transforms applied successively on the lines and on the columns of the image (at level 1) or of the average sub-image (at level 2, 3, ...). It corresponds to a separable multiresolution analysis and a semi-separable wavelet basis on L2(IR2) (here semi-separable means that each 2D wavelet is the tensor product of two 1D wavelets or scaling functions, but that the whole 2D basis is not the tensor product of two 1D bases). The one-dimensional algorithm is the one that is implemented in owave1, and the reader is refered to the documentation of this module for its description. Here, only the multidimensional aspect of the algorithm is developed.

Suppose that {Vj} is a multiresolution analysis on L2(IR). Then Vj = Vj $ \otimes$ Vj is a multiresolution analysis on L2(IR2). If $ \varphi$ is the scaling function associated to Vj then $ \Phi$(x, y) = $ \varphi$(x)$ \varphi$(y) is the scaling function associated to Vj, and {2-j$ \Phi$(2-j. - k, 2-j. - l )}k, l $\scriptstyle \in$ Z is an orthonormal basis of Vj.

As for the one-dimensional case, the projection PVjf of a function f of L2(IR2) onto Vj represents the approximation of f at scale 2j. Here again the coordinates of f in the basis {2-j$ \Phi$(2-j. - k, 2-j. - l )}k, l $\scriptstyle \in$ Z are noted Aj[k, l]. Aj can be considered as an average of the original image at resolution 2j.

As in one-dimensional case, the space of details Wj is the orthogonal complement of Vj in Vj-1. Now it can be decomposed as a direct sum of three orthogonal subspaces W1j, W2j, and W3j. Each of these subspaces can be generated by a mother wavelet :

Indeed {2-j$ \Psi^{{i}}_{}$(2-j. - k, 2-j. - l )}k, l $\scriptstyle \in$ Z is an orthonormal basis of Wij, i = 1, 2, 3.

The coordinates of the function f in each of these basis are noted respectively D1j[k, l], D2j[k, l], and D3j[k, l]. D1j[k, l] represents the details of f in the horizontal direction (it is an average in the vertical direction). D2j[k, l] represents the details in the vertical direction (it is an average in the horizontal direction). D3j[k, l] represents details in both directions, and in some sense the corners in the image.

If f is in V0 and its coordinates {A0[k, l]}0 $\scriptstyle \leq$ k $\scriptstyle \leq$ K-1, 0 $\scriptstyle \leq$ l $\scriptstyle \leq$ L-1 are stored in the file Image, then owave2 computes the wavelet representation of f, i.e. the sequence of details and average 2D signals or ``sub-images'' D11, D12,..., D1J, D21,...D2J, D31,..., D3J, AJ, where J is a positive integer. This is done recursively, at each step the one level one-dimensional wavelet transform is applied to each line of Aj, resulting in two sub-images. Then the one level one-dimensional wavelet transform is applied to each sub-images' column.

The different methods for computing the edge coefficients are the same as for the univariate case (see owave1), unless the dimensions of the image are not multiples of 2J and the invertible mode (option -i) is not activated. Suppose that at some level j of the decomposition, the dimensions of the average are not even, say for instance that the number of columns is 2n + 1 for some integer n. Then for the 1D wavelet transforms along the lines, only the first 2n coefficients are used, and the last coefficients are multiplied by a constant (equal to the sum of the I.R. coefficients) and concatenated to the resulting average subsignals at level j + 1. Thus the resulting subimages Aj+1 and D1j+1 have n + 1 columns, while D2j+1 and D3j+1 have n columns.

Because of the down-sampling, the size of the sub-images is divided by two in both directions at each step. So the total size of the sub-image is divided by four. As a consequence, if the problem of edges is omitted, the size of the wavelet decomposition, obtained by adding the size of all the sub-images composing it, is equal to the size of the original sub-image. Moreover the parameter J is upperbounded.

The complexity of the algorithm is 2(2 - 2-J+1)N dx dy multiplications and additions, where dx and dy are respectively the number of columns and the number of lines in the original image.

The resulting sub-images AJ, D11, D12,..., D1J, D21, D22,..., D2J, and D31, D32,..., D3J are stored in files having all the same prefix Wavtrans. The name of the file is prefix_j_A.wtrans2d for Aj and prefix_j_D.wtrans2d for Dj.

The coefficients hk of the filter's impulse response are read in the file ImpulseResponse. The coefficients of the filter's impulse response for computing the edge coefficients are read in the file EdgeIR.




$ \bigcirc$See Also


precond2d, sconvolve.

dyowave2, fezw, fwvq.


$ \bigcirc$Version 1.3


Last Modification date : Thu Jan 31 15:08:21 2002


$ \bigcirc$Author


Jean-Pierre D'Ales






next up previous contents index
Next: owtrans_fimage Up: Reference Previous: owave1   Contents   Index
mw 2004-05-05