通过混沌序列置乱水印

%designed by dont

clc;
t=linspace(0,0,64*64);
t(1)=0.98;
for i=1:4095
t(i+1)=1-2*t(i)*t(i);
end

[pm,pn]=sort(t);
%pn为一个1~64*64之间的无重复的数组
w=imread('E:\工作\科研\image\watermark.bmp');
figure(1),imshow(w);
w1=zeros(64,64);
for i=1:64*64
w1(i)=w(pn(i));
end
figure(2),imshow(w1);
w2=zeros(64,64);
for i=1:64*64
w2(pn(i))=w1(i);
end
figure(3),imshow(w2);

你可能感兴趣的:(工作)