1) Define correspondences between the 2 images
- Detect corners using a harris corner detector.
- Implement adaptive non maximal suppression. Look at all the points and find the closest distance to another corner point which has a larger corner strength. Pick points which have a reasonable distance.
- Implement a feature descriptor for that point. Pick up a 40x40 patch and subsample it to 8x8. Normalize the intensity and divide it by the standard deviation. I implemented rotation invariance for extra credit.
- using a SSD feature matcher we found matching feature for each interest point in the 2 images. To remove spurious matches we compare the values of the first 2 near matches and only if the ratio is small is it considered a good match.
2) Recover the homography using RANSAC
- We will recover a projective transformation H (3x3 matrix). This marix has 8 degrees of freedom with the 9th element set to value 1.
- using q=Hp it is possible to solve the equations using 3 corresponding points.
- Using the feature matching technique above we would have more than the required no. of points to solve this set of equations and hence we will use RANSAC to determine outliers and get a good solution based on the inliers using SSD.
- In about 10k iterations and haivng a threshold of 1px for the inliers we get fairly good results.
Extra Credit
Using Seam, poisson and alpha blending to join the panoramas. When joining the 2 images instead of just using the a mix ture of the pixels we found a seam with least energy and transition the image at that seam.
I tried using a poisson blend but there seems to be a slight error at the boundaries.
Alpha blending seems to give the best result with the window size set to the overlap region.
Adding a roataion invariance to the feature descriptors. For these panoramas using the rotation invariance for feature matching didn't help a lot.