Episcopal Gaudi interest points.
The project is divided into 3 functions. The first one is to find interest points. The specific steps are as follows:
The second tasks asks us to describe the feature around interest points. SIFT is implemented as the following:
Initially when doing the normalized patch as feature descriptions, the accuracy jumped from nearly 0% to 42%. When SIFT-life feature is implemented, the accuracy rose up to 66% for Notre Dame pair.
In Tast 3, we are supposed to match the features of two similar images.
num_features = min(size(features1, 1), size(features2,1));
matches = zeros(num_features,2);
confidences = zeros(num_features,1);
for i = 1:size(features1,1)
shortest = Inf;
second_shortest = Inf;
nearest = 0;
for j = 1:size(features2,1)
distance = norm (features1(i,:) - features2(j,:));
if distance < shortest
shortest = distance;
nearest = j;
elseif distance < second_shortest
second_shortest = distance;
end
end
matches(i,:) = [i nearest];
confidences(i) = second_shortest / shortest;
end
% Sort the matches so that the most confident onces are at the top of the
% list. You should probably not delete this, so that the evaluation
% functions can be run on the top matches easily.
[confidences, ind] = sort(confidences, 'descend');
matches = matches(ind,:);
The final accuracy rate I achieved was 93% on Notra Dame pairs and 97% on Mount Rushmore pairs. Unfortunately the Episcopal Gaudi pair is low as 4%(tuning the alpha and threshold value doesn't seem to affect accuracy significantly). I think finding local maximum is a very tricky part in this project. Using bwconncomp to group binary map regions is a very interesting way of tackling the problem. Another thing I observed through this homework is that the larger gaussian filter in get_interest_poins.m played a huge role in terms of accuracy. When I first use the default setting of the sd value in the filter, it's too big and it actually elimantes all the useful corner information I need to find corret interest points. After many hours of debugging and trying did I finally realize it's this parameter value affecting the performance of the function and changed it to 0.1