摘要:算法基于Haar小波变换,把小波系数分块,并计算每个块的平均值。在一系列信号处理之后,这些块(尤其是大的块)的平均值不会有很大改变,否则,重构的图像就与原始图像有很大差别。通过对这些块的平均值进行量化来嵌入水印;提取时也依赖于相应块的平均值,所以不需要原始图像参与。算法对有损压缩、小波压缩、噪声、中值滤波和剪裁等操作有较好的鲁棒性。

关键词:信息隐藏;数字水印;小波变换

引言

随着计算机和网络的飞速发展,人们的许多创作和成果都以数字形式进行存储和发布。然而,数字作品极易被非法拷贝、伪造和窜改,使得很多版权所有者不愿意利用网络公开其作品,从而阻碍其自身发展。目前,数字作品的版权保护不仅仅是立法问题,也是一个很重要的技术难题。从技术上看,数字媒体版权信息的嵌入和检测问题,是数字作品版权保护的两个关键问题,它综合了传统密码学的认证和鉴别问题的特点,又加入了稳健性要求。版权保护信息必须与被保护的数据密切结合,版权保护信息的鉴别过程必须具有了抗干扰能力,在这种情况下,数字水印技术应运而生。

1. 数字水印技术概述

提到水印,人们都会想到钞票中的水印。钞票水印具有两条特性,首先,水印在通常情况下不可见,只有在特殊的观察条件下才可见(钞票中水印在光下可见)。其次,水印信息必须与载体对象相关(在这里表示纸币的真实性)。

1.1 数字水印技术的特性

可证明性:能够为受到版权保护的数字产品提供完全可靠的证据。

不可见性:即被嵌入水印信息的数字产品不会出现明显的质量下降,隐藏的数据不易被察觉;另外,不能用统计的方法恢复出水印。

鲁棒性:添加的数字水印必须对施加于宿主图象的攻击具有一定的免疫能力,不能因为对宿主图象的某种操作而导致水印信息丢失。

1.2  数字水印技术的应用

水印技术的应用极为广泛,主要有以下7种应用领域:广播监控、所有者识别、所有权验证、交易跟踪、内容真伪鉴别、拷贝控制以及设备控制。

2. 理论基础

2.1 小波变换理论

自1986年以来,小波分析的理论、方法与应用的研究一直方兴未艾。作为一种数学工具,小波变换是对人们熟知的傅立叶变换和窗口傅立叶变换的一个重大突破,为信号分析、图像处理及其它非线性科学研究领域带来了革命性的影响。

人类视觉系统(HVS)的文理特性和照亮掩蔽特性表明,纹理越复杂,背景的亮度越亮,人类视觉对其轻微变化就越不敏感。大量的研究表明,人眼在处理图像信号时,将图像滤波成若干的子带信号,他们占据不同的频率范围,即图像在HVS中被认为是由不同频率范围的信息组成。其特征为:人眼对反映局部结构的边缘和轮廓不敏感;对低频信号,表现出较高的灵敏度。HVS在同一品大范围对不同方向纹理细节信号等表现出不同的灵敏度,这一特点与小波变换的多分辨率分析具有一定的相似性。小波变换是傅立叶变换的发展,是空间和频率的局部变换,它在频域和时域同时具有良好的局部化特征。小波变换在图像处理中的基本思想是把图像进行多分辨率分解成不同的空间和独立的频率带的子图像,然后对子图像的系数进行处理。

根据S. Mallat的塔式分解算法,图像经过小波变换后分解成四个子图:水平方向LH、垂直方向HL和对角线方向HH的中高频细节子图和低频逼近子图LL。低频部分还可以继续分解,产生三个高频带系列LHn、HLn、HHn(n=1,2,3)和一个低频带LL3(见图1)。


图1中的LL3表示小波变换分解级数决定的最大尺度、最小分辨率下对原始图像的最佳逼近,它的同级特征和原理图相似,图像大部分能量集中于此。高频带系列代表图像的边缘和纹理。

2.2 小波变换的应用

小波分析的应用领域十分广泛,它包括:数学领域的许多学科;信号分析、图象处理;量子力学、理论物理;军事电子对抗与武器的智能化;计算机分类与识别;音乐与语言的人工合成;医学成像与诊断;地震勘探数据处理;大型机械的故障诊断等方面;例如,在数学方面,它已用于数值分析、构造快速数值方法、曲线曲面构造、微分方程求解、控制论等。在信号分析方面的滤波、去噪声、压缩、传递等。在图象处理方面的图象压缩、分类、识别与诊断,去污等。在医学成像方面的减少B超、CT、核磁共振成像的时间,提高分辨率等。
  ⑴小波分析用于信号与图象压缩是小波分析应用的一个重要方面。它的特点是压缩比高,压缩速度快,压缩后能保持信号与图象的特征不变,且在传递中可以抗干扰。基于小波分析的压缩方法很多,比较成功的有小波包最好基方法,小波域纹理模型方法,小波变换零树压缩,小波变换向量压缩等。
  ⑵小波在信号分析中的应用也十分广泛。它可以用于边界的处理与滤波、时频分析、信噪分离与提取弱信号、求分形指数、信号的识别与诊断以及多尺度边缘检测等。
  ⑶在工程技术等方面的应用。包括计算机视觉、计算机图形学、曲线设计、湍流、远程宇宙的研究与生物医学方面。
从图像处理的角度看,小波变换存在以下几个优点:
 ⑴小波分解可以覆盖整个频域(提供了一个数学上完备的描述)
 ⑵小波变换通过选取合适的滤波器,可以极大的减小或去除所提取得不同特征之间的相关性
 ⑶小波变换具有“变焦”特性,在低频段可用高频率分辨率和低时间分辨率(宽分析窗口),在高频段,可用低频率分辨率和高时间分辨率(窄分析窗口)
 ⑷小波变换实现上有快速算法(Mallat小波分解算法)

3.DWT变换域数字水印技术

3.1数字水印嵌入技术

图像的水印技术根据水印嵌入的方式可以分为两类:时/空域技术(水印被直接嵌入在图像的亮度值中)和变换域技术(将图像做某种数学变换,然后水印被嵌入于变换系数中)。早期人们对水印的研究基本上是基于时空域的,算法相对简单,实时性较强,但在鲁棒性上不如变换域算法。目前变换域方法正日益普遍,有DCT、DWT、DFT变换域算法。

变换域算法的优点是:1、水印信息分布到空间域的所有像素上,有利于提高水印的不可见性。2、能方便的与HVS(人类视觉系统)的某些特性结合。3、很好的鲁棒性,对图像压缩、常用的图像滤波以及噪声均有一定的抵抗力。离散余弦变换是从图像空间到频率空间的全局变换,由于离散余弦变换的全局本质,在变换空间中任何一个数据的误差都会影响到图像中的每一个像素。利用小波变换把原始图像分解成多频段的图像,能适应人眼的视觉特性且使得水印的嵌入和检测可分多个层次进行,小波变换域数字水印方法见具有时空域方法和DCT变换域方法的优点。

在一系列信号处理后,如果观察者的主观感觉图像的变化不大,那么图像处理前后低、中频的小波系数的改变幅度同样有限,另外系数幅值改变的方向(变大或变小)在多数情况下也不同,因此,低、中频系数的平均改变幅度十分有限。

本算法选取部分低、中频系数并分成一定大小的系数块,通过量化系数块的平均值来嵌入水印序列。

3.1.1 选择系数

设X(m,n)是一幅大小为M*N灰度级为2“的灰度图像(1≤m≤M ,1≤n≤N),其中M,N,a为正整数。对X(m,n)进行l层(l为正整数)小波分解,得到3×l个细节图像和一个低频近似图像,用Xk,l(mi,nj)k=h,v ,d;l=1,2,…,l;mi=1,2,…,M/2l ;nj=1,2,…,N/2l 表示选择的小波系数,其中l表示分解的层次,k=h,v,d分别表示第l层水平、垂直和对角方向的子图像。考虑到量化低频子图可能产生较大失真,因此不在其中嵌入水印,而选择除低频外的中频系数[3]

3.1.2 分块并计算每块的平均值

根据嵌入的信息量和对算法鲁棒性的要求,块越大,水印的鲁棒性越好,但嵌入的水印比特少。把XK,l (mi,nj)分成一定大小的块,用Block (s,t)表示XK,l (mi,nj)中大小为s×t的系数块,其中s=1,2,…,mi ,t=1,2,…,nj,b为正整数,代表该块的编号。其平均值为Ave =∑Block(s,t)/(s*t):其中 ∑Block 为块内系数幅值的累计和。

3.1.3  量化

水印序列w的嵌入是通过对Ave 的量化完成的,例如:量化成奇数代表嵌入“1”,量化成偶数相当于嵌入“0”。根据对鲁棒性和隐藏性的折中考虑,设量化间隔△l,l=1,2,…,l表示分解层数,对于低频的第l层,由于系数幅值极大,可以作较大间隔的量化,对第l-1,…,1层次作间隔逐渐减小的量化。

根据wi ={0,1}将Ave 量化到与之最近的奇、偶点。用Dat(i,j)表示Block 中的一个小波系数,量化后的该系数用Dat ′(i,j)表示,其中i=1,2,…,s;j=1,2,…,t。

设T=Ave/△l,Turdat=rem([T],2)其中[]表示四舍五入取整,rem 表示求[T] 除以2的余数。

若Turdat与wi相同,则量化的小波系数为

Dat′(i,j)=Dat(i,j)+[T]×△l-Ave

若Turdat与wi不同,小波系数按下列量化

Dat′(i,j)=Dat(i,j)+([T]+1)×△l–Ave,T≥[T]

Dat′(i,j)=Dat(i,j)+([T]-1)×△–Ave,T<[T]

3.1.4 重构

使用相同的小波基,通过小波逆变换生成含有水印的图像,并将小波基、小波分解层数、选择的系数区域、分块方法、量化间隔、奇偶对应关系记录形成密钥[4]

3.2 数字水印提取技术

水印的提取由嵌入方式来决定,它是嵌入方式的逆过程。首先对要检测的图像进行小波变换,根据密钥确定嵌入水印的位置,并对水印进行置乱处理的逆运算。可以通过计算归一化互相关函数Nc和峰值信噪比Rpsnr 来度量该水印算法的鲁棒性和透明性。

计算参数:(公式自己查找)

1) 归一化互相关函数Nc

2) 峰值信噪比Rpsnr

4. 实验结果分析

在原图像中加入水印图像后,原图像与含水印图像相关系数为0.9644,原图像与提取水印后图像相关系数为0.9308。当对原图和含水印图进行JPEG压缩后,原图峰值信噪比为33.70dB,含水印图峰值信噪比为31.95dB。在对嵌入水印的图像进行JPEG压缩、污染、裁剪、添加高斯噪声、均匀噪声等常见破坏性实验后,仍检测出水印。

从实验数据中可以看出,本文提出的算法对JEPG压缩、剪切、中值滤波具有较强的鲁棒性。同时嵌入水印的图像也有较好的透明性

在本文算法中仅仅根据小波系数块的特点来嵌入和提取水印,由于对图像水印的攻击手段多种多样,不同的攻击手段对小波系数块的改变幅度不同,会影响本文算法提取水印的可靠性;另外,小波系数分块后,对嵌入水印数据量有较大地限制。

参考文献

[1]数字水印技术及应用,孙圣和,陆哲明,科学出版社

[2]基于离散小波变换的图像数字水印算法,刘淑青,于工,青岛科技大学学报

[3]基于小波变换的彩色图像数字水印算法,严继利,陈明明,计算机与数字工程

[4]基于小波多分辨率分解的数字图像水印算法,姜明新,迟学芬,吉林大学学报

附录

备注:程序源代码

<a target=_blank id="L1" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;">  1</a>
<a target=_blank id="L2" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;">  2</a>
<a target=_blank id="L3" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;">  3</a>
<a target=_blank id="L4" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;">  4</a>
<a target=_blank id="L5" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;">  5</a>
<a target=_blank id="L6" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;">  6</a>
<a target=_blank id="L7" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;">  7</a>
<a target=_blank id="L8" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L8" rel="#L8" style="color: rgb(102, 102, 102); text-decoration: none;">  8</a>
<a target=_blank id="L9" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L9" rel="#L9" style="color: rgb(102, 102, 102); text-decoration: none;">  9</a>
<a target=_blank id="L10" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L10" rel="#L10" style="color: rgb(102, 102, 102); text-decoration: none;"> 10</a>
<a target=_blank id="L11" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L11" rel="#L11" style="color: rgb(102, 102, 102); text-decoration: none;"> 11</a>
<a target=_blank id="L12" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L12" rel="#L12" style="color: rgb(102, 102, 102); text-decoration: none;"> 12</a>
<a target=_blank id="L13" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L13" rel="#L13" style="color: rgb(102, 102, 102); text-decoration: none;"> 13</a>
<a target=_blank id="L14" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L14" rel="#L14" style="color: rgb(102, 102, 102); text-decoration: none;"> 14</a>
<a target=_blank id="L15" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L15" rel="#L15" style="color: rgb(102, 102, 102); text-decoration: none;"> 15</a>
<a target=_blank id="L16" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L16" rel="#L16" style="color: rgb(102, 102, 102); text-decoration: none;"> 16</a>
<a target=_blank id="L17" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L17" rel="#L17" style="color: rgb(102, 102, 102); text-decoration: none;"> 17</a>
<a target=_blank id="L18" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L18" rel="#L18" style="color: rgb(102, 102, 102); text-decoration: none;"> 18</a>
<a target=_blank id="L19" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L19" rel="#L19" style="color: rgb(102, 102, 102); text-decoration: none;"> 19</a>
<a target=_blank id="L20" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L20" rel="#L20" style="color: rgb(102, 102, 102); text-decoration: none;"> 20</a>
<a target=_blank id="L21" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L21" rel="#L21" style="color: rgb(102, 102, 102); text-decoration: none;"> 21</a>
<a target=_blank id="L22" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L22" rel="#L22" style="color: rgb(102, 102, 102); text-decoration: none;"> 22</a>
<a target=_blank id="L23" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L23" rel="#L23" style="color: rgb(102, 102, 102); text-decoration: none;"> 23</a>
<a target=_blank id="L24" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L24" rel="#L24" style="color: rgb(102, 102, 102); text-decoration: none;"> 24</a>
<a target=_blank id="L25" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L25" rel="#L25" style="color: rgb(102, 102, 102); text-decoration: none;"> 25</a>
<a target=_blank id="L26" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L26" rel="#L26" style="color: rgb(102, 102, 102); text-decoration: none;"> 26</a>
<a target=_blank id="L27" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L27" rel="#L27" style="color: rgb(102, 102, 102); text-decoration: none;"> 27</a>
<a target=_blank id="L28" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L28" rel="#L28" style="color: rgb(102, 102, 102); text-decoration: none;"> 28</a>
<a target=_blank id="L29" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L29" rel="#L29" style="color: rgb(102, 102, 102); text-decoration: none;"> 29</a>
<a target=_blank id="L30" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L30" rel="#L30" style="color: rgb(102, 102, 102); text-decoration: none;"> 30</a>
<a target=_blank id="L31" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L31" rel="#L31" style="color: rgb(102, 102, 102); text-decoration: none;"> 31</a>
<a target=_blank id="L32" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L32" rel="#L32" style="color: rgb(102, 102, 102); text-decoration: none;"> 32</a>
<a target=_blank id="L33" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L33" rel="#L33" style="color: rgb(102, 102, 102); text-decoration: none;"> 33</a>
<a target=_blank id="L34" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L34" rel="#L34" style="color: rgb(102, 102, 102); text-decoration: none;"> 34</a>
<a target=_blank id="L35" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L35" rel="#L35" style="color: rgb(102, 102, 102); text-decoration: none;"> 35</a>
<a target=_blank id="L36" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L36" rel="#L36" style="color: rgb(102, 102, 102); text-decoration: none;"> 36</a>
<a target=_blank id="L37" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L37" rel="#L37" style="color: rgb(102, 102, 102); text-decoration: none;"> 37</a>
<a target=_blank id="L38" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L38" rel="#L38" style="color: rgb(102, 102, 102); text-decoration: none;"> 38</a>
<a target=_blank id="L39" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L39" rel="#L39" style="color: rgb(102, 102, 102); text-decoration: none;"> 39</a>
<a target=_blank id="L40" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L40" rel="#L40" style="color: rgb(102, 102, 102); text-decoration: none;"> 40</a>
<a target=_blank id="L41" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L41" rel="#L41" style="color: rgb(102, 102, 102); text-decoration: none;"> 41</a>
<a target=_blank id="L42" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L42" rel="#L42" style="color: rgb(102, 102, 102); text-decoration: none;"> 42</a>
<a target=_blank id="L43" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L43" rel="#L43" style="color: rgb(102, 102, 102); text-decoration: none;"> 43</a>
<a target=_blank id="L44" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L44" rel="#L44" style="color: rgb(102, 102, 102); text-decoration: none;"> 44</a>
<a target=_blank id="L45" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L45" rel="#L45" style="color: rgb(102, 102, 102); text-decoration: none;"> 45</a>
<a target=_blank id="L46" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L46" rel="#L46" style="color: rgb(102, 102, 102); text-decoration: none;"> 46</a>
<a target=_blank id="L47" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L47" rel="#L47" style="color: rgb(102, 102, 102); text-decoration: none;"> 47</a>
<a target=_blank id="L48" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L48" rel="#L48" style="color: rgb(102, 102, 102); text-decoration: none;"> 48</a>
<a target=_blank id="L49" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L49" rel="#L49" style="color: rgb(102, 102, 102); text-decoration: none;"> 49</a>
<a target=_blank id="L50" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L50" rel="#L50" style="color: rgb(102, 102, 102); text-decoration: none;"> 50</a>
<a target=_blank id="L51" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L51" rel="#L51" style="color: rgb(102, 102, 102); text-decoration: none;"> 51</a>
<a target=_blank id="L52" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L52" rel="#L52" style="color: rgb(102, 102, 102); text-decoration: none;"> 52</a>
<a target=_blank id="L53" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L53" rel="#L53" style="color: rgb(102, 102, 102); text-decoration: none;"> 53</a>
<a target=_blank id="L54" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L54" rel="#L54" style="color: rgb(102, 102, 102); text-decoration: none;"> 54</a>
<a target=_blank id="L55" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L55" rel="#L55" style="color: rgb(102, 102, 102); text-decoration: none;"> 55</a>
<a target=_blank id="L56" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L56" rel="#L56" style="color: rgb(102, 102, 102); text-decoration: none;"> 56</a>
<a target=_blank id="L57" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L57" rel="#L57" style="color: rgb(102, 102, 102); text-decoration: none;"> 57</a>
<a target=_blank id="L58" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L58" rel="#L58" style="color: rgb(102, 102, 102); text-decoration: none;"> 58</a>
<a target=_blank id="L59" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L59" rel="#L59" style="color: rgb(102, 102, 102); text-decoration: none;"> 59</a>
<a target=_blank id="L60" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L60" rel="#L60" style="color: rgb(102, 102, 102); text-decoration: none;"> 60</a>
<a target=_blank id="L61" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L61" rel="#L61" style="color: rgb(102, 102, 102); text-decoration: none;"> 61</a>
<a target=_blank id="L62" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L62" rel="#L62" style="color: rgb(102, 102, 102); text-decoration: none;"> 62</a>
<a target=_blank id="L63" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L63" rel="#L63" style="color: rgb(102, 102, 102); text-decoration: none;"> 63</a>
<a target=_blank id="L64" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L64" rel="#L64" style="color: rgb(102, 102, 102); text-decoration: none;"> 64</a>
<a target=_blank id="L65" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L65" rel="#L65" style="color: rgb(102, 102, 102); text-decoration: none;"> 65</a>
<a target=_blank id="L66" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L66" rel="#L66" style="color: rgb(102, 102, 102); text-decoration: none;"> 66</a>
<a target=_blank id="L67" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L67" rel="#L67" style="color: rgb(102, 102, 102); text-decoration: none;"> 67</a>
<a target=_blank id="L68" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L68" rel="#L68" style="color: rgb(102, 102, 102); text-decoration: none;"> 68</a>
<a target=_blank id="L69" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L69" rel="#L69" style="color: rgb(102, 102, 102); text-decoration: none;"> 69</a>
<a target=_blank id="L70" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L70" rel="#L70" style="color: rgb(102, 102, 102); text-decoration: none;"> 70</a>
<a target=_blank id="L71" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L71" rel="#L71" style="color: rgb(102, 102, 102); text-decoration: none;"> 71</a>
<a target=_blank id="L72" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L72" rel="#L72" style="color: rgb(102, 102, 102); text-decoration: none;"> 72</a>
<a target=_blank id="L73" href="http://blog.csdn.net/xuanyuanaosheng/article/details/23612587#L73" rel="#L73" style="color: rgb(102, 102, 102); text-decoration: none;"> 73</a>

% 开发平台为win8+matlabR2012
% matlab源代码:(注意:代码在matlab2012上测试运行通过,如果是matlab2007的话请将图像转换为灰度图像,利用函数rgb2gray)
% 通过对话框读入原始图像、水印图像,图像格式为.bmp
[fname,pname] = uigetfile('*.bmp','请选择图片:')
% ori_pic = imread('ori_pic.bmp','bmp');
ori_pic = imread([pname,fname],'bmp');
subplot(2,2,1);
imshow(ori_pic);
title('原图像');
[fname,pname] = uigetfile('*.bmp','请选择水印图片:')
watermark = imread([pname,fname],'bmp');
subplot(2,2,2);
imshow(watermark);
title('水印图像');
% 对原始图像进行处理:double()处理,进行小波分解 haar小波基
ori_pic_trans = double(ori_pic);
watermark_trans = double(watermark);
[Cwr,Swr] = wavedec2(watermark_trans,1,'haar');
[Cr,Sr] = wavedec2(ori_pic_trans,2,'haar');
a = 0.06;
for k = 0:1:size(Cr,2)/size(Cwr,2)-1
Cr(1+size(Cr,2)/4+k*size(Cwr,2)/4 : size(Cr,2)/4+(k+1)*size(Cwr,2)/4) = Cr(1+size(Cr,2)/4+k*size(Cwr,2)/4 : size(Cr,2)/4+(k+1)*size(Cwr,2)/4)+a*Cwr(1+size(Cwr,2)/4:size(Cwr,2)/2);
Cr(1+size(Cr,2)/2+k*size(Cwr,2)/4 : size(Cr,2)/2+(k+1)*size(Cwr,2)/4) = Cr(1+size(Cr,2)/2+k*size(Cwr,2)/4 : size(Cr,2)/2+(k+1)*size(Cwr,2)/4)+a*Cwr(1+size(Cwr,2)/2:3*size(Cwr,2)/4);
Cr(1+3*size(Cr,2)/4+k*size(Cwr,2)/4 : 3*size(Cr,2)/4+(k+1)*size(Cwr,2)/4) = Cr(1+3*size(Cr,2)/4+k*size(Cwr,2)/4 : 3*size(Cr,2)/4+(k+1)*size(Cwr,2)/4)+a*Cwr(1+3*size(Cwr,2)/4:size(Cwr,2));
end;
Cr(1:size(Cwr,2)/4) = Cr(1:size(Cwr,2)/4) + a*Cwr(1:size(Cwr,2)/4);
% 利用小波基重构图像
ori_pic_trans = waverec2(Cr,Sr,'haar');
output = uint8(round(ori_pic_trans));
subplot(2,2,3);
imshow(output,[]);
title('嵌入水印后的图像');
% 将嵌入水印后的图像添加椒盐噪声
embed_noise = imnoise(output,'salt & pepper',0.04);
subplot(2,2,4);
imshow(embed_noise);
title('加椒盐噪声后的图像');
[Ca,Sa] = wavedec2(ori_pic_trans,2,'haar');
% ori_pic0 = imread('ori_pic.bmp','bmp');
ori_pic01 = double(ori_pic(:,:,1));
[Ca1,Sa1] = wavedec2(ori_pic01,2,'haar');
Cwr(1:size(Cwr,2)/4) = (Ca(1:size(Cwr,2)/4) - Ca1(1:size(Cwr,2)/4))/a;
watermark_trans = waverec2(Cwr,Swr,'haar');
output = uint8(round(watermark_trans));
figure,
subplot(2,2,1);
imshow(output,[]);
title('提取的水印图像');
[Ca2,Sa2] = wavedec2(embed_noise,2,'haar');
Cwr(1:size(Cwr,2)/4) = (Ca(1:size(Cwr,2)/4) - Ca1(1:size(Cwr,2)/4))/a;
watermark_trans = waverec2(Cwr,Swr,'haar');
output2 = uint8(round(watermark_trans));
subplot(2,2,2);
imshow(output2,[]);
title('提取加噪声后的水印图像');

基于小波变换的数字水印研究相关推荐

  1. 基于小波变换的数字水印技术研究

    摘要:算法基于Haar小波变换,把小波系数分块,并计算每个块的平均值.在一系列信号处理之后,这些块(尤其是大的块)的平均值不会有很大改变,否则,重构的图像就与原始图像有很大差别.通过对这些块的平均值进 ...

  2. 基于小波变换的信号降噪处理及仿真研究_信号处理方法推荐--1(转载自用,侵删)...

    综述 作者:aresmiki 链接:https://www.zhihu.com/question/23701194/answer/167005497 来源:知乎 著作权归作者所有.商业转载请联系作者获 ...

  3. matlab中noisbloc,基于小波变换的微弱信号检测技术的研究.doc

    毕业论文 基于小波变换的微弱信号检测技术研究 学生姓名: 学号: 学 院: 专 业: 指导教师: 2012年 6月 基于小波变换的微弱信号检测技术研究 摘要: 微弱信号检测的目的是要提取需要检测到的微 ...

  4. 基于MATLAB的数字水印算法研究实现

    基于MATLAB的数字水印算法研究实现 一.课题背景 随着图像.音频.视频等多媒体信息以及Internet的迅速发展,多媒体信息在互联 网上的广泛传播变得及其便利,数据的交换和传输过程变得相对简单.多 ...

  5. 电压闪变matlab,基于小波变换的电压闪变检测Matlab仿真研究

    得到一个数值稳定的重构算法,要求ψm,n构成一个框架.若ψm,n构成一个框架,可求得由重构f的算法.对于该算法框架界的比很重要.由小波系数所代表的能量满足下式: 其中,Ex是信号f的能量,A,B称为框 ...

  6. matlab 载波相位估计,基于小波变换的载波相位恢复算法的研究

    刘畅安1,胡芳仁1, 2,刘昕1 (1. 南京邮电大学 光电工程学院,江苏 南京 210023: 2. 南京邮电大学 Peter Grüenberg中心,江苏 南京 210023) 摘要:在相干光通信 ...

  7. matlab dwt实现原理,基于DWT的数字水印算法的MatLab实现.pdf

    信息安全 信息技术与信息化 基于!"# 的数字水印算法的$%&'%( 实现 !)*)&%+ "%&,-.%-/)0* 1%2,3 40 !"# ( ...

  8. 基于DCT的数字水印算法

    基于MATLAB的离散余弦的数字水印系统 一.课题介绍 数字水印技术近年来得到了较大的发展,基于变换域的水印技术是目前研究的热点.数字水印是利用数字作品中普遍存在的冗余数据和随机性,把标识版权的水印信 ...

  9. 【双边滤波】基于小波变换的多尺度自适应THZ增强双边滤波器的MATLAB仿真

    1.软件版本 MATLAB2021a 2.本算法理论知识 提出了一种"基于小波变换的多尺度自适应双边滤波器"算法. 其对应的算法流程如下所示: 下面,我们从理论上限介绍一下这里所采 ...

最新文章

  1. 云机搭jdk1.8和apache-tomcat
  2. IntentService用法
  3. caffe/common.cu error: function atomicadd has already been defined
  4. 电脑cpu温度过高怎么办_网络资讯:电脑cpu占用过高处理办法
  5. python面向对象编程指南 脚本之家_Python面向对象编程之继承与多态详解
  6. 【服务器】Discuz论坛实现微信小程序(修改接口)
  7. paip.使用WORD进行拆分段落单个汉字转表格.txt
  8. PS抠发丝简单详细方法
  9. 两个tplink路由器有线桥接_新版TP-Link路由器有线桥接怎么设置?
  10. [NeRF]学习笔记(持续更新中)
  11. W ndows7安装Hp1020,Windows7系统怎么安装惠普hp1020打印机
  12. 解决vim-plug无法下载插件或者插件下载过慢的问题
  13. 物联网平台搭建教程01
  14. python datetime strftime_datetime.strftime时间输出转换
  15. k8s存储+storageclass自动创建pv+StatefulSet自动创建pvc
  16. Word2010中自动尾注添加参考文献
  17. [80一代]关于垮掉的一代
  18. linux tso gso关系,1.3.1 TSO/GSO
  19. 《2019-刘宏伟-单通道超材料孔径雷达成像算法研究》论文学习
  20. Word中 Go to endnote 出现闪退问题解决办法

热门文章

  1. 谷歌搜索技巧大全 | 谷歌高级搜索语法指令
  2. Centos7 设置合盖,关盖后也不休眠
  3. rtl8192cu_rtl8192cu推荐驱动CentOS 7
  4. i.MX8MP开发板移植USBWIFI RTL8192EU驱动
  5. 微刊:三代16S多样性文献导读
  6. 《Python网络爬虫——从入门到实践》第六章将数据存储至MySQL数据库的学习心得与总结(出错与纠正方法)
  7. 总结_两周学习情况简谈
  8. 新手入门Linux-Ubuntu20.04
  9. IDEA解决代码提示功能消失
  10. 57个国家A类竞赛 大学生最具含金量竞赛 全国性赛事A类 A类学科竞赛 大学生推荐参加竞赛