Fit Oblong Holes to Surface Edge

You are currently viewing the documentation for the latest version (2.2.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

Description

This Step detects oblong hole edges from surface data and fits oblong holes.

Basic Concepts

  • Caliper

    The system distributes a specified number of calipers evenly across the semicircular arcs at both ends of the oblong hole path. A profile can be extracted from the data within each caliper region. The profile line is perpendicular to the path direction of the oblong hole.

  • Profile

    A set of data points extracted from a caliper region. By smoothing the profile, gap filling, and detecting edges, edge points for fitting oblong holes can be obtained.

  • Edge point

    A position on the profile at the edge of the oblong hole where the depth or intensity value changes significantly. The Step extracts edge points from each profile for final fitting based on the configured edge detection parameters.

Workflow

The process of configuring this Step is shown below:

  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. Configure the feature region based on the oblong hole position, and then determine whether to enable Use Intensity Image based on the actual scenario.

  3. Configure the Caliper Settings so that the calipers cover the edges at both ends of the oblong hole as evenly as possible.

  4. Configure Profile Processing and Edge Detection Settings to ensure stable extraction of edge points.

  5. Configure Fitting Settings.

  6. Under Output, select the Output Items. Click ▶ on the left of an output item to expand it, and configure the Lower limit and Upper limit values to define the acceptable range.

  7. Run the Step and view output.

Input Description

Input item Description

Surface Data

Surface data for detecting oblong hole edges and fitting an oblong hole.

Alignment Parameter Group

Used to adjust the feature region’s pose in sync with the target object’s pose changes.

See Alignment Parameter Group for usage scenarios.

Parameter Description

General Parameters

Parameter Description

Use Intensity Image

Enable this option to use the intensity image to detect oblong hole edges when the target region is relatively flat and has distinct color differences.

When this option is selected, the Step uses intensity image data for edge detection and fitting. Otherwise, the Step uses depth map data by default.

Feature Region

Used to define the approximate position of the oblong hole. The system automatically generates a closed oblong hole path in this region as a track line for the caliper placement.

The feature region should be slightly larger than the actual oblong hole to ensure complete edge coverage. For more information on how to set and adjust the feature region(s), see Feature Region.

Caliper Settings

Parameter Description

Caliper Count

The number of calipers evenly distributed along the semicircular arcs at both ends of the oblong hole path.

Increasing the number of calipers appropriately can help obtain more edge points and improve fitting stability.

Caliper Width

The caliper width along the oblong hole path.

Caliper Length

The length direction of the caliper is perpendicular to the path direction of the oblong hole.

Setting the caliper length appropriately ensures that the profile line fully crosses the oblong hole edges, enabling stable edge point extraction.

Profile Processing

Parameter Description

Window Size for Profile Smoothing

The window size used to filter each profile line along its direction. After filtering, the profiles become smoother.

Gap Filling Threshold

When a gap on a profile is less than or equal to the configured threshold, it is filled using the first valid point on the lower side of the gap. When the gap exceeds the threshold, it remains invalid.

Include Null Points

When this option is selected, you must specify a fixed value to fill all invalid points on the profile.

Setting this parameter helps ensure the continuity of the profile data and avoid missed detections caused by invalid points.

Null Filling Value of Depth

The depth value used to fill invalid points in the profile.

This parameter only needs to be set when Include Null Points is selected.

Null Filling Value of Intensity

The intensity value used to fill invalid points in the profile.

This parameter only needs to be set when both Use Intensity Image and Include Null Points are selected.

Edge Detection Settings

Parameter Description

Edge Polarity

Defines the direction of depth or intensity value changes from the inside to the outside of the oblong hole edge.

Value list: Rising, Falling, Rising or falling

Edge Mode

Define the edge types to be retained in edge detection.

Value list: Best, First, Last

Absolute Depth Change Threshold

At the edge of the oblong hole, the absolute value of depth change of adjacent data points on the profile must be greater than or equal to this threshold for edge points to be detected.

Absolute Intensity Change Threshold

At the edge of the oblong hole, the absolute intensity change between neighboring data points on the profile must be greater than or equal to this threshold to enable edge point detection.

Only needs to be set after Use Intensity Image is selected.

Use Relative Threshold

Once this parameter is selected, edge points will only be detected if the depth or intensity value between neighboring data points varies by at least the specified percentage of the maximum variation on the profile.

Relative Threshold

Only visible when Use Relative Threshold is selected.

This parameter specifies the lower limit of the relative variation relative to the maximum variation on the profile.

Fitting Settings

Parameter Description

Outlier Fraction

The percentage of outliers to be removed during oblong hole fitting.

Show Detail

Once this option is selected, the oblong hole path, calipers, and relevant detection details can be displayed in the visualization window to facilitate parameter tuning.

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 Lower Limit and Upper Limit values to determine the acceptable range. If the output value of the measurement item falls within the acceptable range, it is judged as okay (OK), or else it is judged as not good (NG).

Output item Description

Center Point

The geometric center of the fitted oblong hole.

Center X

The X coordinate of the fitted oblong hole’s center point.

Center Y

The X coordinate of the fitted oblong hole’s center point.

Minor Axis Length

The width of the fitted oblong hole, defined as the diameter of the semicircular ends.

Major Axis Length

The total length of the fitted oblong hole, calculated as the center-to-center distance between the two semicircular ends plus twice the semicircle radius.

Oblong Hole Rotation Angle

The rotation angle of the fitted oblong hole relative to the positive X-axis.

Fitted Oblong Hole

Oblong hole obtained by fitting.

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-W4401

Error: The width (X) of the oblong hole should be greater than its length (Y).

Solution: Check and adjust the feature region settings to ensure that the width (X) is greater than the length (Y).

CV-W4402

Error: The “Caliper Count” value is outside of the valid range.

Possible cause: The parameter value is less than 0 or greater than or equal to 10000.

Solution: Ensure the parameter value is within 0–10000.

CV-W4403

Error: The set “Caliper Length” value is outside of the valid range.

Solution: Ensure the parameter value is within 0–1000.

CV-W4404

Error: The set “Caliper Width” value is outside of the valid range.

Solution: Ensure the parameter value is within 0–100.

CV-W4405

Error: The set “Gap Filling Threshold” value is outside of the valid range.

Solution: Ensure the parameter value is within the range of 0 to 100.

CV-W4406

Error: The set “Null Filling Value of Intensity” is outside of the valid range.

Possible cause: The parameter value is less than 0 or greater than 255.

Solution: Ensure the parameter value is within the range of 0 to 255.

CV-W4407

Error: The “Null Filling Value of Depth” is outside of the valid range.

Possible cause: The parameter value is less than −10000 or greater than 10000.

Solution: Ensure the parameter value is within −10000–10000.

CV-W4408

Error: The set “Window Size for Profile Smoothing” value is not within the valid range.

Solution: Ensure the parameter value is within the range of 0 to 100.

CV-W4409

Error: The set “Edge Polarity” is invalid.

Solution: Select valid edge polarity from the drop-down list.

CV-W4410

Error: The set “Edge Type” is invalid.

Solution: Select a valid edge type from the drop-down list.

CV-W4411

Error: The “Absolute Intensity Change Threshold” value is outside of the valid range.

Possible cause: The parameter value is less than 0 or greater than 255.

Solution: Ensure the parameter value is within the range of 0 to 255.

CV-W4412

Error: The “Absolute Depth Change Threshold” value is outside of the valid range.

Possible cause: The parameter value is less than 0 or greater than 20000.

Solution: Ensure the parameter value is within 0–20000.

CV-W4413

Error: The set “Relative Threshold” value is outside of the valid range.

Possible cause: The parameter value is less than 0% or greater than 100%.

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

CV-W4414

Error: The “Outlier Fraction” value must be between 0% and 100%.

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

CV-W4415

Error: Unable to fit an oblong hole since the detected edge points are insufficient.

Possible Causes:

  • The calipers are not set properly.

  • The position or size of the feature region(s) is inappropriate.

  • The set “Absolute Depth Change Threshold” or “Absolute Intensity Change Threshold” or “Relative Threshold” is too large.

Solution:

  • Adjust the caliper settings to ensure edge points can be detected from the calipers.

  • Set the Feature Region(s) properly.

  • Decrease “Absolute Depth Change Threshold” or “Absolute Intensity Change Threshold” or “Relative Threshold”.

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.