Digital History

Image Processing Leveling Up

By

First published on February 15, 2020. Last updated on February 20, 2021.


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.

  1. 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.
  2. 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.
  3. 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
  4. If you need to get or upgrade Python, click here.
  5. Download, uncompress and move the file to your working directory: PIL_test.py
  6. Run that file in your terminal with the command python PIL_test.py
  7. Download and unzip this file: Image_Processing_Example_01
  8. Run the file and practice changing the parameters. (See comments in file.)

[Hide]

Steps with Broken links (7&8)

  1. 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).
  2. PIL documentation can be found here.

[/hide]


COURSE


Content is copyright the author. Layout is copyright Mark Ciotola. See Corsbook.com for further notices.