Fit Line to Profile
Description
This Step is used to fit a line to the input profile and measure the deviations from the fitted line.
Fits a line to the entire profile |
Workflow
The process of configuring this Step is shown below.
-
Configure the input. Connect the Step ports in the graphical programming workspace or select the input under Input in the parameter configuration panel.
-
Select Feature Region Mode.
-
Set relevant parameters according to the selected mode.
-
Select the desired output items under Output. For an expandable output item, click ▶ and configure the Min and Max values to determine the acceptable range for the item.
Parameter Description
Parameter | Description | ||
---|---|---|---|
Feature Region Mode |
This parameter determines the regions for line fitting and measurement.
|
||
Fitting Method |
This parameter specifies the method for fitting a line to the profile.
|
||
Outlier Fraction |
This parameter is used to set the proportion of outliers to be removed during line fitting so as to best fit a line. The default value is 30%. |
||
Measurements Percentage |
This parameter is used to set the percentage of data points with the smallest errors considered when evaluating the error from the data points to the fitted line. The default value is 50%. Once the Error at Percentile option is selected in the Output section, the Step will output the error value at the percentile corresponding to the percentage set here, that is, the maximum error corresponding to a point within the set “Measurements Percentage.”
|
Output Description
Select the output item(s) to add the output port(s) to the Step, and the corresponding data will be output after the Step is run. You can select the output according to the actual measurement requirements.
If you select an expandable output item, you must expand it by clicking ▶, and then set the Min and Max values to determine the acceptable range. If the output value falls within the acceptable range, the measurement item is judged as passing (OK), or else it is judged as failing (NG). |
Output Item | Description |
---|---|
Standard Deviation |
The standard deviation of the data points with respect to the fitted line. |
Min Error |
The minimum error of the data points from the fitted line. |
Max Error |
The maximum error of the data points from the fitted line. |
Error at Percentile |
The maximum error of points within “Measurements Percentage” from the fitted line. |
Offset |
The Z value of the intersection of the fitted line with the Z-axis. |
Angle |
The angle of the fitted line with respect to the X-axis. |
Min Error X |
The X value of the point with the minimum error. |
Min Error Z |
The Z value of the point with the minimum error. |
Max Error X |
The X value of the point with the maximum error. |
Max Error Z |
The Z value of the point with the maximum error. |
Arithmetic Mean |
The mean of the distances from the data points to the fitted line. |
Error Range |
The range of errors of the data points from the fitted line. |
Fitted Line |
The best fitted line. |
Troubleshooting
|
CV-W5601
Error: The “Outlier Fraction” value is not within [0, 1].
Possible cause: The set outlier fraction is not within [0, 1].
Solution: Reset “Outlier Fraction” to ensure that the value is within [0, 1].
CV-W5602
Error: The “Measurements Percentage” value should be within [0, 1].
Possible cause: The set measurements percentage is not within [0, 1].
Solution: Reset Measurements Percentage to ensure that the value is within [0, 1].