You are here: Start » AVL.NET » AVL.ThresholdImage_HSx(AvlNet.Image, AvlNet.Region, AvlNet.HSxColorModel, int, int, int?, int?, int?, int?, float, AvlNet.Image)

AVL.ThresholdImage_HSx(AvlNet.Image, AvlNet.Region, AvlNet.HSxColorModel, int, int, int?, int?, int?, int?, float, AvlNet.Image)

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void ThresholdImage_HSx(
	AvlNet.Image inRgbImage,
	AvlNet.Region inRoi,
	AvlNet.HSxColorModel inColorModel,
	int inBeginHue,
	int inEndHue,
	int? inMinSaturation,
	int? inMaxSaturation,
	int? inMinBrightness,
	int? inMaxBrightness,
	float inFuzziness,
	out AvlNet.Image outMonoImage
)

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>
inFuzziness
Type: System.Single
outMonoImage
Type: AvlNet.Image

Description

The operation transforms each pixel of three-channel inRgbImage to the maximum or minimum level thus creating binary image. The input image 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.

  • Pixels meeting all of the following conditions are transformed to the maximum level:
    • Value of the Hue parameter is in cyclic range (inBeginHue, inEndHue).
    • Value of the Saturation parameter is in range (inMinSaturation, inMaxSaturation).
    • Value of the Brightness parameter is in range (inMinBrightness, inMaxBrightness).
  • Other pixels are transformed to the minimum level.

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.

Parameter inFuzziness (set to 0 by default) allows to perform fuzzy thresholding which linearly interpolates those pixel values that differ by at most inFuzziness from the border parameter values; thus creating smooth transition between minimum and maximum values in the resulting image.

Examples

ThresholdImage_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.

See also