Popularity Algorithms

Popularity algorithms are another form of uniform quantization. However, instead of dividing the color space into 256 regions these algorithms break the color space into much smaller, and consequently many more, regions. One possible implementation is to divide the space into regions 4x4x4 in size (262,144 regions). The original colors are again mapped to the region they fall in. The representative color for each region is the average of the colors mapped to it. The color map is selected by taking the representative colors of the 256 most popular regions (the regions that had the most colors mapped to them). If a non-empty region is not selected for the color map its index into the color map (the index that will be assigned to colors that map to that region) is then the entry in the color map that is closest (Euclidean distance) to its representative color).

These algorithms are also easy to implement and yield better results than the uniform quantization algorithm. They do, however, take slightly longer to execute and can have a significantly larger storage requirement depending on the size of regions. Also depending on the image characteristics this may not produce a good result. This can be said about all uniform sub-division schemes, because the method for dividing the color space does utilize any information about the image