text_plain_output_2.png text_plain_output_1.png image_output_1.png
from PIL import Image

from PIL import ImageOps

import matplotlib.pyplot as plt

import numpy as np

import numpy as np # linear algebra

from PIL import Image
image = Image.open('../input/pilimages/opera_house.jpg')

import matplotlib.pyplot as plt
import numpy as np
img_arr = np.asarray(image)

img = Image.fromarray(img_arr)

new_img = Image.open('./opera_house.png')

from PIL import ImageOps
gray_img = ImageOps.grayscale(new_img)
gray_img_arr = np.asarray(gray_img)
plt.imshow(gray_img_arr)