AnnotateGridPoints_Ransac
Select a subset of the given points that forms a grid and assign 2D indices to them.
Syntax
C++
C#
Python
def AnnotateGridPoints_Ransac( inPoints: list[Point2D], /, *, inMaxAttempts: int | None = None, inMaxOutlierCount: int | None = None, inMinLength: float = 0.0, inMaxLength: float | None = 10.0, inMaxLengthRatio: float = 1.3, inAngleRange: float = 16.0, inBaseAspectRatioRange: float = 0.3, inBaseAspectRatio: float | None = 1.0, inBaseShear: float | None = 00.0, inBaseOrientation: float | None = None ) -> ( outPointGrid: list[AnnotatedPoint2D], diagValidSubgraph: list[Segment2D], diagMaxLength: float )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inPoints | list[Point2D] | |||
![]() |
inMaxAttempts | int | None | 1 - ![]() |
None | Maximum number of attempts at finding the grid |
![]() |
inMaxOutlierCount | int | None | 0 - ![]() |
None | Determines how many outlier points can be present to end the search |
![]() |
inMinLength | float | 0.0 - ![]() |
0.0 | Minimum length of a grid segment |
![]() |
inMaxLength | float | None | 0.0 - ![]() |
10.0 | Maximum length of a grid segment, if set to Auto it will be approximated |
![]() |
inMaxLengthRatio | float | 1.0 - 2.0 | 1.3 | Maximum ratio of two consecutive segments in the grid |
![]() |
inAngleRange | float | 0.0 - 45.0 | 16.0 | Maximum variation of angles between neighbouring grid segments in degrees |
![]() |
inBaseAspectRatioRange | float | 0.0 - 1.0 | 0.3 | Maximum variation of the base aspect ratio (ignores if base aspect ratio is not given) |
![]() |
inBaseAspectRatio | float | None | 0.3 - 1.0 | 1.0 | A reference aspect ratio of the grid |
![]() |
inBaseShear | float | None | 0.0 - 60.0 | 00.0 | A reference shear angle between grid directions |
![]() |
inBaseOrientation | float | None | 0.0 - 360.0 | None | A reference orientation of one of the grids directions |
![]() |
outPointGrid | list[AnnotatedPoint2D] | Detected grid | ||
![]() |
diagValidSubgraph | list[Segment2D] | Graph forming a valid grid | ||
![]() |
diagMaxLength | float | Max length computed by the filter (applicable if inMaxLength is set to Auto) |




