You are here: Start » FIL.NET » Function Reference » Image » Image Thresholding » FIL.ThresholdToRegion_HSx
Creates a region containing image pixels which belongs to specified region in HSV, HSL or HSI space.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void ThresholdToRegion_HSx ( FilNet.Image inRgbImage, NullableRef<FilNet.Region> inRoi, FilNet.HSxColorModel inColorModel, int inBeginHue, int inEndHue, int? inMinSaturation, int? inMaxSaturation, int? inMinBrightness, int? inMaxBrightness, FilNet.Region outRegion )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inRgbImage | FilNet.Image | |||
![]() | inRoi | FilNet.NullableRef<FilNet.Region> | Range of pixels to be processed. Default value: ftl::NIL. | ||
![]() | inColorModel | FilNet.HSxColorModel | Selected color model. | ||
![]() | inBeginHue | int | <0, 255> | 0 | Lowest acceptable Hue; if higher than inEndHue, then range wrapping is used. Default value: 0. |
![]() | inEndHue | int | <0, 255> | 255 | Highest acceptable Hue, if lower than inBeginHue, then range wrapping is used. Default value: 255. |
![]() | inMinSaturation | int? | <0, 255> | 128 | Default value: 128. |
![]() | inMaxSaturation | int? | <0, 255> | ||
![]() | inMinBrightness | int? | <0, 255> | 128 | Minimum brightness; denotes V, L or I, depending on inColorModel. Default value: 128. |
![]() | inMaxBrightness | int? | <0, 255> | Maximum brightness; denotes V, L or I, depending on inColorModel. Default value: ftl::NIL. | |
![]() | outRegion | FilNet.Region | Output region. |
Description
The operation is a cousin of ThresholdImage_HSx yet it computes a region instead of an image. The three-channel inRgbImage is considered to be encoded using RGB color representation. Each of the image pixel is internally converted to HSx (HSV, HSL or HSI) color representation and then examined. The resulting region contains only those pixels of the input image, which meets all of the following conditions:
- Value of the Hue parameter is in cyclic range (inBeginHue, inEndHue).
- Value of the Saturation parameter is in range (inMinSaturation, inMaxSaturation).
- Value of the Value parameter is in range (inMinBrightness, inMaxBrightness).
If any of the parameters inMinSaturation, inMinBrightness is not set, it is assumed to be -infinity.
If any of the parameters inMaxSaturation, inMaxBrightness is not set, it is assumed to be infinity.
Examples
![]() |
![]() |
ThresholdToRegion_HSx performed on the sample image with inColorModel = HSV, inBeginHue = 0.0, inEndHue = 10.0, inMinSaturation = 120.0, inMinBrightness = 70.0.
Hardware Acceleration
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 | Not a 3-channel and 8-bit image in ThresholdToRegion_HSx. |
DomainError | Region exceeds an input image in ThresholdToRegion_HSx. |
DomainError | Not supported inRgbImage pixel format in ThresholdToRegion_HSx. Supported formats: 3xUInt8. |
Function Overrides
- ThresholdToRegion_HSx(Image, HSxColorModel, Int32, Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Region)
- ThresholdToRegion_HSx(Image, NullableRef<Region>, HSxColorModel, Int32, Int32, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Nullable<Int32>, Region, Image)