Color quantization

Color quantization, or color reduction is called quantization of computer graphics, which reduce the number of colors in a raster graphics.

Color reduction is applied in order to benefit from the smaller by lower bit- depth space of a graphics file. In particular, indexed colors allow relatively compact files. Color reduction becomes less important, because today's graphics cards and displays support true color.

Method

There are various algorithms for identifying the best colors ( representatives ) to resize. These include:

  • Uniform quantization
  • Popularity algorithm
  • Octree
  • Median Cut
  • NeuQuant ( self organizing map )
  • Generalized Lloyd algorithm ( Linde - Buzo -Gray )

Improvement of the image impression

The reduction in the colors produced edges that are preferred perceived by the eye disturb ( Mach stripes) and the image impression. The so-called dithering smeared transitions by selectively become noisy and improved subjective image quality.

Examples

Reduced to 16 colors without dithering

Reduced to 16 colors, with dithering

The color reduction is when saving in a graphics format that only supports a lower color depth than the original image, is necessary. For example, the GIF format supports 256 different colors. Grayscale images with a color depth of 8 bits can be stored without loss, color photos with a color depth of 24 bits per pixel, however, must be reduced to 256 colors before saving.

326403
de