JPEG (Joint
Photographic Experts Group)
Introduction
JPEG (Joint Photographic Experts Group) is a standardized image compression mechanism designed for compressing either full-color or gray-scale images of natural, real-world scenes. It works well on photographs, naturalistic artwork, and similar material. However, it does not work so well on lettering, simple cartoons, or line drawings. JPEG works by exploiting known limitations of the human eye, notably the fact that small color changes are perceived less accurately than small changes in brightness.
JPEG is lossy but it achieves much greater compression than is possible with lossless methods. A major disadvantage of lossy compression is that repeated compression and decompress will continue to deteriorate image quality. The amount of "loss" can be varied by adjusting compression parameters that determine image quality and speed of decoding. In essence, this means that image size is offset by image quality or the amount of time needed to decode the image file for display.
JPEG does not support transparency.
Strengths
1. JPEG can easily provide 20:1 compression of full-color data. In contrast, GIF provides on average, a 4:1 compression ratio.
2. JPEG can store 24-bit-per-pixel color data instead of 8-bit-per-pixel data. 24 bits per pixel gives 16 million colors as compared t0 256 or fewer colors for 8 bits per pixel.
JPEG versus GIF
Generally, JPEG is superior to GIF for storing full-color or gray-scale images of "realistic" scenes; that means scanned photographs, continuous-tone artwork, and similar material. Smooth variation in color, such as occurs in highlighted or shaded areas, will be represented better with JPEG.
GIF performs better on images with only a few distinct colors, such as line drawings and simple cartoons. For such images, GIF lossless and can compress better than JPEG.
JPEG will not perform well with very sharp edges: a row of pure-black pixels adjacent to a row of pure-white pixels, for example. Sharp edges tend to come out blurred unless a very high quality setting is used.
Plain black-and-white (two level) images should never be converted to JPEG. You need at least about 16 gray levels before JPEG is useful for gray-scale images. It should also be noted that GIF is lossless for gray-scale images of up to 256 levels, while JPEG is not.
Compression
When working with its intended type of image, JPEG compresses very The best known lossless compression methods can compress such data about 2:1 on average. JPEG can typically achieve 10:1 to 20:1 compression without visible loss. 30:1 to 50:1 compression is possible with small to moderate defects, while for very-low-quality purposes such as previews or archive indexes, 100:1 compression is quite feasible.
Gray-scale images do not compress by such large factors. Because the human eye is much more sensitive to brightness variations than to hue variations, JPEG can compress hue data more heavily than brightness (gray-scale) data. A gray-scale JPEG file is generally only about 10%-25% smaller than a full-color JPEG file of similar visual quality. The threshold of visible loss is often around 5:1 compression for gray-scale images.
Progressive JPEG
A simple or "baseline" JPEG file is stored as one top-to-bottom scan of the image. Progressive JPEG divides the file into a series of scans. The first scan shows the image at the equivalent of a very low quality setting, and therefore it takes very little space. Following scans gradually improve the quality. Each scan adds to the data already provided, so that the total storage requirement is roughly the same as for a baseline JPEG image of the same quality as the final scan.
The advantage of progressive JPEG is that if an image is being viewed on-the-fly as it is transmitted, one can see an approximation to the whole image very quickly, with gradual improvement of quality as one waits longer; this is much nicer than a slow top-to-bottom display of the image. The disadvantage is that each scan takes about the same amount of computation to display as a whole baseline JPEG file would. So progressive JPEG only makes sense if one has a decoder that's fast compared to the communication link.
|
|
 |
|