Table Of Contents

Fit Ellipse (G Dataflow)

Last Modified: June 25, 2019

Finds the ellipse that best represents a set of points and returns the center, major and minor axes, perimeter, and area of the ellipse.

This node requires a minimum of five or six points, depending on the value of reject outliers. The resulting ellipse may take into account only a subset of the points you provide.

connector_pane_image
datatype_icon

radial points

Array of point-coordinate clusters that correspond to points along the perimeter of the ellipse.

The minimum number of points needed along the perimeter of the ellipse is 5 points if reject outliers is TRUE, or 6 points if reject outliers is FALSE.

datatype_icon

minimum score

Required quality of the fitted ellipse.

The score can vary from 0 to 1000, where 1000 represents a perfect ellipse.

Default: 500

datatype_icon

maximum iterations

Maximum number of refining steps the algorithm takes to ensure that the quality of the fit is better than minimum score.

maximum iterations is valid only when reject outliers is TRUE.

datatype_icon

reject outliers

Boolean that specifies whether to use every given radial point or only a subset of the points to fit the ellipse.

True Algorithm determines the best subset of points to use and ignores the points outside the subset.
False Algorithm uses every given point.

Default: False

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

pixel radius

Acceptable distance, in pixels, that a point determined to belong to the ellipse can be from the perimeter of the ellipse.

datatype_icon

ellipse

Cluster with data from center, major axis and minor axis.

datatype_icon

center

Coordinates of the center of the ellipse.

datatype_icon

major axis

Cluster of two point-coordinate clusters.

This cluster specifies the coordinates of the points that compose the major axis of the ellipse.

datatype_icon

minor axis

Cluster of two point-coordinate clusters.

This cluster specifies the coordinates of the points that compose the minor axis of the ellipse.

datatype_icon

measurements

Cluster with data from area and perimeter.

datatype_icon

area

Area of the ellipse.

datatype_icon

perimeter

Length of the perimeter of the fit ellipse.

datatype_icon

residual

Least square error of the fitted ellipse over every given radial point.

Residual = where e i is the distance from the i th input point to the fit line.

datatype_icon

valid fit?

Boolean that indicates if the fit is valid.

This indicator is TRUE if the quality of the fit is better than minimum score and the fit was attained within maximum iterations. valid fit? is a function of minimum score, maximum iterations, and pixel radius.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.
datatype_icon

indexes of points used

Array that returns the indexes of points in the radial points array that were used to fit the ellipse.

Some points may be excluded based on the minimum score, pixel radius, or reject outliers specified.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics