Skip to content

2D Circle

Operator Function

Find circles in the input image using circular calipers and output the center point and radius of the circle.

Parameter Introduction

Input Parameters

ParameterRangeDefault ValueDescriptionIllustration
Input Image0-80IM number for image input

Calculation Parameters

ParameterRangeDefault ValueDescriptionIllustration
CaliperSet the range of the search area
TransitionPositive/Negative/AllAllIdentify the direction of grayscale change, including:
Positive: Transition from black to white
Negative: Transition from white to black
All: Both transitions
SelectionFirst/Last/BestBestSelect points that meet the threshold, including:
First: The first point found that meets the threshold
Last: The last point that meets the threshold
Best: The point with the largest threshold change
Threshold1-25510.000Threshold setting for gradient change
Standard Deviation0.4-1002.000Standard deviation for smoothing gradient changes
Fitting MethodLeast Squares/Minimum Enclosing CircleMinimum Enclosing CircleLeast Squares: Use all feature points to fit the optimal solution
Minimum Enclosing Circle: The smallest circle ensuring all points are inside the circle

Result Display

ParameterRangeDefault ValueDescriptionIllustration
Circletrue/falsefalseIf enabled, display the found circle on the IM image
Circle Centertrue/falsefalseIf enabled, display the found circle center on the IM image
Edge Pointstrue/falsefalseIf enabled, display the found caliper contour points on the IM image

Output Parameters

NameTypeRangeDescription
Resultbooltrue/falsetrue for success
false for failure
Warningbooltrue/falsetrue indicates a warning
false indicates no warning
MessagestringOutput success, error, or warning messages. Empty if no error or warning.
TimefloatOperator execution time, unit: ms
Circlecircle2dFound circle informationCenter point circularity

Exception Troubleshooting

No.Exception InformationCorresponding ParameterSolution
1Caliper out of boundsIncrease the number of calipers
2Not enough fitting points found
3Input image is emptyCheck if the input image is empty

Example Introduction

Engineering Design

  1. Select the Load Image tool to load the required 2D image to IM0.

  2. Select the 2D Circle tool.

Tool Usage

  1. Select the input image for the operation. The image number must match the IM number where the image is located in the project.

  2. Use the caliper to select the area where the circle needs to be found.

::: Warning Tips 1. Use the ROI controller on the image window to drag or scale the caliper; 2. Directly modify the circle center or caliper parameters in the calculation parameters to set the caliper; :::

  1. Set the parameters.

  2. Check the content you want to display in the result display section.

  3. Click Test to check if the image window and parameters meet expectations.

  4. If there are no issues, click Save. Run the operator in the run list, and then view the running results in the corresponding IM.

Local Image

AI-Vision, Making 3D Measurement Easier