wavelet compression
古いコメントを表示
i am doing project related to signal compression & i tried in wavelet toolbo. i took original signal as 8 kb... i compressed using db4 level 4 then i saved the compressedsignal... it contains 26.7 kb. i dont know the reason why the file size increased. help me to solve the problem thanks aravind
2 件のコメント
Wayne King
2012 年 3 月 21 日
Can you please show the code you used? Just create a vector the same size as your signal to use in your example.
aravind raj
2012 年 3 月 21 日
回答 (2 件)
Wayne King
2012 年 3 月 22 日
Hi Aravind, What you want to do to actually see the savings in compression is to look at the wavelet coefficients, not the synthesized signal (or image).
In a wavelet application, you take a signal or image that requires a certain amount of storage and replace that signal or image with the wavelet coefficients. Then you use the wavelet coefficients to reconstruct the signal or image. The compression results from the reducing the signal or image to a smaller number of wavelet coefficients. For example:
load leleccum;
thr = 62.91*ones(4,1);
sorh = 'h';
[XC,CXC,LXC,PERF0,PERFL2] = wdencmp('lvd',leleccum,'db4',4,thr,sorh);
subplot(211)
plot(leleccum); title('Original Signal');
subplot(212)
plot(XC); title('Compressed Signal');
% Now plot coefficients
figure;
[C,L] = wavedec(leleccum,4,'db4');
subplot(211)
plot(C); title('Original Wavelet Coefficients');
subplot(212)
plot(CXC); title('Compressed Coefficients');
set(gca,'ylim',[-1e3 3e3]);
Look the larger number of zero coefficients in CXC than C
PEF0 gives you a compression score.
4 件のコメント
aravind raj
2012 年 3 月 26 日
Wayne King
2012 年 3 月 26 日
CXC are the coefficients for the compressed signal. C are the coefficients prior to compression.
aravind raj
2012 年 3 月 27 日
aravind raj
2012 年 3 月 27 日
Wayne King
2012 年 3 月 27 日
Aravind, I'm not sure what you mean by "i used one dimensional signal so i cant use the option 'lvd'".
This is not true. In my example above, I have used a 1-D signal with the 'lvd' option.
The CXC vector is larger than the original signal because of the extra coefficients due to the extension mode. You may be able to fix that by simply executing:
>>dwtmode('per');
In terms of your second question, you can reconstruct the signal as follows: (again, I'm using a 1-D example)
load leleccum;
thr = 62.91*ones(4,1);
sorh = 'h';
[XC,CXC,LXC,PERF0,PERFL2] = wdencmp('lvd',leleccum,'db4',4,thr,sorh);
xrec = waverec(CXC,LXC,'db4');
カテゴリ
ヘルプ センター および File Exchange で Wavelet Toolbox についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!