初学matlab图像处理,下了个sift 代码来学习。可是运行的时候报错了:??? Undefined function or method 'match' for input arguments of type 'char'.
这个程序由 数个.m文件组成。 我运行的是.match.m文件。其他几个调试时也 有问题。match.m 代码如下:
function num = match(image1, image2)
% Find SIFT keypoints for each image
[im1, des1, loc1] = sift(image1);
[im2, des2, loc2] = sift(image2);
distRatio = 0.6; % 控制匹配点数量的系数,这里取 0.6,该参数决定了匹配点的数量
% For each descriptor in the first image, select its match to second image.
des2t = des2'; % 矩阵转置预计算
for i = 1 : size(des1,1)
dotprods = des1(i,:) * des2t; % 计算点的矢量积
[vals,indx] = sort(acos(dotprods)); % Take inverse cosine and sort results
% Check if nearest neighbor has angle less than distRatio times 2nd.
if (vals(1) < distRatio *