Whether to locate a single edge or an edge pair for each result.
Namespace: Cognex.VisionPro.CaliperAssembly: Cognex.VisionPro.Caliper (in Cognex.VisionPro.Caliper.dll) Version: 69.0.0.0
Syntax
Property Value
Type: CogCaliperEdgeModeConstantsEvents
| Event Type | Reason |
|---|---|
| CogCaliper Changed | Fires when the value of this property changes. The following state flag may be affected: |
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | The supplied value is not a member of CogCaliperPolarityConstants. |
Remarks
Whether to locate a single edge or an edge pair for each result. If this property is SingleEdge, then the tool locates and scores a single edge. If the property is Pair, then the tool locates and scores edge-pairs. In edge-pair mode, the location of a single result is defined to be centered between the two edges, as described in the documentation for the Position function.
Default Value: SingleEdge
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