od2rgb¶
tiatoolbox
.utils
.transforms
.od2rgb
- od2rgb(od)[source]¶
Convert from optical density (\(OD_{RGB}\)) to RGB.
\[RGB = 255 * exp^{-1*OD_{RGB}}\]- Parameters:
od (
numpy.ndarray
) – Optical density (OD) RGB image.- Returns:
RGB Image.
- Return type:
Examples
>>> from tiatoolbox.utils import transforms, misc >>> rgb_img = misc.imread('path/to/image') >>> od_img = transforms.rgb2od(rgb_img) >>> rgb_img = transforms.od2rgb(od_img)