quantize method

  1. @override
Future<QuantizerResult> quantize(
  1. Iterable<int> pixels,
  2. int maxColors, {
  3. bool returnInputPixelToClusterPixel = false,
})
override

Implementation

@override
Future<QuantizerResult> quantize(Iterable<int> pixels, int maxColors,
    {bool returnInputPixelToClusterPixel = false}) async {
  final wu = QuantizerWu();
  final wuResult = await wu.quantize(pixels, maxColors);
  final wsmeansResult = QuantizerWsmeans.quantize(pixels, maxColors,
      startingClusters: wuResult.colorToCount.keys.toList(),
      pointProvider: PointProviderLab(),
      returnInputPixelToClusterPixel: returnInputPixelToClusterPixel);
  return wsmeansResult;
}