rullino
    Preparing search index...

    Variable otsuConst

    otsu: MultipassFilter<
        {
            invert: {
                default: false;
                description: "Swap black and white.";
                label: "Invert";
                type: "bool";
            };
        },
    > = ...

    Automatic global threshold (Otsu) on perceptual luminance. A 256-bin histogram of the straight colour is built with atomics (fully transparent pixels are skipped), one invocation picks the threshold, a last pass applies it: white above, black at or below, alpha kept.