how to write matlab code for third level DWT ?
조회 수: 5 (최근 30일)
이전 댓글 표시
hello..im writing a code for getting an image and perform dwt for one level to get 4 sub bands, ,but i want to apply third level DWT for getting image of 3rd level decomposion, so kindly help me and correct my code for 3rd level DWT. the code i have written is shown below.
%Read Input Image
Input_Image=imread(‘rose.bmp’);
%Red Component of Colour Image
Red_Input_Image=Input_Image(:,:,1);
%Green Component of Colour Image
Green_Input_Image=Input_Image(:,:,2);
%Blue Component of Colour Image
Blue_Input_Image=Input_Image(:,:,3);
%Apply Two Dimensional Discrete Wavelet Transform
[LLr,LHr,HLr,HHr]=dwt2(Red_Input_Image,’haar’);
[LLg,LHg,HLg,HHg]=dwt2(Green_Input_Image,’haar’);
[LLb,LHb,HLb,HHb]=dwt2(Blue_Input_Image,’haar’);
First_Level_Decomposition(:,:,1)=[LLr,LHr;HLr,HHr];
First_Level_Decomposition(:,:,2)=[LLg,LHg;HLg,HHg];
First_Level_Decomposition(:,:,3)=[LLb,LHb;HLb,HHb];
First_Level_Decomposition=uint8(First_Level_Decomposition);
%Display Image
subplot(1,2,1);imshow(Input_Image);title(‘Input Image’);
subplot(1,2,2);imshow(First_Level_Decomposition,[]);title(‘First Level Decomposition’);
답변 (1개)
nadhir nouioua
2020년 4월 2일
Hello sir,
Here is a way of decomposition into third level, I think u can do the rest now, good luck.
[LLr1,LHr1,HLr1,HHr1]=dwt2(Red_Input_Image,’haar’);
[LLr2,LHr2,HLr2,HHr2]=dwt2(LLr1,’haar’);
[LLr3,LHr3,HLr3,HHr3]=dwt2(LLr2,’haar’);
댓글 수: 2
참고 항목
카테고리
Help Center 및 File Exchange에서 Signal Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!