FindPatMaxPatterns
Finds objects in an image based on a trained pattern. FindPatMaxPatterns finds patterns within an image based on a trained pattern from a Patterns structure.
FindPatMaxPatterns Inputs
Syntax: FindPatMaxPatterns(Image,Fixture.Row,Fixture.Column,Fixture.Theta,Find Region.X,Find Region.Y,Find Region.High,Find Region.Wide,Find Region.Angle,Find Region.Curve,External Region,Pattern,Number to Find,Accept,Contrast,Clutter in Score,Outside Region,Find Tolerances.Angle Start,Find Tolerances.Angle End,Find Tolerances.Scale Start,Find Tolerances.Scale End,Find Tolerances.Aspect Ratio,Find Tolerances.Aspect Start,Find Tolerances.Aspect End,Find Overlapping.XY Overlap,Find Overlapping.Angle Overlap,Find Overlapping.Scale Overlap,Find Overlapping.Aspect Overlap,Timeout,Algorithm,Show)
Parameter | Description | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Specifies a reference to a spreadsheet cell that contains an Image data structure; by default, this parameter references A0, the cell containing the AcquireImage Image data structure. This parameter can also reference other Image data structures, such as those returned by the Vision Tool Image functions or Coordinate Transforms Functions. |
||||||||||||||||||
Defines the Find Region relative to a Fixture input or the output of a Vision Tool function's image coordinate system. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI is rotated or translated in relation to the Fixture. For more information, see Fixture or Vision Tools Functions. The default setting is (0,0,0), the top leftmost corner of the image.
|
||||||||||||||||||
The Region of Interest (ROI) specifies the region of the image that undergoes analysis and creates a rectangular image region that can be transformed and rotated. For more information, see Interactive Graphics Mode. Tip: With this parameter
selected, you can press the Maximize
Region button on the property sheet's toolbar to maximize the region and cover the entire image.
|
||||||||||||||||||
This parameter can reference a spreadsheet cell that contains the following functions:
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:
|
||||||||||||||||||
This argument must reference a spreadsheet cell that contains a valid Patterns data structure returned by the TrainPatMaxPattern function. For more information, see TrainPatMaxPattern. |
||||||||||||||||||
Specifies the maximum number of pattern matches to return (1 to 1024; default = 1). |
||||||||||||||||||
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 are not returned (0 to 100; default= 50). |
||||||||||||||||||
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 are not 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. |
||||||||||||||||||
Specifies whether missing or occluded pattern features reduce the response score(s).
|
||||||||||||||||||
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). |
||||||||||||||||||
Specifies the settings for finding patterns that are rotated or scaled with respect to the trained pattern.
|
||||||||||||||||||
Specifies the settings for finding patterns that overlap each other with respect to position, rotation and scale.
|
||||||||||||||||||
Specifies the amount of time, in milliseconds (0 to 30000), that the function searches for patterns before execution is halted and an #ERR is returned. Setting the value to 0 disables the setting and a timeout is not applied. |
||||||||||||||||||
Algorithm |
Specifies the algorithm to use to process the image for the trained pattern.
|
|||||||||||||||||
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 anyof the input parameters are invalid or no matching patterns could be found. |
When FindPatMaxPatternsis 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, click here.
|
FindPatMaxPatterns Vision Data Access Functions
The following Vision Data Access functions are automatically inserted into the spreadsheet to create the result table. For more information, see Patterns.
Row |
GetRow(Patterns, Index) |
The row coordinate of the pattern position. |
Col |
GetCol(Patterns, Index) |
The column 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 tothe trained model, as a percentage of the model size. |
Score | GetScore(Patterns, Index) | The pattern response score. |