Hello,
maybe this question looks stupid, but I try to use Pillows Image.convert()
to convert an image to grayscale. This image I have store
You can use
img = Image.fromarray(img)
to convert to a PIL Image type. From there, you should be able to use PIL's convert()
function
img = img.convert('LA')
then, to access the pixel values directly you can either convert back to a numpy array
img_array = np.asarray(img)
or get pixel access to the PIL Image using
pixels = img.load()