Optical watermark anti-counterfeiting method and device based on pixel fine-tuning
By using a pixel-based optical watermarking anti-counterfeiting method, which generates pseudo-random watermark sequences through spread spectrum coding and embedded intensity factors, the problem of insufficient concealment and reliability of existing optical anti-counterfeiting methods is solved, and efficient and automated document anti-counterfeiting verification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF AUTOMATION CHINESE ACAD OF SCI
- Filing Date
- 2026-03-16
- Publication Date
- 2026-07-24
AI Technical Summary
Existing optical anti-counterfeiting methods are insufficient in terms of concealment, reliability, and verification efficiency, making it difficult to meet the needs of high security and automated verification.
An optical watermarking anti-counterfeiting method based on pixel fine-tuning is adopted. A pseudo-random watermark sequence is generated by spreading coding and embedded into the target image using an embedding intensity factor. Combined with additive and multiplicative modulation techniques, an anti-counterfeiting image is generated, achieving a balance between information concealment and robustness.
It improves the concealment and reliability of document anti-counterfeiting, realizes information hiding that is imperceptible to the human eye, and facilitates automated verification, thereby improving verification efficiency.
Smart Images

Figure CN122453585A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical anti-counterfeiting technology, and in particular to an optical watermark anti-counterfeiting method and device based on pixel fine-tuning. Background Technology
[0002] As document forgery technology continues to evolve, the demand for secure, covert, and easily automated anti-counterfeiting methods is becoming increasingly urgent.
[0003] Existing anti-counterfeiting methods mainly include halftone modulation or specific pattern embedding. However, these methods have the following drawbacks in practical applications: (1) The introduction of visible flaws or specific textures reduces the aesthetic appeal of the document and provides counterfeiters with clear targets for identification and imitation, resulting in poor anti-counterfeiting concealment; (2) In the event of common attacks (such as high-definition copying and scanning), noise and distortion are introduced, leading to a high verification failure rate and low anti-counterfeiting reliability; (3) The watermark information used for anti-counterfeiting has limited capacity and is difficult to carry specific data such as document numbers. Moreover, the verification process often relies on manual judgment, which cannot meet the needs of rapid and automated inspection in scenarios such as entry and exit, and financial counters, resulting in low anti-counterfeiting verification efficiency. Summary of the Invention
[0004] This invention provides an optical watermark anti-counterfeiting method and device based on pixel fine-tuning, which solves the technical problems of poor concealment, low reliability and low verification efficiency of document anti-counterfeiting in the prior art, and improves anti-counterfeiting reliability and verification efficiency while ensuring concealment.
[0005] This invention provides an optical watermark anti-counterfeiting method based on pixel fine-tuning, comprising the following steps.
[0006] Identify the target image from the target document; The preset anti-counterfeiting information is spread spectrum encoded to generate a pseudo-random watermark sequence; Based on a preset embedding strength factor, the pseudo-random watermark sequence is embedded into the target image to generate an anti-counterfeiting image.
[0007] According to the present invention, an optical watermarking anti-counterfeiting method based on pixel fine-tuning is provided, wherein embedding the pseudo-random watermark sequence into the target image based on a preset embedding intensity factor includes: The target image is divided into multiple different image blocks; Using a human visual system model, the local masking factor for each pixel in each image patch is calculated. Based on the embedding strength factor and the local masking factor, the pseudo-random watermark sequence is embedded into the target image.
[0008] According to the present invention, an optical watermarking anti-counterfeiting method based on pixel fine-tuning is provided, wherein the method of embedding the pseudo-random watermark sequence into the target image includes additive modulation; the calculation expression for the additive modulation is: In the formula, This refers to the anti-counterfeiting image. Represents the target image. This represents the embedding strength factor. This refers to the pseudo-random watermark sequence. This represents the local masking factor.
[0009] According to the optical watermarking anti-counterfeiting method based on pixel fine-tuning provided by the present invention, the method of embedding the pseudo-random watermark sequence into the target image further includes multiplicative modulation; the calculation expression of the multiplicative modulation is: In the formula, This refers to the anti-counterfeiting image. Represents the target image. This represents the embedding strength factor. This refers to the pseudo-random watermark sequence. This represents the local masking factor.
[0010] According to the present invention, an optical watermark anti-counterfeiting method based on pixel fine-tuning is provided, the method further comprising performing anti-counterfeiting verification on the anti-counterfeiting image; the anti-counterfeiting verification further includes: The anti-counterfeiting image is preprocessed to obtain a standard image; the preprocessing includes one or more of geometric correction, color correction, and noise reduction. The cross-correlation value is obtained by performing a cross-correlation calculation between the pixel values of the pseudo-random watermark sequence and the standard image; Based on the cross-correlation value, the verification result of the anti-counterfeiting verification is obtained.
[0011] According to the present invention, an optical watermark anti-counterfeiting method based on pixel fine-tuning is provided, wherein obtaining the verification result of the anti-counterfeiting verification based on the cross-correlation value includes: If the absolute value of the cross-correlation value is greater than or equal to a preset threshold, the verification result is considered successful. If the absolute value of the cross-correlation value is less than the preset threshold, the verification result is a verification failure.
[0012] The present invention also provides an optical watermark anti-counterfeiting device based on pixel fine-tuning, comprising the following modules: The determination module is used to determine the target image from the target document; The encoding module is used to spread spectrum encode the preset anti-counterfeiting information to generate a pseudo-random watermark sequence; The generation module is used to embed the pseudo-random watermark sequence into the target image based on a preset embedding strength factor to generate an anti-counterfeiting image.
[0013] The present invention also provides 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 computer program to implement the pixel-based optical watermark anti-counterfeiting method as described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the pixel-based optical watermarking anti-counterfeiting method as described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the pixel-based optical watermark anti-counterfeiting method as described above.
[0016] This invention provides an optical watermark anti-counterfeiting method and device based on pixel fine-tuning. The method involves determining a target image from a target document; performing spread spectrum encoding on preset anti-counterfeiting information to generate a pseudo-random watermark sequence; converting the anti-counterfeiting information into a pseudo-random noise signal using spread spectrum technology to improve the watermark's concealment and anti-interference capability; and embedding the pseudo-random watermark sequence into the target image based on a preset embedding strength factor to generate an anti-counterfeiting image. This method balances invisibility and robustness through a controllable embedding strength factor, achieving information hiding that is imperceptible to the human eye, while facilitating automated verification and improving the concealment, reliability, and verification efficiency of document anti-counterfeiting. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the optical watermark anti-counterfeiting method based on pixel fine-tuning provided by the present invention.
[0019] Figure 2 This is a schematic diagram of the structure of the optical watermark anti-counterfeiting device based on pixel fine-tuning provided by the present invention.
[0020] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0022] The following is combined Figures 1 to 3 This invention describes the optical watermarking anti-counterfeiting method and apparatus based on pixel fine-tuning.
[0023] Figure 1 This is a flowchart illustrating the optical watermarking anti-counterfeiting method based on pixel fine-tuning provided by the present invention, as shown below. Figure 1 As shown, the method includes the following steps: Step 101: Identify the target image from the target document; Step 102: Spread spectrum encoding the preset anti-counterfeiting information to generate a pseudo-random watermark sequence; Step 103: Based on a preset embedding strength factor, embed the pseudo-random watermark sequence into the target image to generate an anti-counterfeiting image.
[0024] Specifically, the target document can be any type of personal photograph document, such as work permits for employees in various professions, identity documents containing personal information, driver's licenses, and entry / exit documents. The target image can be either the personal photograph or the background image.
[0025] The preset anti-counterfeiting information can be binary information to be embedded, such as serial numbers, identification codes, or document numbers. By spreading and encoding the anti-counterfeiting information, it is converted into a pseudo-random noise sequence (PNS) as a pseudo-random watermark sequence. On the one hand, the pseudo-random watermark sequence can carry a large amount of anti-counterfeiting information (such as document numbers and other specific data), thereby improving the watermark's resistance to attacks and enhancing the reliability of anti-counterfeiting. On the other hand, since the pseudo-random watermark sequence is difficult to distinguish from random noise, it can improve the concealment of anti-counterfeiting measures.
[0026] Based on the preset embedding strength factor, the pseudo-random watermark sequence is adaptively embedded into the target image with pixel-level precision, thereby generating an anti-counterfeiting image for document anti-counterfeiting.
[0027] For example, in one embodiment, the target image (e.g., a 128×128 pixel area) is first determined from the ID photo; then the anti-counterfeiting information (e.g., ID number) is spread-spectrum encoded to generate a pseudo-random watermark sequence; finally, the pseudo-random watermark sequence is embedded into the target image through a global embedding intensity factor α (with a value of 0.01) to generate a visually indistinguishable anti-counterfeiting image.
[0028] For example, in one embodiment, in the anti-counterfeiting scenario of entry and exit documents, the target image is determined to be a grayscale image of the document holder's face; the anti-counterfeiting information is an encrypted issuing authority code (such as "BJGA"), which is generated as a pseudo-random watermark sequence after spread spectrum coding; the pseudo-random watermark sequence is embedded into the target image through a global embedding intensity factor α (α can be adjusted to 0.005 to further improve concealment), thereby generating an anti-counterfeiting image that can be used for laser printing.
[0029] This invention improves the signal-to-noise ratio by embedding a pseudo-random watermark sequence into the target image to generate an anti-counterfeiting image, thereby enhancing the concealment, security, and machine-readable anti-counterfeiting capabilities of the document, and facilitating automated machine verification of anti-counterfeiting.
[0030] The present invention provides an optical watermark anti-counterfeiting method based on pixel fine-tuning. This method involves determining a target image from a target document; performing spread spectrum encoding on preset anti-counterfeiting information to generate a pseudo-random watermark sequence; converting the anti-counterfeiting information into a pseudo-random noise signal using spread spectrum technology to improve the watermark's concealment and anti-interference capability; and embedding the pseudo-random watermark sequence into the target image based on a preset embedding strength factor to generate an anti-counterfeiting image. This method balances invisibility and robustness through a controllable embedding strength factor, achieving information hiding that is imperceptible to the human eye, while facilitating automated verification and improving the concealment, reliability, and verification efficiency of document anti-counterfeiting.
[0031] Further, embedding the pseudo-random watermark sequence into the target image based on a preset embedding strength factor includes: The target image is divided into multiple different image blocks; Using a human visual system model, the local masking factor for each pixel in each image patch is calculated. Based on the embedding strength factor and the local masking factor, the pseudo-random watermark sequence is embedded into the target image.
[0032] Specifically, the target image is divided into multiple different, small, regular image blocks, thereby decomposing complex global calculations into more easily processed local calculations, reducing computational complexity, and adapting to the local features of different regions of the image.
[0033] For example, in one embodiment, the target image is divided into 8×8 pixel blocks, which belong to complex texture regions, edge regions, and medium grayscale regions in the target image, respectively. In complex texture regions (such as hair or fabric), the human eye is not sensitive to small grayscale changes, so a stronger or more obvious pseudo-random watermark sequence can be embedded. In edge regions (i.e., near the edge), embedding a pseudo-random watermark sequence requires balancing human visual attention, but there is also a certain masking effect. The human eye is usually most sensitive to brightness changes in medium grayscale regions; therefore, a lower-intensity pseudo-random watermark sequence needs to be embedded to ensure concealment.
[0034] To more accurately embed a pseudo-random watermark sequence of corresponding strength into each image patch, this embodiment of the invention uses a Human Visual System (HVS) model to calculate the local masking factor for each pixel in each image patch. The HVS model can be a frequency-sensitive model or a model based on brightness and contrast masking. The local masking factor is the Just Noticeable Distortion (JND) threshold, representing the maximum extent to which each pixel or coefficient can be modified. When the modification magnitude of the pseudo-random watermark sequence embedding is less than the JND threshold perceived by human vision, the pseudo-random watermark sequence can be made invisible.
[0035] By combining the embedding intensity factor and the local masking factor, the pseudo-random watermark sequence can be accurately embedded into the target image, resulting in an anti-counterfeiting image containing the pseudo-random watermark sequence that is visually almost indistinguishable from the target image.
[0036] Furthermore, the method of embedding the pseudo-random watermark sequence into the target image includes additive modulation; the calculation expression for additive modulation is: In the formula, This refers to the anti-counterfeiting image. Represents the target image. This represents the embedding strength factor. This refers to the pseudo-random watermark sequence. This represents the local masking factor.
[0037] Furthermore, the method of embedding the pseudo-random watermark sequence into the target image also includes multiplicative modulation; the calculation expression for the multiplicative modulation is: In the formula, This refers to the anti-counterfeiting image. Represents the target image. This represents the embedding strength factor. This refers to the pseudo-random watermark sequence. This represents the local masking factor.
[0038] Specifically, by using additive or multiplicative modulation, the pseudo-random watermark sequence is superimposed onto the selected pixel grayscale value or transform domain coefficients, ensuring that the signal-to-noise ratio is far below the visual perception threshold of the human eye, so that the generated anti-counterfeiting image is completely consistent with the target image in subjective visual perception.
[0039] For example, in one embodiment, additive modulation is applied to the collar area with uniform grayscale values in a black and white text ID photo. It can be set to 0.008, the local masking factor. The value is fixed at 0.05 to ensure that the amount of modification is below the threshold of the human eye.
[0040] For example, in one embodiment, multiplicative modulation is applied to tree texture areas in a passport photo with a landscape background. It can be set to 0.015, the local masking factor. The pseudo-random watermark sequence is dynamically adjusted based on texture complexity (0.1~0.3) to improve its quality. Survival rate in complex areas.
[0041] The embodiments of the present invention, through additive modulation, can ensure precise control and low computational complexity when embedding pseudo-random watermark sequences in gray-uniform regions, thereby improving embedding efficiency and accuracy; through multiplicative modulation, the robustness of pseudo-random watermark sequences in textured regions can be improved, embedding distortion can be reduced, nonlinear distortion caused by printing and scanning can be resisted, and anti-counterfeiting reliability can be improved.
[0042] Furthermore, the method further includes performing anti-counterfeiting verification on the anti-counterfeiting image; the anti-counterfeiting verification further includes: The anti-counterfeiting image is preprocessed to obtain a standard image; the preprocessing includes one or more of geometric correction, color correction, and noise reduction. The cross-correlation value is obtained by performing a cross-correlation calculation between the pixel values of the pseudo-random watermark sequence and the standard image; Based on the cross-correlation value, the verification result of the anti-counterfeiting verification is obtained.
[0043] Specifically, the high-precision physical reproduction of the designed low-noise watermark works by transferring the precise, sub-visual threshold grayscale adjustments from the digital image onto a physical medium without loss or with minimal loss. The equipment used can be a high-precision laser marking / printing system, which precisely controls the ink volume / ablation depth of each tiny area (pixel) through its grayscale response, accurately reproducing the subtle grayscale changes in the anti-counterfeiting image. Understandably, before printing, rigorous process calibration is required for the document substrate (PVC, PETG, paper, etc.) to ensure accurate grayscale mapping. The document substrate includes polyvinyl chloride (PVC), polyethylene terephthalate-1,4-cyclohexanediol (PETG), or paper, etc. On the physical document after generating the anti-counterfeiting image, there are no visible abnormalities, meaning its authenticity cannot be determined by appearance, thus achieving a concealed anti-counterfeiting effect.
[0044] When verifying anti-counterfeiting images, the physical document is first photographed using an image acquisition device (such as a document scanner or camera with fixed lighting, focal length, and resolution) to capture the anti-counterfeiting image while minimizing introduced distortion and noise.
[0045] The acquired anti-counterfeiting images are preprocessed to obtain standard images. Preprocessing can include one or more operations such as geometric correction (e.g., perspective transformation), color correction, and noise reduction (e.g., fast Fourier transform, Gaussian filtering, mean filtering).
[0046] Using a known pseudo-random watermark sequence for embedding as a key, the cross-correlation value Corr is calculated between the key and the pixel values of any image patch in the standard image, as shown in the following expression: Corr = Sum[(image patch - mean gray level of image patch) × key] / (estimated standard deviation of image patch) In the formula, Sum represents summing all results obtained after pixel-by-pixel multiplication. In the above expression, the image after subtracting the grayscale mean is first multiplied pixel-by-pixel with the known key. If a pseudo-random watermark sequence exists and is aligned, the pseudo-random watermark sequence will amplify the hidden signal in the image, producing a large positive or negative value. Then, all results obtained after pixel-by-pixel multiplication are summed, accumulating the weak signal responses within the entire image block to form the overall correlation measure. Finally, the summation result is normalized by dividing by the estimated standard deviation of the image block, eliminating the influence of image contrast differences on the correlation value, so that the final cross-correlation value Corr is normalized to a stable range (e.g., between -1 and 1), thus allowing the setting of a uniform decision threshold (e.g., T=0.5) to determine whether the anti-counterfeiting verification passes.
[0047] Further, obtaining the verification result of the anti-counterfeiting verification based on the cross-correlation value includes: If the absolute value of the cross-correlation value is greater than or equal to a preset threshold, the verification result is considered successful. If the absolute value of the cross-correlation value is less than the preset threshold, the verification result is a verification failure.
[0048] Specifically, if the pseudo-random watermark sequence exists and is intact, a sharp peak (correlation peak) appears at the embedding position of the pseudo-random watermark sequence, which is the cross-correlation value. If the absolute value of the cross-correlation value is greater than or equal to a preset threshold, it indicates that the pseudo-random watermark sequence exists and is intact, the detected target document has not been forged, and the verification result is verification passed; if the absolute value of the cross-correlation value is less than the preset threshold, it indicates that the pseudo-random watermark sequence does not exist or has been forged, the detected target document is a forged document, and the verification result is verification failed.
[0049] This invention achieves anti-counterfeiting verification of target documents through automated and highly reliable machine interpretation. It can automatically identify image tampering, enhance the objectivity and efficiency of verification results, adapt to the verification needs of different security levels, and improve the reliability and efficiency of anti-counterfeiting verification.
[0050] Based on the above embodiments, the pseudo-random watermark sequence in the embodiments of the present invention has good resistance to attacks or tampering in the following aspects: First, the pseudo-random watermark sequence, once embedded in the target image of the document, can resist copying / scanning attacks. Understandably, analog or digital copying / scanning processes introduce severe nonlinear distortion, resolution degradation, additive noise, color shift, and geometric deformation. These operations disrupt the precisely modulated pixel relationships in the original image, thus destroying the delicate balance between the watermark signal (i.e., the pseudo-random watermark sequence) and the target image, and consequently, the spatial synchronization and numerical accuracy of the pseudo-random watermark sequence within the target image. This results in significantly weakened, broadened, or submerged correlation peaks in noise, leading to an absolute value of the cross-correlation value falling below a preset threshold, verification failure, and exposure of forgery.
[0051] Secondly, it can resist image tampering. Any modification to a specific image area of the document will directly destroy the watermark signal in that area, causing local or overall anti-counterfeiting verification to fail.
[0052] Finally, it can also resist key forgery attacks. Without knowing the correct pseudo-random watermark sequence (key), attackers cannot generate strong correlation peaks for forgery verification. Attempts to use random or incorrect sequences for correlation detection will yield results indistinguishable from noise, also leading to verification failure.
[0053] The following describes the pixel-based optical watermark anti-counterfeiting device provided by the present invention. The pixel-based optical watermark anti-counterfeiting device described below can be referred to in correspondence with the pixel-based optical watermark anti-counterfeiting method described above.
[0054] Figure 2 This is a schematic diagram of the structure of the optical watermark anti-counterfeiting device based on pixel fine-tuning provided by the present invention, as shown below. Figure 2 As shown. This embodiment of the invention provides an optical watermark anti-counterfeiting device based on pixel fine-tuning, comprising a determining module 201, an encoding module 202, and a generating module 203, wherein: The determining module 201 is used to determine the target image from the target document; the encoding module 202 is used to perform spread spectrum encoding on the preset anti-counterfeiting information to generate a pseudo-random watermark sequence; the generating module 203 is used to embed the pseudo-random watermark sequence into the target image based on a preset embedding strength factor to generate an anti-counterfeiting image.
[0055] This invention provides an optical watermark anti-counterfeiting device based on pixel fine-tuning. It determines a target image from a target document; spreads and encodes preset anti-counterfeiting information to generate a pseudo-random watermark sequence; then, through spread spectrum technology, converts the anti-counterfeiting information into a pseudo-random noise signal, improving the watermark's concealment and anti-interference capability; based on a preset embedding strength factor, the pseudo-random watermark sequence is embedded into the target image to generate an anti-counterfeiting image. This achieves information hiding that is imperceptible to the human eye through a controllable embedding strength factor, while facilitating automated verification, thus improving the concealment, reliability, and verification efficiency of document anti-counterfeiting.
[0056] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a pixel-based fine-tuning optical watermarking anti-counterfeiting method, which includes: Identify the target image from the target document; The preset anti-counterfeiting information is spread spectrum encoded to generate a pseudo-random watermark sequence; Based on a preset embedding strength factor, the pseudo-random watermark sequence is embedded into the target image to generate an anti-counterfeiting image.
[0057] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0058] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the pixel-based optical watermark anti-counterfeiting method provided by the above methods, the method comprising: Identify the target image from the target document; The preset anti-counterfeiting information is spread spectrum encoded to generate a pseudo-random watermark sequence; Based on a preset embedding strength factor, the pseudo-random watermark sequence is embedded into the target image to generate an anti-counterfeiting image.
[0059] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the pixel-based optical watermarking anti-counterfeiting method provided by the methods described above, the method comprising: Identify the target image from the target document; The preset anti-counterfeiting information is spread spectrum encoded to generate a pseudo-random watermark sequence; Based on a preset embedding strength factor, the pseudo-random watermark sequence is embedded into the target image to generate an anti-counterfeiting image.
[0060] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0061] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0062] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0063] In this application's embodiments, "determine B based on A" means that factor A must be considered when determining B. It is not limited to "B can be determined based solely on A," but should also include: "determine B based on A and C," "determine B based on A, C, and E," "determine C based on A, and further determine B based on C," etc. Additionally, it can include using A as a condition for determining B, for example, "when A meets the first condition, determine B using the first method"; another example, "when A meets the second condition, determine B," etc.; another example, "when A meets the third condition, determine B based on the first parameter," etc. Of course, it can also be a condition where A is a factor in determining B, for example, "when A meets the first condition, determine C using the first method, and further determine B based on C," etc.
[0064] It should also be noted that the terms "target," "first," and "second" in this invention are used to distinguish similar objects, not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, without limiting the number of objects; for example, the first object can be one or more.
[0065] In this invention, the term "multiple" refers to two or more kinds, and other quantifiers are similar.
[0066] 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A pixel-fine-tuning-based optical watermarking anti-counterfeiting method, characterized in that, include: Identify the target image from the target document; The preset anti-counterfeiting information is spread spectrum encoded to generate a pseudo-random watermark sequence; Based on a preset embedding strength factor, the pseudo-random watermark sequence is embedded into the target image to generate an anti-counterfeiting image.
2. The optical watermark anti-counterfeiting method based on pixel fine-tuning according to claim 1, characterized in that, The step of embedding the pseudo-random watermark sequence into the target image based on a preset embedding strength factor includes: The target image is divided into multiple different image blocks; Using a human visual system model, the local masking factor for each pixel in each image patch is calculated. Based on the embedding strength factor and the local masking factor, the pseudo-random watermark sequence is embedded into the target image.
3. The optical watermark anti-counterfeiting method based on pixel fine-tuning according to claim 2, characterized in that, The method of embedding the pseudo-random watermark sequence into the target image includes additive modulation; the calculation expression for additive modulation is: In the formula, This refers to the anti-counterfeiting image. Represents the target image. This represents the embedding strength factor. This refers to the pseudo-random watermark sequence. This represents the local masking factor.
4. The optical watermark anti-counterfeiting method based on pixel fine-tuning according to claim 2, characterized in that, The method of embedding the pseudo-random watermark sequence into the target image further includes multiplicative modulation; the calculation expression for multiplicative modulation is: In the formula, This refers to the anti-counterfeiting image. Represents the target image. This represents the embedding strength factor. This refers to the pseudo-random watermark sequence. This represents the local masking factor.
5. The optical watermark anti-counterfeiting method based on pixel fine-tuning according to claim 1, characterized in that, The method further includes performing anti-counterfeiting verification on the anti-counterfeiting image; The anti-counterfeiting verification further includes: The anti-counterfeiting image is preprocessed to obtain a standard image; the preprocessing includes one or more of geometric correction, color correction, and noise reduction. The cross-correlation value is obtained by performing a cross-correlation calculation between the pixel values of the pseudo-random watermark sequence and the standard image; Based on the cross-correlation value, the verification result of the anti-counterfeiting verification is obtained.
6. The optical watermark anti-counterfeiting method based on pixel fine-tuning according to claim 5, characterized in that, The step of obtaining the verification result of the anti-counterfeiting verification based on the cross-correlation value includes: If the absolute value of the cross-correlation value is greater than or equal to a preset threshold, the verification result is considered successful. If the absolute value of the cross-correlation value is less than the preset threshold, the verification result is a verification failure.
7. An optical watermark anti-counterfeiting device based on pixel fine-tuning, characterized in that, include: The determination module is used to determine the target image from the target document; The encoding module is used to spread spectrum encode the preset anti-counterfeiting information to generate a pseudo-random watermark sequence; The generation module is used to embed the pseudo-random watermark sequence into the target image based on a preset embedding strength factor to generate an anti-counterfeiting image.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the optical watermark anti-counterfeiting method based on pixel fine-tuning as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the pixel-based optical watermark anti-counterfeiting method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the pixel-based optical watermark anti-counterfeiting method as described in any one of claims 1 to 6.