Fit Circle to Profile

Description

This Step is used to fit a circle to the input profile and output various features of the fitted circle.

fit circle to profile effect

Workflow

The process of configuring this Step is shown below.

fit circle to profile process
  1. Configure the input. Connect the ports manually or select the input(s) under Input in the parameter configuration panel.

  2. Determine whether to use feature region. For a feature region used, complete the related settings. For more information, please refer to Use Feature Region.

  3. Select the fitting method and set relevant parameters. For detailed description, please refer to Fitting Method.

  4. Select the desired output(s) under Output. For an expandable output item, click ▶ and configure the Min and Max values of the acceptable range.

  5. Run the Step and view output.

Parameter Description

Fitting Method

This parameter specifies the method of fitting the circle to the profile.

Options: Iterative robust least squares, RANSAC

  • Iterative robust least squares: More robust, able to reduce the effect of noise or outliers, but requires longer computational time.

  • RANSAC: Finds the best-fitted circle to the data through a random algorithm. The more iterations, the more accurate and stable the result, but the longer the computational time.

Default setting: Iterative robust least squares

Instruction: Iterative robust least squares is usually more suitable for cases with fewer outliers, whereas RANSAC is more appropriate for cases with more outliers because it can mitigate the effects of outliers effectively through random sampling.

Outlier Fraction

This parameter defines the proportion of outliers to be removed during circle fitting, thus resulting in a better result.

Default setting: 0.0%

Tolerance

This parameter refers to the distance threshold used in the RANSAC algorithm when determining the adequacy of a data point for fitting a model. A data point is considered an inlier if its distance to the fitted circle is less than the specified value, otherwise it is considered an outlier. By adjusting Tolerance, it is possible to control the sensitivity of the RANSAC algorithm to noise and outliers. The larger the value, the more easily the noise are recognized as inliers, and vice versa.

Default setting: 0.001 mm

Number of Iterations

This parameter refers to the number of times random sampling and model fitting are performed in the RANSAC algorithm. Due to the stochastic nature of the RANSAC algorithm, the randomly selected subset of data may be different for each iteration. To this end, multiple iterations need to be executed for a robust result. This parameter can be set empirically or based on the characteristics of the problem. Typically, the more iterations, the more robust the result, but with increased computational cost.

Default setting: 1000

Use Feature Region

Feature region defines the area where the circle is fitted. When this option is selected, this Step will only process data within the feature region.

Default setting: Unselected

Instruction: Complete the configuration according to the actual requirement.

For parameter settings of the feature region, please refer to Set the Feature Region.

Output Description

Select the output item(s) according to the actual measurement requirements. Then the corresponding data will be output after the Step is run.

If you select an expandable output item, you must expand it by clicking ▶, and then set the Min and Max values to determine the acceptable range. If the output value falls within the acceptable range, the measurement item is judged as passing (OK), or else it is judged as failing (NG).

Output Item Description

Circle Center X

X value of the center of the fitted circle.

Circle Center Z

Z value of the center of the fitted circle.

Radius

The radius of the fitted circle.

Standard Deviation

The standard deviation of the data points with respect to the fitted circle.

Min Error

The minimum error of the data points with respect to the fitted circle.

Max Error

The maximum error of the data points with respect to the fitted circle.

Min Error X

The X value of the point with the minimum error.

Min Error Z

The Z value of the point with the minimum error.

Max Error X

The X value of the point with the maximum error.

Max Error Z

The Z value of the point with the maximum error.

Center of Fitted Circle

The center point of the fitted circle.

Fitted Circle

The fitted circle obtained.

Troubleshooting

Invalid Parameter

No. Error Error Description Possible Causes Solution

1

Inappropriate outlier fraction

When Fitting Method is set to Iterative robust least squares, Outlier Fraction is not set properly.

The set outlier fraction is not within [0, 1].

Reset Outlier Fraction to ensure that the value is within [0, 1].

2

Inappropriate number of iterations (RANSAC used)

When Fitting Method is set to RANSAC, Number of Iterations is not set properly.

The set number of iterations is not greater than 0.

Reset Number of Iterations and ensure that it exceeds 0.

3

Inappropriate tolerance (RANSAC used)

When Fitting Method is set to RANSAC, Tolerance is not set properly.

The set tolerance is not greater than 0.

Reset Tolerance and ensure that it exceeds 0.

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.