Académique Documents
Professionnel Documents
Culture Documents
89739015
April 8th, 2008
% Show a figure with the joined images and overlaid lines that are
% drawns between the first 5 keypoints in each image (these are just
% random matches)
imshow(im3);
hold on;
num=0;
%set the loop boundaries
v = size(des1);
end1=v(1);
cols1 = size(im1,2);
rows1=size(im1,1);
v1 = size(des2);
e = v1(1);
%for all descriptors in im1 loop here
for i=1:end1
%over all descriptors in im2 loop here, get angle between these descriptors and descriptors in
im1
for j=1:e
dotpr = dot(des1(i,:), des2(j,:));
angles(j) = acos(dotpr);
end
smallest = I(1)
second = I(2)
an = angles(smallest)
an2=angles(second)
%if ratio of the two smallest angles below the threshold mark the
%descriptor
if(angles(smallest)/angles(second) <threshold)
t=0.85
t=0.75
t=0.5
t=0.6
The best matching was achieved with a threshold choice of 0.6.
Threshold above .75 found many false matches. Therefore for further optimization higher
values of the threshold should be avoided. Especially, since some of the methods (such as
RANSAC) are not feasible for hight percentage of outliers (above 50%). (if using RANSAC, the
matches would be used as 'the model' and false matches would be later on eliminated in
ransac iterations)