CN110232651A - A kind of reversible information hidden method based on block prediction and difference histogram shifting - Google Patents

A kind of reversible information hidden method based on block prediction and difference histogram shifting Download PDF

Info

Publication number
CN110232651A
CN110232651A CN201910503610.6A CN201910503610A CN110232651A CN 110232651 A CN110232651 A CN 110232651A CN 201910503610 A CN201910503610 A CN 201910503610A CN 110232651 A CN110232651 A CN 110232651A
Authority
CN
China
Prior art keywords
watermark
image
difference
embedding
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910503610.6A
Other languages
Chinese (zh)
Other versions
CN110232651B (en
Inventor
刘连山
王晓利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University of Science and Technology
Original Assignee
Shandong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong University of Science and Technology filed Critical Shandong University of Science and Technology
Priority to CN201910503610.6A priority Critical patent/CN110232651B/en
Publication of CN110232651A publication Critical patent/CN110232651A/en
Application granted granted Critical
Publication of CN110232651B publication Critical patent/CN110232651B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/0085Time domain based watermarking, e.g. watermarks spread over several images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0051Embedding of the watermark in the spatial domain
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0061Embedding of the watermark in each block of the image, e.g. segmented watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0065Extraction of an embedded watermark; Reliable detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0203Image watermarking whereby the image with embedded watermark is reverted to the original condition before embedding, e.g. lossless, distortion-free or invertible watermarking

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

本发明公开了一种基于分块预测及差值直方图平移的可逆信息隐藏方法,属于数字水印和信息隐藏领域,本发明方法首先把图像划分成4*4的图像块,然后进行三邻域分块,每四个像素为一组,选取一个像素和它周边的三个像素,使用周边三个像素生成预测值,使用预测值与选取的像素进行比较,产生差值,差值进行向下取整,一个图像块内生成四个差值,然后生成差值直方图。本发明提高了水印的嵌入容量,在保持图像视觉效果的前提下,简化了算法步骤,嵌入和提取水印前,只需要进行分块就可以;该方法不仅可以实现可逆水印,而且水印不可见性较好,实验简单易行,嵌入水印后图像的PSNR高,图像视觉效果好,具有实用价值。

The invention discloses a reversible information hiding method based on block prediction and difference histogram translation, which belongs to the field of digital watermarking and information hiding. The method of the invention first divides the image into 4*4 image blocks, and then performs three-neighborhood Blocking, every four pixels as a group, select a pixel and its surrounding three pixels, use the surrounding three pixels to generate a predicted value, use the predicted value to compare with the selected pixel, generate a difference, and the difference is carried down Rounding to an integer, four difference values are generated in one image block, and then a difference value histogram is generated. The invention improves the embedding capacity of the watermark, simplifies the algorithm steps on the premise of maintaining the visual effect of the image, and only needs to be divided into blocks before embedding and extracting the watermark; the method can not only realize the reversible watermark, but also make the watermark invisible Better, the experiment is simple and easy, the PSNR of the image after embedding the watermark is high, the visual effect of the image is good, and it has practical value.

Description

一种基于分块预测及差值直方图平移的可逆信息隐藏方法A Reversible Information Hiding Method Based on Block Prediction and Difference Histogram Translation

技术领域technical field

本发明属于数字水印和信息隐藏领域,具体涉及一种基于分块预测及差值直方图平移的可逆信息隐藏方法。The invention belongs to the field of digital watermarking and information hiding, in particular to a reversible information hiding method based on block prediction and difference histogram translation.

背景技术Background technique

随着人们安全意识和知识产权意识的提高,人们对自身信息的安全度也越来越重视,数字水印技术的使用也越来越多。图像数字水印技术根据嵌入的水印图像能否恢复分为可逆和不可逆水印技术。为了保护图像的完整性,可逆水印的使用越来越多。可逆水印又称无损水印,属于脆弱性数字水印,它能明显反映出信号是否被篡改,并且可以在提取出水印之后无损地恢复原始图像,适合图像完整性的认证。因此,可逆图像水印技术主要用于医学、军事和法学方面等特殊领域,进行图片的保留存储工作,用来保证重要图像信息的不丢失。With the improvement of people's security awareness and intellectual property awareness, people pay more and more attention to the security of their own information, and the use of digital watermarking technology is also increasing. Image digital watermarking technology can be divided into reversible and irreversible watermarking technology according to whether the embedded watermark image can be restored. In order to protect the integrity of images, reversible watermarking is used more and more. Reversible watermarking, also known as lossless watermarking, is a fragile digital watermarking. It can clearly reflect whether the signal has been tampered with, and can restore the original image losslessly after extracting the watermark, which is suitable for the authentication of image integrity. Therefore, reversible image watermarking technology is mainly used in special fields such as medicine, military affairs, and law to preserve and store pictures to ensure that important image information is not lost.

文献“NI Z,SHI Y Q,ANSARI N,et al.Reversible data hiding”(IEEE Transon Circuits and Systems for Video Tech-nology,2006,16:(3)354-362.)的水印嵌入方法,算法实现容易,嵌入的容量也主要取决于峰值点,但是用于像素值均衡的图像的时候,峰值点不突出,因此该算法的效果并不好。文献”THODI D M,RODRUGUEZ J J.Expansionembedding techniques for reversible watermarking”(IEEE Trans-actions on ImageProcessing,2007,16(3):721-730)提出可以通过相邻像素计算产生预测值,通过预测值可以和原值进行差值,进行水印的嵌入,依赖的周围像素比较多,占嵌入容量。The watermark embedding method of the document "NI Z, SHI Y Q, ANSARI N, et al. Reversible data hiding" (IEEE Transon Circuits and Systems for Video Technology-nology, 2006, 16: (3) 354-362.), the algorithm is easy to implement , the capacity of the embedding also mainly depends on the peak point, but when used in an image with equalized pixel values, the peak point is not prominent, so the effect of this algorithm is not good. The literature "THODI D M, RODRUGUEZ J J. Expansionembedding techniques for reversible watermarking" (IEEE Trans-actions on Image Processing, 2007, 16(3): 721-730) proposes that the predicted value can be generated by calculating adjacent pixels, and the predicted value can be compared with The difference between the original value and the embedding of the watermark depends on a large number of surrounding pixels, accounting for the embedding capacity.

发明内容Contents of the invention

针对现有技术中存在的上述技术问题,本发明提出了一种基于分块预测及差值直方图平移的可逆信息隐藏方法,设计合理,克服了现有技术的不足,具有良好的效果。Aiming at the above-mentioned technical problems in the prior art, the present invention proposes a reversible information hiding method based on block prediction and difference histogram translation, which has a reasonable design, overcomes the deficiencies of the prior art, and has good effects.

为了实现上述目的,本发明采用如下技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:

一种基于分块预测及差值直方图平移的可逆信息隐藏方法,包括如下步骤:A reversible information hiding method based on block prediction and difference histogram translation, comprising the following steps:

步骤1:设原图像为M*N的灰度图像,将原图像划分成4*4的图像块,记为Bk,其中,k=1,2,3...[M/4]*[N/4];Step 1: Set the original image as an M*N grayscale image, and divide the original image into 4*4 image blocks, denoted as B k , where k=1,2,3...[M/4]* [N/4];

步骤2:对每一个4*4的图像块Bk进行分块处理,将每四个像素作为一组,记作bkm,m=1,2,3,4;bkm内部像素表示为n=1,2,3,4;记作k代表是第几个大块,m代表大的分块中的小块,n代表具体的像素;将包括无标记、横线、斜线和竖线在内的四个像素作为一组,中间标黑的像素用来和自身像素做差值,标黑的像素就是水印的嵌入点;Step 2: Each 4*4 image block B k is divided into blocks, and every four pixels are taken as a group, which is recorded as b km , m=1, 2, 3, 4; the internal pixels of b km are expressed as n=1,2,3,4; denoted as k represents the first large block, m represents the small block in the large block, and n represents the specific pixel; four pixels including no mark, horizontal line, diagonal line and vertical line are taken as a group, and the middle The black marked pixels are used to make the difference with their own pixels, and the black marked pixels are the embedding points of the watermark;

步骤3:将三个像素向下取整预测出像素的预测值 Step 3: Put Three pixels are rounded down to predict predicted value of pixel

步骤4:将的真实值与预测值作差求出依次类推,将的真实值与预测值作差求出 Step 4: Put The actual value and predicted value of make difference and so on, the The actual value and predicted value of make difference

步骤5:利用差值生成差值直方图;Step 5: Use the difference Generate a difference histogram;

步骤6:对差值直方图进行平移处理,对于差值直方图中像素值大于0的部分,整体向右平移一个单位,在差值直方图像素值为1的位置上就会留出空白;Step 6: Perform translation processing on the difference histogram. For the part of the difference histogram whose pixel value is greater than 0, shift one unit to the right as a whole, and leave a blank at the position where the difference histogram pixel value is 1;

步骤7:根据差值直方图,判断嵌入容量,选取水印图片,嵌入水印;具体包括如下步骤:Step 7: According to the difference histogram, determine the embedding capacity, select the watermark image, and embed the watermark; specifically, the following steps are included:

步骤7.1:从第一个分块开始进行水印嵌入,判断第一个嵌入点是否为可嵌入水印的像素点;如果差值为0,则说明此像素点为可嵌入点,嵌入水印;如果差值不为0,则不嵌入水印,继续对分块内的第二个嵌入点进行判断,直至对4*4分块内的四个点依次判断完成,然后继续对下一个分块进行上述过程,然后依顺序进行;Step 7.1: Start watermark embedding from the first block, and judge whether the first embedding point is a pixel that can embed a watermark; if the difference If it is 0, it means that this pixel point is an embeddable point, and the watermark is embedded; if the difference If it is not 0, the watermark will not be embedded, and continue to judge the second embedding point in the block until the four points in the 4*4 block are judged in turn, and then continue the above process for the next block, Then proceed in order;

步骤7.2:对水印图像进行处理,将二值水印图像做成水印序列用于嵌入,根据水印图像的大小设置一个水印嵌入的终止值,这个终止值就是水印图片的大小,嵌入水印后的图像的像素值如下所示:Step 7.2: Process the watermark image, make the binary watermark image into a watermark sequence for embedding, set a watermark embedding termination value according to the size of the watermark image, this termination value is the size of the watermark image, and the image after embedding the watermark The pixel values look like this:

其中,I(i,j)(0≤I(i,j)≤255)为原图像的灰度值,W为水印序列,IW(i,j)表示嵌入水印后的图像的像素值;Among them, I(i,j)(0≤I(i,j)≤255) is the gray value of the original image, W is the watermark sequence, and I W (i,j) represents the pixel value of the image after embedding the watermark;

步骤8:水印提取和图像恢复;具体包括如下步骤:Step 8: watermark extraction and image recovery; specifically include the following steps:

步骤8.1:从第一个分块开始进行水印提取,对每个嵌入点进行判断;若差值为1,说明嵌入的水印值为1,提取1;若差值为0,说明嵌入的水印值为0,提取0;然后继续对分块内的第二个嵌入点进行判断,直至对4*4分块内的四个点依次判断完成,然后继续对下一个分块进行上述过程,然后依顺序进行;Step 8.1: Extract the watermark from the first block, and judge each embedding point; if The difference is 1, indicating that the embedded watermark value is 1, and 1 is extracted; if the difference is 0, indicating that the embedded watermark value is 0, extract 0; then continue to judge the second embedded point in the block until the four points in the 4*4 block are judged in turn, and then continue to the next Carry out the above process in blocks, and then proceed in order;

步骤8.2:提取水印后,对图像进行恢复,将差值直方图中差值大于1的像素点向左平移一位,得到原图像;原图像的灰度值如下所示:Step 8.2: After extracting the watermark, restore the image, and shift the pixels with a difference greater than 1 in the difference histogram to the left to obtain the original image; the gray value of the original image is as follows:

本发明所带来的有益技术效果:Beneficial technical effects brought by the present invention:

本发明公开了一种基于分块预测及差值直方图平移的可逆信息隐藏方法,针对可逆水印算法步骤繁琐,实现麻烦的问题,同时提高水印的嵌入容量,在保持图像视觉效果的前提下,简化了算法步骤,嵌入和提取水印前,不需要进行复杂的预处理,只需要进行分块就可以实现,并且在差值直方图算法中增加水印的嵌入容量;对比传统的选取3*3的分块,使用周围八个像素对中心像素进行预测的方法,可以提高可嵌入的像素点的个数,从而增加一些嵌入容量;相对于直接采用直方图平移的方式,可以提高水印直方图的陡峭性,突出峰值点像素的个数,能够避免出现像素值分布均匀从而导致直方图平移嵌入水印容量少的问题;同时,能够提高PSNR值,使含水印图像的视觉效果提高;本申请提出了三邻域分块的方法,根据图像的平滑度做出分块预测,将载体图像进行4*4分块,然后分块为四个像素一组,最后在分块内实施预测差值直方图平移,实现水印嵌入,然后通过可逆水印技术嵌入自己的标注信息,通过水印的完整度来判断密文是否遭受破坏,最终可以无失真恢复原图像;本发明方法不仅可以实现可逆水印,而且水印不可见性较好,实验简单易行,嵌入水印后图像的PSNR高;本发明方法既可以增加嵌入容量也能保证邻域预测的精确度,图像视觉效果好,具有实用价值。The invention discloses a reversible information hiding method based on block prediction and difference histogram translation, aiming at the problem that the steps of the reversible watermarking algorithm are cumbersome and troublesome to realize, and at the same time improve the embedding capacity of the watermark, under the premise of maintaining the visual effect of the image, The algorithm steps are simplified, before embedding and extracting the watermark, there is no need for complex preprocessing, it can be realized only by dividing into blocks, and the embedding capacity of the watermark is increased in the difference histogram algorithm; compared with the traditional selection of 3*3 Blocking, using the surrounding eight pixels to predict the central pixel, can increase the number of pixels that can be embedded, thereby increasing some embedding capacity; compared with the direct use of histogram translation, it can increase the steepness of the watermark histogram The feature, highlighting the number of peak point pixels, can avoid the problem of uniform distribution of pixel values, which leads to the small capacity of the histogram translation embedded watermark; at the same time, it can improve the PSNR value and improve the visual effect of the watermarked image; the application proposes three The neighborhood block method makes block prediction according to the smoothness of the image, divides the carrier image into 4*4 blocks, and then blocks into groups of four pixels, and finally implements the prediction difference histogram translation in the block , realize watermark embedding, and then embed their own label information through reversible watermarking technology, judge whether the ciphertext has been damaged through the integrity of the watermark, and finally restore the original image without distortion; the method of the present invention can not only realize reversible watermarking, but also make the watermark invisible The performance is good, the experiment is simple and easy, and the PSNR of the image after embedding the watermark is high; the method of the invention can not only increase the embedding capacity but also ensure the accuracy of the neighborhood prediction, the image visual effect is good, and it has practical value.

附图说明Description of drawings

图1为4*4分块图像示意图。Figure 1 is a schematic diagram of a 4*4 block image.

图2为本发明的分块图像示意图。Fig. 2 is a schematic diagram of a block image in the present invention.

图3为水印嵌入流程图。Figure 3 is a flow chart of watermark embedding.

图4为水印提取流程图。Figure 4 is a flow chart of watermark extraction.

具体实施方式Detailed ways

下面结合附图以及具体实施方式对本发明作进一步详细说明:Below in conjunction with accompanying drawing and specific embodiment the present invention is described in further detail:

一种基于分块预测及差值直方图平移的可逆信息隐藏方法,包括如下步骤:A reversible information hiding method based on block prediction and difference histogram translation, comprising the following steps:

步骤1:设原图像为M*N的灰度图像,将原图像划分成4*4的图像块,记为Bk,其中,k=1,2,3...[M/4]*[N/4];如图1所示。Step 1: Set the original image as an M*N grayscale image, and divide the original image into 4*4 image blocks, denoted as B k , where k=1,2,3...[M/4]* [N/4]; as shown in Figure 1.

步骤2:对每一个4*4的图像块Bk进行分块处理,将每四个像素作为一组,记作bkm,m=1,2,3,4;bkm内部像素表示为n=1,2,3,4;记作使处在四个像素的中间位置,k代表是第几个大块,m代表大的分块中的小块,n代表具体的像素。每种标记(无标记,横线,斜线,竖线)的四个像素作为一组,中间标黑的像素用来和自身像素做差值,标黑的像素就是水印的嵌入点,如图2所示。Step 2: Each 4*4 image block B k is divided into blocks, and every four pixels are taken as a group, which is recorded as b km , m=1, 2, 3, 4; the internal pixels of b km are expressed as n=1,2,3,4; denoted as Make In the middle of the four pixels, k represents the number of large blocks, m represents the small block in the large block, and n represents the specific pixel. The four pixels of each mark (no mark, horizontal line, oblique line, vertical line) are used as a group, and the black marked pixels in the middle are used to make a difference with their own pixels. The black marked pixels are the embedding points of the watermark, as shown in the figure 2.

步骤3:利用三个像素向下取整预测出像素的预测值 Step 3: Take advantage of Three pixels are rounded down to predict predicted value of pixel

步骤4:将的真实值与预测值作差求出依次类推,将的真实值与预测值作差求出 Step 4: Put The actual value and predicted value of make difference and so on, the The actual value and predicted value of make difference

步骤5:利用差值生成差值直方图;Step 5: Use the difference Generate a difference histogram;

步骤6:对原图像进行分块,判断是否为可嵌入水印的像素点,如果差值为0,则说明此像素点为可嵌入点,嵌入1bit位的水印;如果差值不为0,则不嵌入水印,执行步骤1、2,继续对下一个像素点进行判断;Step 6: Divide the original image into blocks and judge Whether it is a pixel that can be embedded with a watermark, if the difference is 0, it means that this pixel is an embeddable point, and a 1-bit watermark is embedded; if the difference is not 0, the watermark is not embedded, perform steps 1 and 2, and continue Judge the next pixel;

水印嵌入,其流程如图3所示,Watermark embedding, its process is shown in Figure 3,

设图像大小为M×N,其灰度值为I(i,j)(0≤I(i,j)≤255),将水印图像转换为水印序列W,本申请选取的是64*64的二值水印图片,转化为1*4096的水印序列,嵌入水印后的图像的像素值用IW(i,j)表示;Suppose the size of the image is M×N, and its gray value is I(i,j)(0≤I(i,j)≤255), convert the watermark image into a watermark sequence W, which is 64*64 in this application The binary watermark picture is converted into a watermark sequence of 1*4096, and the pixel value of the image after embedding the watermark is represented by I W (i, j);

水印嵌入具体过程如下:The specific process of watermark embedding is as follows:

首先对原图像按照图1、图2的方式进行分块处理,分块后就可以知道原图像的嵌入点。First, the original image is divided into blocks according to the methods shown in Figure 1 and Figure 2, and the embedding point of the original image can be known after the block is divided.

然后对分块后的像素块进行计算求出差值,然后将得到的差值生成差值直方图。对差值直方图进行平移处理,对于差值直方图中像素值大于0的部分,整体向右平移一个单位,这样在差值直方图像素值为1的位置上就会留出空白。Then calculate the difference value for the divided pixel blocks, and then generate a difference value histogram from the obtained difference value. Perform translation processing on the difference histogram, and for the part of the difference histogram whose pixel value is greater than 0, shift one unit to the right as a whole, so that a blank will be left at the position where the difference histogram pixel value is 1.

从第一个分块开始进行水印嵌入,对嵌入点进行判断,差值是否为零,差值为零,则嵌入水印;差值不为零,继续对分块内的第二个嵌入点进行判断,对4*4分块内的四个点依次判断完成后,继续对下一个分块进行上述过程,然后依顺序进行。公式如下所示:Start watermark embedding from the first block, judge the embedding point, whether the difference is zero, if the difference is zero, then embed the watermark; if the difference is not zero, continue to the second embedding point in the block For judging, after the four points in the 4*4 block are judged sequentially, continue the above process for the next block, and then proceed in order. The formula looks like this:

对水印图像进行处理,将二值水印图像做成水印序列用于嵌入,根据水印图像的大小设置一个水印嵌入的终止值,这个终止值就是水印图片的大小。The watermark image is processed, and the binary watermark image is made into a watermark sequence for embedding, and a watermark embedding termination value is set according to the size of the watermark image, and the termination value is the size of the watermark image.

水印提取和图像恢复,其流程如图4所示,The process of watermark extraction and image restoration is shown in Figure 4.

首先进行水印提取,对嵌入水印后的图像进行处理,分块方式仍是按照图1、图2的方式进行分块处理。Firstly, the watermark is extracted, and the image embedded with the watermark is processed, and the block method is still in accordance with the block processing shown in Figure 1 and Figure 2.

仍是利用三个像素预测出像素的预测值,然后利用预测值与的真实值做差值。still use three pixels predicted The predicted value of the pixel, and then use the predicted value and The true value of is the difference.

然后利用差值生成一个差值直方图,因为是在差值为0的时候进行嵌入水印,所以差值为1证明嵌入的水印值为1,然后同嵌入水印的顺序一样,从第一个分块开始进行水印提取,对每个嵌入点进行判断,若差值为1,说明嵌入的水印值为1,提取1;若差值为0,说明嵌入的水印值为0,提取0。然后继续对分块内的第二个嵌入点进行判断,对4*4分块内的四个点依次判断完成后,继续对下一个分块进行上述过程,然后依顺序进行。Then use the difference to generate a difference histogram, because the watermark is embedded when the difference is 0, so the difference is 1 to prove that the embedded watermark value is 1, and then the same as the order of embedding watermarks, from the first point The block starts watermark extraction, and judges each embedding point. If the difference is 1, the embedded watermark value is 1, and 1 is extracted; if the difference is 0, the embedded watermark value is 0, and 0 is extracted. Then continue to judge the second embedded point in the block, and after the four points in the 4*4 block are judged in turn, continue to perform the above process on the next block, and then proceed in order.

因为水印嵌入时对差值直方图大于0的像素向右平移了一个单位,所以在为嵌入水印前,像素值为1的像素点数为0,所以提取水印时对得到的差值进行判断,如果得到的差值点为0,说明嵌入的水印值为0,差值为1说明嵌入的水印值为1。公式如下所示:Because the pixels whose difference value histogram is greater than 0 are shifted to the right by one unit when the watermark is embedded, so before embedding the watermark, the number of pixels with a pixel value of 1 is 0, so the obtained difference is judged when extracting the watermark, if The obtained difference point is 0, indicating that the embedded watermark value is 0, and the difference value of 1 indicates that the embedded watermark value is 1. The formula looks like this:

最后提取水印后,再对图像进行恢复,把差值直方图中差值大于1的像素点向左平移一位,得到原图像。Finally, after the watermark is extracted, the image is restored, and the pixels with a difference greater than 1 in the difference histogram are shifted one bit to the left to obtain the original image.

由于可逆水印算法通常比较复杂,本发明提出的分块预测差值直方图,对于灰度图像而言,实现比较简单,相比以八邻域作为预测的标准嵌入水印的容量提高,但是总体上水印的嵌入容量比较少,水印的嵌入和提取简单易懂,PSNR(Peak Signal to NoiseRatio,峰值信噪比)值都在56以上。对图像的像素值修改极小,并且提出水印后,可以无失真恢复图像,实现可逆水印。Since the reversible watermarking algorithm is usually more complex, the histogram of block prediction difference proposed by the present invention is relatively simple to implement for grayscale images. The embedding capacity of the watermark is relatively small, the embedding and extraction of the watermark are simple and easy to understand, and the PSNR (Peak Signal to Noise Ratio, peak signal-to-noise ratio) value is above 56. The modification of the pixel value of the image is very small, and after the watermark is proposed, the image can be restored without distortion, and the reversible watermark can be realized.

PSNR即峰值信噪比,是一种衡量图像失真或是噪声水平的客观标准。2个图像之间PSNR值越大,图像失真越小。普遍基准为30dB,30dB以下的图像劣化较为明显。公式如下所示:PSNR is peak signal-to-noise ratio, which is an objective standard to measure image distortion or noise level. The larger the PSNR value between two images, the smaller the image distortion. The general benchmark is 30dB, and image degradation below 30dB is more obvious. The formula looks like this:

MAX表示图像颜色的最大数值,MSE即m×n单色图像I和K之间均方误差,定义公式如下所示:MAX represents the maximum value of the image color, MSE is the mean square error between m×n monochrome images I and K, and the definition formula is as follows:

利用PSNR来评价提取出的水印质量以及恢复出的载体图像的质量,由表1以及实验结果可以看出,在灰度图像中嵌入了64*64的水印,由PSNR可知,嵌入水印后的图像PSNR总体大于56,能达到很好的视觉效果,保证了水印的不可见性和图像的效果,并且提取出水印后,能够无失真恢复原图像和水印图像。Use PSNR to evaluate the quality of the extracted watermark and the quality of the recovered carrier image. It can be seen from Table 1 and the experimental results that a 64*64 watermark is embedded in the grayscale image. It can be seen from PSNR that the image after embedding the watermark The overall PSNR is greater than 56, which can achieve a good visual effect, ensure the invisibility of the watermark and the effect of the image, and after the watermark is extracted, the original image and the watermark image can be restored without distortion.

表1嵌入容量及嵌入水印的PSNR对比结果Table 1 Comparison results of embedding capacity and PSNR of embedding watermark

当然,上述说明并非是对本发明的限制,本发明也并不仅限于上述举例,本技术领域的技术人员在本发明的实质范围内所做出的变化、改型、添加或替换,也应属于本发明的保护范围。Of course, the above descriptions are not intended to limit the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or replacements made by those skilled in the art within the scope of the present invention shall also belong to the present invention. protection scope of the invention.

Claims (1)

1.一种基于分块预测及差值直方图平移的可逆信息隐藏方法,其特征在于:包括如下步骤:1. A reversible information hiding method based on block prediction and difference histogram translation, characterized in that: comprise the steps: 步骤1:设原图像为M*N的灰度图像,将原图像划分成4*4的图像块,记为Bk,其中,k=1,2,3...[M/4]*[N/4];Step 1: Set the original image as an M*N grayscale image, and divide the original image into 4*4 image blocks, denoted as B k , where k=1, 2, 3...[M/4]* [N/4]; 步骤2:对每一个4*4的图像块Bk进行分块处理,将每四个像素作为一组,记作bkm,m=1,2,3,4;bkm内部像素表示为记作k代表是第几个大块,m代表大的分块中的小块,n代表具体的像素;将包括无标记、横线、斜线和竖线在内的四个像素作为一组,中间标黑的像素用来和自身像素做差值,标黑的像素就是水印的嵌入点;Step 2: Each 4*4 image block B k is divided into blocks, and every four pixels are taken as a group, which is recorded as b km , m=1, 2, 3, 4; the internal pixels of b km are expressed as Referred to as k represents the first large block, m represents the small block in the large block, and n represents the specific pixel; four pixels including no mark, horizontal line, diagonal line and vertical line are taken as a group, and the middle The black marked pixels are used to make the difference with their own pixels, and the black marked pixels are the embedding points of the watermark; 步骤3:将三个像素向下取整预测出像素的预测值 Step 3: Put Three pixels are rounded down to predict predicted value of pixel 步骤4:将的真实值与预测值作差求出依次类推,将的真实值与预测值作差求出 Step 4: Put The actual value and predicted value of make difference and so on, the The actual value and predicted value of make difference 步骤5:利用差值生成差值直方图;Step 5: Use the difference Generate a difference histogram; 步骤6:对差值直方图进行平移处理,对于差值直方图中像素值大于0的部分,整体向右平移一个单位,在差值直方图像素值为1的位置上就会留出空白;Step 6: Perform translation processing on the difference histogram. For the part of the difference histogram whose pixel value is greater than 0, shift one unit to the right as a whole, and leave a blank at the position where the difference histogram pixel value is 1; 步骤7:根据差值直方图,判断嵌入容量,选取水印图片,嵌入水印;具体包括如下步骤:Step 7: According to the difference histogram, determine the embedding capacity, select the watermark image, and embed the watermark; specifically, the following steps are included: 步骤7.1:从第一个分块开始进行水印嵌入,判断第一个嵌入点是否为可嵌入水印的像素点;如果差值为0,则说明此像素点为可嵌入点,嵌入水印;如果差值不为0,则不嵌入水印,继续对分块内的第二个嵌入点进行判断,直至对4*4分块内的四个点依次判断完成,然后继续对下一个分块进行上述过程,然后依顺序进行;Step 7.1: Start watermark embedding from the first block, and judge whether the first embedding point is a pixel that can embed a watermark; if the difference If it is 0, it means that this pixel point is an embeddable point, and the watermark is embedded; if the difference If it is not 0, the watermark will not be embedded, and continue to judge the second embedding point in the block until the four points in the 4*4 block are judged in turn, and then continue the above process for the next block, Then proceed in order; 步骤7.2:对水印图像进行处理,将二值水印图像做成水印序列用于嵌入,根据水印图像的大小设置一个水印嵌入的终止值,这个终止值就是水印图片的大小,嵌入水印后的图像的像素值如下所示:Step 7.2: Process the watermark image, make the binary watermark image into a watermark sequence for embedding, set a watermark embedding termination value according to the size of the watermark image, this termination value is the size of the watermark image, and the image after embedding the watermark The pixel values look like this: 其中,I(i,j)(0≤I(i,j)≤255)为原图像的灰度值,W为水印序列,IW(i,j)表示嵌入水印后的图像的像素值;Wherein, I(i, j) (0≤I(i, j)≤255) is the gray value of the original image, W is the watermark sequence, and I W (i, j) represents the pixel value of the image after embedding the watermark; 步骤8:水印提取和图像恢复;具体包括如下步骤:Step 8: watermark extraction and image recovery; specifically include the following steps: 步骤8.1:从第一个分块开始进行水印提取,对每个嵌入点进行判断;若差值为1,说明嵌入的水印值为1,提取1;若差值为0,说明嵌入的水印值为0,提取0;然后继续对分块内的第二个嵌入点进行判断,直至对4*4分块内的四个点依次判断完成,然后继续对下一个分块进行上述过程,然后依顺序进行;Step 8.1: Extract the watermark from the first block, and judge each embedding point; if The difference is 1, indicating that the embedded watermark value is 1, and 1 is extracted; if the difference is 0, indicating that the embedded watermark value is 0, extract 0; then continue to judge the second embedded point in the block until the four points in the 4*4 block are judged in turn, and then continue to the next Carry out the above process in blocks, and then proceed in order; 步骤8.2:提取水印后,对图像进行恢复,将差值直方图中差值大于1的像素点向左平移一位,得到原图像;原图像的灰度值如下所示:Step 8.2: After extracting the watermark, restore the image, and shift the pixels with a difference greater than 1 in the difference histogram to the left to obtain the original image; the gray value of the original image is as follows:
CN201910503610.6A 2019-06-12 2019-06-12 A Reversible Information Hiding Method Based on Block Prediction and Difference Histogram Translation Active CN110232651B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910503610.6A CN110232651B (en) 2019-06-12 2019-06-12 A Reversible Information Hiding Method Based on Block Prediction and Difference Histogram Translation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910503610.6A CN110232651B (en) 2019-06-12 2019-06-12 A Reversible Information Hiding Method Based on Block Prediction and Difference Histogram Translation

Publications (2)

Publication Number Publication Date
CN110232651A true CN110232651A (en) 2019-09-13
CN110232651B CN110232651B (en) 2021-06-01

Family

ID=67858971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910503610.6A Active CN110232651B (en) 2019-06-12 2019-06-12 A Reversible Information Hiding Method Based on Block Prediction and Difference Histogram Translation

Country Status (1)

Country Link
CN (1) CN110232651B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110992237A (en) * 2019-12-03 2020-04-10 国网电子商务有限公司 Watermark embedding method, watermark removing method and related device
CN111127288A (en) * 2019-12-16 2020-05-08 中移(杭州)信息技术有限公司 Reversible image watermark processing method, device and computer-readable storage medium
CN112907432A (en) * 2021-03-08 2021-06-04 桂林理工大学 Reversible watermark data hiding method based on bilinear interpolation
CN113112392A (en) * 2020-01-13 2021-07-13 国际关系学院 Watermark embedding and extracting method, embedding and extracting device, and processing system
CN113938574A (en) * 2021-11-15 2022-01-14 西安邮电大学 A Reversible Information Hiding Method Based on Center Prediction
CN114022336A (en) * 2020-10-12 2022-02-08 国际关系学院 Reversible image watermarking method and device based on inter-block prediction error histogram translation
CN114466113A (en) * 2022-01-11 2022-05-10 山东师范大学 Reversible information hiding method and system for perception encrypted image
CN115393151A (en) * 2022-08-19 2022-11-25 淮阴工学院 Reversible Watermarking Algorithm Based on IWT and Histogram Shift of Prediction Difference
CN116957894A (en) * 2023-06-28 2023-10-27 淮阴工学院 Prediction error extended reversible watermarking algorithm based on pixel correlation

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651837A (en) * 2009-09-10 2010-02-17 北京航空航天大学 Reversible video frequency watermark method based on interframe forecast error histogram modification
CN102722855A (en) * 2011-03-31 2012-10-10 北京大学 Reversible watermark embedding method, extracting method thereof, device and system
CN103414840A (en) * 2013-07-25 2013-11-27 西安空间无线电技术研究所 A Data Hiding Method Based on Image Set
CN106097241A (en) * 2016-06-13 2016-11-09 西安交通大学 Reversible information hidden method based on eight neighborhood pixel
CN108596820A (en) * 2018-04-11 2018-09-28 重庆第二师范学院 a kind of image processing system based on information security
CN108876691A (en) * 2017-05-10 2018-11-23 北京大学 Adaptive reversible water mark method and system
US20190066254A1 (en) * 2016-01-27 2019-02-28 Rakuten, Inc. Image processing device, image processing method, and program
CN110047029A (en) * 2019-04-22 2019-07-23 广东工业大学 A kind of combination multilayer difference extension has the reversible information hidden method and device of contrast enhancing

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101651837A (en) * 2009-09-10 2010-02-17 北京航空航天大学 Reversible video frequency watermark method based on interframe forecast error histogram modification
CN102722855A (en) * 2011-03-31 2012-10-10 北京大学 Reversible watermark embedding method, extracting method thereof, device and system
CN103414840A (en) * 2013-07-25 2013-11-27 西安空间无线电技术研究所 A Data Hiding Method Based on Image Set
US20190066254A1 (en) * 2016-01-27 2019-02-28 Rakuten, Inc. Image processing device, image processing method, and program
CN106097241A (en) * 2016-06-13 2016-11-09 西安交通大学 Reversible information hidden method based on eight neighborhood pixel
CN108876691A (en) * 2017-05-10 2018-11-23 北京大学 Adaptive reversible water mark method and system
CN108596820A (en) * 2018-04-11 2018-09-28 重庆第二师范学院 a kind of image processing system based on information security
CN110047029A (en) * 2019-04-22 2019-07-23 广东工业大学 A kind of combination multilayer difference extension has the reversible information hidden method and device of contrast enhancing

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
何文广 等: ""一种基于动态分块和差值直方图平移的可逆水印算法"", 《现代计算机(专业版)》 *
李雪景: ""基于图像插值和直方图平移的可逆水印算法"", 《计算机应用研究》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110992237A (en) * 2019-12-03 2020-04-10 国网电子商务有限公司 Watermark embedding method, watermark removing method and related device
CN111127288A (en) * 2019-12-16 2020-05-08 中移(杭州)信息技术有限公司 Reversible image watermark processing method, device and computer-readable storage medium
CN111127288B (en) * 2019-12-16 2023-07-04 中移(杭州)信息技术有限公司 Reversible image watermarking method, reversible image watermarking device and computer readable storage medium
CN113112392B (en) * 2020-01-13 2023-05-19 国际关系学院 Watermark embedding and extracting method, watermark embedding and extracting device and processing system
CN113112392A (en) * 2020-01-13 2021-07-13 国际关系学院 Watermark embedding and extracting method, embedding and extracting device, and processing system
CN114022336B (en) * 2020-10-12 2024-12-06 国际关系学院 Reversible image watermarking method and device based on inter-block prediction error histogram shift
CN114022336A (en) * 2020-10-12 2022-02-08 国际关系学院 Reversible image watermarking method and device based on inter-block prediction error histogram translation
CN112907432A (en) * 2021-03-08 2021-06-04 桂林理工大学 Reversible watermark data hiding method based on bilinear interpolation
CN113938574B (en) * 2021-11-15 2023-06-16 西安邮电大学 Reversible information hiding method based on center prediction
CN113938574A (en) * 2021-11-15 2022-01-14 西安邮电大学 A Reversible Information Hiding Method Based on Center Prediction
CN114466113A (en) * 2022-01-11 2022-05-10 山东师范大学 Reversible information hiding method and system for perception encrypted image
CN114466113B (en) * 2022-01-11 2024-05-17 山东师范大学 Reversible information hiding method and system for perception encrypted image
CN115393151A (en) * 2022-08-19 2022-11-25 淮阴工学院 Reversible Watermarking Algorithm Based on IWT and Histogram Shift of Prediction Difference
CN116957894A (en) * 2023-06-28 2023-10-27 淮阴工学院 Prediction error extended reversible watermarking algorithm based on pixel correlation
CN116957894B (en) * 2023-06-28 2024-06-28 淮阴工学院 Prediction error expansion reversible watermarking algorithm based on pixel correlation

Also Published As

Publication number Publication date
CN110232651B (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN110232651A (en) A kind of reversible information hidden method based on block prediction and difference histogram shifting
Qin et al. An inpainting-assisted reversible steganographic scheme using a histogram shifting mechanism
CN106097241B (en) Reversible Information Hiding Method Based on Eight Neighborhood Pixels
Eltahir et al. High rate video streaming steganography
CN106023058A (en) High-fidelity reversible watermark embedding method
Hong et al. An improved human visual system based reversible data hiding method using adaptive histogram modification
CN110910299B (en) An Adaptive Reversible Information Hiding Method Based on Integer Wavelet Transform
Santoso et al. An improved message capacity and security using divide and modulus function in spatial domain steganography
CN106228501B (en) An Adaptive Reversible Digital Watermarking Method Based on Integer Transformation
CN102903076A (en) Method for embedding and extracting reversible watermark of digital image
CN106875324A (en) Lossless image information concealing method based on SBDE
CN108616757A (en) Can be extracted after a kind of reproduction watermark video watermark is embedded and extracting method
CN108171643B (en) A Robust Reversible Image Watermarking Method Based on Histogram Shift and Its Application
CN111311473A (en) A digital image steganography method and secret information extraction method
Pan et al. Chi-square detection for PVD steganography
CN114119330B (en) Robust digital watermark embedding and extracting method based on neural network
CN102065287B (en) T-shaped video watermark embedding and extraction method
Xiang et al. A pixel-based reversible data hiding method based on obtuse angle prediction
Xiao et al. Reversible data hiding using histogram shifting in small blocks
WO2020119650A1 (en) Reversible watermarking method
CN110827188B (en) Quick blind digital watermarking method for color image and extraction method
CN115037846A (en) A Reversible Information Hiding Algorithm Based on Arnold and Improved Difference Histogram Translation
CN108200435B (en) A Reversible Information Hiding Method for Fractal Images
CN109685711B (en) Anti-rotation watermark method for embedding periodogram in characteristic region
Kunhu et al. A novel reversible watermarking scheme based on sha3 for copyright protection and integrity of satellite imagery

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