Cathedral.jpg Offset: Green: [1, -1] Red: [7, -1]
Monastery.jpg Offset: Green: [-3, 2] Red: [3, 2]
Nativity.jpg Offset: Green: [3, 1] Red: [7, 1]
Settlers.jpg Offset: Green: [7, 0] Red: [14, -1]
One issue that arose with this naive implementation was with the Monastery.jpg image. The corrected image has been displayed above, but when just running the simple algorithm on the raw input, the following image had originally been produced:
Original output (imperfect alignment)
Original image
As shown, the image was imperfectly aligned by running the naive algorithm on the raw input. This was fixed by cropping the edges (5% off each side) of the image. This helped to produce the correctly colored version of the Monastery.jpg file displayed in the JPG images section above. A possible reason why this was an issue with this picture is that the actual contents of the picture are very light in comparison to the black border (as shown in the original image). Thus, the algorithm could be focusing more on aligning the black borders rather than the actual contents of the picture. Cropping the border off (5% from each edge) allows the algorithm to match the actual contents of the picture instead, producing the better colored image shown in the JPG Images section.
Emir.tif Offset: Blue: [49, 24] Red: [0, -200]
Harvesters.tif Offset: Green: [60, 16] Red: [124, 13]
Icon.tif Offset: Green: [40, 17] Red: [89, 23]
Lady.tif Offset: Green: [53, 8] Red: [117, 10]
Self_portrait.tif Offset: Green: [78, 28] Red: [176, 36]
Three_generations.tif Offset: Green: [54, 11] Red: [112, 9]
Train.tif Offset: Green: [43, 5] Red: [87, 31]
Turkmen.tif Offset: Green: [56, 19] Red: [115, 26]
Village.tif Offset: Green: [64, 11] Red: [137, 21]
One issue that arose with the generic image pyramid implementation was with the Emir.tif. Originally, the following image was produced:
Original output (incorrect alignment)
The failure of the image pyramid algorithm to properly align this image was due to the fact that the images had different brightness levels. The blue filter was significantly darker than the others; causing issues when we tried to align the other colors to the blue. This problem was solved by trying to match the red and blue colors to green instead; since the green was of medium intensity and thus could be correctly matched with both the red and blue to produce the correct output shown above in the TIF (larger) images section.
Cliff_reflection.tif Offset: Green: [11, 46] Red: [29, 73]
River.tif Offset: Green: [18, 16] Red: [89, 28]
Round_hill.tif Offset: Green: [40, 4] Red: [131, 6]
Non-cropped Monastery.jpg output using RGB alignment
Non-cropped Monastery.jpg output using edge alignment
In this example, the output on the left was produced by running the simple single-scale algorithm on the non-cropped raw input using RGB alignment. The image on the right was produced by running the same algorithm, but passing in the result of detecting horizontal and vertical edges instead of the raw color data and aligning based on that. This had a noticeable improvement for this case.
Cropped Emir.tif output using RGB alignment
Cropped emir.tif output using edge alignment
In this example, the output on the left was produced by running the image pyramid algorithm on the cropped raw input using RGB alignment. The image on the right was produced by running the same algorithm, but passing in the result of detecting horizontal and vertical edges instead of the raw color data and aligning based on that. This also had a noticeable improvement for this case.
Automatic contrasting: I tried to adjust the contrast of several of the images using the function skimage.exposure.equalize_adapthist. This produced the following noticeable improvements on several images:
Monastery.jpg without contrast adjustment
Monastery.jpg with contrast adjustment
Nativity.jpg without contrast adjustment
Nativity.jpg with contrast adjustment
Self_portrait.tif without contrast adjustment
Self_portrait.tif with contrast adjustment