CogCaliper ContrastThreshold Property Cognex VisionPro 9.5
Minimum contrast required for an edge to be considered during the scoring phase.

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

public double ContrastThreshold { get; set; }

Property Value

Type: Double
Events

Event TypeReason
CogCaliper Changed

Fires when the value of this property changes.

The following state flag may be affected:

Remarks

The minimum contrast required for an edge to be considered during the scoring phase. The contrast of an edge is the absolute difference in average pixel values across the edge, in the range 0 through 255. Only edges with contrast greater than the value you specify are considered by the tool.

Default Value: 5.0

Examples

Imports Cognex.VisionPro
Imports Cognex.VisionPro.Caliper
Imports Cognex.VisionPro.ImageProcessing

' Working with a CogCaliperTool object
Dim myCaltool As New CogCaliperTool

' Specify a higher contrast threshold to filter extraneous low-contrast edges 
myCaltool.RunParams.ContrastThreshold = 30
using Cognex.VisionPro;
using Cognex.VisionPro.Caliper;
using Cognex.VisionPro.ImageProcessing;

// Working with a CogCaliperTool object
CogCaliperTool myCaltool = new CogCaliperTool();

// Specify a higher contrast threshold to filter extraneous low-contrast edges 
myCaltool.RunParams.ContrastThreshold = 30;
See Also