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

📄 sswm.m

📁 cox方法展频水印matlab源码
💻 M
字号:
clear; close all;
N = 10000;
alfa = 0.1;
Ig = imread('monarchgray.bmp');
%imshow(I);
% I = double(I);
% Ig = 0.3*I(:,:,1) + 0.59*I(:,:,2) + 0.11*I(:,:,3);
% Ig = uint8(Ig);

% imwrite(Ig,'monarchgray.bmp')
% figure; imshow(Ig);
Ig = double(Ig);

dctIg = dct2(Ig);
%figure;imshow(log(abs(dctIg)),[]), colormap(jet), colorbar

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

adctIg = abs(dctIg);
[sdctIg,ind] = sort(adctIg(:));
%ssdctIg = ssdctIg(end-N:end-1);

W = randn(N,1);

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

Igstego = idct2(dctIg);
figure; imshow(Igstego,[]);

imwrite(uint8(Igstego),'monarchgraystego.bmp');
   
    
    
    

⌨️ 快捷键说明

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