0% found this document useful (0 votes)
38 views1 page

Tutorial3 JPEG Image

The document discusses JPEG compression and the discrete cosine transform (DCT). It asks several questions: 1) Describe the DCT matrix for different 8x8 pixel blocks and predict DC and AC values. 2) What fraction of the original image is used if only DC components are used to create a thumbnail? How are pixel values generated? 3) The 4 major steps of JPEG compression are color space choice, DCT transform, quantization, and run-length/Huffman coding. Why are these steps carried out and which result in most/lossy compression? It also provides an example quantized DCT matrix and asks about quantizing, linearizing, run-length encoding,

Uploaded by

Amanda Mah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views1 page

Tutorial3 JPEG Image

The document discusses JPEG compression and the discrete cosine transform (DCT). It asks several questions: 1) Describe the DCT matrix for different 8x8 pixel blocks and predict DC and AC values. 2) What fraction of the original image is used if only DC components are used to create a thumbnail? How are pixel values generated? 3) The 4 major steps of JPEG compression are color space choice, DCT transform, quantization, and run-length/Huffman coding. Why are these steps carried out and which result in most/lossy compression? It also provides an example quantized DCT matrix and asks about quantizing, linearizing, run-length encoding,

Uploaded by

Amanda Mah
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Tutorial Sheet 3 for CS3246 Lossy Compression and JPEG

1. What the DCT matrix would be like for the original 8x8 matrix consisting of: (a) all while pixels; (b) left-half back but right-half is white; and (c) alternate pixels of black and white. Describe your prediction of DC values and the AC values at the low and high frequency ranges. 2. If the block size for a 2D DCT transform is 8x8, and we use only the DC components to create a thumbnail image, what fraction of the original would we be using? State clearly the how the pixel values of the reduced image is generated from DCs. 3. The JPEG compression comprises 4 major decision steps on the original image as follows: a) b) c) d) choice of color model and resolution for each color component; perform DCT transform on 8x8 pixel block; perform quantization on resulting DCT block; sequence the values in zig-zag order, follow by run-length & Huffman coding.

i) Give the reason(s) for carrying out each of the above steps. ii) Which steps result in most compression and why? Which step(s) result in lossy compression? 4. (Optional) Consider the 44 block of DCT coefficient matrix shown in Figure 1a. The coefficients are ordered such that the top-left are values for lower frequency component, and bottom-right are for high frequency components.
275 94 1 -6 34 -52 15 6 2 -2 -3 4 -1 1 -4 -2 (a) DCT coefficient matrix 5 5 5 5 5 5 5 10 5 5 10 10 5 10 10 10 (b) Quantization matrix

Figure 1 a) Quantize the above block by rounding it to the nearest multiple of 5 for the topleft half (including the diagonals), and to the nearest multiple of 10 for the bottom-right half. What do you get? What is the rationale for doing a bigger quantization step for the lower half of matrix? b) How would you linearize this matrix such that the resulting sequence is ordered from low to high frequency? Then compress the resulting linear list using runlength encoding. What do you get? c) If you do the inverse quantization of the quantized block, what are the DCT coefficients that you get back? d) What are the errors between results in part (c) and the original matrix. Express the error in terms of mean absolute error.

You might also like