Color image blind watermarking method based on two-dimensional quantization index modulation
By using two-dimensional quantization index modulation technology, optimizing quantization strategies and frequency domain transformations, and embedding and extracting color image watermarks, the problems of insufficient robustness and invisibility of color image watermarking algorithms are solved, achieving strong robustness and high invisibility of digital media copyright protection.
Patent Information
- Application Number
- CN202511495863.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-01-09
AI Technical Summary
In existing technologies, color image watermarking algorithms lack robustness and invisibility, making it difficult to effectively protect the copyright of digital images and combat piracy.
By employing two-dimensional quantization index modulation technology, optimizing the quantization strategy, and utilizing key-driven two-dimensional logic to adjust the sine mapping and frequency domain transformation, watermark information is embedded and extracted, thereby enhancing the robustness and invisibility of the watermark.
It achieves high robustness and high invisibility of color image watermarking, and can effectively extract watermarks under various attacks, meeting the needs of digital media copyright protection.
Smart Images

Figure CN121304424A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and relates to, but is not limited to, a method for blind watermarking of color images based on two-dimensional quantization index modulation. Background Technology
[0002] With the widespread dissemination and use of digital images across various fields, their value as information carriers is increasingly prominent. However, this has also brought new challenges to copyright protection, such as illegal copying, alteration, and dissemination, which not only infringe upon the rights of creators but also affect the authenticity and credibility of image content. Digital watermarking technology has therefore become a crucial means of protecting copyright, combating piracy, and verifying the source of information. In recent years, as the requirements for visual presentation and information expression in copyright markings have continuously increased, color image watermarking has received widespread attention due to its higher information carrying capacity and aesthetic appeal. Therefore, there is an urgent need for a robust, highly invisible, and high-capacity color image blind watermarking processing method. Summary of the Invention
[0003] To address the aforementioned problems in the prior art, this application provides a color image blind watermarking method based on two-dimensional quantization index modulation, aiming to enhance the robustness of watermarking processing by optimizing the quantization strategy using two-dimensional quantization index modulation technology.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a method for blind watermarking of color images based on two-dimensional quantization index modulation, the method including a watermark embedding process: Step 1: Dimensionality reduction is performed on the acquired color digital watermark image to obtain three-channel grayscale watermark images; for each channel, the sine mapping is adjusted using key Ka to drive two-dimensional logic, and the grayscale watermark image of that channel is encrypted to obtain the encrypted grayscale watermark image of that channel; the pixel values of each pixel in the encrypted grayscale watermark image of that channel are converted from decimal to 8-bit binary form, and then connected sequentially according to the positional relationship of each pixel to obtain the watermark sequence of the grayscale watermark image of that channel; Step 2: Perform dimensionality reduction processing on the acquired color host image to obtain a grayscale host image with three channels; for each channel, divide the grayscale host image of the channel into non-overlapping pixel blocks of a preset size to obtain multiple first pixel blocks; Step 3: Based on the length of the watermark sequence of the grayscale watermark image of the channel, generate a pseudo-random sequence using a random function and store it as a key Kb; based on the key Kb, select multiple second pixel blocks from multiple first pixel blocks of the grayscale host image of the channel; Step 4: For each second pixel block, perform a Discrete Fourier Transform on the second pixel block to obtain the frequency domain coefficient block of the second pixel block, and take the real part. Then, perform a Laplace Transform on the real part of the frequency domain coefficient block of the second pixel block to obtain the second-order frequency domain coefficient block of the second pixel block. Finally, select the energy coefficient at the top left corner from the second-order frequency domain coefficient block of the second pixel block. and the energy coefficient in the upper right corner ; Step 5: Construct a first two-dimensional Cartesian coordinate system to embed the watermark information, let... Corresponding to the x-axis direction, and Corresponding to the y-axis direction, the two-dimensional carrier coefficient is obtained; the embedding reference point of the second pixel block is defined according to the embedding reference point calculation formula. The formula for calculating the embedded reference point is: ; in, The x-coordinate of the embedding reference point of the second pixel block; The ordinate of the embedding reference point of the second pixel block; This is a function that rounds down to zero. Preset watermark quantization step size; Step 6: Determine the position of the two-dimensional carrier coefficient of the second pixel block in the first two-dimensional Cartesian coordinate system according to the first preset formula. The first preset formula is: ; in, It is the remainder function; Let x be the x-coordinate of the position point of the two-dimensional carrier coefficient of the second pixel block in the first two-dimensional Cartesian coordinate system; The ordinate of the position point of the two-dimensional carrier coefficient of the second pixel block in the first two-dimensional Cartesian coordinate system; Step 7: Define quantization points A=(0.25, 0.25), B=(0.25, 0.75), C=(0.75, 0.25), and D=(0.75, 0.75); define cosets S0={A, B} and S1={C, D} based on the watermark information read from the watermark sequence of the grayscale watermark image of the channel; Step 8: Read one watermark information w to be embedded sequentially from the watermark sequence of the grayscale watermark image of the channel, select the corresponding coset according to the value of w, and calculate the point according to the optimal embedding position calculation formula. The Euclidean distance between the given point and all candidate points P in the corresponding coset; where... , and point The nearest P is chosen as the optimal embedding position for the second pixel block. The formula for calculating the optimal embedding position is: ; Where w is a bit of watermark information to be embedded, read from the watermark sequence of the grayscale watermark image of the channel, and the bit value of w is 0 or 1. When the bit value of w is 0, select the quantization point with the smallest Euclidean distance between the quantization point in coset S0 and the position point of the two-dimensional carrier coefficient of the second pixel block in the grayscale host image of the channel in the first two-dimensional Cartesian coordinate system. When the bit value of w is 1, select the quantization point with the smallest Euclidean distance between the quantization point in coset S1 and the position point of the two-dimensional carrier coefficient of the second pixel block in the grayscale host image of the channel in the first two-dimensional Cartesian coordinate system. Step 9: According to the second preset formula group, Mapping back to the spatial domain yields the energy coefficient of the top-left corner of the quantized second pixel block. and the energy coefficient in the upper right corner The second preset formula group is: ; in, The x-coordinate of the optimal embedding point of the second pixel block; The ordinate of the optimal embedding point of the second pixel block; Step 10: and Update the second-order frequency domain coefficient block to the second pixel block to obtain the second-order frequency domain coefficient block of the watermarked second pixel block; perform an inverse Laplace transform on the second-order frequency domain coefficient block of the watermarked second pixel block to obtain the frequency domain coefficient block of the watermarked second pixel block, and perform an inverse discrete Fourier transform on the imaginary part of the frequency domain coefficient block of the second pixel block to obtain the second pixel block of the watermarked second pixel block; Step 11: Update multiple watermarked second pixel blocks to multiple original second pixel blocks to obtain a grayscale host image of the watermarked channel; and reconstruct the watermarked grayscale host images of the three channels to obtain a watermarked color host image.
[0005] In some embodiments, the method further includes a watermark extraction process: Step 1: Dimensionally reduce the host image containing watermark information to obtain three channels of watermarked grayscale host image; for each channel, divide the channel watermarked grayscale host image into non-overlapping pixel blocks of a preset size to obtain multiple third pixel blocks; Step 2: Based on the pseudo-random sequence of key Kb, select the pixel block containing watermark information from multiple third pixel blocks to obtain the fourth pixel block; Step 3: For each fourth pixel block, perform a Discrete Fourier Transform on the fourth pixel block to obtain the frequency domain coefficient block of the fourth pixel block, and take the real part. Then, perform a Laplace Transform on the real part of the frequency domain coefficient block of the fourth pixel block to obtain the second-order frequency domain coefficient block of the fourth pixel block. Finally, select the energy coefficient at the top left corner from the second-order frequency domain coefficient block of the fourth pixel block. and the energy coefficient in the upper right corner ; Step 4: Construct a second two-dimensional Cartesian coordinate system to extract watermark information, let... Corresponding to the x-axis direction, and Corresponding to the y-axis direction, the two-dimensional carrier coefficient is obtained; the extraction reference point of the fourth pixel block is defined according to the extraction reference point calculation formula. The formula for calculating the extracted reference point is: ; in, The x-coordinate of the extraction reference point for the fourth pixel block; The ordinate of the extraction reference point for the fourth pixel block; Step 5: Determine the first position point of the two-dimensional carrier coefficient of the fourth pixel block in the second two-dimensional Cartesian coordinate system according to the third preset formula. The third preset formula is: ; in, Let x be the abscissa of the first position point of the two-dimensional carrier coefficient of the fourth pixel block in the second two-dimensional Cartesian coordinate system. The ordinate of the first position point of the two-dimensional carrier coefficient of the fourth pixel block in the second two-dimensional Cartesian coordinate system; Step 6: Calculate the points The Euclidean distances to four quantized points A, B, C, and D are used to obtain four distance values: distanceA, distanceB, distanceC, and distanceD. Then, based on the minimum distance calculation formula, the point is obtained. The minimum Euclidean distance to the four quantization points A, B, C, and D; the formula for calculating the minimum distance is: ; in, It is a function for calculating the minimum value; Step 7: Determine the watermark extraction position according to the watermark extraction position calculation formula; the watermark extraction position calculation formula is as follows: ; Among them, w * To extract the watermark position; Step 8: Based on the extracted watermark bit of the fourth pixel block, obtain the watermark sequence of the grayscale host image with watermark in the channel. Group each 8-bit binary information in the watermark sequence of the grayscale host image with watermark in the channel into a group to obtain multiple groups of binary information. Convert each group of binary information into decimal to obtain the decimal watermark sequence of the grayscale host image with watermark in the channel. Step 9: Decrypt the decimal watermark sequence of the grayscale host image containing the watermark in the channel using a two-dimensional logic adjustment sine mapping driven by key Ka to obtain the grayscale watermark image of the channel, and reconstruct the grayscale watermark images of the three channels to obtain the final color digital watermark image.
[0006] This application provides a blind watermarking method for color images based on two-dimensional quantization index modulation. This method innovatively utilizes two-dimensional quantization index modulation technology and enhances the robustness of watermarking processing by optimizing the quantization strategy. Furthermore, this method not only possesses good invisibility but also good robustness, solving the problems of poor robustness and low invisibility in color image digital watermarking algorithms. It is suitable for applications requiring strong robustness and high invisibility for digital media copyright protection. Attached Figure Description
[0007] Figure 1 A raw color host image with a size of 512×512×3; Figure 2 The original color watermark image is 32×32×3 pixels in size; Figure 3 The watermarked image obtained by embedding the original color watermark image into the original color host image; Figure 4 The watermarked image is extracted from the watermarked image; Figure 5 This refers to the watermarked image extracted after performing various attacks on a watermarked image. Figure 5 (a) is to Figure 3 The watermarked image shown is the watermarked image extracted after a JPEG (compression factor 90) attack. Figure 5 (b) for the purpose of Figure 3 The watermarked image shown is the watermarked image extracted after a JPEG2000 (compression ratio 4:1) attack on the watermarked image. The watermarked image is the watermarked image extracted after a compression ratio of 4:1. Figure 5 (c) is for Figure 3 The watermarked image shown is the watermarked image extracted after being subjected to a salt and pepper noise (1%) attack. Figure 5 (d) is for Figure 3 The watermarked image shown is the watermarked image extracted after a Gaussian low-pass filter (5×5) attack. Figure 5 (e) is for Figure 3The watermarked image shown is extracted after a cropping attack (1:128; 1:128) on the watermarked image shown. Figure 5 (f) is for Figure 3 The watermarked image shown is the watermarked image extracted after being scaled (400%). Figure 5 (g) is for Figure 3 The watermarked image shown is the watermarked image extracted after being rotated (15°) by an attack. Figure 5 (h) is for Figure 3 The watermarked image shown is extracted after a translation (35, -25) attack on the watermarked image. Figure 5 (i) is for Figure 3 The watermarked image shown is the watermarked image extracted after performing an affine (0.01, 0.01) attack. Figure 5 (j) is for Figure 3 The watermarked image shown is the watermarked image extracted after being subjected to a slant transform attack (50, 1; 512, 60; 450, 512; 1, 400). Detailed Implementation
[0008] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0009] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0010] It should be noted that the terms "first, second, and third" used in the embodiments of this application are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0011] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0012] Example 1 This application provides a method for blind watermarking of color images based on two-dimensional quantization index modulation, the method including a watermark embedding process: Step 1: Dimensionality reduction is performed on the acquired color digital watermark image to obtain three-channel grayscale watermark images; for each channel, the sine mapping is adjusted using key Ka to drive two-dimensional logic, and the grayscale watermark image of that channel is encrypted to obtain the encrypted grayscale watermark image of that channel; the pixel values of each pixel in the encrypted grayscale watermark image of that channel are converted from decimal to 8-bit binary form, and then connected sequentially according to the positional relationship of each pixel to obtain the watermark sequence of the grayscale watermark image of that channel.
[0013] In some embodiments, a color digital watermark image W of size N×N×3 is subjected to dimensionality reduction processing to obtain three layered watermark images W. i These correspond to the R, G, and B color channels, respectively. N is the number of edge pixels in the color digital watermark image (e.g., N=32); i=1, 2, 3, representing the R, G, and B channels, respectively. A preset key Ka (e.g., Ka=[0.56823603, 0.00427592, 0.71750067]) drives the two-dimensional logic to adjust the sine map, affecting W. i Encryption is performed to obtain the encrypted W. i ; encrypt the W i Each pixel value is converted from decimal to 8 bits of binary (e.g., a pixel value of 168 is converted to binary as 10101000), and then concatenated sequentially to generate the encrypted W. i Watermark sequence SW i .
[0014] Step 2: Perform dimensionality reduction processing on the acquired color host image to obtain a grayscale host image with three channels; for each channel, divide the grayscale host image of the channel into non-overlapping pixel blocks of a preset size to obtain multiple first pixel blocks.
[0015] In some embodiments, a color host image H of size M×M×3 is dimensionality-reduced to obtain three hierarchical host images H. i These correspond to the R, G, and B color channels, respectively. Where M is the number of edge pixels in the color host image (e.g., M=512); i=1, 2, 3, representing the R, G, and B channels, respectively; each H... i Divide into non-overlapping pixel blocks of size 4×4, and obtain H i Multiple first pixel blocks.
[0016] Step 3: Based on the length of the watermark sequence of the grayscale watermark image of the channel, generate a pseudo-random sequence using a random function and store it as a key Kb; based on the key Kb, select multiple second pixel blocks from multiple first pixel blocks of the grayscale host image of the channel.
[0017] In some embodiments, according to W i SW i The length of the sequence is used to generate a pseudo-random sequence using a random function and stored as a key Kb (e.g., Kb=[9472, 524, ..., x). n [, n=24576); based on the key Kb from H i Multiple first pixel blocks are filtered to select multiple second pixel blocks.
[0018] Step 4: For each second pixel block, perform a Discrete Fourier Transform on the second pixel block to obtain the frequency domain coefficient block of the second pixel block, and take the real part. Then, perform a Laplace Transform on the real part of the frequency domain coefficient block of the second pixel block to obtain the second-order frequency domain coefficient block of the second pixel block. Finally, select the energy coefficient at the top left corner from the second-order frequency domain coefficient block of the second pixel block. and the energy coefficient in the upper right corner .
[0019] In some embodiments, from H i Select one pixel block from multiple second pixel blocks ,right Performing a discrete Fourier transform yields The frequency domain coefficient block is taken, and its real part ft is extracted. Then, a Laplace transform is performed on ft to obtain... The second-order frequency domain coefficient block lt. Select the energy coefficient from the top left corner of lt. and the energy coefficient in the upper right corner Here, let: ,but , , , .
[0020] Step 5: Construct a first two-dimensional Cartesian coordinate system to embed the watermark information, let... Corresponding to the x-axis direction, and Corresponding to the y-axis direction, the two-dimensional carrier coefficient is obtained; the embedding reference point of the second pixel block is defined according to the embedding reference point calculation formula. The formula for calculating the embedded reference point is: Formula (1); in, The x-coordinate of the embedding reference point of the second pixel block; The ordinate of the embedding reference point of the second pixel block; This is a function that rounds down to zero. This is the preset watermark quantization step size.
[0021] In some embodiments, a first two-dimensional Cartesian coordinate system is constructed to embed watermark information, such that... Corresponding to the x-axis direction, Corresponding to the y-axis direction, a two-dimensional carrier coefficient is thus defined. The preset T=480 is defined according to the above formula (1). of : ; .
[0022] Step 6: Determine the position of the two-dimensional carrier coefficient of the second pixel block in the first two-dimensional Cartesian coordinate system according to the first preset formula. The first preset formula is: Formula (2); in, It is the remainder function; Let x be the x-coordinate of the position point of the two-dimensional carrier coefficient of the second pixel block in the first two-dimensional Cartesian coordinate system; Let y be the ordinate of the position point of the two-dimensional carrier coefficient of the second pixel block in the first two-dimensional Cartesian coordinate system.
[0023] In some embodiments, the determination is made according to the above formula (2). point : ; ; .
[0024] Step 7: Define quantization points A=(0.25, 0.25), B=(0.25, 0.75), C=(0.75, 0.25), and D=(0.75, 0.75); define cosets S0={A, B} and S1={C, D} based on the watermark information read from the watermark sequence of the grayscale watermark image of the channel.
[0025] In some embodiments, quantization points are defined as A = (0.25, 0.25), B = (0.25, 0.75), C = (0.75, 0.25), and D = (0.75, 0.75); based on the SW... i The watermark information read from the machine defines cosets S0={A, B} and S1={C, D}.
[0026] Step 8: Read one watermark information w to be embedded sequentially from the watermark sequence of the grayscale watermark image of the channel, select the corresponding coset according to the value of w, and calculate the point according to the optimal embedding position calculation formula. The Euclidean distance between the given point and all candidate points P in the corresponding coset; where... , and point The nearest P is chosen as the optimal embedding position for the second pixel block. The formula for calculating the optimal embedding position is: Formula (3); Where w is a bit of watermark information to be embedded, read from the watermark sequence of the grayscale watermark image of the channel, and the bit value of w is 0 or 1. When the bit value of w is 0, select the quantization point with the smallest Euclidean distance between the quantization point in coset S0 and the position point of the two-dimensional carrier coefficient of the second pixel block in the grayscale host image of the channel in the first two-dimensional Cartesian coordinate system. When the bit value of w is 1, the quantization point corresponding to the smallest Euclidean distance between the quantization point in coset S1 and the position point of the two-dimensional carrier coefficient of the second pixel block in the grayscale host image of the channel in the first two-dimensional Cartesian coordinate system is selected.
[0027] In some embodiments, the point is calculated according to the above formula (3). The Euclidean distance between the given binary sequence and all candidate points P in the corresponding coset is given if one bit w=1 in the binary sequence. .
[0028] Step 9: According to the second preset formula group, Mapping back to the spatial domain yields the energy coefficient of the top-left corner of the quantized second pixel block. and the energy coefficient in the upper right corner The second preset formula group is: Formula (4); in, The x-coordinate of the optimal embedding point of the second pixel block; The ordinate of the optimal embedding point for the second pixel block.
[0029] In some embodiments, of coordinates and The coordinates of point loc are substituted into the above formula (4) for calculation (i.e., point loc) * Mapping back to the spatial domain), we get of and .Right now: .
[0030] .
[0031] Step 10: and Update the second-order frequency domain coefficient block to the second pixel block to obtain the second-order frequency domain coefficient block of the watermarked second pixel block; perform an inverse Laplace transform on the second-order frequency domain coefficient block of the watermarked second pixel block to obtain the frequency domain coefficient block of the watermarked second pixel block, and perform an inverse discrete Fourier transform on the imaginary part of the frequency domain coefficient block of the second pixel block to obtain the watermarked second pixel block.
[0032] In some embodiments, of and Updated to lt, resulting in a watermarked second-order frequency domain coefficient block lt. * Then, for lt * Perform the inverse Laplace transform to obtain the watermarked frequency domain coefficient block ft. * And by performing an inverse discrete Fourier transform on the imaginary part, the watermarked blo is obtained. * ;at this time, , , .
[0033] Step 11: Update multiple watermarked second pixel blocks to multiple original second pixel blocks to obtain a grayscale host image of the watermarked channel; and reconstruct the watermarked grayscale host images of the three channels to obtain a watermarked color host image.
[0034] In some embodiments, multiple watermarked [items] are updated. To multiple original To obtain the watermarked Hi * And reconstruct the three watermarked H... i * To obtain the watermarked H * .
[0035] In some embodiments, the method further includes a watermark extraction process: Step 1: Dimensionally reduce the host image containing watermark information to obtain three channels of watermarked grayscale host image; for each channel, divide the channel watermarked grayscale host image into non-overlapping pixel blocks of a preset size to obtain multiple third pixel blocks.
[0036] In some embodiments, the watermarked image H * Dimensionality reduction was performed to obtain three layered, watermarked, single-channel images H. i * These correspond to the R, G, and B color channels, respectively. Then each H... i * Divide the pixels into non-overlapping 4×4 blocks to obtain multiple third pixel blocks.
[0037] Step 2: Based on the pseudo-random sequence of key Kb, select the pixel block containing watermark information from multiple third pixel blocks to obtain the fourth pixel block.
[0038] In some embodiments, based on the key Kb in the above watermark embedding process (e.g., Kb=[9472, 524, ..., x...), n A pseudo-random sequence (n=24576) from H i * By selecting the pixel blocks containing watermark information from each third pixel block, we obtain H. i * Multiple fourth pixel blocks.
[0039] Step 3: For each fourth pixel block, perform a Discrete Fourier Transform on the fourth pixel block to obtain the frequency domain coefficient block of the fourth pixel block, and take the real part. Then, perform a Laplace Transform on the real part of the frequency domain coefficient block of the fourth pixel block to obtain the second-order frequency domain coefficient block of the fourth pixel block. Finally, select the energy coefficient at the top left corner from the second-order frequency domain coefficient block of the fourth pixel block. and the energy coefficient in the upper right corner .
[0040] In some embodiments, from H i * Select one pixel block from multiple fourth pixel blocks ,right Performing a discrete Fourier transform yields... The frequency domain coefficient block, taking the real part ft * , and then to ft * Performing the Laplace transform yields Second-order frequency domain coefficient block lt * , from lt * Selected from and .
[0041] For example, , , , , .
[0042] Step 4: Construct a second two-dimensional Cartesian coordinate system to extract watermark information, let... Corresponding to the x-axis direction, and Corresponding to the y-axis direction, the two-dimensional carrier coefficient is obtained; the extraction reference point of the fourth pixel block is defined according to the extraction reference point calculation formula. The formula for calculating the extracted reference point is: Formula (5); in, The x-coordinate of the extraction reference point for the fourth pixel block; The vertical coordinate of the extraction reference point for the fourth pixel block.
[0043] In some embodiments, a second two-dimensional Cartesian coordinate system is constructed to extract watermark information, and... Corresponding to the x-axis direction, Corresponding to the y-axis direction, a two-dimensional carrier coefficient is thus defined. Based on the above watermark embedding, T=480, as defined by formula (5) Extraction benchmark : , .
[0044] Step 5: Determine the first position point of the two-dimensional carrier coefficient of the fourth pixel block in the second two-dimensional Cartesian coordinate system according to the third preset formula. ; The third preset formula is: Formula (6); in, Let x be the abscissa of the first position point of the two-dimensional carrier coefficient of the fourth pixel block in the second two-dimensional Cartesian coordinate system. Let y be the ordinate of the first position point of the two-dimensional carrier coefficient of the fourth pixel block in the second two-dimensional Cartesian coordinate system.
[0045] In some embodiments, the determination is made according to the above formula (6). point .Right now: .
[0046] Step 6: Calculate the points The Euclidean distances to four quantized points A, B, C, and D are used to obtain four distance values: distanceA, distanceB, distanceC, and distanceD. Then, based on the minimum distance calculation formula, the point is obtained. The minimum Euclidean distance to the four quantization points A, B, C, and D; the formula for calculating the minimum distance is: Formula (7); in, It is a function for calculating the minimum value.
[0047] In some embodiments, the minimum distance is calculated according to the above formula (7). , distanceA=0.7283, distanceB=0.5355, distanceC=0.4950, distanceD=0.0360, then minDistanc=distanceD=0.0360.
[0048] Step 7: Determine the watermark extraction position according to the watermark extraction position calculation formula; the watermark extraction position calculation formula is as follows: Formula (8); Among them, w * To extract the watermark location.
[0049] In some embodiments, the watermark position w is obtained according to the above formula (8). * =1, consistent with the assumptions made about the watermark information w during the embedding process.
[0050] Step 8: Based on the extracted watermark bits of the fourth pixel block, obtain the watermark sequence of the grayscale host image with watermark in the channel. Group each 8-bit binary information in the watermark sequence of the grayscale host image with watermark in the channel into a group to obtain multiple groups of binary information. Convert each group of binary information into decimal to obtain the decimal watermark sequence of the grayscale host image with watermark in the channel.
[0051] In some embodiments, according to Extract the watermark bit to obtain H i* SW i * , will H i * SW i * Each 8-bit binary information is grouped into a group, resulting in multiple groups of binary information. Each group of binary information is then converted to decimal to obtain H. i * decimal sequence SW i ** .
[0052] Step 9: Decrypt the decimal watermark sequence of the grayscale host image containing the watermark in the channel using a two-dimensional logic adjustment sine mapping driven by key Ka to obtain the grayscale watermark image of the channel, and reconstruct the grayscale watermark images of the three channels to obtain the final color digital watermark image.
[0053] In some embodiments, H i * decimal sequence SW i ** Decryption is performed using a two-dimensional logic-adjusted sine map driven by a key Ka (e.g., Ka = [0.56823603, 0.00427592, 0.71750067]), yielding W. i * and reorganize the three Ws i * To obtain the final W * .
[0054] To verify the effectiveness of the embodiments of this application, the following were selected: Figure 1 The 24-bit standard image shown is 512×512×3 in size, used as the original color host image, and is then processed using... Figure 2 The 24-bit color image shown, with a size of 32×32×3, is used as the original color watermark image for verification.
[0055] Figure 3 For the purposes of this application Figure 2 The original color watermark image shown is embedded in Figure 1 The watermarked image obtained after processing the original color host image has a peak signal-to-noise ratio (PSNR) of 40.215 dB. Figure 4 From Figure 3 The watermark image extracted from the watermarked image shown has a normalized cross correlation (NC) value of 1.000.
[0056] Figure 5This refers to the watermarked image extracted after performing various attacks on a watermarked image. Figure 5 (a) is to Figure 3 The watermarked image shown is the watermarked image extracted after a JPEG (compression factor 90) attack. Figure 5 (b) for the purpose of Figure 3 The watermarked image shown is the watermarked image extracted after a JPEG2000 (compression ratio 4:1) attack on the watermarked image. The watermarked image is the watermarked image extracted after a compression ratio of 4:1. Figure 5 (c) is for Figure 3 The watermarked image shown is the watermarked image extracted after being subjected to a salt and pepper noise (1%) attack. Figure 5 (d) is for Figure 3 The watermarked image shown is the watermarked image extracted after a Gaussian low-pass filter (5×5) attack. Figure 5 (e) is for Figure 3 The watermarked image shown is extracted after a cropping attack (1:128; 1:128) on the watermarked image shown. Figure 5 (f) is for Figure 3 The watermarked image shown is the watermarked image extracted after being scaled (400%). Figure 5 (g) is for Figure 3 The watermarked image shown is the watermarked image extracted after being rotated (15°) by an attack. Figure 5 (h) is for Figure 3 The watermarked image shown is extracted after a translation (35, -25) attack on the watermarked image. Figure 5 (i) is for Figure 3 The watermarked image shown is the watermarked image extracted after performing an affine (0.01, 0.01) attack. Figure 5 (j) is for Figure 3 The watermarked images shown are extracted after the watermarked images are subjected to a slant transform attack (50, 1; 512, 60; 450, 512; 1, 400); their normalized cross-correlation coefficients (NC) are 1.000, 1.000, 0.964, 0.986, 0.940, 1.000, 0.978, 0.984, 0.835, and 0.809, respectively.
[0057] The embodiment of this application runs in a total time of 0.316 seconds on a 1.00GHz Central Processing Unit (CPU), 16.00GB Random Access Memory (RAM), Win 11 and MATLAB (R2021a) environment.
[0058] In summary, the color image digital watermark embedded in the embodiments of this application has good invisibility, which meets the invisibility requirement of watermarking algorithms; at the same time, the color image digital watermark extracted from various attacked images has good identifiability and high NC value, indicating that the embodiments of this application have strong robustness; in addition, the average total running time of the algorithm is less than 1.000 seconds, which meets the needs of rapid copyright protection for multimedia big data.
[0059] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0060] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0061] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0062] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A blind watermarking method for color images based on two-dimensional quantization index modulation, characterized in that, The method includes a watermark embedding process: Step 1: Perform dimensionality reduction processing on the acquired color digital watermark image to obtain a grayscale watermark image with three channels; For each channel, the sine mapping is adjusted using key Ka to drive two-dimensional logic, and the grayscale watermark image of the channel is encrypted to obtain the encrypted grayscale watermark image of the channel. The pixel values in the encrypted grayscale watermark image of the channel are converted from decimal to 8-bit binary form and connected sequentially according to the positional relationship of each pixel to obtain the watermark sequence of the grayscale watermark image of the channel. Step 2: Perform dimensionality reduction processing on the acquired color host image to obtain a grayscale host image with three channels; for each channel, divide the grayscale host image of the channel into non-overlapping pixel blocks of a preset size to obtain multiple first pixel blocks; Step 3: Based on the length of the watermark sequence of the grayscale watermark image of the channel, generate a pseudo-random sequence using a random function and store it as a key Kb; based on the key Kb, select multiple second pixel blocks from multiple first pixel blocks of the grayscale host image of the channel; Step 4: For each second pixel block, perform a Discrete Fourier Transform on the second pixel block to obtain the frequency domain coefficient block of the second pixel block, and take the real part. Then, perform a Laplace Transform on the real part of the frequency domain coefficient block of the second pixel block to obtain the second-order frequency domain coefficient block of the second pixel block. Finally, select the energy coefficient at the top left corner from the second-order frequency domain coefficient block of the second pixel block. and the energy coefficient in the upper right corner ; Step 5: Construct a first two-dimensional Cartesian coordinate system to embed the watermark information, let... Corresponding to the x-axis direction, and Corresponding to the y-axis direction, the two-dimensional carrier coefficient is obtained; the embedding reference point of the second pixel block is defined according to the embedding reference point calculation formula. The formula for calculating the embedded reference point is: ; in, The x-coordinate of the embedding reference point of the second pixel block; The ordinate of the embedding reference point of the second pixel block; This is a function that rounds down to zero. Preset watermark quantization step size; Step 6: Determine the position of the two-dimensional carrier coefficient of the second pixel block in the first two-dimensional Cartesian coordinate system according to the first preset formula. The first preset formula is: ; in, It is the remainder function; Let x be the x-coordinate of the position point of the two-dimensional carrier coefficient of the second pixel block in the first two-dimensional Cartesian coordinate system; The ordinate of the position point of the two-dimensional carrier coefficient of the second pixel block in the first two-dimensional Cartesian coordinate system; Step 7: Define quantization points A=(0.25, 0.25), B=(0.25, 0.75), C=(0.75, 0.25), and D=(0.75, 0.75); define cosets S0={A, B} and S1={C, D} based on the watermark information read from the watermark sequence of the grayscale watermark image of the channel; Step 8: Read one watermark information w to be embedded sequentially from the watermark sequence of the grayscale watermark image of the channel, select the corresponding coset according to the value of w, and calculate the point according to the optimal embedding position calculation formula. The Euclidean distance between the given point and all candidate points P in the corresponding coset; where... , and point The nearest P is chosen as the optimal embedding position for the second pixel block. The formula for calculating the optimal embedding position is: ; Where w is a bit of watermark information to be embedded, read from the watermark sequence of the grayscale watermark image of the channel, and the bit value of w is 0 or 1. When the bit value of w is 0, select the quantization point with the smallest Euclidean distance between the quantization point in coset S0 and the position point of the two-dimensional carrier coefficient of the second pixel block in the grayscale host image of the channel in the first two-dimensional Cartesian coordinate system. When the bit value of w is 1, select the quantization point with the smallest Euclidean distance between the quantization point in coset S1 and the position point of the two-dimensional carrier coefficient of the second pixel block in the grayscale host image of the channel in the first two-dimensional Cartesian coordinate system. Step 9: According to the second preset formula group, Mapping back to the spatial domain yields the energy coefficient of the top-left corner of the quantized second pixel block. and the energy coefficient in the upper right corner The second preset formula group is: ; in, The x-coordinate of the optimal embedding point of the second pixel block; The ordinate of the optimal embedding point of the second pixel block; Step 10: and Update the second-order frequency domain coefficient block to the second pixel block to obtain the second-order frequency domain coefficient block of the watermarked second pixel block; perform an inverse Laplace transform on the second-order frequency domain coefficient block of the watermarked second pixel block to obtain the frequency domain coefficient block of the watermarked second pixel block, and perform an inverse discrete Fourier transform on the imaginary part of the frequency domain coefficient block of the second pixel block to obtain the watermarked second pixel block; Step 11: Update multiple watermarked second pixel blocks to multiple original second pixel blocks to obtain a grayscale host image of the watermarked channel; and reconstruct the watermarked grayscale host images of the three channels to obtain a watermarked color host image.
2. The color image blind watermarking method based on two-dimensional quantization index modulation according to claim 1, characterized in that, The method also includes a watermark extraction process: Step 1: Dimensionally reduce the host image containing watermark information to obtain three channels of watermarked grayscale host image; for each channel, divide the channel watermarked grayscale host image into non-overlapping pixel blocks of a preset size to obtain multiple third pixel blocks; Step 2: Based on the pseudo-random sequence of key Kb, select the pixel block containing watermark information from multiple third pixel blocks to obtain the fourth pixel block; Step 3: For each fourth pixel block, perform a Discrete Fourier Transform on the fourth pixel block to obtain the frequency domain coefficient block of the fourth pixel block, and take the real part. Then, perform a Laplace Transform on the real part of the frequency domain coefficient block of the fourth pixel block to obtain the second-order frequency domain coefficient block of the fourth pixel block. Finally, select the energy coefficient at the top left corner from the second-order frequency domain coefficient block of the fourth pixel block. and the energy coefficient in the upper right corner ; Step 4: Construct a second two-dimensional Cartesian coordinate system to extract watermark information, let... Corresponding to the x-axis direction, and Corresponding to the y-axis direction, the two-dimensional carrier coefficient is obtained; the extraction reference point of the fourth pixel block is defined according to the extraction reference point calculation formula. The formula for calculating the extracted reference point is: ; in, The x-coordinate of the extraction reference point for the fourth pixel block; The ordinate of the extraction reference point for the fourth pixel block; Step 5: Determine the first position point of the two-dimensional carrier coefficient of the fourth pixel block in the second two-dimensional Cartesian coordinate system according to the third preset formula. The third preset formula is: ; in, Let x be the abscissa of the first position point of the two-dimensional carrier coefficient of the fourth pixel block in the second two-dimensional Cartesian coordinate system. The ordinate of the first position point of the two-dimensional carrier coefficient of the fourth pixel block in the second two-dimensional Cartesian coordinate system; Step 6: Calculate the points The Euclidean distances to four quantized points A, B, C, and D are used to obtain four distance values: distanceA, distanceB, distanceC, and distanceD. Then, based on the minimum distance calculation formula, the point is obtained. The minimum Euclidean distance to the four quantization points A, B, C, and D; the formula for calculating the minimum distance is: ; in, It is a function for calculating the minimum value; Step 7: Determine the watermark extraction position according to the watermark extraction position calculation formula; the watermark extraction position calculation formula is as follows: ; Among them, w * To extract the watermark position; Step 8: Based on the extracted watermark bit of the fourth pixel block, obtain the watermark sequence of the grayscale host image with watermark in the channel. Group each 8-bit binary information in the watermark sequence of the grayscale host image with watermark in the channel into a group to obtain multiple groups of binary information. Convert each group of binary information into decimal to obtain the decimal watermark sequence of the grayscale host image with watermark in the channel. Step 9: Decrypt the decimal watermark sequence of the grayscale host image containing the watermark in the channel using a two-dimensional logic adjustment sine mapping driven by key Ka to obtain the grayscale watermark image of the channel, and reconstruct the grayscale watermark images of the three channels to obtain the final color digital watermark image.
