Tuesday, February 14, 2012

WPT using Uvi_wave wavelet toolbox

w = wpk2d(lena,h3,g3,basis2d);%transform lena image with analysis filters h3 and g3 with basis2d
pw = insband(0,w,basis2d,1); %set the low frequencies/low-pass coefficients/approximation part to ZERO
p = iwpk2d(pw,rh3,rg3,basis2d); %reconstruct the image of lena with synthesis filters rh3 and rg3
[x1,y1,x2,y2] = siteband(sizx,sizy,basis,1); % locate the low-pass coefficients
wx(y1:y2,x1:x2)=wx(y1:y2,x1:x2) + 10 % adjust low-pass coefficients

where sizx = size(x,2) (number of columns) and sizy = size(x,1) (number of rows).

Format of the basis vector

The vector elements indicating the depth of every terminal node in the tree. The first element always corresponds to the branch performing the most lowpass filter iteration.

basis1d=[Approximation(A), Detail(D)]
basis=[1 3 3 2].

The basis encoding for 2-D signals is similar to the 1-D case. basis vector goes over the terminal nodes of the filter bank tree, holding a value for each node: its depth level in the tree. Notice that a basis format "frequency ordered" has not been considered for the 2-D case.

basis2d = [Approximation (A), Vertical (V), Horizontal (H), Diagonal (D)]
basis = [2 2 2 2  2 2 2 2  1  1].

No comments:

Post a Comment

Mounting USB drives in Windows Subsystem for Linux

Windows Subsystem for Linux can use (mount): SD card USB drives CD drives (CDFS) Network drives UNC paths Local storage / drives Drives form...