-
Notifications
You must be signed in to change notification settings - Fork 9
What is color quantization?
Color quantization is a technique that reduces the number of unique colors used in an image to a small number such as 256 or fewer, while preserving visual similarity to the original input image. Given the limited number of colors, and the fact that such methods ignore spatial contexts, a severe type of artifact arises in the quantized image in areas of smooth color gradients, in the form of false edges, as are clearly visible in the sky, for example. To reduce such artifacts, a subsequent dithering step is typically employed after quantization, as the human visual system tends to perceive regions with high frequency spatial color changes as a homogeneous color. Dithering distributes quantization errors into neighboring pixels, helping to hide the false edges. The improvements provided by dithering can be seen.
A fast pairwise nearest neighbor (PNN) based O(N log N) time algorithm for multilevel nonparametric thresholding, where N denotes the size of the image histogram. It is applicable in real time image processing applications. Such optimization based combined quantization and dithering can be significantly improved in terms of speed and quality.