M 001 / 18301 Edge & Featuresalgorithm output

Canny Edge Detection

edge & feature detection

Typeface · IBM Plex Mono

Real-world algorithm demonstration, applied to a NASA portrait.
Real-world algorithm demonstration, applied to a NASA portrait.Image: NASA / Eileen Collins · scikit-image (public domain)View source ↗

Prompt

Apply Canny Edge Detection, converting the photograph into thin, crisp white binary outlines on a pure black background. Trace significant boundaries with continuous, nearly single-pixel lines, suppressing weak texture and isolated noise. Remove color, shading, and filled tonal regions. Keep the original subject and composition.

Identify

Thin, binary outlines on a black background.

Principle

Gaussian smoothing, gradients, non-maximum suppression1, and hysteresis thresholds2 extract edges.

Try it out

Compare narrow and wide thresholds.

Classification

Calculated image processing result.

Further examples · 7 images

Canny Walkthrough 5 Hysteresis
02 Canny Walkthrough 5 HysteresisA reptile head is visible through thin white outlines on a black background. This image demonstrates Canny edge detection with higher hysteresis thresholds, resulting in fewer, more selective edge fragments.Babujayan · CC BY 3.0 · Wikimedia Commons
Lane Detection Example
03 Lane Detection ExampleThe left panel shows a road scene processed with Canny edge detection. The resulting binary image highlights the high-contrast boundaries of the lane markings and horizon for computer vision tasks.Vidyakv · CC BY-SA 4.0 · Wikimedia Commons
Canny Edge Detection, applied to “2018 01 (Blue) - Chaouen”
04 Canny Edge Detection, applied to “2018 01 (Blue) - Chaouen”A blue textured wall and archway are processed into binary outlines. The middle panel shows high-threshold edges, while the right panel captures fine surface details using a lower threshold.Fbrandao.1963 (photo); processed for the Atlas · CC BY-SA 4.0 · Wikimedia Commons
Canny Edge Detection, applied to “Poertschach Johannes-Brahms-Promenade Promenadenbad Rutschenturm 25122015 9840 1”
05 Canny Edge Detection, applied to “Poertschach Johannes-Brahms-Promenade Promenadenbad Rutschenturm 25122015 9840 1”A lakeside tower and mountains are reduced to white contours on black. Varying thresholds isolate the primary structure in the center and reveal distant horizon lines on the right.Johann Jaritz (photo); processed for the Atlas · CC BY-SA 3.0 at · Wikimedia Commons
Canny Edge Detection, applied to “Puente Don Luis I, Oporto, Portugal, 2012-05-09, DD 13”
06 Canny Edge Detection, applied to “Puente Don Luis I, Oporto, Portugal, 2012-05-09, DD 13”A cityscape with a metal bridge is analyzed via edge detection. The center panel outlines the main bridge trusses, while the right panel populates the dense urban background with fine edges.Diego Delso (photo); processed for the Atlas · CC BY-SA 3.0 · Wikimedia Commons
Canny Edge Detection, applied to “Fallen bricks”
07 Canny Edge Detection, applied to “Fallen bricks”A stack of bricks is converted into geometric outlines. High thresholds in the center isolate the brick boundaries, whereas lower thresholds on the right include the granular surface texture of the clay.Tomascastelazo (photo); processed for the Atlas · CC BY-SA 4.0 · Wikimedia Commons