<aside>
ğŸ›
Classical Canny Edge Maps - Ready for ControlNet-Canny
Turn any image into a clean white-edges-on-black edge map using OpenCV's classical Canny algorithm. CPU-only, no neural network, fully deterministic. The output is exactly the format ControlNet-Canny expects, so this is the standard preprocessor for any image-generation flow that uses edges as structural guidance. Two intuitive sliders (min / max edge strength) control how aggressively edges are detected..
</aside>
What it does
Canny Edge Annotator runs OpenCV's classical Canny edge detector on the input image and outputs a binary edge map - white edges on a black background. Internally the algorithm computes image gradients, suppresses non-maxima, and applies double-threshold hysteresis: pixels above the Maximum edge strength are accepted as "strong" edges; pixels between the two thresholds are kept only if they're connected to a strong edge; pixels below the Minimum edge strength are discarded. The result is the canonical input format for ControlNet-Canny.
Problem it solves
- ControlNet-Canny conditioning – Generate the exact white-edges-on-black control image that ControlNet-Canny expects, in one node
- Structural guidance for generation – Drive Image Generation / Image Edit models to preserve the silhouette and layout of a reference image
- Deterministic, CPU-only edges – Classical algorithm; same input always produces the same output (no neural-network variance)
- Fast preprocessing – No GPU required, runs instantly even on large batches
- Reference for sketch / line-art workflows – Convert photos into clean line drawings for downstream stylization
- Composition control – Lock in the geometry of a scene before letting a generative model fill in the style
- Diagnostic / inspection tool – Visualize edge strength and detail level in source images before deciding on resolution / cropping
- Stable across runs – Unlike learned edge detectors, output is fully reproducible from the same parameters
Input/Output
<aside>
- Input: Single image
- Format: PNG, JPEG, or standard image formats
- Resolution: Any size (CPU-only - runtime scales linearly with pixel count)
- Content: Any image; works best on images with clear shapes / contours
</aside>
<aside>
-
Output: Binary edge map
- Format: PNG (grayscale)
- Content: White pixels (255) on edges, black pixels (0) elsewhere
- Resolution: Same as input
- Use: Drop directly into ControlNet-Canny or any downstream tool that consumes edge maps

</aside>
Configuration Options
- Minimum edge strength (lower threshold): Pixels below this gradient strength are discarded outright.
- Default: 100
- Lower value = more edges detected (including weaker / noisier ones)
- Higher value = fewer edges; cleaner but less detail
- Role in the algorithm: Used during hysteresis — borderline pixels (between min and max) are kept only if they touch a strong edge
- Maximum edge strength (upper threshold): Pixels above this gradient strength are accepted as definite ("strong") edges.
- Default: 200
- Lower value = more pixels qualify as strong edges → busier output
- Higher value = only very strong gradients qualify → only the most prominent edges kept