Lab 8: Image Manipulation with Python
This week, we will learn how to modify images using Python
By the end of this lab, you should have:
- Removed the red part of a picture
- 'Inverted' a picture to obtain a negative
- Brightened or darkened a picture.
Lab Tasks:
- Review: Work on the tasks announced in lab, to remind yourselves of assignment statements, functions
and lists
- Download the image of a carpet seller and python
code that makes a copy
- Look at the python code, and see if you can understand how it works.
- Modify the code to produce a negative of the image, by writing a function invert, which converts
any pixel into its negative.
- Write a program that removes the red (then the green, then the blue) component of the image.
- Write a program that brightens an image by increasing the intensity of each component (red, green and
blue) of each pixel.