Canny edge detection in 2-D and 3-D

A Canny edge detector for two-dimensional image and three-dimensional volume data.
8.9K Downloads
Updated 5 Mar 2014

View License

This is an implementation of the Canny edge detector, extended to operate on 3-D as well as 2-D data. The function features:
* 3-D capability, using the natural extension of the standard 2-D algorithm.

* A sub-pixel location estimation option.

* Symmetric differences for gradient estimation, so edge positions do not suffer from a systematic bias, with the option to use nearest-neighbour differences.

* Anisotropic smoothing if required, for example for volumes where the resolution differs between axes.

* A flexible range of thresholding options, including simple defaults and precise distribution-based selection. Different images can be treated consistently using absolute thresholds.

* Options for fine-tuning non-maximum suppression.

* Efficient use of the separability of the Gaussian for filtering.

* Independent functions for the different stages of the processing pipeline. This simplifies development of new algorithms; some of the functions (e.g. smoothing) are also useful in other contexts.

All the functions in the submission should be downloaded and placed on the MATLAB path in order to use the CANNY function.

Cite As

David Young (2024). Canny edge detection in 2-D and 3-D (https://www.mathworks.com/matlabcentral/fileexchange/45459-canny-edge-detection-in-2-d-and-3-d), MATLAB Central File Exchange. Retrieved .

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

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.2.0.0

Sub-pixel estimation option; nearest-neighbour differencing option.

1.1.0.0

Simplified the code. Faster and more flexible nonmaximum suppression. Change to the ordering of elements of the vector of smoothing constants in the 2-D case, for greater consistency.

1.0.0.0