Expand description
Wu’s color quantization method (Greedy Orthogonal Bipartitioning).
This preclustering method progressively splits the histogram box with the greatest variance
along the dimension and bin that results in the greatest decrease in variance. It should give
much better results than median cut while having nearly the same computational cost. Compared to
k-means clustering (see the kmeans module), this quantization method is much
faster, but gives less accurate results.
Currently, only colors with 3 u8 or 3 f32 components are supported via WuU8x3 and WuF32x3.
Those two structs have the same API. See their documentation for more details and examples.
Structs§
- Binner
F32x3 - A histogram binner for colors consisting of 3
f32components. - Binner
U8x3 - A histogram binner for colors consisting of 3
u8components. - WuF32x3
- The struct for Wu’s color quantization method for colors with
f32components in 3 dimensions. - WuF32x3
Color Map - An
IndexedColorMapthat maps colors to histograms bins and the palette index or color associated with the histogram bin. - WuF32x3
Parallel Color Map - An
IndexedColorMapthat, in parallel, maps colors to histograms bins and the palette index or color associated with the histogram bin. - WuU8x3
- The struct for Wu’s color quantization method for colors with
u8components in 3 dimensions. - WuU8x3
Color Map - An
IndexedColorMapthat maps colors to histograms bins and the palette index or color associated with the histogram bin. - WuU8x3
Parallel Color Map - An
IndexedColorMapthat, in parallel, maps colors to histograms bins and the palette index or color associated with the histogram bin.