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)

Creates a region containing image pixels which belongs to specified region in HSV, HSL or HSI space.

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
Range of pixels to be processed, or null.
inColorModel
Type: AvlNet.HSxColorModel
Selected color model
inBeginHue
Type: System.Int32
Lowest acceptable Hue; if higher than inEndHue, then range wrapping is used
inEndHue
Type: System.Int32
Highest acceptable Hue, if lower than inBeginHue, then range wrapping is used
inMinSaturation
Type: System.Nullable<System.Int32>
inMaxSaturation
Type: System.Nullable<System.Int32>
inMinBrightness
Type: System.Nullable<System.Int32>
Minimum brightness; denotes V, L or I, depending on inColorModel, or null.
inMaxBrightness
Type: System.Nullable<System.Int32>
Maximum brightness; denotes V, L or I, depending on inColorModel, or null.
outRegion
Type: AvlNet.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

Error type Description
DomainError Not a 3-channel and 8-bit image in ThresholdToRegion_HSx.

See also