You are here: Start » AVL.NET » AVL.ThresholdToRegion_HSx(AvlNet.Image, AvlNet.Region, AvlNet.HSxColorModel, int, int, int?, int?, int?, int?, AvlNet.Region)
AVL.ThresholdToRegion_HSx(AvlNet.Image, AvlNet.Region, AvlNet.HSxColorModel, int, int, int?, int?, int?, int?, AvlNet.Region)
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void ThresholdToRegion_HSx( AvlNet.Image inRgbImage, AvlNet.Region inRoi, AvlNet.HSxColorModel inColorModel, int inBeginHue, int inEndHue, int? inMinSaturation, int? inMaxSaturation, int? inMinBrightness, int? inMaxBrightness, out AvlNet.Region outRegion )
Parameters
- inRgbImage
- Type: AvlNet.Image
- inRoi
- Type: AvlNet.Region
- inColorModel
- Type: AvlNet.HSxColorModel
- inBeginHue
- Type: System.Int32
- inEndHue
- Type: System.Int32
- inMinSaturation
- Type: System.Nullable<System.Int32>
- inMaxSaturation
- Type: System.Nullable<System.Int32>
- inMinBrightness
- Type: System.Nullable<System.Int32>
- inMaxBrightness
- Type: System.Nullable<System.Int32>
- outRegion
- Type: AvlNet.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
| Error type | Description |
|---|---|
| DomainError | Not a 3-channel and 8-bit image in ThresholdToRegion_HSx. |


