Detect and Fit Oblong Hole

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 is used to fit an oblong hole to the oblong-hole-shaped edge detected from the image.

oblong hole demo

Usage Scenario

This step is primarily used for precise measurement of parts, workpieces, or assemblies containing oblong holes, and is common in automotive, machining, and assembly inspection applications.

Basic Concepts

  • Oblong hole

    A hole structure consisting of a rectangular midsection with semicircular ends, widely used in mechanical and automotive parts to allow for sliding or adjustment.

  • Caliper

    In image processing, a virtual measurement tool detects edges within a specified region. Adjusting its count, width, and length affects the accuracy and stability of edge detection.

  • Edge polarity

    It refers to the direction of grayscale change across an edge, e.g., dark-to-light or light-to-dark.

Input and Output

Input

Input ports Data type Description

Image

Image

The image used for detecting an oblong-hole-shaped edge.

Alignment Parameter Group

Pose2D

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

Output

Output ports Data type Description

Oblong Hole Pose

Pose2D

The position and orientation of the fitted oblong hole.

Center Points

Shape2D/Point

The geometric center of the fitted oblong hole.

Center X

Number

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

Center Y

Number

The Y coordinate of the center point of the fitted oblong hole.

Minor Axis Length

Number

The fitted oblong hole width, which is the diameters of the semicircles at both ends of the oblong hole.

Major Axis Length

Number

The total length of the fitted oblong hole is equal to the distance between the centers of the semicircles at the ends of the oblong hole (i.e., the length of the middle rectangle) plus the radii of the two semicircles.

Oblong Hole Rotation Angle

Number

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

Fit Oblong Hole

Shape2D/Oblong

The fitted oblong hole.

Parameter Description

Parameter Description

ROI Settings

You can draw an oblong hole ROI, and the system will extract multiple columns of pixels according to the caliper settings. The detected edge points in each column will be used for oblong hole fitting.

For a closed ROI, such as an oblong hole, the calipers detect edges outward from the inside of the ROI. The caliper direction generally does not need adjustment, and rotating the ROI does not change the detection direction.

Edge Polarity

This parameter specifies the direction in which the grayscale values change at the edges.

Value list:

  • Dark to light: Detects edges where grayscale values increase from low to high, corresponding to a visual transition from dark to bright.

  • Light to dark: Detects edges where grayscale values decrease from high to low, corresponding to a visual transition from bright to dark.

  • Any: No limit on the direction of grayscale value change of the edge. Both types can be detected.

Filter Window Size

Specify the window size to be used when filtering each column of pixels in its direction. Filtering can reduce noise and improve the stability of edge detection results.

Edge Type

Define the edge types to be retained in edge detection.

Value list: Best, First, Last.

Gray Value Change Threshold

This parameter specifies the minimum gray value change between adjacent pixels at the edge of an extracted pixel column required for edge point detection. Setting this parameter value properly can effectively filter out weak edges and noise.

Use Relative Threshold

Once selected, an edge point is detected only if the gray value change between adjacent pixels at the edge of a pixel column meets or exceeds the specified percentage of the maximum change in that column. Once this parameter is selected, set Relative Threshold.

Outlier Fraction

The percentage of outlier points to be removed during oblong hole fitting.

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.