Skip to content Skip to navigation

Connexions

You are here: Home » Content » Quantisation of DCT Coefficients

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Recently Viewed

Quantisation of DCT Coefficients

Module by: Nick Kingsbury

Summary: This module introduces Quantisation of DCT Coefficients.

For our discussion of the 2-D DCT we assumed a quantiser step size of 15 to allow direct comparison of entropies with the Haar transform. But what step size do we really need?

Figure 1(a) and (b) show images reconstructed from the 8×8 8 8 DCT of Lenna (see subfigure (c)), when all the DCT coefficients are quantised with step sizes of 15 and 30 respectively. It is difficult to see quantising artefacts in Figure 1(a) ( Qstep=15 Qstep 15 ) but they are quite noticeable in Figure 1(b) ( Qstep=30 Qstep 30 ).

The visibility of the 8×8 8 8 DCT basis functions of subfigure (a) in our discussion of the 2-D DCT has been measured (for a 720×576 720 576 image viewed from 6 times the image width) and the minimum quantiser steps have been determined which will give artefacts just at the threshold of visibility. The matrices (JPEG Book, p37) for the luminance and chrominance threshold step sizes are:

Qlum=1611101624405161121214192658605514131624405769561417222951878062182237566810910377243555648110411392496478871031211201017292959811210010399 Qlum 16 11 10 16 24 40 51 61 12 12 14 19 26 58 60 55 14 13 16 24 40 57 69 56 14 17 22 29 51 87 80 62 18 22 37 56 68 109 103 77 24 35 55 64 81 104 113 92 49 64 78 87 103 121 120 101 72 92 95 98 112 100 103 99 (1)
Qchr=17182447999999991821266699999999242656999999999947669999999999999999999999999999999999999999999999999999999999999999999999999999 Qchr 17 18 24 47 99 99 99 99 18 21 26 66 99 99 99 99 24 26 56 99 99 99 99 99 47 66 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 (2)
Figure 1(c) shows the reconstructed image when each of the subimages of (c) is quantised using the corresponding step size from Qlum Qlum . It is certainly difficult to detect any quantising artefacts, even though many of the step sizes are greater than Qstep=30 Qstep 30 , used in Figure 1(b). Figure 1(d) is the reconstructed image using step sizes of 2Qlum 2 Qlum and the artefacts are still quite low.

Figure 1: Images reconstructed using the 8×8 8 8 DCT with (a) Qstep=15 Qstep 15 , (b) Qstep=30 Qstep 30 , (c) Qstep=Qlum Qstep Qlum , the JPEG luminance matrix, and (d) Qstep=2Qlum Qstep 2 Qlum .
Figure 1 (figure9.png)
Figure 2: Plots of the entropies of the 8×8 8 8 DCT quantised subimages for the four reconstructed images of Figure 1.
Figure 2 (figure10.png)

Figure 2 shows the entropies of the 64 quantised subimages used to reconstruct each of the four images in Figure 1. Also given on each plot is the mean entropy (giving the bits/pel for the image) and the rms quantising error between the quantised image and the original.

We see that Figure 1(c) has about the same mean entropy and rms error as Figure 1(b), but that its quantising artefacts are much less visible. Figure 1(d) has similar visibility of artefacts to Figure 1(b), but has significantly lower entropy and hence greater compression (similarly for Figure 1(c) versus Figure 1(a)).

This shows the distinct advantages of subjectively weighted quantisation, and also that it is unwise to rely too much on the rms error as a measure of image quality.

Comments, questions, feedback, criticisms?

Send feedback