Convert boolean numpy array to pillow image
I'm currently working with image processing in python using the scikit-image library. I'm trying to make a binary image using sauvola thresholding with the following code: from PIL import Image import numpy from skimage.color import rgb2gray from skimage.filters import threshold_sauvola im = Image.open("test.jpg") pix = numpy.array(im) img = rgb2gray(pix) window_size = 25 thresh_sauvola = threshold_sauvola(img, window_size=window_size) binary_sauvola = img > thresh_sauvola Which gives the following result: the output is a numpy array with data type of this image is a bool [[ True True True ...