Absolute Beginner's Guide to Digital Photography

(Ann) #1

88 ABSOLUTE BEGINNER’S GUIDE TODIGITAL PHOTOGRAPHY


The lossy portion of JPEG includes several compression methods:
■ Baseline sequential. The standard JPEG compression method and the
fastest. This method is supported by all applications, but the optimized
method is recommended for your images.
■ Baseline optimized.This encoding uses an improved compression algo-
rithm that results in better compression with the same quality as baseline
sequential. File sizes should be around five percent smaller.

The following section explains how the JPEG compression algorithm works. You will
quickly learn some new terms, such as luminance, chrominance, and YUV color.

How JPEG Works
An RGB image is comprised of three channels. The JPEG compression algorithm per-
forms the following steps on the image to reduce file size without affecting quality:


  1. Converts the RGB image to Y'CBCR, a different color space that defines each
    pixel based on brightness (Y) and chrominance (CBCR). This color space is also
    known as the YUV color spaceand was created for video processing. The Y'
    value represents the brightness of the pixel, CBrepresents one component of
    the chrominance (blue), and CRrepresents another component of chromi-
    nance (red). The CBCRvalues represent the hue or color information in the
    file.

  2. Immediately reduces the file size by up to 50 percent by sampling the entire
    image and cutting the chrominance information in half. The luminance
    component is left alone. (Remember–our eyes are sensitive to changes in
    brightness.) The chroma information will be reduced 2:1 horizontally, and
    either 2:1 or 1:1 (no change) vertically (see Figure 7.4). This process is called
    4:2:2 sampling, and is a standard in the television industry. This step reduces
    the data volume by one-half or more. It seems lossy, but actually it has little
    or no visual impact.

  3. Scans the image starting at the top left and creates blocks of pixels (see Figure
    7.5) 8×8 pixels in size (64 pixels total).

  4. Converts brightness values in each block from 0–255 to -128 to +127.
    Processes each block through the DCT (Discrete Cosine Transform) function to
    create a frequency map of values.

Free download pdf