CN108492240B - Reversible image digital watermark overflow solution method - Google Patents

Reversible image digital watermark overflow solution method Download PDF

Info

Publication number
CN108492240B
CN108492240B CN201810235415.5A CN201810235415A CN108492240B CN 108492240 B CN108492240 B CN 108492240B CN 201810235415 A CN201810235415 A CN 201810235415A CN 108492240 B CN108492240 B CN 108492240B
Authority
CN
China
Prior art keywords
overflow
image
embedding
pixel
adjustment
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
Application number
CN201810235415.5A
Other languages
Chinese (zh)
Other versions
CN108492240A (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.)
Taishan University
Original Assignee
Taishan University
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 Taishan University filed Critical Taishan University
Priority to CN201810235415.5A priority Critical patent/CN108492240B/en
Publication of CN108492240A publication Critical patent/CN108492240A/en
Application granted granted Critical
Publication of CN108492240B publication Critical patent/CN108492240B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • 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

The invention provides a reversible overflow solution for an image digital watermark, belongs to the technical field of communication, and is used for solving the problem of overflow generated by embedding the image into the digital watermark. The method comprises the steps of detecting overflow pixels in an image by circularly scanning the image embedded with the watermark, adjusting the values of the overflow pixels one by one to generate an adjustment record, introducing a checking thought, embedding the adjustment record and the checking information into the image according to a designed coding mode by using a reversible watermark algorithm, and finally obtaining the image without the overflow pixels. The method can effectively solve the problem of pixel overflow in the image and the problem of new overflow generated when the adjustment information is embedded, is completely reversible and can be applied to various digital watermarking technologies including reversible digital watermarking.

Description

Reversible image digital watermark overflow solution method
Technical Field
The invention belongs to the technical field of communication, and relates to a reversible overflow solution of an image digital watermark.
Background
The digital watermarking technology is an important tool for solving the copyright problem and the content authentication problem of multimedia resources, and the reversible digital watermarking becomes an important research direction in the field of digital watermarking and is widely applied due to the characteristic of completely recovering a carrier image without damage. Most digital watermarking technologies embed watermark information into a carrier image through modifying a pixel value, and if no method is adopted for control, a phenomenon of pixel value overflow may occur, that is, the pixel value is out of a legal range of 0 to 255, so that information is lost, the watermark information may not be correctly extracted, and for a reversible watermarking technology, the problem that the carrier image cannot be recovered without damage is also caused.
The method for solving the overflow problem of the image pixels is always an important part of the digital watermarking technology and is related to the feasibility of a digital watermarking algorithm and the reversibility of a reversible digital watermark.
Disclosure of Invention
The invention aims to solve the problem of pixel overflow caused by embedding a digital watermark, detects overflow pixels in an image by circularly scanning the image embedded with the watermark, adjusts the value of the overflow pixels to generate an adjustment record, introduces check information, and embeds the adjustment record and the check information into the image by using a reversible watermark algorithm to finally obtain the image without the overflow pixels.
The technical scheme of the invention is as follows:
a reversible image digital watermark overflow solving method comprises the following steps:
1) generating prime numbers: generating a secret prime number k;
the method is suitable for 8-bit gray images with the size smaller than or equal to 512 multiplied by 512, the length and the width of the image are required to be multiples of 8, and the generated prime number is smaller than the total number of unit blocks of 8 multiplied by 8;
2) detecting and adjusting overflow and generating an adjustment record: scanning each pixel of the image in sequence, if the pixel is found to overflow, stopping scanning, adjusting the overflow pixel value to the nearest range boundary value, namely 0 or 255, and generating an adjustment record containing the coordinate and the adjustment value;
3) determining a unit block corresponding to an overflow pixel: determining any 2 8 x 8 blocks of the image, called unit blocks, according to the sequence and the prime number k of the current overflow pixel and the prime number k generated in the step 1) by using one-dimensional Torus mapping, and then determining the sequence numbers of the two unit blocks corresponding to the overflow pixel;
4) embedding adjustment records: embedding an adjustment record in two unit blocks corresponding to the overflow pixel determined in the step 3) by using a reversible watermarking algorithm, wherein the adjustment record comprises coordinate information, an adjustment value and a CRC (cyclic redundancy check) code of the overflow pixel;
5) and (3) circulating treatment overflow: looping steps 2) through 4) until no overflow pixel is found;
rescanning the image in a circulating mode, detecting overflowing pixels, adjusting and embedding until new overflowing pixels are not found any more, and completely solving inherent pixel overflow of the image and new overflow introduced by embedding adjustment records;
6) embedding end identifier: determining unit blocks corresponding to the next 4 sequence numbers by using the same prime number k and a Torus mapping formula, and embedding information with 16 bits of all 0 in each unit block by using a reversible watermark embedding algorithm to serve as an identifier for finishing embedding;
7) and (3) detecting overflow: detecting the image does not contain overflow pixels again, and finishing embedding;
the last time the full image is scanned, it is ensured that no overflow pixels are included, i.e. that no new overflow is introduced due to embedding the end identifier.
The invention has the beneficial effects that: the method of the invention can effectively solve the problem of pixel overflow in the image and also solve the problem of new overflow generated when the adjustment information is embedded, and the method is completely reversible and can be applied to various digital watermarking technologies including reversible digital watermarking.
Drawings
FIG. 1 is a flow chart of an algorithm for solving the overflow problem of the present invention.
Fig. 2 is a schematic diagram of pixels of 2 × 2 small blocks after one another in the low-distortion reversible watermarking algorithm.
Fig. 3 is a schematic diagram of information embedded in 2 unit blocks corresponding to a certain overflow adjustment record.
Detailed Description
The technical scheme of the invention is explained in detail in the following by combining the drawings and the technical scheme.
Aiming at the problems that the existing method is not simple and convenient to operate and does not discuss in detail, and considering the influence on the image, a novel reversible image digital watermark overflow solving method is provided. The main idea is to search the overflowing pixels circularly, adjust one by one, and embed the adjustment record and the check information by adopting a certain coding and reversible method. The method aims at gray images with the size less than or equal to 512 x 512, and if the method is used for images with larger sizes, the subsequent steps, especially the step 4) need to be properly adjusted to adapt to a larger coordinate range. For example, the image after embedding the watermark is a 512 × 512 grayscale image, and there may be overflow in the pixels, and the detailed steps for solving the overflow using the method are as follows:
1) generating prime numbers: a secret prime number k is generated by using an arbitrary algorithm, the image is divided into 8 x 8 unit blocks, the unit blocks are numbered from left to right and from top to bottom in sequence from 1, the total number of the unit blocks is set to be M, and k is required to be less than M. In this example, the image is divided into 64 × 64 unit blocks, which are numbered 1 to 4096, and M is 4096.
2) Detecting and adjusting overflow and generating an adjustment record: scanning each pixel of the image according to a certain sequence (such as left to right and top to bottom), stopping scanning once the overflow of the pixel is found, and setting the overflow pixel as the pixel P (x, y) of the x-th row and y-th column of the image, and the adjusted pixel P '(x, y) as the pixel P' (x, y) of the pixel
Figure BDA0001603793050000031
The adjustment value m is
Figure BDA0001603793050000041
The one adjustment record generated can be noted as (x, y, m). If the overflow pixel is not found by scanning the whole image, directly go to step 6).
3) Determining a unit block: the sequence number N (i) of the ith unit block in which information is to be embedded, determined using one-dimensional Torus mapping, is
N(i)=(k×i)mod M+1
Therefore, the two unit block numbers corresponding to the jth overflow record are N (2j-1) and N (2 j).
4) Embedding adjustment records: here, a low-distortion reversible watermarking algorithm is used to embed information, which embeds 1bit information in each 2 x 2 small block, as shown in fig. 2, which is a schematic diagram of the pixels of a certain small block before and after embedding, and b is assumed to be embeddedIs 0 or 1), then
Figure BDA0001603793050000042
pb=p+b,
Figure BDA0001603793050000043
Figure BDA0001603793050000044
Figure BDA0001603793050000045
Figure BDA0001603793050000046
The algorithm can recover losslessly at the time of extraction. Each 8 × 8 unit block includes 16 2 × 2 small blocks, i.e., 16 bits of information can be embedded.
If x 'is x-1 and y' is y-1, x ', y' is e [0,511 ] in this example]And x ', y' belongs to Z, and the coordinate information x 'and y' can be stored by 9 bits. Let xi、yiI-th bit of 9-bit binary numbers, m, representing x ', y', respectivelyiThe ith bit of a 7-bit binary number representing | m |, the sign bit s being
Figure BDA0001603793050000047
cx1~cx3Is 1, s, m1~m3、x1~x9Binary string composed in sequence with respect to generator polynomial g (x) x3+x2+1 CRC check code, cy1~cy3Is 1, m1~m4、y1~y9The binary strings formed in sequence are related to the CRC check code of G (x). The check code is introduced to verify the correctness of the information during extractionIf the information is incorrect, then either abandoning recovery of the overflow pixel or other strategies to reduce the impact on the image may be employed. The information embedded in 2 unit blocks corresponding to each adjustment record is shown in fig. 3, and the information is sequentially embedded in the corresponding unit blocks by the low-distortion reversible watermarking algorithm in this arrangement.
5) And (3) circulating treatment overflow: and (4) circulating 2) to 4), namely rescanning, adjusting and embedding until no new overflow pixel can be found.
6) Embedding end identifier: the 4 unit blocks in the future are determined using the Torus map, and information that 16 bits are all 0 is embedded in each unit block as an identifier of the end.
7) And (3) detecting overflow: the image is again checked to ensure that no overflow pixels are contained (due to overflow introduced by the embedding terminator), and if this does not happen, the resolution of the overflow problem is successfully completed, otherwise a failure is declared. Usually, the probability of failure due to the eventual overflow is small, and can be solved by replacing the prime k value.
In recovery, the unit blocks are scanned one by one according to the same prime number k and the sequence generated by using the Torus mapping until the end identifier is identified, and then each unit block is extracted one by one from the back to the front. To prevent the image from being modified, the matching criteria may be relaxed slightly when identifying the end identifier. In the recovery process, whether the information in each unit block is correct can be judged according to the CRC so as to adopt some strategies.
The method can effectively solve the problem of pixel overflow in the image and the problem of new overflow generated when the adjustment information is embedded, is completely reversible and can be applied to various digital watermarking technologies including reversible digital watermarking.

Claims (1)

1. A reversible image digital watermark overflow solution is characterized by comprising the following steps:
1) generating prime numbers: generating a secret prime number k;
the method is suitable for 8-bit gray images with the size smaller than or equal to 512 multiplied by 512, the length and the width of the image are required to be multiples of 8, and the generated prime number is smaller than the total number of unit blocks of 8 multiplied by 8; numbering the blocks from left to right and from top to bottom in sequence from 1, setting the total number of the unit blocks as M, and requiring that k is less than M;
2) detecting and adjusting overflow and generating an adjustment record: scanning each pixel of the image in sequence, if the pixel is found to overflow, stopping scanning, adjusting the overflow pixel value to the nearest range boundary value, namely 0 or 255, and generating an adjustment record containing the coordinate and the adjustment value;
3) determining a unit block corresponding to an overflow pixel: determining any 2 8 x 8 blocks of the image, called unit blocks, according to the sequence and the prime number k of the current overflow pixel and the prime number k generated in the step 1) by using one-dimensional Torus mapping, and then determining the sequence numbers of the two unit blocks corresponding to the overflow pixel;
the sequence number N (i) of the ith unit block in which information is to be embedded, determined using one-dimensional Torus mapping, is
N(i)=(k×i)mod M+1
Therefore, the sequence numbers of the two unit blocks corresponding to the jth overflow record are N (2j-1) and N (2 j);
4) embedding adjustment records: embedding an adjustment record in two unit blocks corresponding to the overflow pixel determined in the step 3) by using a reversible watermarking algorithm, wherein the adjustment record comprises coordinate information, an adjustment value and a CRC (cyclic redundancy check) code of the overflow pixel;
5) and (3) circulating treatment overflow: looping steps 2) through 4) until no overflow pixel is found;
rescanning the image in a circulating mode, detecting overflowing pixels, adjusting and embedding until new overflowing pixels are not found any more, and completely solving inherent pixel overflow of the image and new overflow introduced by embedding adjustment records;
6) embedding end identifier: determining unit blocks corresponding to the next 4 sequence numbers by using the same prime number k and a Torus mapping formula, and embedding information with 16 bits of all 0 in each unit block by using a reversible watermark embedding algorithm to serve as an identifier for finishing embedding;
7) and (3) detecting overflow: detecting the image does not contain overflow pixels again, and finishing embedding;
the last time the full image is scanned, it is ensured that no overflow pixels are included, i.e. that no new overflow is introduced due to embedding the end identifier.
CN201810235415.5A 2018-03-21 2018-03-21 Reversible image digital watermark overflow solution method Active CN108492240B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810235415.5A CN108492240B (en) 2018-03-21 2018-03-21 Reversible image digital watermark overflow solution method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810235415.5A CN108492240B (en) 2018-03-21 2018-03-21 Reversible image digital watermark overflow solution method

Publications (2)

Publication Number Publication Date
CN108492240A CN108492240A (en) 2018-09-04
CN108492240B true CN108492240B (en) 2021-09-17

Family

ID=63318985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810235415.5A Active CN108492240B (en) 2018-03-21 2018-03-21 Reversible image digital watermark overflow solution method

Country Status (1)

Country Link
CN (1) CN108492240B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6249756B1 (en) * 1998-12-07 2001-06-19 Compaq Computer Corp. Hybrid flow control
CN102044061A (en) * 2010-12-20 2011-05-04 北京大学 Embedding method and extracting method of reversible watermarks
CN106570817A (en) * 2016-11-01 2017-04-19 西安电子科技大学 Geometric attack resistant robust and reversible watermarking method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8175324B2 (en) * 2008-10-17 2012-05-08 New Jersey Institute Of Technology Reversible data hiding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6249756B1 (en) * 1998-12-07 2001-06-19 Compaq Computer Corp. Hybrid flow control
CN102044061A (en) * 2010-12-20 2011-05-04 北京大学 Embedding method and extracting method of reversible watermarks
CN106570817A (en) * 2016-11-01 2017-04-19 西安电子科技大学 Geometric attack resistant robust and reversible watermarking method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Reversible semi-fragile watermarking based on histogram shifting of integer wavelet coefficients;X.Wu;《Inaugural IEEE-IES Digit. EcoSystem Technology Conference》;20070228;501–505 *
一种利用非下采样Contourlet变换的纹理检索方法;刘明霞等;《计算机应用》;20100101;第30卷(第1期);94-97 *
医学图像可逆数字水印防溢出处理研究;邓小鸿等;《计算机工程与应用》;20131201;第49卷(第23期);162-165 *
基于可逆可见水印的医学图像隐私保护算法;高海波等;《计算机应用》;20140110;第34卷(第1期);119-123+157 *

Also Published As

Publication number Publication date
CN108492240A (en) 2018-09-04

Similar Documents

Publication Publication Date Title
US7159118B2 (en) Methods and apparatus for embedding and recovering watermarking information based on host-matching codes
US7313248B2 (en) Steganographic image encoding
US7251343B2 (en) Image protection
US20160020900A1 (en) Message key generation
US20110052094A1 (en) Skew Correction for Scanned Japanese/English Document Images
US8275168B2 (en) Orientation free watermarking message decoding from document scans
US11070700B2 (en) Method of extracting watermark data in an image with reference to a noise-based image located in the image based on a comparison process performed in the frequency domain
EP2518685A1 (en) Method and apparatus for embedding a watermark image in a host image
US7499568B2 (en) Method, apparatus, and program for image processing capable of preventing, detecting and correcting image alteration, and a medium storing the program
KR101960290B1 (en) Method for embedding and extraction of watermarking data
CN113538197B (en) Watermark extraction method, watermark extraction device, storage medium and electronic equipment
Lee et al. Data hiding using multi-pixel difference expansion
CN111292219A (en) Method for realizing hidden watermark of picture image data
CN109840576A (en) The generation method and coding/decoding method of anti-copying two dimensional code based on segmentation insertion
US9239966B2 (en) Method and device for watermarking a sequence of images, method and device for authenticating a sequence of watermarked images and corresponding computer program
CN108492240B (en) Reversible image digital watermark overflow solution method
CN110148079B (en) Digital image tampering detection positioning and self-recovery method
Mathews et al. Histogram shifting based reversible data hiding using block division and pixel differences
Pan et al. A lossless watermarking scheme for halftone image authentication
CN114565500A (en) Reversible image authentication method and system based on prediction error expansion
CN109190741B (en) Secret information management method based on QR (quick response) code and terminal
CN111325650A (en) Reversible watermarking method
Wang et al. Color image of tamper detection and recovery using block-based watermarking
US7330560B2 (en) Insertion and extraction of a message in an image
CN113780028B (en) Verification method and device for novel three-dimensional code combined with picture

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