ScanExactlyNEdges


Locates a specified number of the strongest transitions between dark and bright pixels along a given path.

Applications:Very fast object detection (or presence verification) when the expected number of edges is clearly defined.

Syntax

C++
C#
Python
 
def ScanExactlyNEdges(
	inImage: Image,
	inScanMap: ScanMap,
	inEdgeScanParams: EdgeScanParams,
	inEdgeCount: int,
	inEdgeSelection: Selection,
	inMinDistance: float,
	/,
	*,
	inMaxDistance: float | None = None,
	inLocalBlindness: LocalBlindness | None = None,
	outBrightnessProfile: Profile | None = None,
	outResponseProfile: Profile | None = None
)
-> (
	outEdges: list[Edge1D] | None,
	outGaps: list[Gap1D] | None
)

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inScanMap ScanMap Data precomputed with CreateScanMap
Input value inEdgeScanParams EdgeScanParams Parameters controlling the edge extraction process
Input value inEdgeCount int 0 - Number of edges to be found
Input value inEdgeSelection Selection Selection mode of the resulting edges
Input value inMinDistance float 0.0 - Minimal distance between consecutive edges
Input value inMaxDistance float | None 0.0 - None Maximal distance between consecutive edges
Input value inLocalBlindness LocalBlindness | None None Defines conditions in which weaker edges can be detected in the vicinity of stronger edges
Output value outEdges list[Edge1D] | None Found edges
Output value outGaps list[Gap1D] | None Gaps between consecutive edges
Output value outBrightnessProfile Profile | None None Extracted image profile
Output value outResponseProfile Profile | None None Profile of the edge (derivative) operator response