ThresholdImage


Transforms each pixel value to maximum or minimum depending on whether they belong to the specified range.

Applications:Image binarization when the illumination is constant and uniform.

Syntax

C++
Python
 
def ThresholdImage(
	inImage: Image,
	outMonoImage: Image,
	/,
	*,
	inRoi: Region | None = None,
	inMinValue: float | None = 128.0,
	inMaxValue: float | None = None,
	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 inMinValue float | None 128.0 Minimum value of a pixel that is considered foreground (Auto = -INF)
Input value inMaxValue float | None None Maximum value of a pixel that is considered foreground (Auto = +INF)
Input value inFuzziness float 0.0 - 0.0 A tolerance for inMin/MaxValue 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 AVX2 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.