%plot detected correspondences in the pair of images

%2003, B. Micusik, micusb1@cmp.felk.cvut.cz

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all;
close all;

imidx = 1;      %[1-6]      %pair

dn = '/mnt/www/wwwpages/cmp/courses/pvi2003/Labs/KarluvMost/';
fn = 'KMsm'; fnl = 'KMsmPoints';
tpfn = '.png';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ims1  = sprintf('%s%s%02d%s',dn,fn,imidx,tpfn);
ims2  = sprintf('%s%s%02d%s',dn,fn,imidx+1,tpfn);
imsd = sprintf('%s%s%02d-%02d',dn,fnl,imidx,imidx+1);

im1 = imread(ims1);
im2 = imread(ims2);

load(imsd);

%1.image
figure;
imagesc(im1); hold on;

plot(u(1,:),u(2,:),'y.');
text(u(1,:),u(2,:), num2str([1:length(u)]'),'color','r','FontSize',12,'Fontweight','bold');

%2.image
figure;
imagesc(im2); hold on;

plot(u(4,:),u(5,:),'y.');
text(u(4,:),u(5,:), num2str([1:length(u)]'),'color','r','FontSize',12,'Fontweight','bold');
