Saturday, March 26, 2011

CG- dithering techniques...

Dithering - A technique used in quantization processes such as graphics and audio to reduce or remove the correlation between noise and signal.

Dithering is used in computer graphics to create additional colors and shades from an existing palette by interspersing pixels of different colors. On a monochrome display, areas of Grey are created by varying the proportion of black and white pixels. In color displays and printers, colors and textures are created by varying the proportions of existing colors. The different colors can either be distributed randomly or regularly. The higher the resolution of the display, the smoother the dithered color will appear to the eye.


Dithering doesn't reduce resolution. There are three types: regular dithering which uses a very regular predefined pattern; random dither where the pattern is a random noise; and pseudo random dither which uses a very large, very regular, predefined pattern.


Dithering is used to create patterns for use as backgrounds, fills and shading, as well as for creating halftones for printing. When used for printing is it very sensitive to paper properties. Dithering can be combined with rasterising. It is not related to anti-aliasing.


Dithering technique:
 Dither algorithm performs an optimal adding of a sequence of images as far as resolution is concerned. The principle is that, at sub-pixel level, shifts between individual input images are nearly randomly distributed. For example, a star in the first image may be centered  perfectly in the middle of a pixel, whereas it will be across two pixels in the second one, and so on. Since it is easy to know the exact shift between the images, it is possible to create an output image with a finer sampling, in which resolution may be increased with respected to each input image. In fact, energy from each input pixel is dropped in the output image.

  Fig. 1: Random Number Generated  
                      


                  
   
Fig. 2: Algorithm Generated


Figure 1 shows a dither pattern generated by a random number generator, even with a randomized seed.  Note that the distribution of points is not very uniform.  Indeed, there are some points that could result in sensor noise not being eliminated but in fact being reinforced due to insufficient difference in positions.

Figure 2 shows the dither pattern that results from the use of this algorithm. It achieves maximize separation from one frame to another with a minimum overall movement of the guide star.

  
Usage :

Dither should be added to any low-amplitude or highly-periodic signal before any quantization or re-quantization process, in order to De-correlate the quantization noise with the input signal and to prevent non-linear behavior (distortion); the lesser the bit depth, the greater the dither must be. The results of the process still yield distortion, but the distortion is of a random nature so its result is effectively noise. Any bit-reduction process should add dither to the waveform before the reduction is performed.

 

 

refer : http://www.hiddenloft.com/notes/dithering1.htm

          http://en.wikipedia.org/wiki/Dither

          http://www.astrosurf.org/buil/us/spe9/lrgb22.htm


No comments:

Post a Comment