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

📄 wavedct.m

📁 用matlab实现的DCT水印处理
💻 M
字号:
%------------------------NOTES---------------------------------------------
% Written by : zj  - 01/05/07
% Contact    : zxxyj0506@sina.com
% CpoyRight@2007-2010
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% p              --- the image which want to be embed watermark 
% w              --- the binary watermark image
% g              --- the watermarked image 
% delta          --- the coefficient (量化系数)
p=imread('baboon512.jpg'); w=imread('shan.png'); delta=75;
[wrow,wcol]=size(w);
[pll,plh,phl,phh]=dwt2(p,'db1');
[row,col]=size(pll);
numblk=row/8;
pll_w=wembed(pll,w,delta,numblk);
pw=idwt2(pll_w,plh,phl,phh,'db1');

g=uint8(pw);
% g=imnoise(g,'gaussian',0,0.005); 
% g=imnoise(g,'salt & pepper',0.02); 
% g=imnoise(g,'speckle',0.02); 


psnr_im=psnr(p,g);

[gll,glh,ghl,ghh]=dwt2(g,'db1');
abw=wabsract(gll,delta);
nc=matrix_nc(w,abw);

subplot(1,4,1);imshow(p);subplot(1,4,2);imshow(w);
subplot(1,4,3);imshow(g);subplot(1,4,4);imshow(abw);

⌨️ 快捷键说明

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