difference in compression ratio for same wname..
1 回表示 (過去 30 日間)
古いコメントを表示
when i used this code
image2=('C:\Users\hp\Desktop\data\1 (2).JPG');
wavemngr('del','josh');
WAVEMNGR('add','shivjoshi','josh',1,'','newwavelet.m')
OUT1 = WAVEMNGR('read')
[C,S] = wavedec2(image2,2,'josh');
thr=1.0000;
[Xcomp,CXC,LXC,PERF0,PERFL2] =wdencmp('gbl',C,S,'josh',2,thr,'h',1);
and put the value in function 'newwavelet' same as value of 'db4',i.e. [-0.0106 0.0329 0.0308 -0.1870 -0.0280 0.6309 0.7148 0.2304] i am getting different results. e.g. in this code, m getting
The compression ratio is 58.8000
Retained Energy is 99.9999
PSNR value of decompressed image is 91.1471
and when i used the code
image=rgb2gray(imread('C:\Users\hp\Desktop\data\1 (2).jpg'));
K=image;
% wavelet decomposition
[C,S] = wavedec2(image,3,'db4');
thr=1.0000;
[Xcomp,CXC,LXC,PERF0,PERFL2] =wdencmp('gbl',C,S,'db4',2,thr,'h',1);
, m getting
The compression ratio is 55.0297
Retained Energy is 99.9997
PSNR value of decompressed image is 117.8089
why the results are varying??
0 件のコメント
採用された回答
Wayne King
2013 年 5 月 30 日
編集済み: Wayne King
2013 年 5 月 30 日
I get exactly the same. Can you try to reproduce with an image from MATLAB
imdata = imread('ngc6543a.jpg');
[C,S] = wavedec2(imdata,3,'josh');
[C1,S1] = wavedec2(imdata,3,'db4');
thr=1.0000;
[Xcomp,CXC,LXC,PERF01,PERFL2] =wdencmp('gbl',C,S,'db4',2,thr,'h',1);
[Xcomp,CXC,LXC,PERF02,PERFL2] =wdencmp('gbl',C,S,'josh',2,thr,'h',1);
I get 80.4151 for a compression score in both cases.
Perhaps you have entered the filter coefficients in your M-file without the full resolution that they are stored in MATLAB?
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Denoising and Compression についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!