Tag Archives: SIFT

Stitching image using SIFT and Homography

This Matlab tutorial I use SIFT, RANSAC, and homography to find corresponding points between two images. Here I have used vlfeat to find SIFT features.

Full code is available at my GitHub repository

Major steps are:

0.Adding vlfeat to your Matlab workspace:

 

1.Detect key points and extract descriptors. In the image below you can see some SIFT key points and their descriptor.

 

 

 

2.Matching features:

 

3.Pruning features

In this step, I only took first k top matches.

number_of_top_matches_to_select=90;

 

4.Estimating transformation using RANSAC

I used RANSAC to estimate the transformation.

 

5.Compute optimal transformation

Finally, I used the least square method to find the affine transformation between two images.

 

PCL pointcloud pairwise registration

registration is aligning 3D point cloud on each other such that it gives you a complete model. To achieve this, you need to find the relative positions and orientations of each point cloud, such that you maximize the overlapping intersecting areas between them [1].

So I got the idea from here and I implemented a software based on that. In the following, you can see the main idea and the step I took and finally the results:

Main Flowchart of pairwise point cloud registration

image source: image has been taken from http://pointclouds.org/documentation/tutorials/registration_api.php

 

1)Importing point cloud acquired from different angles, down sampling, selecting keypoint extractor method SIFT, NARF, Harris, SUSAN and respected parameters

2)Selected keypoints are highlighted in green, for each keypoint a descriptor (PFH or FPFH) is estimated

3) Correspondences between keypoint descriptor are estimated (histogram distance) and correspondent points are connected.

4) Correspondent points are rejected via several algorithm and from the remained correspondent points a 4×4 transformation matrix is computed

5) 4×4 transformation matrix is used for initial estimation of ICP algorithm and two point clouds are merged into one