CogCaliperScorerPositionNeg SetXYParameters Method Cognex VisionPro
Set the parameters used to map an edge candidate's position to a score. When mapping, the signed difference in position between the edge model origin and the center of the projection region is computed. This relative position value is in units of the selected space of the input image. Score is a unitless value in the range of 0.0 (no edge found) through 1.0 (edge found).

Namespace: Cognex.VisionPro.Caliper
Assembly: Cognex.VisionPro.Caliper (in Cognex.VisionPro.Caliper.dll) Version: 65.1.0.0
Syntax

public void SetXYParameters(
	double x0,
	double x1,
	double xc,
	double y0,
	double y1
)

Parameters

x0
Type: System Double
A relative position value that helps describe how an edge candidate's position is mapped to a score. May be negative or positive. Relative position values between x0 and x1 are mapped to a score that is between y0 and y1, while relative position values on the other side of x0 are mapped to a score of y0.
x1
Type: System Double
A relative position value that helps describe how an edge candidate's position is mapped to a score. May be negative or positive. The value of x1 must fall between the values of xc and x0. Relative position values between x0 and x1 are mapped to a score that is between y0 and y1, while relative position values between xc and x1 are mapped to a score of y1.
xc
Type: System Double
A relative position value that helps describe how an edge candidate's position is mapped to a score. Relative position values between xc and x1 are mapped to a score of y1, while relative position values on the other side of xc are mapped to a score of zero.
y0
Type: System Double
The maximum score that will be produced by this scoring function. This unitless value is in the range of 0.0 through 1.0, and must be greater than the y1 value.
y1
Type: System Double
The minimum non-zero score that will be produced by this scoring function. This unitless value is in the range of 0.0 through 1.0, and must be less than the y0 value.
Exceptions

ExceptionCondition
ArgumentException

YO is greater than or equal to y1 or it is not the case that x0 is greater than x1 and x1 is greater than xc or xc is greater than x1 and x1 is greater than x0.

Remarks

Function that sets the individual values that define this scoring function as shown in the following figure:

If x1 is less than x0 raw scores above x0 are mapped to y0, raw scores between xc and x1 are mapped to y1. Raw scores below xc are mapped to a score of 0.

If x0 is less than x1 raw scores below x0 are mapped to y0, raw scores between x1 and xc are mapped to y1. Raw scores above xc are mapped to a score of 0.

See Also