Measure Cylinder

Description

This Step is used to fit a cylinder from the surface data and calculate the cylinder’s radius, center point, tilt angle, etc.

measure cylinder demo

Workflow

The process of configuring this Step is shown below:

measure cylinder workflow
  1. Configure the input. Connect the Step ports in the graphical programming workspace or select the input under Input in the parameter configuration panel.

  2. Determine whether to use a feature region.

  3. Set the radius range of the cylinder.

  4. Set other parameters.

  5. Select the desired output items under Output. For an expandable output item, click ▶ and configure the Min and Max values to determine the acceptable range for the item.

  6. Run the Step and view output.

Parameters

Parameter Description

Use Feature Region

When unselected, the Step processes all of the surface data to fit the cylinder.

Otherwise, the Step only processes the surface data defined by the feature region(s). In this case, set the following parameters:

  • Feature Region Mode

    This parameter determines whether the data within the feature region(s) or the data outside the feature region(s) will be used for fitting the cylinder.

  • Feature Region

    For more information on how to set and adjust the feature region(s), see Feature Region.

Max Radius

The radius of the fitted cylinder must not exceed this value.

Min Radius

The radius of the fitted cylinder must not be less than this value.

Distance Tolerance

A point is considered an inlier if its distance to the surface of the fitted cylinder is within the tolerance.

Percentage of Inliers for Fitting

Specifies the proportion of inliers used for optimal cylinder fitting.

Fitting Accuracy

Determines how accurate the fitted cylinder is. Typically, higher accuracy requires more iterations and increases computational cost.

Fitting Accuracy is limited by Max Iterations. When the number of iterations reaches the upper limit, the iteration will stop even if the accuracy has not met the set accuracy. In this case, the accuracy is determined by the iteration result.

Max Iterations

The maximum number of attempts the algorithm will make to fit an optimal cylinder. Iteration stops once this limit is reached.

Output Description

Select the output item(s) to add the output port(s) to the Step, and the corresponding data will be output after the Step is run. You can select the output according to the actual measurement requirements.

If you select an expandable output item, you should 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

Radius

The radius of the fitted cylinder.

Center X/Y/Z

The location of the fitted cylinder’s center.

Axis–Z Angle

The angle between the axis of the fitted cylinder and the positive Z-axis.

Axis–X Angle

The angle between the axis of the fitted cylinder and the positive X-axis.

X/Y/Z-Component of Axis Vector

The x-, y-, and z-components of the axis vector of the fitted cylinder, respectively.

Troubleshooting

  • For common errors, see Error Code List.

  • If the error code is inconsistent with the error message, please contact Technical Support for help.

CV-W3801

Error: Unable to fit a cylinder within the specified radius range.

Possible causes:

  • The set radius range is invalid.

  • No cylinder surface exists within set radius range in the cylinder fitting region.

Solutions:

  • Make sure the set radius range is valid.

  • Make sure there are cylinder surface within the set radius range in the cylinder fitting region.

CV-W3802

Error: The “Min/Max Radius” value must exceed 0, and the “Min Radius” must not exceed the “Max Radius.” Please check and try again.

Solution: Make sure the maximum/minimum radius values exceed 0, and the “Min Radius” does not exceed the “Max Radius.”

CV-W3803

Error: The “Distance Tolerance” value must be greater than or equal to 0. Please enter a valid value.

Solution: Make sure the parameter value is not less than 0.

CV-W3804

Error: The “Percentage of Inliers for Fitting” value must be a percentage between 0% and 100%. Please enter a valid value.

Solution: Make sure the parameter value is within 0–100%.

CV-W3805

Error: The “Max Iterations“ value must exceed 0. Please enter a valid value.

Solution: Make sure the parameter value is greater than 0.

CV-W3806

Error: The “Fitting Accuracy” value must be a percentage between 0% and 100%. Please enter a valid value.

Solution: Make sure the parameter value is within 0–100%.

Is this page helpful?

You can give a feedback in any of the following ways:

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.