Project: Image stitching part 1 & 2

The project aims to showcase to solution to automated image stitching, given that that a user provides points to point correspondence for the pictures. The process is as such - I first take pictures of our subjects, usually taking a collection of pictures and enough pictures to form an image mosaic. These pictures are digitized. I then retreive the homography between the images that I want to form an image mosaic with. This is done by selecting a number of points which correspond to one another, and I need at least 4 points. The more points I choose, the better the homography will be. Then I perform an image warp on the image I want to warp to the base image. I can blend the two images using linear blending, or laplacian blending. I peformed both linear and laplacian blending, each with its own special effects.

The next part of the project is to automate the selection of the points. In part 1, I manually selected point-to-point correspondence for the two images, which can lead to inaccurate homographies as the human hand is incapable of such constant precision. Thus I perform a series of steps to obtain the best homography possible. First I obtain the entire set of Harris corners (using gaussian_1 of 4 and gaussian_2 of 6)from the two images, and perform adaptive non-maximal spatial filtering on these points to obtain the 500 points with the highest strength which are spatially distributed throughout the image. The strength of each neighbour must be 0.9 times that of the feature in order to be suppressed. Then I obtain an feature descriptor for each of these points(This is generated by applying a Gaussian filter to a 40x40 square around the point and subsampling it to get a 8x8 square). I then compare all features of image 1 to image 2, and retain the set of features that SSD(im1patch,im2patch)<=e where e is some epsilon. This threshold is obtained by averaging the error of the 2-nearest neighbour in order to get a good sense of the average outlier distance in the image. Lastly, I perform RANSAC on these feature points to choose the best 4 points to give us a final homography. It runs through some number of iterations, and in each iteration, chooses 4 points at random, computes a homography H from these 4 points. I then compute SSD(p', H p) <= e' , and keep the largest set of inliers which fulfil this condition. I used 2500 iterations and a e' of 0.7, which seemed to give the best effect.