LocateSinglePointPattern
Finds an occurrence of the pattern in the input points.
Applications:Can be used to find an entire object after finding its characteristic points with tools such as Template Matching or DL_LocatePoints.
Syntax
C++
C#
Python
def LocateSinglePointPattern( 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 ) -> ( outObject: Rectangle2D | None, outAlignedPattern: list[Point2D] | None, outAlignment: CoordinateSystem2D | None, outPatternSkeleton: list[Segment2D] | None )
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 |
![]() |
outObject | Rectangle2D | None | Bounding rectangle of the found pattern occurrence | ||
![]() |
outAlignedPattern | list[Point2D] | None | The aligned input pattern points | ||
![]() |
outAlignment | CoordinateSystem2D | None | The transform that align the input pattern to the input points | ||
![]() |
outPatternSkeleton | list[Segment2D] | None | The skeleton of the aligned input pattern points |



