Dual color data image watermarking, image watermark embedding, image watermark extraction method and system

By employing a dual-color data image watermarking method, utilizing HDNA encoding and a three-dimensional chaotic system to encrypt color images, and combining it with QR decomposition technology, the method solves the problems of invisibility, robustness, and insufficient security of existing color image watermarking technologies, thus achieving efficient and secure copyright protection.

CN122390940APending Publication Date: 2026-07-14INNER MONGOLIA ELECTRIC POWER (GRP) CO LTD DIGITAL RES BRANCH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INNER MONGOLIA ELECTRIC POWER (GRP) CO LTD DIGITAL RES BRANCH
Filing Date
2026-02-25
Publication Date
2026-07-14

Smart Images

  • Figure CN122390940A_ABST
    Figure CN122390940A_ABST
Patent Text Reader

Abstract

The present application relates to the field of digital image watermarking technology in information security, and provides a double color data image watermarking, image watermarking embedding, image watermarking extraction method and system. The double color data image watermarking method comprises an embedding process and an extraction process. In the embedding process, the color watermarking image W is encrypted by using HDNA, Mandelbrot graph and three-dimensional IPCM chaotic system to obtain an encrypted watermarking; the color carrier image is decomposed by QR decomposition, and then the encrypted watermarking is embedded into the color carrier image. In the extraction process, the encrypted watermarking information is extracted by QR decomposition, and then the original color watermarking information is extracted from the encrypted watermarking information by HDNA and Mandelbrot graph. The present application provides a safe, transparent and efficient double color image watermarking method, which has the advantages of high security, strong robustness, large copyright information capacity and fast operation speed, and has stronger application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital image watermarking technology in information security, and particularly to a dual-color data image watermarking, image watermark embedding, and image watermark extraction method and system. Background Technology

[0002] As the cornerstone of modern information society, network and communication technologies are driving the digital transformation of society. The acquisition and dissemination of massive amounts of multimedia information, such as documents, digital images, audio, and video, are becoming increasingly convenient. At the same time, the problems of piracy, tampering, and illegal use of multimedia information are becoming increasingly serious. Traditional cryptographic methods cannot effectively solve these problems, while digital watermarking technology, by embedding copyright information into multimedia carrier data and tracking the use of the carrier data, can achieve the purposes of copyright protection and integrity authentication of multimedia data.

[0003] Digital image watermarking technology has developed into a relatively mature technical system over the years, mainly focusing on three core objectives: imperceptibility, robustness, and security. Classified by embedding domain, it is primarily divided into spatial domain watermarking and transform domain watermarking; by watermark visibility, it is mainly divided into visible watermarking and invisible watermarking; and by watermark characteristics, it is mainly divided into robust watermarking, fragile watermarking, and semi-fragile watermarking. Spatial domain watermarking is computationally simple and has strong real-time performance, but its resistance to attacks is weak. Transform domain watermarking has strong robustness, but it involves conversion from the spatial domain to the transform domain, requiring higher computational costs. Most existing watermarking algorithms use grayscale images as test carriers, and the embedded watermarks are mostly binary or grayscale images. Summary of the Invention

[0004] In response to existing image watermarking methods, this invention proposes a dual-color data image watermarking, image watermark embedding, and image watermark extraction method and system.

[0005] In a first aspect, the present invention provides a dual-color data image watermarking method, comprising:

[0006] Get size The color carrier image and its size are The color watermark image is cropped from a complex graphic set, and an encrypted template image of the same size as the color watermark image is generated. Then, three random numbers are generated by iterative calculation using a three-dimensional chaotic system.

[0007] Separate the RGB three primary color components of the color carrier image, the color watermark image, and the encryption template image to obtain the three component matrices of the color carrier image, the three component matrices of the color watermark image, and the three component matrices of the encryption template image, respectively.

[0008] Using the HDNA encoding rules and the three random numbers, the three component matrices of the color watermark image and the three component matrices of the encrypted template image are converted into three encrypted sequence matrices as the three sequence matrices of the encrypted watermark image.

[0009] The three component matrices of the color carrier image are divided into non-overlapping components. Image patches, select from A number of image blocks are selected, and the three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain a color image with embedded watermark.

[0010] Separate the RGB three primary color components of the watermarked color image to obtain the three component matrices of the watermarked color image;

[0011] The three component matrices of the watermarked color image are divided into non-overlapping components. Image patches, select from A number of image blocks are used to extract the three component matrices of watermark information using QR decomposition.

[0012] Using the HDNA encoding rules and the three random numbers, the three component matrices of the watermark information and the three component matrices of the encrypted template image are converted into three decryption sequence matrices, which are then merged to obtain the decrypted watermark image.

[0013] Furthermore, the step of cropping an encrypted template image of the same size as the color watermark image from a complex image set specifically includes:

[0014] The image center position, iteration number, image resolution, and a tiny range of magnification around the image center position are set. The calculation range of the complex plane is defined based on the image center position and the tiny range of magnification around the image center position.

[0015] Generate within the computational range of the complex plane The grid coordinate matrix is ​​obtained, and the grid points are converted into complex numbers to obtain the initial trajectory points. ;

[0016] according to Initialize a matrix to record the escape time of each trajectory point. The Mandelbrot iterative formula is executed repeatedly to determine the current trajectory point. Is it within the escape radius? If it is still within the escape radius, then the escape time... Add 1; where the Mandelbrot iterative formula is as follows:

[0017]

[0018] in, To represent a complex number, Indicates the first The trajectory points of the next iteration;

[0019] right Take the logarithm, and according to The size of the Mandelbrot set generated on the complex plane mesh at an extremely small scale is... Fine structure image And cut out a piece of size from it. Encrypted template image .

[0020] Furthermore, the method of generating three random numbers through iterative computation using a three-dimensional chaotic system specifically includes:

[0021] Arbitrarily select three random initial values, and use a 3D IPCM chaotic system to generate a length of... Three real-valued chaotic sequences , and Discard the sequence respectively , and Center front 1 value, resulting in three lengths. sequence , and The 3D IPCM chaotic system is shown below:

[0022]

[0023] in, , and Indicates system parameters;

[0024] Will , and The values ​​of each element in the array are processed as follows: , , convert the sequence and Rearrange the data in descending order, and then rearrange the sequence. The data in the sequence is rearranged in ascending order, and the position index of each element in the original sequence is used to replace the corresponding element in the rearranged sequence, resulting in three sequences composed of position indices. , and ;

[0025] Three random numbers are calculated based on the three sequences using the following formula. , and :

[0026]

[0027]

[0028] .

[0029] Furthermore, the step of using HDNA encoding rules and the three random numbers to convert the three component matrices of the color watermark image and the three component matrices of the encrypted template image into three encrypted sequence matrices as the three sequence matrices of the encrypted watermark image specifically includes:

[0030] The three component matrices of the color watermark image and the three component matrices of the encrypted template image are first converted from decimal matrices to octal matrices and then to binary matrices.

[0031] Using the HDNA encoding rules and the three random numbers, the converted binary matrix is ​​converted into six HDNA sequence matrices respectively;

[0032] Perform an HDNA XOR operation on the six HDNA sequence matrices to obtain three encrypted sequence matrices.

[0033] Furthermore, the three component matrices of the color carrier image are divided into non-overlapping components of size [missing information]. Image blocks, select from Each image block is used to embed the three sequence matrices of the encrypted watermarked image into a selected image block using QR decomposition, resulting in a watermarked image block, specifically including:

[0034] The three component matrices of the color carrier image are respectively divided into: Given a set of non-overlapping b×b image patches, generate a random number generator of length [length missing]. sequence Each position index in the sequence corresponds to an image patch. The random numbers in the sequence are rearranged in ascending order. Each random number in the sorted sequence is replaced with its index in the original sequence, resulting in an index sequence. The first number is selected based on this index sequence. Image blocks corresponding to each index;

[0035] Convert the three sequence matrices of the three encrypted watermarked images into binary matrices, and then select... Each image block is decomposed using QR decomposition. The three binary sequence matrices of the three encrypted watermark images are embedded into the decomposed R value, and then an inverse QR transform is performed to obtain the watermarked image block.

[0036] Furthermore, the three component matrices of the watermarked color image are divided into non-overlapping components. Image patches, select from For each image patch, QR decomposition is used to extract the three component matrices of the watermark information, specifically including:

[0037] The three component matrices of the watermarked color image are divided into: Given a set of non-overlapping b×b image patches, generate a random number generator of length [length missing]. sequence Each position index in the sequence corresponds to an image patch. The random numbers in the sequence are rearranged in ascending order. Each random number in the sorted sequence is replaced with its index in the original sequence, resulting in an index sequence. The first number is selected based on this index sequence. Image blocks corresponding to each index;

[0038] Select Each image block is subjected to QR decomposition, and the watermark information is extracted based on the obtained R value, resulting in a three-component matrix of the watermark information.

[0039] Furthermore, the process of using HDNA encoding rules and the three random numbers to convert the three component matrices of the watermark information and the three component matrices of the encrypted template image into three decryption sequence matrices, and then merging them to obtain the decrypted watermark image, specifically includes:

[0040] The three component matrices of the encrypted template image are first converted from decimal matrices to octal matrices and then to binary matrices;

[0041] Using the HDNA encoding rules and the three random numbers, the converted binary matrix and the three component matrices of the watermark information are respectively converted into six HDNA sequence matrices;

[0042] Perform an HDNA XOR operation on the six HDNA sequence matrices to obtain three encrypted sequence matrices;

[0043] The three encrypted sequence matrices are first converted into binary matrices, then into octal matrices, and finally into decimal matrices. The three decimal matrices are then merged to obtain the decrypted watermark image.

[0044] Secondly, the present invention provides an image watermark embedding method, comprising:

[0045] Get size The color carrier image and its size are The color watermark image is cropped from a complex graphic set, and an encrypted template image of the same size as the color watermark image is generated. Then, three random numbers are generated by iterative calculation using a three-dimensional chaotic system.

[0046] Separate the RGB three primary color components of the color carrier image, the color watermark image, and the encryption template image to obtain the three component matrices of the color carrier image, the three component matrices of the color watermark image, and the three component matrices of the encryption template image, respectively.

[0047] Using the HDNA encoding rules and the three random numbers, the three component matrices of the color watermark image and the three component matrices of the encrypted template image are converted into three encrypted sequence matrices as the three sequence matrices of the encrypted watermark image.

[0048] The three component matrices of the color carrier image are divided into non-overlapping components. Image patches, select from A number of image blocks are selected, and the three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain a color image with embedded watermark.

[0049] Thirdly, the present invention provides an image watermark extraction method, comprising:

[0050] Obtain the three component matrices and three random numbers of the encrypted template image when embedding the watermark;

[0051] Separate the RGB three primary color components of the watermarked color image to obtain the three component matrices of the watermarked color image;

[0052] The three component matrices of the watermarked color image are divided into non-overlapping components. Image patches, select from A number of image blocks are used to extract the three component matrices of watermark information using QR decomposition.

[0053] Using the HDNA encoding rules and the three random numbers, the three component matrices of the watermark information and the three component matrices of the encrypted template image are converted into three decryption sequence matrices, which are then merged to obtain the decrypted watermark image.

[0054] Fourthly, the present invention provides a dual-color data image watermarking system, comprising:

[0055] Image acquisition module, used to acquire images of size The color carrier image and its size are The color watermark image is cropped from a complex graphic set, and an encrypted template image of the same size as the color watermark image is generated. Then, three random numbers are generated by iterative calculation using a three-dimensional chaotic system.

[0056] The first image preprocessing module is used to separate the RGB three primary color components of the color carrier image, the color watermark image and the encryption template image, and obtain the three component matrices of the color carrier image, the three component matrices of the color watermark image and the three component matrices of the encryption template image respectively.

[0057] The watermark encryption module is used to convert the three component matrices of the color watermark image and the three component matrices of the encryption template image into three encryption sequence matrices as the three sequence matrices of the encrypted watermark image by using the HDNA encoding rules and the three random numbers.

[0058] The watermark embedding module is used to divide the three component matrices of the color carrier image into non-overlapping components. Image patches, select from A number of image blocks are selected, and the three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain a color image with embedded watermark.

[0059] The second image preprocessing module is used to separate the RGB three primary color components of the color image with embedded watermark to obtain the three component matrices of the color image with embedded watermark.

[0060] The watermark extraction module is used to divide the three component matrices of the watermark-embedded color image into non-overlapping components. Image patches, select from A number of image blocks are used to extract the three component matrices of watermark information using QR decomposition.

[0061] The watermark decryption module is used to convert the three component matrices of the watermark information and the three component matrices of the encrypted template image into three decryption sequence matrices using HDNA encoding rules and the three random numbers, and then merge them to obtain the decrypted watermark image.

[0062] The beneficial effects of this invention are as follows:

[0063] This invention addresses the shortcomings of existing image watermarking methods by improving the invisibility, robustness, security, and expanded embedded information capacity of watermarks. It provides a dual-color digital image watermarking method with advantages such as security, efficiency, strong robustness, and large amount of copyright information, and has greater application value.

[0064] This invention utilizes color watermarked images, enabling digital products to carry richer copyright information and better protect their copyright. Before embedding the watermark, the dual-color image digital watermarking method provided by this invention first encrypts the color watermark using HDNA, Mandelbrot graphs, and a three-dimensional IPCM chaotic system, ensuring the security of the digital watermarking system. This encryption method has advantages such as high security, large key space, and high key sensitivity. The dual-color image digital watermarking embedding method provided by this invention fully utilizes QR decomposition technology and human visual characteristics, giving the dual-color image digital watermarking scheme good invisibility and strong robustness, as well as high efficiency and a large capacity for embedded watermark information. Attached Figure Description

[0065] Figure 1 A flowchart illustrating the dual-color data image watermarking method provided in an embodiment of the present invention;

[0066] Figure 2 This is a flowchart of the dual-color watermark image embedding process provided in an embodiment of the present invention;

[0067] Figure 3 The color carrier image and color watermark image provided in the embodiments of the present invention; wherein (a) is a color Lena carrier image, and (b) is a color Logo watermark image;

[0068] Figure 4 The encrypted watermark image provided in this embodiment of the invention is a color watermark image after encryption.

[0069] Figure 5 This is a flowchart illustrating the image watermark embedding method provided in an embodiment of the present invention;

[0070] Figure 6 This is a schematic flowchart of the image watermark extraction method provided in an embodiment of the present invention;

[0071] Figure 7 This is a schematic diagram of the structure of a dual-color data image watermarking system provided in an embodiment of the present invention;

[0072] Figure 8 The embodiments of the present invention provide a color image with an embedded watermark, an extracted encrypted watermark image, a color watermark image decrypted with the correct key, and a color watermark image decrypted with the incorrect key; wherein (a) is a color Lena image with an embedded encrypted watermark, (b) is an extracted encrypted watermark image, (c) is a color watermark image decrypted with the correct key, and (d) is a color watermark image decrypted with the incorrect key.

[0073] Figure 9The present invention provides a watermarked image after image darkening processing and a color watermarked image extracted therefrom; wherein (a) is a watermarked image after image darkening processing and (b) is a color watermarked image extracted from the above watermarked image.

[0074] Figure 10 The present invention provides a watermarked image after being subjected to a salt and pepper noise attack with a density of 0.05 and a color watermarked image extracted therefrom; wherein (a) is a watermarked image after being subjected to a salt and pepper noise attack with a density of 0.05, and (b) is a color watermarked image extracted from the above watermarked image.

[0075] Figure 11 The present invention provides a watermarked image after being subjected to a shearing attack and a color watermarked image extracted therefrom; wherein (a) is a watermarked image after being subjected to a shearing attack, and (b) is a color watermarked image extracted from the above watermarked image;

[0076] Figure 12 The present invention provides a watermarked image reduced by half and a color watermarked image extracted therefrom; wherein (a) is the watermarked image reduced by half and (b) is the color watermarked image extracted from the watermarked image;

[0077] Figure 13 The histograms of the RGB components of the color watermark image provided in the embodiments of the present invention are shown below; where (a) is the histogram of the R component of the original color watermark image, (b) is the histogram of the G component of the original color watermark image, and (c) is the histogram of the B component of the original color watermark image.

[0078] Figure 14 The histograms of the RGB components of the encrypted watermarked image provided in the embodiments of the present invention are shown below; wherein (a) is the histogram of the R component of the encrypted watermarked image, (b) is the histogram of the G component of the encrypted watermarked image, and (c) is the histogram of the B component of the encrypted watermarked image. Detailed Implementation

[0079] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0080] like Figure 1 As shown in the figure, an embodiment of the present invention provides a dual-color data image watermarking method, comprising:

[0081] S101: Get the size as Color carrier image and size are Color watermark image Crop an encrypted template image of the same size as the color watermark image from a complex image set. Iterative calculations using a three-dimensional chaotic system are used to generate three random numbers. , and ;

[0082] S102: Separate the RGB three primary color components of the color carrier image, the color watermark image, and the encryption template image to obtain the three component matrices of the color carrier image. , and The three component matrices of a color watermark image , and and the three component matrices of the encrypted template image , and ;

[0083] S103: Using HDNA coding rules and three random numbers , and The three component matrices of the color watermark image and the three component matrices of the encryption template image are converted into three encryption sequence matrices. , , As an encrypted watermark image The three sequence matrices;

[0084] S104: The three component matrices of the color carrier image , and Divided into non-overlapping Image patches, select from A number of image blocks are selected, and the three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain a color image with the embedded watermark. ;

[0085] It can be understood that S101 to S104 above is the image watermark embedding process, and the process is as follows: Figure 2 As shown.

[0086] S105: Separate the RGB three primary color components of the watermarked color image to obtain the three component matrices of the watermarked color image;

[0087] S106: Divide the three component matrices of the watermarked color image into non-overlapping components. Image patches, select from A number of image blocks are used to extract the three component matrices of watermark information using QR decomposition.

[0088] S107: Using HDNA encoding rules and three random numbers, convert the three component matrices of the watermark information and the three component matrices of the encrypted template image into three decryption sequence matrices, and merge them to obtain the decrypted watermark image.

[0089] The dual-color image watermarking method provided in this invention addresses the shortcomings of existing image watermarking methods. It improves the watermark's invisibility, robustness, security, and expands the embedded information capacity by utilizing HDNA, Mandelbrot graphs, and a three-dimensional IPCM chaotic system to encrypt the color watermark, ensuring the security of the digital watermarking system. Furthermore, it fully leverages QR decomposition technology and human visual characteristics, resulting in a dual-color image digital watermarking scheme with excellent invisibility, strong robustness, high efficiency, and a large embedded watermark information capacity.

[0090] In one embodiment, cropping the encrypted template image of the same size as the color watermark image from the complex graphics set in step S101 may include:

[0091] S101.1: Set the image center position Number of iterations Image resolution and the extremely small area magnified around the center of the image. The computational range of the complex plane is defined based on the image center location and an extremely small area magnified around the image center location. , ;

[0092] S101.2: Generate within the computational scope of the complex plane. The grid coordinate matrix is ​​obtained, and the grid points are converted into complex numbers to obtain the initial trajectory points. ;

[0093] Specifically, in Generate within range equidistant points (real part), in Generate within range A set of equally spaced points (imaginary parts) is used to generate a... The grid coordinate matrix is ​​obtained, and the grid points are converted into complex numbers to obtain the initial trajectory points. .

[0094] S101.3: According to Initialize a matrix to record the escape time of each point. The Mandelbrot iterative formula is executed repeatedly to determine the current state. ( Is it within the escape radius ( Within; if still within the escape radius, then the escape time Add 1; where the Mandelbrot iterative formula is as follows:

[0095]

[0096] in, To represent a complex number, Indicates the first The trajectory point of the next iteration; arbitrarily select one. ,like hour, Always finite, then It belongs to the Mandelbrot set; otherwise, it does not belong to the set.

[0097] S101.4: Matrix of escape time Taking the logarithm makes the color distribution more even and highlights fractal details; and according to The size of the Mandelbrot set generated on the complex plane mesh at an extremely small scale is... Fine structure image And cut out a piece of size from it. The encrypted template image. Here, the horizontal axis represents the real part, the vertical axis represents the imaginary part, and the color mapping... The value is indicated by the black area, which represents the interior of the Mandelbrot set.

[0098] In one embodiment, the step of S101, which uses iterative computation with a three-dimensional chaotic system to generate three random numbers, may include:

[0099] S101.5: Randomly select three initial values. , and Using a 3D IPCM chaotic system to generate a length of Three real-valued chaotic sequences , and Discard the sequence respectively , and Center front 1 value, resulting in three lengths. sequence , and The 3D IPCM chaotic system is shown below:

[0100]

[0101] in, , and Indicates system parameters, , , ;

[0102] S101.6: Will , and The values ​​of each element in the array are processed as follows: , , convert the sequence and Rearrange the data in descending order, and then rearrange the sequence. The data in the sequence is rearranged in ascending order, and the position index of each element in the original sequence is used to replace the corresponding element in the rearranged sequence, resulting in three sequences composed of position indices. , and ;

[0103] S101.7: Calculate three random numbers based on three sequences using the following formula. , and :

[0104]

[0105]

[0106] .

[0107] In one embodiment, step S103, which uses HDNA encoding rules and three random numbers to convert the three component matrices of the color watermark image and the three component matrices of the encryption template image into three encryption sequence matrices as the three sequence matrices of the encryption watermark image, may include:

[0108] S103.1: Convert the three component matrices of the color watermark image and the three component matrices of the encrypted template image from decimal matrices to octal matrices and then to binary matrices.

[0109] S103.2: Using the HDNA encoding rules and three random numbers, convert the transformed binary matrix into six HDNA sequence matrices respectively. , , , , and ;

[0110] S103.3: Six HDNA sequence matrices , , , , and Performing an XOR operation on the HDNA yields three encrypted sequence matrices. , , .

[0111] The HDNA encoding / decoding rules are shown in Table 1, and the HDNA XOR operation rules are shown in Table 2.

[0112] Table 1 HDNA Encoding / Decoding Rules

[0113]

[0114] Table 2. HDNA XOR Operation Rules

[0115]

[0116] In one embodiment, in S104, the three component matrices of the color carrier image are divided into non-overlapping components of size [missing information]. Image blocks, select from A number of image blocks are selected, and the three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks, which may include:

[0117] S104.1: Divide the three component matrices of the color carrier image into... Non-overlapping b×b image patches, i.e. , , Using random number generation functions Generate length is sequence ,sequence Each location index in the image corresponds to an image patch. The random numbers in the sequence are rearranged in ascending order. Each random number in the sorted sequence is replaced with its index in the original sequence, resulting in an index sequence. The first number is selected based on this index sequence. The image patch corresponding to each index, i.e. ;

[0118] S104.2: Convert the three sequence matrices of the three encrypted watermark images into binary matrices. , , , for the choice Each image block is subjected to QR decomposition: , , , The three binary sequence matrices of the three encrypted watermarked images are embedded into the decomposed R value, and then an inverse QR transform is performed to obtain the watermarked image block. The process is as follows: , , Embedded into R value:

[0119] like ,but ,

[0120] like ,but ;

[0121] like ,but ,

[0122] like ,but ;

[0123] like ,but ,

[0124] like ,but , , ;

[0125] ,

[0126] ,

[0127] ;

[0128] ,

[0129] ,

[0130] ;

[0131] ,

[0132] ,

[0133] ;

[0134] , , ;

[0135] Here, QS is a constant integer, and its value ranges from 0 to 100.

[0136] In one embodiment, in S106, the three component matrices of the watermarked color image are divided into non-overlapping components. Image patches, select from For each image patch, the three component matrices for extracting watermark information using QR decomposition can include:

[0137] S106.1: Embedded watermark in color images The three component matrices are respectively divided into Non-overlapping b×b image patches, i.e. , , Use a random number generation function to generate a number of lengths. sequence Each position index in the sequence corresponds to an image patch. The random numbers in the sequence are rearranged in ascending order. Each random number in the sorted sequence is replaced with its index in the original sequence, resulting in an index sequence. The first number is selected based on this index sequence. Image blocks corresponding to each index;

[0138] S106.2: Select Each image block is subjected to QR decomposition: , , , Based on the obtained R value , and The watermark information is extracted, resulting in a three-component matrix. The watermark information is extracted from the R value using the following method:

[0139] ,

[0140] ,

[0141] , , .

[0142] In one embodiment, step S107, which utilizes HDNA encoding rules and three random numbers to convert the three component matrices of the watermark information and the three component matrices of the encrypted template image into three decryption sequence matrices and then merges them to obtain the decrypted watermark image, may include:

[0143] S107.1: Encrypt the three component matrices of the template image. , and First convert a decimal matrix to an octal matrix, then convert it to a binary matrix. , and ;

[0144] S107.2: Using the HDNA encoding rules and three random numbers, convert the resulting binary matrix... , and The three component matrices of the watermark information , and Convert each to six sizes HDNA sequence matrix , and ;

[0145] S107.3: Six HDNA sequence matrices , and Performing an XOR operation on the HDNA yields three encrypted sequence matrices. , , ;

[0146] S107.4: Convert the three encryption sequence matrices , and First convert to a binary matrix, then to an octal matrix, and finally to a decimal matrix. , and The three decimal matrices are merged to obtain the decrypted watermark image. .

[0147] In one embodiment, the selected Figure 3 (a) in the image is a color carrier image with a size of 512×512; [Image format] Figure 3 (b) in the image is a color watermark image with a size of 32×32. The specific process of embedding the color watermark image into the color carrier image is as follows:

[0148] Step A: Input sizes are respectively and Color carrier image and color watermark Arbitrarily select the number of iterations, target resolution, and image center, and use the Mandelbrot set to generate a value greater than [value missing]. Image of size Randomly cut out pieces of size Image By arbitrarily selecting initial values, iterative calculations are performed using a three-dimensional IPCM chaotic system to generate three random numbers. , and .

[0149] Specifically, images are generated using the Mandelbrot set. The specific steps are as follows:

[0150] (1) Set the image center position and an extremely small area magnified around that point. Number of iterations Image resolution ,according to and Define the computational range on the complex plane: , ;

[0151] (2) In Generate within range equidistant points (real part), in Generate within range A set of equally spaced points (imaginary parts) is used to generate a... The grid coordinate matrix is ​​obtained, and the grid points are converted into complex numbers to obtain the initial values. ;

[0152] (3) According to Initialize and record the escape time for each point. The matrix is ​​repeatedly processed using the Mandelbrot iterative formula described above, and the current state is determined. ( Is it within the escape radius ( Within; if still within the escape radius, then the escape time Add 1.

[0153] (4) Regarding escape time Taking the logarithm makes the color distribution more even and highlights fractal details; according to Generating fine-scale images of the Mandelbrot set at extremely small scales on a complex plane mesh. Here, the horizontal axis represents the real part, the vertical axis represents the imaginary part, and the color mapping... The value is indicated by the black area, which represents the interior of the Mandelbrot set.

[0154] Generating random numbers using a 3D IPCM chaotic system , and The specific steps are as follows:

[0155] (1) Arbitrarily select initial values , and Using a 3D IPCM chaotic system to generate a length of Three real-valued chaotic sequences , and Discard the sequence respectively , and Center front This yields three values ​​of length . sequence , , .

[0156] (2) Change the sequence , , The values ​​of each element in the array are processed as follows: , , ( ), convert the sequence and Rearrange the data in descending order, and then rearrange the sequence. The data in the sequence is rearranged in ascending order, and the position index of each element in the original sequence is used to replace the corresponding element in the rearranged sequence, resulting in three sequences composed of position indices. , and .

[0157] (3) Using the following formula: , , Three random numbers were obtained. , and .

[0158] Step B: Separate the RGB three primary color components of the color carrier image, the color watermark image, and the encryption template image, and obtain the following sizes: The three component matrices of the color carrier image , and Size is The three component matrices of the color watermark image , and and size The three component matrices of the encrypted template image , and .

[0159] Step C: Convert the decimal matrix , and ,as well as , and First, convert them to octal matrices, then to binary matrices, and then according to the HDNA encoding rules and random numbers. , , Convert these binary matrices into six of size 1. HDNA sequence matrix , , , , and ; HDNA sequence matrix , , , , and Performing an XOR operation on HDNA yields three values ​​of size 1. HDNA sequence matrix , , HDNA encrypted watermark obtained The watermarked image is as follows: Figure 4 As shown.

[0160] Step D: Transfer the carrier image The three components , and Divide into non-overlapping portions. Blocks of varying sizes, randomly selected Watermarking is embedded into each block, and the HDNA sequence matrix is... , , Convert them into binary matrices respectively , , Next, for the randomly selected Each block is sequentially decomposed into QR values, resulting in several pairs of Q and R values. , , The watermark information is embedded into the corresponding R values. Combined with the Q values, an inverse QR transform is performed on the modified R values ​​to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain the final color image with an embedded color watermark. .

[0161] HDNA Encryption Watermark Embed the original color image The specific steps are as follows:

[0162] (1) The carrier image The three components , and Divide into non-overlapping portions. The size of the block, each component can be divided into Each block, that is , , Using random number generation functions Generate a length of sequence For the sequence The data in the sequence is rearranged in ascending order, and the position index of each element in the original sequence is used to replace the corresponding element in the rearranged sequence, resulting in a sequence composed of position indices. Select the sequence according to the following formula In One element: ;

[0163] (2) The HDNA sequence matrix , , Convert them to a size of binary matrix , , For randomly selected Each block is decomposed using QR: , , , .

[0164] (3) The components of the encrypted watermark , , Embed them into the R values ​​using the following methods:

[0165] like ,but ,

[0166] like ,but ;

[0167] like ,but ,

[0168] like ,but ;

[0169] like ,but ,

[0170] like ,but , , ;

[0171] ,

[0172] ,

[0173] ;

[0174] ,

[0175] ,

[0176] ;

[0177] ,

[0178] ,

[0179] ;

[0180] , , ;

[0181] here .

[0182] (4) Merge the blocks of each image component after embedding the watermark to obtain the final color image with embedded color watermark. .

[0183] Step E: Separate the RGB three primary color components of the watermarked color image to obtain the three component matrices of the watermarked color image.

[0184] Step F: Divide the three component matrices of the watermarked color image into non-overlapping parts. The size of the block is selected according to the method in step D. The image blocks are watermarked, and QR decomposition is performed on these image blocks sequentially to obtain several pairs of Q and R values; these R values ​​are then processed to obtain an encrypted binary watermark. .

[0185] Specifically, the steps for extracting the watermark are as follows:

[0186] (1) Separate the images with embedded watermarks respectively. and the randomly cropped image in step 2 The R, G, and B primary color components are respectively obtained as follows: component matrix , and and size component matrix , and ;

[0187] (2) Transfer the image The three components , and Divide into non-overlapping portions. The size of the block, each component can be divided into Each block, that is , , ; Generate a length of using the method in step D. random sequence ;

[0188] (3) For the Each component is determined Each block is decomposed into QR codes one by one: , , , ;

[0189] (4) Based on the R value obtained above , and Extract the watermark information using the following formula:

[0190] ,

[0191] ,

[0192] , , .

[0193] Step G: By performing the inverse operation of encrypting the watermark image in step C, the original color watermark image can be obtained. HDNA sequence matrix , and First convert each matrix to a binary matrix, then convert them to an octal matrix, and finally convert them to a decimal matrix. , and Thus, the decrypted watermark image is obtained. .

[0194] Specifically, decimal matrix , and First convert them to octal matrices, then convert them to binary matrices. , and And based on the random number generated by the method in step A , , And the HDNA encoding rules in step 3, the binary matrix , , , , and Convert them into six sizes respectively HDNA sequence matrix , and ; HDNA sequence matrix , and Perform the HDNA XOR operation in step C to obtain three values ​​of size 1. HDNA sequence matrix , , Thus, HDNA encrypted watermarks are obtained. .

[0195] like Figure 5 As shown, this embodiment of the invention also provides an image watermark embedding method, including:

[0196] S201: Get the size as The color carrier image and its size are The color watermark image is cropped from a complex graphic set, and an encrypted template image of the same size as the color watermark image is generated. Then, three random numbers are generated by iterative calculation using a three-dimensional chaotic system.

[0197] S202: Separate the RGB three primary color components of the color carrier image, the color watermark image, and the encryption template image to obtain the three component matrices of the color carrier image, the three component matrices of the color watermark image, and the three component matrices of the encryption template image, respectively.

[0198] S203: Using HDNA encoding rules and three random numbers, the three component matrices of the color watermark image and the three component matrices of the encrypted template image are converted into three encrypted sequence matrices as the three sequence matrices of the encrypted watermark image.

[0199] S204: Divide the three component matrices of the color carrier image into non-overlapping components. Image patches, select from A number of image blocks are selected, and the three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain a color image with embedded watermark.

[0200] like Figure 6 As shown, this embodiment of the invention also provides an image watermark extraction method, including:

[0201] S301: Obtain the three component matrices and three random numbers of the encrypted template image when embedding the watermark;

[0202] S302: Separate the RGB three primary color components of the watermarked color image to obtain the three component matrices of the watermarked color image;

[0203] S303: Divide the three component matrices of the watermarked color image into non-overlapping components. Image patches, select from A number of image blocks are used to extract the three component matrices of watermark information using QR decomposition.

[0204] S304: Using HDNA encoding rules and three random numbers, the three component matrices of the watermark information and the three component matrices of the encrypted template image are converted into three decryption sequence matrices, and then merged to obtain the decrypted watermark image.

[0205] like Figure 7 As shown, this embodiment of the invention also provides a dual-color data image watermarking system, comprising:

[0206] Image acquisition module, used to acquire images of size The color carrier image and its size are The color watermark image is cropped from a complex graphic set, and an encrypted template image of the same size as the color watermark image is generated. Then, three random numbers are generated by iterative calculation using a three-dimensional chaotic system.

[0207] The first image preprocessing module is used to separate the RGB three primary color components of the color carrier image, the color watermark image and the encryption template image, and obtain the three component matrices of the color carrier image, the three component matrices of the color watermark image and the three component matrices of the encryption template image respectively.

[0208] The watermark encryption module is used to convert the three component matrices of the color watermark image and the three component matrices of the encryption template image into three encryption sequence matrices as the three sequence matrices of the encrypted watermark image by using HDNA encoding rules and three random numbers.

[0209] The watermark embedding module is used to divide the three component matrices of the color carrier image into non-overlapping parts. Image patches, select from The three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain a color image with embedded watermark.

[0210] The second image preprocessing module is used to separate the RGB three primary color components of the color image with embedded watermark to obtain the three component matrices of the color image with embedded watermark.

[0211] The watermark extraction module is used to divide the three component matrices of a color image with an embedded watermark into non-overlapping components. Image patches, select from A number of image blocks are used to extract the three component matrices of watermark information using QR decomposition.

[0212] The watermark decryption module uses HDNA encoding rules and three random numbers to convert the three component matrices of the watermark information and the three component matrices of the encrypted template image into three decryption sequence matrices, and then merges them to obtain the decrypted watermark image.

[0213] To verify the effectiveness of the image watermarking method provided by this invention, the following performance analysis was conducted.

[0214] 1. Invisibility

[0215] Figure 7 Image (a) is the original color Lena carrier image. Figure 8 In the image (a), the color Lena image with an embedded encrypted watermark is invisible to the human eye. The peak signal-to-noise ratio (PSNR) and normalized correlation coefficient (NC) between the original Lena carrier image and the watermarked Lena image are calculated using the following formulas:

[0216]

[0217]

[0218] in, Represents the original image. Indicates the original image The image obtained after processing and The length and height of the image respectively. , , These represent the red, green, and blue primary color components of an image, respectively. In practice, the higher the PSNR value, the closer the two images are; when the PSNR value of two images is greater than 30dB, the human eye cannot perceive the difference between the original image and the processed image. The formula is used to calculate the similarity between the extracted original image and the processed image. The NC value ranges from 0 to 1. The higher the NC value, the higher the similarity between the original image and the processed image; if the two images are completely identical, then... Calculations showed that the original Lena carrier image and the watermarked Lena image... , This indicates that the original Lena carrier image and the watermarked Lena image are highly similar, making it impossible for people to discern the presence of the watermark information. Figure 7 (b) and Figure 8 Image (c) shows the original color watermark image and the extracted watermark image, respectively, without any attack. Further calculations are made of the PSNR and NC values ​​between the original color watermark and the extracted watermark to obtain... This indicates that the extracted watermark image is completely identical to the original watermark image. Both the above calculation results and human visual inspection demonstrate that the dual-color image digital watermarking algorithm of this invention has excellent invisibility.

[0219] 2. Robustness

[0220] To better verify the robustness of the dual-color image digital watermarking method of the present invention, the watermarked color images ( Figure 8 Various attack experiments were conducted in (a) of the paper. Table 1 shows the PSNR and NC values ​​of the extracted watermark and the original color watermark under various attacks. It is easy to see that under attacks such as image darkening, blurring, noise, filtering, cropping, scaling, and JPEG compression, the NC values ​​of both the extracted watermark and the original color watermark are above 0.9, indicating that the dual-color image digital watermarking method has strong resistance to attacks. In addition, Figure 9 (a) in the middle is Figure 8 (a) is the watermarked image after image darkening, and (b) is the color watermarked image extracted from the above watermarked image; Figure 10 (a) in the middle is Figure 8 (a) is the watermarked image after being attacked by salt and pepper noise with a density of 0.05, and (b) is the color watermarked image extracted from the above watermarked image; Figure 11 (a) in the middle is Figure 8 (a) is the watermarked image after being subjected to a shearing attack, and (b) is the color watermarked image extracted from the above watermarked image; Figure 12 (a) in the middle is Figure 8(a) is the watermarked image after being reduced by half, and (b) is the color watermarked image extracted from the watermarked image. It is readily apparent that even after an attack on the image with the embedded watermark, the watermark can still be extracted effectively using the dual-color image digital watermarking method of this invention. In summary, the dual-color image digital watermarking method of this invention exhibits strong robustness.

[0221] Table 3. Robustness test results

[0222]

[0223] 3. Security

[0224] In the color watermark image encryption algorithm of this invention, the image center position of the Mandelbrot set... and extremely small range Number of iterations Image resolution Initial values ​​of 3D IPCM chaotic system , , and parameters , Both QS and QS are used as keys, with a computation precision of 10. -15 Then the key space is at least 10. 95 The encryption algorithm of this invention has a sufficiently large key space to resist brute-force attacks.

[0225] When decrypted using the correct key, the following can be obtained: Figure 8 (c) shows the correct watermark image; when the key is modified to a very small degree, such as the initial value of the 3D IPCM chaotic system... Modified to The resulting decrypted image is as follows: Figure 8 As shown in (d), the original watermark image could not be correctly decrypted. This indicates that the color watermark image encryption algorithm of this invention is highly sensitive to the key.

[0226] Figure 13 and Figure 14 Histograms of the R, G, and B components of the original color watermark image and the encrypted watermark image are presented respectively. It is easy to see that the histogram of the encrypted watermark image is more uniformly distributed than that of the original color watermark image, making it more difficult for attackers to carry out statistical attacks.

[0227] To test the randomness of images, information entropy is used as a measure, calculated using the following formula:

[0228]

[0229] in, Indicates the source of information. express The probability of occurrence This represents the total number of information sources. The higher the information entropy of an image, the stronger its randomness, and the more difficult it is to extract useful information from it. Theoretically, the information entropy of a completely random ciphertext image is 8.

[0230] Calculations based on the above formula yield information entropies of 4.8688, 5.0127, and 4.9736 for the red, green, and blue components of the logo watermark image, respectively. The corresponding information entropies for the ciphertext image are 7.9884, 7.9817, and 7.9822, respectively, very close to the theoretical maximum value of 8. Therefore, the color watermark image encryption algorithm provided by this invention can effectively resist information entropy attacks.

[0231] 4. Efficiency

[0232] To verify the efficiency of the dual-color image digital watermarking method of the present invention, the algorithm of the present invention was used to perform watermark embedding and extraction operations 100 times each, and the execution time of each operation was recorded. Calculations showed that the average time for dual-color image digital watermark embedding was 0.27s, and the average time for watermark extraction was 0.19s, which fully meets the requirements of real-time applications.

[0233] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A dual-color data image watermarking method, characterized in that, include: Get size The color carrier image and its size are The color watermark image is cropped from a complex graphic set, and an encrypted template image of the same size as the color watermark image is generated. Then, three random numbers are generated by iterative calculation using a three-dimensional chaotic system. Separate the RGB three primary color components of the color carrier image, the color watermark image, and the encryption template image to obtain the three component matrices of the color carrier image, the three component matrices of the color watermark image, and the three component matrices of the encryption template image, respectively. Using the HDNA encoding rules and the three random numbers, the three component matrices of the color watermark image and the three component matrices of the encrypted template image are converted into three encrypted sequence matrices as the three sequence matrices of the encrypted watermark image. The three component matrices of the color carrier image are divided into non-overlapping components. Image patches, select from A number of image blocks are selected, and the three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain a color image with embedded watermark. Separate the RGB three primary color components of the watermarked color image to obtain the three component matrices of the watermarked color image; The three component matrices of the watermarked color image are divided into non-overlapping components. Image patches, select from A number of image blocks are used to extract the three component matrices of watermark information using QR decomposition. Using the HDNA encoding rules and the three random numbers, the three component matrices of the watermark information and the three component matrices of the encrypted template image are converted into three decryption sequence matrices, which are then merged to obtain the decrypted watermark image.

2. The dual-color data image watermarking method according to claim 1, characterized in that, The process of cropping an encrypted template image of the same size as the color watermark image from a complex image set specifically includes: The image center position, iteration number, image resolution, and a tiny range of magnification around the image center position are set. The calculation range of the complex plane is defined based on the image center position and the tiny range of magnification around the image center position. Generate within the computational range of the complex plane The grid coordinate matrix is ​​obtained, and the grid points are converted into complex numbers to obtain the initial trajectory points. ; according to Initialize a matrix to record the escape time of each trajectory point. The Mandelbrot iterative formula is executed repeatedly to determine the current trajectory point. Is it within the escape radius? If it is still within the escape radius, then the escape time... Add 1; where the Mandelbrot iterative formula is as follows: in, To represent a complex number, Indicates the first The trajectory points of the next iteration; right Take the logarithm, and according to The size of the Mandelbrot set generated on the complex plane mesh at an extremely small scale is... Fine structure image And cut out a piece of size from it. Encrypted template image .

3. The dual-color data image watermarking method according to claim 1, characterized in that, The method of generating three random numbers through iterative computation using a three-dimensional chaotic system specifically includes: Arbitrarily select three random initial values, and use a 3D IPCM chaotic system to generate a length of... Three real-valued chaotic sequences , and Discard the sequence respectively , and Center front 1 value, resulting in three lengths. sequence , and The 3D IPCM chaotic system is shown below: in, , and Indicates system parameters; Will , and The values ​​of each element in the array are processed as follows: , , convert the sequence and Rearrange the data in descending order, and then rearrange the sequence. The data in the sequence is rearranged in ascending order, and the position index of each element in the original sequence is used to replace the corresponding element in the rearranged sequence, resulting in three sequences composed of position indices. , and ; Three random numbers are calculated based on the three sequences using the following formula. , and : 。 4. The dual-color data image watermarking method according to claim 1, characterized in that, The method of using HDNA encoding rules and the three random numbers to convert the three component matrices of the color watermark image and the three component matrices of the encrypted template image into three encrypted sequence matrices as the three sequence matrices of the encrypted watermark image specifically includes: The three component matrices of the color watermark image and the three component matrices of the encrypted template image are first converted from decimal matrices to octal matrices and then to binary matrices. Using the HDNA encoding rules and the three random numbers, the converted binary matrix is ​​converted into six HDNA sequence matrices respectively; Perform an HDNA XOR operation on the six HDNA sequence matrices to obtain three encrypted sequence matrices.

5. The dual-color data image watermarking method according to claim 1, characterized in that, The three component matrices of the color carrier image are divided into non-overlapping components of size [missing information]. Image blocks, select from Each image block is used to embed the three sequence matrices of the encrypted watermarked image into a selected image block using QR decomposition, resulting in a watermarked image block, specifically including: The three component matrices of the color carrier image are respectively divided into: Given a set of non-overlapping b×b image patches, generate a random number generator of length [length missing]. sequence Each position index in the sequence corresponds to an image patch. The random numbers in the sequence are rearranged in ascending order. Each random number in the sorted sequence is replaced with its index in the original sequence, resulting in an index sequence. The first number is selected based on this index sequence. Image blocks corresponding to each index; Convert the three sequence matrices of the three encrypted watermarked images into binary matrices, and then select... Each image block is decomposed using QR decomposition. The three binary sequence matrices of the three encrypted watermark images are embedded into the decomposed R value, and then an inverse QR transform is performed to obtain the watermarked image block.

6. The dual-color data image watermarking method according to claim 1, characterized in that, The three component matrices of the watermarked color image are divided into non-overlapping components. Image patches, select from For each image patch, QR decomposition is used to extract the three component matrices of the watermark information, specifically including: The three component matrices of the watermarked color image are divided into: Given a set of non-overlapping b×b image patches, generate a random number generator of length [length missing]. sequence Each position index in the sequence corresponds to an image patch. The random numbers in the sequence are rearranged in ascending order. Each random number in the sorted sequence is replaced with its index in the original sequence, resulting in an index sequence. The first number is selected based on this index sequence. Image blocks corresponding to each index; Select Each image block is subjected to QR decomposition, and the watermark information is extracted based on the obtained R value, resulting in a three-component matrix of the watermark information.

7. The dual-color data image watermarking method according to claim 1, characterized in that, The process of using HDNA encoding rules and the three random numbers to convert the three component matrices of the watermark information and the three component matrices of the encrypted template image into three decryption sequence matrices, and then merging them to obtain the decrypted watermark image, specifically includes: The three component matrices of the encrypted template image are first converted from decimal matrices to octal matrices and then to binary matrices; Using the HDNA encoding rules and the three random numbers, the converted binary matrix and the three component matrices of the watermark information are respectively converted into six HDNA sequence matrices; Perform an HDNA XOR operation on the six HDNA sequence matrices to obtain three encrypted sequence matrices; The three encrypted sequence matrices are first converted into binary matrices, then into octal matrices, and finally into decimal matrices. The three decimal matrices are then merged to obtain the decrypted watermark image.

8. An image watermark embedding method, characterized in that, include: Get size The color carrier image and its size are The color watermark image is cropped from a complex graphic set, and an encrypted template image of the same size as the color watermark image is generated. Then, three random numbers are generated by iterative calculation using a three-dimensional chaotic system. Separate the RGB three primary color components of the color carrier image, the color watermark image, and the encryption template image to obtain the three component matrices of the color carrier image, the three component matrices of the color watermark image, and the three component matrices of the encryption template image, respectively. Using the HDNA encoding rules and the three random numbers, the three component matrices of the color watermark image and the three component matrices of the encrypted template image are converted into three encrypted sequence matrices as the three sequence matrices of the encrypted watermark image. The three component matrices of the color carrier image are divided into non-overlapping components. Image patches, select from A number of image blocks are selected, and the three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain a color image with embedded watermark.

9. A method for extracting image watermarks, characterized in that, include: Obtain the three component matrices and three random numbers of the encrypted template image when embedding the watermark; Separate the RGB three primary color components of the watermarked color image to obtain the three component matrices of the watermarked color image; The three component matrices of the watermarked color image are divided into non-overlapping components. Image patches, select from A number of image blocks are used to extract the three component matrices of watermark information using QR decomposition. Using the HDNA encoding rules and the three random numbers, the three component matrices of the watermark information and the three component matrices of the encrypted template image are converted into three decryption sequence matrices, which are then merged to obtain the decrypted watermark image.

10. A dual-color data image watermarking system, characterized in that, include: Image acquisition module, used to acquire images of size The color carrier image and its size are The color watermark image is cropped from a complex graphic set, and an encrypted template image of the same size as the color watermark image is generated. Then, three random numbers are generated by iterative calculation using a three-dimensional chaotic system. The first image preprocessing module is used to separate the RGB three primary color components of the color carrier image, the color watermark image and the encryption template image, and obtain the three component matrices of the color carrier image, the three component matrices of the color watermark image and the three component matrices of the encryption template image respectively. The watermark encryption module is used to convert the three component matrices of the color watermark image and the three component matrices of the encryption template image into three encryption sequence matrices as the three sequence matrices of the encrypted watermark image by using the HDNA encoding rules and the three random numbers. The watermark embedding module is used to divide the three component matrices of the color carrier image into non-overlapping components. Image patches, select from A number of image blocks are selected, and the three sequence matrices of the encrypted watermark image are embedded into the selected image blocks using QR decomposition to obtain watermarked image blocks. The watermarked image blocks are then merged to obtain a color image with embedded watermark. The second image preprocessing module is used to separate the RGB three primary color components of the color image with embedded watermark to obtain the three component matrices of the color image with embedded watermark. The watermark extraction module is used to divide the three component matrices of the watermark-embedded color image into non-overlapping components. Image patches, select from A number of image blocks are used to extract the three component matrices of watermark information using QR decomposition. The watermark decryption module is used to convert the three component matrices of the watermark information and the three component matrices of the encrypted template image into three decryption sequence matrices using HDNA encoding rules and the three random numbers, and then merge them to obtain the decrypted watermark image.