<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Image processing starter kit
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
Step1:  Flip
Step2:  Blur
Step3:  Denoise
Step4:  Generic filter
Step5:  Blur refactored
Step6:  Denoise refactored
Step7:  Edges
Step8:  Sharpen
<ASSISTANT_TASK:>
Python Code:
from PIL import Image
img = Image.open('eye.png')
img = img.convert("L") # grayscale
img   # same as display(img)
Explanation: Image processing starter kit
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).
View
End of explanation
# define function flip()
# open 'eye.png', convert to grayscale, flip, and display
Explanation: Flip
End of explanation
# define getpixel, region3x3, avg, and blur functions
img = Image.open('pcb.png')
img = img.convert("L") # make greyscale if not already (luminance)
img
img = blur(img)
img
Explanation: Blur
End of explanation
# define median and denoise functions
img = Image.open('Veggies_noise.jpg')
img = img.convert("L") # make greyscale if not already (luminance)
# denoise 3 times and display
# show 'guesswho.png'
# denoise 3 times then display 
Explanation: Denoise
End of explanation
# define filterAnd open functions
Explanation: Generic filter
End of explanation
# Display 'pcb.png'
img
# use filter to blur the image
Explanation: Blur refactored
End of explanation
img = open('guesswho.png')
img
# using filter function, denoise the image
Explanation: Denoise refactored
End of explanation
# define laplace function
# Open 'obama.png' and show the edges
# Show the edges for 'phobos2.jpg
Explanation: Edges
End of explanation
# define minus function
# display 'bonkers.png'
# sharpen that image and display it
Explanation: Sharpen
End of explanation
<END_TASK>