matlab sift代码某一段代码没看懂,求解释。
matlab吧
全部回复
仅看楼主
level 9
RAX4超风 楼主
function match=zoo_BidirectionalMatch(des1,des2,Num,Thresh)
X=sum(des1.^2,2);
Y=sum(des2.^2,2);
XY=des1*des2';
corr=XY./sqrt(X*Y');
[corr1,ix1]=sort(corr,2,'descend');
corr1=corr1(:,1:Num);
ix1=ix1(:,1:Num);
[row1,col1]=find(corr1>Thresh);
match12=zeros(length(row1),2);
match12(:,1)=row1;
match12(:,2)=ix1(size(corr1,1)*(col1-1)+row1);
clear corr1 ix1 row1 col1
[corr2,ix2]=sort(corr,1,'descend');
corr2=corr2(1:Num,:);
ix2=ix2(1:Num,:);
[row2,col2]=find(corr2>Thresh);
match21=zeros(length(col2),2);
match21(:,1)=ix2(Num*(col2-1)+row2);
match21(:,2)=col2;
clear corr2 ix2 row2 col2
m1=match12(:,1)*10000+match12(:,2);
m2=match21(:,1)*10000+match21(:,2);
clear match12
match=[];
for k=1:length(m1)
re=m1(k)-m2;
idx=find(re==0);
if ~isempty(idx)
match=[match;match21(idx,:)];
end
end
Q1:这段代码的作用是什么?
Q2: 这段代码的它根据哪一个公式编写?
谢谢
2019年08月08日 02点08分 1
level 1
想p图私我
2020年01月11日 04点01分 2
level 1
楼主现在懂了吗?求解释
2020年08月20日 09点08分 5
level 9
RAX4超风 楼主
懂了
2020年08月20日 10点08分 6
楼主可以给我解释一下这段代码的具体含义吗,这个程序看起来像是对des1和des2的相关性进行排序,剔除掉相关性低的部分?还想问一个问题,[des1,loc1]=zoo_sift(gray1)中,loc是特征点的像素坐标,des表示的是什么含义呀[乖]
2020年08月21日 02点08分
1