CN100517381C - Watermark Embedding and Extraction Method Based on Statistical Model of Digital Image Transform Domain Coefficients - Google Patents
Watermark Embedding and Extraction Method Based on Statistical Model of Digital Image Transform Domain Coefficients Download PDFInfo
- Publication number
- CN100517381C CN100517381C CNB2007100630434A CN200710063043A CN100517381C CN 100517381 C CN100517381 C CN 100517381C CN B2007100630434 A CNB2007100630434 A CN B2007100630434A CN 200710063043 A CN200710063043 A CN 200710063043A CN 100517381 C CN100517381 C CN 100517381C
- Authority
- CN
- China
- Prior art keywords
- watermark
- image
- digital image
- method based
- image block
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000013179 statistical model Methods 0.000 title claims description 16
- 238000000605 extraction Methods 0.000 title claims description 11
- 238000000034 method Methods 0.000 claims abstract description 57
- 230000009466 transformation Effects 0.000 claims description 31
- 230000008569 process Effects 0.000 claims description 17
- 238000012937 correction Methods 0.000 claims description 6
- 239000000654 additive Substances 0.000 claims description 4
- 230000000996 additive effect Effects 0.000 claims description 4
- 238000013139 quantization Methods 0.000 claims description 2
- 238000007639 printing Methods 0.000 abstract description 18
- 230000006835 compression Effects 0.000 description 10
- 238000007906 compression Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 7
- 238000001514 detection method Methods 0.000 description 5
- 238000001914 filtration Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000001228 spectrum Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 235000002566 Capsicum Nutrition 0.000 description 2
- 239000006002 Pepper Substances 0.000 description 2
- 241000722363 Piper Species 0.000 description 2
- 235000016761 Piper aduncum Nutrition 0.000 description 2
- 235000017804 Piper guineense Nutrition 0.000 description 2
- 235000008184 Piper nigrum Nutrition 0.000 description 2
- 150000003839 salts Chemical class 0.000 description 2
- 238000000844 transformation Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000010019 resist printing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域 technical field
本发明属于信息隐藏和数字水印技术领域,具体涉及一种基于统计模型的数字水印方法,尤其涉及一种基于数字图像变换域系数统计模型的数字水印嵌入及提取方法。The invention belongs to the technical field of information hiding and digital watermarking, and specifically relates to a digital watermarking method based on a statistical model, in particular to a digital watermark embedding and extraction method based on a statistical model of coefficients in a digital image transformation domain.
背景技术 Background technique
数字化网络技术的飞速发展对多媒体的版权保护与内容鉴别提出了新的更高的要求,数字水印技术就是应这种要求而逐步发展起来的。所谓数字水印(Digital Watermarking)就是利用人类视觉或者听觉的不敏感性往多媒体数据(如图像、音频、视频等数字信号)中添加某些冗余信息以达到信息隐藏的目的,从而可以对著作权声明、许可使用条件等进行知识产权保护。发展数字水印技术的原动力是为多媒体数据提供版权保护,但事实上数字水印在电子数据的真伪鉴别、数字产品的隐含标注以及网络的秘密通信中也有非常重要的应用。The rapid development of digital network technology puts forward new and higher requirements for multimedia copyright protection and content identification. Digital watermarking technology is gradually developed in response to this requirement. The so-called digital watermarking (Digital Watermarking) is to use the insensitivity of human vision or hearing to add some redundant information to multimedia data (such as images, audio, video and other digital signals) to achieve the purpose of information hiding, so that the copyright statement , licensing conditions, etc. for intellectual property protection. The driving force behind the development of digital watermarking technology is to provide copyright protection for multimedia data, but in fact digital watermarking also has very important applications in the authenticity identification of electronic data, implicit labeling of digital products, and secret communication on the Internet.
同时大量图像还以印刷形式存在,如商标、产品包装、书刊、证书、护照等等,当然还有以印刷形式存在的文档版权保护。打印和扫描已成为目前图像进行复制和传播的普遍方式。随着数字化技术的迅猛发展,将图像在电子数字格式和打印格式之间进行转换变得非常容易,因此设计并实现基于印刷品的数字水印的嵌入和提取算法是必要的。目前关于数字图像水印算法的研究方兴未艾并且取得了很多的成果,但这些算法主要是针对计算机网络中的数字作品,大多数算法并不能抵抗打印扫描攻击。这是由于经过打印扫描过程,即D-A(数字信号-模拟信号)和A-D(模拟信号-数字信号)两次转换之后的图像虽然看上去和原图很相似,但实际上图像的像素值发生了很大的变化。这就要求数字水印算法具有非常强的鲁棒性,才能抵抗两次格式转换。因此,寻找在打印和扫描过程中不变的数字特征,设计具有非常强的鲁棒性算法,成为数字水印技术的一个研究难点。At the same time, a large number of images still exist in printed form, such as trademarks, product packaging, books, certificates, passports, etc., and of course there are documents copyright protection in printed form. Printing and scanning have become the common way for images to be reproduced and disseminated nowadays. With the rapid development of digital technology, it becomes very easy to convert images between electronic digital format and print format, so it is necessary to design and implement the algorithm of embedding and extracting digital watermark based on printed matter. At present, research on digital image watermarking algorithms is in the ascendant and has achieved a lot of results, but these algorithms are mainly aimed at digital works in computer networks, most of which cannot resist print-scan attacks. This is because after the printing and scanning process, that is, the image after two conversions of D-A (digital signal-analog signal) and A-D (analog signal-digital signal) looks similar to the original image, but in fact the pixel value of the image has changed. a big change. This requires that the digital watermarking algorithm has very strong robustness to resist two format conversions. Therefore, finding the invariant digital features in the process of printing and scanning, and designing a very strong robust algorithm has become a research difficulty in digital watermarking technology.
数字水印按嵌入方法可以分为空间域水印和变换域水印。空间域方法通过改变载体信息的空间域特性来隐藏水印;变换域方法通过改变数据变换域的一些系数来隐藏水印。在空间域嵌入水印的两个典型算法是最低有效位算法(LSB:least significant bits)和Patchwork算法。LSB算法是R.van Schyndel等人在论文″A Digital Watermark″(R.van Schyndel,A.Z.Tirkel,C.F.Osborne,1st IEEE International Conference on Image Processing,Austin Texas USA,1994,Vol.II,pp.86-90)中提出的,在这篇论文中作者们提出将水印信息按像素点逐一插入到原始图像像素值的最低位,这可以保证嵌入的水印是不可见的。但这种算法的鲁棒性差,水印信息很容易被低通滤波或者有损压缩等基本的图像操作所破坏。Patchwork算法是W.Bender等人在论文″Techniques for DataHiding″(W.Bender,D.Gruhl,N.Morimoto,A.Lu,IBM Systems Journal,1996,35(3&4):313-336)中提出的一种基于改变图像数据统计特性的水印算法。该算法首先随机选择数目相同的两个像素点集合A和B,然后增大集合A中每个像素点的像素值,同时减少集合B中每个像素点的像素值;水印检测时可以将集合A中点的平均像素值和集合B中点的平均像素值相比较,若前者较大则认为水印存在。Patchwork算法对有损压缩、滤波以及图像裁剪有一定的抵抗力,但该方法的水印嵌入容量有限,只能嵌入一个比特的信息。According to the embedding method, digital watermarking can be divided into spatial domain watermarking and transform domain watermarking. The spatial domain method hides the watermark by changing the spatial domain characteristics of the carrier information; the transform domain method hides the watermark by changing some coefficients in the data transform domain. Two typical algorithms for embedding watermarks in the space domain are least significant bit algorithm (LSB: least significant bits) and Patchwork algorithm. The LSB algorithm is developed by R.van Schyndel et al. in the paper "A Digital Watermark" (R.van Schyndel, A.Z.Tirkel, C.F.Osborne, 1st IEEE International Conference on Image Processing, Austin Texas USA, 1994, Vol.II, pp.86- 90), in which the authors propose to insert the watermark information into the lowest bit of the original image pixel value one by one, which can ensure that the embedded watermark is invisible. However, the robustness of this algorithm is poor, and the watermark information is easily destroyed by basic image operations such as low-pass filtering or lossy compression. The Patchwork algorithm was proposed by W.Bender et al. in the paper "Techniques for DataHiding" (W.Bender, D.Gruhl, N.Morimoto, A.Lu, IBM Systems Journal, 1996, 35(3&4): 313-336) A watermarking algorithm based on changing the statistical properties of image data. The algorithm first randomly selects two pixel point sets A and B with the same number, and then increases the pixel value of each pixel point in set A, while reducing the pixel value of each pixel point in set B; when watermark detection, the set The average pixel value of the point in A is compared with the average pixel value of the point in set B, and if the former is larger, it is considered that the watermark exists. The Patchwork algorithm has certain resistance to lossy compression, filtering and image cropping, but the watermark embedding capacity of this method is limited, and only one bit of information can be embedded.
基于变换域的水印算法可以嵌入大量比特数据而不会导致视觉上的可察觉性,这类算法往往采取类似扩频的技术来隐藏数字水印信息。这类技术一般基于常用的图像变换,比如说基于分块图像的正交变换,包括离散余弦变换(DCT:Discrete Cosine Transform)、离散小波变换(DWT:Discrete WaveletTransform)、离散傅里叶变换(DFT:Discrete Fourier Transform)以及哈达马变换(Hadamard transform)等等。其中最具典型意义的一个算法是I.J.Cox等人在论文″Secure Spread Spectrum Watermarking for Multimedia″(I.J.Cox,J.Kilian,T.Leighton and T.Shamoon,IEEE Trans.on Image Processing,6,12,1673-1687,1997)中提出的基于DCT变换的扩频水印算法,该算法将水印序列(该序列是符合正态分布的随机序列)按照加性原则或者乘性原则嵌入到图像整体DCT变换的除直流分量外的若干个最大的变换系数中去,水印检测时利用原图像并根据水印嵌入方法在获取的图像中提取出一个水印序列,然后计算提取出的水印序列和真实的水印信息的相关度并利用阈值来判断图像中是否含有水印。该算法实现简单并具有较强的鲁棒性,可以抵抗一般的图像处理操作,但该算法在水印检测时需要原图像参与从而不是一种盲的水印算法。从此之后的数字水印算法大都基于变换域的扩频技术。Watermarking algorithms based on transform domain can embed a large amount of bit data without causing visual perceptibility. Such algorithms often adopt techniques like spread spectrum to hide digital watermarking information. This type of technology is generally based on commonly used image transformations, such as orthogonal transformations based on block images, including discrete cosine transform (DCT: Discrete Cosine Transform), discrete wavelet transform (DWT: Discrete Wavelet Transform), discrete Fourier transform (DFT) : Discrete Fourier Transform) and Hadamard transform (Hadamard transform) and so on. One of the most typical algorithms is the paper "Secure Spread Spectrum Watermarking for Multimedia" by I.J.Cox et al. (I.J.Cox, J.Kilian, T.Leighton and T.Shamoon, IEEE Trans.on Image Processing, 6, 12, 1673-1687, 1997) proposed a spread spectrum watermarking algorithm based on DCT transformation, which embeds the watermark sequence (the sequence is a random sequence conforming to the normal distribution) into the overall DCT transformation of the image according to the principle of additive or multiplicative In watermark detection, use the original image and extract a watermark sequence from the acquired image according to the watermark embedding method, and then calculate the correlation between the extracted watermark sequence and the real watermark information. and use the threshold to judge whether the image contains watermark. The algorithm is simple to implement and has strong robustness, which can resist general image processing operations. However, the algorithm needs the original image to participate in the watermark detection, so it is not a blind watermarking algorithm. Since then, most of the digital watermarking algorithms are based on the spread spectrum technology in the transform domain.
通过对以上现有方法的研究发现,对于打印扫描之后的图像,其单点的像素值产生了很大的变化,算法本身并不能对打印扫描之后的图像正确提取水印。所以解决此问题的根本就是寻找一种特征,该特征在经历了打印扫描过程之后还可以很好地保留,通过对它的修改并造成一种可以识别的模式来隐藏水印信息;同时为了实际应用的需要,水印算法应该要做到盲提取。上述的数字水印方法均不能完全满足这两点要求。Through the research on the above existing methods, it is found that for the image after printing and scanning, the pixel value of a single point has changed greatly, and the algorithm itself cannot correctly extract the watermark from the image after printing and scanning. So the fundamental solution to this problem is to find a feature that can be well preserved after the printing and scanning process, and hide the watermark information by modifying it and creating a recognizable pattern; at the same time, for practical applications The watermarking algorithm should achieve blind extraction. None of the above digital watermarking methods can fully meet these two requirements.
发明内容 Contents of the invention
本发明的目的是针对现有技术的缺陷,提出一种基于图像变换域系数统计模型的数字水印嵌入及提取的新方法,这种新的水印算法具有高鲁棒性,可以抵抗打印扫描攻击。图像在经过D-A和A-D两次转换之后仍旧可以采用本发明所述的方法从中提取所嵌入的水印信息。The purpose of the present invention is to propose a new method of digital watermark embedding and extraction based on the statistical model of image transform domain coefficients for the defects of the prior art. This new watermark algorithm has high robustness and can resist printing and scanning attacks. After the image undergoes D-A and A-D conversion twice, the embedded watermark information can still be extracted from the image using the method described in the present invention.
为达到以上目的,一种在数字图像中嵌入水印的方法,包括以下步骤:In order to achieve the above purpose, a method for embedding a watermark in a digital image comprises the following steps:
(1)将数字图像分块并对每个图像块做二维DCT变换;(1) divide the digital image into blocks and do two-dimensional DCT transformation to each image block;
(2)根据要嵌入的水印信息生成水印信号;(2) Generate a watermark signal according to the watermark information to be embedded;
(3)根据由步骤(2)得到的水印信号的长度,将图像块DCT变换域的中低频段系数进行分组;(3) according to the length of the watermark signal obtained by step (2), the middle and low frequency band coefficients of the image block DCT transform domain are grouped;
(4)分析每个图像块的信息复杂度和明暗程度,计算每个图像块DCT变换域中低频信道的水印嵌入强度;(4) Analyze the information complexity and brightness of each image block, and calculate the watermark embedding strength of the low-frequency channel in the DCT transform domain of each image block;
(5)选取整体水印强度,并根据由步骤(4)所述的每个信道的水印强度,通过改变由步骤(3)得到的每个信道分组中的DCT系数的期望值来嵌入水印信号;(5) choose the overall watermark strength, and according to the watermark strength of each channel described by step (4), embed the watermark signal by changing the expected value of the DCT coefficient in each channel grouping obtained by step (3);
(6)将经过上述步骤的所有图像块分别进行二维DCT逆变换便得到嵌入水印的图像。(6) Perform two-dimensional DCT inverse transformation on all the image blocks after the above steps to obtain the watermark-embedded image.
较佳地,步骤(2)中,所述水印信号是进行纠错编码后得到的待嵌入的水印位流串。Preferably, in step (2), the watermark signal is a watermark bit stream string to be embedded obtained after error correction coding.
进一步,所述的水印位流串是通过对水印信号进行BCH(Bose,Ray-Chaudhuri,Hocquenghem)纠错编码的方式生成。Further, the watermark bit stream string is generated by performing BCH (Bose, Ray-Chaudhuri, Hocquenghem) error correction coding on the watermark signal.
较佳地,步骤(2)中所述的水印位流串的长度和(3)中所述图像块DCT变换域中低频段系数分组的个数相同。Preferably, the length of the watermark bit stream in step (2) is the same as the number of low frequency band coefficient groups in the DCT domain of the image block in (3).
进一步,所述的每个中低频段系数分组中信道的个数相同或者尽可能地相同。Further, the number of channels in each middle and low frequency band coefficient group is the same or the same as possible.
较佳地,步骤(4)中,所述的每个图像块的信息复杂度为图像块的信息熵ek,信息熵ek是通过如下基于灰度值量化的公式计算得出:Preferably, in step (4), the information complexity of each image block is the information entropy e k of the image block, and the information entropy e k is calculated by the following formula based on gray value quantization:
其中,每个图像块的大小为N×N,xn,m k表示图像的灰度值,k是图像块的标号,(n,m)是图像块内位置的标号;Wherein, the size of each image block is N * N, x n, m k represents the gray value of image, k is the label of image block, (n, m) is the label of position in image block;
较佳地,步骤(4)中,所述的每个图像块的明暗程度fk是通过如下的公式计算得出:Preferably, in step (4), the brightness f k of each image block is calculated by the following formula:
其中,xk表示标号为k的图像块的平均灰度值,T+和T-是预先设定好的两个阈值,实践经验表明我们可以取T+=T-=50;Among them, x k represents the average gray value of the image block labeled k, T + and T - are two preset thresholds, practical experience shows that we can take T + = T - = 50;
较佳地,步骤(4)中所述的每个图像块DCT变换的每个信道的水印嵌入强度,是通过每个图像块的信息熵ek和明暗程度fk按照下面的公式计算得到:Preferably, the watermark embedding strength of each channel of the DCT transformation of each image block described in step (4) is calculated according to the following formula through the information entropy e k and the degree of lightness f k of each image block:
较佳地,步骤(5)中所述的水印嵌入过程,根据选取的整体水印强度和由(4)得到的每个信道的水印强度使用加性水印嵌入方式修改每个信道分组中的系数的期望值。Preferably, in the watermark embedding process described in step (5), according to the selected overall watermark strength and the watermark strength of each channel obtained by (4), use an additive watermark embedding method to modify the coefficients in each channel group expectations.
较佳地,步骤(5)中所述的水印嵌入过程,当该分组中嵌入水印信号为1时,则增大该分组中的每个系数使该分组的系数期望值为正;否则当该分组中嵌入水印信号为0时,则减小该分组中的每个系数使该分组的系数期望值为负。Preferably, in the watermark embedding process described in step (5), when the embedded watermark signal in the grouping is 1, then increase each coefficient in the grouping to make the coefficient expectation value of the grouping positive; otherwise when the grouping When the embedded watermark signal is 0, reduce each coefficient in the group to make the coefficient expectation value of the group negative.
一种从数字图像中提取水印信息的方法,包括以下步骤:A method for extracting watermark information from a digital image, comprising the following steps:
(1)获取数字图像并对其分块然后对每个图像块进行二维DCT变换;(1) Obtain a digital image and divide it into blocks and then carry out two-dimensional DCT transformation to each image block;
(2)计算每个信道分组中系数的期望值或者说求出该信道分组中所有系数的和,若期望值为正则认为与该分组相对应的水印信号为1,否则认为与该分组相对应的水印信号为0;(2) Calculate the expected value of the coefficient in each channel group or calculate the sum of all coefficients in the channel group. If the expected value is positive, the watermark signal corresponding to the group is considered to be 1, otherwise the watermark corresponding to the group is considered signal is 0;
(3)对上述得到的二进制字符串解码得到水印信息。(3) Decode the binary string obtained above to obtain watermark information.
本发明的效果在于:采用本发明所述的方法,可以成功地实现数字水印在打印扫描前后的嵌入和提取;同时该方法可以嵌入的信息量较大;另外还可以抵抗一般的图像处理操作和高强度的噪音攻击;并且水印提取时不需要原始图像参与也不需要进行水印参数估计。因此,本方法是一种高鲁棒性的盲水印算法,具有广泛商业应用前景。The effect of the present invention is: adopting the method described in the present invention can successfully realize the embedding and extraction of digital watermarks before and after printing and scanning; at the same time, the method can embed a large amount of information; in addition, it can also resist general image processing operations and High-intensity noise attack; and the watermark extraction does not require the participation of the original image or watermark parameter estimation. Therefore, this method is a highly robust blind watermarking algorithm with broad commercial application prospects.
我们知道,自然图像分块DCT变换固定频率的系数分布是关于原点对称的,从而其期望值为0。图像的打印扫描过程相当于图像在空域叠加了独立同分布的噪音,于是在经历了打印扫描过程之后图像分块DCT变换的交流系数仍旧遵循某种关于原点对称的分布,从而其交流系数的期望值仍旧为0。在本发明中,人为地改变了图像分块DCT变换的交流系数的分布使其期望值为正或者为负,图像在经过打印扫描之后这一性质还可以保留下来,从而可以成功地实现数字水印在打印扫描前后的嵌入和提取。We know that the coefficient distribution of fixed-frequency DCT transformation of natural image blocks is symmetrical about the origin, so its expected value is 0. The printing and scanning process of the image is equivalent to superimposing the image with independent and identically distributed noise in the airspace, so after the printing and scanning process, the AC coefficient of the DCT transformation of the image block still follows a certain distribution symmetrical about the origin, so the expected value of the AC coefficient Still 0. In the present invention, the distribution of the AC coefficients of the image block DCT transformation is artificially changed to make the expected value positive or negative, and this property can be preserved after the image is printed and scanned, so that the digital watermark can be successfully realized in Embeddings and extractions before and after printing scans.
附图说明 Description of drawings
图1A是在数字图像中嵌入水印的流程图;Fig. 1A is the flowchart of embedding watermark in digital image;
图1B是在数字图像中提取水印的流程图;Fig. 1B is the flowchart of extracting watermark in digital image;
图2是尺寸为512×512的‘Lena’灰度图像示意图,图像大小为257KB;Figure 2 is a schematic diagram of the 'Lena' grayscale image with a size of 512×512, and the image size is 257KB;
图3是二维DCT变换域的中低频段示意图,阴影部分是用于嵌入水印的信道;Figure 3 is a schematic diagram of the middle and low frequency bands in the two-dimensional DCT transform domain, and the shaded part is the channel used to embed the watermark;
图4是使用本方法嵌入了长度为127bits水印信息的‘Lena’图像示意图,其中PSNR=39.17dB,整体水印强度a=4,使用的BCH纠错编码是(127,78,7);Fig. 4 is a schematic diagram of a 'Lena' image embedded with 127bits watermark information using this method, wherein PSNR=39.17dB, the overall watermark strength a=4, and the BCH error correction code used is (127,78,7);
图5是对嵌入水印后的图像加了高斯噪音和盐椒噪音所得到的图像的示意图;Fig. 5 is a schematic diagram of an image obtained by adding Gaussian noise and salt and pepper noise to the image after embedding the watermark;
图6是对嵌入水印后的图像裁剪四分之一得到的图像示意图;Fig. 6 is a schematic diagram of an image obtained by cropping a quarter of an image embedded with a watermark;
图7是对嵌入水印后的图像作低通滤波得到的图像示意图;Fig. 7 is a schematic diagram of an image obtained by performing low-pass filtering on an image embedded with a watermark;
图8是对嵌入水印后的图像作JPEG压缩得到的图像,其中JPEG压缩质量为20%,压缩后的图像大小为15.4KB;Figure 8 is the image obtained by JPEG compression on the image embedded with watermark, wherein the JPEG compression quality is 20%, and the compressed image size is 15.4KB;
图9是对嵌入水印后的图像作JPEG压缩得到的图像,其中JPEG压缩质量为10%,压缩后的图像大小为7.93KB;Fig. 9 is the image obtained by JPEG compression on the image embedded with the watermark, wherein the JPEG compression quality is 10%, and the compressed image size is 7.93KB;
图10A是对嵌入水印后的图像打印扫描所得到的图像示意图;FIG. 10A is a schematic diagram of an image obtained by printing and scanning an image embedded with a watermark;
图10B是对图10A所显示的图像进行截取并缩放到尺寸为512×512所得到的图像的示意图;FIG. 10B is a schematic diagram of an image obtained by intercepting and scaling the image shown in FIG. 10A to a size of 512×512;
图11A是对嵌入水印后的图像打印扫描所得到的图像示意图;FIG. 11A is a schematic diagram of an image obtained by printing and scanning an image embedded with a watermark;
图11B是对图11A所显示的图像进行截取并缩放到尺寸为512×512所得到的图像的示意图。FIG. 11B is a schematic diagram of an image obtained by cropping and scaling the image shown in FIG. 11A to a size of 512×512.
具体实施方式 Detailed ways
下面结合附图对本发明的具体实施方式做进一步的描述。The specific embodiment of the present invention will be further described below in conjunction with the accompanying drawings.
1:水印嵌入过程1: Watermark embedding process
如图1所示,一种在数字图像中嵌入水印的方法,包括以下步骤:As shown in Figure 1, a method for embedding a watermark in a digital image comprises the following steps:
(1)将如图2所示的一幅灰度图像(或者彩色图像的一个通道)分成大小为N×N的块然后对每个图像块进行二维DCT变换得到变换域系数。本实施例中,取图像分块的大小为N=8。具体的说,假定灰度图像(或者彩色图像的一个通道)为(1) Divide a grayscale image (or a channel of a color image) as shown in Figure 2 into N×N blocks, and then perform two-dimensional DCT transformation on each image block to obtain transform domain coefficients. In this embodiment, the size of the image block is taken as N=8. Specifically, assume that the grayscale image (or one channel of a color image) is
其中xn,m k代表像素点的灰度值,k是图像块的标号,(n,m)是图像块内位置的标号。对每个图像块进行二维DCT变换得到变换域系数Among them, x n, m k represent the gray value of the pixel, k is the label of the image block, and (n, m) is the label of the position in the image block. Perform two-dimensional DCT transformation on each image block to obtain transform domain coefficients
其中二维DCT变换的公式为The formula of the two-dimensional DCT transformation is
其中,如果u=0,则
(2)根据要嵌入的水印信息生成二进制字符串,对二进制字符串进行纠错编码得到待嵌入的水印信号:w1,w2,......,wL。其中wl取值1或者0。将图像块的中低频信道(2) Generate a binary string according to the watermark information to be embedded, and perform error correction coding on the binary string to obtain the watermark signal to be embedded: w 1 , w 2 , . . . , w L . Where w l takes a value of 1 or 0. The middle and low frequency channels of the image block
Λ={(u,v,k):N1≤u+v≤N2,1≤k≤K}Λ={(u, v, k): N 1 ≤ u+v ≤ N 2 , 1 ≤ k ≤ K}
分成L组Divided into L group
并使得每个分组中所含信道的个数λl=#Λl相同或者尽可能地相同。本实施例中,将图像块的中低频信道分成127组,使得每个分组中所含信道的个数为709或者710。如图3所示,这里我们选取的中低频段的界限为N1=3和N2=6。And make the number of channels λ l = #Λ l in each group the same or as much as possible. In this embodiment, the middle and low frequency channels of the image block are divided into 127 groups, so that the number of channels contained in each group is 709 or 710. As shown in FIG. 3 , the boundaries of the middle and low frequency bands we choose here are N 1 =3 and N 2 =6.
(3)按照公式(EQ1),(EQ2)和(EQ3)计算出每个信道的水印强度au,v k。选取整体水印强度a>0并按照加性水印方式对将水印信号wl嵌入到信道分组Λl的每个信道中:(3) Calculate the watermark strength a u, v k of each channel according to formulas (EQ1), (EQ2) and (EQ3). Select the overall watermark strength a > 0 and embed the watermark signal w l into each channel of the channel group Λ l according to the additive watermarking method:
(4)对每个嵌入水印的图像块作二维DCT逆变换得到嵌入水印后的图像。其中二维DCT逆变换的公式为(4) Perform two-dimensional DCT inverse transform on each image block embedded with watermark to obtain the image after embedding watermark. The formula of the two-dimensional DCT inverse transform is
如图4所示,我们对长度为78比特的水印信息使用参数为(127,78,7)的BCH纠错编码,并选取整体水印强度a=4。As shown in Figure 4, we use the BCH error correction coding with parameters (127, 78, 7) for the watermark information with a length of 78 bits, and select the overall watermark strength a=4.
2:水印提取过程2: Watermark extraction process
一种从数字图像中提取水印的方法,包括以下步骤:A method for extracting a watermark from a digital image, comprising the following steps:
(1)将获取的灰度图像(或者彩色图像的一个通道)分成大小为N×N的块(按照和水印嵌入过程相同的方法,本实施例中N=8)然后对每个图像块进行二维DCT变换得到变换域系数。假定得到的变换域系数为(1) Divide the acquired grayscale image (or a channel of the color image) into N×N blocks (according to the same method as the watermark embedding process, N=8 in this embodiment) and then perform The two-dimensional DCT transform obtains the transform domain coefficients. Assume that the obtained transform domain coefficients are
(2)按照和水印嵌入过程相同的分组方式来计算每个分组信道的系数的期望值或者说计算水印提取子(2) According to the same grouping method as the watermark embedding process, calculate the expected value of the coefficient of each grouping channel or calculate the watermark extractor
其中l∈{1,2,......,L}。如果水印提取子Tl>0则认为水印信号
(3)对由(2)得到的水印位流串进行解码,得到实际隐藏的水印信息。(3) For the watermark bit stream string obtained by (2) Decode to get the actual hidden watermark information.
下面简要的解释一下本发明算法的理论依据。我们将说明为什么本水印嵌入提取方法可以抵抗噪音的攻击。假设包含水印的图像在空域受到了独立同分布的噪音攻击(这也可以近似的认为是打印扫描过程对图像产生的影响),就是说我们获取的灰度图像(或者彩色图像的一个通道)The theoretical basis of the algorithm of the present invention is briefly explained below. We will show why our watermark embedding extraction method is resistant to noise attacks. Assuming that the image containing the watermark is attacked by independent and identically distributed noise in the air domain (this can also be approximated as the impact of the printing and scanning process on the image), that is to say, the grayscale image we obtained (or a channel of the color image)
是灰度图像(或者彩色图像的一个通道)is a grayscale image (or one channel of a color image)
在空域叠加了一个独立同分布的噪音场,就是说An independent and identically distributed noise field is superimposed in the airspace, that is,
其中
注意到二维DCT变换是一个正交变换,从而Note that the two-dimensional DCT transform is an orthogonal transform, so
(1)
(2)对于固定的信道(u,v),随机变量
(3)如果(u,v)≠0,则随机变量gu,v k的期望为0。(3) If (u, v)≠0, then the expectation of the random variable g u, v k is 0.
则对于水印检测子Tl我们可以得到Then for the watermark detector Tl we can get
于是then
其中指标集合Λl,u,v的定义是where the index set Λ l, u, v is defined as
Λl,u,v={k:(u,v,k)∈Λl}。Λ l, u, v = {k: (u, v, k) ∈ Λ l }.
假设图像Y的二维DCT变换的信道(u,v)的系数分布是pu,v,我们知道当(u,v)≠0时pu,v是关于原点对称的函数,从而其期望值为0。注意到在水印标号l和信道标号(u,v)固定并且集合Λl,u,v包含足够多的元素时,集合
同时,由前面的讨论可知,集合
从而方程(EQ4)可以简化为Thus equation (EQ4) can be simplified as
注意到每个系数au,v k都是正数,于是水印检测子Tl的符号可以决定水印信号为‘0’或者‘1’。Note that each coefficient a u, v k is a positive number, so the sign of the watermark detector T l can determine the watermark signal as '0' or '1'.
最后再通过几个实例来说明本发明所述的在数字图像中嵌入和提取水印方法的鲁棒性。图5是对嵌入水印后的图像加了高斯噪音和盐椒噪音所得到的图像,这时图像质量已经遭到了严重的破坏但仍旧可以从中成功提取水印信息。图6是将嵌入水印后的图像裁剪掉右下角的四分之一,仍可以从中成功提取水印信息,如果对图像裁剪掉其它的部分也可以从中提取水印信息。图7是对嵌入水印后的图像作低通滤波之后得到的图像,这时图像产生了平滑,我们可以从中成功提取水印信息。图8是对嵌入水印后的图像作JPEG压缩之后得到的图像,其中JPEG压缩质量为20%,压缩后的图像大小为15.4KB,我们可以从中成功提取水印信息。图9是对嵌入水印后的图像作JPEG压缩之后得到的图像,其中JPEG压缩质量为10%,压缩后的图像大小为7.93KB,这时图像质量遭到了明显的破坏已经失去了使用价值,提取水印信息失败,水印提取成功率为107/127=0.8425。图10A是对嵌入水印后的图像打印扫描之后得到的图像;其中图像的输出DPI是150,通过京驰打印机C850在600DPI下打印,图像打印在纸上的尺寸是8.67cm×8.67cm,然后经过惠普扫描仪ScanJet4890在600DPI下扫描;经过上述过程之后的图像以电子格式存储在计算机内,得到的是带白色边框的尺寸为2416×2408的图像,其中为了说明方便我们在扫描图像最外部加上一个像素的黑色边框以说明扫描图像的边界。图10B是我们通过对图10A进行图像边界提取并对打印扫描过程所产生的图像倾斜角度进行估计(本实施案例中的图像倾斜角度是0.22度)然后对图像顺时针旋转0.22度使之位置水平,最后将旋转后的图像去掉白色边框进行截取并缩放到尺寸为512×512的图像,通过本发明中的水印检测算法我们可以从中成功提取水印信息。图11A是对嵌入水印后的图像打印扫描之后得到的图像;其中图像的输出DPI是300,通过京驰打印机C850在600DPI下打印,图像打印在纸上的尺寸是4.33cm×4.33cm,然后经过惠普扫描仪ScanJet4890在600DPI下扫描;经过上述过程之后的图像以电子格式存储在计算机内,得到的是带白色边框的尺寸为1420×1444的图像,其中为了说明方便我们在扫描图像最外部加上一个像素的黑色边框以说明扫描图像的边界。图11B是我们通过对图11A进行图像边界提取并对打印扫描过程所产生的图像倾斜角度进行估计(本实施案例中的图像倾斜角度是0.12度)然后对图像顺时针旋转0.12度使之位置水平,最后将旋转后的图像去掉白色边框进行截取并缩放到尺寸为512×512的图像,通过本发明中的水印检测算法我们可以从中成功提取水印信息。Finally, several examples are used to illustrate the robustness of the method for embedding and extracting watermarks in digital images described in the present invention. Figure 5 is the image obtained by adding Gaussian noise and salt and pepper noise to the watermarked image. At this time, the image quality has been seriously damaged, but the watermark information can still be successfully extracted from it. Figure 6 shows that the lower right quarter of the embedded watermark image is cut off, and the watermark information can still be successfully extracted from it. If other parts of the image are cut off, the watermark information can also be extracted from it. Figure 7 is the image obtained after low-pass filtering the embedded watermarked image. At this time, the image is smooth, and we can successfully extract the watermark information from it. Figure 8 is the image obtained after JPEG compression of the embedded watermarked image, where the JPEG compression quality is 20%, and the compressed image size is 15.4KB, from which we can successfully extract the watermark information. Figure 9 is the image obtained after JPEG compression of the embedded watermarked image. The JPEG compression quality is 10%, and the compressed image size is 7.93KB. At this time, the image quality has been obviously damaged and has lost its use value. If the watermark information fails, the watermark extraction success rate is 107/127=0.8425. Figure 10A is the image obtained after printing and scanning the watermarked image; the output DPI of the image is 150, and it is printed at 600DPI by Jingchi printer C850. The size of the image printed on the paper is 8.67cm×8.67cm, and then passed The HP scanner ScanJet4890 scans at 600DPI; the image after the above process is stored in the computer in electronic format, and the obtained image is an image with a size of 2416×2408 with a white border. For the convenience of illustration, we add A one-pixel black border to illustrate the boundaries of the scanned image. Figure 10B shows that we extract the image boundary from Figure 10A and estimate the tilt angle of the image generated during the printing and scanning process (the tilt angle of the image in this implementation case is 0.22 degrees) and then rotate the image clockwise by 0.22 degrees to make it horizontal , and finally remove the white frame from the rotated image to intercept and scale it to an image with a size of 512×512, from which we can successfully extract watermark information through the watermark detection algorithm in the present invention. Figure 11A is the image obtained after printing and scanning the watermarked image; the output DPI of the image is 300, and it is printed by Jingchi printer C850 at 600DPI. The size of the image printed on the paper is 4.33cm×4.33cm, and then passed The HP scanner ScanJet4890 scans at 600DPI; the image after the above process is stored in the computer in electronic format, and the obtained image is a 1420×1444 image with a white border. For the convenience of illustration, we add A one-pixel black border to illustrate the boundaries of the scanned image. Figure 11B shows that we extract the image boundary from Figure 11A and estimate the tilt angle of the image generated during the printing and scanning process (the tilt angle of the image in this implementation case is 0.12 degrees) and then rotate the image clockwise by 0.12 degrees to make it horizontal , and finally remove the white frame from the rotated image to intercept and scale it to an image with a size of 512×512, from which we can successfully extract watermark information through the watermark detection algorithm in the present invention.
本发明所述的方法并不限于具体实施方式中所述的实施例,本领域技术人员根据本发明的技术方案得出其他的实施方式,同样属于本发明的技术创新范围。The method described in the present invention is not limited to the examples described in the specific implementation manners, and those skilled in the art can obtain other implementation manners according to the technical solutions of the present invention, which also belong to the technical innovation scope of the present invention.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100630434A CN100517381C (en) | 2007-01-25 | 2007-01-25 | Watermark Embedding and Extraction Method Based on Statistical Model of Digital Image Transform Domain Coefficients |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100630434A CN100517381C (en) | 2007-01-25 | 2007-01-25 | Watermark Embedding and Extraction Method Based on Statistical Model of Digital Image Transform Domain Coefficients |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101004831A CN101004831A (en) | 2007-07-25 |
CN100517381C true CN100517381C (en) | 2009-07-22 |
Family
ID=38703945
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2007100630434A Expired - Fee Related CN100517381C (en) | 2007-01-25 | 2007-01-25 | Watermark Embedding and Extraction Method Based on Statistical Model of Digital Image Transform Domain Coefficients |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100517381C (en) |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101122995B (en) * | 2007-09-11 | 2010-10-13 | 北京大学 | Binary image digit water mark embedding, extraction method and device |
GB2462851B (en) * | 2008-08-21 | 2010-09-15 | 4Sight Imaging Ltd | Image processing |
CN101901470A (en) * | 2010-02-10 | 2010-12-01 | 桂林电子科技大学 | Image tampering detection and recovery method based on semi-fragile watermarking in energy domain |
CN102081788B (en) * | 2011-01-11 | 2012-07-25 | 浙江工商大学 | Robust zero-watermarking algorithm against dual print-and-scan based on direct coefficient comparison |
CN102938841B (en) * | 2012-11-30 | 2015-02-11 | 西安空间无线电技术研究所 | Method for hiding information in bearing image, image quality evaluation method and information transmission method |
CN103428503B (en) * | 2013-07-24 | 2016-08-10 | 北京印刷学院 | A kind of method and apparatus of watermark extracting in Digital Media |
CN104978706B (en) * | 2014-04-11 | 2019-12-20 | 深圳力维智联技术有限公司 | Watermark embedding and extracting method, device and system based on Fourier descriptor |
CN104486627B (en) * | 2014-12-23 | 2017-07-28 | 成都华栖云科技有限公司 | A kind of embedding algorithm, detection and extracting method |
CN106485641B (en) * | 2016-08-31 | 2019-10-01 | 南京师范大学 | A kind of tile data digital watermarking generation insertion and extracting method based on QR code |
CN107181957A (en) * | 2017-04-28 | 2017-09-19 | 安徽四创电子股份有限公司 | A kind of video watermark source tracing method based on hadoop platform architectures |
CN111028850B (en) * | 2018-10-10 | 2022-09-06 | 中国移动通信集团浙江有限公司 | Audio watermark embedding method and audio watermark extracting method |
CN110390621B (en) * | 2019-07-16 | 2023-07-07 | 鲁东大学 | A Blind Watermarking Method for Color Digital Image in DCT Domain Based on Variable Step Size |
CN111640052B (en) * | 2020-05-22 | 2020-12-29 | 南京信息工程大学 | A Robust Large-capacity Digital Watermarking Method Based on Marker Code |
CN112017097B (en) * | 2020-08-27 | 2024-03-08 | 豪威科技(武汉)有限公司 | Watermark adding method, watermark adding device, terminal and computer readable storage medium |
-
2007
- 2007-01-25 CN CNB2007100630434A patent/CN100517381C/en not_active Expired - Fee Related
Non-Patent Citations (2)
Title |
---|
Blind Adaptive Shift Length Watermarking For Digital Images. Yu-Len,Huang.2006 IEEE International Conference on Systems, Man, and Cybernetics. 2006 * |
一种基于DCT的模糊聚类自适应水印算法. 吴健珍,谢剑英.计算机工程,第30卷第20期. 2004 * |
Also Published As
Publication number | Publication date |
---|---|
CN101004831A (en) | 2007-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100517381C (en) | Watermark Embedding and Extraction Method Based on Statistical Model of Digital Image Transform Domain Coefficients | |
US7181042B2 (en) | Digital authentication with digital and analog documents | |
US6683966B1 (en) | Watermarking recursive hashes into frequency domain regions | |
Feng et al. | Reversible watermarking: Current status and key issues. | |
Kang et al. | A DWT-DFT composite watermarking scheme robust to both affine transform and JPEG compression | |
CN101122996B (en) | Digital image embedding, extraction method and device | |
Divecha et al. | Implementation and performance analysis of DCT-DWT-SVD based watermarking algorithms for color images | |
JP3834281B2 (en) | Watermark embedding method, transmission method, restoration method and apparatus therefor | |
Temi et al. | A robust image watermarking using multiresolution analysis of wavelet | |
Song et al. | Recent advances and classification of watermarking techniques in digital images | |
Khalifa et al. | A robust non-blind algorithm for watermarking color images using multi-resolution wavelet decomposition | |
Singh et al. | Transform domain techniques for image steganography | |
Al-Gindy et al. | Watermarking of colour images in the DCT domain using Y channel | |
Narasimhulu et al. | A hybrid watermarking scheme using contourlet transform and singular value decomposition | |
Sajedi et al. | Adaptive steganography method based on contourlet transform | |
CN111681152B (en) | Anti-printing scanning digital watermark method for printed picture | |
Al-Gindy et al. | A graphical user interface watermarking technique for the copyright protection of colour images using colour watermarks | |
CN109410115B (en) | Adaptive capacity image blind watermark embedding and extracting method based on SIFT feature points | |
Pandhwal et al. | An overview of digital watermarking techniques | |
Alakk et al. | A new watermarking algorithm for scanned grey PDF files using DWT and hash function | |
Patra et al. | CRT-based self-recovery watermarking technique for multimedia applications | |
CN116542840B (en) | Robust watermarking method based on news text image | |
Nguyen | A watermark algorithm against de-synchronization attacks | |
Soman | Berkeley wavelet transform based image watermarking | |
Tang et al. | A neural network based blind watermarking scheme for digital images |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090722 Termination date: 20180125 |
|
CF01 | Termination of patent right due to non-payment of annual fee |