Presentation is loading. Please wait.

Presentation is loading. Please wait.

Yingfang Zhang Department of Computer Science UCCS

Similar presentations


Presentation on theme: "Yingfang Zhang Department of Computer Science UCCS"— Presentation transcript:

1 Yingfang Zhang Department of Computer Science UCCS
JPEG Simulation Yingfang Zhang Department of Computer Science UCCS

2 CONTENTS Introduction Tiff File and Image Data JPEG Compression
JPEG Decompression Compression Measures and Quality Analysis Conclusion

3 INTRODUCTION JPEG is the image compression standard which is widely used. Help understand the JPEG steps and the relation between the compression and quality. Simulate complete steps of JPEG by a real example, include: scanning an image , get the pixel data from this image, using DCT compression, using IDCT decompression. Show the relation between the compression and quality. Conclusion

4 IMAGE Image . We scan this image at the EAS 143.
. This Image with width 14 mm and height 8 mm. . Scanning with White-Black type, 1 bit/pixel, min-is white format. . Storing as TIFF file. The total has 306 bytes.

5

6 TIFF FILE AND PIXEL DATA
. The TiFF file consists of a header and image file directory. . Every entry has a tag name. . Using Table 3-6 (see book Multimedia System Design ) to get every pixel data.

7

8 For example: 49 49 Byte Order. Lowest byte is written before the highest byte. Data are read from right to left. 2a 00 “00 2a”, indication Tiff file version 6. “ ”, represent a pointer to the beginning byte of image file directory, 1*16+8 = 24, the IFD begins from 25th byte. 0e 00 “00 0e”, represent how many entries in this IFD. e= 14. Total number of entry is 14. For every IFD entry consists of 12 bytes, from right to left, first 2 bytes is Tag ID, then 2 bytes is data type, then 4 bytes is data length, then 4 bytes is data. FE “ fe”, Tag ID is 00fe, look table, we find this represents subfile type, 0004 mean data type is SHORT, mean data length is 1, mean data is 0, look table, we know No Specify Subfile Type.

9

10 JEPG STEPS JPEG Encoder 1. DCT Transform. 2. Quantizer. 3. Entropy
JPEG Decoder 1. Entropy decoder. 2. Dequantization. 3. IDCT

11 DCT After DCT Before DCT . The figure before DCT has 592 zeros.
. The figure after DCT has 728 zeros, The figure after DCT has more 138 zeros. . Conclude that the figure after DCT uses less data to represent the same image What is the ratio?

12 QUANTIZER After DCT After Quantization
1. The figure after DCT has 726 zeros. 2. The figure after Quantization has 759 zeros. 3. Quantization make further compress.

13 ENTROPY Conclude that the initial image use 306*8=2448 bits , after compression, only using 132 bits to represent the image.

14 DECOMPRESSION 1. Entropy Decoder. 2. Dequantization. 3. IDCT

15 COMPRESSION MEASURES AND QUALITY ANALYSIS
We need to consider Cr & Nb in practical work. Following slide is an example for different compression ratio.

16 Example .Compare two figure, the image doesn’t be lost.
After Decompression Initial Image Cr=1.5 Nb=0.66 .Compare two figure, the image doesn’t be lost.

17 Example After dcompression Initial image Cr=5.8 Nb=0.17
Compare two figure, the image is lost

18 Conclusion JPEG is a very good way to compress data.
The compression ratio is opposite of the compression quality. There is a trade-off between compression ratio and compression quality. Because of time, we do not further discuss some question, i.e, color image.


Download ppt "Yingfang Zhang Department of Computer Science UCCS"

Similar presentations


Ads by Google