Image processing method and device, readable medium and electronic equipment

By acquiring and enhancing the channel difference feature map of the watermark image, the problem of low extraction success rate of foreground watermarks in complex natural images is solved, and a higher success rate and accuracy of watermark extraction is achieved.

CN119228618AActive Publication Date: 2024-12-31BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310788305.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2024-12-31
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

The success rate of extraction of foreground watermarks in natural images with complex content on the screen is low, making it difficult to ensure the accurate extraction of watermark information.

Method used

By acquiring the channel difference feature map in the watermark image and performing feature enhancement processing, the first watermark enhancement feature map of the watermark image is generated, thereby reducing the interference of image content other than the watermark to the watermark, and improving the success rate of watermark extraction.

Benefits of technology

It effectively improves the accuracy and success rate of watermark extraction, especially when the screen displays natural images with complex colors and textures, ensuring the accurate extraction of watermark information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228618A_ABST
    Figure CN119228618A_ABST
Patent Text Reader

Abstract

The invention relates to an image processing method and device, a readable medium and electronic equipment, watermark features of a watermark image can be enhanced, and the extraction success rate of subsequent watermark extraction.The method comprises the steps that the watermark image is obtained, the watermark image is an image embedded with a foreground watermark, and the foreground watermark is generated by watermark information; determining a first image channel in which the foreground watermark is embedded and a second image channel in which the foreground watermark is not embedded in the watermark image, and determining a channel difference feature map of the watermark image according to channel information of the first image channel and channel information of the second image channel; and feature enhancement processing is carried out on the channel difference feature map to obtain a first watermark enhancement feature map of the watermark image, and the first watermark enhancement feature map is used for extracting watermark information of the watermark image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular, to an image processing method, device, readable medium and electronic device. Background Art

[0002] With the rapid development of Internet technology, a large amount of multimedia content such as pictures is spread on the Internet every day. If pictures with confidential information are posted to public social media without authorization, it will pose a great threat to information security.

[0003] In related technologies, digital watermark technology is an important means of tracing the leakage of multimedia information such as pictures, among which the foreground watermark is a carrier-independent anti-leakage watermark technology. However, since the screen display content will interfere with the foreground watermark, it is difficult to guarantee the success rate of extracting the watermark. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides an image processing method, the method comprising:

[0006] Acquire a watermark image, wherein the watermark image is an image embedded with a foreground watermark, and the foreground watermark is generated by watermark information;

[0007] Determine a first image channel in which the foreground watermark is embedded and a second image channel in which the foreground watermark is not embedded in the watermark image, and determine a channel difference feature map of the watermark image according to channel information of the first image channel and channel information of the second image channel;

[0008] The channel difference feature map is subjected to feature enhancement processing to obtain a first watermark enhancement feature map of the watermark image, and the first watermark enhancement feature map is used to extract watermark information of the watermark image.

[0009] In a second aspect, the present disclosure provides an image processing device, the device comprising:

[0010] An acquisition module, used for acquiring a watermark image, wherein the watermark image is an image embedded with a foreground watermark, and the foreground watermark is generated by watermark information;

[0011] a determination module, configured to determine a first image channel in which the foreground watermark is embedded and a second image channel in which the foreground watermark is not embedded in the watermark image, and determine a channel difference feature map of the watermark image according to the channel information of the first image channel and the channel information of the second image channel;

[0012] The feature enhancement module is used to perform feature enhancement processing on the channel difference feature map to obtain a first watermark enhancement feature map of the watermark image, and the first watermark enhancement feature map is used to extract watermark information of the watermark image.

[0013] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of any one of the methods described in the first aspect.

[0014] In a fourth aspect, the present disclosure provides an electronic device, including:

[0015] a storage device having a computer program stored thereon;

[0016] A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods in the first aspect.

[0017] Through the above technical solution, the watermark image is first obtained, and then the first image channel in which the foreground watermark is embedded and the second image channel in which the foreground watermark is not embedded are determined in the watermark image, and the channel difference feature map of the watermark image is determined according to the channel information of the first image channel and the channel information of the second image channel, and finally the channel difference feature map is subjected to feature enhancement processing to obtain the first watermark enhanced feature map of the watermark image. By adopting the above method, the watermark feature of the watermark image can be enhanced, and the interference of other image contents of the watermark image except the foreground watermark on the foreground watermark is reduced, so that the watermark feature part is paid more attention to in the subsequent watermark extraction, thereby improving the extraction success rate of the watermark extraction.

[0018] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0020] Figure 1 is a schematic diagram of embedding a foreground watermark according to an exemplary embodiment of the present disclosure;

[0021] Figure 2is a schematic diagram of an image processing method provided according to an exemplary embodiment of the present disclosure;

[0022] Figure 3 is a schematic diagram of another image processing method provided according to an exemplary embodiment of the present disclosure;

[0023] Figure 4 It is a schematic diagram comparing the success rates of watermark extraction after image processing and direct watermark extraction according to an exemplary embodiment of the present disclosure;

[0024] Figure 5 is a block diagram of an image processing device provided according to an exemplary embodiment of the present disclosure;

[0025] Figure 6 It is a structural diagram of an electronic device provided according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0032] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0033] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0034] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0035] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0036] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0037] Digital watermarking technology is a technology that hides secret information in a carrier object. It is mainly used for copyright protection of digital products and tracing the source of information leakage. Its carrier can be digital images, videos, audio, etc. According to whether the watermark is visible to the naked eye, we can divide watermarks into visible watermarks and invisible watermarks. Digital watermarks use the redundancy of data to embed specific identification information into the carrier content. The identification can mark the copyright ownership of the digital content, author information, etc. If there is a risk of infringement and leakage of digital products, the copyright owner can obtain the embedded copyright information through the digital watermark to trace the source of the leakage and the infringer of the digital product.

[0038] With the rapid development of Internet technology, a large amount of multimedia content such as pictures is spread on the Internet every day. If pictures with confidential information are posted to public social media without authorization, it will pose a great threat to information security. Digital watermarking technology is an important means to trace the leakage of multimedia information such as pictures. Once a picture carrying confidential information is leaked through means such as screenshots, the source of the leak can be located through the leaked picture, realizing the tracing of the responsibility for the confidentiality leak.

[0039] In the related technology, the foreground watermark is a carrier-independent anti-leakage watermark technology, also known as the screen foreground watermark or screen watermark, which is an invisible watermark. Foreground watermarks can be applied to devices such as monitors and laptops that may display confidential information, and embedded in the foreground of the display device in the form of a transparent layer. In the specific application process, the information needed for tracing, including device ID, user ID, timestamp and other information, is uniformly encoded to generate a unique watermark ID (watermark code), and the watermark ID is used to generate a transparent watermark layer of a fixed size according to the watermark embedding algorithm. The transparent watermark layer is then embedded in the foreground of the display device in a tiled manner, and the display content of the device is used as the background to achieve the embedding of the watermark. Among them, the content of the watermark layer is not limited by the display content, and the display content does not need to participate in the generation of the watermark layer. Figure 1 As shown, the content finally displayed on the device screen is the superposition of the watermark layer and the display content.

[0040] Then, in the process of extracting the foreground watermark, the watermark image (such as a screenshot) embedded with the watermark layer is input into the watermark extraction algorithm, and the watermark ID extracted by the watermark extraction algorithm can be used to trace the source of the leak. However, the extraction effect of the foreground watermark is affected by the displayed content, which will interfere with the watermark layer. For example, when the screen display content is a natural image with complex colors and textures, it is difficult to guarantee the success rate of extracting the watermark.

[0041] In view of this, the embodiments of the present disclosure provide an image processing method, device, readable medium and electronic device, which can enhance the watermark features of a watermark image, reduce the interference of other image contents of the watermark image except the foreground watermark on the foreground watermark, so that the subsequent watermark extraction pays more attention to the watermark feature part, thereby improving the success rate of watermark extraction. In particular, for watermark images obtained when the screen display content is a natural image with complex colors and textures, the success rate of watermark extraction can be effectively improved.

[0042] The embodiments of the present disclosure are further explained below with reference to the accompanying drawings.

[0043] Figure 2is a flowchart of an image processing method according to an exemplary embodiment of the present disclosure. Figure 2 , the method comprising:

[0044] S201: Obtain a watermark image.

[0045] The watermark image is an image embedded with a foreground watermark, and the foreground watermark is generated by the watermark information.

[0046] S202: Determine a first image channel in which a foreground watermark is embedded and a second image channel in which a foreground watermark is not embedded in the watermark image, and determine a channel difference feature map of the watermark image according to channel information of the first image channel and channel information of the second image channel.

[0047] It should be noted that in the related art, in the embedding process of the foreground watermark, a color channel is usually selected in the RGB (three primary colors) color space as the watermark channel, and the watermark layer will only be embedded in the selected color channel, and other color channels will not be affected by the watermark layer. For example, a foreground watermark algorithm first generates a watermark layer by encoding the binary watermark (composed of 0 and 1). There is a difference between the area representing 0 and the area representing 1 in the watermark layer. The content of the watermark layer is only related to the watermark encoding and is not affected by the display content of the screen. The watermark layer is embedded in the color channel selected in the RGB color space in the form of a foreground layer to achieve watermark embedding.

[0048] Therefore, the watermark feature of the watermark image can be enhanced by the channel difference between the image channel in which the foreground watermark is embedded and the image channel in which the foreground watermark is not embedded in the watermark image.

[0049] In a possible manner, the watermark image is a three-primary color channel image, and determining a first image channel in which a foreground watermark is embedded and a second image channel in which a foreground watermark is not embedded in the watermark image may include: using the channel in which the foreground watermark is embedded in the three-primary color channel image as the first image channel, setting the channel value of each pixel in the three-primary color channel image in the first image channel to zero to obtain a first image, performing color space conversion on the first image to obtain a second image including a brightness channel, and using the brightness channel in the second image as the second image channel.

[0050] It should be understood that the foreground watermark algorithm exemplified above is obtained by embedding the color channel of the three-primary color space, so the watermark image obtained is a three-primary color channel image. If the initial watermark image is not a three-primary color channel image, it can be first processed into the three-primary color space through color space conversion, and then the subsequent image processing process can be carried out. In addition, if other foreground watermark algorithms are used to embed channels of other color spaces, the watermark image can also be an image of other color spaces, and the channel embedded with the foreground watermark is used as the first image channel. This disclosure does not specifically limit this.

[0051] For example, the channel in which the foreground watermark is embedded in the three-primary color channel image is channel X (i.e., the watermark channel). Channel X is used as the first image channel, and then the channel value of each pixel in the three-primary color channel image in the first image channel is set to zero. For example, the RGB channel value of a certain pixel is (x, y, z), where x is the channel value of channel X. After setting to zero, the RGB channel value of the pixel is (0, y, z). After processing each pixel, the first image is obtained. It should be understood that the first image is an image in which all information of the watermark channel is erased.

[0052] For example, the first image is converted into a color space to obtain a second image including a brightness channel, for example, it can be converted into a YUV channel image, and similarly, it can also be a Y'UV channel image, a YCbCr channel image, a YPbPr channel image, and other channel images including a brightness channel. For details, reference can be made to related technologies, and the present disclosure does not limit this. Wherein, Y represents brightness, and channel Y can be used as the second image channel.

[0053] In a possible manner, the watermark image includes multiple pixels, and determining the channel difference feature map of the watermark image according to the channel information of the first image channel and the channel information of the second image channel can include: for each pixel, determining the first channel value of the pixel in the first image channel and the second channel value of the pixel in the second image channel, and determining the difference between the first channel value and the second channel value; determining the channel difference feature map of the watermark image according to multiple difference values ​​corresponding to the multiple pixels, wherein the feature value corresponding to each pixel in the channel difference feature map is the difference value corresponding to the pixel.

[0054] For example, for each pixel in the watermark image, the first channel value of the pixel in the first image channel and the second channel value of the pixel in the second image channel are determined, and then the difference between the first channel value and the second channel value is determined, and then the difference is used as the feature value of the pixel, and then according to the multiple difference values ​​corresponding to the multiple pixels, the channel difference feature map of the watermark image is determined.

[0055] S203: Perform feature enhancement processing on the channel difference feature map to obtain a first watermark enhanced feature map of the watermark image.

[0056] Among them, the first watermark enhancement feature map is used to extract watermark information of the watermark image.

[0057] For example, after obtaining the channel difference feature map, feature enhancement processing can be performed to enhance the watermark features in the watermark image, so that subsequent watermark extraction pays more attention to the watermark feature part, thereby improving the accuracy and success rate of watermark extraction.

[0058] In a possible manner, performing feature enhancement processing on the channel difference feature map to obtain a first watermark enhanced feature map of the watermark image may include: performing normalization processing on the channel difference feature map to obtain the first watermark enhanced feature map of the watermark image.

[0059] It should be understood that since the difference calculated for each pixel point has a large distribution range, the differences corresponding to all pixels can be normalized to integers in the interval [0, 255] to obtain the first watermark enhancement feature map of the watermark image.

[0060] For example, the eigenvalue corresponding to each pixel point in the channel difference feature map of the watermark image is the difference value corresponding to the pixel point, and the channel difference feature map of the watermark image is normalized to obtain the first watermark enhanced feature map of the watermark image, wherein the eigenvalue corresponding to each pixel point in the first watermark enhanced feature map of the watermark image is an integer in the interval [0, 255].

[0061] It is worth noting that the above process of determining the first watermark enhancement feature map is actually to enhance the color channel where the foreground watermark is located, and use other color channels without foreground watermarks as prior knowledge to suppress the content in the watermark channel that is not related to the foreground watermark, thereby enhancing the strength of the watermark feature in the watermark image and reducing the interference of complex textures in natural images on the extraction of watermark information.

[0062] In a possible manner, the first watermark enhancement feature map includes multiple pixel points, and the method may also include: obtaining a characteristic value of each pixel point in the first watermark enhancement feature map, and determining a characteristic threshold value based on multiple characteristic values ​​corresponding to the multiple pixel points; performing binarization processing based on the numerical relationship between the characteristic value of each pixel point in the first watermark enhancement feature map and the characteristic threshold value to obtain a second watermark enhancement feature map of the watermark image, wherein the second watermark enhancement feature map is used to extract watermark information of the watermark image.

[0063] It should be noted that the first watermark enhancement feature map of the watermark image is binarized to make the first watermark enhancement feature map with different eigenvalue distributions Figure 2 The feature with only two characteristic values ​​of 0 and 1 is similar to the watermark layer which also has only two codes of 0 and 1. Affected by the display content of the background of the device, the areas representing 0 and 1 codes in the watermark image will change accordingly. Binarization can weaken the influence of such display content on the watermark layer.

[0064] For example, the feature value of each pixel in the first watermark enhancement feature map can be obtained, and the feature value histogram can be statistically calculated. The feature threshold is determined based on the feature histogram, for example, the average value of all feature values, the weighted average value, etc. are selected as the feature threshold, which can be set according to needs, and the present disclosure does not limit this. Then, the feature value of each pixel in the first watermark enhancement feature map is compared with the feature threshold. If the feature value is less than the feature threshold, the feature value is set to 0, and the feature value greater than or equal to the feature threshold is set to 1, and so on, to obtain the second watermark enhancement feature map of the watermark image.

[0065] In addition, since natural images have similar characteristics in pixel values ​​in local areas during image processing, more detailed features can be obtained by segmenting the natural images into blocks, and the local features of the foreground watermark can be obtained, which can not only improve the image recognition rate, but also accelerate the image processing efficiency.

[0066] Therefore, in a possible manner, determining the feature threshold according to multiple feature values ​​corresponding to multiple pixel points may include: dividing the first watermark enhancement feature map according to a preset size to obtain multiple sub-feature maps; for each sub-feature map, determining the sub-feature threshold corresponding to the sub-feature map according to the feature values ​​of the pixels in the sub-feature map.

[0067] For example, the preset size can be set according to experience and demand, and the present disclosure does not limit this. The first watermark enhancement feature map is divided according to the preset size. If the size of the first watermark enhancement feature map cannot be divided evenly according to the preset size, the indivisible part can be cut off to obtain multiple sub-feature maps. If the size of the first watermark enhancement feature map is smaller than the preset size, no division is performed. Then, a feature value histogram is statistically calculated for each sub-feature map, and a sub-feature threshold corresponding to the sub-feature map is determined according to the feature value histogram.

[0068] Further, binarization processing is performed according to the numerical relationship between the characteristic value of each pixel point in the first watermark enhancement feature map and the characteristic threshold value to obtain a second watermark enhancement feature map of the watermark image, which may include: for each sub-feature map, binarization processing is performed according to the numerical relationship between the characteristic value of each pixel point in the sub-feature map and the sub-feature threshold value corresponding to the sub-feature map to obtain a target sub-feature map; and the second watermark enhancement feature map of the watermark image is determined according to multiple target sub-feature maps.

[0069] Among them, the binarization process of the sub-feature map can refer to the binarization process of the first watermark enhancement feature map, and the present disclosure will not repeat it here.

[0070] In a possible manner, for each sub-feature map, determining the sub-feature threshold corresponding to the sub-feature map according to the feature values ​​of the pixels in the sub-feature map may include: for each sub-feature map, performing the following operations: determining a pixel histogram according to the feature values ​​of each pixel in the sub-feature map; determining a preset number of target feature values ​​with the largest distribution in the pixel histogram, and the distribution number of each target feature value in the pixel histogram; for each target feature value, determining the ratio of the distribution number corresponding to the target feature value to the total distribution number corresponding to the preset number of target feature values, and using the ratio as the weight value of the target feature value; calculating a weighted average based on the preset number of target feature values ​​and the weight values ​​corresponding to the preset number of target feature values, and using the weighted average as the sub-feature threshold corresponding to the sub-feature map.

[0071] For example, for the pixel histogram corresponding to each sub-feature map, a preset number of feature values ​​with the highest height are counted, that is, a preset number of target feature values ​​with the largest number of distributions, for example, the preset number is 2, and the weighted average value can be calculated as the sub-feature threshold corresponding to the sub-feature map by the following calculation formula:

[0072]

[0073] Wherein, avg represents the weighted average, p1 and p2 represent the two target feature values ​​with the largest distribution, h1 represents the distribution quantity corresponding to p1, and h2 represents the distribution quantity corresponding to p2. In addition, the process of determining the feature threshold of the first watermark enhancement feature map is consistent with the process of determining the sub-feature value of the sub-feature map.

[0074] It is worth noting that the above process of determining the second watermark enhancement feature map can further enhance the watermark feature of the watermark image.

[0075] By adopting the above method, the interference of other image contents of the watermark image except the foreground watermark on the foreground watermark is reduced by extracting the channel difference feature map of the watermark image, and then the first watermark enhanced feature map is obtained through the feature enhancement process, and the feature can be further enhanced through binarization to obtain the second watermark enhanced feature map, so that the subsequent watermark extraction pays more attention to the watermark feature part, thereby improving the accuracy and success rate of watermark extraction. In particular, for watermark images obtained when the screen display content is a natural image with complex colors and textures, the success rate of watermark extraction can be effectively improved.

[0076] Figure 3 is a flowchart of an image processing method according to an exemplary embodiment of the present disclosure. Figure 3After obtaining the watermark image, if the watermark embedding channel of the watermark image is inconsistent with the current color space of the watermark image, a color space conversion can be performed, such as RGB color space conversion. Then the channel value of the watermark channel X is obtained, and the image after removing the watermark channel is converted to YUV color space, and then the channel value of the channel Y is obtained, and then the channel difference between the watermark channel X and the channel Y is calculated, and the first watermark enhancement feature map is obtained after normalization. The first watermark enhancement feature map is divided according to a preset size to obtain at least one sub-feature map, and the sub-feature map is histogram-statisticed, and then the feature threshold is determined based on the histogram, and the binary processing is performed according to the numerical relationship between the feature value corresponding to each pixel point in the sub-feature map and the feature threshold, to obtain the second watermark enhancement feature map, and the second watermark enhancement feature map is used to extract the watermark information of the watermark image.

[0077] It should be understood that the first watermark enhancement feature map can be selected to extract the watermark information of the watermark image, or the second watermark enhancement feature map can be selected to extract the watermark information of the watermark image. For example, for natural images with more complex colors and textures, the second watermark enhancement feature map can be selected to obtain more watermark features to facilitate the extraction of watermark information of the watermark image. Generally speaking, the more watermark features there are, the higher the accuracy and success rate of watermark extraction, but the image processing process for obtaining watermark features also requires more computing resources. Therefore, the first watermark enhancement feature map or the second watermark enhancement feature map can be selected according to needs to extract the watermark information of the watermark image, and the present disclosure does not limit this.

[0078] For example, a watermark extraction algorithm may be used to extract watermarks from a watermark enhancement feature map (which may be a first watermark enhancement feature map or a second watermark enhancement feature map, hereinafter collectively referred to as a watermark enhancement feature map), and the watermark extraction algorithm is determined based on a watermark embedding algorithm, which is not specifically limited in the present disclosure. A watermark extraction model may also be used to extract watermarks from a watermark enhancement feature map, and the watermark extraction model may be a pre-trained deep learning model, a convolutional neural network model, etc., which is not specifically limited in the present disclosure.

[0079] It is worth noting that the watermark enhancement feature map of the watermark image obtained by the above-mentioned image processing method enhances the watermark feature of the watermark image and reduces the interference of other image contents of the watermark image except the foreground watermark on the foreground watermark, so that the watermark extraction algorithm or watermark extraction model pays more attention to the watermark feature part, thereby improving the accuracy and success rate of watermark extraction. In particular, for watermark images obtained when the screen display content is a natural image with complex colors and textures, it can effectively improve the accuracy and success rate of watermark extraction. Figure 4In practical applications, watermark extraction is performed on the watermark enhancement feature map of the watermark image obtained by the above image processing method. Compared with directly extracting watermarks from the watermark image, the success rate of watermark extraction is significantly improved.

[0080] Based on the same inventive concept, the present disclosure provides an image processing device, referring to Figure 5 , the device 500 comprises:

[0081] The acquisition module 501 is used to acquire the watermark image.

[0082] The watermark image is an image embedded with a foreground watermark, and the foreground watermark is generated by watermark information.

[0083] The determination module 502 is used to determine a first image channel in which the foreground watermark is embedded and a second image channel in which the foreground watermark is not embedded in the watermark image, and determine a channel difference feature map of the watermark image according to the channel information of the first image channel and the channel information of the second image channel.

[0084] The feature enhancement module 503 is used to perform feature enhancement processing on the channel difference feature map to obtain a first watermark enhanced feature map of the watermark image.

[0085] The first watermark enhancement feature map is used to extract watermark information of the watermark image.

[0086] Optionally, the watermark image includes a plurality of pixels, and the determining module 502 includes:

[0087] A first determination submodule, configured to determine, for each pixel, a first channel value of the pixel in a first image channel and a second channel value of the pixel in a second image channel, and determine a difference between the first channel value and the second channel value;

[0088] The second determining submodule is used to determine a channel difference feature map of the watermark image according to the multiple difference values ​​corresponding to the multiple pixel points, wherein the feature value corresponding to each pixel point in the channel difference feature map is the difference value corresponding to the pixel point.

[0089] Optionally, the feature enhancement module 503 is used to:

[0090] The channel difference feature map is normalized to obtain a first watermark enhancement feature map of the watermark image.

[0091] Optionally, the first watermark enhancement feature map includes a plurality of pixel points, and the device 500 further includes:

[0092] A feature threshold determination module, used to obtain a feature value of each pixel in the first watermark enhancement feature map, and determine a feature threshold according to a plurality of feature values ​​corresponding to the plurality of pixels;

[0093] A binarization processing module is used to perform binarization processing according to the numerical relationship between the characteristic value of each pixel point in the first watermark enhancement feature map and the characteristic threshold, so as to obtain a second watermark enhancement feature map of the watermark image, and the second watermark enhancement feature map is used to extract the watermark information of the watermark image.

[0094] Optionally, the feature threshold determination module is used to:

[0095] Dividing the first watermark enhancement feature map according to a preset size to obtain a plurality of sub-feature maps;

[0096] For each of the sub-feature maps, determining a sub-feature threshold corresponding to the sub-feature map according to feature values ​​of pixels in the sub-feature map;

[0097] The binarization processing module is used for:

[0098] For each of the sub-feature maps, binarization processing is performed according to a numerical relationship between a feature value of each pixel in the sub-feature map and the sub-feature threshold corresponding to the sub-feature map to obtain a target sub-feature map;

[0099] A second watermark enhancement feature map of the watermark image is determined according to the multiple target sub-feature maps.

[0100] Optionally, the feature threshold determination module is used to:

[0101] For each of the sub-feature graphs, perform the following operations:

[0102] Determine a pixel histogram according to the feature value of each pixel in the sub-feature map;

[0103] Determine a preset number of target feature values ​​with the largest distribution in the pixel histogram, and the distribution number of each of the target feature values ​​in the pixel histogram;

[0104] For each of the target feature values, determine the ratio of the distribution quantity corresponding to the target feature value to the total distribution quantity corresponding to the preset number of target feature values, and use the ratio as the weight value of the target feature value;

[0105] Based on the preset number of target feature values ​​and the weight values ​​corresponding to the preset number of target feature values, a weighted average value is calculated, and the weighted average value is used as the sub-feature threshold corresponding to the sub-feature map.

[0106] Optionally, the watermark image is a three-primary color channel image, and the determination module is used to:

[0107] Using the channel in which the foreground watermark is embedded in the three primary color channel image as the first image channel;

[0108] The channel value of each pixel in the three primary color channel image in the first image channel is set to zero to obtain a first image, the first image is converted into a color space to obtain a second image including a brightness channel, and the brightness channel in the second image is used as the second image channel.

[0109] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0110] Based on the same concept, an embodiment of the present disclosure further provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the above-mentioned image processing method are implemented.

[0111] Based on the same concept, an embodiment of the present disclosure further provides an electronic device, including:

[0112] a storage device having a computer program stored thereon;

[0113] The processing device is used to execute the computer program in the storage device to implement the steps of the above-mentioned image processing method.

[0114] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include but is not limited to electronic devices such as mobile phones, notebook computers, PADs (tablet computers), desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0115] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0116] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0117] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0118] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0119] In some embodiments, any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) can be used for communication, and can be interconnected with any form or medium of digital data communication (e.g., communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), internets (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.

[0120] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0121] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a watermark image, where the watermark image is an image embedded with a foreground watermark, and the foreground watermark is generated by watermark information; determines a first image channel in which the foreground watermark is embedded and a second image channel in which the foreground watermark is not embedded in the watermark image, and determines a channel difference feature map of the watermark image based on the channel information of the first image channel and the channel information of the second image channel; performs feature enhancement processing on the channel difference feature map to obtain a first watermark enhancement feature map of the watermark image, and the first watermark enhancement feature map is used to extract the watermark information of the watermark image.

[0122] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0124] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, an acquisition module may also be described as a "module for acquiring a watermark image".

[0125] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0126] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0127] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0128] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0129] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. An image processing method, characterized in that: The method comprises: Acquire a watermark image, wherein the watermark image is an image embedded with a foreground watermark, and the foreground watermark is generated by watermark information; Determine a first image channel in which the foreground watermark is embedded and a second image channel in which the foreground watermark is not embedded in the watermark image, and determine a channel difference feature map of the watermark image according to channel information of the first image channel and channel information of the second image channel; The channel difference feature map is subjected to feature enhancement processing to obtain a first watermark enhancement feature map of the watermark image, and the first watermark enhancement feature map is used to extract watermark information of the watermark image.

2. The method according to claim 1, characterized in that The watermark image includes a plurality of pixels, and determining the channel difference feature map of the watermark image according to the channel information of the first image channel and the channel information of the second image channel includes: For each pixel, determine a first channel value of the pixel in a first image channel and a second channel value of the pixel in a second image channel, and determine a difference between the first channel value and the second channel value; A channel difference feature map of the watermark image is determined according to the multiple difference values ​​corresponding to the multiple pixel points, wherein the feature value corresponding to each pixel point in the channel difference feature map is the difference value corresponding to the pixel point.

3. The method according to claim 2, characterized in that The performing feature enhancement processing on the channel difference feature map to obtain a first watermark enhancement feature map of the watermark image includes: The channel difference feature map is normalized to obtain a first watermark enhancement feature map of the watermark image.

4. The method according to claim 1, characterized in that The first watermark enhancement feature map includes a plurality of pixel points, and the method further includes: Obtaining a feature value of each pixel in the first watermark enhancement feature map, and determining a feature threshold according to a plurality of feature values ​​corresponding to the plurality of pixels; Binarization is performed based on the numerical relationship between the characteristic value of each pixel point in the first watermark enhancement feature map and the characteristic threshold to obtain a second watermark enhancement feature map of the watermark image, and the second watermark enhancement feature map is used to extract watermark information of the watermark image.

5. The method according to claim 4, characterized in that The determining a feature threshold according to the plurality of feature values ​​corresponding to the plurality of pixel points includes: Dividing the first watermark enhancement feature map according to a preset size to obtain a plurality of sub-feature maps; For each of the sub-feature maps, determining a sub-feature threshold corresponding to the sub-feature map according to feature values ​​of pixels in the sub-feature map; The binarization process is performed according to the numerical relationship between the characteristic value of each pixel in the first watermark enhancement characteristic map and the characteristic threshold value to obtain the second watermark enhancement characteristic map of the watermark image, comprising: For each of the sub-feature maps, binarization processing is performed according to a numerical relationship between a feature value of each pixel in the sub-feature map and the sub-feature threshold corresponding to the sub-feature map to obtain a target sub-feature map; A second watermark enhancement feature map of the watermark image is determined according to the multiple target sub-feature maps.

6. The method according to claim 5, characterized in that The determining, for each of the sub-feature maps, a sub-feature threshold corresponding to the sub-feature map according to the feature values ​​of the pixels in the sub-feature map, comprises: For each of the sub-feature graphs, perform the following operations: Determine a pixel histogram according to the feature value of each pixel in the sub-feature map; Determine a preset number of target feature values ​​with the largest distribution in the pixel histogram, and the distribution number of each of the target feature values ​​in the pixel histogram; For each of the target feature values, determine the ratio of the distribution quantity corresponding to the target feature value to the total distribution quantity corresponding to the preset number of target feature values, and use the ratio as the weight value of the target feature value; Based on the preset number of target feature values ​​and the weight values ​​corresponding to the preset number of target feature values, a weighted average value is calculated, and the weighted average value is used as the sub-feature threshold corresponding to the sub-feature map.

7. The method according to any one of claims 1 to 6, characterized in that: The watermark image is a three-primary color channel image, and determining a first image channel in which the foreground watermark is embedded and a second image channel in which the foreground watermark is not embedded in the watermark image comprises: Using the channel in which the foreground watermark is embedded in the three primary color channel image as the first image channel; The channel value of each pixel in the three primary color channel image in the first image channel is set to zero to obtain a first image, the first image is converted into a color space to obtain a second image including a brightness channel, and the brightness channel in the second image is used as the second image channel.

8. An image processing device, characterized in that: The device comprises: An acquisition module, used for acquiring a watermark image, wherein the watermark image is an image embedded with a foreground watermark, and the foreground watermark is generated by watermark information; a determination module, configured to determine a first image channel in which the foreground watermark is embedded and a second image channel in which the foreground watermark is not embedded in the watermark image, and determine a channel difference feature map of the watermark image according to the channel information of the first image channel and the channel information of the second image channel; The feature enhancement module is used to perform feature enhancement processing on the channel difference feature map to obtain a first watermark enhancement feature map of the watermark image, and the first watermark enhancement feature map is used to extract watermark information of the watermark image.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Blood vessel diameter measuring method based on digital image processing technology

    CN101984916A

  • Digital image watermark embedding method, digital image watermark extracting method, digital image watermark embedding device, digital image watermark extracting device and storage medium

    CN112529756A

  • Production system for a digital image including hidden-watermarks and system for detecting hidden-watermark

    KR102100108B1

  • Method, system, and computer-readable medium for embedding and extracting a watermark in a video

    US20130259294A1