Back to Aurora Vision Studio website

You are here: Start » Filter Reference » Image » Image Thresholding » ThresholdToRegion_Color

ThresholdToRegion_Color


Module: FoundationPro

Creates a region containing image pixels with values close to the given color.

Applications

Color analysis with a given reference color.
Name Type Range Description
Input value inImage Image Input image
Input value inRoi Region* Region of interest
Input value inRgbColor Pixel Color to compare the image to
Input value inChromaAmount Real 0.0 - 1.0 Proportion of chromatic information in distance computation
Input value inMaxDifference Real 0.0 - Maximum difference between image pixel and model color
Input value inHysteresis Real 0.0 - Defines how much the difference criterium is lowered for pixels neighboring with other foreground pixels
Output value outRegion Region Output region

Requirements

For input inImage only pixel formats are supported: 1⨯uint8, 2⨯uint8, 3⨯uint8, 4⨯uint8.

Read more about pixel formats in Image documentation.

Hints

  • Define the reference color by setting the inRgbColor input. You can use the Color Picker tool on an image preview and then copy-and-paste the value.
  • Increase inChromaAmount to make the filter less sensitive to changes in brightness. Decrease it to make brightness more important.
  • Set inMaxDifference experimentally to a value that best separates the foreground and background pixels.

Examples

Description of usage of this filter can be found in examples and tutorial: Rubber Ring.

ThresholdToRegion_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, 3xUINT8.

This operation is optimized for NEON technology for pixels of types: 1xUINT8, 3xUINT8.

This operation supports automatic parallelization for multicore and multiprocessor systems.

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Region exceeds an input image in ThresholdToRegion_Color.
DomainError Not supported inImage pixel format in ThresholdToRegion_Color. Supported formats: 1xUInt8, 2xUInt8, 3xUInt8, 4xUInt8.

Complexity Level

This filter is available on Basic Complexity Level.

Filter Group

This filter is member of ThresholdToRegion filter group.

See Also

  • ColorDistanceImage – Compares each pixel with the specified color using chromatic and non-chromatic information.