NC = wthcoef2('type',C,S,N,T,SORH)
returns the horizontal, vertical, or diagonal coefficients obtained from the wavelet
decomposition structure [C,S] by soft or hard thresholding
defined in vectors N and T.
wthcoef2 is a two-dimensional denoising and compression
oriented function.
NC = wthcoef2('type',C,S,N)
returns the horizontal, vertical, or diagonal coefficients obtained from
[C,S] by setting all the coefficients of detail levels
defined in N to zero.
NC = wthcoef2('a',C,S)
returns the coefficients obtained by setting approximation coefficients to
zero.
NC = wthcoef2('t',C,S,N,T,SORH)
returns the detail coefficients obtained from the wavelet decomposition structure
[C,S] by soft or hard thresholding defined in vectors
N and T.
[NC,S] is the modified wavelet decomposition structure.
Perform a level 2 wavelet decomposition of the image using the haar wavelet.
[C,S]=wavedec2(X,2,'haar');
Return the vertical coefficients obtained from the wavelet decomposition structure, by soft thresholding defined in the thresholding vectors N =[1 2] and T=[2 4]. N specifies the detail levels, and T specifies the thresholds.
Wavelet decomposition vector. The vector C contains
the approximation and detail coefficients organized by level. The function
uses the bookkeeping matrix S to parse
C.
The vector C is organized as
A(N),
H(N),
V(N),
D(N),
H(N-1),
V(N-1),
D(N-1), …,
H(1), V(1), D(1),
where A, H, V, and
D are each a row vector. Each vector is the
column-wise storage of a matrix.
Bookkeeping matrix. The matrix S contains the
dimensions of the wavelet coefficients by level and the function uses it to
parse the wavelet decomposition vector C.
S(1,:) = size of approximation
coefficients(N).
S(i,:) = size of detail
coefficients(N-i+2) for
i = 2, ...N+1 and
S(N+2,:) = size(X).
The following diagram shows the relationship between
C and S in the wavelet
decomposition of a 512-by-512 matrix.
When X represents an indexed image, the output arrays
cA, cH, cV, and
cD are m-by-n
matrices. When X represents a truecolor image, it is an
m-by-n-by-3 array, where each
m-by-n matrix represents a red,
green, or blue color plane concatenated along the third dimension. The size
of vector C and the size of matrix
S depend on the type of the analyzed image.
For a truecolor image, the decomposition vector C and
the corresponding bookkeeping matrix S can be
represented as shown.
Threshold vector, specified by a size 1 ≤ N(i)
≤ size(S,1)-2. N
contains the detail levels to be thresholded and T the
corresponding thresholds.
Threshold vector, specified as a nonnegative vector.
N and T must be of the same length.
N contains the detail levels to be thresholded and
T the corresponding thresholds.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.