Decomposition of Image using dyadic wavelet transform

조회 수: 2 (최근 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 CenterFile Exchange에서 Signal Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by