ThresholdToRegion_Dynamic


Thresholds an image relatively to the average pixel value in a local rectangular neighborhood.

Applications:Useful in case of uneven illumination.

Syntax

C++
C#
Python
 
def ThresholdToRegion_Dynamic(
	inImage: Image,
	outRegion: Region,
	/,
	*,
	inRoi: Region | None = None,
	inSourceRoi: Region | None = None,
	inRadiusX: int = 5,
	inRadiusY: int | None = None,
	inMinRelativeValue: float | None = 5.0,
	inMaxRelativeValue: float | None = None,
	inHysteresis: float = 0.0,
	diagBaseImage: Image | None = None
)
-> None

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inRoi Region | None None Region in which pixels are written
Input value inSourceRoi Region | None None Region from which pixels are read
Input value inRadiusX int 0 - 65535 5 Horizontal radius of internal mean blur
Input value inRadiusY int | None 0 - 65535 None Vertical radius of internal mean blur (Auto = inRadiusX)
Input value inMinRelativeValue float | None 5.0 Minimum relative value of a pixel that is considered foreground (Auto = -INF)
Input value inMaxRelativeValue float | None None Maximum relative value of a pixel that is considered foreground (Auto = +INF)
Input value inHysteresis float 0.0 - 0.0 Defines how much the threshold criteria are lowered for pixels neighboring with other foreground pixels
Output value outRegion Region Output region
Diagnostic input diagBaseImage Image | None None Diagnostic blurred image.