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 | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Input image | ||
![]() |
inRoi | Region | None | None | Region of interest | |
![]() |
inBaseImage | Image | Pixels of this image are subtracted from inImage before thresholding | ||
![]() |
inDarkThreshold | float | Maximum relative value of a pixel that is considered DarkRegion | ||
![]() |
inBrightThreshold | float | Minimum relative value of a pixel that is considered BrightRegion | ||
![]() |
inHysteresis | float | 0.0 - ![]() |
0.0 | Defines how much the threshold criteria are lowered for pixels neighboring with other foreground pixels |
![]() |
outDarkRegion | Region | Region of pixels equal or lower than inDarkThreshold | ||
![]() |
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.



