Decomposition of Image using dyadic wavelet transform

17 Ansichten (letzte 30 Tage)
Nishtha Parashar
Nishtha Parashar am 5 Jun. 2015
Beantwortet: Prasanna am 22 Okt. 2024
Hii, Can some one help me in providing code for decomposition of image using dyadic wavelet transform into LL and HH subbands.

Antworten (1)

Prasanna
Prasanna am 22 Okt. 2024
Hi Nishtha,
Decomposition of image into LL and HH subbands can be done using the ‘dwt2’ function present in MATLAB. To perform the decomposition you can perform the following steps:
  • Load the image.
  • Convert the image to grayscale.
  • Perform wavelet decomposition.
  • Extract the LL and HH sub bands from the decomposition.
Below is a MATLAB example on how to perform a 2D wavelet decomposition using the ‘dwt2’ function. 
% load the image and convert it to grayscale
image = imread('cameraman.tif');
grayImage = im2gray(image)
% perform wavelet decomposition using the dwt2 function
[LL1,LH1,HL1,HH1]=dwt2(grayImage,'db1');
[LL2,LH2,HL2,HH2]=dwt2(LL1,'db1');
[LL3,LH3,HL3,HH3]=dwt2(LL2,'db1');
% Display the original image and the subbands
figure;
subplot(1, 3, 1);
imshow(image);
title('Original Image');
subplot(1, 3, 2);
imshow(LL1, []);
title('LL Subband');
subplot(1, 3, 3);
imshow(HH1, []);
title('HH Subband');
The above code gives the following output:
For more information regarding the functions used and some other examples, you can refer to the following resources:

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by