1D Line
Operator Function
Find line segments in the ROI of the input image.
Parameter Introduction
Input Parameters

| Parameter | Range | Default Value | Description | Illustration |
|---|---|---|---|---|
| Input Image | 0-8 | 0 | IM number for image input | ![]() |
Calculation Parameters

| Parameter | Range | Default Value | Description | Illustration |
|---|---|---|---|---|
| Caliper | Set the start and end points of the caliper | |||
| Direction | Downward/Rightward | Downward | Downward: Find line segments downward Rightward: Find line segments rightward | ![]() |
| Transition | Positive/Negative/All | All | Positive: Transition from black to white Negative: Transition from white to black All: Both transitions | ![]() |
| Selection | First/Last/Best | Best | 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 | ![]() |
| Threshold | Numerical Range | 50.000 | Refers 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 Deviation | Numerical Range | 2.000 | Standard deviation for smoothing gradient changes. | ![]() |
Result Display

| Parameter | Range | Default Value | Description | Illustration |
|---|---|---|---|---|
| Mid Point | true/false | false | If enabled, display the center point of the line segment on the IM image. | |
| Line Segment | true/false | false | If enabled, display the line segment on the IM image. | |
| End Points | true/false | false | If enabled, display the two endpoints of the line segment on the IM image. |
Output Parameters

| Name | Type | Range | Description |
|---|---|---|---|
| Result | bool | true/false | true for success false for failure |
| Warning | bool | true/false | true indicates a warning false indicates no warning |
| Message | string | Output success, error, or warning messages. Empty if no error or warning. | |
| Time | float | Operator execution time, unit: ms | |
| Mid Point | point2d | The center point of the found line segment. | |
| Segment | group | The found line segment. |
Exception Troubleshooting
| No. | Exception Information | Corresponding Parameter | Solution |
|---|---|---|---|
| 1 | Not Found | 1. Lower the threshold 2. Check if the polarity is correct | |
| 2 | ROI Too Small | The ROI size must exceed 3×3. | |
| 3 | Input Image Is Empty | Check if the input image is empty. |
Example Introduction
Engineering Design
Select the
Load Imagetool to load the 2D image that needs processing.Select the
1D Line Tool.
Tool Usage
Select the input image for the operation. The image number must match the IM number where the image is located in the project.
Use the caliper to select the region where the line 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 caliper parameters (such as start and end points) in the calculation parameters to set the caliper; :::
Set the parameters.
Check the content you want to display in the result display section.
Click
Testto check if the image window and parameters meet expectations.If there are no issues, click
Save. Run the operator in the run list, and then view the running results in the corresponding IM.






