?? hide6.m
字號:
function hide()
m=input('please input the lock password:');
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);
%%密碼分解
m1=fix(m/100);
m2=m-(fix(m/100))*100;
%%檢測
E=bitand(C,240);
F=bitor(bitshift(bitand(C,240),-4),240);
imshow(E);pause;close;
imshow(F);pause;close;
%%隱藏
for i=1:Bx
for j=1:By
for k=1:Bz
if (i>m1)&(i<=m1+Cx)&(j>m2)&(j<=m2+Cy)
b=bitand(B(i,j,k),240);
c=bitshift(bitand(C(i-m1,j-m2,k),240),-4);
D(i,j,k)=bitor(b,c);
else
D(i,j,k)=B(i,j,k);
end
end
end
end
imshow(D);pause;close;
imwrite(D,'E:\chan\mat\d.bmp')
D=imread('E:\chan\mat\d.bmp','bmp');
%%輸解碼
n=input('please input the unlock password:');
for i=1:10000
if n==m
break
else
sprintf('put the wrong unlock password!!!')
n=input('please input the correct unlock password:');
end
end
%%提取
n1=fix(n/100);
n2=n-(fix(n/100))*100;
U=bitshift((bitand(D,15)),4);
U=U((n1+1):n1+Cx,(n2+1):n2+Cy,1:Cz);
imwrite(U,'E:\chan\mat\e.bmp')
imshow(U);pause;close;
sprintf('ok')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -