# Patterns Vision Data Access functions

This topic lists the Vision Data Access functions that get values from a Patterns structure as input.

Note: Each of the following functions references a Patterns data structure as the first parameter. Index (zero-based) determines which pattern is being indexed from the structure.

Function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. | Description
--- | ---
GetAngle(Patterns, [Index]) | Returns the angle value. Note: This function is supported by the FindPatMaxRedLine and SortPatterns functions.
GetClutter(Patterns, [Index]) | Returns the clutter score, which means the score of features found that are not part of the trained pattern. Note: This function is supported by the FindPatMaxRedLine function.
GetContrast(Patterns, [Index]) | Returns the contrast between foreground and background in grey levels. Note: This function is supported by the FindPatMaxRedLine function.
GetCoverage(Patterns, [Index]) | Returns the coverage percentage. Note: This function is supported by the FindPatMaxRedLine function.
GetFitError(Patterns, [Index]) | Returns the fit error score.
GetGranCoarse(Patterns) | Returns the coarse granularity value. Note: This function is supported by the TrainPatMaxRedLine function.
GetGranFine(Patterns) | Returns the fine granularity value. Note: This function is supported by the TrainPatMaxRedLine function.
GetInfoCode(Patterns, [Index]) | Returns a diagnostic code for a pattern. Note: Information strings are inserted into the spreadsheet using the GetInfoString function. TrainPatMaxPattern
Diagnostic Code | Corresponding Information String
07010000 | Pattern may contain too few match features.
07010001 | Difficult to automatically set feature granularity; manually set Granularity.
07010100 | Pattern may be less accurate than expected because the training image appears blurry.
07010102 | The pattern results may be unstable because the coarse features have the same direction.
07010200 | Execution time may increase because of numerous fine features; manually set Granularity.
07010101 | Pattern may contain insufficient information to measure Angle or Scale reliably.
07030000 | No error information.
FindPatMaxPatterns
Diagnostic Code | Corresponding Information String
07020300 | [Value] result(s) discarded due to low contrast.
07020301 | [Value] result(s) discarded due proximity to more accurate results.
07020302 | [Value] result(s) discarded due to excess clutter.
07020303 | Trained pattern contains too few features for current parameter settings.
GetInfoString(Patterns, [Index]) | Returns the information string for a pattern.
GetNFound(Patterns) | Returns the number of pattern matches found. Note: This function is supported by the FindPatMaxRedLine and SortPatterns functions.
GetOutsideArea(Patterns, [Index]) | Returns the proportion (on a scale of 0 to 1, where 0 equals completely within and 1 equals 100% outside) of the matching pattern's area found outside the search region.
GetOutsideFeatures(Patterns, [Index]) | Returns the proportion (on a scale of 0 to 1, where 0 equals completely within and 1 equals 100% outside) of the matching pattern's features found outside the search region.
GetScale(Patterns, [Index]) | Returns the size of the match (compared to the trained pattern) as a percentage. Note: This function is supported by the FindPatMaxRedLine and SortPatterns functions.
GetScaleX(Patterns, [Index]) | Returns the size of the match in the X-direction (compared to the trained pattern) as a percentage.
GetScaleY(Patterns, [Index]) | Returns the size of the match in the Y-direction (compared to the trained pattern) as a percentage.
GetScore(Patterns, [Index]) | Returns the pattern response score value. Note: This function is supported by the FindPatMaxRedLine and SortPatterns functions.
GetTrained(Patterns) | Returns 1 if a pattern has been successfully learned, and 0 if a pattern cannot be trained from a Patterns structure. Note: This function is supported by the TrainPatMaxRedLine function.
GetX(Patterns, [Index]) | Returns a X-coordinate. Note: This function is supported by the FindPatMaxRedLine and SortPatterns functions.
GetY(Patterns, [Index]) | Returns a Y-coordinate. Note: This function is supported by the FindPatMaxRedLine and SortPatterns functions.