[go: up one dir, main page]

CN112132731A - DWT-SVD domain adaptive robust watermarking algorithm adopting preset PSNR - Google Patents

DWT-SVD domain adaptive robust watermarking algorithm adopting preset PSNR Download PDF

Info

Publication number
CN112132731A
CN112132731A CN202010948552.0A CN202010948552A CN112132731A CN 112132731 A CN112132731 A CN 112132731A CN 202010948552 A CN202010948552 A CN 202010948552A CN 112132731 A CN112132731 A CN 112132731A
Authority
CN
China
Prior art keywords
watermark
blocks
embedding
block
image
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.)
Granted
Application number
CN202010948552.0A
Other languages
Chinese (zh)
Other versions
CN112132731B (en
Inventor
王文冰
桑永宣
毛艳芳
张玲
杨华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou University of Light Industry
Original Assignee
Zhengzhou University of Light Industry
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Zhengzhou University of Light Industry filed Critical Zhengzhou University of Light Industry
Priority to CN202010948552.0A priority Critical patent/CN112132731B/en
Publication of CN112132731A publication Critical patent/CN112132731A/en
Application granted granted Critical
Publication of CN112132731B publication Critical patent/CN112132731B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/005Robust watermarking, e.g. average attack or collusion attack resistant
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0202Image watermarking whereby the quality of watermarked images is measured; Measuring quality or performance of watermarking methods; Balancing between quality and robustness

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

本发明属于图像信息处理技术领域,具体涉及一种采用预设PSNR的DWT‑SVD域自适应鲁棒水印算法。该方法利用离散小波变换的抗攻击性与奇异值分解的稳定性,通过修改图像左奇异矩阵第一列元素之间的大小关系嵌入水印,并修改右奇异矩阵实现质量补偿。该方法不同于其他算法使用固定嵌入参数或反复实验得到嵌入参数,水印的嵌入强度依赖于嵌入参数,本发明不仅建立了嵌入参数、载体图像、水印信息之间的关联,并且不需要牺牲算法的时间复杂度,嵌入完成后的像素溢出与修正增强了算法的可靠性。

Figure 202010948552

The invention belongs to the technical field of image information processing, and in particular relates to a DWT-SVD domain adaptive robust watermarking algorithm using a preset PSNR. The method utilizes the attack resistance of discrete wavelet transform and the stability of singular value decomposition, embeds watermark by modifying the size relationship between the elements in the first column of the left singular matrix of the image, and modifies the right singular matrix to achieve quality compensation. This method is different from other algorithms that use fixed embedding parameters or repeated experiments to obtain embedding parameters. The embedding strength of the watermark depends on the embedding parameters. The present invention not only establishes the correlation between the embedding parameters, the carrier image and the watermark information, but also does not need to sacrifice the algorithm's performance. Time complexity, pixel overflow and correction after the embedding is completed enhances the reliability of the algorithm.

Figure 202010948552

Description

采用预设PSNR的DWT-SVD域自适应鲁棒水印算法DWT-SVD Domain Adaptive Robust Watermarking Algorithm Using Preset PSNR

技术领域technical field

本发明属于图像信息处理技术领域,具体涉及一种采用预设PSNR的DWT-SVD域自适应鲁棒水印算法。The invention belongs to the technical field of image information processing, and in particular relates to a DWT-SVD domain adaptive robust watermarking algorithm using a preset PSNR.

背景技术Background technique

网络开放为多媒体流通带来便利,同时也使各类内容信息的知识产权保护面临前所未有的挑战。在各类电子信息保护手段中,具备隐蔽性与安全性等特点的电子水印引起学者们关注。电子水印指在如图像、视频、音频等载体信息中隐秘嵌入被称为水印的电子信息,在提取方通过提取水印的准确程度表明载体所有权、完整性等。The opening of the network brings convenience to the circulation of multimedia, and also makes the intellectual property protection of various content information face unprecedented challenges. Among all kinds of electronic information protection methods, electronic watermarks with the characteristics of concealment and security have attracted the attention of scholars. Electronic watermark refers to the secret embedding of electronic information called watermark in carrier information such as images, videos, audios, etc. The extractor shows the ownership and integrity of the carrier by extracting the accuracy of the watermark.

传统图像水印根据功能分为两类:鲁棒水印与脆弱水印,分别用于保护图像版权与图像内容完整性。其中,鲁棒水印是指通过修改载体内容嵌入的水印,在图像遭受各种攻击后,仍能提取出可识别的水印信息。嵌入对载体信息的修改必然会引发图像质量的下降。所以,鲁棒水印性能衡量指标主要有三个:容量、鲁棒性、可视性。这三个指标此消彼长,当水印容量确定时,为追求鲁棒性,水印方法需牺牲水印嵌入后的图像质量,反之亦然。尽量使载体的信息负载量、水印图像的质量与遭受攻击后被提取的水印的完整性这三者同时达到最优,一直以来都是鲁棒水印方法设计的宗旨。Traditional image watermarks are divided into two categories according to their functions: robust watermarks and fragile watermarks, which are used to protect image copyright and image content integrity respectively. Among them, the robust watermark refers to the watermark embedded by modifying the carrier content, and the recognizable watermark information can still be extracted after the image is subjected to various attacks. Embedding the modification of carrier information will inevitably lead to the degradation of image quality. Therefore, there are three main indicators of robust watermarking performance: capacity, robustness, and visibility. These three indicators trade off one another. When the watermark capacity is determined, in order to pursue robustness, the watermarking method needs to sacrifice the image quality after the watermark is embedded, and vice versa. Trying to make the information load of the carrier, the quality of the watermark image and the integrity of the watermark extracted after being attacked to achieve the optimum at the same time, has always been the purpose of the robust watermarking method design.

水印嵌入过程根据嵌入域可分为空域水印与频域水印。空域水印直接修改空域像素嵌入水印,虽然计算复杂度低,但图像处理对像素干扰较大,导致鲁棒性下降。利用频域转换的能量聚集能力、多重解析能力、体现图像时域或频域特征的优点,基于频域的算法具备更强的鲁棒性和图像质量,从而在水印算法中被广泛采用。频域算法中,DCT、DWT、RDWT、FrFT是常见转换方式,多种转换使算法综合不同转换的优点,最终达到提高算法性能的目的,成为近年来水印算法的研究热点。The watermark embedding process can be divided into spatial domain watermarking and frequency domain watermarking according to the embedding domain. Spatial watermarking directly modifies the spatial pixel embedding watermark. Although the computational complexity is low, the image processing interferes greatly with the pixels, resulting in a decrease in robustness. Taking advantage of the energy-gathering ability, multi-resolution ability, and embodying the time-domain or frequency-domain features of the frequency-domain transformation, the frequency-domain-based algorithm has stronger robustness and image quality, so it is widely used in watermarking algorithms. Among the frequency domain algorithms, DCT, DWT, RDWT, and FrFT are common transformation methods. Multiple transformations make the algorithm combine the advantages of different transformations, and finally achieve the purpose of improving the performance of the algorithm, which has become a research hotspot of watermarking algorithms in recent years.

鲁棒水印设计除了考虑嵌入提取过程设计之外,参数选取手段同样重要。越来越多算法使用进化算法、神经网络等人工智能技术选取参数。较之过去使用固定参数的水印算法,利用人工智能技术选取参数,可在参数、水印、载体之间建立联结,如使用粒子群优化算法(PSO)、萤火虫算法(FA)、人工蜂群优化(ABC)选择嵌入参数,均能平衡水印图像质量与鲁棒性的嵌入强度,然而这些技术无法确保水印图像达到预设质量。In addition to the design of the embedding extraction process, the parameter selection method is also important in the robust watermark design. More and more algorithms use artificial intelligence techniques such as evolutionary algorithms and neural networks to select parameters. Compared with the watermarking algorithm that used fixed parameters in the past, using artificial intelligence technology to select parameters can establish a connection between parameters, watermarks, and carriers, such as particle swarm optimization (PSO), firefly algorithm (FA), artificial bee colony optimization ( ABC) select embedding parameters, which can balance the watermark image quality and robust embedding strength, but these techniques cannot ensure that the watermark image reaches the preset quality.

发明内容SUMMARY OF THE INVENTION

针对目前的基于SVD的鲁棒水印算法存在的缺陷和问题,本发明提供一种不依赖实验反馈结果,且能确保水印图像质量的采用预设PSNR的DWT-SVD域自适应鲁棒水印算法。Aiming at the defects and problems of the current SVD-based robust watermarking algorithms, the present invention provides a DWT-SVD domain adaptive robust watermarking algorithm that does not rely on experimental feedback results and can ensure the quality of watermarked images using a preset PSNR.

本发明解决其技术问题所采用的方案是:一种采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,该算法包括以下步骤:The scheme adopted by the present invention to solve the technical problem is: a DWT-SVD domain adaptive robust watermarking algorithm that adopts preset PSNR, and the algorithm comprises the following steps:

步骤一、选取嵌入块:设载体图像为A∈RM×N,M、N为偶数,待嵌入水印W={wr|1≤r≤m},m为水印长度;将载体图像分为不重叠的分块,计算分块的熵值并计算分块与相邻块的熵值的加权平均和,再将熵值排序,选择与水印比特相同个数的分块作为嵌入块。Step 1. Select an embedding block: set the carrier image as A∈R M×N , M and N are even numbers, the watermark to be embedded W={w r |1≤r≤m}, m is the watermark length; the carrier image is divided into For non-overlapping blocks, calculate the entropy value of the block and calculate the weighted average sum of the entropy values of the block and adjacent blocks, then sort the entropy values, and select the block with the same number of watermark bits as the embedding block.

步骤二、确定自适应量化步长:将嵌入块分为当wr=1且

Figure BDA0002676124220000031
时的嵌入块和当wr=0且
Figure BDA0002676124220000032
时的嵌入块两类,两类嵌入块的序号分别记为序列S1与S2,根据载体图像DWT低频域的每个分块的奇异值、左奇异向量第一列第二、第三个元素的差值,计算S1与S2子序列水印嵌入前后图像像素的平方误差Ls1和Ls2,根据载体图像、水印和预设PSNR值,通过公式
Figure BDA0002676124220000033
计算得到自适应量化步长t。Step 2. Determine the adaptive quantization step size: divide the embedded block into when w r =1 and
Figure BDA0002676124220000031
Embedding block when and when wr = 0 and
Figure BDA0002676124220000032
There are two types of embedding blocks, the serial numbers of the two types of embedding blocks are respectively recorded as sequences S 1 and S 2 . The difference value of the elements, calculate the squared errors Ls 1 and Ls 2 of the image pixels before and after the watermark embedding of the S 1 and S 2 subsequences, according to the carrier image, the watermark and the preset PSNR value, through the formula
Figure BDA0002676124220000033
The adaptive quantization step size t is obtained by calculation.

步骤三、嵌入水印:对载体图像做一级哈尔小波变换,将低频子带划分为互不重叠的分块,对嵌入块做SVD分解并将左奇异向量的第一列第二、三个元素之间的差值量化索引调制以嵌入水印;Step 3: Embedding watermarks: Perform first-level Haar wavelet transform on the carrier image, divide the low-frequency subbands into non-overlapping blocks, perform SVD decomposition on the embedded blocks, and decompose the first column of the left singular vector, the second and third The difference between elements is quantized index modulation to embed the watermark;

步骤四、构建水印图像:对修改后的嵌入块做反向SVD分解与逆向哈尔小波转换得到水印图像;Step 4. Construct a watermark image: perform reverse SVD decomposition and reverse Haar wavelet transformation on the modified embedded block to obtain a watermark image;

步骤五、提取水印:对可能被修改的水印图像的低频子带做SVD分解,并比较奇异向量第一列第二、三元素的大小关系以提取水印。Step 5: Extract the watermark: perform SVD decomposition on the low-frequency subband of the watermark image that may be modified, and compare the magnitude relationship of the second and third elements of the first column of the singular vector to extract the watermark.

上述的采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,步骤一包括以下步骤:The above-mentioned DWT-SVD domain adaptive robust watermarking algorithm using the preset PSNR, step 1 includes the following steps:

(1)将载体图像分为不重叠的分块,每个分块包含8×8个像素,将分块集合记为

Figure BDA0002676124220000034
为向上取整符号,分块数量为
Figure BDA0002676124220000035
(1) Divide the carrier image into non-overlapping blocks, each block contains 8 × 8 pixels, and record the block set as
Figure BDA0002676124220000034
For the round-up symbol, the number of blocks is
Figure BDA0002676124220000035

(2)依次计算分块li,j的熵值

Figure BDA0002676124220000036
Figure BDA0002676124220000037
分别表示分块的视觉熵与边缘熵,计算分块与相邻块的加权平均和:(2) Calculate the entropy value of the blocks l i, j in turn
Figure BDA0002676124220000036
and
Figure BDA0002676124220000037
Represent the visual entropy and edge entropy of the block, respectively, and calculate the weighted average sum of the block and adjacent blocks:

Figure BDA0002676124220000038
Figure BDA0002676124220000038

其中max、min分别表示对变量取最大值与最小值;where max and min represent the maximum and minimum values of the variables, respectively;

(3)将Ei,j由小到大排序,选择前m个分块作为嵌入块,嵌入块的序号集合记作序列

Figure BDA0002676124220000041
S将作为提取过程的边信息。(3) Sort E i,j from small to large, select the first m blocks as the embedded block, and record the sequence number set of the embedded blocks as the sequence
Figure BDA0002676124220000041
S will be used as side information for the extraction process.

上述的采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,步骤二中t的计算过程为:The above-mentioned DWT-SVD domain adaptive robust watermarking algorithm using the preset PSNR, the calculation process of t in step 2 is:

对嵌入块

Figure BDA0002676124220000042
做水印嵌入后记为
Figure BDA0002676124220000043
Figure BDA0002676124220000044
Figure BDA0002676124220000045
的SVD分解形式可表示为:for embedded blocks
Figure BDA0002676124220000042
After doing the watermark embedding, it is recorded as
Figure BDA0002676124220000043
Figure BDA0002676124220000044
and
Figure BDA0002676124220000045
The SVD decomposition form of can be expressed as:

Figure BDA0002676124220000046
Figure BDA0002676124220000046

Figure BDA0002676124220000047
Figure BDA0002676124220000047

被修改的嵌入块分为两类:Modified embedding blocks fall into two categories:

1)当wr=1且

Figure BDA0002676124220000048
时的嵌入块;1) When wr = 1 and
Figure BDA0002676124220000048
Embedding block when;

2)当wr=0且

Figure BDA0002676124220000049
时的嵌入块。2) When wr = 0 and
Figure BDA0002676124220000049
Embedding block.

本实施例把二类嵌入块的序号分别记为序列S1与S2,S1与S2为S的子序列且互不交叉。第一、二类嵌入块对应的

Figure BDA00026761242200000411
不同,其具体定义为:In this embodiment, the sequence numbers of the two types of embedding blocks are respectively recorded as sequences S 1 and S 2 , and S 1 and S 2 are subsequences of S and do not intersect with each other. The first and second types of embedding blocks correspond to
Figure BDA00026761242200000411
different, which is specifically defined as:

Figure BDA00026761242200000410
Figure BDA00026761242200000410

则嵌入前后的嵌入块差值为:Then the difference between the embedded blocks before and after embedding is:

Figure BDA0002676124220000051
Figure BDA0002676124220000051

获知嵌入块元素的修改幅度后,进一步在嵌入块差值与一级哈尔小波变换后的LL子带系数的平方误差之间建立对应关系,计算LL子带系数的平方误差:After knowing the modification range of the elements of the embedded block, the corresponding relationship is further established between the difference of the embedded block and the squared error of the LL subband coefficients after the first-level Haar wavelet transform, and the squared error of the LL subband coefficients is calculated:

Figure BDA0002676124220000052
Figure BDA0002676124220000052

又知哈尔小波变换的LL子带系数与图像像素的平方误差满足It is also known that the square error of the LL subband coefficients of the Haar wavelet transform and the image pixels satisfies

Figure BDA0002676124220000053
Figure BDA0002676124220000053

已知PSNR的计算公式为:The calculation formula of known PSNR is:

Figure BDA0002676124220000054
Figure BDA0002676124220000054

Figure BDA0002676124220000055
Figure BDA0002676124220000055

其中,MAXA是矩阵A元素的最大值。where MAX A is the maximum value of the elements of matrix A.

可得

Figure BDA0002676124220000061
Available
Figure BDA0002676124220000061

即:

Figure BDA0002676124220000062
Figure BDA0002676124220000063
根据确定的图像、水印和预设PSNR值,通过公式计算得到自适应量化步长t。which is:
Figure BDA0002676124220000062
which is
Figure BDA0002676124220000063
According to the determined image, watermark and preset PSNR value, the adaptive quantization step size t is obtained by formula calculation.

上述的采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,步骤三包括以下步骤:The above-mentioned DWT-SVD domain adaptive robust watermarking algorithm using the preset PSNR, step 3 includes the following steps:

(1)对载体图像做一级哈尔小波变换,将LL子带划分为互不重叠的4×4分块,得到

Figure BDA0002676124220000064
个分块,其中的嵌入块集合记作
Figure BDA0002676124220000065
(1) Perform first-level Haar wavelet transform on the carrier image, and divide the LL subbands into non-overlapping 4×4 blocks to obtain
Figure BDA0002676124220000064
blocks, where the set of embedded blocks is denoted as
Figure BDA0002676124220000065

(2)对嵌入块

Figure BDA0002676124220000066
做SVD分解,左奇异向量
Figure BDA0002676124220000067
的第一列向量记为
Figure BDA0002676124220000068
其中第二、三个元素之间的差值记为
Figure BDA0002676124220000069
(2) For the embedded block
Figure BDA0002676124220000066
Do SVD decomposition, left singular vector
Figure BDA0002676124220000067
The first column vector of is denoted as
Figure BDA0002676124220000068
The difference between the second and third elements is recorded as
Figure BDA0002676124220000069

(3)对嵌入块

Figure BDA00026761242200000610
的差值
Figure BDA00026761242200000611
量化以嵌入水印wr,第二、三个元素的相应修改方式为:(3) For the embedded block
Figure BDA00026761242200000610
difference
Figure BDA00026761242200000611
Quantization is used to embed the watermark w r , and the corresponding modification of the second and third elements is:

if wr=1if w r = 1

Figure BDA00026761242200000612
Figure BDA00026761242200000612

Figure BDA00026761242200000613
Figure BDA00026761242200000613

if wr=0if w r = 0

Figure BDA0002676124220000071
Figure BDA0002676124220000071

Figure BDA0002676124220000072
Figure BDA0002676124220000072

其中,t为量化索引调制策略的自适应量化步长。Among them, t is the adaptive quantization step size of the quantization index modulation strategy.

上述的采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,步骤五包括以下步骤:The above-mentioned DWT-SVD domain adaptive robust watermarking algorithm using the preset PSNR, step 5 includes the following steps:

(1)对水印图像做一级哈尔小波转换后对LL子带分块,并根据嵌入块序号集合S确定提取水印的分块作为提取块;(1) After the first-level Haar wavelet transformation is performed on the watermark image, the LL subband is divided into blocks, and the block for extracting the watermark is determined as the extraction block according to the set S of the embedded block sequence numbers;

(2)对每个提取块做SVD分解,记左奇异向量U*的第一列向量为

Figure BDA0002676124220000073
第二、三元素的差值为
Figure BDA0002676124220000074
其中sr∈S;(2) Perform SVD decomposition on each extraction block, and record the first column vector of the left singular vector U * as
Figure BDA0002676124220000073
The difference between the second and third elements is
Figure BDA0002676124220000074
where s r ∈ S;

(3)依次从每一提取块提取1比特水印,提取方法为

Figure BDA0002676124220000075
最终合成完整水印。(3) Extract 1-bit watermark from each extraction block in turn, and the extraction method is as follows:
Figure BDA0002676124220000075
Finally, a complete watermark is synthesized.

本发明的有益效果:本发明得到PSNR值与量化步长、图像特征之间的关系,在确定载体图像和水印的情况下,根据预设PSNR值进行计算得到最佳量化步长,将图像质量与量化步长的对应关系明确化,无需反复嵌入提取过程即可获取保证图像质量达到预设值的量化步长,DWT转换增强了水印算法抗噪声、压缩等常见图像处理的能力,而SVD分解增加了其抗几何攻击的能力;奇异向量元素关系的稳定性在提出的算法中被利用,进一步增强鲁棒性不仅能够确保实际水印图像达到预设图像质量,而且不需要牺牲算法的时间复杂度;嵌入完成后的像素溢出与修正还增强了算法的可靠性,其不可视性与鲁棒性两方面均优于其他同类算法,在版权保护等应用场合具备实用价值。Beneficial effects of the present invention: the present invention obtains the relationship between the PSNR value, the quantization step size, and image features, and in the case of determining the carrier image and the watermark, calculates the optimal quantization step size according to the preset PSNR value, and adjusts the image quality. The corresponding relationship with the quantization step size is clarified, and the quantization step size that ensures the image quality reaches the preset value can be obtained without repeated embedding and extraction process. DWT conversion enhances the watermark algorithm’s ability to resist noise, compression and other common image processing, while SVD decomposition Increases its ability to resist geometric attacks; the stability of singular vector element relationships is exploited in the proposed algorithm, and further enhancing the robustness can not only ensure that the actual watermarked image reaches the preset image quality, but also does not need to sacrifice the time complexity of the algorithm ; The pixel overflow and correction after embedding also enhances the reliability of the algorithm. Its invisibility and robustness are superior to other similar algorithms, and it has practical value in applications such as copyright protection.

附图说明Description of drawings

图1为本发明基于自适应量化步长的水印算法流程图。FIG. 1 is a flow chart of the watermarking algorithm based on the adaptive quantization step size of the present invention.

图2为本发明嵌入过程流程图。FIG. 2 is a flow chart of the embedding process of the present invention.

图3为本发明的图像及水印列表。FIG. 3 is a list of images and watermarks of the present invention.

图4为测试图像的参数t均值与预设PSNR均值、实际PSNR均值之间的对应关系。FIG. 4 shows the correspondence between the parameter t mean value of the test image, the preset PSNR mean value, and the actual PSNR mean value.

图5为在预设PSNR为40db的前提下,嵌入水印后的测试图像及它们的嵌入参数t与实际PSNR。Figure 5 shows the test images after embedding the watermark and their embedding parameters t and the actual PSNR under the premise that the preset PSNR is 40db.

具体实施方式Detailed ways

下面结合附图和实施例对本发明进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

实施例1:本实施例提供一种采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,该水印算法主要包括以下内容,流程如图1所示。Embodiment 1: This embodiment provides a DWT-SVD domain adaptive robust watermarking algorithm using a preset PSNR. The watermarking algorithm mainly includes the following contents, and the flow is shown in FIG. 1 .

步骤一、设载体图像为512×512的灰度图Lena,待嵌入水印为32×32的二值图像,记作W={wr|1≤r≤1024}。具体嵌入步骤如下:Step 1: Let the carrier image be a 512×512 grayscale image Lena, and the watermark to be embedded is a 32×32 binary image, denoted as W={ wr |1≤r≤1024}. The specific embedding steps are as follows:

Step1:将载体图像分为不重叠的分块,每个分块包含8×8个像素;将分块集合记为L={li,j||1≤i≤64,1≤j≤64},分块数量为4096个。Step1: Divide the carrier image into non-overlapping blocks, each block contains 8×8 pixels; record the block set as L={l i,j| |1≤i≤64,1≤j≤64 }, the number of blocks is 4096.

Step2:依次计算分块li,j的熵值

Figure BDA0002676124220000081
Figure BDA0002676124220000082
分别表示分块的视觉熵与边缘熵;计算分块与相邻块的熵值的加权平均和:Step2: Calculate the entropy value of the blocks l i, j in turn
Figure BDA0002676124220000081
and
Figure BDA0002676124220000082
Represent the visual entropy and edge entropy of the block, respectively; calculate the weighted average sum of the entropy values of the block and adjacent blocks:

Figure BDA0002676124220000083
Figure BDA0002676124220000083

其中max、min分别表示对变量取最大值与最小值。where max and min represent the maximum and minimum values of the variable, respectively.

Step3:将Ei,j由小到大排序,选择前32×32个分块作为嵌入块,嵌入块的序号集合被记做序列S={sr|1≤r≤1024,1≤sr≤4096},S作为提取过程的边信息。Step3: Sort E i,j from small to large, select the first 32×32 blocks as the embedding blocks, and the sequence number set of the embedding blocks is recorded as the sequence S={s r |1≤r≤1024, 1≤s r ≤4096}, S as the side information of the extraction process.

Figure BDA0002676124220000091
分别表示图像A经过一级哈尔小波变换后的LL、LH、HL、HH子带系数。Assume
Figure BDA0002676124220000091
respectively represent the LL, LH, HL, and HH subband coefficients of the image A after the first-level Haar wavelet transform.

记水印嵌入后的低频子带系数为

Figure BDA0002676124220000092
原空域像素记为ak,l,1≤k≤M,1≤l≤N,水印图像像素记为ak,l',它们之间的关系见图2。The low-frequency subband coefficients after watermark embedding are written as
Figure BDA0002676124220000092
The original air domain pixels are denoted as ak,l , 1≤k≤M, 1≤l≤N, and the watermark image pixels are denoted as ak,l ', and the relationship between them is shown in Figure 2.

则LL子带系数与图像像素的平方误差满足如下等式:Then the squared error of the LL subband coefficients and the image pixels satisfies the following equation:

Figure BDA0002676124220000093
Figure BDA0002676124220000093

表明水印嵌入前后的图像像素的平方误差与哈尔小波变换低频子带系数的平方误差之间具备等价关系。It shows that there is an equivalent relationship between the squared error of image pixels before and after watermark embedding and the squared error of the Haar wavelet transform low-frequency subband coefficients.

Step4:对载体图像做一级哈尔小波变换,将LL子带划分为互不重叠的4×4分块,得到4096个分块,其中的嵌入块集合记作

Figure BDA0002676124220000094
Step4: Perform a first-level Haar wavelet transform on the carrier image, and divide the LL sub-band into non-overlapping 4×4 sub-blocks to obtain 4096 sub-blocks, in which the set of embedded blocks is denoted as
Figure BDA0002676124220000094

Step5:对嵌入块

Figure BDA0002676124220000095
做SVD分解,左奇异向量
Figure BDA0002676124220000096
的第一列向量记为
Figure BDA0002676124220000097
其中第二、三个元素之间的差值记为
Figure BDA0002676124220000098
Step5: Embedding the block
Figure BDA0002676124220000095
Do SVD decomposition, left singular vector
Figure BDA0002676124220000096
The first column vector of is denoted as
Figure BDA0002676124220000097
The difference between the second and third elements is recorded as
Figure BDA0002676124220000098

Step6:对嵌入块

Figure BDA0002676124220000099
的差值
Figure BDA00026761242200000910
量化以嵌入第r位水印wr,第二、三个元素的相应修改方式如下:Step6: Embedding the block
Figure BDA0002676124220000099
difference
Figure BDA00026761242200000910
Quantized to embed the rth bit watermark w r , the corresponding modifications of the second and third elements are as follows:

if wr=1if w r = 1

Figure BDA00026761242200000911
Figure BDA00026761242200000911

Figure BDA0002676124220000101
Figure BDA0002676124220000101

if wr=0if w r = 0

Figure BDA0002676124220000102
Figure BDA0002676124220000102

Figure BDA0002676124220000103
Figure BDA0002676124220000103

式(3)~(6)中,t为量化索引调制策略的自适应量化步长,量化步长t可通过公式In equations (3) to (6), t is the adaptive quantization step size of the quantization index modulation strategy, and the quantization step size t can be determined by the formula

Figure BDA0002676124220000104
二分法快速求出,其中量化步长t具体选取方式如下。
Figure BDA0002676124220000104
The bisection method can be quickly obtained, and the specific selection method of the quantization step size t is as follows.

对嵌入块

Figure BDA0002676124220000105
做水印嵌入后记为
Figure BDA0002676124220000106
Figure BDA0002676124220000107
的SVD分解形式可表示为:for embedded blocks
Figure BDA0002676124220000105
After doing the watermark embedding, it is recorded as
Figure BDA0002676124220000106
and
Figure BDA0002676124220000107
The SVD decomposition form of can be expressed as:

Figure BDA0002676124220000108
Figure BDA0002676124220000108

Figure BDA0002676124220000109
Figure BDA0002676124220000109

被修改的嵌入块可分为两类:Modified embedding blocks can be divided into two categories:

1)当wr=1且

Figure BDA00026761242200001010
时的嵌入块;1) When wr = 1 and
Figure BDA00026761242200001010
Embedding block when;

2)当wr=0且

Figure BDA00026761242200001011
时的嵌入块。2) When wr = 0 and
Figure BDA00026761242200001011
Embedding block.

本实施例把二类嵌入块的序号分别记为序列S1与S2,S1与S2为S的子序列且互不交叉。第一、二类嵌入块对应的

Figure BDA00026761242200001012
不同,其具体定义为:In this embodiment, the sequence numbers of the two types of embedding blocks are respectively recorded as sequences S 1 and S 2 , and S 1 and S 2 are subsequences of S and do not intersect with each other. The first and second types of embedding blocks correspond to
Figure BDA00026761242200001012
different, which is specifically defined as:

Figure BDA0002676124220000111
Figure BDA0002676124220000111

根据式(7)~(9)可知,嵌入前后的嵌入块差值为:According to equations (7) to (9), the difference between the embedded blocks before and after embedding is:

Figure BDA0002676124220000112
Figure BDA0002676124220000112

获知嵌入块元素的修改幅度后,进一步在嵌入块差值与一级哈尔小波变换后的LL子带系数的平方误差之间建立对应关系,即根据式(10)计算LL子带系数的平方误差:After knowing the modification range of the elements of the embedded block, the corresponding relationship is further established between the difference of the embedded block and the square error of the LL subband coefficients after the first-level Haar wavelet transform, that is, the square of the LL subband coefficients is calculated according to formula (10). error:

Figure BDA0002676124220000113
Figure BDA0002676124220000113

即:which is:

Figure BDA0002676124220000114
Figure BDA0002676124220000114

说明了低频子带系数的平方误差与嵌入块修改幅度之间存在关系。It is illustrated that there is a relationship between the squared error of the low-frequency subband coefficients and the modification magnitude of the embedding block.

已知PSNR的计算公式为:The calculation formula of known PSNR is:

Figure BDA0002676124220000121
Figure BDA0002676124220000121

Figure BDA0002676124220000122
Figure BDA0002676124220000122

其中,MAXA是矩阵A元素的最大值。where MAX A is the maximum value of the elements of matrix A.

可得

Figure BDA0002676124220000123
Available
Figure BDA0002676124220000123

即:

Figure BDA0002676124220000124
which is:
Figure BDA0002676124220000124

Figure BDA0002676124220000125
which is
Figure BDA0002676124220000125

可知等号左边与嵌入块的最大奇异值、第一列奇异向量两元素差值、水印及量化步长t有关,当图像、水印、PSNR值确定时,满足等式(16)的量化步长t可通过二分法快速求出。该量化步长选取策略结合了PSNR计算公式与基于奇异向量鲁棒性的水印算法的嵌入方式,得到量化步长t与预设图像质量的对应关系,从而无需反复嵌入提取过程即可获取保证图像质量达到预设值的量化步长。It can be seen that the left side of the equal sign is related to the maximum singular value of the embedded block, the difference between the two elements of the singular vector in the first column, the watermark and the quantization step size t. When the image, watermark and PSNR values are determined, the quantization step size of equation (16) is satisfied. t can be quickly found by the dichotomy method. The quantization step size selection strategy combines the PSNR calculation formula and the embedding method of the watermarking algorithm based on the robustness of singular vectors, and obtains the corresponding relationship between the quantization step size t and the preset image quality, so that the guaranteed image can be obtained without repeated embedding and extraction process. The quantization step size at which the quality reaches the preset value.

Step7:对修改后的嵌入块做反向SVD分解。Step7: Perform reverse SVD decomposition on the modified embedding block.

Step8:所有嵌入块重复Step5至Step7;分块合并后替代原有LL子带,再做逆向哈尔小波转换得到水印图像。Step 8: Repeat Step 5 to Step 7 for all embedded blocks; replace the original LL subband after the blocks are merged, and then perform reverse Haar wavelet transformation to obtain a watermarked image.

二、水印提取2. Watermark extraction

Step1:先对水印图像做一级哈尔小波转换后对LL子带分块,并根据嵌入块序号集合S选取提取水印的分块作为提取块;Step1: First perform first-level Haar wavelet transformation on the watermark image, and then divide the LL sub-band into blocks, and select the block for extracting the watermark as the extraction block according to the set of embedded block serial numbers S;

Step2:对每个提取块做SVD分解,记左奇异向量U*的第一列向量为

Figure BDA0002676124220000131
第二、三元素的差值为
Figure BDA0002676124220000132
其中sr∈S。Step2: Perform SVD decomposition on each extraction block, and record the first column vector of the left singular vector U * as
Figure BDA0002676124220000131
The difference between the second and third elements is
Figure BDA0002676124220000132
where s r ∈ S.

Step3:依次从每一提取块提取1比特水印,提取方法见(18)式,最终合成完整水印。Step 3: Extract a 1-bit watermark from each extraction block in turn, the extraction method is shown in formula (18), and finally a complete watermark is synthesized.

Figure BDA0002676124220000133
Figure BDA0002676124220000133

实施例2:为验证本发明算法的效果,本实施例将从水印图像质量与水印鲁棒性两个角度出发,把本发明方法与三个同样基于SVD并且水印容量相同的算法一、二、三进行比较;四种算法的参数详见表1。Embodiment 2: In order to verify the effect of the algorithm of the present invention, the present embodiment will proceed from the two perspectives of watermark image quality and watermark robustness, and combine the method of the present invention with three algorithms that are also based on SVD and have the same watermark capacity. One, two, Three are compared; the parameters of the four algorithms are shown in Table 1.

表1四种算法的参数汇总表Table 1. Summary of parameters of the four algorithms

Figure BDA0002676124220000134
Figure BDA0002676124220000134

选取图3中的10副512×512的经典测试图像作为载体图像,32×32、48×32、48×48、64×64的二进制图像作为待嵌入水印。本文对实验结果做定量分析时,分别采用PSNR与误码率(BER)作为水印图像质量与算法鲁棒性的衡量机制,

Figure BDA0002676124220000135
表示按位异或运算符。Select 10 pairs of 512×512 classic test images in Figure 3 as carrier images, and 32×32, 48×32, 48×48, 64×64 binary images as watermarks to be embedded. In the quantitative analysis of the experimental results in this paper, PSNR and bit error rate (BER) are respectively used as the measurement mechanism of watermark image quality and algorithm robustness.
Figure BDA0002676124220000135
Represents the bitwise XOR operator.

Figure BDA0002676124220000141
Figure BDA0002676124220000141

(1)不可见性(1) Invisibility

尽量减少对原图像的影响是不可见水印算法追求的目标之一。不同于其他算法通过嵌入参数平衡图像质量与鲁棒性的关系,本发明水印算法使用预设PSNR值作为参数,反推出嵌入参数,测试图像的参数t均值与预设PSNR均值、实际PSNR均值之间的对应关系,如图4所示。Minimizing the impact on the original image is one of the goals pursued by the invisible watermarking algorithm. Different from other algorithms that balance the relationship between image quality and robustness by embedding parameters, the watermarking algorithm of the present invention uses the preset PSNR value as a parameter, and inversely derives the embedding parameter, the parameter t mean of the test image, the preset PSNR mean value and the actual PSNR mean value. The corresponding relationship between them is shown in Figure 4.

由图4可以看出,当预设PSNR为30、35、40、45、50时,十幅测试图像的嵌入参数均值及实际PSNR的均值基本重合,证明本方法能确保得到的水印图像质量达到预设值。It can be seen from Figure 4 that when the preset PSNR is 30, 35, 40, 45, and 50, the mean value of the embedded parameters of the ten test images and the mean value of the actual PSNR basically coincide, which proves that this method can ensure that the obtained watermark image quality reaches default value.

通常来说,衡量原图像与水印图像的差别使用主观与客观两种方式。在预设PSNR为40db的前提下,嵌入水印后的测试图像及它们的嵌入参数t与实际PSNR为预设PSNR等于40db的前提下,六副水印图像、它们的嵌入参数t及实际得到的PSNR如图5所示。Generally speaking, to measure the difference between the original image and the watermarked image, subjective and objective methods are used. Under the premise that the preset PSNR is 40db, the test images after embedding the watermark and their embedding parameters t and the actual PSNR are the premise that the preset PSNR is equal to 40db, the six pairs of watermark images, their embedding parameters t and the actual PSNR obtained As shown in Figure 5.

从图5中可以看出,算法确保水印图像的PSNR不低于40db,这不仅证明了本发明自适应参数选取策略的有效性,而且从主观与客观两方面说明本发明算法的水印图像质量能满足应用需求。同时表明PSNR与水印长度的关联性,从理论上说,当水印长度满足不大于64×64时,本水印方法的水印图像质量均可得到保证。As can be seen from Figure 5, the algorithm ensures that the PSNR of the watermark image is not less than 40db, which not only proves the effectiveness of the adaptive parameter selection strategy of the present invention, but also illustrates the watermark image quality performance of the algorithm of the present invention from both subjective and objective aspects. meet application requirements. At the same time, the correlation between PSNR and watermark length is shown. Theoretically, when the watermark length is less than 64×64, the watermark image quality of this watermark method can be guaranteed.

为了验证此结论,本实施例以不同尺寸的水印在Lena图像上的实验验证,结果如表2。In order to verify this conclusion, this embodiment is verified by experiments on the Lena image with watermarks of different sizes, and the results are shown in Table 2.

表2不同水印尺寸固定嵌入参数与本发明方法的PSNR比较(Lena图像)Table 2 Comparison of PSNR between fixed embedding parameters of different watermark sizes and the method of the present invention (Lena image)

Figure BDA0002676124220000151
Figure BDA0002676124220000151

由表2可以看出,当水印的大小分别为32×32、32×48、48×48、64×64时,水印图像的PSNR均能达到预设的40db,而使用固定嵌入参数的方法则无法做到这一点。It can be seen from Table 2 that when the size of the watermark is 32×32, 32×48, 48×48, 64×64, the PSNR of the watermark image can reach the preset 40db, while the method using fixed embedding parameters Can't do this.

(2)鲁棒性(2) Robustness

鲁棒性是衡量水印算法的另一指标。本发明使用BER作为衡量水印鲁棒性的指标,BER值越小,提取水印与原始水印相似性越高,即水印鲁棒性越高。为验证算法鲁棒性,本发明选择13种代表性的攻击方式,这些攻击方式既包含了诸如压缩、滤波、噪声等常见图像处理手段,也包括了诸如缩放、旋转操作的几何攻击,具体如表3所示。Robustness is another indicator to measure the watermarking algorithm. The present invention uses BER as an index to measure the robustness of the watermark. The smaller the BER value, the higher the similarity between the extracted watermark and the original watermark, that is, the higher the robustness of the watermark. In order to verify the robustness of the algorithm, the present invention selects 13 representative attack methods, which include not only common image processing methods such as compression, filtering, and noise, but also geometric attacks such as scaling and rotation operations. shown in Table 3.

表3本发明算法对不同攻击的鲁棒性Table 3 Robustness of the algorithm of the present invention to different attacks

Figure BDA0002676124220000161
Figure BDA0002676124220000161

由表3所示的当32×32的水印嵌入到六福测试图像时,面对13种攻击后提取水印的BER结果可以看出,从不同图像表现出的鲁棒性来看,Peppers、Man图像面对质量因子较低的jpeg压缩、中值滤波等图像处理时表现的抗攻击能力较弱,这与算法优先选择熵值小的块作为嵌入块及图像本身平滑区域相对较少有关。但总体来看,算法面对常见攻击时具备一定的鲁棒性,尤其针对直方图均衡化、对比度增强、缩小、旋转攻击,算法呈现出优秀的鲁棒性。As shown in Table 3, when the 32×32 watermark is embedded in the Luk Fook test image, it can be seen from the BER results of extracting the watermark after 13 kinds of attacks. From the robustness of different images, Peppers, Man images In the face of image processing such as jpeg compression and median filtering with low quality factor, the anti-attack ability is weak, which is related to the fact that the algorithm preferentially selects the block with small entropy value as the embedded block and the smooth area of the image itself is relatively small. But in general, the algorithm has a certain robustness against common attacks, especially for histogram equalization, contrast enhancement, reduction, and rotation attacks, the algorithm shows excellent robustness.

本实施例在四个水印方法的PSNR值均被设为41db左右的前提下比较它们的鲁棒性。表4和表5是当水印大小为32×32时,本文分别针对图像Lena与Peppers得到的四个水印方法的PSNR值及面对13种攻击后的水印ber值。In this embodiment, the robustness of the four watermarking methods is compared under the premise that the PSNR values of the four watermarking methods are all set to be about 41db. Tables 4 and 5 show the PSNR values of the four watermarking methods obtained in this paper for the images Lena and Peppers respectively when the watermark size is 32×32, and the watermark ber values after facing 13 kinds of attacks.

表4本发明算法与同类算法的鲁棒性比较(Lena图像)Table 4 Robustness comparison between the algorithm of the present invention and similar algorithms (Lena image)

Figure BDA0002676124220000171
Figure BDA0002676124220000171

表5本发明算法与同类算法的鲁棒性比较(Peppers图像)Table 5 Robustness comparison between the algorithm of the present invention and similar algorithms (Peppers image)

Figure BDA0002676124220000172
Figure BDA0002676124220000172

在表4与表5中,本发明的算法虽对两幅测试图像均预设PSNR均为41db,但得到的t值却不相同(0.041与0.045),这说明自适应嵌入参数的必要性。从比较结果来看,虽然四种算法都是通过改变两元素之间的关系嵌入水印,但算法二中的两个比较元素取自DCT中频系数所组成的两个矩阵的最大奇异值,它们不及分块奇异矩阵第一列元素之间的相似性强,所以从表4、5看出,在相同嵌入容量下,算法一和算法三在面对大部分攻击尤其是噪声攻击时鲁棒性优于算法二。算法一的算法在RIDWT域中嵌入水印,虽然使水印能够抗连续90度旋转、行列翻转攻击,但由于RIDWT转换中包括像素位置置换步骤,破环了图像的相邻像素值相近特性,导致算法无法抵抗JPEG压缩、中值滤波、均值滤波、尺寸缩小、高斯滤波操作。对比可知算法三的不足:无法根据不同载体动态选择嵌入参数,导致算法应用于不同图像时,需面对水印图像质量不稳定的局面。另外,本发明提出算法优于算法三,在于对熵选块的优化,这在面对jpeg压缩时有所体现。In Table 4 and Table 5, although the algorithm of the present invention presets PSNR of 41db for both test images, the obtained t values are different (0.041 and 0.045), which shows the necessity of adaptive embedding parameters. From the comparison results, although the four algorithms embed the watermark by changing the relationship between the two elements, the two comparison elements in the second algorithm are taken from the largest singular value of the two matrices composed of the DCT intermediate frequency coefficients, which are not as high as The similarity between the elements in the first column of the block singular matrix is strong, so it can be seen from Tables 4 and 5 that under the same embedding capacity, Algorithm 1 and Algorithm 3 have excellent robustness in the face of most attacks, especially noise attacks. in Algorithm 2. The algorithm of Algorithm 1 embeds a watermark in the RIDWT domain. Although the watermark can resist continuous 90-degree rotation and row-column flipping attacks, the RIDWT transformation includes a pixel position replacement step, which destroys the similarity of adjacent pixel values of the image. Not resistant to JPEG compression, median filter, mean filter, size reduction, Gaussian filter operations. The comparison shows the shortcomings of the third algorithm: the embedding parameters cannot be dynamically selected according to different carriers, which leads to the situation that the watermark image quality is unstable when the algorithm is applied to different images. In addition, the algorithm proposed by the present invention is superior to the third algorithm in the optimization of entropy block selection, which is reflected in the face of jpeg compression.

(3)运行时间(3) Running time

为了验证本文提出的量化步长选取策略在时间复杂度方面的优势,本节在基于奇异向量鲁棒性的水印算法中分别使用基于ACO的量化步长选取策略与提出的自适应量化步长选取策略,并对它们的运行时间进行比较。实验使用硬件换将为主频2.90GHz,内存8GB,软件环境为Microsoft Windows 10旗舰版与MATLAB 2018。表6是对测试图像Lena与Peppers使用两种选取策略所耗费的运行时间平均值比较,在基于ACO的选取策略中,本文设定ACO的迭代次数为50,蚁群大小为10;结果如表6所示。In order to verify the advantages of the quantization step size selection strategy proposed in this paper in terms of time complexity, this section uses the ACO-based quantization step size selection strategy and the proposed adaptive quantization step size selection in the watermarking algorithm based on singular vector robustness. strategies and compare their runtimes. The main frequency of the experiment will be 2.90GHz, the memory will be 8GB, and the software environment will be Microsoft Windows 10 Ultimate and MATLAB 2018. Table 6 is a comparison of the average running time of the two selection strategies for the test images Lena and Peppers. In the selection strategy based on ACO, this paper sets the number of iterations of ACO to 50 and the ant colony size to 10; the results are shown in the table 6 shown.

表6两种量化步长选取策略的运行时间对比Table 6 Comparison of running time of two quantization step selection strategies

Figure BDA0002676124220000191
Figure BDA0002676124220000191

由表6可以看出,两种选取策略的执行时间与水印大小成正比,但是本发明自适应量化步长选取策略的执行时间远少于基于ACO的选取策略,这表明本文提出的选取策略在时间复杂度上具有明显优势。As can be seen from Table 6, the execution time of the two selection strategies is proportional to the watermark size, but the execution time of the adaptive quantization step selection strategy of the present invention is far less than the selection strategy based on ACO, which shows that the selection strategy proposed in this paper is in the It has obvious advantages in time complexity.

以上所述仅为本发明的较佳实施例,并不限制本发明,凡在本发明的精神和原则范围内所做的任何修改、等同替换和改进,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and do not limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principle scope of the present invention shall be included in the protection scope of the present invention. Inside.

Claims (5)

1.一种采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,其特征在于:包括以下步骤:1. a DWT-SVD domain adaptive robust watermarking algorithm that adopts preset PSNR, is characterized in that: comprise the following steps: 步骤一、选取嵌入块:设载体图像为A∈RM×N,M、N为偶数,待嵌入水印W={wr|1≤r≤m},m为水印长度;将载体图像分为不重叠的分块,计算分块的熵值并计算分块与相邻块的熵值的加权平均和,再将熵值排序,选择与水印比特相同个数的分块作为嵌入块,嵌入块的序号集合记作序列S;Step 1. Select an embedding block: set the carrier image as A∈R M×N , M and N are even numbers, the watermark to be embedded W={w r |1≤r≤m}, m is the watermark length; the carrier image is divided into For non-overlapping blocks, calculate the entropy value of the block and calculate the weighted average sum of the entropy values of the block and adjacent blocks, then sort the entropy values, and select the blocks with the same number of watermark bits as the embedded block. The set of serial numbers is denoted as sequence S; 步骤二、确定自适应量化步长:将嵌入块分为当wr=1且
Figure FDA0002676124210000011
时的嵌入块和当wr=0且
Figure FDA0002676124210000012
时的嵌入块两类,两类嵌入块的序号分别记为序列S1与S2,根据载体图像DWT低频域的每个分块的奇异值、左奇异向量第一列第二、第三个元素的差值,计算S1与S2子序列水印嵌入前后图像像素的平方误差Ls1和Ls2,根据载体图像、水印和预设PSNR值,通过公式
Figure FDA0002676124210000013
计算得到自适应量化步长t;
Step 2. Determine the adaptive quantization step size: divide the embedded block into when w r =1 and
Figure FDA0002676124210000011
Embedding block when and when wr = 0 and
Figure FDA0002676124210000012
There are two types of embedding blocks, the serial numbers of the two types of embedding blocks are respectively recorded as sequences S 1 and S 2 . The difference value of the elements, calculate the squared errors Ls 1 and Ls 2 of the image pixels before and after the watermark embedding of the S 1 and S 2 subsequences, according to the carrier image, the watermark and the preset PSNR value, through the formula
Figure FDA0002676124210000013
Calculate the adaptive quantization step size t;
步骤三、嵌入水印:对载体图像做一级哈尔小波变换,将低频子带划分为互不重叠的分块,对嵌入块做SVD分解并将左奇异向量的第一列第二、三个元素之间的差值量化索引调制以嵌入水印;Step 3: Embedding watermarks: Perform first-level Haar wavelet transform on the carrier image, divide the low-frequency subbands into non-overlapping blocks, perform SVD decomposition on the embedded blocks, and decompose the first column of the left singular vector, the second and third The difference between elements is quantized index modulation to embed the watermark; 步骤四、构建水印图像:对修改后的嵌入块做反向SVD分解与逆向哈尔小波转换得到水印图像;Step 4. Construct a watermark image: perform reverse SVD decomposition and reverse Haar wavelet transformation on the modified embedded block to obtain a watermark image; 步骤五、提取水印:对可能被修改的水印图像的低频子带做SVD分解,并比较奇异向量第一列第二、三元素的大小关系以提取水印。Step 5: Extract the watermark: perform SVD decomposition on the low-frequency subband of the watermark image that may be modified, and compare the magnitude relationship of the second and third elements of the first column of the singular vector to extract the watermark.
2.根据权利要求1所述的采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,其特征在于:步骤一包括以下步骤:2. the DWT-SVD domain adaptive robust watermarking algorithm that adopts preset PSNR according to claim 1, is characterized in that: step 1 comprises the following steps: (1)将载体图像分为不重叠的分块,每个分块包含8×8个像素,将分块集合记为
Figure FDA0002676124210000021
Figure FDA0002676124210000022
为向上取整符号,分块数量为
Figure FDA0002676124210000023
(1) Divide the carrier image into non-overlapping blocks, each block contains 8 × 8 pixels, and record the block set as
Figure FDA0002676124210000021
Figure FDA0002676124210000022
For the round-up symbol, the number of blocks is
Figure FDA0002676124210000023
(2)依次计算分块li,j的熵值
Figure FDA0002676124210000024
Figure FDA0002676124210000025
Figure FDA0002676124210000026
分别表示分块的视觉熵与边缘熵,计算分块与相邻块的加权平均和:
(2) Calculate the entropy value of the blocks l i, j in turn
Figure FDA0002676124210000024
Figure FDA0002676124210000025
and
Figure FDA0002676124210000026
Represent the visual entropy and edge entropy of the block, respectively, and calculate the weighted average sum of the block and adjacent blocks:
Figure FDA0002676124210000027
Figure FDA0002676124210000027
其中max、min分别表示对变量取最大值与最小值;where max and min represent the maximum and minimum values of the variables, respectively; (3)将Ei,j由小到大排序,选择前m个分块作为嵌入块,嵌入块的序号集合记作序列
Figure FDA0002676124210000028
S将作为提取过程的边信息。
(3) Sort E i,j from small to large, select the first m blocks as the embedded block, and record the sequence number set of the embedded blocks as the sequence
Figure FDA0002676124210000028
S will be used as side information for the extraction process.
3.根据权利要求1所述的采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,其特征在于:步骤二中t的计算过程为:3. the DWT-SVD domain adaptive robust watermarking algorithm that adopts preset PSNR according to claim 1, is characterized in that: in step 2, the calculation process of t is: 对嵌入块
Figure FDA0002676124210000029
做水印嵌入后记为
Figure FDA00026761242100000210
Figure FDA00026761242100000211
Figure FDA00026761242100000212
的SVD分解形式可表示为:
for embedded blocks
Figure FDA0002676124210000029
After doing the watermark embedding, it is recorded as
Figure FDA00026761242100000210
Figure FDA00026761242100000211
and
Figure FDA00026761242100000212
The SVD decomposition form of can be expressed as:
Figure FDA00026761242100000213
Figure FDA00026761242100000213
Figure FDA00026761242100000214
Figure FDA00026761242100000214
被修改的嵌入块分为当wr=1且
Figure FDA00026761242100000215
时的嵌入块和当wr=0且
Figure FDA00026761242100000216
时的嵌入块两类,把二类嵌入块的序号分别记为序列S1与S2,S1与S2为S的子序列且互不交叉,第一、二类嵌入块对应的
Figure FDA00026761242100000217
不同,其具体定义为:
The modified embedding block is divided into when wr = 1 and
Figure FDA00026761242100000215
Embedding block when and when wr = 0 and
Figure FDA00026761242100000216
When there are two types of embedding blocks, the serial numbers of the second types of embedding blocks are respectively recorded as sequences S 1 and S 2 , S 1 and S 2 are subsequences of S and do not cross each other. The first and second types of embedding blocks correspond to
Figure FDA00026761242100000217
different, which is specifically defined as:
Figure FDA0002676124210000031
Figure FDA0002676124210000031
则嵌入前后的嵌入块差值为Then the difference between the embedded blocks before and after embedding is
Figure FDA0002676124210000032
Figure FDA0002676124210000032
获知嵌入块元素的修改幅度后,进一步在嵌入块差值与一级哈尔小波变换后的LL子带系数的平方误差之间建立对应关系,计算LL子带系数的平方误差:After knowing the modification range of the elements of the embedded block, the corresponding relationship is further established between the difference of the embedded block and the squared error of the LL subband coefficients after the first-level Haar wavelet transform, and the squared error of the LL subband coefficients is calculated:
Figure FDA0002676124210000033
Figure FDA0002676124210000033
又知哈尔小波变换的LL子带系数与图像像素的平方误差满足It is also known that the square error of the LL subband coefficients of the Haar wavelet transform and the image pixels satisfies
Figure FDA0002676124210000034
Figure FDA0002676124210000034
则:
Figure FDA0002676124210000041
but:
Figure FDA0002676124210000041
已知PSNR的计算公式为:The calculation formula of known PSNR is:
Figure FDA0002676124210000042
Figure FDA0002676124210000042
Figure FDA0002676124210000043
Figure FDA0002676124210000043
其中,MAXA是矩阵A元素的最大值。where MAX A is the maximum value of the elements of matrix A. 可得
Figure FDA0002676124210000044
Available
Figure FDA0002676124210000044
即:
Figure FDA0002676124210000045
Figure FDA0002676124210000046
根据确定的图像、水印和PSNR值,通过公式计算得到自适应量化步长t。
which is:
Figure FDA0002676124210000045
which is
Figure FDA0002676124210000046
According to the determined image, watermark and PSNR values, the adaptive quantization step size t is obtained by formula calculation.
4.根据权利要求1所述的采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,其特征在于:步骤三包括以下步骤:4. the DWT-SVD domain adaptive robust watermarking algorithm adopting preset PSNR according to claim 1, is characterized in that: step 3 comprises the following steps: (1)对载体图像做一级哈尔小波变换,将LL子带划分为互不重叠的4×4分块,得到
Figure FDA0002676124210000047
个分块,其中的嵌入块集合记作
Figure FDA0002676124210000048
(1) Perform first-level Haar wavelet transform on the carrier image, and divide the LL subbands into non-overlapping 4×4 blocks to obtain
Figure FDA0002676124210000047
blocks, where the set of embedded blocks is denoted as
Figure FDA0002676124210000048
(2)对嵌入块
Figure FDA0002676124210000049
做SVD分解,左奇异向量
Figure FDA00026761242100000410
的第一列向量记为
Figure FDA00026761242100000411
其中第二、三个元素之间的差值记为
Figure FDA00026761242100000412
(2) For the embedded block
Figure FDA0002676124210000049
Do SVD decomposition, left singular vector
Figure FDA00026761242100000410
The first column vector of is denoted as
Figure FDA00026761242100000411
The difference between the second and third elements is recorded as
Figure FDA00026761242100000412
(3)对嵌入块
Figure FDA00026761242100000413
的差值
Figure FDA00026761242100000414
量化以嵌入水印wr,第二、三个元素的相应修改方式为:
(3) For the embedded block
Figure FDA00026761242100000413
difference
Figure FDA00026761242100000414
Quantization is used to embed the watermark w r , and the corresponding modification of the second and third elements is:
if wr=1if w r = 1
Figure FDA0002676124210000051
Figure FDA0002676124210000051
Figure FDA0002676124210000052
Figure FDA0002676124210000052
if wr=0if w r = 0
Figure FDA0002676124210000053
Figure FDA0002676124210000053
Figure FDA0002676124210000054
Figure FDA0002676124210000054
其中,t为量化索引调制策略的自适应量化步长。Among them, t is the adaptive quantization step size of the quantization index modulation strategy.
5.根据权利要求1所述的采用预设PSNR的DWT-SVD域自适应鲁棒水印算法,其特征在于:步骤五包括以下步骤:5. the DWT-SVD domain adaptive robust watermarking algorithm that adopts preset PSNR according to claim 1, is characterized in that: step 5 comprises the following steps: (1)对水印图像做一级哈尔小波转换后对LL子带分块,并根据嵌入块序号集合S确定提取水印的分块作为提取块;(1) After the first-level Haar wavelet transformation is performed on the watermark image, the LL subband is divided into blocks, and the block for extracting the watermark is determined as the extraction block according to the set S of the embedded block sequence numbers; (2)对每个提取块做SVD分解,记左奇异向量U*的第一列向量为
Figure FDA0002676124210000055
第二、三元素的差值为
Figure FDA0002676124210000056
其中sr∈S;
(2) Perform SVD decomposition on each extraction block, and record the first column vector of the left singular vector U * as
Figure FDA0002676124210000055
The difference between the second and third elements is
Figure FDA0002676124210000056
where s r ∈ S;
(3)依次从每一提取块提取1比特水印,提取方法为
Figure FDA0002676124210000057
最终合成完整水印。
(3) Extract 1-bit watermark from each extraction block in turn, and the extraction method is as follows:
Figure FDA0002676124210000057
Finally, a complete watermark is synthesized.
CN202010948552.0A 2020-09-10 2020-09-10 DWT-SVD domain self-adaptive robust watermark extraction method adopting preset PSNR Active CN112132731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010948552.0A CN112132731B (en) 2020-09-10 2020-09-10 DWT-SVD domain self-adaptive robust watermark extraction method adopting preset PSNR

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010948552.0A CN112132731B (en) 2020-09-10 2020-09-10 DWT-SVD domain self-adaptive robust watermark extraction method adopting preset PSNR

Publications (2)

Publication Number Publication Date
CN112132731A true CN112132731A (en) 2020-12-25
CN112132731B CN112132731B (en) 2023-12-05

Family

ID=73846100

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010948552.0A Active CN112132731B (en) 2020-09-10 2020-09-10 DWT-SVD domain self-adaptive robust watermark extraction method adopting preset PSNR

Country Status (1)

Country Link
CN (1) CN112132731B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114549352A (en) * 2022-02-21 2022-05-27 中国第一汽车股份有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN114897657A (en) * 2022-04-23 2022-08-12 昆明理工大学 A method for embedding and extracting digital image watermark
CN115118835A (en) * 2022-06-24 2022-09-27 上海方卡信息科技有限公司 Watermark embedding method, encrypted watermark extracting method and decryption method
CN115767105A (en) * 2022-10-12 2023-03-07 中国科学院信息工程研究所 Robust video steganography method and device based on adaptive quantization

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030070075A1 (en) * 2001-10-04 2003-04-10 Frederic Deguillaume Secure hybrid robust watermarking resistant against tampering and copy-attack
EP1720354A1 (en) * 2004-02-17 2006-11-08 Mitsubishi Electric Corporation Electronic watermarking method, electronic watermark detecting method, apparatus and program
CN101493928A (en) * 2009-02-10 2009-07-29 国网信息通信有限公司 Digital watermarking embedding, extracting and quantizing step size coordinating factor optimizing method and device
US20100061585A1 (en) * 2008-09-09 2010-03-11 National Taiwan University Of Science And Technology Blind wavelet-based watermarking method
CN103247018A (en) * 2013-05-20 2013-08-14 山东大学 Expanding conversion shaking watermark modulating method based on logarithm domain visual model
CN106611601A (en) * 2017-01-23 2017-05-03 天津大学 Audio watermarking method based on DWT-SVD and PSO (Particle Swarm Optimization)
CN107633476A (en) * 2017-09-25 2018-01-26 河南师范大学 A kind of watermark insertion and extracting method based on LWT SVD DCT algorithms
CN108073778A (en) * 2016-11-07 2018-05-25 上海宝信软件股份有限公司 Improve the surface trimming method and system of FCL unit yield rates
CN108985082A (en) * 2018-07-11 2018-12-11 上海海事大学 A kind of medical image encryption method based on digital watermarking
CN110728614A (en) * 2019-09-27 2020-01-24 天津大学 Gray wolf optimization algorithm and complete ternary tree structure wavelet domain color multi-watermark method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030070075A1 (en) * 2001-10-04 2003-04-10 Frederic Deguillaume Secure hybrid robust watermarking resistant against tampering and copy-attack
EP1720354A1 (en) * 2004-02-17 2006-11-08 Mitsubishi Electric Corporation Electronic watermarking method, electronic watermark detecting method, apparatus and program
US20100061585A1 (en) * 2008-09-09 2010-03-11 National Taiwan University Of Science And Technology Blind wavelet-based watermarking method
CN101493928A (en) * 2009-02-10 2009-07-29 国网信息通信有限公司 Digital watermarking embedding, extracting and quantizing step size coordinating factor optimizing method and device
CN103247018A (en) * 2013-05-20 2013-08-14 山东大学 Expanding conversion shaking watermark modulating method based on logarithm domain visual model
CN108073778A (en) * 2016-11-07 2018-05-25 上海宝信软件股份有限公司 Improve the surface trimming method and system of FCL unit yield rates
CN106611601A (en) * 2017-01-23 2017-05-03 天津大学 Audio watermarking method based on DWT-SVD and PSO (Particle Swarm Optimization)
CN107633476A (en) * 2017-09-25 2018-01-26 河南师范大学 A kind of watermark insertion and extracting method based on LWT SVD DCT algorithms
CN108985082A (en) * 2018-07-11 2018-12-11 上海海事大学 A kind of medical image encryption method based on digital watermarking
CN110728614A (en) * 2019-09-27 2020-01-24 天津大学 Gray wolf optimization algorithm and complete ternary tree structure wavelet domain color multi-watermark method

Non-Patent Citations (9)

* Cited by examiner, † Cited by third party
Title
"《郑州轻工业学院学报》(自然科学版)第27卷(2012年)总目录", 郑州轻工业学院学报(自然科学版), no. 06 *
FALGUN N. THAKKAR;VINAY KUMAR SRIVASTAVA: "A blind medical image watermarking: DWT-SVD based robust and secure approach for telemedicine applications", MULTIMEDIA TOOLS AND APPLICATIONS, vol. 76, no. 3, XP036185222, DOI: 10.1007/s11042-016-3928-7 *
JINHUA LIU ; KUN SHE: "Arpc aCri ediaag", CIRCUITS, SYSTEMS, AND SIGNAL PROCESSING, vol. 31, no. 2 *
李颖;: "基于复小波域奇异值分解的自适应图像水印", 计算机应用, no. 2 *
杨恒伏;孙光;: "基于视觉感知的图像自适应半脆弱水印算法", 光电工程, no. 02 *
杨格兰;奚浩波;: "基于DWT与SVD自适应公开水印技术", 微计算机信息, no. 21 *
王文冰: "基于奇异值分解的水印方法虚警问题分析", 计算机工程 *
胡青;龙冬阳;: "基于DWT-SVD的奇异向量量化水印算法", 计算机科学, no. 11 *
齐向明 李爽: "非线性尺度空间自适应均衡水印算法", 计算机应用研究 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114549352A (en) * 2022-02-21 2022-05-27 中国第一汽车股份有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN114897657A (en) * 2022-04-23 2022-08-12 昆明理工大学 A method for embedding and extracting digital image watermark
CN115118835A (en) * 2022-06-24 2022-09-27 上海方卡信息科技有限公司 Watermark embedding method, encrypted watermark extracting method and decryption method
CN115767105A (en) * 2022-10-12 2023-03-07 中国科学院信息工程研究所 Robust video steganography method and device based on adaptive quantization

Also Published As

Publication number Publication date
CN112132731B (en) 2023-12-05

Similar Documents

Publication Publication Date Title
CN112132731B (en) DWT-SVD domain self-adaptive robust watermark extraction method adopting preset PSNR
Tsai et al. Reversible image hiding scheme using predictive coding and histogram shifting
CN108564519B (en) Color image digital watermarking method based on multiple transform domains
Phadikar et al. Region based QIM digital watermarking scheme for image database in DCT domain
Bhardwaj et al. Robust video watermarking using significant frame selection based on coefficient difference of lifting wavelet transform
CN105303512B (en) Video double-watermarking method based on SVD and QR codes
CN108280797B (en) An Image Digital Watermarking Algorithm System Based on Texture Complexity and JND Model
Hu et al. Robust blind image watermarking by modulating the mean of partly sign-altered DCT coefficients guided by human visual perception
Rabie et al. Maximizing embedding capacity and stego quality: curve-fitting in the transform domain
CN113222802A (en) Digital image watermarking method based on anti-attack
CN107274334A (en) A kind of color image-adaptive water mark method based on Quaternion Transformation
Zhang et al. JND‐aware robust image watermarking with tri‐directional inter‐block correlation
CN115272039A (en) A GAN-based watermark attack method and system, digital watermark embedding method
Mood et al. A novel image watermarking scheme based on wavelet transform and genetic algorithm
Kejgir et al. Lifting wavelet transform with singular value decomposition for robust digital image watermarking
Yousif Image steganography based on wavelet transform and color space approach
Liu et al. Robust Image Watermarking Based on Hybrid Transform and Position-Adaptive Selection
CN115358910A (en) Digital watermark attack method and system based on convolutional neural network denoising algorithm
Kim et al. End-to-end anti-forensics network of single and double JPEG detection
Yang et al. Reversible Data Hiding By Adaptive IWT-coefficient Adjustment.
Majumder et al. DWT and SVD based image watermarking scheme using noise visibility and contrast sensitivity
CN108765249B (en) Color watermarking method based on combination of directional anisotropy and singular value decomposition
CN117726493A (en) Multi-channel-based color image multi-watermark method
Barlaskar et al. Imperceptibility and robustness study in different transform domain for copyright protection in digital image watermarking in hybrid SVD-domain
Abdallah et al. SVD-based watermarking scheme in complex wavelet domain for color video

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant