CogPMRedLineRunParams AcceptThreshold Property Cognex VisionPro 9.8 SR1
Gets or sets the acceptance threshold for the score of a result. Only instances of the pattern that receive scores greater than or equal to this threshold are accepted. Valid range is from zero to one.

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

public double AcceptThreshold { get; set; }

Property Value

Type: Double
The acceptance threshold. Default value is 0.5.
Events

Event TypeReason
ICogChangedEvent Changed Fires when this property changes. The following state flag may be affected:
Exceptions

ExceptionCondition
ArgumentOutOfRangeException The supplied value is less than zero or greater than one.
Remarks

You should supply an acceptance threshold that is lower than the lowest score you ever expect to receive from a true instance of your pattern.

There are several parameters that affect how PMRedLine reports results. If the ReturnAllResults property of CogPMRedLineRunParams is "false", every returned result will have its Accepted property set to "true", and a result will be returned only if all of the following conditions are met:

If, however, ReturnAllResults is "true", additional pattern instances may be reported as results. You can use the value of Accepted to determine why the additional result was excluded initially.

If Accepted is "true" the additional result was excluded solely because the NumberToFind was set too low. This could happen, for example, if your input image contains five instances of the pattern but you set NumberToFind to only find three. In this case you might get two additional results that meet all of the acceptance conditions listed above, but were excluded from the results solely because they were not among the three highest-scoring instances.

If Accepted is "false" the additional result was excluded because it has one or more of the following:

See Also