An adaptive digital watermark embedding method, device and readable storage medium
By adaptively selecting high-frequency complex coefficient sub-bands and adjusting the embedding intensity, the problem of unreasonable watermark embedding position and intensity in the existing technology is solved, thereby improving the stability and anti-attack capability of watermark information, and enhancing the accuracy of watermark restoration and image quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU CITY UNIV
- Filing Date
- 2026-04-24
- Publication Date
- 2026-05-29
AI Technical Summary
In existing image watermarking embedding methods, unreasonable selection of watermark embedding position and setting of embedding strength result in poor anti-attack performance of watermark information and insufficient stability of watermark information after being attacked, making it impossible to extract accurately.
An adaptive digital watermarking embedding method is adopted. The image is decomposed by S-layer dual-tree complex wavelet transform, and high-frequency complex coefficient subbands are selected for embedding. The subband variance, subband entropy and gradient energy are combined for joint scoring, the target embedding subband is selected, and the candidate blocks are divided into non-overlapping blocks. The block variance, block gradient strength and gradient direction consistency are calculated, the embedding block set is selected, and the embedding strength is adjusted based on the texture complexity and visual masking factor of the embedding blocks. Finally, the watermarked image is reconstructed.
It improves the anti-attack capability and stability of watermark information, reduces the decision fluctuation in the extraction stage, and enhances the accuracy and stability of watermark restoration, while maintaining the visual quality of the image.
Smart Images

Figure CN122115186A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital watermarking embedding technology, and in particular to an adaptive digital watermarking embedding method, apparatus and computer-readable storage medium. Background Technology
[0002] Digital watermarking embedding technology is applicable to scenarios such as image copyright representation, content authentication, hidden marking and anti-tampering tracking. It embeds identifiable, unique or integrity verification information into the spatial, frequency or transform domain of the image carrier in an imperceptible form, and achieves functions such as ownership tracing, content integrity verification, usage trajectory tracking and malicious tampering location without affecting the normal display and use of the image.
[0003] The existing image watermarking embedding technology can be roughly divided into the following three types: The first type is to directly modify the image pixel values, such as least significant bit embedding, pixel pair modulation, difference expansion, etc. This method does not go through frequency domain transformation, but directly performs small perturbations, replacements or modulations on the grayscale values or color channel values of the original pixels of the image, maps the watermark bit stream into pixel-level numerical changes and writes them into the carrier image. It has the advantages of simplicity, low computational load and high embedding capacity. However, the watermark information it introduces is small information that is highly similar to noise characteristics. Therefore, the watermark information will be destroyed when the image is subjected to JPEG compression, filtering and noise addition processing, resulting in weak security. The second method involves embedding the watermark into the frequency domain or multi-scale sub-bands of the image using real-valued transform domain methods such as discrete cosine transform, discrete wavelet transform, or singular value decomposition. However, due to the lack of adaptive directional expression in the transform itself, the fact that the embedding position depends only on the frequency level or coefficient amplitude selection, and the use of global or fixed layered empirical values for embedding strength, the watermark information cannot function effectively against attacks involving directional changes such as rotation and shearing. Furthermore, the watermark information is easily lost due to insufficient embedding strength, resulting in insufficient anti-attack stability. The third method involves introducing contour waves, shear waves, and other techniques to perform multi-scale directional transformations on the image. High-frequency directional sub-bands are selected as the watermark embedding carriers, which are then divided into blocks. A second-level complex value transformation is performed on each sub-block to obtain the amplitude and phase of the sub-block. The watermark information is then embedded in the complex transformation amplitude domain, which has minimal visual impact and is relatively stable. Although this method enhances the directional representation and robustness of the watermark information, attacks such as scaling and blurring can cause image pixel shifts, making the spatial index and coefficient correspondence of the watermark information embedding position invalid. In other words, the watermark information position is not stable enough after the attack, ultimately resulting in the watermark information not being extracted correctly.
[0004] In summary, existing image watermarking embedding methods suffer from problems such as unreasonable selection of watermark embedding location and setting of embedding strength, resulting in poor anti-attack performance of watermark information, and insufficient stability of watermark information after being attacked, leading to the inability to accurately extract watermark information. Summary of the Invention
[0005] Therefore, the technical problem to be solved by the present invention is to overcome the problems in the existing image watermark embedding methods, such as unreasonable selection of watermark embedding position and setting of embedding strength, resulting in poor anti-attack performance of watermark information, and insufficient stability of watermark information after being attacked, resulting in the inability to accurately extract watermark information.
[0006] To address the aforementioned technical problems, this invention provides an adaptive digital watermark embedding method, comprising: The image is decomposed by S-level dual-tree complex wavelet transform to obtain low-frequency approximate subbands and high-frequency complex coefficient subbands in each direction at each level; The subband variance, subband entropy, and gradient energy of each high-frequency complex coefficient subband are calculated based on the amplitude of each high-frequency complex coefficient subband. After normalizing the subband variance, subband entropy, and gradient energy of each high-frequency complex coefficient subband, the weighted sum is obtained to obtain the joint score of each high-frequency complex coefficient subband. The high-frequency complex coefficient subband with the highest joint score is selected as the target embedding subband. The amplitude map of the target embedding subband is divided into non-overlapping blocks to obtain multiple candidate blocks. The block variance, block gradient strength, and gradient direction consistency of each candidate block are calculated. The block variance, block gradient strength, and gradient direction consistency of each candidate block are normalized and then weighted and summed to obtain the block score of each candidate block. All candidate blocks are sorted in descending order according to the block score, and the top L candidate blocks are selected to obtain the embedding block set. Based on the preset global base strength, the block variance, entropy and visual masking factor of each embedding block, the embedding strength of each embedding block is calculated; based on the embedding strength of each embedding block and its corresponding embedding watermark, the magnitude of all pixel positions in each embedding block is multiplicatively embedded. Based on the phase of each embedding block and the amplitude after multiplicative embedding, the complex coefficients of the target embedding subband corresponding to each embedding block are reconstructed. Based on the reconstructed target embedding subband, low-frequency approximation subband, and high-frequency complex coefficient subband excluding the target embedding subband, the watermark image is reconstructed.
[0007] Preferably, the high-frequency complex coefficient subbands in each direction at each level are represented as follows: , in, This represents the set of high-frequency complex coefficient subbands in each direction at each level; Indicates the first Layer High-frequency complex coefficient subbands in each direction; Indicates the first Number of directions of the layer.
[0008] Preferably, the formula for calculating the subband variance of the high-frequency complex coefficient subband is: , in, Indicates the first Layer High-frequency complex coefficient subbands in each direction Subband variance; express The amplitude is determined by It consists of the magnitudes of all pixel positions within the range; This indicates the calculation of variance; The subband entropy of a high-frequency complex coefficient subband is calculated as follows: , in, express Subband entropy; express The probability distribution of the amplitude histogram; The formula for calculating the gradient energy of a high-frequency complex coefficient subband is: , in, express Gradient energy; express The set of pixels; express The pixel in the x-th row and y-th column; express The magnitude of the pixel in the x-th row and y-th column; Represents the horizontal gradient operator; Represents the vertical gradient operator; The formula for calculating the joint score of high-frequency complex coefficient subbands is as follows: , in, express The combined score; express The weights; express The normalized value; express The weights; express The normalized value; express The weights; express The normalized value.
[0009] Preferably, the formula for calculating the block variance of a candidate block is: , in, This represents the block variance of the j-th candidate block; The magnitude of the j-th candidate block is composed of the magnitudes of all pixel positions within the j-th candidate block. This indicates the calculation of variance; The formula for calculating the block gradient strength of a candidate block is: , in, This represents the block gradient strength of the j-th candidate block; This indicates the number of rows and columns of candidate blocks obtained after non-overlapping segmentation of the amplitude map of the target embedded subband; This represents the pixel in the m-th row and n-th column of the j-th candidate block; This represents the magnitude of the pixel in the m-th row and n-th column of the j-th candidate block; Represents the horizontal gradient operator; Represents the vertical gradient operator; The formula for calculating the gradient direction consistency of candidate blocks is: , , in, This indicates the consistency of the gradient direction of the j-th candidate block; This represents the gradient direction of the pixel in the m-th row and n-th column of the j-th candidate block; Represents a very small positive number; The formula for calculating the block score of a candidate block is: , in, This represents the block score of the j-th candidate block; express The normalized value; express The weights; express The normalized value; express The weights; express The normalized value; express The weight.
[0010] Preferably, after selecting the first L candidate blocks to obtain the embedded block set, the process further includes: A pseudo-random sequence is generated using a key, and the order of the first L candidate blocks is shuffled so that the order of the embedded blocks in the embedded block set is independent of the block score.
[0011] Preferably, the formula for calculating the embedding strength of the embedded block is: , in, Indicates the first The embedding strength of each embedded block; Indicates the preset global base strength; Indicates the first Block variance of each embedded block; Indicates the first The entropy of an embedded block; Indicates the first Visual masking factor of each embedded block; This represents the mean of the block variances of all embedded blocks; This represents the mean entropy of all embedded blocks; Represents a very small positive number; The moderating index representing block variance; The moderating index representing entropy; This represents the masking gain parameter; The formula for multiplicative embedding of the magnitudes at all pixel positions within the embedding block is: , in, Indicates the multiplicative embedding after the first The magnitude of the pixel in the m-th row and n-th column within an embedded block; Indicates the first Embedded watermarks for each embedded block; Indicates the first multiplicative embedding The magnitude of the pixel in the m-th row and n-th column within an embedded block; Indicates the first A set of pixels within an embedded block.
[0012] Preferably, after calculating the embedding strength of each embedding block, the method further includes: clipping the embedding strength of each embedding block, and using the clipped embedding strength to multiplicatively embed the magnitude of all pixel positions within each embedding block, thereby preventing local over-embedding.
[0013] Preferably, the cutting formula for the embedding strength is: , in, Indicates the number after cutting The embedding strength of each embedded block; Indicates the first before cutting The embedding strength of each embedded block; Indicates the maximum embedding strength; This represents the minimum embedding strength.
[0014] The present invention also provides an adaptive digital watermark embedding device, comprising: The transform decomposition module is used to perform S-level dual-tree complex wavelet transform decomposition on the image to obtain low-frequency approximate subbands and high-frequency complex coefficient subbands in each direction at each level. The embedded sub-band selection module is used to calculate the sub-band variance, sub-band entropy, and gradient energy of each high-frequency complex coefficient sub-band based on the amplitude of each high-frequency complex coefficient sub-band; after normalizing the sub-band variance, sub-band entropy, and gradient energy of each high-frequency complex coefficient sub-band, the module performs a weighted summation to obtain the joint score of each high-frequency complex coefficient sub-band; and selects the high-frequency complex coefficient sub-band with the highest joint score as the target embedded sub-band. The embedding block selection module is used to perform non-overlapping block division of the amplitude map of the target embedding subband to obtain multiple candidate blocks. The block variance, block gradient strength, and gradient direction consistency of each candidate block are calculated. After normalization, the block variance, block gradient strength, and gradient direction consistency of each candidate block are weighted and summed to obtain the block score of each candidate block. All candidate blocks are sorted in descending order according to the block score, and the top L candidate blocks are selected to obtain the embedding block set. The embedding strength calculation and embedding module is used to calculate the embedding strength of each embedding block based on the preset global base strength, the variance, entropy and visual masking factor of each embedding block; and to perform multiplicative embedding on the magnitude of all pixel positions in each embedding block based on the embedding strength of each embedding block and its corresponding embedding watermark. The watermark image acquisition module is used to reconstruct the complex coefficients of the target embedding subband corresponding to each embedding block based on the phase and amplitude after multiplicative embedding of each embedding block, and to reconstruct the watermark image based on the reconstructed target embedding subband, low-frequency approximation subband and high-frequency complex coefficient subband excluding the target embedding subband.
[0015] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the adaptive digital watermarking embedding method described above.
[0016] The adaptive digital watermarking embedding method provided in this application has the following advantages: A watermarking embedding scheme based on the DTCWT amplitude domain is constructed, which combines adaptive target subband selection, stable edge block selection, and adaptive embedding intensity modulation. A joint scoring mechanism is built for multi-scale, multi-directional complex coefficient subbands of DTCWT, comprehensively utilizing subband energy, information complexity, structural features, and visual masking-related information for target subband selection. Compared with fixed subband or single-index selection methods, this application can adaptively select more suitable subbands for embedding based on the texture distribution and structural features of different carrier images, improving the rationality of transform domain carrier selection and enhancing the consistency and applicability of the algorithm under different image types. In the block selection stage, a stable edge block selection rule is adopted, no longer relying solely on single indices such as entropy or variance for block selection, but comprehensively considering block energy, edge intensity, and... Gradient direction consistency is achieved because this rule prioritizes regions with stable structural features as embedding locations, ensuring that the selected embedding blocks maintain high structural recognizability and statistical stability even after being attacked. This significantly reduces decision fluctuations during the extraction stage and improves the accuracy and stability of watermark recovery. In the DTCWT amplitude domain, an adaptive embedding intensity modulation mechanism combining local statistics and visual masking characteristics is employed. The embedding intensity is dynamically adjusted based on the texture intensity, information complexity, and visual sensitivity of different embedding blocks, allowing textured and edge regions to undertake more effective watermark embedding, while automatically reducing perturbations in smooth or visually sensitive regions. Therefore, while improving the watermark's resistance to attacks, it effectively suppresses visible distortion caused by excessive embedding and enhances image visual quality. Attached Figure Description
[0017] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 Flowchart of the adaptive digital watermarking embedding method provided in this application; Figure 2 This is a schematic diagram of the adaptive digital watermarking embedding device provided in this application. Detailed Implementation
[0018] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0019] Please see Figure 1 , Figure 1 The flowchart shown is of the adaptive digital watermarking embedding method provided in this application. The method specifically includes S10~S50: S10: For the image (M and N represent the number of rows and columns of pixels in the image, respectively) Perform S-level dual-tree complex wavelet transform decomposition to obtain low-frequency approximate subbands and high-frequency complex coefficient subbands in each direction at each level.
[0020] Specifically, the high-frequency complex coefficient subbands in each direction at each level are represented as follows: , in, This represents the set of high-frequency complex coefficient subbands in each direction at each level; Indicates the first Layer High-frequency complex coefficient subbands in each direction; Indicates the first Number of directions of the layer.
[0021] Specifically, , express The complex coefficients of the pixel in the x-th row and y-th column; express The magnitude of the pixel in the x-th row and y-th column. ; express The phase of the pixel in the x-th row and y-th column. .
[0022] In a specific example of this application, the number of decomposition layers is 3, and each layer of directional subbands adopts 6 standard directions.
[0023] S20: Calculate the subband variance, subband entropy, and gradient energy of each high-frequency complex coefficient subband based on the amplitude of each high-frequency complex coefficient subband; normalize the subband variance, subband entropy, and gradient energy of each high-frequency complex coefficient subband and then sum them by weight to obtain the joint score of each high-frequency complex coefficient subband; select the high-frequency complex coefficient subband with the highest joint score as the target embedding subband.
[0024] Specifically, each high-frequency complex coefficient subband contains multiple pixels. The amplitude of the high-frequency complex coefficient subband is a matrix composed of the amplitudes of all pixel positions within that subband. The subband variance is calculated by taking the variance of the amplitudes of all pixel positions within that subband. The subband entropy is calculated by extracting the amplitudes of all pixel positions within the subband, statistically analyzing the histogram distribution of the amplitudes, dividing the amplitudes into several discrete intervals, calculating the proportion of pixels in each interval to the total number of pixels in the subband, and obtaining the probability distribution of the amplitudes in each interval within the subband. This is based on the Shannon algorithm. Information entropy is calculated by performing a weighted logarithmic operation on the probability distributions of all intervals and summing the results. Taking the negative value of the sum gives the subband entropy. The steps for calculating the gradient energy of a subband are as follows: calculate the first derivative of the magnitude of each pixel in the horizontal and vertical directions to obtain the gradient value of the pixel in the two directions. Take the square root of the sum of the squares of the gradient values in the two directions to obtain the gradient magnitude of the pixel (characterizing the edge strength of the pixel). Finally, the gradient energy of the subband is obtained by taking the arithmetic mean of the gradient magnitudes of all pixels in the subband.
[0025] Specifically, the formula for calculating the subband variance of the high-frequency complex coefficient subband is as follows: , in, Indicates the first Layer High-frequency complex coefficient subbands in each direction Subband variance; express The amplitude is determined by It consists of the magnitudes of all pixel positions within the range; This indicates the calculation of variance; The subband entropy of a high-frequency complex coefficient subband is calculated as follows: , in, express Subband entropy; express The probability distribution of the amplitude histogram; The formula for calculating the gradient energy of a high-frequency complex coefficient subband is: , in, express Gradient energy; express The set of pixels; express The pixel in the x-th row and y-th column; express The magnitude of the pixel in the x-th row and y-th column; Represents the horizontal gradient operator; Represents the vertical gradient operator; The formula for calculating the joint score of high-frequency complex coefficient subbands is as follows: , in, express The combined score; express The weights; express The normalized value; express The weights; express The normalized value; express The weights; express The normalized value.
[0026] It should be noted that, ,and , , All are greater than or equal to 0. Target embedded subband Its complex coefficients Amplitude phase .
[0027] In a specific example of this application, , , .
[0028] When selecting target embedding subbands, high-frequency complex coefficient subbands are ideal regions for watermark embedding because they carry edge, texture, and detail information of the image. Furthermore, subband variance can measure the dispersion of pixels within a subband; the higher the variance, the richer the subband texture, and the less noticeable the visual distortion after watermark embedding. Subband entropy can measure the uncertainty of subband information; the higher the subband entropy, the more random information the subband contains, and the more difficult it is for statistical features to be detected by steganalysis after watermark embedding. Gradient energy can measure the edge / detail strength of a subband; the higher the gradient energy, the more edge regions of the image the subband corresponds to. Since the human eye is much less sensitive to distortion in edge regions than in flat regions, selecting subbands with high gradient energy as embedding subbands can significantly improve the imperceptibility of watermark embedding. Based on these factors, this application integrates the three indicators into a joint score through normalized weighted summation, and performs multi-dimensional comprehensive evaluation of each high-frequency subband, thereby selecting the optimal embedding region with the richest texture, highest information complexity, and strongest edge detail.
[0029] S30: Perform non-overlapping block division on the amplitude map of the target embedded subband to obtain multiple candidate blocks. Calculate the block variance, block gradient strength, and gradient direction consistency of each candidate block. Normalize the block variance, block gradient strength, and gradient direction consistency of each candidate block and then perform a weighted summation to obtain the block score of each candidate block. Sort all candidate blocks in descending order according to the block score and select the top L candidate blocks to obtain the embedded block set.
[0030] For example, the amplitude map of the target embedded subband. ,according to Perform non-overlapping block division to obtain Candidate blocks, , If the size of the target embedded subband is not divisible by... Boundaries can be handled by trimming or padding with zeros. In a specific example of this application, K=8.
[0031] Furthermore, the formula for calculating the block variance of a candidate block is: , in, This represents the block variance of the j-th candidate block; The magnitude of the j-th candidate block is composed of the magnitudes of all pixel positions within the j-th candidate block. This indicates the calculation of variance; The formula for calculating the block gradient strength of a candidate block is: , in, This represents the block gradient strength of the j-th candidate block; This indicates the number of rows and columns of candidate blocks obtained after non-overlapping segmentation of the amplitude map of the target embedded subband; This represents the pixel in the m-th row and n-th column of the j-th candidate block; This represents the magnitude of the pixel in the m-th row and n-th column of the j-th candidate block; Represents the horizontal gradient operator; Represents the vertical gradient operator; The formula for calculating the gradient direction consistency of candidate blocks is: , , in, This indicates the consistency of the gradient direction of the j-th candidate block; This represents the gradient direction of the pixel in the m-th row and n-th column of the j-th candidate block; Represents a very small positive number; Specifically, the higher the gradient direction consistency of a candidate block, the more concentrated the gradient direction, and the more stable the candidate block corresponds to the edge or contour. The lower the gradient direction consistency, the more chaotic the gradient direction, and the candidate block corresponds to a noisy texture. If the watermark is embedded in the noisy texture, instability will occur after being attacked.
[0032] The formula for calculating the block score of a candidate block is: , in, This represents the block score of the j-th candidate block; express The normalized value; express The weights; express The normalized value; express The weights; express The normalized value; express The weight.
[0033] It should be noted that, ,and , , All are greater than or equal to 0. Set of embedded blocks .
[0034] In a specific example of this application, , , .
[0035] Preferably, to enhance security, some embodiments of this application utilize a key to generate a pseudo-random sequence, shuffling the order of the first L candidate blocks selected, so that the arrangement order of the embedded blocks in the embedded block set is independent of the block score.
[0036] For example, the shuffled order of the set of embedded blocks is represented as follows: , This represents a pseudo-random sequence.
[0037] Specifically, after selecting the current embedding subbands, the subbands are divided into blocks, and the block variance, block gradient strength, and gradient direction consistency of each candidate block are calculated. The block variance is used to measure the dispersion of pixel amplitude within the candidate block, the block gradient strength is used to measure the overall strength of edge / detail within the candidate block, and the gradient direction consistency is used to measure the regularity of the edge direction of the candidate block. The candidate blocks are comprehensively evaluated from multiple dimensions by weighted fusion of the three indicators, and the local embedding region with the richest texture, the best edge strength, and the best directional features within the target embedding subband is selected.
[0038] S40: Calculate the embedding strength of each embedding block based on the preset global base strength, the block variance, entropy, and visual masking factor of each embedding block; and perform multiplicative embedding on the magnitude of all pixel positions within each embedding block based on the embedding strength of each embedding block and its corresponding embedding watermark.
[0039] To balance the robustness and imperceptibility of watermark embedding, this application no longer uses a fixed embedding strength for all embedding blocks. Instead, it sets an adaptive strength for each embedding block, making the embedding strength adapt to the texture complexity, edge strength, noise tolerance, and other characteristic parameters of different embedding blocks. For example, a lower embedding strength is used for embedding blocks with simple, flat textures that are sensitive to human eyes, to avoid obvious visual distortion and false contours, ensuring that the watermark is transparent and natural overall. A higher embedding strength is used for embedding blocks with rich textures, high gradient strength, and low human eye sensitivity, so that the watermark has stronger energy in these areas and is not easily destroyed when facing attacks such as JPEG compression, filtering, and noise. In addition, watermark embedding methods with different embedding strengths can also improve the watermark's resistance to steganography, ultimately achieving an optimal balance between robustness and imperceptibility.
[0040] Specifically, by the first Each binary watermark bit is mapped to {+1,-1}: Then, based on all the mapped embedded watermarks, a watermark sequence is obtained. L is the watermark length, which is the same as the number of embedded blocks.
[0041] The formula for calculating the embedding strength of an embedded block is: , in, Indicates the first The embedding strength of each embedded block; Indicates the preset global base strength; Indicates the first Block variance of each embedded block; Indicates the first The entropy of an embedded block; Indicates the first Visual masking factor of each embedded block; This represents the mean of the block variances of all embedded blocks; This represents the mean entropy of all embedded blocks; Represents a very small positive number; The moderating index representing block variance; The moderating index representing entropy; This represents the masking gain parameter; The formula for multiplicative embedding of the magnitudes at all pixel positions within the embedding block is: , in, Indicates the multiplicative embedding after the first The magnitude of the pixel in the m-th row and n-th column within an embedded block; Indicates the first Embedded watermarks for each embedded block; Indicates the first multiplicative embedding The magnitude of the pixel in the m-th row and n-th column within an embedded block; Indicates the first A set of pixels within an embedded block.
[0042] Preferably, after calculating the embedding strength of each embedding block, the method further includes: clipping the embedding strength of each embedding block, and using the clipped embedding strength to multiplicatively embed the magnitude of all pixel positions within each embedding block, thereby preventing local over-embedding.
[0043] Specifically, the formula for trimming the embedding strength is: , in, Indicates the number after cutting The embedding strength of each embedded block; Indicates the first before cutting The embedding strength of each embedded block; Indicates the maximum embedding strength; This represents the minimum embedding strength.
[0044] In a specific example of this application, , , , , , .
[0045] Since phase information determines the image contour, structure, edge and texture layout, it is a sensitive part of visual perception. Moreover, phase is extremely sensitive to attacks such as noise, compression and filtering. This application only performs multiplicative embedding on the pixel amplitude without changing the pixel phase, which can avoid distortions such as image structure distortion, contour misalignment and artifacts, making the watermark more stable under common image attacks and thus easier to extract accurately. In addition, performing multiplicative operation only on the amplitude can also reduce computational complexity.
[0046] S50: Based on the phase of each embedding block and the amplitude after multiplicative embedding, reconstruct the complex coefficients of the target embedding subband corresponding to each embedding block. Based on the reconstructed target embedding subband, low-frequency approximate subband, and high-frequency complex coefficient subband excluding the target embedding subband, reconstruct the watermark image.
[0047] It should be noted that, since the phase is not embedded, the phase of the target embedded subband is... .
[0048] Complex coefficients of the pixel in the x-th row and y-th column of the target embedded subband after amplitude reconstruction The other subbands remain unchanged. All subbands are fed into IDTCWT and reconstructed to obtain the watermarked image. Finally, pixel-range cropping and quantization are performed on the watermarked image. .
[0049] Based on the adaptive digital watermarking embedding method provided in the above embodiments, this application also provides an adaptive digital watermarking embedding device, such as... Figure 2 As shown, the device includes: The transform decomposition module 10 is used to perform S-level dual-tree complex wavelet transform decomposition on the image to obtain low-frequency approximate subbands and high-frequency complex coefficient subbands in each direction at each level.
[0050] The embedding subband selection module 20 is used to calculate the subband variance, subband entropy and gradient energy of each high-frequency complex coefficient subband based on the amplitude of each high-frequency complex coefficient subband; after normalizing the subband variance, subband entropy and gradient energy of each high-frequency complex coefficient subband, the module performs a weighted summation to obtain the joint score of each high-frequency complex coefficient subband; and selects the high-frequency complex coefficient subband with the highest joint score as the target embedding subband.
[0051] The embedding block selection module 30 is used to perform non-overlapping block division on the amplitude map of the target embedding subband to obtain multiple candidate blocks, calculate the block variance, block gradient strength and gradient direction consistency of each candidate block; after normalizing the block variance, block gradient strength and gradient direction consistency of each candidate block, the block score of each candidate block is obtained by weighted summation; all candidate blocks are sorted in descending order according to the block score, and the top L candidate blocks are selected to obtain the embedding block set.
[0052] The embedding strength calculation and embedding module 40 is used to calculate the embedding strength of each embedding block based on the preset global base strength, the variance, entropy and visual masking factor of each embedding block; and to perform multiplicative embedding on the magnitude of all pixel positions in each embedding block based on the embedding strength of each embedding block and its corresponding embedding watermark.
[0053] The watermark image acquisition module 50 is used to reconstruct the complex coefficients of the target embedding subband corresponding to each embedding block based on the phase and amplitude after multiplicative embedding of each embedding block, and to reconstruct the watermark image based on the reconstructed target embedding subband, low-frequency approximate subband and high-frequency complex coefficient subband other than the target embedding subband.
[0054] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the adaptive digital watermarking embedding method described above.
[0055] This application constructs a watermark embedding scheme based on the DTCWT amplitude domain, which integrates adaptive target subband selection, stable edge block selection, and adaptive embedding intensity modulation. A joint scoring mechanism is built for DTCWT multi-scale, multi-directional complex coefficient subbands, comprehensively utilizing subband energy, information complexity, structural features, and visual masking information for target subband selection. Compared to fixed subband or single-index selection methods, this application can adaptively select more suitable subbands for embedding based on the texture distribution and structural features of different carrier images, thereby improving the rationality of carrier selection in the transform domain and enhancing the consistency and applicability of the algorithm across different image types. In the block selection stage, a stable edge block selection rule is adopted, no longer relying solely on single indices such as entropy or variance, but comprehensively considering block energy, edge intensity, and gradient direction consistency. Because this rule prioritizes regions with stable structural features as embedding locations, the selected embedding blocks maintain high structural recognizability and statistical stability even after being attacked. Therefore, it can significantly reduce decision fluctuations in the extraction stage and improve the accuracy and stability of watermark recovery. In the DTCWT amplitude domain, an adaptive embedding intensity modulation mechanism combining local statistics and visual masking characteristics is adopted. The embedding intensity is dynamically adjusted according to the texture intensity, information complexity and visual sensitivity of different embedding blocks, so that texture and edge regions can bear more effective watermark embedding, while the perturbation is automatically reduced in smooth or visually sensitive areas. Therefore, while improving the watermark's anti-attack capability, it effectively suppresses visible distortion caused by excessive embedding and improves the image visual quality.
[0056] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0057] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0058] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0059] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0060] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. An adaptive digital watermark embedding method, characterized in that, include: The image is decomposed by S-level dual-tree complex wavelet transform to obtain low-frequency approximate subbands and high-frequency complex coefficient subbands in each direction at each level; The subband variance, subband entropy, and gradient energy of each high-frequency complex coefficient subband are calculated based on the amplitude of each high-frequency complex coefficient subband. After normalizing the subband variance, subband entropy, and gradient energy of each high-frequency complex coefficient subband, the weighted sum is obtained to obtain the joint score of each high-frequency complex coefficient subband. The high-frequency complex coefficient subband with the highest joint score is selected as the target embedding subband. The amplitude map of the target embedded subband is divided into non-overlapping blocks to obtain multiple candidate blocks. The block variance, block gradient strength and gradient direction consistency of each candidate block are calculated. After normalizing the block variance, block gradient strength, and gradient direction consistency of each candidate block, a weighted sum is obtained to get the block score of each candidate block; all candidate blocks are sorted in descending order according to the block score, and the top L candidate blocks are selected to obtain the embedding block set. The embedding strength of each embedding block is calculated based on the preset global base strength, the block variance, entropy and visual masking factor of each embedding block. Based on the embedding strength of each embedding block and its corresponding embedding watermark, the magnitude of all pixel positions within each embedding block is multiplicatively embedded. Based on the phase of each embedding block and the amplitude after multiplicative embedding, the complex coefficients of the target embedding subband corresponding to each embedding block are reconstructed. Based on the reconstructed target embedding subband, low-frequency approximation subband, and high-frequency complex coefficient subband excluding the target embedding subband, the watermark image is reconstructed.
2. The adaptive digital watermarking embedding method according to claim 1, characterized in that, The high-frequency complex coefficient subbands in each direction at each level are represented as follows: , in, This represents the set of high-frequency complex coefficient subbands in each direction at each level; Indicates the first Layer High-frequency complex coefficient subbands in each direction; Indicates the first Number of directions of the layer.
3. The adaptive digital watermarking embedding method according to claim 1, characterized in that, The formula for calculating the subband variance of a high-frequency complex coefficient subband is: , in, Indicates the first Layer High-frequency complex coefficient subbands in each direction Subband variance; express The amplitude is determined by It consists of the magnitudes of all pixel positions within the range; This indicates the calculation of variance; The subband entropy of a high-frequency complex coefficient subband is calculated as follows: , in, express Subband entropy; express The probability distribution of the amplitude histogram; The formula for calculating the gradient energy of a high-frequency complex coefficient subband is: , in, express Gradient energy; express The set of pixels; express The pixel in the x-th row and y-th column; express The magnitude of the pixel in the x-th row and y-th column; Represents the horizontal gradient operator; Represents the vertical gradient operator; The formula for calculating the joint score of high-frequency complex coefficient subbands is as follows: , in, express The combined score; express The weights; express The normalized value; express The weights; express The normalized value; express The weights; express The normalized value.
4. The adaptive digital watermarking embedding method according to claim 1, characterized in that, The formula for calculating the block variance of a candidate block is: , in, This represents the block variance of the j-th candidate block; The magnitude of the j-th candidate block is composed of the magnitudes of all pixel positions within the j-th candidate block. This indicates the calculation of variance; The formula for calculating the block gradient strength of a candidate block is: , in, This represents the block gradient strength of the j-th candidate block; This indicates the number of rows and columns of candidate blocks obtained after non-overlapping segmentation of the amplitude map of the target embedded subband; This represents the pixel in the m-th row and n-th column of the j-th candidate block; This represents the magnitude of the pixel in the m-th row and n-th column of the j-th candidate block; Represents the horizontal gradient operator; Represents the vertical gradient operator; The formula for calculating the gradient direction consistency of candidate blocks is: , , in, This indicates the consistency of the gradient direction of the j-th candidate block; This represents the gradient direction of the pixel in the m-th row and n-th column of the j-th candidate block; Represents a very small positive number; The formula for calculating the block score of a candidate block is: , in, This represents the block score of the j-th candidate block; express The normalized value; express The weights; express The normalized value; express The weights; express The normalized value; express The weight.
5. The adaptive digital watermarking embedding method according to claim 1, characterized in that, After selecting the first L candidate blocks to obtain the embedded block set, it also includes: A pseudo-random sequence is generated using a key, and the order of the first L candidate blocks is shuffled so that the order of the embedded blocks in the embedded block set is independent of the block score.
6. The adaptive digital watermarking embedding method according to claim 1, characterized in that, The formula for calculating the embedding strength of an embedded block is: , in, Indicates the first The embedding strength of each embedded block; Indicates the preset global base strength; Indicates the first Block variance of each embedded block; Indicates the first The entropy of an embedded block; Indicates the first Visual masking factor of each embedded block; This represents the mean of the block variances of all embedded blocks; This represents the mean entropy of all embedded blocks; Represents a very small positive number; The moderating index representing block variance; The moderating index representing entropy; This represents the masking gain parameter; The formula for multiplicative embedding of the magnitudes at all pixel positions within the embedding block is: , in, Indicates the multiplicative embedding after the first The magnitude of the pixel in the m-th row and n-th column within an embedded block; Indicates the first Embedded watermarks for each embedded block; Indicates the first multiplicative embedding The magnitude of the pixel in the m-th row and n-th column within an embedded block; Indicates the first A set of pixels within an embedded block.
7. The adaptive digital watermarking embedding method according to claim 1, characterized in that, After calculating the embedding strength of each embedding block, the process also includes: clipping the embedding strength of each embedding block, and using the clipped embedding strength to multiplicatively embed the magnitude of all pixel positions within each embedding block, thereby preventing local over-embedding.
8. The adaptive digital watermarking embedding method according to claim 7, characterized in that, The formula for cutting the embedding strength is: , in, Indicates the number after cutting The embedding strength of each embedded block; Indicates the first before cutting The embedding strength of each embedded block; Indicates the maximum embedding strength; This represents the minimum embedding strength.
9. An adaptive digital watermark embedding device, characterized in that, include: The transform decomposition module is used to perform S-level dual-tree complex wavelet transform decomposition on the image to obtain low-frequency approximate subbands and high-frequency complex coefficient subbands in each direction at each level. The embedded sub-band selection module is used to calculate the sub-band variance, sub-band entropy, and gradient energy of each high-frequency complex coefficient sub-band based on the amplitude of each high-frequency complex coefficient sub-band; after normalizing the sub-band variance, sub-band entropy, and gradient energy of each high-frequency complex coefficient sub-band, the module performs a weighted summation to obtain the joint score of each high-frequency complex coefficient sub-band; and selects the high-frequency complex coefficient sub-band with the highest joint score as the target embedded sub-band. The embedding block selection module is used to perform non-overlapping block division on the amplitude map of the target embedding sub-band to obtain multiple candidate blocks, and calculate the block variance, block gradient strength and gradient direction consistency of each candidate block. After normalizing the block variance, block gradient strength, and gradient direction consistency of each candidate block, a weighted sum is obtained to get the block score of each candidate block; all candidate blocks are sorted in descending order according to the block score, and the top L candidate blocks are selected to obtain the embedding block set. The embedding strength calculation and embedding module is used to calculate the embedding strength of each embedding block based on the preset global base strength, the variance, entropy and visual masking factor of each embedding block. Based on the embedding strength of each embedding block and its corresponding embedding watermark, the magnitude of all pixel positions within each embedding block is multiplicatively embedded. The watermark image acquisition module is used to reconstruct the complex coefficients of the target embedding subband corresponding to each embedding block based on the phase and amplitude after multiplicative embedding of each embedding block, and to reconstruct the watermark image based on the reconstructed target embedding subband, low-frequency approximation subband and high-frequency complex coefficient subband excluding the target embedding subband.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the adaptive digital watermarking embedding method according to any one of claims 1 to 8.