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.

Edge Detect applies the Canny edge detection algorithm to find edges in an image. It outputs a binary image where white pixels mark detected edges. The two thresholds control sensitivity: the low threshold catches weak edges, the high threshold catches strong edges.

This node is commonly used to create line art from photographs or generate masks for compositing.

Expand grows the detected edges outward by a pixel radius, turning a hairline Canny result into a usable stroke weight. A Shape option (Round, Square, Diamond) 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. Expand starts at 0, which is the same thin edges earlier versions produced.

Pins

ImageImage
InputRequired
ImageImage
Output
AlphaMask
Output

Filter

Low ThresholdInteger
Default: 50 Range: 0–1000

Lower Canny threshold for edge rejection

High ThresholdInteger
Default: 150 Range: 0–1000

Upper Canny threshold for strong-edge acceptance

ApertureInteger
Default: 3 Range: 3–7

Sobel kernel size for gradient computation (3, 5, or 7)

L2 GradientToggle
Default: false

Use L2 norm for gradient magnitude (more accurate, slower than L1)

Pre-BlurToggle
Default: false

Apply 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 (odd)

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

Swap edge vs background pixels

Color

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

Edge color

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

Background color

  • Enable Pre-Blur to reduce noise before detection, producing cleaner edges with fewer false positives.
  • Lower thresholds detect more edges (including noise); higher thresholds detect only strong edges.
  • Use custom edge and background colors to create colored line art. The background is opaque black by default; drop its alpha to 0 for edges over transparency.
  • Raise Expand to thicken line art for print or for use as a mask, instead of running the output through a separate dilate.
  • If the node reports No edges detected, Canny found nothing at the current thresholds. The warning now shows even with Invert on, where the result would otherwise look like a full white frame.