Decomposition of Image using dyadic wavelet transform

17 ビュー (過去 30 日間)
Nishtha Parashar
Nishtha Parashar 2015 年 6 月 5 日
回答済み: Prasanna 2024 年 10 月 22 日
Hii, Can some one help me in providing code for decomposition of image using dyadic wavelet transform into LL and HH subbands.

回答 (1 件)

Prasanna
Prasanna 2024 年 10 月 22 日
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:

カテゴリ

Help Center および File ExchangeSignal Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by