MinMaxTransformer#

class MinMaxTransformer[source]#

Bases: RasterTransformer

Transforms chips by scaling values in each channel to span 0-255.

__init__()#

Methods

__init__()

get_out_channels(in_channels)

Number of channels in output of transform().

get_out_dtype(in_dtype)

dtype of the output of transform().

transform(chip)

Transform a chip of a raster source.

get_out_channels(in_channels: int) int#

Number of channels in output of transform().

Parameters:

in_channels (int) –

Return type:

int

get_out_dtype(in_dtype: dtype) dtype[source]#

dtype of the output of transform().

Parameters:

in_dtype (dtype) –

Return type:

dtype

transform(chip: ndarray) ndarray[source]#

Transform a chip of a raster source.

Parameters:

chip (ndarray) – Array of shape (…, H, W, C).

Returns:

Array of shape (…, H, W, C)

Return type:

ndarray