what is the compression ratio?? if i compare 'db' compression ratio with my designed filter..is it should be low or high to be efficient?

2 ビュー (過去 30 日間)

採用された回答

Wayne King
Wayne King 2013 年 5 月 30 日
The compression ratio in the wavelet domain is usually expressed as the number of wavelet coefficients that are zero divided by the total number of wavelet coefficients.
This means that the closer the ratio is to 1, the better. If for some reason you're taking the log of that the the closer the log is to 0, the better.
You can use wdencmp() to obtain the compression score, the output argument PERF0.
  1 件のコメント
tamanna
tamanna 2013 年 5 月 30 日
i use the 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 compression ration i got is 0. Retained Energy is 100
PSNR value of decompressed image is 20.7744
and for 'db4' 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);
here The compression ratio is 55.0297
Retained Energy is 99.9997
PSNR value of decompressed image is 117.8089
is my designed filter better??

サインインしてコメントする。

その他の回答 (1 件)

Wayne King
Wayne King 2013 年 5 月 30 日
No, Unfortunately, the db4 wavelet filters is doing much better than yours.
A compression ratio of 0 means that none of the wavelet coefficients are being set to zero, which means you have no compression. That finding is backed up by the fact that you have retained all the energy. In compression you should not retain all the energy.
On the other hand, with the db4 wavelet filter, you have more than 1/2 the wavelet coefficients being set to zero.
  1 件のコメント
tamanna
tamanna 2013 年 5 月 30 日
k..it means i need to work on my filters coefficient
one more question 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 in above 'db4' code, 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??

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDenoising and Compression についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by