Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

imageprocessing

Joshua Stough, 202- (last update Spring 2026)

Read it online: profstough.github.io/imageprocessing-awesome. To run and change the notebooks, set up a local copy as described below.

Imaging is everywhere! In this text, we will cover broadly the acquisition, processing, and analysis of digital images, covering topics ranging from the human visual system, to image and video compression algorithms, to pattern recognition and machine learning within the context of automatic image understanding. Best of all, for the sake of access, immediacy, and usability, all content and code examples are in the form of interactive Jupyterlab notebooks, including integrated activities!

Written with extensive assistance of Claude in drafting narrative and copyediting, and backend book production, based on the draft notebook collection at joshuastough/imageprocessing.

A note on AI

With the advent of IDE-integrated LLM copilots, any of the integrated activities or playpen notebooks are trivial to complete. That is, your completion of them reflect almost nothing about your understanding of the material. If you’re in class using this textbook resource, you can be expected to have to explain your work in non-augmented coding interviews throughout the course, which will comprise much of your grade. These integrated activities are to help guide your learning, not add to your instructor’s menial labor.

Compute Environment

This text is tested on several platforms, but principally Visual Studio Code linked to a locally-run Python virtual environment managed by uv.

PyTorch is installed from the CUDA 12.6 wheel index. Notebooks that use it will fall back to the CPU if you don’t have a CUDA-capable card. (A legacy conda environment, env_dip26.yml, is still included for those who prefer it: conda env create -f env_dip26.yml.)

Datasets

A few chapters (PCA, Neural Nets) use datasets too large to keep in the repository. All of them live under one data root, ~/data by default. To use a different location, set the DIP_DATA environment variable before launching Jupyter.

DatasetUsed inHow to get it
MNISTNeuralNets/mnist_*, PCA/pca_mnistDownloaded automatically by torchvision the first time
ORL (AT&T) facesPCA/pca_*FacesAT&T Database of Faces; unpack to $DIP_DATA/ORL/ (40 subject folders)
Cropped Yale BNeuralNets/yale_*Extended Yale B, “Cropped Images”; unpack to $DIP_DATA/CroppedYale/
Extended Yale B (full)NeuralNets/yale_explore (last section only)Same page; unpack to $DIP_DATA/ExtendedYaleB/

No dataset? You can still read those notebooks: after each of their key cells, an Expected output dropdown shows what the cell produces when run with the data.

If a dataset is missing, the notebook stops with a message that says where to download it and where to put it (see dip_utils/data_paths.py).

Opening in Colab

Alternatively you can work with this textbook in the cloud, through Google Colab, with no local install and with a free GPU for the neural network chapters. The notebooks rely on the book’s other folders (dip_utils/, dip_pics/), so a notebook opened in Colab by itself won’t run. Instead, open the setup notebook below and run it: it copies the book (or your private fork) into your Google Drive, where your work is kept between sessions, and gives you a short setup cell to paste at the top of each notebook you open.

Open in Colab