Skip to content

3D Straight-Line Profile

Operator Function

Calculate the geometric tolerance - straight-line profile
This operator has 1D and 3D modes. The 1D mode calculates the profile of a line between one line and a theoretical line; the 3D mode calculates the profile of a line between two lines and two theoretical lines.

As shown in the figure below, compute the distance from the theoretical point to the actual line, denoted as 𝑑1, 𝑑2, …, 𝑑n. The profile of a line is:
2 × 𝑚𝑎𝑥(𝑑1, 𝑑2, …, 𝑑n)

Parameters

Input Parameters

ParameterRangeDefaultDescriptionDiagram
Input Image0-80IM index of the input image

Calculation Parameters

1D


ParameterRangeDefaultDescriptionDiagram
Actual Line1D Line-A point on the actual line and its direction vector
Theoretical Linejson file-Theoretical line sampling point file
Fit Point Cloudtrue/falsefalseTranslate the theoretical position points to the position of the point cloud enclosed by the most-fitting region selection, so that the measurement value is minimized
Use Region Parametertrue/falsefalseWhen enabled, use Region as input; when disabled, use Input Image as input
Region1D Window1D WindowManually select a suitable ROI region
You can select an existing ROI region by binding
Theoretical Line Fitting MethodLeast Squares / RANSAC-Select the method for fitting the theoretical line
Distance Threshold0.0-50.00.02Select an appropriate distance threshold; increase this parameter when there is more noise, decrease it when there is less noise
Maximum Iterations100-100001000Set the maximum number of iterations

3D


ParameterRangeDefaultDescriptionDiagram
Actual Line 13D Line-A point on actual line 1 and its direction vector
Actual Line 23D Line-A point on actual line 2 and its direction vector
Theoretical Linejson file-Theoretical line sampling point fileIf there are two different lines, place them in the same file
Fit Point Cloudtrue/falsefalseTranslate the theoretical position points to the position of the point cloud enclosed by the most-fitting region selection, so that the measurement value is minimized
Region 12D Window / 2D Circular Window / 2D Polygon Window / Box / Cylinder Box / Rotated Box / Point Set (binding only)BoxManually select a suitable ROI region
You can select an existing ROI region by binding
Region 22D Window / 2D Circular Window / 2D Polygon Window / Box / Cylinder Box / Rotated Box / Point Set (binding only)BoxManually select a suitable ROI region
You can select an existing ROI region by binding
Theoretical Line Fitting MethodLeast Squares / RANSAC-Select the method for fitting the theoretical line
Distance Threshold0.0-50.00.02Select an appropriate distance threshold; increase this parameter when there is more noise, decrease it when there is less noise
Maximum Iterations100-100001000Set the maximum number of iterations

Result Display

1D


ParameterRangeDefaultDescriptionDiagram
Actual Fitted Linetrue/falsefalseThe input actual fitted line; when enabled, displayed on the IM
Theoretical Linetrue/falsefalseThe input theoretical line; when enabled, displayed on the IM
Foot of Perpendicular from Theoretical Line Point to Actual Linetrue/falsefalseThe foot of perpendicular from the input theoretical line point to the actual line; when enabled, displayed on the IM
Line Connecting Theoretical Line Point and Its Foot on Actual Linetrue/falsefalseThe line connecting the input theoretical line point and its foot on the actual line; when enabled, displayed on the IM
Profile of a Linetrue/falsefalseThe output profile of a line; when enabled, displayed on the IM

3D


ParameterRangeDefaultDescriptionDiagram
Actual Fitted Line 1true/falsefalseThe input actual fitted line 1; when enabled, displayed on the IM
Actual Fitted Line 2true/falsefalseThe input actual fitted line 2; when enabled, displayed on the IM
Theoretical Line 1true/falsefalseThe input theoretical line 1; when enabled, displayed on the IM
Theoretical Line 2true/falsefalseThe input theoretical line 2; when enabled, displayed on the IM
Foot of Perpendicular from Theoretical Line Point to Actual Linetrue/falsefalseDisplay two sets of points: the input theoretical line points and the feet of perpendicular from the theoretical line points to the actual line; when enabled, displayed on the IM
Line Connecting Theoretical Line Point and Its Foot on Actual Linetrue/falsefalseThe line connecting the input theoretical line point and its foot on the actual line; when enabled, displayed on the IM
Profile of a Linetrue/falsefalseThe output profile of a line; when enabled, displayed on the IM

Output Parameters

1D

NameTypeRangeDescription
Resultbooltrue/falsetrue for success
false for failure
Warningbooltrue/falsetrue indicates a warning
false indicates none
MessagestringOutput success, error, or warning message; empty if no error or warning
TimefloatOperator execution time, unit: ms
theoretical_lineline1dTheoretical line
parallelismfloatProfile of a line
resultstringOK/NGWhether the profile of a line is within range

3D

NameTypeRangeDescription
Resultbooltrue/falsetrue for success
false for failure
Warningbooltrue/falsetrue indicates a warning
false indicates none
MessagestringOutput success, error, or warning message; empty if no error or warning
TimefloatOperator execution time, unit: ms
theoretical_line1line3dTheoretical line 1
theoretical_line2line3dTheoretical line 2
parallelismfloatProfile of a line
resultstringOK/NGWhether the profile of a line is within range

Tip

For more details on parameter types, please refer to Type Definition

Troubleshooting

No.Exception MessageCorresponding ParameterSolution
1The number of input point cloud or profile points is less than 2Confirm whether the IM contains at least two valid points. If this condition is not met, load the point cloud or switch to a qualifying IM
2The type of actual line {1} is {0}, an incorrect input typeLine Type, IndexIn 1D mode, check whether the line type is a 1D Line; in 3D mode, check whether the line type is a 3D Line
3Parameter {0} cannot be emptyPathCheck whether the path is empty
4File {0} does not exist or cannot be accessedPathCheck whether the path is valid
5The input theoretical line fitting method is {0}, an invalid fitting methodFitting MethodCheck whether the line fitting method is one of Least Squares / RANSAC
6The input theoretical line point cloud is emptyCheck whether the theoretical line point json file is empty
7The minimum value of the input profile range is greater than the maximum, an invalid profile rangeSet the minimum of the profile range to be less than or equal to the maximum
8The number of theoretical line point cloud points is less than 2Check whether the number of input theoretical line point cloud points is less than 2
9The direction vector of actual line {0} is invalidIndexCheck whether the direction vector of this line is all zeros
10The input mode is {0}, an invalid modeModeCheck whether the mode is one of 1D / 3D
11The input theoretical line point cloud is not a profile pointCheck whether a certain row of the theoretical line point cloud has all values equal to a fixed value
12The input region type is {0}, an invalid region typeRegion TypeIn 1D mode, check whether the region type is a 1D Window; in 3D mode, check whether the region type is one of 2D Window / 2D Circular Window / 2D Polygon Window / Box / Cylinder Box / Rotated Box / Point Set
13The number of polygon vertices is less than 3, cannot form a polygonAdd 2D polygon window vertices so that the number of vertices is at least three
14The input region is empty1. Check whether the selection is empty
2. Check whether the point set is empty

Examples

Engineering Setup

  1. Select the Load Point Cloud tool to load the 3D point cloud to be processed into IM0;

  2. Select the 3D Straight-Line Profile tool.

Tool Usage

  1. Select the input image to be operated on; the image index must match the IM index of the image in the project.

  2. Either disable the use-region parameter, or enable the region and select the region type as Box, then move the box to the position to be measured so that it encloses the point cloud to be measured.

Usage Tips

1. Drag or scale the box via the ROI controller on the image window;
2. Directly modify the start or end coordinates of the box in the calculation parameters to adjust the box position and size
  1. Set the parameters.

  2. Check the items to be displayed in the Result Display panel.

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

  4. After confirming there are no problems, click Save, then run the operator in the run list to view the running result in the corresponding IM.

1D

Local ImageLocal Image

3D

Local ImageLocal Image

Vision Studio