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