a1111ba
Newbie level 1
![Newbie level 1](/styles/images/ranks/alevel1.gif)
please anyone can help me to correct error on this code bellow , I applied same code for audio. hint : there are multi images in folder "text"
thanks
files = dir('C:\Program Files\MATLAB\R2008a\work\test\*.JPEG');
for k = 1:numel(files)
rgb = imread(files(k).name);
y=rgb2gray(rgb);
[a,b,c,d]=dwt2(y,'db1');
[a1,b1,c1,d1]=dwt2(a,'db1');
[a2,b2,c2,d2]=dwt2(a1,'db1');
[a3,b3,c3,d3]=dwt2(a2,'db1');
fid = fopen('dbJPEG', 'w');
fwrite(fid, a3,'single')
end
fclose(fid)
fid = fopen('dbJPEG', 'r');
x=fread(fid,'single');
fclose(fid)
thanks
files = dir('C:\Program Files\MATLAB\R2008a\work\test\*.JPEG');
for k = 1:numel(files)
rgb = imread(files(k).name);
y=rgb2gray(rgb);
[a,b,c,d]=dwt2(y,'db1');
[a1,b1,c1,d1]=dwt2(a,'db1');
[a2,b2,c2,d2]=dwt2(a1,'db1');
[a3,b3,c3,d3]=dwt2(a2,'db1');
fid = fopen('dbJPEG', 'w');
fwrite(fid, a3,'single')
end
fclose(fid)
fid = fopen('dbJPEG', 'r');
x=fread(fid,'single');
fclose(fid)