ThresholdToRegion_Color


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

Applications:Color analysis with a given reference color.

Syntax

C++
C#
Python
 
def ThresholdToRegion_Color(
	inImage: Image,
	inHysteresis: float,
	outRegion: Region,
	/,
	*,
	inRoi: Region | None = None,
	inRgbColor: Pixel = Pixel(0, 0, 0, 0),
	inChromaAmount: float = 0.7,
	inMaxDifference: float = 5.0
)
-> None

Parameters

Name Type Range Default Description
Input value inImage Image Input image
Input value inRoi Region | None None Region of interest
Input value inRgbColor Pixel Pixel(0, 0, 0, 0) Color to compare the image to
Input value inChromaAmount float 0.0 - 1.0 0.7 Proportion of chromatic information in distance computation
Input value inMaxDifference float 0.0 - 5.0 Maximum difference between image pixel and model color
Input value inHysteresis float 0.0 - Defines how much the difference criterium is lowered for pixels neighboring with other foreground pixels
Output value outRegion Region Output region

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.