finds edges in image and returns the result as a binary image.

finds edges at the scale of the specified pixel range r.

uses a threshold t for selecting image edges.

Details and OptionsDetails and Options

  • EdgeDetect uses gradient methods to find edges and works with arbitrary 2D and 3D images.
  • EdgeDetect[image] is equivalent to EdgeDetect[image,2].
  • In 2D, EdgeDetect[image,{rrow,rcol}] uses radii in vertical and horizontal directions.
  • In 3D, EdgeDetect[image,{rslice,rrow,rcol}] uses range in height, in depth, and in width.
  • EdgeDetect[image,r,t] uses hysteresis thresholding with a global threshold t. For additional forms of the threshold parameter, see the reference page for MorphologicalBinarize.
  • The following options can be specified:
  • MethodAutomaticedge detection method
    Padding"Fixed"padding method
  • Possible settings for Method include:
  • "Canny"first-order directional Gaussian derivatives (default)
    "ShenCastan"first-order derivatives of exponentials
    "Sobel"binomial generalization of Sobel masks
  • An option setting "StraightEdges"->s can be used to control the selection of edges based on their straightness. With the default setting , all edges are returned. A setting selects only the longest and strongest lines.
  • option is ignored when used with Image3D objects.
Introduced in 2010
| Updated in 2014