Measure Cylinder

Description

Use this Step to fit the cylinder from the surface data and calculate 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 will process surface data inside the region when the feature region is used. At this point, the following parameters need to be set:

  • Feature Region Mode

    Determines whether to use the data within the feature region or the data outside the region to fit a cylinder.

  • Feature Region

    See Feature Region for details on setting and adjusting a feature region.

Max Radius

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

Min Radius

The radius of the fitted cylinder must be equal to or greater 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 iteration results.

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.

Cylinder Center X/Y/Z

The center point of the fitted cylinder.

Axis–Z Angle

The angle between the axis of the fitted cylinder and the Z–axis.

Axis–X Angle

The angle between the axis of fitted cylinder and X–axis.

X/Y/Z-Component of Axis Vector

The X, Y, 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 fitting region.

Solutions:

  • Make sure the set radius range is valid.

  • Make sure the cylinder surface within set radius range exists in fitted 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 those values exceed 0, and the “Min Radius” must 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 greater than or equal to 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%.

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.