View Single Post
  #17  
Old 22-07-07, 11:48
robski robski is offline
Senior Member
 
Join Date: Dec 2005
Location: Kent UK
Posts: 3,740
Default

The next step is Quantization which is the procedure of constraining the 64 outputs of the DCT process to a discrete set of values, such as an integer (whole number), rather than a continuous set of values, such as a real number (number that can have a fractional part). This is done by dividing all 64 strengths of frequency (pattern) by a corresponding value in a quantization table and then rounding the result to the nearest integer. The values in the quantization table are chosen to preserve low-frequency information as humans are more critical to loss of information in this area and discard high-frequency (noise-like) detail.

An example quantization table - the top left hand corner represent the low frequency and bottom right hand represent the high frequency.
A value in the table is used to divide the corresponding output of the DCT in the 8 x 8 block.
----------------------------------
16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99
----------------------------------

This is the point at which the user (you) can control the quality and amount of compression of the JPEG. Most application such as Photoshop have a slider or drop list of quality settings. The quality setting ( Quality factor ) is used to scale the values in the quantization table.

Outputs that either had a small frequency (pattern) strength or a large divisor in the quantization table will likely round to zero.

The lower the quality setting, the greater the divisor, increasing the chance of a zero result. On the converse, the highest quality setting would have quantization table values of all 1's, meaning the all of the original DCT data is preserved.

An important point to realize here is that the quantization table used for this step differs between nearly all digital cameras and software packages. Camera manufacturers independently choose an arbitrary "image quality" name (or level) to assign to the 64-value quantization matrix that they devise, and so the names cannot be compared between makes or even models by the same manufacturer.

The Quantization table used is stored as part of the Jpeg.

The Quantization process is the main source of the Lossy Compression.

We are on the home straight now the rest is simple compare to the DCT and Quantization processes.
__________________
Rob

-----------------------------------------------------
Solar powered Box Brownie Mk2

Captain Sunshine, to be such a man as he, and walk so pure between the earth and the sea.

WPF Gallery
Birdforum Gallery
http://www.robertstocker.co.uk updated
Reply With Quote