EdgeDetect - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


ImageTools

  

EdgeDetect

  

detect edge of an image

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

EdgeDetect(img)

Parameters

img

-

Image; the image

Options

• 

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

Description

• 

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.   

Examples

withImageTools:

imgReadcatkerneloptsdatadir,/images/phone.jpg:

EmbedFitIntensityimg

edge1EdgeDetectimg

EmbedFitIntensityedge1

edge2EdgeDetectimg,method=Robert:

EmbedFitIntensityedge2

EmbedThresholdedge2,0.6

EmbedThresholdedge2,0.6,high=0,low=1

Compatibility

• 

The ImageTools[EdgeDetect] command was introduced in Maple 2019.

• 

For more information on Maple 2019 changes, see Updates in Maple 2019.

See Also

ImageTools

ImageTools[Convolution]

ImageTools[Mask]

ImageTools[Scale]

ImageTools[Threshold]