def enhance_contrast(rgb):
    """A preprocessing step that enhances the local contrast of each
    color channel"""
    s = rgb.shape
    d = disk(s[0] / 5)
    for i in range(3):
        rgb[:, :, i] = percentile_autolevel(rgb[:, :, i], d, p0=.1, p1=.9)
    return rgb
dataset/ETHPy150Open ChrisBeaumont/brut/bubbly/extractors.py/enhance_contrast/original