SIFT Feature for image matchingFor this final project, you will use the OpenCV API of SIFT feature to perform image matching. As mentioned in the class, there are a lot of false-positive matching...

SIFT Feature for image matchingFor this final project, you will use the OpenCV API of SIFT feature to perform image matching. As mentioned in the class, there are a lot of false-positive matching pairs by using SIFT alone. This is because every correspondence is considered individually. For a given image, there are many similar pixels or patches, which can be wrongly assigned as pairs and potentially degrades the overall matching accuracy. Figure 1 shows some wrongly assigned correspondences by using SIFT without any spatial constraints.Figure 1: false-positive matching example by SIFT without spatial constraintsTo overcome this issue, geometric or spatial constraints can be one possible solution. For this project, your task is to apply homography transformation on the matching pairs to further remove false-positive correspondences by using homography geometry. Finally it should show a pair of images with more accurate matching pairs than the results by applying SIFT alone as Figure 2 shows.Figure 2: better accuracy can be achieved by homography transformation between two images taken from different camera perspectivesOpenCV provides APIs for homography matrix estimation, you are flexible to use it or implement it yourself. If you decide to use the APIs, you should find out the related classes or functions yourself and learn to use their parameters for the estimation. If you decide to implement the homography transformation by yourself, the can randomly choose three matching pairs from the SIFT output to estimate homography transformation matrix. Then apply this estimated matrix to the remaining matching pairs to eliminate false-positive ones. You can repeat this procedure for several rounds until an optimal homography matrix is found (the matrix has the maximum fitting on the SIFT correspondences). Then you can draw them on the pair of images to see the improvement.Requirements and Rubrics:(1) Apply SIFT alone to extract features from any two image pairs(2) Draw lines between matching correspondences of two image pair as Figure 1 shows(3) Apply SIFT together with Homography Transformation to find correspondence and draw lines between them of the two image pair as Figure 2 shows(4) Please create an image folder called “imgs” inside your project folder. Then place at least 5 image pairs for matching into the “imgs” folder. To make it easier for testing, please make these image pairs in the following format:“image01a.jpg”, “image01b.jpg” “image02a.jpg”, “image02b.jpg” “image03a.jpg”, “image03b.jpg” “image04a.jpg”, “image04b.jpg” “image05a.jpg”, “image05b.jpg” ......These images can be any images taken by your phone camera or downloaded online. Each pair of images should satisfy three conditions:(i) The same planar object or scene is contained in both images.(ii) These two images should be taken from different perspectives rather than two identical images;(iii) Since we are using homography transformation as spatial constraint, it is better the planar object dominates the image as Figure 2 shows. (5) Implement a simple OpenCV running procedures:‘n’ – next key to replace the current two images by the next pair of imagesa. (30%) When start running your code, the first two pair of images are shown up on the screen, i.e. “image01a.jpg” and “image01b.jpg” are displayed on two windows. Your program enables navigate different image pairs by hitting the following hot keys:‘p’ – previous key to replace the current two images by the previous pair of imagesb. (20%) Extract SIFT features from the current pair of images and draw these key points locations on the two images independently. Feel free to draw any styles on these key points on the image (e.g. circles or squares or in different colors).‘d’ – draw key to draw detected SIFT feature points on the current images of the two windowsYour program should allow users to switch between “drawing” and “not drawing” the key points in turns by hitting the ‘d’ key multiple timesc. (15%) Draw lines on the matching corresponding keypoints between the two images based on the SIFT matching alone as Figure 1 shows. This is triggered by hitting:‘s’ – SIFT key to matching pairs of keypoints between the current image pairShow the result on a third window that contains both images in it. Again the styles of the matching lines can be flexible. d. (20%) Draw lines on the matching corresponding keypoints between the two images based on the SIFT matching + Homography Transformation as Figure 2 shows. This is triggered by hitting:‘h’ – Homography transformation key to matching pairs of keypoints between the current image pairYou can show the result on a fourth window that contains both images in it. Again the styles of the matching lines can be flexible.e. (15%) Report your results on a PDF file by at least showing five image pairs. For each pair of images, you should provide:i. The original imagesii. The detected SIFT features on the two imagesiii. Matching correspondences of drawing lines between the two images (SIFT alone)iv. Matching correspondences of drawing lines between the two images (SIFT + Homography)
Aug 09, 2021
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here