Function: blackThreshold()
blackThreshold(
__named_parameters):Promise<Uint8ClampedArray<ArrayBufferLike>>
Defined in: safeWasmWrappers.js:114
Parameters
__named_parameters
any
The input options.
Returns
Promise<Uint8ClampedArray<ArrayBufferLike>>
The thresholded image pixels.
Description
Apply a simple sRGB bin-based threshold on the Uint8ClampedArray image.
The bins in this function are determined by the num_colors parameter.
Async
blackThreshold
Throws
If the WASM function fails.
Example
const thresholded = await blackThreshold({ pixels, width, height, num_colors: 16 });
See
Todo
Support different bias levels for black/white thresholds.
Variation
Black-biased threshold with customizable number of colors
Since
0.0.0