How can I reconstruct the final level detail signal of the dualtree
1 view (last 30 days)
Show older comments
After dualtree, I want to reconstruct the detail signal level by level through the function idualtree, but I always get a 0-array at the final level detail signal. I modified the example of idualtree to reproduce the problem
load noisdopp
[a,d] = dualtree(noisdopp);
dgain = ones(numel(d),1);
dgain(1:end-1) = 0;
xrec = idualtree(a,d,'DetailGain',dgain,'LowpassGain',0);
plot(noisdopp)
hold on
plot(xrec,'LineWidth',2);
legend('Original','Reconstruction')
The xrec is the final level detail signal, but it is always 0-array. Is there anything I get wrong?
0 Comments
Answers (1)
Sai Pavan
on 26 Mar 2024
Hello,
I understand that you are trying to reconstruct the final level detail signal with the "idualtree" function.
The reason for the return of zeros array as the reconstructed signal is because of the "LowpassGain" argument of the "idualtree" function being set to 0. The parameter helps us to apply a gain factor to the final-level approximation coefficients. This problem can be resolved by setting the "LowpassGain" argument to 1, which is the default value.
Please refer to the below code snippet illustrating the same:
load noisdopp
[a,d] = dualtree(noisdopp);
dgain = ones(numel(d),1);
dgain(1:end-1) = 0;
xrec = idualtree(a,d,'DetailGain',dgain,'LowpassGain',1);
plot(noisdopp)
hold on
plot(xrec,'LineWidth',2);
legend('Original','Reconstruction')
Please refer to the below documentation to learn more about the "LowpassGain" parameter of the "idualtree" function: https://www.mathworks.com/help/wavelet/ref/idualtree.html#:~:text=of%20L%20ones.-,LowpassGain%20%E2%80%94%20Gain,-1%20(default)%20%7C
Hope it helps!
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!