File size: 143 Bytes
b334e29
 
 
 
 
1
2
3
4
5
6
from skimage import color

class GrayscaleConverter:
    def __call__(self, img):
        return (color.rgb2gray(img) * 255.0).astype('ubyte')