Grayscale Canny Edge Detection

Performs Canny edge detection with grayscale magnitude and direction outputs

You are now following this Submission

[MAG,THETA,DX,DY] = canny(IM) computes the magnitude and angle of local
intensity gradients in 2-D image IM. DX and DY are the independent X-
and Y-component gradients.

[MAG,THETA,DX,DY] = canny(IM,SIGMA) changes the standard deviation of
the Gaussian smoothing kernel. By default, SIGMA = SQRT(2).

Cite As

Jered Wells (2026). Grayscale Canny Edge Detection (https://www.mathworks.com/matlabcentral/fileexchange/52956-grayscale-canny-edge-detection), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0