img_to_rgb#
- scarlet2.plot.img_to_rgb(img, channel_map=None, norm=None, mask=None)[source]#
Convert images to normalized RGB.
If normalized values are outside of the range [0..255], they will be truncated such as to preserve the corresponding color.
- Parameters:
img (
array) – This should be an array with dimensions (channels, height, width).channel_map (
array) – Linear mapping from channels to RGB, dimensions (3, channels)norm (
Norm, optional) – Norm to use for mapping in the allowed range [0..255]. If norm=None, scarlet.display.LinearPercentileNorm will be used.mask (
array_like, optional) – A [0,1] binary mask set define where pixels will have 0 opacity.
- Returns:
Dimensions (3, height, width), type float
- Return type:
array