CogLineMaxEdgeDetectionParams ContrastThreshold Property Cognex VisionPro 9.7
Gets or sets the minimum contrast constraint. Edge points are not created for gradients with a contrast below this value.

Namespace: Cognex.VisionPro.LineMax
Assembly: Cognex.VisionPro.LineMax (in Cognex.VisionPro.LineMax.dll) Version: 73.0.0.0
Syntax

public double ContrastThreshold { get; set; }

Property Value

Type: Double
The absolute contrast in the range 0.0 to 255.0, inclusive. The default is 5.
Events

Event TypeReason
ICogChangedEvent Changed

Fires when this property changes.

The following state flag may be affected:

Exceptions

ExceptionCondition
ArgumentOutOfRangeException Thrown if set to a value less than 0.
Remarks

Unlike normalized contrast, which is a measure of relative intensity difference, contrast is a measure of absolute intensity difference. See NormalizedContrastThreshold for information on applying a constraint on the normalized contrast measurement.

The contrast measurement is computed using:

sqrt(gx2 + gy2)

Where gx is the gradient contrast in the direction of the x-axis of the input image selected space; and gy is the contrast in the direction of the y-axis.

Note that the GradientMagnitude of an edge point is the contrast measurement of the edge point.

See Also