linumpy.imaging.transform#
Image transform helpers (normalization, padding, XY shifts).
Functions#
|
Normalize an image between 0 and 1. |
|
Match the shape of two images by padding the smallest one. |
|
Apply a shift to the image in the xy plane. |
Module Contents#
- linumpy.imaging.transform.normalize(img, saturation=99.7)[source]#
Normalize an image between 0 and 1.
- Parameters:
img (np.ndarray) – The image to normalize.
saturation (float, optional) – The saturation value for the normalization
- Returns:
The normalized image.
- Return type:
np.ndarray
- linumpy.imaging.transform.match_shape(img1, img2)[source]#
Match the shape of two images by padding the smallest one.
- Parameters:
img1 (np.ndarray) – The first image.
img2 (np.ndarray) – The second image.
- Returns:
The two images with the same shape.
- Return type:
Tuple[np.ndarray, np.ndarray]