imgcv.transformations.gamma
Functions
|
Check if the input is a numpy array |
|
Applies gamma correction to the image. |
Module Contents
- imgcv.transformations.gamma.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.gamma.gamma_correction(image, gamma=1.0, c=1)
Applies gamma correction to the image.
- Formula:
gamma_correction = c * (image ** gamma)
- Parameters:
image (np.ndarray) – Image to be transformed.
gamma (float, optional) – Power value . Defaults to 1.0.
c (int, optional) – Constant value. Defaults to 1.
- Returns:
Transformed image.
- Return type:
np.ndarray