Fit Circle

Use this tool to fit a circle to points. At least three contour points are necessary to fit a circle.

You may either draw the points into the image by using the available region of interest (ROI) buttons or you can connect the parameter "Points" to an appropriate ROI result of a previous tool. In case ROIs different than point ROIs are used, the respective center points of the ROIs are used for the fitting. The fitted circle is instantly displayed as soon as three points are inserted.

This tool can handle calibration information. If the result of a previous tool is connected and used as parameter, possible calibration information contained in the connected result can also be processed. This means that the results of this tool may contain calibration information, e.g., in case the connected parameter represents a distance in pixel, it will be transformed into a distance in world using the calibration information. However, the measurement will only be processed with the calibration information if all processed parameters contain calibration information, else the results are returned without calibration information.

Parameters

Basic Parameters

Image:

This parameter represents the input image in which the circle is fitted.

Points:

This parameter defines the point region(s) of interest (ROIs) to which the circle is fitted. By default no ROI is defined. To define the points, you either have to connect the parameter to an appropriate ROI result of a previous tool or you have to draw new ROIs into the image using the available ROI buttons. It is not possible to connect ROI results of multiple tools.

At least three points are necessary to fit a circle. In case a different ROI than a point ROI is transmitted or drawn, the respective center point is used.

Additional Parameters

Fitting Method:

This parameter defines the method that is used to fit the circle to the points. It is set to "geometric" by default. If you want to change the "Fitting Method", select your preferred method at the corresponding connector.

Value

Description

algebraic

This method minimizes the algebraic distance between the contour points and the resulting circle. The algebraic method is fast but requires points which do not contain any outliers.

algebraic huber

This method is similar to "algebraic" and based on the approach of Huber.

Use this method, if you want to use a fitting method that decreases the impact of algebraic outliers by a linear weighting of the outliers.

algebraic tukey

This method is similar to "algebraic" and based on the approach of Tukey.

Use this method, if you want to use a fitting method that decreases the impact of algebraic outliers by removing them.

geometric

This approach minimizes the geometric distance between the points and the resulting circle.

This fitting method takes more computational time but its measure results are statistically optimal. Thus, this method is more robust against outliers.

geometric huber

This method is similar to "geometric" and based on the approach of Huber.

Use this method, if you want to use a fitting method that decreases the impact of outliers by a linear weighting of the outliers and that returns statistically optimal fitting results.

geometric tukey

This method is similar to "geometric" and based on the approach of Tukey.

Use this method, if you want to use a fitting method that decreases the impact of outliers by removing them and that returns statistically optimal fitting results.

Results

Basic Results

Circle:

This result returns the graphical representation of the circle that has been fitted to the points. It is returned as a circle ROI.

Score:

This result returns a numeric value that indicates how accurate the fitting was performed. The result is returned as a real number between 0 and 1. If the "Score" has the value 1, the circle is fitted with an accuracy of 100% to the points and all points have the same distance to the center point of the fitted circle.

Tool State:

"Tool State" returns information about the state of the tool and thus can be used for error handling. For more information, see Tool State Result

Additional Results

Radius Segment Start:

This result returns the radius segment between the center point of the fitted circle and the point on the circle that is closest to the first inserted point. The result is returned as a segment ROI.

Radius Segment End:

This result returns the radius segment between the center point of the fitted circle and the point on the circle that is closest to the last inserted point. The result is returned as a segment ROI.

Processing Time:

This result returns the duration of the most recent execution of the tool in milliseconds. The result is provided as additional result. Therefore, it is hidden by default but it can be displayed via the button beside the tool results. For more information see the section Processing Time in the tool reference overview.

Application Examples

This tool is used in the following MERLIC Vision App examples:

  • determine_circle_quality.mvapp