PointProviderLab

Provides conversions needed for K-Means quantization. Converting input to points, and converting the final state of the K-Means algorithm to colors.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun distance(one: Array<Double>, two: Array<Double>): Double
Standard CIE 1976 delta E formula also takes the square root, unneeded here.
Link copied to clipboard
open fun fromInt(argb: Int): Array<Double>
Convert a color represented in ARGB to a 3-element array of L*a*b* coordinates of the color.
Link copied to clipboard
open fun toInt(lab: Array<Double>): Int
Convert a 3-element array to a color represented in ARGB.