Skip to main content

Interface: KMeansOptions

Defined in: safeWasmWrappers.js:50

Properties​

color_space?​

optional color_space?: ColorSpace

Defined in: safeWasmWrappers.js:58

Color space mode (0: CIE LAB; 1: sRGB).


height​

height: number

Defined in: safeWasmWrappers.js:53

Image height.


max_iter?​

optional max_iter?: number

Defined in: safeWasmWrappers.js:57

Maximum number of iterations.


num_colors​

num_colors: number

Defined in: safeWasmWrappers.js:54

Number of color clusters.


out_labels?​

optional out_labels?: Int32Array<ArrayBufferLike>

Defined in: safeWasmWrappers.js:56

Output labels array. Defaults to a new array of pixels.length / 4.


out_pixels?​

optional out_pixels?: Uint8ClampedArray<ArrayBufferLike>

Defined in: safeWasmWrappers.js:55

Output pixels array. Defaults to a new array the size of pixels.


pixels​

pixels: Uint8ClampedArray<ArrayBufferLike>

Defined in: safeWasmWrappers.js:51

Original image pixels.


width​

width: number

Defined in: safeWasmWrappers.js:52

Image width.