2D DISCRETE COSINE TRANSFORM
Discrete Cosine Transform
■   1D Discrete Cosine Transform (DCT)
    where                and
 • Inverse DCT
Discrete Cosine Transform
    ■   2D Discrete Cosine Transform (DCT)
        where                and
    • Inverse DCT
Discrete Cosine Transform
■   The basis functions of DCT are real. (DFT has complex
    basis functions.)
■   DCT has very good energy compaction properties.
■   DCT can be expressed in terms of DFT, therefore, Fast
    Fourier Transform implementation can be used.
■   In the case of block-based image compression, (e.g.,
    JPEG), DCT produces less artifacts along the
    boundaries than DFT does.
DCT and DFT
       ■    N-point DCT of x[n] can be obtained from 2N-point
            DFT of symmetrically extended x[n].
   Symmetric extension:
   DFT of           :
   DCT of           :
Discrete Cosine Transform
      ■   Matrix Representation of DCT
Discrete Cosine Transform
       ■   Matrix Representation of Inverse DCT
Discrete Cosine Transform
           ■   Inverse DCT matrix is equal to the transpose of DCT
               matrix!
Discrete Cosine Transform
  ■   2D Discrete Cosine Transform (DCT)
      where                and
   • Inverse DCT
    Discrete Cosine Transform
■   For two-dimensional signals:
THE KARHUNEN-LOEVE TRANSFORM (KLT)
        IN IMAGE PROCESSING
                      Eigenvalues and Eigenvectors
The concepts of eigenvalues and eigenvectors are important for understanding the
KL transform.
                      Vector population
• Consider a population of random vectors of the following form:
• The quantity
  •of the image i .
• The population may arise from the formation of the above vectors
  for different image pixels.
Example: x vectors could be pixel values
in several spectral bands (channels)
                Mean and Covariance Matrix
• The mean vector of the population is defined as:
• The covariance matrix of the population is defined as:
• For M vectors of a random population, where M is large enough
                         Karhunen-Loeve Transform
• Let A be a matrix whose rows are formed from the eigenvectors of the covariance
  matrix C of the population.
• They are ordered so that the first row of A is the eigenvector corresponding to the
  largest eigenvalue, and the last row the eigenvector corresponding to the smallest
  eigenvalue.
• We define the following transform:
• It is called the Karhunen-Loeve transform.
                                Karhunen-Loeve Transform
• You can demonstrate very easily that:
Inverse Karhunen-Loeve Transform
             Drawbacks of the KL Transform
Despite its favourable theoretical properties, the KLT is not used
in practice for the following reasons.
• Its basis functions depend on the covariance matrix of the
  image, and hence they have to recomputed and transmitted
  for every image.
• Perfect decorrelation is not possible, since images can rarely be
  modelled as realisations of ergodic fields.
• There are no fast computational algorithms for its
  implementation.
Example: x vectors could be pixel values
in several spectral bands (channels)
Example of the KLT: Original images
                6 spectral images
                from an airborne
                Scanner.
             (Images from Rafael C. Gonzalez and
             Richard E.
             Wood, Digital Image Processing, 2nd Edition.
Component               λ
          1                 3210
          2                  931.4
          3                  118.5
          4                   83.88
          5                   64.00
          6                   13.40
  (Images from Rafael C. Gonzalez and
  Richard E.
  Wood, Digital Image Processing, 2nd Edition.
                             Six principal components
Original images (channels)
                                after KL transform
 Example: Original Images (left)
and Principal Components (right)