Struct exoquant::optimizer::WeightedKMeans
[−]
[src]
pub struct WeightedKMeans;
A slightly experimental Optimizer that improves color representation in dithered images.
The standard K-Means optimization produces palettes that can't represent the extrema of the input colors, even with dithering. This optimizer tries to optimize the representation of these fringe colors. This does increase the dithering noise a bit and is only really useful for low target color counts (say <= 64).
Trait Implementations
impl Optimizer for WeightedKMeans
[src]
fn step(&self, colors: Vec<Colorf>, histogram: &[ColorCount]) -> Vec<Colorf>
Do one K-Means optimization step and return colors that better represent the histogram. Read more
fn optimize_palette(&self, colorspace: &ColorSpace, palette: &[Color], histogram: &Histogram, num_iterations: usize) -> Vec<Color>
Optimize a given palette with a number of K-Means iteration. Read more
fn is_noop(&self) -> bool
Returns whether this Optimizer is a No-op implementation. Read more