Documentation

upcoef2

Direct reconstruction from 2-D wavelet coefficients

Syntax

Y = upcoef2(O,X,'wname',N,S)
Y = upcoef2(O,X,Lo_R,Hi_R,N,S)
Y = upcoef2(O,X,'wname',N)
Y = upcoef2(O,X,Lo_R,Hi_R,N)
Y = upcoef2(O,X,'wname')
Y = upcoef2(O,X,'wname',1)
Y = upcoef2(O,X,Lo_R,Hi_R)
Y = upcoef2(O,X,Lo_R,Hi_R,1)

Description

upcoef2is a two-dimensional wavelet analysis function.

Y = upcoef2(O,X,'wname',N,S)computes theN-step reconstructed coefficients of matrixXand takes the central part of sizeS.'wname'is a character vector containing the name of the wavelet. Seewfiltersfor more information.

IfO = 'a', approximation coefficients are reconstructed; otherwise ifO = 'h'('v'or'd', respectively), horizontal (vertical or diagonal, respectively) detail coefficients are reconstructed.Nmust be a strictly positive integer.

Instead of giving the wavelet name, you can give the filters.

ForY = upcoef2(O,X,Lo_R,Hi_R,N,S)is the reconstruction low-pass filter andHi_Ris the reconstruction high-pass filter.

Y = upcoef2(O,X,'wname',N)orY = upcoef2(O,X,Lo_R,Hi_R,N)returns the computed result without any truncation.

Y = upcoef2(O,X,'wname')相当于Y = upcoef2(O,X,'wname',1).

Y = upcoef2(O,X,Lo_R,Hi_R)相当于
Y = upcoef2(O,X,Lo_R,Hi_R,1).

Examples

% The current extension mode is zero-padding (seedwtmode). % Load original image. load woman; % X contains the loaded image. % Perform decomposition at level 2 % of X using db4. [c,s] = wavedec2(X,2,'db4'); % Reconstruct approximation and details % at level 1, from coefficients. % This can be done using wrcoef2, or % equivalently using: % % Step 1: Extract coefficients from the % decomposition structure [c,s]. % % Step 2: Reconstruct using upcoef2. siz = s(size(s,1),:); ca1 = appcoef2(c,s,'db4',1); a1 = upcoef2('a',ca1,'db4',1,siz); chd1 = detcoef2('h',c,s,1); hd1 = upcoef2('h',chd1,'db4',1,siz); cvd1 = detcoef2('v',c,s,1); vd1 = upcoef2('v',cvd1,'db4',1,siz); cdd1 = detcoef2('d',c,s,1); dd1 = upcoef2('d',cdd1,'db4',1,siz);

Algorithms

Seeupcoef.

See Also

Introduced before R2006a

Was this topic helpful?