Expand description
Wu’s color quantizer (Greedy Orthogonal Bipartitioning).
This preclustering method recursively 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.
A binner with 32
bins (B = 32
) is a good compromise between speed and accuracy.
If the PaletteSize
is small, less bins can be used without sacrificing accuracy too much.
Otherwise, use more bins (e.g., 64
) if you want greater accuracy.
Structs§
- Float
Binner - A binner for colors with components that are floating point types.
- UInt
Binner - A binner for colors with components that are unsigned integer types.
Traits§
- Binner3
- An interface for taking colors with 3 components and returning a 3-dimensional histogram bin index.
Functions§
- indexed_
palette - Computes a color palette from the given
color_counts
with at mostpalette_size
entries and using the givenbinner
. The returnedQuantizeOutput
will have itsindices
populated. - indexed_
palette_ par - Computes a color palette in parallel from the given
color_counts
with at mostpalette_size
entries and using the givenbinner
. The returnedQuantizeOutput
will have itsindices
populated. - palette
- Computes a color palette from the given
color_counts
with at mostpalette_size
entries and using the givenbinner
. - palette_
par - Computes a color palette in parallel from the given
color_counts
with at mostpalette_size
entries and using the givenbinner
.