Skip to content

Instantly share code, notes, and snippets.

@THEFASHIONGEEK
Created March 26, 2020 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save THEFASHIONGEEK/c5863e5a749ebe6774518bc443730a1c to your computer and use it in GitHub Desktop.
Save THEFASHIONGEEK/c5863e5a749ebe6774518bc443730a1c to your computer and use it in GitHub Desktop.
import numpy as np
from PIL import Image, ImageFilter
from matplotlib import pyplot as plt
img = Image.open("imgs/chapter5/outdoor.jpg")
#######################FOCUS##################
sharpened = img.filter(ImageFilter.SHARPEN)
##############################################
f = plt.figure(figsize=(15,15))
f.add_subplot(2, 1, 1).set_title('Original Image')
plt.imshow(img)
f.add_subplot(2, 1, 2).set_title('Sharpened Image')
plt.imshow(sharpened);
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment