imaqDetectLines

NI Vision for LabWindows/CVI Function

imaqDetectLines

Usage

LineMatch* imaqDetectLines(const Image* image, const LineDescriptor* lineDescriptor, const CurveOptions* curveOptions, const ShapeDetectionOptions* shapeDetectionOptions, const ROI* roi, int* numMatchesReturned);

Purpose

Searches for lines in an image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name

Type

Description

image const Image* The image on which to detect lines.
lineDescriptor const LineDescriptor* A structure that describes the lines to search for in the image. This parameter is required and cannot be NULL.
curveOptions const CurveOptions* Describes how the function identifies the curves in the image. This function does not support identifying curves with subpixel accuracy and therefore ignores the subpixelAccuracy element of this parameter.
shapeDetectionOptions const ShapeDetectionOptions* The options to use when detecting lines.
roi const ROI* The region of interest applied to the image that specifies where lines can be detected. Set this parameter to NULL to search the entire image.
numMatchesReturned int* On return, the number of lines that the function matched. Set this parameter to NULL if you do not wish to return information about the number of matched lines.

Return Value

Type

Description

LineMatch* On success, this function returns an array of information about each match found. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().

Parameter Discussion

curveOptions—Set curveOptions to NULL to use the default curve options, as follows:

extractionMode IMAQ_NORMAL_IMAGE
threshold 75
filterSize IMAQ_NORMAL
minLength 25
rowStepSize 15
columnStepSize 15
maxEndPointGap 10
onlyClosed FALSE
subpixelAccuracy FALSE

shapeDetectionOptions—Set shapeDetectionOptions to NULL to use the default shape detection options, as follows:

mode IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANT
orientationRanges NULL
numOrientationRanges 0
scaleRange {75, 125}
minMatchScore 800