Matrix transformations are powerful and selecting points is quite tedious.
First I manually select corresponding points in each image. We compute the 3x3 homography matrix using these points. We solve for 8 variables in the H matrix using a least squares approximation. Next we warp each image to the plane of the base image. I used linear blending to stitch the images together.
Reading technical papers is not my thing, and between being sick, bad air quality, and family reunions I will be ok with a non fully functional part 2. I'm still not sure what is wrong with my RANSAC but the outliers are preventing me from creating reliable H matrices.
ANMS gives us the 500 best points out of the points chosen from the given get_harris_points function. For each corner, we find a minimum radius to another corner with at least 90% f its corner strength.
We now use our interest points as feature descriptors by extracting a 40x40 patch for each point and resizing the patch to 8x8. We also normalize the patches.
We now find consistent features between two images. We calculate the squared distance from every feature in the first image to every feature in the second image. If the ratio of the distance to the 1st nearest neighbor over the distance to he 2nd nearest neibor is less than some threshold, then the pair is a match. I used a threshold value of 0.5.
To remove outliers we run RANSAC. We choose 4 potential matches randomly and compute H with these points. We warp all match points from the first image according to H and compute the SSD between them and the points in the second image. I ran this 500 times with an error threshold of within 100 SSD units.