CogPMAlignMultiRuntimeModeConstants EnumerationCognex VisionPro 9.8 SR1
Enumeration of runtime modes. The modes specify the search order for the patterns.

Namespace: Cognex.VisionPro.PMAlign
Assembly: Cognex.VisionPro.PMAlign (in Cognex.VisionPro.PMAlign.dll) Version: 75.0.0.0
Syntax

public enum CogPMAlignMultiRuntimeModeConstants
Members

  Member nameValueDescription
Sequential0In sequential modes, the patterns are run in a predefined order (queue) until the stopping condition is met.

The stopping condition is met when enough results from a single pattern are found with the following criteria:

  • The score of each result must be greater than or equal to the StopSequentialThreshold, and
  • The total numbers of results found must be greater than or equal to the ApproximateNumberToFind.

The results returned will differ depending on the ReportResultsFromOnePatternOnly value, and whether the stopping condition is met:

  • If ReportResultsFromOnePatternOnly is false and the stopping condition is met, the cumulative results when the stopping condition is met are returned.
  • If ReportResultsFromOnePatternOnly is false and the stopping condition is not met, the results from the pattern with the highest score are returned.
  • If ReportResultsFromOnePatternOnly is true and the stopping condition is met, only the results from the single pattern where the stopping condition is met are returned.
  • If ReportResultsFromOnePatternOnly is true and the stopping condition is not met, the pattern with the most results that have scores greater than or equal to the AcceptThreshold will be returned. In the event of a tie, results from the pattern with the highest single score will be returned.

SequentialMostRecentlySuccessful1This mode is a variant on sequential mode. In this mode, the order of the patterns in the queue is evaluated and perhaps modified based on the results from the sequential search.

The order of the patterns in the queue is determined as follows:

  • The list of results from the most recent search is first reduced to a set of results where the score is greater than or equal to the StopSequentialThreshold. Only the highest scoring instance of each pattern is retained.
  • If the reduced list is empty, the order of the patterns in the queue stays the same.
  • If the reduced list is not empty, the highest scoring pattern is pushed to the front of queue; the pattern with the second highest score is placed in the second position, and so on.
  • The highest scoring pattern is pushed to the front of queue, and the rest of patterns are ordered in terms of score.

SequentialMostSuccessful2This mode is a variant on sequential mode. In this mode, the order of the patterns in the queue is evaluated and perhaps modified based on the results from the previous N searches. N is a user defined integer specified by the property ResultStatisticWindowLength.

The results from the previous N search runs are tabulated in a histogram. For each pattern, the histogram records the number of instances found in the last N runs whose score is greater than or equal to the StopSequentialThreshold.

Notes about the histogram:

  • The histogram is updated after each run, for all modes:
    • The oldest results (over N) is thrown out
    • New results are added only if the score is greater than or equal to the StopSequentialThreshold
  • The histogram is cleared only when the ResultStatisticWindowLength is changed, or by calling ResetResultStatistics.

The order of the pattern in the queue is determined as follows: The pattern with the highest count in the histogram is pushed to the front of the queue. The pattern with the second highest count is second, and so on.

Exhaustive3This mode allows the user to attempt to locate all patterns in the queue.

Exhaustive mode can take advantage of parallel processing. The patterns in the multi-model queue can be executed simultaneously, in parallel, using as many cores as are enabled by the CogVisionToolMultiThreading object.

The results returned will differ depending on the ReportResultsFromOnePatternOnly value, and whether the scores are greater or equal to the AcceptThreshold:

  • If ReportResultsFromOnePatternOnly is false, and all scores are greater or equal to the AcceptThreshold, results found from all patterns are returned.
  • If ReportResultsFromOnePatternOnly is false, and all scores are less than the AcceptThreshold, results found from all patterns are returned.
  • If ReportResultsFromOnePatternOnly is true, and all scores are greater or equal to the AcceptThreshold, the results from the pattern with the most results scoring above the AcceptThreshold are returned. In the event of a tie, then the higher scoring pattern will be returned.
  • If ReportResultsFromOnePatternOnly is true, and all scores are less than the AcceptThreshold, the results from the pattern with the highest scoring results are returned if none of the score are above the AcceptThreshold. In the event of a tie, results from the first pattern in the result list are returned.

See Also