CN109191361A - Image Watermarking, extracting method and correlation technique - Google Patents

Image Watermarking, extracting method and correlation technique Download PDF

Info

Publication number
CN109191361A
CN109191361A CN201811058857.3A CN201811058857A CN109191361A CN 109191361 A CN109191361 A CN 109191361A CN 201811058857 A CN201811058857 A CN 201811058857A CN 109191361 A CN109191361 A CN 109191361A
Authority
CN
China
Prior art keywords
image
watermark
matrix
information
watermark information
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
CN201811058857.3A
Other languages
Chinese (zh)
Other versions
CN109191361B (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.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
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 Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN201811058857.3A priority Critical patent/CN109191361B/en
Publication of CN109191361A publication Critical patent/CN109191361A/en
Application granted granted Critical
Publication of CN109191361B publication Critical patent/CN109191361B/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/005Robust watermarking, e.g. average attack or collusion attack resistant

Landscapes

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

Abstract

The present invention relates to digital media content copyright protection technology field, a kind of Image Watermarking, image watermark extracting method and media contents copyright protection and method for tracing are specifically disclosed.Wherein, Image Watermarking includes encoding to original watermark information, to determine the watermarking images after coding;The Component Matrices of original image are obtained, and adaptive matrix piecemeal is carried out to Component Matrices;Discrete cosine transform is carried out to each matrix difference piecemeal, to determine the first transform coefficient matrix piecemeal;From each transform coefficient matrix piecemeal respectively in choose several coefficients pair, several bit informations in the watermarking images after coding are repeated to be embedded into several coefficient centerings;By several coefficients for being embedded in bit information to the processing such as position reset, inverse discrete cosine transformation, Component Matrices reset are carried out, to determine the image of insertion watermark.Watermark capacity, invisibility, robustness and algorithm security greatly improved in the present invention, further improves technical performance.

Description

Image watermark embedding method, image watermark extracting method and related method
Technical Field
The invention relates to the technical field of digital media content copyright protection, in particular to an image watermark embedding method, an image watermark extracting method and a media content copyright protection and tracking method.
Background
Today, as the network media content spreads and develops rapidly, people not only enjoy the internet and various digital media content products on mobile terminal devices to bring convenience to their lives, but also suffer from the problem of disordered copyright order caused by illegal copying, spreading and using of the digital media content products, and seriously damage the legal rights and interests of the digital media content product rights holders. Digital watermarking technology is a key technology mainly used for digital media content copyright protection, which is proposed and developed in recent years after encryption and decryption technology, wherein the research and development of image watermarking technology are the most extensive and intensive, and meanwhile, watermarking technology and other copyright protection technology and system aiming at media content such as text, audio, video and the like are also researched successively.
After development and exploration for two or three decades, digital image watermarking technologies can be divided into various featured watermarking technologies such as spatial domain watermarking and transform domain watermarking, first generation watermarking and second generation watermarking, processing attack resistant watermarking and geometric attack resistant watermarking, robust watermarking and fragile watermarking, non-blind watermarking and blind watermarking, bill anti-counterfeiting watermarking and copyright identification watermarking and the like from different dimensions. At present, the research of transform domain robust blind watermarking technology which particularly resists image processing attack and geometric attack is most concerned, and the application prospect is the most extensive.
The transformation domain watermark mainly depends on the common image processing and matrix transformation modes to map image data from a pixel domain to a transformation domain, and the watermark is embedded by pertinently modifying the transformation domain coefficient. Common image processing and matrix transformation methods include Discrete Fourier Transform (DFT), Discrete Cosine Transform (DCT), Discrete Wavelet Transform (DWT), Singular Value Decomposition (SVD), and the like. Therefore, researchers at home and abroad pay hard labor and obtain certain research results. At present, the watermarking algorithm for image processing attacks such as JPEG compression, noise addition, low-pass filtering and the like has a good effect, but an insurmountable gap still exists in the aspect of resisting geometric attacks in many methods; the existing algorithms are respectively characterized, have advantages and disadvantages and are difficult to refer and fuse with each other; meanwhile, the watermark extraction accuracy of the existing various watermark algorithms needs to be further improved.
In view of the above, the present invention is particularly proposed.
Disclosure of Invention
In view of the above problem, the present invention provides an image watermark embedding method, including: encoding the original watermark information to determine an encoded watermark image; acquiring a component matrix of an original image, and performing self-adaptive matrix blocking based on the number of blocks on the component matrix; performing discrete cosine transform on each matrix block to determine a first transform coefficient matrix block; respectively selecting at least one coefficient pair from each first transformation coefficient matrix block, and embedding the encoded watermark image into the coefficient pair; resetting the position of the coefficient pair of the embedded watermark image and performing inverse discrete cosine transform processing of the first transform coefficient matrix block to obtain a component matrix of the embedded watermark image; resetting the component matrix of the embedded watermark image to determine the image embedded with the watermark information.
In the preferred technical solution of the image watermark embedding method, the step of "encoding the original watermark information to determine the encoded watermark image" includes: performing first scrambling encryption on the original watermark information to determine watermark information after the first scrambling encryption; performing two-dimensional code encoding on the watermark information after the first scrambling encryption, and performing necessary scaling on an encoded image to determine an encoded two-dimensional code image; and carrying out second scrambling encryption on the encoded two-dimensional code image to determine an encoded watermark image.
In a preferred technical solution of the image watermark embedding method, the step of performing first scrambling encryption on the original watermark information to determine first scrambled and encrypted watermark information includes: using key keys1Generating an integer sequence with the same length as the original watermark information, wherein every two integers are different; adjusting the arrangement order of all characters in the original watermark information according to the integer size relationship in the integer sequence to obtain first scrambled and encrypted watermark information; alternatively, using a key2Generating an integer sequence with the same length as the original watermark information, wherein each integer falls between 1 and N, and N is an integer greater than 1; and carrying out exclusive OR on the binary representation of the ASCII code value of each character in the original watermark information and the binary representation of the ASCII code value of the integer at the corresponding position in the integer sequence, and taking the character corresponding to the calculated binary number as a replacement character at the position in the original watermark information so as to obtain the first scrambled and encrypted watermark information.
In a preferred technical solution of the image watermark embedding method, the step of performing second scrambling encryption on the encoded two-dimensional code image to determine the encoded watermark image includes: using key keys3Generating an integer matrix with the same size as the two-dimensional code image, wherein every two integers are different; according to the integer matrixThe positions of all pixels in the two-dimensional code image are adjusted according to the integer size relationship in the image to obtain a coded watermark image; alternatively, using a key4Generating a binary matrix with the same size as the two-dimensional code image; and carrying out binary exclusive OR on the two-dimensional code image and the value of the corresponding position in the binary matrix, and taking the decimal value corresponding to the binary number obtained by calculation as a replacement value on the position of the two-dimensional code image to obtain the encoded watermark image.
In a preferred embodiment of the image watermark embedding method, the step of "selecting at least one coefficient pair from each first transform coefficient matrix block, and embedding the encoded watermark image into the coefficient pair" includes: selecting m coefficient pairs from each first transform coefficient matrix block, and recording as ACm={(ac1,ac′1),(ac2,ac′2),...,(acm,ac′m) Where aciAnd aci' are two coefficients symmetric to the main diagonal near the top left corner of the matrix, ac without loss of generalityiAt the upper right side of the main diagonal, aci' is positioned at the lower left of the main diagonal line, i is 1,2, …, m is an integer which is more than or equal to 1; embedding at least 1bit watermark information into m coefficient pairs selected from the same first transformation coefficient matrix block according to the following embedding rule: let vi=||aci|-|aci' | | + Δ, Δ being a positive number, considered as the watermark embedding strength, i denotes the ith coefficient pair,
when bit is ═ 1':
when bit is ═ 0':
or,
when bit is ═ 1':
when bit is ═ 0':
on the other hand, the invention also provides an image watermark extraction method, which comprises the following steps: acquiring a component matrix of an image carrying watermark information, and performing adaptive matrix blocking based on the number of blocks on the component matrix, wherein the watermark information is embedded into the image by adopting the image watermark embedding method; performing discrete cosine transform on each matrix block to determine a second transform coefficient matrix block; respectively selecting at least one coefficient pair from each transformation coefficient matrix block, and extracting at least 1bit watermark information from the coefficient pairs; summarizing and analyzing the extracted watermark information to determine an encrypted watermark image; and decoding and identifying the encrypted watermark image to determine the finally extracted watermark information.
In the preferred technical solution of the above image watermark extraction method, the step of "selecting at least one coefficient pair from each of the transform coefficient matrix blocks, and extracting at least 1bit watermark information therefrom" includes: respectively selecting m coefficient pairs from each transformation coefficient matrix block, and recording the m coefficient pairs as BCm={(bc1,bc′1),(bc2,bc′2),...,(bcm,bc′m) In which bc isiAnd bci' are two coefficients symmetric to the main diagonal near the upper left corner of the matrix, without loss of generality and corresponding to the image watermark embedding method described above, bciAt the upper right side of the main diagonal, bci' is positioned at the lower left of the main diagonal line, i is 1,2, …, m is an integer which is more than or equal to 1; extracting m bits watermark information from m coefficient pairs of the matrix block, wherein the extraction rule is as follows:
or,
in a preferred technical solution of the image watermark extraction method, the step of performing summary analysis on the extracted watermark information to determine an encrypted watermark image includes: for mbits watermark information extracted from m coefficient pairs of the matrix block, determining at least 1bit watermark information corresponding to the matrix block according to the principle that a minority obeys majority; and arranging the watermark information determined by all the blocks into a two-dimensional matrix in sequence to determine an encrypted watermark image.
In a preferred technical solution of the image watermark extraction method, the step of "decoding and identifying the encrypted watermark image to determine the finally extracted watermark information" includes: performing reverse second scrambling encryption on the encrypted watermark image to determine a two-dimensional code image subjected to reverse second scrambling encryption, wherein a key and a method used by the reverse second scrambling encryption are the same as those used by the second scrambling encryption; scanning codes or recognizing software on the two-dimensional code image determined after the second scrambling encryption is performed, so as to determine a recognized character sequence; and performing reverse first scrambling encryption on the character sequence to determine the finally extracted watermark information, wherein the key and the method used by the reverse first scrambling encryption are the same as those used by the first scrambling encryption.
In another aspect, the present invention further provides a method for protecting and tracking media content copyright, where the method includes: acquiring copyright information of media content; by using the image watermark embedding method, the copyright information of the media content is encoded to determine an encoded watermark image, and the encoded watermark image is embedded into an image corresponding to the copyright information to realize copyright protection of the media content; by using the image watermark extraction method, the watermark image representing the copyright information is extracted from the image containing the copyright information, and the copyright information is decoded and identified from the watermark image representing the copyright information, so that the copyright tracking of the media content is realized.
In the preferred technical scheme of the invention, the original watermark information is subjected to first scrambling encryption and two-dimension code encoding, and the two-dimension code image is subjected to second scrambling encryption; then obtaining a component matrix of the original image, performing self-adaptive matrix blocking based on the number of blocks on the component matrix, and performing discrete cosine transform on each matrix block; watermark information is repeatedly embedded by selecting and adjusting values of a plurality of transformation coefficient pairs in pairs; and finally, resetting the transformation coefficient pair embedded with the watermark information, performing inverse discrete cosine transformation and other processing on the coefficient matrix, and determining the image embedded with the watermark information. The method provided by the embodiment of the invention combines the first scrambling encryption of the original watermark information based on the secret key and the second scrambling encryption of the two-dimensional code image, further improves the security of a watermark algorithm and a system, and weakens the risk that the watermark information is illegally identified and maliciously removed by a third party; meanwhile, the self-adaptive block partitioning strategy based on the number of the blocks and the selection and targeted modification of the transformation coefficient pair can further improve the capability of the algorithm for resisting various image processing attacks and geometric attacks, so that the watermark robustness is obviously improved. The problems of copyright protection, infringement tracking and the like of the image in the process of spreading and using are solved to a great extent. Meanwhile, the method for encoding the original watermark information can provide a good watermark encoding scheme for the watermark algorithms of texts, audio, video and other various media types.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention, are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention without limiting the invention to the right. It is obvious that the drawings in the following description are only some embodiments, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a flow diagram illustrating a watermark encoding and decoding identification method in accordance with an exemplary embodiment;
FIG. 2 is a flowchart illustrating an image watermark embedding method according to an exemplary embodiment;
FIG. 3 is a flowchart illustrating an image watermark extraction method according to an exemplary embodiment;
FIG. 4 illustrates a watermark sequence in an original string format, according to an example embodiment;
FIG. 5a illustrates an encoded two-dimensional code image according to an exemplary embodiment;
FIG. 5b illustrates an encoded watermark image in accordance with an exemplary embodiment;
FIG. 6a illustrates an image before embedding a watermark in accordance with an exemplary embodiment;
FIG. 6b illustrates an image after embedding a watermark in accordance with an exemplary embodiment;
FIG. 7a illustrates a watermarked image prior to an attack, according to an example embodiment;
FIG. 7b is a diagram illustrating JPEG compressed image with a quality factor of 80% for the watermarked image shown in FIG. 6b, in accordance with an illustrative embodiment;
FIG. 7c is a diagram illustrating the image of FIG. 6b after passing through Gauss noise with a mean of 0 and a variance of 0.001, according to an exemplary embodiment;
FIG. 7d is a diagram illustrating the image of FIG. 6b after being subjected to Salt & Pepper noise having an energy of 0.002, in accordance with an exemplary embodiment;
FIG. 7e is a diagram illustrating a 3 × 3 mean filter for the watermarked image shown in FIG. 6b, in accordance with an exemplary embodiment;
FIG. 7f is a diagram illustrating a 3 × 3 median filter for the watermarked image shown in FIG. 6b, in accordance with an exemplary embodiment;
FIG. 8a illustrates a two-dimensional code extracted from FIG. 7a, according to an example embodiment;
FIG. 8b illustrates a two-dimensional code extracted from FIG. 7b, according to an example embodiment;
FIG. 8c illustrates a two-dimensional code extracted from FIG. 7c, according to an example embodiment;
FIG. 8d illustrates a two-dimensional code extracted from FIG. 7d, according to an example embodiment;
FIG. 8e illustrates a two-dimensional code extracted from FIG. 7e, according to an example embodiment;
FIG. 8f illustrates a two-dimensional code extracted from FIG. 7f, according to an example embodiment;
FIG. 9a is a schematic diagram illustrating the image of FIG. 6b after being horizontally flipped, according to an exemplary embodiment;
FIG. 9b is a schematic diagram illustrating the image of FIG. 6b after being vertically flipped, according to an exemplary embodiment;
FIG. 9c is a schematic diagram illustrating the image of FIG. 6b after being scaled by a scaling factor of 50%, according to an exemplary embodiment;
FIG. 9d is a schematic view illustrating the image of FIG. 6b rotated 90 degrees counter-clockwise according to an exemplary embodiment;
FIG. 9e is a diagram illustrating the image of FIG. 6b being subjected to a scaling factor of 0.75 in accordance with an illustrative embodiment;
FIG. 9f is a schematic diagram illustrating the image of FIG. 6b after stretching to an aspect ratio of 0.8 × 1.5, in accordance with an exemplary embodiment;
FIG. 9g is a schematic illustration showing the image of FIG. 6b cropped by 10% of an area according to an exemplary embodiment;
FIG. 10a illustrates a two-dimensional code extracted from FIG. 9a, according to an example embodiment;
FIG. 10b illustrates a two-dimensional code extracted from FIG. 9b, according to an example embodiment;
FIG. 10c illustrates a two-dimensional code extracted from FIG. 9c, according to an example embodiment;
FIG. 10d illustrates a two-dimensional code extracted from FIG. 9d, according to an example embodiment;
FIG. 10e illustrates a two-dimensional code extracted from FIG. 9e, according to an example embodiment;
FIG. 10f illustrates a two-dimensional code extracted from FIG. 9f, according to an example embodiment;
fig. 10g illustrates a two-dimensional code extracted from fig. 9g according to an exemplary embodiment.
It should be noted that the drawings and the description are not intended to limit the scope of the inventive concept in any way, but to illustrate it by a person skilled in the art with reference to specific embodiments.
Detailed Description
The technical problems solved, the technical solutions adopted and the technical effects achieved by the embodiments of the present invention are clearly and completely described below with reference to the accompanying drawings and the specific embodiments. It is to be understood that the described embodiments are merely a few, and not all, of the embodiments of the present application. All other equivalent or obviously modified embodiments obtained by the person skilled in the art on the basis of the embodiments presented in the present application fall within the scope of protection of the invention without inventive step. The embodiments of the invention can be embodied in many different ways as defined and covered by the claims.
It should be noted that in the following description, numerous specific details are set forth in order to provide an understanding. It may be evident, however, that the subject invention may be practiced without these specific details.
Furthermore, it should be noted that, unless explicitly defined or conflicting, various embodiments of the present invention and technical features thereof may be combined with each other to form a technical solution.
Specifically, as shown in fig. 1, an embodiment of the present invention provides a watermark encoding and decoding identification method, where the method may include: step S100 to step S150.
Step S100: and performing first scrambling encryption on the original watermark information to determine the watermark information after the first scrambling encryption.
Specifically, step S100 may include: step S101 to step S102.
Step S101: using key keys1Generating an integer sequence with the same length as the original watermark information, wherein all integers are different pairwise; step S102: and adjusting the arrangement sequence of all characters in the original watermark information according to the integer size relationship in the integer sequence to obtain the first scrambled and encrypted watermark information.
For example: assuming that the original watermark information is abcdefgh and the length is 8, according to step S101, the key is used1Generating an integer sequence with the same length of 8, wherein integers in the sequence are different in pairs, assuming that the integer sequence is (3,2,5,4,1,8,6,7), correspondingly adjusting the arrangement order of 8 characters in the original watermark information abcdefgh by using the arrangement order of 8 integers in the integer sequence (3,2,5,4,1,8,6,7) according to step S102, so that the watermark information after the order adjustment becomes cbedahfg, that is, the first scrambling encryption of the original watermark information is completed.
Of course, step S100 may also include: step S101 'to step S102'.
Step S101': using key keys2Generating an integer sequence with the same length as the original watermark information, wherein each integer falls between 1 and N, and N is an integer greater than 1; step S102': and carrying out exclusive OR on each character in the original watermark information according to the binary representation of the ASCII code value of each character and the binary representation of the ASCII code value of the integer at the corresponding position in the integer sequence, and taking the character corresponding to the calculated binary number as a replacement character at the position in the original watermark information so as to obtain the first scrambled and encrypted watermark information.
For example: assuming that the original watermark information is abcdefgh and the length is 8, according to step S101', the key is used2Generating a sequence of integers of the same length of 8, each integer in the sequence being between 1 and 9 (assuming that N is 9 in step S101 '), assuming that the sequence of integers is (8,5,3,7,1,8,6,7), obtaining (97,98,99,100,101,102,103,104) an ASCII code value of each character in the original watermark information according to step S102 ', respectively, (01100001,01100010,01100011,01100100,01100101,01100110,01100111,01101000) a binary representation of each of the integers being (56,53,51,55,49,56,54,55), a binary representation of each of the digits being (00111000,00110101,00110011,00110111,00110001,00111000,00110110,00110111), xoring the two sets of binary sequences to obtain (01011001,01010111,01010000,01010011,01010100,01011110,01010001,01011111) an ASCII code value corresponding to (89,87,80,83,84,94,81,95), obtaining (Y, W, P, S, T, a, Q, a) a corresponding character of the encrypted wpst after the step S102 ', obtaining (wpst _, wpst, wpq _, wpst, and wpst, wpst, namely, the first scrambling encryption of the original watermark information is completed.
Step S110: and carrying out two-dimensional code encoding on the watermark information after the first scrambling encryption, and carrying out necessary scaling on the encoded image to determine the encoded two-dimensional code image. The two-dimensional code encoding method may adopt a general QR encoding method or other similar encoding methods, and if the size of the encoded two-dimensional code image is not K × K, the two-dimensional code image is scaled to a fixed size K × K.
Step S120: and carrying out second scrambling encryption on the encoded two-dimensional code image to determine an encoded watermark image.
Specifically, step S120 may include: step S121 to step S122.
Step S121: using key keys3Generating an integer matrix with the same size as the two-dimensional code image, wherein every two integers are different; step S122: and adjusting the positions of all pixels in the two-dimensional code image according to the integer size relation in the integer matrix to obtain the encoded watermark image.
For example: assuming that the two-dimensional code image has a size of 4 × 4, the pixel matrix of the two-dimensional code image isAccording to step S121, key is utilized3Generating an integer matrix of the same size 4 x 4, the integers in the integer matrix being different from each other by two, assuming that the generated integer matrix isAccording to step S122, the order of the pixels at 16 positions in the pixel matrix of the two-dimensional code image is adjusted by using the size relationship of the 16 integers in the integer matrix, and the pixel matrix of the two-dimensional code image after the order adjustment becomes the order of the pixels at 16 positions in the pixel matrix of the two-dimensional code imageNamely, the second scrambling encryption of the encoded two-dimensional code image is completed.
Of course, step S120 may also include: step S121 'to step S122'.
Step S121': using key keys4Generating a binary matrix with the same size as the two-dimensional code image; step S122': for two-dimensional code image and binary matrixAnd carrying out binary exclusive OR on the value of the corresponding position, and taking the decimal value corresponding to the binary number obtained by calculation as a replacement value on the position of the two-dimensional code image to obtain the encoded watermark image. Wherein, the value of each position in the binary matrix corresponds to the pixel value of the two-dimensional code image and is 0 or 255.
For example: assuming that the two-dimensional code image has a size of 4 × 4, the pixel matrix of the two-dimensional code image isAccording to step S121', with the Key4Generating a matrix of integers of the same size 4 x 4, each integer being 0 or 255, assuming that the generated matrix isAccording to step S122', the binary values of the 16 integers in the integer matrix are xored with the binary values of the pixel values at the corresponding positions in the pixel matrix, so that the pixel matrix of the encoded watermark image will become the pixel matrix of the encoded watermark imageNamely, the second scrambling encryption of the encoded two-dimensional code image is completed.
Step S130: and performing reverse second scrambling encryption on the encrypted watermark image to determine a two-dimensional code image subjected to reverse second scrambling encryption. The key and method used for the anti-second scrambling encryption are the same as those used for the second scrambling encryption in step S120.
For example, assuming that the size of the encrypted watermark image is 4 × 4, the pixel matrix of the encrypted watermark image isAccording to step 130, the same key as in step S121 is utilized3Generating an integer matrix of the same size 4 x 4, the integers in the integer matrix being different from each other by two, assuming that the generated integer matrix isAdjusting the arrangement sequence of the pixels at 16 positions in the pixel matrix of the encrypted watermark image by utilizing the size relation of the 16 integers in the integer matrix, wherein the pixel matrix of the two-dimensional code image after adjustment isI.e. the reverse second scrambling encryption is completed.
Alternatively, as another example, assuming that the size of the encrypted watermark image is 4 × 4, the pixel matrix of the encrypted watermark image isAccording to step 130, the same key as step S121' is used4Generating an integer matrix of the same size 4 x 4, each integer in the integer matrix being 0 or 255, assuming that the generated integer matrix isPerforming XOR between the binary values of the 16 integers in the integer matrix and the binary values of the pixel values at the corresponding positions in the pixel matrix of the encrypted watermark image, so that the pixel matrix of the two-dimensional code image after adjustment isI.e. the reverse second scrambling encryption is completed.
Step S140: and scanning the two-dimensional code image subjected to the reverse second scrambling encryption or identifying the two-dimensional code image by software to determine the identified character sequence. And identifying the character sequence represented by the two-dimensional code image through scanning of two-dimensional code scanning equipment or software development.
Step S150: and performing reverse first scrambling encryption on the character sequence to determine original watermark information. The key and method used for the anti-first scrambling encryption are the same as those used for the first scrambling encryption in step S110.
For example: assuming recognized character orderColumn is cbedahfg, length is 8, according to step S150, the same key as in step S101 is used1Generating an integer sequence with the same length of 8, wherein the integers in the sequence are different from each other, assuming that the integer sequence is (3,2,5,4,1,8,6,7), and as in step S102, using the arrangement order of 8 integers in the integer sequence (3,2,5,4,1,8,6,7) to correspondingly adjust the arrangement order of 8 characters in the character sequence cbedahfg, the decoded and recognized character sequence will become abcdefgh, that is, the original watermark information abcdefgh.
Or, for example, assuming that the recognized character sequence is YWPST ^ Q _, the length is 8, according to step S150, the same key as step S101' is used2Generating a sequence of integers of the same length of 8, each integer in the sequence being between 1 and 9 (assuming that N is 9 in step S101'), assuming that the sequence of integers is (8,5,3,7,1,8,6,7), each character in the identified sequence of characters having an ASCII code value of (89,87,80,83,84,94,81,95), the binary representation of which is (01011001,01010111,01010000,01010011,01010100,01011110,01010001,01011111), respectively, and the ASCII code value for each digit in the sequence of integers is (56,53,51,55,49,56,54,55), respectively, the binary representation is (00111000,00110101,00110011,00110111,00110001,00111000,00110110,00110111), the two groups of binary sequences are subjected to bitwise XOR to obtain (01100001,01100010,01100011,01100100,01100101,01100110,01100111,01101000), the corresponding ASCII code values are respectively (97,98,99,100,101,102,103 and 104), the corresponding characters are respectively (abcdefgh), the decoded recognized character sequence will become abcdefgh, i.e. the original watermark information abcdefgh, according to step S150.
In addition, an embodiment of the present invention further provides an image watermark embedding method, as shown in fig. 2, the method may include: step S200 to step S250.
Step S200: and encoding the original watermark information to determine an encoded watermark image. And (3) encoding the original watermark information by adopting the method from the step S100 to the step S120 so as to determine an encoded watermark image.
Step S210: and acquiring a component matrix of the original image, and performing self-adaptive matrix blocking based on the number of blocks on the component matrix. Wherein the component matrix can be a luminance (Y) component of the image, or a chrominance (U or V) component, or a color (R, G or B) component, and those skilled in the art can flexibly select any one or more component matrices as a carrier for embedding the watermark in practical application.
In addition, it should be noted that, unlike the method of fixing the block size in most of the block transform domain watermarking algorithms at present, the blocking method provided in the embodiment of the present invention is a method of fixing the total number of blocks and adaptively adjusting the block size. The conventional block transform method with a fixed block size has the problems that: the original images with different sizes are subjected to blocking with fixed blocking sizes, the total number of blocks is different, and at the moment, if the original images are subjected to scale scaling transformation and then subjected to blocking operation with fixed blocking sizes, the pixel distribution between the blocks is lost before and after the scale scaling, and the watermark extraction fails. The blocking method for fixing the total number of the blocks provided by the embodiment of the invention is to adaptively adjust the size of the blocks, so that the synchronous relation of pixel distribution can still be kept between the blocks after the original image is subjected to scale scaling conversion and blocking operation for fixing the total number of the blocks, scaling attack and attack of aspect ratio change can be well resisted, and the attack resistance is stronger. Assuming that the size of the component matrix is M × N and the size of the encoded watermark image is K × K, the total number of matrix blocks is determined to be K × K, and the size of each matrix block is K × KWhereinFor the lower rounding operation.
Step S220: and respectively performing discrete cosine transform on each matrix block to determine a first transform coefficient matrix block.
Step S230: and respectively selecting at least one coefficient pair from each first transformation coefficient matrix block, and embedding the encoded watermark image into the corresponding coefficient pair. Note that the watermark information in the encoded watermark image refers to a binary number of 0 or 1. Those skilled in the art can flexibly set the number of coefficient pairs selected from each first transform coefficient matrix block and the number of watermark information embedded into each first transform coefficient matrix block in practical application, for example, when the number of watermark information is the same as the number of matrix blocks, that is, each matrix block corresponds to 1-bit watermark information, 1-bit watermark information is embedded into each first transform coefficient matrix block, at least 1 coefficient pair is extracted from each first transform coefficient matrix block, of course, 2 coefficient pairs, 3 coefficient pairs, etc. may also be extracted, and the same 1-bit watermark information is embedded into the coefficient pairs selected from the same first transform coefficient matrix block; when the number of the watermark information is different from the number of the matrix blocks, if the number of the watermark information is 2 times of the number of the matrix blocks, that is, each matrix block corresponds to 2-bit watermark information, 2-bit watermark information is embedded into each first transform coefficient matrix block, at least 2 coefficient pairs are extracted from each first transform coefficient matrix block, 1-bit watermark information is embedded into 1 coefficient pair, of course, a plurality of coefficient pairs can also be extracted, the extracted plurality of coefficient pairs are divided into two groups, and the same 1-bit watermark information is embedded into each group of coefficient pairs.
Specifically, step S230 may include: step S231 to step S232.
Step S231: selecting m coefficient pairs as AC according to the transformation coefficient matrix of each blockm={(ac1,ac′1),(ac2,ac′2),...,(acm,ac′m) Where aciAnd aci' are two coefficients symmetric to the main diagonal near the top left corner of the matrix, ac without loss of generalityiAt the upper right side of the main diagonal, aci' is positioned at the lower left of the main diagonal line, i is 1,2, …, m is an integer which is more than or equal to 1; step S232: embedding at least 1bit watermark information into m coefficient pairs selected from the same first transformation coefficient matrix block, wherein the embedding rule is as follows:
let vi=||aci|-|aci' | | + Δ, Δ being a positive number, considered as the watermark embedding strength, i denotes the ith coefficient pair,
when bit is ═ 1':
when bit is ═ 0':
or,
when bit is ═ 1':
when bit is ═ 0':
for example: suppose a block of transform coefficients of a matrix ofAccording to step S231, 6 upper left coefficient pairs are selected for embedding watermark information, and the 6 coefficient pairs are { (270, -240), (-167, 235), (96, 128), (-124, 210), (-89, 97), (201, -132) }, assuming Δ ═ 10, according to formula vi=||aci|-|aci' | | + Δ is calculated as: v. of1=40,v2=78,v3=42,v4=96,v5=18,v6Assuming that the watermark information embedded in the coefficient matrix of the block is bit equal to '1', the coefficient pair after embedding the watermark information is calculated as { (270, -240), (-206,0), (1) according to the embedding rule of the first set of equations17,107), (-172,0), (-98,0), (201, -132) }, the transform coefficient matrix of the block into which the watermark information is embedded will become the transform coefficient matrix of the block into which the watermark information is embedded
Step S240: and resetting the position of the coefficient pair of the embedded watermark image and performing inverse discrete cosine transform processing of the first transform coefficient matrix block to obtain a component matrix of the embedded watermark image.
Step S250: resetting the component matrix of the embedded watermark image to determine the image in which the watermark information is embedded.
In addition, an embodiment of the present invention further provides an image watermark extraction method, as shown in fig. 3, the method may include: step S300 to step S340.
Step S300: and acquiring a component matrix of the image carrying the watermark information, and performing self-adaptive matrix blocking based on the number of blocks on the component matrix, wherein the watermark information is embedded into the image by adopting the image watermark embedding method. It should be noted that the component matrix of the acquired image is the component matrix adopted when the watermark information is embedded, and the number of blocks of the component matrix is the same as the number of blocks of the component matrix when the watermark information is embedded.
Step S310: and respectively performing discrete cosine transform on each matrix block to determine a second transform coefficient matrix block.
Step S320: and respectively selecting at least one coefficient pair from each second transformation coefficient matrix block, and extracting 1-bit watermark information from each coefficient pair. It should be noted that the number of coefficient pairs selected is the same as the number of coefficient pairs selected when embedding watermark information.
Specifically, step S320 may include: step S321 to step S322.
Step S321: aiming at the transformation coefficient matrix of each block, the selection position of the transformation coefficient matrix is the same as that of the watermark information embedding process, m coefficient pairs are selected and marked as BCm={(bc1,bc′1),(bc2,bc′2),...,(bcm,bc′m) In which bc isiAnd bci' are two coefficients symmetric to the main diagonal near the upper left corner of the matrix, without loss of generality and corresponding to the watermark embedding method, bciAt the upper right side of the main diagonal, bci' is positioned at the lower left of the main diagonal line, i is 1,2, …, m is an integer which is more than or equal to 1; step S322: extracting m bits watermark information from m coefficient pairs of the matrix block, wherein the m bits watermark information corresponds to an embedding rule in the watermark information embedding process, and the extraction rule is as follows:
or,
step S330: and summarizing and analyzing the extracted watermark information to determine an encrypted watermark image. And determining at least 1-bit watermark information corresponding to the matrix block according to a minority-compliant principle aiming at the m-bit watermark information extracted from the m coefficient pairs of the matrix block in the step S322. It is assumed that, if 1-bit watermark information is embedded in each matrix block, 1-bit watermark information corresponding to each matrix block may be determined, and if 2-bit watermark information is embedded in each matrix block, 2-bit watermark information corresponding to each matrix block may be determined, and so on, that the number of watermark information determined from each matrix block is the same as the number of watermark information embedded in each matrix block. And arranging the watermark information determined by all the matrix blocks into a two-dimensional matrix in sequence to determine an encrypted watermark image.
For example, assume a certain block transform coefficient matrix isAccording to step S321, 6 top-left coefficient pairs are selected for extracting watermark information, and then the 6 coefficient pairs are { (270, -240), (-206,0), (117,107), (-172,0), (-98,0), (201, -132) }, according to the extraction rule of the first set of formula of step S322, the watermark information embedded in the 6 coefficient pairs is (1,1,1, 1), respectively, and according to the principle that the minority obeys the majority, the watermark information corresponding to the partition is determined to be 1. The method can greatly improve the extraction accuracy of the watermark information.
Step S340: and decoding and identifying the encrypted watermark image to determine the finally extracted watermark information. And (4) decoding and identifying the extracted encrypted watermark image by adopting the methods from step (S130) to step (S150) to determine the finally extracted watermark information.
In addition, an embodiment of the present invention further provides a method for protecting and tracking media content copyright, where the method may include: step S400 to step S420.
Step S400: copyright information of media content is acquired.
Step S410: the image watermark embedding method from step S200 to step S250 is adopted to encode the copyright information of the media content to determine the encoded watermark image, and the encoded watermark image is embedded into the image corresponding to the copyright information to realize the copyright protection of the media content.
Step S420: by adopting the image watermark extraction method from step S300 to step S340, the watermark image representing the copyright information is extracted from the image containing the copyright information, and the copyright information is decoded and identified from the watermark image representing the copyright information, thereby realizing copyright tracking of the media content.
It should be noted that the watermark encoding method and the corresponding decoding and identifying method provided in the embodiments of the present invention can be applied to copyright protection and tracking of image media content based on watermarks, and can also be applied to copyright protection and tracking of various types of media content such as text, audio, video, and the like based on watermarks.
The following describes the image watermark embedding method (including the watermark encoding method) in detail with a preferred embodiment. The above-described method will be described in detail by taking fig. 4, 5a, 5b, 6a and 6b as examples.
Self-setting key1And key3. This embodiment employs a 32bytes string watermark sequence as shown in fig. 4. The watermark embedding is performed using an image shown in fig. 6a that is 512 wide and 512 high.
Step S501: using key keys1The watermark sequence in the original string format shown in fig. 4 is subjected to first scrambling encryption to determine a first scrambled watermark sequence.
Step S502: and performing two-dimensional code encoding on the first scrambled and encrypted watermark sequence to determine an encoded two-dimensional code image, wherein the size of the encoded two-dimensional code image is 64 × 64 as shown in fig. 5 a.
Step S503: using key keys3And performing second scrambling encryption on the encoded two-dimensional code image to determine an encoded watermark image, as shown in fig. 5 b.
Step S504: and acquiring a brightness component matrix of the original image, and performing self-adaptive matrix blocking based on the number of blocks on the brightness component matrix. The number of the adaptive blocks is 64 × 64, and the size of each block is calculated to be 8 × 8.
Step S505: each 8 x 8 matrix partition is separately subjected to a discrete cosine transform to determine a first transform coefficient matrix partition.
Step S506: and selecting 3 coefficient pairs of each transformation coefficient matrix block, and repeatedly embedding 1-bit information in the encoded watermark image. The 3 coefficient pairs are respectively (ac)0,1,ac1,0)、(ac0,2,ac2,0) And (ac)1,2,ac2,1). The watermark embedding strength delta is set to 20.
Step S507: and performing position resetting and inverse discrete cosine transform processing of the first transformation coefficient matrix block on the 3 coefficient pairs embedded with the bit information in each transformation coefficient matrix block to obtain a brightness component matrix embedded with the watermark.
Step S508: resetting the luminance component matrix after embedding the watermark to obtain the image with the embedded watermark, as shown in fig. 6 b.
It should be noted that the above assumptions and parameter settings are only for better illustration of the present invention, and should not be construed as limitations on the scope of the present invention.
The following describes the method for extracting image watermark (including watermark decoding and identification method) in detail with a preferred embodiment. The above-described method is explained in detail by taking fig. 7a to 7f, fig. 8a to 8f, fig. 9a to 9g, and fig. 10a to 10g as examples.
Setting key1And key3The same as the key value in the watermark embedding method. Watermark extraction is performed using the watermarked image having a width and height of 512 shown in fig. 7a to 7f and fig. 9a to 9g and the image after the attack, respectively.
Step S601: and acquiring an image brightness component matrix of the watermark to be extracted, and performing self-adaptive matrix blocking based on the number of blocks on the brightness component matrix. The total number of the blocks is set to be 64 multiplied by 64, the total number of the blocks is the same as the total number of the blocks set in the watermark embedding method, and the size of each block is calculated in a self-adaptive mode according to the size of the image of the watermark to be extracted.
Step S602: and respectively performing discrete cosine transform on each matrix block to determine a second transform coefficient matrix block.
Step S603: 3 coefficient pairs of each transformation coefficient matrix block are selected, and 3 watermark bit information is extracted from the coefficient pairs. The 3 coefficient pairs are respectively (bc)0,1,bc1,0)、(bc0,2,bc2,0) And (bc)1,2,bc2,1)。
Step S604: counting 3 watermark bit information extracted from each transformation coefficient matrix block, and determining the bit corresponding to the block according to the principle that a minority obeys majority; and arranging watermark bit bits extracted from all the transformation coefficient matrix blocks into a two-dimensional matrix in order to determine the extracted watermark image.
Step S605: using key keys3The extracted watermark image is subjected to reverse second scrambling encryption to determine a two-dimensional code image subjected to reverse second scrambling encryption, as shown in fig. 8a to 8f and fig. 10a to 10 g.
Step S606: and scanning the two-dimensional code image subjected to the reverse second scrambling encryption or identifying the two-dimensional code image by software to determine the identified character sequence.
Step S607: using key keys1And performing reverse first scrambling encryption on the character sequence to determine a watermark sequence in a character string format after decoding and identification.
It should be noted that the above assumptions and parameter settings are only for better illustration of the present invention, and should not be construed as limitations on the scope of the present invention.
By comparing the two images before and after embedding the watermark shown in fig. 6a and fig. 6b, the Peak Signal to Noise Ratio (PSNR) of the two images is calculated, and it can be known that the PSNR is 41.38dB, which indicates that the image containing the watermark generated by the embodiment of the present invention has no obvious visual difference from the original image, and the invisibility of the watermark is good. The PSNR calculation method comprises the following steps:wherein, I (I, j) represents the gray value of the pixel point with the coordinate (I, j) in the original image; i' (I, j) represents the gray value of a pixel point with the coordinate (I, j) in the image after the watermark is embedded; m and N represent the height and width of the image, respectively; max (I, j)) is the maximum value of the gray scale values of all pixels in the image, and is typically taken to be 255.
The watermark extraction method and the parameter setting are utilized to extract the watermark of the image shown in fig. 6b, and the comparison between the original watermark sequence and the extracted watermark sequence can show that the watermark can be completely and accurately extracted.
Here, the original watermark sequence W ═ W is calculated according to the following formula1,w2,…,wn]And the extracted watermark sequence W ═ W1',w2',…,wn']Error Rate (ER) between:wherein,n is the length of the watermark sequence.
Fig. 7b to 7f exemplarily show the watermark-included image shown in fig. 6b after image processing attack in the embodiment of the present invention. Wherein, FIG. 7b is the image after JPEG compression with the quality factor of 80%; FIG. 7c is an image after Gaussian noise with mean 0 and variance 0.001; FIG. 7d is an image after a Salt & Pepper noise with an energy of 0.002; FIG. 7e is a 3 × 3 mean filtered image; fig. 7f is a 3 × 3 median filtered image.
Performing watermark extraction on the attacked image by using the image watermark extraction method embodiment, wherein the obtained extracted two-dimensional code images are respectively shown in fig. 8b to 8 f; comparing the two-dimension code with the original two-dimension code watermark image, and calculating the Normalized Correlation (NC) value of the two as shown in the table I. The formula for calculating the NC value is shown as the following formula:wherein, W is an original two-dimension code watermark image, W' is an extracted two-dimension code watermark image, and K is the size of the two-dimension code watermark image.
Table one:
attack type FIG. 7b FIG. 7c FIG. 7d FIG. 7e FIG. 7f
NC 0.9897 0.9424 0.9648 0.9236 0.9600
The diagram number shown in the column of the attack type is the type of the attack on the diagram corresponding to the diagram number.
Fig. 9a to 9g exemplarily show the watercolor image shown in fig. 6b after geometric attack in the embodiment of the present invention. Wherein, fig. 9a is the image after horizontal turning; FIG. 9b is an image after vertical flipping; FIG. 9c is an image after being scaled (resize) by a scaling factor of 50%; FIG. 9d is an image after a 90 degree counterclockwise rotation; FIG. 9e is the image after scaling by a scaling factor of 0.75; FIG. 9f is an image after stretching with an aspect ratio of 0.8X 1.5; fig. 9g is an image after 10% area cut.
Performing watermark extraction on the attacked image by using the image watermark extraction method embodiment, and obtaining extracted two-dimensional code images as shown in fig. 10a to 10g respectively; comparing the two-dimension code with an original two-dimension code watermark image, and calculating the normalized correlation value (NC) of the two as shown in the second table:
the diagram number in the column of the attack type indicates the type of the attack on the diagram corresponding to the diagram number. The two-dimensional code images shown in fig. 10a, 10b, and 10d need to undergo corresponding inverse geometric transformation before the NC value can be calculated with the original two-dimensional code image.
For the description of the present embodiment, reference may be made to other embodiments, which are not described herein again.
Although the foregoing embodiments describe the steps in the above sequential order, those skilled in the art will understand that, in order to achieve the effect of the present embodiments, the steps may not be executed in such an order, and may be executed simultaneously (in parallel) or in an inverse order, and these simple variations are within the scope of the present invention.
The embodiment of the invention has large capacity, high security, high concealment and strong robustness, can resist common image processing attack and geometric attack, and can be applied to copyright protection and infringement tracking of digital images; the method can also be introduced into the digital video according to the idea, and is used for realizing frame-based video watermark embedding and extraction and copyright protection and infringement tracking of the digital video. Meanwhile, the watermark encoding and decoding identification method can be introduced into the watermark-based copyright protection and infringement tracking process of various media contents such as images, texts, audio/video and the like.
The technical solutions provided by the embodiments of the present invention are described in detail above. Although specific examples have been employed herein to illustrate the principles and practice of the invention, the foregoing descriptions of embodiments are merely provided to assist in understanding the principles of embodiments of the invention; also, it will be apparent to those skilled in the art that variations may be made in the embodiments and applications of the invention without departing from the spirit and scope of the invention.
It should be noted that the flowcharts or block diagrams referred to herein are not limited to the forms shown herein, and may be divided and/or combined.
It should be noted that the reference signs and characters in the drawings are only for the purpose of clearly illustrating the present invention and should not be construed as unduly limiting the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
The terms "comprises," "comprising," or any other similar term are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The steps of the present invention may be implemented in a general purpose computing device, which may be centralized in a single computing device, e.g., a personal computer, a server computer, a hand-held or portable device, a tablet or multi-processor device, or distributed across a network of multiple computing devices, and may be implemented by performing the steps shown or described in a different order than those shown or described herein, by separately fabricating each of the various steps or by fabricating each of the various blocks or steps within a single integrated circuit module. Thus, the present invention is not limited to any specific hardware or software or combination thereof.
The methods provided by the present invention may be implemented using programmable logic devices or as computer program software or program modules (including routines, programs, objects, components, data structures, etc.) including performing particular tasks or implementing particular abstract data types, such as a computer program product which is executed to cause a computer to perform the methods described herein. The computer program product includes a computer-readable storage medium having computer program logic or code portions embodied in the medium for performing the method. The computer-readable storage medium may be a built-in medium installed in the computer or a removable medium detachable from the computer main body (e.g., a storage device using a hot-plug technology). The built-in medium includes, but is not limited to, rewritable non-volatile memory such as: RAM, ROM, flash memory, and hard disk. The removable media include, but are not limited to: optical storage media (e.g., CD-ROMs and DVDs), magneto-optical storage media (e.g., MOs), magnetic storage media (e.g., magnetic tapes or removable disks), media with built-in rewritable non-volatile memory (e.g., memory cards), and media with built-in ROMs (e.g., ROM cartridges).
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention and are not intended to limit the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An image watermark embedding method, characterized in that the image watermark embedding method comprises:
encoding the original watermark information to determine an encoded watermark image;
acquiring a component matrix of an original image, and performing self-adaptive matrix blocking based on the number of blocks on the component matrix;
performing discrete cosine transform on each matrix block to determine a first transform coefficient matrix block;
respectively selecting at least one coefficient pair from each first transformation coefficient matrix block, and embedding the encoded watermark image into the corresponding coefficient pair;
resetting the position of the coefficient pair of the embedded watermark image and performing inverse discrete cosine transform processing of the first transform coefficient matrix block to obtain a component matrix of the embedded watermark image;
resetting the component matrix of the embedded watermark image to determine the image embedded with the watermark information.
2. The image watermark embedding method according to claim 1, wherein the step of encoding the original watermark information to determine the encoded watermark image comprises:
performing first scrambling encryption on the original watermark information to determine watermark information after the first scrambling encryption;
performing two-dimensional code encoding on the watermark information after the first scrambling encryption, and performing necessary scaling on an encoded image to determine an encoded two-dimensional code image;
and carrying out second scrambling encryption on the encoded two-dimensional code image to determine an encoded watermark image.
3. The image watermark embedding method according to claim 2, wherein the step of performing first scrambling encryption on the original watermark information to determine first scrambled encrypted watermark information includes:
using key keys1Generating an integer sequence with the same length as the original watermark information, wherein every two integers are different;
adjusting the arrangement order of all characters in the original watermark information according to the integer size relationship in the integer sequence to obtain first scrambled and encrypted watermark information;
or,
using key keys2Generating an integer sequence with the same length as the original watermark information, wherein each integer falls between 1 and N, and N is an integer greater than 1;
and carrying out exclusive OR on the binary representation of the ASCII code value of each character in the original watermark information and the binary representation of the ASCII code value of the integer at the corresponding position in the integer sequence, and taking the character corresponding to the calculated binary number as a replacement character at the position in the original watermark information so as to obtain the first scrambled and encrypted watermark information.
4. The image watermark embedding method according to claim 3, wherein the step of performing second scrambling encryption on the encoded two-dimensional code image to determine the encoded watermark image comprises:
using key keys3Generating an integer matrix with the same size as the two-dimensional code image, wherein every two integers are different;
adjusting the positions of all pixels in the two-dimensional code image according to the integer size relationship in the integer matrix to obtain an encoded watermark image;
or,
using key keys4Generating a binary matrix with the same size as the two-dimensional code image;
and carrying out binary exclusive OR on the two-dimensional code image and the value of the corresponding position in the binary matrix, and taking the decimal value corresponding to the binary number obtained by calculation as a replacement value on the position of the two-dimensional code image to obtain the encoded watermark image.
5. The image watermark embedding method according to claim 4, wherein the step of "selecting at least one coefficient pair from each of the first transform coefficient matrix blocks, respectively, and embedding the encoded watermark image into the corresponding coefficient pair" comprises:
selecting m coefficient pairs from each first transform coefficient matrix block, and recording as ACm={(ac1,ac′1),(ac2,ac′2),...,(acm,ac′m) Where aciAnd aci' are two coefficients symmetric to the main diagonal near the top left corner of the matrix, ac without loss of generalityiAt the upper right side of the main diagonal, aci' is positioned at the lower left of the main diagonal line, i is 1,2, …, m is an integer which is more than or equal to 1;
embedding at least 1bit watermark information into m coefficient pairs selected from the same first transformation coefficient matrix block according to the following embedding rule:
let vi=||aci|-|aci' | | + Δ, Δ being a positive number, considered as the watermark embedding strength, i denotes the ith coefficient pair,
when bit is ═ 1':
when bit is ═ 0':
or,
when bit is ═ 1':
when bit is ═ 0':
6. an image watermark extraction method, characterized in that the image watermark extraction method comprises:
acquiring a component matrix of an image carrying watermark information, and performing adaptive matrix blocking based on the number of blocks on the component matrix, wherein the watermark information is embedded into the image by adopting the image watermark embedding method of claim 5;
performing discrete cosine transform on each matrix block to determine a second transform coefficient matrix block;
respectively selecting at least one coefficient pair from each second transformation coefficient matrix block, and extracting 1-bit watermark information from each coefficient pair;
summarizing and analyzing the extracted watermark information to determine an encrypted watermark image;
and decoding and identifying the encrypted watermark image to determine the finally extracted watermark information.
7. The method as claimed in claim 6, wherein the step of selecting at least one coefficient pair from each transform coefficient matrix partition and extracting 1-bit watermark information from each coefficient pair comprises:
respectively selecting m coefficient pairs from each transformation coefficient matrix block, and recording the m coefficient pairs as BCm={(bc1,bc′1),(bc2,bc′2),...,(bcm,bc′m) In which bc isiAnd bci' are two coefficients symmetric to the main diagonal near the upper left corner of the matrix, without loss of generality and corresponding to the image watermark embedding method, bciAt the upper right side of the main diagonal, bci' is positioned at the lower left of the main diagonal line, i is 1,2, …, m is an integer which is more than or equal to 1;
extracting m bits watermark information from m coefficient pairs of the matrix block, wherein the extraction rule is as follows:
or,
the extraction rule corresponds to the embedding rule.
8. The image watermark extraction method according to claim 7, wherein the step of performing a summary analysis on the extracted watermark information to determine an encrypted watermark image includes:
for m bits of watermark information extracted from m coefficient pairs of the matrix block, determining at least 1bit of watermark information corresponding to the matrix block according to the principle that a minority obeys a majority;
and arranging the watermark information determined by all the matrix blocks into a two-dimensional matrix in sequence to determine an encrypted watermark image.
9. The image watermark extraction method according to claim 8, wherein the step of decoding and identifying the encrypted watermark image to determine the finally extracted watermark information includes:
performing reverse second scrambling encryption on the encrypted watermark image to determine a two-dimensional code image subjected to reverse second scrambling encryption, wherein a key and a method used by the reverse second scrambling encryption are the same as those used by the second scrambling encryption;
scanning codes or recognizing software on the two-dimensional code image determined after the second scrambling encryption is performed, so as to determine a recognized character sequence;
and performing reverse first scrambling encryption on the character sequence to determine the finally extracted watermark information, wherein the key and the method used by the reverse first scrambling encryption are the same as those used by the first scrambling encryption.
10. A media content copyright protection and tracking method is characterized in that the media content copyright protection and tracking method comprises the following steps:
acquiring copyright information of media content;
encoding copyright information of the media content by using the image watermark embedding method of any one of claims 1 to 5 to determine an encoded watermark image, and embedding the encoded watermark image into an image corresponding to the copyright information to realize copyright protection of the media content;
the image watermark extraction method of any one of claims 6 to 9 is used for extracting the watermark image representing the copyright information from the image containing the copyright information, decoding and identifying the copyright information from the watermark image representing the copyright information, and realizing copyright tracking of the media content.
CN201811058857.3A 2018-09-11 2018-09-11 Image watermark embedding method, image watermark extracting method and related method Active CN109191361B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811058857.3A CN109191361B (en) 2018-09-11 2018-09-11 Image watermark embedding method, image watermark extracting method and related method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811058857.3A CN109191361B (en) 2018-09-11 2018-09-11 Image watermark embedding method, image watermark extracting method and related method

Publications (2)

Publication Number Publication Date
CN109191361A true CN109191361A (en) 2019-01-11
CN109191361B CN109191361B (en) 2020-05-19

Family

ID=64910511

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811058857.3A Active CN109191361B (en) 2018-09-11 2018-09-11 Image watermark embedding method, image watermark extracting method and related method

Country Status (1)

Country Link
CN (1) CN109191361B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109840875A (en) * 2019-03-06 2019-06-04 深圳市金天速科技有限公司 A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium
CN110362971A (en) * 2019-06-11 2019-10-22 杭州电子科技大学 A kind of screen watermark display methods of content-adaptive
CN110580405A (en) * 2019-08-16 2019-12-17 湖北工业大学 Picture copyright protection system and method based on social network
CN111652789A (en) * 2020-06-05 2020-09-11 北京信息科技大学 Color image embedding method and color image extracting method
CN111654592A (en) * 2020-06-05 2020-09-11 中国矿业大学 Multi-image hiding method based on secret sharing
CN113012016A (en) * 2021-03-25 2021-06-22 北京有竹居网络技术有限公司 Watermark embedding method, device, equipment and storage medium
CN113515727A (en) * 2019-05-13 2021-10-19 创新先进技术有限公司 Picture processing method and device based on block chain
CN115239605A (en) * 2022-05-27 2022-10-25 南京文深信息技术有限公司 Anti-printing scanning method for text image based on pixel invariance
CN117649330A (en) * 2024-01-30 2024-03-05 中汽数据(天津)有限公司 Watermarking method for color image steganographic carbon identification bar code
CN118095316A (en) * 2024-04-23 2024-05-28 四川数盾科技有限公司 Anti-copying watermark two-dimensional code generation, extraction and verification method and system
CN118379177A (en) * 2024-05-08 2024-07-23 北京国隐科技有限公司 Image watermark information processing and extracting method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160049153A1 (en) * 2014-08-12 2016-02-18 Tata Consultancy Services Ltd. Computer Implemented System for Audio Watermarking
CN105931174A (en) * 2016-04-12 2016-09-07 上海理工大学 High-robustness digital watermarking method making color QR code embedded in color image
CN106097237A (en) * 2016-05-25 2016-11-09 中国科学院自动化研究所 The embedding grammar of image watermark and extracting method and associated method
CN106373081A (en) * 2016-08-31 2017-02-01 南京师范大学 Remote-sensing image digital watermarking embedding and extraction method based on QR codes
CN106646595A (en) * 2016-10-09 2017-05-10 电子科技大学 Earthquake data compression method based on tensor adaptive rank truncation
CN107180616A (en) * 2016-03-11 2017-09-19 青岛海信电器股份有限公司 A kind of method for eliminating display device Mura, elimination display device Mura devices and display device
CN108449527A (en) * 2018-03-28 2018-08-24 南京吉印信息科技有限公司 A kind of digital watermark method and system for taking the photograph attack for the anti-screen of remote sensing images

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160049153A1 (en) * 2014-08-12 2016-02-18 Tata Consultancy Services Ltd. Computer Implemented System for Audio Watermarking
CN107180616A (en) * 2016-03-11 2017-09-19 青岛海信电器股份有限公司 A kind of method for eliminating display device Mura, elimination display device Mura devices and display device
CN105931174A (en) * 2016-04-12 2016-09-07 上海理工大学 High-robustness digital watermarking method making color QR code embedded in color image
CN106097237A (en) * 2016-05-25 2016-11-09 中国科学院自动化研究所 The embedding grammar of image watermark and extracting method and associated method
CN106373081A (en) * 2016-08-31 2017-02-01 南京师范大学 Remote-sensing image digital watermarking embedding and extraction method based on QR codes
CN106646595A (en) * 2016-10-09 2017-05-10 电子科技大学 Earthquake data compression method based on tensor adaptive rank truncation
CN108449527A (en) * 2018-03-28 2018-08-24 南京吉印信息科技有限公司 A kind of digital watermark method and system for taking the photograph attack for the anti-screen of remote sensing images

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
叶闯 等: "基于人类视觉特性(HVS)的离散小波变换(DWT)数字水印算法", 《浙江大学学报(理学版)》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109840875A (en) * 2019-03-06 2019-06-04 深圳市金天速科技有限公司 A kind of anti-counterfei waterprint generation method, device, electronic equipment and storage medium
CN113515727A (en) * 2019-05-13 2021-10-19 创新先进技术有限公司 Picture processing method and device based on block chain
CN113515727B (en) * 2019-05-13 2024-05-07 创新先进技术有限公司 Picture processing method and device based on block chain
CN110362971A (en) * 2019-06-11 2019-10-22 杭州电子科技大学 A kind of screen watermark display methods of content-adaptive
CN110580405B (en) * 2019-08-16 2022-07-05 湖北工业大学 Picture copyright protection system and method based on social network
CN110580405A (en) * 2019-08-16 2019-12-17 湖北工业大学 Picture copyright protection system and method based on social network
CN111654592A (en) * 2020-06-05 2020-09-11 中国矿业大学 Multi-image hiding method based on secret sharing
CN111654592B (en) * 2020-06-05 2022-02-25 中国矿业大学 Multi-image hiding method based on secret sharing
CN111652789A (en) * 2020-06-05 2020-09-11 北京信息科技大学 Color image embedding method and color image extracting method
CN111652789B (en) * 2020-06-05 2023-10-24 北京信息科技大学 Big data-oriented color image watermark embedding and extracting method
CN113012016A (en) * 2021-03-25 2021-06-22 北京有竹居网络技术有限公司 Watermark embedding method, device, equipment and storage medium
CN115239605A (en) * 2022-05-27 2022-10-25 南京文深信息技术有限公司 Anti-printing scanning method for text image based on pixel invariance
CN117649330A (en) * 2024-01-30 2024-03-05 中汽数据(天津)有限公司 Watermarking method for color image steganographic carbon identification bar code
CN118095316A (en) * 2024-04-23 2024-05-28 四川数盾科技有限公司 Anti-copying watermark two-dimensional code generation, extraction and verification method and system
CN118095316B (en) * 2024-04-23 2024-07-19 四川数盾科技有限公司 Anti-copying watermark two-dimensional code generation, extraction and verification method and system
CN118379177A (en) * 2024-05-08 2024-07-23 北京国隐科技有限公司 Image watermark information processing and extracting method and device

Also Published As

Publication number Publication date
CN109191361B (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN109191361B (en) Image watermark embedding method, image watermark extracting method and related method
CN110084733B (en) Text image watermark embedding method and system and text image watermark extracting method and system
Mandal et al. Digital image steganography: A literature survey
Wan et al. A comprehensive survey on robust image watermarking
Ernawan et al. An improved image watermarking by modifying selected DWT-DCT coefficients
Haghighi et al. TRLH: Fragile and blind dual watermarking for image tamper detection and self-recovery based on lifting wavelet transform and halftoning technique
Tao et al. Robust image watermarking theories and techniques: A review
CN109300078B (en) Image spread spectrum watermark embedding method with self-adaptive embedding strength
Daraee et al. Watermarking in binary document images using fractal codes
Alomoush et al. Digital image watermarking using discrete cosine transformation based linear modulation
Kiani et al. A multi-purpose digital image watermarking using fractal block coding
Naveed et al. PERFORMANCE EVALUATION AND WATERMARK SECURITY ASSESSMENT OF DIGITAL WATERMARKING TECHNIQUES.
Kannan et al. An extensive research on robust digital image watermarking techniques: A review
Sajeer et al. Recent advances in transform and hybrid domain digital watermarking techniques—a survey
Xia et al. Improved PHARM for JPEG steganalysis: Making PHARM more efficient and effective
Som et al. A DWT-based digital watermarking scheme for image tamper detection, localization, and restoration
Narkedamilly et al. Discrete multiwavelet–based video watermarking scheme using SURF
Tseng et al. Data hiding for binary images using weight mechanism
Huang et al. A robust watermarking technique for copyright protection using discrete wavelet transform
Cauvery Water marking on digital image using genetic algorithm
Yasmeen et al. A novel watermarking scheme based on discrete wavelet transform‐singular value decomposition
Datta et al. Data authentication using digital watermarking
Yasmeen et al. An efficient image steganography approach based on QR factorization and singular value decomposition in non‐subsampled contourlet transform domain
Venugopala et al. Evaluation of video watermarking algorithms on mobile device
CN110648271A (en) Method for embedding digital watermark in halftone image by using special dots

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