Detect and Fit Circle

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

■ If you're unsure about the version of the product you are using, please contact Mech-Mind Technical Support for assistance.

Description

This Step is used to fit a circle to the circular edge detected from the image.

circle demo

Usage Scenario

This Step is mainly used for automatic inspection, center localization, radius measurement of workpieces or parts with circular contours.

Basic Concepts

  • 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 port Data type Description

Image

Image

The image used for detecting a circular edge.

Alignment Parameter Group

Pose2D

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

Output

Output port Data type Description

Fitted Circle

Shape2D/Circle

The circle obtained through fitting.

Circle Center

Shape2D/Point

The center of the fitted circle.

Circle Center X

Number

The X coordinate of the center of the fitted circle.

Circle Center Y

Number

The Y coordinate of the center of the fitted circle.

Radius

Number

The radius of the fitted circle.

Parameter Description

Parameter Description

ROI Settings

A circular ROI can be drawn. The system then extracts multiple pixel columns based on the caliper settings, and edge points detected in each column are used for circle fitting.

Edge Polarity

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

Value list:

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

  • Bright-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 Mode

Define the edge types to be retained in edge detection.

Value list: Best, First, Last.

Grayscale Change Threshold

This parameter specifies the minimum grayscale variation 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 grayscale variation between adjacent pixels at the edge of a pixel column meets or exceeds the specified percentage of the maximum variation in that column. Once this parameter is selected, set Relative Threshold.

Outlier Fraction

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