FindPatMaxPatterns
Finds objects in an image based on a trained pattern. (A trained (internal) geometric description of an object you wish to find.) FindPatMaxPatterns finds patterns within an image based on a trained pattern from a Pattern structure.
FindPatMaxPatterns Inputs
Parameter | Description | |||||||||||||||||
Image |
This parameter must reference a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the GetGreyscale data structure. This parameter can also reference other Image data structures, such as those returned by the Image Vision Data Access Functions or Coordinate Transforms Functions. |
|||||||||||||||||
Fixture |
Defines the Find Region relative to a Fixture input or the output of a Vision Tools function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI will be rotated or translated in relation to the Fixture. The default setting is (0,0,0), the top leftmost corner of the image.
|
|||||||||||||||||
Find Region |
Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis; creates an Interactive Graphics Mode that can be transformed and rotated. With this parameter selected, by pressing the Maximize Region button on the property sheet's Job Edit toolbar, the region will automatically be stretched to cover the entire image.
|
|||||||||||||||||
External Region |
This parameter uses Cell References to an Annulus, Circle, Region, EditAnnulus, EditCircle, EditCompositeRegion, EditPolygon, EditRegion. When this parameter is used, the function ignores the Region and Fixture settings and inspects the image area specified by referenced region. If an EditCompositeRegion control is referenced, the inspection area can be a mix of shapes. Each shape in the composite region can be assigned as added to or subtracted from (masking) the inspection area. Note: If this parameter has been set as a reference to an external region, to use the function's internal Region, this parameter must be manually set to zero by entering the value 0 in place of the cell reference. Otherwise, the function will continue to reference the external region.
|
|||||||||||||||||
Pattern |
This argument must reference a spreadsheet cell that contains a valid Patterns data structure returned by a TrainPatMaxPattern function. |
|||||||||||||||||
Number to Find |
Specifies the maximum number of pattern matches to return (1 to 1024; default = 1). |
|||||||||||||||||
Accept |
Specifies the acceptance threshold, which is the lowest score of a valid instance. The score for a potential match must be greater than the value of the acceptance threshold or that match will not be returned (0 to 100; default = 50). |
|||||||||||||||||
Contrast |
Specifies the lowest contrast of a valid instance. The contrast for a potential match must be greater than the value of the Contrast Threshold or that instance will not be considered (0 to 255; default = 10). A low contrast threshold is used for low-contrast images; a high contrast threshold is used for high-contrast images. |
|||||||||||||||||
Clutter in Score |
Specifies whether missing or occluded pattern features will reduce the response score(s).
|
|||||||||||||||||
Outside Region |
Specifies the percentage of pattern features that may be found outside the Find Region without degrading the pattern response score (0 to 100; default = 0). |
|||||||||||||||||
Find Tolerances |
Specifies the settings for finding patterns that are rotated or scaled with respect to the trained pattern.
|
|||||||||||||||||
Find Overlapping |
Specifies the settings for finding patterns that overlap each other with respect to position, rotation and scale.
|
|||||||||||||||||
Timeout |
Specifies the amount of time, in milliseconds (0 to 30000), that the function will search for patterns before execution is halted and an #ERR is returned. Setting the value to 0 will disable the setting and a timeout will not be applied. |
|||||||||||||||||
Algorithm |
Specifies the algorithm that will be used to process the image for the trained pattern.
|
|||||||||||||||||
Show |
Specifies the display mode for graphical overlays on top of the image.
|
FindPatMaxPatterns Outputs
Returns |
A Patterns data structure containing a model and a list of pattern responses sorted by score, or #ERR if any of the input parameters are invalid or no matching patterns could be found. |
Results |
When FindPatMaxPatterns is initially inserted into a cell, a result table is created in the spreadsheet. Note: While in the function's property sheet, supplemental information strings are provided as suggestions for better finding patterns. For a list of possible information strings:
To insert information strings into the spreadsheet, use the GetInfoString Vision Data Access function. |
FindPatMaxPatterns Vision Data Access Functions
The following Patterns Vision Data Access Functions are automatically inserted into the spreadsheet to create the result table:
Label | Function | Description |
X |
GetX(Patterns, Index) |
The x-coordinate of the pattern position. |
Y |
GetY(Patterns, Index) |
The y-coordinate of the pattern position. |
Angle |
GetAngle(Patterns, Index) |
The orientation of the pattern position. |
Scale |
GetScale(Patterns, Index) |
The size of the pattern found compared to the trained model, as a percentage of the model size. |
Score |
GetScore(Patterns, Index) |
The pattern response score. |