next up previous
Next: Compression of the Right Up: Compression of the Left Previous: Lossless Compression

Subsections

Lossy Compression

Lossy compression is a typical engineering trade-off: lower image quality for lower transmission rate. If the rate decreases a large amount for a small decrease in image quality, then lossy compression is usually considered desirable. For this reason, lossy compression is often evaluated with reference to a rate-distortion curve.

One of the most common methods for lossy compression is transform coding. The objective is to minimize statistical dependence between the output values of the transform. Desirable characteristics are decorrelation, energy concentration, and computational efficiency.

A much-used transform coding method with these attributes is the discrete cosine transform (DCT) [5]. The DCT transform investigated here was an 8x8 DCT-II implementation.

Simple DCT with Optimal Entropy Coefficient Coding

A straightforward approach to DCT coding of an image is to divide the image into blocks (in this case 8 pixels along each edge), transform each block, and quantize the output coefficients according to some global step size. Once this has been done, the coefficients may be coded for transmission. The initial approach was to use a separate optimal entropy code for each coefficient position within a block, but the same set of codes for a given coefficient position across blocks. This resulted in 64 independent codes. At a coefficient quantization step size of 16, this gave a bit rate of 1.44 bits per pixel at an SNR of 31.5dB.

DCT Coding with Mean Subtraction

An improvement on the basic method was to subtract the global mean of the image from all pixels before applying the DCT. This has the effect of reducing the average of all the DC coefficients in the DCT to approximately zero, and moving their range to a symmetric region about zero. For optimal entropy coding of the coefficients, however, this had no significant effect, and the results were very close to those in simple DCT coding.

DCT Coding with RLE Coefficient Coding

Although optimal entropy coding gives good results, it is difficult to implement efficiently and quickly. This is a disadvantage in areas such as video compression. An alternative approach is to encode the coefficients using run-length encoding of the zeros. Each symbol identifies (a) a non-zero value in the string of quantized DCT coefficients, and (b) how many zeros precede it.

In addition the string of DCT coefficients is ordered from the lowest to highest frequency components in a diagonal zig-zag sequence through the 8x8 block in order to maximise the length of the zero-only runs [6]. This results in a small improvement over optimal entropy coding, as shown in Figure 8: 1.39 bits per pixel at 31.5dB.


  
Figure 8: Comparison of the performance of optimal entropy coefficient coding and RLE coefficient coding
\begin{figure}
\centering
\epsfxsize=4in

\epsffile {m-simple_vs_rle.eps}\end{figure}

DCT Coding with DPCM DC coefficients

The DC DCT coefficients tend to be much larger than the rest of the output coefficients; this is because most of the energy in an image is at low frequencies. As a result the statistics of the DC coefficients are quite different to the other coefficients.

In order to counteract this, the quantized DC coefficients are first DPCM coded, and then the DPCM values are RLE coded together with the rest of the (unaltered) quantized coefficients [6]. In tests on the sample images, this resulted in a decrease in rate of 0.06 bits per pixel for the same SNR.

DCT Coding with Non-Uniform Quantization

Psychovisual tests have shown that the human observer is not equally sensitive to changes in each of the DCT coefficients [6]. This can be exploited by quantizing the easily detected coefficients finely, and the others more coarsely.

A table from the CCIR-601 Quantization Tables [7] was therefore used to quantized each coefficient according to its own step size before DPCM and RLE encoding.

The result was intriguing. At very low bit rates the SNR was comparable if not better than uniform quantization, but at higher bit rates it was up to 2dB worse for a fixed bit rate. However, the subjective quality of the images was better!

This appears to be caused by the fact that there is more high frequency error in SNR terms, but less low frequency error; in terms of visual perception the overall error is lower -- which is logical given the subjective basis for the quantization weighting.


  
Figure 9: Comparison of the performances of modifications to the basic DCT with RLE coefficient coding
\begin{figure}
\centering
\epsfxsize=4in

\epsffile {m-RLE_versions.eps}\end{figure}

Zero Thresholding

When quantizing, one is attempting to minimize irrelevant information. In one experiment, all coefficient values with an absolute value less than twice the step size were set to zero; the rest were quantized normally. This was however excessive. No gain was found, as can be seen in Figure 10.


  
Figure 10: Illustration of the effects of increasing only the zero quantization bin for DCT coding
\begin{figure}
\centering
\epsfxsize=4in

\epsffile {m-DCT_thresh.eps}\end{figure}

Pyramid Coding using the DCT

A different approach is to use the DCT to encode the level differences described earlier in lossless pyramid coding. This yields significantly lower bitrates at decent image quality, as illustrated in Figure 11. Errors introduced by lossy compression of the lower level differences are retained and coded by higher-level DCT passes. The result is that the error, rather than accumulating linearly, is dominated by the error of the final DCT pass.


  
Figure 11: Rate-distortion curve for lossy pyramid coding using the DCT
\begin{figure}
\centering
\epsfxsize=4in

\epsffile {m-DCT_pyramid.eps}\end{figure}

Adaptive DCT

It is possible to reduce the bit rates found above by over a factor of 2, if an adaptive DCT algorithm is used [8]. In this approach, the quantization and entropy coding are optimized separately for each block, based on its characteristics.


next up previous
Next: Compression of the Right Up: Compression of the Left Previous: Lossless Compression
Michael Bax and Andy Vitus
12/4/1997