Project 1:
David Martinez - Fall 2024
CS180 - Professor Efros
Images of the Russian Empire: Colorizing the Prokudin-Gorskii photo collection
- Preprocessing grayscale images with RGB color filters.
- Apply linear grid search strategy for smaller images. (jpegs)
- Apply Gaussian Pyramid alignment using varying depths of recursion
- Bell's and whistles: FFT approach, white balancing, and filters/edge detection
Simple Grid Search
Gaussian Pyramid Search Results

Bells and Whistles
1. “Gray World” White Balancing
A clever trick to balance the brightness and color channel imbalance in an image to use a strategy called white balancing. There are a few ways to implement this manually using a reference pixel for bright or dark areas, but a common technique is to assume that the world, as we perceive it, averages to grey. While this is true of the RGB color field, it isn’t the best representation of our perceived colors and the probability of encountering those colors. In my code, I implemented a version of white balancing which is slightly modified to fix the brightness issues perceived in these images, which had highly imbalanced color histograms.
Example:
FFT Based Approach
The FFT cross-correlation method aligns images by leveraging frequency domain operations, which handle alignment much more efficiently than a pixel-by-pixel search. Instead of checking each possible shift individually, which is slow and computationally expensive, the FFT approach quickly converts both images to the frequency domain, multiplies one by the complex conjugate of the other, and uses an inverse FFT to find the alignment shift in one step. This approach cuts down the runtime significantly—from a brute-force time complexity of to , making it much faster, especially for larger images such as those with the tif file format. In my implementation, this method greatly improved alignment speed and accuracy, bypassing the tedious process of testing every possible shift manually.
White alignment is working, I am still getting color correction implemented
Note: These runtimes are on an M2 Mac Book Pro, so OS and hardware may affect results