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