Discrete Cosine Transform

See http://en.wikipedia.org/wiki/Discrete_cosine_transform

So far I'm just playing around

n = 8;
dft  =  
      Table[ Cos[(Pi/n) j (k + (1/2))], {j, 0, n - 1}, {k, 0, 
          n - 1}]

dft // MatrixForm // N

dftPlot[p_] := 
        ListPlot[dft[[p]], PlotJoined -> True,  
          PlotStyle -> Hue[p/n], 
          DisplayFunction -> Identity];
Show[Table[dftPlot[p], {p, 1, n - 1}], 
      DisplayFunction -> $DisplayFunction]

?ListPlot

Options[Plot]

Flatten[Table[{i, j}, {i, 1, 10}]]

invDft  =  Inverse[dft // N]

ListDensityPlot[dft // N]

ones  =   Table[ 1, {j, 0, n - 1}, {k, 0, n - 1}]

A constant picture

ones  // ListDensityPlot

becomes a single pixel after being transformed.

Transpose[(dft // N)  .  
            Transpose[(dft // N)  .  ones  ] ] //  Round // 
      ListDensityPlot