12.07.2015 Views

Data Compression: The Complete Reference

Data Compression: The Complete Reference

Data Compression: The Complete Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.1 Introduction4.1 Introduction 253Modern computers employ graphics extensively. Window-based operating systems displaythe disk’s file directory graphically. <strong>The</strong> progress of many system operations, suchas downloading a file, may also be displayed graphically. Many applications provide agraphical user interface (GUI), which makes it easier to use the program and to interpretdisplayed results. Computer graphics is used in many areas in everyday life to convertmany types of complex information to images. Thus, images are important, but theytend to be big! Since modern hardware can display many colors, it is common to have apixel represented internally as a 24-bit number, where the percentages of red, green, andblue occupy 8 bits each. Such a 24-bit pixel can specify one of 2 24 ≈ 16.78 million colors.As a result, an image at a resolution of 512×512 that consists of such pixels occupies786,432 bytes. At a resolution of 1024×1024 it becomes four times as big, requiring3,145,728 bytes. Movies are also commonly used in computers, making for even biggerimages. This is why image compression is so important. An important feature of imagecompression is that it can be lossy. An image, after all, exists for people to look at,so, when it is compressed, it is acceptable to lose image features to which the eye isnot sensitive. This is one of the main ideas behind the many lossy image compressionmethods described in this chapter.In general, information can be compressed if it is redundant. It has been mentionedseveral times that data compression amounts to reducing or removing redundancy in thedata. With lossy compression, however, we have a new concept, namely compressingby removing irrelevancy. An image can be lossy-compressed by removing irrelevantinformation even if the original image does not have any redundancy.It should be mentioned that an image with no redundancy is not always random.<strong>The</strong> definition of redundancy (Section 2.1) tells us that an image where each color appearswith the same frequency has no redundancy (statistically), yet it is not necessarilyrandom and may even be interesting and/or useful.<strong>The</strong> idea of losing image information becomes more palatable when we considerhow digital images are created. Here are three examples: (1) A real-life image may bescanned from a photograph or a painting and digitized (converted to pixels). (2) Animage may be recorded by a video camera that creates pixels and stores them directlyin memory. (3) An image may be painted on the screen by means of a paint program.In all these cases, some information is lost when the image is digitized. <strong>The</strong> fact thatthe viewer is willing to accept this loss suggests that further loss of information mightbe tolerable if done properly.(Digitizing an image involves two steps: sampling and quantization. Sampling animage is the process of dividing the two-dimensional original image into small regions:pixels. Quantization is the process of assigning an integer value to each pixel. Noticethat digitizing sound involves the same two steps, with the difference that sound isone-dimensional.)Here is a simple process to determine qualitatively the amount of data loss in acompressed image. Given an image A, (1) compress it to B, (2) decompress B to C,and (3) subtract D = C − A. IfA was compressed without any loss and decompressedproperly, then C should be identical to A and image D should be uniformly white. <strong>The</strong>more data was lost in the compression, the farther will D be from uniformly white.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!