A watermark embedding and extracting method, device, equipment, storage medium and product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
- Filing Date
- 2026-04-16
- Publication Date
- 2026-08-07
AI Technical Summary
目前的图像盲水印方法主要存在以下局限:在面对复杂几何攻击或模板破坏时难以保持水印的稳定提取,难以兼顾不可见性与鲁棒性之间的平衡
本申请实施例提供的一种水印嵌入、提取方法、装置、设备、存储介质及产品,依据目标特征参数将待嵌入水印的图像划分为多个图像块,多个图像块包括目标特征参数不同的第一图像块和第二图像块,再对多个图像块分别进行变换处理,获得多个图像块的变换域特征,其中,变换域特征包括:低频子带和多个高频方向子带,如此,便于进行水印信息在变换域的嵌入。接下来,基于多个图像块的变换域特征,将水印信息嵌入第一数量的第一图像块的目标低频子带和第二数量的第二图像块的目标高频方向子带中,获得含水印的图像(即带有盲水印的图像),这样,依据图像块的类型和变换域特征,实现了针对不同目标特征参数的图像块采用差异化的水印嵌入方式,通过在第一图像块的低频子带嵌入水印信息,确保嵌入后不影响图像整体结构与视觉效果,提高嵌入水印的鲁棒性,而通过在第二图像块的高频方向子带中嵌入水印信息,提高水印的不可见性与抗攻击能力。从而,实现水印不可见性与鲁棒性的良好平衡,提高了水印的抗攻击性能。
Smart Images

Figure CN122529950A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a watermark embedding and extraction method, apparatus, device, storage medium and product. Background Technology
[0002] Blind watermarking is an invisible digital watermarking technology that can extract and verify watermarks without requiring the original carrier data. It embeds identifiable and traceable information into digital content without affecting its normal use and dissemination. Current image blind watermarking methods have the following limitations: they struggle to maintain stable watermark extraction when facing complex geometric attacks or template corruption, and they find it difficult to balance invisibility with robustness. Summary of the Invention
[0003] This application provides a watermark embedding and extraction method, apparatus, device, storage medium, and product that can achieve a good balance between watermark invisibility and robustness, thereby improving the watermark's anti-attack performance.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a watermark embedding method, the method comprising: The image to be embedded with the watermark is divided into blocks to obtain multiple image blocks, wherein the multiple image blocks include: a first number of first image blocks and a second number of second image blocks, the target feature parameters of the first image blocks and the second image blocks are different; The multiple image blocks are transformed to obtain the transform domain features of the multiple image blocks, wherein the transform domain features include: low-frequency sub-bands and multiple high-frequency directional sub-bands; Based on the transform domain features of the multiple image blocks, a watermarked image is obtained by embedding watermark information into the target low-frequency sub-band of the first number of first image blocks and the target high-frequency directional sub-band of the second number of second image blocks.
[0005] In some exemplary embodiments, obtaining a watermarked image by embedding watermark information into the target low-frequency subband of the first number of first image blocks and the target high-frequency directional subband of the second number of second image blocks based on the transform domain features of the plurality of image blocks includes: Based on the transform domain features of the multiple image blocks, sub-band feature parameters of the multiple image blocks are determined, wherein the sub-band feature parameters include: statistical parameters of low-frequency sub-bands and statistical parameters of multiple high-frequency direction sub-bands, and the statistical parameters include one or more of the following: sub-band coefficient mean, sub-band coefficient variance, and sub-band coefficient energy; Based on the statistical parameters of the target low-frequency sub-band, the first embedding parameter is determined; Using the first embedding parameters and employing the first watermark embedding algorithm, the watermark information is embedded into the target low-frequency sub-band to obtain a first result; Based on the statistical parameters of the target high-frequency directional subband, the second embedding parameter is determined; Using the second embedding parameters and the second watermark embedding algorithm, the watermark information is embedded into the target high-frequency directional subband to obtain the second result; Based on the first result and the second result, the watermarked image is determined.
[0006] In some exemplary embodiments, after determining the sub-band feature parameters of the plurality of image patches based on the transform domain features of the plurality of image patches, the method further includes: Based on the sub-band feature parameters, the target low-frequency sub-band is determined from the low-frequency sub-bands of the first number of first image blocks; Based on the sub-band feature parameters, the target high-frequency directional sub-band is determined from the multiple high-frequency directional sub-bands corresponding to each of the second number of second image blocks.
[0007] In some exemplary embodiments, obtaining a watermarked image by embedding watermark information into the target low-frequency subband of the first number of first image blocks and the target high-frequency directional subband of the second number of second image blocks based on the transform domain features of the plurality of image blocks includes: Based on the transform domain features of the multiple image blocks, the watermark information is embedded into the target low-frequency sub-band of the first number of first image blocks and the target high-frequency directional sub-band of the second number of second image blocks to obtain the image to be evaluated. The image quality of the image to be evaluated is evaluated to obtain the image quality parameters of the image to be evaluated. Based on the image quality parameters of the image to be evaluated, the embedding parameters corresponding to the image to be evaluated are adjusted, and the watermark information is re-embedded into the target low-frequency sub-band and the target high-frequency direction sub-band with the adjusted embedding parameters to obtain the adjusted image. This process continues until a preset termination condition is met, and the adjusted image is determined as the watermarked image.
[0008] In some exemplary embodiments, the image quality parameters of the image to be evaluated include: peak signal-to-noise ratio (PSNR) and structural similarity value; The process involves adjusting the embedding parameters based on the image quality parameters of the image to be evaluated, and then re-embedding the watermark information into the target low-frequency sub-band and the target high-frequency directional sub-band using the adjusted embedding parameters to obtain an adjusted image. This process continues until a preset termination condition is met, at which point the adjusted image is determined as the watermarked image. This includes: Based on the image quality parameters of the image to be evaluated, the preset image quality target value, and the preset adjustment coefficient, the embedding parameters corresponding to the image to be evaluated are adjusted to obtain the adjusted embedding parameters. Using the adjusted embedding parameters, the watermark information is re-embedded into the target low-frequency sub-band and the target high-frequency directional sub-band to obtain the adjusted image. This process continues until a preset termination condition is met, at which point the adjusted image is determined as the watermarked image.
[0009] In some exemplary embodiments, the step of segmenting the image to be embedded with a watermark to obtain multiple image blocks includes: The image to be watermarked is traversed through a sliding window. For each window area, the following operations are performed: Determine the target feature parameters corresponding to the window region; If the target feature parameters corresponding to the window region meet the preset first parameter condition, the first image block is obtained by adjusting the size of the sliding window to the preset first size; Alternatively, if the target feature parameters corresponding to the window region satisfy a preset second parameter condition, the second image block is obtained by adjusting the size of the sliding window to a preset second size, wherein the preset second size is smaller than the preset first size.
[0010] In some exemplary embodiments, the target feature parameters include: texture feature parameters and brightness feature parameters; The brightness feature parameters include one or more of the following: pixel mean and pixel variance; The texture feature parameters include either gradient variance or local binary pattern entropy. The preset first parameter condition includes: a first sub-condition and a second sub-condition. The first sub-condition includes one or more of the following: the pixel mean is within a preset pixel mean range and the pixel variance is less than a preset pixel variance threshold. The second sub-condition includes any one of the following: the gradient variance is less than a preset gradient variance threshold and the local binary mode entropy is less than a preset entropy threshold. The preset second parameter conditions include any one or more of the following: the pixel mean is not within the preset pixel mean range, the pixel variance is not less than the preset pixel variance threshold, the gradient variance is not less than the preset gradient variance threshold, and the local binary mode entropy value is not less than the preset entropy value threshold.
[0011] In some exemplary embodiments, the first image block includes: a first type of first image block and a second type of first image block, wherein the size of the second type of first image block is larger than the size of the first type of first image block; the second image block includes: a first type of second image block and a second type of second image block, wherein the size of the second type of second image block is smaller than the size of the first type of second image block; The step of obtaining the first image block by adjusting the size of the sliding window to a preset first size if the target feature parameters corresponding to the window region satisfy the preset first parameter condition includes: if the target feature parameters corresponding to the window region satisfy the preset first parameter condition, determining whether the texture feature parameter in the target feature parameters corresponding to the window region is less than a preset first sub-texture threshold; when it is not less than the preset first sub-texture threshold, obtaining the first type of first image block by adjusting the size of the sliding window to the preset first size, or, when it is less than the preset first sub-texture threshold, obtaining the second type of first image by expanding the size of the sliding window from the preset first size to a preset third size; The step of obtaining the second image block by adjusting the size of the sliding window to a preset second size if the target feature parameter corresponding to the window region satisfies the preset second parameter condition includes: if the target feature parameter corresponding to the window region satisfies the preset second parameter condition, determining whether the texture feature parameter in the target feature parameter corresponding to the window region is greater than a preset second sub-texture threshold; when it is not greater than the preset second sub-texture threshold, obtaining the first type of second image block by adjusting the size of the sliding window to a preset second size, or, when it is greater than the preset second sub-texture threshold, obtaining the second type of second image block by reducing the size of the sliding window from the preset second size to a preset fourth size.
[0012] In some exemplary embodiments, the step of performing transform processing on the plurality of image patches respectively to obtain the transform domain features of the plurality of image patches includes: For each image patch, the following processing is performed using a preset transformation algorithm: The image block is decomposed into a preset number of layers using a preset scale and then decomposed using the Laplacian pyramid in a preset transformation algorithm to obtain the low-frequency sub-band and multiple high-frequency sub-bands of the image block. Using a pre-configured number of directions, the multiple high-frequency sub-bands are decomposed through a configurable directional filter bank in a preset transformation algorithm to obtain multiple high-frequency directional sub-bands of the image block; The low-frequency subbands and multiple high-frequency directional subbands of the image block are determined as the transform domain features of the image block.
[0013] This application provides a watermark extraction method, the method comprising: The watermark image to be extracted is divided into blocks to obtain multiple watermark image blocks, wherein the multiple watermark image blocks include: a third number of first watermark image blocks and a fourth number of second watermark image blocks, and the target feature parameters of the first watermark image blocks and the second watermark image blocks are different. The multiple watermarked image blocks are transformed to obtain the transform domain features of the multiple watermarked image blocks, wherein the transform domain features include: low-frequency sub-bands and multiple high-frequency directional sub-bands; Based on the transform domain features of the multiple watermarked image blocks, watermark information is obtained by extracting watermarks from the target low-frequency sub-band of the third number of first watermarked image blocks and the target high-frequency directional sub-band of the fourth number of second watermarked image blocks.
[0014] This application provides a watermark embedding device, the device comprising: The first segmentation unit is used to segment the image to be embedded with the watermark into multiple image blocks, wherein the multiple image blocks include: a first number of first image blocks and a second number of second image blocks, and the target feature parameters of the first image blocks and the second image blocks are different. The first transformation unit is used to perform transformation processing on the plurality of image blocks respectively to obtain the transform domain features of the plurality of image blocks, wherein the transform domain features include: low-frequency sub-bands and multiple high-frequency directional sub-bands; The first obtaining unit is used to obtain a watermarked image by embedding watermark information into the target low-frequency sub-band of the first number of first image blocks and the target high-frequency directional sub-band of the second number of second image blocks based on the transform domain features of the plurality of image blocks.
[0015] This application provides a watermark extraction device, the device comprising: The second segmentation unit is used to segment the watermark image to be extracted into multiple watermark image blocks. The multiple watermark image blocks include: a third number of first watermark image blocks and a fourth number of second watermark image blocks. The target feature parameters of the first watermark image blocks and the second watermark image blocks are different. The second transformation unit is used to perform transformation processing on the plurality of watermark image blocks respectively to obtain the transform domain features of the plurality of watermark image blocks, wherein the transform domain features include: low-frequency sub-bands and multiple high-frequency directional sub-bands; The second obtaining unit is used to obtain the extracted watermark information by extracting watermarks from the target low-frequency sub-bands of the third number of first watermark image blocks and the target high-frequency directional sub-bands of the fourth number of second watermark image blocks based on the transform domain features of the plurality of watermark image blocks.
[0016] This application provides an electronic device, the electronic device comprising: Memory is used to store executable instructions or computer programs. When a processor executes computer-executable instructions or computer programs stored in the memory, it implements the watermark embedding method or watermark extraction method provided in the embodiments of this application.
[0017] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions. When the computer program or computer-executable instructions are executed by a processor, they implement the watermark embedding method or watermark extraction method provided in this application.
[0018] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the watermark embedding method or watermark extraction method provided in this application.
[0019] The embodiments of this application have the following beneficial effects: This application provides a watermark embedding and extraction method, apparatus, device, storage medium, and product. The method divides an image to be watermarked into multiple image blocks based on target feature parameters. These multiple image blocks include first and second image blocks with different target feature parameters. Each image block undergoes a transformation process to obtain its transform domain features. These transform domain features include a low-frequency sub-band and multiple high-frequency directional sub-bands, facilitating watermark embedding in the transform domain. Next, based on the transform domain features of the multiple image blocks, the watermark information is embedded into the target low-frequency sub-bands of a first number of first image blocks and the target high-frequency directional sub-bands of a second number of second image blocks, resulting in a watermarked image (i.e., an image with a blind watermark). This allows for differentiated watermark embedding methods for image blocks with different target feature parameters, based on the type of image block and its transform domain features. Embedding watermark information in the low-frequency sub-bands of the first image block ensures that the embedding does not affect the overall image structure and visual effect, improving the robustness of the watermark embedding. Embedding watermark information in the high-frequency directional sub-bands of the second image block improves the watermark's invisibility and resistance to attacks. This achieves a good balance between watermark invisibility and robustness, improving the watermark's resistance to attacks. Attached Figure Description
[0020] Figure 1 A flowchart illustrating a watermark embedding method provided in an embodiment of this application; Figure 2 A flowchart illustrating a watermark extraction method provided in an embodiment of this application; Figure 3 A flowchart illustrating an exemplary application embodiment provided in this application; Figure 4 This is a schematic diagram illustrating the results of watermark embedding and watermark extraction provided in an embodiment of this application. Figure 5 This is a schematic diagram of the structure of a watermark embedding device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a watermark extraction device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] In the description of this application, references are made to "some exemplary embodiments," which describe a subset of all possible embodiments. However, it is understood that "some exemplary embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0023] In the description of this application, the terms "first," "second," etc., are used merely to distinguish similar objects and do not represent a specific order of objects, nor should they be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in a sequence other than that illustrated or described herein.
[0024] In the description of this application, "multiple" means two or more. Terms such as "one or more," "one or more items," or "one or more items" indicate any one, any two, or more than two of a plurality. For example, including one or more of A, B, and C can mean including any one, any two, or more elements selected from the set consisting of A, B, and C.
[0025] In the description of this application, the terms "module," "unit," or "component" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented, wholly or partially, using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of a larger module or unit that includes the functionality of that module or unit.
[0026] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0027] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0028] This application provides a watermark embedding and extraction method, apparatus, device, storage medium, and product that can achieve a good balance between watermark invisibility and robustness, thereby improving the watermark's anti-attack performance.
[0029] In some exemplary embodiments, the watermark embedding and extraction methods provided in the various embodiments of this application are applicable to various cloud computer and cloud mobile phone scenarios such as cloud platforms and large-scale cloud platform systems.
[0030] In some exemplary embodiments, the execution entity of the watermark embedding and extraction method provided in this application may be, but is not limited to, a node in a cloud platform, such as a cloud computer server. Furthermore, the execution entity of the watermark embedding and extraction method may also be an application (APP) running on that node or the cloud platform system itself.
[0031] Figure 1 This is a flowchart illustrating a watermark embedding method provided in an embodiment of this application. The following will be combined with... Figure 1This will be explained in more detail. For example, the entity performing the watermark embedding can be a watermark embedding device, which is implemented using one or more methods, such as software and hardware. For example, the device can be integrated into a cloud computer server device.
[0032] like Figure 1 As shown, the watermark embedding method may include: S101, the image to be embedded with the watermark is divided into blocks to obtain multiple image blocks, wherein the multiple image blocks include: a first number of first image blocks and a second number of second image blocks, the target feature parameters of the first image blocks and the second image blocks are different; S102, perform transformation processing on multiple image blocks respectively to obtain the transform domain features of multiple image blocks, wherein the transform domain features include: low frequency sub-band and multiple high frequency directional sub-bands; S103, based on the transform domain features of multiple image blocks, a watermarked image is obtained by embedding watermark information into the target low-frequency sub-band of a first number of first image blocks and the target high-frequency directional sub-band of a second number of second image blocks.
[0033] The image to be embedded with a watermark refers to the carrier image that needs to be blindly watermarked. As an example, the image to be embedded with a watermark can be a still image or a video image (also called a video frame) in a video (or video stream), which can be considered as a series of video images. For example, taking a cloud computing scenario as an example, the image to be embedded with a watermark can be a cloud computing image, such as a cloud computing desktop image.
[0034] The first quantity and the second quantity can be the same or different.
[0035] In some exemplary embodiments, the target feature parameters include one or more of texture feature parameters and brightness feature parameters.
[0036] Among them, texture feature parameters are used to characterize the degree of texture change in image patches.
[0037] In some exemplary embodiments, texture feature parameters may include either gradient variance or local binary mode entropy.
[0038] The gradient variance is derived from the gradient magnitude of each pixel in an image patch. As an example, gradient operators (such as Sobel, Prewitt, and Scharr) are used to calculate the gradient of each pixel in the image patch. The gradient includes both horizontal and vertical gradients. Based on the horizontal and vertical gradients of each pixel in the image patch, the gradient magnitude of each pixel is calculated. Finally, based on the gradient magnitude of each pixel in the image patch, the gradient magnitude variance (or simply gradient variance) is calculated. The gradient magnitude and gradient direction of each pixel refer to the edge strength and direction information of that pixel. The gradient magnitude represents the size or intensity of the gradient, indicating the degree of change among pixels in the image patch, while the gradient direction represents the direction of change among pixels in the image patch. The gradient variance represents the dispersion or degree of change of the gradient direction and gradient magnitude of pixels in an image patch, providing information about changes in the texture features of the image. For example, a large gradient variance in an image patch indicates drastic changes in texture features, suggesting a more complex texture in the image patch.
[0039] As an example, feature extraction is performed on image patches using Local Binary Pattern (LBP) to obtain LBP features; the information entropy of the LBP features is then calculated to obtain the entropy value of the Local Binary Pattern (ELBP). Here, Local Binary Pattern (LBP) is a feature operator that describes the local texture of an image.
[0040] Among them, the brightness feature parameter is used to characterize the degree of drastic change in the brightness distribution of image patches.
[0041] In some exemplary embodiments, the brightness feature parameters may include one or more of the following: pixel mean and pixel variance. The pixel mean refers to the average pixel value of all pixels in an image block. For example, a large pixel mean in an image block indicates drastic fluctuations in the brightness distribution of pixels within the image block. The pixel variance is obtained based on the difference between the pixel value of each pixel in the image block and the pixel mean. For example, a large pixel variance in an image block indicates drastic fluctuations in the brightness distribution of pixels within the image block. A small pixel variance in an image block indicates a uniform brightness distribution of pixels within the image block.
[0042] As an example, taking the image to be watermarked as an image from a cloud computer as an example, the image resolution of a cloud computer is generally in the range of 1080P to 4K. When using a dynamic block segmentation strategy, a sliding window (such as 64×64, 16×16, etc.) can be predefined to traverse the image to be watermarked, and the target feature parameters of each sliding window region can be calculated. In this way, the block segmentation result can be made to better match the characteristics of the data content of the cloud computer. Of course, depending on the application scenario, the sliding window can also be set to other sizes.
[0043] In some exemplary embodiments, the target feature parameters of the first image block and the second image block are different, which may include: the texture feature parameter of the first image block is smaller than the texture feature parameter of the second image block.
[0044] In some other exemplary embodiments, the target feature parameters of the first image block and the second image block are different, which may include: the texture feature parameter of the first image block is smaller than the texture feature parameter of the second image block, and the brightness feature parameter of the first image block is different from the brightness feature parameter of the second image block.
[0045] Transformation processing refers to the processing from the spatial domain to the transform domain, such as the processing from the spatial domain to the frequency domain.
[0046] As an example, the transformation process can employ a preset transformation algorithm for multi-scale and multi-directional decomposition. For instance, the preset transformation algorithm might include a Laplacian Pyramid (LP) and a configurable direction filter bank (DFB), performing multi-scale decomposition via the Laplacian Pyramid (LP) and multi-directional decomposition via the configurable direction filter bank (DFB). The Laplacian Pyramid, based on a Gaussian pyramid, is used to capture the detailed differences between image scales. It is constructed by calculating the difference between adjacent layers in the Gaussian pyramid (i.e., the Laplacian operator), with each layer representing the "residual" information of the current scale relative to the next scale. The Gaussian pyramid is constructed by successively applying Gaussian blur and downsampling (resolution reduction) operations. Each layer is obtained by reducing the size of the previous layer by a factor of 2 after Gaussian filtering.
[0047] As an example, the watermark information can be the information itself, such as identity information, copyright information, or authentication data; or, the watermark information can be information after encoding identity information, copyright information, or authentication data; or, the watermark information can be information after hashing identity information, copyright information, or authentication data.
[0048] For example, after obtaining raw information input by the user (such as company name, cloud computer identifier (id), current time, etc.), a preset hash function is used to perform a hash operation on the raw information input by the user, generating encrypted information as watermark information, thus enhancing the security of the watermark information. Alternatively, after obtaining the encrypted information, it is encoded into a binary sequence, and the binary sequence is used as watermark information, thus facilitating subsequent watermark embedding operations.
[0049] Among them, an image with a watermark refers to an image that has already been embedded with a watermark.
[0050] Thus, in this embodiment, the image to be watermarked is divided into multiple image blocks based on the target feature parameters. These multiple image blocks include first and second image blocks with different target feature parameters. Each image block is then transformed to obtain its transform domain features. These transform domain features include a low-frequency sub-band and multiple high-frequency directional sub-bands, facilitating the embedding of watermark information in the transform domain. Next, based on the transform domain features of the multiple image blocks, the watermark information is embedded into the target low-frequency sub-bands of a first number of first image blocks and the target high-frequency directional sub-bands of a second number of second image blocks, resulting in a watermarked image (i.e., an image with a blind watermark). This achieves differentiated watermark embedding methods for image blocks with different target feature parameters based on the type of image block and the transform domain features. Embedding watermark information in the low-frequency sub-band of the first image block ensures that the embedding does not affect the overall image structure and visual effect, improving the robustness of the watermark embedding. Embedding watermark information in the high-frequency directional sub-bands of the second image block improves the watermark's invisibility and resistance to attacks. This achieves a good balance between watermark invisibility and robustness, improving the watermark's resistance to attacks.
[0051] The following explains how to segment the image to be embedded with a watermark into multiple image blocks based on the target feature parameters.
[0052] In some exemplary embodiments, S101, the image to be embedded with the watermark is segmented to obtain multiple image blocks, including: S1011, traverse the image to be embedded with the watermark using a sliding window, and perform the following operations for each window area: S1012, Determine the target feature parameters corresponding to the window region; S1013, if the target feature parameters corresponding to the window region meet the preset first parameter condition, the first image block is obtained by adjusting the size of the sliding window to the preset first size; S1014, if the target feature parameters corresponding to the window region meet the preset second parameter conditions, the second image block is obtained by adjusting the size of the sliding window to the preset second size, wherein the preset second size is smaller than the preset first size.
[0053] Thus, in this embodiment, the image to be watermarked is dynamically segmented using a sliding window. During this dynamic segmentation, the window size is dynamically adjusted based on target feature parameters, enabling single-pass traversal and avoiding computational redundancy from multiple traversals. Furthermore, since the sliding window size is set according to the image's target feature parameters (such as brightness and texture parameters), dynamic adaptive segmentation is achieved, making the segmentation results more closely match the content characteristics of the image to be watermarked (such as a cloud computer image). This avoids watermark redundancy caused by over-subdivision of the first image block and ensures detail preservation in the second image block, improving watermark invisibility and robustness.
[0054] In some exemplary embodiments, the target feature parameters may include: texture feature parameters.
[0055] In some other exemplary embodiments, the target feature parameters include: brightness feature parameters and texture feature parameters.
[0056] In some exemplary embodiments, the brightness feature parameter may include: pixel mean. and pixel variance One or more of the following.
[0057] In some exemplary embodiments, texture feature parameters may include: gradient variance and local binary mode entropy Any one of them.
[0058] In some exemplary embodiments, taking the target feature parameters including texture feature parameters as an example, the preset first parameter condition may include: gradient variance. Less than the preset gradient variance threshold and local binary mode entropy Less than the preset entropy threshold Any one of them.
[0059] In some other exemplary embodiments, taking the target feature parameters including brightness feature parameters and texture feature parameters as an example, the preset first parameter condition may include a first sub-condition and a second sub-condition, wherein the first sub-condition includes: pixel mean. Located within the preset pixel average range Intra-pixel variance Less than the preset pixel variance threshold One or more of the following, the second sub-condition includes: gradient variance Less than the preset gradient variance threshold and local binary mode entropy Less than the preset entropy threshold Any one of them.
[0060] In some exemplary embodiments, taking the target feature parameters including texture feature parameters as an example, the preset second parameter condition may include: gradient variance. Not less than the preset gradient variance threshold and local binary mode entropy Not less than the preset entropy threshold Any one of them.
[0061] In some other exemplary embodiments, taking the target feature parameters as including: brightness feature parameters and texture feature parameters, the preset second parameter condition includes any one or more of the following: pixel mean. Not within the preset pixel mean range Intra-pixel variance Not less than the preset pixel variance threshold gradient variance Not less than the preset gradient variance threshold Local binary mode entropy Not less than the preset entropy threshold .
[0062] In some exemplary embodiments, the first image block includes: a first type of first image block and a second type of first image block, wherein the size of the second type of first image block is larger than the size of the first type of first image block.
[0063] As an example, taking a target feature parameter that includes brightness feature parameter and texture feature parameter as an example, the first type of first image block is an image block in which the target feature parameter satisfies a preset first parameter condition, and the texture feature parameter in the target feature parameter is not less than a preset first sub-texture threshold. The second type of first image block is an image block in which the target feature parameter satisfies the preset first parameter condition, and the texture feature parameter in the target feature parameter is less than a preset first sub-texture threshold.
[0064] In some exemplary embodiments, S1013, if the target feature parameters corresponding to the window region satisfy a preset first parameter condition, obtaining a first image block by adjusting the size of the sliding window to a preset first size may include: If the target feature parameters corresponding to the window region meet the preset first parameter condition, determine whether the texture feature parameters in the target feature parameters corresponding to the window region are less than the preset first sub-texture threshold. When the size is not less than the preset first sub-texture threshold, the first type of first image block is obtained by adjusting the size of the sliding window to the preset first size; or, when the size is less than the preset first sub-texture threshold, the second type of first image is obtained by expanding the size of the sliding window from the preset first size to the preset third size.
[0065] As an example, texture feature parameters include: gradient variance and local binary mode entropy Taking any one of them as an example, the preset first sub-texture threshold can include: the first sub-gradient variance threshold. Or the first sub-entropy threshold .
[0066] As an example, taking the image to be embedded with watermark as an image of a cloud computer, the image resolution of the cloud computer is in the range of 1080P to 4K resolution. When adopting a dynamic block strategy, the first preset first size of the first image block can be 64×64 pixels, and the second preset third size of the first image block can be 128×128 pixels.
[0067] Thus, in this embodiment, by setting a preset first sub-texture threshold and dynamically adjusting the size of the sliding window, the first image block is subdivided into a first type of first image block and a second type of first image block. This makes the image block division more closely match the content of the image to be embedded with the watermark.
[0068] In some exemplary embodiments, the second image block includes: a first type of second image block and a second type of second image block, wherein the size of the second type of second image block is smaller than the size of the first type of second image block.
[0069] As an example, taking a target feature parameter that includes brightness feature parameter and texture feature parameter as an example, the first type of second image block is an image block in which the target feature parameter satisfies the preset second parameter condition, and the texture feature parameter in the target feature parameter is not greater than the preset second sub-texture threshold. The second type of first image block is an image block in which the target feature parameter satisfies the preset second parameter condition, and the texture feature parameter in the target feature parameter is greater than the preset second sub-texture threshold.
[0070] In some exemplary embodiments, S1014, if the target feature parameters corresponding to the window region satisfy a preset second parameter condition, a second image block is obtained by adjusting the size of the sliding window to a preset second size, including: If the target feature parameters corresponding to the window region meet the preset second parameter condition, determine whether the texture feature parameters in the target feature parameters corresponding to the window region are greater than the preset second sub-texture threshold. When the size is not greater than the preset second sub-texture threshold, the first type of second image block is obtained by adjusting the size of the sliding window to the preset second size; or, when the size is greater than the preset second sub-texture threshold, the second type of second image block is obtained by reducing the size of the sliding window from the preset second size to the preset fourth size.
[0071] As an example, texture feature parameters include: gradient variance and local binary mode entropy Taking any one of them as an example, the preset second sub-texture threshold can include: the second sub-gradient variance threshold. Or the second sub-entropy threshold .
[0072] As an example, taking the image to be embedded with watermark as an image of a cloud computer, the image resolution of the cloud computer is in the range of 1080P to 4K resolution. When adopting the dynamic block strategy, the preset second size of the first type of second image block can be 16×16 pixels, and the preset fourth size of the second type of second image block can be 8×8 pixels.
[0073] Thus, by setting a preset second sub-texture threshold and dynamically adjusting the size of the sliding window, the second image block is subdivided into a first type of second image block and a second type of second image block. This makes the image block division more closely match the content of the image to be embedded with the watermark.
[0074] In some exemplary embodiments, taking the target feature parameters including brightness feature parameters and texture feature parameters as an example, S101, the image to be embedded with the watermark is divided into blocks to obtain multiple image blocks, which may include: A20, traverse the image to be embedded with the watermark using a sliding window, and for each window area, perform the following steps A21 to A25: A21, determine the target feature parameters corresponding to the window region; whereby the target feature parameters include: brightness feature parameters and texture feature parameters; the brightness feature parameters include: pixel mean. and pixel variance Texture feature parameters include: gradient variance And the local binary mode entropy value ELBP.
[0075] A22, if the target feature parameters of the window region satisfy the preset first parameter condition (e.g., including: first sub-condition and second sub-condition), and the texture feature parameter in the target feature parameters is not less than the preset first sub-texture threshold (e.g., the first sub-gradient variance threshold). Or the first sub-entropy threshold The image patch is obtained by adjusting the size of the sliding window to a preset first size (e.g., 64×64 pixels). The first sub-gradient variance threshold is used to define the first image patch. Less than the preset gradient variance threshold First sub-entropy threshold Less than the preset entropy threshold .
[0076] For example, target feature parameters include: pixel mean Pixel variance gradient variance and local binary mode entropy Step A22 may include: if the target feature parameters of the window region satisfy: , as well as This yields the first type of first image patch. Alternatively, if the target feature parameters of the window region satisfy: , ,and This yields the first type of first image patch. Among them, Indicates the preset pixel mean range. This indicates the preset pixel variance threshold. This indicates the preset gradient variance threshold. This represents the first sub-gradient variance threshold. This indicates the preset entropy threshold. This represents the threshold value of the first sub-entropy.
[0077] A23, if the target feature parameters of the window region satisfy the preset first parameter condition (e.g., including: first sub-condition and second sub-condition), and the texture feature parameter in the target feature parameters is less than the preset first sub-texture threshold (e.g., the first sub-gradient variance threshold). Or the first sub-entropy threshold When the sliding window size is increased from a preset first size to a preset third size (e.g., 128×128 pixels), a second type of first image patch is obtained. The first sub-gradient variance threshold is used. Less than the preset gradient variance threshold First sub-entropy threshold Less than the preset entropy threshold .
[0078] For example, target feature parameters include: pixel mean Pixel variance gradient variance and local binary mode entropy Step A23 may include: if the target feature parameters of the window region satisfy: , ,and This yields the second type of first image patch. Alternatively, if the target feature parameters of the window region satisfy: , ,and This yields the second type of first image block.
[0079] A24, if the target feature parameters of the window region satisfy the preset second parameter condition, and the texture feature parameters in the target feature parameters are not greater than the preset second sub-texture threshold (such as the second sub-gradient variance threshold). Or the second sub-entropy threshold By adjusting the size of the sliding window to a preset second size (e.g., 16×16 pixels), a first type of second image patch is obtained. The second sub-gradient variance threshold is used. Greater than the preset gradient variance threshold The second sub-entropy threshold Greater than the preset entropy threshold .
[0080] For example, target feature parameters include: pixel mean Pixel variance gradient variance and local binary mode entropy Step A24 may include: if the target feature parameters of the window region satisfy: and This yields the first type of second image patch. Alternatively, if the target feature parameters of the window region satisfy: and This yields the first type of second image patch. Alternatively, if the target feature parameters of the window region satisfy: and This yields the first type of second image patch. Alternatively, if the target feature parameters of the window region satisfy: and This yields the first type of second image block.
[0081] A25, if the target feature parameters of the window region meet the preset second parameter conditions, and the texture feature parameters in the target feature parameters are greater than the preset second sub-texture threshold, the second type of second image block is obtained by reducing the size of the sliding window from the preset second size to the preset fourth size (such as 8×8 pixels).
[0082] For example, target feature parameters include: pixel mean Pixel variance gradient variance and local binary mode entropy For example, step A25 may include: if the target feature parameters of the window region satisfy: and This yields the second type of second image patch. Alternatively, if the target feature parameters of the window region satisfy: and This yields the second type of second image patch. Alternatively, if the target feature parameters of the window region satisfy: and This yields the second type of second image patch. Alternatively, if the target feature parameters of the window region satisfy: and This yields the second type of second image block.
[0083] Here, relatively speaking, if the target feature parameters satisfy the preset first parameter condition, it indicates that the brightness distribution of the image patch is relatively uniform and the texture complexity is low. If the texture feature parameters in the target feature parameters are less than the preset first sub-texture threshold, it indicates that the texture complexity of the image patch is extremely low. If the target feature parameters satisfy the preset second parameter condition, it indicates that the brightness distribution of the image patch fluctuates greatly and the texture complexity is high. If the texture feature parameters in the target feature parameters are greater than the preset second sub-texture threshold, it indicates that the texture complexity of the image patch is extremely high.
[0084] Thus, in this embodiment, the image to be watermarked is dynamically segmented using a sliding window. During this dynamic segmentation, the window size is dynamically adjusted based on the target feature parameters, enabling single-pass traversal and avoiding computational redundancy from multiple traversals. Furthermore, the sliding window size is set according to the image's target feature parameters, achieving dynamic adaptive segmentation and making the segmentation results more closely match the content characteristics of the image to be watermarked. In practical applications, when applied to cloud computing scenarios, the image to be watermarked is a cloud computing image. By combining brightness and texture feature parameters as target feature parameters, the segmentation can better match the content characteristics of the cloud computing image, such as the uniform brightness of large areas of solid-color backgrounds (e.g., desktop, blank document), avoiding excessive subdivision of the first image block leading to watermark redundancy, and ensuring detail preservation in the second image block, thereby improving watermark invisibility and robustness.
[0085] In some other exemplary embodiments, the target feature parameters include: texture feature parameters, which include: gradient variance. For example, in step S101, the image to be embedded with the watermark is divided into blocks to obtain multiple image blocks, which may include: B1, iterate through the image to be embedded with the watermark using a sliding window, and perform the following operations for each window area: B2, determine the target feature parameters corresponding to the window region; where the target feature parameters include: texture feature parameters, and the texture feature parameters include: gradient variance. ; B3, if the target feature parameters of the window region satisfy: the gradient variance of the window region Less than the preset gradient variance threshold The first image block is obtained by adjusting the size of the sliding window to a preset first size; B4, if the target feature parameters of the window region satisfy: the gradient variance of the window region Not less than the preset gradient variance threshold A second image block is obtained by adjusting the size of the sliding window to a preset second size, wherein the preset second size is smaller than the preset first size.
[0086] In some exemplary embodiments, step B3 may include: B31, if the target feature parameters of the window region satisfy: the gradient variance of the window region Less than the preset gradient variance threshold And not less than the first sub-gradient variance threshold ,Right now By adjusting the size of the sliding window to a preset first size (e.g., 64×64 pixels), a first type of first image patch is obtained; wherein, the first sub-gradient variance threshold Less than the preset gradient variance threshold ; B32, if the target feature parameters of the window region satisfy: the gradient variance of the window region Less than the preset gradient variance threshold And less than the first sub-gradient variance threshold By expanding the size of the sliding window from a preset first size to a preset third size (such as 128×128 pixels), a second first image is obtained.
[0087] In some exemplary embodiments, step B4 may include: B41, if the target feature parameters of the window region satisfy: the gradient variance of the window region Not less than the preset gradient variance threshold And not greater than the second sub-gradient variance threshold Then, by adjusting the size of the sliding window to a preset second size (e.g., 16×16 pixels), the first type of second image patch is obtained. Here, the second sub-gradient variance threshold... Greater than the preset gradient variance threshold .
[0088] B42, if the target feature parameters of the window region satisfy: the gradient variance of the window region Not less than the preset gradient variance threshold And greater than the second sub-gradient variance threshold Then, by reducing the size of the sliding window from the preset second size to the preset fourth size (such as 8×8 pixels), a second type of second image block is obtained.
[0089] Here, relatively speaking, the first type of first image block can be a smooth block with low texture complexity, the second type of first image block can be a smooth block with extremely low texture complexity, the first type of second image block can be a smooth block with high texture complexity, and the second type of second image block can be a smooth block with extremely high texture complexity. For example, analysis of cloud computer images shows that cloud computer images are non-natural images with high image gradients. Therefore, gradient magnitude variance can be used as a texture feature parameter. Regions with variance not greater than a preset first texture threshold and not less than a preset second texture threshold are classified as the first type of first image block (i.e., smooth blocks with low texture complexity), and regions with variance not greater than or less than the preset second texture threshold are further classified as the second type of first image block (i.e., smooth blocks with extremely low texture complexity). Regions with variance greater than the preset first texture threshold and not greater than the preset third texture threshold are classified as the first type of second image block (i.e., complex blocks with relatively complex textures), and regions with variance greater than the preset third texture threshold are further classified as the second type of second image block (i.e., complex blocks with extremely complex textures).
[0090] As an example, the size of the first image block can be 64×64 pixels in the first type, 128×128 pixels in the second type, 16×16 pixels in the first type, and 8×8 pixels in the second type.
[0091] Thus, in the embodiments of this application, gradient variance is used. As a target feature parameter, the gradient variance Less than the preset gradient variance threshold And not less than the first sub-gradient variance threshold The region is divided into the first type of image patch (i.e., a smooth patch with low texture complexity), and the gradient variance is... Less than the first sub-gradient variance threshold Divide the image into second type first image patches (i.e., smooth patches with extremely low texture complexity), and then use the gradient variance. Not less than the preset gradient variance threshold And not greater than the second sub-gradient variance threshold The region is divided into the first type of second image patch (i.e., complex patch with more complex texture), and the gradient variance is... Greater than the second sub-gradient variance threshold The region is divided into a second type of image block (i.e., a complex block with extremely complex texture). This dynamic segmentation method allows the segmentation results to better match the data content characteristics of the image to be embedded with the watermark. In particular, when applied to cloud computing scenarios, considering that cloud computing images are non-natural images with high image gradients, by using gradient variance as the target feature parameter, this dynamic segmentation method can be used to divide the cloud computing image to be embedded into multiple image blocks, making the segmentation results more closely match the content characteristics of the cloud computing image.
[0092] In some exemplary embodiments, S102, transform processing is performed on multiple image blocks respectively to obtain transform domain features of multiple image blocks, including: S1021, for each image block, the following processing is performed using a preset transformation algorithm: S1022, decompose the image block into layers at a preset scale and decompose the image block into low-frequency sub-bands and multiple high-frequency sub-bands through the Laplacian pyramid in the preset transformation algorithm. S1023, using a pre-configured number of directions, decompose multiple high-frequency sub-bands through a configurable directional filter bank in a pre-configured transformation algorithm to obtain multiple high-frequency directional sub-bands of the image block; S1024, the low-frequency sub-bands and multiple high-frequency directional sub-bands of the image block are determined as the transform domain features of the image block.
[0093] The low-frequency subband contains the main structural information and general outline information of the image, reflecting the image information at a large scale; the high-frequency subband contains the detailed information of the image, such as texture information and edge information, reflecting the image information at a small scale.
[0094] In some exemplary embodiments, the number of scale decomposition layers P of the Laplacian pyramid (LP) can be set to 3 to 5. As an example, for a cloud desktop scenario, the number of scale decomposition layers P of the Laplacian pyramid (LP) can be set to 4.
[0095] As an example, the standard deviation of the Laplace pyramid (LP) can be set to 1, and the kernel size can be 5×5.
[0096] In the preset transformation algorithm, the configurable directional filter bank refers to the directional filter bank with a configurable number of directions.
[0097] As an example, taking a cloud desktop scenario as an example, the pre-configured number of directions can include: setting the number of directions in the first layer of the configurable directional filter bank (DFB) to 4, and setting the number of directions in the second layer to 4. This allows the first high-frequency subband obtained from the Laplacian pyramid to be decomposed into 4 high-frequency directional subbands, and the second high-frequency subband obtained from the Laplacian pyramid to be decomposed into 4 high-frequency directional subbands. Compared to related technologies where the number of directional decomposition layers in the directional filter bank of the transform algorithm is fixed and only supports proportional directional division (such as 2 directions in the first layer, 4 directions in the second layer, etc.), this fixed decomposition structure cannot adapt to the artificial texture features of cloud computer images. The preset transformation algorithm in this application embodiment, also known as the High Low Frequency Sub (HLFS) transformation algorithm, uses a configurable directional filter bank for the high frequency subband based on LP decomposition. It supports different levels of custom direction numbers (such as 4 directions in the first layer and 4 directions in the second layer) to achieve fine directional decomposition of the high frequency subband. When facing the cloud computer image to be embedded, the decomposition granularity can be adaptively adjusted according to the edge direction distribution of the cloud computer image to achieve multi-directional fine decomposition of artificial textures such as text edges and icon lines. This provides richer high frequency directional subbands for subsequent watermark embedding and makes it easier to determine the target high frequency directional subband suitable for watermark embedding.
[0098] In some exemplary embodiments, S103, based on the transform domain features of multiple image blocks, obtaining a watermarked image by embedding watermark information into the target low-frequency subband of a first number of first image blocks and the target high-frequency directional subband of a second number of second image blocks, may include: S1031, Based on the transform domain features of multiple image blocks, determine the sub-band feature parameters of multiple image blocks, wherein the sub-band feature parameters include: statistical parameters of low-frequency sub-bands and statistical parameters of multiple high-frequency direction sub-bands, and the statistical parameters include one or more of the following: sub-band coefficient mean, sub-band coefficient variance, and sub-band coefficient energy. S1032, Determine the first embedding parameter based on the statistical parameters of the target low-frequency subband; S1033, using the first embedding parameters and the first watermark embedding algorithm, embed the watermark information into the target low-frequency sub-band to obtain the first result; S1034, Determine the second embedding parameter based on the statistical parameters of the target high-frequency directional subband; S1035, using the second embedding parameters and the second watermark embedding algorithm, the watermark information is embedded into the target high-frequency direction sub-band to obtain the second result; S1036, Based on the first result and the second result, determine the image containing the watermark.
[0099] Among them, the average sub-band coefficient It reflects the overall level of the subband coefficient within the subband, representing the average energy intensity of the subband, and is used to determine the basic brightness or texture intensity of the subband.
[0100] As an example, for each sub-band (such as a low-frequency sub-band or a high-frequency directional sub-band) of each image block, the mean sub-band coefficient of that sub-band is calculated using equation (1). .
[0101] Equation (1); in, This represents the mean of the sub-band coefficients. Let N be the i-th subband coefficient, and N be the total number of subband coefficients within the subband.
[0102] Among them, the variance of the subband coefficients reflects the degree of dispersion of each subband coefficient relative to the mean of the subband coefficients, representing the texture complexity or richness of detail of that subband. The larger the variance of the subband coefficients, the more complex the texture of that subband.
[0103] As an example, for each subband (such as a low-frequency subband or a high-frequency directional subband) of each image block, the subband coefficient variance of that subband is calculated using equation (2). .
[0104] Equation (2); in, It is the variance of the sub-band coefficients. Let N be the coefficient of the i-th subband, and N be the total number of subband coefficients within the subband. This represents the mean of the sub-band coefficients.
[0105] The subband coefficient energy reflects the total energy intensity of the subband coefficients within a subband, representing the contribution of that subband to the visual effect of the image. The higher the subband coefficient energy, the greater the visual impact of that subband.
[0106] As an example, for each sub-band of each image block (such as a low-frequency sub-band or a high-frequency directional sub-band), the sub-band coefficient energy E of that sub-band is calculated by Equation (3).
[0107] Equation (3); Where E represents the subband coefficient energy. Let N be the i-th subband coefficient, and N be the total number of subband coefficients within the subband.
[0108] In some exemplary embodiments, after determining the sub-band feature parameters of multiple image blocks based on their transform domain features in S1031, the watermark embedding method further includes: S1037, Based on the sub-band feature parameters, determine the target low-frequency sub-band from the low-frequency sub-bands of the first number of first image blocks; S1038, Based on the sub-band feature parameters, determine the target high-frequency direction sub-band from the multiple high-frequency direction sub-bands corresponding to the second number of second image blocks.
[0109] The subband characteristic parameters include: statistical parameters of low-frequency subbands and statistical parameters of multiple high-frequency direction subbands. The statistical parameters include one or more of the following: subband coefficient mean, subband coefficient variance, and subband coefficient energy.
[0110] In some exemplary embodiments, S1037, determining the target low-frequency sub-band from the low-frequency sub-bands of a first number of first image blocks based on sub-band feature parameters may include: For a first number of first image blocks, the embedding position weight of the low-frequency sub-band of each first image block is determined based on the sub-band coefficient variance and sub-band coefficient energy in the statistical parameters of the low-frequency sub-band. The target low-frequency subband is determined from the low-frequency subbands of the first number of first image blocks based on the embedding position weights of the low-frequency subbands of the first number of first image blocks.
[0111] In some exemplary embodiments, S1038, determining the target high-frequency direction subband from the plurality of high-frequency direction subbands corresponding to each of the second number of second image blocks based on subband feature parameters, may include: For the second number of second image blocks, the embedding position weights of multiple high-frequency directional sub-bands in each second image block are determined based on the sub-band coefficient variance and sub-band coefficient energy in the statistical parameters of the high-frequency directional sub-bands. Based on the embedding position weights of multiple high-frequency directional subbands of a second number of second image blocks, the target high-frequency directional subband is determined from the multiple high-frequency directional subbands corresponding to each of the second number of second image blocks.
[0112] As an example, the embedding position weights of each sub-band (such as low-frequency sub-band and high-frequency directional sub-band) are calculated using Equation (4).
[0113] (4); in, Indicates the embedding position weight. Here, E represents the subband coefficient energy, which is a preset weighting factor. This represents the maximum value among all subband coefficient energies. It is the minimum value among all subband coefficient energies. The variance of the subband coefficients. It is the maximum value among the variances of the coefficients of all sub-bands.
[0114] Among them, the weighting coefficient This is used to adjust the contribution of subband coefficient energy and subband coefficient variance to the embedding location weights. The value range can be: For example, set to =0.5.
[0115] As an example, the target low-frequency subband is the embedding location weight. Greater than the preset position threshold The low-frequency subband.
[0116] As an example, when embedding position weights Greater than the preset position threshold When there are multiple low-frequency subbands, the embedding position weights can be selected. The largest low-frequency sub-band is taken as the target low-frequency sub-band.
[0117] As an example, the target high-frequency directional subband is the embedding position weight. Greater than the preset position threshold The high-frequency directional subband.
[0118] As an example, when embedding position weights Greater than the preset position threshold When there are multiple high-frequency directional subbands, the embedding position weights can be selected. The highest high-frequency directional subband is taken as the target high-frequency directional subband.
[0119] In some other exemplary embodiments, S1037, determining the target low-frequency subband from the low-frequency subbands of a first number of first image blocks based on subband feature parameters, may include: For a first number of first image blocks, the visual sensitivity weight of the low-frequency sub-band of each first image block is determined based on the mean, variance and energy of the sub-band coefficients of the low-frequency sub-band. The target low-frequency sub-band is determined from the low-frequency sub-band of the first number of first image blocks based on the visual sensitivity weight of the low-frequency sub-band of the first number of first image blocks.
[0120] Among them, the subband coefficient energy of the low-frequency subband This reflects the total energy of the subband coefficients of the low-frequency subband; the higher the energy, the greater the visual impact.
[0121] Among them, the variance of the subband coefficients of the low-frequency subband It reflects the texture complexity of the low-frequency subband; the smaller the variance, the smoother the region.
[0122] Among them, the average subband coefficient of the low-frequency subband This reflects the average brightness or energy level of the low-frequency subband.
[0123] As an example, for each low-frequency sub-band in the first number of low-frequency sub-bands of the first image block, the visual sensitivity weight of that low-frequency sub-band is calculated using Equation (5). .
[0124] (5); in, This represents the visual sensitivity weight for the low-frequency sub-band. , , The preset weighting coefficients, , The subband coefficient energy of this low-frequency subband. It is the global maximum low-frequency energy (i.e., the maximum value of the subband coefficient energy of the low-frequency subband of all image patches). This represents the variance of the subband coefficients for the low-frequency subband. It is the global maximum low-frequency variance (i.e., the maximum value among the sub-band coefficient variances of the low-frequency sub-bands of all image patches). This represents the average subband coefficient of the low-frequency subband. It is the global low-frequency mean (i.e., the average of the sub-band coefficients of the low-frequency sub-bands of all image patches).
[0125] In some exemplary embodiments, determining a target low-frequency subband from the low-frequency subbands of a first number of first image patches based on the visual sensitivity weights of the low-frequency subbands of the first number of first image patches may include: determining the target low-frequency subband based on the visual sensitivity weights of the low-frequency subbands of the first number of first image patches. Visual sensitivity weights are applied from the low-frequency subband of the first image patch of the first quantity. Less than the preset low-frequency visual sensitivity threshold The low-frequency sub-band is identified as the target low-frequency sub-band.
[0126] As an example, the target low-frequency subband can be used as a visual sensitivity weight. Less than the preset low-frequency visual sensitivity threshold The low-frequency sub-bands. Thus, by selecting the low-frequency sub-bands with the least visual impact from the first number of low-frequency sub-bands in the first image block as the target low-frequency sub-bands for embedding watermark information, it can be ensured that the embedding does not affect the visual effect.
[0127] In other exemplary embodiments, determining a target low-frequency subband from the low-frequency subbands of a first number of first image blocks based on visual sensitivity weights of the low-frequency subbands of the first number of first image blocks may include: from the low-frequency subbands of the first number of first image blocks, assigning visual sensitivity weights... Less than the preset low-frequency visual sensitivity threshold The low-frequency subbands are selected as candidate low-frequency subbands; the subband coefficient energy of the candidate low-frequency subbands is... Greater than the preset energy threshold The low-frequency sub-band is identified as the target low-frequency sub-band.
[0128] As an example, the target low-frequency subband can be used as a visual sensitivity weight. Less than the preset low-frequency visual sensitivity threshold And subband coefficient energy Greater than the preset energy threshold The low-frequency sub-bands are selected. Based on the statistical parameters of the low-frequency sub-bands (such as the mean, variance, and energy of the sub-band coefficients), low-frequency sub-bands with higher energy and less visual impact (such as the area containing text on a cloud computer) are selected from the first number of low-frequency sub-bands in the first image block as the target low-frequency sub-bands for embedding watermark information. This ensures that the embedding does not affect the overall image structure and visual effect. For example, the Quantization Index Modulation (QIM) method can be used to embed watermark information in the target low-frequency sub-bands. Thus, by adjusting the quantization step size of the coefficient values, the watermark information is embedded into the low-frequency coefficients, ensuring that the embedding does not affect the overall image structure and visual effect.
[0129] In some further exemplary embodiments, determining a target low-frequency subband from the low-frequency subbands of a first number of first image blocks based on the visual sensitivity weights of the low-frequency subbands of the first number of first image blocks may include: from the low-frequency subbands of the first number of first image blocks, assigning visual sensitivity weights... Less than the preset low-frequency visual sensitivity threshold The low-frequency sub-bands are selected as candidate low-frequency sub-bands; it is determined whether the candidate low-frequency sub-bands contain text regions; if the candidate low-frequency sub-bands contain text regions, the variance of the sub-band coefficients in the candidate low-frequency sub-bands is calculated. Less than the preset text variance threshold The low-frequency sub-band is identified as the target low-frequency sub-band.
[0130] As an example, the target low-frequency subband can be used as a visual sensitivity weight. Less than the preset low-frequency visual sensitivity threshold And the variance of the sub-band coefficients Less than the preset text variance threshold The low-frequency sub-band. Thus, for the area where the text is located on the cloud computer, by selecting the low-frequency sub-band that has less impact on the visual and textual aspects, and embedding the watermark information as the target low-frequency sub-band, we can ensure that the text edges are smooth and avoid affecting the readability of the text after embedding.
[0131] In some other exemplary embodiments, S1038, determining the target high-frequency direction subband from the plurality of high-frequency direction subbands corresponding to each of the second number of second image blocks based on subband feature parameters, may include: For the second number of second image blocks, the texture complexity weights of multiple high-frequency directional sub-bands of each second image block are determined based on the sub-band coefficient variance and sub-band coefficient energy in the statistical parameters of the high-frequency directional sub-bands. Based on the texture complexity weights of multiple high-frequency directional subbands of the second number of second image blocks, the target high-frequency directional subband is determined from the multiple high-frequency directional subbands corresponding to each of the second number of second image blocks.
[0132] In some further exemplary embodiments, S1038, determining the target high-frequency direction subband from the plurality of high-frequency direction subbands corresponding to each of the second number of second image blocks based on subband feature parameters, may include: For the second number of second image blocks, the texture complexity weights of multiple high-frequency directional sub-bands of each second image block are determined based on the sub-band coefficient variance and sub-band coefficient energy in the statistical parameters of the high-frequency directional sub-bands. For the second number of second image blocks, the visual sensitivity weights of multiple high-frequency directional sub-bands for each second image block are determined based on the mean and variance of the sub-band coefficients in the statistical parameters of the high-frequency directional sub-bands. Based on the texture complexity weights and visual sensitivity weights of the multiple high-frequency directional subbands of the second number of second image blocks, the target high-frequency directional subband is determined from the multiple high-frequency directional subbands corresponding to each of the second number of second image blocks.
[0133] Among them, the subband coefficient energy of the high-frequency directional subband This reflects the total energy of the subband coefficient in the high-frequency direction subband; the higher the energy, the greater the visual impact.
[0134] Among them, the variance of the subband coefficient of the high-frequency directional subband It reflects the texture complexity of the high-frequency directional subband; the smaller the variance, the smoother the region.
[0135] Among them, the average subband coefficient of the high-frequency directional subband It reflects the average brightness or energy level of the high-frequency directional subband.
[0136] In some exemplary embodiments, determining the target high-frequency directional subband from the multiple high-frequency directional subbands corresponding to each of the second number of second image patches based on the texture complexity weights of the multiple high-frequency directional subbands of the second number of second image patches may include: determining the target high-frequency directional subband based on the texture complexity weights of the multiple high-frequency directional subbands of the second number of second image patches. From the multiple high-frequency directional subbands corresponding to the second number of second image patches, the texture complexity weights are... Greater than the preset high-frequency texture complexity threshold The high-frequency directional sub-band is identified as the target high-frequency directional sub-band.
[0137] As an example, the target high-frequency directional subband can be used as a texture complexity weight. Greater than the preset high-frequency texture complexity threshold The high-frequency directional sub-bands. Thus, by selecting high-frequency directional sub-bands with rich texture details from the multiple high-frequency directional sub-bands corresponding to the second number of second image blocks as the target high-frequency directional sub-bands for embedding watermark information, it can be ensured that the embedding does not affect the visual effect.
[0138] As an example, for each of the multiple high-frequency directional subbands in the second number of second image blocks, the variance of the subband coefficients is based on the statistical parameters of the high-frequency directional subbands. Sub-band coefficient energy The texture complexity weight of the high-frequency directional subband is calculated using equation (6). .
[0139] (6); in, The texture complexity weights for the high-frequency directional subbands. This represents the variance of the subband coefficients in this high-frequency direction. It is the global maximum high-frequency variance (i.e., the maximum value among the sub-band coefficient variances of the high-frequency direction sub-bands of all image patches). Let be the subband coefficient energy of the subband in this high-frequency direction. It is the global maximum high-frequency energy (i.e., the maximum value of the subband coefficient energy of the high-frequency direction subband of all image blocks).
[0140] In some exemplary embodiments, determining the target high-frequency directional subband from the multiple high-frequency directional subbands corresponding to each of the second number of second image patches based on the texture complexity weights and visual sensitivity weights of the multiple high-frequency directional subbands of the second number of second image patches may include: determining the target high-frequency directional subband based on the texture complexity weights of the multiple high-frequency directional subbands of the second number of second image patches. From the multiple high-frequency directional subbands corresponding to the second number of second image patches, the texture complexity weights are... Greater than the preset high-frequency texture complexity threshold The high-frequency directional sub-bands are identified as candidate high-frequency directional sub-bands; the visual sensitivity weights in the candidate high-frequency directional sub-bands are then... Less than the preset high-frequency visual sensitivity threshold The high-frequency directional sub-band is identified as the target high-frequency directional sub-band.
[0141] As an example, the target high-frequency directional subband can be used as a texture complexity weight. Greater than the preset high-frequency texture complexity threshold And visual sensitivity weight Less than the preset high-frequency visual sensitivity threshold The high-frequency directional sub-bands. Thus, from the multiple high-frequency directional sub-bands corresponding to the second number of second image blocks, the high-frequency directional sub-bands in areas with rich texture details and insensitive to the human eye (such as non-text areas of cloud computers, icon edges, etc.) are selected as the target high-frequency directional sub-bands for embedding watermark information, which can ensure that the overall structure and visual effect of the image are not affected after embedding.
[0142] As an example, for each of the multiple high-frequency directional subbands in the second number of second image blocks, the mean of the subband coefficients in the statistical parameters of the high-frequency directional subbands are considered. and sub-band coefficient variance The visual sensitivity weight of the high-frequency directional sub-band is calculated using equation (7). .
[0143] (7); in, For the visual sensitivity weights of the high-frequency directional sub-bands, This represents the average subband coefficient of the subband in this high-frequency direction. It is the global high-frequency mean (i.e., the average of the sub-band coefficients of the high-frequency direction sub-bands of all image patches). This is the direction sensitivity coefficient (the closer the edge direction is to horizontal or vertical, the higher the sensitivity coefficient). The smaller the size, the less sensitive the human eye is to it. The variance of the subband coefficients in the high-frequency direction subband. It is the global maximum high-frequency variance (i.e., the maximum value among the subband coefficient variances of the high-frequency direction subbands of all image patches).
[0144] The first watermark embedding algorithm can refer to a watermark embedding algorithm that can embed watermark information into low-frequency coefficients. For example, the first watermark embedding algorithm can use the Quantization Index Modulation (QIM) method. In this way, by adjusting the quantization step size of the low-frequency coefficients, the watermark information is embedded, ensuring that the watermark embedding does not affect the overall structure and visual effect of the image.
[0145] In some exemplary embodiments, the first watermark embedding algorithm is a quantization index modulation (QIM) method, and the first embedding parameter is the quantization step size Δ. Therefore, in S1032, determining the first embedding parameter based on the statistical parameters of the target low-frequency subband may include: Based on the mean, variance, and energy of the sub-band coefficients of the target low-frequency sub-band, the visual sensitivity weights of the target low-frequency sub-band are determined. ; Subband coefficient variance, subband coefficient energy, and visual sensitivity weight based on the target low-frequency subband. The quantization step size Δ is determined by using the preset base quantization step size as the first embedding parameter.
[0146] Thus, in this embodiment of the application, the quantization step size of the target low-frequency sub-band is determined as the first embedding parameter by using the statistical parameters of the target low-frequency sub-band. This can avoid the image quality being affected by an excessively high quantization step size, or the watermark being easily attacked and destroyed due to an excessively low quantization step size.
[0147] As an example, based on the mean, variance, and energy of the subband coefficients of the target low-frequency subband, the visual sensitivity weight of the target low-frequency subband is determined using equation (**). .
[0148] As an example, the subband coefficient variance, subband coefficient energy, and visual sensitivity weight are based on the target low-frequency subband. The quantization step size Δ is calculated using Equation (8) and the preset base quantization step size, and is used as the first embedding parameter.
[0149] (8); in, To quantize the step size, The preset base quantization step size, The variance of the subband coefficients for the target low-frequency subband. Let E be the global maximum variance (i.e., the maximum value among the subband coefficient variances of all image patches), and let E represent the subband coefficient energy of the target low-frequency subband. It is the global maximum energy (i.e., the maximum value among the sub-band coefficient energies of all image patches). The visual sensitivity weights for the target low-frequency subband.
[0150] Thus, the simpler the texture of the target low-frequency subband ( The smaller the value, the higher the energy (E), and the lower the visual sensitivity. The smaller the size, the larger the quantization step size, and the higher the watermark embedding capacity. The more complex the texture (…), the higher the watermark embedding capacity. The larger the value, the lower the energy (E), and the higher the visual sensitivity. The larger the value, the smaller the quantization step size, ensuring visual invisibility.
[0151] The second watermark embedding algorithm can refer to a watermark embedding algorithm that can embed watermark information into high-frequency coefficients. For example, the second watermark embedding algorithm can adopt a spectral spread (SS) based watermark embedding algorithm. In this way, the watermark information and high-frequency coefficients are fused by spectral spread (FSS), which improves the invisibility and anti-attack capability of the watermark.
[0152] In some exemplary embodiments, the second watermark embedding algorithm is a spectral spread (SS) based watermark embedding algorithm, and the second embedding parameter is the embedding strength. Then, in S1034, determining the second embedding parameter based on the statistical parameters of the target high-frequency direction sub-band may include: determining the embedding strength based on the mean sub-band coefficient, sub-band coefficient energy, and preset basic embedding strength of the target high-frequency direction sub-band. This serves as the second embedding parameter. Thus, in this embodiment, by determining the embedding parameters of the target high-frequency directional sub-band using statistical parameters, it is possible to avoid image quality being affected by excessively high embedding strength, or to avoid watermarks being easily attacked and destroyed due to excessively low embedding strength.
[0153] As an example, based on the mean subband coefficient, subband coefficient energy, and preset basic embedding strength of the target high-frequency subband, the embedding strength is calculated using equation (9). , as the second embedding parameter.
[0154] (9); in, The embedding intensity of the target high-frequency direction subband. The preset base embedding strength (used to control the embedding strength level). The mean of the subband coefficients in the target high-frequency direction subband. It is the global brightness mean (i.e., the average of the pixel mean of all image blocks or the average of the sub-band coefficient mean of all image blocks). Here, E represents the global maximum brightness (i.e., the maximum value among the average pixel values of all image blocks or the maximum value among the average subband coefficients of all image blocks), and E represents the subband coefficient energy of the target high-frequency direction subband. It is the global maximum energy (i.e., the maximum value among the subband coefficient energies of all image patches).
[0155] In some exemplary embodiments, S1036, determining the watermarked image based on the first result and the second result may include: Based on the first and second results, and the other sub-bands in the transform domain features of multiple image blocks other than the target low-frequency sub-band and the target high-frequency direction sub-band, the watermarked image is determined through inverse transform processing.
[0156] Inverse transformation processing refers to the inverse processing corresponding to the transformation processing, such as the processing from the frequency domain to the spatial domain. For example, taking a transformation processing that uses a preset transformation algorithm, which includes a Laplace pyramid and a configurable directional filter bank, as an example, inverse transformation processing can include: performing an inverse multi-directional filter bank transformation based on a pre-configured number of directions of the configurable directional filter bank, and performing an inverse Laplace pyramid transformation based on a preset number of scale decomposition layers of the Laplace pyramid.
[0157] In some exemplary embodiments, S103, based on the transform domain features of multiple image blocks, a watermarked image is obtained by embedding watermark information into the target low-frequency subband of a first number of first image blocks and the target high-frequency directional subband of a second number of second image blocks, including: Based on the transform domain features of multiple image blocks, the image to be evaluated is obtained by embedding watermark information into the target low-frequency subband of a first number of first image blocks and the target high-frequency directional subband of a second number of second image blocks. Perform image quality assessment on the image to be evaluated to obtain the image quality parameters of the image to be evaluated; Based on the image quality parameters of the image to be evaluated, the embedding parameters are adjusted, and the watermark information is re-embedded into the target low-frequency sub-band and the target high-frequency direction sub-band with the adjusted embedding parameters to obtain the adjusted image. This process continues until the preset termination condition is met, and the adjusted image is determined to be the watermarked image.
[0158] As an example, the preset termination condition can be satisfying a preset number of iterations, or it can refer to the image quality parameters of the image to be evaluated satisfying a preset image quality threshold. Of course, other conditions are also possible, but this embodiment of the application does not limit the specific conditions.
[0159] In some exemplary embodiments, based on the image quality parameters of the image to be evaluated, the embedding parameters are adjusted, and the watermark information is re-embedded into the target low-frequency sub-band and the target high-frequency directional sub-band using the adjusted embedding parameters to obtain an adjusted image. This process continues until a preset termination condition is met, and the adjusted image is determined to be a watermarked image. Based on the image quality parameters of the image to be evaluated, the preset image quality target value, and the preset adjustment coefficient, the embedding parameters corresponding to the image to be evaluated are adjusted to obtain the adjusted embedding parameters. With the adjusted embedding parameters, the watermark information is re-embedded into the target low-frequency sub-band and the target high-frequency direction sub-band to obtain the adjusted image. This process continues until the preset termination condition is met, at which point the adjusted image is determined to be the watermarked image.
[0160] Thus, in this embodiment of the application, by calculating the image quality parameters of the image to be evaluated in real time during the watermark embedding process, and optimizing the embedding parameters based on the image quality parameters of the image to be evaluated to re-embed the watermark, the balance between the invisibility and robustness of the watermark can be guaranteed.
[0161] In some exemplary embodiments, performing image quality assessment on the image to be evaluated to obtain image quality parameters of the image to be evaluated may include: calculating the image quality parameters of the image to be evaluated using a preset image quality assessment algorithm.
[0162] In some exemplary embodiments, the image quality assessment algorithm may include one or more of the following: Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity (SSIM). Correspondingly, the image quality parameters of the image to be evaluated may include one or more of the following: PSNR value and structural similarity value.
[0163] PSNR is a metric for measuring image quality. It assesses the visual perception quality of an image by comparing the mean squared error (MSE) between the image to be evaluated (the image with the watermark embedded) and the original image to be watermarked. A higher PSNR value indicates less distortion, meaning the image to be evaluated (the image with the watermark embedded) better conforms to the visual characteristics of the human eye, i.e., the watermark embedding effect is better. The PSNR value typically ranges from 10 dB to 50 dB.
[0164] SSIM is also a metric for measuring image quality. It assesses the visual perception quality of an image by comparing the similarity between the image to be evaluated (the image with the watermark embedded) and the original image to be watermarked. The closer the SSIM value is to 1, the more similar the image structures are, the less distortion, and the more the image to be evaluated (the image with the watermark embedded) conforms to the visual characteristics of the human eye, meaning the watermark embedding effect is better. The SSIM value typically ranges from [0, 1].
[0165] In other exemplary embodiments, the image quality assessment algorithm may also employ Multi-Scale Structural Similarity Index (MS-SSIM). MS-SSIM is a structural similarity index that considers information from multiple scales when calculating image similarity. The value of MS-SSIM ranges from 0 to 1; a value closer to 1 indicates a higher similarity between the assessment image (the image with the watermark embedded) and the original image to be watermarked, and thus better image quality.
[0166] In some exemplary embodiments, adjusting the embedding parameters based on the image quality parameters of the image to be evaluated may include: If the image quality parameters of the image to be evaluated meet one or more of the following conditions: the peak signal-to-noise ratio of the image to be evaluated is less than the preset first image quality target value, and the structural similarity value of the image to be evaluated is less than the preset second image quality target value, then the embedding parameters (such as quantization step size and embedding strength) are reduced and re-embedded to improve the visual quality. Thus, the balance between the invisibility and robustness of the watermark can be effectively improved.
[0167] In other exemplary embodiments, adjusting the embedding parameters based on the image quality parameters of the image to be evaluated may include: If the peak signal-to-noise ratio of the image to be evaluated is not less than the preset first image quality target value, and the structural similarity value of the image to be evaluated is not less than the preset second image quality target value, then the embedding parameters (such as quantization step size and embedding strength) can be appropriately increased to re-embed and improve robustness. In this way, the balance between the invisibility and robustness of the watermark can be effectively improved.
[0168] As an example, a preset first evaluation threshold is used. It can be 42dB. Preset second evaluation threshold. It can be 0.85.
[0169] In some exemplary embodiments, the embedding parameters include the quantization step size corresponding to the target low-frequency sub-band and the embedding intensity corresponding to the target high-frequency directional sub-band. Then, based on the image quality parameters of the image to be evaluated, the preset image quality target value, and the preset adjustment coefficient, the embedding parameters corresponding to the image to be evaluated are adjusted to obtain the adjusted embedding parameters, which may include one or more of the following: Based on the image quality parameters of the image to be evaluated, the preset image quality target value and the preset adjustment coefficient, the quantization step size corresponding to the target low-frequency sub-band is adjusted by Equation (10) to obtain the adjusted quantization step size. Based on the image quality parameters of the image to be evaluated, the preset image quality target value, and the preset adjustment coefficient, the embedding intensity corresponding to the high-frequency direction subband of the target is adjusted by Equation (11) to obtain the adjusted embedding intensity.
[0170] (10); in, The adjusted quantization step size, This is the quantization step size for the current iteration. , These are preset adjustment coefficients used to control the adjustment weights of image quality parameters. , For The PSNR value after embedding the watermark at the quantization step size. The first image quality target value is preset (e.g., 42dB). For The SSIM value after embedding the watermark is the quantization step size. Set a preset second image quality target value (e.g., 0.85).
[0171] For example, if < or < Based on equation (10), the quantization step size Δ corresponding to the target low-frequency subband can be appropriately reduced (reducing the embedding intensity) to improve visual quality. Alternatively, if ≥ and ≥ Based on equation (10), the quantization step size can be appropriately increased to improve the robustness of the watermark.
[0172] (11); in, For the adjusted embedding strength, The embedding strength for the current iteration. , These are preset adjustment coefficients used to control the adjustment weights of image quality parameters. , For The PSNR value after embedding the watermark is the embedding strength. The first image quality target value is preset (e.g., 42dB). For The SSIM value after embedding the watermark is the embedding strength. Set a preset second image quality target value (e.g., 0.85).
[0173] For example, if < or < Based on equation (11), the embedding strength can be appropriately reduced to improve visual quality. Or, if ≥ and ≥ Based on equation (11), the embedding strength can be appropriately increased to improve the robustness of the watermark.
[0174] Thus, in this embodiment, both PSNR and SSIM metrics are combined to comprehensively evaluate the quality of the image to be evaluated (the image with the embedded watermark), providing guidance for adjusting the embedding parameters and ensuring an effective balance between the watermark's invisibility and robustness. This results in a watermarked image with better embedding performance.
[0175] In other exemplary embodiments, based on the image quality parameters of the image to be evaluated, the embedding parameters are adjusted, and the watermark information is re-embedded into the target low-frequency sub-band and the target high-frequency directional sub-band using the adjusted embedding parameters to obtain an adjusted image. This process continues until a preset termination condition is met, at which point the adjusted image is determined to be a watermarked image, including: Determine whether the image quality parameters of the image to be evaluated meet the preset quality conditions; If the image quality parameters of the image to be evaluated do not meet the preset quality conditions, the embedding parameters are adjusted, and the watermark information is re-embedded into the target low-frequency sub-band and the target high-frequency direction sub-band with the adjusted embedding parameters to obtain the adjusted image. This process continues until the image quality parameters of the adjusted image meet the preset quality conditions, at which point the adjusted image is determined to be a watermarked image.
[0176] The preset quality conditions are used to indicate the degree of watermark invisibility.
[0177] In some exemplary embodiments, taking the image quality parameters of the image to be evaluated as including peak signal-to-noise ratio (PSNR) and structural similarity value as an example, determining whether the quality parameters of the image to be evaluated meet preset quality conditions may include: Determine whether the peak signal-to-noise ratio of the image to be evaluated is less than a preset first evaluation threshold and whether the structural similarity value of the image to be evaluated is less than a preset second evaluation threshold; If the image quality parameters of the image to be evaluated meet one or more of the following conditions: the peak signal-to-noise ratio of the image to be evaluated is less than the preset first evaluation threshold, and the structural similarity value of the image to be evaluated is less than the preset second evaluation threshold, then the image quality parameters of the image to be evaluated do not meet the preset quality conditions. If the peak signal-to-noise ratio of the image to be evaluated is not less than the preset first evaluation threshold, and the structural similarity value of the image to be evaluated is not less than the preset second evaluation threshold, then the image quality parameters of the image to be evaluated are determined to meet the preset quality conditions.
[0178] As an example, the preset first evaluation threshold can be 42dB. The preset second evaluation threshold can be 0.85. For instance, if the PSNR value of the image to be evaluated is not less than 42dB and the SSIM value is not less than 0.85, the image quality parameters of the image to be evaluated are determined to meet the preset quality conditions, and no adjustment of the embedding parameters is required. Conversely, if the PSNR value of the image to be evaluated is less than 42dB and the SSIM value is less than 0.85, the image quality parameters of the image to be evaluated are determined to not meet the preset quality conditions, and the embedding parameters need to be adjusted.
[0179] Thus, in this embodiment of the application, by calculating in real time whether the image quality parameters of the image to be evaluated meet the preset quality conditions during the watermark embedding process, the embedding parameters are optimized and the watermark is re-embedded, thereby ensuring the invisibility of the watermark.
[0180] In some exemplary embodiments, before performing dynamic block segmentation on the image to be embedded with the watermark in S101 to obtain multiple image blocks, the watermark embedding method may further include: The original image is preprocessed to obtain the image to be embedded with the watermark. The preprocessing includes one or more of the following: adjusting the brightness of the original image to a preset brightness, adjusting the contrast of the original image to a preset contrast, and converting the format of the original image to a preset format.
[0181] As an example, the original image can be a still image, or a video image from a video or video stream.
[0182] As an example, converting the format of the original image to a preset format can include: uniformly converting the original image (such as a cloud desktop image) to RGB format.
[0183] In some exemplary embodiments, before performing dynamic block segmentation on the image to be embedded with the watermark in S101 to obtain multiple image blocks, the watermark embedding method may further include: The original watermark information is encrypted to obtain the watermark information.
[0184] In some exemplary embodiments, before performing dynamic block segmentation on the image to be embedded with the watermark in S101 to obtain multiple image blocks, the watermark embedding method may further include: Perform a hash operation on the original watermark information to obtain the watermark identifier; The watermark identifier is encrypted using a preset encryption algorithm to obtain an encrypted watermark identifier. The encrypted watermark identifier is encoded to obtain the watermark information to be embedded.
[0185] As an example, a secure hash algorithm (SHA), such as the SHA-256 hash function, can be used to perform a hash operation on the original watermark information to generate a unique watermark identifier.
[0186] As an example, the watermark identifier can be encrypted using an Advanced Encryption Standard (AES), such as the AES-256 encryption algorithm, to generate the watermark information to be embedded. This enhances the security of the watermark information.
[0187] As an example, the encrypted watermark identifier can be encoded as a binary sequence as the watermark information to be embedded. This makes it easy to embed watermarks in both high-frequency and low-frequency coefficients.
[0188] Figure 2 This is a flowchart illustrating a watermark extraction method provided in an embodiment of this application. The following will be combined with... Figure 2 This will be explained in more detail. For example, the entity performing the watermark extraction can be a watermark extraction device, which can be implemented using one or more methods, such as software and hardware. For example, the device can be integrated into a cloud computer server device or a cloud mobile client device.
[0189] like Figure 2 As shown, the watermark extraction method may include: S201, the watermark image to be extracted is divided into blocks to obtain multiple watermark image blocks, wherein the multiple watermark image blocks include: a third number of first watermark image blocks and a fourth number of second watermark image blocks, and the target feature parameters of the first watermark image blocks and the second watermark image blocks are different. S202, perform transformation processing on multiple watermark image blocks respectively to obtain the transform domain features of multiple watermark image blocks, wherein the transform domain features include: low frequency sub-band and multiple high frequency directional sub-bands; S203, based on the transform domain features of multiple watermarked image blocks, watermark information is obtained by extracting the target low-frequency sub-band of the third number of first watermarked image blocks and the target high-frequency directional sub-band of the fourth number of second watermarked image blocks.
[0190] Thus, in this embodiment, during watermark embedding, the image to be watermarked is divided into multiple image blocks based on the target feature parameters. These multiple image blocks include first and second image blocks with different target feature parameters. Each image block is then transformed to obtain its transform domain features. These transform domain features include a low-frequency sub-band and multiple high-frequency directional sub-bands, facilitating the embedding of watermark information in the transform domain. Next, based on the transform domain features of the multiple image blocks, the watermark information is embedded into the target low-frequency sub-band of a first number of first image blocks and the target high-frequency directional sub-band of a second number of second image blocks, resulting in a watermarked image (i.e., an image with a blind watermark). Therefore, when watermark extraction is required, the watermarked image to be extracted can be dynamically divided into multiple watermarked image blocks based on the target feature parameters. Each watermarked image block is then transformed to obtain its transform domain features, ensuring that the obtained transform domain features are consistent with those obtained during embedding, providing an accurate data foundation for subsequent watermark extraction. Next, based on the transform domain features of multiple watermarked image blocks, watermark information is extracted by performing watermark extraction on the target low-frequency sub-band of the third number of first watermarked image blocks and the target high-frequency directional sub-band of the fourth number of second watermarked image blocks. This allows for watermark information extraction without relying on the original image data, thus improving watermark extraction efficiency.
[0191] In some exemplary embodiments, before S201, the watermark extraction method may further include: determining whether watermark information exists in the watermark image to be extracted by using a feature detection algorithm.
[0192] In some exemplary embodiments, determining whether a watermark image to be extracted contains watermark information using a feature detection algorithm may include: Input the watermark image to be extracted into a pre-trained detection model to obtain the detection results; Based on the detection results, it is determined whether the watermark image to be extracted contains watermark information.
[0193] As an example, the pre-trained detection model is obtained by training a convolutional neural network on a sample dataset. The sample dataset includes multiple sample data sets, each containing positive sample data and its corresponding negative sample data. The negative sample data consists of images without watermarks to be embedded (such as cloud desktop images), while the positive sample data consists of watermarked images obtained by embedding watermarks into the negative sample data using one or more watermark embedding methods described in this embodiment. In this way, the neural network can be trained to learn the high-frequency perturbation features introduced by the watermark information in the watermarked images using one or more watermark embedding methods described in this embodiment.
[0194] As an example, a pre-trained detection model includes: an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer.
[0195] As an example, determining whether a watermark image to be extracted contains watermark information based on the detection results can include: determining whether the watermark image to be extracted contains watermark information based on whether the detection result is greater than a preset probability value. For example, if the probability of the "watermark exists" category output by the output layer is >0.7, then it is determined that a blind watermark embedded by a cloud computer exists in the watermark image to be extracted.
[0196] In some exemplary embodiments, determining whether a watermark image to be extracted contains watermark information based on the detection result may include: If the detection result is greater than the preset probability value, extract the SIFT feature points of the high-frequency sub-band or high-frequency directional sub-band of the watermark image to be extracted. Match SIFT feature points with pre-stored watermark template feature points; If the number of matched feature points is greater than the preset feature point threshold (e.g., 20), then it is determined that the watermark image to be extracted contains watermark information.
[0197] Scale-Invariant Feature Transform (SIFT) is a descriptor used in image processing. This descriptor is scale-invariant and can detect feature points in images, making it a local feature descriptor-based image matching and detection method.
[0198] In this way, by verifying the watermark detection results of the pre-trained detection model through feature matching, misjudgment by the detection model can be avoided, thereby improving the accuracy of blind watermark detection.
[0199] In some exemplary embodiments, S203, based on the transform domain features of multiple watermark image blocks, watermark extraction is performed on the target low-frequency sub-band of a third number of first watermark image blocks and the target high-frequency directional sub-band of a fourth number of second watermark image blocks to obtain the extracted watermark information, which may include: Based on the watermarked image to be extracted and its corresponding original image, the attack parameters of each watermarked image block are calculated using a SIFT-based matching algorithm. Based on the attack parameters, the transform domain features of each watermarked image block are corrected to obtain the corrected transform domain features of multiple watermarked image blocks. Based on the corrected transform domain features of multiple watermarked image blocks, watermark information is obtained by extracting the target low-frequency sub-band of the third number of first watermarked image blocks and the target high-frequency directional sub-band of the fourth number of second watermarked image blocks.
[0200] In some exemplary embodiments, based on the watermarked image to be extracted and its corresponding original image, the attack parameters for each watermarked image block are calculated using a SIFT-based matching algorithm, which may include: Extract the SIFT feature points of the watermark image to be extracted and its corresponding original image; Based on the SIFT feature points of the watermarked image to be extracted and its corresponding original image, feature point matching is performed using the Fast Library for Approximate Nearest Neighbors (FLANN) matching algorithm to select matching feature point pairs. ;in, Represents the feature points of the original image. These represent the feature points of the image from which the watermark is to be extracted. Based on matching feature point pairs, the homography matrix H is calculated using the Random Adaptive Filtering (RANSAC) algorithm, where the homography matrix H includes attack parameters.
[0201] As an example, the homography matrix H is shown in equation (12).
[0202] (12); Where H is the homography matrix and S is the scaling factor. For rotation angle, This is the translation vector (i.e., the attack parameters).
[0203] In some exemplary embodiments, based on attack parameters, the transform domain features of each watermarked image block are corrected to obtain corrected transform domain features of multiple watermarked image blocks, including: For the transform domain features of each watermarked image block, an inverse transform is performed based on the homography matrix H to obtain multiple watermarked image blocks. These are then corrected to obtain multiple corrected watermarked image blocks. The corrected watermark image blocks are transformed to obtain the corrected transform domain features.
[0204] As an example, for the transform domain features of each watermark image block, an inverse transformation is performed based on the homography matrix H. Through equation (13), multiple watermark image blocks are obtained for correction, resulting in multiple corrected watermark image blocks.
[0205] (13); in, These represent the feature points of the image from which the watermark is to be extracted. Represents the feature points of the original image. This represents the inverse transformation of the homography matrix.
[0206] For ease of understanding, the application scenarios (or system architectures) applicable to the watermark embedding and extraction methods of this application embodiment are described below.
[0207] As a new computing model that centrally stores data and deploys computing power in the cloud, cloud computing inherently carries multiple security and content control requirements: Data circulation risks exist because while users access cloud data through terminals, avoiding local storage, data leakage and circulation risks exist in the transmission links and terminal display stages. Enterprise-level scenarios (such as design drawings, code, and financial data) require accountability for data usage: when internal personnel leak content through cloud computing, traditional log records (such as IP addresses and accounts) are insufficient to accurately pinpoint the specific actions taken. Blind watermarking in cloud computing is one way to achieve content traceability. Government, healthcare, and other industries need to meet Data Loss Prevention (DLP) standards. For example, the Personal Information Protection Law requires traceability of access to sensitive data, and the application of blind watermarking technology on cloud computing supports these compliance requirements. The application of blind watermarking technology in areas such as digital content protection, copyright tracking, and anti-counterfeiting traceability in cloud computing is becoming increasingly crucial.
[0208] The technical solutions provided in the embodiments of this application can be applied to cloud computing scenarios such as cloud computing and computing power scheduling. They achieve a good balance between watermark invisibility and robustness, ensuring the watermark remains stable and can be accurately extracted under various conditions without affecting the normal use of data in the cloud computer. This improves the watermark's resistance to various complex attacks in the cloud computer environment, including but not limited to attacks such as noise interference, cropping, scaling, rotation, affine transformation, and format conversions that may be encountered during cloud computer data transmission and processing. It can efficiently perform watermark embedding and extraction operations on large amounts of data stored and transmitted in the cloud computer, meeting the cloud computer's requirements for data processing speed and security.
[0209] This application provides a schematic diagram of an exemplary application scenario. This exemplary application scenario may include: a cloud computer client and a cloud computer server, wherein the cloud computer client connects to the cloud computer server (e.g., directly or indirectly) via a network (such as a wireless network or a wired network).
[0210] The cloud PC client provides a display interface to the user, which displays the cloud PC screen and provides interactive operation controls. Based on the user's various operations on the display interface, the client sends corresponding instructions to the cloud PC server via the network, enabling the user to manage the cloud PC by operating the cloud PC client.
[0211] As an example, the cloud computer client can be implemented as a web browser, an application (APP), or other forms, such as a PC (computer) client. This application does not limit the implementation in this way.
[0212] As an example, cloud PC clients can be deployed on various terminal devices used by users, such as desktop computers, laptops, tablets, and mobile phones; cloud PC clients can also be deployed on separate physical servers, such as application servers and bare metal servers (BMS); cloud PC clients can also be deployed on virtual machines (VMs) implemented based on general physical servers combined with network functions virtualization (NFV) technology. A virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment, such as a virtual machine in a cloud data center. This application embodiment does not limit this.
[0213] The cloud PC server comprises one or more nodes, which run cloud PC instances. For example, any given node can run one or more cloud PC instances, and can run cloud PC instances for one or more users. For example, any given node can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Nodes can also be virtualized nodes, such as virtual machines or containers, in which case the virtual machines or containers can be deployed on at least one computing device (e.g., a server).
[0214] For ease of understanding, the watermark embedding and extraction methods in this application embodiment will be described below with reference to exemplary application embodiments, taking cloud desktop scenarios as an example.
[0215] like Figure 3 As shown, a watermark embedding method proposed in this exemplary application embodiment may include the following steps: C1, Watermark Information Generation and Encryption.
[0216] As an example, C1, watermark information generation and encryption, can include: obtaining the original watermark information input by the user (such as company name, cloud computer ID, current time, etc.); performing a hash operation on the original watermark information using the SHA-256 hash function to generate a unique watermark identifier; encrypting the watermark identifier using the AES-256 encryption algorithm to obtain an encrypted watermark identifier; and encoding the encrypted watermark identifier into a binary sequence as the watermark information to be embedded. This enhances the security of the watermark information and facilitates the embedding of watermarks in both low-frequency and high-frequency sub-bands.
[0217] C2, Preprocessing of the original image.
[0218] As an example, C2, original image preprocessing, may include: preprocessing the original image generated by the cloud desktop to obtain an image to be embedded with a watermark, wherein the preprocessing includes one or more of the following: adjusting the brightness of the original image to a preset brightness, adjusting the contrast of the original image to a preset contrast, and converting the format of the original image to a preset format.
[0219] C3, Dynamic Adaptive Blocking.
[0220] As an example, step C3, dynamic adaptive segmentation, may include: segmenting the image to be embedded with the watermark into blocks to obtain multiple first image blocks and multiple second image blocks.
[0221] As an example, taking the target feature parameters as an example, such as texture feature parameters, step C3, dynamic adaptive block segmentation, may include: traversing the image to be embedded with the watermark through a sliding window, and for each window region, performing the following operations: determining the texture feature parameters (such as gradient variance) corresponding to the window region. If the gradient variance of the window region satisfy: By adjusting the size of the sliding window to a preset first size (e.g., 64×64 pixels), the first type of first image patch is obtained; if the gradient variance of the window region... satisfy: By expanding the size of the sliding window from a preset first size to a preset third size (e.g., 128×128 pixels), a second type of first image is obtained. If the gradient variance of the window region... satisfy: By adjusting the size of the sliding window to a preset second size (e.g., 16×16 pixels), the first type of second image patch is obtained. If the gradient variance of the window region... satisfy: By reducing the size of the sliding window from a preset second size to a preset fourth size (e.g., 8×8 pixels), a second type of second image patch is obtained. The first sub-gradient variance threshold is used. Less than the preset gradient variance threshold Second sub-gradient variance threshold Greater than the preset gradient variance threshold Thus, by using a single traversal and dynamic adjustment of the window size driven by texture features, computational redundancy caused by multiple traversals is avoided. Moreover, considering that cloud computer images are non-natural images with high image gradients, by using gradient variance as the target feature parameter, this dynamic segmentation method can divide the cloud computer image to be embedded into multiple image blocks, making the segmentation results more consistent with the content characteristics of the cloud computer image.
[0222] As an example, taking target feature parameters including brightness feature parameters and texture feature parameters, step C3, dynamic adaptive block segmentation, may include: traversing the image to be embedded with the watermark through a sliding window, and for each window region, performing the following operations: determining the average pixel value corresponding to the window region. Pixel variance and gradient variance If the target feature parameters of the window region satisfy: , as well as The first type of first image patch is obtained. If the target feature parameters of the window region satisfy: , ,and This yields the second type of first image patch. If the target feature parameters of the window region satisfy: and This yields the first type of second image patch. If the target feature parameters of the window region satisfy: and This yields the first type of second image patch. If the target feature parameters of the window region satisfy: and This yields the second type of second image patch. If the target feature parameters of the window region satisfy: and This yields a second type of image patch. Thus, by using a single traversal and dynamic adjustment of the window size driven by the target features, computational redundancy caused by multiple traversals is avoided. By combining brightness and texture feature parameters as target feature parameters, the segmented patches can better match the content characteristics of the cloud computer image, such as the brightness uniformity of large areas of solid color backgrounds (e.g., desktop, blank document), avoiding excessive subdivision of the first image patch leading to watermark redundancy, and ensuring the preservation of details in the second image patch, thereby improving watermark invisibility and robustness.
[0223] C4, HLFS (High-Low Frequency) Transform and Coefficient Analysis.
[0224] As an example, C4, HLFS (High-Low Frequency) transform and coefficient analysis, may include: performing HLFS transform on each image block to obtain a low-frequency sub-band and multiple high-frequency directional sub-bands for each image block; calculating the statistical parameters corresponding to the low-frequency sub-band and multiple high-frequency directional sub-bands for each image block, the statistical parameters including one or more of the following: sub-band coefficient mean, sub-band coefficient variance, sub-band coefficient energy, etc.; and determining the embedding position and embedding parameters based on the statistical parameters of each image block, the embedding position including: target low-frequency sub-band and target high-frequency sub-band, and the embedding parameters including: quantization step size and embedding strength.
[0225] Each image block undergoes HLFS transform processing, including: first, decomposing the image block into low-frequency sub-bands and multiple high-frequency sub-bands using a Laplacian pyramid (LP); then, performing directional decomposition on the high-frequency sub-bands using a configurable directional filter bank (DFB) to obtain coefficients of the image block in multiple directions, resulting in multiple high-frequency directional sub-bands. The low-frequency sub-bands include one or more low-frequency coefficients. The high-frequency directional sub-bands include one or more high-frequency coefficients.
[0226] For example, the Laplacian pyramid (LP) decomposition level parameter is 4. A configurable directional filter bank supports custom direction counts for different levels, such as 4 directions for the first level and 4 directions for the second level. Thus, the HLFS transform is designed for cloud computer desktop images, emphasizing multi-directional fine-grained decomposition of artificial textures such as text edges and icon lines. It can adaptively adjust the decomposition granularity according to the edge direction distribution of the cloud computer image, making it more suitable for selecting texture-sensitive regions for watermark embedding.
[0227] C5, watermark embedded.
[0228] As an example, C5, watermark embedding, can include: For a first image patch, selecting a target low-frequency subband (such as cloud computer text) with higher energy and less visual impact from multiple low-frequency subbands of the first image patch, embedding watermark information using the Quantization Index Modulation (QIM) method, and adjusting the quantization step size to ensure that the embedding does not affect the overall image structure and visual effect. For a second image patch, selecting a target high-frequency directional subband (such as a non-text area of a cloud computer) with rich texture details and low sensitivity to the human eye from multiple high-frequency subbands of the second image patch, and using a spread-spectrum-based watermark embedding algorithm to fuse the watermark information with the high-frequency coefficients in the high-frequency directional subband through spectral spreading (FSS) to improve the invisibility and anti-attack capability of the watermark.
[0229] During the watermark embedding process, image quality parameters (such as PSNR and SSIM values) of the watermarked data are calculated in real time. The embedding parameters are adjusted based on the image quality parameters (such as PSNR and SSIM values). The watermark information is then re-embedded into the target low-frequency sub-band and the target high-frequency direction sub-band using the adjusted embedding parameters to obtain the adjusted image. This process continues until the preset termination condition is met, at which point the adjusted image is determined to be the watermarked image.
[0230] As an example, for each low-frequency sub-band in the first number of low-frequency sub-bands of the first image block, the visual sensitivity weight of that low-frequency sub-band is calculated using Equation (5). Based on the visual sensitivity weights of the low-frequency sub-bands of the first number of first image patches, a target low-frequency sub-band is determined from the low-frequency sub-bands of the first number of first image patches. For example, the target low-frequency sub-band can be the visual sensitivity weights. Less than the preset low-frequency visual sensitivity threshold And subband coefficient energy Greater than the preset energy threshold The low-frequency subbands. In this way, from the low-frequency subbands of the first number of first image blocks, the low-frequency subbands with higher energy and less visual impact (such as the area where the text of the cloud computer is located) can be selected as the target low-frequency subbands to embed watermark information, which can ensure that the overall structure and visual effect of the image are not affected after embedding.
[0231] As an example, for each of the multiple high-frequency directional subbands in the second number of second image blocks, the variance of the subband coefficients is based on the statistical parameters of the high-frequency directional subbands. Sub-band coefficient energy The texture complexity weight of the high-frequency directional subband is calculated using equation (6). Mean value of subband coefficients in statistical parameters based on high-frequency directional subbands and sub-band coefficient variance The visual sensitivity weight of the high-frequency directional sub-band is calculated using equation (7). Based on texture complexity weights and visual sensitivity weight This involves determining the target high-frequency directional subband. For example, the target high-frequency directional subband could be a texture complexity weight. Greater than the preset high-frequency texture complexity threshold And visual sensitivity weight Less than the preset high-frequency visual sensitivity threshold The high-frequency directional sub-bands. Thus, from the multiple high-frequency directional sub-bands corresponding to the second number of second image blocks, the high-frequency directional sub-bands in areas with rich texture details and insensitive to the human eye (such as non-text areas of cloud computers, icon edges, etc.) are selected as the target high-frequency directional sub-bands for embedding watermark information, which can ensure that the overall structure and visual effect of the image are not affected after embedding.
[0232] Still as Figure 3 As shown, a watermark extraction method proposed in this exemplary application embodiment may include the following steps: C6, Preprocessing of the original watermark image from which the watermark is to be extracted.
[0233] As an example, C6, the preprocessing of the original watermark image to be watermarked may include: receiving the original watermark image; performing the same preprocessing on the original watermark image as when the watermark was embedded to obtain the processed image; using a preset feature detection algorithm to perform feature analysis on the processed image to determine whether there is a blind watermark embedded by a cloud computer in the processed image; when it is determined that there is a blind watermark embedded by a cloud computer in the processed image, the processed image is used as the watermark image to be watermarked (i.e., the image containing the watermark).
[0234] For example, the preset feature detection algorithm can be a convolutional neural network (CNN), and the input layer of the convolutional neural network (CNN) has a size of 32×32.
[0235] For example, for blind watermark detection of cloud computer images, the preset feature detection algorithm can adopt a two-level detection algorithm of convolutional neural network (CNN) and feature matching.
[0236] C7, Dynamic Block Parsing and HLFS (High-Low Frequency) Transform Reproduction.
[0237] As an example, C7, dynamic block parsing and HLFS transform reproduction, can include: dynamically dividing the watermark image to be extracted into multiple watermark image blocks according to the block strategy and parameter settings during watermark embedding. These multiple watermark image blocks include a third number of first watermark image blocks and a fourth number of second watermark image blocks. An HLFS transform is performed on each watermark image block to obtain its transform domain features. This ensures that the transform domain features obtained are consistent with those obtained during embedding, providing an accurate data foundation for subsequent watermark extraction.
[0238] C8, watermark extraction and restoration.
[0239] As an example, C8, watermark extraction and restoration, may include: C81, extracting watermark information from the transform domain features of each watermark image block based on the parameter settings recorded when embedding the watermark.
[0240] As an example, before step C81, step C8 may also include: C82, for geometric attacks (such as rotation, scaling, cropping), calculating attack parameters using a SIFT registration algorithm based on feature point matching; and correcting the transform domain features of each watermark image patch based on the attack parameters. In this way, geometric correction compensation can be performed using transform domain features.
[0241] As an example, if the watermarked image to be extracted is subjected to signal processing attacks such as JPEG compression and noise interference, the RANSAC adaptive filtering algorithm is used to denoise the transform domain features of each watermark block before extracting the watermark information. In this way, through these anti-attack processing methods, the accuracy and completeness of watermark extraction are improved.
[0242] C9, Watermark security verification.
[0243] As an example, C9, watermark security verification, may include: decrypting the extracted watermark information and comparing it with the original watermark information in step C1. Calculating the Hamming distance between the two; if the Hamming distance is less than a set threshold, the watermark verification is considered successful, confirming the image's data source and integrity; otherwise, it is determined that the watermark has been tampered with or that the data file has security issues.
[0244] The embodiments of this application have the following beneficial effects: 1. Enhanced Resistance to Attacks: For geometric attacks, such as large-angle rotations, large-scale scaling, and affine transformations, this application utilizes HLFS transformation to better capture the geometric structure information of the image. Combined with dynamic block segmentation for targeted processing of different image regions, and considering block features during watermark embedding, the watermark can still be accurately extracted even after geometric attacks. For example, after a large-scale scaling attack, the attacked image can be partially restored through block features and the inverse operation of HLFS transformation, thus accurately extracting the watermark. When facing common signal processing attacks such as noise interference, cropping, and filtering, the watermark embedding algorithm of this application adjusts the embedding parameters based on block features, enabling better resistance to these attacks and ensuring the integrity of the watermark.
[0245] 2. Improved Balance Between Invisibility and Robustness: This application establishes block feature descriptions through dynamic segmentation, and adaptively adjusts the cloud computer watermark embedding strength in different blocks based on this description. This maximizes the watermark's robustness while ensuring its invisibility. Experiments show that, within the same range of image quality degradation, the watermark embedding method of this application can resist more types and higher intensity attacks.
[0246] 3. More suitable for cloud computing environments: Cloud computing environments involve diverse data types and frequent data transmission. The dynamic segmentation and adaptive watermark embedding method of this application can flexibly handle different data characteristics. Furthermore, during data transmission, for possible format conversions, resolution changes, etc., the combination of HLFS transformation and segmentation features can ensure the stability and extractability of the watermark, making it more adaptable to the complex data processing and transmission environment of cloud computing.
[0247] Figure 4 This is a schematic diagram illustrating the results of watermark embedding and watermark extraction provided in the embodiments of this application, as shown below. Figure 4 As shown, taking the original image as the cloud desktop image as an example, Figure 4 Image (A) illustrates a cloud desktop image without a watermark, meaning the original carrier image surface does not carry any additional identification information. Figure 4 (B) indicates the watermark information. Figure 4 Image C illustrates a cloud desktop image with a watermark added. Figure 4 Image (D) illustrates a cloud desktop image with a blind watermark added after processing by the watermark embedding method of this application. The watermark extraction method of this application is used to extract watermarks from... Figure 4 The watermark information extracted from (D) includes "Name: XX Company", "Watermark Timestamp: Year X Month X Day", and "Desktop ID: xxxxxx-xxxx". It is evident that the image processed by the watermark embedding method of this application has successfully embedded the hidden blind watermark information while maintaining almost no visual difference. The watermark information obtained after processing by the watermark extraction method of this application is complete, demonstrating excellent concealment and robustness.
[0248] Embodiments of this application provide a watermark embedding device. Figure 5 This is a schematic diagram of the structure of a watermark embedding device provided in an embodiment of this application, as shown below. Figure 5 As shown, the watermark embedding device may include: The first segmentation unit 501 is used to segment the image to be embedded with the watermark to obtain multiple image blocks, wherein the multiple image blocks include: a first number of first image blocks and a second number of second image blocks, and the target feature parameters of the first image blocks and the second image blocks are different. The first transformation unit 502 is used to perform transformation processing on multiple image blocks respectively to obtain the transform domain features of multiple image blocks, wherein the transform domain features include: low-frequency sub-bands and multiple high-frequency directional sub-bands; The first obtaining unit 503 is used to obtain a watermarked image by embedding watermark information into the target low-frequency subband of a first number of first image blocks and the target high-frequency directional subband of a second number of second image blocks based on the transform domain features of multiple image blocks.
[0249] In some exemplary embodiments, the first obtaining unit 503 is configured to determine sub-band feature parameters of the plurality of image patches based on the transform domain features of the plurality of image patches, wherein the sub-band feature parameters include: statistical parameters of low-frequency sub-bands and statistical parameters of multiple high-frequency directional sub-bands, the statistical parameters including one or more of the following: sub-band coefficient mean, sub-band coefficient variance, and sub-band coefficient energy; determine a first embedding parameter based on the statistical parameters of the target low-frequency sub-band; embed the watermark information into the target low-frequency sub-band using a first watermark embedding algorithm with the first embedding parameter to obtain a first result; determine a second embedding parameter based on the statistical parameters of the target high-frequency directional sub-band; embed the watermark information into the target high-frequency directional sub-band using a second watermark embedding algorithm with the second embedding parameter to obtain a second result; and determine the watermarked image based on the first result and the second result.
[0250] In some exemplary embodiments, the first obtaining unit 503 is further configured to determine the target low-frequency subband from the low-frequency subbands of the first number of first image blocks based on the subband feature parameters; and to determine the target high-frequency directional subband from the plurality of high-frequency directional subbands corresponding to the second number of second image blocks based on the subband feature parameters.
[0251] In some exemplary embodiments, the first obtaining unit 503 is configured to obtain an image to be evaluated by embedding the watermark information into the target low-frequency sub-band of the first number of first image blocks and the target high-frequency directional sub-band of the second number of second image blocks based on the transform domain features of the plurality of image blocks; to perform image quality evaluation on the image to be evaluated to obtain image quality parameters of the image to be evaluated; to adjust the embedding parameters corresponding to the image to be evaluated based on the image quality parameters of the image to be evaluated, and to re-embed the watermark information into the target low-frequency sub-band and the target high-frequency directional sub-band with the adjusted embedding parameters to obtain an adjusted image, until a preset termination condition is met, and to determine the adjusted image as the watermarked image.
[0252] In some exemplary embodiments, the image quality parameters of the image to be evaluated include: peak signal-to-noise ratio and structural similarity value; the first obtaining unit 503 is used to adjust the embedding parameters corresponding to the image to be evaluated based on the image quality parameters of the image to be evaluated, a preset image quality target value, and a preset adjustment coefficient to obtain the adjusted embedding parameters; the watermark information is re-embedded in the target low-frequency sub-band and the target high-frequency directional sub-band with the adjusted embedding parameters to obtain the adjusted image, until a preset termination condition is met, and the adjusted image is determined as the watermarked image.
[0253] In some exemplary embodiments, the first segmentation unit 501 is configured to traverse the image to be embedded with the watermark via a sliding window, and perform the following operations for each window region: Determine the target feature parameters corresponding to the window region; If the target feature parameters corresponding to the window region meet the preset first parameter condition, the first image block is obtained by adjusting the size of the sliding window to the preset first size; Alternatively, if the target feature parameters corresponding to the window region satisfy a preset second parameter condition, the second image block is obtained by adjusting the size of the sliding window to a preset second size, wherein the preset second size is smaller than the preset first size.
[0254] In some exemplary embodiments, the target feature parameters include: texture feature parameters and brightness feature parameters; The brightness feature parameters include one or more of the following: pixel mean and pixel variance; The texture feature parameters include either gradient variance or local binary pattern entropy. The preset first parameter condition includes: a first sub-condition and a second sub-condition. The first sub-condition includes one or more of the following: the pixel mean is within a preset pixel mean range and the pixel variance is less than a preset pixel variance threshold. The second sub-condition includes any one of the following: the gradient variance is less than a preset gradient variance threshold and the local binary mode entropy is less than a preset entropy threshold. The preset second parameter conditions include any one or more of the following: the pixel mean is not within the preset pixel mean range, the pixel variance is not less than the preset pixel variance threshold, the gradient variance is not less than the preset gradient variance threshold, and the local binary mode entropy value is not less than the preset entropy value threshold.
[0255] In some exemplary embodiments, the first image block includes: a first type of first image block and a second type of first image block, wherein the size of the second type of first image block is larger than the size of the first type of first image block; the second image block includes: a first type of second image block and a second type of second image block, wherein the size of the second type of second image block is smaller than the size of the first type of second image block; The first segmentation unit 501 is used to determine whether the texture feature parameter in the target feature parameter corresponding to the window region is less than a preset first sub-texture threshold if the target feature parameter corresponding to the window region satisfies the preset first parameter condition; when it is not less than the preset first sub-texture threshold, the first type of first image block is obtained by adjusting the size of the sliding window to the preset first size; or, when it is less than the preset first sub-texture threshold, the second type of first image is obtained by expanding the size of the sliding window from the preset first size to the preset third size. The first segmentation unit 501 is used to determine whether the texture feature parameter in the target feature parameter corresponding to the window region is greater than a preset second sub-texture threshold if the target feature parameter corresponding to the window region satisfies the preset second parameter condition; when it is not greater than the preset second sub-texture threshold, the first type of second image block is obtained by adjusting the size of the sliding window to a preset second size, or when it is greater than the preset second sub-texture threshold, the second type of second image block is obtained by reducing the size of the sliding window from the preset second size to a preset fourth size.
[0256] In some exemplary embodiments, the first transformation unit 502 is configured to perform the following processing on each image block using a preset transformation algorithm: The image block is decomposed into a preset number of layers using a preset scale and then decomposed using the Laplacian pyramid in a preset transformation algorithm to obtain the low-frequency sub-band and multiple high-frequency sub-bands of the image block. Using a pre-configured number of directions, the multiple high-frequency sub-bands are decomposed through a configurable directional filter bank in a preset transformation algorithm to obtain multiple high-frequency directional sub-bands of the image block; The low-frequency subbands and multiple high-frequency directional subbands of the image block are determined as the transform domain features of the image block.
[0257] Embodiments of this application provide a watermark extraction device. Figure 6 This is a schematic diagram of the structure of a watermark extraction device provided in an embodiment of this application, as shown below. Figure 6 As shown, the watermark embedding device may include: The second segmentation unit 601 is used to segment the watermark image to be extracted into multiple watermark image blocks. The multiple watermark image blocks include: a third number of first watermark image blocks and a fourth number of second watermark image blocks. The target feature parameters of the first watermark image blocks and the second watermark image blocks are different. The second transformation unit 602 is used to perform transformation processing on multiple watermark image blocks respectively to obtain the transform domain features of multiple watermark image blocks, wherein the transform domain features include: low frequency sub-bands and multiple high frequency directional sub-bands; The second obtaining unit 603 is used to obtain the extracted watermark information by extracting watermarks from the target low-frequency sub-band of the third number of first watermark image blocks and the target high-frequency directional sub-band of the fourth number of second watermark image blocks based on the transform domain features of multiple watermark image blocks.
[0258] Embodiments of this application provide an electronic device that may include: Memory is used to store executable instructions or computer programs. When a processor executes computer-executable instructions or computer programs stored in memory, it implements one or more of the watermark embedding methods or watermark extraction methods provided in the embodiments of this application.
[0259] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. This electronic device can be applied to... Figure 1 A corresponding embodiment provides a watermark embedding method or Figure 2 In a corresponding embodiment, a watermark extraction method is provided. For example... Figure 7 As shown, the electronic device 700 may include a processor 701, a memory 702, and a bus 703. The various components in the electronic device 700 are coupled together via the bus 703. Wherein: Bus 703 is used to realize the communication connection between processor 701 and memory 702; Memory 702 is used to store computer-executable instructions or computer programs; When the processor 701 executes computer-executable instructions or computer programs stored in the memory 702, it implements the watermark embedding method or watermark extraction method in one or more exemplary embodiments described above.
[0260] In some exemplary embodiments, bus 703 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. For example, bus 703 may be divided into a data bus, a power bus, an address bus, a control bus, a status signal bus, etc. For ease of illustration, in... Figure 7 The bus 703 is represented by only one line, but this does not mean that there is only one bus or one type of bus.
[0261] In some exemplary embodiments, the electronic device can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, smartphones, smart speakers, smartwatches, smart TVs, and in-vehicle terminals, or it can be implemented as a server. For example, the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0262] In some exemplary embodiments, the processor may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor may be a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or any conventional processor, etc.
[0263] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the watermark embedding method or watermark extraction method provided in this application can be implemented. For example, ... Figure 1 The watermark embedding method shown or as Figure 2 The watermark extraction method shown.
[0264] This application provides a computer program product, which includes a computer program or computer-executable instructions. When the computer-executable instructions or the computer program are executed by a processor, the watermark embedding method or watermark extraction method provided in this application can be implemented. For example, ... Figure 1 The watermark embedding method shown or as Figure 2 The watermark extraction method is illustrated. For example, the computer program or computer-executable instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the computer program or computer-executable instructions from the computer-readable storage medium and executes the computer program or computer-executable instructions, causing the electronic device to perform the watermark embedding method or watermark extraction method provided in the embodiments of this application.
[0265] In some exemplary embodiments, the aforementioned computer-readable storage medium / memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; or it may be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0266] In some exemplary embodiments, a computer program or computer-executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0267] As an example, a computer program or computer-executable instructions may, but not necessarily, correspond to a file in a file system. It may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0268] As an example, a computer program or computer-executable instructions may be deployed to execute on one electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected by a communication network.
[0269] It should be noted that the descriptions of the above embodiments of the apparatus, devices, storage media, or products are similar to the descriptions of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device, storage medium, or product embodiments of this application, those skilled in the art should refer to the descriptions of the method embodiments of this disclosure for understanding. Further details will not be repeated here.
[0270] The features disclosed in the several methods, apparatuses, devices, storage media or product embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments, apparatuses, devices, storage media or product embodiments.
[0271] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A watermark embedding method, characterized in that, The method includes: The image to be embedded with the watermark is divided into blocks to obtain multiple image blocks, wherein the multiple image blocks include: a first number of first image blocks and a second number of second image blocks, the target feature parameters of the first image blocks and the second image blocks are different; The multiple image blocks are transformed to obtain the transform domain features of the multiple image blocks, wherein the transform domain features include: low-frequency sub-bands and multiple high-frequency directional sub-bands; Based on the transform domain features of the multiple image blocks, a watermarked image is obtained by embedding watermark information into the target low-frequency sub-band of the first number of first image blocks and the target high-frequency directional sub-band of the second number of second image blocks.
2. The method according to claim 1, characterized in that, The method of obtaining a watermarked image by embedding watermark information into the target low-frequency subband of the first number of first image blocks and the target high-frequency subband of the second number of second image blocks, based on the transform domain features of the plurality of image blocks, includes: Based on the transform domain features of the multiple image blocks, sub-band feature parameters of the multiple image blocks are determined, wherein the sub-band feature parameters include: statistical parameters of low-frequency sub-bands and statistical parameters of multiple high-frequency direction sub-bands, and the statistical parameters include one or more of the following: sub-band coefficient mean, sub-band coefficient variance, and sub-band coefficient energy; Based on the statistical parameters of the target low-frequency sub-band, the first embedding parameter is determined; Using the first embedding parameters and employing the first watermark embedding algorithm, the watermark information is embedded into the target low-frequency sub-band to obtain a first result; Based on the statistical parameters of the target high-frequency directional subband, the second embedding parameter is determined; Using the second embedding parameters and the second watermark embedding algorithm, the watermark information is embedded into the target high-frequency directional subband to obtain the second result; Based on the first result and the second result, the watermarked image is determined.
3. The method according to claim 2, characterized in that, After determining the sub-band feature parameters of the plurality of image patches based on their transform domain features, the method further includes: Based on the sub-band feature parameters, the target low-frequency sub-band is determined from the low-frequency sub-bands of the first number of first image blocks; Based on the sub-band feature parameters, the target high-frequency directional sub-band is determined from the multiple high-frequency directional sub-bands corresponding to each of the second number of second image blocks.
4. The method according to claim 1, characterized in that, The method of obtaining a watermarked image by embedding watermark information into the target low-frequency subband of the first number of first image blocks and the target high-frequency subband of the second number of second image blocks, based on the transform domain features of the plurality of image blocks, includes: Based on the transform domain features of the multiple image blocks, the watermark information is embedded into the target low-frequency sub-band of the first number of first image blocks and the target high-frequency directional sub-band of the second number of second image blocks to obtain the image to be evaluated. The image quality of the image to be evaluated is evaluated to obtain the image quality parameters of the image to be evaluated. Based on the image quality parameters of the image to be evaluated, the embedding parameters corresponding to the image to be evaluated are adjusted, and the watermark information is re-embedded into the target low-frequency sub-band and the target high-frequency direction sub-band with the adjusted embedding parameters to obtain the adjusted image. This process continues until a preset termination condition is met, and the adjusted image is determined as the watermarked image.
5. The method according to claim 4, characterized in that, The image quality parameters of the image to be evaluated include: peak signal-to-noise ratio and structural similarity value; The process involves adjusting the embedding parameters based on the image quality parameters of the image to be evaluated, and then re-embedding the watermark information into the target low-frequency sub-band and the target high-frequency directional sub-band using the adjusted embedding parameters to obtain an adjusted image. This process continues until a preset termination condition is met, at which point the adjusted image is determined as the watermarked image. This includes: Based on the image quality parameters of the image to be evaluated, the preset image quality target value, and the preset adjustment coefficient, the embedding parameters corresponding to the image to be evaluated are adjusted to obtain the adjusted embedding parameters. Using the adjusted embedding parameters, the watermark information is re-embedded into the target low-frequency sub-band and the target high-frequency directional sub-band to obtain the adjusted image. This process continues until a preset termination condition is met, at which point the adjusted image is determined as the watermarked image.
6. The method according to any one of claims 1 to 5, characterized in that, The image to be embedded with the watermark is divided into blocks to obtain multiple image blocks, including: The image to be watermarked is traversed through a sliding window. For each window area, the following operations are performed: Determine the target feature parameters corresponding to the window region; If the target feature parameters corresponding to the window region meet the preset first parameter condition, the first image block is obtained by adjusting the size of the sliding window to the preset first size; Alternatively, if the target feature parameters corresponding to the window region satisfy a preset second parameter condition, the second image block is obtained by adjusting the size of the sliding window to a preset second size, wherein the preset second size is smaller than the preset first size.
7. The method according to claim 6, characterized in that, The target feature parameters include: texture feature parameters and brightness feature parameters; The brightness feature parameters include one or more of the following: pixel mean and pixel variance; The texture feature parameters include either gradient variance or local binary pattern entropy. The preset first parameter condition includes: a first sub-condition and a second sub-condition. The first sub-condition includes one or more of the following: the pixel mean is within a preset pixel mean range and the pixel variance is less than a preset pixel variance threshold. The second sub-condition includes any one of the following: the gradient variance is less than a preset gradient variance threshold and the local binary mode entropy is less than a preset entropy threshold. The preset second parameter conditions include any one or more of the following: the pixel mean is not within the preset pixel mean range, the pixel variance is not less than the preset pixel variance threshold, the gradient variance is not less than the preset gradient variance threshold, and the local binary mode entropy value is not less than the preset entropy value threshold.
8. The method according to claim 7, characterized in that, The first image block includes: a first type of first image block and a second type of first image block, wherein the size of the second type of first image block is larger than the size of the first type of first image block; the second image block includes: a first type of second image block and a second type of second image block, wherein the size of the second type of second image block is smaller than the size of the first type of second image block; The step of obtaining the first image block by adjusting the size of the sliding window to a preset first size if the target feature parameters corresponding to the window region satisfy the preset first parameter condition includes: if the target feature parameters corresponding to the window region satisfy the preset first parameter condition, determining whether the texture feature parameter in the target feature parameters corresponding to the window region is less than a preset first sub-texture threshold; when it is not less than the preset first sub-texture threshold, obtaining the first type of first image block by adjusting the size of the sliding window to the preset first size, or, when it is less than the preset first sub-texture threshold, obtaining the second type of first image by expanding the size of the sliding window from the preset first size to a preset third size; The step of obtaining the second image block by adjusting the size of the sliding window to a preset second size if the target feature parameter corresponding to the window region satisfies the preset second parameter condition includes: if the target feature parameter corresponding to the window region satisfies the preset second parameter condition, determining whether the texture feature parameter in the target feature parameter corresponding to the window region is greater than a preset second sub-texture threshold; when it is not greater than the preset second sub-texture threshold, obtaining the first type of second image block by adjusting the size of the sliding window to a preset second size, or, when it is greater than the preset second sub-texture threshold, obtaining the second type of second image block by reducing the size of the sliding window from the preset second size to a preset fourth size.
9. The method according to any one of claims 1 to 5, characterized in that, The step of performing transformation processing on the plurality of image patches respectively to obtain the transform domain features of the plurality of image patches includes: For each image patch, the following processing is performed using a preset transformation algorithm: The image block is decomposed into a preset number of layers using a preset scale and then decomposed using the Laplacian pyramid in a preset transformation algorithm to obtain the low-frequency sub-band and multiple high-frequency sub-bands of the image block. Using a pre-configured number of directions, the multiple high-frequency sub-bands are decomposed through a configurable directional filter bank in a preset transformation algorithm to obtain multiple high-frequency directional sub-bands of the image block; The low-frequency subbands and multiple high-frequency directional subbands of the image block are determined as the transform domain features of the image block.
10. A watermark extraction method, characterized in that, The method includes: The watermark image to be extracted is divided into blocks to obtain multiple watermark image blocks, wherein the multiple watermark image blocks include: a third number of first watermark image blocks and a fourth number of second watermark image blocks, and the target feature parameters of the first watermark image blocks and the second watermark image blocks are different. The multiple watermarked image blocks are transformed to obtain the transform domain features of the multiple watermarked image blocks, wherein the transform domain features include: low-frequency sub-bands and multiple high-frequency directional sub-bands; Based on the transform domain features of the multiple watermarked image blocks, watermark information is obtained by extracting watermarks from the target low-frequency sub-band of the third number of first watermarked image blocks and the target high-frequency directional sub-band of the fourth number of second watermarked image blocks.
11. A watermark embedding device, characterized in that, The device includes: The first segmentation unit is used to segment the image to be embedded with the watermark into multiple image blocks, wherein the multiple image blocks include: a first number of first image blocks and a second number of second image blocks, and the target feature parameters of the first image blocks and the second image blocks are different. The first transformation unit is used to perform transformation processing on the plurality of image blocks respectively to obtain the transform domain features of the plurality of image blocks, wherein the transform domain features include: low-frequency sub-bands and multiple high-frequency directional sub-bands; The first obtaining unit is used to obtain a watermarked image by embedding watermark information into the target low-frequency sub-band of the first number of first image blocks and the target high-frequency directional sub-band of the second number of second image blocks based on the transform domain features of the plurality of image blocks.
12. A watermark extraction device, characterized in that, The device includes: The second segmentation unit is used to segment the watermark image to be extracted into multiple watermark image blocks. The multiple watermark image blocks include: a third number of first watermark image blocks and a fourth number of second watermark image blocks. The target feature parameters of the first watermark image blocks and the second watermark image blocks are different. The second transformation unit is used to perform transformation processing on the plurality of watermark image blocks respectively to obtain the transform domain features of the plurality of watermark image blocks, wherein the transform domain features include: low-frequency sub-bands and multiple high-frequency directional sub-bands; The second obtaining unit is used to obtain the extracted watermark information by extracting watermarks from the target low-frequency sub-bands of the third number of first watermark image blocks and the target high-frequency directional sub-bands of the fourth number of second watermark image blocks based on the transform domain features of the plurality of watermark image blocks.
13. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the method as described in any one of claims 1 to 9, or the method as described in claim 10.
14. A computer-readable storage medium storing a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by a processor, they implement the method as described in any one of claims 1 to 9, or the method as described in claim 10.
15. A computer program product comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by a processor, they implement the method as described in any one of claims 1 to 9, or the method as described in claim 10.