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
Input value inPoints list[Point2D] Input points
Input value inPointLabels list[int] | None None Categories that the input points belong to
Input value inPattern list[Point2D] Point pattern to be found
Input value inPatternLabels list[int] | None None Categories that the pattern points belong to
Input value inReferenceFrame Rectangle2D | None None Exact position of the model object associated with the pattern in the image
Input value inAllowRotation bool True Flag indicating whether rotation is allowed as a part of output alignment
Input value inMinAngle float -180.0 Start of range of possible rotations
Input value inMaxAngle float 180.0 End of range of possible rotations
Input value inAllowScale bool False Flag indicating whether scale is allowed as a part of output alignment
Input value inMinScale float 0.0 - 0.8 Start of range of possible scales
Input value inMaxScale float 0.0 - 1.25 End of range of possible scales
Input value inTilingFactor float 0.000001 - 1.0 0.2 Defines relative size of the square tile on the plane during initial detection
Input value inMinInitialScore float 0.0 - 1.0 0.75 The minimum proportion of points correctly matched during initial detection
Input value inMaxDeviation float 0.0 - 5.0 Maximal distance between two points considered matched
Input value inMinScore float 0.0 - 1.0 0.75 The minimum proportion of points correctly matched
Input value inMinDistance float 0.0 - 10.0 Minimal distance between centers of two found occurrences
Input value inDisjointObjectsOnly bool False Flag indicating whether found occurrences can have common points
Output value outObjects list[Rectangle2D] Bounding rectangles of the found pattern occurrences
Output value outAlignedPatterns list[ list[Point2D] ] The aligned input pattern points
Output value outAlignments list[CoordinateSystem2D] The transforms that align the input pattern to the input points
Output value outPatternSkeletons list[ list[Segment2D] ] The skeletons of the aligned input pattern points