Re: FFT VS DCT



cincydsp@xxxxxxxxx wrote:
(I wrote)

The difference is boundary conditions. FFT (or DFT) has periodic
boundary conditions. DST has f(0)=f(L)=0, DCT has f'(0)=f'(L)=0.
For image processing the DCT boundary conditions are less noticeable.

I've read that the DCT is preferable for data compression applications
because it has good energy-compaction properties; that is, when
applying the DCT to a signal, a higher ratio of the energy is
concentrated in a small number of coefficients relative to the DFT or
other similar transforms. Therefore, it's possible to throw away more
frequency bins at the DCT output, resulting in better compression. I'm
not sure if this is something that is mathematically proven, or if
it's just an empirical observation.

I don't think you can separate the questions. The usual use is many
little DCTs, such as 8 by 8. You then ask about the quality of the
compression as you through away some bins. The DCT boundary condition
will be less noticeable at block boundaries even with many bins gone.
With FFT or FST, many bins will be needed to make up for the boundary
mismatch, and so the compression won't be as good.

If instead you do the whole image as one large two dimensional FFT,
DCT, or DST, I would again not be surprised that you need more bins
to make up for the boundary conditions, unless your source data
naturally has FFT (periodic) or DST (zero at the edge) boundary
conditions. Then you have to determine the quality as bins
are discarded to compare them.

-- glen

.



Relevant Pages

  • Re: A question on DCT
    ... Can someone please clarify what they mean by "Energy compaction"? ... the boundary conditions are different. ... the boundary, DCT has the derivative go to zero, and DFT has periodic ...
    (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: A question on DCT
    ... and Noll have a plot that shows this. ... it seems to me it depends on how the boundary conditions agree with the data. ... DST has the function go to zero at ... the boundary, DCT has the derivative go to zero, and DFT has periodic ...
    (comp.dsp)
  • 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
    ... Is it only for phase information? ... FFT (or DFT) has periodic ... For image processing the DCT boundary conditions are less noticeable. ...
    (comp.dsp)