Watermark image embedding / enhancement method, device and computer system

By calculating embedding and enhancement weights based on regional color features in the carrier image and adjusting the pixel values ​​of the watermark image, the problem of semi-visible watermarks being easy to verify for copyright without affecting display is solved, achieving good semi-visibility and enhancement effects.

CN113962838BActive Publication Date: 2025-11-25ALIBABA GROUP HOLDING LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010706861.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-21
Publication Date
2025-11-25
Estimated Expiration
2040-07-21

AI Technical Summary

Technical Problem

Existing technologies make it difficult to make semi-visible watermarked images easy to obtain evidence during copyright verification without affecting the normal display of the carrier image.

Method used

By determining the regional color features of pixel locations in the carrier image, embedding and enhancement weights are calculated, and pixel values ​​of the watermark image are adjusted to achieve semi-visibility and ease of enhancement.

Benefits of technology

It achieves good semi-visibility of the watermark image and enhanced copyright verification without affecting the display of the carrier image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113962838B_ABST
    Figure CN113962838B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a watermark image embedding / enhancing method, device and computer system. The method comprises the following steps: determining a carrier image and a watermark image, and aligning the carrier image with the watermark image according to target adding position information of the watermark image; for a plurality of pixel positions, the following processing is performed respectively: determining a region color feature of a region where a target pixel position is located in the carrier image, determining an embedding weight according to the region color feature, and obtaining a pixel value at the pixel position after embedding the watermark image according to the embedding weight, a pixel value of the carrier image at the pixel position and a pixel value of the watermark image at a corresponding pixel position; and generating a target image after embedding the watermark image according to the pixel values after embedding the watermark image at the plurality of pixel positions. Through the embodiment of the application, the semi-visibility watermark image can be enhanced when copyright verification is required.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of watermark image processing technology, and in particular to watermark image embedding / enhancing methods, apparatus and computer systems. Background Technology

[0002] Digital images, as a widely existing information carrier, are easily stolen and tampered with. Without effective measures, unauthorized image misuse can cause significant problems for copyright holders. This is especially true for manually designed posters and digital photographs, which often possess high value and therefore require robust protection. Digital image watermarking, as an effective method for protecting image copyright, becomes crucial in this context.

[0003] Based on watermark visibility, digital image watermarks are generally categorized into visible watermarks, semi-visible watermarks, and invisible watermarks. Visible watermarks, due to their obvious content, are easily altered or deleted by attackers and can also affect the display of the carrier image. Invisible watermarks may raise suspicions about impartiality during copyright verification. Therefore, semi-visible watermarks are a better solution to these problems. A semi-visible watermark is a watermark that is not easily noticeable; it can be observed with the naked eye under careful scrutiny, but it does not affect the normal display of the carrier image. A common semi-visible watermark is one that directly embeds a semi-transparent watermark image into the carrier image. However, when the embedding strength is strong, it can affect the normal display of the carrier image; when the embedding strength is low, it is generally not detected without careful observation, but it can be inconvenient for evidence collection.

[0004] Therefore, how to make semi-visible watermarked images easier to obtain evidence during copyright verification without affecting the normal display of the carrier image has become a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] This application provides a watermark image embedding / enhancing method, apparatus, and computer system, which enables the embedded image to have good semi-visibility and facilitates the enhancement of the watermark image when copyright verification is required.

[0006] This application provides the following solution:

[0007] A method for embedding a watermarked image includes:

[0008] Determine the carrier image and the watermark image, add position information according to the target of the watermark image, and align the carrier image and the watermark image in position;

[0009] For multiple pixel locations, the following processing is performed: the regional color features of the area where the target pixel location is located in the carrier image are determined; the embedding weight is determined based on the regional color features; and the pixel value of the carrier image at the pixel location and the pixel value of the watermark image at the corresponding pixel location are obtained based on the embedding weight, the pixel value of the carrier image at the pixel location, and the pixel value of the watermark image at the corresponding pixel location.

[0010] The target image with the embedded watermark is generated based on the pixel values ​​of the watermark image after embedding it at multiple pixel positions.

[0011] A method for enhancing the display of a watermarked image includes:

[0012] The target image is determined by embedding a watermark image into the original carrier image. When embedding the watermark image, the embedding weight of the corresponding pixel position is determined according to the regional color features of the area where the target pixel position is located in the original carrier image, and the watermark image is embedded at the corresponding pixel position according to the embedding weight.

[0013] The following processing is performed on multiple pixel positions of the target image: the regional color features of the area where the target pixel position is located in the target image are determined, the enhancement weight is determined according to the regional color features, and the pixel value of the target image at the pixel position is enhanced according to the enhancement weight;

[0014] An enhanced image is generated based on the pixel values ​​after enhancement processing at multiple pixel locations.

[0015] A copyright verification method, comprising:

[0016] The target image to be verified for copyright is determined. The target image is generated by embedding a watermark image into the original carrier image. When embedding the watermark image, the embedding weight of the corresponding pixel position is determined according to the regional color features of the area where the target pixel position is located in the original carrier image, and the watermark image is embedded at the corresponding pixel position according to the embedding weight.

[0017] The following processing is performed on multiple pixel positions of the target image: the regional color features of the area where the target pixel position is located in the target image are determined, the enhancement weight is determined according to the regional color features, and the pixel value of the target image at the pixel position is enhanced according to the enhancement weight;

[0018] An enhanced image is generated based on the pixel values ​​after enhancement processing at multiple pixel locations;

[0019] Copyright verification is performed on the target image based on the enhanced image.

[0020] An apparatus for embedding a watermarked image, comprising:

[0021] An image preprocessing unit is used to determine the carrier image and the watermark image, add position information according to the target of the watermark image, and align the carrier image and the watermark image in position.

[0022] The pixel value calculation unit is used to perform the following processing for multiple pixel positions respectively: determine the regional color features of the area where the target pixel position is located in the carrier image, determine the embedding weight according to the regional color features, and obtain the pixel value of the carrier image at the pixel position and the pixel value of the watermark image at the corresponding pixel position according to the embedding weight, the pixel value of the carrier image at the pixel position, and the pixel value of the watermark image at the corresponding pixel position.

[0023] The target image generation unit is used to generate a target image after embedding the watermark image based on the pixel values ​​of the watermark image after embedding it at multiple pixel positions.

[0024] An apparatus for enhancing the display of a watermarked image, comprising:

[0025] The target image determination unit is used to determine the target image, which is generated by embedding a watermark image into the original carrier image. When embedding the watermark image, the embedding weight of the corresponding pixel position is determined according to the regional color features of the area where the target pixel position is located in the original carrier image, and the watermark image is embedded at the corresponding pixel position according to the embedding weight.

[0026] An enhancement processing unit is configured to perform the following processing on multiple pixel locations of the target image: determine the regional color features of the area where the target pixel location is located in the target image, determine the enhancement weight based on the regional color features, and enhance the pixel value of the target image at the pixel location based on the enhancement weight;

[0027] The watermark-enhanced image generation unit is used to generate an enhanced image based on the pixel values ​​after enhancement processing at multiple pixel locations.

[0028] A copyright verification device, comprising:

[0029] The target image determination unit is used to determine the target image to be verified for copyright. The target image is generated by embedding a watermark image into the original carrier image. When embedding the watermark image, the embedding weight of the corresponding pixel position is determined according to the regional color features of the area where the target pixel position is located in the original carrier image, and the watermark image is embedded at the corresponding pixel position according to the embedding weight.

[0030] An enhancement processing unit is configured to perform the following processing on multiple pixel locations of the target image: determine the regional color features of the area where the target pixel location is located in the target image, determine the enhancement weight based on the regional color features, and enhance the pixel value of the target image at the pixel location based on the enhancement weight;

[0031] An enhanced image generation unit is used to generate an enhanced image based on the pixel values ​​after enhancement processing at multiple pixel locations;

[0032] The copyright verification unit is used to perform copyright verification on the target image based on the enhanced image.

[0033] According to the specific embodiments provided in this application, the following technical effects are disclosed:

[0034] According to the embodiments of this application, when embedding a watermark image into a carrier image, the embedded pixel value can be calculated separately based on multiple pixel positions. Specifically, when calculating at a particular pixel position, the embedding strength can be determined based on the regional color characteristics of the area where the pixel position is located. This allows the embedded image to have good semi-visibility and facilitates the enhancement of the watermark image when copyright verification is required.

[0035] Of course, any product implementing this application does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a schematic diagram of the system architecture provided in the embodiments of this application;

[0038] Figure 2 This is a flowchart of the first method provided in the embodiments of this application;

[0039] Figure 3 This is a schematic diagram of the watermark image provided in the embodiments of this application;

[0040] Figure 4 This is a schematic diagram of the color space division method provided in the embodiments of this application;

[0041] Figure 5 This is a flowchart of the second method provided in the embodiments of this application;

[0042] Figure 6-1 This is a schematic diagram of the original carrier image provided in the embodiments of this application;

[0043] Figure 6-2 This is a schematic diagram of the target image after adding a watermark, as provided in the embodiments of this application;

[0044] Figure 6-3 This is a schematic diagram of an image enhanced with added watermark according to an embodiment of this application;

[0045] Figure 7 This is a flowchart of the third method provided in the embodiments of this application;

[0046] Figure 8 This is a schematic diagram of the first device provided in the embodiments of this application;

[0047] Figure 9 This is a schematic diagram of the second device provided in the embodiments of this application;

[0048] Figure 10 This is a schematic diagram of the third device provided in the embodiments of this application;

[0049] Figure 11 This is a schematic diagram of the computer system provided in the embodiments of this application. Detailed Implementation

[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0051] This application provides a novel method for embedding and enhancing semi-visible watermarks. In this method, when embedding a watermark image, the embedding weight of the watermark image can be determined based on the regional color features of the area where a specific pixel is located in the carrier image. The regional color features of the area where the pixel is located represent the dominant color tone of the area, and these regional color features affect the embedding effect. For example, if a certain area of ​​the same carrier image is generally dark, a darker color can be used when embedding the watermark, making the watermark image less noticeable and easier to enhance when copyright verification is required. Conversely, if a certain area is generally light, a lighter color can be used when embedding the watermark, and so on. Therefore, by determining the regional color features of the area where the pixel is located and then determining the embedding weight based on these regional color features, the watermark image embedding at a specific pixel location can be performed based on the specific embedding weight, thereby achieving a good semi-visible effect.

[0052] In addition, based on the above-mentioned watermark embedding method, this application embodiment also provides a method for enhancing the watermark image. In this method, the corresponding enhancement weight can be determined according to the regional color features of the area where the specific pixel point is located in the target image, and then the enhanced pixel value corresponding to each pixel position can be determined using the specific enhancement weight.

[0053] Both the embedding weights and the enhancement weights can be obtained through pre-testing.

[0054] In specific implementations, the technical solutions provided in this application can take various product forms. For example, in one approach, a tool-type product can be provided, including a standalone application or a lightweight application. In this way, users can input the desired carrier image and watermark image using this image processing tool, and the tool can then generate a target image with the watermark image added to the carrier image. Alternatively, users can input a target image with a semi-visible watermark image, and then the tool can enhance the display of the watermark image, and so on.

[0055] Or, in another way, such as Figure 1 As shown, the specific technical solutions provided in this application embodiment can also exist in the form of cloud services, etc. In this case, the specific embedding and / or enhancement processing can be abstracted into an interface and made available to users. In this way, users can realize the embedding or enhancement process of watermarked images by calling the interface, etc. For example, if a user is a platform providing ticketing information services, and the platform has a large number of images that need to be embedded with semi-visible watermarks, then the user can realize the embedding and / or enhancement processing of watermarked images by calling the interface provided in this application embodiment.

[0056] The specific technical solutions provided in the embodiments of this application will be described in detail below.

[0057] Example 1

[0058] First, this embodiment provides a method for embedding a watermark image, see [link to previous document]. Figure 2 The method may specifically include:

[0059] S201: Determine the carrier image and the watermark image, add position information according to the target of the watermark image, and align the carrier image and the watermark image in position;

[0060] In practical implementation, the first step is to acquire the carrier image and the watermark image. The carrier image can be any color digital image, while the watermark image can generally be a grayscale image or a color image. For tool-type products, the carrier image and watermark image can be directly received from the user's local input; for interface-type products, the user's call request can be received, and the carrier image and watermark image can be extracted from the request, and so on. The carrier image can be a static digital image, a frame from a video, or a digital image of printed material before printing, etc.

[0061] After determining the carrier image and the watermark image, the first step is to add positional information based on the target of the watermark image, aligning the carrier image and the watermark image. For example, if the watermark image needs to be embedded in all positions of the carrier image, that is, assuming the upper left corner of the carrier image is taken as the origin, then this origin (x0, y0) can be used as the starting position for adding the watermark. Specifically, before embedding, the watermark image can be tiled and / or cropped to generate a new watermark image with the same size as the carrier image. For instance, if the carrier image has a resolution of 512×512 and the watermark image is a grayscale image with a resolution of 256×256, then... Figure 3 As shown in (A) above. At this point, you can choose to tile the watermark image, that is, tile the watermark image to construct a new watermark image, as shown below. Figure 3 As shown in (B), the new watermark image is the same size as the carrier image. If the watermark image is larger than the carrier image, or if the new watermark image is larger than the carrier image after tiling, it can be cropped to match the carrier image size. Then, the new watermark image and the carrier image can be pixel-aligned. For example, the origin of the carrier image corresponds to the origin of the new watermark image; correspondingly, pixels at other locations in the carrier image can also be found in the new watermark image. During the subsequent embedding process, calculations can be performed based on the pixel values ​​at each pixel location in both the carrier image and the watermark image.

[0062] Of course, if the watermark image needs to be embedded in a portion of the carrier image, that is, if the starting point for embedding is not the origin of the carrier image but another location, such as (x1, y1), and the area to be embedded is not the entire area of ​​the carrier image but a part of it, then the watermark image can be constructed into a new watermark image with the area to be embedded by tiling and / or cropping. Then, when aligning the pixels, the origin of the new watermark image can be aligned with the starting point of the embedding location in the carrier image.

[0063] S202: For multiple pixel locations, the following processing is performed respectively: the regional color features of the area where the target pixel location is located in the carrier image are determined, the embedding weight is determined according to the regional color features, and the pixel value of the carrier image at the pixel location and the pixel value of the watermark image at the corresponding pixel location are obtained according to the embedding weight, the pixel value of the carrier image at the pixel location, and the pixel value of the watermark image at the corresponding pixel location.

[0064] After pixel alignment is completed, the pixel values ​​after watermark embedding can be calculated separately for multiple pixel locations. During the calculation, in addition to extracting the pixel values ​​at specific pixel locations in the carrier image and the watermark image, the regional color features of the area where the specific pixel location is located can also be determined.

[0065] Specifically, when extracting pixel values, a target color space can be determined first, so that the pixel values ​​of the carrier image and the watermark image can be read based on the target color space. Generally, a color space requiring less computation can be chosen. Specifically, the color space used by the image format of the carrier image when saving the image data can be determined as the target color space. For example, JPEG images are stored in the YUV color space, so to save computation time, the YUV color space can be chosen for embedding; BMP image files save data in the RGB color space, so to save computation time, the RGB color space can be chosen for embedding; besides this method of selecting a color space, the color space can also be freely specified by the user. Once the embedded color space is determined, it means that the embedding and enhancement parameters corresponding to that color space will be used subsequently.

[0066] There are several ways to determine the color characteristics of a region containing a pixel. One method is to use the region's pixel value to represent its color characteristics. The region's pixel value refers to the pixel value that represents the dominant color of a region. This region's pixel value can also be obtained in various ways. For example, one method involves first reading the pixel values ​​of multiple pixels surrounding the target pixel location; then, determining the region's pixel value based on the average of these surrounding pixel values. The size of the "region" can be determined according to actual needs; for example, it could be a 3×3 pixel region, or a 5×5 pixel region, and so on.

[0067] After determining the color features of a region, the corresponding embedding weights can be determined based on these features. In practice, suitable embedding weights for various colors can be pre-determined through testing and other methods, and the corresponding relationships can be saved. Thus, once the color features of a specific pixel location are determined, the appropriate embedding weight can be determined by querying the pre-saved relationships. Alternatively, the target color space can be pre-divided into multiple subspaces, and the correspondence between these subspaces and embedding weights can be saved for each. When determining the embedding weight based on the region's pixel values, the target subspace to which the region's pixel values ​​belong can first be determined, and then the target embedding weight corresponding to that subspace can be determined by querying the corresponding relationships.

[0068] Specifically, when testing the embedding weights, the pixel values ​​contained in the subspace can be mapped to a two-dimensional color image. Then, under various different embedding weights, a test watermark image can be embedded into the two-dimensional color image. Based on the display effect of the obtained embedding results, the embedding weight suitable for the subspace can be determined. That is, a test watermark image is embedded into the two-dimensional color image under various different embedding weights, and the embedding effect is observed to determine the most suitable embedding weight for the current subspace.

[0069] For example, assuming we choose the RGB color space for embedding and weight selection, and this color space has three channels (R, G, and B), with each channel's pixel value between 0 and 255, then the entire color space is a three-dimensional space. If we divide the entire color space into eight subspaces, then we can use... Figure 4 To represent the relationship between the color subspace and the entire color space ( Figure 4This only demonstrates one cubic spatial partitioning method (other spatial partitioning methods can also be used). For any color in the RGB color space, a corresponding sub-color space can be found. Each color sub-space corresponds to a set of embedding and enhancement weights, a total of 8 sets. Taking one set as an example, the color sub-space is converted into a color image. The conversion method can be based on the color arrangement. Suppose a color sub-space has 8 colors, namely (0,0,0), (0,0,1), (0,1,0), (0,1,1), (1,0,0), (1,0,1), (1,1,0), (1,1,1), then these 8 colors can be arranged in a left-to-right, top-to-bottom order to generate a 2×4 image, which is the color image corresponding to that color sub-space. In this embodiment, a color sub-space can consist of 128×128×128=2097152 colors, which can form a color image with a size of 1024×2048. For the color image generated in the color subspace, different weights are set to test the visual effects of embedding and enhancement, and then appropriate weights are selected for retention. For example, firstly, a test watermark image can be embedded into the two-dimensional color image under various different embedding weights, and the target embedding weight suitable for the subspace is determined based on the display effect of the obtained embedding results; then, under various different enhancement weights, the embedding results corresponding to the target embedding weight are enhanced, and the target enhancement weight suitable for the subspace is determined based on the display effect of the obtained enhancement results.

[0070] The above method allows us to obtain the embedding weights and enhancement weights corresponding to multiple color subspaces. Then, by querying the saved correspondences, we can determine the embedding weights corresponding to the regional color features of the current pixel location.

[0071] Furthermore, in practical implementation, besides considering the color features of the region where a specific pixel is located, the embedding weight can also be adjusted by combining the specific content features of the pixel location. For example, if the color at a certain pixel location is darker, the embedding weight can be relatively high if only the regional color factor is considered; however, if the content at that pixel location is a face image, a high embedding weight may affect the display of important content such as a face image. Therefore, the embedding weight can be appropriately reduced, and so on. In other words, in practical implementation, after determining the embedding weight based on the regional color features of the pixel location, the content features of the region where the target pixel location is located in the carrier image can also be obtained, and the embedding weight can be adjusted based on the content features.

[0072] There are various ways to obtain content features, such as through attention models or human visual models.

[0073] It should be noted that after adjusting the embedding weights based on the content features at the pixel location, enhancement may fail due to factors such as a reduction in weights. However, since not all pixel locations in the carrier image require adjustment of the embedding weights, even if failure occurs, it only affects a portion of the pixels; other locations can still be enhanced normally. Therefore, it will not have a significant impact on actual copyright verification or similar processes.

[0074] After determining the embedding weights, calculations can be performed at the current pixel location. Specifically, the pixel value after embedding the watermark at that pixel location can be calculated based on the pixel value of the carrier image at that pixel location, the pixel value of the watermark image at the corresponding pixel location, and the aforementioned embedding weights. For example, the specific calculation formula can be expressed as follows:

[0075]

[0076] Among them, o_n_p i w_n represents the pixel value of pixel position i in channel n of the color space in the original carrier image. i Represents o_n_p i The embedding weights corresponding to the color features of the region at the given location, m_n_p i w_n_p represents the corresponding pixel value in the watermark image. i This represents the pixel value corresponding to channel n in the image with the embedded watermark. Common color spaces have n = 3, such as RGB, YUV, and YCbCr, but there are also color spaces with n = 4, such as CMYK. It's important to note that the embedding process generally targets all color channels in the color space, and the weights for different channels are independent. Furthermore, α, β, and γ represent the embedding strength coefficients for a specific channel, w_n_b i Represents o_n_p i The weight correction bias corresponds to the region color. Both the embedding strength system and the weight correction bias described above can be used to correct the embedding weights; the former is a multiplicative correction, and the latter is an additive correction. In practical implementation, if no correction is needed, α, β, and γ can each take the value 1, w_n_b i It can take the value 0.

[0077] For example, suppose a carrier image has a resolution of 512*512, and the watermark image is a grayscale image with a resolution of 256*256. We choose to tile the watermark image to construct a new watermark image with the same size as the carrier image, and embed the watermark in the RGB color space. For the color at position (x, y) in the carrier image, let's assume the RGB pixel value at that position is o_n_p. x,yThe region has pixels (120, 45, 89) and its RGB mean color is (122, 47, 88). The corresponding embedding weight is found based on the region's pixel mean. Let's assume the corresponding embedding weight is w_n. x,y The values ​​are (0.4, 0.3, 0.5), α, β, and γ are (1, 1, 1), and w_n_b x,y The values ​​are (2, 5, 3). Additionally, assume the RGB pixel values ​​at the corresponding pixel positions in the tiled watermark image are m_n_p. x,y Given (255, 255, 255), the pixel values ​​after embedding the information can be calculated according to equation (1), rounded to the nearest whole number:

[0078]

[0079] That is, the pixel value after embedding the watermark image at this pixel position is (224, 127, 220).

[0080] S203: Generate the target image after embedding the watermark image based on the pixel values ​​of the watermark image after embedding it at multiple pixel positions.

[0081] By embedding the watermark image into multiple pixel positions of the carrier image in the manner described in step S202, the embedding process can be completed and the target image can be generated.

[0082] The scheme provided in Embodiment 1 allows for the calculation of embedded pixel values ​​based on multiple pixel locations when embedding a watermark image into a carrier image. Specifically, the embedding strength can be determined based on the regional color characteristics of the area where the pixel is located. This results in a well-defined semi-visible image after embedding and facilitates enhancement of the watermark image when copyright verification is required.

[0083] Example 2

[0084] After embedding the watermark image using the method described in Embodiment 1, the watermark image can be enhanced in various ways. For example, in one method, image processing tools can be used to adjust the chroma or hue of the target image with the watermark image added, thereby enhancing the watermark image. Alternatively, Embodiment 2 also provides a method for enhancing the display of a watermark image, see [link to documentation]. Figure 5 The method may specifically include:

[0085] S501: Determine the target image, which is generated by embedding a watermark image into the original carrier image. When embedding the watermark image, the embedding weight of the corresponding pixel position is determined according to the regional color features of the area where the target pixel position is located in the original carrier image, and the watermark image is embedded at the corresponding pixel position according to the embedding weight.

[0086] S502: For multiple pixel positions of the target image, the following processing is performed respectively: determine the regional color features of the area where the target pixel position is located in the target image, determine the enhancement weight according to the regional color features, and enhance the pixel value of the target image at the pixel position according to the enhancement weight;

[0087] The enhancement process can be performed on multiple pixel locations in the target image separately. When calculating for each pixel, enhancement weights can be determined based on the region's color features, and then the enhancement is calculated according to these weights.

[0088] The method for determining the enhancement weights is similar to that described in Example 1. Based on the color subspaces defined during embedding, the enhancement effect under different enhancement weights is tested sequentially for each watermarked sub-color image, and the enhancement weight corresponding to the best effect is recorded. Then, the enhancement weights corresponding to all color subspaces are determined sequentially. Thus, when enhancing a specific target image, the target subspace to which the region's color features belong can be determined first, and the target enhancement weight corresponding to that target subspace can be determined by querying the aforementioned correspondence.

[0089] After determining the enhancement weights corresponding to the regional color features at the current pixel location, specific calculations can be performed. For example, the specific enhancement method can be represented by equation (2):

[0090]

[0091] Among them, enhanced_p i w_n_p represents the extracted pixel value at pixel position i. i e_w_n represents the pixel value in channel n of the color space of the image to be extracted. i w_n_p i The region color corresponds to the weight used for enhancement. Where, e_w_b i w_n_p i The local color weight correction deviation can be used to adjust the enhancement weights when necessary; otherwise, it can be set to 0. It should be noted that watermark image enhancement generally targets all color channels in the color space, and the weights corresponding to different channels are unrelated.

[0092] For example, suppose watermark enhancement is performed in the RGB color space. For a certain location (x, y) in the image to be extracted, the RGB pixel value w_n_p at that location... x,yGiven a region (100, 50, 95), and RGB pixel values ​​of the region at that location (120, 60, 100), we find the corresponding enhancement weight based on the region color. Let's assume the corresponding enhancement weight is e_w_n. x,y For (0.2, 0.3, 0.5), e_w_b x,y Given 20, the enhanced pixel value at this pixel location can be calculated using equation (2) (rounded to the nearest whole number):

[0093]

[0094] S503: Generate an enhanced image based on the pixel values ​​after enhancement processing at multiple pixel locations.

[0095] After enhancing each pixel of the target image with the watermark image as described in S502, a grayscale image of the same size as the target image can be obtained, which is the enhanced image. For example, suppose the carrier image is as follows: Figure 6-1 As shown, the watermark image is as follows Figure 3 As shown in (A), the image after adding the watermark can be as follows: Figure 6-2 As shown, upon close inspection, the watermark image contained within can be observed; the enhanced image can be as follows: Figure 6-3 As shown, the specific watermark image can be clearly displayed.

[0096] Example 3

[0097] This third embodiment provides a copyright verification method for the application of the embodiments of this application in image copyright verification. See [link to relevant documentation]. Figure 7 The method may specifically include:

[0098] S701: Determine the target image to be verified for copyright. The target image is generated by embedding a watermark image into the original carrier image. When embedding the watermark image, the embedding weight of the corresponding pixel position is determined according to the regional color features of the area where the target pixel position is located in the original carrier image, and the watermark image is embedded at the corresponding pixel position according to the embedding weight.

[0099] The target image to be verified for copyright may include original images published on websites, or original images in printed materials such as offline promotional posters. Before publication or printing, such images can be embedded with watermarks in accordance with the methods provided in the embodiments of this application.

[0100] S702: For multiple pixel positions of the target image, the following processing is performed respectively: determine the regional color features of the area where the target pixel position is located in the target image, determine the enhancement weight according to the regional color features, and enhance the pixel value of the target image at the pixel position according to the enhancement weight;

[0101] S703: Extract the watermark image based on the enhancement processing result, so as to perform copyright verification on the target image based on the extracted watermark image.

[0102] Specifically, when copyright verification is required, since the watermark image is embedded according to the scheme provided in the embodiments of this application, the watermark image can first be enhanced according to the scheme provided in the embodiments of this application. After enhancing the watermark image, the watermark image can be extracted from the enhanced image, and then copyright verification can be performed based on the extracted watermark image. Specifically, copyright verification can be performed through image recognition or text extraction, etc., which will not be detailed here.

[0103] For the parts of Embodiments 2 and 3 that are not detailed, please refer to the description in Embodiment 1, which will not be repeated here.

[0104] Corresponding to Embodiment 1, this application also provides an apparatus for embedding a watermark image, see [link to embodiment]. Figure 8 The device may include:

[0105] Image preprocessing unit 801 is used to determine the carrier image and the watermark image, add position information according to the target of the watermark image, and align the carrier image and the watermark image in position.

[0106] The pixel value calculation unit 802 is used to perform the following processing for multiple pixel positions respectively: determine the regional color features of the area where the target pixel position is located in the carrier image, determine the embedding weight according to the regional color features, and obtain the pixel value of the carrier image at the pixel position and the pixel value of the watermark image at the corresponding pixel position according to the embedding weight, the pixel value of the carrier image at the pixel position, and the pixel value of the watermark image at the corresponding pixel position.

[0107] The target image generation unit 803 is used to generate a target image after embedding the watermark image based on the pixel values ​​of the watermark image after embedding it at multiple pixel positions.

[0108] In a specific implementation, the device may further include:

[0109] A color space determination unit is used to determine a target color space so as to read the pixel values ​​of the carrier image and the watermark image based on the target color space.

[0110] Specifically, the color space determination unit can be used for:

[0111] The color space used by the image format of the carrier image when saving image data is determined as the target color space.

[0112] Additionally, the device may also include:

[0113] The subspace partitioning unit is used to pre-divide the target color space into multiple subspaces and store the correspondence between the multiple subspaces and the embedding weights respectively;

[0114] The pixel value calculation unit can specifically be used for:

[0115] Determine the target subspace to which the region color belongs, and determine the target embedding weight corresponding to the target subspace by querying the correspondence.

[0116] In addition, the pixel value calculation unit may also include:

[0117] A mapping subunit is used to map the pixel values ​​contained in the subspace into a two-dimensional color image;

[0118] The weight determination subunit is used to embed the test watermark image into the two-dimensional color image under various different embedding weights, and to determine the embedding weight suitable for the subspace based on the display effect of the obtained embedding result.

[0119] Furthermore, the device may also include:

[0120] The weight correction unit is used to adjust the embedding effect by performing multiplicative and / or additive corrections on the embedding weights.

[0121] Additionally, the device may also include:

[0122] A content feature acquisition unit is used to acquire the content features of the region where the target pixel is located in the carrier image;

[0123] The weight adjustment unit is used to adjust the embedding weights according to the content features.

[0124] Specifically, the pixel value calculation unit may include:

[0125] A pixel value reading subunit is used to read the pixel values ​​of multiple pixel positions surrounding the target pixel position;

[0126] The mean calculation subunit is used to determine the color features of the region based on the mean of pixel values ​​at the surrounding multiple pixel locations.

[0127] Corresponding to Embodiment 2, this application also provides an apparatus for enhancing the display of a watermark image, see [link to embodiment]. Figure 9 The device may specifically include:

[0128] The target image determination unit 901 is used to determine the target image, which is generated by embedding a watermark image into the original carrier image. When embedding the watermark image, the embedding weight of the corresponding pixel position is determined according to the regional color features of the area where the target pixel position is located in the original carrier image, and the watermark image is embedded at the corresponding pixel position according to the embedding weight.

[0129] The enhancement processing unit 902 is used to perform the following processing on multiple pixel positions of the target image: determine the regional color features of the area where the target pixel position is located in the target image, determine the enhancement weight according to the regional color features, and enhance the pixel value of the target image at the pixel position according to the enhancement weight;

[0130] The watermark-enhanced image generation unit 903 is used to generate an enhanced image based on the pixel values ​​after enhancement processing at multiple pixel positions.

[0131] In a specific implementation, the device may further include:

[0132] A subspace partitioning unit is used to pre-divide the target color space into multiple subspaces and store the correspondence between the multiple subspaces and the enhancement weights; the target color space is the color space used when embedding the watermark image;

[0133] The enhancement processing unit can be specifically used to: determine the target subspace to which the color features of the region belong, and determine the target enhancement weight corresponding to the target subspace by querying the correspondence.

[0134] In addition, the enhancement processing unit may also include:

[0135] A mapping subunit is used to map the pixel values ​​contained in the subspace into a two-dimensional color image;

[0136] The embedding weight determination subunit is used to embed the test watermark image into the two-dimensional color image under various different embedding weights, and to determine the target embedding weight suitable for the subspace based on the display effect of the obtained embedding results.

[0137] The enhancement weight determination subunit is used to enhance the embedding result corresponding to the target embedding weight under various enhancement weights, and determine the target enhancement weight suitable for the subspace based on the display effect of the obtained enhancement result.

[0138] Corresponding to Embodiment 3, this application also provides a copyright verification device, see [link to embodiment]. Figure 10 The device may specifically include:

[0139] The target image determination unit 1001 is used to determine the target image to be verified for copyright. The target image is generated by embedding a watermark image into the original carrier image. When embedding the watermark image, the embedding weight of the corresponding pixel position is determined according to the regional color features of the area where the target pixel position is located in the original carrier image, and the watermark image is embedded at the corresponding pixel position according to the embedding weight.

[0140] The enhancement processing unit 1002 is configured to perform the following processing on multiple pixel positions of the target image: determine the regional color features of the area where the target pixel position is located in the target image, determine the enhancement weight according to the regional color features, and enhance the pixel value of the target image at the pixel position according to the enhancement weight;

[0141] The watermark image extraction unit 1003 is used to extract the watermark image based on the enhancement processing result, so as to perform copyright verification on the target image based on the extracted watermark image.

[0142] In addition, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in any of the foregoing method embodiments.

[0143] And a computer system, comprising:

[0144] One or more processors; and

[0145] A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method described in any of the foregoing method embodiments.

[0146] in, Figure 11 An exemplary computer system architecture is shown, which may include a processor 1110, a video display adapter 1111, a disk drive 1112, an input / output interface 1113, a network interface 1114, and a memory 1120. The processor 1110, video display adapter 1111, disk drive 1112, input / output interface 1113, network interface 1114, and memory 1120 can communicate with each other via a communication bus 1130.

[0147] The processor 1110 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.

[0148] The memory 1120 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1120 can store the operating system 1121 for controlling the operation of the electronic device 1100, and the basic input / output system (BIOS) for controlling the low-level operations of the electronic device 1100. Additionally, it can store a web browser 1123, a data storage management system 1124, and a watermark image processing system 1125, etc. The aforementioned watermark image processing system 1125 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when the technical solution provided in this application is implemented through software or firmware, the relevant program code is stored in the memory 1120 and is called and executed by the processor 1110.

[0149] Input / output interface 1113 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0150] Network interface 1114 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0151] Bus 1130 includes a pathway for transmitting information between various components of the device, such as processor 1110, video display adapter 1111, disk drive 1112, input / output interface 1113, network interface 1114, and memory 1120.

[0152] It should be noted that although the above-described device only shows the processor 1110, video display adapter 1111, disk drive 1112, input / output interface 1113, network interface 1114, memory 1120, bus 1130, etc., in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.

[0153] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0154] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0155] The watermark image embedding / enhancement method, apparatus, and computer system provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for embedding a watermark image, characterized in that, include: Determine the carrier image and the watermark image, add position information according to the target of the watermark image, construct the watermark image into a new watermark image with the same area as the area to be embedded, and align the new watermark image with the carrier image in terms of pixel position so that each pixel position in the new watermark image has a corresponding pixel position in the carrier image. A target color space is determined so that pixel values ​​at pixel locations in the carrier image and the new watermark image can be read based on the target color space. For multiple pixel locations in the carrier image, the following processing is performed: the regional color features of the area where the target pixel location is located in the carrier image are determined, and the target subspace to which the regional color belongs is determined. By querying the correspondence between multiple subspaces and embedding weights, the target embedding weight corresponding to the target subspace is determined. Based on the target embedding weight, the pixel value of the target pixel location in the carrier image, and the pixel value of the target pixel location in the new watermark image, the pixel value at the target pixel location in the carrier image after embedding the new watermark image is calculated. The target color space is pre-divided into multiple subspaces, and the correspondence between the multiple subspaces and the embedding weights is stored for each. Based on the pixel values ​​of the new watermark image embedded at multiple pixel positions in the carrier image, a target image is generated after the carrier image is embedded with the new watermark image.

2. The method according to claim 1, characterized in that, The determination of the target color space includes: The color space used by the image format of the carrier image when saving image data is determined as the target color space.

3. The method according to claim 1, characterized in that, Also includes: Map the pixel values ​​contained in the subspace into a two-dimensional color image; Under various different embedding weights, the test watermark image is embedded into the two-dimensional color image, and the embedding weight suitable for the subspace is determined based on the display effect of the obtained embedding results.

4. The method according to claim 1, characterized in that, Also includes: The embedding effect is adjusted by performing multiplicative and / or additive corrections on the embedding weights.

5. The method according to claim 1, characterized in that, Also includes: Obtain the content features of the region where the target pixel is located in the carrier image; The embedding weights are adjusted based on the content features.

6. The method according to any one of claims 1 to 5, characterized in that, The determination of the region color features of the area where the target pixel is located in the carrier image includes: Read the pixel values ​​of multiple pixel positions surrounding the target pixel position; The color features of the region are determined based on the average pixel value of the surrounding multiple pixel locations.

7. A method for enhancing the display of a watermarked image, characterized in that, include: A target image is determined, which is generated by embedding a watermark image into the original carrier image. During watermark image embedding, position information is added to the target watermark image to construct a new watermark image with an area equal to the area to be embedded. The new watermark image is then pixel-aligned with the original carrier image so that each pixel in the new watermark image has a corresponding pixel position in the original carrier image. A target color space is then determined so that pixel values ​​at pixel positions in both the original carrier image and the new watermark image can be read based on this target color space. The following processing is then performed on multiple pixel positions in the original carrier image: Determine the original carrier image... The system identifies the regional color features of the area where the target pixel is located in the image and determines the target subspace to which the regional color belongs. By querying the correspondence between multiple subspaces and embedding weights, the system determines the target embedding weight corresponding to the target subspace. Based on the target embedding weight, the pixel value of the target pixel in the original carrier image, and the pixel value of the target pixel in the new watermark image, the system calculates the pixel value of the target pixel in the original carrier image after embedding the new watermark image, so as to embed the new watermark image into multiple pixel positions in the original carrier image. The target color space is pre-divided into multiple subspaces, and the correspondence between the multiple subspaces and embedding weights is stored for each. The following processing is performed on multiple pixel locations in the target image: the regional color features of the area where the target pixel location is located in the target image are determined, the enhancement weight is determined based on the regional color features, and the pixel value of the target pixel location in the target image is enhanced based on the enhancement weight; An enhanced target image is generated based on the pixel values ​​after enhancement processing of multiple pixel positions in the target image.

8. The method according to claim 7, characterized in that, Also includes: Map the pixel values ​​contained in the subspace into a two-dimensional color image; Under various different embedding weights, the test watermark image is embedded into the two-dimensional color image, and the target embedding weight suitable for the subspace is determined based on the display effect of the obtained embedding results. Under various enhancement weights, the embedding results corresponding to the target embedding weights are enhanced, and the target enhancement weights suitable for the subspace are determined based on the display effect of the obtained enhancement results.

9. A copyright verification method, characterized in that, include: The target image to be verified for copyright is determined. This target image is generated by embedding a watermark image into the original carrier image. During watermark embedding, position information is added to the target watermark image to construct a new watermark image with an area equal to the area to be embedded. The new watermark image is then pixel-aligned with the original carrier image so that each pixel in the new watermark image has a corresponding pixel position in the original carrier image. A target color space is then determined so that the pixel values ​​of the pixel positions in the original carrier image and the pixel values ​​of the pixel positions in the new watermark image can be read based on the target color space. The following processing is then performed on multiple pixel positions in the original carrier image: [The text abruptly ends here, likely due to an incomplete sentence or missing information.] The system identifies the regional color features of the target pixel location in the original carrier image and determines the target subspace to which the regional color belongs. By querying the correspondence between multiple subspaces and embedding weights, it determines the target embedding weight corresponding to the target subspace. Based on the target embedding weight, the pixel value of the target pixel location in the original carrier image, and the pixel value of the target pixel location in the new watermark image, it calculates the pixel value of the target pixel location in the original carrier image after embedding the new watermark image, thereby embedding the new watermark image into multiple pixel locations in the original carrier image. The target color space is pre-divided into multiple subspaces, and the correspondence between each subspace and the embedding weight is stored. The following processing is performed on multiple pixel locations in the target image: the regional color features of the area where the target pixel location is located in the target image are determined; the enhancement weight is determined based on the regional color features; and the pixel value of the target pixel location in the target image is enhanced based on the enhancement weight. The watermark image is extracted based on the enhancement processing results, so that the target image can be used for copyright verification based on the extracted watermark image.

10. An apparatus for embedding a watermarked image, characterized in that, include: An image preprocessing unit is used to determine the carrier image and the watermark image, add position information according to the target of the watermark image, construct the watermark image into a new watermark image with the area to be embedded, and align the new watermark image with the carrier image in terms of pixel position so that each pixel position in the new watermark image has a corresponding pixel position in the carrier image. A pixel value calculation unit is used to determine a target color space so as to read the pixel values ​​of pixel positions in the carrier image and the pixel values ​​of pixel positions in the new watermark image based on the target color space. For multiple pixel positions in the carrier image, the following processing is performed: determining the regional color features of the area where the target pixel position is located in the carrier image, and determining the target subspace to which the regional color belongs; determining the target embedding weight corresponding to the target subspace by querying the correspondence between multiple subspaces and embedding weights; and calculating the pixel value of the new watermark image after embedding the new watermark image at the target pixel position in the carrier image based on the target embedding weight, the pixel value of the target pixel position in the carrier image, and the pixel value of the target pixel position in the new watermark image. The target color space is pre-divided into multiple subspaces, and the correspondence between the multiple subspaces and the embedding weights is stored for each. The target image generation unit is used to generate a target image of the carrier image after embedding the new watermark image based on the pixel values ​​of the new watermark image after embedding the new watermark image at multiple pixel positions in the carrier image.

11. An apparatus for enhancing the display of a watermarked image, characterized in that, include: A target image determination unit is used to determine a target image, which is generated by embedding a watermark image into an original carrier image. During watermark image embedding, the target position information of the watermark image is added to construct a new watermark image with an area equal to the area to be embedded. The new watermark image is then aligned with the original carrier image at pixel positions, so that each pixel position in the new watermark image has a corresponding pixel position in the original carrier image. A target color space is then determined so that the pixel values ​​of the pixel positions in the original carrier image and the pixel values ​​of the pixel positions in the new watermark image can be read based on the target color space. The following processing is performed on multiple pixel positions in the original carrier image: determining... The target color space of the target pixel location in the original carrier image is determined by analyzing its regional color features and identifying the target subspace to which the regional color belongs. The target embedding weight corresponding to the target subspace is determined by querying the correspondence between multiple subspaces and embedding weights. Based on the target embedding weight, the pixel value of the target pixel location in the original carrier image, and the pixel value of the target pixel location in the new watermark image, the pixel value of the target pixel location in the original carrier image after embedding the new watermark image is calculated. This process is used to embed the new watermark image into multiple pixel locations in the original carrier image. The target color space is pre-divided into multiple subspaces, and the correspondence between each subspace and the embedding weight is stored. An enhancement processing unit is configured to perform the following processing on multiple pixel locations of the target image: determine the regional color features of the area where the target pixel location is located in the target image, determine the enhancement weight based on the regional color features, and enhance the pixel value of the target pixel location in the target image based on the enhancement weight; The watermark-enhanced image generation unit is used to generate an enhanced target image based on the pixel values ​​after enhancement processing of multiple pixel positions in the target image.

12. A copyright verification device, characterized in that, include: A target image determination unit is used to determine the target image to be verified for copyright. The target image is generated by embedding a watermark image into an original carrier image. During watermark image embedding, the target position information of the watermark image is added to construct a new watermark image with an area equal to the area to be embedded. The new watermark image is then aligned pixel-wise with the original carrier image so that each pixel position in the new watermark image has a corresponding pixel position in the original carrier image. A target color space is then determined so that the pixel values ​​of the pixel positions in the original carrier image and the pixel values ​​of the pixel positions in the new watermark image can be read based on the target color space. The following steps are performed on multiple pixel positions in the original carrier image respectively. Processing: The color features of the region containing the target pixel in the original carrier image are determined, and the target subspace to which the region color belongs is determined. By querying the correspondence between multiple subspaces and embedding weights, the target embedding weight corresponding to the target subspace is determined. Based on the target embedding weight, the pixel value of the target pixel in the original carrier image, and the pixel value of the target pixel in the new watermark image, the pixel value at the target pixel location in the original carrier image after embedding the new watermark image is obtained. This is used to embed the new watermark image at the pixel location in the original carrier image. The target color space is pre-divided into multiple subspaces, and the correspondence between each subspace and the embedding weight is stored. An enhancement processing unit is configured to perform the following processing on multiple pixel locations of the target image: determine the regional color features of the area where the target pixel location is located in the target image, determine the enhancement weight based on the regional color features, and enhance the pixel value of the target pixel location in the target image based on the enhancement weight; The watermark image extraction unit is used to extract the watermark image based on the enhancement processing result, so as to perform copyright verification on the target image based on the extracted watermark image.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1 to 9.

14. A computer system, characterized in that, include: One or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Self-adapting watermarking algorithm of colorful image hypercomplex number spacing

    CN101246588A