Find edges of objects
visionhdl.EdgeDetector
finds the edges in a
grayscale pixel stream using the Sobel, Prewitt, or Roberts method. The object convolves
the input pixels with derivative approximation matrices to find the gradient of pixel
magnitude along two orthogonal directions. It then compares the sum of the squares of
the gradients to a configurable threshold to determine if the gradients represent an
edge. The Sobel and Prewitt methods calculate the gradient in horizontal and vertical
directions. The Roberts method calculates the gradients at 45 and 135 degrees.
The object returns a binary image, as a stream of pixel values. A pixel value of 1 indicates that the pixel is an edge. You can optionally enable output of the gradient values in the two orthogonal directions at each pixel.
Note
Starting in R2016b, instead of using the step
method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For
example, y = step(obj,x)
and y = obj(x)
perform equivalent operations.
returns a
System object, ED
= visionhdl.EdgeDetectorED
, that detects edges using the Sobel
method.
returns a System object, ED
= visionhdl.EdgeDetector(Name
,Value
)ED
, with additional options specified by one or more
Name
,Value
pair arguments.
Name
is a property name and Value
is the
corresponding value. Name
must appear inside single quotes
(''
). You can specify several name-value pair arguments in any
order as Name1,Value1,...,NameN,ValueN
. Properties not specified
retain their default values.
|
Edge detection algorithm. Specify Default: |
|
Enable the When this property is Default: |
|
Enable the When this property is Default: |
|
Source for the gradient threshold value that indicates an edge. Set this property to Default: |
|
Gradient threshold value that indicates an edge, specified as a numeric scalar value. The object compares the square of this to the sum of the squares of the
gradients. The object casts this value to the data type of the gradients.
This property applies when you set Default: 20 |
|
Specify a power of two that accommodates the number of active pixels in a single horizontal line. Choose a power of two that accommodates the number of active pixels in a
horizontal line. If you specify a value that is not a power of two, the
object uses the next largest power of two. The object allocates (N
- 1)-by- Default: 2048 |
|
Select one of these methods for padding the boundary of the input image. For more information about these methods, see Edge Padding.
Default: |
|
Rounding mode used for fixed-point operations. The object uses fixed-point arithmetic for internal calculations
when the input is any integer or fixed-point data type. This option
does not apply when the input data type is Default: |
|
Overflow action used for fixed-point operations. The object uses fixed-point arithmetic for internal calculations
when the input is any integer or fixed-point data type. This option
does not apply when the input data type is Default: |
|
Data type for the gradient output values, specified as
|
|
Data type for the gradient output values, specified as
Default: |
step | Detect edges at an image pixel |
Common to All System Objects | |
---|---|
release | Allow System object property value changes |
This object implements the algorithms described on the Edge Detector block reference page.
Edge Detector | visionhdl.FrameToPixels
| edge
(Image Processing Toolbox)