imgcv.transformations.logarithmic
Functions
|
Check if the input is a numpy array |
|
Apply logarithmic transformation to the input image |
Module Contents
- imgcv.transformations.logarithmic.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.transformations.logarithmic.logarithmic_transform(image, c=1)
Apply logarithmic transformation to the input image
- Formula:
s = c * log(1 + r)
- Parameters:
image (ndarray) – Input image to be transformed
c (float) – Constant value to scale the logarithmic transformation
- Raises:
TypeError – If the input is not a numpy array
ValueError – If the input is not a grayscale or color image
- Returns:
Transformed image
- Return type:
np.ndarray