Python Reading
Key Ideas
- Basic image manipulation with SciPy. (You may need to install the
pillow package.)
- Images are NumPy arrays and can be easily manipulated
via slicing, etc..
- Supports interesting operations like changing contrast,
changing brightness, cropping, making the image black and white, etc.
Installing pillow
- Mac: pip3 install --user pillow
- Windows: Download pillow
and install from the command prompt.
In-Class Activity
- Find a .png picture that you would like to edit.
- Try some of the image manipulations described in the tutorial.
Active Learning
- Modify your selected image in a few ways that you choose.
- Plot the resulting image.
- Save the image to a new file.
- Your next assignment will be to make a simple menu-driven
image editor that can read, modify and save image files.
(Start thinking about other operations you want to support.)