2D Geometric-Feature Localization

You are currently viewing the documentation for the latest version (2.2.2). 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.

Function Description

This Step precisely localizes the target object by detecting predefined line or circular features in the image and outputs the precise pose of the target object.

Usage Scenario

This Step is suitable for scenarios where the target object has distinct and stable geometric features and needs to be precisely localized based on these features.

Input and Output

Input

Input Port Data Type Description

Image

Image

The image input to this port is used to localize the target object.

Object Pose

Pose2D[]

The position, orientation, and scale of the matched object in the image.

Output

Output Port Data Type Description

Pose

Pose2D[]

The target object’s pose precisely localized based on the 2D geometric features.

Parameter Description

Parameter Description

Localization Mode

Selects the combination of geometric features to use. After selecting the localization mode, draw the required number and types of feature ROIs according to the selected mode.

Value List: Four-Line Localization, Two-Line Localization, Two-Circle Localization, Four-Circle Localization, One-Circle-and-One-Line Localization

  • Four-Line Localization: Calculates the target object’s position and orientation by detecting its four edge lines.

  • Two-Line Localization: Calculates the target object’s position and orientation by detecting its two edge lines.

  • Two-Circle Localization: Calculates the target object’s position and orientation by detecting two circular features on the target object.

  • Four-Circle Localization: Calculates the target object’s position and orientation by detecting four circular features on the target object.

  • One-Circle-and-One-Line Localization: Calculates the target object’s position and orientation by detecting one circular feature and one straight-line feature.

Four-Line Localization

Click the draw button and drag in the data visualization area to draw four line ROIs, each covering one of the four edges to be detected. The system extracts multiple columns of pixels according to the caliper settings. The edge points detected in each column are used for line fitting.

In the data visualization window, the arrow on each caliper indicates its edge detection direction. The Step detects edge points along this direction. For stable line edge detection, the direction should be as perpendicular as possible to the edge to be detected.

If the line to be detected is tilted, adjust the rotation angle of the rectangular ROI so that the calipers and their detection directions rotate along with the ROI to match the line’s orientation.

After drawing the ROIs, configure geometric feature detection using the following parameters.

Parameter Description

Edge Polarity

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: Does not limit the direction of grayscale value change at the edge. Both types can be detected.

Filter Window Size

Specifies the window size used when filtering each column of pixels along its direction. Filtering can reduce noise and improve the stability of edge detection results.

Edge Type

Defines the edge types to be retained in edge detection.

Value List: Best, First, Last

Gray Value Change Threshold

An edge point is detected only if the grayscale value change between adjacent pixels at the edge of an extracted pixel column is greater than or equal to this threshold. Setting this parameter appropriately can effectively filter out weak edges and noise.

Use Relative Threshold

When selected, an edge point is detected only if the grayscale 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. When this option is selected, set Relative Threshold.

Outlier Fraction

The percentage of outlier points to be removed during line or circle fitting.

Two-Line Localization

Click the draw button and drag in the data visualization area to draw two line ROIs, each covering one of the two edges to be detected. The system extracts multiple columns of pixels according to the caliper settings. The edge points detected in each column are used for line fitting.

In the data visualization window, the arrow on each caliper indicates its edge detection direction. For stable line edge detection, this direction should be as perpendicular as possible to the edge to be detected. If the line to be detected is tilted, adjust the rotation angle of the rectangular ROI so that the calipers and their detection directions rotate along with the ROI.

After drawing the ROIs, configure geometric feature detection using the following parameters.

Parameter Description

Edge Polarity

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: Does not limit the direction of grayscale value change at the edge. Both types can be detected.

Filter Window Size

Specifies the window size used when filtering each column of pixels along its direction. Filtering can reduce noise and improve the stability of edge detection results.

Edge Type

Defines the edge types to be retained in edge detection.

Value List: Best, First, Last

Gray Value Change Threshold

An edge point is detected only if the grayscale value change between adjacent pixels at the edge of an extracted pixel column is greater than or equal to this threshold. Setting this parameter appropriately can effectively filter out weak edges and noise.

Use Relative Threshold

When selected, an edge point is detected only if the grayscale 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. When this option is selected, set Relative Threshold.

Outlier Fraction

The percentage of outlier points to be removed during line or circle fitting.

Two-Circle Localization

Click the draw button and drag in the data visualization area to draw two circular ROIs, each covering one of the two circular features to be detected. The system extracts multiple columns of pixels according to the caliper settings. The edge points detected in each column are used for circle fitting.

For circular ROIs, calipers detect edges from inside the ROI outward. The caliper direction generally does not need to be adjusted, and rotating the ROI does not change the detection direction.

After drawing the ROIs, configure geometric feature detection using the following parameters.

Parameter Description

Edge Polarity

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: Does not limit the direction of grayscale value change at the edge. Both types can be detected.

Filter Window Size

Specifies the window size used when filtering each column of pixels along its direction. Filtering can reduce noise and improve the stability of edge detection results.

Edge Type

Defines the edge types to be retained in edge detection.

Value List: Best, First, Last

Gray Value Change Threshold

An edge point is detected only if the grayscale value change between adjacent pixels at the edge of an extracted pixel column is greater than or equal to this threshold. Setting this parameter appropriately can effectively filter out weak edges and noise.

Use Relative Threshold

When selected, an edge point is detected only if the grayscale 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. When this option is selected, set Relative Threshold.

Outlier Fraction

The percentage of outlier points to be removed during line or circle fitting.

Four-Circle Localization

Click the draw button and drag in the data visualization area to draw four circular ROIs, each covering one of the four circular features to be detected. The system extracts multiple columns of pixels according to the caliper settings. The edge points detected in each column are used for circle fitting.

For circular ROIs, calipers detect edges from inside the ROI outward. The caliper direction generally does not need to be adjusted, and rotating the ROI does not change the detection direction.

After drawing the ROIs, configure geometric feature detection using the following parameters.

Parameter Description

Edge Polarity

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: Does not limit the direction of grayscale value change at the edge. Both types can be detected.

Filter Window Size

Specifies the window size used when filtering each column of pixels along its direction. Filtering can reduce noise and improve the stability of edge detection results.

Edge Type

Defines the edge types to be retained in edge detection.

Value List: Best, First, Last

Gray Value Change Threshold

An edge point is detected only if the grayscale value change between adjacent pixels at the edge of an extracted pixel column is greater than or equal to this threshold. Setting this parameter appropriately can effectively filter out weak edges and noise.

Use Relative Threshold

When selected, an edge point is detected only if the grayscale 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. When this option is selected, set Relative Threshold.

Outlier Fraction

The percentage of outlier points to be removed during line or circle fitting.

One-Circle-and-One-Line Localization

Click the draw button and draw one line ROI and one circular ROI to cover the line edge and circular feature to be detected. The system extracts multiple columns of pixels according to the caliper settings. The edge points detected in each column are used for line and circle fitting.

For the line ROI, the arrow on each caliper indicates its edge detection direction. This direction should be as perpendicular as possible to the line edge to be detected. If the line to be detected is tilted, adjust the rotation angle of the rectangular ROI so that the calipers and their detection directions rotate along with the ROI.

For the circular ROI, calipers detect edges from inside the ROI outward. The caliper direction generally does not need to be adjusted, and rotating the ROI does not change the detection direction.

After drawing the ROIs, configure geometric feature detection using the following parameters.

Parameter Description

Edge Polarity

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: Does not limit the direction of grayscale value change at the edge. Both types can be detected.

Filter Window Size

Specifies the window size used when filtering each column of pixels along its direction. Filtering can reduce noise and improve the stability of edge detection results.

Edge Type

Defines the edge types to be retained in edge detection.

Value List: Best, First, Last

Gray Value Change Threshold

An edge point is detected only if the grayscale value change between adjacent pixels at the edge of an extracted pixel column is greater than or equal to this threshold. Setting this parameter appropriately can effectively filter out weak edges and noise.

Use Relative Threshold

When selected, an edge point is detected only if the grayscale 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. When this option is selected, set Relative Threshold.

Outlier Fraction

The percentage of outlier points to be removed during line or circle 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.