Skip to content

Edge Detect

Node icon
Filter

Extracts edges from an image using the Canny algorithm. Useful for creating line art or masks.

The Edge Detect node applied to a source image: original (left) and result (right).
Side-by-side comparison: the original image on the left and the same image after the Edge Detect node on the right.

The output draws detected edges in the Edge color over the Background color, and a separate Alpha output carries the edges as a single-channel image for use as a mask.

Canny edges are one pixel wide. Expand grows them outward by a pixel radius into a usable stroke weight, and Expansion Shape decides how corners and diagonals grow: Round keeps a uniform radius in every direction, Square grows along both axes to full width, and Diamond grows fastest along the axes and slowest on the diagonals.

Pins

ImageImage
InputRequired
ImageImage
Output
AlphaMask
Output

Filter

Low ThresholdInteger
Default: 50 Range: 0–1000

Lower Canny threshold. Pixels with gradient below this are rejected as non-edges

High ThresholdInteger
Default: 150 Range: 0–1000

Upper Canny threshold. Pixels above this are immediately accepted as edges. Pixels between Low and High are accepted only if connected to a strong edge

ApertureInteger
Default: 3 Range: 3–7

Sobel kernel size used to compute gradients.

Larger values detect broader, smoother edges.

L2 GradientToggle
Default: false

How gradient magnitude is measured.

  • On: L2 norm, more accurate.
  • Off: the faster L1 norm approximation.
Pre-BlurToggle
Default: false

Apply a Gaussian blur before edge detection to reduce noise

Blur Kernel (px)Integer
Default: 3 Range: 3–41
When Pre-Blur is on

Gaussian kernel size for pre-blur. Must be odd (3-21)

Expand (px)Integer
Default: 0 Range: 0–32

Expands detected edges by this kernel radius. A one-pixel line becomes about 1 + 2N pixels wide.

Diagonal coverage depends on Expansion Shape.

Expansion ShapeChoice
Default: Round Range: Round / Square / Diamond
When Expand is nonzero

Shape of the expansion kernel: Round, Square, or Diamond

InvertToggle
Default: false

Invert the edge mask: swaps which pixels are treated as edges vs background

Color

EdgeColor (RGBA)
Default: rgba(255, 255, 255, 255)

Edge color

BackgroundColor (RGBA)
Default: rgba(0, 0, 0, 255)

Background color

  • Turn on Pre-Blur to reduce noise before detection, for cleaner edges with fewer false ones.
  • Lower thresholds detect more edges (including noise); higher thresholds keep only strong edges.
  • Set the Edge and Background colors for colored line art. The background is opaque black by default; set Background A to 0 for edges over transparency.
  • If the node reports No edges detected, lower the thresholds. The warning also shows with Invert on, where the result would otherwise look like a plain full frame.