You are here: Start » AVL.NET » Function Reference » Image » Image Thresholding » AVL.ThresholdImage_Color

AVL.ThresholdImage_Color

Transforms each pixel value to maximum or minimum depending on the distance from a given color.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void ThresholdImage_Color
(
	AvlNet.Image inImage,
	AvlNet.Pixel inRgbColor,
	float inChromaAmount,
	float inMaxDifference,
	float inFuzziness,
	AvlNet.Image outMonoImage
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageInput image.
inRgbColorAvlNet.PixelColor to compare the image to.
inChromaAmountfloat<0.0f, 1.0f>0.7fProportion of chromatic information in distance computation. Default value: 0.7f.
inMaxDifferencefloat<0.0f, INF>5.0fMaximum difference between image pixel and model color. Default value: 5.0f.
inFuzzinessfloat<0.0f, INF>0.0fA tolerance for computed difference that results in intermediate output values. Default value: 0.0f.
outMonoImageAvlNet.Image

Examples

ThresholdImage_Color performed on a sample image with inRgbColor = (192, 34, 22), inChromaAmount = 1.0, inMaxDifference = 48.

Hardware Acceleration

This operation is optimized for SSE2 technology for pixels of types: 1xUINT8 (for inFuzziness = 0), 3xUINT8 (for inFuzziness = 0).

This operation is optimized for NEON technology for pixels of types: 1xUINT8 (for inFuzziness = 0), 3xUINT8 (for inFuzziness = 0).

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 ThresholdImage_Color.
DomainError Not supported inImage pixel format in ThresholdImage_Color. Supported formats: 1xUInt8, 2xUInt8, 3xUInt8, 4xUInt8.

Function Overrides

See also