from PIL import Image
img = Image.open("image.jpg")
img.convert("L").save("result.jpg")
from PIL import Image
img = Image.open('image.png').convert('L')
img.save('greyscale.png')
from PIL import Image
Image.open("image.jpg").convert("L").save("result.jpg")
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)
from PIL import Image
img = Image.open("image.jpg")
img.convert("L").save("result.jpg")
from PIL import Image
img = Image.open('image.png').convert('L')
img.save('greyscale.png')
from PIL import Image
Image.open("image.jpg").convert("L").save("result.jpg")
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY)