Distance function/metric to use for finding nearest centroid.
Predicate used to only include pixels in the analysis for which the filter returns truthy result. E.g. to pre-exclude weakly saturated or dark colors etc. The second arg is the index of the pixel in the image's pixel buffer.
If omitted, all pixels will be included (default).
Array of initial centroids (i.e. indices of selected points in samples
array given to kmeans).
Max. iteration count
PRNG instance to use for random centroid selection
Centroid refinement strategy (default: means).
Generated using TypeDoc
Options for dominantColors, an extension of KMeansOpts.