You are here: Start » FIL.NET » Function Reference » Image » Image Thresholding » FIL.ThresholdToRegion
Creates a region containing image pixels with values within the specified range.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void ThresholdToRegion ( FilNet.Image inImage, float? inMinValue, float? inMaxValue, float inHysteresis, FilNet.Region outRegion )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | inMinValue | float? | 128.0f | Minimum value of a pixel that is considered foreground (Auto = -INF). Default value: 128.0f. | |
![]() | inMaxValue | float? | Maximum value of a pixel that is considered foreground (Auto = +INF). Default value: ftl::NIL. | ||
![]() | inHysteresis | float | <0.0f, INF> | 0.0f | Defines how much the threshold criteria are lowered for pixels neighboring with other foreground pixels. Default value: 0.0f. |
![]() | outRegion | FilNet.Region | Output region. |
Description
The operation is a cousin of ThresholdImage yet computes a region instead of an image. The resulting region contains those pixels of the input image that meet one of the following conditions:
- Pixel value is in range [inMinValue, inMaxValue].
- Pixel value is in range [inMinValue-inHysteresis, inMinValue) or in range (inMaxValue, inMaxValue+inHysteresis] and in the processed image there is a path of consecutive pixels of value in range [inMinValue-inHysteresis, inMaxValue+inHysteresis] that connects the pixel being considered and any pixel with value in range [inMinValue, inMaxValue].
If any of the parameters inMinValue, inMaxValue is not set, it is assumed to be, accordingly, -infinity or infinity.
In the multichannel images the operation uses an average of channel values in each pixel.
Examples
![]() |
![]() |
ThresholdToRegion performed on the sample image with inMinValue = 80.0, inMaxValue = auto.
Hardware Acceleration
This operation is optimized for SSE2 technology for pixels of types: 1xUINT8, 3xUINT8, 1xINT16, 1xUINT16.
This operation is optimized for NEON technology for pixels of types: 1xUINT8, 3xUINT8, 1xINT16.
This operation supports automatic parallelization for multicore and multiprocessor systems.
Hardware acceleration settings may be manipulated with Settings class.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Region exceeds an input image in ThresholdToRegion. |