The goal of this assignment is to take the digitized Prokudin-Gorskii glass plate images and, using image processing techniques, automatically produce a color image with as few visual artifacts as possible.
For raw pixels as features, I used SSD(Sum of Squared Differences) and NCC(Normalized Cross-Correlation) metrics. Both performed well for cropped images. However, these methods give too much value to unnecessary information. To improve performance on bigger pictures, I kernelized the input by estimating the gradient using Sobel-Feldman operator and used SSD on it. Furthermore, I had to tune the window size for the image pyramid alignment to achieve better precision.
Gradient estimation was useful for auto-croping implementation. I cropped each of the r, g, b pictures by estimating edge position on a kernelized input. This method removes black and white borders; however, it is incapable of dealing with overlays.
The better util for cropping. Since we used a circular shift during alignment, some areas were damaged. Clean-crop method cropped all colored stripes on the border.
Automatically adjust white balance by stretching out r, g, b channels independently.
Some pictures required contrast adjustment. I used log and gamma correction for that.
NCC Pyramid Alignment | grad_SSD Pyramid Alignment with clean-crop |
---|---|
grad_SSD Pyramid Alignment with Clean-Crop | grad_SSD Pyramid Alignment with Clean-Crop and Gamma Contrast Correction |
---|---|
NCC Pyramid Alignment | grad_SSD Pyramid Alignment with Auto-Crop and Gamma Contrast Correction |
grad_SSD Pyramid Alignment with Clean-Crop | grad_SSD Pyramid Alignment with Clean-Crop, Auto-White Balance Correction, Log Contrast Correction |
grad_SSD Pyramid Alignment with Clean-Crop | grad_SSD Pyramid Alignment with Clean-Crop, Auto-White Balance Correction |
Name, Offset (flipped) | Results |
---|---|
Cathedral G: [5 2] R: [12 3] |
|
Tobolsk G:[3 3] R: [6 3] |
|
Monastery G:[-3 2] R: [3 2] |
|
Harvesters G:[58 20] R: [124 18] |
|
Emir G:[48 23] R: [106 41] |
|
Icon G:[40 18] R: [88 24] |
|
Lady G:[48 6] R: [108 12] |
|
Melons G:[92 22] R: [180 12] |
|
Onion Church G:[49 26] R: [107 37] |
|
Three Generations G:[46 11] R: [108 1] |
|
Self Portrait G:[78 29] R: [175 37] |
|
Train G:[42 6] R: [85 32] |
|
Village G:[64 13] R: [136 22] |
|
Workshop G:[52 0] R: [106 -12] |