Reference Manual
Chapter
4
IVC-2D
©
SICK AG • Advanced Industrial Sensors • www.sick.com • All rights reserved
109
Matching
4.6
Matching
Shape Locator
The Shape Locator tool finds a reference shape in an image. The reference shape is
created from a reference image and is then located (searched for by matching) in live
images.
Matching shapes or parts of shapes is complicated and it is essential to have a good set
of input parameters for this tool to compute a result in reasonable time. This tool has an
interactive setup to help you create reference shapes and fine tune input parameters so
that the locating algorithm will work as fast and efficient as possible. For more information
on the interactive setup, see Shape Locator Interactive Setup on page 209.
The section
tricks) on page 214 describes the algorithm used
when searching for shapes, and the section
some examples on how to use the suite of tools together in an efficient way.
The tool will return information about the first shape (according to the selected sorting
order). If a table index is specified, information about all found shapes is stored in the table
beginning at the specified index. For each shape, five entries are written in the table: x
position of the reference point, y position of the reference point, rotation angle, scale and
finally score of the located shape.
The coordinates of the reference point are given in pixels in the destination image. The
rotation and scale are given relative to the reference image.
Reference shapes can also be created in runtime using the ‘Add Shape Runtime’ tool.
The supplementary tools Get Shape on page 113, Transform Image on page 114 and
Transform ROI on page 116 can be used to traverse the list of found shapes.
Input Parameters
01 = Source bank
The image bank where to search for matching shapes.
02 = Data block
The slot in the memory where the reference shape is
stored.
03 = Search full image
Controls if the whole image shall be used to search for the
shape, or if the ROI parameters shall be used to limit the
search area.
04 = ROI X coordinate
The x coordinate of the upper left corner of the region to
search for matching shapes.
05 = ROI Y coordinate
The y coordinate of the upper left corner of the region to
search for matching shapes.
06 = ROI width
The width of the region to search.
07 = ROI height
The height of the region to search.
08 = Allow scale
Search for shapes with another scale compared to the
reference shape. Shapes with a scale variation of
±
20%
can be found.
09 = Allow rotation
Search for shapes with another rotation angle compared
to the reference shape.
10 = Rotation
tolerance (degrees)
The greatest angle the search for a match should be
performed for.
Example: 180 means
±
180 degrees, i.e. full rotation.
11 = Max number of
The maximum number of shapes that the tool shall search