Canny edge detection 2D

Canny edge detection for 2D images
1.6K Downloads
Updated 9 Nov 2012

View License

This canny edge detection function was based on GAGAN's original implemented. Computation speed was improved by about 100 times.

1. A different way of non-maxima suppression, completely in matrix format, avoiding if-then statements. This step is about 50 faster
2. A different way of connectivity analysis using imfill. This step is about 400 times faster.

----

Original description from GAGAN's original submission:
------------------------------------------------------
The Canny Edge detection method relies on various steps:
1. Convolution with Gaussian.
2. Estimation of Gradient Vector.
3. Non Maxima Suppression.
4. Thresholding and Connectivity Analysis.

Cite As

Deshan Yang (2026). Canny edge detection 2D (https://www.mathworks.com/matlabcentral/fileexchange/38924-canny-edge-detection-2d), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Canny Edge Detection

Version Published Release Notes
1.2.0.0

Minor change.

1.1.0.0

Minor change.

1.0.0.0