od2rgb

od2rgb(od)[source]

Convert from optical density (OD_RGB) to RGB.

::math::

RGB = 255 * exp(-1*OD_RGB)

Parameters

od (numpy.ndarray) – Optical density (OD) RGB image.

Returns

RGB Image.

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)