DetectEdges_AsRegion_Mask


Extracts a pixel-precise region of continuous edges. Faster, yet less accurate version.

Applications:Consistent detection of pixels that belong to contours of variable or unpredictable shape, e.g. screw thread outline or a custom piece of textile.

Syntax

C++
C#
Python
 
def DetectEdges_AsRegion_Mask(
	inImage: Image,
	outEdgeRegion: Region,
	/,
	*,
	inRoi: Region | None = None,
	inEdgeMaskFilter: EdgeMaskFilter = EdgeMaskFilter.Sobel,
	inEdgeThreshold: float = 35.0,
	inEdgeHysteresis: float = 15.0,
	inMaxJoiningDistance: float = 0.0,
	inMinBlobArea: int = 1,
	diagGradientMagnitudeImage: Image | None = None
)
-> None

Parameters

Name Type Range Default Description
Input value inImage Image Image from which edges will be extracted
Input value inRoi Region | None None Region of the image from which edges will be extracted
Input value inEdgeMaskFilter EdgeMaskFilter EdgeMaskFilter.Sobel Type of edge filter used for computing gradients
Input value inEdgeThreshold float 0.0 - 35.0 Sufficient edge strength; edges of that strength will always be detected
Input value inEdgeHysteresis float 0.0 - 15.0 Value by which the edge threshold is decreased for edge points neighboring with sufficiently strong edges
Input value inMaxJoiningDistance float 0.0 - 0.0 Maximal distance between edges that can be joined
Input value inMinBlobArea int 0 - 1 Minimal area of an edge blob
Output value outEdgeRegion Region Region of the found edges
Diagnostic input diagGradientMagnitudeImage Image | None None Visualization of the gradient magnitude

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.