Skip to main content

threshold_image

Signature
def threshold_image(
image: npt.NDArray[np.uint8],
num_thresholds: int,
) -> npt.NDArray[np.uint8]

Apply thresholding to the image.

Parameters

NameTypeDescription
imagenumpy.ndarrayInput image as a uint8 numpy array.
num_thresholdsintNumber of threshold levels to apply.

Returns

TypeDescription
numpy.ndarrayThresholded image as a uint8 numpy array.