www.pudn.com > 1111111registrationbasedoncorrelation.rar > restore.m


function Q=restore(structure) 
 
handles=structure; 
I=handles.I; 
J=handles.J; 
x=handles.out(1); 
y=handles.out(2); 
ang=handles.out(3); 
 
se = translate(strel(1),[x y]); 
J = imdilate(J,se); 
J = imrotate(J,ang,'nearest','crop'); 
 
[m,n]=size(I); 
I=edge(I,'canny')*255; 
J=edge(J,'canny')*255; 
 
QI=zeros(m,n,3); 
QJ=zeros(m,n,3); 
QI(:,:,1)=I; 
QJ(:,:,2)=J; 
Q=QI+QJ; 
Q=uint8(Q);