A method and system for tracing watermarks against partial screen captures
By converting watermark information into image blocks and embedding them into the red and green channels, a visual watermark image resistant to partial shooting is generated, which solves the problem of inaccurate watermark extraction in the prior art and achieves efficient and reliable watermark extraction under the condition of partial shooting on the screen.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-03-24
AI Technical Summary
Existing digital watermarking technologies struggle to achieve reliable watermark extraction when screen content is incomplete or lacks synchronization evidence, especially when the thief only photographs or captures key local areas of the screen.
The watermark information is converted into an M×N watermark bit matrix, which is then replaced with image blocks through Kronecker product. Positioning blocks are added and redundantly copied to generate a visual watermark image. The red and green channels are embedded to resist local shooting interference.
It achieves high-accuracy watermark extraction even when the screen content is incomplete, and can resist simultaneous attacks such as rotation, scaling, perspective transformation and cropping, thus improving anti-occlusion ability and extraction accuracy.
Smart Images

Figure CN121437241B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital watermarking technology, and in particular to a method and system for tracing watermarks that resist partial screen capture. Background Technology
[0002] In the digital age, paperless offices are becoming increasingly common, and screens have become the primary medium for information presentation. At the same time, the risk of information leakage due to screen captures or screenshots has also increased significantly. Digital watermarking, as a key technology for tracing the source of leaks, achieves precise tracing after a leak by embedding invisible identification information (such as user IDs) into electronic files.
[0003] To facilitate the tracing of information leaks in screen capture or screenshot scenarios, existing digital watermarking technologies have proposed various methods for extracting watermarks from complete screen content. However, in real-world espionage scenarios, espionage perpetrators rarely transmit the entire screen content; instead, they typically capture, crop, or share key local areas of the screen (such as a piece of core text or a chart). This makes it difficult for current digital watermarking methods to reliably extract watermarks when screen content is incomplete or lacks synchronization evidence.
[0004] In view of this, the present invention is hereby proposed. Summary of the Invention
[0005] The technical problem solved by this invention is to overcome the shortcomings of existing technologies and provide a method and system for tracing watermarks that resist partial screen capture. The method for generating watermarks that resist partial screen capture includes: firstly, generating watermark information... W Convert to M×N Watermark bit matrix World Cup Subsequently, the watermark bit matrix is obtained through the Kronecker product. World Cup Replace the 0s and 1s in the image with the defined image patches. t 0 、t 1 The watermark image matrix is obtained. WM1 Next, in the watermark image matrix WM1 The unpaired bit blocks are periodically replaced with position blocks. t m This forms a hybrid watermark matrix WM2, which is then redundantly copied to create a redundant watermark matrix. WM3 Finally, in white RGB In the background, the bit block t 0 、t 1 Mapped to the red channel, the positioning block t mRendered as a green channel, with the blue channel remaining white, this generates a visual watermark image that is resistant to localized image capture interference. W rgb This invention can effectively handle watermark extraction under conditions where the captured or cropped screen content is incomplete or lacks synchronization evidence, ensuring a high accuracy rate for watermark extraction.
[0006] In a first aspect, the present invention proposes a watermark generation method resistant to partial screen photography, comprising:
[0007] S11. Transfer watermark information W Convert to a binary bit sequence and add a bit of information (0 or 1) to the last bit to obtain the binary bit sequence. M The binary bit sequence M Convert to M×N Watermark bit matrix World Cup ∈{0,1} M×N ;
[0008] S12. Define dimensions P×Q Image blocks t 0 、t 1 , respectively used to represent the watermark bit matrix World Cup The bits 0 and 1 in the watermark bit matrix are multiplied using the Kronecker product. World Cup The bits 0 and 1 in the image are replaced with the image blocks respectively. t 0 、 t 1 The watermark image matrix is obtained. WM1 ;
[0009] S13. Define dimensions P×Q positioning block t m The positioning block t m With the image block t 0 、t 1 Unlike other methods, the binary bit sequence is processed according to a preset period. M The last bit of information, either 0 or 1, corresponds to the bit block. t 0 or t 1 Replace with the positioning block t m The hybrid watermark matrix is obtained. WM2 The hybrid watermark matrix WM2 Redundant watermark matrix is obtained by performing redundant replication. WM3 ;
[0010] S14. Initialize a redundant watermark matrix. WM3 Pure white of the same size RGB Background image, the bit block t 0 、t 1 The pixel values are mapped to the red channel, and the positioning block is... t m The corresponding pixels are rendered as the green channel, while the blue channel remains pure white, resulting in the final visual watermark image. W rgb .
[0011] Secondly, the present invention proposes a watermark extraction method resistant to partial screen photography, employing a watermark generation method resistant to partial screen photography as described in the first aspect, comprising:
[0012] S21. Transfer the visual watermark image W rgb Embedded input carrier image I 0 In the process, a watermarked image is obtained. I 1 ;
[0013] S22. The watermarked image I 1 Take a screenshot / capture the screen to obtain an image with a watermark. I 2 The watermarked image I 2 Input Image Enhancer H The enhanced watermarked image is obtained. I 3 ;
[0014] S23. The watermarked image I 3 Input watermark enhancer D Obtain watermark-enhanced image I 4 Locate the watermark-enhanced image I 4 The watermark block in t m Obtain the target watermark image W tar .
[0015] Thirdly, the present invention proposes a watermark generation system resistant to partial screen photography, employing a watermark generation method resistant to partial screen photography as described in the first aspect, comprising:
[0016] Watermark Information Matrixing Module: This module stores watermark information... W Convert to a binary bit sequence and add a bit of information (0 or 1) to the last bit to obtain the binary bit sequence. M The binary bit sequence M Convert to M×N Watermark bit matrix World Cup ∈{0,1} M×N ;
[0017] Module for generating watermarked image matrix: Define size P×Q Image blocks t 0 、t 1 , respectively used to represent the watermark bit matrix World Cup The bits 0 and 1 in the watermark bit matrix are multiplied using the Kronecker product. World Cup The bits 0 and 1 in the image are replaced with the image blocks respectively. t 0 、t 1 The watermark image matrix is obtained. WM1 ;
[0018] Module for constructing a location-based redundant watermark matrix: Define the size P×Q positioning block t m The positioning block t m With the image block t 0 、t 1 Unlike other methods, the binary bit sequence is processed according to a preset period. M The last bit of information, either 0 or 1, corresponds to the bit block. t 0 or t 1 Replace with the positioning block t m The hybrid watermark matrix is obtained. WM2 The hybrid watermark matrix WM2 Redundant watermark matrix is obtained by performing redundant replication. WM3 ;
[0019] Synthetic visual watermark image module: Initializes a watermark matrix with the redundant watermark matrix. WM3 Pure white of the same size RGB Background image, the bit block t 0 、t 1 The pixel values are mapped to the red channel, and the positioning block is... tm The corresponding pixels are rendered as the green channel, while the blue channel remains pure white, resulting in the final visual watermark image. W rgb .
[0020] Fourthly, this invention proposes a watermark extraction system resistant to partial screen photography, employing a watermark extraction method resistant to partial screen photography as described in the second aspect, comprising:
[0021] Watermark embedding module: embeds the visual watermark image W rgb Embedded input carrier image I 0 In the process, a watermarked image is obtained. I 1 ;
[0022] Image enhancement module: for the watermarked image I 1 Take a screenshot / capture the screen to obtain an image with a watermark. I 2 The watermarked image I 2 Input Image Enhancer H The enhanced watermarked image is obtained. I 3 ;
[0023] Watermark enhancement and extraction module. This module extracts the watermarked image. I 3 Input watermark enhancer D Obtain watermark-enhanced image I 4 Locate the watermark-enhanced image I 4 The watermark block in t m Obtain the target watermark image W tar .
[0024] Fifthly, the present invention proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the watermark extraction method against partial screen capture as described above.
[0025] In a sixth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the watermark extraction method against partial screen capture as described above.
[0026] Compared with the prior art, the beneficial effects of the present invention are:
[0027] 1) Streamlined detection process: During extraction, high-contrast positioning blocks can be detected quickly and accurately. The two key steps of "positioning" and "decoding" are decoupled, which greatly improves the overall recognition rate under complex distortion.
[0028] 2) Strong robustness: Through multi-layered structured design, it can systematically resist various composite distortions in screen shooting scenarios. Its periodically distributed positioning blocks construct an internal geometric calibration grid, enabling the watermark to resist simultaneous attacks such as rotation, scaling, perspective transformation and cropping.
[0029] 3) Multiple redundancy and fault-tolerant design: To cope with local damage and channel interference, multiple robustness enhancement strategies (spatial redundancy replication, channel separation and perception optimization) are incorporated, which greatly improves the anti-blocking capability and watermark extraction accuracy. Attached Figure Description
[0030] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0031] Figure 1 This is a flowchart of the watermark generation method for resisting partial screen shooting proposed in this invention.
[0032] Figure 2 The visual watermark image generated by this invention W rgb .
[0033] Figure 3 The watermarked image generated by this invention after taking a screenshot or screenshot. I wm and enhanced watermark images I res .
[0034] Figure 4 The watermark-enhanced image generated by this invention W aug and target watermark image W tar . Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0036] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.
[0037] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0038] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to detection.” Similarly, depending on the context, the phrases “if determination” or “if detection (of the stated condition or event)” can be interpreted as “when determination” or “in response to determination” or “when detection (of the stated condition or event)” or “in response to detection (of the stated condition or event).”
[0039] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.
[0040] The optional embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0041] Firstly, such as Figure 1 , Figure 2 As shown, this invention proposes a method for generating watermarks resistant to partial screen capture, comprising:
[0042] S11. Transfer watermark information W Convert to a binary bit sequence and add a bit of information (0 or 1) to the last bit to obtain the binary bit sequence.M The binary bit sequence M Convert to M×N Watermark bit matrix World Cup ∈{0,1} M×N ;
[0043] S12. Define dimensions P×Q Image blocks t 0 、t 1 , respectively used to represent the watermark bit matrix World Cup The bits 0 and 1 in the watermark bit matrix are multiplied using the Kronecker product. World Cup The bits 0 and 1 in the image are replaced with the image blocks respectively. t 0 、 t 1 The watermark image matrix is obtained. WM1 ;
[0044] S13. Define dimensions P×Q positioning block t m The positioning block t m With the image block t 0 、t 1 Unlike other methods, the binary bit sequence is processed according to a preset period. M The last bit of information, either 0 or 1, corresponds to the bit block. t 0 or t 1 Replace with the positioning block t m The hybrid watermark matrix is obtained. WM2 The hybrid watermark matrix WM2 Redundant watermark matrix is obtained by performing redundant replication. WM3 ;
[0045] S14. Initialize a redundant watermark matrix. WM3 Pure white of the same size RGB Background image, the bit block t 0 、t 1 The pixel values are mapped to the red channel, and the positioning block is... t m The corresponding pixels are rendered as the green channel, while the blue channel remains pure white, resulting in the final visual watermark image. W rgb .
[0046] The watermark information mentioned in step S11 W Common data types include text and binary data. M N are positive integers. Constructing a two-dimensional matrix here allows the watermark signal to be distributed more evenly in the pixel space, making it better match the image structure and facilitating redundant error correction design.
[0047] In step S12 P and Q The image block is a positive integer. t 0 、t 1 The watermarked image matrix should be visually distinguishable (e.g., through contrasting textures or complementary checkerboard patterns) but possess highly similar frequency domain energy distributions to resist frequency-domain-based filtering attacks. WM1 The dimensions are ( M×P , N×Q The watermark image matrix WM1 All blocks are composed of image blocks t 0 or t 1 A block of bits.
[0048] The positioning block mentioned in step S13 t m The image blocks should be clearly distinguishable visually. t 0 、t 1 It has unique autocorrelation characteristics, and the distribution of the positioning blocks should ensure that the image can still be reliably detected when it undergoes affine transformation. The redundancy design can ensure that even if some areas of the image are damaged, the complete watermark information can still be recovered.
[0049] Further, the positioning block mentioned in step S13 t m Patterns with prominent corner features (such as a cross) can often be used.
[0050] Furthermore, the preset period mentioned in step S13 is every [time period]. m row or n Column, where m≤ M×P , n ≤ N×Q .
[0051] Furthermore, in step S13, the hybrid watermark matrix is... WM2 Redundant copying is performed by using a cyclical concatenation method to copy the hybrid watermark matrix in the row and / or column directions. WM2This design ensures that even if most of the watermarked image is obscured, the remaining portion will still contain at least one complete hybrid watermark matrix. WM2 This will restore all watermark information.
[0052] The watermark generation method proposed in this invention cleverly combines information encoding, visual presentation, and geometric robustness, and its main advantages are:
[0053] 1) Separation of representation blocks and positioning blocks: "Watermark information" and "geometric positioning" are assigned to different modules. The watermark representation block focuses on high-density encoded information, while the watermark positioning block is designed as a special pattern that is easy to detect, so that they do not interfere with each other.
[0054] 2) Optimized detection process: During detection, geometric attacks such as image rotation, scaling, and cropping can be quickly and accurately detected and corrected using the green positioning blocks. After correction, the information in the red representation blocks is stably read, significantly improving the recognition rate in complex scenes (such as screen distortion).
[0055] 3) Multiple robust designs, highly resistant to damage, including:
[0056] a. Resistance to geometric attacks: Periodically inserted positioning blocks form a built-in "calibration grid", enabling the watermark to resist homography transformations such as rotation, scaling, perspective transformation, and cropping;
[0057] b. Resistance to occlusion and local damage: By stitching redundant copies, the complete watermark information is repeatedly embedded multiple times. Even if parts of the image are occluded, blurred, or damaged, as long as any complete copy survives, all information can be recovered, similar to redundancy correction in communications;
[0058] c. Resistance to color interference and compression: Information is encoded in the red channel, and the locator is placed in the green channel, taking advantage of the human visual sensitivity to green. Separating the channels also facilitates algorithmic processing. This design... JPEG It has some resistance to compression and color balance adjustments.
[0059] Secondly, such as Figure 3 , Figure 4 As shown, this invention proposes a watermark extraction method resistant to partial screen photography, employing a watermark generation method resistant to partial screen photography as described in the first aspect, comprising:
[0060] S21. Transfer the visual watermark image W rgb Embedded input carrier image I 0 In the process, a watermarked image is obtained. I 1 ;
[0061] S22. The watermarked image I 1 Take a screenshot / capture the screen to obtain an image with a watermark. I 2 The watermarked image I 2 Input Image Enhancer H The enhanced watermarked image is obtained. I 3 ;
[0062] S23. The watermarked image I 3 Input watermark enhancer D Obtain watermark-enhanced image I 4 Locate the watermark-enhanced image I 4 The watermark block in t m Obtain the target watermark image W tar ;
[0063] Among them, the image enhancer in S22 H Networks using homography estimation HomoNet As a network structure, its training process is as follows:
[0064] S221. Transfer the watermarked image I 1 Input the screen capture / screenshot simulation module to obtain the watermarked image after screen capture / screenshot. I wm The screen capture / screenshot simulation module simulates the following distortions:
[0065] Geometric distortion: Simulates the free-viewpoint changes during shooting, supplemented by dynamic cropping;
[0066] Optical interference: Simulates the pixel aliasing effect between the screen and the camera sensor during shooting;
[0067] Ambient lighting: Simulating non-uniform ambient light field and camera sensor noise during shooting;
[0068] Digital channel distortion: the distortion of images after simulating a screenshot. JPEG Compression, color balance adjustment, and brightness variation;
[0069] S222. The watermarked image I wm Input Image Enhancer H Predicted coordinate offset Δ east The true coordinate offset Δ is obtained based on the homography transformation matrix. p The image enhancer is described below.H training objectives L H = L 1 (Δ p Δ east The optimizer is used to iteratively train until the training objective is achieved. L H Convergence, in which L1 Mean absolute error;
[0070] In step S221, the geometric distortion operation is simulated by generating a perspective transformation matrix through random perturbation of the four corner points of the input image; the optical interference operation is simulated by synthesizing radial and linear moiré patterns with controllable parameters based on a cosine physical model; and the ambient lighting is simulated by superimposing radial vignetting, a linear gradient mask, and Gaussian noise.
[0071] In step S222, constraints are applied. L1 Loss function, image enhancer H It can output accurate estimates of point coordinate offset Δ east The estimated offset Δ east It will be transformed into a homography transformation matrix through the homography transformation formula, thereby achieving resynchronization of the captured images.
[0072] Among them, the watermark enhancer in S23 D use U-Net The network architecture and its training process are as follows:
[0073] S231. Transfer the watermarked image I wm Input the trained image intensifier H Obtain enhanced watermark image I res ;
[0074] S232. The enhanced watermark image I res Input the watermark enhancer D Obtain watermark-enhanced image W aug The watermark enhancer is described above. D training objectives L D =λ 1 · L BCE ( W rgb , W aug )+ λ 2 · LSSIM ( W rgb , W aug The optimizer is used to iteratively train until the training objective is achieved. L D Convergence, in which λ 1 and λ 2 This is a hyperparameter.
[0075] in L BCE The binary cross-entropy loss function is... L SSIM This is the structural similarity loss function.
[0076] Furthermore, the aforementioned λ 1 =1.0, λ 2 =0.5.
[0077] The watermark enhancer D use U-Net The network architecture consists of an encoder, a decoder, and hop connections, specifically:
[0078] The encoder consists of multiple downsampling blocks, each containing two convolutional layers (each convolutional layer followed by batch normalization and...). ReLU The encoder performs downsampling using an activation function and a max pooling layer; each downsampling block halves the feature map size and doubles the number of channels, thereby gradually extracting deeper features; the encoder performs a total of 4 downsampling operations, and the final feature map size is 1 / 16 of the input image.
[0079] The decoder consists of multiple upsampling blocks. Each block first doubles the feature map size through transposed convolution, then concatenates the feature maps of the corresponding scale in the encoder path (via skip connections) with the current feature map along the channel dimension. The concatenated feature map then passes through two convolutional layers (batch normalization and...). ReLU The data is then fused. The decoder performs upsampling four times, and the final feature map size is restored to the size of the input image.
[0080] Skip connections concatenate the feature map output from each downsampled block of the encoder with the feature map input from the corresponding upsampled block of the decoder to preserve shallow detail information and help the decoder better reconstruct the input image.
[0081] Between the encoder and decoder, two convolutional layers are used (also with batch normalization and...). ReLU Further processing of features captures higher-level semantic information.
[0082] Finally, a 1x1 convolutional layer is used to adjust the number of feature map channels to 3. RGB The image is processed using the Sigmoid activation function to restrict pixel values to the range [0,1].
[0083] pass U-Net Structured watermark enhancer D It can enhance damaged watermark images (such as those that have been screenshotted or compressed), making the watermark area clearer and easier to extract later.
[0084] Composite loss function L D The aim is to supervise watermark-enhanced images from two aspects: pixel accuracy and structural consistency. W aug Approaching the original watermark image W rgb The composite loss function makes the watermark enhancer D During the optimization process, we not only focus on the accurate regression of each pixel value, but also constrain the output image to be highly consistent with the original watermark in terms of visual structure. This allows us to better preserve the coding structure and edge information of the watermark while suppressing noise, moiré patterns and other interference, laying the foundation for subsequent localization block detection and information bit extraction.
[0085] Considering image intensifiers H (Geometric Synchronization) and Watermark Enhancer D To address the coupling issues of the (signal enhancement) tasks, a phased sequential training strategy is employed to improve convergence efficiency and overall performance. First, the image intensifier is trained independently on relatively clean simulated distortion data. H This allows it to obtain stable geometric estimation capabilities. Subsequently, the image intensifier is frozen. H The parameters are used to train the watermark enhancer using the corrected image output. D It focuses on learning signal denoising and enhancement. This framework is based on PyTorch To achieve, to utilize Cornea The library performs geometric transformation simulation and reconstruction, using... Adam optimizer and combination ReduceLROnPlateau The learning rate scheduler is used for training.
[0086] Thirdly, the present invention proposes a watermark generation system resistant to partial screen photography, employing a watermark generation method resistant to partial screen photography as described in the first aspect, comprising:
[0087] Watermark Information Matrixing Module: This module stores watermark information... W Convert to a binary bit sequence and add a bit of information (0 or 1) to the last bit to obtain the binary bit sequence. M The binary bit sequence M Convert to M×NWatermark bit matrix World Cup ∈{0,1} M×N ;
[0088] Module D for generating watermarked image matrix: Defines size P×Q Image blocks t 0 、t 1 , respectively used to represent the watermark bit matrix World Cup The bits 0 and 1 in the watermark bit matrix are multiplied using the Kronecker product. World Cup The bits 0 and 1 in the image are replaced with the image blocks respectively. t 0 、t 1 The watermark image matrix is obtained. WM1 ;
[0089] Module for constructing a location-based redundant watermark matrix: Define the size P×Q positioning block t m The positioning block t m With the image block t 0 、t 1 Unlike other methods, the binary bit sequence is processed according to a preset period. M The last bit of information, either 0 or 1, corresponds to the bit block. t 0 or t 1 Replace with the positioning block t m The hybrid watermark matrix is obtained. WM2 The hybrid watermark matrix WM2 Redundant watermark matrix is obtained by performing redundant replication. WM3 ;
[0090] Synthetic visual watermark image module: Initializes a watermark matrix with the redundant watermark matrix. WM3 The bit blocks are made of pure white RGB background images of the same size. t 0 、t 1 The pixel values are mapped to the red channel, and the positioning block is... t m The corresponding pixels are rendered as the green channel, while the blue channel remains pure white, resulting in the final visual watermark image. W rgb .
[0091] Fourthly, this invention proposes a watermark extraction system resistant to partial screen photography, employing a watermark extraction method resistant to partial screen photography as described in the second aspect, comprising:
[0092] Watermark embedding module: embeds the visual watermark image W rgb Embedded input carrier image I 0 In the process, a watermarked image is obtained. I 1 ;
[0093] Image enhancement module: for the watermarked image I 1 Take a screenshot / capture the screen to obtain an image with a watermark. I 2 The watermarked image I 2 Input Image Enhancer H The enhanced watermarked image is obtained. I 3 ;
[0094] Watermark enhancement and extraction module. This module extracts the watermarked image. I 3 Input watermark enhancer D Obtain watermark-enhanced image I 4 Locate the watermark-enhanced image I 4 The watermark block in t m Obtain the target watermark image W tar .
[0095] Fifthly, the present invention proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the watermark extraction method against partial screen capture as described above.
[0096] In a sixth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the watermark extraction method against partial screen capture as described above.
[0097] Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the embodiments described above is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.
[0098] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0099] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0100] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0101] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating watermarks resistant to partial screen capture, characterized in that, include: S11. Transfer watermark information W Convert to a binary bit sequence and add a bit of information (0 or 1) to the last bit to obtain the binary bit sequence. M The binary bit sequence M Convert to M×N Watermark bit matrix WM ∈{0,1} M×N ; S12. Define dimensions P×Q Image blocks t 0 、t 1 , respectively used to represent the watermark bit matrix WM The bits 0 and 1 in the watermark bit matrix are multiplied using the Kronecker product. WM The bits 0 and 1 in the image are replaced with the image blocks respectively. t 0 、t 1 The watermark image matrix is obtained. WM1 ; S13. Define dimensions P×Q positioning block t m The positioning block t m With the image block t 0 、t 1 Unlike other methods, the binary bit sequence is processed according to a preset period. M The last bit of information, either 0 or 1, corresponds to the bit block. t 0 or t 1 Replace with the positioning block t m The hybrid watermark matrix is obtained. WM2 The hybrid watermark matrix WM2 Redundant watermark matrix is obtained by performing redundant replication. WM3 ; S14. Initialize a redundant watermark matrix. WM3 Pure white of the same size RGB Background image, the bit block t 0 、t 1 The pixel values are mapped to the red channel, and the positioning block is... t m The corresponding pixels are rendered as the green channel, while the blue channel remains pure white, resulting in the final visual watermark image. W rgb .
2. The method for generating a watermark resistant to partial screen capture according to claim 1, characterized in that, The positioning block described in S13 t m Use patterns with prominent corner features.
3. The method for generating a watermark resistant to partial screen capture according to claim 1, characterized in that, The preset period mentioned in S13 is every [time]. m row or n Column, where m≤ M×P , n ≤ N×Q .
4. The method for generating a watermark resistant to partial screen capture according to claim 1, characterized in that, The hybrid watermark matrix will be in S13 WM2 Redundant copying involves using a cyclical splicing method to concatenate the hybrid watermark matrix along the row and / or column directions. WM2 Copy multiple times.
5. A method for extracting watermarks resistant to partial screen photography, employing the watermark generation method for resistant partial screen photography as described in any one of claims 1-4, characterized in that, include: S21. Transfer the visual watermark image W rgb Embedded input carrier image I 0 In the process, a watermarked image is obtained. I 1 ; S2 2. The watermarked image I 1 Take a screenshot / capture the screen to obtain an image with a watermark. I 2 The watermarked image I 2 Input Image Enhancer H The enhanced watermarked image is obtained. I 3 ; S23. The watermarked image I 3 Input watermark enhancer D Obtain watermark-enhanced image I 4 Locate the watermark-enhanced image I 4 The watermark block in t m Obtain the target watermark image W tar ; Among them, the image enhancer in S22 H Networks using homography estimation HomoNet As a network structure, its training process is as follows: S221. Transfer the watermarked image I 1 Input the screen capture / screenshot simulation module to obtain the watermarked image after screen capture / screenshot. I wm The screen capture / screenshot simulation module simulates the following distortions: Geometric distortion: Simulates the free-viewpoint changes during shooting, supplemented by dynamic cropping; Optical interference: Simulates the pixel aliasing effect between the screen and the camera sensor during shooting; Ambient lighting: Simulating non-uniform ambient light field and camera sensor noise during shooting; Digital channel distortion: the distortion of images after simulating a screenshot. JPEG Compression, color balance adjustment, and brightness variation; S222. The watermarked image I wm Input Image Enhancer H Predicted coordinate offset Δ est The true coordinate offset Δ is obtained based on the homography transformation matrix. p The image enhancer is described below. H training objectives L H = L 1 (Δ p Δ est The optimizer is used to iteratively train until the training objective is achieved. L H Convergence, in which L1 Mean absolute error; Among them, the watermark enhancer in S23 D use U-Net The network architecture and its training process are as follows: S231. Transfer the watermarked image I wm Input the trained image intensifier H Obtain enhanced watermark image I res ; S232. The enhanced watermark image I res Input the watermark enhancer D Obtain watermark-enhanced image W aug The watermark enhancer is described above. D training objectives L D =λ 1 · L BCE ( W rgb , W aug )+ λ 2 · L SSIM ( W rgb , W aug The optimizer is used to iteratively train until the training objective is achieved. L D Convergence, in which λ 1 and λ 2 For hyperparameters, L BCE The binary cross-entropy loss function is... L SSIM This is the structural similarity loss function.
6. The method for extracting watermarks against partial screen capture as described in claim 5, characterized in that, The geometric distortion operation described in S221 is simulated by generating a perspective transformation matrix through random perturbation of the four corner points of the input image; the optical interference operation is simulated by synthesizing radial and linear moiré patterns with controllable parameters based on a cosine physical model; and the ambient lighting is simulated by superimposing radial vignetting, a linear gradient mask, and Gaussian noise.
7. The method for extracting watermarks from partial screen photography according to claim 5, characterized in that, As described in S232 λ 1 =1.0, λ 2 =0.
5.
8. A watermark generation system resistant to partial screen photography, employing the watermark generation method resistant to partial screen photography as described in any one of claims 1-4, characterized in that, include: Watermark Information Matrixing Module: This module stores watermark information... W Convert to a binary bit sequence and add a bit of information (0 or 1) to the last bit to obtain the binary bit sequence. M The binary bit sequence M Convert to M×N Watermark bit matrix WM ∈{0,1} M×N ; Module for generating watermarked image matrix: Define size P×Q Image blocks t 0 、t 1 , respectively used to represent the watermark bit matrix WM The bits 0 and 1 in the watermark bit matrix are multiplied using the Kronecker product. WM The bits 0 and 1 in the image are replaced with the image blocks respectively. t 0 、t 1 The watermark image matrix is obtained. WM1 ; Module for constructing a location-based redundant watermark matrix: Define the size P×Q positioning block t m The positioning block t m With the image block t 0 、t 1 Unlike other methods, the binary bit sequence is processed according to a preset period. M The last bit of information, either 0 or 1, corresponds to the bit block. t 0 or t 1 Replace with the positioning block t m The hybrid watermark matrix is obtained. WM2 The hybrid watermark matrix WM2 Redundant watermark matrix is obtained by performing redundant replication. WM3 ; Synthetic visual watermark image module: Initializes a watermark matrix with the redundant watermark matrix. WM3 Pure white of the same size RGB Background image, the bit block t 0 、t 1 The pixel values are mapped to the red channel, and the positioning block is... t m The corresponding pixels are rendered as the green channel, while the blue channel remains pure white, resulting in the final visual watermark image. W rgb .
9. A watermark extraction system resistant to partial screen photography, employing the watermark extraction method resistant to partial screen photography as described in any one of claims 5-7, characterized in that, include: Watermark embedding module: embeds the visual watermark image W rgb Embedded input carrier image I 0 In the process, a watermarked image is obtained. I 1 ; Image enhancement module: for the watermarked image I 1 Take a screenshot / capture the screen to obtain an image with a watermark. I 2 The watermarked image I 2 Input Image Enhancer H The enhanced watermarked image is obtained. I 3 ; Watermark enhancement and extraction module. This module extracts the watermarked image. I 3 Input watermark enhancer D Obtain watermark-enhanced image I 4 Locate the watermark-enhanced image I 4 The watermark block in t m Obtain the target watermark image W tar .
10. An electronic 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 program, it implements the watermark extraction method against partial screen capture as described in any one of claims 1-4.
Citation Information
Patent Citations
Screen shooting traceability method, device and equipment and readable storage medium
CN120471752A
Methods for digital watermarking of images and images produced thereby
US20040013284A1