A reversible robust spatial domain color digital image watermarking method
By embedding watermarks in color carrier images, and using discrete Fourier transform and pseudo-random selection algorithms, a reversible color digital image watermark method with high real-time, robustness and invisibility is achieved, solving the problem of difficult to protect color image copyright and integrity in the prior art.
Patent Information
- Application Number
- CN202111465182.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-12-03
AI Technical Summary
It is difficult to design a reversible color digital image watermarking method with high real-time, robustness and invisibility, especially when facing copyright protection and integrity authentication of color images.
By embedding watermarks in color carrier images, watermark embedding, carrier image recovery and watermark extraction are performed in the airspace using discrete Fourier transform and pseudo-random selection algorithms, efficient embedding and extraction of color digital watermarks are achieved.
It realizes the complete recovery of the original carrier image from the watermarked image without being attacked, with high invisibility, strong robustness and high execution efficiency, suitable for copyright protection and integrity verification of color images.
Smart Images

Figure CN114155130B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of information security, and relates to copyright protection and integrity authentication of color digital images with strong robustness and high real-time performance. Background Art
[0002] With the rapid development of the Internet, the acquisition and dissemination of information has become more and more convenient, but at the same time, infringement has become easier, seriously damaging the interests of property owners. Therefore, digital copyright protection is urgent. Therefore, digital watermarking, as an effective method of copyright protection, has attracted the attention of more and more researchers.
[0003] For most digital watermarking methods, the carrier image will have a certain degree of distortion after the watermark is embedded, and cannot be restored to its original form after the watermark is extracted. The characteristic and goal of reversible watermarks is to accurately restore the carrier image. It is generally used for distortion-free protection of important images and has important application value in military images and medical images.
[0004] Currently, most reversible watermarking methods are for grayscale images. In daily life, color images have become the main carrier of multimedia big data dissemination due to their advantages of larger information volume and better visual effects. With the rapid development of big data and the popularization of 5G networks, the processing of digital information now pursues high real-time performance. Therefore, designing a reversible color image digital watermarking method with good invisibility, strong robustness and high real-time performance has become one of the hot spots and difficulties of current digital watermarking technology. Summary of the invention
[0005] The purpose of the present invention is to provide a reversible robust spatial domain color digital image watermarking method, which is characterized by being implemented through three specific processes: watermark embedding, carrier image recovery and watermark extraction. The watermark embedding process is described as follows:
[0006] Step 1: Perform dimensionality reduction on a color carrier image H of size M×M to obtain three layered carrier images H of red, green and blue i , and each layered carrier image H i Divide into non-overlapping pixel blocks of size m×m, where i=1, 2, 3 represent the red, green, and blue layers respectively;
[0007] Step 2: Perform dimensionality reduction on a color watermark image W of size N×N to obtain three layered watermark images W of red, green and blue. i At the same time, in order to improve the security of the watermark, for each layered watermark image W i Based on the key Ka i Logistic chaotic mapping is used to obtain the three scrambled layered watermark images WL i ; Finally, the scrambled layered watermark image WLi Each decimal pixel value in is converted into an 8-bit binary number and connected in sequence to form a hierarchical watermark bit sequence SW i , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0008] Step 3: Use the pseudo-random sequence generated by the MD5 hash pseudo-random selection algorithm based on the key Kb to generate a pseudo-random sequence on the layered carrier image H i Select a pixel block at a random position;
[0009] Step 4: According to formula (1), directly calculate the DC component of the pixel block after discrete Fourier transform in the spatial domain;
[0010]
[0011] Where m is the row and column size of the pixel block block, and f(x,y) is the pixel value of the xth row and yth column of the pixel block;
[0012] Step 5: In order of precedence, select the layered watermark bit sequence SW i Select the watermark position w to be embedded in the watermark; According to the watermark position w to be embedded and formulas (2) and (3), calculate two quantization boundary values DC in the spatial domain low and DC high ;
[0013]
[0014] Among them, floor(.) is the rounding function, and T is the quantization step size;
[0015] Step 6: Use formula (4) to select the optimal quantization value DC';
[0016]
[0017] Among them, abs(.) is the absolute value function;
[0018] Step 7: Using formula (5) and formula (6), calculate the DC coefficient change change and the change tt of each pixel, and save tt into the matrix tc;
[0019] change= DC'-DC (5)
[0020] tt=floor(change / (m×m)) (6)
[0021] Where, floor(.) is the floor rounding function, and m is the size of the row and column of the pixel block;
[0022] Step 8: Use formula (7) to calculate the modified pixel values f in the pixel block * (x, y), and save it to the corresponding position in the temporary watermark pixel block temp;
[0023] f * (x, y)=f(x, y)+tt (7)
[0024] Step 9: Use formula (8) to calculate the pixel values f in the temporary watermark pixel block temp * (x, y) performs overflow judgment. If overflow occurs, the DC coefficient change amount change is modified accordingly to obtain a new DC coefficient change amount change * , and use formula (9) to get the new change tt of each pixel * , and update it to the corresponding position in the matrix tc, and then use formula (10) to calculate the pixel value f after overflow processing ** (x, y), and use it to replace the pixel value f at the corresponding position of the temporary watermarked pixel block temp * (x, y), you can get the final watermarked pixel block * ;
[0025]
[0026] tt * =floor(change * / (m×m)) (9)
[0027] f ** (x, y)=f(x, y)+tt * (10)
[0028] Where T is the quantization step size, floor(.) is the floor rounding function, and m is the size of the row and column of the pixel block;
[0029] Step 10: Block the watermarked pixel blocks * Update to its layered vector image H i The corresponding positions in , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0030] Step 11: Repeat steps 3 to 10 of this process until all watermark information is embedded, thereby obtaining a layered carrier image H containing a watermark. i * ; Combined watermarked layered carrier image H i * Get the watermarked image H * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0031] The carrier image recovery process is described as follows:
[0032] The first step: reduce the dimension of the watermarked image H * Divided into three layered carrier images H containing watermarks: red, green and blue i * At the same time, each layered carrier image H containing a watermark i * Divide into non-overlapping pixel blocks of size m×m, where i=1, 2, 3 represent the red, green, and blue layers respectively;
[0033] Step 2: Use the pseudo-random sequence generated by the MD5 hash pseudo-random selection algorithm based on the key Kb to select the watermark from the layered carrier image H i * Select the pixel block containing the watermark * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0034] Step 3: According to the matrix tc generated in the watermark embedding process, obtain the pixel change tt of the pixel block, and then restore the original carrier pixel block block according to formula (11) ** ;
[0035] block ** =block * -tt (11)
[0036] Step 4: Block the recovered carrier pixels ** Update to its restored layered carrier image H i ** The corresponding positions in , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0037] Step 5: Repeat steps 2 to 4 of this process until all watermarked pixel blocks have been restored to carrier image pixel blocks, thereby obtaining the restored layered carrier image H i ** , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 6: Combine the three layers to restore the carrier image H i ** Get the restored carrier image H ** , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0038] The watermark extraction process is described as follows:
[0039] The first step: reduce the dimension of the watermarked image H * Divided into three layered carrier images H containing watermarks: red, green and bluei * At the same time, each layered carrier image H containing a watermark i * Divide into non-overlapping pixel blocks of size m×m, where i=1, 2, 3 represent the red, green, and blue layers respectively;
[0040] Step 2: Use the pseudo-random sequence generated by the MD5 hash pseudo-random selection algorithm based on the key Kb to select the watermark from the layered carrier image H i * Select the pixel block containing the watermark * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0041] Step 3: According to formula (12), directly calculate the watermark pixel block in the spatial domain * The DC component after discrete Fourier transform * ;
[0042]
[0043] Among them, m is the pixel block containing the watermark * The size of the rows and columns, f * (x,y) is the pixel block containing the watermark * The pixel value at row x and column y;
[0044] Step 4: Use formula (12) to calculate the DC component DC * And formula (13), extract the watermark pixel block * The watermark bits w contained in * ;
[0045]
[0046] Among them, mod(.) is the remainder function, round(.) is the rounding function, and T is the quantization step size;
[0047] Step 5: Repeat steps 2 to 4 of this process until all binary watermark bits are extracted to obtain the extracted binary watermark bit sequence SW i * , then, the extracted binary watermark bit sequence SW i * Each 8-bit binary information in is divided into a group and converted into a decimal pixel value, finally forming the extracted layered scrambled watermark image WL i * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0048] Step 6: Extract the layered scrambled watermark image WL i * Based on the key Ka i The inverse Logistic chaotic map is used to obtain the extracted layered watermark image W i * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0049] Step 7: Combine the extracted layered watermark image W i * Form the final extracted watermark image W * , where i=1, 2, 3 represent the red, green and blue layers respectively.
[0050] This method uses the spatial domain fast calculation method of the maximum energy coefficient of discrete Fourier transform and the distribution law of the coefficient change in the spatial domain pixels to complete the embedding and blind extraction of color digital watermarks in the spatial domain; at the same time, in the absence of attacks, this method can completely restore the original carrier image from the watermarked image, with high invisibility, strong robustness and high execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 (a) Figure 1 (b) are two original color carrier images.
[0052] Figure 2 (a) Figure 2 (b) are two original color watermarked images.
[0053] Figure 3 (a) Figure 3 (b) Figure 2 The watermark shown in (a) is embedded into the carrier image in sequence. Figure 1 (a) Figure 1 The structural similarity SSIM values of the watermarked images obtained after (b) are 0.9813 and 0.9872, respectively, and the peak signal-to-noise ratio PSNR values are 43.5807dB and 43.8107dB, respectively.
[0054] Figure 4 (a) Figure 4 (b) is from Figure 3 (a) Figure 3 The normalized cross-correlation coefficient NC values of the watermarks extracted in (b) are 1.0000 and 1.0000 respectively.
[0055] Figure 5 (a) Figure 5 (b) is from Figure 3 (a) Figure 3The peak signal-to-noise ratio (PSNR) values of the restored carrier image in (b) are ∞ and ∞ respectively.
[0056] Figure 6 (a) Figure 6 (b) Figure 6 (c) Figure 6 (d) Figure 6 (e) Figure 6 (f) Figure 3 The watermark extracted from the watermarked image shown in (a) after being subjected to JPEG compression (70), JPEG 2000 compression (5:1), salt and pepper noise (1%), Gaussian low-pass filtering (3×3), cropping (12.5%), and scaling (50%), has the normalized cross-correlation coefficient NC values of 0.9679, 1.0000, 0.9839, 0.9863, 0.9358, and 0.9903, respectively.
[0057] Figure 7 (a) Figure 7 (b) Figure 2 The watermark shown in (b) is embedded into the carrier image in sequence. Figure 1 (a) Figure 1 The structural similarity SSIM values of the watermarked images obtained after (b) are 0.9807 and 0.9867, respectively, and the peak signal-to-noise ratio PSNR values are 43.5132dB and 43.7758dB, respectively.
[0058] Figure 8 (a) Figure 8 (b) is from Figure 7 (a) Figure 7 The normalized cross-correlation coefficient NC values of the watermarks extracted in (b) are 1.0000 and 1.0000 respectively.
[0059] Fig. 9 (a) Fig. 9 (b) is from Figure 7 (a) Figure 7 The peak signal-to-noise ratio (PSNR) values of the restored carrier image in (b) are ∞ and ∞ respectively.
[0060] Fig.10 (a) Fig.10 (b) Fig.10 (c) Fig.10 (d) Fig.10 (e) Fig.10 (f) Figure 7The watermark extracted from the watermarked image shown in (a) after being subjected to JPEG compression (70), JPEG 2000 compression (5:1), salt and pepper noise (1%), Gaussian low-pass filtering (3×3), cropping (12.5%), and scaling (50%), has normalized cross-correlation coefficients NC values of 0.9797, 1.0000, 0.9914, 0.9926, 0.9565, and 0.9581, respectively. DETAILED DESCRIPTION
[0061] The purpose of the present invention is to provide a reversible robust spatial domain color digital image watermarking method, which is characterized by being implemented through three specific processes: watermark embedding, carrier image recovery and watermark extraction. The watermark embedding process is described as follows:
[0062] Step 1: Perform dimensionality reduction on a color carrier image H of size 512×512 to obtain three layered carrier images H of red, green and blue i , and each layered carrier image H i Divide into non-overlapping pixel blocks of size 2×2, where i=1, 2, 3 represent the red, green, and blue layers respectively;
[0063] Step 2: Perform dimensionality reduction on a color watermark image W of size 32×32 to obtain three layered watermark images W of red, green and blue. i At the same time, in order to improve the security of the watermark, for each layered watermark image W i Based on the key Ka i Logistic chaotic mapping is used to obtain the three scrambled layered watermark images WL i ; Finally, the scrambled layered watermark image WL i Each decimal pixel value in is converted into an 8-bit binary number (for example, the decimal number 125 can be converted into the binary sequence '01111101'), and then connected in sequence to form a hierarchical watermark bit sequence SW i , S.W. i The length is 8×32 2 =8192, where i=1, 2, 3 represent the red, green, and blue layers respectively;
[0064] Step 3: Use the pseudo-random sequence generated by the MD5 hash pseudo-random selection algorithm based on the key Kb to generate a pseudo-random sequence on the layered carrier image H i Select a pixel block at a random position in block; here, let the selected embedded pixel block
[0065] Step 4: According to formula (1), directly calculate the DC component of the pixel block after discrete Fourier transform in the spatial domain;
[0066]
[0067] Wherein, m is the row and column size of the pixel block block, and f(x,y) is the pixel value of the xth row and yth column of the pixel block; here, the row and column size of the pixel block block is m=2, and the calculated DC component of the pixel block block is DC=1018;
[0068] Step 5: In order of precedence, select the layered watermark bit sequence SW i Select the watermark position w to be embedded in the watermark; According to the watermark position w to be embedded and formulas (2) and (3), calculate two quantization boundary values DC in the spatial domain low and DC high ;
[0069]
[0070] Where floor(.) is the rounding function, T is the quantization step size; here, T = 64, the selected watermark bit w = '1', and two quantization boundary values DC are calculated. low =976, DC high =1040;
[0071] Step 6: Use formula (4) to select the optimal quantization value DC';
[0072]
[0073] Where abs(.) is the absolute value function; here, the calculated quantization value DC'=DC high =1040;
[0074] Step 7: Using formula (5) and formula (6), calculate the DC coefficient change change and the change tt of each pixel, and save tt into the matrix tc;
[0075] change= DC'-DC (5)
[0076] tt=floor(change / (m×m)) (6)
[0077] Wherein, m is the size of the row and column of the pixel block, and floor(.) is the floor rounding function; here, the DC coefficient change amount change = 22, and the change amount of each pixel tt = 5;
[0078] Step 8: Use formula (7) to calculate the modified pixel values f in the pixel block * (x, y), and save it to the corresponding position in the temporary watermark pixel block temp;
[0079] f* (x, y)=f(x, y)+tt (7)
[0080] Here, the pixel values f after the pixel block is modified are calculated. * (1,1)=260, f * (1,2)=260,f * (2,1)=259, f * (2,2)=259, then the temporary watermark pixel block
[0081] Step 9: Use formula (8) to calculate the pixel values f in the temporary watermark pixel block temp * (x, y) performs overflow judgment. If overflow occurs, the DC coefficient change amount change is modified accordingly to obtain a new DC coefficient change amount change * , and use formula (9) to get the new change tt of each pixel * , and update it to the corresponding position in the matrix tc, and then use formula (10) to calculate the pixel value f after overflow processing ** (x, y), and use it to replace the pixel value f at the corresponding position of the temporary watermarked pixel block temp * (x, y), you can get the final watermarked pixel block * ;
[0082]
[0083] tt * =floor(change * / (m×m)) (9)
[0084] f ** (x, y)=f(x, y)+tt * (10)
[0085] Wherein, floor(.) is a rounding function; Here, the pixel values f in the temporary watermarked pixel block temp are determined according to formula (8). * (x,y), where f * (1,1)=260>255 has overflowed, so modify the DC coefficient change to get the new DC coefficient change * = -42, at the same time, the new change amount of each pixel tt is calculated according to formula (9): * = -11, and modify the pixel values in the original pixel block again according to formula (10) to obtain the final pixel value containing the watermark f ** (1,1)=244,f **(1,2)=244,f ** (2,1)=243, f ** (2,2)=243, and use it to replace the pixel value f at the corresponding position of the temporary watermarked pixel block * (x, y), get the final watermarked pixel block
[0086] Step 10: Block the watermarked pixel blocks * Update to its layered vector image H i The corresponding positions in , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0087] Step 11: Repeat steps 3 to 10 of this process until all watermark information is embedded, thereby obtaining a layered carrier image H containing a watermark. i * ; Combine three layers of watermarked layered carrier image H i * Get the watermarked image H * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0088] The carrier image recovery process is described as follows:
[0089] The first step: reduce the dimension of the watermarked image H * Divided into three layered carrier images H containing watermarks: red, green and blue i * At the same time, each layered carrier image H containing a watermark i * Divide into non-overlapping pixel blocks of size 2×2, where i=1, 2, 3 represent the red, green, and blue layers respectively;
[0090] Step 2: Use the pseudo-random sequence generated by the MD5 hash pseudo-random selection algorithm based on the key Kb to select the watermark from the layered carrier image H i * Select the pixel block containing the watermark * , where i = 1, 2, 3 represent the red, green, and blue layers respectively; here, the watermarked pixel blocks are selected
[0091] Step 3: According to the matrix tc generated in the watermark embedding process, obtain the pixel change tt of the pixel block, and then restore the original carrier pixel block block according to formula (11) ** ;
[0092] block ** =block * -tt (11)
[0093] Here, the watermark pixel block The change amount of each pixel obtained from the matrix tc is tt=-11, and the restored original carrier pixel block is calculated according to formula (11):
[0094] Step 4: Block the recovered carrier pixels ** Update to its restored layered carrier image H i ** The corresponding positions in , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0095] Step 5: Repeat steps 2 to 4 of this process until all watermarked pixel blocks have been restored to carrier image pixel blocks, thereby obtaining the restored layered carrier image H i ** ;
[0096] Step 6: Combine the three layers to restore the layered carrier image H i ** Get the restored carrier image H ** , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0097] The watermark extraction process is described as follows:
[0098] The first step: reduce the dimension of the watermarked image H * Divided into three layered carrier images H containing watermarks: red, green and blue i * At the same time, each layered carrier image H containing a watermark i * Divide into non-overlapping pixel blocks of size 2×2, where i=1, 2, 3 represent the red, green, and blue layers respectively;
[0099] Step 2: Use the pseudo-random sequence generated by the MD5 hash pseudo-random selection algorithm based on the key Kb to select the watermark from the layered carrier image H i * Select the pixel block containing the watermark * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0100] Step 3: According to formula (12), directly calculate the watermark pixel block in the spatial domain * The DC component after discrete Fourier transform * ;
[0101]
[0102] Among them, m is the pixel block containing the watermark* The size of the rows and columns, f * (x,y) is the pixel block containing the watermark * The pixel value of the xth row and yth column; here, the watermark pixel block block * The size of the row and column is m = 2, and the watermark pixel block is calculated. * The DC component after discrete Fourier transform * =974;
[0103] Step 4: Based on the calculated DC component * , and use formula (13) to extract the watermark bit w * ;
[0104]
[0105] Among them, mod(.) is the remainder function, round(.) is the rounding function, and T is the quantization step size; here, the DC component DC * =974, quantization step size T = 64, according to formula (13), mod(round(DC * ),T)=14<0.5×T=32, extract the watermark position w * ='1';
[0106] Step 5: Repeat steps 2 to 4 of this process until all binary watermark bits are extracted to obtain the extracted binary watermark bit sequence SW i * , then, the extracted binary watermark bit sequence SW i * Each 8-bit binary information is divided into a group and converted into a decimal pixel value, and finally the extracted layered scrambled watermark image WL is formed. i * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0107] Step 6: Extract the layered scrambled watermark image WL i * Based on the key Ka i The inverse Logistic chaotic map is used to obtain the extracted layered watermark image W i * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0108] Step 7: Combine the extracted layered watermark image W i * Form the final extracted watermark image W * , where i=1, 2, 3 represent the red, green and blue layers respectively.
[0109] This method not only has strong watermark robustness and good carrier reversibility, but also has high algorithm real-time performance. It is suitable for efficient copyright protection of color images as digital watermarks, and also for integrity verification of carrier images.
[0110] Verification of the effectiveness of the present invention
[0111] In order to prove the effectiveness of the present invention, Figure 1 (a) Figure 1 (b) shows two 24-bit standard color images of size 512×512 as carrier images, and are respectively used as Figure 2 (a) Figure 2 (b) shows two 24-bit color images of size 32×32 as digital watermarks for verification.
[0112] Figure 3 (a) Figure 3 (b) Figure 2 The watermark shown in (a) is embedded into the carrier image in sequence. Figure 1 (a) Figure 1 The structural similarity SSIM values of the watermarked images obtained after (b) are 0.9813 and 0.9872, respectively, and the peak signal-to-noise ratio PSNR values are 43.5807dB and 43.8107dB, respectively.
[0113] Figure 4 (a) Figure 4 (b) is from Figure 3 (a) Figure 3 The normalized cross-correlation coefficient NC values of the watermarks extracted in (b) are 1.0000 and 1.0000 respectively.
[0114] Figure 5 (a) Figure 5 (b) is from Figure 3 (a) Figure 3 The peak signal-to-noise ratio (PSNR) values of the restored carrier image in (b) are ∞ and ∞ respectively.
[0115] Figure 6 (a) Figure 6 (b) Figure 6 (c) Figure 6 (d) Figure 6 (e) Figure 6 (f) Figure 3The watermark extracted from the watermarked image shown in (a) after being subjected to JPEG compression (70), JPEG 2000 compression (5:1), salt and pepper noise (1%), Gaussian low-pass filtering (3×3), cropping (12.5%), and scaling (50%), has the normalized cross-correlation coefficient NC values of 0.9679, 1.0000, 0.9839, 0.9863, 0.9358, and 0.9903, respectively.
[0116] Figure 7 (a) Figure 7 (b) Figure 2 The watermark shown in (b) is embedded into the carrier image in sequence. Figure 1 (a) Figure 1 The structural similarity SSIM values of the watermarked images obtained after (b) are 0.9807 and 0.9867, respectively, and the peak signal-to-noise ratio PSNR values are 43.5132dB and 43.7758dB, respectively.
[0117] Figure 8 (a) Figure 8 (b) is from Figure 7 (a) Figure 7 The normalized cross-correlation coefficient NC values of the watermarks extracted in (b) are 1.0000 and 1.0000 respectively.
[0118] Fig. 9 (a) Fig. 9 (b) is from Figure 7 (a) Figure 7 The peak signal-to-noise ratio (PSNR) values of the restored carrier image in (b) are ∞ and ∞ respectively.
[0119] Fig.10 (a) Fig.10 (b) Fig.10 (c) Fig.10 (d) Fig.10 (e) Fig.10 (f) Figure 7 The watermark extracted from the watermarked image shown in (a) after being subjected to JPEG compression (70), JPEG 2000 compression (5:1), salt and pepper noise (1%), Gaussian low-pass filtering (3×3), cropping (12.5%), and scaling (50%), has normalized cross-correlation coefficients NC values of 0.9797, 1.0000, 0.9914, 0.9926, 0.9565, and 0.9581, respectively.
[0120] The algorithm has been run nearly 10,000 times on the platform 2.30GHz CPU, 16.0GB RAM, Win10, MATLAB (R2017a). The average embedding time of the digital watermark is 0.141927 seconds, the average extraction time is 0.097656 seconds, the average recovery time is 0.058159 seconds, and the total time is 0.297742 seconds.
[0121] In summary, when not under attack, the watermark can be completely extracted and the carrier image can be completely reversible. The embedded digital image watermark has high invisibility, which meets the invisibility requirement of the watermark algorithm. At the same time, the digital image watermarks extracted from various attacked images have good identifiability and high NC values, indicating that the method has strong robustness. In addition, the average total running time of the algorithm is less than 0.5 seconds, which meets the needs of rapid copyright protection of multimedia big data.
Claims
1. A reversible robust spatial domain color digital image watermarking method, characterized in that It is achieved through three specific processes: watermark embedding, carrier image recovery and watermark extraction. The watermark embedding process is described as follows: Step 1: Perform dimensionality reduction on a color carrier image H of size M×M to obtain three layered carrier images H of red, green and blue i , and each layered carrier image H i Divide into non-overlapping pixel blocks of size m×m, where i=1,2,3 represents the red, green, and blue layers respectively; Step 2: Perform dimensionality reduction on a color watermark image W of size N×N to obtain three layered watermark images W of red, green and blue. i At the same time, in order to improve the security of the watermark, for each layered watermark image W i Based on the key Ka i Logistic chaotic mapping is used to obtain the three scrambled layered watermark images WL i ; Finally, the scrambled layered watermark image WL i Each decimal pixel value in is converted into an 8-bit binary number and connected in sequence to form a hierarchical watermark bit sequence SW i , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 3: Use the pseudo-random sequence generated by the MD5 hash pseudo-random selection algorithm based on the key Kb to generate a pseudo-random sequence on the layered carrier image H i Select a pixel block at a random position; Step 4: According to formula (1), directly calculate the DC component of the pixel block after discrete Fourier transform in the spatial domain; Where m is the row and column size of the pixel block block, and f(x,y) is the pixel value of the xth row and yth column of the pixel block; Step 5: In order of precedence, select the layered watermark bit sequence SW i Select the watermark position w to be embedded in the watermark; According to the watermark position w to be embedded and formulas (2) and (3), calculate two quantization boundary values DC in the spatial domain low and DC high ; Among them, floor(.) is the rounding function, and T is the quantization step size; Step 6: Use formula (4) to select the optimal quantization value DC'; Among them, abs(.) is the absolute value function; Step 7: Using formula (5) and formula (6), calculate the DC coefficient change change and the change tt of each pixel, and save tt into the matrix tc; change= DC'-DC (5) tt=floor(change / (m×m)) (6) Where, floor(.) is the floor rounding function, and m is the size of the row and column of the pixel block; Step 8: Use formula (7) to calculate the modified pixel values f in the pixel block * (x, y), and save it to the corresponding position in the temporary watermark pixel block temp; f * (x, y)=f(x, y)+tt (7) Step 9: Use formula (8) to calculate the pixel values f in the temporary watermark pixel block temp * (x, y) performs overflow judgment. If overflow occurs, the DC coefficient change amount change is modified accordingly to obtain a new DC coefficient change amount change * , and use formula (9) to get the new change tt of each pixel * , and update it to the corresponding position in the matrix tc, and then use formula (10) to calculate the pixel value f after overflow processing ** (x, y), and use it to replace the pixel value f at the corresponding position of the temporary watermarked pixel block temp * (x, y), you can get the final watermarked pixel block * ; tt * =floor(change * / (m×m)) (9) f ** (x, y)=f(x, y)+tt * (10) Where T is the quantization step size, floor(.) is the floor rounding function, and m is the size of the row and column of the pixel block; Step 10: Block the watermarked pixel blocks * Update to its layered vector image H i The corresponding positions in , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 11: Repeat steps 3 to 10 of this process until all watermark information is embedded, thereby obtaining a layered carrier image H containing a watermark. i * ; Combined watermarked layered carrier image H i * Get the watermarked image H * , where i = 1, 2, 3 represent the red, green, and blue layers respectively; The carrier image recovery process is described as follows: The first step: reduce the dimension of the watermarked image H * Divided into three layered carrier images H containing watermarks: red, green and blue i * At the same time, each layered carrier image H containing a watermark i * Divide into non-overlapping pixel blocks of size m×m, where i=1,2,3 represents the red, green, and blue layers respectively; Step 2: Use the pseudo-random sequence generated by the MD5 hash pseudo-random selection algorithm based on the key Kb to select the watermark from the layered carrier image H i * Select the watermark pixel block * , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 3: According to the matrix tc generated in the watermark embedding process, obtain the pixel change tt of the pixel block, and then restore the original carrier pixel block block according to formula (11) ** ; block ** =block * -tt (11) Step 4: Block the recovered carrier pixels ** Update to its restored layered carrier image H i ** The corresponding positions in , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 5: Repeat steps 2 to 4 of this process until all watermarked pixel blocks have been restored to carrier image pixel blocks, thereby obtaining the restored layered carrier image H i ** , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 6: Combine the three layers to restore the carrier image H i ** Get the restored carrier image H ** , where i = 1, 2, 3 represent the red, green, and blue layers respectively; The watermark extraction process is described as follows: The first step: reduce the dimension of the watermarked image H * Divided into three layered carrier images H containing watermarks: red, green and blue i * At the same time, each layered carrier image H containing a watermark i * Divide into non-overlapping pixel blocks of size m×m, where i=1,2,3 represents the red, green, and blue layers respectively; Step 2: Use the pseudo-random sequence generated by the MD5 hash pseudo-random selection algorithm based on the key Kb to select the watermark from the layered carrier image H i * Select the watermark pixel block * , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 3: According to formula (12), directly calculate the watermark pixel block in the spatial domain * The DC component after discrete Fourier transform * ; Among them, m is the pixel block containing the watermark * The size of the rows and columns, f * (x,y) is the pixel block containing the watermark * The pixel value at row x and column y; Step 4: Use formula (12) to calculate the DC component DC * And formula (13), extract the watermark pixel block * The watermark bits w contained in * ; Among them, mod(.) is the remainder function, round(.) is the rounding function, and T is the quantization step size; Step 5: Repeat steps 2 to 4 of this process until all binary watermark bits are extracted to obtain the extracted binary watermark bit sequence SW i * , then, the extracted binary watermark bit sequence SW i * Each 8-bit binary information in is divided into a group and converted into a decimal pixel value, finally forming the extracted layered scrambled watermark image WL i * ,in i=1,2,3 represent the red, green and blue layers respectively; Step 6: Extract the layered scrambled watermark image WL i * Based on the key Ka i The inverse Logistic chaotic map is used to obtain the extracted layered watermark image W i * , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 7: Combine the extracted layered watermark image W i * Form the final extracted watermark image W * , where i=1, 2, 3 represent the red, green and blue layers respectively.