High-robustness image digital watermark embedding and extracting method and device

By combining the image digital watermarking technology of DWT and secondary DCT transformation, the problems of insufficient robustness and small watermark capacity in the existing technology are solved, and effective resistance to small-angle rotation and translation attacks is achieved and the watermark capacity is improved.

CN118761894APending Publication Date: 2024-10-11HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410815368.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing digital watermarking technology has insufficient robustness in the face of complex attack scenarios, especially the inability to effectively resist small-angle rotation and translation attacks. At the same time, there is room for improvement in watermark capacity and invisibility.

Method used

An image digital watermark embedding and extraction method that combines DWT and secondary DCT transformation is used. Through BCH coding and spread spectrum processing, the watermark sequence is embedded into the image feature vector in parallel using an orthogonalized random codebook, and SURF geometry is performed during the extraction process. Correction to resist attacks.

Benefits of technology

It significantly improves the robustness against small-angle rotation and translation attacks, improves watermark capacity and invisibility, and ensures high-accuracy extraction results in various attack scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761894A_ABST
    Figure CN118761894A_ABST
Patent Text Reader

Abstract

The invention discloses a high-robustness image digital watermark embedding method. The method comprises the following steps: obtaining a coding watermark sequence with the length of m; performing spread spectrum processing on the coded watermark sequence; preprocessing the length and the width of the image matrix to enable the image matrix to meet the blocking requirement; performing non-overlapping block processing on the preprocessed image, and applying DWT and first-level DCT; applying the secondary DCT to the coefficient matrix and selecting an image feature vector; embedding the N spread spectrum watermark vectors into the image feature vector V in parallel according to a formula; and updating the DCT coefficient and executing two-stage inverse discrete cosine transform and inverse discrete wavelet transform to obtain an image with a watermark. The invention further discloses a high-robustness image digital watermark extraction method. Compared with the prior art, the method has the advantages that blind or semi-blind watermark extraction can be performed on the image so as to realize copyright protection, and data needing to be transmitted secretly can be hidden for the field of information secrecy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method and device for embedding and extracting image digital watermarks with high robustness. Background Art

[0002] At present, the main technology for protecting digital information products is digital watermark technology. For digital media information that needs to be protected, a unique property mark or serial number is first generated based on the main characteristics of the work. Under the premise of not destroying the original value of the work, the watermark is embedded in the carrier through an efficient watermark algorithm, and then the work is made public. When the work with embedded watermark is infringed, the corresponding watermark extraction algorithm can be used to obtain the confirmation mark for rights protection.

[0003] Robustness ensures that digital watermarking technology can resist distortion. In the transmission channel, the carrier file (such as images, documents, etc.) is transmitted through the digital channel, and it is likely to undergo various processing methods, resulting in various distortions, such as resolution changes, compression, etc. After these distortions, the readability of the carrier content may not be damaged, but the attached watermark signal may be distorted. How to correctly extract the watermark signal from the distorted file is the key to protecting the copyright of the file. The transparency of the watermark is another important performance to ensure that the watermark algorithm is universal and applicable to various carrier files. The existence of the watermark cannot affect the visual quality of the original carrier, and cannot affect the normal use of the original carrier itself, which makes the watermark algorithm more widely accepted and less noticeable. Therefore, studying a digital watermark technology with high robustness and high transparency is of great significance to the protection of multimedia copyright.

[0004] The method based on transform domain coefficients has been a hot topic in the research of digital watermarking algorithms in recent years. Common transforms include discrete cosine transform, discrete Fourier transform and discrete wavelet transform.

[0005] Some scholars in my country have proposed a spread spectrum watermarking scheme (TDSS) based on two-level DCT. This scheme first spreads the original watermark, then divides the original image into non-overlapping blocks, and after DCT transformation of each block, extracts a coefficient at the same position in each block to form a new two-level matrix, and then performs a DCT transformation on this matrix to obtain a two-level DCT matrix. Select coefficients with even row and column indexes in the two-level DCT matrix, and then embed the watermark signal into these coefficients according to the specified rules. When extracting the watermark, the two-level DCT matrix is ​​obtained in the same way, and the watermark sequence is obtained according to the watermark extraction rules.

[0006] Based on the TDSS scheme, some scholars have proposed two adaptive global blind watermarking schemes: Adaptive Embedding Strength Spread Spectrum Watermarking Scheme (SSAES) and Adaptive Quantization Threshold Differential Quantization Scheme (DAQAT). Both schemes use an adaptive embedding strategy (AEP), which effectively balances the robustness and invisibility of the embedded watermark by maintaining the peak signal-to-noise ratio of the host image after embedding the watermark to maximize the embedding strength and quantization threshold.

[0007] The traditional TDSS scheme relies only on DCT transformation to extract feature coefficients. In the face of complex attack scenarios, the watermark may be destroyed. The fixed watermark embedding strategy may also cause some images to have serious distortion. At the same time, the preprocessing part of the scheme seriously damages the resolution of the original image.

[0008] The SSAES and DQAQT schemes make up for the shortcomings of the fixed embedding strategy of TDSS, but still fail to solve the problem of insufficient robustness caused by a single transformation. At the same time, the TDSS scheme still retains the disadvantage that it cannot resist small-angle rotation and translation attacks, and the watermark capacity also needs to be improved.

[0009] In view of this, the inventor of the present application has obtained a highly robust method for embedding and extracting image digital watermarks after in-depth research. Summary of the invention

[0010] The purpose of the present invention is to provide a highly robust method and device for embedding and extracting digital watermarks of images, which can perform blind or semi-blind watermark extraction on images to achieve copyright protection, and can also hide data that needs to be transmitted secretly for use in the field of information confidentiality.

[0011] The above technical objectives of the present invention are achieved through the following technical solutions:

[0012] A highly robust image digital watermark embedding method comprises the following steps:

[0013] Step 1: Receive N t-bit watermark sequences, add 0 to the leading ones that are less than t, and perform BCH encoding on them to obtain a coded watermark sequence of length m;

[0014] Step 2: Perform spread spectrum processing on the encoded watermark sequence;

[0015] Step 3: A1. Preprocess the length and width of the image matrix to meet the block requirements, specifically including: if the row or column of the image matrix is ​​less than 16*32=512, then enlarge the original matrix in the row and column directions with the same scale factor until the row and column of the matrix are not less than 512; A2. If the row or column of the image matrix cannot divide 32, then repeatedly lengthen the row or column by one unit until the row and column of the matrix can divide 32;

[0016] Step 4: Perform non-overlapping block processing on the pre-processed image and apply DWT and first-level DCT, specifically including: B1, divide the image matrix into non-overlapping blocks, the total number of blocks is 32*32; B2, first perform a DWT transform on each block, and then perform a DCT transform on the first-level LL sub-block of each block to obtain the final DWT-DCT sub-block, and select the coefficient at position (4, 4) to form a 32*32 coefficient matrix;

[0017] Step 5: Apply the secondary DCT to the coefficient matrix and select the image feature vector;

[0018] Step 6: Embed the N spread spectrum watermark vectors into the image feature vector V in parallel according to the following formula:

[0019]

[0020] Where N represents the number of watermark sequences selected for simultaneous embedding (N*m≤n), A represents the embedding strength of the public watermark, sim(a,b) represents the similarity between vectors a and b, and σ represents the elastic watermark strength (-1≤σ≤1);

[0021] Step 7: Update the DCT coefficients and perform two-level inverse discrete cosine transform and inverse discrete wavelet transform to obtain a watermarked image.

[0022] In a preferred embodiment, the step 2 specifically includes: C1, using a key to generate N two-dimensional random codebooks. Each row of the codebook represents a random vector of length n, and the total number of vectors in the codebook is equal to the length m of a single coded watermark sequence; using the Schmidt orthogonalization method to orthogonalize and normalize all random vectors so that all vectors are independent of each other; C2, generating N spread spectrum watermarks according to the following rules: assuming that the k-th watermark sequence is Wk = [t0, t1, t2, ..., tm-1], each 0 / 1 watermark in Wk corresponds to a spread spectrum vector Pi = [pi0, pi1, ..., pi(n-1)] of length n in its codebook, i = 0, 1, ..., m-1, and generating a spread spectrum watermark vector of length n = [b0, b1, ..., bn-1] according to the following formula:

[0023]

[0024] in,

[0025] In a preferred embodiment, in step three, before preprocessing, if the original image is a color image, it is converted into a YCbCr color space, and its Y channel is separated as a watermark carrier; if it is a gray image, it is directly used as a watermark carrier; step seven also includes: if the image is a color image, the Y channel with the watermark at this time is merged with the Cb and Cr channels to obtain a YCbCr format image, and then it is converted into an RGB color space to obtain a color image with a watermark, and whether to save the SURF features of the watermark image is selected as needed.

[0026] In a preferred embodiment, the step five specifically includes: D1, performing DCT transformation on the 32*32 coefficient matrix; D2, selecting coefficients on the main diagonal of the matrix whose row index and column index are both even numbers, and using these coefficients as feature vector V1; D3, symmetrically selecting even-index coefficient pairs on both sides of the main diagonal, and using the obtained coefficients as feature vector V2; D4, combining V1 and V2 to obtain an image feature vector V with a final length of 256.

[0027] A highly robust image digital watermark embedding system, comprising:

[0028] Watermark sequence acquisition unit: used for receiving N t-bit watermark sequences, adding 0 to the front of the watermark sequences less than t, and performing BCH encoding on them to obtain a coded watermark sequence of length m;

[0029] Spread spectrum processing unit: used for performing spread spectrum processing on the encoded watermark sequence;

[0030] Preprocessing unit: used for A1, preprocessing the length and width of the image matrix to meet the block requirements, specifically including: if the row or column of the image matrix is ​​less than 16*32=512, then enlarging the original matrix in the row and column directions with the same scale factor until the row and column of the matrix are not less than 512; A2, if the row or column of the image matrix cannot be divided by 32, then repeatedly lengthening the row or column by a unit length until the row and column of the matrix can be divided by 32;

[0031] Block processing and DCT unit: used for performing non-overlapping block processing on the pre-processed image and applying DWT and first-level DCT, specifically including: B1, dividing the image matrix into non-overlapping blocks, with a total number of blocks of 32*32; B2, first performing a DWT transformation on each block, and then performing a DCT transformation on the first-level LL sub-block of each block to obtain the final DWT-DCT sub-block, and selecting the coefficients at position (4, 4) to form a 32*32 coefficient matrix;

[0032] A two-level DCT application unit: used to apply the two-level DCT to the coefficient matrix and select the image feature vector;

[0033] Embedding unit: used to embed N spread spectrum watermark vectors into the image feature vector V in parallel according to the following formula:

[0034]

[0035] Where N represents the number of watermark sequences selected for simultaneous embedding (N*m≤n), A represents the embedding strength of the public watermark, sim(a,b) represents the similarity between vectors a and b, and σ represents the elastic watermark strength (-1≤σ≤1);

[0036] Imaging unit: used to update the DCT coefficients and perform two-level inverse discrete cosine transform and inverse discrete wavelet transform to obtain a watermarked image.

[0037] A highly robust image digital watermark extraction method comprises the following steps:

[0038] Step 1: Preprocess the watermarked image;

[0039] Step 2: Extract features from the watermarked image, specifically including: E1, perform non-overlapping block processing on the pre-processed image and apply DWT and first-level DCT: divide the image matrix into non-overlapping blocks, with a total number of blocks of 32*32; E2, first perform a DWT transform on each block, and then perform a DCT transform on the first-level LL sub-block of each block to obtain the final DWT-DCT sub-block, and select the coefficients at position (4, 4) to form a 32*32 coefficient matrix; E3, perform a DCT transform on the 32*32 coefficient matrix;

[0040] E4. Select the coefficients on the main diagonal of the matrix whose row index and column index are both even numbers, and use these coefficients as the eigenvector V1; E5. Symmetrically select the even-index coefficient pairs on both sides of the main diagonal, and use the obtained coefficients as the eigenvector V2; E6. Combine V1 and V2 to obtain the image eigenvector V with a final length of 256 * ;

[0041] Step 3: Extract the coded watermark: Specifically including: F1, use the same key as the watermark embedding process to generate a random codebook, and orthogonalize and normalize the codebook according to the same rules as the watermark embedding process; F2, extract the coded watermark according to the following rules: define the extracted image feature vector as, the codebook of the kth watermark sequence is Pi = [pi0, pi1, ..., pi (n-1)], i = 0, 1, ..., m-1, and the watermark of length m extracted from it is W' = [t0', t1', ..., tm-1']

[0042]

[0043] Among them, dot(A,B) represents the dot product operation of vectors A and B;

[0044] Step 4: Perform BCH decoding on the extracted N coded watermark sequences of length m to obtain their respective watermark sequences.

[0045] In a preferred embodiment, before step 1, if the SURF features of the original watermark image are stored in the database, the SURF features of the watermark image are calculated and geometric correction is performed to obtain a corrected watermarked image.

[0046] In a preferred embodiment, the step 1 specifically includes: if the rows or columns of the image matrix are less than 16*32=512, then enlarging the original matrix in the row and column directions with the same proportional factor until the rows and columns of the matrix are not less than 512; A2, if the rows or columns of the image matrix cannot be divided by 32, then repeatedly lengthening the rows or columns by a unit length until the rows and columns of the matrix can be divided by 32.

[0047] A highly robust image digital watermark extraction system, comprising:

[0048] Preprocessing unit: used to preprocess watermarked images;

[0049] Feature extraction unit: used for feature extraction of watermarked images, specifically including: E1, non-overlapping block processing of the pre-processed image and application of DWT and first-level DCT: dividing the image matrix into non-overlapping blocks, with a total number of blocks of 32*32; E2, first performing a DWT transformation on each block, and then performing a DCT transformation on the first-level LL sub-block of each block to obtain the final DWT-DCT sub-block, selecting the coefficients at position (4, 4) to form a 32*32 coefficient matrix; E3, performing a DCT transformation on the 32*32 coefficient matrix; E4, selecting the coefficients on the main diagonal of the matrix whose row index and column index are both even numbers, and using these coefficients as the feature vector V1; E5, symmetrically selecting the even-indexed coefficient pairs on both sides of the main diagonal, and the obtained coefficients as the feature vector V2; E6, combining V1 and V2 to obtain the image feature vector V with a final length of 256 * ;

[0050] Coded watermark extraction unit: used to extract the coded watermark: specifically including: F1, using the same key as the watermark embedding process to generate a random codebook, and orthogonalizing and unitizing the codebook according to the same rules as the watermark embedding process; F2, extracting the coded watermark according to the following rules: define the extracted image feature vector as, the codebook of the k-th watermark sequence is Pi = [pi0, pi1, ..., pi (n-1)], i = 0, 1, ..., m-1, and the watermark of length m extracted from it is W' = [t0', t1', ..., tm-1']

[0051]

[0052] Among them, dot(A,B) represents the dot product operation of vectors A and B;

[0053] Decoding unit: used to perform BCH decoding on the extracted N coded watermark sequences of length m to obtain respective watermark sequences.

[0054] A device comprises a processor and a memory, wherein the processor loads and executes instructions and data in the memory device for implementing a highly robust image digital watermark embedding method and a highly robust image digital watermark extraction method.

[0055] Compared with the prior art, the present invention combines DWT and two-level DCT transformation in the process of extracting image feature vectors. After the image is divided into blocks, a DWT transformation is performed on each block, and the LL sub-block is selected for DCT transformation, and the intermediate frequency coefficients are selected as the coefficients of the matrix. The obtained coefficient matrix is ​​subjected to DCT again to obtain a two-level DCT coefficient matrix, and the characteristic coefficients are selected as the watermark carrier according to the specific rules in the TDSS scheme.

[0056] In the watermark embedding process, the watermark sequence is first BCH encoded and divided into multiple watermark sequences. The corresponding spread spectrum codebooks are generated according to the key. The properties between orthogonal vectors are used to embed multiple orthogonal spread spectrum watermark vectors into the same image feature vector, and then the original coefficients are replaced and the corresponding inverse transformation is performed to obtain the watermarked image. In the watermark extraction process, the image feature vector is first obtained step by step (for scenes that may be attacked by small angle rotation and translation, the image is subjected to a SURF geometric correction based on the saved SURF features), and then the spread spectrum codebooks of each watermark are obtained according to the key, and the dot product operation is performed on the image feature vector. Since the orthogonal vectors do not affect each other, multiple different BCH encoded watermark sequences can be completely extracted in the end, and the final watermark is obtained by combining and decoding.

[0057] A series of preprocessing was performed on the image. For color RGB images, they were converted to YCbCr color space, and the more robust Y color channel was selected for subsequent watermark embedding. Gray images were directly watermarked. For images with a DCT block length or width less than 8 after the first block division, they were proportionally enlarged until the block size was met. Since the same number of blocks for images of different resolutions may result in the loss of some pixels, the length and width were fine-tuned so that the image could be completely blocked.

[0058] By implementing the technical solution and comparing it with traditional TDSS and other solutions, the present invention has improved resistance to various attacks. In particular, the robustness to small-angle rotation attacks and translation attacks is significantly improved, the degree of damage to the original image is also improved, and the watermark capacity and invisibility are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is the main flow chart of the watermark embedding technology of this embodiment.

[0060] Figure 2 It is the main flow chart of the watermark extraction technology of the present invention.

[0061] Figure 3 This is a comparison picture before and after embedding the watermark.

[0062] Figure 4 This is a comparison chart of the treatment effects of this solution and the existing solution. DETAILED DESCRIPTION

[0063] The present invention is further described in detail below in conjunction with the accompanying drawings.

[0064] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.

[0065] In the original TDSS scheme, the spread spectrum watermark vector generated by the orthogonal random codebook P is additively embedded with the extracted image feature vector. The embedding process is simplified as follows:

[0066] V′=V+A·Spr

[0067]

[0068] Among them, V and V'represent the feature vectors before and after watermark embedding, A is the watermark embedding strength, and Spr is the spread spectrum watermark vector. Since the vectors in the orthogonal random codebook P are independent and orthogonal, the dot product is performed with the orthogonal vector corresponding to each watermark bit during the extraction process, and the final watermark sequence is obtained according to the following formula:

[0069]

[0070] Among them, dot(a,b) represents the dot product of vectors a and b.

[0071] In fact, dot(V',P i )=dot(V,Pi)+A·l i, the original signal is unstable during image extraction. i ) and l i When the signs are the same, it is equivalent to enhancing the robustness in disguise; when the signs are different, the robustness of the watermark is weakened. Therefore, we choose to remove this unstable factor, and the modified watermark embedding process is as follows:

[0072]

[0073] Where N represents the number of watermark sequences selected to be embedded simultaneously, A k Represents the embedding strength of the kth watermark sequence, which is adaptively adjusted according to its similarity with the feature vector.

[0074] According to this scheme, it is possible to ensure that multiple watermark sequences can be flexibly selected and independently embedded in the same feature vector in parallel, thereby improving the watermark capacity; at the same time, the influence of the original image signal on the watermark is eliminated, thereby improving a certain degree of robustness.

[0075] Figure 1 This is the main flow chart of the watermark embedding technology of this embodiment. Figure 1 As shown, the highly robust image digital watermark embedding method proposed in this embodiment includes the following steps:

[0076] Receive N t-bit watermark sequences respectively, add 0 in front of the ones less than t, and perform BCH encoding on them to obtain a coded watermark sequence of length m;

[0077] (1) Perform spread spectrum processing on the encoded watermark sequence:

[0078] a. Use a key to generate N two-dimensional random codebooks. Each row of the codebook represents a random vector of length n, and the total number of vectors in the codebook is equal to the length m of a single coded watermark sequence; use the Schmidt orthogonalization method to orthogonalize and normalize all random vectors so that all vectors are independent of each other. The variable n is the number of selected characteristic coefficients, which is 256 in this embodiment.

[0079] b. Generate N spread spectrum watermarks according to the following rules: Assume that the kth watermark sequence is Wk = [t0, t1, t2, ..., tm-1], each 0 / 1 watermark in Wk corresponds to a spread spectrum vector Pi = [pi0, pi1, ..., pi(n-1)] of length n in its codebook, i = 0, 1, ..., m-1. Generate a spread spectrum watermark vector Spr of length n according to the following formula k =[b0,b1,…,bn-1]:

[0080]

[0081] in,

[0082] (2) If the original image is a color image, convert it into the YCbCr color space and separate its Y channel as the watermark carrier; if it is a gray image, directly use it as the watermark carrier. Preprocess the length and width of the image matrix to meet the block requirements:

[0083] a. If the row or column of the image matrix is ​​less than 16*32=512, the original matrix is ​​enlarged by the same scale factor in the row and column directions until both the row and column of the matrix are not less than 512. The purpose is to make the image matrix have a suitable size, in which case it is more convenient to embed the watermark.

[0084] b. If the row or column of the image matrix cannot divide 32, the row or column is repeatedly lengthened by one unit until both the row and column of the matrix can divide 32. The purpose of this step is to ensure the integrity of the image after segmentation, and this operation will not seriously affect the image quality.

[0085] (3) Perform non-overlapping block processing on the preprocessed image and apply DWT and first-level DCT:

[0086] a. Split the image matrix into non-overlapping blocks. The total number of blocks is 32*32. The height and width of each block can be obtained by dividing the rows and columns of the matrix by 32 respectively.

[0087] b. First, perform a DWT transform on each block, and then perform a DCT transform on the first-level LL sub-block of each block to obtain the final DWT-DCT sub-block, and select the coefficients (intermediate frequency coefficients) at position (4, 4) to form a 32*32 coefficient matrix.

[0088] According to the DCT properties discussed in the TDSS scheme, when the image matrix is ​​transposed, flipped, or rotated by an integer multiple of 90 degrees, the DCT coefficients with even height or width indices have the greatest stability, while other coefficients usually become opposite numbers. Therefore, coefficients with even height and width indices are selected to resist these types of distortion. In summary, the main purpose of the first-level DCT is to select stable intermediate frequency coefficients in the transform domain to obtain good performance.

[0089] (4) Apply the two-level DCT to the coefficient matrix and select the image feature vector:

[0090] a. Perform DCT transformation on the 32*32 coefficient matrix;

[0091] b. Select the coefficients on the main diagonal of the matrix whose row and column indices are both even numbers, and use these coefficients as the eigenvector V1;

[0092] c. Symmetrically select the even-index coefficient pairs on both sides of the main diagonal, and the obtained coefficients are used as the eigenvector V2;

[0093] d. Combine V1 and V2 to obtain the final image feature vector V with a length of 256.

[0094] (5) The N spread spectrum watermark vectors in step (2) are embedded in parallel into the image feature vector V in step (5) according to the following formula:

[0095]

[0096] Where N represents the number of watermark sequences selected for simultaneous embedding (N*m≤n), in this embodiment N=2, m=128. A represents the embedding strength of the common watermark, sim(a,b) represents the similarity between vectors a and b, and σ represents the elastic watermark strength (-1≤σ≤1), which can be adaptively adjusted according to its similarity with the feature vector (the higher the similarity, the higher the embedding strength, and vice versa).

[0097] In actual situations, the number and length of embedded watermarks can be selected as needed. The smaller the total length of the watermark, the longer the feature vector length remains unchanged, the more coefficient energy is allocated to each watermark bit, and the more robust it is. At the same time, the change of the feature coefficient will also be reduced, and the invisibility of the watermark will be improved.

[0098] (6) Update the DCT coefficients and perform two-level inverse discrete cosine transform (IDCT) and inverse discrete wavelet transform (IDWT) to obtain a watermarked image. If the image is a color image, merge the watermarked Y channel with the Cb and Cr channels to obtain a YCbCr format image, which is then converted to the RGB color space to obtain a watermarked color image. Choose whether to save the SURF features of the watermarked image as needed for subsequent geometric correction.

[0099] Figure 2 This is the main flow chart of the watermark extraction technology of this embodiment. Figure 2 As shown, the highly robust image digital watermark extraction method proposed in this embodiment includes the following steps:

[0100] (1) If the SURF features of the original watermark image are stored in the database, the SURF features of the watermark image are calculated and geometric correction is performed to obtain the corrected watermarked image, and then step (2) is executed; otherwise, step (2) is executed.

[0101] (2) Consistent with the operation (2) in the watermark embedding process, preprocess the watermarked image (which may have been attacked).

[0102] (3) Apply the methods in steps (3) and (4) of the watermark embedding process to extract features of the watermarked image and obtain the image feature vector V* . Extract the encoded watermark according to the relevant scheme:

[0103] a. Generate a random codebook using the same key as the watermark embedding process, and orthogonalize and normalize the codebook according to the rules of step (1)(a) in the watermark embedding process.

[0104] b. Extract the encoded watermark according to the following rules: Assume that the extracted image feature vector is The codebook of the kth watermark sequence is Pi = [pi0, pi1, ..., pi(n-1)], i = 0, 1, ..., m-1. The watermark W' = [t0', t1', ..., tm-1'] of length m is extracted from it.

[0105]

[0106] Among them, dot(A,B) represents the dot product operation on vectors A and B.

[0107] The extracted N coded watermark sequences of length m are respectively decoded by BCH to obtain their own watermark sequences.

[0108] In this embodiment, the key points are as follows:

[0109] (1) In the process of extracting image feature vectors, DWT and two-level DCT transformation are combined. After the image is divided into blocks, a DWT transformation is performed on each block, and the LL sub-block is selected for DCT transformation. The intermediate frequency coefficients are selected as the coefficients of the matrix. The obtained coefficient matrix is ​​subjected to DCT again to obtain a two-level DCT coefficient matrix. The characteristic coefficients are selected as the watermark carrier according to the specific rules in the TDSS scheme.

[0110] (2) In the watermark embedding process, the watermark sequence is firstly BCH encoded and divided into multiple watermark sequences. The corresponding spread spectrum codebooks are generated according to the key. The properties of orthogonal vectors are used to embed multiple orthogonal spread spectrum watermark vectors into the same image feature vector. Then, the original coefficients are replaced and the corresponding inverse transformation is performed to obtain the watermarked image. In the watermark extraction process, the image feature vector is first obtained step by step (for scenes that may be attacked by small-angle rotation and translation, the image is subjected to SURF geometric correction according to the saved SURF features). Then, the spread spectrum codebooks of each watermark are obtained according to the key. The dot product operation is performed on the image feature vectors. Since the orthogonal vectors do not affect each other, multiple different BCH encoded watermark sequences can be completely extracted in the end, and the final watermark is obtained by combining and decoding.

[0111] (3) A series of preprocessing was performed on the image. For color RGB images, they were converted to YCbCr color space, and the more robust Y color channel was selected for subsequent watermark embedding. Gray images were directly watermarked. For images with a DCT block length or width less than 8 after the first block division, they were proportionally enlarged until the block size was met. Since the same number of blocks for images of different resolutions may result in the loss of some pixels, the length and width were fine-tuned so that the image could be completely blocked.

[0112] Compared with the prior art, the technical solution proposed in this embodiment can not only achieve blind watermark extraction, but also maintain a high robust extraction accuracy rate in the face of various common attacks. In terms of invisibility, the comparison before and after embedding the watermark can be referred to Figure 3 .

[0113] By implementing the technical solution and comparing it with traditional TDSS and other solutions, the present embodiment has improved resistance to various attacks. In particular, the robustness to small-angle rotation attacks and translation attacks has been significantly improved, and the degree of damage to the original image has also been improved. Figure 4 The watermark capacity and invisibility have been improved. The experimental results are shown in Table 1:

[0114] Table 1:

[0115] TDSS SSAES QDQ Proposed PSNR(db) 36.43 41.8 42.18 43.41 Capacity(bits) 128 128 128 256

[0116] Experimental method: Randomly select 100 pictures (including grayscale and color pictures), embed two 88-bit watermark sequences into each picture, calculate the peak signal-to-noise ratio (PSNR) of the watermark image and the original image, and take the average value. The experimental results are shown in Table 1. Perform geometric attacks or image processing attacks on the watermark image, calculate the bit error rate (%) of the extracted watermark, and take the average value. The experimental results are shown in Table 2.

[0117] Table 2:

[0118]

[0119]

[0120]

[0121] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "include..." or "comprise..." do not exclude the existence of other elements in the process, method, article or terminal device including the elements. In addition, in this article, "greater than", "less than", "exceed" and the like are understood to exclude the number itself; "above", "below", "within" and the like are understood to include the number itself.

[0122] The above description of the embodiments is to facilitate the understanding and use of the present invention by those skilled in the art. It is obvious that those skilled in the art can easily make various modifications to the embodiments and apply the general principles described herein to other embodiments without creative work. Therefore, the present invention is not limited to the above embodiments. Improvements and modifications made by those skilled in the art based on the disclosure of the present invention without departing from the scope of the present invention should be within the protection scope of the present invention.

Claims

1. A highly robust image digital watermark embedding method, characterized in that: The steps include: Step 1: Receive N t-bit watermark sequences, add 0 to the leading ones that are less than t, and perform BCH encoding on them to obtain a coded watermark sequence of length m; Step 2: Perform spread spectrum processing on the encoded watermark sequence; Step 3: A1. Preprocess the length and width of the image matrix to meet the block requirements, specifically including: if the row or column of the image matrix is ​​less than 16*32=512, then enlarge the original matrix in the row and column directions with the same scale factor until the row and column of the matrix are not less than 512; A2. If the row or column of the image matrix cannot divide 32, then repeatedly lengthen the row or column by one unit until the row and column of the matrix can divide 32; Step 4: Perform non-overlapping block processing on the pre-processed image and apply DWT and first-level DCT, specifically including: B1, divide the image matrix into non-overlapping blocks, the total number of blocks is 32*32; B2, first perform a DWT transform on each block, and then perform a DCT transform on the first-level LL sub-block of each block to obtain the final DWT-DCT sub-block, and select the coefficient at position (4, 4) to form a 32*32 coefficient matrix; Step 5: Apply the secondary DCT to the coefficient matrix and select the image feature vector; Step 6: Embed the N spread spectrum watermark vectors into the image feature vector V in parallel according to the following formula: Where N represents the number of watermark sequences selected for simultaneous embedding (N*m≤n), A represents the embedding strength of the public watermark, sim(a,b) represents the similarity between vectors a and b, and σ represents the elastic watermark strength (-1≤σ≤1); Step 7: Update the DCT coefficients and perform two-level inverse discrete cosine transform and inverse discrete wavelet transform to obtain a watermarked image.

2. A highly robust image digital watermark embedding method according to claim 1, characterized in that: The step 2 specifically includes: C1, using a key to generate N two-dimensional random codebooks. Each row of the codebook represents a random vector of length n, and the total number of vectors in the codebook is equal to the length m of a single coded watermark sequence; using the Schmidt orthogonalization method to orthogonalize and normalize all random vectors so that all vectors are independent of each other; C2, generating N spread spectrum watermarks according to the following rules: assuming that the k-th watermark sequence is Wk = [t0, t1, t2, ..., tm-1], each 0 / 1 watermark in Wk corresponds to a spread spectrum vector Pi = [pi0, pi1, ..., pi(n-1)] of length n in its codebook, i = 0, 1, ..., m-1, and generating a spread spectrum watermark vector of length n = [b0, b1, ..., bn-1] according to the following formula: in, 3. A highly robust image digital watermark embedding method according to claim 2, characterized in that: In the step 3, before preprocessing, if the original image is a color image, it is converted into a YCbCr color space, and its Y channel is separated as a watermark carrier; If it is a gray image, it is directly used as a watermark carrier; the step seven also includes: if the image is a color image, the Y channel with the watermark at this time is merged with the Cb and Cr channels to obtain a YCbCr format image, and then it is converted to the RGB color space to obtain a color image with a watermark, and whether to save the SURF features of the watermark image is selected as needed.

4. A highly robust image digital watermark embedding method according to claim 1, characterized in that: The step five specifically includes: D1, performing DCT transformation on the 32*32 coefficient matrix; D2, selecting coefficients on the main diagonal of the matrix whose row index and column index are both even numbers, and using these coefficients as the feature vector V1; D3, symmetrically selecting even-index coefficient pairs on both sides of the main diagonal, and using the obtained coefficients as the feature vector V2; D4, combining V1 and V2 to obtain the image feature vector V with a final length of 256.

5. A highly robust image digital watermark embedding system, characterized in that: include: Watermark sequence acquisition unit: used for receiving N t-bit watermark sequences, adding 0 to the front of the watermark sequences less than t, and performing BCH encoding on them to obtain a coded watermark sequence of length m; Spread spectrum processing unit: used for performing spread spectrum processing on the encoded watermark sequence; Preprocessing unit: used for A1, preprocessing the length and width of the image matrix to meet the block requirements, specifically including: if the row or column of the image matrix is ​​less than 16*32=512, then enlarging the original matrix in the row and column directions with the same scale factor until the row and column of the matrix are not less than 512; A2, if the row or column of the image matrix cannot be divided by 32, then repeatedly lengthening the row or column by a unit length until the row and column of the matrix can be divided by 32; Block processing and DCT unit: used for performing non-overlapping block processing on the pre-processed image and applying DWT and first-level DCT, specifically including: B1, dividing the image matrix into non-overlapping blocks, with a total number of blocks of 32*32; B2, first performing a DWT transformation on each block, and then performing a DCT transformation on the first-level LL sub-block of each block to obtain the final DWT-DCT sub-block, and selecting the coefficients at position (4, 4) to form a 32*32 coefficient matrix; A two-level DCT application unit: used to apply the two-level DCT to the coefficient matrix and select the image feature vector; Embedding unit: used to embed N spread spectrum watermark vectors into the image feature vector V in parallel according to the following formula: Where N represents the number of watermark sequences selected for simultaneous embedding (N*m≤n), A represents the embedding strength of the public watermark, sim(a,b) represents the similarity between vectors a and b, and σ represents the elastic watermark strength (-1≤σ≤1); Imaging unit: used to update the DCT coefficients and perform two-level inverse discrete cosine transform and inverse discrete wavelet transform to obtain a watermarked image.

6. A highly robust image digital watermark extraction method, characterized in that: The steps include: Step 1: Preprocess the watermarked image; Step 2: Extract features from the watermarked image, specifically including: E1, perform non-overlapping block processing on the pre-processed image and apply DWT and first-level DCT: divide the image matrix into non-overlapping blocks, with a total number of blocks of 32*32; E2, first perform a DWT transform on each block, and then perform a DCT transform on the first-level LL sub-block of each block to obtain the final DWT-DCT sub-block, select the coefficients at position (4, 4) to form a 32*32 coefficient matrix; E3, perform a DCT transform on the 32*32 coefficient matrix; E4, select the coefficients on the main diagonal of the matrix whose row index and column index are both even numbers, and use these coefficients as the feature vector V1; E5, symmetrically select the even-indexed coefficient pairs on both sides of the main diagonal, and the obtained coefficients are used as the feature vector V2; E6, combine V1 and V2 to obtain the image feature vector V with a final length of 256 * ; Step 3: Extract the coded watermark: Specifically including: F1, use the same key as the watermark embedding process to generate a random codebook, and orthogonalize and normalize the codebook according to the same rules as the watermark embedding process; F2, extract the coded watermark according to the following rules: define the extracted image feature vector as, the codebook of the kth watermark sequence is Pi = [pi0, pi1, ..., pi (n-1)], i = 0, 1, ..., m-1, and the watermark of length m extracted from it is W' = [t0', t1', ..., tm-1'] Among them, dot(A,B) represents the dot product operation of vectors A and B; Step 4: Perform BCH decoding on the extracted N coded watermark sequences of length m to obtain their respective watermark sequences.

7. A highly robust image digital watermark extraction method according to claim 6, characterized in that: Before the step 1, if the SURF features of the original watermark image are stored in the database, the SURF features of the watermark image at this time are calculated and geometric correction is performed to obtain a corrected watermarked image.

8. A highly robust image digital watermark extraction method according to claim 7, characterized in that: The step 1 specifically includes: if the row or column of the image matrix is ​​less than 16*32=512, then enlarging the original matrix in the row and column directions with the same scaling factor until both the row and column of the matrix are not less than 512; A2, if the row or column of the image matrix cannot be divided by 32, then repeatedly lengthening the row or column by a unit length until both the row and column of the matrix can be divided by 32.

9. A highly robust image digital watermark extraction system, characterized in that: include: Preprocessing unit: used to preprocess watermarked images; Feature extraction unit: used for feature extraction of watermarked images, specifically including: E1, non-overlapping block processing of the pre-processed image and application of DWT and first-level DCT: dividing the image matrix into non-overlapping blocks, with a total number of blocks of 32*32; E2, first performing a DWT transformation on each block, and then performing a DCT transformation on the first-level LL sub-block of each block to obtain the final DWT-DCT sub-block, selecting the coefficients at position (4, 4) to form a 32*32 coefficient matrix; E3, performing a DCT transformation on the 32*32 coefficient matrix; E4, selecting the coefficients on the main diagonal of the matrix whose row index and column index are both even numbers, and using these coefficients as the feature vector V1; E5, symmetrically selecting the even-indexed coefficient pairs on both sides of the main diagonal, and the obtained coefficients as the feature vector V2; E6, combining V1 and V2 to obtain the image feature vector V with a final length of 256 * ; Coded watermark extraction unit: used to extract the coded watermark: specifically including: F1, using the same key as the watermark embedding process to generate a random codebook, and orthogonalizing and unitizing the codebook according to the same rules as the watermark embedding process; F2, extracting the coded watermark according to the following rules: define the extracted image feature vector as, the codebook of the k-th watermark sequence is Pi = [pi0, pi1, ..., pi (n-1)], i = 0, 1, ..., m-1, and the watermark of length m extracted from it is W' = [t0', t1', ..., tm-1'] Among them, dot(A,B) represents the dot product operation of vectors A and B; Decoding unit: used to perform BCH decoding on the extracted N coded watermark sequences of length m to obtain respective watermark sequences.

10. A device, characterized in that: It comprises a processor and a memory, wherein the processor loads and executes instructions and data in the storage device to implement a highly robust image digital watermark embedding method as described in claims 1 to 4, and a highly robust image digital watermark extraction method as described in claims 6 to 8.