LocateSingleObject_Edges2
Finds a single occurrence of a predefined template on an image by comparing object edges.
Applications:Detection of an object whose outlines are sharp and rigid. Often one of the first filters in a program.
Syntax
C++
C#
Python
def LocateSingleObject_Edges2( inImage: Image, inEdgeModel: EdgeModel2, /, *, inSearchRegion: ShapeRegion | None = None, inSearchRegionAlignment: CoordinateSystem2D | None = None, inMinPyramidLevel: int = 0, inMaxPyramidLevel: int | None = 3, inEdgeThreshold: float = 10.0, inEdgePolarityMode: EdgePolarityMode = EdgePolarityMode.MatchStrictly, inEdgeNoiseLevel: EdgeNoiseLevel = EdgeNoiseLevel.High, inIgnoreBoundaryObjects: bool = False, inMaxDeformation: int = 0, inMinScore: float = 0.7, outAlignedSearchRegion: ShapeRegion | None = None ) -> ( outObject: Object2D | None, outObjectEdges: list[Path] | None, outPyramidHeight: int, diagEdgePyramid: list[Image], diagMatchPyramid: list[Image], diagScores: list[float] | None )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Image on which object occurrence will be searched | ||
![]() |
inSearchRegion | ShapeRegion | None | None | Region of possible object centers | |
![]() |
inSearchRegionAlignment | CoordinateSystem2D | None | None | Adjusts the region of interest to the position of the inspected object | |
![]() |
inEdgeModel | EdgeModel2 | Model of objects to be searched | ||
![]() |
inMinPyramidLevel | int | 0 - 12 | 0 | Defines the lowest pyramid level at which object position is still refined |
![]() |
inMaxPyramidLevel | int | None | 0 - 12 | 3 | Defines the total number of reduced resolution levels that can be used to speed up computations |
![]() |
inEdgeThreshold | float | 0.01 - ![]() |
10.0 | Minimum strength of edges used for matching with the model |
![]() |
inEdgePolarityMode | EdgePolarityMode | EdgePolarityMode.MatchStrictly | Defines how edges with reversed polarity will contribute to the object score | |
![]() |
inEdgeNoiseLevel | EdgeNoiseLevel | EdgeNoiseLevel.High | Defines how much noise the object edges have | |
![]() |
inIgnoreBoundaryObjects | bool | False | Flag indicating whether objects crossing image boundary should be ignored or not | |
![]() |
inMaxDeformation | int | 0 - ![]() |
0 | Maximal distance in pixels between model edge and an edge visible in the input image |
![]() |
inMinScore | float | 0.0 - 1.0 | 0.7 | Minimum score of object candidates accepted at each pyramid level |
![]() |
outObject | Object2D | None | Found object | ||
![]() |
outObjectEdges | list[Path] | None | Model edges of the found object | ||
![]() |
outPyramidHeight | int | Highest pyramid level used to speed up computations | ||
![]() |
outAlignedSearchRegion | ShapeRegion | None | None | Transformed input shape region | |
![]() |
diagEdgePyramid | list[Image] | Image edges used for matching at each pyramid level | ||
![]() |
diagMatchPyramid | list[Image] | Candidate object locations found at each pyramid level | ||
![]() |
diagScores | list[float] | None | Scores of the found object at each pyramid level |
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.




