The goal of this assignment was to create a local feature matching algorithm by detecting interest points in two physically different yet similar scences, extracting features and eventually matching them against each other.
For this project I implemented the following algorithms:
In order to find suitable interest points for matching, I implemented a Harris Corner Detection. My implementation works as follows:
Ix
, Iy
using a Sobel filterIn a next step, I supress local non-maxima by simply nulling all non-maximas within regions of the size of 3x3. This approach, however, causes most of the interest points to be found in high contrast regions leads to an unevenly distributed set of interest points. This is why I use Adaptive Non-Maximum Surpression (ANMS).
Interest Points found by using Harris corner detection on two different images.
Each interest point is then passed on the a function that tries to describe it by subdiving its surrounding area into 4x4 subareas and computing a histogram of all of their gradients.
According to the angle of the gradient in each subregion, the magnitude of the gradient is added to one of 8 bins. These bins can later be used to identify identical features.
In a last step, the descriptor of both images are compared by using a nearest neighbor approach. More precisely, the ratio of the two nearest neighbors is observed in order to determine whether two features match using this forumla:
For the images I used, I found this approach to work best when features are accepted as match only if the ratio of the closest distance to the second closest is less than 0.7 - 0.9.
28 good matches and only 4 bad matches.
The results vary on the chosen parameters and on the set of images being used. Namely the following parameters can have great effects on the outcome: