CogGeneralContour NearestSegment Method Cognex VisionPro 9.8
Returns the segment closest to the given point.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 75.1.0.0
Syntax

public CogGeneralContourSegmentIterator NearestSegment(
	double x,
	double y
)

Return Value

Type: CogGeneralContourSegmentIterator

The returned nearest segment.

Exceptions

ExceptionCondition
CogShapeDegenerateContourException

The contour contains no segments.

Remarks

Returns the segment closest to the point (x, y). The point is specified in the selected space of the contour.

See Also