CogFindLine Execute Method Cognex VisionPro 9.7
Finds a Line in the provided image by fitting the highest scoring edge points found by a suite of calipers defined by the run parameters.

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

public CogFindLineResults Execute(
	CogImage8Grey image
)

Return Value

Type: CogFindLineResults

The returned CogLine.

Exceptions

ExceptionCondition
CogOperatorNoInputImageException

image is null.

CogImageNoPixelsException

image is not allocated.

CogCaliperNoScorersException

The collection of scoring functions in CaliperRunParams is null or empty or all the scoring functions are disabled and the maximum number of results specified is greater than 0.

CogCaliperBadScorerException

The collection of single-edge scoring functions in CaliperRunParams contains an edge pair scoring function, or the collection of edge-pair scoring functions in CaliperRunParams contains an single-edge scoring function.

CogFindAllCalipersFailedException

All of the calipers failed. This can happen when the values for CaliperSearchLength or CaliperProjectionLength are too small or when all of the specified caliper regions fall completely outside of the input image.

CogFindInvalidExpectedShapeException

The selected space of the ExpectedLineSegment is not a valid space of the input image; the selected space name of the ExpectedLineSegment is a nonqualified space name and more than one instance of it exists in the space tree of the input image; or the selected space name of the ExpectedLineSegment is not a legal space name.

Remarks

Finds a CogLine in the provided image by fitting the highest scoring edge points found by a suite of calipers defined by the CogFindLine.

See Also