BE2M31DSP seminar
Aplications of Discrete Cosine Transform (DCT)
- Definitions of DCT and basic properties
- For artificial sequence x = [10 7 4 1 -2 -5
-8 -5 -2 1] compute DCT
a) according to DCT-1 (ATTENTION! Do not use function dct from MATLAB toolbox !!) -
use the following functions dctxc1.m and idctxc1.m which realize the computation according to the definition DCT-1.
b) compute the same transformation using DFT (create 2N-2 even symmetric extension of input sequence)
- Repeat the same steps for the variant of DCT-2, i.e.
use the following functions dctxc2.m and idctxc2.m
b) using DFT (use 2N even symmetric extension of input sequence)
- compare with dct in MATLAB, here 2N symmetric extension si supposed.
- Result :
Observe all above mentioned estimations of DCT.
- Computation of DFT using DCT
- Signal - frame.bin - fs = 8 kHz
- Compute real cepstrum of given signal using function rceps.
- Compute real cepstrum of given signal using manual computation of all particular step using DFT and IDFT.
- Zvažte možnost náhradyTake into account possible replacement of the last IDFT by IDCT or DCT respectively.
- Compare and prove, that the same results are achieved.
- Result :
comparison of real cepstrum computation using DFT and DCT.
- Compression using DCT
- Generate signal s1 = 0.99.^n.*cos(0.02*pi*n) of the length N=256 samples. Create signal as column vector a observe its waveform!
- Compute its DCT and DFT spectrum and display for both cases power spectra in dBs. Do not apply any weighting window.
- Reconstruct the signal from its compressed version, i.e. given by limited amount of k spectral components (without counting of DC component).
NOTE: Due to the symmetry of DFT spectrum do not forget to work with the block of k symmetric components. For analogous DCT-based compression a block of 2k DCT spectral components should be taken. DC component must be always included.
- Observe signals reconstructed on the basis of DCT or DFT compression respectively, and compare them with original full-precision signal.
- Quantify an error of DCT or DFT compression on the basis of SNR criterion, i.e. compute ratio between power of original and error signal in dBs (SNR_e).
- Result :
- Comparison of DFT- and DCT-based power spectra in dBs.
- Comparison of original signal with recostructed ones based on DCT and DFT compression.
- Comparison of SNR_e for recostructed signals based on DCT and DFT compression.
- IN a FREE TIME: Repeat for the signal frame.bin.