Skip to content

1D Line

Operator Function

Find line segments in the ROI of the input image.

Parameter Introduction

Input Parameters

ParameterRangeDefault ValueDescriptionIllustration
Input Image0-80IM number for image input

Calculation Parameters

ParameterRangeDefault ValueDescriptionIllustration
CaliperSet the start and end points of the caliper
DirectionDownward/RightwardDownwardDownward: Find line segments downward
Rightward: Find line segments rightward
TransitionPositive/Negative/AllAllPositive: Transition from black to white
Negative: Transition from white to black
All: Both transitions
SelectionFirst/Last/BestBestFirst: The first point found that meets the threshold
Last: The last point that meets the threshold
Best: The point with the largest threshold change
ThresholdNumerical Range50.000Refers to the gradient threshold. When the grayscale value of the image changes significantly, the gradient value is larger; when the grayscale value changes slightly, the corresponding gradient value is smaller.
Standard DeviationNumerical Range2.000Standard deviation for smoothing gradient changes.

Result Display

ParameterRangeDefault ValueDescriptionIllustration
Mid Pointtrue/falsefalseIf enabled, display the center point of the line segment on the IM image.
Line Segmenttrue/falsefalseIf enabled, display the line segment on the IM image.
End Pointstrue/falsefalseIf enabled, display the two endpoints of the line segment 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
Mid Pointpoint2dThe center point of the found line segment.
SegmentgroupThe found line segment.

Exception Troubleshooting

No.Exception InformationCorresponding ParameterSolution
1Not Found1. Lower the threshold
2. Check if the polarity is correct
2ROI Too SmallThe ROI size must exceed 3×3.
3Input Image Is EmptyCheck if the input image is empty.

Example Introduction

Engineering Design

  1. Select the Load Image tool to load the 2D image that needs processing.

  2. Select the 1D Line 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 region where the line needs to be found.

Local Image

::: Warning Tips 1. Use the ROI controller on the image window to drag or scale the caliper; 2. Directly modify the caliper parameters (such as start and end points) 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