Digital image watermark processing method based on odd complementary sequence
Through the digital image watermark processing method based on odd complementary sequences, the watermark sequence is generated and embedded, and the ideal correlation and anti-interference of odd complementary sequences are used to solve the problems of spread spectrum watermark robustness and insensitivity, and the accurate extraction and high transparency of watermarks in the attack environment are achieved.
Patent Information
- Application Number
- CN202510656061.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-05-21
AI Technical Summary
The existing spread spectrum watermarking method is poor in robustness and lacks in perceptibility when facing attacks such as image cutting and compression, which affects image quality.
Using a digital image watermarking method based on odd complementary sequences, the watermark sequence is generated and the watermark is embedded in the frequency domain through two-dimensional discrete cosine transformation and key processing, and the transparency and robustness of the watermark are ensured by using the ideal correlation and anti-interference of the odd complementary sequence.
It improves the noise resistance and transparency of watermarks, and is suitable for scenarios with strict requirements on watermark visibility. It can accurately extract watermarks when facing common attacks without affecting image quality.
Smart Images

Figure CN120374345A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of watermark processing, and particularly to a digital image watermark processing method based on odd complementary sequences. Background Art
[0002] Digital watermark technology emerged as a new type of information hiding technology. This technology can provide further protection for the decrypted data and can embed a large amount of watermark information in the original carrier. Digital watermark technology is mainly used for the copyright protection and integrity authentication of digital images. As a main technology for protecting the copyright of digital images, the copyright information is embedded into the host image in a concealed form through a watermark algorithm. When the copyright of a digital image is infringed, the copyright information can be extracted through a watermark extraction algorithm as the main evidence of the ownership of the digital image.
[0003] Image digital watermarks generally have three characteristics: transparency, robustness, and security. Among them: (1) The transparency of the watermark mainly means that there is no obvious change in the visual perception of the digital image after embedding the watermark information compared with before embedding, that is, the host image and the watermarked image are imperceptible to the observer's visual system. And transparency also means that even using statistical methods, the original watermark cannot be recovered. (2) Robustness means that the watermarked image can still extract the watermark information after being attacked and can still maintain its integrity and authentication authenticity. Common attacks on images include filtering, compression, rotation, translation, etc. Transparency and robustness are two important characteristics of digital image watermarks. The watermark should not only have concealment but also have a certain degree of robustness. (3) Finally, security is manifested as the ability of the watermark to resist malicious attacks. On the one hand, the frameworks of the watermark embedding algorithm and extraction algorithm are secret, and the embedded digital watermark information is processed through an encryption algorithm using a key; on the other hand, the embedded digital watermark is statistically undetectable, and unauthorized users cannot detect and destroy the watermark.
[0004] Spread-spectrum watermark is an important method in digital watermarks. The spread-spectrum sequences used for digital watermarks include independently and identically distributed random spread-spectrum sequences and spread-spectrum sequences used in spread-spectrum communication, which appeared earlier than digital watermarks. Common spread-spectrum sequences include, for example, normal distribution sequences, also called Gaussian sequences. However, this type of watermark has obvious defects: (1) Poor robustness: When the watermark signal faces attacks such as image shearing and compression, the spread-spectrum watermark may lose its robustness and is easily damaged. (2) Poor imperceptibility: The spread-spectrum watermark may cause a decrease in image quality in some cases, affecting the concealment of the watermark. Summary of the Invention
[0005] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a digital image watermark processing method based on odd complementary sequences.
[0006] The object of the present invention is achieved by the following technical solutions:
[0007] In a first aspect of the present invention, there is provided a digital image watermarking processing method based on odd complementary sequences, including a watermark sequence generation step and a watermark sequence embedding step; the watermark sequence generation step includes the following sub-steps:
[0008] Using a first key seed to generate a binary odd complementary sequence pair (a, b) of length N, and the alphabet set of the binary odd complementary sequence pair is selected from {±1};
[0009] Let w = a||b represent a seed sequence of length 2N;
[0010] Performing sequence odd cyclic shift expansion on the seed sequence to create a watermark sequence ;
[0011] The watermark sequence embedding step includes the following sub-steps:
[0012] Converting the format of the picture to be watermarked from RGB format to YCbCr format;
[0013] Performing two-dimensional discrete cosine transform on each original Y coefficient in the YCbCr format picture, that is, converting the time-domain pixel data of the original Y coefficient to the frequency domain to obtain the frequency-domain coefficient F, where the Y coefficient refers to the luminance Y component in the YCbCr color space;
[0014] Performing Zigzag processing on the frequency-domain coefficient F and using a second key key to extract a medium-frequency coefficient of length 2N ;
[0015] Using the medium-frequency coefficient , embedding coefficient and watermark sequence to calculate the frequency-domain coefficient D after watermark embedding;
[0016] Performing inverse two-dimensional discrete cosine transform on the frequency-domain coefficient D after watermark embedding to obtain a new luminance Y coefficient, and synthesizing the new luminance Y coefficient with the original luminance Y coefficient;
[0017] Converting the YCbCr format picture after synthesizing the Y coefficient back to RGB format to complete watermark embedding.
[0018] Furthermore, in the watermark sequence generation step:
[0019] In the binary odd complementary sequence pair (a, b), a = (a(0), a(1),..., a(N−1)), b = (b(0), b(1),..., b(N−1));
[0020] The seed sequence w = a||b = (a(0), a(1),..., a(N−1), b(0), b(1),..., b(N−1));
[0021] The watermark sequence is calculated as follows:
[0022]
[0023] where 0 ≤ t ≤ N - 1, is the dilation operator, is the odd displacement transformation sequence of the sequence, specifically expressed as: , .
[0024] Furthermore, in the step of embedding the watermark sequence:
[0025] The calculation method of the frequency domain coefficient is specifically expressed as:
[0026]
[0027] where x and y are the spatial domain coordinates of the image, and u and v are the frequency domain coordinates of the image; and are normalization factors; Y(x, y) is the pixel value of the original Y coefficient, and F(u, v) is the frequency domain coefficient after two-dimensional discrete cosine transform; M is the block size of the image; the normalization factor takes the value:
[0028] , ;
[0029] The extraction of the intermediate frequency coefficients of length 2N using the second key key , includes: generating 2N indexes using the second key key as a random seed, and these indexes correspond to the intermediate frequency region in the frequency domain coefficient F; selecting 2N intermediate frequency components from the frequency domain coefficient F according to the indexes generated by the key to obtain the intermediate frequency coefficient ;
[0030] The use of the intermediate frequency coefficient , the embedding coefficient and the watermark sequence to calculate the frequency domain coefficient D after watermark embedding, includes: for .
[0031] Furthermore, the method further includes a step of extracting the watermark sequence; the step of extracting the watermark sequence includes the following sub-steps:
[0032] Convert both the original image in RGB format and the watermark image in RGB format to YCbCr format;
[0033] Perform two-dimensional discrete cosine transform processing on each original Y coefficient of the original image in YCbCr format and each original Y coefficient of the watermark image respectively to obtain the original frequency domain coefficient F0 and the watermark frequency domain coefficient F w ;
[0034] Perform Zigzag processing on the original frequency domain coefficient F0 and the watermark frequency domain coefficient F w and extract the original intermediate frequency coefficients of length 2N using the second key key 0 and the watermark intermediate frequency coefficients w ;
[0035] For Obtain the intermediate frequency coefficient difference of length 2N , where ;
[0036] Detect whether there is a watermark by calculating the inner product of the intermediate frequency coefficient difference and the watermark sequence .
[0037] Furthermore, the detecting whether there is a watermark by calculating the inner product of the intermediate frequency coefficient difference and the watermark sequence includes:
[0038] When the inner product of the calculated intermediate frequency coefficient difference and the watermark sequence is greater than a preset value, it is considered that there is a watermark;
[0039] Otherwise, there is none.
[0040] The beneficial effects of the present invention are:
[0041] In an exemplary embodiment of the present invention, a large number of complementary interference watermark sequences are generated using odd complementary sequences with ideal complementary properties for watermark processing, mainly focusing on improving the anti-noise ability and transparency, and are applicable to scenarios with more stringent requirements for watermark visibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is a flowchart of a digital image watermark processing method based on odd complementary sequences provided in an exemplary embodiment of the present invention;
[0043] Figure 2 is a schematic diagram of an original image provided in an exemplary embodiment of the present invention;
[0044] Figure 3 is a schematic diagram of comparing watermark images when the embedding coefficient α is 5 provided in an exemplary embodiment of the present invention;
[0045] Figure 4 Schematic diagram of comparison of watermark images when the embedding coefficient α is 10 provided in an exemplary embodiment of the present invention;
[0046] Figure 5 Schematic diagram of comparison of watermark images when the embedding coefficient α is 20 provided in an exemplary embodiment of the present invention;
[0047] Figure 6 Schematic diagram of a watermark image with added Gaussian white noise when N = 768 and the embedding coefficient is 5 provided in an exemplary embodiment of the present invention;
[0048] Figure 7 Schematic diagram of the watermark extraction result when N = 768 and the embedding coefficient is 5 with added Gaussian white noise provided in an exemplary embodiment of the present invention;
[0049] Figure 8 Schematic diagram of a watermark image with added Gaussian white noise when N = 768 and the embedding coefficient is 10 provided in an exemplary embodiment of the present invention;
[0050] Figure 9 Schematic diagram of the watermark extraction result when N = 768 and the embedding coefficient is 10 with added Gaussian white noise provided in an exemplary embodiment of the present invention. Detailed implementation manners
[0051] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0052] In the description of the present invention, it should be noted that the directions or positional relationships indicated by terms such as "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. In addition, terms such as "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0053] In the description of the present invention, it should be noted that unless otherwise clearly specified and limited, the terms "installation", "connection" and "coupling" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0054] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0055] See Figure 1 , Figure 1 , which shows a flowchart of a digital image watermark processing method based on odd complementary sequences provided in an exemplary embodiment of the present invention, including a watermark sequence generation step and a watermark sequence embedding step; the watermark sequence generation step includes the following sub-steps:
[0056] Using a first key seed to generate a pair of binary odd complementary sequences (a, b) with a length of N, and the alphabet set of the binary odd complementary sequence pair is selected from {±1};
[0057] Let w = a||b represent a seed sequence with a length of 2N;
[0058] Performing sequence odd cyclic shift expansion on the seed sequence to create a watermark sequence ;
[0059] The watermark sequence embedding step includes the following sub-steps:
[0060] Converting the format of the picture to be embedded with the watermark from the RGB format to the YCbCr format to facilitate the embedding of the watermark;
[0061] Performing a two-dimensional discrete cosine transform on each original Y coefficient in the YCbCr format picture, that is, converting the time-domain pixel data of the original Y coefficient to the frequency domain to obtain the frequency-domain coefficient F, where the Y coefficient refers to the luminance Y component in the YCbCr color space, providing a basis for subsequent watermark embedding or compression;
[0062] Performing Zigzag processing on the frequency-domain coefficient F and using a second key key to extract a medium-frequency coefficient with a length of 2N ; where the 2N here is the same as the 2N value in the seed sequence with a length of 2N in the first step;
[0063] Using the medium-frequency coefficient , the embedding coefficient and the watermark sequence Calculate the frequency-domain coefficient D after watermark embedding;
[0064] Perform an inverse two-dimensional discrete cosine transform on the frequency-domain coefficient D after watermark embedding to obtain a new luminance Y coefficient, and synthesize the new luminance Y coefficient with the original luminance Y coefficient;
[0065] Convert the YCbCr format image after synthesizing the Y coefficient back to the RGB format to complete watermark embedding.
[0066] Specifically, in this exemplary embodiment, a correlation sequence needs to be generated before the step of embedding the watermark sequence. Therefore, in the step of generating the watermark sequence, a large number of available watermark sequences can be generated using odd complementary sequences, and these sequences do not interfere with each other (it can be known by calculating the inner product between the above-mentioned seed sequence and the watermark sequence, and the subsequent exemplary embodiments will detail the calculation process); after generating sufficient watermark sequences, then in the step of embedding the watermark sequence, these digital watermark sequences are appropriately embedded into the picture, and DCT domain embedding is used to ensure the invisibility of the watermark.
[0067] Adopting the method in this exemplary embodiment has the following advantages:
[0068] (1) Ideal correlation characteristics: Odd complementary sequences have ideal correlation, that is, their autocorrelation and cross-correlation characteristics enable the watermark signal to still maintain a high extractability under different signal processing and attack operations. Because odd complementary sequences are designed with ideal autocorrelation and cross-correlation characteristics, the inner product value has a spike during watermark extraction, thus ensuring the accuracy and anti-interference ability of watermark extraction, and the inner product can be regarded as a special case of autocorrelation and cross-correlation when the shift amount τ = 0. This ideal correlation can ensure that even in the face of common attacks such as cropping, compression, and rotation, the watermark information can still be accurately restored.
[0069] (2) Strong anti-interference ability: Due to the design characteristics of odd complementary sequences themselves, they can effectively resist various interference signals. This enables watermarks based on these sequences to still maintain strong stability and clarity when facing attacks such as noise, compression, or image processing. This anti-interference property is an important part of the watermark robustness, especially in practical applications where digital media are often subject to different types of interference.
[0070] (3) Good imperceptibility (transparency): The design of odd complementary sequences enables the watermark not to significantly affect the quality of the original media when embedded. The imperceptibility of the watermark is very important because it requires that the watermark does not attract the user's attention after embedding and does not reduce the visual experience of the image or video. The special properties of odd complementary sequences allow effective protection information to be embedded without affecting the user experience.
[0071] (4)Non-interference characteristic: Compared with traditional watermarking methods, odd complementary sequences have flexible lengths and construction methods, allowing multiple watermarks to be embedded in the same medium without interference. This makes it particularly suitable for scenarios that require multiple copyright protections or multi-factor authentication simultaneously, such as applying multiple watermarks in the fields of commerce and copyright protection.
[0072] In summary, this exemplary embodiment generates a large number of complementary interference watermark sequences based on odd complementary sequences with ideal complementary properties, mainly focusing on improving the anti-noise ability and transparency, and is suitable for scenarios with more stringent requirements for watermark visibility.
[0073] The following content will elaborate on the specific implementation methods of each step in detail:
[0074] More preferably, in an exemplary embodiment, in the step of generating the watermark sequence:
[0075] In the binary odd complementary sequence pair (a, b), a = (a(0), a(1),..., a(N−1)), b = (b(0), b(1),..., b(N−1));
[0076] The seed sequence w = a||b = (a(0), a(1),..., a(N−1), b(0), b(1),..., b(N−1));
[0077] The watermark sequence is calculated as follows:
[0078]
[0079] where 0 ≤ t ≤ N - 1, is the dilation operator, is the odd displacement transformation sequence of the sequence, specifically expressed as: , .
[0080] Specifically, in this exemplary embodiment, corresponding to the step of generating the watermark sequence, the specific generation scheme includes:
[0081] S101: Use the first key seed to generate a binary odd complementary sequence pair (a, b) of length N. The alphabet set of the binary odd complementary sequence pair is selected from {±1}, where a = (a(0), a(1),..., a(N−1)), b = (b(0), b(1),..., b(N−1));
[0082] S102: Let w = a||b represent a seed sequence of length 2N, where a||b = (a(0), a(1),..., a(N−1), b(0), b(1),..., b(N−1));
[0083] S103: Perform odd cyclic shift expansion on the said seed sequence to create a watermark sequence , where:
[0084]
[0085] In the formula, 0 ≤ t ≤ N - 1, is the expansion operator, is the odd displacement transformation sequence of the sequence, specifically expressed as: , .
[0086] Through the above three steps, a large number of available watermark sequences can be generated using odd complementary sequences, and these sequences do not interfere with each other. Because by calculating the inner product between the above-mentioned seed sequence and the watermark sequence, we can obtain:
[0087]
[0088]
[0089]
[0090] where, and respectively represent the autocorrelation function values of the sequences and sequence b, represents the shift amount (or delay amount) of the sequence in the formula. When the result of the inner product is 0, it indicates that the two sequences are orthogonal and the sequences do not interfere with each other. In fact, the calculation of the above formula is exactly this result.
[0091] More preferably, in an exemplary embodiment, in the step of embedding the watermark sequence:
[0092] The calculation method of the frequency domain coefficient is specifically expressed as:
[0093]
[0094] In the formula, x and y are the spatial domain coordinates of the picture, and u and v are the frequency domain coordinates of the picture; and are normalization factors; Y(x, y) is the pixel value of the original Y coefficient, and F(u, v) is the frequency domain coefficient after two-dimensional discrete cosine transform; M is the block size of the picture; the normalization factor takes values as:
[0095] , ;
[0096] The extraction of the intermediate frequency coefficient of length 2N using the second key key , including: generating 2N indices using the second key key as a random seed, where these indices correspond to the intermediate frequency region in the frequency domain coefficients F; selecting 2N intermediate frequency components from the frequency domain coefficients F according to the indices generated by the key to obtain intermediate frequency coefficients ;
[0097] The use of the intermediate frequency coefficients , embedding coefficients and the watermark sequence to calculate the frequency domain coefficients D after watermark embedding, including: for .
[0098] Specifically, in this exemplary embodiment, corresponding to the step of embedding the watermark sequence, the specific embedding scheme includes:
[0099] The step of embedding the watermark sequence includes the following sub-steps:
[0100] S201: Convert the format of the image to be watermarked from the RGB format to the YCbCr format to facilitate watermark embedding;
[0101] S202: Perform a two-dimensional discrete cosine transform (2Dimensional Discrete Cosine Transform, abbreviated as 2D-DCT) on each original Y coefficient in the YCbCr format image, that is, convert the time-domain pixel data of the original Y coefficient to the frequency domain to obtain the frequency domain coefficients F, where the Y coefficient refers to the luminance Y component in the YCbCr color space;
[0102] Among them, the calculation method of the frequency domain coefficients is specifically expressed as:
[0103]
[0104] In the formula, x and y are the spatial domain coordinates of the image, and u and v are the frequency domain coordinates of the image; and are normalization factors; Y(x, y) is the pixel value of the original Y coefficient (calculated on an 8×8 or 16×16 block), and F(u, v) is the frequency domain coefficient after two-dimensional discrete cosine transform; M is the block size of the image (usually 8 or 16); the normalization factor takes values:
[0105] , ;
[0106] This step converts the time-domain pixel data of the Y component to the frequency domain and provides a basis for subsequent watermark embedding or compression.
[0107] S203: Perform Zigzag processing on the frequency domain coefficients F and extract intermediate frequency coefficients of length 2N using the second key key : Generate 2N indices using the second key key as a random seed, where these indices correspond to the intermediate frequency region in the frequency domain coefficients F; select 2N intermediate frequency components from the frequency domain coefficients F according to the indices generated by the key to obtain intermediate frequency coefficients. ; Here, the value of 2N is the same as the value of 2N in the watermark sequence in the first step.
[0108] S204: Use the intermediate frequency coefficients , embedding coefficients and the watermark sequence to calculate the frequency domain coefficients D after watermark embedding: For ; where D represents the modified DCT transform coefficients, that is, the frequency domain coefficients after watermark embedding.
[0109] S205: To obtain a new Y component, D needs to be introduced into the DCT coefficients and then perform an inverse DCT transform: Perform an inverse two-dimensional discrete cosine transform on the frequency domain coefficients D after watermark embedding to obtain a new luminance Y coefficient; and synthesize the new luminance Y coefficient with the original luminance Y coefficient (synthesize in the YCbCr color space and only update the Y component).
[0110] S206: Convert the YCbCr format image after synthesizing the Y coefficient back to the RGB format to complete watermark embedding.
[0111] Figure 2 is the original image. Figure 3 , Figure 4 , Figure 5 respectively show the watermark images when the embedding coefficient takes values of 5, 20, and 50. There is no significant difference between the image with the watermark added and the original image when observed with the naked eye, and it can be obtained that the watermark has good imperceptibility.
[0112] More preferably, in an exemplary embodiment, the method further includes a step of extracting the watermark sequence; the step of extracting the watermark sequence includes the following sub-steps:
[0113] Convert both the original RGB format image and the RGB format watermark image to the YCbCr format.
[0114] Perform two-dimensional discrete cosine transform processing on each original Y coefficient of the original YCbCr format image and each original Y coefficient of the watermark image respectively to obtain the original frequency domain coefficients F0 and the watermark frequency domain coefficients F w ;
[0115] Perform Zigzag processing on the original frequency domain coefficients F0 and the watermark frequency domain coefficients F w and extract the original intermediate frequency coefficients 0 with a length of 2N and the watermark intermediate frequency coefficients w ;
[0116] For a difference of intermediate frequency coefficients with a length of 2N is obtained , where ;
[0117] By calculating the inner product of the difference of intermediate frequency coefficients and the watermark sequence to detect the existence of the watermark.
[0118] Specifically, in this exemplary embodiment, some calculation steps in the step of extracting the watermark sequence are consistent with the calculation method in the step of embedding the watermark sequence, such as format conversion, frequency domain calculation, etc. The difference is that the intermediate frequency coefficients (original intermediate frequency coefficients and watermark intermediate frequency coefficients) are calculated for the original image and the watermark image respectively, and the inner product of the difference of the intermediate frequency coefficients of the two and is used to detect the existence of the watermark. This is because these sequences have good autocorrelation and cross-correlation characteristics, so that the inner product calculation can be used to determine the existence of the watermark during detection. If the inner product value is large (the inner product is greater than the preset value, preferably 1.6N). For example, if the sequence length N = 512, the preferred value is 1.6 × 512 = 819.2, it indicates that the signal has a strong component in the space of the watermark sequence, that is, there is a watermark corresponding to the watermark sequence . This step can be used to detect whether the original image and the watermark image have added the watermark corresponding to a specific watermark sequence. Because the watermark sequence is designed to have good autocorrelation and cross-correlation, in the absence of noise interference, the inner product value should be close to the ideal value (2N). Due to the existence of noise or attacks, the inner product value should be between 80% and 90% of the ideal value.
[0119] Based on the above exemplary embodiment, next, consider the watermark image and watermark extraction in the case of adding noise under different embedding coefficients:
[0120] Figure 6 and Figure 7 present the watermark image and watermark extraction results when adding Gaussian white noise with N = 768 and an embedding coefficient of 5, Figure 8 and Figure 9 right present the watermark image and watermark extraction results when adding Gaussian white noise with N = 768 and an embedding coefficient of 10. Among them Figure 7 and Figure 9 the abscissa of is the displacement amount of the detection sequence, Figure 7 and Figure 9 the ordinate of is the cross-correlation value of the sequence to be detected.
[0121] The results show that under Gaussian white noise attacks, it does not affect the maximum peak of watermark extraction, nor does it prevent the correct detection and successful extraction of the watermark. Specifically, as Figure 7 shown, the maximum peak in the figure (about 7000) appears at the displacement UID = 300 of the detection sequence, while the cross-correlation values of the background noise mostly fluctuate around 1000, and the peak is far higher than the background noise, forming a sharp and prominent peak, which means that the watermark signal has a very high matching at this position, indicating that the watermark signal has strong robustness and anti-interference ability. And the inner product threshold for correctly detecting the watermark is usually 0.8×2N = 0.8×1536 = 1228.8, and the peak 7000 is much larger than this threshold, proving that it is not affected by noise, indicating that the watermark can be successfully extracted. Figure 9 And so on.
[0122] Obviously, the above embodiments are merely examples given for clear illustration and are not limitations on the implementation manners. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. And the obvious changes or modifications derived therefrom are still within the protection scope of the present invention.
Claims
1. A digital image watermarking processing method based on odd complementary sequences, characterized in that: Including a step of generating a watermark sequence and a step of embedding the watermark sequence; the step of generating the watermark sequence includes the following sub-steps: Using a first key seed to generate a pair of binary odd complementary sequences (a, b) with a length of N, and the letter set of the pair of binary odd complementary sequences is selected from {±1}; Let w = a||b represent a seed sequence with a length of 2N; Perform sequence odd-cycle shift expansion on the seed sequence to create a watermark sequence ; The step of embedding the watermark sequence includes the following sub-steps: Converting the format of the image to be embedded with the watermark from the RGB format to the YCbCr format; Performing a two-dimensional discrete cosine transform on each original Y coefficient in the YCbCr format image, that is, converting the time-domain pixel data of the original Y coefficient to the frequency domain to obtain the frequency-domain coefficient F, where the Y coefficient refers to the luminance Y component in the YCbCr color space; Perform Zigzag processing on the frequency domain coefficients F and extract intermediate frequency coefficients of length 2N using the second key key ; Using intermediate frequency coefficients , embedding coefficients and watermark sequence Calculate the frequency domain coefficient D after watermark embedding; Performing an inverse two-dimensional discrete cosine transform on the frequency-domain coefficient D after embedding the watermark to obtain a new luminance Y coefficient, and synthesizing the new luminance Y coefficient with the original luminance Y coefficient; Converting the YCbCr format image after synthesizing the Y coefficient back to the RGB format to complete the watermark embedding.
2. The digital image watermarking processing method based on odd complementary sequences according to claim 1, characterized in that: In the step of generating the watermark sequence: In the pair of binary odd complementary sequences (a, b), a = (a(0), a(1),..., a(N−1)), b = (b(0), b(1),..., b(N−1)); The seed sequence w = a||b = (a(0), a(1),..., a(N−1), b(0), b(1),..., b(N−1)); Watermark sequence The calculation method is as follows: where \(0\leq t\leq N - 1\), is the dilation operator, is the odd displacement transformation sequence of the sequence, specifically expressed as: , .
3. The digital image watermarking processing method based on odd complementary sequences according to claim 1, wherein: In the step of embedding the watermark sequence: The calculation method of the frequency-domain coefficient is specifically expressed as: where x and y are the spatial domain coordinates of the image, and u and v are the frequency domain coordinates of the image; and are normalization factors; Y(x, y) is the pixel value of the original Y coefficient, F(u, v) is the frequency domain coefficient after two-dimensional discrete cosine transform; M is the block size of the image; the normalization factor takes the value of: , ; The extraction of intermediate frequency coefficients of length 2N using the second key key , including: generating 2N indexes by using the second key key as a random seed, where these indexes correspond to the intermediate frequency region in the frequency domain coefficient F; selecting 2N intermediate frequency components from the frequency domain coefficient F according to the indexes generated by the key to obtain the intermediate frequency coefficients ; The use of intermediate frequency coefficients , embedding coefficients and watermark sequence to calculate the frequency domain coefficient D after watermark embedding, including: for .
4. The digital image watermarking processing method based on odd complementary sequences according to claim 3, characterized in that: The method further includes a step of extracting the watermark sequence; the step of extracting the watermark sequence includes the following sub-steps: Converting both the original RGB format image and the RGB format watermark image to the YCbCr format; Perform two-dimensional discrete cosine transform processing on each original Y coefficient of the original image in YCbCr format and each original Y coefficient of the watermark image respectively, to obtain the original frequency domain coefficients F0 and the watermark frequency domain coefficients F w ; Perform Zigzag processing on the original frequency domain coefficients F0 and the watermark frequency domain coefficients F w and extract the original intermediate frequency coefficients of length 2N using the second key key 0 and the watermark intermediate frequency coefficients w ; For obtain the intermediate frequency coefficient difference with a length of 2N , where ; By calculating the difference of intermediate frequency coefficients and the watermark sequence to detect whether there is a watermark.
5. The digital image watermarking processing method based on odd complementary sequences according to claim 4, characterized in that: Detecting whether there is a watermark by calculating the inner product of the intermediate frequency coefficient difference and the watermark sequence includes: When calculating the difference of intermediate frequency coefficients and the inner product of the watermark sequence is greater than a preset value, it is considered that there is a watermark; Otherwise, there is none.
Citation Information
Patent Citations
Mixing domain vector map watermark embedding method and extracting method
CN117830068A
Didigal audio waterprint method based on low density parity check code
CN1870132A
Software and method for embedding data in two color images
US20070092102A1