visionhdl.CornerDetector
Description
The visionhdl.CornerDetector
System object™ detects corners by using the features-from-accelerated-segment test (FAST)
algorithm or by the intersecting edges (Harris) algorithm. For each pixel, if the pixel is a
corner, the object returns the corner metric. If the pixel is not a corner, the object returns
a pixel value of zero.
The FAST algorithm tests a circular area around the potential center of the corner. The test detects a corner if a contiguous section of pixels are either brighter than the center plus a threshold or darker than the center minus a threshold. You can specify a minimum contrast threshold as a property or argument and select from three rules to define a corner. These rules specify how many pixels in a circle of pixels must exceed the minimum contrast for the center pixel to be considered a corner. The object performs parallel tests of all combinations of contiguous pixels around the circle. The FAST algorithm uses few hardware resources.
The Harris algorithm computes horizontal and vertical gradients, filters the gradient components with a circular 5-by-5 Gaussian filter, and computes a metric that represents the strength of the corner. You can specify a threshold that determines the level at which corners are detected. The object returns a corner for pixels where the metric exceeds this threshold. The Harris algorithm uses more hardware resources than the FAST algorithm, but can detect corners that the FAST algorithm might not find.
To detect corners in a pixel stream:
Create the
visionhdl.CornerDetector
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
corners = visionhdl.CornerDetector(
returns a corner detector System object. Set properties using one or more name-value pairs. Enclose each property
name in single quotes. Name
,Value
)
For example:
corners = visionhdl.CornerDetector('Method','FAST 7 of 12',... 'MinContrastSource','Input port',... 'PaddingMethod','None')
Properties
Usage
Description
[
specifies the threshold that determines a corner as an input argument. This syntax applies
for both Harris and FAST algorithms. The threshold is interpreted differently for each
algorithm. To enable this argument when using the FAST algorithm, set the
corner
,ctrlout
] = corners(pixelin
,thresh
,ctrlin
)MinContrastSource
property to 'Input port'
. To
enable this argument when using the Harris algorithm, set the
ThresholdSource
property to 'Input port'
.
This object uses a streaming pixel interface with a structure
for frame control signals. This interface enables the object to operate independently of image
size and format and to connect with other Vision HDL Toolbox™ objects. The object accepts and returns a scalar pixel value and control signals
as a structure containing five signals. The control signals indicate the validity of each pixel
and its location in the frame. To convert a pixel matrix into a pixel stream and control
signals, use the visionhdl.FrameToPixels
object. For a
description of the interface, see Streaming Pixel Interface.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Algorithms
This object implements the algorithms described on the Corner Detector block reference page.