from skimage.color import rgb2gray def as_gray(image): return rgb2gray(image)