Calculation photographic image watermark processing method based on quaternion attention model

Through the method based on the quaternary attention model, local and global attention maps are constructed, combined with the attention estimation model guided by the quaternary wavelet domain feature, the balance problem between robustness and invisibility in the watermark processing of photographic images is solved, and efficient and safe watermark embedding and extraction are achieved.

CN120387922APending Publication Date: 2025-07-29CHONGQING NORMAL UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510474413.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

The existing computational photography image watermark processing methods are difficult to achieve a good balance between invisibility, robustness and computing efficiency, and cannot meet the strict demands of image watermark processing in the field of computational photography.

Method used

Using a method based on the quaternary attention model, a multi-channel color multi-scale feature map is obtained through quaternary discrete wavelet transformation, a local and global attention map is constructed, and an attention estimation model guided by the quaternary wavelet domain feature is performed to adaptive quantization and embed watermarks, and the perceived contrast masking is used to improve the robustness of the watermark.

Benefits of technology

It realizes efficient embedding and extraction of watermarks for computational photographic images, improves the security and robustness of the image, and can accurately extract watermarks under multiple attacks, maintaining the visual quality of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387922A_ABST
    Figure CN120387922A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image watermark processing, and particularly provides a computational photographic image watermark processing method based on a quaternion attention model. The method comprises the following steps: acquiring a multi-channel color multi-scale feature map of an original image; constructing a local attention map, and calculating global distribution of the local attention map to obtain a global attention map; multiplying the index value of the local attention map by the global attention map to obtain a final attention map; an established attention estimation model guided by quaternion wavelet domain features is incorporated into a robust perception calculation photographic image watermark embedding frame, adaptive quantization is adopted to determine the step length, a quantized candidate quaternion wavelet coefficient is adopted to embed a specific sub-band to embed a watermark, an image after watermark embedding is obtained through inverse QDWT transformation, and the image is subjected to robust perception calculation. According to the method, the watermark processing of the calculated photographic image is realized, and the safety of the calculated photographic image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image watermark processing, and particularly to a computational photography image watermark processing method based on a quaternion attention model. Background Technique

[0002] In the current era of high-speed digital information circulation, computational photography images, with their unique generation methods and rich data connotations, have become a key part of the visual information field. Computational photography combines traditional optical imaging and digital signal processing technologies, and can generate images with characteristics such as high dynamic range, multi-spectral information, and super-resolution, and is widely used in many fields such as scientific research, artistic creation, and commerce. However, once computational photography images are uploaded or stored in the cloud, the image data is vulnerable to unauthorized access, which causes copyright and security issues. Therefore, the copyright protection and integrity authentication of such images are of great significance for protecting the rights and interests of creators and maintaining information accuracy.

[0003] Traditional digital information security methods, such as hiding information and encryption, rely on coding techniques to transmit ciphertext. However, these methods are computationally intensive, making them vulnerable to interception and decryption. Therefore, digital watermarking has become a more practical solution. Due to the characteristics of computational photography images such as multi-layer information fusion, high dynamic range, and strong dependence on post-processing, it is difficult for early watermarking methods to effectively embed and extract watermark signals. Considering these characteristics, it is crucial to optimize the computational photography image watermarking scheme from the perspective of the human visual system.

[0004] In practical applications, the application range of color images is much larger than that of grayscale images. Therefore, most computational photography images tend to be color images. Traditional digital watermarking methods use the RGB color channels and embed watermarks into these components. Quaternions provide a novel method by representing images by encoding the three color channels as the imaginary part of a quaternion. By utilizing the correlation between color channels, the watermark is extended to two or three channels. Compared with traditional color image processing, this enhances the robustness of the watermark. In recent years, quaternion wavelet transform has shown great application potential in image denoising, face recognition, etc. Color image watermarking algorithms based on quaternion frequency domain transform have been proposed and continuously improved.

[0005] Computational photography images possess characteristics such as high resolution, rich details, complex colors, and multi-modal data fusion, which pose stringent requirements on watermark processing methods. On the one hand, it is necessary to ensure that the watermark is perfectly hidden in the image without affecting its artistic value and professional applications. On the other hand, the watermark needs to maintain sufficient robustness under various complex image processing and malicious attacks to accurately extract and prove the copyright ownership of the image. Existing watermark processing methods are difficult to achieve a good balance among invisibility, robustness, and computational efficiency, and cannot fully meet the strict requirements for image watermark processing in the field of computational photography. Summary of the Invention

[0006] In view of this, the present invention provides a computational photography image watermark processing method based on a quaternion attention model to achieve watermark processing of computational photography images and improve the security of computational photography images.

[0007] In a first aspect, the present invention provides a computational photography image watermark processing method based on a quaternion attention model, and the method includes:

[0008] Step 1: Obtain multi-scale features of the original image, process the original image through quaternion discrete wavelet transform (QDWT) to obtain a multi-channel color multi-scale feature map of the original image;

[0009] Step 2: Construct a local attention map by the maximum value among the channels of the feature map of each decomposition layer, and calculate the global distribution of the local attention map to obtain a global attention map;

[0010] Step 3: Multiply the exponential value of the local attention map by the global attention map to obtain a final attention map; use the final attention map to allocate and adjust the just noticeable difference (JND) threshold;

[0011] Step 4: Combine the characteristics of each channel and sub-band in the quaternion wavelet domain to establish a quaternion wavelet domain feature-guided attention estimation model, modulate the visual masking of the embedded sub-band to obtain a perceptual contrast masking;

[0012] Step 5: Incorporate the quaternion wavelet domain feature-guided attention estimation model into a robust perceptual computational photography image watermark embedding framework, adopt adaptive quantization to determine the step size, quantize the candidate quaternion wavelet coefficients to embed a specific sub-band to embed the watermark, make an adaptive selection according to visual estimation, and obtain the image after watermark embedding through inverse QDWT transform.

[0013] Optionally, the feature map in Step 1 is generated based on multi-scale and multi-direction decomposition levels and calculated through IQDWT; the feature map generated by the horizontal decomposition of each image sub-band, H σ , V σ , D σFor the horizontal, vertical, and diagonal wavelet coefficients under a given bichannel decomposition, where δ is the scaling factor, the feature map is calculated as follows: σ takes values of 1, 2, and 4; four-level decomposition is performed on the channels to obtain 9 multi-directional luminance and multi-scale feature maps; the feature maps obtained from different decompositions are subjected to feature fusion to respectively obtain and they are added together to obtain the multi-directional luminance multi-scale feature map F Q (x, y), and its formula is:

[0014] For color images, a color channel Q is defined for each layer sub-band of the color channels BG , Q BR , Q GR , when three color channels are selected, each channel has four decomposition levels to construct feature maps, and the feature maps are reconstructed through inverse wavelet transform; the feature maps generated at the σ decomposition level of the three color channels are: and Its formula is:

[0015]

[0016] The obtained feature maps are added together to obtain the multi-channel color multi-scale feature map F C (x, y), and its formula is:

[0017] Optionally, in step 2, a local attention map s L (x, y) is constructed by taking the maximum value among the channels of the feature maps of each decomposition layer, and a max-pooling operation is adopted, and the formula is:

[0018] s L (x, y) = MP 8×8 [arg maxF C (x, y), F Q (x, y))];

[0019] By calculating the probability density function of the joint vector normal distribution, important information that cannot be detected by the local attention map is provided, and the calculation is as follows:

[0020]

[0021] Among them, is the feature vector of n feature maps, is the average vector containing the average value of each feature mapping coefficient; |Σ| is the determinant of the covariance matrix, and Σ -1 is the pseudo-inverse matrix of Σ, and the value of n is 18;

[0022] Calculate the global distribution of the local attention map to obtain the global attention map s G (x, y), and an average pooling operation is adopted, and its formula is:

[0023]

[0024] Optionally, in step 3, the jointly generated attention map is obtained by combining the global attention map and the local attention map using an equation, and its formula is: Among them, represents the normalization process;

[0025] The formula for the final attention map is:

[0026] s final (x, y) = s mix (x′, y′)(1 - D foc (x, y));

[0027] Among them, D foc (x, y) is the distance between the coordinate (x, y) and its nearest focus (x′, y′) at this position.

[0028] Optionally, in step 4, a quaternion wavelet domain feature-guided attention estimation model is established to modulate the visual masking of the embedded subbands to obtain the perceptual contrast masking, and its formula is:

[0029] QAJnd(t, x, y) = S[[ID=3 (duplicated)]] Qbase ·L Qla ·C Qcm ·C Qcl ·J S ;

[0030] Among them, QAJnd is the estimation of the embedded subband vision, the parameter t is the index of the specific subband embedded, S Qbase is the attention adjustment CSF threshold, L Qla is the luminance masking factor, C Qcm is the contrast masking function, C Qcl is the color masking effect.

[0031] Optionally, step 5 includes: transforming the original carrier vector X to the logarithmic domain to obtain the carrier signal X′, and its formula is: Among them, E max and E med are respectively the maximum value and the median value in the texture masking, v is a random vector, and ε is the key parameter of the logarithmic transformation; by projecting the original carrier vector X and QAJnd onto the random vector v, the adaptive quantization step size Δ is calculated, and its formula is: Then, a quantization index modulation (QIM) operation is performed on the carrier signal X' obtained through logarithmic transformation to obtain a signal X' containing watermark information. w , and its formula is: where w is the watermark information, and d m represents a dither signal corresponding to the watermark information.

[0032] In a second aspect, an embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute the computational photography image watermark processing method based on the quaternion attention model in the first aspect or any possible implementation manner of the first aspect.

[0033] In a third aspect, an embodiment of the present invention provides an electronic device, including: one or more processors; a memory; and one or more computer programs. The one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the device, the device is caused to execute the computational photography image watermark processing method based on the quaternion attention model in the first aspect or any possible implementation manner of the first aspect.

[0034] In the technical solution provided by the present invention, the method includes obtaining multi-scale features of an original image, processing the original image through quaternion discrete wavelet transform (QDWT) to obtain a multi-channel color multi-scale feature map of the original image; constructing a local attention map by taking the maximum value between channels of the feature map of each decomposition layer, and calculating the global distribution of the local attention map to obtain a global attention map; multiplying the exponential value of the local attention map by the global attention map to obtain a final attention map; using the final attention map to allocate and adjust the just noticeable difference (JND) threshold; combining the characteristics of each channel and sub-band in the quaternion wavelet domain, establishing a quaternion wavelet domain feature-guided attention estimation model to modulate the visual masking of the embedded sub-band to obtain a perceptual contrast masking; incorporating the quaternion wavelet domain feature-guided attention estimation model into a robust perceptual computational photography image watermark embedding framework, determining the step size by adaptive quantization, and embedding the watermark by quantizing the candidate quaternion wavelet coefficients to embed a specific sub-band, and making an adaptive selection according to visual estimation. The watermark-embedded image is obtained through inverse QDWT transformation. This method realizes the watermark processing of computational photography images and improves the security of computational photography images. Description of the Drawings

[0035] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0036] Figure 1 Flowchart of the computational photography image watermark processing method based on the quaternion attention model provided by the embodiment of the present invention;

[0037] Figure 2 Schematic diagram of generating the final attention map provided by the embodiment of the present invention;

[0038] Figure 3 Schematic diagram of multi-directional brightness processing of multi-scale feature maps provided by the embodiment of the present invention;

[0039] Figure 4 Schematic diagram of multi-channel color processing of multi-scale feature maps provided by the embodiment of the present invention;

[0040] Figure 5 Schematic diagram of jointly generating the final attention map provided by the embodiment of the present invention; wherein, Figure 5 (A) Schematic diagram of average pooling; Figure 5 (B) Schematic diagram of max pooling;

[0041] Figure 6 Schematic diagram of the watermark embedding process provided by the embodiment of the present invention;

[0042] Figure 7 Schematic diagram of the watermark detection process provided by the embodiment of the present invention;

[0043] Figure 8 Statistical chart of different watermark embedding QSSIM provided by the embodiment of the present invention;

[0044] Figure 9 Visual quality and BER result graph of watermark embedding without attack provided by the embodiment of the present invention;

[0045] Figure 10 Schematic diagram of an electronic device provided by the embodiment of the present invention. Detailed implementation manners

[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0047] It should be clear that the described embodiments are only some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0048] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the", and "said" used in the embodiments of the present invention are also intended to include the plural forms unless the context clearly indicates otherwise.

[0049] It should be understood that the term " / and" used herein is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, a and / or b may represent: a exists alone, a and b exist simultaneously, and b exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.

[0050] Depending on the context, the word "if" as used herein may be interpreted as "when", "while", "in response to determining", or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detecting (stated condition or event)" may be interpreted as "when determined", "in response to determining", "when detecting (stated condition or event)", or "in response to detecting (stated condition or event)".

[0051] Figure 1 For the flowchart of the computational photography image watermarking processing method based on the quaternion attention model provided by the embodiments of the present invention, as Figure 1 shown, the method includes:

[0052] Step 1: Obtain the multi-scale features of the original image, process the original image through the quaternion discrete wavelet transform QDWT, and obtain the multi-channel color multi-scale feature map of the original image;

[0053] In the embodiments of the present invention, as Figure 2As shown, by applying the discrete wavelet transform in the quaternion domain, a feature map is generated that effectively captures the complex details in the multi-channel image, and this feature map is subsequently incorporated into the attention model. The local attention map is constructed by taking the maximum value among the channels of the feature map in each decomposition layer. Additionally, to adjust the local contrast in each region of the image, a global attention map is constructed based on the probabilities of these features. As a result, the final attention map not only captures the local contrast at each point within the scene but also reflects the global feature distribution, acting as a local attention amplifier. Using wavelet coefficients to represent image details at different scales enables the creation of multiple feature maps as the frequency bandwidth increases.

[0054] In step 1, the feature map is generated based on the multi-scale and multi-direction decomposition hierarchy through IQDWT calculation; for the feature map generated by the horizontal decomposition of each image sub-band, H σ , V σ , D σ For the horizontal, vertical, and diagonal wavelet coefficients under a given two-channel decomposition, and σ is the scaling factor, the feature map is calculated as: σ takes values of 1, 2, 4;

[0055] First, as Figure 3 shown, a first-level decomposition is performed on the channels. For channel Q1, only the sub-bands are retained, and the feature maps in the H, V, and D directions generated through IQDWT are For the second-level decomposition of the channels, the sub-bands are retained, and the feature maps are generated using the same process as the first-level decomposition, which are For the third-level decomposition of the channels, the sub-bands of the third-level decomposition are specific embedded sub-bands. Retaining these sub-bands may affect the stability and robustness after watermark embedding. To solve this problem, a zeroing operation needs to be performed; for the fourth-level decomposition of the channels, the fourth-level decomposition is to downsample the third-level channel Q3 of the low-frequency sub-band , and new sub-bands are generated at the fourth level. The feature maps are generated using the same process as the first-level decomposition, which are After performing four-level decomposition on the channels, 9 multi-directional luminance and multi-scale feature maps are obtained; the feature maps obtained from different decompositions are feature-fused to respectively obtain and they are added together to obtain the multi-directional luminance multi-scale feature map F Q (x, y), and its formula is:

[0056] Secondly, asFigure 4 As shown, for a color image, color channel Q is defined for each layer sub-band of the color channel BG , Q BR , Q GR , color channel Q BG Under the four-level decomposition in the horizontal, vertical, and diagonal directions, sub-bands are obtained respectively Color channel Q BR Under the four-level decomposition in the horizontal, vertical, and diagonal directions, sub-bands are obtained respectively Color channel Q GR Under the four-level decomposition in the horizontal, vertical, and diagonal directions, sub-bands are obtained respectively When three color channels are selected, each channel has a four-level decomposition hierarchy to construct a feature map, which is processed by removing the low-frequency sub-band at the current decomposition level, and the sub-bands of the three color channels are retained (Q B- ) σ , (Q BR ) σ , (Q GR ) σ . Through the inverse wavelet transform to reconstruct the feature map, the feature maps obtained from color channel Q BG , Q BR , Q GR are respectively The feature maps of the three color channels are respectively subjected to feature fusion to obtain a feature map The feature maps generated at the σ decomposition level of the three color channels are: and Its formula is: σ takes 1, 2, 3; the obtained feature maps are added together to obtain a multi-channel color multi-scale feature map F C (x, y), and its formula is:

[0057] In the embodiments of the present invention, the multi-channel color multi-scale feature map not only contains multi-directional brightness information but also covers multi-channel color information.

[0058] Step 2: Construct a local attention map through the maximum value between channels of the feature map of each decomposition layer, and calculate the global distribution of the local attention map to obtain a global attention map;

[0059] In the embodiments of the present invention, in step 2, by calculating the probability density function of the joint vector normal distribution, important information that cannot be detected by the local attention map is provided, and the calculation is as follows:

[0060]

[0061] Wherein, is the eigenvector of n feature maps, is the average vector containing the average value of each feature mapping coefficient; |Σ| is the determinant of the covariance matrix, Σ -1 is the pseudo-inverse matrix of Σ, and the value of n is 18;

[0062] Although it is calculated based on local features, it has a greater impact on the global distribution in the saliency map and may dominate due to the content or structure of the scene. As Figure 5 (A) shows, in order to reduce the size of the global attention map while retaining the information related to the background from the feature maps, an average pooling operation is performed. Since the merging kernel size is 8×8 and the stride is 8, the size of the global attention map is reduced to 1 / 8 of the original image size. The formula for the global attention map is The local feature map is constructed by considering the maximum value among the channels of the feature maps of each decomposition layer, using the formula s L (x,y) = MP 8×8 [arg maxF C (x,y), F Q (x,y))]. As Figure 5 (B) shows, in order to make the size of the local attention map consistent with the size of the embedded subband and retain the main information of the feature map, therefore, the maximum pooling operation MP 8×8 [·] is performed.

[0063] Step 3: Multiply the exponential value of the local attention map by the global attention map to obtain the final attention map; use the final attention map to allocate and adjust the just noticeable difference JND threshold;

[0064] In the embodiment of the present invention, the jointly generated attention map is obtained by combining the global attention map and the local attention map using an equation, and its formula is: Where represents the normalization process; the formula for the final attention map is: s final (x,y) = s mix (x′,y′)(1 - D foc (x,y)); where D foc (x,y) is the distance between the coordinate (x,y) and its nearest focus (x′,y′) at this position.

[0065] Step 4: Combine the characteristics of each channel and subband in the quaternion wavelet domain, establish an attention estimation model guided by the quaternion wavelet domain features, modulate the visual masking of the embedded subband, and obtain the perceptual contrast masking;

[0066] In the embodiments of the present invention, the features of each channel and the features in the subbands are integrated in four wavelet domains to establish a quaternion wavelet domain feature-guided attention estimation JND model, namely QAJnd, to adjust the visual mask of the embedded subbands according to the existing algorithms. The formula is: QAJnd(t, x, y) = S Qbase ·L Qla ·C Qcm ·C Qcl ·J S , where QAJnd is the estimation of the visual of the embedded subband, the parameter t is the index of the specific embedded subband, and S Qbase is the attention adjustment CSF threshold, L Qla is the luminance masking factor, C Qcm is the contrast masking function, C Qcl is the color masking effect.

[0067] Step 5: Incorporate the quaternion wavelet domain feature-guided attention estimation model into the robust perceptual MPI computational photography image watermark embedding framework. Use adaptive quantization to determine the step size, and the candidate quaternion wavelet coefficients for quantization are used to embed a specific subband to embed the watermark. Make an adaptive selection according to the visual estimation, and obtain the image after watermark embedding through the inverse QDWT transform.

[0068] In the embodiments of the present invention, the inverse QDWT transform of the color image results in a pure quaternion matrix with f0 = 0. Therefore, the real partial component is obtained according to the formula:

[0069] f0(x, y) = αIDWT(Q BG ) + βIDWT(Q BR ) + γIDWT(Q GR );

[0070] where α, β, and γ are weighting coefficients. Since the high-frequency subbands contain rich image texture and edge information, embedding the watermark into the middle-frequency subbands has strong concealment and robustness. After applying the three-layer QDWT transform, the energy of the image is mainly concentrated in the third layer. Therefore, select the high-frequency subbands and for embedding.

[0071] First, transform the original carrier vector X to the logarithmic domain through the formula to obtain the carrier signal X′. The formula is: where E max and E med are the maximum and median values in the texture masking respectively, v is a random vector, and ε is the key parameter for logarithmic conversion; calculate the adaptive quantization step size Δ by projecting the original carrier vector X and QAJnd onto the random vector v. The formula is: Then, a quantization index modulation (QIM) operation is performed on the carrier signal X′ obtained through logarithmic transformation to obtain a signal X′ containing watermark information. w , and its formula is: where w is the watermark information, and d m represents the dither signal corresponding to the watermark information. When the image is scaled by a fixed gain, the coefficient will be watermark - marked, and the adaptive quantization step Δ can ensure stability.

[0072] Secondly, the watermark embedding is designed according to the attention estimation model guided by the quaternion wavelet domain features, as Figure 6 shown, which shows the watermark embedding process. For the original color image, appropriate unit pure quaternion parameters are selected for three - layer QDWT transformation. Select Q, Q BG , Q BR and Q GR as the channels to be processed, and mark different sub - bands; calculate the spatial CSF effect according to the sub - band position distribution of the Q channel, calculate the luminance masking and contrast masking based on the Q A part, and obtain the sub - band coefficients and Q A . Construct the color masking coefficient BG , Q BR and Q GR in the Q color channels, and then obtain the final attention map. Select the same - position coefficients embedded in three specific sub - bands to form the original carrier vector, project the original carrier vector X and QAJnd onto the random vector v to calculate the adaptive quantization step and the modulation vector. Embed the watermark information 1011001101 in the modulation vector, convert the modulation vector into watermark information, and obtain the image after watermark embedding through the inverse QDWT transformation.

[0073] The watermark detection step is the inverse process of the embedding algorithm, as Figure 7 shown. The watermark detection process mainly involves, for the color image after watermark embedding, selecting appropriate pure quaternion parameters for QDWT transformation; then, selecting Q′, Q′ BG , Q′ BR and Q′ GR as the channels to be processed, and marking different sub - bands. Use the same attention modulation method as in watermark embedding to calculate the final perceptual masking effect of the specific sub - bands where the watermark is embedded. Perform a logarithmic transformation on the carrier vector at the same position during the watermark embedding process, project the visual redundancy vector corresponding to the position onto the direction vector used during the watermark embedding process to obtain a new detection vector. Detect the watermark by the minimum - distance detector, and its formula is: Reconstruct the obtained watermark position sequence to obtain the restored watermark image.

[0074] The experimental results of the present invention are as follows:

[0075] 1. Performance metrics: The quaternion structural similarity (QSSIM) is used to measure the structural fidelity and color consistency of the watermarked image. The visual saliency induction index (VSI) is used to measure the image quality. The bit error rate (BER) is calculated to evaluate the robustness of the algorithm.

[0076] In the embodiments of the present invention, as Figure 8 shown, the present invention is compared with the quaternion discrete Fourier transform (QDFT), quaternion singular value decomposition (QSVD), discrete cosine transform (DCT), Schur decomposition, and discrete wavelet transform (DWT) methods. The experimental results show that at the same peak signal-to-noise ratio (PSNR) of 42 dB, the average QSSIM value of the present invention is 0.9881, which is higher than that of other methods. This indicates that the method of the present invention is more effective in maintaining the visual quality of the watermarked image.

[0077] In the embodiments of the present invention, as Figure 9 shown, the VSI value obtained by the method of the present invention is closer to 1, which means that the image containing the watermark has higher visual quality. It can be seen both visually and from the bit error rate data that the watermark method proposed by the present invention can extract the complete watermark information without being attacked.

[0078] 2. Robustness test:

[0079] Attention ablation experiment: Table 1 shows the BER comparison of various filters with and without attention modulation, and Table 2 shows the BER comparison under various noise conditions with and without attention modulation; as shown in Table 1 and Table 2, the BER of the four-color image under attack is compared for QJnd and QAJnd at a fixed PSNR = 42 dB. It is worth noting that when facing median filtering attack, the average bit error rate is less than 1.1%, which means that the anti-filtering attack performance has been greatly improved. When facing other attacks, although the performance of individual images is not the best, the difference is very small, and generally the bit error rate is also reduced, improving the robustness of the algorithm. The introduction of attention map modulation has a good improvement effect on the algorithm performance.

[0080] Table 1 BER comparison of various filters with and without attention modulation

[0081]

[0082] 3. Statistical analysis of bit error rate:

[0083] Table 3 shows the statistical calculations of QJnd and QAJnd. As shown in Table 3, the performance of the method of the present invention under six types of attacks (Gaussian filter 3×3, median filter 3×3, JPEG compression 40, Gaussian noise 0.0003, pepper noise 0.0004, and amplitude attack 1.2) is given. In the filtering attacks, the average bit error rate of QAJnd is significantly lower than that of QJnd. Especially under the Gaussian filter (3×3) attack, the average bit error rate of QJnd is 0.0078, while the average bit error rate of QAJnd is 0.0054. The differences in bit error rates for other attacks are relatively small. In addition, the standard deviation and standard error of QJnd are almost twice those of QAJnd. Generally speaking, in most cases, QAJnd performs better than QJnd, showing better robustness and consistency.

[0084] Table 3 Statistical calculations of QJnd and QAJnd

[0085]

[0086] The present invention obtains a feature map and undergoes QDWT to explore a multi-channel color multi-scale feature map; the multi-channel color multi-scale feature map has multi-directional brightness and multi-channel colors, creates local and global attention maps, and fuses them to form a final attention map; establishes a quaternion wavelet domain feature-guided attention estimation model to modulate the visual masking of the embedded subbands; based on the masking effects of the two attentions, proposes a quaternion attention-guided JND model for a robust computational photography image watermarking framework. The present invention uses a watermarking marking model based on quaternion attention to perform watermarking on computational photography images, significantly improving the robustness against JPEG compression attacks and reducing the bit error rate by 12%. In addition, the model performs well in resisting other attacks (such as attacks in online social networks), and the bit error rate is lower than that of the prior art.

[0087] Compared with the prior art, the present invention has the following technical effects:

[0088] 1. The new visual attention calculation model proposed by the present invention can realize obtaining the attention map of an image based on quaternion discrete wavelet coefficients; 2. The visual attention mechanism of the new perceptual JND model from the quaternion perspective proposed by the present invention can measure the visual characteristics of the clear and blurred parts of computational photography images through attention estimation and visual masking effects; 3. The robust perceptual computational photography image watermark embedding framework proposed by the present invention incorporates the quaternion wavelet domain feature-guided attention estimation JND model into the framework, and the proposed watermarking method can extract complete watermark information without being attacked. The method of the present invention utilizes the selective attention of the brain to different regions of an image, combining attention estimation with visual masking in the quaternion wavelet domain.

[0089] In the technical solution provided by the present invention, the method includes obtaining multi-scale features of the original image, processing the original image through the quaternion discrete wavelet transform (QDWT) to obtain a multi-channel color multi-scale feature map of the original image; constructing a local attention map by taking the maximum value among the channels of the feature map of each decomposition layer, and calculating the global distribution of the local attention map to obtain a global attention map; multiplying the exponential value of the local attention map by the global attention map to obtain a final attention map; using the final attention map to allocate and adjust the just noticeable difference (JND) threshold; combining the characteristics of each channel and sub-band in the quaternion wavelet domain, establishing a quaternion wavelet domain feature-guided attention estimation model to modulate the visual masking of the embedded sub-band to obtain a perceptual contrast masking; incorporating the quaternion wavelet domain feature-guided attention estimation model into a robust perceptual computational photography image watermark embedding framework, determining the step size by adaptive quantization, and quantizing the candidate quaternion wavelet coefficients to embed a specific sub-band to embed the watermark, making an adaptive selection according to the visual estimation, and obtaining the watermarked image through the inverse QDWT transform. This method realizes the watermark processing of computational photography images and improves the security of computational photography images.

[0090] Each step of the embodiments of the present invention can be executed by an electronic device. Among them, the electronic device includes, but is not limited to, mobile phones, tablet computers, portable PCs, desktop computers, etc.

[0091] The embodiments of the present invention provide a computer-readable storage medium. The computer-readable storage medium includes a stored program. Among them, when the program runs, it controls the electronic device where the computer-readable storage medium is located to execute the embodiments of the above-mentioned computational photography image watermark processing method based on the quaternion attention model.

[0092] Figure 10 It is a schematic diagram of an electronic device provided by the embodiments of the present invention. As Figure 10 shown, the electronic device 21 includes: a processor 211, a memory 212, and a computer program 213 stored in the memory 212 and executable on the processor 211. When the computer program 213 is executed by the processor 211, it implements the computational photography image watermark processing method based on the quaternion attention model in the embodiments. To avoid repetition, it will not be elaborated here one by one.

[0093] The electronic device 21 includes, but is not limited to, a processor 211 and a memory 212. Those skilled in the art can understand that Figure 10 it is only an example of the electronic device 21 and does not constitute a limitation on the electronic device 21. It may include more or fewer components than those shown in the figure, or combine some components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0094] The so-called processor 211 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0095] The memory 212 may be an internal storage unit of the electronic device 21, such as the hard disk or memory of the electronic device 21. The memory 212 may also be an external storage device of the electronic device 21, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 21. Further, the memory 212 may also include both an internal storage unit and an external storage device of the electronic device 21. The memory 212 is used to store computer programs and other programs and data required by the network device. The memory 212 may also be used to temporarily store data that has been output or is to be output.

[0096] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above may refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0097] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A computational photography image watermarking method based on a quaternion attention model, characterized in that: The method includes: Step 1: Obtain the multi-scale features of the original image. Process the original image through the quaternion discrete wavelet transform (QDWT) to obtain the multi-channel color multi-scale feature map of the original image. Step 2: Construct a local attention map by taking the maximum value among the channels of the feature map at each decomposition layer, and calculate the global distribution of the local attention map to obtain the global attention map. Step 3: Multiply the exponential value of the local attention map by the global attention map to obtain the final attention map; use the final attention map to allocate and adjust the just noticeable difference (JND) threshold. Step 4: Combine the characteristics of each channel and sub-band in the quaternion wavelet domain to establish a quaternion wavelet domain feature-guided attention estimation model, modulate the visual masking of the embedded sub-band, and obtain the perceptual contrast masking. Step 5: Incorporate the quaternion wavelet domain feature-guided attention estimation model into the robust perceptual computational photography image watermark embedding framework. Determine the step size by adaptive quantization, and quantize the candidate quaternion wavelet coefficients to embed a specific sub-band to embed the watermark. Make an adaptive selection according to the visual estimation, and obtain the image after watermark embedding through the inverse QDWT transform.

2. The method according to claim 1, characterized in that In step 1, the feature map is generated based on multi-scale and multi-direction decomposition levels and calculated through IQDWT; the feature map generated by horizontal decomposition of each image sub-band, H σ , V σ , D σ are the horizontal, vertical, and diagonal wavelet coefficients under a given two-channel decomposition, and δ is the scaling factor. Then the feature map is calculated as: where σ takes 1, 2, 4; four-level decomposition is performed on the channels to obtain 9 multi-direction luminance and multi-scale feature maps; the feature maps obtained from different decompositions are subjected to feature fusion to respectively obtain and they are added together to obtain the multi-direction luminance multi-scale feature map F Q (x, y), and its formula is: For a color image, color channel Q is defined for each layer subband of the color channels BG ,Q BR ,Q GR , when three color channels are selected, each channel has four decomposition levels to construct a feature map, and the feature map is reconstructed by inverse wavelet transform; the feature maps generated at the σ decomposition level of the three color channels are: and Nine multi-channel color multi-scale feature maps are obtained, and the formula is: The obtained feature maps are added together to obtain a multi-scale feature map F with multi-channel colors. C (x,y), the formula is:

3. The method according to claim 1, wherein In step 2, the local attention map s is constructed by the maximum value between the channels of the feature map of each decomposition layer L (x,y), using the maximum pooling operation, the formula is: s L (x, y) = MP 8×8 [arg max F C (x, y), F Q (x, y))]; By calculating the probability density function of the joint vector normal distribution, important information that cannot be detected by the local attention map is provided, and the calculation is as follows: Among them, is the eigenvector of n feature maps, is the average vector containing the average value of each feature mapping coefficient; |Σ| is the determinant of the covariance matrix, Σ -1 is the pseudo-inverse matrix of Σ, and the value of n is 18; Calculate the global distribution of the local attention map to obtain the global attention map s G (x, y), and adopt the average pooling operation, and its formula is:

4. The method according to claim 1, characterized in that: In step 3, the jointly generated attention map is obtained by combining the global attention map and the local attention map using an equation, and its formula is: where represents the normalization process; The formula for the final attention map is: s final (x,y) = s mix (x ′ ,y ′ )(1 - D foc (x,y)); Among them, D foc (x,y) is the distance between the coordinate (x,y) and its closest focus at that location (x ′ ,y ′ ) between them.

5. The method according to claim 1, characterized in that In step 4, a quaternion wavelet domain feature-guided attention estimation model is established to modulate the visual masking of the embedded sub-band, and the perceptual contrast masking is obtained. The formula is: QAJnd(t,x,y) = S Qbase ·L Qla ·C Qcm ·C Qcl ·J S ; Among them, QAJnd is the estimate of the embedded subband vision, the parameter t is the index of the specific subband to be embedded, and S Qbase is the attention adjustment CSF threshold, and L Qla is the luminance masking factor, and C Qcm is the contrast masking function, and C Qcl is the color masking effect.

6. The method according to claim 1, wherein The said step 5 includes: transforming the original carrier vector X into the logarithmic domain to obtain the carrier signal X ′ , and its formula is: where E max and E med are respectively the maximum value and the median value in the texture masking, v is a random vector, and ε is the key parameter for logarithmic transformation; by projecting the original carrier vector X and QAJnd onto the random vector v, the adaptive quantization step Δ is calculated, and its formula is: Then, by performing the quantization index modulation QIM operation on the carrier signal X' obtained by logarithmic transformation, the signal X' containing the watermark information is obtained w , and its formula is: where w is the watermark information, and d m represents the dither signal corresponding to the watermark information.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program. When the program runs, it controls the device where the computer-readable storage medium is located to execute the computational photography image watermark processing method based on the quaternion attention model according to any one of claims 1 to 6.

8. An electronic device, characterized in that, Including: One or more processors; A memory; And one or more computer programs, where the one or more computer programs are stored in the memory. The one or more computer programs include instructions that, when executed by the device, cause the device to execute the computational photography image watermark processing method based on the quaternion attention model according to any one of claims 1 to 6.