CN109493270B - Watermark image restoration method based on SLT-DM - Google Patents
Watermark image restoration method based on SLT-DM Download PDFInfo
- Publication number
- CN109493270B CN109493270B CN201811321674.6A CN201811321674A CN109493270B CN 109493270 B CN109493270 B CN 109493270B CN 201811321674 A CN201811321674 A CN 201811321674A CN 109493270 B CN109493270 B CN 109493270B
- Authority
- CN
- China
- Prior art keywords
- watermark
- block
- image sub
- frequency coefficient
- dvalue
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000012545 processing Methods 0.000 claims abstract description 33
- 238000013139 quantization Methods 0.000 claims abstract description 10
- 239000011159 matrix material Substances 0.000 claims description 107
- 230000009466 transformation Effects 0.000 claims description 24
- 238000004422 calculation algorithm Methods 0.000 claims description 19
- 230000008569 process Effects 0.000 claims description 19
- 238000013507 mapping Methods 0.000 claims description 17
- 238000007781 pre-processing Methods 0.000 claims description 6
- 238000000605 extraction Methods 0.000 claims description 5
- 230000001131 transforming effect Effects 0.000 claims description 4
- 238000012935 Averaging Methods 0.000 claims description 3
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 claims description 2
- 230000008859 change Effects 0.000 abstract description 33
- 230000002441 reversible effect Effects 0.000 description 15
- 238000013461 design Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 5
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 3
- 238000009795 derivation Methods 0.000 description 2
- 238000002059 diagnostic imaging Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000011426 transformation method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0021—Image watermarking
- G06T1/005—Robust watermarking, e.g. average attack or collusion attack resistant
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2201/00—General purpose image data processing
- G06T2201/005—Image watermarking
- G06T2201/0065—Extraction of an embedded watermark; Reliable detection
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域Technical Field
本发明属于图像数字水印技术领域,特别是指一种基于SLT-DM的针对医学影像系统、军事影像系统等有着高无损性要求的应用领域的水印图像的还原方法。The invention belongs to the technical field of image digital watermarking, and in particular refers to a watermark image restoration method based on SLT-DM for application fields with high losslessness requirements such as medical imaging systems and military imaging systems.
背景技术Background Art
随着互联网技术的发展、新媒体技术的革新,数字媒体技术取得了突破性的进展,改变了传统媒体在信息传播过程中占主导地位的格局,数字媒体愈加丰富的同时,关于它们的一系列问题也随之出现。其中,如何有效的保护数字媒体的版权、阻止数字媒体被非法复制或使用已经成为一个重要的方面。数字版权保护(Digital Right Management,DRM)是目前对网络中传播的数字媒体进行版权保护的主要手段,数字水印作为DRM的重要技术也越来越受到重视。水印与各种数字媒体应用场景的版权保护,如影音照片、医疗图像、3D图像、视频等方面结合的也愈加紧密。With the development of Internet technology and the innovation of new media technology, digital media technology has made breakthrough progress, changing the dominant position of traditional media in the process of information dissemination. As digital media becomes more abundant, a series of problems about them have also emerged. Among them, how to effectively protect the copyright of digital media and prevent digital media from being illegally copied or used has become an important aspect. Digital Right Management (DRM) is currently the main means of copyright protection for digital media disseminated on the Internet. Digital watermarking, as an important technology of DRM, has also received more and more attention. Watermarks are increasingly closely combined with copyright protection in various digital media application scenarios, such as audio and video photos, medical images, 3D images, videos, etc.
与传统的数字水印方法不同的是,在诸如医学影像系统,军事影像系统和遥感应用等一些领域中,原始数字内容中的任何变化都可能影响最终的决策过程,因此要求水印对原始数字内容的操作是无损的。满足这种无损要求的水印方案被称为无损水印方案。无损水印包括可逆水印与零水印。Unlike traditional digital watermarking methods, in some fields such as medical imaging systems, military imaging systems, and remote sensing applications, any changes in the original digital content may affect the final decision-making process, so the watermark operation on the original digital content is required to be lossless. The watermarking scheme that meets this lossless requirement is called a lossless watermarking scheme. Lossless watermarks include reversible watermarks and zero watermarks.
可逆水印方案期望取出嵌入的数据后,数字内容可以完全无损地恢复。大多数无损水印方案需要无损环境来传输水印媒体,因为如信道噪声或JPEG压缩等微小变化会破坏隐藏的水印。在实际应用中,信道噪声和有损压缩等非恶意攻击与恶意非法攻击常常出现,即使水印媒体经历了这些攻击,无损水印方案也必须具有版权保护的能力,因此鲁棒性对于无损水印是有实际意义的。能有效抵抗针对数字媒体攻击的无损水印方案被称为鲁棒无损水印方案。Reversible watermarking schemes expect that after the embedded data is removed, the digital content can be restored completely losslessly. Most lossless watermarking schemes require a lossless environment to transmit the watermarked media, because minor changes such as channel noise or JPEG compression can destroy the hidden watermark. In practical applications, non-malicious attacks such as channel noise and lossy compression and malicious illegal attacks often occur. Even if the watermarked media undergoes these attacks, the lossless watermarking scheme must have the ability to protect copyrights, so robustness is of practical significance for lossless watermarking. Lossless watermarking schemes that can effectively resist attacks on digital media are called robust lossless watermarking schemes.
鲁棒可逆水印算法的设计往往有着一系列问题:在设计时需要考虑水印的鲁棒性、不可见性、嵌入容量、可逆性,可是这四种要求不仅自身面临着一系列的挑战,还互为掣肘,这就要求水印的设计不能仅仅单独地考虑某一种要求,而是需要全面地考虑到每一种要求。水印的鲁棒性、不可见性与嵌入容量是水印算法的经典三角,如何提高并权衡它们是水印算法一直的追求。鲁棒可逆水印在经典三角上再加入了可逆性一角,但它本身存在着一个严峻的挑战:溢出问题,溢出常常会破坏可逆性,导致水印操作不完全可逆。The design of a robust reversible watermark algorithm often faces a series of problems: the robustness, invisibility, embedding capacity, and reversibility of the watermark need to be considered during the design. However, these four requirements not only face a series of challenges themselves, but also constrain each other. This requires that the design of the watermark cannot only consider one requirement alone, but needs to consider each requirement comprehensively. The robustness, invisibility, and embedding capacity of the watermark are the classic triangle of the watermark algorithm. How to improve and balance them is what the watermark algorithm has always pursued. Robust reversible watermarking adds reversibility to the classic triangle, but it itself has a severe challenge: the overflow problem. Overflow often destroys reversibility, resulting in the watermark operation being not completely reversible.
为了解决溢出问题,鲁棒可逆水印算法常常采用基于local-map的解决方法,用于记录能嵌入水印而不引起溢出的子块或者需要特殊处理的子块从而避免溢出。但这会大幅降低嵌入容量,增加计算复杂度,有的方法还会减弱不可见性;有的算法采用直接记录溢出信息的方法,但这会导致巨大的附加信息;有的算法直接忽略溢出问题,但这样水印操作是不能完全可逆还原的。这些处理方法虽然抑制了溢出,但往往会导致新的问题出现:1)附加信息过多;2)嵌入容量降低;3)不可见性降低;4)计算复杂度增加,并没有彻底解决这个问题。In order to solve the overflow problem, robust reversible watermarking algorithms often use a local-map-based solution to record sub-blocks that can embed watermarks without causing overflow or sub-blocks that require special processing to avoid overflow. However, this will greatly reduce the embedding capacity and increase the computational complexity. Some methods will also weaken invisibility; some algorithms use the method of directly recording overflow information, but this will result in huge additional information; some algorithms directly ignore the overflow problem, but in this way the watermark operation cannot be completely reversibly restored. Although these processing methods suppress overflow, they often lead to new problems: 1) too much additional information; 2) reduced embedding capacity; 3) reduced invisibility; 4) increased computational complexity, and do not completely solve the problem.
发明内容Summary of the invention
考虑目前现有的图像可逆方法都不能很好地解决图像溢出问题,本发明提供一种基于SLT(Slantlet transform,Slantlet变换)-DM(Dither Modulation,抖动调制)的水印图像还原方法,在水印嵌入图像以及防溢出处理所引起的改变量嵌入到图像的频率域中,使得图像在嵌入水印和防溢出处理后可实现完全可逆还原,而且不需要任何附加信息。Considering that the existing image reversible methods cannot solve the image overflow problem well, the present invention provides a watermark image restoration method based on SLT (Slantlet transform)-DM (Dither Modulation), in which the change caused by watermark embedding and anti-overflow processing is embedded in the frequency domain of the image, so that the image can be completely reversibly restored after watermark embedding and anti-overflow processing, and no additional information is required.
为实现上述技术目的,本发明采用如下技术方案:In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
一种基于SLT-DM的水印图像还原方法,包括以下步骤:A watermark image restoration method based on SLT-DM comprises the following steps:
水印嵌入过程:Watermark embedding process:
步骤A10,原始图像预处理;Step A10, preprocessing the original image;
如果原始图像是彩色图像,则取原始图像的G通道图层作为预处理图像;如果原始图像是灰度图像,则原始图像作为预处理图像;将预处理图像分成为大小为N×N的不重叠的预处理图像子块B0i,其中i表示与图像子块对应的序号;If the original image is a color image, then the G channel layer of the original image is taken as the preprocessed image; if the original image is a grayscale image, then the original image is taken as the preprocessed image; the preprocessed image is divided into non-overlapping preprocessed image sub-blocks B 0i of size N×N, where i represents the sequence number corresponding to the image sub-block;
步骤A20,嵌入水印;Step A20, embedding a watermark;
遍历所有预处理图像子块B0i,将预处理图像子块B0i从空间域变换到频率域,根据预处理图像子块B0i的中频系数矩阵计算嵌入因子E0i,将水印比特嵌入到预处理图像子块B0i的中频系数矩阵中,再将水印嵌入后的图像子块从频率域变换到空间域,得到水印嵌入图像子块B1i;Traverse all pre-processed image sub-blocks B 0i , transform the pre-processed image sub-block B 0i from the spatial domain to the frequency domain, calculate the embedding factor E 0i according to the intermediate frequency coefficient matrix of the pre-processed image sub-block B 0i , embed the watermark bit into the intermediate frequency coefficient matrix of the pre-processed image sub-block B 0i , and then transform the image sub-block after watermark embedding from the frequency domain to the spatial domain to obtain the watermark embedded image sub-block B 1i ;
步骤A30,防溢出处理;Step A30, anti-overflow processing;
遍历所有水印嵌入图像子块B1i,将水印嵌入图像子块B1i进行防溢出处理,得到防溢出水印图像子块B2i;Traverse all watermark embedded image sub-blocks B 1i , perform anti-overflow processing on the watermark embedded image sub-blocks B 1i , and obtain anti-overflow watermark image sub-blocks B 2i ;
步骤A40,嵌入还原信息;Step A40, embedding restoration information;
遍历所有防溢出水印图像子块B2i,将防溢出水印图像子块B2i从空间域变换到频率域,根据防溢出水印图像子块B2i的中频系数矩阵计算嵌有水印的嵌入因子E2i;对防溢出水印图像子块B2i的第一低频系数LL2i(1,1)进行第一次抖动调制处理,得到第一次抖动调制处理的第一低频系数LL2i(1,1)';根据预处理图像子块B0i的嵌入因子E0i和防溢出水印图像子块B2的嵌有水印的嵌入因子E2i,计算嵌入因子差值Dvalue1为:Dvalue1=E2i-E0i;根据防溢出水印图像子块B2i的第一低频系数LL2i(1,1)和经第一次抖动调制处理后的第一低频系数LL2i(1,1)',计算第一低频系数差值Dvalue2为:Dvalue2=LL2i(1,1)'-LL2i(1,1);由嵌入因子差值Dvalue1和第一低频系数差值Dvalue2合成总差值Dvalue为:Dc1,Dc2,Dc3是控制因子,且Dvalue2×Dc2为大于1的整数,|Dvalue1/Dc1|<0.5,Dvalue<0.5H,H表示第一次抖动调制和第二次抖动调制的量化步长;将总差值Dvalue嵌入到第一次抖动调制处理后的第一低频系数LL2i(1,1)',得到嵌入还原信息的第一低频系数LL2i(1,1)'EM:LL2i(1,1)'EM=LL2i(1,1)'+Dvalue,再将嵌入还原信息后的图像从频率域变换到空间域,得到最终水印嵌入图像子块B3;Traverse all anti-overflow watermark image sub-blocks B 2i , transform the anti-overflow watermark image sub-block B 2i from the spatial domain to the frequency domain, and calculate the embedding factor E 2i embedded with the watermark according to the intermediate frequency coefficient matrix of the anti-overflow watermark image sub-block B 2i ; perform the first dithering modulation processing on the first low-frequency coefficient LL 2i (1,1) of the anti-overflow watermark image sub-block B 2i to obtain the first low-frequency coefficient LL 2i (1,1)' subjected to the first dithering modulation processing; calculate the embedding factor difference Dvalue 1 according to the embedding factor E 0i of the pre-processed image sub-block B 0i and the embedding factor E 2i embedded with the watermark of the anti-overflow watermark image sub -block B 2i as follows: Dvalue 1 = E 2i -E 0i ; according to the first low-frequency coefficient LL 2i (1,1) of the anti-overflow watermark image sub-block B 2i and the first low-frequency coefficient LL 2i after the first dithering modulation processing (1,1)', calculate the first low-frequency coefficient difference Dvalue 2 as: Dvalue 2 =LL 2i (1,1)'-LL 2i (1,1); the total difference Dvalue synthesized by the embedded factor difference Dvalue 1 and the first low-frequency coefficient difference Dvalue2 is: Dc1, Dc2, Dc3 are control factors, and Dvalue 2 ×Dc 2 is an integer greater than 1, |Dvalue 1 /Dc 1 |<0.5, Dvalue<0.5H, H represents the quantization step of the first dither modulation and the second dither modulation; the total difference Dvalue is embedded into the first low-frequency coefficient LL 2i (1,1)' after the first dither modulation process to obtain the first low-frequency coefficient LL 2i (1,1)' EM embedded with restored information: LL 2i (1,1)' EM =LL 2i (1,1)'+Dvalue, and then the image after the embedded restored information is transformed from the frequency domain to the spatial domain to obtain the final watermark embedded image sub-block B 3 ;
图像还原过程:Image restoration process:
步骤C10,遍历所有最终水印嵌入图像子块B3i,将最终水印嵌入图像子块B3i从空间域变换到频率域,根据最终水印嵌入图像子块B3i的中频系数矩阵计算嵌入因子E3i;Step C10, traverse all final watermark embedded image sub-blocks B 3i , transform the final watermark embedded image sub-block B 3i from the spatial domain to the frequency domain, and calculate the embedding factor E 3i according to the intermediate frequency coefficient matrix of the final watermark embedded image sub-block B 3i ;
步骤C20,对最终水印嵌入图像子块B3i的第一低频系数LL3i(1,1)进行第二次抖动调制,得到第二次抖动调制后的第一低频系数LL3i(1,1)',按公式(24)计算得到嵌于第一低频系数LL3i(1,1)的总差值Dvalue,再由总差值Dvalue按公式(25)计算得到嵌入因子差值Dvalue1和第一低频系数差值Dvalue2:Step C20, perform a second dithering modulation on the first low-frequency coefficient LL 3i (1,1) of the final watermark embedded image sub-block B 3i to obtain the first low-frequency coefficient LL 3i (1,1)' after the second dithering modulation, calculate the total difference Dvalue embedded in the first low-frequency coefficient LL 3i (1,1) according to formula (24), and then calculate the embedding factor difference Dvalue 1 and the first low-frequency coefficient difference Dvalue 2 according to formula (25) from the total difference Dvalue:
Dvalue=LL3i(1,1)-LL3i(1,1)' (24);Dvalue=LL 3i (1,1)-LL 3i (1,1)'(24);
步骤C30,根据最终水印嵌入图像子块B3i的嵌入因子E3i和嵌入因子差值Dvalue1,得到还原图像子块B4i的嵌入因子E4i:E4i=E3i-Dvalue1=E2i-Dvalue1=E0i;Step C30, according to the embedding factor E 3i of the final watermark embedded image sub-block B 3i and the embedding factor difference Dvalue 1 , obtain the embedding factor E 4i of the restored image sub-block B 4i : E 4i = E 3i - Dvalue 1 = E 2i - Dvalue 1 = E 0i ;
步骤C40,根据最终水印嵌入图像子块B3i的第二次抖动调制后的第一低频系数LL3i(1,1)'和第一低频系数差值Dvalue2,得到还原图像子块B4i的第一低频系数LL4i(1,1):LL4i(1,1)=LL3i(1,1)'-Dvalue2=LL2i(1,1)'-Dvalue2=LL2i(1,1)=LL0i(1,1);Step C40, according to the first low-frequency coefficient LL 3i (1,1)' after the second dithering modulation of the final watermark embedded image sub-block B 3i and the first low-frequency coefficient difference Dvalue 2 , obtain the first low-frequency coefficient LL 4i (1,1) of the restored image sub-block B 4i : LL 4i (1,1) = LL 3i (1,1)'-Dvalue 2 = LL 2i (1,1)'-Dvalue 2 = LL 2i (1,1) = LL 0i (1,1);
步骤C50,由还原图像子块B4i的嵌入因子E4i计算还原图像子块B4i的中频系数矩阵,并利用还原图像子块B4i的中频系数矩阵和第一低频系数LL4i(1,1),将还原图像子块B4i由频率域变换到空间域,得到空间域的还原图像子块B4i,所有的还原图像子块B4i构成还原图像。Step C50, calculating the intermediate frequency coefficient matrix of the restored image sub-block B 4i by the embedding factor E 4i of the restored image sub-block B 4i , and using the intermediate frequency coefficient matrix of the restored image sub-block B 4i and the first low-frequency coefficient LL 4i (1,1), transforming the restored image sub-block B 4i from the frequency domain to the spatial domain to obtain the restored image sub-block B 4i in the spatial domain, and all the restored image sub-blocks B 4i constitute the restored image.
本发明首先通过防溢出处理消除了水印嵌入引起的溢出问题,并通过抗溢出抖动调制方法,将水印嵌入和图像溢出处理所引起的改变量以及抖动调制自身所引起的改变量合成还原信息无溢出地嵌入图像,且通过控制还原信息小于半个抖动调制的量化步长,使得加在第一低频系数上的时候还原信息不会跳出抖动区间,保证了图像完全可逆还原,并且还原不需要任何附加信息,而且不会引起嵌入容量低、图像质量差、附加信息过多、计算复杂度高等其他问题。The present invention firstly eliminates the overflow problem caused by watermark embedding through anti-overflow processing, and through an anti-overflow jitter modulation method, synthesizes the change amount caused by watermark embedding and image overflow processing and the change amount caused by jitter modulation itself to restore information without overflow and embeds it into the image. Moreover, by controlling the restored information to be less than half the quantization step of jitter modulation, the restored information will not jump out of the jitter interval when added to the first low-frequency coefficient, thereby ensuring that the image is completely reversible and that the restoration does not require any additional information and will not cause other problems such as low embedding capacity, poor image quality, excessive additional information, and high computational complexity.
进一步地,按公式(1)对空间域的图像子块的像素矩阵s进行SLT变换,得到频率域的图像子块系数矩阵S,且系数矩阵S包括低频系数矩阵LL、第一中频系数矩阵LH、第二中频系数矩阵HL和高频系数矩阵HH;按公式(2)对频率域的图像子块系数矩阵S进行逆SLT变换,得到空间域的图像子块的像素矩阵s:Further, the pixel matrix s of the image sub-block in the spatial domain is subjected to SLT transformation according to formula (1) to obtain the image sub-block coefficient matrix S in the frequency domain, and the coefficient matrix S includes the low-frequency coefficient matrix LL, the first intermediate frequency coefficient matrix LH, the second intermediate frequency coefficient matrix HL and the high-frequency coefficient matrix HH; the image sub-block coefficient matrix S in the frequency domain is subjected to inverse SLT transformation according to formula (2) to obtain the pixel matrix s of the image sub-block in the spatial domain:
其中,s为图像子块的像素矩阵,S为变换后的SLT系数矩阵,N是矩阵的大小,SLTN是根据SLT变换算法计算出来的变换矩阵。Among them, s is the pixel matrix of the image sub-block, S is the transformed SLT coefficient matrix, N is the size of the matrix, and SLT N is the transformation matrix calculated according to the SLT transformation algorithm.
本方案采用的SLT变换有着更好的不可见性,从而在设计嵌入时能够在保证不可见性的情况下提高鲁棒性。The SLT transformation adopted in this scheme has better invisibility, so it can improve the robustness while ensuring invisibility when designing embedding.
进一步地,根据图像子块的中频系数矩阵计算嵌入因子Ei具体为:图像子块在频率域的中频系数矩阵包括第一中频系数矩阵LHi和第二中频系数矩阵HLi,分别计算第一中频系数矩阵LHi和第二中频系数矩阵HLi中元素的平均值:meanLHi=mean(LHi),meanHLi=mean(HLi);再由第一中频系数矩阵的平均值meanLHi和第二中频系数矩阵的平均值meanHLi计算嵌入因子Ei:Ei=meanLHi-meanHLi,其中mean()表示求平均值;Further, the embedding factor E i is calculated according to the intermediate frequency coefficient matrix of the image sub-block as follows: the intermediate frequency coefficient matrix of the image sub-block in the frequency domain includes a first intermediate frequency coefficient matrix LH i and a second intermediate frequency coefficient matrix HL i , and the average values of the elements in the first intermediate frequency coefficient matrix LH i and the second intermediate frequency coefficient matrix HL i are calculated respectively: meanLH i =mean(LH i ), meanHL i =mean(HL i ); and then the embedding factor E i is calculated according to the average value meanLH i of the first intermediate frequency coefficient matrix and the average value meanHL i of the second intermediate frequency coefficient matrix: E i =meanLH i -meanHL i , wherein mean() indicates averaging;
将水印比特嵌入到预处理图像子块B0i的中频系数矩阵中的具体过程为:The specific process of embedding the watermark bits into the intermediate frequency coefficient matrix of the preprocessed image sub-block B 0i is:
构建三段映射函数为公式(7)和(8),按公式(7)将预处理子块B0i的嵌入因子E0i映射到一个判断域上的判断因子D0i:The three-segment mapping function is constructed as formula (7) and (8), and the embedding factor E 0i of the preprocessing sub-block B 0i is mapped to a judgment factor D 0i on a judgment domain according to formula (7):
其中,Range1=[-0.3R,0.3R],Range2=[-0.7R,-0.3R)∪(0.3R,0.7R],Range3=[-k1×0.3R,k1×0.3R],Range4=[-k1×0.3R-k2×0.4R,-k1×0.3R)∪(k1×0.3R,k1×0.3R+k2×0.4R];k1、k2、k3均为斜率,且k1∈(0,1),k2∈[1,2]、k3∈(10,+∞);R为映射函数的调整区间,sign为符号函数;Among them, Range1=[-0.3R,0.3R], Range2=[-0.7R,-0.3R)∪(0.3R,0.7R], Range3=[-k1×0.3R,k1×0.3R], Range4=[-k1×0.3R-k2×0.4R,-k1×0.3R)∪(k1×0.3R,k1×0.3R+k2×0.4R]; k1, k2, k3 are all slopes, and k1∈(0,1), k2∈[1,2], k3∈(10,+∞); R is the adjustment interval of the mapping function, and sign is the sign function;
当水印比特wi=1时,按公式(9)将水印比特wi嵌入到判断因子Di,得到嵌入水印后的判断因子DEMi;当水印比特wi=0时,按公式(10)将水印比特wi嵌入到判断因子Di,得到嵌入水印后的判断因子DEMi:When the watermark bit wi = 1, the watermark bit wi is embedded into the judgment factor Di according to formula (9) to obtain the judgment factor DEMi after embedding the watermark; when the watermark bit wi = 0, the watermark bit wi is embedded into the judgment factor Di according to formula (10) to obtain the judgment factor DEMi after embedding the watermark:
其中,T表示平衡阈值;Where T represents the equilibrium threshold;
按公式(8)将嵌入水印后的判断因子DEMi逆映射到嵌入水印后的嵌入因子E0EMi,然后将嵌入水印后的嵌入因子E0EMi添加到预处理图像子块B0i的第一中频系数矩阵LH和第二中频系数矩阵HL中。According to formula (8), the watermarked judgment factor DEMi is inversely mapped to the watermarked embedding factor E0EMi , and then the watermarked embedding factor E0EMi is added to the first intermediate frequency coefficient matrix LH and the second intermediate frequency coefficient matrix HL of the preprocessed image subblock B0i .
该方案中,为了保证水印有强鲁棒性与不可见性,设计了三段式嵌入模块,通过SLT变换与二元嵌入策略提高水印的鲁棒性与不可见性。In this scheme, in order to ensure the watermark has strong robustness and invisibility, a three-segment embedding module is designed, and the robustness and invisibility of the watermark are improved through SLT transformation and binary embedding strategy.
进一步地,在图像还原之前,还包括水印提取过程:Furthermore, before image restoration, the watermark extraction process is also included:
步骤B10,计算嵌入因子:将最终水印嵌入图像子块B3i从空间域变换到频率域,根据最终水印嵌入图像子块B3i的中频系数矩阵计算嵌入因子E3i;Step B10, calculating the embedding factor: transforming the final watermark embedded image sub-block B 3i from the spatial domain to the frequency domain, and calculating the embedding factor E 3i according to the intermediate frequency coefficient matrix of the final watermark embedded image sub-block B 3i ;
步骤B20,提取水印比特:重构三段映射函数公式(7)和公式(8);按公式(7)将最终水印嵌入图像子块B3i的嵌入因子E3i映射到判断域上的判断因子D3i,并按公式(22)从判断因子D3i中提取水印比特wi:Step B20, extracting watermark bits: reconstructing the three-segment mapping function formula (7) and formula (8); mapping the embedding factor E 3i of the final watermark embedded image sub-block B 3i to the judgment factor D 3i on the judgment domain according to formula (7), and extracting the watermark bit w i from the judgment factor D 3i according to formula (22):
遍历所有最终水印嵌入图像子块B3i,提取出所有水印比特,再组合成水印。Traverse all the final watermark embedded image sub-blocks B 3i , extract all watermark bits, and then combine them into a watermark.
该方案通过将水印从图像中提取出来,可以对图像的版权进行验证,有效地对图像的版权进行保护,避免被非法复制或使用。This scheme can verify the copyright of the image by extracting the watermark from the image, effectively protecting the copyright of the image and preventing it from being illegally copied or used.
进一步地,按公式(11)对水印嵌入图像子块B1i进行防溢出处理:Furthermore, anti-overflow processing is performed on the watermark embedded image sub-block B 1i according to formula (11):
其中,Pixel是水印嵌入图像子块B1i的像素灰度值。Wherein, Pixel is the pixel grayscale value of the watermark embedded image sub-block B 1i .
该方案对图像进行的防溢出处理方法,可以避免水印嵌入图像引起的像素溢出问题。The anti-overflow processing method of the scheme for images can avoid the pixel overflow problem caused by embedding watermarks into images.
进一步地,当第一像素的灰度值s(1,1)≥127时,第一次抖动调制函数为公式(16),Furthermore, when the grayscale value of the first pixel s(1,1)≥127, the first dithering modulation function is formula (16),
当第一像素的灰度值s(1,1)<127时,第一次抖动调制函数为公式(17),When the gray value of the first pixel s(1,1) is less than 127, the first dither modulation function is formula (17),
第二次抖动调制函数为公式(23),The second jitter modulation function is formula (23),
其中,floor()是向下取整函数,ceil()是向上取整函数,sign()是符号函数。Among them, floor() is the floor function, ceil() is the ceiling function, and sign() is the sign function.
有益效果Beneficial Effects
本发明提供的一种基于SLT-DM的水印图像还原方法,水印嵌入时,首先将图像分成不重叠的子块,图像的版权信息构成水印并嵌入到各图像子块的频率域的中频系数矩阵,再将图像子块从频率域变换到空间域并进行溢出处理;然后对频率域的低频系数进行抖动调制;然后再将水印嵌入且图像子块溢出处理所导致的中频系数的改变量与抖动调制所导致的低频信息的改变量构成还原信息,并嵌入到频率域的低频系数中;最后将图像子块由频率域变换到空间域,并将空间域的各图像子块拼合成图像。图像还原时,同样将图像分成子块,然后通过频域变换后,对低频系数进行抖动调制获得还原信息,并使用这些还原信息还原低频系数与中频系数,最终还原成原始图像。本发明首先通过防溢出处理消除了水印嵌入引起的溢出问题,并通过抗溢出抖动调制方法,将水印嵌入和图像溢出处理所引起的改变量以及抖动调制自身所引起的改变量合成还原信息无溢出地嵌入图像,且通过控制还原信息小于半个抖动调制的量化步长,使得加在第一低频系数上的时候还原信息不会跳出抖动区间,保证了图像完全可逆还原,并且还原不需要任何附加信息,而且不会引起降低可嵌入容量、影响图像质量、增加附加信息等其他问题。The present invention provides a watermark image restoration method based on SLT-DM. When embedding a watermark, firstly, the image is divided into non-overlapping sub-blocks, the copyright information of the image constitutes a watermark and is embedded into the intermediate frequency coefficient matrix of the frequency domain of each image sub-block, and then the image sub-block is transformed from the frequency domain to the space domain and overflow processing is performed; then the low-frequency coefficients in the frequency domain are jitter modulated; then the watermark is embedded and the change amount of the intermediate frequency coefficient caused by the overflow processing of the image sub-block and the change amount of the low-frequency information caused by the jitter modulation constitute restoration information, and are embedded in the low-frequency coefficients in the frequency domain; finally, the image sub-block is transformed from the frequency domain to the space domain, and each image sub-block in the space domain is spliced into an image. When restoring the image, the image is also divided into sub-blocks, and then after frequency domain transformation, the low-frequency coefficients are jitter modulated to obtain restoration information, and the restoration information is used to restore the low-frequency coefficients and the intermediate frequency coefficients, and finally the original image is restored. The present invention first eliminates the overflow problem caused by watermark embedding through anti-overflow processing, and uses an anti-overflow jitter modulation method to synthesize the change amount caused by watermark embedding and image overflow processing and the change amount caused by jitter modulation itself to restore information without overflow and embed it into the image. Moreover, by controlling the restored information to be less than half the quantization step of the jitter modulation, the restored information will not jump out of the jitter interval when added to the first low-frequency coefficient, thereby ensuring that the image is completely reversible. The restoration does not require any additional information and will not cause other problems such as reducing the embeddable capacity, affecting the image quality, and adding additional information.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本发明的算法总流程图;Fig. 1 is an overall flow chart of the algorithm of the present invention;
图2是本发明的水印嵌入流程图;FIG2 is a flow chart of watermark embedding of the present invention;
图3是SLT系数矩阵子带划分图;FIG3 is a diagram of the sub-band division of the SLT coefficient matrix;
图4是实施例中的水印嵌入示意图,其中,(a)为原始图像,(b)为水印图像,(c)为最终水印嵌入图像;FIG4 is a schematic diagram of watermark embedding in an embodiment, wherein (a) is an original image, (b) is a watermark image, and (c) is a final watermark-embedded image;
图5是本发明的水印提取流程图;FIG5 is a flow chart of watermark extraction of the present invention;
图6是提取出的水印图像;Fig. 6 is the extracted watermark image;
图7是本发明的图像还原流程图;FIG7 is a flowchart of image restoration of the present invention;
图8是实施例中的还原示意图,其中,(a)为还原图像,(b)为还原图像与原始图像的绝对差图像。FIG8 is a schematic diagram of restoration in the embodiment, wherein (a) is a restored image, and (b) is an absolute difference image between the restored image and the original image.
具体实施方式DETAILED DESCRIPTION
本实施例考虑到鲁棒可逆水印算法面临的溢出问题,想要在不破坏水印的不可见性与嵌入容量的情况下,有效、简单地避免溢出问题而不引起其他的问题。This embodiment takes into account the overflow problem faced by the robust reversible watermark algorithm and aims to effectively and simply avoid the overflow problem without causing other problems without destroying the invisibility and embedding capacity of the watermark.
本发明设计了抗溢出抖动调制模块,提供的一种基于SLT-DM的鲁棒可逆图像水印方法,如图1所示,包括水印嵌入、水印提取和图像还原三个过程。The present invention designs an anti-overflow jitter modulation module and provides a robust reversible image watermarking method based on SLT-DM, as shown in FIG1 , including three processes: watermark embedding, watermark extraction and image restoration.
其中,水印嵌入过程如图2所示,包括:The watermark embedding process is shown in Figure 2, including:
步骤A10,原始图像预处理。Step A10: preprocessing of original image.
如果原始图像是彩色图像,则取原始图像的G通道图层作为预处理图像;如果原始图像是灰度图像,则原始图像作为预处理图像;将预处理图像分成为大小为N×N的不重叠的预处理图像子块B0i,其中i表示与图像子块对应的序号。If the original image is a color image, the G channel layer of the original image is taken as the preprocessed image; if the original image is a grayscale image, the original image is taken as the preprocessed image; the preprocessed image is divided into non-overlapping preprocessed image sub-blocks B 0i of size N×N, where i represents the sequence number corresponding to the image sub-block.
首先需要判断图像是否为彩色图像,若是彩色图像则取其G通道图层,若是灰度图像,则直接采用其本身。因为RGB三个通道中G通道表现出更加优异的鲁棒性与不可见性,以及生成还原信息的限制,本算法只能选取整数型的通道,原因会在生成还原信息部分进一步详述,所以彩色图像中我们采用G通道而不用Y通道。然后将此图层分成大小为N×N的不重叠的子块,每一位水印比特将嵌入进一个子块。经过测试,本方法设定N=32。First, we need to determine whether the image is a color image. If it is a color image, we take its G channel layer. If it is a grayscale image, we directly use it. Because the G channel of the three RGB channels shows better robustness and invisibility, as well as the limitation of generating restoration information, this algorithm can only select integer channels. The reason will be further described in the section of generating restoration information. Therefore, we use the G channel instead of the Y channel for color images. Then divide this layer into non-overlapping sub-blocks of size N×N, and each watermark bit will be embedded in a sub-block. After testing, this method sets N=32.
步骤A20,遍历所有预处理图像子块B0i,嵌入水印。Step A20, traverse all pre-processed image sub-blocks B 0i and embed watermarks.
将预处理图像子块B0i从空间域变换到频率域,根据预处理图像子块B0i的中频系数矩阵计算嵌入因子E0i,将水印比特嵌入到预处理图像子块B0i的中频系数矩阵中,再将水印嵌入后的图像子块从频率域变换到空间域,得到水印嵌入图像子块B1i。The preprocessed image sub-block B 0i is transformed from the spatial domain to the frequency domain, the embedding factor E 0i is calculated according to the intermediate frequency coefficient matrix of the preprocessed image sub-block B 0i , the watermark bit is embedded into the intermediate frequency coefficient matrix of the preprocessed image sub-block B 0i , and then the image sub-block after watermark embedding is transformed from the frequency domain to the spatial domain to obtain the watermark embedded image sub-block B 1i .
按公式1对空间域的预处理图像子块B0i进行SLT变换,得到频率域的图像子块系数矩阵,且系数矩阵包括低频系数矩阵LL、第一中频系数矩阵LH、第二中频系数矩阵HL和高频系数矩阵HH:According to
其中,s为图像子块的像素矩阵,S为变换后的SLT系数矩阵,N是矩阵的大小,这里的SLT变换仅针对方阵。SLTN是根据SLT变换算法计算出来的变换矩阵。Where s is the pixel matrix of the image sub-block, S is the transformed SLT coefficient matrix, N is the size of the matrix, and the SLT transformation here is only for square matrices. SLT N is the transformation matrix calculated according to the SLT transformation algorithm.
SLT变换是一种优化的离散小波变换(Discrete wavelet transform,DWT),它拥有比DWT更好的不可见性,允许通过提高嵌入强度使得在相似的不可见性的表现下获得更好的鲁棒性。根据C.Mulc-ahy在《Image compression using the Haarwavelettransform》中解释的图像变换方法,我们使用SLTN矩阵来计算图像块的SLT系数矩阵,而不是使用传统的SLT变换。SLT变换如公式1所示,其逆变换如公式2所示。再根据公式3将SLT系数矩阵分为低频系数矩阵LL、第一中频系数矩阵LH、第二中频系数矩阵LH、高频系数矩阵HH,如图3所示。The SLT transform is an optimized discrete wavelet transform (DWT), which has better invisibility than the DWT and allows better robustness under similar invisibility by improving the embedding strength. According to the image transformation method explained by C. Mulc-ahy in "Image compression using the Haarwavelet transform", we use the SLT N matrix to calculate the SLT coefficient matrix of the image block instead of using the traditional SLT transform. The SLT transform is shown in
根据预处理图像子块B0i的中频系数矩阵计算嵌入因子E0i具体为:图像子块在频率域的中频系数矩阵包括HL,分别按公式4计算第一中频系数矩阵LH和按公式5计算第二中频系数矩阵中元素的平均值:The embedding factor E 0i is calculated according to the intermediate frequency coefficient matrix of the preprocessed image sub-block B 0i as follows: the intermediate frequency coefficient matrix of the image sub-block in the frequency domain includes HL, and the average value of the elements in the first intermediate frequency coefficient matrix LH is calculated according to Formula 4 and the second intermediate frequency coefficient matrix is calculated according to Formula 5:
meanLHi=mean(LHi) (4),meanLH i =mean(LH i ) (4),
meanHLi=mean(HLi) (5);meanHL i =mean(HL i ) (5);
再由第一中频系数矩阵的平均值meanLHi和第二中频系数矩阵的平均值meanHLi按公式6计算嵌入因子Ei:Then, the embedding factor E i is calculated according to the average value meanLH i of the first intermediate frequency coefficient matrix and the average value meanHL i of the second intermediate frequency coefficient matrix according to Formula 6:
Ei=meanLHi-meanHLi (6),E i =meanLH i -meanHL i (6),
其中mean()表示求平均值函数。通过系数均值来嵌入水印以获得更强的鲁棒性。Where mean() represents the averaging function. The watermark is embedded by the coefficient mean to obtain stronger robustness.
然后,将水印比特wi嵌入到预处理图像子块B0i的中频系数矩阵中的具体过程为:Then, the specific process of embedding the watermark bit wi into the intermediate frequency coefficient matrix of the pre-processed image sub-block B0i is:
构建三段映射函数为公式7和公式8,按公式7将预处理子块B0i的嵌入因子E0i映射到一个判断域上的判断因子D0i:The three-segment mapping function is constructed as Formula 7 and Formula 8. According to Formula 7, the embedding factor E 0i of the preprocessing sub-block B 0i is mapped to a judgment factor D 0i on a judgment domain:
其中,Range1=[-0.3R,0.3R],Range2=[-0.7R,-0.3R)∪(0.3R,0.7R],Among them, Range1=[-0.3R,0.3R], Range2=[-0.7R,-0.3R)∪(0.3R,0.7R],
Range3=[-k1×0.3R,k1×0.3R],Range3=[-k1×0.3R,k1×0.3R],
Range4=[-k1×0.3R-k2×0.4R,-k1×0.3R)∪(k1×0.3R,k1×0.3R+k2×0.4R];k1、k2、k3均为斜率;R为映射函数的调整区间,sign为符号函数。Range4=[-k1×0.3R-k2×0.4R,-k1×0.3R)∪(k1×0.3R,k1×0.3R+k2×0.4R]; k1, k2, k3 are all slopes; R is the adjustment interval of the mapping function, and sign is the sign function.
斜率k1用于使变化量扩大,所以其取值应小于1,但又不能使变化反向,因此k1的取值范围为k1∈(0,1);斜率k2用于保证中间的变化量是一致的,但是较小的波动不会影响变化,因此k2的取值范围为k2∈[1,2];斜率k3是为了让变化量缩小,所以取值范围为k3∈(10,+∞)。在本实施例中,k1=0.5,k2=1,k3=50,R为映射函数的调整区间,根据实验定为13.5。The slope k1 is used to expand the change, so its value should be less than 1, but it cannot reverse the change, so the value range of k1 is k1∈(0,1); the slope k2 is used to ensure that the change in the middle is consistent, but small fluctuations will not affect the change, so the value range of k2 is k2∈[1,2]; the slope k3 is to reduce the change, so the value range is k3∈(10,+∞). In this embodiment, k1 = 0.5, k2 = 1, k3 = 50, and R is the adjustment interval of the mapping function, which is determined to be 13.5 according to experiments.
通过此三段映射函数将原本的嵌入因子映射到一个判断域上进行改动,使得在判断域的变化量足够大以保证强鲁棒性,同时逆变换后Ei的变化量足够小以保证高不可见性。同时此三段映射函数通过三个不同的斜率k1、k2、k3,控制逆变换后的真实改变量,使其在靠近中点时大而远离中点时远,这也是为了保证强鲁棒性与高不可见性。Through this three-stage mapping function, the original embedded factor is mapped to a judgment domain for modification, so that the change in the judgment domain is large enough to ensure strong robustness, and the change in E i after the inverse transformation is small enough to ensure high invisibility. At the same time, this three-stage mapping function controls the actual change after the inverse transformation through three different slopes k1, k2, and k3, so that it is large when close to the midpoint and far away from the midpoint, which is also to ensure strong robustness and high invisibility.
当水印比特wi=1时,按公式9将水印比特wi嵌入到判断因子Di,得到嵌入水印后的判断因子DEMi;当水印比特wi=0时,按公式10将水印比特wi嵌入到判断因子Di,得到嵌入水印后的判断因子DEMi:When the watermark bit wi = 1, the watermark bit wi is embedded into the judgment factor Di according to formula 9 to obtain the judgment factor DEMi after embedding the watermark; when the watermark bit wi = 0, the watermark bit wi is embedded into the judgment factor Di according to formula 10 to obtain the judgment factor DEMi after embedding the watermark:
其中,T表示平衡阈值。Wherein, T represents the equilibrium threshold.
水印比特嵌入时,本方案设计了一种二元的正负关系嵌入策略以提高鲁棒性。在判断域,通过判断因子Di的正负关系与水印比特wi取值为0、1联系起来,设置当水印比特wi为1的时候,判断因子Di需大于等于0;当水印比特wi为0的时候,判断因子Di需小于0;同时为了提高鲁棒性,算法还设置了阈值T,使Di不仅要符合正负关系,还需要其绝对值大于T来保证水印的强鲁棒性,其中,T=k1×0.3R+k2×0.3R。When embedding watermark bits, this scheme designs a binary positive and negative relationship embedding strategy to improve robustness. In the judgment domain, by linking the positive and negative relationship of the judgment factor Di with the watermark bit wi value of 0 and 1, it is set that when the watermark bit wi is 1, the judgment factor Di must be greater than or equal to 0; when the watermark bit wi is 0, the judgment factor Di must be less than 0; at the same time, in order to improve robustness, the algorithm also sets a threshold T, so that Di not only meets the positive and negative relationship, but also requires its absolute value to be greater than T to ensure the strong robustness of the watermark, where T = k 1 × 0.3R + k 2 × 0.3R.
按公式8将嵌入水印后的判断因子DEMi逆映射到嵌入水印后的嵌入因子E0EMi,然后将嵌入水印后的嵌入因子E0EMi添加到预处理图像子块B0i的第一中频系数矩阵LHi和第二中频系数矩阵HLi中,得到新的频率域的系数矩阵,即嵌入水印后的系数矩阵:According to Formula 8, the watermarked judgment factor DEMi is inversely mapped to the watermarked embedding factor E0EMi , and then the watermarked embedding factor E0EMi is added to the first intermediate frequency coefficient matrix LH i and the second intermediate frequency coefficient matrix HL i of the preprocessed image sub-block B0i to obtain a new frequency domain coefficient matrix, that is, the watermarked coefficient matrix:
Meani=meanLHi+meanHLi;Mean i =meanLH i +meanHL i ;
newLHi=Meani+E0EMi;newLH i =Mean i +E 0EMi ;
newHLi=Meani-E0EMi;newHL i =Mean i −E 0EMi ;
LHEMi=LHi+(newLHi-meanLHi);LH EMi =LH i +(newLH i -meanLH i );
HLEMi=HLi+(newHLi-meanHLi)。HL EMi =HL i + (newHL i -meanHL i ).
然后再按公式2对嵌入水印后的系数矩阵进行逆SLT变换,得到空间域的水印嵌入图像子块B1i的像素矩阵。Then, the coefficient matrix after embedding the watermark is inversely transformed by SLT according to
步骤A30,遍历所有水印嵌入图像子块B1i,进行防溢出处理。Step A30, traverse all watermark embedded image sub-blocks B 1i and perform anti-overflow processing.
将水印嵌入图像子块B1i进行防溢出处理,得到防溢出水印图像子块B2i。The watermark is embedded in the image sub-block B 1i and anti-overflow processing is performed to obtain the anti-overflow watermark image sub-block B 2i .
水印嵌入后,水印嵌入图像子块B1i有产生溢出的可能性,为了保证嵌入没有溢出,本申按公式11对水印嵌入图像子块B1i进行防溢出处理:After the watermark is embedded, the watermark embedded image sub-block B 1i may overflow. In order to ensure that there is no overflow during embedding, this paper performs anti-overflow processing on the watermark embedded image sub-block B 1i according to formula 11:
其中,Pixel是水印嵌入图像子块B1i的像素灰度值。Wherein, Pixel is the pixel grayscale value of the watermark embedded image sub-block B 1i .
步骤A40,遍历所有防溢出水印图像子块B2i,嵌入还原信息。Step A40, traverse all anti-overflow watermark image sub-blocks B 2i and embed restoration information.
本发明利用抖动调制的变换特性来嵌入还原信息,即在同一范围内的值每次调制后会回归同一值,因此将还原信息添加在抖动调制后的低频系数中,这样在提取时,只需要再对低频系数进行一次抖动调制,就能得到嵌入的还原信息。本专利中,还原信息包括嵌入水印和防溢出处理所导致的嵌入因子的改变量以及第一次抖动调制时原低频系数与其抖动回归值的差值。为了图像能完全可逆还原,需要保证在图像还原时能分离出嵌入水印和防溢出处理所导致的嵌入因子的改变量以及第一次抖动调制时原低频系数与其抖动回归值的差值,需要对这两个值处理保证它们之间有至少半个量级的差距,且其中一个的小数位个数必须是固定的(或是小于此固定值)。接下来来说明上文中提到的为何需要选取整数型的通道以及此模块控制溢出的措施。The present invention uses the transformation characteristics of jitter modulation to embed restoration information, that is, the values in the same range will return to the same value after each modulation, so the restoration information is added to the low-frequency coefficient after jitter modulation, so that when extracting, only one more jitter modulation is needed for the low-frequency coefficient to obtain the embedded restoration information. In this patent, the restoration information includes the change in the embedding factor caused by the embedded watermark and the anti-overflow processing and the difference between the original low-frequency coefficient and its jitter regression value during the first jitter modulation. In order to ensure that the image can be completely reversibly restored, it is necessary to ensure that the change in the embedding factor caused by the embedded watermark and the anti-overflow processing and the difference between the original low-frequency coefficient and its jitter regression value during the first jitter modulation can be separated during image restoration. The two values need to be processed to ensure that there is at least half an order of magnitude difference between them, and the number of decimal places of one of them must be fixed (or less than this fixed value). Next, it is explained why it is necessary to select integer channels and the measures for controlling overflow in this module mentioned above.
此处首先推导出第一低频系数LL(1,1)的改变量与图像像素的改变的关系,推导如下:Here, the relationship between the change of the first low-frequency coefficient LL(1,1) and the change of the image pixels is first derived as follows:
原子块逆SLT变换如公式12所示,改变低频系数LL(1,1)后的逆SLT变换如公式13所示,其中S'是第一低频系数LL(1,1)增加ΔS后的低频系数矩阵,如公式14所示;根据SLTN矩阵计算方法可知:SLTN(1,1)=(1/2)∧(log2N)/2),接着计算子块像素矩阵的变化Δs,如公式15所示。The inverse SLT transform of the atomic block is shown in formula 12, and the inverse SLT transform after changing the low-frequency coefficient LL(1,1) is shown in formula 13, where S' is the low-frequency coefficient matrix after the first low-frequency coefficient LL(1,1) is increased by ΔS , as shown in formula 14; according to the SLT N matrix calculation method, it can be known that: SLT N (1,1) = (1/2)∧(log 2 N)/2), and then the change Δs of the sub-block pixel matrix is calculated, as shown in formula 15.
经过推导,由公式15可以发现,第一低频系数LL(1,1)的改变量与图像像素的改变量是同向的,且LL(1,1)的改变只会影响子块的第一个像素。所以为了控制所有变化不会导致像素灰度值跃出[0,255]区间,算法通过判断子块第一个像素的灰度值是否大于127,选择不同的抖动函数,即DM函数,来控制变化方向。After derivation, it can be found from formula 15 that the change of the first low-frequency coefficient LL(1,1) is in the same direction as the change of the image pixel, and the change of LL(1,1) will only affect the first pixel of the sub-block. Therefore, in order to control all changes so that the pixel grayscale value does not jump out of the [0,255] interval, the algorithm determines whether the grayscale value of the first pixel of the sub-block is greater than 127 and selects different dithering functions, namely DM functions, to control the direction of change.
当第一像素的灰度值s(1,1)≥127时,抖动调制函数为公式16;当第一像素的灰度值s(1,1)<127时,第一次抖动调制函数为公式17:When the gray value of the first pixel s(1,1)≥127, the dither modulation function is Formula 16; when the gray value of the first pixel s(1,1)<127, the first dither modulation function is Formula 17:
其中,floor()是向下取整函数,ceil()是向上取整函数,sign()是符号函数,H是量化步长,由第一低频系数LL(1,1)的大小凭经验给定,NumLL是中间变量,表示第一低频系数LL(1,1)包含的步长数量。在本算法中,量化步长H设为20。Among them, floor() is the floor function, ceil() is the ceiling function, sign() is the sign function, H is the quantization step size, which is given empirically by the size of the first low-frequency coefficient LL(1,1), and NumLL is an intermediate variable, indicating the number of steps contained in the first low-frequency coefficient LL(1,1). In this algorithm, the quantization step size H is set to 20.
同时,由于嵌入因子的改变量的小数位的个数是不确定的,所以低频系数LL(1,1)的改变量的小数位需要保证是有限的。为了保证其小数位个数是固定的(或是小于此固定值),需要保证原始图像变换后的低频系数LL(1,1)为整数。At the same time, since the number of decimal places of the change in the embedding factor is uncertain, the number of decimal places of the change in the low-frequency coefficient LL(1,1) needs to be finite. In order to ensure that the number of decimal places is fixed (or less than this fixed value), it is necessary to ensure that the low-frequency coefficient LL(1,1) after the original image transformation is an integer.
下面推导低频系数LL(1,1)与像素灰度值矩阵的关系。SLT变换计算如公式18所示,只考虑LL(1,1),LL(1,1)计算如公式19所示,根据SLTN矩阵计算方法可知,SLTN系数矩阵的第一行均为(1/2)^((log2N)/2),所以LL(1,1)可如公式20计算。当本算法设置N=32时,LL(1,1)为子块像素和的1/32。综上,故需要所选取嵌入水印的图像通道为整数通道。The relationship between the low-frequency coefficient LL(1,1) and the pixel gray value matrix is derived below. The SLT transform calculation is shown in formula 18. Only LL(1,1) is considered. The calculation of LL(1,1) is shown in formula 19. According to the SLT N matrix calculation method, the first row of the SLT N coefficient matrix is (1/2)^((log 2 N)/2), so LL(1,1) can be calculated as shown in formula 20. When this algorithm sets N=32, LL(1,1) is 1/32 of the sum of the sub-block pixels. In summary, the image channel selected for embedding the watermark needs to be an integer channel.
其中si,j是子块中第i行j列的像素灰度值。Where si ,j is the grayscale value of the pixel in the i-th row and j-th column in the sub-block.
具体地,嵌入还原信息的过程为:如对预处理图像子块B0i计算嵌入因子的方法相同,将防溢出水印图像子块B2i进行SLT变换从空间域变换到频率域,以及采用相同的方法根据防溢出水印图像子块B2i的中频系数矩阵计算嵌有水印的嵌入因子E2i。Specifically, the process of embedding and restoring information is as follows: the method of calculating the embedding factor for the preprocessed image sub-block B 0i is the same as that of performing SLT transformation on the anti-overflow watermark image sub-block B 2i from the spatial domain to the frequency domain, and the same method is used to calculate the embedding factor E 2i embedded with the watermark according to the intermediate frequency coefficient matrix of the anti-overflow watermark image sub-block B 2i .
根据预处理图像子块B0i的嵌入因子E0i和防溢出水印图像子块B2的嵌有水印的嵌入因子E2i,计算嵌入因子差值Dvalue1为:Dvalue1=E2i-E0i。According to the embedding factor E 0i of the preprocessed image sub-block B 0i and the embedding factor E 2i of the anti-overflow watermark image sub-block B 2 embedded with the watermark, the embedding factor difference Dvalue 1 is calculated as: Dvalue 1 = E 2i - E 0i .
对防溢出水印图像子块B2i的第一低频系数LL2i(1,1)根据第一像素的灰度值是否小于127,从而按公式16或公式17进行第一次抖动调制处理,得到第一次抖动调制处理的第一低频系数LL2i(1,1)';根据防溢出水印图像子块B2i的第一低频系数LL2i(1,1)和经第一次抖动调制处理后的第一低频系数LL2i(1,1)',计算第一低频系数差值Dvalue2为:Dvalue2=LL2i(1,1)'-LL2i(1,1)。The first low-frequency coefficient LL 2i (1,1) of the anti-overflow watermark image sub-block B 2i is subjected to a first dither modulation process according to formula 16 or formula 17, depending on whether the grayscale value of the first pixel is less than 127, to obtain the first low-frequency coefficient LL 2i (1,1)' subjected to the first dither modulation process; according to the first low-frequency coefficient LL 2i (1,1) of the anti-overflow watermark image sub-block B 2i and the first low-frequency coefficient LL 2i (1,1)' subjected to the first dither modulation process, the first low-frequency coefficient difference Dvalue 2 is calculated as: Dvalue 2 =LL 2i (1,1)'-LL 2i (1,1).
然后由嵌入因子差值Dvalue1和第一低频系数差值Dvalue2合成总差值Dvalue:Then the total difference Dvalue is synthesized by the embedding factor difference Dvalue 1 and the first low-frequency coefficient difference Dvalue 2 :
其中Dc1是嵌入因子差值的控制因子,Dc2是第一低频系数差值的控制因子,Dc3是总差值的控制因子,且Dvalue2×Dc2为大于1的整数,|Dvalue1/Dc1|<0.5,Dvalue<0.5H,H表示第一次抖动调制和第二次抖动调制的量化步长。Wherein Dc1 is the control factor of the embedding factor difference, Dc2 is the control factor of the first low-frequency coefficient difference, Dc3 is the control factor of the total difference, and Dvalue 2 ×Dc 2 is an integer greater than 1, |Dvalue 1 /Dc 1 |<0.5, Dvalue<0.5H, H represents the quantization step size of the first dither modulation and the second dither modulation.
通过设置嵌入因子差值的控制因子Dc1,保证调整后的嵌入因子差值|Dvalue1/Dc1|<0.5;通过设置第一低频系数差值的控制因子Dc2,保证调整后的第一低频系数差值Dvalue2×Dc2是大于1的整数;通过设置总差值的控制因子Dc3,使调整后的总差值Dvalue×Dc3通过四舍五入取整可以求出调整后的第一低频系数差值Dvalue2×Dc2,再将调整后的总差值Dvalue与调整后的第一低频系数差值相减能求出调整后的嵌入因子差值Dvalue1/Dc1。而总差值的控制因子Dc3可以使合成的总差值Dvalue小于半个量化步长,从而不影响抖动调制区间。By setting the control factor Dc1 of the embedding factor difference, it is ensured that the adjusted embedding factor difference |Dvalue 1 /Dc 1 | is less than 0.5; by setting the control factor Dc2 of the first low-frequency coefficient difference, it is ensured that the adjusted first low-frequency coefficient difference Dvalue 2 ×Dc 2 is an integer greater than 1; by setting the control factor Dc3 of the total difference, the adjusted total difference Dvalue×Dc 3 can be rounded off to obtain the adjusted first low-frequency coefficient difference Dvalue 2 ×Dc 2 , and then the adjusted total difference Dvalue is subtracted from the adjusted first low-frequency coefficient difference to obtain the adjusted embedding factor difference Dvalue 1 /Dc 1. The control factor Dc 3 of the total difference can make the synthesized total difference Dvalue less than half the quantization step, so as not to affect the jitter modulation interval.
具体地,本发明通过多次实验中嵌入因子E的分布,以及抖动调制函数可以推断出嵌入因子Dvalue1与第一低频系数差值Dvalue2的大致分布情况,从而设定嵌入因子差值的控制因子Dc1、第一低频系数差值Dc2和总差值的控制因子Dc3的值。本专利中,因为N=32,根据LL(1,1)与子块像素关系的推导,Dc2设置为32,使得调整后的第一低频系数差值Dvalue2×Dc2为整数。由于嵌入因子E的变化量最大不会超过其分布长度,所以可以假设其最大变化量为其分布长度,为了控制|Dvalue1/Dc1|<0.5,所以Dc1设置为2倍嵌入因子分布长度,为了保证Dc1的设置具有普遍性,根据大量实验,得出大致分布区间为(1,18),并且在算法中我们取嵌入因子分布长度为25,因此设置Dc1=50。而且,总差值Dvalue需要保证不会影响抖动调制范围,因此Dvalue<0.5H。又由于Dvalue2×Dc2是大于1的整数,而|Dvalue1/Dc1|<0.5,因此调整后的嵌入因子差值Dvalue1/Dc1与调整后的第一低频系数差值Dvalue2×Dc2之和(Dvalue2×Dc2+Dvalue1/Dc1)的数量级只取决于调整后的第一低频系数差值Dvalue2×Dc2,根据公式16和公式17可知Dvalue2的最大变化值为3H/2,所以当控制因子Dc3=3×Dc2/2时,总差值Dvalue的最大值与量化步长H几乎相等(因为还有调整后的嵌入因子差值的影响),所以设置Dc3=3×Dc2×H/2=960,这样Dvalue的最大变化量不会超过1.6,远小于H/2,从而不会影响抖动调制范围。Specifically, the present invention can infer the approximate distribution of the embedding factor Dvalue 1 and the first low-frequency coefficient difference Dvalue 2 through the distribution of the embedding factor E in multiple experiments and the jitter modulation function, thereby setting the values of the control factor Dc1 of the embedding factor difference, the first low-frequency coefficient difference Dc2 and the control factor Dc3 of the total difference. In this patent, because N=32, according to the derivation of the relationship between LL(1,1) and the sub-block pixel, Dc 2 is set to 32, so that the adjusted first low-frequency coefficient difference Dvalue 2 ×Dc 2 is an integer. Since the maximum change of the embedding factor E will not exceed its distribution length, it can be assumed that its maximum change is its distribution length. In order to control |Dvalue 1 /Dc 1 |<0.5, Dc1 is set to 2 times the embedding factor distribution length. In order to ensure that the setting of Dc1 is universal, according to a large number of experiments, it is concluded that the approximate distribution interval is (1,18), and in the algorithm we take the embedding factor distribution length as 25, so Dc1 is set to 50. Moreover, the total difference Dvalue needs to ensure that it does not affect the jitter modulation range, so Dvalue<0.5H. Since Dvalue 2 ×Dc 2 is an integer greater than 1, and |Dvalue 1 /Dc 1 |<0.5, the order of magnitude of the sum of the adjusted embedding factor difference Dvalue 1 /Dc 1 and the adjusted first low-frequency coefficient difference Dvalue 2 ×Dc 2 (Dvalue 2 ×Dc 2 +Dvalue 1 /Dc 1 ) only depends on the adjusted first low-frequency coefficient difference Dvalue 2 ×Dc 2. According to Formula 16 and Formula 17, the maximum change value of Dvalue 2 is 3H/2. Therefore, when the control factor Dc 3 =3×Dc 2 /2, the maximum value of the total difference Dvalue is almost equal to the quantization step H (because of the influence of the adjusted embedding factor difference). Therefore, Dc 3 =3×Dc 2 ×H/2=960 is set. In this way, the maximum change amount of Dvalue will not exceed 1.6, which is much smaller than H/2, and thus will not affect the jitter modulation range.
然后,将总差值Dvalue嵌入到第一次抖动调制处理后的第一低频系数LL2i(1,1)',得到嵌入还原信息的第一低频系数LL2i(1,1)'EM:LL2i(1,1)'EM=LL2i(1,1)'+Dvalue,再将嵌入总差值Dvalue后的图像从频率域变换到空间域,得到最终水印嵌入图像子块B3i。原始图像如图4(a)所示,水印图像如图4(b)所示,最终水印嵌入图像如图4(c)所示。Then, the total difference Dvalue is embedded into the first low-frequency coefficient LL 2i (1,1)' after the first dither modulation process, and the first low-frequency coefficient LL 2i (1,1)' EM embedded with the restored information is obtained: LL 2i (1,1)' EM =LL 2i (1,1)'+Dvalue, and then the image after the total difference Dvalue is embedded is transformed from the frequency domain to the spatial domain to obtain the final watermark embedded image sub-block B 3i . The original image is shown in Figure 4(a), the watermark image is shown in Figure 4(b), and the final watermark embedded image is shown in Figure 4(c).
水印提取过程如图5所示,包括:The watermark extraction process is shown in Figure 5, including:
步骤B10,计算嵌入因子:如对预处理图像子块B0i计算嵌入因子的方法相同,将最终水印嵌入图像子块B3i进行SLT变换从空间域变换到频率域,根据最终水印嵌入图像子块B3i的中频系数矩阵计算嵌入因子E3i。Step B10, calculate the embedding factor: the final watermark embedded image sub-block B 3i is transformed from the spatial domain to the frequency domain by SLT transformation in the same way as the embedding factor calculation method for the pre-processed image sub-block B 0i , and the embedding factor E 3i is calculated according to the intermediate frequency coefficient matrix of the final watermark embedded image sub-block B 3i .
步骤B20,提取水印比特:重构三段映射函数公式7和公式8,并按公式7将最终水印嵌入图像子块B3i的嵌入因子E3i映射到判断域上的判断因子D3i,并按公式22从判断因子D3i中提取水印比特wi:Step B20, extracting watermark bits: reconstructing the three-segment mapping function formula 7 and formula 8, and mapping the embedding factor E 3i of the final watermark embedded image sub-block B 3i to the judgment factor D 3i on the judgment domain according to formula 7, and extracting the watermark bit w i from the judgment factor D 3i according to formula 22:
遍历所有最终水印嵌入图像子块B3i,提取出所有水印比特,再组合成水印。结果如图6所示,提取的水印与原始水印的误码率(Bit Error Rate,BER)计算得0。Traverse all the final watermark embedded image sub-blocks B 3i , extract all watermark bits, and combine them into a watermark. The result is shown in Figure 6. The bit error rate (BER) of the extracted watermark and the original watermark is calculated to be 0.
图像还原过程如图7所示,包括:The image restoration process is shown in Figure 7, including:
对于待还原图像,即所有最终水印嵌入图像子块B3i组合得到的图像,首先按照水印嵌入一样,将待还原图像分成不重叠的待还原图像子块,即为最终水印嵌入图像子块B3i。For the image to be restored, that is, the image obtained by combining all the final watermark embedded image sub-blocks B 3i , firstly, the image to be restored is divided into non-overlapping image sub-blocks to be restored as the watermark embedding, which are the final watermark embedded image sub-blocks B 3i .
步骤C10,遍历所有最终水印嵌入图像子块B3i,将最终水印嵌入图像子块B3i进行SLT变换从空间域变换到频率域,根据最终水印嵌入图像子块B3i的中频系数矩阵计算嵌入因子E3i。Step C10, traverse all final watermark embedded image sub-blocks B 3i , perform SLT transformation on the final watermark embedded image sub-block B 3i from the spatial domain to the frequency domain, and calculate the embedding factor E 3i according to the intermediate frequency coefficient matrix of the final watermark embedded image sub-block B 3i .
步骤C20,计算还原信息,即总差值Dvalue,并从中分离出嵌入因子差值Dvalue1和第一低频系数差值Dvalue2。Step C20, calculating the restoration information, ie, the total difference Dvalue, and separating the embedding factor difference Dvalue 1 and the first low-frequency coefficient difference Dvalue 2 therefrom.
对最终水印嵌入图像子块B3i的第一低频系数LL3i(1,1)按公式23进行第二次抖动调制,使之回归到抖动回归值,可得知第二次抖动调制后的第一低频系数LL3i(1,1)'与第一次抖动调制后的第一低频系数LL2i(1,1)'相同:LL3i(1,1)'=LL2i(1,1)'。然后按公式24计算得到嵌于第一低频系数LL3i(1,1)的总差值Dvalue:The first low-frequency coefficient LL 3i (1,1) of the final watermark embedded image sub-block B 3i is subjected to a second dither modulation according to formula 23 to return it to the dither regression value. It can be seen that the first low-frequency coefficient LL 3i (1,1)' after the second dither modulation is the same as the first low-frequency coefficient LL 2i (1,1)' after the first dither modulation: LL 3i (1,1)'=LL 2i (1,1)'. Then the total difference Dvalue embedded in the first low-frequency coefficient LL 3i (1,1) is calculated according to formula 24:
Dvalue=LL3i(1,1)-LL3i(1,1)' (24)。Dvalue=LL 3i (1,1)-LL 3i (1,1)' (24).
算法设计的抖动调制方程,当s(1,1)大于等于127时,公式16是对LL(1,1)向下取整再减半个步长;当s(1,1)小于127时,公式17是对LL2i(1,1)向上取整再加半个步长,这样就能保证第一低频系数LL2i(1,1)的变换不会使s(1,1)上下溢出。因此,论第一次抖动调制采用公式16还是采用公式17对第一低频系数LL2i(1,1)进行抖动调制,在图像还原进行第二次抖动调制时,均能通过对最终水印嵌入图像子块B3i的第一低频系数LL3i(1,1)向上取整再减半个步长还原得到抖动回归值,即第二次抖动调制后的第一低频系数LL3i(1,1)',如公式23所示。The jitter modulation equation designed by the algorithm, when s(1,1) is greater than or equal to 127, formula 16 is to round down LL(1,1) and then reduce the half step size; when s(1,1) is less than 127, formula 17 is to round up LL 2i (1,1) and add half a step size, so that it can be guaranteed that the transformation of the first low-frequency coefficient LL 2i (1,1) will not cause s(1,1) to overflow. Therefore, regardless of whether the first jitter modulation uses formula 16 or formula 17 to perform jitter modulation on the first low-frequency coefficient LL 2i (1,1), when the second jitter modulation is performed on the image restoration, the first low-frequency coefficient LL 3i (1,1) of the final watermark embedded image sub-block B 3i can be rounded up and then reduced by half a step size to restore the jitter regression value, that is, the first low-frequency coefficient LL 3i (1,1)' after the second jitter modulation, as shown in formula 23.
然后,再由总差值Dvalue、控制因子Dc1、Dc2、Dc3的设置值,按公式25计算得到嵌入因子差值Dvalue1和第一低频系数差值Dvalue2:Then, the total difference Dvalue and the setting values of the control factors Dc1, Dc2, and Dc3 are used to calculate the embedding factor difference Dvalue 1 and the first low-frequency coefficient difference Dvalue 2 according to formula 25:
步骤C30,根据最终水印嵌入图像子块B3i的嵌入因子E3i和嵌入因子差值Dvalue1,按公式26计算得到还原图像子块B4i的嵌入因子E4i:Step C30, according to the embedding factor E 3i of the final watermark embedded image sub-block B 3i and the embedding factor difference Dvalue 1 , the embedding factor E 4i of the restored image sub-block B 4i is calculated according to formula 26:
E4i=E3i-Dvalue1 (26)。由于抖动调制和嵌入还原信息的载体是第一低频系数,用于水印嵌入的嵌入因子的载体是中频系数,而对低频系数与中频系数的处理是相互独立的,互不影响,因此对防溢出水印图像子块B2i的第一低频系数的抖动调制处理不会影响到中频系数,因此E3i=E2i,从而E4i=E3i-Dvalue1=E2i-Dvalue1=E0i,由此可得,还原图像子块B4i的嵌入因子E4i与预处理图像子块B0i的嵌入因子E0i相同,可根据还原图像子块B4i的嵌入因子E4i还原图像。E 4i =E 3i -Dvalue 1 (26). Since the carrier of the dither modulation and embedded restoration information is the first low-frequency coefficient, the carrier of the embedding factor used for watermark embedding is the intermediate frequency coefficient, and the processing of the low-frequency coefficient and the intermediate frequency coefficient is independent of each other and does not affect each other, the dither modulation processing of the first low-frequency coefficient of the anti-overflow watermark image sub-block B 2i will not affect the intermediate frequency coefficient, so E 3i =E 2i , and thus E 4i =E 3i -Dvalue 1 =E 2i -Dvalue 1 =E 0i , it can be obtained that the embedding factor E 4i of the restored image sub-block B 4i is the same as the embedding factor E 0i of the pre-processed image sub-block B 0i , and the image can be restored according to the embedding factor E 4i of the restored image sub-block B 4i .
步骤C40,根据最终水印嵌入图像子块B3i在第二次抖动调制后的第一低频系数LL3i(1,1)'和第一低频系数差值Dvalue2,按公式(27)得到还原图像子块B4的第一低频系数LL4i(1,1):Step C40, according to the first low-frequency coefficient LL 3i (1,1)' of the final watermark embedded image sub-block B 3i after the second dither modulation and the first low-frequency coefficient difference Dvalue 2 , the first low-frequency coefficient LL 4i (1,1) of the restored image sub-block B 4 is obtained according to formula (27):
LL4i(1,1)=LL3i(1,1)'-Dvalue2 (27)。LL 4i (1,1)=LL 3i (1,1)'-Dvalue 2 (27).
由于第二次抖动调制后的第一低频系数LL3i(1,1)'与第一次抖动调制后的第一低频系数LL2i(1,1)'相同:LL3i(1,1)'=LL2i(1,1)',可得:LL4i(1,1)=LL3i(1,1)'-Dvalue2=LL2i(1,1)'-Dvalue2=LL2i(1,1)。由于在对防溢出水印图像子块B2i的第一低频系数进行抖动调制处理之前,只对图像子块的中频系数做了处理,低频系数与中频系数相互独立而不受到影响,因此防溢出水印图像子块B2i的第一低频系数LL2i(1,1)与预处理图像子块B0i的第一低频系数LL0i(1,1)相同:LL2i(1,1)=LL0i(1,1),因此可得:LL4i(1,1)=LL0i(1,1)。因此可根据还原图像子块B4的第一低频系数LL4i(1,1)还原图像。Since the first low-frequency coefficient LL 3i (1,1)' after the second dither modulation is the same as the first low-frequency coefficient LL 2i (1,1)' after the first dither modulation: LL 3i (1,1)'=LL 2i (1,1)', it can be obtained that: LL 4i (1,1)=LL 3i (1,1)'-Dvalue 2 =LL 2i (1,1)'-Dvalue 2 =LL 2i (1,1). Because only the intermediate frequency coefficient of the image sub-block is processed before the dithering modulation processing is performed on the first low frequency coefficient of the anti-overflow watermark image sub-block B 2i, the low frequency coefficient and the intermediate frequency coefficient are independent of each other and are not affected. Therefore, the first low frequency coefficient LL 2i (1,1) of the anti-overflow watermark image sub-block B 2i is the same as the first low frequency coefficient LL 0i (1,1) of the pre-processed image sub-block B 0i : LL 2i (1,1) = LL 0i (1,1), so it can be obtained that: LL 4i (1,1) = LL 0i (1,1). Therefore, the image can be restored according to the first low frequency coefficient LL 4i (1,1) of the restored image sub-block B 4 .
步骤C50,由还原图像子块B4i的嵌入因子E4i计算还原图像子块B4i的中频系数矩阵,并利用还原图像子块B4i的中频系数矩阵和第一低频系数LL4i(1,1),将还原图像子块B4i由频率域变换到空间域,得到空间域的还原图像子块B4i,所有的还原图像子块B4i构成还原图像,如图8(a)所示。Step C50, calculate the intermediate frequency coefficient matrix of the restored image sub-block B 4i by the embedding factor E 4i of the restored image sub-block B 4i , and use the intermediate frequency coefficient matrix of the restored image sub-block B 4i and the first low-frequency coefficient LL 4i (1,1) to transform the restored image sub-block B 4i from the frequency domain to the spatial domain to obtain the restored image sub-block B 4i in the spatial domain. All the restored image sub-blocks B 4i constitute the restored image, as shown in Figure 8(a).
由于还原图像子块B4i的嵌入因子E4i与预处理图像子块B0i的嵌入因子E0i相同,且还原图像子块B4的第一低频系数LL4i(1,1)与预处理图像子块B0i的第一低频系数LL0i(1,1)相同,因此还原图像子块B4i与预处理图像子块B0i相同,从而可完全可逆还原得到原始图像,由图8(b)所示的还原图像与原始图像的绝对差图像验证可得,还原图像与原始图像相同,即本发明方法实现完全可逆还原原始图像。Since the embedding factor E 4i of the restored image sub-block B 4i is the same as the embedding factor E 0i of the pre-processed image sub-block B 0i , and the first low-frequency coefficient LL 4i (1,1) of the restored image sub-block B 4 is the same as the first low-frequency coefficient LL 0i (1,1) of the pre-processed image sub-block B 0i , the restored image sub-block B 4i is the same as the pre-processed image sub-block B 0i , so the original image can be completely reversibly restored. It can be verified by the absolute difference image between the restored image and the original image shown in Figure 8(b) that the restored image is the same as the original image, that is, the method of the present invention can achieve completely reversible restoration of the original image.
本实施例,首先为了保证水印有强鲁棒性与不可见性,设计了三段映射函数,通过SLT变换与二元嵌入策略提高水印的鲁棒性与不可见性。此时为了还原水印,需要记录下因三段映射函数处理嵌入因子与防溢出处理所引起的改变量,才能完全可逆地还原图像,但这是一个巨大的附加信息。受到基于抖动调制方法的可逆水印算法的启示,通过抖动调制将这些信息嵌入图像中,这样可以大量减少附加信息。可是单纯的基于抖动调制的方案存在一定缺陷,比如抖动调制对载体要求高,需要载体本身数值较大且鲁棒性高,所以一般都是在低频使用抖动调制的方法,但是这样对于应用场景就有了限制,而且抖动调制还会导致溢出,并不是完全可逆的。所以本发明设计了抗溢出抖动调制方法,首先处理嵌入引起的溢出问题,然后抗溢出地将这些信息嵌入SLT低频系数之中,并且仅用此方法可逆还原图像,将还原信息与版权信息分离开来以提高鲁棒性和扩宽应用场景,这样将还原信息与版权信息分离能再次增强鲁棒性与不可见性。In this embodiment, firstly, in order to ensure that the watermark has strong robustness and invisibility, a three-segment mapping function is designed, and the robustness and invisibility of the watermark are improved through SLT transformation and binary embedding strategy. At this time, in order to restore the watermark, it is necessary to record the change caused by the three-segment mapping function processing embedding factor and anti-overflow processing, so as to completely reversibly restore the image, but this is a huge amount of additional information. Inspired by the reversible watermark algorithm based on the jitter modulation method, this information is embedded into the image through jitter modulation, which can greatly reduce the additional information. However, there are certain defects in the scheme based on jitter modulation alone. For example, jitter modulation has high requirements on the carrier, and the carrier itself needs to have a large value and high robustness, so the jitter modulation method is generally used at low frequency, but this has limitations on the application scenario, and jitter modulation can also cause overflow, which is not completely reversible. Therefore, the present invention designs an anti-overflow jitter modulation method, which first deals with the overflow problem caused by embedding, and then embeds this information into the SLT low-frequency coefficients in an anti-overflow manner, and only uses this method to reversibly restore the image, separating the restored information from the copyright information to improve robustness and expand the application scenarios. In this way, separating the restored information from the copyright information can further enhance robustness and invisibility.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811321674.6A CN109493270B (en) | 2018-11-07 | 2018-11-07 | Watermark image restoration method based on SLT-DM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811321674.6A CN109493270B (en) | 2018-11-07 | 2018-11-07 | Watermark image restoration method based on SLT-DM |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109493270A CN109493270A (en) | 2019-03-19 |
CN109493270B true CN109493270B (en) | 2023-03-24 |
Family
ID=65695304
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811321674.6A Active CN109493270B (en) | 2018-11-07 | 2018-11-07 | Watermark image restoration method based on SLT-DM |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109493270B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112669191B (en) * | 2019-10-15 | 2023-07-04 | 国际关系学院 | Anti-overflow reversible digital watermark embedding and extracting method based on image content identification |
CN113256674B (en) * | 2021-06-28 | 2021-10-26 | 恒银金融科技股份有限公司 | Complex background separation method based on difference value |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011026365A1 (en) * | 2009-09-03 | 2011-03-10 | 中兴通讯股份有限公司 | Method and system for embedding and extracting image digital watermark |
CN103955880A (en) * | 2014-04-11 | 2014-07-30 | 杭州电子科技大学 | DWT-SVD robust blind watermark method based on Zernike moments |
CN104700345A (en) * | 2015-01-16 | 2015-06-10 | 天津科技大学 | Method for improving detection rate of semi-fragile watermark authentication by establishing Benford's law threshold value library |
CN106408497A (en) * | 2016-08-31 | 2017-02-15 | 南京师范大学 | A Strong and Robust Watermark Embedding and Extraction Method for Original Remote Sensing Image |
-
2018
- 2018-11-07 CN CN201811321674.6A patent/CN109493270B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011026365A1 (en) * | 2009-09-03 | 2011-03-10 | 中兴通讯股份有限公司 | Method and system for embedding and extracting image digital watermark |
CN103955880A (en) * | 2014-04-11 | 2014-07-30 | 杭州电子科技大学 | DWT-SVD robust blind watermark method based on Zernike moments |
CN104700345A (en) * | 2015-01-16 | 2015-06-10 | 天津科技大学 | Method for improving detection rate of semi-fragile watermark authentication by establishing Benford's law threshold value library |
CN106408497A (en) * | 2016-08-31 | 2017-02-15 | 南京师范大学 | A Strong and Robust Watermark Embedding and Extraction Method for Original Remote Sensing Image |
Also Published As
Publication number | Publication date |
---|---|
CN109493270A (en) | 2019-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101699508B (en) | Image digital watermark embedding and extracting method and system | |
Meng et al. | An adaptive reversible watermarking in IWT domain | |
CN100394443C (en) | A Reversible Watermarking Method for Image Authentication | |
Phadikar et al. | Novel wavelet-based QIM data hiding technique for tamper detection and correction of digital images | |
Venugopala et al. | Video watermarking by adjusting the pixel values and using scene change detection | |
KR101135472B1 (en) | Reversible watermark inserting, extracting and original contents restoring methods using difference histogram | |
Hu et al. | Robust blind image watermarking by modulating the mean of partly sign-altered DCT coefficients guided by human visual perception | |
WO2021103676A1 (en) | Self-adaptive reversible information hiding method based on integer wavelet transform | |
CN111127291B (en) | Image watermark embedding and extracting method and system based on space-frequency domain JND conversion | |
CN109493270B (en) | Watermark image restoration method based on SLT-DM | |
CN104766269A (en) | Spread transform dither modulation watermarking method based on JND brightness model | |
JP3762655B2 (en) | Information embedding device, detection device, data processing method, program, and storage medium | |
CN115272039A (en) | A GAN-based watermark attack method and system, digital watermark embedding method | |
Chen et al. | Robust spatial LSB watermarking of color images against JPEG compression | |
Chen et al. | Adaptive watermarking using relationships between wavelet coefficients | |
Kukreja et al. | Histogram based multilevel reversible data hiding scheme using simple and absolute difference images | |
JP2001119557A (en) | Digital watermark embedding apparatus and method | |
Yang et al. | Reversible Data Hiding By Adaptive IWT-coefficient Adjustment. | |
CN115150627B (en) | A DST-based blind watermarking method for robust video compression | |
Choi et al. | Robust lossless digital watermarking using integer transform with bit plane manipulation | |
CN116777721A (en) | DCT (discrete cosine transformation) -based 'four-point method' robust hidden watermark embedding and extracting algorithm | |
Rajput et al. | A novel technique for RGB invisible watermarking based on 2-DWT-DCT algorithm | |
Alavianmehr et al. | A semi-fragile lossless data hiding scheme based on multi-level histogram shift in image integer wavelet transform domain | |
Chen et al. | A wavelet-based image watermarking scheme for stereoscopic video frames | |
Rosales-Roldan et al. | Semi-fragile watermarking-based color image authentication with recovery capability |
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 |