why 512 * 512 png image is executing properly the DWT code while 512*512 mbp image is not

조회 수: 1 (최근 30일)
close all; clear all;
map=gray(256);
% get db filter length 6
[Lo_D,Hi_D,Lo_R,Hi_R] = wfilters('bior5.5');
imData=imread('lena_2.bmp');% *WORKING WITH BARBARA.PNG*
figure(1);
imshow(imData);
% first dwt
[N, M]=size(imData);
% dwt in row
dwt_row_image=zeros(N, M);
tmpData=zeros(1, M);
for i=1:N
tmpData(1, 1:M)=imData(i, 1:M);
tmpData(1, 1:M)=dwt(tmpData, Lo_R);
dwt_row_image(i, 1:M)=tmpData(1, 1:M);
end
figure(2);
imshow(dwt_row_image, map);
% dwt in column
tmpData=zeros(1, N);
dwt1_imData=zeros(N, M);
for i=1:M
tmpData(1, 1:N)=dwt_row_image(1:N, i)';
tmpData(1, 1:N)=dwt(tmpData, Lo_R);
dwt1_imData(1:N, i)=tmpData(1, 1:N)';
end
figure(3);
imshow(dwt1_imData, map);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Wavelet Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by