wikillm

Concept · 1 paper · updated 2026-10-19

Canny edge detection

Canny edge detection: a multi-stage gradient edge detector, here followed by a Hessian ridge filter. One source (2609.07408): as preprocessing for small tabular classifiers on spiral drawings, the Canny plus Hessian variant lowered AUC for 8 of 9 classifiers, and augmentation helped most. Author-reported, single-source page.

edge-detectionimage-preprocessing

Markdown3 min read

AI-compiled overview, updated 2026-10-19, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

Overview

Canny edge detection finds thin, connected edges in a grey-level image. The steps are: smooth with a Gaussian, compute Sobel gradients, thin the gradient ridges by non-maximum suppression, apply a double threshold, and keep weak edges only where they connect to strong ones (hysteresis) 2609.07408 p. 5 2609.07408 p. 6 2609.07408 fig. 5. The invariant all variants share is this gradient-then-hysteresis chain, with the Gaussian width and the thresholds as the main settings 2609.07408 fig. 5.

Only one source card lists this concept so far, so the page describes one paper's use of the detector and cannot compare variants across studies.

Variants

Canny followed by a Hessian ridge filter

The paper runs the Canny output through a second filter. For each pixel it takes second derivatives, forms the 2 × 2 Hessian, and uses the minimum-curvature eigenvalue as the edge intensity 2609.07408 p. 7 2609.07408 eq. 13. The Gaussian sigma is 2.8, picked from 1, 2, 2.8 and 3 for this data 2609.07408 fig. 5 2609.07408 p. 8. The pipeline is named "Canny + Hessian" in the paper's dataset variants DS1 and DS3 2609.07408 p. 8. Card: Impact of canny edge detection preprocessing on performance of machine learning models for Parkinson's disease classification.

Raw images as the reference (no edge step)

The paper's comparison set includes the original images with no edge step (DS0) and augmented originals (DS2) 2609.07408 p. 8. Canny is not applied in these variants, so they show what the edge step adds or removes.

Augmentation before or after the edge step

Augmentation is applied to the raw images (DS2) or to the Canny + Hessian output (DS3). Each training image gets 71 augmented copies, rotated, shifted, flipped and brightness-changed 2609.07408 alg. 1 2609.07408 p. 8. The paper does not say whether the originals are kept in the augmented sets 2609.07408 p. 8.

When to use which

The paper tests classic classifiers on one small dataset, so these are hypotheses to check on your own data, not general rules. The claims below come from the author-reported tables.

SituationUseWhy
Edge features are assumed to help a small classifierBenchmark against raw input firstCanny + Hessian (DS1) gave lower AUC than raw images (DS0) for 8 of 9 models, and LR rose from 0.77 to 0.82 2609.07408 fig. 12 2609.07408 fig. 13
Few training images, augmentation availableAugment the raw images (DS2)Augmentation raised AUC for 6 of 9 models; RF, XGB and KNN reached about 0.97 2609.07408 fig. 13
Memory is the tightest constraintDT, NB, LR or XGBModel sizes of 1.7 to 3.8 KB in the paper's table 2609.07408 fig. 40
Memory fixed by a model that does not grow with dataRFAbout 61 KB on all four datasets 2609.07408 fig. 40
Latency matters on augmented dataAvoid SVM and KNNSVM predictions took 9000 to 30000 ms on DS2, and KNN memory grew to 102 to 220 KB 2609.07408 fig. 41 2609.07408 fig. 40

The paper's timings were measured on one notebook with an Intel Core i3-370M and 8 GB RAM 2609.07408 p. 7, so use the ratios, not the absolute times, when planning your own budget.

Implementation sketch

The Canny stages and the Hessian step, in the order the paper uses them. The Hessian step is applied to the edge image, not to the grey image 2609.07408 p. 7 2609.07408 p. 8.

Pseudocode
# Canny edges, then a Hessian ridge measure  [arxiv:2609.07408 p. 5-8]
# Input:  grey image (H, W), intensities 0-255
# Output: edge-intensity map (H, W)

def canny_then_hessian(image):
    # Gaussian smoothing; sigma = 2.8 was chosen for DS1 and DS3
    # [arxiv:2609.07408 fig. 5]
    smoothed = gaussian_smooth(image, sigma=2.8)
    # Sobel gradient magnitude and angle of the smoothed image
    # [arxiv:2609.07408 eq. 6-8]
    magnitude, angle = sobel_gradient(smoothed)
    # Thin the edges by non-maximum suppression, as the text prints it
    # [arxiv:2609.07408 p. 6] [arxiv:2609.07408 fig. 3]
    thin = non_maximum_suppression(magnitude, angle)
    # Double threshold, both values 51, then hysteresis
    # [arxiv:2609.07408 fig. 5]
    edges = hysteresis(thin, low=51, high=51)
    # Second derivatives of the edge image [arxiv:2609.07408 eq. 10-12]
    ixx, iyy, ixy = second_derivatives(edges)
    # Mean curvature and the root term of the 2 x 2 eigenvalue formula
    # [arxiv:2609.07408 eq. 13]
    mean_curvature = (ixx + iyy) / 2
    root = sqrt(mean_curvature**2 - (ixx * iyy - ixy**2))
    # Edge intensity is the minimum-curvature eigenvalue
    # [arxiv:2609.07408 p. 7]
    return mean_curvature - root

Contradictions

None known across papers; only one source so far. Within that paper, the conclusion says SVM "excelled on augmented datasets" 2609.07408 p. 35, but its DS2 median accuracy in the box plot is 0.50 2609.07408 fig. 42. The paper does not explain the gap.

Papers

Source and license

Compiled from the papers listed on this page, all published under CC BY, CC BY-SA or CC0, with citations. See each paper's page for its authors and license.