CogCaliper Edge0Polarity Property Cognex VisionPro
Desired polarity of first edge.

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

public CogCaliperPolarityConstants Edge0Polarity { get; set; }

Property Value

Type: CogCaliperPolarityConstants
Events

Event TypeReason
CogCaliper Changed

Fires when the value of this property changes.

The following state flag may be affected:

Exceptions

ExceptionCondition
ArgumentException

The supplied value is not a member of CogCaliperPolarityConstants.

Remarks

The desired polarity of first edge. Specify DarkToLight for a dark-to-light edge, LightToDark for a light-to-dark edge, and DontCare to accept any edge.

Default Value: DontCare

Examples

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

' Working with a CogCaliperTool object
Dim myCaltool As New CogCaliperTool

' Configure edge polarity, position, and mode to find a light-on-dark, 80-pixel wide object 
myCaltool.RunParams.Edge0Polarity = CogCaliperPolarityConstants.DarkToLight
myCaltool.RunParams.Edge1Polarity = CogCaliperPolarityConstants.LightToDark
myCaltool.RunParams.EdgeMode = CogCaliperEdgeModeConstants.Pair
myCaltool.RunParams.Edge0Position = -40
myCaltool.RunParams.Edge1Position = 40
using Cognex.VisionPro;
using Cognex.VisionPro.Caliper;
using Cognex.VisionPro.ImageProcessing;

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

// Configure edge polarity, position, and mode to find a light-on-dark, 80-pixel wide object 
myCaltool.RunParams.Edge0Polarity = CogCaliperPolarityConstants.DarkToLight;
myCaltool.RunParams.Edge1Polarity = CogCaliperPolarityConstants.LightToDark;
myCaltool.RunParams.EdgeMode = CogCaliperEdgeModeConstants.Pair;
myCaltool.RunParams.Edge0Position = -40;
myCaltool.RunParams.Edge1Position = 40;
See Also