imaqExtractCurves

NI Vision for LabWindows/CVI Function

imaqExtractCurves

Usage

Curve* imaqExtractCurves(const Image* image, const ROI* roi, const CurveOptions* curveOptions, unsigned int* numCurves);

Purpose

Finds curves in an image.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name

Type

Description

image const Image* The image in which to find curves.
roi const ROI* The ROI that the function performs this operation on. Pass NULL to use the entire image for this operation.
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.
numCurves unsigned int* On return, the number of curves located in the image. Set this parameter to NULL if you do not need this information.

Return Value

Type

Description

Curve* On success, this function returns a pointer to an array of reports that describe the curves in the image. 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