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!