ImageTools
EdgeDetect
detect edge of an image
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
EdgeDetect(img)
img
-
Image; the image
method = Sobel, Robert, Prewitt3 or Prewitt4
Specifies which convolution mask should be used. The default mask is Sobel. The convolution masks used are as follows:
Sobel: −101−202−101 and 121000−1−2−1
Robert: 01−10 and 100−1
Prewitt3: −101−101−101 and 111000−1−1−1
Prewitt4: −3−113−3−113−3−113−3−113 and 33331111−1−1−1−1−3−3−3−3
The EdgeDetect(img) command extracts the horizontal and vertical edges by using the mask specified by method and then combines them to extract the edges of an image.
The Threshold command can be applied after calling EdgeDetect(img), for example to have the edges show up as black on white instead of the reverse (see below). This Threshold Example shows another way to use it.
with⁡ImageTools:
img≔Read⁡cat⁡kernelopts⁡datadir,/images/phone.jpg:
Embed⁡FitIntensity⁡img
edge1≔EdgeDetect⁡img
Embed⁡FitIntensity⁡edge1
edge2≔EdgeDetect⁡img,method=Robert:
Embed⁡FitIntensity⁡edge2
Embed⁡Threshold⁡edge2,0.6
Embed⁡Threshold⁡edge2,0.6,high=0,low=1
The ImageTools[EdgeDetect] command was introduced in Maple 2019.
For more information on Maple 2019 changes, see Updates in Maple 2019.
See Also
ImageTools[Convolution]
ImageTools[Mask]
ImageTools[Scale]
ImageTools[Threshold]
Download Help Document