View Single Post
  #32  
Old 09-08-07, 23:22
robski robski is offline
Senior Member
 
Join Date: Dec 2005
Location: Kent UK
Posts: 3,755
Default

This post is to further dot the i's and cross the t's on the Quantisation stage. It is responsible for the majority of the lossy compression.

Each DCT term is divided by the corresponding position in the Quantisation table and then rounded to the nearest integer as illustrated in the first attachment. In the Quantization table the low frequency terms are in the top left hand corner and the high frequency terms are in the bottom right hand corner.
The values in the Quantisation table are also scaled (multiplied) by the Quality Factor setting ( Compression level slider in photoshop) which has the overall effect of making the Quantization level finer or coarser. From the table we can see that the size of Quantization steps varied with frequency. High frequencies are less important to human vision and therefore receive a coarser quantization. For example the low frequencies may end up with 50 different levels and highest frequency with only 3 or 4 levels.

The effect of Quantization is a bit like the Posterisation tool in Photoshop. In fact for the next attachment I have taken a typical photographic scene and applied different levels of posterisation. The upper image has 256 levels and will store in 8 bits. The middle image illustrates the effect if we used 7bits and the lower image shows the effect if we reduced it further to 6 bits. Our vision system is very tolerant to a reduction in the number of levels for this type of image. However, in the next attachment I have used the gradient tool to simulate a very low frequency image. Stepping is clearly seen as the number of levels are reduced. So for low frequencies the number of levels must to be retained.
__________________
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

Last edited by robski; 26-07-11 at 22:34.
Reply With Quote