Project 2: Image alignment
4. These are some results that I got when the number of correspondence points were increased to 8.
5. This output is the result of automatic selection of matching points using SIFT. Four random matching points were used to calculate the homogaraphy matrix.
The purpose of project 2 is to create a image mosaic out of two images by warping and stitching them together. It is useful for creating wide angle panoramic views by stitching two or more images. The output of the project was tasted on a set of benchmark images.
steps involved in generating Image Mosaics:
Step1: Getting correspondence
The project basically has two parts. In the first part, the point of correspondence was selected my observation i.e, simply by clicking the corresponding points in the two images. In the second part of the project, SIFT by David Lowe was implemented in order to find the point of correspondence in the two images.
Implementing SIFT gives an enormous amount of matching points. Some of them are bad matches too. To get the best matches out of the whole matching list, a simple algorithm called RANSAC was implemented which basically involved following steps :1) randomly choose 4 matching correspondence points, 2) compute the homography matrix H using these points, 3) using thie H, transform all points in the correspondence list, and 4) calculate the distance of the transformed point and original point. Threshold it to find the inliers. Keep the H (and the set of inliers) with the largest inlier count. Using the inliers, compute H.
Step2: Calculating Homography
With a set of corresponding image points, an associated 3x3 homography matrix was calculated using the discrete linear transform (DLT). The matrix transforms any point p in one view to its corresponding homogeneous coordinates in the second view, p', such that p' = H p.
Step3:Warping between image planes
Transforming all the points in an image will land in a sub pixel values which need to be approximated using nearby pixels. This may cause holes in the output. To get rid of this problem, inverse warp is used. The corners points from the destination image were inverse warped to the reference frame of the source image , and the warp space was computed in that new reference frame. Then all points in that destination warp space were sampled from the proper coordinates in the source image.
Step4:Stitch and display output mosaic
once we have the source image warped into the destination images frame of reference, we can create a merged image showing the mosaic. Then, the resulting image can be exposed for filtering and image blending, which is left as further work.
Given Below are few examples of benchmark images.
1.Homography matrix was calcualted using four points, chosen manually in both the images.
2.Homography matrix is the result of four matching points chosen manually in both the images. But the output is not as good as previous one.
3. Below are few results where four point homography for the manually chosen points of correspondence does not work well.
4. These are some results that I got when the number of correspondence points were increased to 8.
5. This output is the result of automatic selection of matching points using SIFT. Four random matching points were used to calculate the homogaraphy matrix.
6. This is under the same parameters as no. 4.
No comments:
Post a Comment