image_output_2.png image_output_1.png
from skimage import color

import imageio

import matplotlib.pyplot as plt

images = ['peppers.png', 'cameraman.tif', 'coins.png']
path = '/kaggle/input/lab-python/Immagini/'
I = imageio.imread(path + images[0])
if len(I.shape) == 3:
    I = color.rgb2gray(I)
plt.figure()
(plt.subplot(1, 2, 1), plt.imshow(I), plt.title('original image'))
(plt.subplot(1, 2, 2), plt.imshow(I, cmap='gray'), plt.title('gray version'))