imaqFitLine

NI Vision for LabWindows/CVI Function

imaqFitLine

Usage

BestLine* imaqFitLine(const PointFloat* points, int numPoints, const FitLineOptions* options);

Purpose

Finds the line that best represents a set of points.

Parameters

Name

Type

Description

points const PointFloat* The array of points to fit to the line. The resulting line may take into account only a subset of the input points.
numPoints int The number of points in the supplied array. You must supply at least two points.
options const FitLineOptions* Describes how the function calculates the best fit line.

Return Value

Type

Description

BestLine* On success, this function returns a structure describing the line that best fits the points. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the structure, dispose of it by calling imaqDispose().

Parameter Discussion

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

minScore 900
pixelRadius 3
numRefinements 0