Watermark processing method and device, medium and program product
By identifying the target object in the image and performing watermark embedding processing in its area, the problems of easy destruction and low processing efficiency in the prior art are solved, and higher extraction accuracy and speed are achieved.
Patent Information
- Application Number
- CN202410798924.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-11-12
AI Technical Summary
The existing invisible watermark algorithms are easily tampered with during image propagation, resulting in watermark information destruction, and the process of adding watermarks and decomposing watermarks is inefficient.
By identifying the target object (such as faces) in the image, performing watermark embedding processing in the target object area, and fusing the target processed image with the original image, ensuring that the watermark information only exists in the target object area, improving the accuracy and processing of extracting watermarks speed.
It improves the accuracy and processing efficiency of watermark extraction, reduces the risk of damage to watermark information during the propagation process, and improves the computing speed.
Smart Images

Figure CN118941433A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a watermark processing method, device, computer-readable medium and computer program product. Background Art
[0002] Based on the existing technology, the invisible watermark algorithm can be divided into three stages: watermarking-propagation-dewatermarking. Initially, in the watermarking stage, the watermark encoder embeds the user-specified watermark information into the original image and outputs the watermarked image. After that, the watermarked image is propagated in the transmission channel (such as the Internet). The image content may be changed by compression, scale transformation, manual retouching, etc. The changed image is called the "attacked image". Finally, the watermark decoder can be used to extract the watermark information from the attacked image.
[0003] Existing invisible watermarking algorithms have two disadvantages. First, during the image transmission process, the watermarked image may be tampered with to a large extent by changing the background and adding subtitles, and the watermark information is also destroyed, making it difficult to correctly extract the watermark information when decrypting the watermark. Second, both the watermarking and decryption processes are processed at the original image resolution, resulting in slow processing speed and low efficiency for embedding and extracting watermarks. Summary of the invention
[0004] Multiple aspects of the present application provide a watermark processing method, an apparatus, a computer-readable medium, and a computer program product.
[0005] In one aspect of the present application, a method for watermark processing is provided, wherein the method comprises:
[0006] By identifying one or more target objects contained in the original image, a target processing area of the original image is obtained, wherein the target processing area corresponds to the one or more target objects;
[0007] Performing watermark embedding processing on the target processing area based on a predetermined watermark encoding algorithm to obtain a target processing image;
[0008] The target processed image is fused with the original image to obtain a watermark image corresponding to the original image, wherein the area of the watermark image corresponding to the target object contains watermark information.
[0009] In one aspect of the present application, a device for watermark processing is provided, wherein the device comprises:
[0010] A device for obtaining a target processing region of the original image by identifying one or more target objects contained in the original image, wherein the target processing region corresponds to the one or more target objects;
[0011] A device for performing watermark embedding processing on the target processing area based on a predetermined watermark encoding algorithm to obtain a target processing image;
[0012] A device for fusing the target processed image with the original image to obtain a watermark image corresponding to the original image, wherein the area corresponding to the target object in the watermark image contains watermark information.
[0013] Another aspect of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of an embodiment of the present application.
[0014] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the method of the embodiment of the present application.
[0015] Another aspect of the present application provides a computer program product, including a computer program, which implements the method of the embodiment of the present application when executed by a processor.
[0016] In the solution provided in the embodiment of the present application, by identifying the target objects such as faces contained in the original image to be processed, and based on the predetermined invisible watermark algorithm, the watermark embedding processing is performed on the area corresponding to the target object, so that the watermark image obtained in the embodiment of the present application only contains watermark information in the area where the target object is located, thereby improving the accuracy of watermark extraction; and, the image subjected to watermark embedding processing in the embodiment of the present application is part of the original image, thereby improving the accuracy and computing speed of watermark embedding and extraction processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0019] Figure 1 A schematic diagram showing a flow chart of a watermark processing method provided in an embodiment of the present application is shown;
[0020] Figure 2A flow chart of a method for performing watermark decoding processing according to an embodiment of the present application is shown;
[0021] FIG3( a) shows a schematic diagram of an exemplary process of watermark embedding according to an embodiment of the present application;
[0022] FIG. 3( b ) shows a schematic diagram of an exemplary process of performing watermark decoding processing according to an embodiment of the present application.
[0023] Figure 4 A schematic diagram of the structure of a device for watermark processing provided by an embodiment of the present application is shown;
[0024] Figure 5 A schematic diagram of the structure of a device for performing watermark decoding processing provided by an embodiment of the present application is shown;
[0025] Figure 6 A schematic diagram of the structure of a device suitable for implementing the solution in the embodiment of the present application is shown.
[0026] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0029] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0030] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0031] Figure 1 The schematic diagram of the process of a watermark processing method provided by an embodiment of the present application is shown. The method at least includes step S101, step S102 and step S103.
[0032] In actual scenarios, the execution subject of the method can be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0033] The concepts involved in the embodiments of the present application are explained below.
[0034] Face detection: A computer vision task that takes an image or video as input and outputs the coordinates of the face bounding box.
[0035] Watermark: originated from the method of printing paintings using woodcuts, it refers to a translucent logo or icon added to the picture to prevent others from stealing the picture.
[0036] Invisible watermark: Different from common visible watermarks, invisible watermarks hardly change the image quality and are difficult for users to detect. At the same time, a special watermark decoder can be used to extract the watermark information to achieve the purpose of copyright declaration or traceability.
[0037] It should be noted that, in order to simplify the description, unless otherwise specified, the watermarks mentioned in the embodiments of the present application are all invisible watermarks.
[0038] In actual scenarios, the embodiment of the present application performs image recognition processing on the original image to be processed, thereby identifying the target objects such as faces contained in the original image, and performs watermark embedding processing on the area corresponding to the target object based on a predetermined invisible watermark algorithm, so that the watermark image obtained by the embodiment of the present application only contains watermark information in the area where the target object is located. Since target objects such as faces are often key information in images, tampering in the form of occlusion such as changing the background and adding subtitles generally avoids the face area, and the watermark is less likely to be destroyed. Therefore, the method of embedding watermarks in the embodiment of the present application improves the accuracy of extracting watermarks. In addition, the image that the embodiment of the present application performs watermark embedding processing on is a part of the original image, that is, a subset of the original image, and its resolution must be less than or equal to the original image resolution. Therefore, the embodiment of the present application improves the computing speed of watermark embedding and extraction processing.
[0039] It should be noted that the face data involved in the embodiments of this application are obtained with the consent or permission of the relevant objects, and the collection, use and processing of the relevant face data must comply with the relevant laws, regulations and standards of the relevant countries and regions. When the method of the embodiment of this application is applied to process face data in actual products and technologies, the method of the embodiment of this application is executed based on the processing request triggered by the relevant object to obtain a watermark image.
[0040] Reference Figure 1 In step S101, a target processing area of the original image is obtained by identifying one or more target objects contained in the original image, and the target processing area corresponds to the one or more target objects.
[0041] The original image is an image to be processed and needs to be watermarked.
[0042] The target object may include various types of objects, such as people, animals, or objects.
[0043] Optionally, the target object is a human face.
[0044] The method may use a variety of algorithms to identify the target object contained in the original image. For example, when the target object is a face, a Haar cascade classifier, a deep learning-based method such as Multi-task Cascaded Convolutional Networks (MTCNN), or RetinaFace: Single-Shot Multi-Level Face Localisation in the Wild and other algorithms are used to perform face recognition processing, thereby quickly identifying one or more faces contained in the original image.
[0045] It should be noted that those skilled in the art should be familiar with the fact that a variety of algorithms can be used to identify the target object contained in the original image, and are not limited to the methods mentioned above. Those skilled in the art can choose an appropriate method to identify the target object contained in the original image based on actual needs.
[0046] The method includes but is not limited to: identifying one or more target objects contained in the original image to obtain the target processing area of the original image by:
[0047] 1) Based directly on the identified bounding box of the target object, the area corresponding to the bounding box is used as the target processing area;
[0048] 2) according to a predetermined region selection rule, the regions corresponding to the identified one or more target objects are used as target processing regions;
[0049] The area selection rule may include shape or size, etc.
[0050] For example, based on a predetermined region selection rule, a positive direction region including the recognized face bounding box is obtained as a target processing region.
[0051] 3) If it is recognized that the original image contains multiple target objects, the regions corresponding to the multiple target objects are used as candidate regions; based on the user's selection operation on the multiple candidate regions, one or more candidate regions selected by the user are used as target processing regions.
[0052] In step S102, a watermark embedding process is performed on the target processing area based on a predetermined watermark encoding algorithm.
[0053] The watermark encoding algorithm includes various types of invisible watermark algorithms, such as Enhancing Robustness of DNN-basedWatermarking by Mini-Batch of Real and Simulated JPEG Compression (MBRS), Robust Invisible Video Watermarking with Attention (RivaGAN), etc.
[0054] The target processing image is an image corresponding to the target processing area.
[0055] Optionally, the method performs watermark embedding processing by inputting a target processed image corresponding to the target processed area into a watermark encoder, and obtains a watermark-embedded target processed image output by the watermark encoder.
[0056] In step S103, the target processed image is fused with the original image to obtain a watermark image corresponding to the original image.
[0057] The area corresponding to the target object in the watermark image contains watermark information.
[0058] The watermark information may include any information that can be losslessly converted into binary form. Since binary information is processed in the watermark encoder and the watermark decoder, in fact, the watermark information that meets the conditions is first converted into a number of bits of binary (0 or 1), and then the watermark encoder adds it to the image. When de-watermarking, the watermark decoder decrypts the binary information and finally converts it into watermark information.
[0059] For example, the character string "abcd" can be converted into a 32-bit binary representation through ASCII encoding, and the 32-bit binary is the actual information processed by the watermark encoder and the watermark decoder.
[0060] Optionally, after determining the target processing area, the method removes the image corresponding to the target processing area from the original image. In step S103, the method splices the target processing image embedded with the watermark with the remaining image after removing the target processing area from the original image to obtain the watermarked image.
[0061] Optionally, in step S103, the method directly covers the target processed image embedded with the watermark on the corresponding area of the original image to obtain the watermark image.
[0062] The method of the embodiment of the present application is described below in conjunction with the example shown in Fig. 3(a). Fig. 3(a) shows a schematic diagram of an exemplary process of watermark embedding according to the embodiment of the present application.
[0063] Referring to Figure 3(a), for the original image to be processed, the face area in the original image is identified through the face detection algorithm, so as to distinguish the face area of the original image (the original face image) and the remaining area (the remaining original image). Then, only the original face image is input into the watermark encoder, so that the watermark information is added to the original face image, and the face watermarked image output by the watermark encoder is obtained. Finally, the face watermarked image and the remaining original image are combined to obtain the final watermarked image. In the watermarked image, only the face area contains the watermark information, and there is a difference that cannot be discerned by the naked eye compared with the corresponding area of the original image, while the remaining area is completely consistent with the corresponding area of the original image.
[0064] Figure 2 A flow chart of a method for performing watermark decoding processing according to an embodiment of the present application is shown. Figure 2 The method shown includes step S104 and step S105.
[0065] Reference Figure 2 In step S104, by identifying one or more target objects contained in the watermark image, a target decoding area that needs to be de-watermarked is obtained.
[0066] Optionally, the method adopts the same image recognition algorithm as that used to recognize the original image when recognizing one or more target objects contained in the watermark image.
[0067] Similar to the above step S101 , the method may directly use the area corresponding to the identified bounding box of the target object as the target decoding area.
[0068] Optionally, the method identifies one or more target objects contained in the watermarked image by performing object recognition on the image; then, according to a predetermined area selection rule, the area corresponding to the identified one or more target objects is used as a target decoding area, so that the target decoding area is the same as the target processing area obtained in step S101.
[0069] It should be noted that those skilled in the art should be familiar with the fact that the target processing area obtained in step S101 and the target decoding area obtained in step S104 cannot be guaranteed to be exactly the same, that is, the area of the target object identified in the watermarking and dewatermarking processes cannot be guaranteed to be exactly the same. However, the object areas identified in the watermarking and dewatermarking of the embodiment of the present application using most recognition algorithms are almost the same, and the invisible watermark algorithm (such as MBRS or RivaGAN) used in the embodiment of the present application has a certain robustness, so the method implemented in the present application can still correctly identify the watermark even if the areas of the target object identified in the two processes are slightly different.
[0070] In step S105, corresponding watermark information is obtained by performing watermark decoding processing on the target decoding area.
[0071] The method uses a watermark decoding algorithm that matches the watermark decoding algorithm in step S102 to perform watermark decoding processing in step S105, thereby obtaining corresponding watermark information.
[0072] The method of the embodiment of the present application is described below in conjunction with the example shown in Figure 3(b). Figure 3(b) shows a schematic diagram of an exemplary process of watermark decoding processing according to the embodiment of the present application.
[0073] Referring to Figure 3(b), after the watermarked image is propagated, the attacked image first undergoes face detection to obtain the face area. Then, the image corresponding to the face area is input into the watermark decoder, and the watermark information contained in the image is extracted based on the output of the watermark decoder.
[0074] This example limits the invisible watermark to the face area. Since the face area is a subset of the original image, the resolution of the face area must be less than or equal to the original image resolution. Therefore, the algorithm will be faster if it is operated in the face area. The current face detection algorithm is very mature and efficient, and is much faster than the invisible watermark algorithm. Therefore, even if there is an additional face detection step in the watermarking and dewatermarking stages, the overall speed of this example is still faster than the invisible watermark algorithm that processes the entire image.
[0075] According to the method of the embodiment of the present application, by identifying the target objects such as faces contained in the original image to be processed, and based on the predetermined invisible watermark algorithm, the watermark image obtained in the embodiment of the present application contains watermark information only in the area where the target object is located, thereby improving the accuracy of watermark extraction; and, the image subjected to watermark embedding processing in the embodiment of the present application is part of the original image, thereby improving the accuracy and computing speed of watermark embedding and extraction processing.
[0076] In addition, the present application also provides a device for watermark processing, the structure of which is as follows: Figure 4 The device comprises: a device for identifying one or more target objects contained in the original image to obtain a target processing area of the original image (hereinafter referred to as "object identification device 101"), a device for performing watermark embedding processing on the target processing area based on a predetermined watermark encoding algorithm to obtain a target processing image (hereinafter referred to as "watermark embedding device 102"), and a device for fusing the target processing image with the original image to obtain a watermark image corresponding to the original image, wherein the area corresponding to the target object in the watermark image contains watermark information (hereinafter referred to as "image fusion device 103").
[0077] Reference Figure 4 The object recognition device 101 obtains a target processing area of the original image by recognizing one or more target objects contained in the original image, and the target processing area corresponds to the one or more target objects.
[0078] The original image is an image to be processed and needs to be watermarked.
[0079] The target object may include various types of objects, such as people, animals, or objects.
[0080] Optionally, the target object is a human face.
[0081] The object recognition device 101 may use a variety of algorithms to recognize the target object contained in the original image. For example, when the target object is a face, a Haar cascade classifier, a deep learning-based method such as Multi-task Cascaded Convolutional Networks (MTCNN), or RetinaFace: Single-Shot Multi-Level Face Localisation in the Wild, etc., may be used to perform face recognition processing, thereby quickly recognizing one or more faces contained in the original image.
[0082] It should be noted that those skilled in the art should be familiar with the fact that a variety of algorithms can be used to identify the target object contained in the original image, and are not limited to the methods mentioned above. Those skilled in the art can choose an appropriate method to identify the target object contained in the original image based on actual needs.
[0083] The object recognition device 101 recognizes one or more target objects contained in the original image to obtain the target processing area of the original image in the following manners, but not limited to:
[0084] 1) Based directly on the identified bounding box of the target object, the area corresponding to the bounding box is used as the target processing area;
[0085] 2) according to a predetermined region selection rule, the regions corresponding to the identified one or more target objects are used as target processing regions;
[0086] The area selection rule may include shape or size, etc.
[0087] For example, based on a predetermined region selection rule, a positive direction region including the recognized face bounding box is obtained as a target processing region.
[0088] 3) If it is recognized that the original image contains multiple target objects, the regions corresponding to the multiple target objects are used as candidate regions; based on the user's selection operation on the multiple candidate regions, one or more candidate regions selected by the user are used as target processing regions.
[0089] The watermark embedding device 102 performs watermark embedding processing on the target processing area based on a predetermined watermark encoding algorithm.
[0090] The watermark encoding algorithm includes various types of invisible watermark algorithms, such as Enhancing Robustness of DNN-basedWatermarking by Mini-Batch of Real and Simulated JPEG Compression (MBRS), Robust Invisible Video Watermarking with Attention (RivaGAN), etc.
[0091] The target processing image is an image corresponding to the target processing area.
[0092] Optionally, the watermark embedding device 102 performs watermark embedding processing by inputting the target processed image corresponding to the target processed area into a watermark encoder to obtain the watermark-embedded target processed image output by the watermark encoder.
[0093] The image fusion device 103 fuses the target processed image with the original image to obtain a watermark image corresponding to the original image.
[0094] The area corresponding to the target object in the watermark image contains watermark information.
[0095] The watermark information may include any information that can be losslessly converted into binary form. Since binary information is processed in the watermark encoder and the watermark decoder, in fact, the watermark information that meets the conditions is first converted into a number of bits of binary (0 or 1), and then the watermark encoder adds it to the image. When de-watermarking, the watermark decoder decrypts the binary information and finally converts it into watermark information.
[0096] For example, the character string "abcd" can be converted into a 32-bit binary representation through ASCII encoding, and the 32-bit binary is the actual information processed by the watermark encoder and the watermark decoder.
[0097] Optionally, after determining the target processing area, the device removes the image corresponding to the target processing area from the original image. The image fusion device 103 splices the target processing image embedded with the watermark with the remaining image after removing the target processing area from the original image to obtain the watermark image.
[0098] Optionally, the image fusion device 103 directly covers the target processed image embedded with the watermark on the corresponding area of the original image to obtain the watermark image.
[0099] The device of the embodiment of the present application is described below in conjunction with the example shown in Fig. 3(a). Fig. 3(a) shows a schematic diagram of an exemplary process of watermark embedding according to the embodiment of the present application.
[0100] Referring to Figure 3(a), for the original image to be processed, the object recognition device 101 identifies the face area in the original image based on the face detection algorithm, so as to distinguish the face area of the original image (the original face image) and the remaining area (the remaining original image). Then, the watermark embedding device 102 only inputs the original face image into the watermark encoder, thereby adding the watermark information to the original face image, and obtaining the face watermarked image output by the watermark encoder. Finally, the image fusion device 103 combines the face watermarked image with the remaining original image to obtain the final watermarked image. In the watermarked image, only the face area contains the watermark information, and there is a difference that is not discernible to the naked eye compared with the corresponding area of the original image, while the remaining area is completely consistent with the corresponding area of the original image.
[0101] Figure 5 A schematic diagram of the structure of a device for performing watermark decoding processing provided in an embodiment of the present application is shown.
[0102] Figure 5The device shown includes: a device for identifying one or more target objects contained in a watermark image to obtain a target decoding area that needs to be dewatermarked (hereinafter referred to as "decoding identification device 104"), and a device for obtaining corresponding watermark information by performing watermark decoding processing on the target decoding area (hereinafter referred to as "watermark decoding device 105").
[0103] Reference Figure 5 The decoding and identification device 104 identifies one or more target objects contained in the watermark image to obtain a target decoding area that needs to be de-watermarked.
[0104] The decoding and recognition device 104 recognizes one or more target objects contained in the watermark image using the same image recognition algorithm as the object recognition device 101 recognizes the original image.
[0105] Similar to the operation of the object recognition device 101 described above, the decoding recognition device 105 may directly use the area corresponding to the bounding box as the target decoding area based on the identified bounding box of the target object.
[0106] Optionally, the decoding and identification device 104 identifies one or more target objects contained in the watermarked image by performing object recognition on the image; then, according to a predetermined area selection rule, the area corresponding to the identified one or more target objects is used as a target decoding area, so that the target decoding area is the same as the target processing area obtained by the object recognition device 101.
[0107] It should be noted that those skilled in the art should be familiar with the fact that the target processing area obtained by the object recognition device 101 and the target decoding area obtained by the decoding recognition device 104 cannot be guaranteed to be exactly the same, that is, the area of the target object identified in the watermarking and dewatermarking processes cannot be guaranteed to be exactly the same. However, the object areas identified in the watermarking and dewatermarking of the embodiment of the present application using most recognition algorithms are almost the same, and the invisible watermark algorithm (such as MBRS or RivaGAN) used in the embodiment of the present application has a certain robustness, so the device implemented in the present application can still correctly identify the watermark even if the areas of the target object identified in the two processes are slightly different.
[0108] The watermark decoding device 105 obtains corresponding watermark information by performing watermark decoding processing on the target decoding area.
[0109] The watermark decoding device 105 uses a watermark decoding algorithm that matches the watermark decoding algorithm of the watermark embedding device 102 to perform watermark decoding processing, thereby obtaining corresponding watermark information.
[0110] The device of the embodiment of the present application is described below in conjunction with the example shown in Figure 3(b). Figure 3(b) shows a schematic diagram of an exemplary process of performing watermark decoding processing according to the embodiment of the present application.
[0111] 3(b), after the watermarked image is propagated, the attacked image first undergoes face detection to obtain the face region by means of the decoding and recognition device 104. Then, the watermark decoding device 105 inputs the image corresponding to the face region into the watermark decoder, and extracts the watermark information contained in the image based on the output of the watermark decoder.
[0112] This example limits the invisible watermark to the face area. Since the face area is a subset of the original image, the resolution of the face area must be less than or equal to the original image resolution. Therefore, the algorithm will be faster if it is operated in the face area. The current face detection algorithm is very mature and efficient, and is much faster than the invisible watermark algorithm. Therefore, even if there is an additional face detection step in the watermarking and dewatermarking stages, the overall speed of this example is still faster than the invisible watermark algorithm that processes the entire image.
[0113] According to the device of the embodiment of the present application, by identifying the target objects such as faces contained in the original image to be processed, and based on the predetermined invisible watermark algorithm, the watermark image obtained by the embodiment of the present application contains watermark information only in the area where the target object is located, thereby improving the accuracy of watermark extraction; and, the image subjected to watermark embedding processing in the embodiment of the present application is part of the original image, thereby improving the accuracy and computing speed of watermark embedding and extraction processing.
[0114] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the method corresponding to the electronic device may be the watermark processing method in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.
[0115] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or may be an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0116] Figure 6 The structure of a device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the device 1200 includes a central processing unit (CPU, Central Processing Unit) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM, Random Access Memory) 1203. In RAM1203, various programs and data required for system operation are also stored. CPU 1201, ROM 1202 and RAM 1203 are connected to each other through bus 1204. Input / output (I / O, Input / Output) interface 1205 is also connected to bus 1204.
[0117] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 1208 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet.
[0118] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 1201, the above functions defined in the method of the present application are executed.
[0119] Another embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application described above.
[0120] Specifically, the present embodiment may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. 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 thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: 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 thereof. In this document, 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.
[0121] Computer readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media 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.
[0122] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0123] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including 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 the case of 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).
[0124] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. 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 system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0126] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0129] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
[0131] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A method for watermark processing, wherein: The method comprises: By identifying one or more target objects contained in the original image, a target processing area of the original image is obtained, wherein the target processing area corresponds to the one or more target objects; Performing watermark embedding processing on the target processing area based on a predetermined watermark encoding algorithm to obtain a target processing image; The target processed image is fused with the original image to obtain a watermark image corresponding to the original image, wherein the area corresponding to the target object in the watermark image contains watermark information.
2. The method according to claim 1, wherein: The method further comprises: By identifying one or more target objects contained in the watermark image, a target decoding area that needs to be de-watermarked is obtained; Corresponding watermark information is obtained by performing watermark decoding processing on the target decoding area.
3. The method according to claim 1 or 2, wherein: The method adopts the same image recognition algorithm as that used to recognize the original image when recognizing one or more target objects contained in the watermark image.
4. The method according to claim 1, wherein: The target processing area of the original image obtained by identifying one or more target objects contained in the original image includes: Based on the identified bounding box of the target object, the area corresponding to the bounding box is used as the target processing area.
5. The method according to claim 1, wherein: The target processing area of the original image obtained by identifying one or more target objects contained in the original image includes: According to a predetermined area selection rule, the selected area corresponding to the identified one or more target objects is used as a target processing area, and the area selection rule includes area shape and / or size.
6. The method according to claim 1 or 2, wherein: The method further comprises: If it is recognized that the original image contains multiple target objects, the regions corresponding to the multiple target objects are used as candidate regions; The process of identifying one or more target objects contained in the original image to obtain the target processing area of the original image includes: Based on the user's selection operation on the multiple candidate regions, the one or more candidate regions selected by the user are used as target processing regions.
7. A device for watermark processing, wherein: The device comprises: A device for obtaining a target processing region of the original image by identifying one or more target objects contained in the original image, wherein the target processing region corresponds to the one or more target objects; A device for performing watermark embedding processing on the target processing area based on a predetermined watermark encoding algorithm to obtain a target processing image; A device for fusing the target processed image with the original image to obtain a watermark image corresponding to the original image, wherein the area corresponding to the target object in the watermark image contains watermark information.
8. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A computer readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Digital image interesting region visible watermarik adding method suitable for internet
CN101661609A
IWT-Schur-based region-of-interest reversible watermark embedding and extracting method
CN110097490A
Watermark image generation and attack tracing method and device based on privacy protection
CN112837202A
Digital image watermarking using region segmentation
KR1020030062610A
