An information processing method and apparatus

By adjusting the energy matrix characteristics of the image and embedding the main approximate energy and detail energy of the watermark image, the problem of insufficient robustness of the Patchwork algorithm is solved, and a balance between resistance to JPEG compression and information content is achieved.

CN116402666BActive Publication Date: 2026-06-12WEBANK (CHINA)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WEBANK (CHINA)
Filing Date
2023-02-07
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The existing Patchwork algorithm is not robust enough when embedding image watermarks, especially it is not resistant to JPEG compression attacks, and it is difficult to balance the three major factors of transparency, robustness and embedded information.

Method used

By modifying the statistical properties of the original image, watermarking is embedded using the similarity coefficient and detail coefficient of the energy matrix. This adjusts the main approximate energy and detail energy of the image to improve resistance to compression attacks while maintaining transparency and the amount of embedded information.

Benefits of technology

It improves the resistance of watermarked images to JPEG compression attacks, maintains the transparency of images, and achieves effective embedding of information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116402666B_ABST
    Figure CN116402666B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an information processing method and device, the method comprising: obtaining a watermark image to be hidden and an original image used for hiding the watermark image; determining first coefficients corresponding to the original image according to a first energy matrix composed of luminance values of each pixel point in the original image; wherein the first coefficients are used to represent main body approximate energy and / or detail energy of the original image; determining second coefficients corresponding to the watermark image according to a second energy matrix composed of luminance values of each pixel point in the watermark image; the second coefficients are used to represent main body approximate energy of the watermark image; adjusting the first coefficients according to the second coefficients to obtain adjusted first coefficients; and reconstructing a carrier image embedding the watermark image according to the adjusted first coefficients. In this scheme, the watermark embedding is based on modifying the statistical characteristics of the original image, which can improve the resistance to compression attacks, and the transparency, robustness, embedded information amount and other elements are balanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of information hiding technology, and in particular to an information processing method and apparatus. Background Technology

[0002] In the DA project, the classic Patchwork algorithm was used to protect the copyright of photos taken during CD / DVD check-in. Photos with embedded watermarks were stored for record-keeping. For most images, the Patchwork watermark algorithm is imperceptible and secure. However, Patchwork technology has inherent limitations. For example, the amount of information embedded by the Patchwork algorithm is very limited, and the robustness of the watermark needs improvement, especially its resistance to common lossy compression. In the project, the watermarked images were compressed before storage, but because the Patchwork watermark is not resistant to compression algorithms, some watermark information is lost.

[0003] The existing Patchwork algorithm directly manipulates the brightness of image pixels, embedding watermarks by increasing or decreasing the brightness of individual pixels. The specific process is as follows: N pairs of pixels (ai, bi) are randomly selected, and the brightness value of each ai pixel is increased by 1 degree while the brightness value of each bi pixel is decreased by 1 degree. This adjustment hides information, keeping the average brightness of the entire image constant. However, based on this principle, when the image is compressed using JPEG, the watermark information hidden behind the brightness values ​​is lost, and its robustness needs improvement. Other classic algorithms, such as the LSB algorithm, support embedding a certain amount of watermark information with minimal impact on the original image, but their anti-interference ability is relatively poor and they cannot resist image cropping, scaling, and JPG compression. Most other classic algorithms cannot balance the three key factors of transparency, robustness, and embedded information. These algorithms directly manipulate the image's spatial pixels, making them vulnerable to pixel-based attacks that could destroy the watermark. This makes it difficult to guarantee the robustness of watermark embedding. Furthermore, directly manipulating the carrier image limits the embedding capacity; simply increasing the embedded information may significantly affect transparency.

[0004] Therefore, there is an urgent need for an information processing method that can balance the three major factors of transparency, robustness, and embedded information when hiding watermarks, especially to solve the problem that the graphics with embedded watermarks are easily destroyed by compression algorithms. Summary of the Invention

[0005] This invention provides an information processing method and apparatus to address the problem that embedded watermark graphics are easily destroyed by compression algorithms while balancing factors such as transparency, robustness, and the amount of embedded information.

[0006] In a first aspect, embodiments of the present invention provide an information processing method, comprising: acquiring a watermark image to be hidden and an original image for hiding the watermark image; determining a first coefficient corresponding to the original image based on a first energy matrix composed of the brightness values ​​of each pixel in the original image; wherein the first coefficient is used to characterize the main approximate energy and / or detail energy of the original image; determining a second coefficient corresponding to the watermark image based on a second energy matrix composed of the brightness values ​​of each pixel in the watermark image; the second coefficient is used to characterize the main approximate energy of the watermark image; adjusting the first coefficient based on the second coefficient to obtain an adjusted first coefficient; and reconstructing a carrier image embedded with the watermark image based on the adjusted first coefficient.

[0007] In the above technical solution, watermark embedding is based on modifying the statistical characteristics of the original image. The coefficients of the main approximate energy of the watermark are embedded into the coefficients of the main approximate energy and / or detail energy of the original image. This not only improves the resistance to compression attacks, but also allows for a balance between factors such as transparency, robustness, and the amount of embedded information.

[0008] Optionally, the first coefficient includes a first similarity coefficient characterizing the approximate energy of the subject of the original image; the second coefficient includes a second similarity coefficient characterizing the approximate energy of the subject of the watermark image; determining the first coefficient corresponding to the original image based on the first energy matrix composed of the brightness values ​​of each pixel in the original image includes: performing the multiple transformation operations on each row of the first energy matrix to obtain a first matrix; performing the multiple transformation operations on each column of the first matrix to obtain a second matrix; determining the first similarity coefficient based on the element values ​​of the first row and first column of the second matrix; determining the second coefficient corresponding to the watermark image based on the second energy matrix composed of the brightness values ​​of each pixel in the watermark image includes: performing multiple transformation operations on each row of the second energy matrix to obtain a third matrix; performing the multiple transformation operations on each column of the third matrix to obtain a fourth matrix; determining the second similarity coefficient based on the element values ​​of the first row and first column of the fourth matrix.

[0009] The above technical solution provides a method to obtain the approximate energy coefficients of an image by performing traversal transformation operations on each element of the energy matrix in row and column order.

[0010] Optionally, performing multiple transformation operations on the m-th row or m-th column of any matrix includes the following process: performing a first transformation operation on the m-th row or m-th column; wherein the m-th row or m-th column includes N elements, where m and N are both positive integers, and the first transformation operation includes the following process: performing an average operation on each pair of first elements formed by every two adjacent elements in the N elements to obtain the approximate energy of N / 2 pairs of first elements, and replacing the element values ​​of the first N / 2 elements in the N elements; performing a mean difference operation on each pair of first elements formed by every two adjacent elements in the N elements to obtain the detailed energy of N / 2 pairs of first elements, and replacing the element values ​​of the last N / 2 elements in the N elements to obtain the first operation result;

[0011] Perform the i-th transformation operation on the result of the (i-1)-th operation, where i is an integer between 2 and j, until the result of the j-th operation contains only an approximate energy value, at which point the transformation operation stops, where j is an integer greater than 1;

[0012] The result of the (i-1)th transformation operation includes L elements belonging to approximate energy, where L is an integer less than N. The i-th transformation operation includes the following process: performing an average operation on the second element pairs formed by every two adjacent elements among the L elements belonging to approximate energy to obtain the approximate energy of L / 2 second element pairs, and replacing the element values ​​of the first L / 2 elements among the L elements; performing a mean difference operation on the second element pairs formed by every two adjacent elements among the L elements belonging to approximate energy to obtain the detail energy of L / 2 second element pairs, and replacing the element values ​​of the last L / 2 elements among the L elements to obtain the result of the i-th operation.

[0013] In the above scheme, the mean data of adjacent elements can represent the approximate energy of the element pair of the image matrix, and the difference data of adjacent elements can represent the detail energy of the element pair of the image matrix. The difference is the image detail. By performing multiple calculations on the calculated results, the similarity coefficient and detail coefficient of the image can be obtained, and these two coefficients facilitate the reconstruction of the original image.

[0014] Optionally, the first coefficient further includes a first detail coefficient for characterizing the detail energy of the original image in at least one preset direction; the at least one preset direction includes at least one of the following: horizontal direction, vertical direction, and diagonal direction.

[0015] Optionally, after performing multiple transformation operations on each column of the first matrix to obtain the second matrix, the method further includes: determining a refinement coefficient matrix for the at least one preset direction from the second matrix; for each preset direction refinement coefficient matrix, performing multiple transformation operations on each row of the preset direction refinement coefficient matrix to obtain a fifth matrix; performing multiple transformation operations on each column of the fifth matrix to obtain a sixth matrix; and determining a first detail coefficient for the preset direction based on the element values ​​of the first row and first column of the sixth matrix. This scheme provides a convenient way to determine the first detail coefficient.

[0016] Optionally, adjusting the first coefficient according to the second coefficient to obtain the adjusted first coefficient includes: embedding the second similar coefficient into the first similar coefficient and at least one first detail coefficient respectively to obtain the adjusted first similar coefficient and at least one adjusted first detail coefficient; reconstructing the carrier image embedded with the watermark image according to the adjusted first coefficient includes: reconstructing the carrier image embedded with the watermark image according to the adjusted first similar coefficient and the at least one adjusted first detail coefficient.

[0017] In the above scheme, a portion of the energy of the watermark image enters the first similarity coefficient of the original image, and another portion of the energy of the watermark image enters the thinning coefficient of the original image. Since the energy embedded in the first similarity coefficient has high stability, it can improve the robustness of the algorithm, especially its resistance to JPEG compression attacks. In other words, the watermark is not easily lost when the carrier image faces compression attacks.

[0018] Optionally, the step of reconstructing the carrier image embedded with the watermark image based on the adjusted first similarity coefficient and the at least one adjusted first detail coefficient includes: replacing the element values ​​of the first row and first column of the second matrix with the adjusted first similarity coefficient, performing multiple inverse transformation operations on each column of the replaced second matrix, and performing multiple inverse transformation operations on each row of the inverse-operated second matrix to obtain a seventh matrix; for each adjusted first detail coefficient, replacing the element values ​​of the first row and first column of the sixth matrix with the adjusted first detail coefficient, performing multiple inverse transformation operations on each column of the replaced sixth matrix, and performing multiple inverse transformation operations on each row of the inverse-operated sixth matrix to obtain an eighth matrix; and reconstructing the carrier image embedded with the watermark image based on the seventh matrix and the eighth matrix corresponding to each adjusted first detail coefficient. This scheme allows for a simple and efficient method of hiding the watermark image within the original image.

[0019] Optionally, the method further includes: acquiring a carrier image, the carrier image including a watermark image to be extracted; determining a third similarity coefficient and a second detail coefficient in at least one preset direction of the carrier image based on a third energy matrix composed of the brightness values ​​of each pixel in the carrier image; wherein the third similarity coefficient is used to characterize the approximate energy of the main body of the carrier image, and the second detail coefficient in at least one preset direction is used to characterize the detail energy of the carrier image; determining a fourth similarity coefficient of the watermark image to be extracted based on the third similarity coefficient and a first similarity coefficient corresponding to the original image; determining a third detail coefficient in each preset direction of the watermark image to be extracted based on the second detail coefficient in at least one preset direction and a first detail coefficient in at least one preset direction corresponding to the original image; and reconstructing the watermark image to be extracted based on the fourth similarity coefficient and the third detail coefficient in at least one preset direction. This scheme allows for simple and efficient extraction of the watermark image from the carrier image, saving computational resources.

[0020] Secondly, embodiments of the present invention also provide an information processing apparatus, comprising:

[0021] The acquisition unit is used to acquire the watermark image to be hidden and the original image used to hide the watermark image;

[0022] The processing unit is configured to: determine a first coefficient corresponding to the original image based on a first energy matrix composed of the brightness values ​​of each pixel in the original image; wherein the first coefficient is used to characterize the main approximate energy and / or detail energy of the original image; determine a second coefficient corresponding to the watermark image based on a second energy matrix composed of the brightness values ​​of each pixel in the watermark image; the second coefficient is used to characterize the main approximate energy of the watermark image; adjust the first coefficient according to the second coefficient to obtain the adjusted first coefficient; and reconstruct a carrier image embedded with the watermark image based on the adjusted first coefficient.

[0023] Optionally, the processing unit is specifically configured to perform multiple transformation operations on the m-th row or m-th column of any matrix, comprising the following steps: performing a first transformation operation on the m-th row or m-th column; wherein the m-th row or m-th column comprises N elements, where m and N are both positive integers, and the first transformation operation comprises the following steps: performing an average operation on each pair of first elements formed by every two adjacent elements in the N elements to obtain the approximate energy of N / 2 pairs of first elements, and replacing the element values ​​of the first N / 2 elements in the N elements; performing a mean difference operation on each pair of first elements formed by every two adjacent elements in the N elements to obtain the detailed energy of N / 2 pairs of first elements, and replacing the element values ​​of the last N / 2 elements in the N elements to obtain the first operation result; performing an i-th transformation operation on the (i-1)-th operation result. The transformation operation involves taking integers from 2 to j until the result of the j-th operation contains only one approximate energy value, at which point the transformation operation stops. Here, j is an integer greater than 1. The result of the (i-1)-th transformation operation includes L elements belonging to the approximate energy, where L is an integer less than N. The i-th transformation operation includes the following steps: performing an average operation on the second element pairs formed by every two adjacent elements among the L elements belonging to the approximate energy to obtain the approximate energy of L / 2 second element pairs, and replacing the element values ​​of the first L / 2 elements among the L elements; performing a mean difference operation on the second element pairs formed by every two adjacent elements among the L elements belonging to the approximate energy to obtain the detailed energy of L / 2 second element pairs, and replacing the element values ​​of the last L / 2 elements among the L elements, thus obtaining the result of the i-th operation.

[0024] Optionally, the first coefficient further includes a first detail coefficient for characterizing the detail energy of the original image in at least one preset direction; the at least one preset direction includes at least one of the following: horizontal direction, vertical direction, and diagonal direction.

[0025] Optionally, the processing unit is further configured to determine the at least one preset direction refinement coefficient matrix from the second matrix; and for each preset direction refinement coefficient matrix, perform: multiple transformation operations on each row of the preset direction refinement coefficient matrix to obtain a fifth matrix; perform multiple transformation operations on each column of the fifth matrix to obtain a sixth matrix; and determine the first detail coefficient of the preset direction based on the element value of the first row and first column of the sixth matrix.

[0026] Optionally, the processing unit is specifically configured to: embed the second similarity coefficient into the first similarity coefficient and at least one first detail coefficient respectively to obtain the adjusted first similarity coefficient and at least one adjusted first detail coefficient; and reconstruct the carrier image embedded with the watermark image based on the adjusted first similarity coefficient and the at least one adjusted first detail coefficient.

[0027] Optionally, the processing unit is specifically configured to: replace the element values ​​of the first row and first column of the second matrix with the adjusted first similarity coefficient, and perform multiple inverse operations of transformation on each column of the replaced second matrix, and perform multiple inverse operations of transformation on each row of the second matrix after inverse operation to obtain a seventh matrix; for each adjusted first detail coefficient among at least one adjusted first detail coefficient, replace the element values ​​of the first row and first column of the sixth matrix with the adjusted first detail coefficient, and perform multiple inverse operations of transformation on each column of the replaced sixth matrix, and perform multiple inverse operations of transformation on each row of the sixth matrix after inverse operation to obtain an eighth matrix; and reconstruct a carrier image embedded with the watermark image based on the seventh matrix and the eighth matrix corresponding to each adjusted first detail coefficient.

[0028] Optionally, the acquisition unit is further configured to: acquire a carrier image, the carrier image including a watermark image to be extracted; the processing unit is further configured to: determine a third similarity coefficient and a second detail coefficient in at least one preset direction of the carrier image based on a third energy matrix composed of the brightness values ​​of each pixel in the carrier image; wherein the third similarity coefficient is used to characterize the main approximate energy of the carrier image, and the second detail coefficient in at least one preset direction is used to characterize the detail energy of the carrier image; determine a fourth similarity coefficient of the watermark image to be extracted based on the third similarity coefficient and a first similarity coefficient corresponding to the original image; determine a third detail coefficient in each preset direction of the watermark image to be extracted based on the second detail coefficient in at least one preset direction and a first detail coefficient in at least one preset direction corresponding to the original image; and reconstruct the watermark image to be extracted based on the fourth similarity coefficient and the third detail coefficient in at least one preset direction.

[0029] Thirdly, embodiments of the present invention provide a computing device, comprising:

[0030] Memory, used to store program instructions;

[0031] The processor is used to call program instructions stored in the memory and execute information processing methods according to the obtained program.

[0032] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform an information processing method. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 A schematic diagram of the device structure for the hardware operating environment provided in this embodiment of the invention;

[0035] Figure 2 A flowchart illustrating an information processing method provided in an embodiment of the present invention;

[0036] Figure 3 A flowchart illustrating an information processing method provided in an embodiment of the present invention;

[0037] Figure 4 This is a schematic diagram of the structure of an information processing device provided in an embodiment of the present invention. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0039] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.

[0040] like Figure 1 As shown, the device 100 may include a processor 110, a memory 120, a network interface 130, a user interface 140, and a communication bus 150. The communication bus 150 is used to enable communication between these components.

[0041] The processor 110 is the control center of the device 100. It connects various parts of the device 100 through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 120, and by calling data stored in the memory 120, it performs various functions of the device 100 and processes data. Optionally, the processor 110 may include one or more processing units.

[0042] The memory 120 can be used to store software programs and modules. The processor 110 executes various functional applications and data processing by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data such as the original image, watermarked image, and carrier image of the hidden watermarked image. In addition, the memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0043] Optionally, the network interface 130 may include a standard wired interface or a wireless interface (such as a Wi-Fi interface). In this embodiment of the invention, the network interface 130 is mainly used to connect to the backend server and communicate with the backend server for data.

[0044] User interface 140 may include a display screen and an input unit such as a keyboard. Optionally, user interface 140 may also include a standard wired interface or a wireless interface. In this embodiment of the invention, user interface 140 can be used to connect to a backend server and communicate with the backend server; user interface 140 can also be used to connect to a client (user terminal) and communicate with the client.

[0045] The processor 110 can be used to call a program stored in the memory 120 for executing an information processing method, and to perform the operations described in the following information processing method embodiments.

[0046] It should be noted that the above Figure 1 The structure shown is merely an example and does not constitute a limitation on the device. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0047] The terminology involved in this invention will be explained below.

[0048] Information hiding works on the principle of using the sensory redundancy of digital signals by human sense organs and the digital redundancy of information sources such as images and voice to hide one message (called the hidden message or secret message) in another message (called the concealed message or carrier) for transmission, so that observers and monitoring systems cannot detect the existence of the information, thereby achieving functions such as copyright protection and covert communication.

[0049] Digital watermarking is a specific application of information hiding. The digital watermark involved in this invention can be a digital watermark for copyright protection, that is, embedding the copyright owner's information into the digital multimedia work to be protected, thereby preventing other groups from claiming copyright ownership of the work.

[0050] Transparency refers to the fact that the embedding of information to be hidden (such as secret information) does not change the subjective quality and statistical regularity of the original digital carrier, and is not easily detected by observers and monitoring systems.

[0051] Robustness refers to the ability of data with embedded watermarks to withstand various processing and attack operations without losing or destroying the watermark information. For example, image files can undergo scaling, cropping, rotation, and lossy compression without losing the hidden information.

[0052] JPEG compression attack refers to the act of a user intentionally or unintentionally compressing an image with an embedded digital watermark into a JPEG format at a certain ratio.

[0053] Based on the above description Figure 2 An exemplary illustration shows the flow of an information processing method provided by an embodiment of the present invention. This flow can be executed by an information processing device, which can be located in, for example, Figure 1 The device 100 shown can also be the device 100 itself.

[0054] like Figure 2 As shown, the process specifically includes:

[0055] Step 201: Obtain the watermark image to be hidden and the original image used to hide the watermark image.

[0056] In this embodiment of the invention, the watermark image to be hidden can be a data image that needs to be hidden in the original image, and the original image is mainly used to hide the watermark image.

[0057] Step 202: Determine the first coefficient corresponding to the original image based on the first energy matrix composed of the brightness values ​​of each pixel in the original image.

[0058] For a watermarked image or an original image, the overall image energy macroscopically consists of the approximate energy of the main subject and the energy of the details. For a two-dimensional image, which can be a watermarked image, an original image, or a carrier image, for example, the energy matrix of a two-dimensional image can be expressed as the following formula (1):

[0059] T=∑ψ(x) A[m]+ (y) A[m] (m=0~7) Formula (1);

[0060] By transforming and calculating each element in the energy matrix, the approximation coefficients and detail coefficients of the image can be obtained. The approximation energy can be obtained by calculating the mean of each pair of elements, and the detail energy can be obtained by the difference between the mean energies of each pair of elements.

[0061] Taking the approximation coefficient of the image as ψ(x) as an example, the formula for calculating the approximation coefficient is as follows: Formula (2):

[0062] ψ(x)=B[0~3]=(A[m]+A[m+1]) / 2,m=0~6 Formula (2);

[0063] With the image detail coefficient as Taking (y) as an example, the formula for calculating the detail coefficients is as follows (Formula 3):

[0064] (y)=B[4~7]= A[m] -ψ(x) =(A[m]-A[m+1]) / 2,m=0~6 Formula (3);

[0065] Based on the above formulas (2) and (3), the mean and difference between adjacent elements in the energy matrix are calculated and used as the first four and last four elements of the calculated result, respectively. Then, the first four elements are continuously processed by ψ(x) and... The (y) value is calculated, and the last four elements from the first calculation form the first row of the matrix after row calculation. After calculating all rows and columns, the similarity coefficients of the image are obtained, and the others are detail coefficients. This is because the mean data of adjacent elements can represent the approximate energy of this pair of elements in the image matrix. After traversing and calculating each element of the image energy matrix in row and column order, the similarity coefficients representing the approximate energy of the image can be obtained. The difference data of adjacent elements can represent the detail energy of this pair of elements in the image matrix (the difference is the image detail). Similarly, by performing multiple calculations on the results, the detail coefficients representing the detail energy of the image can be obtained.

[0066] The first coefficient is used to characterize the approximate energy of the subject and / or the energy of the detail in the original image. There are several possible implementations of this first coefficient.

[0067] In implementation A1, the first coefficient includes a first similarity coefficient used to characterize the subject approximation energy of the original image, which may be represented, for example, by lowf1.

[0068] Based on implementation method A1, step 202 above can be implemented by the following steps S202-1 to S202-3:

[0069] S202-1, perform multiple transformation operations on each row of the first energy matrix to obtain the first matrix.

[0070] The following explanation uses the m-th row as an example to illustrate the process of multiple transformations. Performing multiple transformations on the m-th row of the first energy matrix includes the following steps:

[0071] (1) Perform the first transformation operation on the m-th row;

[0072] The m-th row contains N elements, where m and N are both positive integers. The first transformation operation includes the following process:

[0073] For each pair of first elements formed by every two adjacent elements in the N elements, perform an average operation to obtain the approximate energy of N / 2 pairs of first elements, and replace the element values ​​of the first N / 2 elements in the N elements; perform a mean difference operation on each pair of first elements formed by every two adjacent elements in the N elements to obtain the detailed energy of N / 2 pairs of first elements, and replace the element values ​​of the last N / 2 elements in the N elements to obtain the result of the first operation;

[0074] (2) Perform the i-th transformation operation on the result of the (i-1)th operation, where i is an integer between 2 and j, until the result of the j-th operation contains only an approximate energy value, and stop the transformation operation, where j is an integer greater than 1.

[0075] For example, when i equals 2, the result of the first operation is transformed for the second time; when i equals 3, the result of the second operation is transformed for the third time, and so on.

[0076] The result of the (i-1)th transformation operation includes L elements belonging to the approximate energy, where L is an integer less than N. The i-th transformation operation includes the following process:

[0077] For each of the L elements belonging to the approximate energy, perform an average operation on the second element pairs formed by every two adjacent elements to obtain the approximate energy of L / 2 second element pairs, and replace the element values ​​of the first L / 2 elements in the L elements; perform a mean difference operation on the second element pairs formed by every two adjacent elements in the L elements belonging to the approximate energy to obtain the detailed energy of L / 2 second element pairs, and replace the element values ​​of the last L / 2 elements in the L elements to obtain the result of the i-th operation.

[0078] The following example illustrates how to perform multiple transformation operations on each row of the first energy matrix in S202-1 to obtain the first matrix. For instance, if the first energy matrix corresponding to the original image is T, it is represented as follows:

[0079]

[0080] According to the above formulas (1) and (2), multiple transformation operations are performed on each row of the first energy matrix T. For example, the first transformation operation for each row includes: taking the mean and difference between every two adjacent elements in the first energy matrix T, and using them as the first four and last four elements of the calculated result, respectively. The mean data of adjacent elements can represent the approximate energy of this pair of elements in the image matrix, and the difference data of adjacent elements can represent the detail energy of this pair of elements in the image matrix (the difference is the image detail).

[0081] The first step is to extract the first row from the first energy matrix T. These eight elements can be represented by A[0]~A[7], where A[0] is 64, A[1] is 2, A[2] is 2, and so on, and A[7] is 57. The first transformation operation is performed on the first row, including: the average value of the elements in the first row is calculated according to (A[m]+A[m+1]) / 2, where m takes the values ​​of 0, 2, 4, and 6 respectively, and (A[0]+A[1]) / 2, (A[2]+A[3]) / 2, (A[4]+A[5]) / 2, (A[6]+A[7]) / 2 are calculated respectively, so as to obtain the approximate energy of each pair of adjacent elements in the original image [33 32 33]. 32]; and calculate the mean difference of the elements in the first row according to (A[m]-A[m+1]) / 2, where m takes the values ​​of 0, 2, 4, and 6 respectively, and calculate (A[0]-A[1]) / 2, (A[2]-A[3]) / 2, (A[4]-A[5]) / 2, (A[6]-A[7]) / 2 respectively, so as to obtain the detail energy of each pair of adjacent elements in the original image [31 -29 27 -25], and the result of the first transformation operation is [33 32 33 32 31 -29 27 -25].

[0082] The second step involves performing a second transformation on the result of the first transformation operation [33 32 33 32 31 -29 27 -25]. Specifically, for the approximate energy data [33 32 33 32] in [33 32 33 32 31 -29 27 -25], the mean is calculated using (A[m]+A[m+1]) / 2, with m taking values ​​of 0 and 2, resulting in two similar energies [32.5 32.5]. Then, for the approximate energy data [31 -29 27 -25] in [33 32 33 32 31 -29 27 -25], the difference is calculated using (A[m]-A[m+1]) / 2, with m taking values ​​of 0 and 2, resulting in the detailed energy [0.5 0.5]. This yields the result of the second transformation operation [32.5 32.5 0.5]. 0.531 -29 27 -25].

[0083] The third step involves performing a third transformation on the result of the second transformation [32.5 32.5 0.5 0.5 31 -29 27 -25]. Specifically, the approximate energy data [32.5 32.5] in [32.5 32.5 0.5 0.5 31 -29 27 -25] is averaged using (A[m]+A[m+1]) / 2, with m set to 0, resulting in 32.5, which is then used as the first element of the first row. Similarly, [32.5 32.5] is averaged using (A[m]-A[m+1]) / 2, with m set to 0, resulting in 32.5, which is then used as the second element of the first row. This yields the result of the third transformation [32.5 0 0.5 0.5 31 -29 27]. [-25] In the result of the third transformation operation, only the first element is a similar energy, and the rest are detail energies.

[0084] Fourth step: For each row of the first energy matrix T from row 2 to row 8, repeat steps one to three above. This repetition process will not be described in detail here, thus obtaining the first matrix T', represented as follows:

[0085]

[0086] S202-2, perform multiple transformation operations on each column of the first matrix to obtain the second matrix.

[0087] For each column of the first matrix, multiple transformation operations are performed. The process of performing multiple transformation operations on the m-th row of the first energy matrix in S202-1 above can be referred to, and will not be repeated here.

[0088] First, extract the first matrix T. The first column The mean and mean difference are calculated for each element in the first column to obtain the result of the first transformation operation. Then, the second transformation operation is performed on the result of the first transformation operation until, in the j-th transformation operation result, only the first element has similar energy, and the remaining elements are detail energies, at which point the transformation operation stops. Then, the first matrix T is... Repeat the above transformation operation for each column from column 2 to column 8. Finally, the second matrix T is obtained. , means as follows:

[0089]

[0090] S202-3, determine the first similarity coefficient based on the element values ​​in the first row and first column of the second matrix.

[0091] Using the example above, the first similarity coefficient lowf1 can be determined to be 32.5 through the second matrix T''.

[0092] It should be understood that the determination methods of the first similarity coefficient, the second similarity coefficient, and the third similarity coefficient mentioned below can refer to the relevant description of the determination method of the first similarity coefficient in Implementation Method A1, and will not be repeated hereafter.

[0093] In implementation A2, the first coefficient includes a first detail coefficient for characterizing the detail energy of the original image in at least one preset direction, wherein the at least one preset direction may include at least one of the following: a horizontal direction, a vertical direction, and a diagonal direction.

[0094] For example, the first coefficient includes the first detail coefficient highH1 of the original image in the horizontal direction; for another example, the first coefficient includes the first detail coefficient highD1 of the original image in the diagonal direction; for yet another example, the first coefficient includes the first detail coefficient highH1 of the original image in the horizontal direction and the first detail coefficient highD1 of the original image in the diagonal direction; for yet another example, the first coefficient includes the first detail coefficient highV1 of the original image in the vertical direction and the first detail coefficient highD1 of the original image in the diagonal direction; for yet another example, the first coefficient includes the first detail coefficient highH1 of the original image in the horizontal direction, the first detail coefficient highV1 of the original image in the vertical direction, and the first detail coefficient highD1 of the original image in the diagonal direction, and so on.

[0095] After performing multiple transformation operations on each column of the first matrix in S202-2 above to obtain the second matrix, at least one first detail coefficient for a preset direction can be determined according to the following steps S202-4 to S202-6:

[0096] S202-4, determine at least one preset direction refinement coefficient matrix from the second matrix, wherein the at least one preset direction includes at least one of the following: horizontal direction, vertical direction, and diagonal direction.

[0097] Using the second matrix from the example above , the second matrix The matrix is ​​divided into four equal parts, with the upper right corner representing the horizontal thinning coefficient matrix T1, the lower left corner representing the vertical thinning coefficient matrix T2, and the lower right corner representing the diagonal thinning coefficient matrix T3. T1, T2, and T3 are represented as follows:

[0098]

[0099]

[0100]

[0101] S202-5, for each preset direction of the refinement coefficient matrix, perform the following (1)~(3):

[0102] (1) Perform multiple transformation operations on each row of the refinement coefficient matrix for each preset direction to obtain the fifth matrix; the specific implementation here can be referred to the aforementioned description of S202-1, and will not be repeated here.

[0103] (2) Perform multiple transformation operations on each column of the fifth matrix to obtain the sixth matrix; the specific implementation here can be referred to the aforementioned description of S202-2, and will not be repeated here.

[0104] (3) Determine the first detail coefficient for each preset direction based on the element values ​​of the first row and first column of the sixth matrix.

[0105] The calculation of the first detail coefficient highH1 in the horizontal direction, the first detail coefficient highV1 in the vertical direction, and the first detail coefficient highD1 in the diagonal direction of the original image are explained below.

[0106] Continuing with T1, T2, and T3 in the previous example, for any matrix among T1, T2, and T3, perform multiple transformation operations on each row of that matrix to obtain the final transformation result, which yields the fifth matrix. The specific process can be found in the calculation process of T', and will not be repeated here. Then, perform multiple transformation operations on each column of the final transformation result to obtain the sixth matrix. The specific process can be found in the calculation process of T'', and will not be repeated here. Thus, T1 is calculated from T1. T2 is calculated for T2. T3 is calculated to obtain T3 .

[0107]

[0108]

[0109]

[0110] According to the matrix The element values ​​in the first row and first column give the approximate coefficient highH1 of the horizontal thinning coefficient matrix as 0; based on the matrix... The element values ​​in the first row and first column give the approximate coefficient highV1 of the vertical thinning coefficient matrix, which is 0. Based on the matrix... The element values ​​in the first row and first column can be used to obtain the approximate coefficients of the diagonal refinement coefficient matrix, highD1, which is 0.

[0111] It should be understood that the determination methods of the second and third detail coefficients involved in the following text of this invention can refer to the relevant description of the determination method of the first detail coefficient of the preset direction in embodiment A2, and will not be repeated hereafter.

[0112] In implementation A3, the first coefficient includes a first similarity coefficient lowf1 for characterizing the approximate energy of the subject in the original image, and a first detail coefficient for characterizing the detail energy of the original image in at least one preset direction, wherein the at least one preset direction may include at least one of the following: a horizontal direction, a vertical direction, and a diagonal direction.

[0113] For example, the first coefficient includes a first similarity coefficient lowf1 and a first detail coefficient highH1 in the horizontal direction of the original image; or the first coefficient includes a first similarity coefficient lowf1 and a first detail coefficient highD1 in the diagonal direction of the original image; or the first coefficient includes a first similarity coefficient lowf1, a first detail coefficient highH1 in the horizontal direction of the original image and a first detail coefficient highV1 in the vertical direction of the original image; or the first coefficient includes a first similarity coefficient lowf1, a first detail coefficient highV1 in the vertical direction of the original image and a first detail coefficient highD1 in the diagonal direction of the original image; or the first coefficient includes a first similarity coefficient lowf1, a first detail coefficient highH1 in the horizontal direction of the original image, a first detail coefficient highV1 in the vertical direction of the original image and a first detail coefficient highD1 in the diagonal direction of the original image, and so on.

[0114] Step 203: Determine the second coefficient corresponding to the watermark image based on the second energy matrix composed of the brightness values ​​of each pixel in the watermark image.

[0115] In step 203 above, the second coefficient is used to characterize the approximate energy of the main body and / or the energy of the detail in the watermarked image. This second coefficient can be implemented in several ways.

[0116] In implementation B1, the second coefficient may include a second similarity coefficient for characterizing the subject approximate energy of the watermark image, for example, it may be represented by lowf2.

[0117] Based on implementation method B1, step 203 above can be implemented by the following steps S203-1 to S203-3:

[0118] S203-1, Perform multiple transformation operations on each row of the second energy matrix to obtain the third matrix;

[0119] S203-2, Perform multiple transformation operations on each column of the third matrix to obtain the fourth matrix;

[0120] S203-3 determines the second similarity coefficient based on the element values ​​in the first row and first column of the fourth matrix.

[0121] For example, the second energy matrix corresponding to the watermarked image is U, represented as follows:

[0122]

[0123] Referring to the above calculation from the first energy matrix T The process involves performing multiple transformation operations on each row of U to obtain the third matrix U. Then, for the third matrix U Perform multiple transformation operations on each column to obtain the fourth matrix U. , means as follows:

[0124] U

[0125] Then, according to U in the array The element value in the first row and first column of the matrix determines the second similarity coefficient lowf2 to be 4.

[0126] In implementation B2, the second coefficient includes a detail coefficient in at least one preset direction for characterizing the detail energy of the watermark image, wherein the at least one preset direction may include at least one of the following: a horizontal direction, a vertical direction, and a diagonal direction.

[0127] For example, the second coefficient includes the detail coefficient of the watermark image in the horizontal direction, which can be represented by highH2; for example, the second coefficient includes the detail coefficient of the watermark image in the vertical direction, which can be represented by highV2; for example, the second coefficient includes the detail coefficient of the watermark image in the diagonal direction, which can be represented by highD2; for example, the second coefficient includes the detail coefficient highH2 in the horizontal direction and the detail coefficient highD2 in the diagonal direction of the watermark image; for example, the second coefficient includes the detail coefficient highV2 in the vertical direction and the detail coefficient highD2 in the diagonal direction of the watermark image; for example, the second coefficient includes the detail coefficient highH2 in the horizontal direction, the detail coefficient highV2 in the vertical direction, and the detail coefficient highD2 in the diagonal direction of the watermark image, and so on.

[0128] In implementation B3, the second coefficient includes a second proximity coefficient lowf2 for characterizing the main approximate energy of the watermark image, and a detail coefficient in at least one preset direction for characterizing the detail energy of the watermark image.

[0129] For example, the second coefficient includes the second similarity coefficient lowf2 and the detail coefficient highH2 of the watermark image in the horizontal direction; or the second coefficient includes the second similarity coefficient lowf2 and the detail coefficient highD2 of the watermark image in the diagonal direction; or the second coefficient includes the second similarity coefficient lowf2, the detail coefficient highH2 of the watermark image in the horizontal direction and the detail coefficient highV2 of the watermark image in the vertical direction; or the second coefficient includes the second similarity coefficient lowf2, the detail coefficient highV2 of the watermark image in the vertical direction and the detail coefficient highD2 of the watermark image; or the second coefficient includes the second similarity coefficient lowf2, the detail coefficient highH2 of the watermark image in the horizontal direction, the detail coefficient highV2 of the watermark image in the vertical direction and the detail coefficient highD2 of the watermark image, and so on.

[0130] Step 204: Adjust the first coefficient according to the second coefficient to obtain the adjusted first coefficient.

[0131] The specific implementation of the second coefficient can refer to embodiments B1, B2, and B3 described above, and the specific implementation of the first coefficient can refer to embodiments A1, A2, and A3 described above. It should be understood that the second coefficient in embodiments B1, B2, and B3 can be arbitrarily combined with the first coefficient in embodiments A1, A2, and A3 described above. Based on the different implementation methods of the second and first coefficients, step 204 can have multiple possible implementation methods, as shown in embodiments C1 to C9 below.

[0132] In implementation C1, the second coefficient includes a second similarity coefficient lowf2 for characterizing the subject approximation energy of the watermark image, and the first coefficient includes a first similarity coefficient lowf1 for characterizing the subject approximation energy of the original image and at least one first detail coefficient for characterizing the detail energy of the original image. Step 204 can be implemented as follows: embedding the second similarity coefficient lowf2 into the first similarity coefficient lowf1 to obtain an adjusted first similarity coefficient lowf1', and embedding the second similarity coefficient lowf2 into at least one first detail coefficient to obtain at least one adjusted first detail coefficient.

[0133] For example, at least one first detail coefficient used to characterize the detail energy of the original image includes highH1, highV1, and highD1, and lowf2 can be embedded into lowf1, highH1, highV1, and highD1 respectively to obtain adjusted lowf1', highH1', highV1', and highD1'.

[0134] In one possible implementation, the first similarity coefficient lowf1 corresponding to the original image can be reduced by a factor of α compared to the second similarity coefficient lowf2, resulting in an adjusted first similarity coefficient lowf1'. The first detail coefficients lowf1, highH1, and highV1 of the original image in the horizontal, vertical, and diagonal directions are respectively increased by a factor of α compared to the second similarity coefficient lowf2 of the watermark image, resulting in three adjusted first detail coefficients: lowf1', highH1', highV1', and highD1'. Here, α is the strength factor of the algorithm, which determines the embedding strength of the watermark image and directly affects the transparency and robustness of the watermarking algorithm. In this embodiment, the specific value of α is not limited and can be set according to actual needs. A larger α value results in better robustness and a more stable watermark, but it affects the transparency of the watermark. To balance robustness and transparency, α can be set in the range of 0.01 to 0.05, for example. In one possible implementation, α can be set to 0.02, at which point the watermark has good transparency and its robustness is sufficient to resist attacks from compression algorithms.

[0135] The aforementioned lowf1 highH1 highV1 highD1 Specifically, this can be achieved through the following formulas (4) to (7):

[0136] Lowf1 =lowf1-α lowf2 formula (4)

[0137] highH1 =highH1+α lowf2 formula (5)

[0138] highV1 =highV1+α lowf2 formula (6)

[0139] highD1 =highD1+α lowf2 formula (7)

[0140] Combining the above examples, the calculated lowf1 of the first energy matrix T corresponding to the original image is 32.5, highH1 is 0, highV1 is 0, and highD1 is 0. The calculated Tlowf2 of the second energy matrix corresponding to the watermark image is 4. Taking α as 0.02 as an example, the calculated lowf1' is 32.42, highH1' is 0.08, highV1' is 0.08, and highD1' is 0.08 respectively through the above formulas (4), (5), (6), and (7). It should be understood that the specific method of coefficient embedding in the following implementation methods C2 to C9 can refer to this implementation method C1. It can be the coefficients of the original image before adjustment plus one or more coefficients of the watermark image multiplied by α, or the coefficients of the original image before adjustment minus one or more coefficients of the watermark image multiplied by α, or the coefficients of the original image before adjustment minus a part of the coefficients of the watermark image multiplied by α and plus another part of the coefficients of the watermark image multiplied by α. It will not be elaborated further below.

[0141] In this embodiment, lowf1 is subtracted from the product of lowf2 and the intensity factor α of the algorithm, and highH1, highV1, and highD1 are respectively added to the product of lowf2 and the intensity factor α of the algorithm. The similarity coefficient of an image contains most of the image's energy, while the horizontal, vertical, and diagonal thinning coefficients contain the image's detail energy and contain less information. This invention reduces the first similarity coefficient of the original image while increasing the first detail coefficients in each direction of the original image, thus minimizing the overall change in brightness energy and ensuring transparency.

[0142] In implementation C2, the second coefficient includes a second similarity coefficient lowf2 used to characterize the approximate energy of the subject in the watermark image, and the first coefficient includes a first similarity coefficient lowf1 used to characterize the approximate energy of the subject in the original image. Step 204 can be implemented by embedding the second similarity coefficient lowf2 into the first similarity coefficient lowf1 to obtain the adjusted first similarity coefficient lowf1. For example, Lowf1 is determined according to the above formula (4). .

[0143] In implementation C3, the second coefficient includes a second similarity coefficient lowf2 for characterizing the approximate energy of the subject in the watermark image, and the first coefficient includes at least one first detail coefficient for characterizing the detail energy of the original image. Step 204 can be implemented by embedding the second similarity coefficient lowf2 into each of the at least one first detail coefficients characterizing the detail energy of the original image, resulting in at least one adjusted first detail coefficient. For example, if the at least one first detail coefficient characterizing the detail energy of the original image includes highH1, highV1, and highD1, lowf2 can be embedded into highH1, highV1, and highD1 respectively to obtain an adjusted highH1. highV1 highD1 For example, highH1', highV1', and highD1' are determined according to formulas (5) to (7) above.

[0144] In implementation C4, the second coefficient includes at least one detail coefficient characterizing the detail energy of the watermark image, and the first coefficient includes at least one first detail coefficient characterizing the detail energy of the original image. Step 204 can be implemented by embedding at least one detail coefficient (i.e., at least one of highH2, highV2, and highD2) ​​corresponding to the watermark image into at least one first detail coefficient (i.e., at least one of highH1, highV1, and highD1) corresponding to the original image, resulting in at least one adjusted first detail coefficient.

[0145] For example, at least one detail coefficient corresponding to the watermarked image includes highH2, and at least one first detail coefficient corresponding to the original image includes highH1. HighH2 is embedded into highH1 to obtain highH1. For example, adding α to highH1 highH2 yields highH1 .

[0146] For example, the watermarked image has at least one detail coefficient including highH2, and the original image has at least one first detail coefficient including highH1, highV1, and highD1. HighH2 is then embedded into highH1, highV1, and highD1 respectively to obtain highH1. highV1 and highD1 For example, adding α to highH1 highH2 yields highH1 Add α to highV1 highH2 yields highV1 Add α to highD1 highH2 yields highD1 .

[0147] For example, at least one detail coefficient corresponding to the watermarked image includes highH2, highV2, and highD2, and at least one first detail coefficient corresponding to the original image includes highH1, highV1, and highD1. HighH2 is embedded into highH1 to obtain highH1. highV2 is embedded into highV1 to obtain highV1. Embedding highD2 into highD1 yields highD1'. For example, adding α to highH1... highH2 yields highH1 Subtract α from highV1 highV2 gets highV1 Add α to highD1 highD2 gets highD1 .

[0148] In implementation C5, the second coefficient includes at least one detail coefficient characterizing the detail energy of the watermark image, and the first coefficient includes a first approximation coefficient lowf1 characterizing the subject approximation energy of the original image. For example, if at least one detail coefficient corresponding to the watermark image includes highH2, highH2 can be embedded into lowf1 to obtain lowf1. For example, subtracting α from lowf1 highH2 gets lowf1 For example, if at least one detail coefficient corresponding to the watermarked image includes highH2, highV2, and highD2, then highH2, highV2, and highD2 can be embedded into lowf1 to obtain lowf1. For example, adding α to lowf1 respectively highH2, α highV2 and α highD2 gets lowf1 For example, adding α to lowf1 respectively highH2, α highV2, minus α highD2 gets lowf1 .

[0149] In implementation C6, the second coefficient includes at least one detail coefficient for characterizing the detail energy of the watermark image, and the first coefficient includes a first approximation coefficient lowf1 for characterizing the subject approximation energy of the original image and at least one first detail coefficient for characterizing the detail energy of the original image.

[0150] For example, at least one detail coefficient corresponding to the watermarked image includes highH2, and at least one first detail coefficient corresponding to the original image includes highH1. This can be achieved by embedding highH2 into highH1 to obtain highH1. Alternatively, highH2 can be embedded into lowf1 to obtain lowf1. And embed highH2 into highH1 to obtain highH1 .

[0151] For example, at least one detail coefficient corresponding to the watermarked image includes highH2, highV2, and highD2, and at least one first detail coefficient corresponding to the original image includes highH1, highV1, and highD1. Optionally, highH2 can be embedded into highH1 to obtain highH1. highV2 is embedded into highV1 to obtain highV1. Embedding highD2 into highD1 yields highD1. Alternatively, highH2, highV2, and highD2 can be embedded into lowf1 to obtain lowf1. Optionally, highH2, highV2, and highD2 can be embedded into lowf1 to obtain lowf1. And embed highH2 into highH1 to obtain highH1 highV2 is embedded into highV1 to obtain highV1. Embedding highD2 into highD1 yields highD1. .

[0152] In implementation C7, the second coefficient includes a second similarity coefficient lowf2 for characterizing the subject approximation energy of the watermark image and at least one detail coefficient for characterizing the detail energy of the watermark image, and the first coefficient includes a first similarity coefficient lowf1 for characterizing the subject approximation energy of the original image.

[0153] For example, at least one detail coefficient corresponding to the watermarked image includes highH2, and optionally, lowf2 can be embedded into lowf1 to obtain lowf1. Alternatively, lowf2 and highH2 can be embedded into lowf1 to obtain lowf1. .

[0154] In implementation C8, the second coefficient includes a second similarity coefficient lowf2 for characterizing the main approximate energy of the watermark image and at least one detail coefficient for characterizing the detail energy of the watermark image, and the first coefficient includes at least one first detail coefficient for characterizing the detail energy of the original image.

[0155] For example, at least one detail coefficient corresponding to the watermarked image includes highH2, highV2, and highD2, and at least one first detail coefficient corresponding to the original image includes highH1, highV1, and highD1. Optionally, highH2 can be embedded into highH1 to obtain highH1. highV2 is embedded into highV1 to obtain highV1. Embedding highD2 into highD1 yields highD1. Alternatively, lowf2 and highH2 can be embedded into highH1 to obtain highH1. embeds lowf2 and highV2 into highV1 to obtain highV1. Embedding lowf2 and highD2 into highD1 yields highD1. .

[0156] In implementation C9, the second coefficient includes a second similarity coefficient lowf2 for characterizing the subject approximation energy of the watermark image and at least one detail coefficient for characterizing the detail energy of the watermark image, and the first coefficient includes a first similarity coefficient lowf1 for characterizing the subject approximation energy of the original image and at least one first detail coefficient for characterizing the detail energy of the original image.

[0157] In one approach, step 204 can be implemented by embedding the second similarity coefficient lowf2 into the first similarity coefficient lowf1 to obtain the adjusted first similarity coefficient lowf1. The watermark image is embedded with at least one detail coefficient (i.e., at least one of highH2, highV2, and highD2) ​​into the original image with at least one first detail coefficient (i.e., at least one of highH1, highV1, and highD1). For example, highH2 is embedded into highH1, highV2 is embedded into highV1, and highD2 is embedded into highD1 to obtain at least one adjusted first detail coefficient.

[0158] In another approach, step 204 can be implemented as follows: embed the second similarity coefficient lowf2 into the first similarity coefficient lowf1 and the first detail coefficient (i.e., at least one of highH1, highV1, and highD1) corresponding to at least one preset direction of the original image; embed the lowf2 and highH2 corresponding to the watermark image into highH1; embed the lowf2 and highV2 corresponding to the watermark image into highV1; and embed the lowf2 and highD2 corresponding to the watermark image into highD1 to obtain the adjusted lowf1. highH1 highV1 and highD1 .

[0159] Step 205: Based on the adjusted first coefficient, reconstruct the carrier image with the embedded watermark image.

[0160] Step 205 reconstructs the carrier image with the embedded watermark image based on the adjusted first coefficients obtained in embodiments C1 to C9 described above.

[0161] In this embodiment of the invention, watermark embedding is performed based on modifying the statistical characteristics of the original image. The coefficients of the main approximate energy of the watermark are embedded into the coefficients of the main approximate energy and / or detail energy of the original image. This not only improves resistance to compression attacks, but also allows for a balance between factors such as transparency, robustness, and the amount of embedded information.

[0162] Based on the above implementation method C1, the carrier image with the embedded watermark image can be reconstructed according to the adjusted first similarity coefficient and at least one adjusted first detail coefficient.

[0163] In one possible implementation, the element values ​​of the first row and first column of the second matrix can be replaced with the adjusted first similarity coefficient, and the inverse operation of multiple transformation operations can be performed on each column of the replaced second matrix, and the inverse operation of multiple transformation operations can be performed on each row of the second matrix after the inverse operation, to obtain the seventh matrix.

[0164] For each of the at least one adjusted first detail coefficients, the element value of the first row and first column of the sixth matrix is ​​replaced with the adjusted first detail coefficient, and the inverse operation of multiple transformation operations is performed on each column of the replaced sixth matrix, and the inverse operation of multiple transformation operations is performed on each row of the sixth matrix after the inverse operation to obtain the eighth matrix.

[0165] Based on the seventh matrix and the eighth matrix corresponding to each adjusted first detail coefficient, the carrier image with the embedded watermark image is reconstructed.

[0166] For example, after obtaining the adjusted lowf1 highH1 =0.08, highV1 =0.08 and highD1 After reaching 0.08, highH1 can be... =0.08, highV1 =0.08 and highD1 =0.08 Substitute into T1 respectively T2 and T3 In the first row and first column, replace A11 with T1. T2 and T3 The inverse operation of the above transformation is used to obtain T11, T21, and T31. Then, T11, T21, and T31 are substituted back into the above T... In, for example, T11 replaces T. The 4 in the upper right corner 4 matrices, T21 replaces T The 4 in the bottom left corner 4 matrices, T31 replaces T The 4 in the bottom right corner 4. Substitute the calculated lowf2 = 32.42 back into the above T. A11 (the element in the first row and first column) can be used to obtain the matrix T of the image after row and column calculations for the watermarked image. Then for T Perform the inverse operation of the transformation operation, that is, first perform the transformation on T. Perform the inverse operation on each column, and then perform the inverse operation of the transformation operation on each row of the column inverse operation result. The inverse operation of the transformation operation is the inverse operation of the mean and difference of each pair of elements. This yields the original energy matrix of the carrier image after embedding the watermark image, which is the CD-ROM image with the hidden watermark.

[0167] In this embodiment of the invention, the main energy portion and detail energy of the image are separated by calculation. Based on the patchwork algorithm, calculations are performed, embedding a portion of the energy into similarity coefficients. Although some energy is still embedded in the thinning coefficients, the stability of the portion embedded in similarity coefficients is sufficient to improve robustness, especially providing excellent resistance to JPEG compression. This prevents watermark loss during compression and storage in DA projects, achieving both sufficient embedding capacity and good transparency and robustness. Furthermore, the image correlation coefficient is reasonably increased or decreased based on statistical characteristics. The core embedding and extraction formulas are simple and efficient, saving computational resources.

[0168] Based on the above embodiments, the present invention also provides the following information processing method, which is used to extract watermark images from carrier images. For example... Figure 3 As shown, the specific steps of this method include:

[0169] Step 301: Obtain the carrier image, which includes the watermark image to be extracted.

[0170] Step 302: Based on the third energy matrix composed of the brightness values ​​of each pixel in the carrier image, determine the third similarity coefficient of the carrier image and the second detail coefficient in at least one preset direction; wherein, the third similarity coefficient is used to characterize the main approximate energy of the carrier image, and the second detail coefficient in at least one preset direction is used to characterize the detail energy of the carrier image.

[0171] For example, the third similarity coefficient lowf3 is calculated to be 32.42 based on the third energy matrix, and highH3 is 0.08, highV3 is 0.08, and highD3 is 0.08 in the second detail coefficients of at least one preset direction.

[0172] Step 303: Determine the fourth similarity coefficient of the image to be watermarked based on the third similarity coefficient and the first similarity coefficient corresponding to the original image.

[0173] The first similarity coefficient lowf1 corresponding to the original image is 32.5. The difference between the third similarity coefficient of the carrier image and the first similarity coefficient of the original image is calculated. The absolute value of the difference is divided by the intensity factor α of the embedding algorithm to obtain a value, which is an estimate of the fourth similarity coefficient of the watermark image. This value is assigned to the fourth similarity coefficient Wcar1 of the watermark image to be extracted. Specifically, it can be obtained by the following formula (8):

[0174] Wcar1=|lowf3-lowf1| / α Formula (8)

[0175] Step 304: Determine the third detail coefficient of each preset direction of the watermark image to be extracted based on the second detail coefficient of at least one preset direction and the first detail coefficient of at least one preset direction corresponding to the original image.

[0176] In the first detail coefficient of at least one preset direction corresponding to the original image, highH1 is 0, highV1 is 0, and highD1 is 0. The thinning coefficient highH1 in the horizontal direction of the original image is subtracted from the thinning coefficient highH3 in the horizontal direction of the carrier image, the thinning coefficient highV1 in the vertical direction of the original image is subtracted from the thinning coefficient highV3 in the vertical direction of the carrier image, and the thinning coefficient highD1 in the diagonal direction of the original image is subtracted from the thinning coefficient highD3 in the diagonal direction of the carrier image. The absolute value of each absolute value is then divided by α (intensity factor) and assigned to the third detail coefficient of each preset direction of the image to be watermarked: Wcar2, Wcar3, Wcar4. Specifically, this can be obtained through the following formulas (9), (10), and (11):

[0177] Wcar2=|highH3-highH1| / α Formula (9)

[0178] Wcar3=|high3-highV1| / α formula (10)

[0179] Wcar4=|highD3-highD1| / α Formula (11)

[0180] Step 305: Reconstruct the watermark image to be extracted based on the fourth similarity coefficient and at least one third detail coefficient in a preset direction.

[0181] For example, the average value of Wcar1, Wcar2, Wcar3, and Wcar4 in the above formulas (8) to (12) is calculated as follows: Formula (12):

[0182] Wcar=(Wcar1+Wcar2+Wcar3+Wcar4) / 4 Formula (12)

[0183] Combining highH3 = 0.08, highV3 = 0.08, highD3 = 0.08, highH1 = 0, highV1 = 0, highD1 = 0, and the above formulas (8) to (12), we obtain Wcar = 4, which is used as the fourth similarity coefficient of the watermark image to be extracted.

[0184] Then, based on Wcar being 4 and the fourth matrix U corresponding to the watermark image... The watermark image to be extracted is obtained by reconstructing the image through the inverse operation of the transformation operation in the above embodiment. The specific process is as follows:

[0185] The matrix U is replaced with the fourth similarity coefficient Wcar (which is 4) of the watermark image to be extracted. The element value Amn (m=1, m=1) in the first row and first column is used to obtain V. ;

[0186]

[0187] Then, based on formulas (1) and (2) and the process of embedding the watermark image into the original image, the derivation is performed in reverse. The specific implementation is as follows:

[0188] Assume V-- 11=x, V-- 12 = y, and the values ​​of x and y can be calculated using the following formulas (13) and (14):

[0189] (x+y) / 2=4 formula (13)

[0190] (xy) / 2=4 Formula (14)

[0191] Using formulas (13) and (14), we can obtain: x=8, y=0; then, we proceed with the reverse derivation, assuming V- 11 =12, V- 12 =4, V- 13 =4, V- 14 =-4. Assume V 11 =a, V 12 =b, V 13 =c, V 14 =d, V 15 =e, V ` 16 =f, V 17 =g, V 18 =h, derived in reverse from the embedded column calculation process:

[0192] (a+b) / 2=12 Formula (15)

[0193] (ab) / 2=0 Formula (16)

[0194] (c+d) / 2=4 Formula (17)

[0195] (cd) / 2=0 formula (18)

[0196] (e+f) / 2=4 Formula (19)

[0197] (ef) / 2=0 formula (20)

[0198] (g+h) / 2=-4 Formula (21)

[0199] (gh) / 2=0 Formula (22)

[0200] Using the above formulas (15) to (22), we obtain VT1. =[12,12,4,4,4,4,-4,-4,-4], where T indicates that this is a column matrix, which is the matrix after row operations, VT1 This is the first column of data. Following the above derivation, we then calculate all columns V of the matrix after the row operations. Then, the original energy matrix V of the image to be watermarked is derived by reversing the row transformation operation.

[0201]

[0202] In the example above, after calculating the fourth similarity coefficient Wcar (which is 4) of the image to be watermarked, U is replaced with Wcar (which is 4). After that, as V In some other embodiments, such as when the information processing device does not store the aforementioned U... U Set it to an 8x8 matrix where all elements are 0. Then, replace the 0s in the first row and first column with Wcar (which is 4), resulting in a matrix where the first row and first column are 0 and all other elements are 0. This matrix is ​​used as V. Then for V The reverse process of column transformation operation is used to obtain V`, and then the reverse process of row transformation operation is used to derive the original energy matrix V of the watermark image to be extracted.

[0203] In this embodiment of the application, after obtaining the original energy matrix V of the watermark image, the watermark image can be obtained based on the original energy matrix V of the watermark image, thereby protecting copyright.

[0204] Based on the same technological concept Figure 4 An information processing apparatus provided by an embodiment of the present invention is illustrated, which can execute the flow of an information processing method.

[0205] like Figure 4As shown, the device includes:

[0206] The acquisition unit 401 is used to acquire the watermark image to be hidden and the original image used to hide the watermark image;

[0207] Processing unit 402 is configured to determine a first coefficient corresponding to the original image based on a first energy matrix composed of the brightness values ​​of each pixel in the original image; wherein the first coefficient is used to characterize the main approximate energy and / or detail energy of the original image; determine a second coefficient corresponding to the watermark image based on a second energy matrix composed of the brightness values ​​of each pixel in the watermark image; the second coefficient is used to characterize the main approximate energy of the watermark image; adjust the first coefficient according to the second coefficient to obtain the adjusted first coefficient; and reconstruct a carrier image embedded with the watermark image based on the adjusted first coefficient.

[0208] Optionally, the processing unit 402 is specifically configured to perform multiple transformation operations on the m-th row or m-th column of any matrix, comprising the following steps: performing a first transformation operation on the m-th row or m-th column; wherein the m-th row or m-th column comprises N elements, where m and N are both positive integers, and the first transformation operation comprises the following steps: performing an average operation on each pair of first elements formed by every two adjacent elements in the N elements to obtain the approximate energy of N / 2 pairs of first elements, and replacing the element values ​​of the first N / 2 elements in the N elements; performing a mean difference operation on each pair of first elements formed by every two adjacent elements in the N elements to obtain the detailed energy of N / 2 pairs of first elements, and replacing the element values ​​of the last N / 2 elements in the N elements to obtain the first operation result; performing an i-th transformation operation on the (i-1)-th operation result. In each transformation operation, i takes an integer from 2 to j, until the result of the j-th operation contains only one approximate energy value, at which point the transformation operation stops, where j is an integer greater than 1. The result of the (i-1)-th transformation operation includes L elements belonging to the approximate energy, where L is an integer less than N. The i-th transformation operation includes the following steps: averaging the second element pairs formed by every two adjacent elements among the L elements belonging to the approximate energy to obtain L / 2 approximate energies for these second element pairs, replacing the element values ​​of the first L / 2 elements among the L elements; performing a mean-difference operation on the second element pairs formed by every two adjacent elements among the L elements belonging to the approximate energy to obtain the detail energies of L / 2 second element pairs, replacing the element values ​​of the last L / 2 elements among the L elements, thus obtaining the result of the i-th operation.

[0209] Optionally, the first coefficient further includes a first detail coefficient for characterizing the detail energy of the original image in at least one preset direction; the at least one preset direction includes at least one of the following: horizontal direction, vertical direction, and diagonal direction.

[0210] Optionally, the processing unit 402 is further configured to determine the at least one preset direction refinement coefficient matrix from the second matrix; and for each preset direction refinement coefficient matrix, perform: perform multiple transformation operations on each row of the preset direction refinement coefficient matrix to obtain a fifth matrix; perform multiple transformation operations on each column of the fifth matrix to obtain a sixth matrix; and determine the first detail coefficient of the preset direction based on the element value of the first row and first column of the sixth matrix.

[0211] Optionally, the processing unit 402 is specifically configured to: embed the second similarity coefficient into the first similarity coefficient and at least one first detail coefficient respectively to obtain the adjusted first similarity coefficient and at least one adjusted first detail coefficient; and reconstruct the carrier image embedded with the watermark image based on the adjusted first similarity coefficient and the at least one adjusted first detail coefficient.

[0212] Optionally, the processing unit 402 is specifically configured to: replace the element values ​​of the first row and first column of the second matrix with the adjusted first similarity coefficient, and perform multiple inverse operations of transformation on each column of the replaced second matrix, and perform multiple inverse operations of transformation on each row of the second matrix after inverse operation to obtain a seventh matrix; for each adjusted first detail coefficient among at least one adjusted first detail coefficient, replace the element values ​​of the first row and first column of the sixth matrix with the adjusted first detail coefficient, and perform multiple inverse operations of transformation on each column of the replaced sixth matrix, and perform multiple inverse operations of transformation on each row of the sixth matrix after inverse operation to obtain an eighth matrix; and reconstruct a carrier image embedded with the watermark image based on the seventh matrix and the eighth matrix corresponding to each adjusted first detail coefficient.

[0213] Optionally, the acquisition unit 401 is further configured to: acquire a carrier image, the carrier image including a watermark image to be extracted; the processing unit 402 is further configured to: determine a third similarity coefficient and a second detail coefficient in at least one preset direction of the carrier image based on a third energy matrix composed of the brightness values ​​of each pixel in the carrier image; wherein the third similarity coefficient is used to characterize the main approximate energy of the carrier image, and the second detail coefficient in at least one preset direction is used to characterize the detail energy of the carrier image; determine a fourth similarity coefficient of the watermark image to be extracted based on the third similarity coefficient and a first similarity coefficient corresponding to the original image; determine a third detail coefficient in each preset direction of the watermark image to be extracted based on the second detail coefficient in at least one preset direction and a first detail coefficient in at least one preset direction corresponding to the original image; and reconstruct the watermark image to be extracted based on the fourth similarity coefficient and the third detail coefficient in at least one preset direction.

[0214] Based on the same technical concept, embodiments of the present invention provide a computing device, including:

[0215] Memory, used to store program instructions;

[0216] The processor is used to call program instructions stored in the memory and execute information processing methods according to the obtained program.

[0217] Based on the same technical concept, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions for causing a computer to perform an information processing method.

[0218] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0219] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0220] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0221] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0222] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0223] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this application and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. An information processing method, characterized in that, include: Obtain the watermark image to be hidden and the original image used to hide the watermark image; Based on a first energy matrix composed of the brightness values ​​of each pixel in the original image, a first coefficient corresponding to the original image is determined. Specifically, this includes: performing multiple transformation operations on each row of the first energy matrix to obtain a first matrix; performing multiple transformation operations on each column of the first matrix to obtain a second matrix; and determining a first similarity coefficient based on the element values ​​of the first row and first column of the second matrix. The first coefficient is used to characterize the approximate energy of the main subject and / or the energy of the detail in the original image. The first coefficient includes a first similarity coefficient used to characterize the approximate energy of the main subject in the original image. Based on the second energy matrix composed of the brightness values ​​of each pixel in the watermark image, the second coefficient corresponding to the watermark image is determined. Specifically, this includes: performing multiple transformation operations on each row of the second energy matrix to obtain a third matrix; performing the multiple transformation operations on each column of the third matrix to obtain a fourth matrix; and determining a second similarity coefficient based on the element values ​​of the first row and first column of the fourth matrix. The second coefficient is used to characterize the main approximate energy of the watermark image. The second coefficient includes a second similarity coefficient used to characterize the main approximate energy of the watermark image. The first coefficient is adjusted according to the second coefficient to obtain the adjusted first coefficient; Based on the adjusted first coefficient, a carrier image embedded with the watermark image is reconstructed; Performing multiple transformation operations on the m-th row or m-th column of any matrix includes the following process: The first transformation operation is performed on the m-th row or the m-th column; wherein the m-th row or the m-th column includes N elements, and m and N are both positive integers. The first transformation operation includes the following process: performing an average operation on each pair of first elements formed by every two adjacent elements in the N elements to obtain the approximate energy of N / 2 pairs of first elements, and replacing the element values ​​of the first N / 2 elements in the N elements; performing a difference operation on each pair of first elements formed by every two adjacent elements in the N elements to obtain the detailed energy of N / 2 pairs of first elements, and replacing the element values ​​of the last N / 2 elements in the N elements to obtain the first operation result; The i-th transformation operation is performed on the result of the (i-1)-th operation, where i is an integer between 2 and j, until the result of the j-th operation contains only one approximate energy value, at which point the transformation operation stops, where j is an integer greater than 1. The result of the (i-1)-th transformation operation includes L elements belonging to approximate energy, where L is an integer less than N. The i-th transformation operation includes the following steps: averaging the second element pairs formed by every two adjacent elements among the L elements belonging to approximate energy to obtain the approximate energy of L / 2 second element pairs, replacing the element values ​​of the first L / 2 elements in the L elements; performing a mean-difference operation on the second element pairs formed by every two adjacent elements among the L elements belonging to approximate energy to obtain the detailed energy of L / 2 second element pairs, replacing the element values ​​of the last L / 2 elements in the L elements, thus obtaining the result of the i-th operation.

2. The method as described in claim 1, characterized in that, The first coefficient also includes a first detail coefficient for characterizing the detail energy of the original image in at least one preset direction; the at least one preset direction includes at least one of the following: horizontal direction, vertical direction, and diagonal direction.

3. The method as described in claim 2, characterized in that, After performing the transformation operation multiple times on each column of the first matrix to obtain the second matrix, the process further includes: Determine the refinement coefficient matrix for the at least one preset direction from the second matrix; For each preset direction's refinement coefficient matrix, execute: Perform multiple transformation operations on each row of the refinement coefficient matrix in the preset direction to obtain the fifth matrix; Perform multiple transformation operations on each column of the fifth matrix to obtain the sixth matrix; The first detail coefficient of the preset direction is determined based on the element value of the first row and first column of the sixth matrix.

4. The method as described in claim 2, characterized in that, The step of adjusting the first coefficient according to the second coefficient to obtain the adjusted first coefficient includes: The second similarity coefficient is embedded into the first similarity coefficient and at least one first detail coefficient respectively to obtain the adjusted first similarity coefficient and at least one adjusted first detail coefficient; The step of reconstructing the carrier image embedded with the watermark image based on the adjusted first coefficient includes: Based on the adjusted first similarity coefficient and the at least one adjusted first detail coefficient, a carrier image embedded with the watermark image is reconstructed.

5. The method as described in claim 4, characterized in that, The step of reconstructing the carrier image embedded with the watermark image based on the adjusted first similarity coefficient and the at least one adjusted first detail coefficient includes: The adjusted first similarity coefficient is used to replace the element value of the first row and first column of the second matrix, and the inverse operation of multiple transformation operations is performed on each column of the replaced second matrix, and the inverse operation of multiple transformation operations is performed on each row of the second matrix after the inverse operation, to obtain the seventh matrix; For each of the at least one adjusted first detail coefficients, the element value of the first row and first column of the sixth matrix is ​​replaced with the adjusted first detail coefficient, and the inverse operation of multiple transformation operations is performed on each column of the replaced sixth matrix, and the inverse operation of multiple transformation operations is performed on each row of the sixth matrix after the inverse operation to obtain the eighth matrix. Based on the seventh matrix and the eighth matrix corresponding to each adjusted first detail coefficient, the carrier image embedded with the watermark image is reconstructed.

6. The method as described in claim 2, characterized in that, The method further includes: Acquire a carrier image, the carrier image including the watermark image to be extracted; Based on the third energy matrix composed of the brightness values ​​of each pixel in the carrier image, a third similarity coefficient and a second detail coefficient in at least one preset direction are determined for the carrier image; wherein, the third similarity coefficient is used to characterize the main approximate energy of the carrier image, and the second detail coefficient in at least one preset direction is used to characterize the detail energy of the carrier image; Based on the third similarity coefficient and the first similarity coefficient corresponding to the original image, the fourth similarity coefficient of the watermark image to be extracted is determined; Based on the second detail coefficient of the at least one preset direction and the first detail coefficient of the at least one preset direction corresponding to the original image, the third detail coefficient of each preset direction of the watermark image to be extracted is determined respectively; The watermark image to be extracted is reconstructed based on the fourth similarity coefficient and the third detail coefficient of at least one preset direction.

7. An information processing device, characterized in that, include: The acquisition unit is used to acquire the watermark image to be hidden and the original image used to hide the watermark image; The processing unit is configured to: determine a first coefficient corresponding to the original image based on a first energy matrix composed of the brightness values ​​of each pixel in the original image; wherein the first coefficient is used to characterize the main approximate energy and / or detail energy of the original image; determine a second coefficient corresponding to the watermark image based on a second energy matrix composed of the brightness values ​​of each pixel in the watermark image; the second coefficient is used to characterize the main approximate energy of the watermark image; adjust the first coefficient according to the second coefficient to obtain an adjusted first coefficient; and reconstruct a carrier image embedded with the watermark image based on the adjusted first coefficient. Wherein, the first coefficient includes a first similarity coefficient used to characterize the approximate energy of the subject of the original image; the step of determining the first coefficient corresponding to the original image based on a first energy matrix composed of the brightness values ​​of each pixel in the original image includes performing multiple transformation operations on each row of the first energy matrix to obtain a first matrix; performing multiple transformation operations on each column of the first matrix to obtain a second matrix; and determining the first similarity coefficient based on the element values ​​of the first row and first column of the second matrix; the second coefficient includes a second similarity coefficient used to characterize the approximate energy of the subject of the watermark image; the step of determining the first similarity coefficient based on the brightness values ​​of each pixel in the watermark image includes... The second energy matrix composed of brightness values ​​is used to determine the second coefficient corresponding to the watermark image, including: performing multiple transformation operations on each row of the second energy matrix to obtain a third matrix; performing the multiple transformation operations on each column of the third matrix to obtain a fourth matrix; determining the second similarity coefficient based on the element values ​​of the first row and first column of the fourth matrix; performing multiple transformation operations on the m-th row or m-th column of any matrix includes the following process: performing the first transformation operation on the m-th row or m-th column; wherein the m-th row or m-th column includes N elements, where m and N are both positive integers, and the first transformation operation includes the following process: For each pair of first elements formed by every two adjacent elements in the N elements, perform an average operation to obtain the approximate energy of N / 2 pairs of first elements, and replace the element values ​​of the first N / 2 elements in the N elements; perform a difference operation to obtain the detailed energy of N / 2 pairs of first elements, and replace the element values ​​of the last N / 2 elements in the N elements to obtain the first operation result; perform the i-th transformation operation on the i-1th operation result, where i is an integer between 2 and j, until the j-th operation result includes only one approximate energy value, and stop the transformation operation, where j is an integer greater than 1; The result of the (i-1)th transformation operation includes L elements belonging to approximate energy, where L is an integer less than N. The i-th transformation operation includes the following process: performing an average operation on the second element pairs formed by every two adjacent elements among the L elements belonging to approximate energy to obtain the approximate energy of L / 2 second element pairs, and replacing the element values ​​of the first L / 2 elements among the L elements; performing a mean difference operation on the second element pairs formed by every two adjacent elements among the L elements belonging to approximate energy to obtain the detail energy of L / 2 second element pairs, and replacing the element values ​​of the last L / 2 elements among the L elements to obtain the result of the i-th operation.

8. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the method according to any one of claims 1 to 6.