difference in compression ratio for same wname..

13 visualizzazioni (ultimi 30 giorni)
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??

Risposta accettata

Wayne King
Wayne King il 30 Mag 2013
Modificato: Wayne King il 30 Mag 2013
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?

Più risposte (0)

Categorie

Scopri di più su Denoising and Compression in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by