什么是Color LUT/Color Map

Look-Up Tables or LUTs are fundamental to many aspects of image processing. An LUT is simply a table of cross-references linking index numbers to output values. The most common use is to determine the colors and intensity values with which a particular image will be displayed, and in this context the LUT is often called simply a colormap.

The idea behind the colormap is that instead of storing a definite color for each pixel in an image, for instance in 24-bit RGB format, each pixel's value is instead treated as an index number into the colormap. When the image is to be displayed or otherwise processed, the colormap is used to look up the actual colors corresponding to each index number. Typically, the output values stored in the LUT would be RGB color values.
There are two main advantages to doing things this way. Firstly, the index number can be made to use fewer bits than the output value in order to save storage space. For instance an 8-bit index number can be used to look up a 24-bit RGB color value in the LUT. Since only the 8-bit index number needs to be stored for each pixel, such 8-bit color images take up less space than a full 24-bit image of the same size. Of course the image can only contain 256 different colors (the number of entries in an 8-bit LUT), but this is sufficient for many applications and usually the observable image degradation is small.
Secondly the use of a color table allows the user to experiment easily with different color labeling schemes for an image.
One disadvantage of using a colormap is that it introduces additional complexity into an image format. It is usually necessary for each image to carry around its own colormap, and this LUT must be continually consulted whenever the image is displayed or processed.
Another problem is that in order to convert from a full color image to (say) an 8-bit color image using a color image, it is usually necessary to throw away many of the original colors, a process known as color quantization. This process is lossy, and hence the image quality is degraded during the quantization process. Additionally, when performing further image processing on such images, it is frequently necessary to generate a new colormap for the new images, which involves further color quantization, and hence further image degradation.
As well as their use in colormaps, LUTs are often used to remap the pixel values within an image. This is the basis of many common image processing point operations such as thresholding, gamma correction and contrast stretching. The process is often referred to as anamorphosis.

From: http://en.wikipedia.org/wiki/Colour_look-up_table 
 

A colour look-up table' (CLUT) is a mechanism used to transform a range of input colours into another range of colours. It can be a hardware device built into an imaging system or a software function built into an image processing application. The hardware colour look-up table will convert the logical colour (pseudo-colour) numbers stored in each pixel of video memory into physical colours, normally represented as RGB triplets, that can be displayed on a computer monitor. The palette is simply a block of fast RAM which is addressed by the logical colour and whose output is split into the red, green, and blue levels which drive the actual display (e.g., a CRT or cathode ray tube).
A CLUT is characterized by:
The number of entries in the palette: determines the maximum number of colours which can appear on screen simultaneously (a subset of the wider full palette, which is to be understood as the total number of colours that a given system is able to generate or manage, e.g. the full RGB colour palette).
The width of each entry in the palette: determines the number of colours which the wider full palette can represent.

A common example would be a palette of 256 colours; that is, the number of entries is 256, and thus each entry is addressed by an 8-bit pixel value. The 8 bits is known as colour depth, bit depth or bits per pixel (bpp). Each colour can be chosen from a full palette, typically with a total of 16.7 million colours; that is, the width of each entry is 24 bits, 8 bits per channel, which means combinations of 256 levels for each of the red, green, and blue components: 256 × 256 × 256 = 16,777,216 colours. 

原文地址:https://www.cnblogs.com/super119/p/2669153.html