|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
%function [f1,f2]=match();
f1=imread('01.jpg');
f2=imread('02.jpg');
[M1,N1]=size(Mx);
[M2,N2]=size(My);
Mx=[1 2 1,0 0 0,-1 -2 -1];
My=[-1 0 1,-2 0 2,-1 0 1];
Sx(1,:)=Y(1,:);
Sx(:,1)=Y(:,1);
for i=2:m-1
for j=2:n-1
Sx(i,j)=Y(i-1,j-1)+2*Y(i-1,j)+Y(i-1,j+1)-Y(i+1,j-1)-2*Y(i+1,j)-Y(i+1,j+1)
Sy(i,j)=-X(i-1,j-1)+X(i-1,j+1)-2*X(i,j-1)+2*X(i,j+1)-X(i+1,j-1)+X(i+1,j+1)
end
end
for i=1:m
if d==2
S(i,j)=YSx(i,j)^2+XSy(i,j)^2/d
end
end
for i=1:m
j=1:n
if abs(S(i,j))<1
W(i,j)=1-2*abs(S(i,j))^2+abs(S(i,j))^3
else if 1<=abs(S(i,j))&abs(S(i,j))<=2
W(i,j)=4-8*abs(S(i,j))+5*abs(S(i,j))^2-abs(S(i,j))^3
else if abs(S(i,j))>2
W(i,j)=0
end
end
end
end
Error in ==> I:\新建文件夹\wgrasda.m
On line 4 ==> [M1,N1]=size(Mx);
怎么改这个错误? |
|