Picture black and white changed into green

Hi, i am a french student and i am doing some project on python.
The problem is that when i open a picture i took on internet, python put it in the plot in green.
echo1
image

Hi Lorenzo,

This is because the default colormap of imshow is the “viridis” colormap, can you try
plt.imshow(image0, cmap="gray")

You can find a nice tutorial about images in matplotlib here:
https://matplotlib.org/stable/tutorials/introductory/images.html#sphx-glr-tutorials-introductory-images-py

Hope this helps!

2 Likes