Welcome to My CS180 Project 1 Portfolio!

Hello! For this project, I colorized the Prokudin-Gorskii photo collection. I did so by extracting the RGB channels from the images and cropping them to remove the outer 15% to remove black borders. Afterwards, I In addition, I used a Sobel Filter for edge detection on each channel to help find the shifts that align the image. Lastly, I cropped the aligned images to be the same size before merging all three color channels for the final image. One of the problems I faced while implementing this algorithm was how the Emir image looked unaligned after I tried to align the images without Sobel Filters. To fix this, I added Sobel Filters to my algorithm to obtain more accurate offsets and detect edges for better image alignment. To find the optimal alignment shifts for the red and green channels relative to the blue channel, I maximized NCC score. The NCC score measures the similarity between two images and both pixel intensity and structure into account. The results of my algorithm on the example images and the image I chose from the Prokudin-Gorskii photo collection are shown below:

Aligned Images

Cathedral Aligned Image

Church Aligned Image
green offset: (2, 5) red offset: (3, 12)

Church Aligned Image

Church Aligned Image
green offset: (4, 25) red offset: (-4, 58)

Emir Aligned Image (Without Sobel Filter)

Emir Aligned Image
green offset: (24, 49) red offset: (-385, 154)

Emir Aligned Image (with Sobel Filter)

Church Aligned Image
green offset: (23, 49) red offset: (40, 107)

Harvesters

Church Aligned Image
green offset: (17, 60) red offset: (13, 123)

Icon

Church Aligned Image
green offset: (17, 42) red offset: (23, 90)

Lady

Church Aligned Image
green offset: (9, 56) red offset: (13, 120)

Melons

Church Aligned Image
green offset: (10, 80) red offset: (13, 177)

Monastery

Church Aligned Image
green offset: (2, -3) red offset: (2, 3)

Onion Church

Church Aligned Image
green offset: (25, 52) red offset: (35, 107)

Sculpture

Church Aligned Image
green offset: (-11, 33) red offset: (-26, 140)

Self Portrait

Church Aligned Image
green offset: (29, 78) red offset: (37, 176)

Three Generations

Church Aligned Image
green offset: (12, 54) red offset: (9, 111)

Tobolsk

Church Aligned Image
green offset: (2, 3) red offset: (3, 6)

Train

Church Aligned Image
green offset: (5, 42) red offset: (32, 87)

Chosen image before:

Church Aligned Image

Chosen image after:

Church Aligned Image
green offset: (-2, 43) red offset: (9, 97)

Chosen image before:

Church Aligned Image

Chosen image after:

Church Aligned Image
green offset: (-1, 5) red offset: (-3, 10)