Level Up: Satellite Imagery
By Mark Ciotola
First published on February 15, 2020. Last updated on February 20, 2021.
- Students will run Python scripts to process their images.
Processing Images Using Python
You can process images by using the Python programming language. The Python Image Library (PIL) makes some analysis relatively easy. UPDATE: this workshop is will be moving towards the PILLOW package, since PIL is no longer supported.
- Make sure that you have a text editor on your computer. It should be able edit and save pure text. Applications such as MS Word are not very good at this. Applications such as Xcode or Textmate are suitable.
- Make sure you have a terminal application on your computer. It might be called Terminal or HyperTerminal. If not, install a terminal program for your computer.
- Make sure that you have Python 1.5.2 or newer installed on your computer. To check, open your terminal application and enter python –version
- If you need to get or upgrade Python, click here.
- Download, uncompress and move the file to your working directory: PIL_test.py
- Run that file in your terminal with the command python PIL_test.py
- If the file says that PIL or Image are missing, download the library from here. (PIL installation can be challenging. Use Google to find additional sources of help for your operating system).
- PIL documentation can be found here.
- Download and unzip this file: Image_Processing_Example_01
- Run the file and practice changing the parameters. (See comments in file.)