Justin D. Norman Project 4 Part 1

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:

To test out my pipeline I ran to the top of tank hill in San Francisco:

1. Shoot and Digitize the Pictures

I took (many) pictures but I like these two as they provided a useful artifact the bench in the lower right that I could use later to assign keypoints for correcpondences.

tank1 tank2

2. Recover homographies

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:

tank1 tank2

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)

3. Warp the images

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:

warp1

...and for the second

warp2

4. Blend images into a mosaic

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.

warp1

Here is another example from the other side of the hill

tank1 tank2

warp1_l

warp2_l

warp1

Overall I learned: