Tutorial3 JPEG Image
Tutorial3 JPEG Image
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.