Skip to main content

black_threshold_image

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

Apply thresholding with a bias in favor of black 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.