Blind Watermarking Method for Spatial Color Digital Images Incorporating Hadamard Transform
By integrating the blind watermark method of airspace color digital images with Hadamar transform, combined with Hadamar matrix and key encryption technology, the problem of medium and high real-time and high security protection of large-capacity color digital images is solved, and efficient and secure digital watermark embedding and extraction is achieved.
Patent Information
- Application Number
- CN202210223034.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2042-03-09
AI Technical Summary
In the copyright protection of large-capacity color digital images, it is difficult for the prior art to realize high real-time and high security color image digital watermarking methods, especially when facing complex network environments and multiple digital infringement attacks.
The blind watermark method of airspace color digital image fused with Hadamar transform is adopted. Through the specific watermark embedding and extraction process, combined with the characteristics of the airspace digital watermark algorithm and the Hadamar matrix, the invisibility and robustness of the watermark are achieved. This method uses the maximum energy coefficient of Hadamar transform to perform rapid calculation of the airspace, and completes the embedding and extraction of watermarks through variable quantization steps, while using symmetric and asymmetric key encryption methods to improve security.
It realizes the high real-time and high security of color digital watermarks, can effectively resist multiple digital infringement attacks, and maintains good invisibility and robustness, and is suitable for fast, robust and secure protection of digital media copyright.
Smart Images

Figure CN114596191B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information security and relates to the copyright protection of large-capacity color digital images. Background Art
[0002] With the advent of the digital, networked, and information age, the acquisition of resources and the transmission of data are inseparable from the participation of the network, and the Internet has become an indispensable tool in people's daily lives. Currently, the volume of data transmission is increasing exponentially, demanding further increases in network transmission rates and data volumes. In an increasingly complex network context, a series of digital infringement problems such as piracy and tampering have emerged, and the copyright protection of digital products is imminent. To address the issue of digital work infringement, an invisible implicit copyright information embedding method, digital watermarking technology, has emerged.
[0003] Facing the huge amount of information and continuously improving digital image quality nowadays, more groups or individuals tend to choose color images as copyright identifiers. Color digital images have characteristics such as large information content and vivid visual effects, and have gradually become the main carrier of network information dissemination. Therefore, combining the respective advantages of spatial domain watermarking algorithms and frequency domain watermarking algorithms, and designing a high-real-time and high-security color image digital watermarking method while ensuring the invisibility of the watermark and the robustness of the algorithm has become one of the key points and difficulties in the current research of digital watermarking technology. Summary of the Invention
[0004] The purpose of the present invention is to provide a blind watermarking method for color digital images in the spatial domain that integrates Hadamard transform. This method combines the low time complexity of spatial domain digital watermarking algorithms and the energy concentration characteristics of Hadamard matrices, and is characterized by being realized through specific watermark embedding and extraction processes. The watermark embedding process is described as follows:
[0005] First step: Preprocessing of color image digital watermark: First, a 24-bit color image digital watermark W with a pixel size of N×N is divided into 3 layered watermark images W i ; then, each layered watermark image is subjected to an affine transformation based on the key Ka i ; finally, each pixel represented by a decimal number in the encrypted layered watermark image W i ' is represented by 8-bit binary numbers and connected in sequence to form a layered watermark bit sequence SW 2 ' with a length of 8N i ', where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0006] Second step: Obtaining the embedding blocks of the host image: An original color host image C with a pixel size of M×M is divided into 3 layered host images C according to the order of the red, green, and blue primary colorsi ; Meanwhile, divide each hierarchical host image C i into image blocks with a pixel size of m×m; According to the length 8N of the hierarchical watermark bit sequence 2 , use the MD5 hash pseudo-random scrambling algorithm based on the symmetric key Kb i to generate a non-repeating block selection sequence, and then select image blocks in the hierarchical host image C i according to the positions provided by the block selection sequence to randomize the embedding positions, thereby improving the robustness of the watermark against shear attacks, where 8N 2 <= (M×M) / (m×m), where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0007] Step 3: Select an image block A and directly calculate the maximum energy coefficient H in its Hadamard domain according to formula (1) max ;
[0008]
[0009] where m is the number of pixel side lengths of the image block A, and A(x, y) represents the pixel value of the x-th row and y-th column of the image block A;
[0010] Step 4: Take out a bit of the watermark information w to be embedded in sequence from the hierarchical watermark bit sequence SW i ’. According to the embedded watermark information, formula (2), and the inter-layer correlation of the RGB image, select different quantization step sizes T i for quantization of the maximum energy coefficient to obtain the maximum energy coefficient H max * with the embedded watermark;
[0011]
[0012] where r_embed = round((H max ) / T i ), e_cond = xor(mod(r_embed, 2), w), round(.) is the rounding function, xor(.) is the exclusive OR function, mod(.) is the remainder function, and T i is the quantization step size of the i-th layer, T1 = 0.87×T3, T2 = 0.94×T3, and i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0013] Step 5: Use formula (3) to evenly distribute the change amount change of the maximum energy coefficient before and after quantization to all pixels of the image block A to obtain the pixel value A(x, y) after embedding the watermark *, and replace the pixel value A(x, y) at the corresponding position of the original image block with it, then the watermarked image block A can be obtained. * ;
[0014]
[0015] where change = H max * -H max , and m is the number of pixel sides of the image block A;
[0016] Step 6: Update the watermarked image block A * to its corresponding position in the hierarchical host image C i , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0017] Step 7: Repeat steps 3 to 6 of this process until all watermark information is embedded, and thus obtain the watermarked hierarchical host image C i * ; Finally, recombine the red, green, and blue hierarchical host images C with watermarks i * to obtain the watermarked image C with size M×M * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0018] Step 8: Use the integer pairing function to pair and encrypt the important parameters in the above steps to generate a large integer key Ψ, and use the elliptic curve encryption algorithm based on the asymmetric key to encrypt the large integer; among them, the important parameters include the quantization step T3 of the blue channel, the number of pixel sides m of the image block, and the affine transformation key Ka i , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0019] The watermark extraction process is described as follows:
[0020] Step 1: Use the elliptic curve decryption algorithm based on the asymmetric key to obtain the large integer key Ψ, and use the inverse integer pairing function to further decrypt the decrypted large integer to obtain three important parameters T3’, m’, Ka i ’, where T3’ is the decrypted quantization step of the blue channel, m’ is the decrypted number of pixel sides of the image block, and Ka i ’ is the decrypted affine transformation key, where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0021] Step 2: Preprocess the watermarked image: Divide the watermarked image C with pixel size M×M * into 3 hierarchical watermarked images C i* and divide each layered watermarked image C i * into non - overlapping image blocks with a pixel size of m’×m’, where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0022] Step 3: In the layered watermarked image C i * select the watermarked image blocks by using the MD5 hash pseudo - random scrambling algorithm based on the symmetric key Kb i mentioned in the above watermark embedding process;
[0023] Step 4: Select a watermarked image block A * and directly calculate its maximum energy coefficient H in the Hadamard domain in the spatial domain using formula (4) max * ;
[0024]
[0025] where m’ is the number of pixel side lengths of the decrypted watermarked image block A * , A * (x, y) represents the pixel value of the x - th row and y - th column of the watermarked image block A * ;
[0026] Step 5: Using formula (5) and the inter - layer correlation of the RGB image, and according to the quantization step size T3’ of the decrypted blue channel, select different quantization step sizes T i ’ to extract the watermark w * contained in the image block A * ;
[0027]
[0028] where ext_cond = mod(r_ext, 2), r_ext = fix(H max * / T i ’), fix(.) is the near - zero rounding function, mod(.) is the remainder function, T i ’ is the quantization step size of the i - th layer after decryption, T1’ = 0.87×T3’, T2’ = 0.94×T3’, and i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0029] Step 6: Repeat steps 4 and 5 of this process to extract the binary watermark bit sequence SW of each layer i *, and then convert every 8-bit binary information into a decimal pixel value in each group, where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0030] Step 7: Perform the inverse affine transformation on the decimal pixels of each layer after conversion based on the key Ka i ’ and obtain the extracted layered watermark image W i * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0031] Step 8: Combine the extracted layered watermark images W i * to form the final extracted watermark W * , where i = 1, 2, 3 represent the red, green, and blue layers respectively.
[0032] This method uses the fast calculation method of the maximum energy coefficient of the Hadamard transform in the spatial domain and the distribution law of its coefficient change amount in the spatial domain pixels to complete the embedding and blind extraction of color digital watermarks in the spatial domain. At the same time, an encryption method based on symmetric keys and asymmetric keys is adopted to improve security; this method not only achieves good invisibility and strong robustness, but also has high real-time performance and security. Description of the Drawings
[0033] Figure 1 (a), Figure 1 (b) are two original color host images.
[0034] Figure 2 (a), Figure 2 (b) are two original color watermark images.
[0035] Figure 3 (a), Figure 3 (b) are the watermarks obtained by sequentially embedding the watermark shown in Figure 2 (a) into the host images Figure 1 (a), Figure 1 (b). The structural similarity SSIM values are 0.9803 and 0.9862 in sequence, and the peak signal-to-noise ratio PSNR values are 42.8228 dB and 42.8443 dB in sequence.
[0036] Figure 4 (a), Figure 4 (b) are the watermarks extracted from Figure 3 (a), Figure 3 (b) in sequence. The normalized cross-correlation coefficient NC values are 1.00000 and 1.00000 respectively.
[0037] Figure 5 (a), Figure 5(b), Figure 5 (c), Figure 5 (d), Figure 5 (e), Figure 5 (f) is the watermark extracted after subjecting the watermarked image shown in Figure 3 (a) to attacks such as JPEG compression (70), salt-and-pepper noise (0.2%), median filtering (3×3), rotation (45°), scaling (50%), and translation (-10, -10) in sequence. The normalized cross-correlation coefficient NC values are 0.9965, 0.9875, 0.9434, 0.9543, 0.9634, and 0.9608 respectively.
[0038] Figure 6 (a), Figure 6 (b) is obtained by embedding the watermark shown in Figure 2 (b) into the host images Figure 1 (a), Figure 1 (b) in sequence. The structural similarity SSIM values are 0.9813 and 0.9866 in sequence, and the peak signal-to-noise ratio PSNR values are 42.9333 dB and 42.8421 dB in sequence.
[0039] Figure 7 (a), Figure 7 (b) are the watermarks extracted from Figure 6 (a), Figure 6 (b) in sequence. The normalized cross-correlation coefficient NC values are 1.00000 and 1.00000 respectively.
[0040] Figure 8 (a), Figure 8 (b), Figure 8 (c), Figure 8 (d), Figure 8 (e), Figure 8 (f) is the watermark extracted after subjecting the watermarked image shown in Figure 6 (b) to attacks such as JPEG compression (70), salt-and-pepper noise (0.2%), median filtering (3×3), rotation (45°), scaling (50%), and translation (-10, -10) in sequence. The normalized cross-correlation coefficient NC values are 0.9939, 0.9881, 0.8936, 0.9223, 0.9378, and 0.9638 respectively. Detailed implementation manner
[0041] The object of the present invention is to provide a blind watermarking method for spatial domain color digital images integrating Hadamard transform. This method combines the characteristics of low time complexity of spatial domain digital watermarking algorithms and energy concentration of Hadamard matrices, and is characterized in that it is realized through specific watermark embedding and extraction processes. The watermark embedding process is described as follows:
[0042] Step 1: Preprocessing of the color image digital watermark: First, divide a 24-bit color image digital watermark W with a pixel size of 32×32 into 3 hierarchical watermark images W i in the order of red, green, and blue primary colors; then, perform an affine transformation on each hierarchical watermark image based on the key Ka i ; finally, represent each pixel represented by a decimal number in the encrypted hierarchical watermark image W i ’ with 8-bit binary numbers (for example: 216 can be converted into the binary number 11011000), and connect them in sequence to form a hierarchical watermark bit sequence SW 2 with a length of 8×32 i = 8192, where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 2: Obtain the embedding blocks of the host image: Divide an original color host image C with a pixel size of 512×512 into 3 hierarchical host images C i in the order of red, green, and blue primary colors; at the same time, divide each hierarchical host image C i into image blocks with a pixel size of 3×3; according to the length 8N 2 of the hierarchical watermark bit sequence, use the MD5 hash pseudo-random scrambling algorithm based on the symmetric key Kb i to generate a non-repeating block selection sequence, and then select image blocks in the hierarchical host image C i according to the positions provided by the block selection sequence to randomize the embedding positions, thereby improving the robustness of the watermark against shear attacks, where 8192 <= (512×512) / (4×4), and i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0043] Step 3: Select an image block A and directly calculate the maximum energy coefficient H in its Hadamard domain according to formula (1) max ;
[0044]
[0045] where m is the number of pixel rows of the image block A, and A(x, y) represents the pixel value of the x-th row and y-th column of the image block A. Here, assume that the selected image block A is then calculate the maximum energy coefficient H in the Hadamard domain according to formula (5) max * = 3467;
[0046] Step 4: Take out a bit of watermark information w to be embedded in sequence from the hierarchical watermark bit sequence SW i ’, and select different quantization steps T among the layers according to the embedded watermark information, formula (2), and the inter-layer correlation of the RGB imagei Quantify the maximum energy coefficient to obtain the maximum energy coefficient \(H\) of the embedded watermark max * ;
[0047]
[0048] where \(r_{embed}=\text{round}((H max ) / T i ), e_{cond}=\text{xor}(\text{mod}(r_{embed}, 2), w)\), \(\text{round}(.)\) is the rounding function, \(\text{xor}(.)\) is the exclusive - or function, \(\text{mod}(.)\) is the modulo function, \(T i is the quantization step size of the \(i\) - th layer, \(T1 = 0.87\times T3\), \(T2 = 0.94\times T3\), \(i = 1,2,3\) represent the red, green, and blue layers respectively; here, let \(i = 1\), select the watermark bit \(w = '0'\) to be embedded from the layered watermark bit sequence \(SW i '\), \(T1 = 62.4\), then \(r_{embed}=56\), \(e_{cond}=0\), and then according to formula (2), we get \(H max * = 3525.6\); Step 5: Use formula (3) to evenly distribute the change in the maximum energy coefficient before and after quantization, \(\text{change}\), to all pixels of the image block \(A\) to obtain the pixel value \(A(x,y)\) of the watermark - embedded image * and use it to replace the pixel value \(A(x,y)\) at the corresponding position of the original image block, then the watermark - containing image block \(A\) can be obtained * ;
[0049]
[0050] where \(\text{change}=H max * - H max \), \(m\) is the number of pixel sides of the image block \(A\); here, \(\text{change}=58.6\), and then according to formula (3), we get \(A * is
[0051] Step 6: Update the watermark - containing image block \(A * to its corresponding position in the layered host image \(C i where \(i = 1,2,3\) represent the red, green, and blue layers respectively;
[0052] Step 7: Repeat steps 3 to 6 of this process until all watermark information is embedded, and thus the watermark - containing layered host image \(C i * is obtained; finally, the watermark - containing red, green, and blue layered host images \(C i* Recombine and obtain the watermarked image C with a size of 512×512 * , where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0053] Step 8: Use the integer pairing function to pair and encrypt the important parameters in the above steps to generate a large integer key Ψ = 64341, and use the elliptic curve encryption algorithm based on the asymmetric key to encrypt the large integer; among them, the important parameters include the quantization step T3 = 80 of the blue channel, the number of pixels m = 4 on the side length of the image block, and the affine transformation key Ka i = [6, 1], where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0054] The watermark extraction process is described as follows:
[0055] Step 1: Use the elliptic curve decryption algorithm based on the asymmetric key to obtain the large integer key Ψ = 64341, and use the inverse integer pairing function to further decrypt the decrypted large integer to obtain three important parameters T3', m', Ka i ', where T3' is the decrypted quantization step of the blue channel, with a value of 80, m' is the decrypted number of pixels on the side length of the image block, with a value of 4, and Ka i ' is the decrypted affine transformation key, with a value of [6, 1], where i = 1, 2, 3 represent the red, green, and blue layers respectively;
[0056] Step 2: Preprocess the watermarked image: Divide the 512×512 watermarked image H * into 3 layered watermarked images H i * , and at the same time divide each layered watermarked image H i * into non-overlapping image blocks of m'×m', where i = 1, 2, 3 represent the red, green, and blue layers respectively; here, the decrypted side length m' of the watermarked image block is 4;
[0057] Step 3: In the layered watermarked image H i * , use the MD5 hash pseudo-random scrambling algorithm based on the symmetric key Kb i mentioned in the above watermark embedding process to select the watermarked image blocks;
[0058] Step 4: Select a watermarked image block A * , and directly calculate its maximum energy coefficient H in the Hadamard domain in the spatial domain using formula (4) max * ;
[0059]
[0060] Among them, m' is the watermarked image block A decrypted * with the number of side length pixels, and A * (x, y) represents the pixel value of the watermarked image block A * at the x-th row and y-th column; here, assume the watermarked image block A * is Then, the maximum energy coefficient H in the Hadamard domain is calculated according to formula (4) max * = 3531;
[0061] Step 5: Utilize formula (5) and the inter-layer correlation of the RGB image, and according to the quantization step T3' of the decrypted blue channel, select different quantization steps T i ' to extract the watermark w * contained in the image block A * ;
[0062]
[0063] Among them, ext_cond = mod(r_ext, 2), r_ext = fix(H max * / T i '), fix(.) is the function of rounding to the nearest zero, mod(.) is the remainder function, and T i ' is the quantization step of the i-th layer after decryption, T1' = 0.87×T3', T2' = 0.94×T3', and i = 1, 2, 3 respectively represent the red, green, and blue layers; here, assume i = 1, T i = 62.4, then r_ext = 56, ext_cond = 0, and further according to formula (12), the watermark w * contained in the image block A * = 0;
[0064] Step 6: Repeatedly execute the fourth and fifth steps of this process to extract the binary watermark bit sequence SW i * , and then convert every 8-bit binary information into a decimal pixel value, where i = 1, 2, 3 respectively represent the red, green, and blue layers;
[0065] Step 7: Perform the inverse affine transformation on the decimal pixels of each layer after conversion based on the key Ka i ' and obtain the extracted layered watermark image W i * , where i = 1, 2, 3 respectively represent the red, green, and blue layers;
[0066] Step 8: Combine the extracted hierarchical watermark images W i * to form the final extracted watermark W * , where i = 1, 2, 3 represent the red, green, and blue layers respectively.
[0067] While achieving good invisibility and strong robustness, this method also has high real-time performance and security, effectively solving the problem of slow running speed of large-capacity color image digital watermarks, and is suitable for protecting digital media copyrights quickly, robustly, and securely.
[0068] Verification of the effectiveness of the present invention
[0069] To prove the effectiveness of the present invention, two 24-bit standard images with a pixel size of 512×512 as shown in Figure 1 (a), Figure 1 (b) are selected as host images, and two 24-bit color images with a pixel size of 32×32 as shown in Figure 2 (a), Figure 2 (b) are used as digital watermarks for verification.
[0070] Figure 3 (a), Figure 3 (b) are the watermarked images obtained by embedding the watermark shown in Figure 2 (a) into the host images Figure 1 (a), Figure 1 (b) in sequence. Their structural similarity SSIM values are 0.9803 and 0.9862 respectively, and their peak signal-to-noise ratio PSNR values are 42.8228 dB and 42.8443 dB respectively; Figure 4 (a), Figure 4 (b) are the watermarks extracted from Figure 3 (a), Figure 3 (b) in sequence. Their normalized cross-correlation coefficient NC values are 1.00000 and 1.00000 respectively; Figure 5 (a), Figure 5 (b), Figure 5 (c), Figure 5 (d), Figure 5 (e), Figure 5 (f) are the watermarks extracted after subjecting the watermarked image shown in Figure 3 (a) to attacks such as JPEG compression (70), salt-and-pepper noise (0.2%), median filtering (3×3), rotation (45°), scaling (50%), and translation (-10, -10) in sequence. Their normalized cross-correlation coefficient NC values are 0.9965, 0.9875, 0.9434, 0.9543, 0.9634, and 0.9608 respectively.
[0071] Figure 6 (a), Figure 6 (b) is the watermarked image obtained by successively embedding the watermark shown in Figure 2 (b) into the host images Figure 1 (a), Figure 1 (b). The structural similarity SSIM values are 0.9813 and 0.9866 respectively, and the peak signal-to-noise ratio PSNR values are 42.9333 dB and 42.8421 dB respectively; Figure 7 (a), Figure 7 (b) are the watermarks extracted successively from Figure 6 (a), Figure 6 (b). Their normalized cross-correlation coefficient NC values are 1.00000 and 1.00000 respectively; Figure 8 (a), Figure 8 (b), Figure 8 (c), Figure 8 (d), Figure 8 (e), Figure 8 (f) are the watermarks extracted after successively attacking the watermarked image shown in Figure 6 (b) with JPEG compression (70), salt-and-pepper noise (0.2%), median filtering (3×3), rotation (45°), scaling (50%), translation (-10, -10), etc. Their normalized cross-correlation coefficient NC values are 0.9939, 0.9881, 0.8936, 0.9223, 0.9378, and 0.9638 respectively.
[0072] This algorithm has been run nearly ten thousand times on a platform with a 2.30 GHZ CPU, 16.00 GB RAM, Win10, and MATLAB 7.10.0 (R2017a). The average embedding time of the digital watermark is 0.1704 seconds, the average extraction time is 0.1006 seconds, and the total time is 0.2710 seconds.
[0073] The encryption system of this method combines symmetric-key and asymmetric-key encryption algorithms. Among them, the key space of the affine transformation in a single color channel is 2 84 , and the total key space in the three color channels of a color image is 2 252 ; the key space of the MD5 hash pseudo-random scrambling algorithm in a single color channel is 2 21 , and the total key space in the three color channels of a color image is 2 63 ; therefore, the total key space of the symmetric-key encryption algorithm of this method is 2 315 ; in addition, the elliptic curve encryption algorithm based on the asymmetric key can calculate the public key from the private key, and this process is irreversible. Therefore, the elliptic curve encryption algorithm is almost impossible to be cracked when the private key is unknown.
[0074] In summary, the embedded color image digital watermark has good invisibility, meeting the invisibility requirements of the watermark algorithm; moreover, the color image digital watermark extracted from various attacked images has good discriminability and a high NC value, indicating that this method has strong robustness; meanwhile, according to the running time analysis and key space analysis, this method also has high real-time performance and security.
Claims
1. A blind watermarking method for spatial-domain color digital images integrating Hadamard transform, which combines the characteristics of low time complexity of spatial-domain digital watermarking algorithms and energy concentration of Hadamard matrices, and is characterized in that It is implemented through a specific watermark embedding process and extraction process. The watermark embedding process is described as follows: Step 1: Preprocessing of the color image digital watermark: First, divide a 24-bit color image digital watermark W with a pixel size of N×N into 3 layered watermark images W i in the order of red, green, and blue primary colors; then, perform an affine transformation on each layered watermark image based on the key Ka i ; finally, represent each pixel represented by a decimal number in the encrypted layered watermark image W i ’ with 8-bit binary numbers and connect them in sequence to form a layered watermark bit sequence SW 2 ’ with a length of 8N i ’, where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 2: Obtain the embedding blocks of the host image: Divide an original color host image C with a pixel size of M×M into 3 layered host images C in the order of red, green, and blue primary colors i ; at the same time, divide each layered host image C i into image blocks with a pixel size of m×m; according to the length 8N of the layered watermark bit sequence 2 , use the MD5 hash pseudo-random scrambling algorithm based on the symmetric key Kb i to generate a non-repeating block selection sequence, and then select image blocks in the layered host image C i according to the positions provided by the block selection sequence to randomize the embedding positions, thereby improving the robustness of the watermark against shear attacks, where 8N 2 <= (M×M) / (m×m), where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 3: Select an image block A, and directly calculate its maximum energy coefficient H in the Hadamard domain in the spatial domain according to formula (1) max ; Where m is the number of pixel rows and columns of the image block A, and A(x, y) represents the pixel value of the x-th row and y-th column of the image block A; Step 4: Take out a piece of watermark information w to be embedded one by one from the layered watermark bit sequence SW i ’. According to the embedded watermark information, formula (2), and the inter-layer correlation of the RGB image, different quantization steps T i are selected between layers to quantize the maximum energy coefficient, and the maximum energy coefficient H of the embedded watermark is obtained max * ; where \(r\_embed = round((H max ) / T i ), e\_cond = xor(\text{mod}(r\_embed, 2), w)\), \(round(.)\) is the rounding function, \(xor(.)\) is the exclusive - or function, \(\text{mod}(.)\) is the modulo function, \(T i \) is the quantization step of the \(i\) - th layer, \(T1 = 0.87\times T3\), \(T2 = 0.94\times T3\), \(i = 1,2,3\) represent the red, green, and blue layers respectively; Step 5: Using formula (3), evenly distribute the change change in the maximum energy coefficient before and after quantization to all pixels of image block A to obtain the pixel value A(x, y) after embedding the watermark * , and use it to replace the pixel value A(x, y) at the corresponding position of the original image block, then the watermark-containing image block A can be obtained * ; where change = H max * -H max , and m is the number of pixel side lengths of image block A; Step 6: Update the watermarked image block A * to its corresponding position in the layered host image C i where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 7: Repeat Steps 3 to 6 of this process until all the watermark information is embedded, thus obtaining the watermarked layered host image C i * ; Finally, recombine the watermarked red, green, and blue layered host images C i * to obtain the watermarked image C of size M×M * , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 8: Use the integer pairing function to pair-encrypt the important parameters in the above steps to generate a large integer key Ψ, and use the elliptic curve encryption algorithm based on the asymmetric key to encrypt the large integer; where the important parameters include the quantization step T3 of the blue channel, the number of side length pixels m of the image block, and the affine transformation key Ka in the above steps i , where i = 1, 2, 3 represent the red, green, and blue layers respectively; The watermark extraction process is described as follows: Step 1: Use the elliptic curve decryption algorithm based on asymmetric keys to obtain the large integer key Ψ, and further decrypt the decrypted large integer using the inverse integer pairing function to obtain three important parameters T3’, m’, and Ka i ’, where T3’ is the quantization step size of the decrypted blue channel, m’ is the number of side length pixels of the decrypted image block, and Ka i ’ is the decrypted affine transformation key, and i = 1, 2, 3 respectively represent the red, green, and blue layers; Step 2: Preprocessing of the watermarked image: The watermarked image C with a pixel size of M×M * is divided into 3 layered watermarked images C i * , and each layered watermarked image C i * is further divided into non-overlapping image blocks with a pixel size of m’×m’, where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 3: In the layered watermarked image C i * select the watermarked image blocks by using the MD5 hash pseudo-random scrambling algorithm based on the symmetric key Kb i mentioned in the above watermark embedding process; Step 4: Select a watermarked image block A * , and directly calculate the maximum energy coefficient H in the Hadamard domain in the spatial domain using formula (4) max * ; Among them, m’ is the watermarked image block A decrypted * The number of pixel side lengths, A * (x, y) represents the watermarked image block A * The pixel value at the x-th row and y-th column; Step 5: Utilize formula (5) and the inter-layer correlation of the RGB image, and select different quantization step sizes T i ’ between layers according to the decrypted quantization step size T3’ of the blue channel, and extract the watermark w * contained in the image block A * ; where ext_cond = mod(r_ext, 2), r_ext = fix(H max * / T i ’), fix(.) is the near-zero rounding function, mod(.) is the remainder function, T i ’ is the quantization step size of the i-th layer after decryption, T1’ = 0.87 × T3’, T2’ = 0.94 × T3’, and i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 6: Repeat the fourth and fifth steps of this process to extract the binary watermark bit sequence SW of each layer i * , and then convert every 8-bit binary information into a decimal pixel value in a group, where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 7: Perform the inverse affine transformation on each layer of the transformed decimal pixels based on the key Ka i ’ and obtain the extracted layered watermark image W i * , where i = 1, 2, 3 represent the red, green, and blue layers respectively; Step 8: Combine the extracted hierarchical watermark images W i * to form the final extracted watermark W * , where i = 1, 2, 3 represent the red, green, and blue layers respectively.
Citation Information
Patent Citations
Blind watermark implantation method and device, blind watermark detection method and device, equipment and storage medium
CN111932432A
Frequency domain color digital image blind watermarking method based on Walsh-Hadmard Transform (WHT)
CN112508765A