Image processing method and image processing system
By processing the image brightness channel with local and global synchronization information to generate a synchronization matrix and embedding watermark information, the problem of insufficient robustness of image dark watermarking algorithms in the face of geometric and screen capture attacks is solved, and a higher watermark extraction success rate is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-03-27
AI Technical Summary
Existing image dark watermarking algorithms are unable to effectively extract watermark information when faced with geometric attacks and screen capture attacks, resulting in insufficient robustness.
The luminance channel of the image is processed by local and global synchronization information to generate multiple first synchronization matrices, and watermark information is embedded in the chrominance channel. The geometric distortion and deformation introduced by screen capture attacks are restored by using the rules of local and global synchronization information.
It improves the robustness of watermark information embedding, effectively resisting geometric attacks and screen capture attacks, and increasing the success rate of watermark extraction.
Smart Images

Figure CN121746151A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of digital watermarking, and more particularly, to an image processing method and an image processing system. BACKGROUND
[0002] Digital watermarking is a kind of information hiding technology that embeds specific and identifiable information (i.e., "watermark") into digital media (such as images, audio, and video) through certain algorithms (e.g., image steganography algorithms) without significantly affecting the original quality and use value, and can extract or detect it when needed. The core goal is to provide security in the fields of copyright protection, content authentication, copy control, and information tracing of digital products.
[0003] Image attacks can be understood as a series of processing operations aimed at interfering with, destroying, or removing hidden information (such as watermarks, fingerprints) embedded in images or destroying their original integrity. These attacks can interfere with detection systems, making them unable to correctly extract or verify hidden information. Common image attacks include geometric attacks and screen attacks. Geometric attacks can be understood as destroying hidden information by changing the spatial coordinates or pixel layout of the image, such as rotation, scaling, translation, cropping, screen capture, etc. Screen attacks can be understood as the process of obtaining a second-hand digital image by re-shooting with a camera or mobile phone, etc. This attack often introduces multiple complex interferences such as resolution reduction, color distortion, glare, and noise, and is a very challenging attack method in practical applications.
[0004] Generally, frequency domain-based image steganography algorithms cannot well extract watermark information when encountering geometric attacks and screen attacks. Therefore, an image processing method is needed to improve the robustness of watermark information embedding, so as to resist geometric attacks and screen attacks, and to improve the success rate of subsequent watermark extraction. SUMMARY
[0005] The present application provides an image processing method that can improve the robustness of watermark information embedding and resist geometric attacks and screen attacks at the same time, thereby improving the success rate of subsequent watermark extraction.
[0006] In a first aspect, the present application provides an image processing method, for example, the method can be executed by a computing device, or also can be executed by a component (such as a chip or circuit) of the computing device. For example, the computing device can be a server. For another example, the computing device can be an infrastructure in a cloud service system.
[0007] The method is applied to an image processing system storing local synchronization information and global synchronization information, and the method comprises: obtaining a first image corresponding to a first channel and a second channel, the first image being an image in which watermark information needs to be embedded, the first channel being a luminance channel of the first image, and the second channel being a chrominance channel of the first image; processing the first channel according to the local synchronization information and the global synchronization information to obtain a processed first channel, the processed first channel comprising information of a plurality of first synchronization matrices and information of positions of each synchronization matrix, wherein the first synchronization matrix is obtained by performing a translation and / or a flip operation on a spread spectrum matrix according to the local synchronization information, the local synchronization information being used to indicate a rule of translation and / or flip of the spread spectrum matrix, and the global synchronization information being used to indicate a position of each first synchronization matrix in the first image; embedding watermark information in the second channel to obtain a processed second channel; and obtaining a processed first image according to the processed first channel and the processed second channel, the processed first image comprising the watermark information.
[0008] Based on the technical solution, the luminance channel of the image can be processed according to the local synchronization information and the global synchronization information. Since the local synchronization information indicates the rule of translation and / or flip of the spread spectrum matrix, a plurality of first synchronization matrices can be obtained, and the plurality of first synchronization matrices can be spread over the entire image. For example, even if the image is cropped, the geometric distortion of the image can be restored based on the first synchronization matrices in the remaining image, so that the geometric attack can be resisted. In addition, the position of each first synchronization matrix in the first image can be indicated by the global synchronization information, so that the screen attack can be resisted by the global synchronization information. It can be seen that the method provided by the present application can resist the geometric attack and the screen attack at the same time, improve the robustness of the watermark information embedding, and thus improve the success rate of subsequent watermark extraction.
[0009] In combination with the first aspect, in a possible implementation manner, processing the first channel according to the local synchronization information and the global synchronization information to obtain the processed first channel comprises: obtaining the first synchronization matrix according to the local synchronization information; and processing the first channel according to the plurality of first synchronization matrices and the global synchronization information to obtain the processed first channel.
[0010] Based on the technical solution, in the embodiment of the present application, a first synchronization matrix with strong autocorrelation and structure can be constructed by the local information. When the image suffers from a serious geometric attack, the first synchronization matrix can help the watermark extractor to quickly and accurately locate itself, restore synchronization, and can also be understood as making the embedded watermark information have high robustness.
[0011] With reference to the first aspect, in a possible implementation manner, the watermark information is a binary bit sequence, a size of the binary bit sequence is m x m, the watermark information is embedded in the second channel to obtain the processed second channel, and the method comprises: obtaining a third channel corresponding to the first image, the third channel being obtained according to the second channel; obtaining a plurality of watermark units corresponding to the watermark information, each watermark unit being used for representing the watermark information, each binary bit in the watermark information being represented by k x k pixel units in the watermark unit, and a size of each watermark unit being n x n, wherein n = m x k; embedding the plurality of watermark units in the third channel to obtain a processed third channel; and obtaining the processed second channel according to the processed third channel.
[0012] For example, the N channels can be understood as channels of low-frequency subbands of a certain channel in the U channel or the V channel.
[0013] Based on the technical solution described above, in the embodiments of the present application, one bit in the binary bit sequence corresponding to the watermark information can be represented by k x k pixel units, that is, the efficient trade-off among robustness, invisibility and capacity is realized by using the spatial diversity and redundancy strategy. Specifically, this approach can disperse the bit energy into a large number of pixels, on the one hand, the processing gain is used to effectively suppress additive noise and random interference such as compression, and the signal-to-noise ratio is significantly improved; on the other hand, the inherent spatial redundancy characteristic of the watermark enables it to resist severe local cropping and smearing attacks, even if part of the area is damaged, the remaining pixels can still achieve accurate decoding through information aggregation. At the same time, energy dispersion allows each pixel to be modified with a smaller amplitude, thereby better integrating into the image texture and enhancing visual invisibility.
[0014] With reference to the first aspect, in a possible implementation manner, an energy difference value of the k x k pixel units corresponding to a first value in the binary bit sequence is a first difference value, and an energy difference value of the k x k pixel units corresponding to a second value in the binary bit sequence is a second difference value, wherein the energy difference value is used to indicate a difference between energy corresponding to a first subblock and energy corresponding to a second subblock, and the first subblock and the second subblock are each half of the k x k pixel units.
[0015] Based on the technical solution described above, by constructing the energy difference matrix, the detection of the watermark information can be converted into the determination of the relative relationship between regions. This method makes the watermark signal naturally robust to non-geometric attacks such as brightness adjustment and contrast change, because these global operations will simultaneously affect the contrast regions, and the energy difference value is kept stable, thereby further improving the robustness of the watermark information embedding. With reference to the first aspect, in a possible implementation manner, the method further includes: obtaining a plurality of second images, the plurality of second images being images that need to perform watermark extraction; obtaining at least one candidate image according to the plurality of second images, the similarity algorithm, and the vector database, the at least one candidate image being a subset of the plurality of second images, wherein the vector database includes a plurality of target vector data, the target vector data including vector data used for indicating a target image, each candidate image corresponding to a target vector data, and a similarity between each candidate image and the corresponding target vector data being greater than or equal to a first threshold; and obtaining watermark information of each of the at least one candidate image, and determining whether the watermark information of each of the at least one candidate image is target watermark information.
[0016] Based on the technical solution described above, in the embodiment of the present application, when a large amount of data is screened, some unimportant image data can be filtered out through the vector data graph, and then watermark extraction process only needs to be performed on the image that is focused on, so that the consumption of system resources can be reduced, and the accuracy and speed of image screening can be improved.
[0017] With reference to the first aspect, in a possible implementation manner, the plurality of target vector data further includes vector data used for indicating a target watermark, and the determining whether the watermark information of each of the at least one candidate image is target watermark information includes: obtaining watermark information corresponding to each of the at least one candidate image; obtaining at least one target vector data according to the watermark information corresponding to each of the at least one candidate image, the similarity algorithm, and the vector database, each target vector data being used for indicating a target watermark, and a similarity between each target vector data and watermark information of the corresponding candidate image being greater than or equal to a second threshold; and determining target watermark information corresponding to each of the at least one target vector data.
[0018] Based on the technical solution described above, in the embodiment of the present application, the similarity between the candidate watermark information and the target watermark information is compared by using the vector retrieval technology, and when the similarity is greater than or equal to the second threshold, an alarm can be given, indicating that there is a possibility of infringement, so that the success rate of tracing is improved.
[0019] With reference to the first aspect, in a possible implementation manner, the method is performed by infrastructure in a cloud service system, and the cloud service system includes a cloud management platform configured to manage infrastructure providing a service of embedding watermark information in an image.
[0020] It should be noted that the advantages of the method and the devices in the following second aspect can be understood by referring to the advantages of the corresponding implementation manners of the first aspect, and will not be described again.
[0021] In a second aspect, the present application provides a method for image processing, for example, the method can be executed by a computing device, or also can be executed by a component (for example, a chip or a circuit) of the computing device. For example, the computing device can be a server. For another example, the computing device can be an infrastructure in a cloud service system.
[0022] The method is applied to an image processing system storing local synchronization information and global synchronization information, and the method comprises: obtaining a third image corresponding to a first channel and a second channel, the third image being an image requiring watermark information extraction, the first channel being a luminance channel of the third image, and the second channel being a chroma channel of the third image; processing the first channel according to the global synchronization information and the local synchronization information to obtain a corrected third image, the first channel comprising a plurality of first synchronization matrices, each first synchronization matrix being obtained by performing a translation and / or a flip operation on a spreading matrix according to the local synchronization information, the local synchronization information being used to indicate a rule of translation and / or flip of the spreading matrix, and the global synchronization information being used to indicate a respective position of each first synchronization matrix in the third image; and obtaining watermark information in the third image according to the second channel corresponding to the corrected third image.
[0023] In combination with the second aspect, in a possible implementation manner, the processing of the first channel according to the global synchronization information and the local synchronization information to obtain the corrected third image comprises: determining the first synchronization matrix according to the local synchronization information; and processing the first channel according to the plurality of first synchronization matrices and the global synchronization information to obtain the corrected third image.
[0024] In combination with the second aspect, in a possible implementation manner, the watermark information is a binary bit sequence, the size of the binary bit sequence is m×m, and the obtaining of the watermark information in the third image according to the second channel corresponding to the corrected third image comprises: obtaining a third channel corresponding to the corrected third image, the third channel being obtained according to the second channel; obtaining at least one watermark unit according to the third channel, each watermark unit being used to represent the watermark information, each binary bit in the watermark information being represented by k×k pixel units in a watermark unit, and the size of each watermark unit being n×n, wherein n=m×k; and obtaining the watermark information in the third image according to the at least one watermark unit.
[0025] In combination with the second aspect, in a possible implementation manner, a first value in the binary bit sequence corresponds to a first difference value of energy of k×k pixel units, a second value in the binary bit sequence corresponds to a second difference value of energy of the k×k pixel units, and the first difference value and the second difference value are used to indicate a difference value of energy of a first sub-block and energy of a second sub-block, the first sub-block and the second sub-block being one half of the k×k pixel units respectively.
[0026] With reference to the second aspect, in a possible implementation, the method further includes: obtaining a plurality of second images, the plurality of second images being images for which watermark extraction is required; obtaining at least one candidate image from the plurality of second images, the similarity algorithm, and the vector database, the at least one candidate image being a subset of the plurality of second images, wherein the vector database includes a plurality of target vector data, the plurality of target vector data including vector data used to indicate target images, each candidate image corresponding to a target vector data, and a similarity between each candidate image and the corresponding target vector data being greater than or equal to a first threshold; and determining whether watermark information of each of the at least one candidate image is target watermark information.
[0027] With reference to the second aspect, in a possible implementation, the plurality of target vector data further includes vector data used to indicate target watermarks, and determining whether watermark information of each of the at least one candidate image is target watermark information includes: obtaining watermark information corresponding to each of the at least one candidate image; obtaining at least one target vector data from the watermark information corresponding to each of the at least one candidate image, the similarity algorithm, and the vector database, each target vector data being used to indicate a target watermark, and a similarity between each target vector data and watermark information of the corresponding candidate image being greater than or equal to a second threshold; and determining target watermark information corresponding to each of the at least one target vector data.
[0028] With reference to the second aspect, in a possible implementation, the method is performed by infrastructure in a cloud service system, the cloud service system including a cloud management platform configured to manage the infrastructure providing a service of embedding watermark information in images.
[0029] A third aspect provides an image processing system, the image processing system including a watermark embedding system and a watermark extraction system, wherein the watermark embedding system is configured to perform any of the methods of the first aspect, and the watermark extraction system is configured to perform any of the methods of the second aspect.
[0030] A fourth aspect provides a computing device configured to perform the method of the first aspect and / or the method of the second aspect. Specifically, the computing device can include units and / or modules configured to perform the method, such as an obtaining module, a processing module.
[0031] For example, the computing device can be a server, a cluster of servers, or infrastructure providing cloud services in a cloud service system.
[0032] For example, the computing device can be a virtual instance, such as a virtual machine, a container, a bare-metal server, or the like.
[0033] In a fifth aspect, the present application provides a computing device, comprising: at least one processor configured to execute computer programs or instructions stored in a memory to perform the method of the first aspect and / or the second aspect. Optionally, the device further comprises the memory configured to store the computer programs or instructions. Optionally, the device further comprises a communication interface through which the processor reads the computer programs or instructions stored in the memory.
[0034] In an implementation form, the computing device is a device for implementing the functions of the above method in a chip.
[0035] In another implementation form, the computing device is a chip, chip system or circuit for implementing the functions of the above method in a chip.
[0036] For example, the computing device is a chip, chip system or circuit in a cloud management platform.
[0037] In a sixth aspect, the present application provides a processor, comprising: an input circuit, an output circuit and a processing circuit. The processing circuit is configured to receive signals through the input circuit and transmit signals through the output circuit, so that the processor performs the method of the first aspect and / or the second aspect.
[0038] In the implementation process, the processor can be one or more chips, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a flip-flop and various logic circuits, etc. The input signals received by the input circuit can be received and input by, for example but not limited to, a transceiver, the output signals output by the output circuit can be output to and transmitted by, for example but not limited to, a transmitter, and the input circuit and the output circuit can be the same circuit which is used as the input circuit and the output circuit at different times. The present application does not limit the specific implementation of the processor and various circuits.
[0039] For the sending and obtaining / receiving operations of the processor, if there is no special description, or if it does not contradict the actual role or internal logic in the related description, it can be understood as the processor output and receive, input, etc. operations, and also can be understood as the sending and receiving operations performed by the radio frequency circuit and the antenna, and the present application does not limit this.
[0040] In a seventh aspect, a processing device is provided, comprising a processor and a memory. The processor is configured to read instructions stored in the memory, and can receive signals through a transceiver and transmit signals through a transmitter to perform the method of the first aspect and / or the second aspect.
[0041] Optionally, the processor is one or more, and the memory is one or more.
[0042] Optionally, the memory can be integrated with the processor, or the memory and the processor are separately arranged.
[0043] In the implementation process, the memory can be a non-transitory memory, such as a read only memory (ROM), which can be integrated on the same chip with the processor, or arranged separately on different chips. The embodiments of the present application do not limit the type of memory and the arrangement of the memory and the processor.
[0044] It should be understood that the relevant data interaction process, such as sending the first information, can be the process of outputting the first information from the processor, and the receiving capability information can be the process of receiving the input capability information by the processor. Specifically, the data output by the processor can be output to the transmitter, and the input data received by the processor can come from the transceiver. Among them, the transmitter and the transceiver can be collectively referred to as the transceiver.
[0045] The processing device in the above seventh aspect can be one or more chips. The processor in the processing device can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software code stored in the memory. The memory can be integrated in the processor or exist independently outside the processor.
[0046] In an eighth aspect, a computing cluster is provided, including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method described in any possible implementation manner of the first aspect and / or the second aspect.
[0047] Optionally, the processor can be a general-purpose processor, which can be implemented by hardware or software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor, which is implemented by reading software code stored in the memory. The memory can be integrated in the processor or exist independently outside the processor.
[0048] In a ninth aspect, a computer readable storage medium is provided, which stores program code for execution by a computing device, the program code including instructions for executing the method of the first aspect and / or the second aspect.
[0049] In a tenth aspect, a computer program product including instructions, which when executed on a computer, cause the computer to perform the method of the first aspect and / or the second aspect.
[0050] In an eleventh aspect, a chip system is provided, including a processor for calling and running a computer program from a memory, so that a device installed with the chip system performs the method of the first aspect and / or the second aspect. BRIEF DESCRIPTION OF DRAWINGS
[0051] Figure 1 FIG. 1 is a schematic diagram of an image processing system architecture according to an embodiment of the present application.
[0052] Figure 2 FIG. 2 is a schematic flowchart of an image processing method 200 according to an embodiment of the present application.
[0053] Figure 3 FIG. 3 is a schematic diagram of a spread spectrum matrix, a first synchronization matrix and a second synchronization matrix according to an embodiment of the present application.
[0054] Figure 4 FIG. 4 is a schematic diagram of each anchor point of the first synchronization matrix according to an embodiment of the present application.
[0055] Figure 5 FIG. 5 is a schematic flowchart of an image processing method 500 according to an embodiment of the present application.
[0056] Figure 6 FIG. 6 is a schematic flowchart of an image processing method 600 according to an embodiment of the present application.
[0057] Figure 7 FIG. 7 is a schematic flowchart of an image processing method 700 according to an embodiment of the present application.
[0058] Figure 8 FIG. 8 is a schematic flowchart of an image watermark screening method 800 according to an embodiment of the present application.
[0059] Figure 9 FIG. 9 is a schematic diagram of an image processing system architecture according to an embodiment of the present application.
[0060] Figure 10 FIG. 10 is a schematic diagram of a cloud service system architecture according to an embodiment of the present application.
[0061] Figure 11 FIG. 11 is a schematic block diagram of a computing device 1100 according to an embodiment of the present application.
[0062] Figure 12is a schematic block diagram of a computing device 1200 provided by an embodiment of the present application.
[0063] Figure 13 is an architecture schematic diagram of a computing device cluster provided by an embodiment of the present application.
[0064] Figure 14 is a schematic diagram of connection between computing devices 1300A and 1300B through a network provided by an embodiment of the present application. DETAILED DESCRIPTION
[0065] The technical solutions in the present application will be described below with reference to the accompanying drawings.
[0066] In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, the professional terms related to the present application will be briefly introduced. It should be noted that the introduction of the professional terms in the present application is only for the purpose of helping to understand the technical solutions, and should not limit the present application.
[0067] 1. Vector retrieval technology Vector retrieval technology is an approximate nearest neighbor search method based on high-dimensional vector space similarity measurement. The core of the technology is to map unstructured data (such as text, image or audio) into dense vectors through embedding model, and to quantify the semantic or feature similarity between vectors by using distance function (such as cosine similarity or Euclidean distance, etc.). The technology usually combines index structure (for example, hierarchical navigable small world (HNSW), inverted file (IVF) and approximate algorithm) to greatly reduce the search delay while ensuring the recall rate, and is widely used in recommendation system, multi-modal retrieval and natural language processing fields. It is a key infrastructure for realizing large-scale similarity search.
[0068] 2. Similarity algorithm Similarity algorithms can be understood as a type of calculation method used to quantify the degree of similarity between two or more objects. Its core lies in mapping objects to a measurable space through mathematical modeling and calculating similarity based on features such as distance or angle in the space. According to different data types and application scenarios, they are mainly divided into the following categories: (1) Distance-type algorithms (such as Euclidean distance, Manhattan distance, Minkowski distance) directly measure the similarity of numerical vectors through geometric distance in space. The smaller the distance, the higher the similarity; (3) Cosine similarity focuses on the consistency of vector direction and measures the similarity of high-dimensional sparse data (such as text vectors) through the cosine value of the angle. It is not sensitive to the magnitude; (3) Set similarity algorithms (such as Jaccard coefficient, overlap coefficient) are suitable for discrete data and calculate similarity through the ratio of set intersection and union; (4) Structural similarity algorithms (such as edit distance, dynamic time warping) are for sequence or structural data and measure similarity through minimum editing cost. The essence of similarity algorithms is to transform abstract relationships between objects into computable scalar values through a metric function defined in the feature space. Their design must consider both data characteristics (such as sparsity, dimensionality, and distribution) and task objectives (such as retrieval, clustering, and classification), achieving a balance between efficiency and accuracy. Current trends combine the advantages of representation learning and metric learning, significantly improving generalization ability in complex semantic scenarios through end-to-end deep model adaptive learning of task-driven similarity metrics.
[0069] 3. YUV channel YUV is a color coding model based on the characteristics of human vision, widely used in image processing and video systems. It's a method of representing an image by separating its luminance (Y) and color (U, V) information. Its core principle is to decouple color information into one luminance component (Y component) and two chrominance components (U component and V component, respectively). The "luminance component" represents the image's lightness information, preserving the structured details and edge features of the scene, and plays a dominant role in visual perception. The two chrominance components describe the offset of pixel color from blue and red references, respectively, together constituting the color saturation and hue attributes. For example, the U component can represent the degree to which each pixel's color leans towards blue or yellow, and the V component can represent the degree to which each pixel's color leans towards red or green.
[0070] Normally, the human eye is extremely sensitive to brightness because rod cells are more numerous and densely distributed, making them highly perceptive to changes in light intensity and edges and details. In contrast, the human eye is relatively insensitive to color, because cone cells are less sensitive to contrast and subtle changes between colors.
[0071] 4. Embedding strength E The embedding strength E can be understood as a parameter that controls the energy level of the watermark signal. It determines the size of the additional signal (e.g. synchronization matrix, private information) added to the carrier signal (e.g. Y channel of an image). Generally, a larger E indicates a higher energy of the additional signal, stronger robustness (stronger attack resistance), but may result in visible additional information, artifacts, and damage to image quality, i.e. poor invisibility. A smaller E indicates a lower energy of the additional signal, good invisibility, but the additional signal is easily lost under attacks such as noise and compression, i.e. poor robustness. Therefore, under normal circumstances, the goal of calculating E is to find a E as large as possible for different regions of the image, so that the additional signal has the strongest robustness in the critical state of just being invisible.
[0072] Generally, there are various methods for calculating the embedding strength E, for example, E can be calculated by a global constant strength method and an adaptive embedding strength method. The following briefly introduces the calculation process of E by taking the adaptive embedding strength calculation process as an example.
[0073] Suppose the image can be divided into 8x8 blocks, and an embedding strength E_block is calculated for each block. Step 1, preprocessing: divide the Y channel image into non-overlapping 8x8 blocks. Step 2, calculate the luminance masking component: for each block, calculate its average luminance L_mean. Map L_mean to a luminance masking factor α_l through a lookup table or function f(L). The function is usually "U" or "V" shaped. For example, the value of α_l is larger in extremely bright and extremely dark conditions. Step 3: Calculate the texture masking component: for each block, calculate the variance σ² of its pixel values.
[0074] Map the variance to a texture masking factor α_t using a function g(σ²). The function is usually monotonically increasing, and the larger the variance, the larger the α_t. Step 4, synthesize the final embedding strength: combine the two factors to obtain the embedding strength of the block: E_block=β×α_l×α_t where β is a global strength factor set by the user, used to control the emphasis of embedding information as a whole. Optionally, step 5, post-processing: to avoid visible block effects caused by large differences in strength between adjacent blocks, the E matrix can be Gaussian filtered or bilateral filtered to make it smooth transition.
[0075] 5、Digital watermarking Digital watermarking is a kind of information hiding technology that embeds specific and identifiable information (i.e., "watermark") into digital media (e.g., images, audio, video) through certain algorithms (e.g., image steganography algorithm) without significantly affecting the original quality and value of the media, and the information can be extracted or detected by detection algorithm when needed. The core goal is to provide security in the fields of copyright protection, content authentication, copy control and information tracing of digital products.
[0076] For example, image steganography algorithm is a kind of digital watermarking technology that embeds information into digital pictures without affecting the visual perception effect of the pictures. Unlike obvious watermarking (e.g., logo superposition), steganography is invisible to the naked eye and can only be detected, extracted or verified by a specific algorithm. Its main purpose is copyright protection, content authentication, tamper prevention, etc. It can also be understood as a technology that generates a new picture by embedding private information on the host picture. This technology implants invisible watermarks on the image, which is almost indistinguishable from the original image in visual effect, but can effectively carry and protect sensitive information.
[0077] Figure 1 is an architecture diagram of an image processing system shown in the present application, as Figure 1 shown, the image processing system is used to perform the process of watermark embedding and the process of watermark extraction. For example, in the watermark embedding process, the original image can be understood as the host image that needs to be protected, and the watermark information can be understood as the copyright logo, a serial number or any authentication information that needs to be hidden. For example, the watermark embedding algorithm takes the "original image" and "watermark information" as input, and embeds the watermark information invisibly into the pixel or frequency coefficient of the original image through a specific technique (usually in the transform domain of the image, such as wavelet domain), so as to output an image including watermark information, which should have almost no difference in visual effect from the original image, but has carried hidden watermark data inside. For example, in the process of extracting watermark, the image including watermark information can be understood as the image that needs to be verified for copyright, which may have been transmitted, compressed or otherwise processed. For example, the watermark extraction algorithm analyzes the input watermark-containing image, detects and recovers the hidden information from the image according to the rules and keys used during embedding. By comparing the extracted watermark information, the source, authenticity and copyright of the image can be verified.
[0078] Now let's introduce several common application scenarios of digital watermarking technology: (1) Copyright protection and ownership declaration: Embed the owner's information as a watermark in the digital content. In the event of a copyright dispute, the watermark can be extracted to provide legal evidence. (2) Content authentication and integrity verification: Used in fields such as justice, medicine, and news to ensure that digital content has not been tampered with. (3) Copy control: Embed "copy prohibited" or "copy once allowed" watermarks in media such as DVDs and Blu-ray discs. Playback devices or recording devices will read the watermark and perform the corresponding operation. (4) Information hiding and encrypted communication: Hide encrypted information in public digital media for transmission to avoid attracting attention.
[0079] 6. Spread spectrum matrix In the field of digital watermarking, the spread spectrum matrix is a core tool for implementing spread spectrum watermarking technology. It is a mathematical matrix that extends and hides watermark signals in multiple dimensions. It can also be understood as a "spread pseudo-random code" concept commonly used in image digital watermarking, digital fingerprinting, and steganography applications. Essentially, it is a two-dimensional matrix of pseudo-random sequences (+1 / -1 or 0 / 1) used to "spread" a bit of information to be embedded into many pixels / transform coefficients. The core idea of this technology is to modulate a narrowband, energy-concentrated signal with a wideband, pseudo-random spread spectrum sequence, spreading its energy over a very wide frequency band, making its power spectral density much lower than the ambient noise, making it difficult to detect and interfere. It can also be understood as dispersing a single, vulnerable information bit into many carrier elements (pixels or transform coefficients). In this way, even if part of the carrier is attacked or damaged, the original information bit can still be recovered from the remaining part. This is similar to spread spectrum technology in wireless communication, which improves the anti-interference ability by spreading the signal over a wider frequency band.
[0080] For example, the watermark information to be embedded can be a binary bit sequence, such as [1, 0, 1, 1, …, 0] (i.e., binary composed of 0 and 1); or [1, -1, -1, 1, …, 1] (i.e., binary composed of -1 and 1). The spread spectrum matrix can be understood as a matrix generated by a pseudo-random number generator with a specific structure, where each row or column can be considered a spread spectrum sequence. After modulation by the spread spectrum matrix, a watermark signal template is generated, which is superimposed on the host image with extremely low intensity.
[0081] 7. Image attack Generally, "image attacks" can be understood as a series of processing operations aimed at interfering with, destroying or removing the hidden information (such as watermark, fingerprint) embedded in the image or destroying its original integrity. These attacks can interfere with the detection system, making it unable to correctly extract or verify the hidden information. For example, image attacks include compression, noise addition, filtering, sharpening, etc., and the following introduces two typical image attacks.
[0082] (1) Geometric attack "Geometric attack" can be understood as destroying hidden information by changing the spatial coordinates or pixel layout of the image. Most watermark embedding and detection algorithms rely on the original position of the pixels. Geometric attacks destroy this spatial synchronization relationship, causing the detector to fail to accurately locate the watermark, even if the watermark data itself is not erased. For example, the main means of geometric attack include at least one of the following: ① rotation: rotating the image around the center point by a certain angle. ② scaling: enlarging or reducing the entire image or a local part. ③ translation: moving the image in the horizontal or vertical direction. ④ cropping: cutting off part of the image, directly removing part of the embedded information. ⑤ screen capture: an attack means that acquires, copies or spreads the digital content displayed on the screen by capturing the screen image of the device.
[0083] (2) Screen capture attack "Screen capture attack" can be understood as a special, analog-digital re-sampling attack that is extremely common in the real world. For example, the attack process involves two domain conversions: digital domain → analog domain → digital domain. First, the digital image is displayed in the form of light through the screen (display, mobile phone, TV) (analog signal); then another acquisition device (such as a mobile phone camera, digital camera) re-shoots and digitizes this optical image. This process introduces a variety of complex interferences, such as (1) geometric distortion: due to the improper shooting angle, perspective distortion (lenticular distortion) is generated. (2) resolution reduction and blurring: the interaction between screen pixels, camera sensor pixels and lens quality can cause moire and overall image blurring. (3) color and brightness distortion: the differences in color gamut, gamma curve and white balance settings between the screen and the camera will cause serious color deviation. Environmental light will affect the contrast and brightness of the screen content. (4) noise: the camera sensor will introduce digital noise in dark light conditions. (5) optical artifacts: lens distortion (such as barrel, pillow distortion) and glare, reflection can seriously pollute the image content.
[0084] Generally, image steganographic algorithms based on frequency domain and spatial domain cannot resist both geometric attacks and screen capture attacks, especially screen capture attacks, which cannot better extract watermark information when encountering screen capture attacks. Therefore, an image processing method is needed to improve the robustness of watermark information embedding, so as to resist geometric attacks and screen capture attacks, in order to improve the success rate of subsequent watermark extraction.
[0085] Therefore, the present application provides an image processing method, which can process the brightness channel of an image through local synchronization information and global synchronization information. Since the local synchronization information indicates the rules of spreading matrix translation and / or flipping, a plurality of first synchronization matrices can be obtained, and the plurality of first synchronization matrices can be spread across the entire image. For example, even if the image is cropped, the geometric distortion of the image can be recovered based on the first synchronization matrix in the remaining image, so that the geometric attack can be resisted. In addition, the global synchronization information can indicate the position of each first synchronization matrix in the first image, so that the screen attack can be resisted through the global synchronization information. It can be seen that the method provided by the present application can resist geometric attack and screen attack at the same time, improve the robustness of watermark information embedding, and thus improve the success rate of subsequent watermark extraction.
[0086] Figure 2 is a schematic flowchart of an image processing method 200 provided by an embodiment of the present application. For example, the method can be executed by a computing device. For another example, the method can be executed by infrastructure in a cloud service system. In the present embodiment, the application scenario and execution subject of the method are not limited. Figure 2 The method can also be understood as a method of embedding watermark information in an image, as shown in Figure 2 The method is applied to an image processing system, and the method comprises the following steps. 210, obtaining a first channel and a second channel corresponding to a first image.
[0087] In the present embodiment, the first image can be understood as an image that needs to embed watermark information. It can also be understood that the first image is a host image, that is, an original digital image that serves as a watermark carrier, and can also be understood as an input object of the watermark embedding operation.
[0088] For example, the host image (for example, the first image) can be separated into three YUV channels. In the present embodiment, the first channel can be understood as the brightness channel of the first image, that is, the Y channel; and the second channel can be understood as the chroma channel of the first image, for example, the U channel or the V channel.
[0089] For example, the Y channel can be understood as a gray-scale image, which generally retains the outline, texture and all details of the original image. For example, the U channel and the V channel can be understood as two color difference images that are used to store color information. For example, the U channel represents the difference between blue and brightness, and the V channel represents the difference between red and brightness. In other words, the Y channel carries the brightness information of the first image, and the U channel and the V channel carry the color information of the first image.
[0090] 220, processing the first channel according to the local synchronization information and the global synchronization information to obtain a processed first channel.
[0091] It can also be understood that the embodiment of the application proposes that the Y channel can be used as a synchronization information carrier channel. For example, the image processing system stores the local synchronization information and the global synchronization information.
[0092] In the embodiment of the application, the processed first channel includes information of a plurality of first synchronization matrices and information of positions of each synchronization matrix. It can also be understood that the local synchronization information and the global synchronization information are embedded in the Y channel. The local synchronization information is used to resist geometric attacks, so that the resolution of the image is restored when the image is subjected to geometric attacks. The global synchronization information is used to resist screen attacks, so that the distortion of the image is restored after the image is subjected to screen attacks.
[0093] In the embodiment of the application, the first synchronization matrix is obtained by performing a translation and / or a flip operation on the spread spectrum matrix according to the local synchronization information. The local synchronization information is used to indicate the rules of the translation and / or the flip of the spread spectrum matrix. The global synchronization information is used to indicate the position of each first synchronization matrix in the first image. For example, the local synchronization information and the global synchronization information can be preset in the image processing system. The local synchronization information and the global synchronization information will be introduced below.
[0094] For example, the spread spectrum matrix can be a spread spectrum matrix with high robustness, that is, the pseudo-random sequence itself has excellent characteristics and can resist various attacks to the maximum extent. For example, a pseudo-random sequence similar to an ideal white noise can be designed by a person skilled in the art. The pseudo-random sequence has two most core mathematical characteristics, that is, a sharp autocorrelation peak and a very low cross-correlation value, can resist various forms of interference and damage, and can be uniquely and accurately extracted. For example, the spread spectrum matrix can be an m-sequence, a Gold sequence, or the like. The embodiment of the application does not limit the specific form of the spread spectrum matrix, and a person skilled in the art can reasonably determine the spread spectrum matrix based on actual business conditions.
[0095] For example, the local synchronization information can be understood as a coding rule, for example, the local synchronization information can indicate at least one of the following operations: (1) cyclic shift: cyclically shifting the spread spectrum matrix in the row and / or column direction; (2) flip: horizontally flipping (which can also be understood as x-coordinate flipping), vertically flipping (which can also be understood as y-coordinate flipping), or a combination of both, the spread spectrum matrix. Optionally, it also includes phase change: for example, in some transform domain (such as discrete fourier transform (DFT)), it can also be understood as applying a linear phase shift. For example, it can also be understood that the local synchronization information is the recipe of the system, which tells the embedding module how the spread spectrum matrix is shifted and / or flipped, or it can also be understood that the first synchronization matrix has what characteristics.
[0096] For example, a spread spectrum matrix with high robustness (an example of a spread spectrum matrix) can be built into the system, which can be repeatedly shifted, x-coordinate flipped, and y-coordinate flipped to obtain a first synchronization matrix. Subsequently, the first synchronization matrix can be distributed throughout the image. For example, a second synchronization matrix T can be obtained by multiple first synchronization matrices t, which has the same size as the host image and has good synchronization characteristics. For example, Figure 3 is a schematic diagram of a spread spectrum matrix s, a first synchronization matrix t, and a second synchronization matrix T shown in the present application, as Figure 3 For example, q can be understood as a spread spectrum matrix, and after horizontally flipping q, a matrix p is obtained; after vertically flipping q, a spread spectrum matrix d is obtained; after horizontally flipping q and then vertically flipping q, a spread spectrum matrix b is obtained, for example, the four spread spectrum matrices can be understood as a synchronization matrix t. Subsequently, the first image can be fully covered based on the first synchronization matrix t, thereby obtaining a second synchronization matrix T, which can also be understood as that the first image includes multiple first synchronization matrices t.
[0097] For example, the global synchronization information can be understood as including the geometric reference points (such as corner points, center points, etc.) of each first synchronization matrix, which can describe the framework system of the absolute coordinates of the entire synchronization grid in the image space. For example, the local synchronization information can indicate the appearance of the first synchronization matrix in a small, relative coordinate system (for example, obtained by shifting / flipping rules).
[0098] For example, the global synchronization information can be understood as an anchor grid, and each first synchronization matrix is located at a specific position in the absolute coordinate system of the entire image. That is, the positions of the first synchronization matrices in the image can be indicated. For example, anchors can be embedded at the four corners of the first synchronization matrix to indicate the boundary positions of the first synchronization matrix. Generally, the anchors can be understood as special synchronization signals that are easy to detect and ensure that they can be located with high accuracy even after severe distortion. For example, the four edges of a quadrilateral of a first synchronization matrix are defined unambiguously by the four anchors. When the image is subjected to geometric attacks (especially nonlinear attacks such as perspective, distortion), the positions of the anchors will move accordingly, and the distortion of the regular grid is quantified by the shift of the anchor positions. For example, a shorter, more robust, and sharper autocorrelation peak sequence can be embedded at the positions of the four corners of the first synchronization matrix. By embedding anchors at the four corners, the energy of the four corner pixels is higher than that of the surrounding pixels. Figure 4 An example of embedding anchors at the four corners of a first synchronization matrix is shown in FIG. 3. Figure 4 As shown in FIG. 3, anchors can be embedded at the four corners of the first synchronization matrix to form an anchor grid. This anchor grid can also be understood as an ideal anchor grid structure, that is, the positions of the anchors can be indicated without any attack. It should be noted that other schemes can also be used to locate the position information of each first synchronization matrix in the first image, which is not limited in the present application.
[0099] In a possible implementation, the first synchronization matrix can be obtained according to the local synchronization information. Then, the first channel is processed according to the plurality of first synchronization matrices and the global synchronization information to obtain the processed first channel. As described above, the local synchronization information can be understood as a set of predefined rules that map a position (i, j) in the image to a specific operation on the spreading matrix. For example, at position (i, j), the rule is to cyclically right-shift the spreading matrix by a certain number of bits and then horizontally flip it; at position (i+1, j), the rule can be to cyclically down-shift the spreading matrix by a certain number of bits. For example, the embedding algorithm performs the corresponding shift and / or flip operation on the unique and fixed spreading matrix according to the rule of the target position (i, j), and then the first synchronization matrix can be obtained. Then, the plurality of first synchronization matrices are spread over the entire first image, and the position information of each first synchronization position is obtained based on the global synchronization information, and then the processed first channel can be obtained, which embeds a complete synchronization grid (which can also be understood as a second synchronization matrix T), for example, the four corners of each first synchronization matrix also include anchors.
[0100] For example, the embedding strength E of each pixel in the first image can be calculated according to the image features of the Y channel, and the processed Y channel can be denoted as Y', Y' = Y + E x T. For details of the embedding strength E and the calculation process, refer to the above description of the professional terms, which will not be repeated here.
[0101] 230, embedding watermark information in the second channel to obtain a processed second channel.
[0102] As mentioned above, in the embodiments of the present application, the second channel can be understood as the U channel and / or the V channel, or can be understood as embedding watermark information in the U channel and / or the V channel. It can also be understood that the U and / or V channel is proposed in the embodiments of the present application as a privacy information carrier channel, so that it is not easy to be perceived by the human eye, because the resolution and sensitivity of the human eye to chroma components are significantly lower. Therefore, by using this characteristic, the watermark information can be embedded with energy close to or below the visual perception threshold.
[0103] In general, no matter what the watermark represents (for example, a piece of text, a logo picture, a copyright mark), it can be encoded into a binary sequence in the digital world. For example, the watermark information to be embedded can be understood as a binary bitmap (or a string of binary bit stream), or the watermark information can be encoded into a binary bitmap.
[0104] In a possible implementation, embedding watermark information in the second channel can use existing schemes. For example, the frequency domain algorithm technique can be used for embedding watermark information, for example, the U channel (or the V channel) can be subjected to frequency domain transformation, and then divided into subblocks of the same size; for each subblock, singular matrix is calculated using singular value decomposition (SVD); finally, each 1bit information is embedded based on the idea of energy difference. For another example, the spatial domain related technique can be used for embedding watermark information in the second channel.
[0105] In order to further improve the robustness of the watermark information embedded in the second channel, the present application proposes a four-part energy difference steganography algorithm, and the method for embedding watermark information in the second channel provided by the present application will be mainly introduced as follows.
[0106] In a possible implementation, the method 200 further includes: obtaining a third channel corresponding to the first image, the third channel being obtained according to the second channel; obtaining a plurality of watermark units corresponding to the watermark information, each watermark unit being used to represent the watermark information, each binary bit in the watermark information being represented by k×k pixel units in the watermark unit, and the size of each watermark unit being n×n, where n=m×k; embedding the plurality of watermark units in the third channel respectively to obtain a processed third channel; and obtaining a processed second channel according to the processed third channel.
[0107] For example, one of the U channel (an example of the second channel) and the V channel (another example of the second channel) with less visual impact can be selected, for example, the U channel, and then the U channel is processed by the discrete wavelet transform (DWT), and a low-frequency subband LL is selected as the N channel (an example of the third channel), and the watermark information is embedded in the N channel. For example, the selected U channel is decomposed by one layer of DWT. Four subbands are generated: (1) a low-frequency approximation subband (LL), which contains the main structure and outline information of the image, and the energy is most concentrated; (2) a horizontal direction mid-high frequency detail subband LH: low frequency vertical, high frequency horizontal; (3) a vertical direction mid-high frequency detail subband HL: high frequency vertical, low frequency horizontal; and (4) a diagonal direction high frequency detail subband HH. Through the operation, the image can be converted from the "spatial domain" to the "frequency domain", so that we can operate on different frequency components. Generally, most of the energy and main information of the image are concentrated in the LL subband. Common signal processing attacks (such as compression, filtering, and slight noise) mainly weaken the high-frequency information, and have relatively small impact on the LL subband. Therefore, the watermark information is embedded in the LL, which is relatively stable.
[0108] Then, the N channel is divided into a plurality of watermark units, each of which contains the entire watermark information, for example, the size of each watermark unit is n×n. The entire bit pattern W' = m×m is embedded in each watermark unit n×n, and each bit is filled with k×k pixels, where k = n / m. For example, the size of the host image is 1024×1024, it is assumed that the watermark unit is designed to be 4, the size of each watermark unit is 512×514, and it is assumed that the size of the bit pattern is 16×16, so that each bit can be represented by 32×32 pixels. It can also be understood that one 32×32 pixel can be used to represent one proportion in the bit sequence, for example, 0 in the bit sequence, and for example, 1 in the bit sequence. Then, the four watermark units can be embedded in the N channel, for example, the upper left corner, the upper right corner, the lower left corner, and the lower right corner of the host image respectively embed one watermark unit.
[0109] For example, a spread spectrum matrix technique can be used to spread each bit when embedding.
[0110] In a possible implementation, the energy difference value of the k x k pixel units corresponding to the first value in the binary bit sequence is a first difference value, and the energy difference value of the k x k pixel units corresponding to the second value in the binary bit sequence is a second difference value, where the energy difference value is used to indicate the difference between the energy corresponding to the first sub-block and the energy corresponding to the second sub-block, and the first sub-block and the second sub-block are each half of the k x k pixel units.
[0111] For example, a k x k matrix can be divided into four sub-blocks (for example, it can also be divided into two sub-blocks, or six sub-blocks, or eight sub-blocks, etc.) from the center, for example, including a top-left sub-block (TL), a top-right sub-block (TR), a bottom-left sub-block (BL), and a bottom-right sub-block (BR). For example, a key energy difference value D can be defined for each sub-block, which represents the symmetry relationship of the energy in the sub-block, for example, D = E 正对角线 - E 副对角线 , where E 正对角线 represents the energy sum in the positive diagonal direction, E 正对角线 = Ē_TL + Ē_BR. E 副对角线 represents the energy sum in the negative diagonal direction, that is, E 副对角线= Ē_TR + Ē_BL. Ē_XX can be understood as an energy level measure of a certain sub-block, for example, the arithmetic mean of all pixel values of the sub-block can be used as a representative of its energy level. Therefore, the calculation formula of D can be written as: D = (Mean_TL + Mean_BR) - (Mean_TR + Mean_BL). For example, the pixel values within the four sub-blocks can be modified so that the energy difference D is towards a certain target value, thereby embedding the corresponding bit. For example, when a k x k pixel unit is used to represent a 0 bit, the energy advantage in the positive diagonal direction can be strengthened. For example, by adjusting the value of the pixel, D is positive (for example, the first difference value is positive), to ensure that (Ē_TL + Ē_BR) > (Ē_ TR + Ē_BL), that is, the integrated energy level of the positive diagonal region is higher than that of the sub-diagonal region. For example, when a k x k pixel unit is used to represent a 1 bit, the energy advantage in the sub-diagonal direction can be strengthened. For example, by adjusting the value of the pixel, D is negative (for example, the second difference value is negative), to ensure that (Ē_ TL + Ē_ BR) < (Ē_ TR + Ē_ BL), that is, the integrated energy level of the sub-diagonal region is higher than that of the positive diagonal region. In this scheme, the modified k x k pixel unit can also be understood as similar to the effect of the spreading matrix, and therefore can also be understood as obtaining two different spreading matrices by modifying the pixel values.
[0112] For example, the pixel values of the k x k pixel unit can also not be modified, and two different spreading matrices can be constructed to represent 0 bits or 1 bits of the binary bit sequence, respectively. For example, 0 bits correspond to spreading matrix #1 denoted as s1, and 1 bits correspond to spreading matrix #2 denoted as s2, and for example, s2 = -s1. For example, spreading matrix #1 and spreading matrix #2 can be constructed so that the energy difference value of the k x k pixel unit based on spreading matrix #1 is the second difference value, and the energy difference value of the k x k pixel unit based on spreading matrix #2 is the second difference value. For example, the first difference value is positive, and the second difference value is negative. It can also be understood that in this implementation, the values of the k x k pixel unit at each pixel are not modified, but different spreading matrices are constructed to realize the idea of energy difference in the k x k pixel unit.
[0113] Further, the watermark strength matrix E of each pixel point can also be calculated according to the watermark unit W' and the watermark information, the N-channel image texture feature and the spread spectrum matrix. At this time, the processed N-channel can be understood as N' = N (original watermark channel) + E (watermark information, texture feature, spread spectrum matrix), that is, the N' channel in which the watermark information is embedded is obtained. For example, U' can be obtained after inverse DWT transformation (that is, the processed second channel is obtained according to the processed third channel). If the V channel is also processed in the process of embedding the watermark information, U' and V' channels obtained after inverse DWT transformation can be obtained at this time.
[0114] 240, the processed first image including the watermark information is obtained according to the processed first channel and the processed second channel.
[0115] For example, Y', U' and V' (for example, if only the U channel is processed in the process of embedding the watermark information, Y', U' and the unprocessed V channel can be combined into a watermark image carrying the watermark information.
[0116] Figure 5 The embodiment of the present application shows a flowchart of embedding watermark information in an image, as shown in Figure 5 As shown in the figure, the host image can be input, for example, the image can be converted from the RGB color space to the YUV color space, and the Y, U and V channels are separated. The Y channel is processed by the system preset spread spectrum matrix with good robustness. For example, the spread spectrum matrix can be a pseudo-random matrix with sharp autocorrelation, which is used as a master version for generating a synchronization matrix. Then the local texture of the image can be obtained, which is used for perceptual adaptive embedding to ensure that stronger synchronization signals are embedded in the texture complex area, and weaker signals are embedded in the flat area to maintain invisibility. In combination with the above processing procedure, the Y channel containing local synchronization information is generated. For example, the spread spectrum matrix can be translated, flipped and the like according to the image position, to generate a position-related synchronization matrix that is distributed throughout the image, and is adaptively embedded in the Y channel. Then, in combination with the system preset global synchronization information, the Y channel including the local synchronization information and the global synchronization information is obtained. For example, the global synchronization information can indicate the ideal layout of the synchronization matrix (such as regular grid points, anchor positions).
[0117] Figure 5The watermark information in the image can be understood as secret data that needs to be hidden, which is usually a binary bit stream. For example, the U or V channel (usually one of them) can be selected for operation. For example, a discrete wavelet transform or other frequency domain transform can be performed on the channel to convert the image from the spatial domain to the frequency domain and obtain a frequency domain image. From the transformed subbands, the low-frequency subband (LL) with the most concentrated energy and the most robustness is selected, denoted as N channel. Then, an energy difference spread spectrum matrix can be constructed. For example, according to the watermark information (0 or 1), a kind of energy difference spread spectrum matrix is dynamically constructed or selected. For example, a matrix representing 0 and 1 can be obtained by adjusting the internal energy relationship of a k x k block (such as the positive and negative diagonal energy difference), so as to obtain an energy difference spread spectrum matrix constructed based on the watermark information. Then, the generated energy difference spread spectrum matrix is embedded in the N channel.
[0118] Then, an inverse transform (such as inverse DWT) is performed to restore the modified frequency domain data to spatial domain data, and a U / V channel including watermark information is obtained. Finally, the three processed channels, i.e., the Y channel including synchronization information and the U / V channel including watermark information, are synthesized, for example, converted back to the RGB color space, and an output watermark image is output.
[0119] Specifically, Figure 5 Each flow in the image can be understood with reference to the description of method 200 above, and will not be repeated here.
[0120] Figure 6 is a schematic flowchart of an image processing method 600 provided by an embodiment of the present application. For example, the method can be executed by a computing device; and for another example, the method can be executed by infrastructure in a cloud service system. In the present embodiment, the application scenario and execution subject of the method are not limited. Figure 6 The method can also be understood as a method of extracting watermark information from an image. For example, method 600 and method 200 can be used together, and for another example, method 600 and method 200 can be used separately. As shown in Figure 6 The method can be applied to an image processing system, and the method includes: 610, obtaining a third image corresponding to a first channel and a second channel.
[0121] For example, the third image can be understood as an image that needs to extract watermark information. For example, watermark information can be embedded in the third image. For example, the third image is embedded with watermark information according to the flow shown in method 200 or method 500. In some scenarios, the third information can be attacked by image attacks, such as geometric attacks and / or screen attacks.
[0122] In the embodiments of the present application, the first channel can be understood as a luminance channel of the third image, for example, a Y channel; and the second channel can be understood as a chrominance channel of the third image, for example, a U channel and / or a V channel. For example, the third image can be separated into YUV three channels.
[0123] 620, processing the first channel according to the global synchronization information and the local synchronization information to obtain a corrected third image.
[0124] In the embodiments of the present application, the first channel can be understood as a channel including the local synchronization information and the global synchronization information, and the second channel of the third image can include watermark information. For example, the image processing system stores the local synchronization information and the global synchronization information.
[0125] In the embodiments of the present application, the first channel of the third image includes a plurality of first synchronization matrices, wherein the first synchronization matrix is obtained by performing a translation and / or a flip operation on a spread spectrum matrix according to the local synchronization information, the local synchronization information is used to indicate the rule of the translation and / or the flip of the spread spectrum matrix, and the global synchronization information is used to indicate the position of each first synchronization matrix in the third image. For example, the first channel can be processed using self-convolution to check whether it includes the local synchronization information and the global synchronization information. If it does not include the local synchronization information and the global synchronization information, the watermark can be extracted according to the existing scheme. If it is judged to include the local synchronization information and the global synchronization information, the local synchronization information and the global synchronization information can be used to restore the entire image to the original size.
[0126] The step 620 can be understood as correcting the third image. For example, when the image is subjected to geometric attacks and / or screen attacks, based on the step 620, the attacked image can be straightened so that the watermark information can be smoothly extracted on the second channel subsequently.
[0127] Assuming the third image has undergone unknown geometric deformation, the extractor can now use the system pre-defined spread spectrum matrix with higher robustness to perform correlation calculation on the Y channel of the distorted image. For example, the first synchronization matrix is a pseudo-random pattern with a sharp autocorrelation peak, i.e. when the spread spectrum matrix is aligned with its instance in the image, the correlation output will produce a sharp peak even under noise and attacks. Thus by finding these peaks, the extractor can determine that the channel contains both local synchronization information and global synchronization information. In addition, the position of each peak corresponds to the actual coordinate of a first synchronization matrix in the current distorted image. Since the ideal coordinate of each first synchronization matrix in the original unattacked image can be determined based on the global synchronization information, a mapping model can be constructed to correct the image. For example, a set of coordinates of all detected synchronization points in the distorted image can be obtained, and a set of ideal coordinates of these synchronization points in the original un-distorted image can be obtained based on the system pre-defined global synchronization information. By comparing the two sets of points, a geometric transformation model P can be calculated, which describes the mapping relationship from the distorted image to the original image. Applying the inverse transformation of the transformation P to the entire Y channel (i.e. to the entire image) for resampling, the corrected third image is obtained. At this time, the image has been basically restored to its original geometric state.
[0128] The above scheme can also be understood as follows: the first synchronization matrix can be determined according to the local synchronization information; the first channel is processed according to the plurality of first synchronization matrices and the global synchronization information, to obtain the corrected third image.
[0129] 630, obtaining the watermark information in the third image according to the second channel corresponding to the corrected third image.
[0130] For example, the corrected U channel and V channel are then used to extract the bit pattern of the watermark information according to the inverse process of the watermark embedding process.
[0131] For example, the effects of geometric attacks such as rotation, scaling, cropping, perspective, etc. can be eliminated by step 620. Therefore, the corrected third image in step 630 has eliminated geometric deformation, and the watermark embedding domains (such as blocks in the U / V channel) have returned to their original positions and shapes.
[0132] Since the image has been corrected, the extractor can extract the watermark according to the standard rules agreed upon during embedding. For example, directly read the spread spectrum sequence or energy difference feature embedded before in a specific location of the U / V channel, and decode the bit stream of the watermark information. For example, assuming that the watermark information is a binary bit sequence during the watermark embedding process, the size of the binary bit sequence is m x m.
[0133] In a possible implementation, the third channel corresponding to the corrected third image is obtained, and the third channel is obtained according to the second channel; at least one watermark unit is obtained according to the third channel, the third channel includes at least one watermark unit, each watermark unit is used to represent watermark information, each binary bit in the watermark information is represented by k×k pixel units in the watermark unit, and the size of each watermark unit is n×n, where n=m×k; and the watermark information in the third image is obtained according to the at least one watermark unit. For example, the energy difference value of the k×k pixel units corresponding to the first value in the binary bit sequence is a first difference value, and the energy difference value of the k×k pixel units corresponding to the second value in the binary bit sequence is a second difference value, where the energy difference value is used to indicate the difference between the energy corresponding to the first sub-block and the energy corresponding to the second sub-block, and the first sub-block and the second sub-block are each half of the k×k pixel units. The related terms in the implementation can be referred to the description of step 230 in method 200, or it can also be understood that the implementation is the inverse process of step 230, that is, the watermark extraction process.
[0134] For example, the second channel can be understood as a U channel or a V channel, and the third channel can be understood as an N channel. For example, the extractor can divide the third channel into a plurality of grids composed of watermark units, and find one or more watermark units. For example, the extractor can traverse each watermark unit, and for each k×k pixel unit in the unit, execute a specific decoding algorithm. For example, since the energy difference is used for embedding, the energy difference D inside the pixel unit can be calculated, and according to the positive or negative of D, it is judged whether the k×k pixel unit represents bit 0 or bit 1. For example, when D is positive, it means that the embedded bit is 0; for example, when D is negative, it means that the embedded bit is 1.
[0135] Figure 7 The embodiment of the present application shows a flowchart for extracting watermark information from an image, as shown in Figure 7As shown, a watermark image to be detected can be input, which can be an image that has been subjected to various attacks (e.g., compression, noise, rotation, scaling, etc.). The watermark image is converted to YUV color space, and Y, U, V channels are separated for subsequent processing. Attempt to detect the locally embedded synchronization information (e.g., first synchronization matrix) and globally embedded synchronization information (e.g., four corners of each first synchronization matrix boundary) in the Y channel. For example, a search can be performed using a system preset spreading matrix by techniques such as autocorrelation or matched filtering, and if enough and strong synchronization signal peaks are found, it is determined to be yes, otherwise it is determined to be no. For example, when no local and global synchronization information is detected, watermark extraction can be performed based on existing procedures; if it is determined to be yes, the detected distorted anchor points can be matched with system pre-stored ideal anchor points to calculate an affine transformation model (which can solve screen capture attacks, etc.). At the same time, the local synchronization information helps to more accurately locate the features, and in combination with the global information, the scale can be further corrected to ensure that the image is restored to the original size when embedded. For example, in general, the two steps can be performed in combination. Through the two steps, linear geometric deformation and nonlinear geometric deformation of the image can be corrected to ensure the accuracy of subsequent watermark unit positioning. On the corrected U or V channel, the position of each watermark unit is accurately located according to the agreed rule (watermark unit spacing n x n) when embedded. It can also be understood that at this time the image has been "straightened", so the watermark unit is now in its original position and can be accurately divided. For each k x k pixel unit inside each watermark unit, the energy difference feature value D defined inside it (e.g., the difference between the average values of the main diagonal region and the sub-diagonal region) is calculated, and the watermark information is obtained according to the energy difference. For example, according to the sign of D, when D > 0, it is decoded as bit 0, and when D < 0, it is decoded as bit 1. All decoded bits are combined in order to obtain the recovered watermark information, and the original watermark is obtained based on the watermark information.
[0136] Generally, a user of a watermark system can obtain a large amount of image data to be screened on a relevant Internet site, and then screen the image data to obtain images suspected of possible infringement by manual screening, or send a large amount of image data to be screened into a watermark extraction system, extract watermarks by using an application programming interface (API) of a watermark extraction application, correct errors by using an error correction code, check whether the watermark information is complete by using a check code, and trace the source after the watermark information is extracted. This method needs to attempt to extract watermarks from each image, and the overall time is long and the resource consumption is large. Therefore, the embodiment of the present application further provides an image screening method, which combines deep learning and vector retrieval technology to reduce the required computing resources when screening a large amount of images, improve the screening speed, and reduce the consumption of system resources.
[0137] Figure 8 The method is a method for screening image watermarks provided by the present application. For example, the method can be applied to an image processing system. For example, the method 800 is used in combination with the method 200 and / or the method 600, as shown in Figure 6 The method includes the following steps. 810, obtaining a plurality of second images.
[0138] For example, the plurality of second images are images that need to be extracted for watermarks. For example, each of the plurality of second images may
[0139] For example, the watermark information embedded in each of the plurality of second images may be the same or different.
[0140] 820, obtaining at least one candidate image according to the plurality of second images, a similarity algorithm, and a vector database.
[0141] For example, according to user selection, a target image to be protected and a target watermark are determined. For example, in a possible implementation, a vector database is constructed, and the vector database includes a plurality of target vector data. For example, each target image to be protected can be vectorized to obtain target vector data, and one target vector data can indicate one target image. Further, each target watermark can be encoded to obtain a corresponding binary bit sequence, which can also be understood as target vector data. At this time, the vector database can include target vector data for indicating a plurality of target images. In some other implementations, the vector database further includes target vector data for indicating target watermarks.
[0142] Exemplarily, the plurality of target images can be sent into the offline trained neural network to be converted into target vector data and added to the vector database. Exemplarily, the plurality of target watermarks can be sent into the offline trained neural network to be converted into target vector data and added to the vector database. For example, the watermark information in the method 200 described above can be a binary bit sequence converted based on the neural network. For example, the neural network model can be fine-tuned to obtain.
[0143] For example, the vector database can further store a mapping relationship between each target vector data and the target image. For example, a mapping relationship between each target vector data and the target watermark can be stored. Exemplarily, a remote dictionary service (Redis) database can be used, that is, each vector data is stored in the vector database in the form of key-value, and the corresponding relationship between each vector data and the target image or the target watermark is stored.
[0144] In the screening of massive image data, the plurality of second images can be converted into vector data by the neural network first, and then vector matching is performed between each target vector data in the vector database, so as to obtain at least one candidate image. The at least one candidate image is a subset of the plurality of second images, and can also be understood as being able to be screened by the vector database. That is, according to the plurality of second images, the similarity algorithm and the vector database, at least one candidate image is obtained, and the similarity between each candidate image and the corresponding target vector data is greater than or equal to the first threshold. It can also be understood that the candidate image corresponds to a vector data, and the similarity between the vector data corresponding to the candidate image and the target vector data in the vector database is very high, which can indicate that the candidate image is an image that the user pays more attention to, that is, the target watermark information can be embedded in these candidate images. It can also be understood that the image is likely to be protected by the watermark system and needs to enter the watermark extraction process for further analysis. If the similarity is low, it means that the image is probably not protected by the watermark and the screening process can be directly ended. This step is a key and efficient screening link in the massive data processing scenario, which realizes rapid preliminary shunting, greatly saves system resources, and improves the screening efficiency.
[0145] For example, the image processing system can call the vector database. Exemplarily, in a possible implementation manner, the vector database is deployed in the image processing system, and the image processing system can directly use or call the vector database through an API interface (for example, through a request-response mode). It can also be understood that, in the implementation of the present application, when screening a large amount of data, some unimportant image data can be filtered out through the vector data graph, and then only the image of interest needs to be executed watermark extraction process, which can not only reduce the consumption of system resources, but also improve the accuracy and speed of image screening.
[0146] 830, obtaining watermark information of each of the at least one candidate image, and determining whether the watermark information of each of the at least one candidate image is the target watermark information.
[0147] For example, the watermark extraction process can be performed on each candidate image (for example, the watermark extraction is performed according to the processes shown in methods 600 and 700), to obtain watermark information of each candidate image, and then it is determined whether the watermark information of each candidate image is the target watermark information.
[0148] In a possible implementation, after the watermark information corresponding to each candidate image is extracted, at least one target vector data is obtained according to the watermark information corresponding to each candidate image in the at least one candidate image, a similarity algorithm and a vector database, each target vector data is used to indicate a target watermark, and the similarity between each target vector data and the watermark information of the corresponding candidate image is greater than or equal to a second threshold; and target watermark information corresponding to each target vector data is determined. After the extracted watermark bit graph, it is judged whether the watermark information is complete by using cyclic redundancy check (CRC), if it is complete, the actual watermark is directly returned, if it is not complete, similarity search can be performed in the vector database, and when the similarity is greater than or equal to the second threshold, it is prompted that there may be infringement. It can also be understood that, based on the binary bit graph corresponding to the extracted watermark information, after using error correction code repair and check code check, if the check is successful, the value obtained by using the key is directly used as the watermark and returned; if the check fails, the key is used to perform similarity matching in the vector library, and when the similarity is high, it is prompted that there may be a certain target watermark, and an alarm is given. This scheme can improve the tracing strength of the user in related cases.
[0149] As described above, in the embodiments of the present application, since the target vector data indicating the target watermark can also be included in the vector database system, the watermark information corresponding to each candidate image can be input into the vector database, similarity retrieval can be performed, and target vector data can be obtained, which can be understood as target watermark information highly similar to the watermark information corresponding to the candidate image. For example, the target watermark information is completely consistent with the watermark information corresponding to the candidate image; for another example, the target watermark information is highly similar to the watermark information corresponding to the candidate image. At this time, it is illustrated that the watermark information in the candidate image is extremely likely to be the watermark information embedded by the user at that time, and therefore the candidate image can be an image with the nature of infringement. For example, based on the mapping relationship (key-value) stored in the vector database, the target watermark (for example, a colored logo, etc.) can be directly output.
[0150] For example, the similarity can be obtained according to the distance measurement, and the vector can be regarded as a point in space, the closer the distance between the points, the more similar the vectors. The smaller the distance, the higher the similarity. It should be noted that the first threshold and the second threshold in the embodiments of the present application can be reasonably set by those skilled in the art based on actual business conditions, and the present application does not limit the specific values of the first threshold and the second threshold.
[0151] Figure 9 is a schematic architecture diagram of an image processing system provided by the embodiments of the present application, as shown in Figure 9 The image processing system includes a watermark embedding system and a watermark extraction system. For example, the watermark embedding system includes an image vectorization network and a watermark vectorization network, through which the target image and the target watermark can be vectorized to obtain a plurality of target vector data, and the plurality of target data can be stored in a vector database. After that, watermark information embedding can be performed (for example, watermark information embedding can be performed according to the processes in the methods 200 and 500 in the embodiments of the present application), and a watermark image can be obtained. For example, the watermark extraction system also includes an image vectorization network, which can vectorize the watermark image currently needing to be screened to obtain vector data; after that, the vector data can be sent to the vector database for vector retrieval, and at least one candidate image with high similarity can be obtained, and the rest of the images with similarity not meeting the condition can be screened out. Then, watermark extraction processes (for example, watermark information extraction can be performed according to the processes in the methods 600 and 700 in the embodiments of the present application) are performed on each candidate image to obtain watermark information corresponding to each candidate image. After that, the watermark information corresponding to each candidate image can be sent to the vector database for vector retrieval, and a target watermark with high similarity can be obtained.
[0152] It should be noted that the image processing system in the embodiments of the present application can be used only for performing a watermark embedding process (for example, the image processing system can be understood as a watermark embedding system), or only for performing a watermark extraction process (for example, the image processing system can be understood as a watermark extraction system), or can be used for performing both watermark embedding and watermark extraction processes (for example, the image processing system can be understood as a combination of a watermark embedding system and a watermark extraction system).
[0153] Based on the above technical solution, in the embodiments of the present application, the watermark information, that is, the binary bit sequence (key), is used to replace the original watermark, which greatly improves the embedding capacity. Moreover, the vector retrieval is used to compare the watermark binary image, and when the similarity reaches a second threshold, the possibility of infringement is warned, and the success rate of tracing is improved.
[0154] For example, the various schemes provided by the present application can be applied in at least one of the following scenarios: artificial intelligence image generation and copyright protection; e-commerce platform and brand anti-counterfeiting; confidential data protection and privacy compliance, etc. Further, the various schemes provided by the present application can also be applied in an image watermarking system for protecting image copyright, and can also be applied in short video protection. For another example, the method 800 provided by the embodiments of the present application can be applied to an image watermarking system, a video watermarking system and an audio watermarking system, etc., for all-round privacy protection of data assets, and the watermark alarm idea can be applied to other watermarking systems.
[0155] Figure 10 is a schematic diagram of a cloud service system architecture to which the present application is applicable, as Figure 10 indicated, the cloud scenario can include a cloud management platform 1010, an Internet 1020 and a client 1030. As Figure 10 indicated, the cloud management platform 1010 is used to manage the infrastructure for providing a plurality of cloud services. The infrastructure includes a plurality of cloud data centers, each of which includes a plurality of servers, and each of the servers includes cloud service resources, which provide corresponding cloud services for tenants.
[0156] In the embodiments of the present application, for example, the infrastructure in the cloud service system can perform the steps of the above-mentioned methods. For example, the infrastructure in the cloud service system is deployed with an image processing system.
[0157] For example, the cloud management platform and the infrastructure can be implemented by software or by hardware. For example, the implementation of the infrastructure is introduced as follows. Similarly, the implementation of the cloud management platform can refer to the implementation of the infrastructure.
[0158] As an example of a software functional unit, a module can include code running on a compute instance. The compute instance can be at least one of a physical host (computing device), a virtual machine, a container, etc. Further, the computing device can be one or more. For example, the infrastructure can include code running on multiple hosts / virtual machines / containers. Note that the multiple hosts / virtual machines / containers running the application can be distributed in the same region, or in different regions. The multiple hosts / virtual machines / containers running the code can be distributed in the same availability zone (AZ), or in different AZs, each of which includes a data center or multiple data centers in close geographical proximity. Typically, a region can include multiple AZs.
[0159] Similarly, the multiple hosts / virtual machines / containers running the code can be distributed in the same virtual private cloud (VPC), or in multiple VPCs. Typically, a VPC is set up within a region. Interconnection between two VPCs in the same region, or between VPCs in different regions, requires a communication gateway in each VPC to enable interconnection between the VPCs.
[0160] As an example of a hardware functional unit, a module can include at least one computing device, such as a server, etc. Alternatively, the infrastructure can include devices implemented by an application-specific integrated circuit (ASIC), or a programmable logic device (PLD), etc. The PLD can be implemented by a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0161] The plurality of computing devices included in the infrastructure can be distributed in the same region or in different regions. The plurality of computing devices included in the infrastructure can be distributed in the same AZ or in different AZs. Similarly, the plurality of computing devices included in the YY device can be distributed in the same VPC or in multiple VPCs. The plurality of computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0162] It can be understood that the term "and / or" in the present document is only used to describe the association relationship of associated objects, and can represent three relationships, for example, A and / or B can represent three cases of A alone, A and B together, and B alone. In addition, the character " / " in the present document generally represents an "or" relationship between the front and rear associated objects.
[0163] It should also be understood that the present application refers to "first", "second" and the like ordinal numbers for distinguishing multiple objects, and not for limiting the size, content, order, timing, priority or importance of the multiple objects.
[0164] It should also be understood that in the present application, "at least one" means one or more, and "multiple" means two or more. "At least one" or the like expression means one or more, that is, any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c means: a, b, c, a and b, a and c, b and c, or a and b and c.
[0165] It should also be understood that in the embodiments of the present application, determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information.
[0166] Those skilled in the art should be aware that the units and algorithm steps of the examples described in combination with the embodiments disclosed in the present document can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0167] The embodiments of the present application can divide the functional modules of the computing device according to the above method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be realized in the form of hardware or in the form of a software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical functional division. In actual implementation, another division mode can be used. The following will be described taking the division of each functional module according to each function as an example.
[0168] It should be noted that each method in the embodiments of the present application can be reasonably combined according to internal logic. Each implementation mode in the same method can be reasonably combined, and each implementation mode in different methods can also be reasonably combined.
[0169] Figure 11 FIG. 1 is a schematic block diagram of a computing device 1100 provided by the embodiments of the present application. As shown in the figure, the computing device 1100 can include an acquisition module 1110 and a processing module 1120.
[0170] For example, the acquisition module 1110 and the processing module 1120 in the embodiments of the present application can perform the corresponding steps in each method described above.
[0171] In a possible implementation scheme, the computing device 1100 can be understood as a watermark embedding device. At this time, each module in the device can be used to perform the corresponding steps in the method 200 and the method 500.
[0172] For example, the acquisition module is configured to acquire a first channel and a second channel corresponding to a first image. The processing module is configured to process the first channel according to local synchronization information and global synchronization information to obtain a processed first channel. The processing module is configured to embed watermark information in the second channel to obtain a processed second channel. The processing module is configured to obtain a processed first image according to the processed first channel and the processed second channel.
[0173] For example, the acquisition module is configured to acquire a third channel corresponding to a first image. The acquisition module is configured to obtain a plurality of watermark units corresponding to watermark information. The processing module is configured to embed the plurality of watermark units in the third channel respectively to obtain a processed third channel. The processing module is configured to obtain a processed second channel according to the processed third channel.
[0174] For example, the acquisition module is configured to acquire a plurality of second images. The processing module is configured to obtain at least one candidate image according to the plurality of second images, a similarity algorithm and a vector database. The acquisition module is configured to obtain watermark information of each of the at least one candidate image.
[0175] In another possible implementation, the computing device 1100 can be understood as a watermark extraction device, at this time, the various modules in the device can be used to perform the corresponding steps in the method 600, the method 700.
[0176] Exemplarily, the acquisition module is configured to obtain the third image corresponding to the first channel and the second channel; the processing module is configured to process the first channel according to the global synchronization information and the local synchronization information to obtain a corrected third image; and obtain the watermark information in the third image according to the second channel corresponding to the corrected third image.
[0177] Exemplarily, the acquisition module is configured to obtain the third channel corresponding to the corrected third image; the processing module is configured to obtain at least one watermark unit according to the third channel; and the processing module is configured to obtain the watermark information in the third image according to the at least one watermark unit.
[0178] Exemplarily, the acquisition module is configured to obtain a plurality of second images; the processing module is configured to obtain at least one candidate image according to the plurality of second images, a similarity algorithm and a vector database; and the acquisition module is configured to obtain the watermark information of each of the at least one candidate image.
[0179] In another possible implementation, the computing device can be an image processing system, at this time, the various modules in the device can be used to perform the corresponding steps in the method 200, the method 500, the method 600 and the method 700.
[0180] Each of the above modules is respectively configured to perform the steps of the above methods, which will not be repeated here.
[0181] It should also be understood that the computing device 1100 herein is embodied in the form of functional units. The term “unit” herein can refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (for example, a shared processor, a dedicated processor or a group processor and the like) and a memory for executing one or more software or firmware programs, a combination of logical circuit and / or other suitable components supporting the described functions.
[0182] The computing device 1100 in each of the above schemes has the function of implementing the corresponding steps of the above method 200, the method 500, the method 600 and the method 700. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions; for example, the acquisition module and the processing module can be replaced by a processor, respectively performing the receiving operation and the related processing operation in each method embodiment. In addition, the acquisition module and the processing module can also be a processing circuit.
[0183] It should be noted that, Figure 11 The computing device in the method embodiment can be the computing device (for example, a server for providing cloud service) in the foregoing method embodiment, or can be a chip or a chip system corresponding to the computing device, for example, a system on chip (SoC). The processing module is a processor or a microprocessor or an integrated circuit integrated on the chip. This is not limited here.
[0184] Figure 12 is another schematic block diagram of a computing device 1200 provided by an embodiment of the present application. As shown in the figure, the device 1200 includes at least one processor 1220. The processor 1220 is coupled with a memory, and is configured to execute instructions stored in the memory to send and / or receive signals. Optionally, the device 1200 further includes a memory 1230 for storing instructions. Optionally, the device 1200 further includes a transceiver 1210, and the processor 1220 controls the transceiver 1210 to send and / or receive signals.
[0185] It should be understood that the processor 1220 and the memory 1230 described above can be combined into one processing device, and the processor 1220 is configured to execute program codes stored in the memory 1230 to implement the functions described above. In specific implementation, the memory 1230 can also be integrated in the processor 1220, or be independent of the processor 1220.
[0186] It should also be understood that the transceiver 1210 can include a transceiver (or receiver) and a transmitter (or transmitter). The transceiver can further include an antenna, and the number of antennas can be one or more. The transceiver 1210 can be a communication interface or an interface circuit.
[0187] The bus 1240 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, Figure 12 In the foregoing, only one line is used to represent the bus, but it does not mean that there is only one bus or only one type of bus. The bus 1240 can include a path for transmitting information between various components (for example, the memory 1230, the processor 1220, the transceiver 1210) of the computing device 1200.
[0188] The memory 1230 stores executable program code, and the processor 1220 executes the executable program code to realize the functions of the foregoing acquisition module and processing module respectively, thereby realizing the method in the embodiments of the present application. That is, the memory 1230 stores instructions for executing the foregoing methods. For example, the processor 1220 is configured to execute the computer program or instructions stored in the memory 1230 to realize the steps in the foregoing methods.
[0189] Figure 13 FIG. 1 shows a schematic architecture of a computing device cluster according to an embodiment of the present application. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a notebook computer, or a smart phone. Figure 13 As shown in FIG. 1, the computing device cluster includes at least one computing device 1300. The memory 13430 in one or more computing devices 1300 in the computing device cluster can store the same instructions for performing the actions performed in the foregoing methods.
[0190] In some possible implementations, the memory 1330 in one or more computing devices 1300 in the computing device cluster can also respectively store partial instructions for performing the actions performed in the foregoing methods described in the embodiments. In other words, the combination of one or more computing devices 1400 can collectively execute the instructions for performing the actions performed in the foregoing methods described in the embodiments.
[0191] It should be noted that the memory 1330 in different computing devices 1300 in the computing device cluster can store different instructions respectively for performing part of the functions of the computing device 1300. That is, the instructions stored in the memory 1330 in different computing devices 1300 can realize the functions of one or more of the foregoing acquisition module and processing module.
[0192] Alternatively, the memory 1330 in different computing devices 1300 in the computing device cluster can store different instructions respectively for performing part of the functions of the corresponding computing device of the foregoing computing device 1100-1200. That is, the instructions stored in the memory 1330 in different computing devices 1300 can realize the functions of one or more of the acquisition module and processing module.
[0193] In some possible implementations, one or more computing devices in the computing device cluster can be connected through a network. The network can be a wide area network or a local area network, etc. Figure 14 FIG. 1 shows a schematic architecture of a computing device cluster according to an embodiment of the present application. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a notebook computer, or a smart phone. Figure 14As shown, the two computing devices 1300A and 1300B are connected through a network. Specifically, the connection is made through a communication interface in each computing device to the network.
[0194] It should be understood that Figure 14 The functions of the computing device 1300A shown in the figure can also be completed by multiple computing devices 1300. Similarly, the functions of the computing device 1300B can also be completed by multiple computing devices 1300.
[0195] Figure 14 The connection between the computing device clusters shown can be that the method provided in the present application needs to process images, so the functions implemented by the processing module are considered to be executed by the computing device 1400B.
[0196] In the embodiment, a computer program product containing instructions is also provided. The computer program product can be a software or program product containing instructions, which can be run on a computing device cluster or stored in any available medium. When it is run by the computing device cluster, it makes the computing device cluster execute the method provided above, or makes the computing device cluster implement the functions of the device provided above.
[0197] In the embodiment, a computer readable storage medium is also provided. The computer readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid state disk), etc. The computer readable storage medium contains instructions, which, when executed on a computing device, make the computing device execute the method provided above.
[0198] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0199] Those of ordinary skill in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the system, device and unit described above can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0200] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other manners. For example, the described device embodiments are merely schematic. The division of the units is merely logical function division. There can be other division manners in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.
[0201] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0202] In addition, each functional unit in the various embodiments of the present application can be integrated into a processing module, or each unit can be physically present alone, or two or more units can be integrated into one unit.
[0203] If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.
[0204] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An image processing method, characterized in that, The method is applied to an image processing system, which stores local synchronization information and global synchronization information. The method includes: Obtain the first image and the corresponding first and second channels. The first image is the image into which watermark information needs to be embedded. The first channel is the luminance channel of the first image, and the second channel is the chroma channel of the first image. The first channel is processed according to the local synchronization information and the global synchronization information to obtain the processed first channel. The processed first channel includes information on multiple first synchronization matrices and information on the position of each synchronization matrix. The first synchronization matrix is obtained by performing translation and / or flipping operations on the spreading matrix according to the local synchronization information. The local synchronization information is used to indicate the rules for translation and / or flipping of the spreading matrix, and the global synchronization information is used to indicate the position of each first synchronization matrix in the first image. Watermark information is embedded in the second channel to obtain the processed second channel; Based on the processed first channel and the processed second channel, a processed first image is obtained, and the processed first image includes the watermark information.
2. The method according to claim 1, characterized in that, The step of processing the first channel based on local synchronization information and global synchronization information to obtain the processed first channel includes: The first synchronization matrix is obtained based on the local synchronization information; Based on multiple first synchronization matrices and the global synchronization information, the first channel is processed to obtain the processed first channel.
3. The method according to claim 1 or 2, characterized in that, The watermark information is a binary bit sequence, the size of which is m×m. Embedding the watermark information in the second channel to obtain the processed second channel includes: Obtain the third channel corresponding to the first image, wherein the third channel is obtained based on the second channel; The watermark information is obtained by corresponding to multiple watermark units. Each watermark unit is used to represent the watermark information. Each binary bit in the watermark information is represented by k×k pixel units in the watermark unit. The size of each watermark unit is n×n, where n=m×k. The multiple watermark units are embedded into the third channel to obtain the processed third channel; Based on the processed third channel, the processed second channel is obtained.
4. The method according to claim 3, characterized in that, The energy difference of the k×k pixel units corresponding to the first value in the binary bit sequence is the first difference, and the energy difference of the k×k pixel units corresponding to the second value in the binary bit sequence is the second difference. The energy difference is used to indicate the difference between the energy corresponding to the first sub-block and the energy corresponding to the second sub-block. The first sub-block and the second sub-block are each half of the k×k pixel units.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Acquire multiple second images, which are images for which watermark extraction is required; Based on the plurality of second images, the similarity algorithm, and the vector database, at least one candidate image is obtained. The at least one candidate image is a subset of the plurality of second images. The vector database includes a plurality of target vector data, which includes vector data used to indicate target images. Each candidate image corresponds to one target vector data. The similarity between each candidate image and its corresponding target vector data is greater than or equal to a first threshold. Obtain the watermark information of each of the at least one candidate image, and determine whether the watermark information of each of the at least one candidate image is the target watermark information.
6. The method according to claim 5, characterized in that, The plurality of target vector data also includes vector data for indicating the target watermark, and determining whether the watermark information of each of the at least one candidate image is the target watermark information includes: Obtain the watermark information corresponding to each candidate image in the at least one candidate image; Based on the watermark information corresponding to each candidate image in the at least one candidate image, the similarity algorithm, and the vector database, at least one target vector data is obtained. Each target vector data is used to indicate a target watermark, and the similarity between each target vector data and the watermark information of the corresponding candidate image is greater than or equal to a second threshold. Determine the target watermark information corresponding to each of the at least one target vector data.
7. The method according to any one of claims 1 to 6, characterized in that, The method is executed by infrastructure in a cloud service system, which includes a cloud management platform for managing the infrastructure that provides services for embedding watermark information in images.
8. An image processing method, characterized in that, The method is applied to an image processing system, which stores local synchronization information and global synchronization information. The method includes: Obtain the first and second channels corresponding to the third image, wherein the third image is the image for which watermark information needs to be extracted, the first channel is the luminance channel of the third image, and the second channel is the chroma channel of the third image; Based on the global synchronization information and the local synchronization information, the first channel is processed to obtain a corrected third image. The first channel includes multiple first synchronization matrices. Each first synchronization matrix is obtained by performing translation and / or flipping operations on the spreading matrix according to the local synchronization information. The local synchronization information is used to indicate the rules for translation and / or flipping of the spreading matrix, and the global synchronization information is used to indicate the position of each first synchronization matrix in the third image. The watermark information in the third image is obtained based on the second channel corresponding to the corrected third image.
9. The method according to claim 8, characterized in that, The step of processing the first channel based on global synchronization information and local synchronization information to obtain the corrected third image includes: The first synchronization matrix is determined based on the local synchronization information; Based on the plurality of first synchronization matrices and the global synchronization information, the first channel is processed to obtain the corrected third image.
10. The method according to claim 8 or 9, characterized in that, The watermark information is a binary bit sequence of size m×m. The watermark information in the third image is obtained based on the second channel corresponding to the corrected third image, including: Obtain the third channel corresponding to the corrected third image, wherein the third channel is obtained based on the second channel; Based on the third channel, at least one watermark unit is obtained. Each watermark unit is used to represent the watermark information. Each binary bit in the watermark information is represented by k×k pixel units in the watermark unit. The size of each watermark unit is n×n, where n=m×k. The watermark information in the third image is obtained based on the at least one watermark unit.
11. The method according to claim 10, characterized in that, The energy difference of the k×k pixel units corresponding to the first value in the binary bit sequence is the first difference, and the energy difference of the k×k pixel units corresponding to the second value in the binary bit sequence is the second difference. The energy difference is used to indicate the difference between the energy corresponding to the first sub-block and the energy corresponding to the second sub-block. The first sub-block and the second sub-block are each half of the k×k pixel units.
12. The method according to any one of claims 8 to 11, characterized in that, The method further includes: Acquire multiple second images, which are images for which watermark extraction is required; Based on the plurality of second images, the similarity algorithm, and the vector database, at least one candidate image is obtained. The at least one candidate image is a subset of the plurality of second images. The vector database includes a plurality of target vector data, which includes vector data used to indicate target images. Each candidate image corresponds to one target vector data. The similarity between each candidate image and its corresponding target vector data is greater than or equal to a first threshold. Determine whether the watermark information of each of the at least one candidate image is the target watermark information.
13. The method according to claim 12, characterized in that, The plurality of target vector data also includes vector data for indicating the target watermark, and determining whether the watermark information of each of the at least one candidate image is the target watermark information includes: Obtain the watermark information corresponding to each candidate image in the at least one candidate image; Based on the watermark information corresponding to each candidate image in the at least one candidate image, the similarity algorithm, and the vector database, at least one target vector data is obtained. Each target vector data is used to indicate a target watermark, and the similarity between each target vector data and the watermark information of the corresponding candidate image is greater than or equal to a second threshold. Determine the target watermark information corresponding to each of the at least one target vector data.
14. The method according to any one of claims 8 to 13, characterized in that, The method is executed by infrastructure in a cloud service system, which includes a cloud management platform for managing the infrastructure that provides services for embedding watermark information in images.
15. An image processing system, characterized in that, The image processing system includes a watermark embedding system and a watermark extraction system, wherein the watermark embedding system is used to perform the method of any one of claims 1 to 7, and the watermark extraction system is used to perform the method of any one of claims 8 to 14.
16. A computing device, characterized in that, It includes a processor and a memory, the processor being configured to execute a computer program or instructions stored in the memory to cause the computing device to perform the method as claimed in any one of claims 1 to 7 or 8 to 14.
17. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute a computer program or instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 7, and / or to cause the cluster of computing devices to perform the method as described in any one of claims 8 to 14.
18. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device cluster, the computing device cluster causes the computing device cluster to perform the method as claimed in any one of claims 1 to 7 or claims 8 to 14.
19. A computer-readable storage medium, characterized in that, Includes a computer program or instructions that, when executed by a cluster of computing devices, perform the method as claimed in any one of claims 1 to 7 or 8 to 14.