ThresholdToRegion_Relative_DarkBright


Thresholds an image using two relative thresholds and produces two regions (Dark and Bright) in a single image pass.

Applications:This filter can replace two instances of ThresholdToRegion_Relative which may slightly improve performance.

Syntax

C++
C#
Python
 
def ThresholdToRegion_Relative_DarkBright(
	inImage: Image,
	inBaseImage: Image,
	inDarkThreshold: float,
	inBrightThreshold: float,
	outDarkRegion: Region,
	outBrightRegion: Region,
	/,
	*,
	inRoi: Region | None = None,
	inHysteresis: float = 0.0
)
-> None

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inRoi Region | None None Region of interest
Input value inBaseImage Image Pixels of this image are subtracted from inImage before thresholding
Input value inDarkThreshold float Maximum relative value of a pixel that is considered DarkRegion
Input value inBrightThreshold float Minimum relative value of a pixel that is considered BrightRegion
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 outDarkRegion Region Region of pixels equal or lower than inDarkThreshold
Output value outBrightRegion Region Region of pixels equal or greater than inBrightThreshold

Hardware Acceleration

This operation is optimized for SSE2 technology for pixels of types: 1xUINT8, 3xUINT8.

This operation is optimized for NEON technology for pixels of types: 1xUINT8, 3xUINT8.

This operation supports automatic parallelization for multicore and multiprocessor systems.