Gets the maximum allowable angle between the normal of a line and the ExpectedLineNormal value. Lines must meet this constraint to become results.
Sets the maximum allowable angle between the normal of a line and the ExpectedLineNormal value. Lines must meet this constraint to become results.
Assembly: Cognex.Vision.LineMax.Net (in Cognex.Vision.LineMax.Net.dll) Version: 9.21.1.1
Return Value
Type: DoubleThe bilateral angle in radians.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown when you assign a value less than zero or greater than PI/2. |
Changed Fires when this property changes. The following state flag may be affected:
An iterative pruning step is applied if a candidate line does not meet the line angle constraint after RANSAC iterations and refinement. Each pruning iteration attempts to remove one outmost inlier, choosing between two outmost inliers at two ends of the found line segment:
In practice, the LineAngleTolerance-based pruning loops continue until the pruned line result satisfies the line angle constraint or until the number of remaining inliers becomes fewer than two and no valid line results can be found.
After pruning for LineAngleTolerance, an updated line will be recomputed from the remaining inliers. The edge point subset will be compared against the updated line model to obtain an updated inlier list and the edge point runs are re-encoded. Based on the updated line model, the inlier/outlier point subset will also be updated to discard points outside the span of the updated line segment. The updated line result is then examined against the CoverageThreshold constraint to see if it is necessary to prune for coverage again.
If the found line angle still does not satisfy the LineAngleTolerance constraint when only two inliers are left, no line is considered to be found for the current candidate and all associated inliers are placed into the considered outliers collection; line finding resumes using the the updated considered outliers collection.
A larger LineAngleTolerance means the found lines are allowed to deviate more from the ExpectedLineNormal, while a smaller LineAngleTolerance means less deviation is allowed. When looking for lines that are strictly parallel to each other, a smaller LineAngleTolerance is advised. When looking for lines at different directions at the same time, a larger LineAngleTolerance is advised.