You are here : matlabImage Processingedge

edge() - Image Processing

BW = edge(I) returns
a binary image BW containing 1s
where the function finds edges in the input image I and 0s
elsewhere. By default, edge uses the Sobel edge
detection method.This function supports code generation (see Tips).exampleBW = edge(I,method) detects
edges in image I, where method specifies
the edge detection method used.BW = edge(I,method,threshold) detects
edges in image I, where threshold specifies
the sensitivity threshold. edge ignores all edges
that are not stronger than threshold.BW = edge(I,method,threshold,direction) detects
edges in image I, where direction specifies
the direction in which the function looks for edges in the image:
horizontally, vertically, or in both directions. Used only with the
Sobel and Prewitt methods.BW = edge(I,method,threshold,direction,'nothinning') detects
edges in image I, where ‘nothinning'  
speeds up the operation of the algorithm by skipping the additional
edge-thinning stage. By default, the algorithm applies edge thinning.
Used only with the Sobel, Prewitt, and Roberts methods. BW = edge(I,method,threshold,direction,sigma) detects
edges in image I, where sigma 
specifies the standard deviation of the filter. Used only with the
Laplacian of Gaussian and Canny methods. [BW,threshOut]
= edge(___) returns the threshold value.example[gpuarrayBW,threshOut]
= edge(gpuarrayI,___) performs
the edge detection operation on a GPU. The input image and the output
image are gpuArrays. This syntax requires Parallel Computing Toolbox™. Code Generation support:
Yes.MATLAB Function Block support:


BW = edge(I)BW = edge(I,method) exampleBW = edge(I,method,threshold)BW = edge(I,method,threshold,direction)BW = edge(I,method,threshold,direction,'nothinning')BW = edge(I,method,threshold,direction,sigma)[BW,threshOut]
= edge(___)[gpuarrayBW,threshOut]
= edge(gpuarrayI,___) example


BW = edge(I,'canny_old',...)

Output / Return Value


Alternatives / See Also