www.pudn.com > hide1.rar > hide15.m, change:2004-03-04,size:690b


function hide() 
B=imread('E:\chan\mat\b.bmp','bmp'); 
imshow(B);pause;close; 
[Bx,By,Bz]=size(B); 
C=imread('E:\chan\mat\cc.bmp','bmp'); 
imshow(C);pause;close; 
[Cx,Cy,Cz]=size(C); 
%%检测 
imshow(bitand(B,240));pause;close; 
E=bitand(C,240); 
F=bitor(bitshift(bitand(C,240),-4),240); 
imshow(E);pause;close; 
imshow(F);pause;close;  
%%扩展C 
CC1=zeros(Bx-Cx,Cy,Bz); 
C=[C;CC1]; 
CC2=zeros(Bx,By-Cy,Bz); 
C=[C,CC2];          
%%隐藏开始 
D=bitor(bitand(B,240),bitshift(bitand(C,240),-4)); 
imshow(D);pause;close; 
imwrite(D,'E:\chan\mat\d.bmp') 
 %%提取 
U=bitshift((bitand(D,15)),4); 
U=U(1:Cx,1:Cy,1:Cz); 
size(U); 
imshow(U);pause;close; 
imwrite(U,'E:\chan\mat\e.bmp') 
sprintf('ok')