.jpg
files, we simply used a strategy of checking every possible
displacement within a [-15, 15] by [-15, 15] window. We can easily use np.roll
in order
to displace one of the images, then use a metric to compare the similarity between the displaced image
and the original of the other image. Finally, we choose which displacement within the window minimizes
the metric we used.
R: (12, 3), G: (5, 2) |
R: (3, 2), G: (-3, 2) |
R: (6, 3), G: (3, 2) |
.tif
images, the exhaustive approach is no
longer sufficient or computationally feasible. So, I used an image pyramid search which involved going
from the coarsest possible image and increasing quality to get back to the original image, while
adjusting our estimate for the optimal displacement. Images were made coarser using the
sk.transform.rescale
function.
R: (58, -5), G: (25, 3) |
R: (88, 43), G: (49, 24) |
R: (124, 13), G: (60, 16) |
R: (89, 23), G: (41, 17) |
R: (111, 12), G: (55, 8) |
R: (177, 11), G: (82, 9) |
R: (108, 36), G: (51, 26) |
R: (140, -27), G: (33, -11) |
R: (175, 34), G: (79, 29) |
R: (112, 10), G: (55, 13) |
R: (87, 32), G: (42, 6) |
R: (125, 24), G: (57, 12) |
R: (-51, 9), G: (-73, -28) |
R: (101, -60), G: (-18, -34) |