CN113628092A - Watermark embedding method and component, watermark authentication method and component - Google Patents

Watermark embedding method and component, watermark authentication method and component Download PDF

Info

Publication number
CN113628092A
CN113628092A CN202111178891.6A CN202111178891A CN113628092A CN 113628092 A CN113628092 A CN 113628092A CN 202111178891 A CN202111178891 A CN 202111178891A CN 113628092 A CN113628092 A CN 113628092A
Authority
CN
China
Prior art keywords
quantum
watermark
target image
data
target
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
CN202111178891.6A
Other languages
Chinese (zh)
Other versions
CN113628092B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111178891.6A priority Critical patent/CN113628092B/en
Publication of CN113628092A publication Critical patent/CN113628092A/en
Application granted granted Critical
Publication of CN113628092B publication Critical patent/CN113628092B/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
    • G06T1/0042Fragile watermarking, e.g. so as to detect tampering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0051Embedding of the watermark in the spatial domain
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2201/00General purpose image data processing
    • G06T2201/005Image watermarking
    • G06T2201/0065Extraction of an embedded watermark; Reliable detection

Abstract

The application discloses a watermark embedding method and component, and a watermark authentication method and component. The watermark embedding method disclosed by the application can load the space domain quantum information of the watermark to the frequency domain of the image quantum data, and carries out quantum inverse Fourier transform on the quantum data loaded with the watermark space domain quantum information, so that the watermark space domain quantum information is scattered in the space domain of the image quantum data, the uniform distribution of the watermark information in the quantum image is realized, and the tamper resistance of the image data and the concealment of the watermark information are improved. Correspondingly, the watermark embedding component, the watermark authentication method and the watermark embedding component also have the technical effects.

Description

Watermark embedding method and component, watermark authentication method and component
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a watermark embedding method and component, and a watermark authentication method and component.
Background
At present, image data can be watermarked based on a quantum information technique, thereby protecting the image data from being tampered. However, the existing watermark adding mode depends heavily on pseudo random numbers, and the pseudo random numbers are difficult to ensure the uniform distribution of watermark information in quantum images, so that the watermark information is easy to be identified by naked eyes or simple detection technology, and the tamper resistance of image data and the concealment of the watermark information are reduced.
Therefore, how to improve the tamper resistance of image data and the concealment of watermark information is a problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a watermark embedding method and component, and a watermark authentication method and component, so as to improve the tamper resistance of image data and the concealment of watermark information. The specific scheme is as follows:
in a first aspect, the present application provides a watermark embedding method, including:
acquiring a target image;
converting the target image into target quantum data, and performing quantum Fourier transform on the target quantum data to obtain a frequency domain representation result of the target quantum data;
embedding spatial domain quantum information of a preset watermark into the frequency domain representation result to obtain superposed quantum data;
and carrying out quantum inverse Fourier transform on the superposed quantum data to obtain a target image embedded with the preset watermark.
Preferably, the converting the target image into target quantum data includes:
the target image is converted into target quantum data using NEQR encoding.
Preferably, the converting the target image into target quantum data using NEQR coding includes:
converting the target image into target quantum data with NEQR coding according to a first formula;
wherein the first formula is:
Figure 903368DEST_PATH_IMAGE001
wherein, | P>Representing the target quantum data;mRepresenting a number of pixels corresponding to a width of the target image;nrepresenting the number of pixels corresponding to the length of the target image; non-viable cellsC x,y >Indicating the position at a coordinate point (x,y) Color information of the target image; i X>Represents the quantum bit, | Y, corresponding to the coordinate value x>Representing a quantum bit corresponding to the coordinate value y;
Figure 482641DEST_PATH_IMAGE002
is a direct product operator.
Preferably, the code length of the color information of the target image is determined according to a value of a preset parameter.
Preferably, the performing a quantum fourier transform on the target quantum data includes:
performing a quantum fourier transform on each quantum bit in the target quantum data according to a second formula;
wherein the second formula is:
Figure 891626DEST_PATH_IMAGE003
therein,. mu.gk>A qubit representing any position in the target quantum data,ktaking a value for the position; non-viable cellsj>Representing the frequency domain representation of the qubits for all positions in the target quantum data by a quantum Fourier transformjA qubit at a location;Nis the total number of bits of the target image;eis the base of the natural logarithm;iin imaginary units of complex numbers.
Preferably, the embedding the spatial domain quantum information of the preset watermark into the frequency domain representation result to obtain the superposition quantum data includes:
embedding the space domain quantum information into the frequency domain representation result according to a third formula to obtain the superposition quantum data;
wherein the third formula is:
Figure 461410DEST_PATH_IMAGE004
therein,. mu.gj’>Representing in said superimposed quantum dataj’A qubit at a location; non-viable cellsj>Representing the frequency domain representation of the qubits for all positions in the target quantum data by a quantum Fourier transformjA qubit at a location;W x,y >for the coordinate point in the preset watermark (x,y) Spatial domain quantum information of (2);αis the embedding strength factor.
Preferably, the performing quantum inverse fourier transform on the stacked quantum data to obtain the target image embedded with the preset watermark includes:
performing quantum inverse Fourier transform on the superposed quantum data according to a fourth formula to obtain a target image embedded with the preset watermark;
wherein the fourth formula is:
Figure 20567DEST_PATH_IMAGE005
therein,. mu.gp’>A qubit representing any position in the target image in which the preset watermark is embedded,p' is a position value;Nis the total number of bits of the target image;eis the base of the natural logarithm;iimaginary unit of complex number; non-viable cellsj’>Representing in said superimposed quantum dataj’Qubits at the positions.
In a second aspect, the present application provides a watermark authentication method, including:
acquiring a target image embedded with a preset watermark; the target image embedded with the preset watermark is obtained according to any one of the methods;
converting the target image embedded with the preset watermark into first quantum data, and performing quantum inverse Fourier transform and watermark removal on the first quantum data to obtain second quantum data of the target image not embedded with the preset watermark;
determining difference quantum information between the first quantum data and the second quantum data;
and if the similarity of the difference quantum information and the spatial domain quantum information of the preset watermark exceeds a preset threshold value, determining that the target image embedded with the preset watermark is not tampered.
Preferably, the determining the difference quantum information between the first quantum data and the second quantum data comprises:
determining the difference quantum information according to a fifth formula;
wherein the fifth formula is:
Figure 857942DEST_PATH_IMAGE006
therein,. mu.gM x,y >Representing a coordinate point located in the differential quantum information (x,y) A qubit of (a);ma number of pixels representing a width correspondence of the target image;nthe number of pixels corresponding to the length of the target image;P x,y representing a coordinate point located in the second quantum data (x,y) A qubit of (a);P’ x,y representing a coordinate point located in the second quantum data (x,y) A qubit of (a);αis the embedding strength coefficient; i X>Represents the quantum bit, | Y, corresponding to the coordinate value x>Representing a quantum bit corresponding to the coordinate value y;
Figure 345817DEST_PATH_IMAGE007
is a direct product operator.
Preferably, if the similarity between the difference quantum information and the spatial domain quantum information of the preset watermark exceeds a preset threshold, determining that the target image embedded with the preset watermark is not tampered, including:
calculating the similarity of the difference quantum information and the airspace quantum information for multiple times, and determining the average value of all the similarities;
and if the average value exceeds the preset threshold value, determining that the target image embedded with the preset watermark is not tampered.
In a third aspect, the present application provides a watermark embedding apparatus, including:
the first acquisition module is used for acquiring a target image;
the transformation module is used for converting the target image into target quantum data and carrying out quantum Fourier transformation on the target quantum data to obtain a frequency domain representation result of the target quantum data;
the embedding module is used for embedding the spatial domain quantum information of the preset watermark into the frequency domain representation result to obtain superposed quantum data;
and the first inverse transformation module is used for carrying out quantum inverse Fourier transformation on the superposed quantum data to obtain the target image embedded with the preset watermark.
In a fourth aspect, the present application provides a watermark authentication apparatus, including:
the second acquisition module is used for acquiring the target image embedded with the preset watermark; the target image embedded with the preset watermark is obtained according to any one of the methods;
the second inverse transformation module is used for converting the target image embedded with the preset watermark into first quantum data, and performing quantum inverse Fourier transform and watermark removal on the first quantum data to obtain second quantum data of the target image not embedded with the preset watermark;
a determination module to determine difference quantum information between the first quantum data and the second quantum data;
and the authentication module is used for determining that the target image embedded with the preset watermark is not tampered if the similarity between the difference quantum information and the spatial domain quantum information of the preset watermark exceeds a preset threshold value.
In a fifth aspect, the present application provides a computer device comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the method of the preceding disclosure.
In a sixth aspect, the present application provides a readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the method of the preceding disclosure.
According to the above scheme, the present application provides a watermark embedding method, including: acquiring a target image; converting the target image into target quantum data, and performing quantum Fourier transform on the target quantum data to obtain a frequency domain representation result of the target quantum data; embedding spatial domain quantum information of a preset watermark into a frequency domain representation result to obtain superposed quantum data; and carrying out quantum inverse Fourier transform on the superimposed quantum data to obtain a target image embedded with a preset watermark.
Therefore, after the target image is obtained, the target image is converted into the target quantum data, quantum Fourier transform is performed on the target quantum data, so that a frequency domain representation result of the target quantum data is obtained, then the spatial domain quantum information of the preset watermark is embedded into the frequency domain representation result, so that the superposed quantum data is obtained, and finally quantum inverse Fourier transform is performed on the superposed quantum data, so that the target image embedded with the preset watermark is obtained. The scheme can load the spatial domain quantum information of the watermark to the frequency domain of the image quantum data, and carry out quantum inverse Fourier transform on the quantum data loaded with the spatial domain quantum information of the watermark, so that the spatial domain quantum information of the watermark is scattered in the spatial domain of the image quantum data, the uniform distribution of the watermark information in the quantum image is realized, and the tamper resistance of the image data and the concealment of the watermark information are improved.
Correspondingly, the watermark embedding method and the watermark embedding assembly, and the watermark authentication method and the watermark authentication assembly also have the technical effects. The assembly comprises: an apparatus, a device and a readable storage medium.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a watermark embedding method disclosed in the present application;
fig. 2 is a flowchart of a watermark authentication method disclosed in the present application;
fig. 3 is a schematic diagram of a watermark embedding apparatus disclosed in the present application;
fig. 4 is a schematic diagram of a watermark authentication apparatus disclosed in the present application;
FIG. 5 is a schematic diagram of a computer apparatus disclosed herein;
fig. 6 is a flowchart of another watermark embedding method disclosed in the present application;
fig. 7 is a flowchart of another watermark authentication method disclosed in the present application;
FIG. 8 is a schematic illustration of the SWAP principle disclosed herein.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, image data can be watermarked based on a quantum information technique, thereby protecting the image data from being tampered. However, the existing watermark adding mode depends heavily on pseudo random numbers, and the pseudo random numbers are difficult to ensure the uniform distribution of watermark information in quantum images, so that the watermark information is easy to be identified by naked eyes or simple detection technology, and the tamper resistance of image data and the concealment of the watermark information are reduced. Therefore, the application provides a watermark embedding and corresponding authentication scheme, which can improve the tamper resistance of image data and the concealment of watermark information.
Referring to fig. 1, an embodiment of the present application discloses a watermark embedding method, including:
and S101, acquiring a target image.
In the present embodiment, the target image is any image that can be represented in a temporal domain or a spatial domain, including video, pictures, and the like.
S102, converting the target image into target quantum data, and performing quantum Fourier transform on the target quantum data to obtain a frequency domain representation result of the target quantum data.
The image is originally two-dimensional matrix information, and is a multidimensional tensor under the condition of considering a plurality of color channels, so that the embodiment quantizes the image by using NEQR (Novel Enhanced Quantum reconstruction, an image quantization method), can avoid the problem of decoherence, and has higher precision because the NEQR encodes bits. Thus in one embodiment, converting a target image into target quantum data comprises: the target image is converted into target quantum data using NEQR encoding.
In one embodiment, the method for converting a target image into target quantum data using NEQR encoding includes: converting the target image into target quantum data by using NEQR coding according to a first formula;
wherein the first formula is:
Figure 104695DEST_PATH_IMAGE008
wherein, | P>Representing target quantum data;ma number of pixels representing a width correspondence of the target image;nthe number of pixels corresponding to the length of the target image; non-viable cellsC x,y >Indicating the position at a coordinate point (x,y) Color information of the target image; i X>Represents the quantum bit, | Y, corresponding to the coordinate value x>Representing a quantum bit corresponding to the coordinate value y;
Figure 562483DEST_PATH_IMAGE007
is a direct product operator.
Based on the coordinate point (c) (ii)x,y) A position can be uniquely determined in the image. If the coordinate point (C:x, y) Is (3,1), then the color information at this location is: non-viable cellsC 3,1 >,|X>Herein, theA value of 3, Y>The value here is 1. It can be seen that the color information, the x coordinate, and the y coordinate are stored in the three qubit sequences, respectively, and may be represented in a binary form.
And the code length of the color information of the target image is determined according to the value of the preset parameter. Namely: the code length of the color information is variable, and the specific code length can take values of 2, 8 and the like. If the preset parameter is denoted by a, a may be equal to 2 or 8.
In this embodiment, before embedding the watermark, the watermark also needs to be quantized, and specifically, the watermark may be quantized using the NEQR coding method. NEQR can store image classical information into qubits, so the color accuracy of the image can be adjusted with the number of qubits.
In one embodiment, the performing the quantum fourier transform on the target quantum data includes: and performing quantum Fourier transform on each quantum bit in the target quantum data according to a second formula, so that the spatial domain information of the image can be converted into frequency domain information.
Wherein the second formula is:
Figure 51102DEST_PATH_IMAGE009
therein,. mu.gk>A qubit representing any position (i.e. pixel point) in the target quantum data,ktaking a value for the position; non-viable cellsj>Representing the frequency domain representation of the qubits for all positions in the target quantum data by means of a quantum Fourier transformjA qubit at a location;Nthe total number of bits of the target image;eis the base of the natural logarithm;iin imaginary units of complex numbers.
It should be noted that, performing a quantum fourier transform on each quantum bit in the target quantum data includes: traversing the quantum bits at all positions of the target quantum data, and performing quantum Fourier transform, so as to obtain a transformed quantum bit, such as: in the frequency domain representationjQubits at the positions. The integrity can be obtained by traversing for N timesRepresents the result in the frequency domain.
S103, embedding the spatial domain quantum information of the preset watermark into the frequency domain representation result to obtain the superposed quantum data.
In one embodiment, embedding spatial domain quantum information of a preset watermark into a frequency domain representation result to obtain superposition quantum data includes: embedding the space domain quantum information into the frequency domain representation result according to a third formula to obtain superposed quantum data;
wherein the third formula is:
Figure 557215DEST_PATH_IMAGE004
therein,. mu.gj’>Representing superimposed quantum dataj’A qubit at a location; non-viable cellsj>Representing the frequency domain representation of the qubits for all positions in the target quantum data by means of a quantum Fourier transformjA qubit at a location;W x,y >is to preset the coordinate points in the watermark (x,y) Spatial domain quantum information of (a), namely: embedded into a coordinate point (x,y) Spatial domain quantum information of (2);αis the embedding strength factor.
Wherein, the embedding intensity coefficient can be flexibly adjusted. The larger the embedding strength coefficient is, the stronger the anti-damage capability of the watermark information is, but the watermark information is easier to expose; the smaller the embedded intensity factor, the less resistant the watermark to damage, but not exposure. Alpha is used as a parameter and can also be used for preventing the watermark from being cracked.
And S104, carrying out quantum inverse Fourier transform on the superposed quantum data to obtain a target image embedded with a preset watermark.
In a specific embodiment, performing a quantum inverse fourier transform on the superimposed quantum data to obtain a target image embedded with a preset watermark, includes: performing quantum inverse Fourier transform on the superimposed quantum data according to a fourth formula to obtain a target image embedded with a preset watermark;
wherein the fourth formula is:
Figure 475492DEST_PATH_IMAGE010
therein,. mu.gp’>A qubit representing any position in the target image embedded with the preset watermark,p' is a position value;Nthe total number of bits of the target image;eis the base of the natural logarithm;iimaginary unit of complex number; non-viable cellsj’>Representing superimposed quantum dataj’Qubits at the positions.
In the embodiment, a target image is converted into target quantum data | P >, quantum fourier transform is performed on a quantum bit at each position in | P > to obtain N converted quantum bits, space domain quantum information is embedded into the N quantum bits, and quantum inverse fourier transform is performed to obtain the target image embedded with a preset watermark, and version protection is performed on the target image by using the watermark.
Therefore, the embodiment can load the spatial domain quantum information of the watermark to the frequency domain of the image quantum data, and perform quantum inverse Fourier transform on the quantum data loaded with the spatial domain quantum information of the watermark, so that the spatial domain quantum information of the watermark is scattered in the spatial domain of the image quantum data, uniform distribution of the watermark information in the quantum image is realized, and the tamper resistance of the image data and the concealment of the watermark information are improved.
Referring to fig. 2, an embodiment of the present application discloses a watermark authentication method, where the watermark authentication method is an inverse process of a watermark embedding method, and the watermark authentication method includes:
s201, acquiring a target image embedded with a preset watermark.
The target image embedded with the preset watermark is obtained according to the watermark embedding method described in the above embodiment.
S202, converting the target image embedded with the preset watermark into first quantum data, and performing quantum inverse Fourier transform and watermark removal on the first quantum data to obtain second quantum data of the target image not embedded with the preset watermark.
In the watermark authentication process, the preset watermark is known, so that after the quantum inverse fourier transform is performed on the first quantum data, the watermark in the first quantum data can be removed, that is: and removing the spatial domain quantum information of the preset watermark to obtain the quantized data of the original image. Since the watermark embedding is realized based on the third formula, the watermark removal is the inverse process of the watermark third formula.
S203, determining difference quantum information between the first quantum data and the second quantum data.
And S204, if the similarity between the difference quantum information and the spatial domain quantum information of the preset watermark exceeds a preset threshold, determining that the target image embedded with the preset watermark is not tampered.
Under normal conditions, the difference quantum information is the removed space domain quantum information, and therefore if the similarity between the difference quantum information and the space domain quantum information of the preset watermark exceeds a preset threshold value, it is determined that the target image embedded with the preset watermark is not tampered. Otherwise, the target image embedded with the preset watermark is considered to be tampered.
In one embodiment, determining difference quantum information between the first quantum data and the second quantum data comprises: determining difference quantum information according to a fifth formula;
wherein the fifth formula is:
Figure 2551DEST_PATH_IMAGE006
therein,. mu.gM x,y >Representing a point located at a coordinate in the differential quantum information (x,y) A qubit of (a);ma number of pixels representing a width correspondence of the target image;nthe number of pixels corresponding to the length of the target image;P x,y representing a coordinate point located in the second quantum data (x,y) A qubit of (a);P’ x,y representing a coordinate point located in the second quantum data (x,y) A qubit of (a);αis the embedding strength coefficient; i X>Represents the quantum bit, | Y, corresponding to the coordinate value x>Representing a quantum bit corresponding to the coordinate value y;
Figure 752201DEST_PATH_IMAGE007
is a direct product operator.
In order to improve the accuracy of authentication, the averaging may be calculated for multiple times, so in a specific embodiment, if the similarity between the difference quantum information and the spatial domain quantum information of the preset watermark exceeds a preset threshold, it is determined that the target image embedded with the preset watermark is not tampered, including: calculating the similarity between the multiple-time difference quantum information and the airspace quantum information, and determining the average value of all the similarities; and if the average value exceeds a preset threshold value, determining that the target image embedded with the preset watermark is not tampered.
In the following, a watermark embedding apparatus provided by an embodiment of the present application is described, and a watermark embedding apparatus described below and a watermark embedding method described above may be referred to with each other.
Referring to fig. 3, an embodiment of the present application discloses a watermark embedding apparatus, including:
a first obtaining module 301, configured to obtain a target image;
a transform module 302, configured to convert the target image into target quantum data, and perform quantum fourier transform on the target quantum data to obtain a frequency domain representation result of the target quantum data;
an embedding module 303, configured to embed the spatial domain quantum information of the preset watermark into the frequency domain representation result to obtain superposition quantum data;
and the first inverse transformation module 304 is configured to perform quantum inverse fourier transform on the superimposed quantum data to obtain a target image embedded with a preset watermark.
In one embodiment, the transformation module is specifically configured to:
the target image is converted into target quantum data using NEQR encoding.
In one embodiment, the transformation module is specifically configured to:
converting the target image into target quantum data by using NEQR coding according to a first formula;
wherein the first formula is:
Figure 80414DEST_PATH_IMAGE008
wherein, | P>Representing target quantum data;ma number of pixels representing a width correspondence of the target image;nthe number of pixels corresponding to the length of the target image; non-viable cellsC x,y >Indicating the position at a coordinate point (x,y) Color information of the target image; i X>Represents the quantum bit, | Y, corresponding to the coordinate value x>Representing a quantum bit corresponding to the coordinate value y;
Figure 518611DEST_PATH_IMAGE007
is a direct product operator.
In one embodiment, the code length of the color information of the target image is determined according to a value of a preset parameter.
In one embodiment, the transformation module is specifically configured to:
performing quantum Fourier transform on each quantum bit in the target quantum data according to a second formula;
wherein the second formula is:
Figure 347896DEST_PATH_IMAGE009
therein,. mu.gk>A qubit representing any position in the target quantum data,ktaking a value for the position; non-viable cellsj>Representing the frequency domain representation of the qubits for all positions in the target quantum data by means of a quantum Fourier transformjA qubit at a location;Nthe total number of bits of the target image;eis the base of the natural logarithm;iin imaginary units of complex numbers.
In one embodiment, the embedded module is specifically configured to:
embedding the space domain quantum information into the frequency domain representation result according to a third formula to obtain superposed quantum data;
wherein the third formula is:
Figure 889735DEST_PATH_IMAGE004
therein,. mu.gj’>Representing superimposed quantum dataj’A qubit at a location; non-viable cellsj>Representing the frequency domain representation of the qubits for all positions in the target quantum data by means of a quantum Fourier transformjA qubit at a location;W x,y >is to preset the coordinate points in the watermark (x,y) Spatial domain quantum information of (2);αis the embedding strength factor.
In a specific embodiment, the first inverse transformation module is specifically configured to:
performing quantum inverse Fourier transform on the superimposed quantum data according to a fourth formula to obtain a target image embedded with a preset watermark;
wherein the fourth formula is:
Figure 811686DEST_PATH_IMAGE005
therein,. mu.gp’>A qubit representing any position in the target image embedded with the preset watermark,p' is a position value;Nthe total number of bits of the target image;eis the base of the natural logarithm;iimaginary unit of complex number; non-viable cellsj’>Representing superimposed quantum dataj’Qubits at the positions.
For more specific working processes of each module and unit in this embodiment, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described here again.
Therefore, the embodiment provides a watermark embedding device, which realizes uniform distribution of watermark information in a quantum image, and improves the tamper resistance of image data and the concealment of the watermark information.
In the following, a watermark authentication apparatus provided in an embodiment of the present application is introduced, and a watermark authentication apparatus described below and a watermark authentication method described above may be referred to each other.
Referring to fig. 4, an embodiment of the present application discloses a watermark authentication apparatus, including:
a second obtaining module 401, configured to obtain a target image embedded with a preset watermark;
a second inverse transformation module 402, configured to convert the target image embedded with the preset watermark into first quantum data, and perform quantum inverse fourier transform and watermark removal on the first quantum data to obtain second quantum data of the target image not embedded with the preset watermark;
a determining module 403 for determining difference quantum information between the first quantum data and the second quantum data;
the authentication module 404 is configured to determine that the target image embedded with the preset watermark is not tampered if the similarity between the difference quantum information and the spatial domain quantum information of the preset watermark exceeds a preset threshold.
In a specific embodiment, the determining module is specifically configured to:
determining difference quantum information according to a fifth formula;
wherein the fifth formula is:
Figure 235714DEST_PATH_IMAGE006
therein,. mu.gM x,y >Representing a point located at a coordinate in the differential quantum information (x,y) A qubit of (a);ma number of pixels representing a width correspondence of the target image;nthe number of pixels corresponding to the length of the target image;P x,y representing a coordinate point located in the second quantum data (x,y) A qubit of (a);P’ x,y representing a coordinate point located in the second quantum data (x,y) A qubit of (a);αis the embedding strength coefficient; i X>Represents the quantum bit, | Y, corresponding to the coordinate value x>Representing a quantum bit corresponding to the coordinate value y;
Figure 307838DEST_PATH_IMAGE007
is a direct product operator.
In one embodiment, the authentication module is specifically configured to:
calculating the similarity between the multiple-time difference quantum information and the airspace quantum information, and determining the average value of all the similarities;
and if the average value exceeds a preset threshold value, determining that the target image embedded with the preset watermark is not tampered.
For more specific working processes of each module and unit in this embodiment, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not described here again.
In the following, a computer device provided by an embodiment of the present application is introduced, and a computer device described below and a corresponding method and apparatus described above may be referred to each other.
Referring to fig. 5, an embodiment of the present application discloses a computer device, including:
a memory 501 for storing a computer program;
a processor 502 for executing the computer program to implement the method disclosed in any of the embodiments above.
A readable storage medium provided by the embodiments of the present application is described below, and the readable storage medium described below and the corresponding method, apparatus, and device described above may be referred to with each other.
A readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the method disclosed in the previous embodiments. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
The following embodiments are described in detail with respect to a watermark embedding process and a watermark authentication process.
Referring to fig. 6, the watermark embedding process includes:
s1: two kinds of classical image information, namely a carrier image and a watermark image, are converted into quantum image information, and a first formula is specifically used.
S2: and carrying out QFT (Quantum Fourier Transform) on the Quantum carrier image P according to a second formula to obtain P'.
S3: superposing the quantum carrier image P' subjected to quantum Fourier transform and the watermark information W according to a third formula, specifically: after W is multiplied by the embedding strength coefficient alpha, the W is loaded on P 'to obtain Pw'.
Specifically, the superposition of P ' and W may be accomplished by a coefficient multiplier and an adder of a quantum circuit such that Pw ' = P ' + W. In the embodiment, the NEQR quantized image is adopted, so that the color value of the image is encoded by the quantum bit value instead of being embodied by the amplitude, and therefore, the addition, subtraction, multiplication and division can be performed on the quantum bit value, and the basic logic operation of the quantum bit is realized.
S4: the new image information Pw' obtained by the superimposition is subjected to QIFT (Quantum Inverse Fourier Transform), and the spatial domain image information Pw is obtained again.
S5: and obtaining a new image based on the Pw, and finishing the watermarking process.
The new image of the completed watermark embedding can be represented as:
Figure 704184DEST_PATH_IMAGE011
wherein, | Pw>Representing a new image with the embedded watermark;ma number of pixels representing a width correspondence of the image;na number of pixels corresponding to a length of the image; non-viable cellsP’ x,y >P' in step S2;W x,y >(can also be written asW x,y >) Namely watermark information W in step S3;
Figure 298DEST_PATH_IMAGE007
is a direct product operator.
Referring to fig. 7, the watermark authentication process includes:
s1: for a quantum image Q 'with a watermark embedded according to fig. 6, QIFT is performed on it, and the watermark is removed from Q' based on the embedding strength coefficient α and the watermark information W, resulting in Q.
S2: and deducting Q from Q' to obtain an information difference V.
S3: v is compared to the true watermark W to determine if V and W match.
Wherein the matching process of V and W can be completed by using a SWAP tool. See fig. 8 for the implementation principle of SWAP test.
In FIG. 8, SWAP compares two quantum data | φ > and | φ >, and if | φ > is the same as | φ >, the probability that the auxiliary bit (measure in FIG. 8) in FIG. 8 measures as |1> is 100%. The measurement of this auxiliary bit can be used to detect the degree of similarity of W and V, which is considered to pass the test when it reaches a preset threshold epsilon, and is not authorized otherwise.
The auxiliary bits may be measured multiple times, an average value calculated, the average value compared to a threshold epsilon, and if yes, the authentication is passed, otherwise the authentication is not passed.
The watermark decoding process is the inverse operation of the watermark embedding process, and the decoded watermark (i.e. the watermark extracted from the image with the watermark) can be expressed by the following formula:
Figure 114885DEST_PATH_IMAGE012
the decoding operation requires the use of a quantum divider, which can be implemented with reference to the related art.
It can be seen that, in this embodiment, the classical image is quantized first, and then the color information is modified through the quantum fourier transform and the quantum logic circuit, and the addition of the watermark is completed. The inverse process of the whole process is the authentication process of the quantum watermark, and the authentication process uses SWAP to carry out multiple measurements to obtain a result, so that the image information can be directly authenticated in a quantum state, and the method is an effective scheme of quantum authentication. The quantum Fourier transform is much faster than the Fourier transform, and the exponential acceleration can be achieved. Therefore, the quantum Fourier watermark authentication speed of the picture with huge pixels is exponentially faster than the fast Fourier transform watermark authentication speed under the classical computer. The scheme has strong tamper resistance and concealment, and can protect the image data from unauthorized access or tampering.
References in this application to "first," "second," "third," "fourth," etc., if any, are intended to distinguish between similar elements and not necessarily to describe a particular order or sequence. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, or apparatus.
It should be noted that the descriptions in this application referring to "first", "second", etc. are for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present application.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of readable storage medium known in the art.
The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (14)

1. A watermark embedding method, comprising:
acquiring a target image;
converting the target image into target quantum data, and performing quantum Fourier transform on the target quantum data to obtain a frequency domain representation result of the target quantum data;
embedding spatial domain quantum information of a preset watermark into the frequency domain representation result to obtain superposed quantum data;
and carrying out quantum inverse Fourier transform on the superposed quantum data to obtain a target image embedded with the preset watermark.
2. The method of claim 1, wherein converting the target image into target quantum data comprises:
the target image is converted into target quantum data using NEQR encoding.
3. The method of claim 1, wherein said converting said target image into target quantum data using NEQR encoding comprises:
converting the target image into target quantum data with NEQR coding according to a first formula;
wherein the first formula is:
Figure DEST_PATH_IMAGE001
wherein, | P>Representing the target quantum data;mrepresenting a number of pixels corresponding to a width of the target image;nrepresenting the number of pixels corresponding to the length of the target image; non-viable cellsC x,y >Indicating the position at a coordinate point (x,y) Color information of the target image; i X>Represents the quantum bit, | Y, corresponding to the coordinate value x>Representing a quantum bit corresponding to the coordinate value y;
Figure 745055DEST_PATH_IMAGE002
is a direct product operator.
4. The method according to claim 3, wherein the code length of the color information of the target image is determined according to a value of a preset parameter.
5. The method of claim 1, wherein the performing a quantum fourier transform on the target quantum data comprises:
performing a quantum fourier transform on each quantum bit in the target quantum data according to a second formula;
wherein the second formula is:
Figure DEST_PATH_IMAGE003
therein,. mu.gk>A qubit representing any position in the target quantum data,ktaking a value for the position; non-viable cellsj>Representing the frequency domain representation of the qubits for all positions in the target quantum data by a quantum Fourier transformjA qubit at a location;Nis the total number of bits of the target image;eis the base of the natural logarithm;iin imaginary units of complex numbers.
6. The method of claim 5, wherein embedding spatial domain quantum information of a preset watermark into the frequency domain representation results in superposition quantum data, comprising:
embedding the space domain quantum information into the frequency domain representation result according to a third formula to obtain the superposition quantum data;
wherein the third formula is:
Figure 750183DEST_PATH_IMAGE004
therein,. mu.gj’>Representing in said superimposed quantum dataj’A qubit at a location; non-viable cellsj>Representing the frequency domain representation of the qubits for all positions in the target quantum data by a quantum Fourier transformjA qubit at a location;W x,y >for the coordinate point in the preset watermark (x,y) Spatial domain quantum information of (2);αis the embedding strength factor.
7. The method of claim 6, wherein the performing a quantum inverse Fourier transform on the stacked quantum data to obtain the target image embedded with the preset watermark comprises:
performing quantum inverse Fourier transform on the superposed quantum data according to a fourth formula to obtain a target image embedded with the preset watermark;
wherein the fourth formula is:
Figure DEST_PATH_IMAGE005
therein,. mu.gp’>A qubit representing any position in the target image in which the preset watermark is embedded,p' is a position value;Nis the total number of bits of the target image;eis the base of the natural logarithm;iimaginary unit of complex number; non-viable cellsj’>Representing in said superimposed quantum dataj’Qubits at the positions.
8. A watermark authentication method, comprising:
acquiring a target image embedded with a preset watermark; the target image embedded with the preset watermark is obtained according to the method of any one of claims 1 to 7;
converting the target image embedded with the preset watermark into first quantum data, and performing quantum inverse Fourier transform and watermark removal on the first quantum data to obtain second quantum data of the target image not embedded with the preset watermark;
determining difference quantum information between the first quantum data and the second quantum data;
and if the similarity of the difference quantum information and the spatial domain quantum information of the preset watermark exceeds a preset threshold value, determining that the target image embedded with the preset watermark is not tampered.
9. The method of claim 8, wherein the determining the difference quantum information between the first quantum data and the second quantum data comprises:
determining the difference quantum information according to a fifth formula;
wherein the fifth formula is:
Figure 352110DEST_PATH_IMAGE006
therein,. mu.gM x,y >Representing a coordinate point located in the differential quantum information (x,y) A qubit of (a);ma number of pixels representing a width correspondence of the target image;nthe number of pixels corresponding to the length of the target image;P x,y representing a coordinate point located in the second quantum data (x,y) A qubit of (a);P’ x,y representing a coordinate point located in the second quantum data (x,y) A qubit of (a);αis the embedding strength coefficient; i X>Represents the quantum bit, | Y, corresponding to the coordinate value x>Representing a quantum bit corresponding to the coordinate value y;
Figure DEST_PATH_IMAGE007
is a direct product operator.
10. The method according to claim 8, wherein determining that the target image embedded with the preset watermark is not tampered if the similarity between the difference quantum information and the spatial domain quantum information of the preset watermark exceeds a preset threshold comprises:
calculating the similarity of the difference quantum information and the airspace quantum information for multiple times, and determining the average value of all the similarities;
and if the average value exceeds the preset threshold value, determining that the target image embedded with the preset watermark is not tampered.
11. A watermark embedding apparatus, comprising:
the first acquisition module is used for acquiring a target image;
the transformation module is used for converting the target image into target quantum data and carrying out quantum Fourier transformation on the target quantum data to obtain a frequency domain representation result of the target quantum data;
the embedding module is used for embedding the spatial domain quantum information of the preset watermark into the frequency domain representation result to obtain superposed quantum data;
and the first inverse transformation module is used for carrying out quantum inverse Fourier transformation on the superposed quantum data to obtain the target image embedded with the preset watermark.
12. A watermark authentication apparatus, comprising:
the second acquisition module is used for acquiring the target image embedded with the preset watermark; the target image embedded with the preset watermark is obtained according to the method of any one of claims 1 to 7;
the second inverse transformation module is used for converting the target image embedded with the preset watermark into first quantum data, and performing quantum inverse Fourier transform and watermark removal on the first quantum data to obtain second quantum data of the target image not embedded with the preset watermark;
a determination module to determine difference quantum information between the first quantum data and the second quantum data;
and the authentication module is used for determining that the target image embedded with the preset watermark is not tampered if the similarity between the difference quantum information and the spatial domain quantum information of the preset watermark exceeds a preset threshold value.
13. A computer device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the method of any one of claims 1 to 10.
14. A readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the method of any one of claims 1 to 10.
CN202111178891.6A 2021-10-11 2021-10-11 Watermark embedding method and component, watermark authentication method and component Active CN113628092B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111178891.6A CN113628092B (en) 2021-10-11 2021-10-11 Watermark embedding method and component, watermark authentication method and component

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111178891.6A CN113628092B (en) 2021-10-11 2021-10-11 Watermark embedding method and component, watermark authentication method and component

Publications (2)

Publication Number Publication Date
CN113628092A true CN113628092A (en) 2021-11-09
CN113628092B CN113628092B (en) 2022-02-18

Family

ID=78390799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111178891.6A Active CN113628092B (en) 2021-10-11 2021-10-11 Watermark embedding method and component, watermark authentication method and component

Country Status (1)

Country Link
CN (1) CN113628092B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050036613A1 (en) * 2003-08-06 2005-02-17 The Boeing Company Discrete fourier transform (DFT) watermark
US20060013488A1 (en) * 2002-08-09 2006-01-19 Hisashi Inoue Information-embedding apparatus, encoder, tamper-detecting apparatus, information-embedding method, tamper-detecting method, and recording medium having program recorded therein for executing both of the methods
CN103366334A (en) * 2013-07-10 2013-10-23 北京工业大学 Quantum watermark authentication method based on quantum discrete cosine transform (QDCT)
CN103778593A (en) * 2014-01-14 2014-05-07 南昌大学 Quantum image encryption method based on image association dissection
CN104978706A (en) * 2014-04-11 2015-10-14 深圳中兴力维技术有限公司 Watermark embedding method based on Fourier descriptor, watermark extraction method based on Fourier descriptor, watermark embedding device based on Fourier descriptor, watermark extraction device based on Fourier descriptor and system
CN107204008A (en) * 2017-06-08 2017-09-26 上海海事大学 Quantum image matching method
CN111461956A (en) * 2020-04-23 2020-07-28 周雷文 Image watermarking processing method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060013488A1 (en) * 2002-08-09 2006-01-19 Hisashi Inoue Information-embedding apparatus, encoder, tamper-detecting apparatus, information-embedding method, tamper-detecting method, and recording medium having program recorded therein for executing both of the methods
US20050036613A1 (en) * 2003-08-06 2005-02-17 The Boeing Company Discrete fourier transform (DFT) watermark
CN103366334A (en) * 2013-07-10 2013-10-23 北京工业大学 Quantum watermark authentication method based on quantum discrete cosine transform (QDCT)
CN103778593A (en) * 2014-01-14 2014-05-07 南昌大学 Quantum image encryption method based on image association dissection
CN104978706A (en) * 2014-04-11 2015-10-14 深圳中兴力维技术有限公司 Watermark embedding method based on Fourier descriptor, watermark extraction method based on Fourier descriptor, watermark embedding device based on Fourier descriptor, watermark extraction device based on Fourier descriptor and system
CN107204008A (en) * 2017-06-08 2017-09-26 上海海事大学 Quantum image matching method
CN111461956A (en) * 2020-04-23 2020-07-28 周雷文 Image watermarking processing method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ENGIN ŞAHIN 等: "Security of NEQR Quantum Image by Using Quantum Fourier Transform with Blind Trent", 《HTTPS://ARXIV.ORG/ABS/1801.10364》 *
刘亚中 等: "面向医学图像的半脆弱水印算法", 《杭州电子科技大学学报》 *
肖红 等: "改进的量子图像水印算法", 《信号处理》 *

Also Published As

Publication number Publication date
CN113628092B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
Gull et al. An efficient watermarking technique for tamper detection and localization of medical images
Hosny et al. Resilient color image watermarking using accurate quaternion radial substituted Chebyshev moments
Hosny et al. Robust color image watermarking using invariant quaternion Legendre-Fourier moments
Su et al. An approximate Schur decomposition-based spatial domain color image watermarking method
Su et al. An improved color image watermarking algorithm based on QR decomposition
Abdelhakim et al. Fragile watermarking for image tamper detection and localization with effective recovery capability using K-means clustering
Etemad et al. Robust image watermarking scheme using bit-plane of hadamard coefficients
Liu et al. Robust blind image watermarking based on chaotic mixtures
Elshoura et al. Analysis of noise sensitivity of Tchebichef and Zernike moments with application to image watermarking
Singh et al. Block truncation coding based effective watermarking scheme for image authentication with recovery capability
Swain et al. An effective watermarking technique using BTC and SVD for image authentication and quality recovery
Hemida et al. A restorable fragile watermarking scheme with superior localization for both natural and text images
Shen et al. A self-embedding fragile image authentication based on singular value decomposition
CN110211020B (en) Image watermark embedding and extracting method based on SWT-DFT
Wang et al. Embedding color watermark image to color host image based on 2D-DCT
Lin et al. Pixel-based fragile image watermarking based on absolute moment block truncation coding
CN113392381A (en) Watermark generation method, watermark decoding method, storage medium, and electronic device
Ahmad et al. Robust image watermarking method in wavelet domain based on sift features
Barani et al. Image forgery detection in contourlet transform domain based on new chaotic cellular automata
CN113628092B (en) Watermark embedding method and component, watermark authentication method and component
CN111988491A (en) Medical image robust watermarking method based on KAZE-DCT
Bideh et al. Security analysis of a key based color image watermarking vs. a non-key based technique in telemedicine applications
Azizoğlu et al. A novel reversible fragile watermarking in DWT domain for tamper localization and digital image authentication
KR100944488B1 (en) Watermark Inserting Method to Vector data for using Azimuth Information and Watermark Detecting Method to the same
Renklier et al. Image authentication and recovery: Sudoku puzzle and MD5 hash algorithm based self-embedding fragile image watermarking method

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