Studio Yotsuba
Back to Node List

Edge Detect

edge_detect

Finds borders where brightness, transparency, or color changes sharply.

Reviewed
Guide available

Input Ports

NameTypeDescription
Image
input
Image
Required
Image whose visible borders or color changes will be detected.

Output Ports

NameTypeDescription
Edges
output
Image
Grayscale edge image. White means a stronger border.

Parameters

NameTypeDefaultRangeDescription / Options
Mode
mode
Enum
OKLCH-L—

Choose what kind of change should become an edge.

  • OKLCH-LOKLCH-L
    Find borders from perceived brightness changes.
  • LuminanceLuminance
    Find borders from simple grayscale brightness.
  • AlphaAlpha
    Find borders from transparency changes.
  • RGB-DifferenceRGB-Difference
    Find borders where RGB color changes.
  • OKLCH-DifferenceOKLCH-Difference
    Find borders where perceived color changes.
Strength
strength
Float
20–8 / step 0.05

Makes detected lines brighter or weaker.

Threshold
threshold
Float
00–1 / step 0.01

Removes weak lines. Increase it to keep only strong borders.

Invert
invert
Bool
false—

Swap black and white in the result.

Wrap X
wrap_x
Bool
false—

Treat left and right edges as connected when comparing neighboring pixels.

Wrap Y
wrap_y
Bool
false—

Treat top and bottom edges as connected when comparing neighboring pixels.

Overview

Extracts abrupt changes in an image as white lines. Use it as the basis for an outline, a boundary mask, a glowing edge, or surface-relief effects.

Select with mode whether to detect changes in brightness, boundaries in alpha, or changes in the colors themselves.

Usage tips

  • Choosing mode is the key: use Alpha for a shape's outline (the boundary with transparency), or OKLCH-L for light-dark boundaries inside the artwork. When unsure, start with Alpha.
  • The output is not a line image but a map of boundary strength. To use it as a line, remove noise with threshold and layer it with blend, or pass it as a mask to a color-adjustment node.
  • strength accepts 0–8 and threshold accepts 0–1. Values promoted from input ports outside those ranges are clamped, with a warning shown on the parameter.
  • For a character silhouette, the dedicated outline node is more direct. Use Edge Detect when you also want to capture boundaries inside the image.

Related nodes

  • outline — dedicated silhouette-outline node
  • blend — layer the detected lines
  • morphology — thicken and clean up the detected result
  • region_border — RegionMap-based boundaries

Examples

  • Use Alpha to extract the boundary with transparent areas as the basis for an outline.
  • Use OKLCH-L to turn only light-dark boundaries into white lines.
  • Raise threshold to remove fine grain and retain only strong outlines.
  • For tile assets, enable wrap_x / wrap_y so edge detection includes continuity across the left/right and top/bottom edges.
Back to Node List