Using the provided get_harris_corners()
function, we fist find all the Harris corners of each images at single scale.
With Adaptive non-maximal suppression, we rank the Harris corners by their suppression radius and filter for only the top 500 points with largest radii.
Photos after applying ANMS:
Using the points filtered with ANMS, we create features by taking a region of 40 x 40 pixels around each point. Each region is then down-sampled to 8 x 8 pixels and normalized by subtracting the mean and divide by the standard deviation.
Sample visualization of features:
After extracting features, we match the corresponding features using Lowe’s method. We first find the l2-norm between all pairs features and record the first and second nearest neighbors of each point. If the ration between the first and second nearest neighbor distance is lower the threshold (0.1), we match the point to its fist nearest neigbors.
Photos of corresponding features:
Once we have corresponding features, we use them to compute the homography H with RANSAC. We repeatedly randomly select four pairs of corresponding features, computer H, and collect all the inliers with epsilon = 0.5. After 1000 iteration we keep the largest set of inliers to compute the final homography H.
Photos of corresponding features after RANSAC:
After we optained H, we use it to wrap the image and apply 2-band blending in part A. Observe that the result is much better than picking the corresponding points by hand.
Mosaic 1:
Mosaic 2:
Mosaic 3:
Note the white spots occurred in the final video is a result of decomposing the input video into images. The white spots occur after the input video is read as individual images. I think this is due to video compression.
I will never manually point and click 10+ individual corresponding feature points between two images in the same order again.