Coordinate-conversion
代码说明:
坐标转换(四参数) [row col]=size(source) for i=1:row u(i)=source(i,2) v(i)=source(i,3) x(i)=source(i,4) y(i)=source(i,5) B(2*i-1,1)=1 B(2*i-1,2)=0 B(2*i-1,3)=u(i) B(2*i-1,4)=-v(i) B(2*i,1)=0 B(2*i,2)=1 B(2*i,3)=v(i) B(2*i,4)=u(i) L(2*i-1,1)=x(i) L(2*i,1)=y(i) end X=inv(B *B)*(B *L) Txy=[X(1) X(2)] xzjz(1,1)=X(3) xzjz(1,2)=-X(4) xzjz(2,1)=X(4) xzjz(2,2)=X(3) [row1 col1]=size(target) for i=1:row1 u1(i)=target(i,2) v1(i)=target(i,3) d=[u1(i) v1(i)] md=Txy+xzjz*d end end (Coordinate conversion: [row col]=size(source) for i=1:row u(i)=source(i,2) v(i)=source(i,3) x(i)=source(i,4) y(i)=source(i,5) B(2*i-1,1)=1 B(2*i-1,2)=0 B(2*i-1,3)=u(i) B(2*i-1,4)=-v(i) B(2*i,1)=0 B(2*i,2)=1 B(2*i,3)=v(i) B(2*i,4)=u(i) L(2*i-1,1)=x(i) L(2*i,1)=y(i) end X=inv(B *B)*(B *L) Txy=[X(1) X(2)] xzjz(1,1)=X(3) xzjz(1,2)=-X(4) xzjz(2,1)=X(4) xzjz(2,2)=X(3) [row1 col1]=size(target) for i=1:row1 u1(i)=target(i,2) v1(i)=target(i,3) d=[u1(i) v1(i)] md=Txy+xzjz*d end end )
下载说明:请别用迅雷下载,失败请重下,重下不扣分!