Digital image watermarking method based on odd complementary sequence
Through the digital image watermark processing method based on odd complementary sequence, the watermark sequence is generated and embedded. By using frequency domain processing and key technology, the problems of insufficient robustness and imperceptibility of spread spectrum watermark are solved, and efficient watermark extraction and protection in attack environment are achieved.
Patent Information
- Application Number
- CN202510656061.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-05-21
AI Technical Summary
Existing spread spectrum watermarking methods have poor robustness and insufficient imperceptibility when facing attacks such as image cropping and compression, which affects image quality.
A digital image watermarking method based on odd complementary sequence is adopted to generate a watermark sequence and embed the watermark in the frequency domain through two-dimensional discrete cosine transform and key processing. The ideal correlation and anti-interference properties of the odd complementary sequence are used to ensure the robustness and transparency of the watermark.
The watermark's noise resistance and transparency are improved, and it can accurately extract the watermark in the face of common attacks. It is suitable for scenarios with strict requirements on watermark visibility, especially in the fields of commerce and copyright protection.
Smart Images

Figure CN120374345B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of watermark processing, in particular to a digital image watermark processing method based on odd complementary sequence. Background Art
[0002] Digital watermarking technology has emerged as a new type of information hiding technique. This technology provides further protection for decrypted data and can embed large amounts of watermark information within the original medium. Digital watermarking is primarily used for copyright protection and integrity verification of digital images. As a key technology for protecting digital image copyrights, watermarking algorithms embed copyright information in a covert form within the host image. In the event of copyright infringement, watermark extraction algorithms can be used to extract the copyright information and serve as primary evidence of the digital image's ownership.
[0003] Image digital watermarks generally have three characteristics: transparency, robustness, and security. Among them: (1) The transparency of the watermark mainly refers to the fact that the digital image does not undergo obvious visual changes after the watermark information is embedded in it. That is, the host image and the watermarked image are imperceptible to the observer's visual system. In addition, transparency is also manifested in that even using statistical methods, the original watermark cannot be restored. (2) Robustness means that the watermarked image can still be extracted from it after being attacked, and its integrity and authentication authenticity can still be maintained. Common attacks on images include filtering, compression, rotation, translation, etc. Transparency and robustness are two important characteristics of digital image watermarks. Watermarks must be both concealed and robust. (3) Finally, security is manifested in the ability of the watermark to resist malicious attacks. On the one hand, the watermark embedding algorithm and extraction algorithm framework are secret, and the embedded digital watermark information is processed by the encryption algorithm using the key; on the other hand, the embedded digital watermark is statistically undetectable, and unauthorized users cannot detect and destroy the watermark.
[0004] Spread spectrum watermarking is an important method in digital watermarking. Spread spectrum sequences used for digital watermarking include independent and identically distributed random spread spectrum sequences and spread spectrum sequences used in spread spectrum communications, which appeared earlier than digital watermarking. Common spread spectrum sequences include normal distribution sequences, also known as Gaussian sequences. However, this type of watermarking has obvious defects: (1) Poor robustness: When the watermark signal faces attacks such as image cropping and compression, the spread spectrum watermark may lose its robustness and be easily destroyed. (2) Poor imperceptibility: In some cases, spread spectrum watermarking will cause image quality to degrade, 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 through the following technical solutions:
[0007] In a first aspect of the present invention, a digital image watermark processing method based on an odd complementary sequence is provided, comprising the steps of generating a watermark sequence and embedding a watermark sequence; the step of generating a watermark sequence comprises the following sub-steps:
[0008] Generate a binary odd-complementary sequence pair (a, b) of length N using the first key seed, where the letter 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] Perform odd cyclic shift expansion on the seed sequence to create a watermark sequence ;
[0011] The watermark embedding sequence step includes the following sub-steps:
[0012] Convert the format of the image to be embedded with the watermark from RGB to YCbCr;
[0013] Perform a two-dimensional discrete cosine transform 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 coefficient F, where the Y coefficient refers to the brightness Y component in the YCbCr color space;
[0014] The frequency domain coefficient F is Zigzag processed and the intermediate frequency coefficient of length 2N is extracted using the second key key ;
[0015] Using the intermediate frequency coefficient , embedding coefficient and watermark sequence Calculate the frequency domain coefficient D after watermark embedding;
[0016] Perform inverse two-dimensional discrete cosine transform on the frequency domain coefficient D after watermark embedding to obtain a new brightness Y coefficient, and synthesize the new brightness Y coefficient with the original brightness Y coefficient;
[0017] Convert the YCbCr format image after synthesizing the Y coefficient back to RGB format to complete the watermark embedding.
[0018] Furthermore, in the step of generating a watermark sequence:
[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] Seed sequence w=a||b=(a(0),a(1),...,a(N−1),b(0),b(1),...,b(N−1));
[0021] Watermark sequence The calculation method is:
[0022]
[0023] Where, 0≤t≤N-1, is the expansion operator, is the odd shift transformation sequence of the sequence, specifically expressed as: , .
[0024] Furthermore, in the watermark embedding sequence step:
[0025] The calculation method of the frequency domain coefficient is specifically expressed as follows:
[0026]
[0027] Where x and y are the spatial coordinates of the image, and u and v are the frequency domain coordinates of the image; and is the normalization factor; 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 value is:
[0028] , ;
[0029] The second key is used to extract the intermediate frequency coefficient with a length of 2N , including: using the second key as a random seed to generate 2N indexes, these indexes correspond to the intermediate frequency region in the frequency domain coefficient F; from the frequency domain coefficient F, select 2N intermediate frequency components according to the index generated by the key to obtain the intermediate frequency coefficient ;
[0030] The intermediate frequency coefficient is used , embedding coefficient and watermark sequence Calculate the frequency domain coefficient D after watermark embedding, including: .
[0031] Furthermore, the method further comprises a step of extracting a watermark sequence; the step of extracting a watermark sequence comprises the following sub-steps:
[0032] Convert both the original image in RGB format and the watermarked image in RGB format to YCbCr format;
[0033] Perform two-dimensional discrete cosine transform on each original Y coefficient of the original image in YCbCr format and each original Y coefficient of the watermark image to obtain the original frequency domain coefficient F0 and the watermark frequency domain coefficient F respectively. w ;
[0034] The original frequency domain coefficient F0 and the watermark frequency domain coefficient F w Perform Zigzag processing and use the second key key to extract the original intermediate frequency coefficient of length 2N 0 and watermark intermediate frequency coefficient w ;
[0035] for Get the intermediate frequency coefficient difference of length 2N ,in ;
[0036] By calculating the difference of the intermediate frequency coefficients and watermark sequence The inner product of is used to detect whether there is a watermark.
[0037] Furthermore, the intermediate frequency coefficient difference is calculated and watermark sequence The inner product of is used to detect whether there is a watermark, including:
[0038] When calculating the intermediate frequency coefficient difference and watermark sequence If the inner product of is greater than the preset value, it is considered that there is a watermark;
[0039] Otherwise no.
[0040] The beneficial effects of the present invention are:
[0041] In an exemplary embodiment of the present invention, a watermark sequence with a large number of complementary interferences is generated based on an odd complementary sequence with ideal complementary properties for watermark processing, which mainly focuses on improving noise resistance and transparency, and is suitable for scenarios with more stringent requirements on watermark visibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A flowchart of a digital image watermark processing method based on an odd complementary sequence provided in an exemplary embodiment of the present invention;
[0043] Figure 2 A schematic diagram of an original image provided in an exemplary embodiment of the present invention;
[0044] Figure 3This is a schematic diagram of watermark image comparison when the embedding coefficient α is 5 provided in an exemplary embodiment of the present invention;
[0045] Figure 4 This is a schematic diagram of watermark image comparison when the embedding coefficient α is 10 provided in an exemplary embodiment of the present invention;
[0046] Figure 5 This is a schematic diagram of watermark image comparison when the embedding coefficient α is 20 provided in an exemplary embodiment of the present invention;
[0047] Figure 6 This is a schematic diagram of a watermark image with Gaussian white noise added when N = 768 and the embedding coefficient is 5, provided in an exemplary embodiment of the present invention;
[0048] Figure 7 This is a schematic diagram of watermark extraction results when Gaussian white noise is added when N = 768 and the embedding coefficient is 5, provided in an exemplary embodiment of the present invention;
[0049] Figure 8 This is a schematic diagram of a watermark image with Gaussian white noise added when N = 768 and the embedding coefficient is 10, provided in an exemplary embodiment of the present invention;
[0050] Figure 9 This is a schematic diagram of watermark extraction results when Gaussian white noise is added when N = 768 and the embedding coefficient is 10, provided in an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0051] The technical solution of the present invention is described clearly and completely below with reference to the accompanying drawings. It is apparent that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection 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," "up," "down," "left," "right," "vertical," "horizontal," "inside," and "outside" are based on the directions or positional relationships described in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on the present invention. Furthermore, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0053] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention.
[0054] In addition, the technical features involved in the 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 also Figure 1 , Figure 1 A flowchart of a digital image watermark processing method based on an odd complementary sequence provided in an exemplary embodiment of the present invention is shown, comprising a watermark sequence generating step and a watermark sequence embedding step; the watermark sequence generating step comprises the following sub-steps:
[0056] Generate a binary odd-complementary sequence pair (a, b) of length N using the first key seed, where the letter set of the binary odd-complementary sequence pair is selected from {±1};
[0057] Let w=a||b represent a seed sequence of length 2N;
[0058] Perform odd cyclic shift expansion on the seed sequence to create a watermark sequence ;
[0059] The watermark embedding sequence step includes the following sub-steps:
[0060] Convert the image format to be embedded with watermark from RGB to YCbCr format to facilitate watermark embedding;
[0061] Perform a two-dimensional discrete cosine transform on each original Y coefficient in the YCbCr format image, that is, convert the time domain pixel data of the original Y coefficient into the frequency domain to obtain the frequency domain coefficient F, where the Y coefficient refers to the brightness Y component in the YCbCr color space, providing a basis for subsequent watermark embedding or compression;
[0062] The frequency domain coefficient F is Zigzag processed and the intermediate frequency coefficient of length 2N is extracted using the second key key ; Where 2N here is the same as the 2N value in the seed sequence of length 2N in the first step;
[0063] Using the intermediate frequency coefficient , embedding coefficient and watermark sequence Calculate the frequency domain coefficient D after watermark embedding;
[0064] Perform inverse two-dimensional discrete cosine transform on the frequency domain coefficient D after watermark embedding to obtain a new brightness Y coefficient, and synthesize the new brightness Y coefficient with the original brightness Y coefficient;
[0065] Convert the YCbCr format image after synthesizing the Y coefficient back to RGB format to complete the watermark embedding.
[0066] Specifically, in this exemplary embodiment, a related sequence needs to be generated before the watermark sequence embedding step. Therefore, in the watermark sequence generating step, a large number of available watermark sequences can be generated using odd complementary sequences, and these sequences do not interfere with each other (this can be seen by calculating the inner product between the above-mentioned seed sequence and the watermark sequence. The subsequent exemplary embodiments will elaborate on the calculation process in detail); after sufficient watermark sequences are generated, these digital watermark sequences are appropriately embedded into the image in the watermark sequence embedding step, and DCT domain embedding is used to ensure the concealment of the watermark.
[0067] 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 maintain a high degree of extractability under different signal processing and attack operations. Because odd complementary sequences have ideal autocorrelation and cross-correlation characteristics by design, the inner product value has a peak when the watermark is extracted, thereby ensuring the accuracy and anti-interference of the watermark extraction. The inner product can be regarded as a special case of autocorrelation and cross-correlation when the shift amount τ = 0. This ideal correlation ensures that the watermark information can still be accurately recovered even in the event of common attacks such as shearing, compression, and rotation.
[0069] (2) Strong anti-interference ability: Due to the design characteristics of odd complementary sequences, they can effectively resist various interference signals. This allows watermarks based on these sequences to maintain strong stability and clarity in the face of attacks such as noise, compression or image processing. This anti-interference ability is an important component of watermark robustness, especially in practical applications where digital media are often subject to different types of interference.
[0070] (3) Good imperceptibility (transparency): The odd-complementary sequence design allows the watermark to be embedded without significantly affecting the quality of the original media. The imperceptibility of the watermark is important because it requires that the watermark will not attract the user's attention after embedding and will not degrade the visual experience of the image or video. The special properties of the odd-complementary sequence allow effective protection information to be embedded without affecting the user experience.
[0071] (4) Non-interference property: Compared with traditional watermarking methods, odd complementary sequences have flexible length and construction methods, allowing multiple watermarks to be embedded in the same media without mutual interference. This makes it particularly suitable for scenarios that require multiple copyright protection or multiple authentications at the same time, such as the application of multiple watermarks in the commercial and copyright protection fields.
[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 noise resistance and transparency, and is suitable for scenarios with more stringent requirements on watermark visibility.
[0073] The following content will explain in detail how to implement each step:
[0074] More preferably, in an exemplary embodiment, in the step of generating a 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] Seed sequence w=a||b=(a(0),a(1),...,a(N−1),b(0),b(1),...,b(N−1));
[0077] Watermark sequence The calculation method is:
[0078]
[0079] Where, 0≤t≤N-1, is the expansion operator, is the odd shift transformation sequence of the sequence, specifically expressed as: , .
[0080] Specifically, in this exemplary embodiment, corresponding to the step of generating a watermark sequence, a specific generation scheme includes:
[0081] S101: Generate a binary odd-complementary sequence pair (a, b) of length N using the first key seed, where the alphabetic 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 denote 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: Performing sequence odd cyclic shift expansion on the seed sequence to create a watermark sequence ,in:
[0084]
[0085] Where, 0≤t≤N-1, is the expansion operator, is the odd shift 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 seed sequence and the watermark sequence, we can get:
[0087]
[0088]
[0089]
[0090] in, and Represents the sequence and the autocorrelation function value of sequence b, represents the shift (or delay) of the sequence in the formula. When the inner product is 0, it indicates that the two sequences are orthogonal and 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 a watermark sequence:
[0092] The calculation method of the frequency domain coefficient is specifically expressed as follows:
[0093]
[0094] Where x and y are the spatial coordinates of the image, and u and v are the frequency domain coordinates of the image; and is the normalization factor; 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 value is:
[0095] , ;
[0096] The second key is used to extract the intermediate frequency coefficient with a length of 2N , including: using the second key as a random seed to generate 2N indexes, these indexes correspond to the intermediate frequency region in the frequency domain coefficient F; from the frequency domain coefficient F, select 2N intermediate frequency components according to the index generated by the key to obtain the intermediate frequency coefficient ;
[0097] The intermediate frequency coefficient is used , embedding coefficient and watermark sequence Calculate the frequency domain coefficient D after watermark embedding, including: .
[0098] Specifically, in this exemplary embodiment, corresponding to the watermark embedding sequence step, the specific embedding scheme includes:
[0099] The watermark embedding sequence step includes the following sub-steps:
[0100] S201: Convert the format of the image to be embedded with the watermark from RGB format to YCbCr format to facilitate the embedding of the watermark;
[0101] S202: Performing a 2D-DCT (2D-DCT) on each original Y coefficient in the YCbCr image, that is, converting the time-domain pixel data of the original Y coefficient into the frequency domain to obtain a frequency-domain coefficient F, where the Y coefficient refers to the brightness Y component in the YCbCr color space.
[0102] The calculation method of the frequency domain coefficient is specifically expressed as follows:
[0103]
[0104] Where x and y are the spatial coordinates of the image, and u and v are the frequency domain coordinates of the image; and is the normalization factor; Y(x,y) is the pixel value of the original Y coefficient (calculated on an 8×8 or 16×16 block), F(u,v) is the frequency domain coefficient after the two-dimensional discrete cosine transform; M is the block size of the image (usually 8 or 16); the normalization factor value is:
[0105] , ;
[0106] This step converts the time domain pixel data of the Y component into the frequency domain and provides a basis for subsequent watermark embedding or compression.
[0107] S203: Zigzag the frequency domain coefficient F and extract the intermediate frequency coefficient of length 2N using the second key key : Generate 2N indexes using the second key as a random seed. These indexes correspond to the intermediate frequency region in the frequency domain coefficient F. From the frequency domain coefficient F, select 2N intermediate frequency components according to the index generated by the key to obtain the intermediate frequency coefficient. ; The 2N here is the same as the 2N of the watermark sequence in the first step.
[0108] S204: Using the intermediate frequency coefficient , embedding coefficient and watermark sequence Calculate the frequency domain coefficient D after watermark embedding: ; Where D represents the modified DCT transform coefficient, that is, the frequency domain coefficient after watermark embedding;
[0109] S205: In order to obtain a new Y component, D needs to be introduced into the DCT coefficient, and then an inverse DCT transform is performed: the frequency domain coefficient D after the watermark is embedded is subjected to an inverse two-dimensional discrete cosine transform to obtain a new luminance Y coefficient; and the new luminance Y coefficient is synthesized with the original luminance Y coefficient (synthesis is performed in the YCbCr color space, and only the Y component is updated);
[0110] S206: Convert the YCbCr format image after synthesizing the Y coefficient back to RGB format to complete the watermark embedding.
[0111] Figure 2 is the original image, Figure 3 、 Figure 4 、 Figure 5 The embedding coefficients are shown respectively When the values are 5, 20, and 50, the watermarked image and the original image are not much different from each other when observed with the naked eye, and it can be concluded that the watermark has good imperceptibility.
[0112] More preferably, in an exemplary embodiment, the method further comprises a step of extracting a watermark sequence; the step of extracting a watermark sequence comprises the following sub-steps:
[0113] Convert both the original image in RGB format and the watermarked image in RGB format to YCbCr format;
[0114] Perform two-dimensional discrete cosine transform on each original Y coefficient of the original image in YCbCr format and each original Y coefficient of the watermark image to obtain the original frequency domain coefficient F0 and the watermark frequency domain coefficient F respectively. w ;
[0115] The original frequency domain coefficient F0 and the watermark frequency domain coefficient F w Perform Zigzag processing and use the second key key to extract the original intermediate frequency coefficient of length 2N 0 and watermark intermediate frequency coefficient w ;
[0116] for Get the intermediate frequency coefficient difference of length 2N ,in ;
[0117] By calculating the difference of the intermediate frequency coefficients and watermark sequence The inner product of is used to detect whether there is a watermark.
[0118] Specifically, in this exemplary embodiment, some calculation steps in the watermark extraction sequence step are consistent with the calculation method of the watermark embedding sequence step, such as format conversion, frequency domain calculation, etc. The difference is that the intermediate frequency coefficients of the original image and the watermark image (the original intermediate frequency coefficient and the watermark intermediate frequency coefficient) are calculated respectively, and the difference between the intermediate frequency coefficients of the two is used. and The inner product of the sequence is used to detect whether there is a 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 presence of a 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 watermark sequence space, that is, the corresponding watermark sequence exists. This step can be used to detect whether the original image and the watermarked image have been added with the watermark corresponding to a specific watermark sequence. Because the watermark sequence is designed to have good autocorrelation and cross-correlation, the inner product value should be close to the ideal value (2N) when there is no noise interference. Due to the presence of noise or attacks, the inner product value should be between 80% and 90% of the ideal value.
[0119] Based on the above exemplary embodiments, the following considers watermark images and watermark extraction under the condition of adding noise at different embedding coefficients:
[0120] Figure 6 and Figure 7 The watermark image and watermark extraction results are presented when N = 768 and the embedding coefficient is 5. Figure 8 and Figure 9 The right side shows the watermark image and watermark extraction results when N = 768 and the embedding coefficient is 10. Figure 7 and Figure 9The horizontal axis is the displacement of the detection sequence, Figure 7 and Figure 9 The vertical axis is the cross-correlation value of the sequence to be detected.
[0121] The results show that under Gaussian white noise attack, it does not affect the maximum peak of watermark extraction, nor does it hinder correct detection and successful watermark extraction. Specifically, Figure 7 As shown in the figure, the maximum peak (approximately 7000) occurs at displacement UID=300 in the detection sequence, while the cross-correlation value of the background noise mostly fluctuates around 1000. The peak value is much higher than the background noise, forming a sharp and prominent peak. This means that the watermark signal has a very high match at this position, indicating that the watermark signal has strong robustness and anti-interference capabilities. In addition, the inner product threshold for correct watermark detection is generally 0.8×2N=0.8×1536=1228.8. The peak value of 7000 is far greater than this threshold, proving that it is not affected by noise and indicating that the watermark can be successfully extracted. Figure 9 And so on.
[0122] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will readily appreciate that other variations or modifications can be made based on the above descriptions. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications derived therefrom remain within the scope of protection of the present invention.
Claims
1. A digital image watermarking method based on odd complementary sequence, characterized by: The method comprises the steps of generating a watermark sequence and embedding a watermark sequence; the step of generating a watermark sequence comprises the following sub-steps: Generate a binary odd-complementary sequence pair (a, b) of length N using the first key seed, where the letter set of the binary odd-complementary sequence pair is selected from {±1}; Let w=a||b represent a seed sequence of length 2N; Perform odd cyclic shift expansion on the seed sequence to create a watermark sequence ; The watermark embedding sequence step includes the following sub-steps: Convert the format of the image to be embedded with the watermark from RGB to YCbCr; Perform a two-dimensional discrete cosine transform 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 coefficient F, where the Y coefficient refers to the brightness Y component in the YCbCr color space; The frequency domain coefficient F is Zigzag processed and the intermediate frequency coefficient of length 2N is extracted using the second key key ; Using the intermediate frequency coefficient , embedding coefficient and watermark sequence Calculate the frequency domain coefficient D after watermark embedding; Perform inverse two-dimensional discrete cosine transform on the frequency domain coefficient D after watermark embedding to obtain a new brightness Y coefficient, and synthesize the new brightness Y coefficient with the original brightness Y coefficient; Convert the YCbCr format image after synthesizing the Y coefficient back to RGB format to complete the watermark embedding; In the step of generating watermark sequence: 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)); 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: ; Where, 0≤t≤N-1, is the expansion operator, is the odd shift transformation sequence of the sequence, specifically expressed as: , ; In the watermark embedding sequence step: The calculation method of the frequency domain coefficient is specifically expressed as follows: ; Where x and y are the spatial coordinates of the image, and u and v are the frequency domain coordinates of the image; and is the normalization factor; 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 value is: , ; The second key is used to extract the intermediate frequency coefficient with a length of 2N , including: using the second key as a random seed to generate 2N indexes, these indexes correspond to the intermediate frequency region in the frequency domain coefficient F; from the frequency domain coefficient F, select 2N intermediate frequency components according to the index generated by the key to obtain the intermediate frequency coefficient ; The intermediate frequency coefficient is used , embedding coefficient and watermark sequence Calculate the frequency domain coefficient D after watermark embedding, including: .
2. The digital image watermarking method based on odd complementary sequence according to claim 1, characterized in that: The method further comprises a step of extracting a watermark sequence; the step of extracting a watermark sequence comprises the following sub-steps: Convert both the original image in RGB format and the watermarked image in RGB format to YCbCr format; Perform two-dimensional discrete cosine transform on each original Y coefficient of the original image in YCbCr format and each original Y coefficient of the watermark image to obtain the original frequency domain coefficient F0 and the watermark frequency domain coefficient F respectively. w ; The original frequency domain coefficient F0 and the watermark frequency domain coefficient F w Perform Zigzag processing and use the second key key to extract the original intermediate frequency coefficient of length 2N 0 and watermark intermediate frequency coefficient w ; for Get the intermediate frequency coefficient difference of length 2N ,in ; By calculating the difference of the intermediate frequency coefficients and watermark sequence The inner product of is used to detect whether there is a watermark.
3. The digital image watermarking method based on odd complementary sequence according to claim 2, characterized in that: The intermediate frequency coefficient difference is calculated by and watermark sequence The inner product of is used to detect whether there is a watermark, including: When calculating the intermediate frequency coefficient difference and watermark sequence If the inner product of is greater than the preset value, it is considered that there is a watermark; Otherwise no.
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