In this project, we compared multiple images of same object and implemented local feature matching on those images. The concepts of Harris corner detector, Scale Invariant feature transform(SIFT) and Nearest neighbor distance ratio(NNDR) were utilized to implement local feature mathcing.
1. Getting Interest Points
Directional derivatives of image for x and y direction were created by filtering with [-1,0,1] and [-1;0;1]. After blurring once, calculate corner response function for each pixel. Then, find points which gave large corner response(>threshold) and perform non-maximum suppression.
2. Get Features
Create a 16*16 window(consists of 16 4*4 patches) around each interest point. Get the direction of gradient vector of each pixel in the window. Make 8 bins which corresponds to 8 directions and histograms for each patch. Therefore dimension of feature descriptor would be 128.
3. Match Features
Calculate all distances between each feature descriptors and find nearest and second nearest neighbor. Calculate NNDR and check if it is below the threshold.
Evaluated Correspondence
Alpha = 0.06 , Threshold for harris detector = 0.001, Threshold for NNDR = 0.8
74 good matches and 2 bad matches were achieved from feature matching. 97.3% of total matches were correct based on ground truth. When we increase the threshold for NNDR, we can get more matches but accuracy drops.
Evaluated Correspondence with different threshold
Alpha = 0.06 , Threshold for harris detector = 0.001, Threshold for NNDR = 0.85
100 matches with the highest confidence were shown. 85 total good matches and 15 bad matches. Accuracy dropped to 85%.
Evaluated Correspondence with different threshold
Alpha = 0.04 , Threshold for harris detector = 0.001, Threshold for NNDR = 0.85
82 total good matches and 18 bad matches. Accuracy was 82%.
we can vary two threshold values and alpha to get better result.
Since there was no ground truth data for these images, evaluation of correspondence was impossible. However, it seems that feature macthing is doing its job.
![]() |
![]() |
![]() |
![]() |
![]() |