imgcv.quantization.to_binary
Functions
|
Check if the input is a numpy array |
|
Converts an image to binary image |
Module Contents
- imgcv.quantization.to_binary.check_image(image)
Check if the input is a numpy array
- Parameters:
image (np.ndarray) – Input image to be transformed
- Raises:
TypeError – If the input is not a numpy array
ValueError – If the input is not a grayscale or color image
- imgcv.quantization.to_binary.to_binary(im, threshold=127)
Converts an image to binary image
- Parameters:
im (np.ndarray) – Input image
threshold (int) – Threshold value
- Returns:
Binary image
- Return type:
np.ndarray