资源简介

彩色图像的arnold图像置乱和logistic混沌序列的图像加密程序matlab源码

资源截图

代码片段和文件信息

A=imread(‘D:\lena.BMP‘);
A=rgb2gray(A);
 subplot(221)
imshow(A);
title(‘原图‘)
for k=1:90
for x=1:131
         for y=1:131
            x1=x+y;
            y1=x+2*y;
            if x1>131
                x1=mod(x1131);
            end
            if y1>131
                y1=mod(y1131);
            end
            if x1==0
                x1=131;
            end
            if y1==0
                y1=131;
            end
            A1(x1y1)=A(xy);
        end
end
A=A1;
end
 subplot(222)
imshow(A1);
title(‘加密后的图像‘)
for k=1:90
for x1=1:131
    for y1=1:131
        if x1            y2=y1-x1;
            if x1<=y2
                x2=131+x1-y2;
            else
                x2=x1-y2;
            end
        end
        if x1>y1
           

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-04-10 17:22  arnold-logistic\
     文件        1140  2012-04-05 17:06  arnold-logistic\Arnold.m
     文件        1108  2012-04-05 17:06  arnold-logistic\logistic.m

评论

共有 条评论