⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ssbatch.m

📁 cox方法展频水印matlab源码
💻 M
字号:
clear; close all;

ALFA = 0.1;
LEN = 1000;

ORIGINPATH = 'E:\ChenXiaochuan\Work\graypics\';
STEGOPATH = 'E:\ChenXiaochuan\Work\ssgraypics\';
%mkdir(STEGOPATH, 'ssgraypics');

filelist = dir(ORIGINPATH);
filenum = size(filelist,1)-2;
filename= [];

for i = 1:1:filenum
    temp = filelist(i+2).name;
    filename = [filename;temp];
end

for i = 1:1:filenum
    Ig = imread(strcat(ORIGINPATH,filename(i,:)));
    Ig = double(Ig);
    dctIg = dct2(Ig);

    nRow = size(dctIg,1);
    nCol = size(dctIg,2);

    adctIg = abs(dctIg);
    [sdctIg,ind] = sort(adctIg(:));
    
    W = randn(10000,1);

    for j=1:1:LEN
        pt = ind(end-j);
        indCol = ceil(pt/nRow);
        indRow = mod(pt,nRow);
        if indRow == 0
            indRow = nRow;
        end
        dctIg(indRow,indCol) = dctIg(indRow,indCol)*(1+ALFA*W(j)); 
    end

    Igstego = idct2(dctIg);
    
    imwrite(uint8(Igstego),strcat(STEGOPATH,'ss',filename(i,:)));
    
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -