rullino
    Preparing search index...

    Variable cannyConst

    canny: MultipassFilter<
        {
            high: {
                default: 0.15;
                description: "Gradients above this are always edges.";
                label: "High threshold";
                max: 1;
                min: 0;
                step: 0.005;
                type: "float";
            };
            iterations: {
                default: 64;
                description: "How many rounds are used to follow weak edges. Enough rounds give the full result; more only costs time.";
                label: "Hysteresis iterations";
                max: 256;
                min: 0;
                type: "int";
            };
            low: {
                default: 0.05;
                description: "Gradients below this are never edges; between low and high they count only when connected to a strong edge.";
                label: "Low threshold";
                max: 1;
                min: 0;
                step: 0.005;
                type: "float";
            };
            sigma: {
                default: 1.4;
                description: "Blur applied first, in pixels. More smoothing ignores fine texture.";
                label: "Smoothing σ (px)";
                max: 10;
                min: 0;
                step: 0.1;
                type: "float";
                unit: "px";
            };
        },
    > = ...

    Canny edge detector on perceptual luminance (sRGB-encoded luminance of the premultiplied colour, i.e. as seen over black): Gaussian smoothing, Sobel gradient, non-maximum suppression with 45° directions, double threshold, then iterations rounds of 8-connected hysteresis (enough rounds equal full hysteresis). Thresholds are on |∇| / 4 of the encoded luminance, so a hard 0→1 step reads about 0.6 at σ = 1. Output: white edges on black, alpha kept.