NI Vision for LabVIEW

IMAQ Fit Contour VI

  • Updated2023-02-21
  • 16 minute(s) read
Owning Palette: Contour Analysis
Requires: NI Vision Development Module

Fits a contour with an equation. The fit will occur in corrected space if the contour is calibrated.

Examples

IMAQ Fit Contour Line

Fits a contour with a line.

IMAQ Fit Contour Line

cgenclasstagrefflat.gif

Contour Image is a reference to the image containing a contour.

csgl.gif

Pixel Radius specifies the neighborhood pixel relationship for the initial subset of points being used.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

igenclasstagrefflat.gif

Contour Image Out is a reference to the image containing a contour.

icclst.gif

Line Segment represents the intersection of the line equation and the contour.

inclst.gif

Point1 (Pixels) is the start point of the calculated fit line in pixel units.

isgl.gif

X is the x-coordinate of the point.

isgl.gif

Y is the y-coordinate of the point.

inclst.gif

Point2 (Pixels) is the end point of the calculated fit line in pixel units.

isgl.gif

X is the x-coordinate of the point.

isgl.gif

Y is the y-coordinate of the point.

inclst.gif

Line Equation is a cluster of three coefficients A, B, and C of the equation in the normal form (Ax + By + C=0) of the best fit line.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Fit Contour B-Spline

Fits a contour with a B-spline curve.

IMAQ Fit Contour B-Spline

cgenclasstagrefflat.gif

Contour Image is a reference to the image containing a contour.

cu32.gif

Control Points specifies the number of control points on the B-spline curve. The default is 10.

cu32.gif

Degree specifies the order of polynomials that form the B-spline curve. The default is 3.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

igenclasstagrefflat.gif

Contour Image Out is a reference to the image containing a contour.

i1dnclst.gif

Best B-Spline Fit returns the points of the best-fit B-spline curve.

idbl.gif

X is the x-coodrdinate of the point.

idbl.gif

Y is the y-coodrdinate of the point.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Fit Contour Circle

Fits a contour with a circle.

IMAQ Fit Contour Circle

cgenclasstagrefflat.gif

Contour Image is a reference to the image containing a contour.

cdbl.gif

Pixel Radius specifies the acceptable distance, in pixels, that a point determined to belong to the circle can be from the perimeter of the circle.

cbool.gif

Reject Outliers? controls whether to use every given radial point or only a subset of the points to fit the circle. If this control is TRUE, the algorithm determines the best subset of points to use and ignores the outliers (the points outside the subset). If this control is FALSE, the algorithm uses every given point.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

igenclasstagrefflat.gif

Contour Image Out is a reference to the image containing a contour.

icclst.gif

Circle returns the best-fit circle.

inclst.gif

Center lists the coordinates of the center of the circle.

idbl.gif

Radius is the radius of the circle.

idbl.gif

Start Angle is the first angle of the circular strip. The angle is measured counterclockwise from the x-axis of a coordinate system centered on the center of the circle.

idbl.gif

End Angle is the second angle of the circular strip. The angle is measured counterclockwise from the x-axis of a coordinate system centered on the center of the circle.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Fit Contour Ellipse

Fits a contour with an ellipse.

IMAQ Fit Contour Ellipse

cgenclasstagrefflat.gif

Contour Image is a reference to the image containing a contour.

cdbl.gif

Pixel Radius specifies the acceptable distance, in pixels, that a point determined to belong to the ellipse can be from the perimeter of the ellipse.

cbool.gif

Reject Outliers? controls whether to use every given radial point or only a subset of the points to fit the ellipse. If this control is TRUE, the algorithm determines the best subset of points to use and ignores the outliers (the points outside the subset). If this control is FALSE, the algorithm uses every given point.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

igenclasstagrefflat.gif

Contour Image Out is a reference to the image containing a contour.

icclst.gif

Ellipse specifies the best-fit ellipse.

inclst.gif

Center lists the coordinates of the center of the ellipse.

idbl.gif

Angle is the orientation of the major axis with respect to the horizontal.

idbl.gif

Major Radius is the length of the semi-major axis.

idbl.gif

Minor Radius is the length of the semi-minor axis.

idbl.gif

Start Angle is the first angle of the circular strip. The angle is measured counterclockwise from the x-axis of a coordinate system centered on the center of the ellipse.

idbl.gif

End Angle is the second angle of the circular strip. The angle is measured counterclockwise from the x-axis of a coordinate system centered on the center of the ellipse.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

IMAQ Fit Contour Polynomial

Fits a contour with a polynomial.

IMAQ Fit Contour Polynomial

cgenclasstagrefflat.gif

Contour Image is a reference to the image containing a contour.

cu32.gif

Polynomial Order specifies the order of the polynomial equation.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

igenclasstagrefflat.gif

Contour Image Out is a reference to the image containing a contour.

i1dnclst.gif

Best Polynomial Fit returns the points of the best-fit polynomial.

idbl.gif

X is the x-coodrdinate of the point.

idbl.gif

Y is the y-coodrdinate of the point.

i1ddbl.gif

Polynomial Coefficients returns the coefficients of the polynomial equation.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

Examples

Refer to the following for an example that uses this VI.

  • LabVIEW\examples\Vision\Contour\Contour Defect Inspection.vi

Log in to get a better experience