segmentation_functions.py
def convert_to_optical_densities(img_RGB, r0=255, g0=255, b0=255):
    """Conver RGB image to optical densities with same shape as input image."""
    OD = img_RGB.astype(float)
    OD[:,:,0] /= r0
    OD[:,:,1] /= g0
    OD[:,:,2] /= b0
    return -np.log(OD+0.00001)
Conver RGB image to optical densities with same shape as input image.
Conver RGB image to optical densities with same shape as input image.
Conver RGB image to optical densities with same shape as input image .
def convert_to_optical_densities(img_RGB, r0=255, g0=255, b0=255):
    OD = img_RGB.astype(float)
    OD[:,:,0] /= r0
    OD[:,:,1] /= g0
    OD[:,:,2] /= b0
    return -np.log(OD+0.00001)
def convert_to_optical_densities ( img_RGB , r0 = 255 , g0 = 255 , b0 = 255 ) : OD = img_RGB . astype ( float ) OD [ : , : , 0 ] /= r0 OD [ : , : , 1 ] /= g0 OD [ : , : , 2 ] /= b0 return - np . log ( OD + 0.00001 )
Conver RGB image to optical densities with same shape as input image.
Conver RGB image to optical densities with same shape as input image .
"""Conver RGB image to optical densities with same shape as input image."""
img_RGB
r0
g0
b0