SegmentImage_Edges


Segments an image into blobs using image edges as their borders.

Applications:Detection of objects of undefined shape, but characterized by good contrast to the background and fairly uniform internal brightness.

Syntax

C++
C#
Python
 
def SegmentImage_Edges(
	inImage: Image,
	inFrameSize: int,
	inComputeNestingLevels: bool,
	inEdgeClosing: int,
	/,
	*,
	inRoi: Region | None = None,
	inStdDev: float = 2.0,
	inEdgeThreshold: float = 15.0,
	inEdgeHysteresis: float = 5.0,
	inMaxJoiningDistance: float = 0.0,
	inMinArea: int = 50,
	inMaxArea: int | None = None,
	diagEdgeRegion: Region | None = None
)
-> (
	outBlobs: list[Region],
	outNestingLevels: list[int]
)

Parameters

Name Type Range Default Description
Input value inImage Image Image from which blobs are extracted
Input value inRoi Region | None None Range of pixels to be processed
Input value inFrameSize int 0 - How many pixels from the region border are excluded from the results
Input value inStdDev float 0.0 - 2.0 Amount of smoothing used by the edge filter
Input value inEdgeThreshold float 0.0 - 15.0 Sufficient edge strength; edges of that strength will always be detected
Input value inEdgeHysteresis float 0.0 - 5.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 inMinArea int 0 - 50 Minimal area of a detected blob
Input value inMaxArea int | None 0 - None Maximal area of a detected blob
Input value inComputeNestingLevels bool Flag indicating whether nesting levels should be computed
Input value inEdgeClosing int 0 - Radius of enclosing small holes in the detected blobs
Output value outBlobs list[Region] Blobs extracted from the input image
Output value outNestingLevels list[int] Nesting level of each extracted blob
Diagnostic input diagEdgeRegion Region | None None Region of the found edges