imaqBestCircle

NI Vision for LabWindows/CVI Function

imaqBestCircle

Usage

int imaqBestCircle(const PointFloat* points, int numPoints, PointFloat* center, double* radius);

Purpose

Returns the circle that best fits the given points.

Note  This function is obsolete. The replacement function is imaqFitCircle(), which incorporates the functionality of imaqBestCircle() but returns additional information such as the area of the circle.

Parameters

Name

Type

Description

points const PointFloat* The array of points to fit to the edge of the circle.
numPoints int The number of points in the supplied array. You must supply at least three points.
center PointFloat* On return, filled with the coordinates of the center of the circle. Set this parameter to NULL if you do not need this information.
radius double* On return, filled with the radius of the center of the circle. Set this parameter to NULL if you do not need this information.

Return Value

Type

Description

int On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().