WO2020119650A1 - Reversible watermarking method - Google Patents
Reversible watermarking method Download PDFInfo
- Publication number
- WO2020119650A1 WO2020119650A1 PCT/CN2019/124091 CN2019124091W WO2020119650A1 WO 2020119650 A1 WO2020119650 A1 WO 2020119650A1 CN 2019124091 W CN2019124091 W CN 2019124091W WO 2020119650 A1 WO2020119650 A1 WO 2020119650A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- channel
- information
- embedded
- image
- watermark
- Prior art date
Links
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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
-
- 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/0203—Image watermarking whereby the image with embedded watermark is reverted to the original condition before embedding, e.g. lossless, distortion-free or invertible watermarking
Definitions
- the present application belongs to the technical field of image processing, and particularly relates to a reversible watermarking method.
- Reversible watermark refers to a type of special watermark that can be completely restored by the embedded carrier after the watermark is extracted. Compared with traditional watermarks, reversible watermarks have stricter requirements for the lossless restoration of embedded carriers. They are generally used for the distortion-free protection of important images and have important application value in military images and medical images.
- the present application provides a reversible watermarking method, which includes the following steps:
- Step 1 Preprocess the image and convert the color image to grayscale image
- Step 2 Embed information into the first channel and the second channel of the color image
- Step 3 Adjust the offset of the first channel and the second channel after embedding information through the third channel.
- the step 2 includes the following steps:
- Step 201 Obtain the error correction value
- Step 202 Predict the pixel value and error of the first channel, and predict the pixel value and error of the second channel;
- Step 203 Select the location where the information is embedded and embed the information.
- the prediction method in step 202 includes gradient adjustment prediction or median edge detection.
- the position in step 203 is a position where the local variance in the grayscale image is less than the standard variance.
- step 2 embed watermark information into the red channel and embed the error correction value into the blue channel.
- the embedded watermark information is embedded into the red channel based on the raster scan order.
- auxiliary information which is embedded in the least significant bit of the blue channel, and the auxiliary information includes a judgment threshold of local variance and the length of the watermark information.
- step 3 the offset of the red channel and the blue channel after embedding information is adjusted through the green channel.
- the method further includes the following steps:
- Step 4 Extract the auxiliary information of the second channel processed in Step 3;
- Step 5 After extracting the auxiliary information of the second channel, determine the location where the first channel embeds the watermark information;
- Step 6 Extract embedded watermark information
- Step 7 Restore the third channel after extracting embedded information
- Step 8 Repeat Step 6 and Step 7 to get the embedded watermark information and carrier.
- the embedded watermark information extracted in step 6 is based on the reverse raster order and the prediction method is adjusted according to the gradient.
- the reversible watermarking method provided in this application proposes a reversible watermarking method for color images.
- the color image is converted into a grayscale image
- the information is embedded into the red and blue channels of the color image (R, G, B) ;
- FIG. 1 is a schematic diagram of pixel value prediction based on a gradient adjustment prediction method of the present application
- FIG. 2 is a schematic diagram of the principle of the process of embedding watermark information in the reversible watermarking method of the present application
- FIG. 3 is a schematic diagram of the principle of the process of extracting watermark information in the reversible watermarking method of the present application.
- the Bayer color filter array method is used to predict the pixel values of color images.
- the proposed algorithm uses spectral spatial correlation to achieve small prediction errors in the color difference domain to embed hidden data. Since this prediction error tends to follow the Laplacian distribution with relatively small variance, the proposed algorithm achieves high embedding capacity and good location map quality.
- the present application provides a reversible watermarking method, which includes the following steps:
- Step 1 Preprocess the image and convert the color image to grayscale image
- Step 2 Embed information into the first channel and the second channel of the color image
- Step 3 Adjust the offset of the first channel and the second channel after embedding information through the third channel.
- the first channel, the second channel and the third channel in this application represent the red channel, the blue channel and the green channel, that is to say, the first channel, the second channel and the third channel are different in color.
- the first channel selects the red channel
- the second channel selects the blue channel
- the third channel selects the green channel.
- R channel the red channel
- B channel the blue channel
- G channel the green channel
- r, g, and b represent the pixel values of the R, G, and B channels, respectively.
- the step 2 includes the following steps:
- Step 201 Obtain the error correction value
- Step 202 Predict the pixel value and error of the first channel, and predict the pixel value and error of the second channel;
- Step 203 Select the location where the information is embedded and embed the information.
- the prediction method in step 202 includes gradient adjustment prediction or median edge detection.
- the position in step 203 is a position where the local variance in the grayscale image is less than the standard variance.
- step 2 embed watermark information into the red channel and embed the error correction value into the blue channel.
- the embedded watermark information is embedded into the red channel based on the raster scan order.
- This application is to embed information into the R and B channels, and then adjust the offset through the G channel to keep the gray value of the entire image unchanged.
- the error is generally 1 or 0.
- the correction error In order to ensure that the process of embedding and extracting watermark information is reversible, define the correction error for
- the position with small error has little distortion after embedding information.
- the position with small error generally has small local variance.
- a position with a small local variance in the image is selected based on the grayscale image.
- the calculation method of local variance ⁇ i,j is as follows:
- this position can be used to embed pixels.
- Embed watermark information and error correction value Embed watermark information and error correction value
- This application is to ensure that the gray value of the image obtained after the image embedding information remains unchanged, so this application embeds the watermark information in the R channel based on the raster (order) scanning order, embeds the error correction value information in the B channel, and adjusts the adjustment using the G channel.
- the offset of the image is to ensure that the gray value of the image obtained after the image embedding information remains unchanged, so this application embeds the watermark information in the R channel based on the raster (order) scanning order, embeds the error correction value information in the B channel, and adjusts the adjustment using the G channel. The offset of the image.
- i is the watermark information. To correct the error.
- the pixel values obtained after embedding the information are:
- Is the predicted pixel value at the i, j position in the R channel Is the prediction error after R channel embedding information
- r′ i, j is the pixel value after R channel embedding information
- b′ i,j are the predicted value of the B channel i,j position, the prediction error after embedding the information, and the pixel value after embedding the information.
- v i, j is the gray value of the gray image corresponding to the color image at the position i, j.
- g′ i,j is the pixel value of the G channel at the position i,j.
- auxiliary information which is embedded in the least significant bit of the blue channel, and the auxiliary information includes a judgment threshold of local variance and the length of the watermark information.
- the auxiliary information occupies 7 bits, and ⁇ T occupies 2 bits for storage. Occupies 1bit storage, L occupies 4bit storage. This part of information is stored in the least significant bits (LSB) of the B channel, that is, the LSB of the B channel is replaced with auxiliary information.
- LSB least significant bits
- the gray value of the image will not change before and after the image value is embedded.
- step 3 the offset of the red channel and the blue channel after embedding information is adjusted through the green channel.
- the method further includes the following steps:
- Step 4 Extract the auxiliary information of the second channel processed in Step 3;
- Step 5 After extracting the auxiliary information of the second channel, determine the location where the first channel embeds the watermark information;
- Step 6 Extract embedded watermark information
- Step 7 Restore the third channel after extracting embedded information
- Step 8 Repeat Step 6 and Step 7 to get the embedded watermark information and carrier.
- the embedded watermark information extracted in step 6 is based on the reverse raster order and the prediction method is adjusted according to the gradient.
- step (3) and step (4) to get the embedded watermark information and carrier.
- the reversible watermarking method in this application includes two major parts.
- the first part is to embed watermark information, and the second part is to extract watermark information.
- the adjacent pixels are used to predict the current pixel x, so as to obtain a predicted value
- the prediction error P is:
- the embedded information i is extracted as:
- GAP is a simple adaptive prediction method, which has higher prediction accuracy than the classic median-edge detector (MED). Get the predicted value for the pixel value v i,j at ⁇ i,j ⁇
- MED median-edge detector
- the reversible watermarking technology based on prediction error expansion is a commonly used method in the reversible watermarking method, and there are already existing mature codes to achieve these functions. Therefore, this application mainly needs to determine the embeddable position based on the above method, embed the watermark information and realize the reversible extraction of the watermark information.
- the gray version of color images is widely used, such as black and white printing (book readers based on electronic ink), making reading materials for color-blind people, and so on. For these applications, it is very meaningful to keep the gray value of the color image unchanged.
- the gray value of the image after embedding the watermark in this application is the same as the gray value of the image before embedding the watermark.
- the reversible watermarking method provided in this application proposes a reversible watermarking method for color images.
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
With regard to the problem of cover image distortion after a watermark is embedded and the problem that an image obtained after the grayscale conversion of an original image may be considered as a noisy image and cannot be used, a reversible watermarking method is provided. The method comprises the following steps: step 1, preprocessing an image and converting the color image to a grayscale image; step 2, embedding information into first and second channels of the color image; and step 3, adjusting, by means of a third channel, the offset of the first channel and the second channel with the information embedded therein. The invention can reduce the image distortion after information is embedded, and keep the grayscale value of the image unchanged, thereby facilitating subsequent color image processing, such as making reading materials for color-blind people.
Description
本申请属于图像处理技术领域,特别是涉及一种可逆水印方法。The present application belongs to the technical field of image processing, and particularly relates to a reversible watermarking method.
近年来,随着互联网技术的快速发展,手机,电脑等数字设备的普及,数字多媒体包括图像、文本、视频、音频等作为信息的载体逐渐被大众认知和接受。但与此同时,这些多媒体信息却很容易被非法者恶意篡改、复制和传播,严重损害产权所有者的利益,此外版权保护和信息安全也越来越被重视。传统的加密技术是在发送方传输数据的过程中保护内容,但数据被接收、解密之后,数据非常有可能被非法复制与纂改。针对传统密码学的版权保护和信息安全中存在的不足,信息隐藏技术应运而生。可逆水印是信息隐藏的一个重要方法。可逆水印是指水印被提取后,嵌入载体可以完整恢复的一类特殊水印。相对于传统水印,可逆水印对嵌入载体的无损恢复有着更为严格的要求,一般用于重要图像的无失真保护,在军事图像、医学图像上有着重要的应用价值。In recent years, with the rapid development of Internet technology and the popularization of digital devices such as mobile phones and computers, digital multimedia including images, text, video, audio, etc. as information carriers has gradually been recognized and accepted by the public. At the same time, however, these multimedia information are easily tampered with, copied, and transmitted by illegal persons, seriously damaging the interests of property rights owners. In addition, copyright protection and information security are also increasingly valued. Traditional encryption technology protects the content during the transmission of data by the sender, but after the data is received and decrypted, the data is very likely to be illegally copied and modified. In view of the deficiencies in copyright protection and information security of traditional cryptography, information hiding technology came into being. Reversible watermarking is an important method of information hiding. Reversible watermark refers to a type of special watermark that can be completely restored by the embedded carrier after the watermark is extracted. Compared with traditional watermarks, reversible watermarks have stricter requirements for the lossless restoration of embedded carriers. They are generally used for the distortion-free protection of important images and have important application value in military images and medical images.
目前可逆水印的方法大多是基于灰度图像实现的。而目前彩色图像已经成为主流,基于灰度图像的可逆水印已经无法满足人们需求。现有的彩色图像嵌入是通过建立尖锐的预测误差直方图来增加嵌入容量,降低总的失真度。但是这些方法还是会使嵌入水印后的掩体失真。对原始图像进行灰度转换后得到图像可能会被认为是噪声图像,而不能使用。Most of the current reversible watermarking methods are based on grayscale images. At present, color images have become mainstream, and reversible watermarking based on grayscale images has been unable to meet people's needs. The existing color image embedding is to increase the embedding capacity and reduce the total distortion by establishing a sharp prediction error histogram. However, these methods still distort the bunkers embedded in the watermark. The image obtained after gray-scale conversion of the original image may be considered a noisy image and cannot be used.
发明内容Summary of the invention
1.要解决的技术问题1. Technical problems to be solved
基于目前可逆水印的方法大多是基于灰度图像实现的。而目前彩色图像已经成为主流,基于灰度图像的可逆水印已经无法满足人们需求。现有的彩色图像嵌入是通过建立尖锐的预测误差直方图来增加嵌入容量,降低总的失真度。但是这些方法还是会使嵌入水印后的掩体失真。对原始图像进行灰度转换后得到图像可能会被认为是噪声图像,而不能使用的问题,本申请提供了一种可逆水印方法。Most methods based on current reversible watermarking are based on grayscale images. At present, color images have become mainstream, and reversible watermarking based on grayscale images has been unable to meet people's needs. The existing color image embedding is to increase the embedding capacity and reduce the total distortion by establishing a sharp prediction error histogram. However, these methods still distort the bunkers embedded in the watermark. After gray-scale conversion of the original image, the image may be regarded as a noisy image and cannot be used. This application provides a reversible watermarking method.
2.技术方案2. Technical solutions
为了达到上述的目的,本申请提供了一种可逆水印方法,所述方法包括如下步骤:In order to achieve the above objective, the present application provides a reversible watermarking method, which includes the following steps:
步骤1:对图像进行预处理,将彩色图像转换为灰度图像;Step 1: Preprocess the image and convert the color image to grayscale image;
步骤2:嵌入信息至彩色图像的第一通道和第二通道中;Step 2: Embed information into the first channel and the second channel of the color image;
步骤3:通过第三通道调整嵌入信息后的第一通道和第二通道的偏移量。Step 3: Adjust the offset of the first channel and the second channel after embedding information through the third channel.
可选地,所述步骤2包括如下步骤:Optionally, the step 2 includes the following steps:
步骤201:获取误差修正值;Step 201: Obtain the error correction value;
步骤202:预测第一通道像素值和误差,预测第二通道像素值和误差;Step 202: Predict the pixel value and error of the first channel, and predict the pixel value and error of the second channel;
步骤203:选择嵌入信息的位置并嵌入信息。Step 203: Select the location where the information is embedded and embed the information.
可选地,所述步骤202中预测方法包括梯度调节预测或者中值边缘检测。Optionally, the prediction method in step 202 includes gradient adjustment prediction or median edge detection.
可选地,所述步骤203中的位置为灰度图像中局部方差小于标准方差的位置。Optionally, the position in step 203 is a position where the local variance in the grayscale image is less than the standard variance.
可选地,所述步骤2中嵌入水印信息至红色通道,嵌入误差修正值至蓝色通道。Optionally, in step 2, embed watermark information into the red channel and embed the error correction value into the blue channel.
可选地,所述嵌入水印信息基于光栅扫描顺序嵌入至红色通道。Optionally, the embedded watermark information is embedded into the red channel based on the raster scan order.
可选地,还包括嵌入辅助信息,所述辅助信息嵌入到蓝色通道的最低有效位,所述辅助信息包括局部方差的判断阈值和水印信息的长度。Optionally, it also includes embedded auxiliary information, which is embedded in the least significant bit of the blue channel, and the auxiliary information includes a judgment threshold of local variance and the length of the watermark information.
可选地,所述步骤3通过绿色通道调整嵌入信息后的红色通道和蓝色通道的偏移量。Optionally, in step 3, the offset of the red channel and the blue channel after embedding information is adjusted through the green channel.
可选地,所述方法还包括如下步骤:Optionally, the method further includes the following steps:
步骤4:提取经步骤3处理的第二通道的辅助信息;Step 4: Extract the auxiliary information of the second channel processed in Step 3;
步骤5:提取第二通道的辅助信息后确定第一通道嵌入水印信息的位置;Step 5: After extracting the auxiliary information of the second channel, determine the location where the first channel embeds the watermark information;
步骤6:提取嵌入水印信息;Step 6: Extract embedded watermark information;
步骤7:提取嵌入信息后恢复第三通道;Step 7: Restore the third channel after extracting embedded information;
步骤8:重复步骤6和步骤7得到嵌入的水印信息和载体。Step 8: Repeat Step 6 and Step 7 to get the embedded watermark information and carrier.
可选地,所述步骤6中提取嵌入水印信息基于逆光栅顺序并根据梯度调节预测方法。Optionally, the embedded watermark information extracted in step 6 is based on the reverse raster order and the prediction method is adjusted according to the gradient.
3.有益效果3. Beneficial effect
与现有技术相比,本申请提供的一种可逆水印方法的有益效果在于:Compared with the prior art, the beneficial effects of a reversible watermarking method provided by this application are:
本申请提供的可逆水印方法针对彩色图像,提出了一种可逆水印方法,首先将彩色图像转换为灰度图像;其次,嵌入信息到彩色图像(R、G、B)的红色和蓝色通道中;最后,通过绿色通道调整嵌入信息后的红、蓝两个通道的偏移量,这样就可以实现嵌入信息后图像失真度降低,并且图像的灰度值不变,用于后续彩色图像的处理,如为色盲人士制作阅读材料。The reversible watermarking method provided in this application proposes a reversible watermarking method for color images. First, the color image is converted into a grayscale image; second, the information is embedded into the red and blue channels of the color image (R, G, B) ; Finally, adjust the offset of the red and blue channels after embedding the information through the green channel, so that the image distortion after embedding information can be reduced, and the gray value of the image does not change, which is used for subsequent color image processing , Such as creating reading materials for colorblind people.
图1是本申请的基于梯度调节预测方法预测像素值示意图;1 is a schematic diagram of pixel value prediction based on a gradient adjustment prediction method of the present application;
图2是本申请的可逆水印方法中嵌入水印信息过程原理示意图;2 is a schematic diagram of the principle of the process of embedding watermark information in the reversible watermarking method of the present application;
图3是本申请的可逆水印方法中提取水印信息过程原理示意图。3 is a schematic diagram of the principle of the process of extracting watermark information in the reversible watermarking method of the present application.
在下文中,将参考附图对本申请的具体实施例进行详细地描述,依照这些详细的描述,所属领域技术人员能够清楚地理解本申请,并能够实施本申请。在不违背本申请原理的情况下,各个不同的实施例中的特征可以进行组合以获得新的实施方式,或者替代某些实施例中的某些特征,获得其它优选的实施方式。Hereinafter, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. According to these detailed descriptions, those skilled in the art can clearly understand the present application and can implement the present application. Without violating the principles of the present application, the features in the different embodiments may be combined to obtain new implementations, or to replace certain features in certain embodiments to obtain other preferred implementations.
利用拜耳色彩滤波阵列方法实现彩色图像像素值的预测,所提出的算法利用谱空间相关性来实现色差域中的小预测误差以嵌入隐藏数据。由于这种预测误差倾向于遵循方差相对较小的拉普拉斯分布,因此所提出的算法实现了高嵌入容量和良好的定位图质量。The Bayer color filter array method is used to predict the pixel values of color images. The proposed algorithm uses spectral spatial correlation to achieve small prediction errors in the color difference domain to embed hidden data. Since this prediction error tends to follow the Laplacian distribution with relatively small variance, the proposed algorithm achieves high embedding capacity and good location map quality.
参见图1~3,本申请提供一种可逆水印方法,所述方法包括如下步骤:Referring to FIGS. 1-3, the present application provides a reversible watermarking method, which includes the following steps:
步骤1:对图像进行预处理,将彩色图像转换为灰度图像;Step 1: Preprocess the image and convert the color image to grayscale image;
步骤2:嵌入信息至彩色图像的第一通道和第二通道中;Step 2: Embed information into the first channel and the second channel of the color image;
步骤3:通过第三通道调整嵌入信息后的第一通道和第二通道的偏移量。Step 3: Adjust the offset of the first channel and the second channel after embedding information through the third channel.
本申请中的第一通道、第二通道和第三通道,表示红色通道、蓝色通道和绿色通道,也就是说第一通道、第二通道和第三通道在颜色上是有所区别的。本申请中第一通道选择了红色通道,第二通道选择了蓝色通道,第三通道选择了绿色通道,当然,其他的组合也是可行的,只是本申请的选择方式结果更好。本申请中红色通道简称为R通道,蓝色通道简称为B通道,绿色通道简称为G通道。The first channel, the second channel and the third channel in this application represent the red channel, the blue channel and the green channel, that is to say, the first channel, the second channel and the third channel are different in color. In this application, the first channel selects the red channel, the second channel selects the blue channel, and the third channel selects the green channel. Of course, other combinations are also feasible, but the result of the selection method of this application is better. In this application, the red channel is abbreviated as R channel, the blue channel is abbreviated as B channel, and the green channel is abbreviated as G channel.
灰度转换Grayscale conversion
读取原始图像I={r,g,b},针对原始图像进行灰度转换,将其转变为灰度图v=f
v(r,g,b),这里采用经典的灰度图转换算法:
Read the original image I={r, g, b}, perform gray-scale conversion on the original image, and convert it into a gray-scale image v=f v (r, g, b). Here, the classic gray-scale image conversion algorithm is used :
其中,r,g,b分别表示R,G,B通道的像素值。Among them, r, g, and b represent the pixel values of the R, G, and B channels, respectively.
可选地,所述步骤2包括如下步骤:Optionally, the step 2 includes the following steps:
步骤201:获取误差修正值;Step 201: Obtain the error correction value;
步骤202:预测第一通道像素值和误差,预测第二通道像素值和误差;Step 202: Predict the pixel value and error of the first channel, and predict the pixel value and error of the second channel;
步骤203:选择嵌入信息的位置并嵌入信息。Step 203: Select the location where the information is embedded and embed the information.
可选地,所述步骤202中预测方法包括梯度调节预测或者中值边缘检测。Optionally, the prediction method in step 202 includes gradient adjustment prediction or median edge detection.
可选地,所述步骤203中的位置为灰度图像中局部方差小于标准方差的位置。Optionally, the position in step 203 is a position where the local variance in the grayscale image is less than the standard variance.
可选地,所述步骤2中嵌入水印信息至红色通道,嵌入误差修正值至蓝色通道。Optionally, in step 2, embed watermark information into the red channel and embed the error correction value into the blue channel.
可选地,所述嵌入水印信息基于光栅扫描顺序嵌入至红色通道。Optionally, the embedded watermark information is embedded into the red channel based on the raster scan order.
获取误差修正值Get error correction value
本申请是嵌入信息到R、B通道,然后通过G通道调整偏移量,保持整幅图像灰度值不变。This application is to embed information into the R and B channels, and then adjust the offset through the G channel to keep the gray value of the entire image unchanged.
在水印信息提取过程中,G通道的像素值
获取是通过如下方法得到
In the process of extracting watermark information, the pixel value of G channel Obtained by the following method
由于上述函数取整的关系,造成实际的像素值
和
有误差,误差一般为1或者0。为了保证水印信息的嵌入和提取过程是可逆的,定义修正误差
为
Due to the rounding of the above function, the actual pixel value with There is an error, the error is generally 1 or 0. In order to ensure that the process of embedding and extracting watermark information is reversible, define the correction error for
基于GAP方法预测R、B通道Predicting R and B channels based on GAP method
基于GAP预测R通道中位于{ij}位置的像素值r
i,j:
Based on GAP, predict the pixel value r i,j at the {ij} position in the R channel:
其中,Δ
V=|r
i,j+1-r
i+1,j+1|+|r
i+1,j-1-r
i+2j-1|+|r
i+1,j-r
i+2,j|,
Where Δ V =|r i,j+1 -r i+1,j+1 |+|r i+1,j-1 -r i+2j-1 |+|r i+1,j -r i+2, j |,
Δ
H=|r
i,j+1-r
i,j+2|+|r
i+1,j-1-r
i+1,j|+|r
i+1,j-r
i+1,j+1|
Δ H =|r i,j+1 -r i,j+2 |+|r i+1,j-1 -r i+1,j |+|r i+1,j -r i+1, j+1 |
Δ=Δ
V-Δ
H
Δ=Δ V -Δ H
选择位置嵌入信息Select location to embed information
一般误差小的位置,嵌入信息后失真度小。而误差小的位置,一般它的局部方差小。为 了能够很好的选择出彩色图像的局部方差小的位置,基于灰度图像选择图像中具有较小局部方差的位置。局部方差ρ
i,j的计算方法如下所示:
Generally, the position with small error has little distortion after embedding information. The position with small error generally has small local variance. In order to be able to select a position with a small local variance of the color image, a position with a small local variance in the image is selected based on the grayscale image. The calculation method of local variance ρ i,j is as follows:
当ρ
i,j<ρ
T时,则该位置可用于嵌入像素。
When ρ i,j <ρ T , then this position can be used to embed pixels.
根据以往经验,设定ρ
T=2。
Based on past experience, set ρ T =2.
嵌入水印信息和误差修正值Embed watermark information and error correction value
本申请是保证图像嵌入信息后得到的图像灰度值保持不变,因此本申请基于光栅(raster order)扫描顺序在R通道嵌入水印信息,在B通道嵌入误差修正值信息,采用G通道调整整幅图像产生的偏移量。This application is to ensure that the gray value of the image obtained after the image embedding information remains unchanged, so this application embeds the watermark information in the R channel based on the raster (order) scanning order, embeds the error correction value information in the B channel, and adjusts the adjustment using the G channel. The offset of the image.
根据公式(1)得到
i为水印信息。
为修正误差。
According to formula (1) i is the watermark information. To correct the error.
则在{i,j}位置,嵌入信息后得到的像素值分别为:Then at the {i,j} position, the pixel values obtained after embedding the information are:
是R通道中位于i,j位置的预测像素值,
是R通道嵌入信息后的预测误差,r′
i,j是R通道嵌入信息后的像素值.同理,
b′
i,j分别是B通道i,j位置的预测值、嵌入信息后的预测误差、嵌入信息后的像素值。v
i,j是彩色图像对应的灰度图在位置i,j处的灰度值。g′
i,j是G通道的位于i,j位置的像素值。
Is the predicted pixel value at the i, j position in the R channel, Is the prediction error after R channel embedding information, r′ i, j is the pixel value after R channel embedding information. Similarly, b′ i,j are the predicted value of the B channel i,j position, the prediction error after embedding the information, and the pixel value after embedding the information. v i, j is the gray value of the gray image corresponding to the color image at the position i, j. g′ i,j is the pixel value of the G channel at the position i,j.
可选地,还包括嵌入辅助信息,所述辅助信息嵌入到蓝色通道的最低有效位,所述辅助信息包括局部方差的判断阈值和水印信息的长度。Optionally, it also includes embedded auxiliary information, which is embedded in the least significant bit of the blue channel, and the auxiliary information includes a judgment threshold of local variance and the length of the watermark information.
嵌入辅助信息Embed auxiliary information
为了保证水印信息可以完全可逆提取,需要再嵌入辅助信息。这个辅助信息是ρ
T,最后一个误差修正值
和水印信息的长度L。因此,嵌入信息的总长度为N,N=L+7。其中辅助信息占用7bit,分别为ρ
T占用2bit存储,最后一个误差修正值
占用1bit存储,L占4bit存储。这部分信息采用B通道的最低有效位(least significant bits,LSB)存储,即将B通道的 LSB替换为辅助信息。为了保证嵌入信息前后,图像的灰度值不变,在B通道中选择3个灰度值不可变位置,保证
In order to ensure that the watermark information can be extracted completely and reversibly, it is necessary to embed auxiliary information. This auxiliary information is ρ T , the last error correction value And the length L of the watermark information. Therefore, the total length of the embedded information is N, N=L+7. Among them, the auxiliary information occupies 7 bits, and ρ T occupies 2 bits for storage. Occupies 1bit storage, L occupies 4bit storage. This part of information is stored in the least significant bits (LSB) of the B channel, that is, the LSB of the B channel is replaced with auxiliary information. In order to ensure that the gray value of the image does not change before and after embedding the information, select three non-variable gray value positions in the B channel to ensure
这样就可以保证图像值嵌入前后,图像的灰度值不变。In this way, the gray value of the image will not change before and after the image value is embedded.
通过以上步骤,输入图像I={r,g,b}嵌入水印信息后,变为图像I′={r′,b′,g},并且整个图像的灰度值不变。Through the above steps, after the input image I={r, g, b} is embedded in the watermark information, it becomes the image I′={r′, b′, g}, and the gray value of the entire image does not change.
可选地,所述步骤3通过绿色通道调整嵌入信息后的红色通道和蓝色通道的偏移量。Optionally, in step 3, the offset of the red channel and the blue channel after embedding information is adjusted through the green channel.
可选地,所述方法还包括如下步骤:Optionally, the method further includes the following steps:
步骤4:提取经步骤3处理的第二通道的辅助信息;Step 4: Extract the auxiliary information of the second channel processed in Step 3;
步骤5:提取第二通道的辅助信息后确定第一通道嵌入水印信息的位置;Step 5: After extracting the auxiliary information of the second channel, determine the location where the first channel embeds the watermark information;
步骤6:提取嵌入水印信息;Step 6: Extract embedded watermark information;
步骤7:提取嵌入信息后恢复第三通道;Step 7: Restore the third channel after extracting embedded information;
步骤8:重复步骤6和步骤7得到嵌入的水印信息和载体。Step 8: Repeat Step 6 and Step 7 to get the embedded watermark information and carrier.
可选地,所述步骤6中提取嵌入水印信息基于逆光栅顺序并根据梯度调节预测方法。Optionally, the embedded watermark information extracted in step 6 is based on the reverse raster order and the prediction method is adjusted according to the gradient.
提取水印信息Extract watermark information
(1)提取辅助信息(1) Extract auxiliary information
根据公式(5)确定I′中B通道中3个灰度值不可变位置,提取这3个位置的LSB值,得到ρ
T,
和L。
According to formula (5), determine the three invariable positions of the gray value in the B channel of I′, extract the LSB values of these three positions, and obtain ρ T , And L.
(2)确定嵌入水印信息的位置(2) Determine the location of embedded watermark information
将彩色图像转换为灰色图像。基于光栅顺序并根据公式(4)计算灰度图像中的局部方差ρ,并选择L个位置ρ<ρ
T。这L个位置表示为{I′
1,I′
2,…,I′
L}。
Convert color images to gray images. Calculate the local variance ρ in the grayscale image based on the raster order and according to formula (4), and select L positions ρ<ρ T. These L positions are represented as {I′ 1 , I′ 2 , ..., I′ L }.
(3)提取嵌入水印信息(3) Extract embedded watermark information
针对这L个位置的像素并从I′
L开始,基于逆光栅顺序并根据GAP预测方法,得到R、B通道的预测值
和预测误差
For the pixels in the L positions, starting from I′ L , based on the reverse raster order and according to the GAP prediction method, the predicted values of the R and B channels are obtained And prediction error
其中i是嵌入的水印信息。Where i is the embedded watermark information.
同理可得The same is true
(4)恢复G通道(4) Restore G channel
根据步骤(1)得到的辅助信息
判断
是否为0。若为0,则g=g′。否则,
判断v
L是否等于
若是g=g′+1,反之,g=g′-1。
Auxiliary information obtained according to step (1) judgment Whether it is 0. If it is 0, then g=g′. otherwise, Determine whether v L is equal to If g=g′+1, conversely, g=g′-1.
重复步骤(3)和步骤(4)得到嵌入的水印信息和载体。Repeat step (3) and step (4) to get the embedded watermark information and carrier.
本申请中可逆水印方法包括两大部分,第一部分是嵌入水印信息,第二部分是提取水印信息。The reversible watermarking method in this application includes two major parts. The first part is to embed watermark information, and the second part is to extract watermark information.
基于预测误差扩展的可逆水印方法Reversible watermarking method based on prediction error expansion
根据相邻像素的相关性,采用相邻像素预测当前像素x,以此到一个预测值
则预测误差P为:
According to the correlation of adjacent pixels, the adjacent pixels are used to predict the current pixel x, so as to obtain a predicted value Then the prediction error P is:
对预测误差扩展嵌入1位数据i,i=0或1,嵌入方式为:To embed 1-bit data i for prediction error expansion, i=0 or 1, the embedding method is:
p′=2p+i (1)p′=2p+i, (1)
则嵌入后的像素值为:Then the pixel value after embedding is:
提取嵌入信息i为:The embedded information i is extracted as:
恢复原始的预测误差和像素值:Restore the original prediction error and pixel value:
x=x′-p-ix=x′-p-i
这样就可以实现数据的嵌入和提取。In this way, data can be embedded and extracted.
梯度调节预测(Gradient-adjusted Prediction,GAP)Gradient-adjusted Prediction (GAP)
GAP是一个简单的自适应预测方法,相对于经典的中值边缘检测器(median-edge detector,MED)具有更高的预测精度。针对位置在{i,j}的像素值v
i,j得到预测值
GAP is a simple adaptive prediction method, which has higher prediction accuracy than the classic median-edge detector (MED). Get the predicted value for the pixel value v i,j at {i,j}
其中,Δ
V=|v
i,j+1-v
i+1,j+1|+|v
i+1,j-1-v
i+2j-1|+|v
i+1,j-v
i+2,j|,
Where Δ V =|v i,j+1 -v i+1,j+1 |+|v i+1,j-1 -v i+2j-1 |+|v i+1,j -v i+2, j |,
Δ
H=|v
i,j+1-v
i,j+2|+|v
i+1,j-1-v
i+1,j|+|v
i+1,j-v
i+1,j+1|
Δ H =|v i,j+1 -v i,j+2 |+|v i+1,j-1 -v i+1,j |+|v i+1,j -v i+1, j+1 |
Δ=Δ
V-Δ
H
Δ=Δ V -Δ H
在本申请使用的GAP预测方法,基于预测误差扩展的可逆水印技术是可逆水印方法中常用的方法,并且目前已经有现有的成熟代码实现这些功能。因此,本申请主要在基于上述方法,判断可嵌入位置,嵌入水印信息并实现水印信息的可逆提取即可。In the GAP prediction method used in this application, the reversible watermarking technology based on prediction error expansion is a commonly used method in the reversible watermarking method, and there are already existing mature codes to achieve these functions. Therefore, this application mainly needs to determine the embeddable position based on the above method, embed the watermark information and realize the reversible extraction of the watermark information.
灰色版本的彩色图像被广泛使用,如黑白打印(基于电子墨水的书籍阅读器),为色盲人员制作阅读材料等等。对于这些应用,保持彩色图像的灰度值不变是非常有意义的。而本申请嵌入水印后图像的灰度值和嵌入水印前图像的灰度值相同。The gray version of color images is widely used, such as black and white printing (book readers based on electronic ink), making reading materials for color-blind people, and so on. For these applications, it is very meaningful to keep the gray value of the color image unchanged. The gray value of the image after embedding the watermark in this application is the same as the gray value of the image before embedding the watermark.
本申请提供的可逆水印方法针对彩色图像,提出了一种可逆水印方法。首先将彩色图像转换为灰度图像;其次,嵌入信息到彩色图像(R、G、B)的红色和蓝色通道中;最后,通过绿色通道调整嵌入信息后的红、蓝两个通道的偏移量,这样就可以实现嵌入信息后图像失真度降低,保证图像的灰度值不变,用于后续彩色图像的处理,如为色盲人士制作阅读材料。The reversible watermarking method provided in this application proposes a reversible watermarking method for color images. First convert the color image to grayscale image; second, embed the information into the red and blue channels of the color image (R, G, B); finally, adjust the bias of the red and blue channels after embedding the information through the green channel Shift amount, so that the distortion of the image after embedding information can be reduced, and the gray value of the image is unchanged. It is used for subsequent color image processing, such as reading materials for color-blind people.
尽管在上文中参考特定的实施例对本申请进行了描述,但是所属领域技术人员应当理解,在本申请公开的原理和范围内,可以针对本申请公开的配置和细节做出许多修改。本申请的保护范围由所附的权利要求来确定,并且权利要求意在涵盖权利要求中技术特征的等同物文字意义或范围所包含的全部修改。Although the present application has been described above with reference to specific embodiments, those skilled in the art should understand that, within the principle and scope of the present disclosure, many modifications can be made to the configuration and details disclosed in the present application. The protection scope of the present application is determined by the appended claims, and the claims are intended to cover all modifications included in the literal meaning or scope of the technical features of the claims.
Claims (10)
- 一种可逆水印方法,其特征在于:所述方法包括如下步骤:A reversible watermarking method, characterized in that the method includes the following steps:步骤1:对图像进行预处理,将彩色图像转换为灰度图像;Step 1: Preprocess the image and convert the color image to grayscale image;步骤2:嵌入信息至彩色图像的第一通道和第二通道中;Step 2: Embed information into the first channel and the second channel of the color image;步骤3:通过第三通道调整嵌入信息后的第一通道和第二通道的偏移量。Step 3: Adjust the offset of the first channel and the second channel after embedding information through the third channel.
- 如权利要求1所述的可逆水印方法,其特征在于:所述步骤2包括如下步骤:The reversible watermark method according to claim 1, wherein the step 2 comprises the following steps:步骤201:获取误差修正值;Step 201: Obtain the error correction value;步骤202:预测第一通道像素值和误差,预测第二通道像素值和误差;Step 202: Predict the pixel value and error of the first channel, and predict the pixel value and error of the second channel;步骤203:选择嵌入信息的位置并嵌入信息。Step 203: Select the location where the information is embedded and embed the information.
- 如权利要求2所述的可逆水印方法,其特征在于:所述步骤202中预测方法包括梯度调节预测或者中值边缘检测。The reversible watermarking method according to claim 2, wherein the prediction method in step 202 includes gradient adjustment prediction or median edge detection.
- 如权利要求2所述的可逆水印方法,其特征在于:所述步骤203中的位置为灰度图像中局部方差小于标准方差的位置。The reversible watermarking method according to claim 2, wherein the position in step 203 is a position where the local variance in the grayscale image is less than the standard variance.
- 如权利要求4所述的可逆水印方法,其特征在于:所述步骤2中嵌入水印信息至红色通道,嵌入误差修正值至蓝色通道。The reversible watermarking method according to claim 4, wherein in step 2 the watermark information is embedded in the red channel, and the error correction value is embedded in the blue channel.
- 如权利要求5所述的可逆水印方法,其特征在于:所述嵌入水印信息基于光栅扫描顺序嵌入至红色通道。The reversible watermark method according to claim 5, wherein the embedded watermark information is embedded into the red channel based on the raster scan order.
- 如权利要求5所述的可逆水印方法,其特征在于:还包括嵌入辅助信息,所述辅助信息嵌入到蓝色通道的最低有效位,所述辅助信息包括局部方差的判断阈值和水印信息的长度。The reversible watermarking method according to claim 5, further comprising embedding auxiliary information, the auxiliary information is embedded in the least significant bit of the blue channel, the auxiliary information includes a judgment threshold of local variance and the length of the watermark information .
- 如权利要求1所述的可逆水印方法,其特征在于:所述步骤3通过绿色通道调整嵌入信息后的红色通道和蓝色通道的偏移量。The reversible watermarking method of claim 1, wherein the step 3 adjusts the offset of the red channel and the blue channel after embedding the information through the green channel.
- 如权利要求1所述的可逆水印方法,其特征在于:所述方法还包括如下步骤:The reversible watermark method of claim 1, wherein the method further comprises the following steps:步骤4:提取经步骤3处理的第二通道的辅助信息;Step 4: Extract the auxiliary information of the second channel processed in Step 3;步骤5:提取第二通道的辅助信息后确定第一通道嵌入水印信息的位置;Step 5: After extracting the auxiliary information of the second channel, determine the location where the first channel embeds the watermark information;步骤6:提取嵌入水印信息;Step 6: Extract embedded watermark information;步骤7:提取嵌入信息后恢复第三通道;Step 7: Restore the third channel after extracting embedded information;步骤8:重复步骤6和步骤7得到嵌入的水印信息和载体。Step 8: Repeat Step 6 and Step 7 to get the embedded watermark information and carrier.
- 如权利要求9所述的可逆水印方法,其特征在于:所述步骤6中提取嵌入水印信息基于逆光栅顺序并根据梯度调节预测方法。The reversible watermarking method according to claim 9, characterized in that: extracting embedded watermark information in step 6 is based on an inverse raster order and adjusts the prediction method according to the gradient.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811531852.8 | 2018-12-14 | ||
CN201811531852.8A CN111325650A (en) | 2018-12-14 | 2018-12-14 | Reversible watermarking method |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020119650A1 true WO2020119650A1 (en) | 2020-06-18 |
Family
ID=71076250
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/124091 WO2020119650A1 (en) | 2018-12-14 | 2019-12-09 | Reversible watermarking method |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111325650A (en) |
WO (1) | WO2020119650A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112700363B (en) * | 2021-01-08 | 2023-05-02 | 北京大学 | Self-adaptive visual watermark embedding method and device based on region selection |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833746A (en) * | 2010-04-23 | 2010-09-15 | 北京大学 | Method for embedding reversible watermark in digital image and method for extracting reversible watermark from digital image |
CN101916427A (en) * | 2010-08-10 | 2010-12-15 | 浙江大学 | Spatial domain-based image watermark adding method |
CN102044061A (en) * | 2010-12-20 | 2011-05-04 | 北京大学 | Embedding method and extracting method of reversible watermarks |
CN103366330A (en) * | 2012-03-31 | 2013-10-23 | 北大方正集团有限公司 | Method and device for setting watermark |
CN105761196A (en) * | 2016-01-28 | 2016-07-13 | 西安电子科技大学 | Color image reversible digital watermarking method based on three-dimensional prediction error histogram |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020165881A1 (en) * | 2001-03-15 | 2002-11-07 | Imation Corp. | Web page color accuracy using color-customized style sheets |
CN106210731B (en) * | 2016-07-01 | 2018-11-02 | 兰州理工大学 | Coloured image reversible data concealing method based on bicubic interpolation extension |
CN106127670A (en) * | 2016-07-26 | 2016-11-16 | 广东工业大学 | A kind of processing method of reversible water mark image |
-
2018
- 2018-12-14 CN CN201811531852.8A patent/CN111325650A/en active Pending
-
2019
- 2019-12-09 WO PCT/CN2019/124091 patent/WO2020119650A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101833746A (en) * | 2010-04-23 | 2010-09-15 | 北京大学 | Method for embedding reversible watermark in digital image and method for extracting reversible watermark from digital image |
CN101916427A (en) * | 2010-08-10 | 2010-12-15 | 浙江大学 | Spatial domain-based image watermark adding method |
CN102044061A (en) * | 2010-12-20 | 2011-05-04 | 北京大学 | Embedding method and extracting method of reversible watermarks |
CN103366330A (en) * | 2012-03-31 | 2013-10-23 | 北大方正集团有限公司 | Method and device for setting watermark |
CN105761196A (en) * | 2016-01-28 | 2016-07-13 | 西安电子科技大学 | Color image reversible digital watermarking method based on three-dimensional prediction error histogram |
Also Published As
Publication number | Publication date |
---|---|
CN111325650A (en) | 2020-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Li et al. | Efficient reversible data hiding based on multiple histograms modification | |
Peng et al. | Adaptive reversible data hiding scheme based on integer transform | |
Qin et al. | Visible watermark removal scheme based on reversible data hiding and image inpainting | |
Zhang et al. | A data hiding scheme based on multidirectional line encoding and integer wavelet transform | |
Al-Mansoori et al. | Robust watermarking technique based on DCT to protect the ownership of DubaiSat-1 images against attacks | |
Eltahir et al. | High rate video streaming steganography | |
Gao et al. | Reversibility improved lossless data hiding | |
Fu | Robust oblivious image watermarking scheme based on coefficient relation | |
Su et al. | A practical design of digital watermarking for video streaming services | |
Khan et al. | A secure true edge based 4 least significant bits steganography | |
Huang et al. | Unseen visible watermarking: a novel methodology for auxiliary information delivery via visual contents | |
WO2020119650A1 (en) | Reversible watermarking method | |
Maiorana et al. | Multi‐bit watermarking of high dynamic range images based on perceptual models | |
Ling et al. | Watermarking for image authentication | |
CN109685711B (en) | Anti-rotation watermark method for embedding periodogram in characteristic region | |
Tappe et al. | An improved image steganography technique based on LSB | |
CN114662061A (en) | Decoding and coding network steganography based on improved attention and loss function | |
Fu et al. | Reliable information hiding based on support vector machine | |
KR100973302B1 (en) | A watermarking method of the mobile terminal for multimedia forensic | |
Al-Kadei et al. | Improve a secure blind watermarking technique for digital video | |
Chang et al. | An Efficient Steganography Scheme Based on Edge Detection for High Payload. | |
CN111179145B (en) | Double-layer reversible watermarking method | |
Sonawane et al. | Reversible image watermarking using adaptive prediction error expansion and pixel selection | |
Gu et al. | Robust Watermarking of Screen-Photography Based on JND. | |
Wu et al. | Reversible watermarking scheme with visibility using randomize distance |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19895591 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 02.11.2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19895591 Country of ref document: EP Kind code of ref document: A1 |