Thông tin tài liệu:
10. IMAGE COMPRESSION10.1 IntroductionThe storage requirement for uncompressed video is 23.6 Megabytes/second (512 pixels x 512 pixels x 3 bytes/pixel x 30 frames/second). With MPEG compression, full-motion video can be compressed down to 187
Nội dung trích xuất từ tài liệu:
Cơ sở dữ liệu hình ảnh - Chương 1010. IMAGE COMPRESSION10.1 IntroductionThe storage requirement for uncompressed video is 23.6 Megabytes/second (512 pixels x512 pixels x 3 bytes/pixel x 30 frames/second). With MPEG compression, full-motionvideo can be compressed down to 187 kilobytes/second at a small sacrifice in quality.Why should you care?If your favorite movie is compressed with MPEG-1, the storage requirements are reducedto 1.3 gigabytes. Using our high bandwidth link, the transfer time would be 7.48 seconds.This is much better.Clearly, image compression is needed. This is apparent by the large number of newhardware and software products dedicated solely to compress images. It is easy to see whyCompuServe came up with the GIF file format to compress graphics files. As computergraphics attain higher resolution and image processing applications require higherintensity resolution (more bits per pixel), the need for image compression will increase.Medical imagery is a prime example of images increasing in both spatial resolution andintensity resolution. Although humans dont need more than 8 bits per pixel to view grayscale images, computer vision can analyze data of much higher intensity resolutions.Compression ratios are commonly present in discussions of data compression. Acompression ratio is simply the size of the original data divided by the size of thecompressed data. A technique that compresses a 1 megabyte image to 100 kilobytes hasachieved a compression ratio of 10. compression ratio = original data/compressed data = 1 M bytes/ 100 k bytes = 10.0For a given image, the greater the compression ratio, the smaller the final image will be.There are two basic types of image compression: lossless compression and lossycompression. A lossless scheme encodes and decodes the data perfectly, and the resultingimage matches the original image exactly. There is no degradation in the process-no datais lost.Lossy compression schemes allow redundant and nonessential information to be lost.Typically with lossy schemes there is a tradeoff between compression and image quality.You may be able to compress an image down to an incredibly small size but it looks sopoor that it isnt worth the trouble. Though not always the case, lossy compressiontechniques are typically more complex and require more computations.Lossy image compression schemes remove data from an image that the human eyewouldnt notice. This works well for images that are meant to be viewed by humans. If theimage is to be analyzed by a machine, lossy compression schemes may not be appropriate.Computers can easily detect the information loss that the human eye may not. The goal oflossy compression is that the final decompressed image be visually lossless. Hopefully, theinformation removed from the image goes unnoticed by the human eye.Many people associate huge degradations with lossy image compression. What they dontrealize is that the most of the degradations are small if even noticeable. The entire imagingoperation is lossy, scanning or digitizing the image is a lossy process, and displaying animage on a screen or printing the hardcopy is lossy. The goal is to keep the lossesindistinguishable.Which compression technique to use depends on the image data. Some images, especiallythose used for medical diagnosis, cannot afford to lose any data. A lossless compressionscheme will need to be used. Computer generated graphics with large areas of the samecolor compress well with simple lossless schemes like run length encoding or LZW.Continuous tone images with complex shapes and shading will require a lossycompression technique to achieve a high compression ratio. Images with a high degree ofdetail that cant be lost, such as detailed CAD drawings, cannot be compressed with lossyalgorithms.When choosing a compression technique, you must look at more than the achievablecompression ratio. The compression ratio alone tells you nothing about the quality of theresulting image. Other things to consider are the compression/decompression time,algorithm complexity, cost and availability of computational resources, and howstandardized the technique is. If you use a compression method that achieves fantasticcompression ratios but you are the only one using it, you will be limited in yourapplications. If your images need to be viewed by any hospital in the world, you better usea standardized compression technique and file format.If the compression/decompression will be limited to one system or set of systems you maywish to develop your own algorithm. The algorithms presented in this chapter can be usedlike recipes in a cookbook. Perhaps there are different aspects you wish to draw fromdifferent algorithms and optimize them for your specific application (Figure 10. 1). Figure 10.1 A typical data compression system.Before presenting the com ...