www.pudn.com > watermarking-with-Hus-moments.rar > calculateRST.m, change:2015-06-28,size:676b


clc; 
clear all; 
[filename,pathname]=uigetfile('*','select file'); 
I=imread([pathname,filename]); 
 Ip=padarray(I,[84,84],'both'); 
m=input('select num 1 for rotete 2 for translate and 3 for mirror'); 
switch m 
    case 1 
        f45=imrotate(I,90,'bilinear'); 
imshow(f45) 
f45(100,200)=3; 
imwrite(f45,'imgrote.bmp'); 
    case 2 
        t=[1 0 0;0 1 0;150 150 1];%translete image 
tform=maketform('affine',t);%translete image 
[g xdata ydata]=imtransform(I,tform); 
imwrite(g,'trans.bmp'); 
imtool(g); 
    case 3 
         imgmirror=flipdim(I,2); 
 imtool(imgmirror) 
 imgmirror(100,200)=2; 
imwrite(imgmirror,'miror.bmp'); 
    otherwise 
    disp('error'); 
end