Method and device for embedding and extracting blind watermark in spatial domain digital image based on modulo operation
By processing the watermark using modular arithmetic and channel separation in the spatial domain, and combining it with a pseudo-random swapping scrambling algorithm and redundancy check, the shortcomings of existing watermarks in terms of noise resistance and shearing attacks are solved, achieving higher robustness and security.
Patent Information
- Application Number
- CN202210314037.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-03-28
AI Technical Summary
Existing digital image watermarking technologies are ineffective against salt-and-pepper noise attacks and shearing attacks, and are difficult to implement redundancy checks and high-density steganography.
A spatial domain digital image blind watermarking method based on modular arithmetic is adopted. The watermark is preprocessed by channel separation and pseudo-random exchange scrambling algorithm, and the watermark is embedded by modular arithmetic. Combined with a redundancy check algorithm, the robustness of the watermark is improved.
The robustness of the watermark has been improved, enhancing its resistance to noise and shearing attacks, while also improving the security and integrity of the watermark.
Smart Images

Figure CN114757809B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of digital image processing. BACKGROUND
[0002] With the development of the Internet, digital images are widely spread, but the copyright problem and image traceability problem have not been completely solved. The existing technical solutions are mostly to hide watermark information in the frequency domain, with the DCT domain being the most widely used. Or Arnold scrambling is used, and the DCT coefficient is modified to realize steganography, however, Arnold scrambling is still a linear scrambling, and the performance of the realized steganography is not excellent in terms of checking noise and cutting attack; or a QR code is embedded in the frequency domain, which to some extent realizes redundancy checking, because the QR code itself has a redundancy checking mechanism, but the steganographic density is small, so a method is needed to realize redundancy checking and as much as possible to expand the density of steganography.
[0003] In summary, the existing solutions do not have excellent performance in resisting salt and pepper noise attack and cutting attack. Therefore, the present application proposes a spatial domain digital image blind watermark algorithm based on modular operation, which embeds watermark in the spatial domain using modular operation, combines channel separation and redundancy checking algorithm, and aims to improve the robustness of blind watermark. SUMMARY
[0004] The present application aims to at least solve one of the technical problems in the related art to some extent.
[0005] To this end, a first object of the present application is to propose a spatial domain digital image blind watermark embedding and extraction method based on modular operation, which aims to improve the robustness of blind watermark.
[0006] A second object of the present application is to propose a spatial domain digital image blind watermark embedding and extraction device based on modular operation.
[0007] A third object of the present application is to propose a computer device.
[0008] A fourth object of the present application is to propose a computer readable storage medium.
[0009] To achieve the above objects, the first aspect of the present application proposes a spatial domain digital image blind watermark embedding and extraction method based on modular operation, comprising:
[0010] Obtaining a host image, performing channel separation on the host image to obtain a red component layer, a green component layer and a blue component layer;
[0011] Obtaining a watermark to be embedded, pre-processing the watermark to be embedded using a pseudo-random exchange scrambling algorithm to obtain a pre-processed watermark;
[0012] The preprocessed watermark, the red component layer are substituted into an embedding formula to calculate and obtain an embedded red component layer; the preprocessed watermark, the green component layer are substituted into an embedding formula to calculate and obtain an embedded green component layer; the preprocessed watermark, the blue component layer are substituted into an embedding formula to calculate and obtain an embedded blue component layer.
[0013] The embedded red component layer, the embedded green component layer and the embedded blue component layer are combined to obtain a watermark-containing image.
[0014] In addition, the space domain digital image blind watermark embedding and extraction method based on a modulo operation according to the above embodiment of the application can further have the following additional technical features.
[0015] Further, in an embodiment of the application, the pre-processing of the watermark to be embedded using a pseudo-random exchange scrambling algorithm comprises:
[0016] For an m*n watermark W, the watermark is scanned into a p*1 row vector according to a certain rule, where p=m*n;
[0017] The row vector is scanned, and an MD5 algorithm is used to generate a pseudo-random number rs (0≤rs≤p-1), so that the pixels at positions i and rs are exchanged, and a recursive relationship is obtained as
[0018]
[0019] Where r0=key, and key is a secret key;
[0020] The exchanged p*1 row vector is restored to an m*n image to obtain a preprocessed watermark W*.
[0021] Further, in an embodiment of the application, the preprocessed watermark, the red component layer are substituted into an embedding formula to calculate and obtain an embedded red component layer, which comprises:
[0022] The preprocessed watermark W* and the red component layer are substituted into an embedding formula to calculate, where the embedding formula is represented as:
[0023]
[0024] Where i and j are the i-th row and j-th column of the red component layer, Q is the embedding depth, and the value range of Q is 0<Q<1 or Q>1.
[0025] Further, in one embodiment of the present application, further comprising: carrying out channel separation on the watermark-containing image obtained by the space domain digital image blind watermark embedding and extracting method based on modulo operation as described above, to obtain a watermark-containing red component layer, a watermark-containing green component layer and a watermark-containing blue component layer;
[0026] extracting the encrypted watermark in the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer through the auxiliary matrix respectively;
[0027] obtaining a complete encrypted watermark through the encrypted watermark in the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer, and decrypting the complete encrypted watermark through the inverse algorithm of the pseudo-random exchange scrambling algorithm to obtain the extracted watermark.
[0028] Further, in one embodiment of the present application, the extracting the encrypted watermark in the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer through the auxiliary matrix respectively comprises:
[0029] substituting the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer into the auxiliary matrix respectively, and representing as:
[0030]
[0031] wherein, Z X , S X is the auxiliary matrix for calculating watermark extraction.
[0032] Further, in one embodiment of the present application, the obtaining a complete encrypted watermark through the encrypted watermark in the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer, and decrypting the complete encrypted watermark through the inverse algorithm of the pseudo-random exchange scrambling algorithm comprises:
[0033] applying the formula:
[0034] wherein, R * , G * , B * are the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer respectively.
[0035] To achieve the above purpose, the second aspect embodiment of the present application proposes a space domain digital image blind watermark embedding and extracting device based on modulo operation, comprising:
[0036] an obtaining module, configured to obtain a host image, and carry out channel separation on the host image to obtain a red component layer, a green component layer and a blue component layer;
[0037] a preprocessing module configured to obtain a watermark to be embedded, and perform preprocessing on the watermark to be embedded by using a pseudo-random exchange permutation algorithm to obtain a preprocessed watermark;
[0038] an embedding module configured to substitute the preprocessed watermark, the red component layer, into an embedding formula to obtain an embedded red component layer, substitute the preprocessed watermark, the green component layer, into the embedding formula to obtain an embedded green component layer, and substitute the preprocessed watermark, the blue component layer, into the embedding formula to obtain an embedded blue component layer;
[0039] a merging module configured to merge the embedded red component layer, the embedded green component layer, and the embedded blue component layer to obtain a watermark-containing image.
[0040] Further, in an embodiment of the present application, the method further comprises:
[0041] a separation module configured to perform channel separation on the watermark-containing image obtained by the device for embedding and extracting a blind watermark in a spatial domain digital image based on a modulo operation to obtain a watermark-containing red component layer, a watermark-containing green component layer, and a watermark-containing blue component layer;
[0042] an extraction module configured to extract encrypted watermarks in the watermark-containing red component layer, the watermark-containing green component layer, and the watermark-containing blue component layer by using an auxiliary matrix;
[0043] an inverse sequence exchange module configured to obtain complete encrypted watermarks from the encrypted watermarks in the watermark-containing red component layer, the watermark-containing green component layer, and the watermark-containing blue component layer, and decrypt the complete encrypted watermarks by using an inverse algorithm of the pseudo-random exchange permutation algorithm to obtain extracted watermarks.
[0044] To achieve the above object, a third aspect of the present application provides a computer device, characterized by comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for embedding and extracting a blind watermark in a spatial domain digital image based on a modulo operation.
[0045] To achieve the above object, a fourth aspect of the present application provides a computer readable storage medium having a computer program stored thereon, characterized by that the computer program is executable on a processor to implement the method for embedding and extracting a blind watermark in a spatial domain digital image based on a modulo operation.
[0046] The space domain digital image blind watermark embedding and extraction method based on modulus operation provided by the embodiment of the application embeds a watermark in a space domain by using modulus operation, and combines channel separation and redundancy check algorithm, so that the robustness of the blind watermark is improved. BRIEF DESCRIPTION OF DRAWINGS
[0047] The above and / or additional aspects and advantages of the application will become apparent and be readily understood from the following description, taken in conjunction with the following drawings, in which:
[0048] Figure 1 A flowchart of a space domain digital image blind watermark embedding and extraction method based on modulus operation provided by the embodiment of the application.
[0049] Figure 2 A flowchart of a space domain digital image blind watermark embedding and extraction device based on modulus operation provided by the embodiment of the application.
[0050] Figure 3 A watermark embedding and extraction flowchart provided by the embodiment of the application. DETAILED DESCRIPTION
[0051] The embodiments of the application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are intended to explain the application, and cannot be understood as a limitation of the application.
[0052] The space domain digital image blind watermark embedding and extraction method and device based on modulus operation of the embodiment of the application are described below with reference to the accompanying drawings.
[0053] Figure 1 A flowchart of a space domain digital image blind watermark embedding and extraction method based on modulus operation provided by the embodiment of the application.
[0054] As shown in the flowchart of the space domain digital image blind watermark embedding and extraction method based on modulus operation, the method comprises the following steps: Figure 1
[0055] S1: Obtain a host image, perform channel separation on the host image, and obtain a red component layer, a green component layer, and a blue component layer;
[0056] S2: Obtain a watermark to be embedded, and use a pseudo-random exchange scrambling algorithm to pre-process the watermark to be embedded, to obtain a pre-processed watermark;
[0057] S3: the pre-processed watermark, red component layer is substituted into embedding formula to calculate, embedded red component layer is obtained; the pre-processed watermark, green component layer is substituted into embedding formula to calculate, embedded green component layer is obtained; the pre-processed watermark, blue component layer is substituted into embedding formula to calculate, embedded blue component layer is obtained;
[0058] S4: according to the embedded red component layer, embedded green component layer, embedded blue component layer is merged, and the watermark-containing image is obtained.
[0059] For a watermark, if direct embedding is carried out, it is easy to be attacked by clipping attack to attack a certain area, causing damage to a certain watermark area, and using a nonlinear scrambling algorithm can reduce the damage to the whole image. After using the scrambling algorithm, the clipping attack will not damage a certain area, but will evenly distribute the damaged pixels, which can maximize the integrity of the picture. In addition, the image preprocessed by the scrambling algorithm needs a secret key to obtain the watermark content, which increases the security of the watermark.
[0060] Further, in an embodiment of the present application, the watermark to be embedded is preprocessed using a pseudo-random exchange scrambling algorithm, comprising:
[0061] For an m*n watermark W, the watermark is scanned into a p*1 row vector according to a certain rule, wherein p=m*n;
[0062] The scanning row vector is exchanged with a pseudo-random number rs (0≤rs≤p-1) generated by using the MD5 algorithm, so that the pixels at positions i and rs are exchanged, and the recursive relationship is obtained as
[0063]
[0064] Wherein r0=key, key is a secret key;
[0065] The exchanged p*1 row vector is restored to an m*n image to obtain the pre-processed watermark W*.
[0066] Further, in an embodiment of the present application, the pre-processed watermark, the red component layer is substituted into the embedding formula to calculate, and the embedded red component layer is obtained, comprising:
[0067] The pre-processed watermark W* and the red component layer are substituted into the embedding formula to calculate; wherein the embedding formula is represented as:
[0068]
[0069] Wherein i, j is the i-th row and j-th column of the red component layer, Q is the embedding depth, and the value range is 0<Q<1 or Q>1 real number.
[0070] Further, in an embodiment of the present application, further comprising: carrying out channel separation on the watermark-containing image obtained by the space domain digital image blind watermark embedding and extracting method based on the modulo operation as described above, to obtain a watermark-containing red component layer, a watermark-containing green component layer and a watermark-containing blue component layer;
[0071] Extracting the encrypted watermark in the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer through the auxiliary matrix respectively;
[0072] Obtaining a complete encrypted watermark through the encrypted watermark in the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer, and decrypting the complete encrypted watermark through the inverse algorithm of the pseudo-random exchange scrambling algorithm to obtain the extracted watermark.
[0073] Further, in an embodiment of the present application, the encrypted watermark in the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer is extracted through the auxiliary matrix respectively, comprising:
[0074] Substituting the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer into the auxiliary matrix respectively, and denoted as:
[0075]
[0076] Wherein, Z X , S X is the auxiliary matrix for calculating the watermark extraction.
[0077] Further, in an embodiment of the present application, the complete encrypted watermark is obtained through the encrypted watermark in the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer, and the complete encrypted watermark is decrypted through the inverse algorithm of the pseudo-random exchange scrambling algorithm, comprising:
[0078] The formula is applied:
[0079] Wherein, R * , G * , B * are the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer respectively.
[0080] The method of the present application is based on the modulo operation, embeds the digital watermark in the space domain, uses the pseudo-random exchange scrambling algorithm for watermark preprocessing, and it is difficult to solve the watermark content without knowing the secret key, thereby improving the security of the watermark. The watermark method mainly includes two parts of embedding the watermark and extracting the watermark, as shown in Figure 3When embedding the watermark, first, a pseudo-random exchange scrambling algorithm is used to preprocess the watermark, then the host image is separated by channels, and the embedded gray level is calculated for each channel, and finally the channels are combined; when extracting the watermark, first, the watermark is obtained according to the result of the modulo operation, and then the original watermark is obtained by inversely using the scrambling algorithm.
[0081] The space domain digital image blind watermark embedding and extraction method based on the modulo operation aims to improve the robustness of the blind watermark by combining channel separation and redundancy check algorithms.
[0082] To implement the above-mentioned embodiments, the application further provides a space domain digital image blind watermark embedding and extraction device based on the modulo operation.
[0083] Figure 2 A structure diagram of the space domain digital image blind watermark embedding and extraction device based on the modulo operation is provided for the embodiments of the application.
[0084] As shown in Figure 2 the space domain digital image blind watermark embedding and extraction device based on the modulo operation includes an acquisition module 10, a preprocessing module 20, an embedding module 30, and a combination module 40.
[0085] The acquisition module is configured to acquire a host image, separate the host image by channels, and obtain a red component layer, a green component layer, and a blue component layer.
[0086] The preprocessing module is configured to acquire a watermark to be embedded, preprocess the watermark to be embedded by using a pseudo-random exchange scrambling algorithm, and obtain a preprocessed watermark.
[0087] The embedding module is configured to substitute the preprocessed watermark, the red component layer, into an embedding formula to calculate an embedded red component layer, substitute the preprocessed watermark, the green component layer, into the embedding formula to calculate an embedded green component layer, and substitute the preprocessed watermark, the blue component layer, into the embedding formula to calculate an embedded blue component layer.
[0088] The combination module is configured to combine the embedded red component layer, the embedded green component layer, and the embedded blue component layer to obtain a watermark-containing image.
[0089] Further, in an embodiment of the application, the device further includes:
[0090] The separation module is configured to separate the watermark-containing image obtained by using the space domain digital image blind watermark embedding and extraction device based on the modulo operation to obtain a watermark-containing red component layer, a watermark-containing green component layer, and a watermark-containing blue component layer.
[0091] The extraction module is configured to extract encrypted watermarks in the red component layer, the green component layer and the blue component layer respectively through the auxiliary matrix.
[0092] The reverse sequence exchange module is configured to obtain a complete encrypted watermark through the encrypted watermarks in the red component layer, the green component layer and the blue component layer, and decrypt the complete encrypted watermark through an inverse algorithm of the pseudo-random exchange scrambling algorithm to obtain the extracted watermark.
[0093] To achieve the above object, the third aspect of the present application provides a computer device, characterized by comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the space domain digital image blind watermark embedding and extraction method based on the modulo operation.
[0094] To achieve the above object, the fourth aspect of the present application provides a computer readable storage medium, characterized by storing a computer program, wherein the computer program is executed by a processor to implement the space domain digital image blind watermark embedding and extraction method based on the modulo operation.
[0095] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example" or "some examples" means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present application, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the different embodiments or examples described in the present application and the features of the different embodiments or examples can be combined and combined by those skilled in the art without contradiction.
[0096] In addition, the terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise specifically limited.
[0097] Any processes or methods described in the flowcharts or otherwise described herein can be understood as representing modules, segments, or portions of code that include one or more executable instructions for implementing specific logic functions (or steps) and / or can be implemented entirely in hardware. The various embodiments of the application can include additional or fewer steps or methods as desired for a given implementation. The various embodiments of the application can also be implemented in a wide variety of computing systems, environments, and / or configurations. The various embodiments of the application can include additional or fewer components, steps, or functions as desired for a given implementation. The various embodiments of the application can also be implemented in a wide variety of computing systems, environments, and / or configurations. The various embodiments of the application can include additional or fewer components, steps, or functions as desired for a given implementation.
[0098] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a computer- readable storage medium or a computer-readable signal medium. The computer-readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires (electrical connections), a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber (optical), and a portable compact disc read-only memory (CDROM). Note that the computer-readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory. In this context, a "computer-readable storage medium" can be any medium that can store the program for use by or in connection with the instruction execution system, apparatus, or device.
[0099] It will be appreciated that various portions of the application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, the various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. As well, if implemented in hardware, as in another embodiment, the hardware can include any or a combination of the following technologies, which are all well known in the art: a discrete logic circuit(s) having logic gates for implementing logic functions upon an application of data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array(s) (PGA), a field programmable gate array (FPGA), etc.
[0100] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiment methods can be completed by programs instructing related hardware, and the programs can be stored in a computer readable storage medium. When the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0101] In addition, each functional unit in each embodiment of the present application can be integrated into one processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The integrated module can be realized in the form of hardware or in the form of a software functional module. When the integrated module is realized in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
[0102] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and cannot be understood as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-mentioned embodiments within the scope of the present application.
Claims
1. A method for embedding and extracting a blind spatial domain digital image watermark based on modular operation, characterized in that, The method comprises the following steps: obtaining a host image, performing channel separation on the host image to obtain a red component layer, a green component layer and a blue component layer; obtaining a watermark to be embedded, preprocessing the watermark to be embedded by using a pseudo-random exchange scrambling algorithm to obtain a preprocessed watermark; substituting the preprocessed watermark and the red component layer into an embedding formula to perform calculation to obtain an embedded red component layer; substituting the preprocessed watermark and the green component layer into an embedding formula to perform calculation to obtain an embedded green component layer; substituting the preprocessed watermark and the blue component layer into an embedding formula to perform calculation to obtain an embedded blue component layer; combining the embedded red component layer, the embedded green component layer and the embedded blue component layer to obtain a watermark-containing image; wherein the preprocessing of the watermark to be embedded by using the pseudo-random exchange scrambling algorithm comprises: for a watermark W of m*n, the watermark is scanned into a row vector of p*1 according to a certain rule, wherein p=m*n; the row vector is scanned, and an MD5 algorithm is used to generate a pseudo-random number rs, 0≤rs≤p-1, so that the pixels at positions k and rs are exchanged, and a recursive relationship is obtained , wherein , key is a secret key; the p*1 row vector after the exchange is restored into an image of m*n to obtain the preprocessed watermark W*; the substitution of the preprocessed watermark W* and the red component layer into the embedding formula to perform calculation to obtain the embedded red component layer comprises: substituting the preprocessed watermark W* and the red component layer embedding depth Q into the embedding formula to perform calculation; wherein the embedding formula is represented as: , where i, j are the i-th row and j-th column of the red component layer, Q for embedding depth, the value range is or a real number.
2. A method for embedding and extracting a blind watermark in a spatial domain digital image based on a modulo operation, characterized in that, The method comprises the following steps: obtaining a host image, performing channel separation on the host image to obtain a red component layer, a green component layer and a blue component layer; obtaining a watermark to be embedded, preprocessing the watermark to be embedded by using a pseudo-random exchange scrambling algorithm to obtain a preprocessed watermark; substituting the preprocessed watermark and the red component layer into an embedding formula to perform calculation to obtain an embedded red component layer; 3. The method of claim 2, wherein, substituting the preprocessed watermark and the green component layer into an embedding formula to perform calculation to obtain an embedded green component layer; substituting the preprocessed watermark and the blue component layer into an embedding formula to perform calculation to obtain an embedded blue component layer; , wherein , is a matrix for calculating an auxiliary matrix at the time of watermark extraction.
4. The method of claim 2, wherein, combining the embedded red component layer, the embedded green component layer and the embedded blue component layer to obtain a watermark-containing image; Applying the formula: , wherein , , are a watermarked red component layer, a watermarked green component layer, a watermarked blue component layer, respectively.
5. A device for embedding and extracting a blind spatial domain digital image watermark based on a modulo operation, characterized in that, wherein the preprocessing of the watermark to be embedded by using the pseudo-random exchange scrambling algorithm comprises: for a watermark W of m*n, the watermark is scanned into a row vector of p*1 according to a certain rule, wherein p=m*n; the row vector is scanned, and an MD5 algorithm is used to generate a pseudo-random number rs, 0≤rs≤p-1, so that the pixels at positions k and rs are exchanged, and a recursive relationship is obtained the p*1 row vector after the exchange is restored into an image of m*n to obtain the preprocessed watermark W*; the substitution of the preprocessed watermark W* and the red component layer into the embedding formula to perform calculation to obtain the embedded red component layer comprises: substituting the preprocessed watermark W* and the red component layer embedding depth Q into the embedding formula to perform calculation; wherein the embedding formula is represented as: The method comprises the following steps: obtaining a host image, performing channel separation on the host image to obtain a red component layer, a green component layer and a blue component layer; obtaining a watermark to be embedded, preprocessing the watermark to be embedded by using a pseudo-random exchange scrambling algorithm to obtain a preprocessed watermark; substituting the preprocessed watermark and the red component layer into an embedding formula to perform calculation to obtain an embedded red component layer; substituting the preprocessed watermark and the green component layer into an embedding formula to perform calculation to obtain an embedded green component layer; substituting the preprocessed watermark and the blue component layer into an embedding formula to perform calculation to obtain an embedded blue component layer; combining the embedded red component layer, the embedded green component layer and the embedded blue component layer to obtain a watermark-containing image; wherein the preprocessing of the watermark to be embedded by using the pseudo-random exchange scrambling algorithm comprises: for a watermark W of m*n, the watermark is scanned into a row vector of p*1 according to a certain rule, wherein p=m*n; the row vector is scanned, and an MD5 algorithm is used to generate a pseudo-random number rs, 0≤rs≤p-1, so that the pixels at positions k and rs are exchanged, and a recursive relationship is obtained the p*1 row vector after the exchange is restored into an image of m*n to obtain the preprocessed watermark W*; the substitution of the preprocessed watermark W* and the red component layer into the embedding formula to perform calculation to obtain the embedded red component layer comprises: substituting the preprocessed watermark W* and the red component layer embedding depth Q into the embedding formula to perform calculation; wherein the embedding formula is represented as: The method comprises the following steps: obtaining a host image, performing channel separation on the host image to obtain a red component layer, a green component layer and a blue component layer; A preprocessing module is configured to obtain a watermark to be embedded, and perform preprocessing on the watermark to be embedded by using a pseudo-random exchange permutation algorithm to obtain a preprocessed watermark; An embedding module is configured to substitute the preprocessed watermark and the red component layer into an embedding formula to obtain an embedded red component layer by calculation; The preprocessed watermark and the green component layer are substituted into an embedding formula to obtain an embedded green component layer by calculation; The preprocessed watermark and the blue component layer are substituted into an embedding formula to obtain an embedded blue component layer by calculation; A merging module is configured to merge the embedded red component layer, the embedded green component layer and the embedded blue component layer to obtain a watermark-containing image. The preprocessing module is specifically configured to: For an m*n watermark W, the watermark is scanned into a p*1 row vector according to a certain rule, where p=m*n; The row vector is scanned, and an MD5 algorithm is used to generate a pseudo-random number rs, 0≤rs≤p-1, so that the pixels at positions k and rs are exchanged, and a recursive relationship is obtained as , wherein , key is a secret key; The p*1 row vector after exchange is restored to an m*n image to obtain a preprocessed watermark W*; The preprocessed watermark and the red component layer are substituted into an embedding formula to obtain an embedded red component layer by calculation, and the embedding formula is as follows: The preprocessing module is specifically configured to: , where i, j are the i-th row and j-th column of the red component layer, Q for embedding depth, the value range is or a real number.
6. A device for embedding and extracting a blind spatial domain digital image watermark based on a modulo operation, characterized in that, A separating module is configured to separate a watermark-containing image obtained by using the space domain digital image blind watermark embedding and extraction device based on the modulo operation to obtain a watermark-containing red component layer, a watermark-containing green component layer and a watermark-containing blue component layer. An extracting module is configured to extract encrypted watermarks in the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer by using an auxiliary matrix. An inverse sequence exchange module is configured to obtain complete encrypted watermarks from the watermark-containing red component layer, the watermark-containing green component layer and the watermark-containing blue component layer, and decrypt the complete encrypted watermarks by using an inverse algorithm of the pseudo-random exchange permutation algorithm to obtain extracted watermarks. The computer program is executed by the processor to implement the space domain digital image blind watermark embedding and extraction method based on the modulo operation.
7. A computer device, comprising: The computer program is executed by the processor to implement the space domain digital image blind watermark embedding and extraction method based on the modulo operation.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that,
Citation Information
Patent Citations
Spatial domain color digital image blind watermarking method fusing discrete wavelet transform
CN108648134A
Color digital image blind watermarking method based on approximate Hadamard transform
CN113191933A