FitEllipse2 Method
Syntax
CWIMAQVision.FitEllipse2 RadialPoints, Options, FitEllipseReport
Return Type
On success, this method returns 0. On failure, this method returns a negative number.
Purpose
Finds the ellipse that best represents a set of points.
Remarks
You must supply at least six non-colinear points to fit to the edge of the ellipse.
Parameters
RadialPoints As CWIMAQPoints
The coordinates of the points to use for the fit. This collection must have at least six items.
Options As CWIMAQFitEllipseOptions
The options that the algorithm will use.
FitEllipseReport As CWIMAQFitEllipseReport
On return, a report containing information about the ellipse that best represents the set of points.
Example
Dim report As New CWIMAQFitEllipseReport Dim options As New CWIMAQFitEllipseOptions Dim points As New CWIMAQPoints ' Find the ellipse that passes through ' (1,1), (-1,1), (1,-1), (-1,-1), (1.414,0), (0, 1.414) points.Initialize Array(1, -1, 1, -1, 1.414, 0), _ Array(1, 1, -1, -1, 0, 1.414) CWIMAQVision1.FitEllipse2 points, options, report