gives an approximation to image by quantizing to distinct colors.
uses at most n distinct colors.
represents an image using only the n specified colors coli.
Details and Options
- Color quantization is the process of reducing the number of colors used to represent an image.
- ColorQuantize works with arbitrary 2D and 3D images.
- Quantization for color images is performed in the original color space. For images with Automatic color space, quantization is performed on pixel intensities by averaging over all channels.
- The following options can be given:
Dithering True whether to use dithering Method Automatic quantization method to use
- Possible settings for Method include:
"MedianCut" recursively split the color space based on median pixel values "MinVariance" recursively split the color space so that the sum of variances in new subregions is minimal (Wu's algorithm) "Octree" create an octree from all image pixels and merge leaves until the n most representative remain
Examplesopen allclose all
Basic Examples (1)
Properties & Relations (3)
Compare with DominantColors:
Quantize an image using dominant colors given by DominantColors:
Possible Issues (1)
For images with Automatic color space, quantization is performed on pixel intensities by averaging over all channels:
Wolfram Research (2008), ColorQuantize, Wolfram Language function, https://reference.wolfram.com/language/ref/ColorQuantize.html (updated 2019).
Wolfram Language. 2008. "ColorQuantize." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/ColorQuantize.html.
Wolfram Language. (2008). ColorQuantize. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ColorQuantize.html