VLfeat 中的SIFT使用

I = imread('image.jpg');
I = single(rgb2gray(I));
O=imread('image2.jpg');
O = single(rgb2gray(O));
P=imread('image4.jpg');
P = single(rgb2gray(P));
Q = imread('image3.jpg');
Q = single(rgb2gray(Q));




[fa, da] = vl_sift(I);
[fb, db] = vl_sift(O);
[fc, dc] = vl_sift(P);
[fd, dd] = vl_sift(P);


%matches  返回二维的位置向量

%scores     返回距离

t0 = cputime;
tic;
[matches1, scores1] = vl_ubcmatch(da, db);
[matches2, scores2] = vl_ubcmatch(da, dc);
[matches3, scores3] = vl_ubcmatch(dd, dd);
toc;
t0=clock;
time = etime(clock,t0);

你可能感兴趣的:(机器学习)