The goal of this project is to demonstrate the foundational principles of image warping through the applied technique of image mosaicing. Creating a mosaic involves several steps on two or more images:
The next step was to select the keypoints and (and store them for the many future iterations of the image pipeline). I used some of my learning from previous projects to write a ginput()
UI, the results of which are below:
From here, I was ready to recover the the homographies, which involves the following transformation p’=Hp, where H is a 3x3 matrix with 8 degrees of freedom.
I implemented this by creating a function computeH(im1_pts, im2_pts)
which sets up a linear system of n equations (i.e. a matrix equation of the form Ah=b where h is a vector holding the 8 unknown entries of H)
From here, I implemented a function warper(im, width, height, H)
which uses the parameters of the homography to warp the images into thier new form. I used the input parameters height and width to set the size of the new image. The result is below for the first image:
...and for the second
Now that I have the two individual warped images, I chose to blend them two together (rather than simply add them up) to minimize the edge artifacts as much as possible. I used the weighted alpha/beta blend technique which definitely did not produce as ideal of an result as I was expecting. There's some ghosting for sure and lots of edge artifacts.
Here is another example from the other side of the hill
Overall I learned: