There are a number of images we will use in this project so please download and unzip them. Make sure that you save the zip file in the repository for the class. The files are called: phobos2.jpg, obama.png, Veggies_noise.jpg, eye.png, guesswho.png, pcb.png, bonkers.png. Make sure the files are in the same repo directory as your images.ipynb file (a copy of this notebook renamed).
In [5]:
from PIL import Image
img = Image.open('eye.png')
img = img.convert("L") # grayscale
img # same as display(img)
Out[5]:
In [ ]:
# define function flip()
# open 'eye.png', convert to grayscale, flip, and display
In [ ]:
# define getpixel, region3x3, avg, and blur functions
img = Image.open('pcb.png')
img = img.convert("L") # make greyscale if not already (luminance)
img
In [ ]:
img = blur(img)
img
In [ ]:
# define median and denoise functions
In [ ]:
img = Image.open('Veggies_noise.jpg')
img = img.convert("L") # make greyscale if not already (luminance)
In [ ]:
# denoise 3 times and display
In [ ]:
# show 'guesswho.png'
In [ ]:
# denoise 3 times then display
In [ ]:
# define filterAnd open functions
In [ ]:
# Display 'pcb.png'
img
In [ ]:
# use filter to blur the image
In [ ]:
img = open('guesswho.png')
img
In [ ]:
# using filter function, denoise the image
In [ ]:
# define laplace function
# Open 'obama.png' and show the edges
In [ ]:
# Show the edges for 'phobos2.jpg
In [ ]:
# define minus function
In [ ]:
# display 'bonkers.png'
In [ ]:
# sharpen that image and display it