Blind watermark embedding method and device, blind watermark detection method and device
By embedding multiply watermarks in non-critical blocks of the target carrier image, the problem of difficulty in taking into account invisibility, robustness and real-time in the prior art is solved, and a digital watermark technology with high invisibility and strong robustness is realized.
Patent Information
- Application Number
- CN202210126535.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-10
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-02-10
AI Technical Summary
Existing digital watermarking technologies are difficult to take into account high invisibility, strong robustness and high real-time performance, especially when watermark embedding in non-critical areas of images, it is difficult to keep visual differences minimal.
Watermark embeds are performed in non-critical chunks of the target carrier image and the watermark is embedded in a multiplicative manner in the low frequency region of the image. The specific steps include blocking the image, adaptively selecting non-critical image blocks, performing Fourier transform, performing singular value decomposition and multiplicative watermark embedding.
Improves the invisibility and robustness of watermarks, reduces visual differences, and improves the detection rate of watermarks.
Smart Images

Figure CN114493973B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital watermark technology, and in particular to a blind watermark embedding method and device, a blind watermark detection method and device, a computer device and a storage medium. Background Art
[0002] Digital watermarking technology is an important branch of information security technology. It uses the data redundancy or visual redundancy of digital images to embed digital watermarks into digital images through certain embedding methods. It is not easy to detect visually, and when necessary, the watermark information can be extracted from the digital image through a special extraction algorithm. In order to reduce the visual difference before and after the watermark is embedded, the watermark needs to be embedded in the non-critical area of the image. The frequency domain image blind watermarking method transforms the image from the spatial domain to the frequency domain before embedding the watermark, which has the characteristics of strong robustness.
[0003] A good digital watermarking technology needs to take into account performance indicators such as invisibility, robustness and real-time performance. Therefore, how to design a digital watermarking algorithm with high invisibility, strong robustness and high real-time performance has become a hot topic in the current research of digital watermarking technology. Summary of the invention
[0004] In view of the above shortcomings or disadvantages, the present application provides a blind watermark embedding method and device, a blind watermark detection method and device, a computer device and a storage medium. The embodiment of the present application embeds watermarks in non-critical blocks of images, tries not to cause visual differences, and improves the imperceptibility of watermarks. Watermarks are embedded in the low-frequency area of the image in a multiplicative manner, which improves the robustness of the watermark.
[0005] The present application provides a blind watermark embedding method according to a first aspect. In one embodiment, the method includes:
[0006] Acquire a target carrier image;
[0007] The target carrier image is processed into blocks to obtain a first image block set, and a non-key image block is adaptively selected from the first image block set based on an orthogonal matching pursuit algorithm as a first candidate image block to be embedded with a watermark;
[0008] Fourier transform is performed on each selected first candidate image block to process each first candidate image block into a first low-frequency sub-band image block, and multiplicative watermark embedding is performed on each first low-frequency sub-band image block to obtain a watermarked image.
[0009] In one embodiment, performing a multiplicative watermark embedding process on each first low-frequency sub-band image block to obtain a watermarked image includes:
[0010] Performing singular value decomposition on each first low-frequency subband image block to obtain a corresponding singular value decomposition result, wherein the singular value decomposition result includes a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix;
[0011] According to the singular value decomposition result of each first low-frequency sub-band image block, a high-capacity watermark is embedded in each first low-frequency sub-band image block to obtain a corresponding embedded watermark image vector;
[0012] Perform inverse singular value decomposition according to the singular value decomposition result of each first low-frequency sub-band image block and the embedded watermark image vector to obtain the corresponding low-frequency decomposition amount;
[0013] Perform inverse Fourier transform on the low-frequency decomposition of each first low-frequency sub-band image block to obtain a watermarked image.
[0014] In one embodiment, according to the singular value decomposition result of each first low-frequency sub-band image block, a high-capacity watermark is embedded in each first low-frequency sub-band image block to obtain a corresponding embedded watermark image vector, including:
[0015] Constructing a corresponding singular value decomposition model according to the singular value decomposition result of each first low-frequency sub-band image block;
[0016] Extracting diagonal matrix elements from the singular value decomposition model of each first low-frequency subband image block, and constructing a corresponding multiplicative embedding model according to the extracted diagonal matrix elements;
[0017] According to the multiplicative embedding model of each first low-frequency sub-band image block, a high-capacity watermark is embedded in each first low-frequency sub-band image block to obtain an embedded watermark image vector of each first low-frequency sub-band image block.
[0018] In one embodiment, inverse singular value decomposition is performed according to the singular value decomposition result of each first low-frequency sub-band image block and the embedded watermark image vector to obtain the corresponding low-frequency decomposition amount, including:
[0019] Inverse singular value decomposition is performed according to the first orthogonal matrix of each first low-frequency sub-band image block, the transposed matrix of the second orthogonal matrix and the image vector embedded with the watermark to obtain the low-frequency decomposition amount of each first low-frequency sub-band image block.
[0020] According to a second aspect, the present application provides a blind watermark detection method. In one embodiment, the method includes:
[0021] Obtain a target image for detecting watermark information;
[0022] The target image is processed into blocks to obtain a second image block set, and a non-key image block is selected from the second image block set as a second candidate image block for watermark extraction;
[0023] Performing Fourier transform on each selected second candidate image block to extract a second low-frequency sub-band image block with a watermark from each second candidate image block, and performing multiplicative watermark extraction processing on each second low-frequency sub-band image block to obtain low-frequency watermark information;
[0024] Detect whether the target image contains watermark information based on the low-frequency watermark information.
[0025] In one embodiment, performing multiplicative watermark extraction processing on each second low-frequency sub-band image block to obtain low-frequency watermark information includes:
[0026] Perform multiplicative watermark extraction processing on each second low-frequency sub-band image block using a multiplicative watermark extraction model to obtain corresponding low-frequency watermark information;
[0027] Detecting whether the target image contains watermark information based on the low-frequency watermark information includes:
[0028] Calculating a weighted correlation coefficient corresponding to the low-frequency sub-band according to the low-frequency watermark information of each second low-frequency sub-band image block;
[0029] Determining whether the weighted correlation coefficient exceeds a preset threshold;
[0030] If so, it is determined that the target image contains watermark information;
[0031] If not, it is determined that the target image does not contain watermark information.
[0032] According to a third aspect, the present application provides a blind watermark embedding device. In one embodiment, the device includes:
[0033] A carrier image acquisition module, used to acquire a target carrier image;
[0034] A non-key block extraction module is used to process the target carrier image into blocks to obtain a first image block set, and adaptively select non-key image blocks from the first image block set based on an orthogonal matching pursuit algorithm as first candidate image blocks to be embedded with watermarks;
[0035] The watermark embedding module is used to perform Fourier transform on each selected first candidate image block to process each first candidate image block into a first low-frequency sub-band image block, and perform multiplicative watermark embedding processing on each first low-frequency sub-band image block to obtain a watermarked image.
[0036] According to a fourth aspect, the present application provides a blind watermark detection device. In one embodiment, the device includes:
[0037] A target image acquisition module is used to acquire a target image for detecting watermark information;
[0038] A non-key block extraction module is used to process the target image into blocks to obtain a second image block set, and select a non-key image block from the second image block set as a second candidate image block for watermark extraction;
[0039] A low-frequency watermark information extraction module is used to perform Fourier transform on each selected second candidate image block to extract a second low-frequency sub-band image block with a watermark from each second candidate image block, and perform multiplicative watermark extraction processing on each second low-frequency sub-band image block to obtain low-frequency watermark information;
[0040] The watermark detection module is used to detect whether the target image contains watermark information based on the low-frequency watermark information.
[0041] According to a fifth aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above method embodiments when executing the computer program.
[0042] According to a sixth aspect, the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of an embodiment of any of the above methods are implemented.
[0043] The embodiment of the present application embeds the watermark in the non-critical blocks of the target carrier image to minimize the visual difference, thereby improving the imperceptibility of the watermark, and embeds the watermark in the low-frequency area of the target carrier image in a multiplicative manner, thereby improving the robustness of the watermark.
[0044] On the other hand, the embodiment of the present application performs singular value decomposition on the image sub-blocks of the target image, making the image sub-blocks smoother and more continuous, making the detection of watermark information easier, reducing the error rate of the watermark, and thereby improving the detection rate of the watermark. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A schematic diagram of a process of a blind watermark embedding method in an embodiment;
[0046] Figure 2 is a comparison diagram of an image before and after blind watermarking is embedded in an embodiment;
[0047] Figure 3 is a flow chart of a blind watermark detection method in an embodiment;
[0048] Figure 4 is a structural block diagram of a blind watermark embedding device in one embodiment;
[0049] Figure 5 is a structural block diagram of a blind watermark detection device in one embodiment;
[0050] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] The present application provides a blind watermark embedding method. In one embodiment, the blind watermark embedding method includes: Figure 1 The steps shown are described below.
[0053] S110: Acquire a target carrier image.
[0054] The target carrier image refers to the carrier image to be embedded with a watermark.
[0055] S120: performing block processing on the target carrier image to obtain a first image block set, and adaptively selecting a non-key image block from the first image block set based on an orthogonal matching pursuit algorithm as a first candidate image block to be embedded with a watermark.
[0056] The first image block set refers to an image block set obtained by processing the target carrier image into blocks. The first candidate image block refers to an image block to be embedded with a watermark selected from the first image block set.
[0057] Exemplarily, the implementation process of this step may be as follows:
[0058] The target carrier image can be cut into image blocks of size m×m (image blocks can also be called image sub-blocks or blocks). The target carrier image can be divided into n image blocks in total, and each image block is a two-dimensional array, where the above n image blocks can be regarded as an image block set. Convert the image blocks into row vectors, and then form the row vectors into a matrix D:
[0059]
[0060] Among them, x1, x2, x n Represent the 1st, 2nd, and nth block vectors respectively. Convert the target carrier image into a row vector y and calculate the relationship between y and each block vector x i The inner product of the block vector with the largest absolute value of the inner product is selected. According to the properties of the orthogonal matching pursuit algorithm, at this time x i The corresponding block is the block that is most similar to the target carrier image, that is, the non-critical image block we want to select (also called non-critical block). At this time, y can be expressed as:
[0061]
[0062] Among them, <.,.> is the inner product calculation operation, is the block vector with the largest absolute value of the inner product with y, and r0 is the vector index in the matrix D. is the vector y in Orthogonal projection in the direction, R1 is the residual. After that, the same decomposition steps are performed on R1. After several iterations, y can be expressed as:
[0063]
[0064] R0=y
[0065] Where K is the number of non-critical image blocks in the target carrier image, which is also the number of iterations. After K iterations, K non-critical image blocks can be selected.
[0066] S130: Perform Fourier transform on each selected first candidate image block to process each first candidate image block into a first low-frequency sub-band image block, and perform multiplicative watermark embedding processing on each first low-frequency sub-band image block to obtain a watermarked image.
[0067] The first low-frequency sub-band image block refers to a low-frequency sub-band image block obtained by performing Fourier transform on the first candidate image block.
[0068] This embodiment embeds the watermark in non-critical blocks of the target carrier image to minimize visual differences, thereby improving the imperceptibility of the watermark, and embeds the watermark in a multiplicative manner in the low-frequency area of the target carrier image to improve the robustness of the watermark.
[0069] The following is a detailed description of some of the above steps.
[0070] In one embodiment, the multiplicative watermark embedding process is performed on each first low-frequency sub-band image block to obtain a watermarked image, including:
[0071] Perform singular value decomposition on each first low-frequency sub-band image block to obtain a corresponding singular value decomposition result, wherein the singular value decomposition result includes a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix; according to the singular value decomposition result of each first low-frequency sub-band image block, a high-capacity watermark is embedded in each first low-frequency sub-band image block to obtain a corresponding embedded watermark image vector; according to the singular value decomposition result of each first low-frequency sub-band image block and the embedded watermark image vector, an inverse singular value decomposition is performed to obtain a corresponding low-frequency decomposition amount; and an inverse Fourier transform is performed on the low-frequency decomposition amount of each first low-frequency sub-band image block to obtain a watermarked image.
[0072] The above-mentioned high-capacity watermark embedding is performed on each first low-frequency sub-band image block according to the singular value decomposition result of each first low-frequency sub-band image block to obtain the corresponding embedded watermark image vector, including:
[0073] A corresponding singular value decomposition model is constructed according to the singular value decomposition result of each first low-frequency sub-band image block; diagonal matrix elements are extracted from the singular value decomposition model of each first low-frequency sub-band image block, and a corresponding multiplicative embedding model is constructed according to the extracted diagonal matrix elements; based on the multiplicative embedding model of each first low-frequency sub-band image block, a high-capacity watermark is embedded in each first low-frequency sub-band image block to obtain an embedded watermark image vector of each first low-frequency sub-band image block.
[0074] Furthermore, the above-mentioned inverse singular value decomposition is performed according to the singular value decomposition result of each first low-frequency sub-band image block and the embedded watermark image vector to obtain the corresponding low-frequency decomposition amount, including: performing inverse singular value decomposition according to the first orthogonal matrix of each first low-frequency sub-band image block, the transposed matrix of the second orthogonal matrix and the embedded watermark image vector to obtain the low-frequency decomposition amount of each first low-frequency sub-band image block.
[0075] This embodiment can improve the robustness of the watermark by embedding the watermark in the low-frequency region of the target carrier image in a multiplicative manner.
[0076] Exemplarily, the implementation process of this embodiment may be as follows:
[0077] Perform Fourier transform on K non-critical image blocks to transform the image from the spatial domain to the frequency domain. Perform singular value decomposition on the first low-frequency subband image block, the size of which is 16×16. Construct a singular value decomposition model, where the singular value decomposition model is:
[0078] [U,Σ,V T ]=SVD(X L )
[0079] Among them, U (i.e., the first orthogonal matrix) and V (i.e., the second orthogonal matrix) are two orthogonal matrices after singular value decomposition, Σ is the diagonal matrix where the singular values are located, SVD(·) is the singular value decomposition function, X L is the Lth first low-frequency sub-band image block.
[0080] Extract the elements of the diagonal matrix Σ (also called diagonal matrix elements) from the singular value decomposition model, and perform vectorization operations on each extracted element to obtain the corresponding diagonal element vector:
[0081]
[0082] Among them, (σ1,σ2,…,σ r) are r singular values.
[0083] According to the diagonal element vector Construct a multiplicative embedding model, and perform high-capacity watermark embedding in the low-frequency sub-band image area based on the multiplicative embedding model to obtain the image vector Y embedded with the watermark L :
[0084] In the low-frequency sub-band image area, a relatively high capacity watermark is embedded. In this embodiment, a total of 256 image blocks are selected to embed the watermark. The size of each image block is 16×16, and the vector length of each image block is 256. Then the capacity of the embedded watermark is:
[0085] 256×256=65536 bits
[0086] The embedding process using multiplicative embedding can be expressed as:
[0087]
[0088] Wherein, λ is the watermark embedding factor, which is set to 0.03 in this embodiment, and w is the binary watermark information.
[0089] For the matrix [U,Y L ,V T ] Perform inverse singular value decomposition to obtain the low-frequency decomposition
[0090]
[0091] Repeat the above steps for each low-frequency sub-band image block of the K image blocks to obtain K low-frequency decomposition quantities. For each low frequency decomposition Perform inverse Fourier transform to obtain the low-frequency image containing the watermark
[0092] Taking the Lena image as an example, the result of embedding a watermark in the image using the blind watermark embedding method provided in this embodiment is as follows: Figure 2 As shown. The left side of the image represents the original image, and the right side represents the image after the watermark is embedded. From the results of the Lena image test, the watermark embedded by the blind watermark embedding method provided in this embodiment has a better effect.
[0093] The present application also provides a blind watermark detection method. In one embodiment, the blind watermark detection method includes: Figure 3 The steps shown are described below.
[0094] S210: Acquire a target image for detecting watermark information.
[0095] The target image may be a watermarked image produced by any of the above-mentioned blind watermark embedding method embodiments.
[0096] S220: performing block processing on the target image to obtain a second image block set, and selecting a non-key image block from the second image block set as a second candidate image block to be extracted with a watermark.
[0097] The second image block set refers to an image block set obtained by dividing the target image into blocks, and the second candidate image block refers to an image block to be watermarked selected from the second image block set.
[0098] S230: Perform Fourier transform on each selected second candidate image block to extract a watermarked second low-frequency sub-band image block from each second candidate image block, and perform multiplicative watermark extraction processing on each second low-frequency sub-band image block to obtain low-frequency watermark information.
[0099] The second low-frequency sub-band image block refers to a low-frequency sub-band image block obtained by performing Fourier transform on the second candidate image block.
[0100] S240: Detecting whether the target image contains watermark information according to the low-frequency watermark information.
[0101] This embodiment performs singular value decomposition on the image sub-blocks of the target image, so that the image sub-blocks become smoother and more continuous, making it easier to detect the watermark information, reducing the error rate of the watermark, and thus improving the detection rate of the watermark.
[0102] In one embodiment, the above-mentioned multiplicative watermark extraction processing is performed on each second low-frequency sub-band image block to obtain low-frequency watermark information, including: using a multiplicative watermark extraction model to perform multiplicative watermark extraction processing on each second low-frequency sub-band image block to obtain corresponding low-frequency watermark information.
[0103] Correspondingly, the above-mentioned detection of whether the target image contains watermark information based on the low-frequency watermark information includes: calculating the weighted correlation coefficient corresponding to the low-frequency subband based on the low-frequency watermark information of each second low-frequency sub-band image block; judging whether the weighted correlation coefficient exceeds a preset threshold; if so, determining that the target image contains watermark information; if not, determining that the target image does not contain watermark information.
[0104] Exemplarily, the implementation process of the above embodiment may be as follows:
[0105] According to the operation in the above step S120, the target image is divided into blocks to obtain an image block set, and non-critical image blocks are adaptively selected from the image block set based on the orthogonal matching pursuit algorithm as image blocks to be extracted watermarks, that is, second candidate image blocks, which can also be called watermarked image blocks.
[0106] For example, taking the Lena image as an example, the image size is 512×512, the image block size is 32×32, the total number of image blocks is 256, and the number of watermarked image blocks is 256.
[0107] Perform discrete Fourier transform on each watermarked image block to extract the low-frequency sub-band image block containing the watermark. The size of the low-frequency sub-band image block is 16×16.
[0108] Construct a multiplicative watermark extraction model, and use it to extract watermark information from the low-frequency sub-band image block containing the watermark in a multiplicative manner to obtain the low-frequency watermark information. The multiplicative watermark extraction model is:
[0109]
[0110]
[0111]
[0112] Where N is the number of watermarks embedded in the low-frequency sub-band image blocks, y j is the coefficient after embedding the jth watermark, σ y∣0 is the variance of coefficient y after embedding watermark “0”, σ y∣1 is the variance of coefficient y after embedding watermark “1”, λ is the watermark embedding factor, μ is the mean of low-frequency subband coefficient, σ 2 is the variance of coefficient y, σ n is the variance of the noise, is the watermark information extracted in the low-frequency sub-band area of the image, that is, the low-frequency watermark information, and y is the element in the diagonal element vector in the multiplicative embedding model.
[0113] The weighted correlation coefficient corresponding to the low-frequency sub-band is calculated according to the low-frequency watermark information, and it is determined whether the weighted correlation coefficient exceeds the threshold. If it exceeds the threshold, it indicates that the watermark information exists. If it does not exceed the threshold, it indicates that the watermark information does not exist. The threshold can be set according to actual needs. For example, the threshold is preferably set to 0.6. The formula of the weighted correlation coefficient is:
[0114]
[0115] Among them, ρ is the weighted correlation coefficient, N is the number of watermarks embedded in the low-frequency subband, ε is the weighting coefficient, and W L (n) is the nth original binary watermark embedded in the low frequency sub-band, is the nth binary watermark extracted in the low-frequency subband, is the watermark W corresponding to the low-frequency subband L The variance of (k).
[0116] Figure 1 , 3 FIG. 1 is a flow chart of a blind watermark embedding method in one embodiment. It should be understood that although Figure 1 , 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 , 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0117] Based on the same inventive concept, the present application also provides a blind watermark embedding device. Figure 4 As shown, the blind watermark embedding device includes the following modules:
[0118] The carrier image acquisition module 110 is used to acquire the target carrier image;
[0119] The non-key block extraction module 120 is used to perform block processing on the target carrier image to obtain a first image block set, and adaptively select non-key image blocks from the first image block set based on an orthogonal matching pursuit algorithm as first candidate image blocks to be embedded with watermarks;
[0120] The watermark embedding module 130 is used to perform Fourier transform on each selected first candidate image block to process each first candidate image block into a first low-frequency sub-band image block, and perform multiplicative watermark embedding processing on each first low-frequency sub-band image block to obtain a watermarked image.
[0121] In one embodiment, the watermark embedding module includes:
[0122] A singular value decomposition submodule, used for performing singular value decomposition on each first low-frequency subband image block to obtain a corresponding singular value decomposition result, wherein the singular value decomposition result includes a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix;
[0123] A watermark embedding submodule, used for embedding a high-capacity watermark in each first low-frequency sub-band image block according to a singular value decomposition result of each first low-frequency sub-band image block, to obtain a corresponding embedded watermark image vector;
[0124] An inverse singular value decomposition submodule is used to perform inverse singular value decomposition according to the singular value decomposition result of each first low-frequency sub-band image block and the embedded watermark image vector to obtain a corresponding low-frequency decomposition amount;
[0125] The inverse Fourier transform submodule is used to perform inverse Fourier transform on the low-frequency decomposition amount of each first low-frequency sub-band image block to obtain a watermarked image.
[0126] In one embodiment, the watermark embedding submodule is specifically used to construct a corresponding singular value decomposition model according to the singular value decomposition result of each first low-frequency sub-band image block; extract diagonal matrix elements from the singular value decomposition model of each first low-frequency sub-band image block, and construct a corresponding multiplicative embedding model according to the extracted diagonal matrix elements; according to the multiplicative embedding model of each first low-frequency sub-band image block, perform high-capacity watermark embedding in each first low-frequency sub-band image block to obtain an embedded watermark image vector of each first low-frequency sub-band image block.
[0127] In one embodiment, the inverse singular value decomposition submodule is specifically used to perform inverse singular value decomposition according to the first orthogonal matrix of each first low-frequency sub-band image block, the transposed matrix of the second orthogonal matrix, and the image vector embedded with the watermark to obtain the low-frequency decomposition amount of each first low-frequency sub-band image block.
[0128] For the specific definition of the blind watermark embedding device, please refer to the definition of the blind watermark embedding method above, which will not be repeated here. Each module in the above-mentioned blind watermark embedding device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0129] Based on the same inventive concept, the present application also provides a blind watermark detection device. Figure 5 As shown, the blind watermark detection device includes the following modules:
[0130] A target image acquisition module 210, used to acquire a target image for detecting watermark information;
[0131] The non-key block extraction module 220 is used to perform block processing on the target image to obtain a second image block set, and select a non-key image block from the second image block set as a second candidate image block for watermark extraction;
[0132] A low-frequency watermark information extraction module 230 is used to perform Fourier transform on each selected second candidate image block to extract a second low-frequency sub-band image block with a watermark from each second candidate image block, and perform multiplicative watermark extraction processing on each second low-frequency sub-band image block to obtain low-frequency watermark information;
[0133] The watermark detection module 240 is used to detect whether the target image contains watermark information according to the low-frequency watermark information.
[0134] In one embodiment, the low-frequency watermark information extraction module is specifically configured to use a multiplicative watermark extraction model to perform a multiplicative watermark extraction process on each second low-frequency sub-band image block to obtain corresponding low-frequency watermark information.
[0135] Correspondingly, the watermark detection module is specifically used to calculate the weighted correlation coefficient corresponding to the low-frequency sub-band according to the low-frequency watermark information of each second low-frequency sub-band image block; determine whether the weighted correlation coefficient exceeds a preset threshold; if so, determine that the target image contains watermark information; if not, determine that the target image does not contain watermark information.
[0136] For the specific definition of the blind watermark detection device, please refer to the definition of the blind watermark detection method above, which will not be repeated here. Each module in the above-mentioned blind watermark detection device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0137] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a blind watermark embedding method is implemented.
[0138] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0139] This embodiment also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the method provided in any of the above method embodiments are implemented.
[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in any of the above method embodiments are implemented.
[0141] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0142] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0143] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A blind watermark embedding method, characterized in that: The method comprises: Acquire a target carrier image; The target carrier image is processed into blocks to obtain a first image block set, and non-key image blocks are adaptively selected from the first image block set based on an orthogonal matching pursuit algorithm as first candidate image blocks to be embedded with a watermark; Performing Fourier transform on each selected first candidate image block to process each first candidate image block into a first low-frequency sub-band image block, and performing multiplicative watermark embedding processing on each first low-frequency sub-band image block to obtain a watermarked image; The step of performing block processing on the target carrier image to obtain a first set of image blocks, and adaptively selecting non-key image blocks from the first set of image blocks based on an orthogonal matching pursuit algorithm as first candidate image blocks to be embedded with a watermark specifically includes: First, the target carrier image is cut into image blocks of size m×m. The target carrier image is divided into n image blocks in total, and each image block is a two-dimensional array. The n image blocks are regarded as an image block set. The image blocks are converted into row vectors, and then the row vectors are composed into a matrix D: Among them, x1, x2, x n Represent the 1st, 2nd, and nth block vectors respectively; convert the target carrier image into a row vector y, and calculate y and each block vector x i The inner product of the block vector with the largest absolute value of the inner product is selected. According to the properties of the orthogonal matching pursuit algorithm, at this time x i The corresponding block is the block that is most similar to the target carrier image, that is, the non-critical image block to be selected. At this time, y is expressed as: Among them, <.,.> is the inner product calculation operation, is the block vector with the largest absolute value of the inner product with y, r0 is the vector index in the matrix D, is the vector y in Orthogonal projection in the direction, R1 is the residual; then, the same decomposition steps are performed on R1. After several iterations, y is expressed as: R0=y Among them, K is the number of non-critical image blocks in the target carrier image, which is also the number of iterations. After K iterations, K non-critical image blocks are selected; The step of performing a multiplicative watermark embedding process on each of the first low-frequency sub-band image blocks to obtain a watermarked image comprises: Performing singular value decomposition on each of the first low-frequency sub-band image blocks to obtain a corresponding singular value decomposition result, wherein the singular value decomposition result includes a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix; According to the singular value decomposition result of each of the first low-frequency sub-band image blocks, a high-capacity watermark is embedded in each of the first low-frequency sub-band image blocks to obtain a corresponding embedded watermark image vector; Perform inverse singular value decomposition according to the singular value decomposition result of each of the first low-frequency sub-band image blocks and the embedded watermark image vector to obtain a corresponding low-frequency decomposition amount; Perform inverse Fourier transform on the low-frequency decomposition amount of each of the first low-frequency sub-band image blocks to obtain a watermarked image.
2. The method according to claim 1, characterized in that The step of embedding a high-capacity watermark in each of the first low-frequency sub-band image blocks according to the singular value decomposition result of each of the first low-frequency sub-band image blocks to obtain a corresponding embedded watermark image vector comprises: Constructing a corresponding singular value decomposition model according to the singular value decomposition result of each of the first low-frequency sub-band image blocks; Extracting diagonal matrix elements from the singular value decomposition model of each of the first low-frequency sub-band image blocks, and constructing a corresponding multiplicative embedding model according to the extracted diagonal matrix elements; According to the multiplicative embedding model of each of the first low-frequency sub-band image blocks, a high-capacity watermark is embedded in each of the first low-frequency sub-band image blocks to obtain an embedded watermark image vector of each of the first low-frequency sub-band image blocks.
3. The method according to claim 1, characterized in that The step of performing inverse singular value decomposition according to the singular value decomposition result of each of the first low-frequency sub-band image blocks and the embedded watermark image vector to obtain a corresponding low-frequency decomposition amount includes: Inverse singular value decomposition is performed according to the first orthogonal matrix of each first low-frequency sub-band image block, the transposed matrix of the second orthogonal matrix, and the image vector embedded with the watermark to obtain the low-frequency decomposition amount of each first low-frequency sub-band image block.
4. A blind watermark detection method, characterized in that: The method comprises: Obtain a target image for detecting watermark information; Performing block processing on the target image to obtain a second image block set, and selecting a non-key image block from the second image block set as a second candidate image block to be extracted from the watermark; Performing Fourier transform on each selected second candidate image block to extract a second low-frequency sub-band image block with a watermark from each second candidate image block, and performing multiplicative watermark extraction processing on each second low-frequency sub-band image block to obtain low-frequency watermark information; Detecting whether the target image contains watermark information according to the low-frequency watermark information; The performing multiplicative watermark extraction processing on each of the second low-frequency sub-band image blocks to obtain low-frequency watermark information includes: Perform multiplicative watermark extraction processing on each of the second low-frequency sub-band image blocks using a multiplicative watermark extraction model to obtain corresponding low-frequency watermark information; The detecting whether the target image contains watermark information according to the low-frequency watermark information comprises: Calculating a weighted correlation coefficient corresponding to a low-frequency sub-band according to the low-frequency watermark information of each of the second low-frequency sub-band image blocks; Determining whether the weighted correlation coefficient exceeds a preset threshold; If yes, it is determined that the target image contains watermark information; If not, it is determined that the target image does not contain watermark information.
5. A blind watermark embedding device, characterized in that: The device comprises: A carrier image acquisition module, used to acquire a target carrier image; A non-key block extraction module is used to perform block processing on the target carrier image to obtain a first image block set, and adaptively select non-key image blocks from the first image block set based on an orthogonal matching pursuit algorithm as first candidate image blocks to be embedded with a watermark; a watermark embedding module, configured to perform Fourier transform on each of the selected first candidate image blocks to process each of the first candidate image blocks into a first low-frequency sub-band image block, and perform multiplicative watermark embedding processing on each of the first low-frequency sub-band image blocks to obtain a watermarked image; The step of performing block processing on the target carrier image to obtain a first set of image blocks, and adaptively selecting non-key image blocks from the first set of image blocks based on an orthogonal matching pursuit algorithm as first candidate image blocks to be embedded with a watermark specifically includes: First, the target carrier image is cut into image blocks of size m×m. The target carrier image is divided into n image blocks in total, and each image block is a two-dimensional array. The n image blocks are regarded as an image block set. The image blocks are converted into row vectors, and then the row vectors are composed into a matrix D: Among them, x1, x2, x n Represent the 1st, 2nd, and nth block vectors respectively; convert the target carrier image into a row vector y, and calculate y and each block vector x i The inner product of the block vector with the largest absolute value of the inner product is selected. According to the properties of the orthogonal matching pursuit algorithm, at this time x i The corresponding block is the block that is most similar to the target carrier image, that is, the non-critical image block to be selected. At this time, y is expressed as: Among them, <.,.> is the inner product calculation operation, is the block vector with the largest absolute value of the inner product with y, r0 is the vector index in the matrix D, is the vector y in Orthogonal projection in the direction, R1 is the residual; then, the same decomposition steps are performed on R1. After several iterations, y is expressed as: R0=y Among them, K is the number of non-critical image blocks in the target carrier image, which is also the number of iterations. After K iterations, K non-critical image blocks are selected; The step of performing a multiplicative watermark embedding process on each of the first low-frequency sub-band image blocks to obtain a watermarked image comprises: Performing singular value decomposition on each of the first low-frequency sub-band image blocks to obtain a corresponding singular value decomposition result, wherein the singular value decomposition result includes a first orthogonal matrix, a second orthogonal matrix and a diagonal matrix; According to the singular value decomposition result of each of the first low-frequency sub-band image blocks, a high-capacity watermark is embedded in each of the first low-frequency sub-band image blocks to obtain a corresponding embedded watermark image vector; Perform inverse singular value decomposition according to the singular value decomposition result of each of the first low-frequency sub-band image blocks and the embedded watermark image vector to obtain a corresponding low-frequency decomposition amount; Perform inverse Fourier transform on the low-frequency decomposition amount of each of the first low-frequency sub-band image blocks to obtain a watermarked image.
6. A blind watermark detection device, characterized in that: The device comprises: A target image acquisition module is used to acquire a target image for detecting watermark information; A non-key block extraction module, used for performing block processing on the target image to obtain a second image block set, and selecting a non-key image block from the second image block set as a second candidate image block for watermark extraction; a low-frequency watermark information extraction module, configured to perform Fourier transform on each selected second candidate image block to extract a second low-frequency sub-band image block with a watermark from each second candidate image block, and perform multiplicative watermark extraction processing on each second low-frequency sub-band image block to obtain low-frequency watermark information; A watermark detection module, used to detect whether the target image contains watermark information according to the low-frequency watermark information; The performing multiplicative watermark extraction processing on each of the second low-frequency sub-band image blocks to obtain low-frequency watermark information includes: Perform multiplicative watermark extraction processing on each of the second low-frequency sub-band image blocks using a multiplicative watermark extraction model to obtain corresponding low-frequency watermark information; The detecting whether the target image contains watermark information according to the low-frequency watermark information comprises: Calculating a weighted correlation coefficient corresponding to a low-frequency sub-band according to the low-frequency watermark information of each of the second low-frequency sub-band image blocks; Determining whether the weighted correlation coefficient exceeds a preset threshold; If yes, it is determined that the target image contains watermark information; If not, it is determined that the target image does not contain watermark information.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method and device for acquiring direction fields of overlapped fingerprints
CN103500334A
An image copyright hidden digital watermark embedding method and device
CN109685710A