JPEG
In computing, JPEG (pronounced jay-peg) is a commonly used standard method of lossy compression for photographic images. The file format which employs this compression is commonly also called JPEG; the most common file extensions for this format are .jpeg, .jfif, .jpg, .JPG, or .JPE although .jpg is the most common on all platforms.
Encoding
Many of the options in the JPEG standard are little used. Here is a brief description of one of the more common methods of encoding when applied to an input that has 24 bits per pixel (eight each of red, green, and blue). This particular option is a lossy data compression method.
Related Topics:
Bits per pixel - Red, green, and blue - Lossy data compression
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Color space transformation
First, the image is converted from RGB into a different color space called YUV.
Related Topics:
RGB - Color space - YUV
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
This is similar to the color space used by NTSC and PAL color television transmission, but is most similar to the way the MAC television transmission system works.
Related Topics:
NTSC - PAL - Television - MAC
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
- The Y component represents the brightness of a pixel
- The U and V components together represent the hue and saturation
This encoding system is useful because the human eye can see more detail in the Y component than in U and V. Using this knowledge, encoders can be designed to compress images more efficiently.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Downsampling
The above transformation enables the next step, which is to reduce the U and V components (called "downsampling" or "chroma subsampling"). The ratios at which the downsampling can be done on JPEG are (no downsampling), (reduce by factor of 2 in horizontal direction), and most commonly (reduce by factor of 2 in horizontal and vertical directions). For the rest of the compression process, Y, U and V are processed separately and in a very similar manner.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Discrete cosine transform
Next, each component (Y, U, V) of the image is "tiled" into sections of eight by eight pixels each, then each tile is converted to frequency space using a two-dimensional discrete cosine transform (DCT).
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
If one such 8×8 8-bit subimage is:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
egin{bmatrix}
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
52 & 55 & 61 & 66 & 70 & 61 & 64 & 73 \
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
63 & 59 & 55 & 90 & 109 & 85 & 69 & 72 \
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
62 & 59 & 68 & 113 & 144 & 104 & 66 & 73 \
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
63 & 58 & 71 & 122 & 154 & 106 & 70 & 69 \
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
67 & 61 & 68 & 104 & 126 & 88 & 68 & 70 \
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
79 & 65 & 60 & 70 & 77 & 68 & 58 & 75 \
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
85 & 71 & 64 & 59 & 55 & 61 & 65 & 83 \
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
87 & 79 & 69 & 68 & 65 & 76 & 78 & 94
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
end{bmatrix}
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
which is then shifted by 128 results in
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
:
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
egin{bmatrix}
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Table of Content ~
| ► | Introduction |
| ► | Encoding |
~ What's Hot ~
~ Community ~
| ► | History Forum Come and discuss about History, Civilizations, Historical Events and Figures |
| ► | History Web-Ring A community of sites, blogs and forums dedicated to History. Do not hesitate to submit your site. |
and are licensed under the GNU Free Documentation License.
Lexicon - Privacy Policy - Spiritus-Temporis.com ©2005.
