Homework 2: Homography-based Image Stitching
The goal of this assignment is to develop a software tool to stitch multiple images into a panorama. We will implement the relevant algorithms we talked in our class for this tool. Below are a list of steps.

1. Given two input images, detect SIFT features from them. You should use the sift detection API in OpenCV for this step. See this OpenCV SIFT tutorial.

2. Establish the feature correspondence between SIFT features in the two input images. You should implement the feature matching algorithms described in the Keypoint Matching section of the OpenCV SIFT tutorial. (10 points)

3. Implement the RANSAC algorithm to find a robust homography between two input images using the feature correspondence. (60 points)

4. Warp one of the input image using the estimated homography so that it aligns with the other input image.  You should use the inverse warping algorithm with bilinear interpolation, as described in our class. (30 points)

Note, you need to implement the algorithms in Step 2, 3, and 4 by yourselves instead of simply calling the relevant implementation in OpenCV.

This assignment needs to be finished using Python. We provide a skeleton code for you to begin with. To test your implementation, we provide two samples that include input images and the results. All these files can be found in this folder.

Grading policy:

1. This homework assignment has 100 points in total. This homework will contribute 25% to your final grade.

2. You should fill the missing code in the functions defined in the skeleton python file. For the functions starting with "ex_", do not modify their input and output format. We will grade your homework by calling and testing each of these functions individually.


The homework is due 4:30 pm, February 11. No late submission will be accepted. You should submit "image_stitch.py" to lizhan@pdx.edu. No other files should be submitted.