Draw edges🔗

Detects prominent edges in images. This tool uses the Edge Drawing algorithm to detect edges in images:

  1. The input image is smoothed with a Gaussian filter.

  2. Gaussian gradient filters are used to estimate local gradient.

  3. Edge segments are detected by linking anchor points with locally maximal gradient values.


  • image: Input image

  • smoothness: The standard deviation of the of the Gaussian smoothing filter. Bigger value means better tolerance against noise, less sensitivity and worse localization. The Gaussian filter is cut at approximately 1.5 times the standard deviation of the Gaussian function. If smoothness is zero, no smoothing filter will be applied.

  • gradientThreshold: The minimum absolute gradient that can still be regarded as an edge. If this value is zero, a suitable threshold will be selected automatically.

  • anchorThreshold: The minimum absolute difference to neighboring gradient values an anchor point must have. If this value is zero, a suitable threshold will be selected automatically.


  • image: An 8-bit gray-level image in which detected edges are marked with value 255.

  • points: An N-by-2 matrix that contains the coordinates of all detected edge points. Each row of the matrix contains the (x, y) coordinates of a detected edge point. Points belonging to a connected edge are stored on consequtive rows.

  • blockSize: The number of points in each edge segment. This matrix has as many rows as there are detected edge segments. Each row has one element: the number of points in the segment.