You are on page 1of 2

Forward Transform: NDxWav2DMEX

Backward Transform: NDixWav2DMEX


Useage: w = NDxWav2DMEX(x, J, Faf, af, nondecimate);
y = NDixWav2DMEX(w, J, Fsf, sf, nondecimate);
x,y - 2D arrays
J - number of decomposition
Faf{i}: tree i first stage analysis filters
af{i}: tree i filters for remaining analysis stages
Fsf{i}: tree i first stage synthesis filters
sf{i}: tree i filters for remaining synthesis stages
Nondecimated: 0 (default) for original decimated version, 1 for completely
decimated version, 2 for decimation of just first level.
w wavelet coefficients
w{a}{b}{c}{d} - wavelet coefficients
a = 1:J (scales)
b = 1 (real part); b = 2 (imag part)
c = 1,2; d = 1,2,3 (orientations)
w{J+1}{a}{b} - lowpass coefficients
a = 1,2; b = 1,2

Example of Usage:
% Original Decimated Version
x = rand(256,256);
J = 4;
[Faf, Fsf] = AntonB;
[af, sf] = dualfilt1;
w = NDxWav2DMEX(x, J, Faf, af,0);
y = NDixWav2DMEX(w, J, Fsf, sf,0);
err = x - y;
max(max(abs(err)))
% Decimated Version 1 (no decimation)
x = rand(256,256);
J = 4;
[Faf, Fsf] = NDAntonB2; %(Must use ND filters for both)
[af, sf] = NDdualfilt1;
w = NDxWav2DMEX(x, J, Faf, af, 1);
y = NDixWav2DMEX(w, J, Fsf, sf, 1);
err = x - y;
max(max(abs(err)))
%Decimated Version 2 (decimation on only first level)
x = rand(256,256);
J = 4;
[Faf, Fsf] = AntonB;
[af, sf] = NDdualfilt1; %(Must use ND filters for just these)
w = NDxWav2DMEX(x, J, Faf, af, 2);
y = NDixWav2DMEX(w, J, Fsf, sf, 2);
err = x - y;
max(max(abs(err)))
% SIZE LIMITS
% (s/J^2) must be bigger than 5 (where s is both height and width)
% Height and width must be divisible by 2^J for fully decimated version

% Height and width must be divisible by 2 for nondecimated version 2

You might also like