Reading Punchcards

Using Simple Image-Processing Techniques to Interpret Punchcard Images


Until the mid-70s most computer data and programs were stored on punched paper cards. These fed into machines which read the data mechanically into the computer. A common card format was the IBM 029 Punched Card, which held 80 columns of text. Other kinds of punched cards have been used as ballots in elections (famously in Florida with "hanging chads").

Example of a punchcard

This video explains the process of preparing punchcards for computer work in the 60s and 70s.

Further Information

To learn more about punchcards, please see the Columbia Computing History Project website


The goal of this CASES project is to demonstrate some simple image processing techniques that can be used to extract data from a known legacy format. In the data preparation notebook we will explore how to detect the edges of a document and crop, how to normalize for white or black backgrounds, and how to flip and/or rotate an image to achieve a known orientation. Then we will apply some pre-existing Python code to these normalized images in order to read the data on them.

Learning Goals

Software and Tools


These notebooks use a requirements.txt file to install the punchcards module and it's dependencies in your JupyterLab kernel.

Punchcard Images

This notebook project contains a small sample of punchcard images obtained from the United States' National Archives and Records Administration. You can find these in the cards subfolder.

In [ ]: