VLfeat 中的SIFT使用

来源:互联网 发布:网络事件营销2017 编辑:程序博客网 时间:2024/05/20 16:33
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);
0 0
原创粉丝点击