Utilities¶
overlay_mask
¶
overlay_mask(img: Image, mask: Image, colormap: Colormap | str = 'jet', alpha: float = 0.7) -> Image
Overlay a colormapped mask on a background image.
Example
| PARAMETER | DESCRIPTION |
|---|---|
img
|
background image
TYPE:
|
mask
|
mask to be overlayed in grayscale
TYPE:
|
colormap
|
colormap to be applied on the mask |
alpha
|
transparency of the background image
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Image
|
overlayed image |
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
when the arguments have invalid types |
ValueError
|
when the alpha argument has an incorrect value |