CS180: Prokudin-Gorskii Colorization Project

Project Overview

This project is part of CS180: Intro to Computer Vision and Computational Photography. The goal is to colorize the Prokudin-Gorskii photo collection by aligning the red, green, and blue channels of each image.

My Approach

For the alignment of TIF images, only the Normalized Cross-Correlation (NCC) algorithm was used, with a pyramid structure to optimize computational efficiency. For the alignment of JPG images, both the Normalized Cross-Correlation (NCC) and Euclidean distance methods were employed as a comparison, without the use of a pyramid structure, but rather using a single-scale approach.

Results

-Pyramid vs NCC)

TIF Images (Pyramid)

Bells & Whistles

I implemented additional features such as automatic cropping and contrast adjustment to improve the final image quality.

It was observed that simple alignment based on RGB similarity performs reasonably well for most landscape images but produces poor results when applied to some images containing people. Therefore, we attempted to use gradients or edges by introducing the Sobel filter, which significantly improved the alignment results. This improvement is due to the fact that images containing people often feature complex details and color variations. Direct alignment using the original images without edge detection is prone to noise and detail interference, leading to inaccuracies. The Sobel filter calculates the gradients in the horizontal and vertical directions, emphasizing the edge information in the images, thus making some alignment process more precise.

Comparison: Original vs Sobel Filter

Automatic cropping and automatic contrast adjustment

To enhance the visual quality of the final images, I also added automatic cropping and automatic contrast adjustment. This ensures a better overall visual effect, making the aligned images more appealing and precise.