LocateMultiplePointPatterns
Finds occurrences of a pattern in a 2D cloud of (feature) points.
Applications:Can be used to find entire objects after finding their characteristic points with tools such as Template Matching or DL_LocatePoints.
Syntax
C++
C#
Python
def LocateMultiplePointPatterns( inPoints: list[Point2D], inPattern: list[Point2D], /, *, inPointLabels: list[int] | None = None, inPatternLabels: list[int] | None = None, inReferenceFrame: Rectangle2D | None = None, inAllowRotation: bool = True, inMinAngle: float = -180.0, inMaxAngle: float = 180.0, inAllowScale: bool = False, inMinScale: float = 0.8, inMaxScale: float = 1.25, inTilingFactor: float = 0.2, inMinInitialScore: float = 0.75, inMaxDeviation: float = 5.0, inMinScore: float = 0.75, inMinDistance: float = 10.0, inDisjointObjectsOnly: bool = False ) -> ( outObjects: list[Rectangle2D], outAlignedPatterns: list[ list[Point2D] ], outAlignments: list[CoordinateSystem2D], outPatternSkeletons: list[ list[Segment2D] ] )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inPoints | list[Point2D] | Input points | ||
![]() |
inPointLabels | list[int] | None | None | Categories that the input points belong to | |
![]() |
inPattern | list[Point2D] | Point pattern to be found | ||
![]() |
inPatternLabels | list[int] | None | None | Categories that the pattern points belong to | |
![]() |
inReferenceFrame | Rectangle2D | None | None | Exact position of the model object associated with the pattern in the image | |
![]() |
inAllowRotation | bool | True | Flag indicating whether rotation is allowed as a part of output alignment | |
![]() |
inMinAngle | float | -180.0 | Start of range of possible rotations | |
![]() |
inMaxAngle | float | 180.0 | End of range of possible rotations | |
![]() |
inAllowScale | bool | False | Flag indicating whether scale is allowed as a part of output alignment | |
![]() |
inMinScale | float | 0.0 - ![]() |
0.8 | Start of range of possible scales |
![]() |
inMaxScale | float | 0.0 - ![]() |
1.25 | End of range of possible scales |
![]() |
inTilingFactor | float | 0.000001 - 1.0 | 0.2 | Defines relative size of the square tile on the plane during initial detection |
![]() |
inMinInitialScore | float | 0.0 - 1.0 | 0.75 | The minimum proportion of points correctly matched during initial detection |
![]() |
inMaxDeviation | float | 0.0 - ![]() |
5.0 | Maximal distance between two points considered matched |
![]() |
inMinScore | float | 0.0 - 1.0 | 0.75 | The minimum proportion of points correctly matched |
![]() |
inMinDistance | float | 0.0 - ![]() |
10.0 | Minimal distance between centers of two found occurrences |
![]() |
inDisjointObjectsOnly | bool | False | Flag indicating whether found occurrences can have common points | |
![]() |
outObjects | list[Rectangle2D] | Bounding rectangles of the found pattern occurrences | ||
![]() |
outAlignedPatterns | list[ list[Point2D] ] | The aligned input pattern points | ||
![]() |
outAlignments | list[CoordinateSystem2D] | The transforms that align the input pattern to the input points | ||
![]() |
outPatternSkeletons | list[ list[Segment2D] ] | The skeletons of the aligned input pattern points |



