TrainPatMaxRedLine
Extracts and trains a pattern from an image for use with the FindPatMaxRedLine function.
TrainPatMaxRedLine 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 AcquireImage 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 Region of Interest (ROI) 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.
|
||||||||||||
Pattern Region |
Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis. Double-click on the Region parameter to create an Interactive Graphics Mode that you can transform and rotate. Select this parameter and press the Maximize Region button on the Job Edit toolbar of the property sheet to automatically stretch the region to cover the entire image.
Note: The Fixture and Region parameters must be defined
within the bounds of the image; otherwise, the function will return #ERR.
|
||||||||||||
External Region |
This parameter uses Cell References to spreadsheet cell that contains an Annulus, a Circle, a Region, an EditAnnulus, an EditCircle, an EditCompositeRegion, an EditPolygon, 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 Origin |
Specifies the X and Y of the training pattern's origin, as offsets from the center of the training region.
|
||||||||||||
Auto Select Coarse |
When enabled, automatically selects the pattern granularity size to be used during the course search phase. Coarse granularity is used to find large features to find an approximate pattern match in a run-time image quickly.
|
||||||||||||
Auto Select Fine |
When enabled, automatically selects the pattern granularity to be used during the fine search phase. Fine granularity is used to find small features to determine the pattern location precisely.
|
||||||||||||
Coarse Granularity |
Specifies the coarse granularity, as a pixel value. Coarse granularity is used to find large features to find an approximate pattern match in a run-time image quickly (1 to 30; 4 = default). Note: The Auto Select Coarse parameter is enabled by default; disable it to enable this parameter.
|
||||||||||||
Fine Granularity |
Specifies the fine granularity, as a pixel value. Fine granularity is used to find small features to determine the pattern location precisely (1 to 10; 1 = default). Note:
|
||||||||||||
Feature Threshold |
Specifies the minimum contrast of trained features; decrease the value to train additional low contrast features, or increase it to ignore them (1 to 100; 20 = default). |
||||||||||||
Train Event |
Specifies Cell References to a cell containing a model training event trigger. Note: Training occurs when either the property sheet is open or when an event trigger such as a button or other conditionally enabled cell is non-zero.
|
||||||||||||
Reuse Training Image |
Specifies whether or not the image used to train the pattern is saved and used when modifying the Pattern settings parameters (Pattern Origin, Auto Select Coarse, Auto Select Fine, Coarse Granularity, Fine Granularity or Noise Threshold).
|
||||||||||||
Timeout |
Specifies the amount of time, in milliseconds (0 to 30000; 0 = default), that the function will search for a valid pattern before execution is halted and an #ERR is returned. When set to 0, the setting is disabled and no timeout is applied. |
||||||||||||
Show |
Specifies the display mode for TrainPatMaxRedLine graphics on the image.
|
TrainPatMaxRedLine Outputs
Returns |
A Patterns data structure containing a trained pattern, or #ERR if any of the input parameters are invalid.
|
||||||
Results |
When TrainPatMaxRedLine is initially inserted into a cell, the Trained status will automatically appear in the adjacent cell to the right. If a pattern cannot be trained, then #ERR will be inserted.
One Patterns Vision Data Access Functions is automatically inserted into the spreadsheet:
|