To apply 1-d wavelet transform on an image in MATLAB using the wavelet toolbox, we have to follow these steps:
imread
function.wavedec
to decompose the input image into the approximation and details coefficients.waverec
function.Here's the sample code to implement the above steps:
main.m388 chars18 lines
In the above code, c
and l
represent the set of wavelet coefficients and the corresponding lengths of the wavelet decomposition at each level, respectively. The appcoef
function extracts the approximation coefficients from the wavelet decomposition, and imshow
is used to display the approximation coefficients.
Note:
imread
function is used to read the image file and can handle any image format supported by MATLAB.im2double
function is used to convert the input image to double format so that the wavelet transform can be applied to it.gistlibby LogSnag