-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplotPointMatrix.m
More file actions
40 lines (34 loc) · 1.03 KB
/
plotPointMatrix.m
File metadata and controls
40 lines (34 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function points = plotPointMatrix(image_set, features, point_match_matrix, k)
%PLOTPOINTMATRIX Summary of this function goes here
% Detailed explanation goes here
idx_image = find(point_match_matrix(:,k)); % nr. of images
N = numel(idx_image);
width = size(image_set{1},2);
% join all equally sized images
image_merge = [];
tit = sprintf('Matched point in images: ');
for i = 1:N
j = idx_image(i);
image_merge = [image_merge image_set{j}];
tit = strcat(tit,sprintf('%d-',idx_image(i)));
end
tit(end) = [];
% plot merged images
imshow(image_merge);
% make point array
points = zeros(2,N);
points_plot = zeros(2,N);
for i = 1:N
j = idx_image(i);
match_idx = point_match_matrix(j,k);
points(:,i) = features{j}(1:2,match_idx);
% add image width to x point
points_plot(:,i) = [points(1,i)+(i-1)*width; points(2,i)];
end
% plot points on merged images
hold on
plot(points_plot(1,:), points_plot(2,:),'g.','MarkerSize',14,'LineWidth',2)
plot(points_plot(1,:), points_plot(2,:),'r')
title(tit,'FontSize',20);
return
end