Clear Filters
Clear Filters

lifting scheme and DWT detail coeffecients have differing signs

4 views (last 30 days)
I am conducting lifting scheme and DWT to obtain coeffecients, the detail coef of the lifting scheme have the sign reversed, anyone shed some light?
%% load files
load('sample_array.mat');
str = mat2str(sample_array);
lscheme = liftingScheme('Wavelet','db1');
%% DWT
[C,L] = wavedec(sample_array, 6, 'db1');
approxCoeff = appcoef(C,L,'db1');
allDetCoeff = detcoef(C,L);
%%lifting scheme
[appC,detC]=lwt(sample_array,'LiftingScheme',lscheme,'Level',6);

Answers (1)

Abhimenyu
Abhimenyu on 6 Oct 2023
Hi Hadwll,
I understand that the detailed coefficients from DWT and lifting scheme have different signs. This is because of the difference in the conventions used by the two methods.
In the DWT, the detail coefficients represent the differences between the original signal and the approximation at each level. Typically, positive detail coefficients indicate features or fluctuations that are present in the original signal but not captured by the approximation.
On the other hand, in some implementations of the lifting scheme, the sign convention for the detail coefficients may be reversed. This means that the detail coefficients obtained from the lifting scheme may have the opposite sign compared to the DWT. However, this reversal does not affect the overall information contained in the coefficients.
To address this issue, you can simply multiply the detail coefficients obtained from the lifting scheme by -1 to reverse the sign if it is necessary for your specific application or comparison with DWT coefficients, as shown below:
%% load files
load('sample_array.mat');
str = mat2str(sample_array);
lscheme = liftingScheme('Wavelet','db1');
%% DWT
[C,L] = wavedec(sample_array, 6, 'db1');
approxCoeff = appcoef(C,L,'db1')
allDetCoeff = detcoef(C,L)
%%lifting scheme
[appC,detC]=lwt(sample_array,'LiftingScheme',lscheme,'Level',7)
detC=cell2mat(detC(6));
detC=-detC;
You can use any of the two conventions based on your application.
I hope this helps!
Thank you,
Abhimenyu.

Categories

Find more on Wavelet Toolbox in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!