od2rgb

od2rgb(od)[source]

Convert from optical density (OD_RGB) to RGB. RGB = 255 * exp(-1*OD_RGB)

Parameters

od (numpy.ndarray) – Optical denisty RGB image

Returns

Image RGB

Return type

numpy.ndarray

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)