|
IDL Reference Guide: Procedures and Functions |
|
The CANNY function implements the Canny edge-detection algorithm.
The Canny edge-detection algorithm has the following steps:

and the other for estimating the gradient in the y-direction (Gy):

The magnitude of the gradient is approximated using
.
This edge direction is then related to a direction that can be traced in an image, assigning each value to one of four sectors (0, 1, 2, or 3) as follows:
![]() |
Result = CANNY(Image [, HIGH=value] [, LOW=value] [, SIGMA=value])
The result is a byte array containing the edges in the image.
A 2D image array.
The high value used to calculate the high threshold during edge detection, given as a factor of the histogram of the magnitude array. The input range is [0-1]. The default value is 0.8. If the input value is outside the allowable range of [LOW-1], it is silently clipped to fall into that range.
The low value used to calculate the low threshold during edge detection, given as a factor of the HIGH value. The input range is [0-1]. The default value is 0.4. If the input value is outside the allowable range of [0-1], it is clipped to fall into that range.
The sigma value used when creating the Gaussian kernel. The default value is 0.6
IDL Online Help (March 06, 2007)