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