Re: Query DCT and DFT



Thomas Richter wrote:
> > > DCT is better for lossy compression. To see that, you need to
recall
> > > that both DCT and DFT stem from fourier series that analyze
functions
> > > mapping from R ->R and are periodic. The input of DCT and DFT,
however,
> > > is finite sequence of samples. So to compute the fourier series,
it is
> > > necessary to continue the function onto R by assuming what the
values
> > > outside the given range are. For DFT, the assumption is thath the
finite
> > > sequence repeats. For DCT, the sequence is mirrored and then
repeated.
>
> /* snip */
>
> This is exactly the same as saying "DCT is real-valued". A fourier
> transformed signal that is real-valued necessarely has an original
signal
> that is symmetric. (-;

Not quite. A DCT is essentially equivalent to a DFT of real and even
data (modulo half-sample shifts), which is a stronger condition than
simply requiring real inputs.

In particular, a DCT of type II (the most common for compression
applications) or of type-I corresponds to even boundary conditions at
*both* ends of the data, which ensures that the data are implicitly
continuous at the boundaries (although their slopes may be
dicontinuous).

On the other hand, a DFT of purely real data has implicit periodic
boundary conditions, which may imply a discontinuity at the boundary if
the inputs don't match up at the "ends", causing slower convergence
(weaker energy compaction) in Fourier space.

(The boundary conditions in Fourier space are less pertinent, because
one specifies the inputs and cares about the compaction in Fourier
space, not vice versa).

Cordially,
Steven G. Johnson

PS. Types III and IV of the DCT are even at one end and odd at the
other. This means that they can have implicit discontinuities if their
input data don't go to zero at the odd end. On the other hand, this
makes them ideal for the MDCT, where one uses inputs of twice the
"natural" length to induce time-domain aliasing cancellation (TDAC) for
lapped transforms.

.



Relevant Pages

  • Re: Computing DFT of a signal from its DCT coefficients?
    ... signal x, but what we really want is the N-point DFT of x, Xdft. ... between DFT and DCT. ... The DCT boundary condition is that the derivative is zero at the ends, the DST has the function going to zero at the ends, where the DFT is a compromise between the two, with periodic boundary conditions. ...
    (comp.dsp)
  • Re: FFT VS DCT
    ... Where FFT is prepered than DCT? ... FFT (or DFT) has periodic ... For image processing the DCT boundary conditions are less noticeable. ...
    (comp.dsp)
  • Re: FFT VS DCT
    ... Is it only for phase information? ... FFT (or DFT) has periodic ... For image processing the DCT boundary conditions are less noticeable. ...
    (comp.dsp)
  • Re: FFT VS DCT
    ... Where FFT is prepered than DCT? ... FFT (or DFT) has periodic ... For image processing the DCT boundary conditions are less noticeable. ...
    (comp.dsp)
  • Re: DFT or DFS: Are they the same thing?
    ... < degenerate or special cases of one unified Fourier Transform ... with the relation between the DFT and the DTFT? ... the sequence Xinto another sequence, say A, ...
    (comp.dsp)