ThresholdImage_Color


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

Applications:Color analysis with a given reference color.

Syntax

C++
C#
Python
 
def ThresholdImage_Color(
	inImage: Image,
	outMonoImage: Image,
	/,
	*,
	inRoi: Region | None = None,
	inRgbColor: Pixel = Pixel(0, 0, 0, 0),
	inChromaAmount: float = 0.7,
	inMaxDifference: float = 5.0,
	inFuzziness: float = 0.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 inFuzziness float 0.0 - 0.0 A tolerance for computed difference that results in intermediate output values
Output value outMonoImage Image

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.