utils/correction
module¶
correction
¶
Functions¶
preprocessing_compute
¶
Preprocess the input image for computation by reshaping and converting datatype.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_image
|
np.ndarray
|
Input image array that can be either a grid (24, 3) or a general image. |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
Processed image data as a float32 numpy array. |
Source code in color_correction/utils/correction.py
postprocessing_compute
¶
Convert predicted image data back into its original shape and type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
original_shape
|
tuple
|
The original dimensions of the image. Should be 2 or (H, W, C). |
required |
predict_image
|
np.ndarray
|
The processed image data to be reshaped and clipped. |
required |
Returns:
Type | Description |
---|---|
np.ndarray
|
The final corrected image, reshaped to original dimensions and in uint8 format. |