Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Computer Vision›Canny Edge Detection
Machine learningEdge detection

Canny Edge Detection

Canny Edge Detection Algorithm · Also known as: Canny operator, Canny edge detector

The Canny edge detector, introduced by John Canny in 1986, is a multi-stage algorithm for identifying edges in digital images where significant intensity changes occur. Canny's method is optimal for step edges in additive Gaussian noise and remains the gold standard for edge detection in computer vision due to its mathematical elegance and practical effectiveness.

ScholarGate
  1. Machine learning
  2. v1
  3. 2 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Canny Edge Detection
Contour AnalysisHarris Corner DetectionHough TransformImage Morphology Operati…Template MatchingBackground SubtractionHistogram EqualizationScale-Space TheoryWatershed Segmentation

When to use it

Use Canny edge detection as a preprocessing step for shape detection (Hough Transform), contour analysis, or image segmentation. Canny is particularly effective for detecting straight or smooth curves in images with sufficient contrast and manageable noise. Avoid Canny when dealing with very textured or noisy images where edge clarity is poor, or when precise sub-pixel edge localization is needed; consider learned edge detectors for complex scenes.

Strengths & limitations

Strengths
  • Mathematically optimal for detecting step edges in Gaussian noise
  • Produces thin, well-defined edge maps with single-pixel-wide contours
  • Hysteresis thresholding effectively suppresses noise while preserving true edges
  • Simple to understand and implement; efficient computational complexity
  • Widely available in image processing libraries and well-established standard
Limitations
  • Sensitive to threshold selection; poor choice of thresholds results in too many false positives or missed edges
  • Smoothing (Gaussian blur) can blur fine edges or small features
  • Assumes edges are step-like; performs poorly on textured boundaries or soft transitions
  • Does not distinguish between true object boundaries and internal texture edges

Frequently asked

What is non-maximum suppression (NMS) and why is it necessary?

Non-maximum suppression thins the gradient magnitude map by suppressing pixels that are not local maxima along the gradient direction. This step is crucial because Gaussian derivatives produce thick gradient responses near edges. By keeping only the locally strongest responses (perpendicular to the edge direction), NMS produces single-pixel-wide edge contours. Without NMS, edge maps would be thick and diffuse.

How do the two thresholds in hysteresis thresholding work?

Canny uses two thresholds: a high threshold (e.g., 0.3 × max gradient) and a low threshold (e.g., 0.1 × max gradient). Pixels above the high threshold are immediately classified as edges. Pixels below the low threshold are rejected. Pixels between the thresholds are kept only if they are connected to pixels above the high threshold. This hysteresis mechanism suppresses noise while preserving thin, weakly-defined edges that are part of true contours.

Why use Gaussian blur before gradient computation?

Gaussian blur reduces noise before computing gradients. Since gradient operators are sensitive to high-frequency noise, smoothing first ensures that detected edges correspond to true intensity changes rather than noise. The smoothing scale (Gaussian sigma) is a tuning parameter: larger sigma removes more noise but also blurs edges; smaller sigma preserves edge sharpness but may be sensitive to noise.

How should threshold values be chosen?

Threshold selection depends on image contrast and noise level. A common heuristic is to use high threshold = 0.2–0.3 × max gradient and low threshold = 0.05–0.1 × max gradient. Alternatively, Otsu's method or histogram analysis can suggest thresholds. For interactive applications, thresholds can be exposed as sliders. For batch processing, automated threshold selection methods (e.g., based on image statistics) are preferable.

Sources

  1. Canny, J. (1986). A computational approach to edge detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 8(6), 679–698. DOI: 10.1109/TPAMI.1986.4767851 ↗
  2. Sobel, I., & Feldman, G. (1968). A 3x3 isotropic gradient operator for image processing. Pattern Recognition and Machine Intelligence, 271–272. link ↗

How to cite this page

ScholarGate. (2026, June 3). Canny Edge Detection Algorithm. ScholarGate. https://scholargate.app/en/computer-vision/canny-edge-detection

Related methods

Contour AnalysisHarris Corner DetectionHough TransformImage Morphology OperationsTemplate Matching

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Contour AnalysisComputer Vision↔ compare
  • Harris Corner DetectionComputer Vision↔ compare
  • Hough TransformComputer Vision↔ compare
  • Image Morphology OperationsComputer Vision↔ compare
  • Template MatchingComputer Vision↔ compare
Compare side by side →

Referenced by

Background SubtractionContour AnalysisHistogram EqualizationHough TransformImage Morphology OperationsScale-Space TheoryWatershed Segmentation

Similar methods

Harris Corner DetectionContour AnalysisScale-Space TheoryHough TransformImage Morphology OperationsBlob DetectionHistogram EqualizationSIFT Feature Detection

Related reference concepts

Edge and Contour DetectionImage Filtering and EnhancementImage Processing and AnalysisFeature Detection and DescriptionImage SegmentationMotion and Optical Flow

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Canny Edge Detection (Canny Edge Detection Algorithm). Retrieved 2026-07-21 from https://scholargate.app/en/computer-vision/canny-edge-detection · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
John Canny
Subfamily
Edge detection
Year
1986
Type
Image gradient analysis
Related methods
Contour AnalysisHarris Corner DetectionHough TransformImage Morphology OperationsTemplate Matching
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account