mapchete_eo.image_operations.linear_normalization
- mapchete_eo.image_operations.linear_normalization(bands: ~numpy.ma.MaskedArray, bands_minmax_values: ~typing.Tuple[~typing.Tuple[int, int], ~typing.Tuple[int, int], ~typing.Tuple[int, int]] = ((5, 3350), (0, 3150), (0, 3200)), out_dtype: ~numpy._typing.DTypeLike = <class 'numpy.uint8'>, out_min: int | None = None) MaskedArray[source]
Scale and normalize bands to individual minimum and maximum values.
From eox_preprocessing.image_utils
See: https://en.wikipedia.org/wiki/Normalization_(image_processing)
- Parameters:
bands (np.ndarray) – Input bands as a 3D array.
bands_minmax_values (list of lists) – Individual minimum and maximum values for each band. Must have the same length as number of bands.
out_min (float or int) – Override dtype minimum. Useful when nodata value is equal to dtype minimum (e.g. 0 at uint8). In that case out_min can be set to 1.
- Returns:
scaled bands
- Return type:
ma.MaskedArray