Digital History
Image Processing Leveling Up
By Mark Ciotola
First published on February 15, 2020. Last updated on June 13, 2024.
Leveling Up
- Learn some Python and use a Python image image analysis library package to manipulate 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
- Download and unzip this file: Image_Processing_Example_01
- Run the file and practice changing the parameters. (See comments in file.)
Troubleshooting:
- If the file says that PIL or Image are missing, download the library from here. (Note that PIL has been forked into Pillow. PIL (Pillow) installation can be challenging.
- Use Google to find additional sources of help for your operating system).
« Image Processing Activities | COURSE | Three Dimensional artifact modeling, preservation and reproduction »