CS 143 / Project 2 / Local Feature Matching

Implementation

For the get get_interest_points function, I first used the formula on the slide to compute har values for each image point. Then I set all har values that is less than 0 to zero. Here 0 is used as the threshold value. Then I use the colfilt function to find the local maximum value in each 3x3 window and got a list of all local-maximum values. Then I sorted those values in descending order and return the top 2000 points as interest points. This is a balanced value between quality and computing speed.

For the get_features, I use a 16X16 Gaussian matrix with sigma equals 8 which is suggested in the author's paper to get weighted gradients for each point. And then normalized length of each descriptor to unit length.

For the match_features function, I set the threshold ratio of d1/d2 to 0.75 and use the ratio as confidence. Then return top 100 confident matches.

For the Notre Dame image pair, I get 92 correct mathes from all 100 matches.

Good Examples

The pictures above shows matching points for both color and grey pictures. For this example, I chose top 100 confident ones from all matching points. And there are 92 good matches and 8 bad matches. Although it is not a perfect result, the matching points can actually plot the outline structure and some special area int the figure(like the circle in the middle).

The pictures above shows another example of good matching. For this example, I set different shortest distance ratio to get two sets of matching points with different number of points. As you can see there is a perfect matching between those 2 pictures. Specially for the second set, after I reduced the ratio, the number of matching points decreased but their qualities were improved. There is a 100% macthing between those 2 pictures. I think the fact that those two pictures are actually in the same aspect helps a lot in this situation.

Matching Points of Pantheon Paris

The results on the right show a good match between those 2 pictures. In this example I set the shortest distance ratio to 0.75 to gain a smaller set of matching features. As you can see, most points are matching and most of them are on the edges of the constructions.

Bad Example

Matching Points of Capricho Gaudi

The results on the left show a bad match between those 2 pictures. In this example, there are some partial matches at the top of the tower and at trees on the top. However there matches on the main body is not quite perfect. I think this is mainly because these 2 pictures are in different scales. That is what I have espected before doing the experiments. And I think the implementation of the Gaussian Pyramid can improve its performance a lot.