Method for printing colored anti-counterfeiting image by using colorless fluorescent ink
By using anti-counterfeiting generative adversarial networks and color correction models, combined with quality index functions, the influence of substrate background color on printing results was resolved, achieving high-quality color anti-counterfeiting image printing and improving the security of anti-counterfeiting codes and printing effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies for printing color anti-counterfeiting images with colorless fluorescent inks fail to effectively consider the influence of the substrate's background color on the printing results and lack the ability to detect the quality of the printed image, resulting in poor anti-counterfeiting performance.
A dual encryption method using an anti-counterfeiting generative adversarial network is employed, combined with a color correction model and a quality index function. The printing results are collected using a counterfeit detection light source for quality assessment, ensuring that the printing quality meets the standards.
It improves the security of anti-counterfeiting codes, reduces printing color differences, achieves high-quality color anti-counterfeiting image printing, and enhances the anti-counterfeiting effect.
Smart Images

Figure CN121848844A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of colorless fluorescent ink printing technology, specifically a method for printing color anti-counterfeiting images using colorless fluorescent ink. Background Technology
[0002] Colorless fluorescent inks, due to their characteristic of being visible only under specific light sources, are widely used in anti-counterfeiting fields, such as printing on certificates, banknotes, and receipts, effectively ensuring the authenticity and security of these important items. With the development of the commodity economy and the intensification of market competition, the problem of counterfeit and substandard products has become increasingly prominent, seriously damaging consumers' legitimate rights and interests, disrupting fair market competition, and causing significant losses to companies' brand image and economic benefits. Therefore, the diversification of anti-counterfeiting technologies is particularly important. Further utilizing colorless fluorescent inks to print anti-counterfeiting images can form a dual anti-counterfeiting mechanism, providing additional security for anti-counterfeiting verification.
[0003] Currently, there are still some shortcomings in the existing patented methods for image printing. For example, patent publication number CN108460716B provides a method for digital watermarking of spot color printed images. This invention uses wavelet transform and singular value decomposition to embed the digital signature and the Arnold scrambled encrypted watermark image into the carrier image, and designs a stage correction model to correct the watermarked image and verify the digital signature, thereby improving the robustness of the digital signature and watermark.
[0004] Patent publication number CN114298251B provides a method for printing anti-counterfeiting images, which decomposes the YMCK image of the target image into a YMC channel image and a K channel image, which are used as the first processed image and the second processed image, respectively, and printed on designated positions to form anti-counterfeiting images, thereby improving image clarity and anti-counterfeiting performance.
[0005] In addition, the prior art with patent publication number CN115293312B provides an anti-counterfeiting method. This invention can generate a target micro-coded image based on the ink dot spacing, ink dot size and the background of the color image to be printed, and then overlay it as an anti-counterfeiting code and the background of the color image onto the surface of the substrate, which effectively hides the anti-counterfeiting code and improves the anti-counterfeiting performance.
[0006] The patents mentioned above are based solely on the generation and processing of watermark or anti-counterfeiting images, without considering the influence of the substrate's background color on the printing result, nor do they inspect the quality of the printed image. To address these issues, this invention proposes a method for printing color anti-counterfeiting images using colorless fluorescent ink. Summary of the Invention
[0007] The purpose of this invention is to provide a method for printing color anti-counterfeiting images using colorless fluorescent ink, thereby ensuring the reliability of products or important items. To address the problems existing in the prior art, this invention provides the following technical solutions: First, to obtain the anti-counterfeiting code, an anti-counterfeiting generative adversarial network (GAN) is proposed. This model uses a dual encryption method with an encryption key and an encoder to improve the security of the anti-counterfeiting code. Second, to make the printed anti-counterfeiting image closer to the ideal anti-counterfeiting image, this invention designs a color correction model. This model adjusts the color of the image to be printed based on the substrate background color and the anti-counterfeiting image color, thereby improving the visual effect of the anti-counterfeiting image. Finally, this invention proposes a quality index function to perform quality screening on the printing results under the authentication light source, and reprints the finished products that fail to meet the quality standards.
[0008] The method for printing color anti-counterfeiting images using colorless fluorescent ink includes the following specific steps:
[0009] Obtain the parameters of the substrate and collect the data of the area to be printed; wherein, the substrate parameters include: the name, material and serial number of the substrate, and the data of the area to be printed includes: the coordinates of the area to be printed and the background image of the area to be printed;
[0010] Input the substrate parameters into the anti-counterfeiting generative adversarial network to obtain the corresponding anti-counterfeiting code, and combine the anti-counterfeiting color image of the substrate and the corresponding anti-counterfeiting code into an ideal anti-counterfeiting image;
[0011] The ideal anti-counterfeiting image and the background image of the area to be printed are input into the tone correction model to further obtain the anti-counterfeiting image to be printed;
[0012] Based on the information of the area to be printed, the anti-counterfeiting image to be printed is adjusted, and the adjusted anti-counterfeiting image is printed onto the area to be printed on the substrate.
[0013] The anti-counterfeiting image is acquired by illuminating the area to be printed with an anti-counterfeiting light source, and the background of the substrate is removed using a cutout model to obtain a pure anti-counterfeiting image after printing; wherein, the anti-counterfeiting light source includes: ultraviolet light and infrared light.
[0014] Based on the printed pure anti-counterfeiting image and the ideal anti-counterfeiting image, the printing result is evaluated by calculating a quality index function.
[0015] Preferably, the process of acquiring the data of the area to be printed includes:
[0016] A rectangular area to be printed is selected on the surface of the printing substrate: with the lower left corner of the printing surface of the printing substrate as the origin, the coordinates of the area to be printed are (x, y, x+w, y+h); where (x, y) represents the coordinates of the lower left corner of the area to be printed, (x+w, y+h) represents the coordinates of the upper right corner of the area to be printed, and h and w represent the height and width of the area to be printed, respectively.
[0017] Acquire the background image of the area to be printed: Use a device to capture a color image of the printing surface of the substrate, and crop and correct the position of the captured color image of the substrate according to the coordinates of the area to be printed to obtain the background image of the area to be printed.
[0018] Preferably, the anti-counterfeiting generation adversarial network includes: a data processing module, a generator, and a discriminator;
[0019] The substrate parameters are input into the data processing module, and standard parameter data are obtained through data preprocessing; wherein, data preprocessing includes: format calibration, missing value handling and digitization processing;
[0020] Input the standard parameter data into the generator, generate anti-counterfeiting code through the first generator, and use the second generator to simulate the decoding process to obtain pseudo parameter data;
[0021] The anti-counterfeiting code and the real anti-counterfeiting code sample are input into the discriminator to determine their authenticity, and the pseudo parameter data is compared with the standard parameters to constrain the decoding process.
[0022] Preferably, the specific implementation process of the data processing module includes:
[0023] Adjust the data format of the substrate parameters, changing the format of all parameters to string format to obtain the substrate parameter string;
[0024] Verify the data integrity of the substrate parameter string and fill in any missing values to obtain the complete substrate parameters;
[0025] The complete substrate parameters are digitized by dividing them into n groups, each group corresponding to one substrate parameter. Then, each group of strings is converted into a symmetric matrix, with the values at the diagonal positions of the matrix corresponding to individual characters in the string. Finally, the character parameters in the matrix are converted into numerical values using ASCII codes to obtain standard parameter data.
[0026] Preferably, the generator includes: an encryption unit, an encoder, a decryption unit, and a decoder;
[0027] The standard parameter data X is input into the encryption unit, a key matrix K of the same dimension is randomly generated, and the key matrix is decomposed into two different symmetric matrices T and V:
[0028] K = T × V;
[0029] Using the above matrices as the encryption key for the encryption unit and the decryption key for the decryption unit, respectively, the specific formula for the encryption process is as follows:
[0030]
[0031] here, Let T represent the encryption matrix, and T be the encryption key matrix. The encryption matrix is then input into the encoder for secondary encryption to obtain the anti-counterfeiting code, as shown in the following formula:
[0032]
[0033] Wherein, E represents the anti-counterfeiting code; G1() indicates that the first generator includes the encryption unit and the encoder; Encoder() represents the encoder;
[0034] Based on the anti-counterfeiting code, a decryption matrix is obtained by using a decoder. The decryption matrix is then decrypted a second time using the aforementioned decryption key to generate pseudo-parameter data. The specific formula is as follows:
[0035]
[0036] in, G2() represents the pseudo-parameter data; G2() indicates that the second generator contains the decryption unit and the decoder; V is the decryption key matrix.
[0037] Preferably, the implementation process of the discriminator includes:
[0038] The anti-counterfeiting code and a genuine anti-counterfeiting code sample are input into the discriminator to further determine the authenticity of the anti-counterfeiting code; adversarial loss is used to constrain the discrimination result, making the output of the first generator closer to the distribution of genuine anti-counterfeiting codes; wherein, the specific formula for adversarial loss is expressed as:
[0039] L D (E,Y)=log(D(Y))+log(1-D(E));
[0040] Here, E represents the anti-counterfeiting code; Y represents the real anti-counterfeiting code sample; D() represents the discriminator; log() represents the logarithmic function;
[0041] Next, the implementation process of the first generator and the second generator is constrained using the cycle consistency loss function, the specific function formula of which is as follows:
[0042]
[0043] in, X represents the pseudo-parameter data; X represents the standard parameter data. This represents a first-order encryption matrix obtained by passing the standard parameter data through an encryption unit; This represents the decryption matrix obtained by the decoder after the anti-counterfeiting code is processed; This represents the pseudo-anti-counterfeiting code obtained by the pseudo-parameter data through the first generator; ||·||1 represents the first norm.
[0044] Preferably, the tone correction model includes:
[0045] Color adjustment is performed using the spectral emission principle of monochromatic fluorescent ink to obtain the desired hue for the anti-counterfeiting image; wherein, the monochromatic fluorescent ink includes red, green, and blue, and the spectral emissivity of the i-th monochromatic fluorescent ink at a specific wavelength λ is F. i (λ), then the specific formula for the spectral emissivity after color matching with different monochromatic fluorescent inks is:
[0046]
[0047] Here, 'c' represents the number of types of monochrome fluorescent inks used in color mixing; u i This indicates the proportion of the i-th type of monochrome fluorescent ink used;
[0048] Based on the anti-counterfeiting image and the background image of the area to be printed, the color is adjusted using the monochrome fluorescent ink to obtain the spectral reflectance of the anti-counterfeiting image to be printed, expressed by the following formula:
[0049] R(λ)=R base (λ)+αF(λ)·I(λ);
[0050] Where R(λ) represents the reflectance of the image to be printed at wavelength λ; R base (λ) represents the reflectivity of the substrate at wavelength λ; α refers to the reflectivity of the fluorescent ink to the incident light source; I(λ) represents the intensity of the incident light.
[0051] Based on the imaging principle of a color camera, the relationship between reflectivity and image pixel values is obtained, and a tone correction model is further established to obtain the final anti-counterfeiting image to be printed; wherein, the specific formula of the tone correction model is:
[0052]
[0053] U = relu(K2*Z);
[0054] Z change = (I-ΔI)×F;
[0055] here, This refers to the anti-counterfeiting image to be printed; This represents the background image of the area to be printed; K1 and K2 represent the anti-counterfeiting image; K1 and K2 represent the learning weights; U represents the proportion matrix of the monochrome fluorescent ink. Represents the reflectance matrix of c types of monochromatic fluorescent inks; The illumination intensity of the counterfeit detection light source; N represents the perturbation of illumination intensity at different pixel locations in the image; Z This represents the noise interference in the model, including white noise and Gaussian noise.
[0056] Preferably, a constraint that the ratio sum is one is introduced for the ratio matrix of the monochromatic fluorescent ink to limit the usage ratio of the monochromatic fluorescent ink at the same pixel position; based on this constraint, a corresponding loss function is further designed, the specific formula of which is:
[0057] L sum (U)=||1 HW -U×1 c ||1;
[0058] Where U represents the proportion matrix of the monochromatic fluorescent ink, 1 HW This represents a matrix of dimension H×W, 1 c This represents a matrix of dimension c; ||·||1 denotes the 1-norm.
[0059] Furthermore, the structural consistency loss is used to calculate the structural similarity between the anti-counterfeiting image to be printed and the anti-counterfeiting image, providing a quantitative metric to optimize the model's accuracy; the specific formula for the structural consistency loss is as follows:
[0060]
[0061] here, Z represents the anti-counterfeiting image to be printed and the ideal anti-counterfeiting image, respectively; SSIM() represents the structural similarity index.
[0062] Preferably, the adjustment process of the anti-counterfeiting image to be printed includes:
[0063] Based on the coordinates (x, y, x+w, y+h) of the area to be printed, calculate the coordinates of the anti-counterfeiting image to be printed; let the height and width of the anti-counterfeiting image to be printed be H and W respectively, then the calculation formula is as follows:
[0064]
[0065] x1 = x, x2 = x + β·W;
[0066] y1=y, y2=y+β·H;
[0067] Where β is the scaling factor of the anti-counterfeiting image to be printed; Min() represents the function for calculating the minimum value; (x1,y1) represents the coordinates of the lower left corner of the anti-counterfeiting image to be printed; (x2,y2) represents the coordinates of the upper right corner of the anti-counterfeiting image to be printed.
[0068] Therefore, the coordinates of the anti-counterfeiting image to be printed are calculated as (x, y, x+β·W, y+β·H), and the anti-counterfeiting image to be printed is scaled and positioned according to these coordinates.
[0069] Preferably, the process of implementing the quality assessment includes:
[0070] Based on the printed pure anti-counterfeiting image and the ideal anti-counterfeiting image, a quality index is calculated and a passing threshold is set. If the quality index exceeds the passing threshold, the printing quality is considered acceptable; otherwise, the printing quality is considered unacceptable, and an image of the printed area of the substrate after printing is acquired as the image of the area to be printed, and then fed back into the color correction model for color calibration and printing. The formula for the quality index is:
[0071]
[0072] Where Edge() represents the edge quality assessment function; SSIM() represents the structural similarity quality assessment function; Z represents the printed pure anti-counterfeiting image and the ideal anti-counterfeiting image, respectively; DWT() represents the discrete wavelet transform operation; ||·||1 represents the first norm.
[0073] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0074] 1. This invention proposes an anti-counterfeiting generative adversarial network (GAN) that performs double encryption based on relevant parameters of the printing substrate. The model uses a first generator to double-encrypt standard parameter data to obtain an anti-counterfeiting code. Then, a second generator decodes the anti-counterfeiting code to obtain pseudo-parameter data. Finally, a discriminator determines the authenticity of the anti-counterfeiting code and a real anti-counterfeiting code sample, and a loss function is constructed to optimize the model. By designing a double encryption operation, the GAN avoids the problem of anti-counterfeiting code leakage caused by a single encryption process, thus improving the security of the anti-counterfeiting code.
[0075] 2. This invention designs a tone correction model. The model uses the image of the area to be printed on the substrate as the background color. Based on the principle of spectral reflection and camera imaging, the model is built. Then, different monochrome fluorescent inks are used to perform tone correction processing on the ideal anti-counterfeiting image, so as to print a result that is close to the ideal anti-counterfeiting image.
[0076] 3. This invention proposes a printing quality inspection mechanism. This mechanism first acquires the anti-counterfeiting image after printing by illuminating it with a counterfeit-detection light source. Then, it crops and extracts the pure anti-counterfeiting image and calculates the quality index between the pure anti-counterfeiting image and the ideal anti-counterfeiting image, thereby controlling the printing quality. This printing quality inspection mechanism performs quality checks on the printed products. This not only promptly filters out anti-counterfeiting images with unclear printing textures or inconsistent colors, but also allows for the reprinting of substandard products, which helps improve the anti-counterfeiting effect. Attached Figure Description
[0077] Figure 1 A flowchart of a method for printing color anti-counterfeiting images using colorless fluorescent ink provided in an embodiment of the present invention;
[0078] Figure 2 A schematic diagram of the exemplary printing area of the substrate provided for embodiments of the present invention;
[0079] Figure 3 A diagram of the anti-counterfeiting generative adversarial network structure provided for embodiments of the present invention;
[0080] Figure 4 A structural diagram of a tone correction model provided for an embodiment of the present invention. Detailed Implementation
[0081] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0082] Anti-counterfeiting technology can effectively prevent the circulation of counterfeit and substandard products, ensuring that consumers purchase genuine products and thus avoiding economic losses and health risks. However, the printing process of color anti-counterfeiting images is complex and requires strict control. It necessitates the selection of suitable printing technology and high-quality printing equipment, as well as rigorous control over color matching and printing quality control during the printing process to avoid quality problems such as color difference and blurring.
[0083] To address the aforementioned problems, this invention proposes a method for printing color anti-counterfeiting images using colorless fluorescent ink. This method involves color correction of the anti-counterfeiting image to be printed and control over the printing quality, achieving high-quality printing and efficient anti-counterfeiting. To illustrate the effectiveness of this method, detailed implementation information is provided below with reference to the accompanying drawings of the embodiments.
[0084] Example 1
[0085] This application discloses a method for printing color anti-counterfeiting images using colorless fluorescent ink, so as to achieve the printing of anti-counterfeiting images on flexible material substrates. (See attached document.) Figure 1 The specific steps of the method proposed in this invention include: S1. Obtaining the parameters of the substrate and collecting data of the area to be printed; S2. Generating anti-counterfeiting codes based on anti-counterfeiting generative adversarial networks; S3. Generating anti-counterfeiting images to be printed based on tone correction models; S4. Adjusting the anti-counterfeiting images to be printed; S5. Collecting the printed anti-counterfeiting images and removing the background; S6. Evaluating the quality of the printing results and returning unqualified images to step S3.
[0086] Further, parameters of the flexible substrate are obtained, and data of the area to be printed is collected, corresponding to step S1 above; wherein, the flexible substrate includes: paper and textiles; the parameters of the flexible substrate include: the name, material, and serial number of the flexible substrate, and the data of the area to be printed includes: the coordinates of the area to be printed and the background image of the area to be printed; the specific process of collecting the data of the area to be printed includes:
[0087] Select a rectangular area to be printed on the surface of the flexible substrate: See Figure 2 With the lower left corner of the printing surface of the flexible substrate as the origin of the coordinate system, let the coordinates of the area to be printed be (x, y, x+w, y+h); where (x, y) represents the coordinates of the lower left corner of the area to be printed, (x+w, y+h) represents the coordinates of the upper right corner of the area to be printed, and h and w represent the height and width of the area to be printed, respectively.
[0088] Acquire the background image of the area to be printed: Use a device to capture a color image of the printing surface of the flexible substrate, and crop and correct the position of the captured color image of the flexible substrate according to the coordinates of the area to be printed to obtain the background image of the area to be printed.
[0089] This application embodiment selects the area to be printed on the substrate and details the process of acquiring the background image of the area to be printed. Providing the coordinates of the area to be printed not only facilitates subsequent adjustments to the anti-counterfeiting image to be printed but also provides convenience for the printing process; by acquiring and correcting the background image of the area to be printed on the substrate, a data foundation is provided for subsequent color adjustments to the ideal anti-counterfeiting image.
[0090] Further, corresponding to step S2 above, the parameters of the flexible substrate are input into the anti-counterfeiting generative adversarial network to obtain the corresponding anti-counterfeiting code, and the anti-counterfeiting color image of the flexible substrate and the corresponding anti-counterfeiting code are combined to form an ideal anti-counterfeiting image; see reference. Figure 3 The specific implementation process of the anti-counterfeiting generative adversarial network is as follows:
[0091] The parameters of the flexible substrate are input to the data processing module, and standard parameter data are obtained through data preprocessing; wherein, the data processing module includes:
[0092] Adjust the data format of the flexible substrate parameters by changing the format of all parameters to string format and deleting irrelevant symbols to obtain the flexible substrate parameter string; wherein, the irrelevant symbols include: Chinese and English punctuation marks, spaces, newlines and tabs, etc.
[0093] Verify the data integrity of the flexible substrate parameter string and fill in all missing values to obtain complete flexible substrate parameters; wherein, the filling operation is a manual filling method;
[0094] The complete flexible substrate parameters are digitized by dividing them into n groups, each group corresponding to one flexible substrate parameter. Then, each string is converted into a symmetric matrix, with the value at the diagonal position of the matrix corresponding to a single character in the string. Finally, the character parameters in the matrix are converted into numerical values using ASCII codes to obtain standard parameter data.
[0095] This application embodiment preprocesses the substrate parameters to facilitate the subsequent acquisition of anti-counterfeiting codes. This data processing includes format adjustment, missing value handling, and digitization. The acquired substrate parameters may have inconsistent formats, which can lead to incorrect anti-counterfeiting codes. Therefore, adjusting the data format is crucial for subsequent data encoding. Manually completing the substrate parameters improves the accuracy of the parameter data and increases the complexity of the anti-counterfeiting code. Furthermore, digitizing the substrate parameters facilitates the subsequent encryption and encoding processes.
[0096] Further, the standard parameter data is input into the generator, the first generator generates an anti-counterfeiting code, and the second generator simulates the decoding process to obtain pseudo-parameter data; wherein, the generator implementation process is as follows:
[0097] The standard parameter data X is input into the encryption unit, and a key matrix K of the same dimension is randomly generated. This key matrix can be decomposed into two different symmetric matrices T and V:
[0098] K = T × V;
[0099] Using the above matrices as the encryption key for the encryption unit and the decryption key for the decryption unit, respectively, the specific formula for the encryption process is as follows:
[0100]
[0101] here, Let T be the encryption matrix, and T be the encryption key matrix. The encryption matrix is input into the encoder for secondary encryption to obtain the anti-counterfeiting code. The encoder is a convolutional neural network. The specific formula for the encryption process is as follows:
[0102]
[0103] Here, E represents the anti-counterfeiting code; G1() indicates that the first generator includes the encryption unit and the encoder; Encoder() represents the encoder;
[0104] Based on the anti-counterfeiting code, a decryption matrix is obtained by using a decoder. The decryption matrix is subjected to a second decryption operation based on the aforementioned decryption key to generate pseudo-parameter data; wherein, the decoder is a convolutional neural network; the specific formula for the above decoding process is as follows:
[0105]
[0106] here, G2() represents the pseudo-parameter data; G2() indicates that the second generator contains the decryption unit and the decoder; V is the decryption key matrix.
[0107] This application embodiment uses a first generator to perform dual encoding on standard parameter data, and then uses a second generator to decode the anti-counterfeiting code. This dual encoding operation mainly employs a symmetric encryption key matrix and an encoder network to achieve a dual encryption process, avoiding the leakage of the anti-counterfeiting code due to a single encryption process and improving the security of the anti-counterfeiting code. The second generator can serve as a verification step for the anti-counterfeiting code, further enhancing its reliability.
[0108] Furthermore, the anti-counterfeiting code and the genuine anti-counterfeiting code sample are input into a discriminator to determine their authenticity, and the pseudo-parameter data is compared with the standard parameters to constrain the decoding process; wherein, the discriminator implementation process includes:
[0109] The anti-counterfeiting code and the real anti-counterfeiting code sample are input into the discriminator, and the discrimination result is constrained by adversarial loss, so that the output of the first generator is closer to the distribution of the real anti-counterfeiting code; wherein, the specific formula of the adversarial loss function is:
[0110] L D (E,Y)=log(D(Y))+log(1-D(E));
[0111] Here, E represents the anti-counterfeiting code; Y represents the real anti-counterfeiting code sample; D() represents the discriminator; log() represents the logarithmic function;
[0112] Next, the implementation process of the first generator and the second generator is constrained using the cycle consistency loss function, the specific function formula of which is as follows:
[0113]
[0114] in, X represents the pseudo-parameter data; X represents the standard parameter data. This represents a first-order encryption matrix obtained by passing the standard parameter data through an encryption unit; This represents the decryption matrix obtained by the decoder after the anti-counterfeiting code is processed; This represents the pseudo-anti-counterfeiting code obtained by the pseudo-parameter data through the first generator; ||·||1 represents the first norm.
[0115] This application utilizes a discriminator to judge the anti-counterfeiting code and supervises the encoding and decoding processes through adversarial loss and cycle consistency loss. The adversarial loss restricts the discriminator results between the anti-counterfeiting code and real samples, enabling the first generator to generate anti-counterfeiting codes that are closer to the real distribution, thereby maintaining the uniformity of the anti-counterfeiting code format; while the cycle consistency loss imposes consistency constraints on the encoding and decoding processes respectively, accelerating the network optimization speed and improving the accuracy of the generator output results.
[0116] This application embodiment uses a generative adversarial network (GAN) to encode the substrate parameters for anti-counterfeiting purposes. This network adjusts and digitizes the substrate parameters through data processing, improving the accuracy of subsequent encoding results. Next, a first generator is used for double encryption encoding, which increases the complexity of the anti-counterfeiting code and improves its security. Then, a second generator is used to restore the substrate parameter data to facilitate the verification of the anti-counterfeiting code. Finally, the network is optimized through a discriminator and a loss function, making the generated anti-counterfeiting code closer to the distribution of real data, thereby improving the reliability of the anti-counterfeiting code.
[0117] Further, the ideal anti-counterfeiting image and the background image of the area to be printed are input into the tone correction model to obtain the anti-counterfeiting image to be printed, corresponding to... Figure 1 The S3 step, specifically the color matching process, includes:
[0118] Color adjustment is performed using the spectral emission principle of monochromatic fluorescent ink to obtain the desired hue for the anti-counterfeiting image; wherein, the monochromatic fluorescent ink includes red, green, and blue, and the spectral emissivity of the i-th monochromatic fluorescent ink at a specific wavelength λ is F. i (λ), then the specific formula for the spectral emissivity after color matching with different monochromatic fluorescent inks is:
[0119]
[0120] Here, 'c' represents the number of types of monochrome fluorescent inks used in color mixing; u i This indicates the proportion of the i-th type of monochrome fluorescent ink used;
[0121] Based on the anti-counterfeiting image and the background image of the area to be printed, the color is adjusted using the monochrome fluorescent ink to obtain the spectral reflectance of the anti-counterfeiting image to be printed. The specific formula for this process is as follows:
[0122] R(λ)=R base (λ)+αF(λ)·I(λ);
[0123] Where R(λ) represents the reflectance of the image to be printed at wavelength λ; R base (λ) represents the reflectivity of the flexible substrate at wavelength λ; α refers to the reflectivity of the fluorescent ink to the incident light source; I(λ) represents the intensity of the incident light.
[0124] Based on the imaging principle of a color camera, the relationship between reflectance and image pixel values is obtained using the following formula:
[0125] A = Q × R;
[0126] Here, A represents the color image matrix; Q represents the spectral response function matrix; and R represents the reflectance matrix.
[0127] Based on the above formula, a color correction model is further established. (See [reference needed]) Figure 4 The final anti-counterfeiting image to be printed is obtained; the specific formula of the tone correction model is:
[0128]
[0129] U = relu(K2*Z);
[0130] Z change = (I-ΔI)×F;
[0131] in, This refers to the anti-counterfeiting image to be printed; This represents the background image of the area to be printed; K1 and K2 represent the ideal anti-counterfeiting image; K1 and K2 represent the learning weights; U represents the proportion matrix of the monochrome fluorescent ink. Represents the reflectance matrix of c types of monochromatic fluorescent inks; The illumination intensity of the counterfeit detection light source; N represents the perturbation of illumination intensity at different pixel locations in the image; Z This represents the noise interference in the model, including white noise and Gaussian noise.
[0132] This application employs a color correction model to adjust the color of the anti-counterfeiting image to be printed. This model is designed based on the principles of spectral reflectance and camera imaging. Furthermore, by combining different monochrome fluorescent inks with the background color of the area to be printed, the ideal anti-counterfeiting image is color-adjusted, reducing color difference issues caused by interference from the substrate surface color, thereby maintaining the visual consistency of the anti-counterfeiting image.
[0133] Furthermore, a constraint that the ratio sum is one is introduced for the ratio matrix of the monochromatic fluorescent ink to limit the usage ratio of the monochromatic fluorescent ink at the same pixel position; based on this constraint, a corresponding loss function is designed, the specific formula of which is:
[0134] L sum (U)=||1 HW -U×1 c ||1;
[0135] Wherein, U represents the proportion matrix of the monochromatic fluorescent ink; 1 HW This represents a matrix of dimension H×W; 1 c This represents a matrix of dimension c; ||·||1 denotes the 1-norm.
[0136] Furthermore, the tone correction model also utilizes structural consistency loss to calculate the structural similarity between the anti-counterfeiting image to be printed and the anti-counterfeiting image, providing a quantitative indicator to optimize the model's accuracy; wherein, the specific formula for the structural consistency loss is:
[0137]
[0138] here, Z represents the anti-counterfeiting image to be printed and the ideal anti-counterfeiting image, respectively; SSIM() represents the structural similarity index.
[0139] This application embodiment constrains the proportions of different monochrome inks by using a sum-of-ones loss constraint, and optimizes the tone correction model using structural consistency loss, ensuring that the structural texture information of the anti-counterfeiting image to be printed remains unchanged. This sum-of-ones constraint limits the sum of the proportions of different monochrome inks in the same area, enabling fine-tuning of the color of the ideal anti-counterfeiting image and further mitigating color difference problems in printing; while the structural consistency loss preserves the structural texture information of the ideal anti-counterfeiting image, improving the accuracy of the anti-counterfeiting image to be printed.
[0140] Further, based on the information of the area to be printed, the anti-counterfeiting image to be printed is adjusted, and the adjusted anti-counterfeiting image is printed onto the area to be printed on the flexible substrate; corresponding to Figure 1 The S4 step, specifically the adjustment process, includes:
[0141] Based on the coordinates (x, y, x+w, y+h) of the area to be printed, calculate the coordinates of the anti-counterfeiting image to be printed; let the height and width of the anti-counterfeiting image to be printed be H and W respectively, then the calculation formula is as follows:
[0142]
[0143] x1 = x, x2 = x + β·W;
[0144] y1=y, y2=y+β·H;
[0145] Where β is the scaling factor of the anti-counterfeiting image to be printed; Min() represents the function for calculating the minimum value; (x1,y1) represents the coordinates of the lower left corner of the anti-counterfeiting image to be printed; (x2,y2) represents the coordinates of the upper right corner of the anti-counterfeiting image to be printed.
[0146] Therefore, the coordinates of the anti-counterfeiting image to be printed are calculated as (x, y, x+β·W, y+β·H), and the anti-counterfeiting image to be printed is scaled and positioned according to these coordinates.
[0147] This application embodiment utilizes a scaling factor to adjust the anti-counterfeiting image to be printed, ensuring that the image is accurately printed to a fixed position. This adjustment process combines the size of the anti-counterfeiting image and the area to be printed with a minimum scaling ratio to prevent distortion or exceeding the printing area after printing, thus maintaining the visual effect of the anti-counterfeiting image.
[0148] Furthermore, the anti-counterfeiting image is acquired by illuminating the printing area with a counterfeit-detection light source, and the background of the flexible substrate is removed using a cutout model to obtain a pure anti-counterfeiting image after printing; wherein, the counterfeit-detection light source includes: ultraviolet light and infrared light; corresponding to Figure 1 Step S5, the implementation process of the image matting model includes:
[0149] The printed anti-counterfeiting image is cropped at the edges and rotated to obtain a printed anti-counterfeiting image with aligned positions.
[0150] The aligned printed anti-counterfeiting image and the ideal anti-counterfeiting image are input into a collaborative saliency detection algorithm to remove the image background information, i.e., the color and texture information of the flexible substrate, to obtain the pure anti-counterfeiting image after printing; wherein, the collaborative saliency detection algorithm is a collaborative saliency detection model based on deep learning;
[0151] The background of the printed anti-counterfeiting image is set to white, that is, the background pixel value is set to 1, so as to facilitate subsequent anti-counterfeiting image quality evaluation.
[0152] Furthermore, based on the printed plain anti-counterfeiting image and the ideal anti-counterfeiting image, quality indicators are calculated and a passing threshold is set accordingly. Figure 1 Step S6: If the quality index exceeds the acceptable threshold, the printing quality is considered acceptable; otherwise, the printing quality is considered unacceptable, and an image of the printed area on the flexible substrate after printing needs to be acquired as the image of the area to be printed, and then fed back to the tone correction model for color calibration and printing; wherein, the formula for the quality index is:
[0153]
[0154]
[0155] Where Edge() represents the edge quality assessment function; SSIM() represents the structural similarity quality assessment function; Z represents the printed pure anti-counterfeiting image and the ideal anti-counterfeiting image, respectively; DWT() represents the discrete wavelet transform operation; ||·||1 represents the first norm.
[0156] This application proposes a quality index function that evaluates printing quality by calculating the quality index between the printed pure anti-counterfeiting image and the ideal anti-counterfeiting image, and further sets corresponding qualified thresholds to screen the quality of finished products. This not only promptly filters out anti-counterfeiting images with unclear printing textures or inconsistent colors, but also allows for the reprinting of substandard finished products, thus improving the anti-counterfeiting effect.
[0157] This application embodiment achieves precise printing of color anti-counterfeiting images through dual encoding, color matching, and quality inspection. The specific implementation process includes the following steps: (i) dual encoding of the substrate parameters; (ii) color correction of the anti-counterfeiting image to be printed based on the substrate color; and (iii) quality evaluation of the printed anti-counterfeiting image. This invention proposes an anti-counterfeiting generative adversarial network, a color correction model, and a quality index function for the above three processes. The anti-counterfeiting generative adversarial network dual-encodes the substrate parameters to improve the security of the anti-counterfeiting code. The color correction model adjusts the color of the image to be printed based on the substrate background color, effectively suppressing color differences during the printing process. The quality evaluation index inspects the printed product from the perspectives of edge, brightness, contrast, and structure, which can not only promptly screen out anti-counterfeiting images with unclear printing textures or inconsistent colors, but also reprint substandard products, thus improving the anti-counterfeiting effect.
[0158] Example 2
[0159] In Example 1, the method of the present invention enables the printing of color anti-counterfeiting images on a flexible material substrate. In this application embodiment, the method proposed by the present invention will be described again to achieve the printing of color anti-counterfeiting images on a rigid material substrate using colorless fluorescent ink. The specific implementation process is as follows:
[0160] The process involves acquiring parameters of a rigid substrate and collecting data for the area to be printed. The rigid substrate includes metal, ceramic, and plastic. The rigid substrate parameters include the substrate's name, material, and serial number. The data for the area to be printed includes the coordinates of the area and its background image. The specific process for acquiring the data for the area to be printed includes:
[0161] A rectangular area to be printed is selected on the surface of the rigid substrate: with the lower left corner of the printing surface of the rigid substrate as the origin, the coordinates of the area to be printed are set as (x, y, x+w, y+h); where (x, y) represents the coordinates of the lower left corner of the area to be printed, (x+w, y+h) represents the coordinates of the upper right corner of the area to be printed, and h and w represent the height and width of the area to be printed, respectively.
[0162] Acquire the background image of the area to be printed: Use the device to capture a color image of the printing surface of the rigid substrate, and crop and correct the position of the captured color image of the rigid substrate according to the coordinates of the area to be printed; Considering that some rigid materials, such as metal products, have high surface reflectivity, the captured image may have phenomena such as exposure and light spots, further use image processing software to adjust the brightness and exposure parameters to obtain the background image of the area to be printed.
[0163] Furthermore, the parameters of the rigid substrate are input into the anti-counterfeiting generative adversarial network to obtain the corresponding anti-counterfeiting code, and the anti-counterfeiting color image of the rigid substrate and the corresponding anti-counterfeiting code are combined to form an ideal anti-counterfeiting image; the specific implementation process of the anti-counterfeiting generative adversarial network is as follows:
[0164] The rigid substrate parameters are input to the data processing module, and standard parameter data is obtained through data preprocessing; wherein, the data processing module includes:
[0165] Adjust the data format of the rigid substrate parameters by changing the format of all parameters to string format and deleting irrelevant symbols to obtain the rigid substrate parameter string; wherein, the irrelevant symbols include: Chinese and English punctuation marks, spaces, newlines and tabs, etc.
[0166] Verify the data integrity of the rigid substrate parameter string and fill in all missing values to obtain the complete rigid substrate parameters; wherein, the filling operation is a manual filling method;
[0167] The complete rigid substrate parameters are digitized by dividing them into n groups, each group corresponding to one rigid substrate parameter. Then, each string is converted into a symmetric matrix, with the values at the diagonal positions of the matrix corresponding to individual characters in the string. Finally, the character parameters in the matrix are converted into numerical values using ASCII codes to obtain standard parameter data.
[0168] Further, the standard parameter data is input into the generator, the first generator generates an anti-counterfeiting code, and the second generator simulates the decoding process to obtain pseudo-parameter data; wherein, the generator implementation process is as follows:
[0169] The standard parameter data X is input into the encryption unit, and a key matrix K of the same dimension is randomly generated. This key matrix can be decomposed into two different symmetric matrices T and V:
[0170] K = T × V;
[0171] Using the above matrices as the encryption key for the encryption unit and the decryption key for the decryption unit, respectively, the specific formula for the encryption process is as follows:
[0172]
[0173] here, Let T be the encryption matrix, and T be the encryption key matrix. The encryption matrix is input into the encoder for secondary encryption to obtain the anti-counterfeiting code. The encoder is a convolutional neural network. The specific formula for the encryption process is as follows:
[0174]
[0175] Here, E represents the anti-counterfeiting code; G1() indicates that the first generator includes the encryption unit and the encoder; Encoder() represents the encoder;
[0176] Based on the anti-counterfeiting code, a decryption matrix is obtained by using a decoder. The decryption matrix is subjected to a second decryption operation based on the aforementioned decryption key to generate pseudo-parameter data; wherein, the decoder is a convolutional neural network; the specific formula for the above decoding process is as follows:
[0177]
[0178] here, G2() represents the pseudo-parameter data; G2() indicates that the second generator contains the decryption unit and the decoder; V is the decryption key matrix.
[0179] Furthermore, the anti-counterfeiting code and the genuine anti-counterfeiting code sample are input into a discriminator to determine their authenticity, and the pseudo-parameter data is compared with the standard parameters to constrain the decoding process; wherein, the discriminator implementation process includes:
[0180] The anti-counterfeiting code and the real anti-counterfeiting code sample are input into the discriminator, and the discrimination result is constrained by adversarial loss, so that the output of the first generator is closer to the distribution of the real anti-counterfeiting code; wherein, the specific formula of the adversarial loss function is:
[0181] L D (E,Y)=log(D(Y))+log(1-D(E));
[0182] Here, E represents the anti-counterfeiting code; Y represents the real anti-counterfeiting code sample; D() represents the discriminator; log() represents the logarithmic function;
[0183] Next, the implementation process of the first generator and the second generator is constrained using the cycle consistency loss function, the specific function formula of which is as follows:
[0184]
[0185] in, X represents the pseudo-parameter data; X represents the standard parameter data. This represents a first-order encryption matrix obtained by passing the standard parameter data through an encryption unit; This represents the decryption matrix obtained by the decoder after the anti-counterfeiting code is processed; This represents the pseudo-anti-counterfeiting code obtained by the pseudo-parameter data through the first generator; ||·||1 represents the first norm.
[0186] Further, the ideal anti-counterfeiting image and the background image of the area to be printed are input into the color correction model to obtain the anti-counterfeiting image to be printed. The specific color matching process includes:
[0187] Color adjustment is performed using the spectral emission principle of monochromatic fluorescent ink to obtain the desired hue for the anti-counterfeiting image; wherein, the monochromatic fluorescent ink includes red, green, and blue, and the spectral emissivity of the i-th monochromatic fluorescent ink at wavelength λ is F. i (λ), then the specific formula for the spectral emissivity after color matching with different monochromatic fluorescent inks is:
[0188]
[0189] Here, 'c' represents the number of types of monochrome fluorescent inks used in color mixing; u i This indicates the proportion of the i-th type of monochrome fluorescent ink used;
[0190] Based on the anti-counterfeiting image and the background image of the area to be printed, the color is adjusted using the monochrome fluorescent ink to obtain the spectral reflectance of the anti-counterfeiting image to be printed. The specific formula for this process is as follows:
[0191] R(λ)=R base (λ)+αF(λ)·I(λ);
[0192] Where R(λ) represents the reflectance of the image to be printed at wavelength λ; R base (λ) represents the reflectivity of the rigid substrate at wavelength λ; α refers to the reflectivity of the fluorescent ink to the incident light source; I(λ) represents the intensity of the incident light.
[0193] Based on the imaging principle of a color camera, the relationship between reflectance and image pixel values is obtained using the following formula:
[0194] A = Q × R;
[0195] Here, A represents the color image matrix; Q represents the spectral response function matrix; and R represents the reflectance matrix.
[0196] Based on the above formula, a tone correction model is established to obtain the final anti-counterfeiting image to be printed; the specific formula of the tone correction model is as follows:
[0197]
[0198] U = relu(K2*Z);
[0199] Z change = (I-ΔI)×F;
[0200] in, This refers to the anti-counterfeiting image to be printed; This represents the background image of the area to be printed; K1 and K2 represent the ideal anti-counterfeiting image; K1 and K2 represent the learning weights; U represents the proportion matrix of the monochrome fluorescent ink. Represents the reflectance matrix of c types of monochromatic fluorescent inks; The illumination intensity of the counterfeit detection light source; N represents the perturbation of illumination intensity at different pixel locations in the image; Z This represents the noise interference in the model, including white noise and Gaussian noise.
[0201] Furthermore, a constraint that the ratio sum is one is introduced for the ratio matrix of the monochromatic fluorescent ink to limit the usage ratio of the monochromatic fluorescent ink at the same pixel position; based on this constraint, a corresponding loss function is designed, the specific formula of which is:
[0202] L sum (U)=||1 HW -u×1 c ||1;
[0203] Where u represents the proportion matrix of the monochromatic fluorescent ink; 1 HW This represents a matrix of dimension H×W; 1 c This represents a matrix of dimension c; ||·||1 denotes the 1-norm.
[0204] Furthermore, the tone correction model also utilizes structural consistency loss to calculate the structural similarity between the anti-counterfeiting image to be printed and the anti-counterfeiting image, providing a quantitative indicator to optimize the model's accuracy; wherein, the specific formula for the structural consistency loss is:
[0205]
[0206] here, Z represents the anti-counterfeiting image to be printed and the ideal anti-counterfeiting image, respectively; SSIM() represents the structural similarity index.
[0207] Further, based on the information of the area to be printed, the anti-counterfeiting image to be printed is adjusted, and the adjusted anti-counterfeiting image is printed onto the area to be printed on the rigid substrate; the specific adjustment process includes:
[0208] Based on the coordinates (x, y, x+w, y+h) of the area to be printed, calculate the coordinates of the anti-counterfeiting image to be printed; let the height and width of the anti-counterfeiting image to be printed be H and W respectively, then the calculation formula is as follows:
[0209]
[0210] x1 = x, x2 = x + β·W;
[0211] y1=y, y2=y+β·H;
[0212] Where β is the scaling factor of the anti-counterfeiting image to be printed; Min() represents the function for calculating the minimum value; (x1,y1) represents the coordinates of the lower left corner of the anti-counterfeiting image to be printed; (x2,y2) represents the coordinates of the upper right corner of the anti-counterfeiting image to be printed.
[0213] Therefore, the coordinates of the anti-counterfeiting image to be printed are calculated as (x, y, x+β·W, y+β·H), and the anti-counterfeiting image to be printed is scaled and positioned according to these coordinates.
[0214] Furthermore, the anti-counterfeiting image is acquired by illuminating the printing area with a counterfeit-detection light source, and the background of the rigid substrate is removed using a matting model to obtain a pure anti-counterfeiting image after printing; wherein, the counterfeit-detection light source includes: ultraviolet and infrared light; the implementation process of the matting model includes:
[0215] The printed anti-counterfeiting image is cropped at the edges and rotated to obtain a printed anti-counterfeiting image with aligned positions.
[0216] The exposure, contrast, and brightness parameters of the aligned printed anti-counterfeiting image are adjusted using image processing software to obtain a printed anti-counterfeiting image without light spots.
[0217] The printed anti-counterfeiting image without light spots and the ideal anti-counterfeiting image are input into a collaborative saliency detection algorithm to remove the image background information, i.e., the color and texture information of the rigid substrate, to obtain the pure anti-counterfeiting image after printing; wherein, the collaborative saliency detection algorithm is a collaborative saliency detection model based on deep learning;
[0218] The background of the printed anti-counterfeiting image is set to white, that is, the background pixel value is set to 1, so as to facilitate subsequent anti-counterfeiting image quality evaluation.
[0219] Further, based on the printed pure anti-counterfeiting image and the ideal anti-counterfeiting image, a quality index is calculated and a passing threshold is set. If the quality index exceeds the passing threshold, it indicates that the printing quality is acceptable; otherwise, it indicates that the printing quality is unacceptable, and it is necessary to acquire an image of the printed area on the rigid substrate after printing as the image of the area to be printed, and then feed it back into the color correction model for color calibration and printing. The formula for the quality index is:
[0220]
[0221] Where Edge() represents the edge quality assessment function; SSIM() represents the structural similarity quality assessment function; Z represents the printed pure anti-counterfeiting image and the ideal anti-counterfeiting image, respectively; DWT() represents the discrete wavelet transform operation; ||·||1 represents the first norm.
[0222] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for printing color anti-counterfeiting images using colorless fluorescent ink, characterized in that, include: Obtain the parameters of the substrate and collect the data of the area to be printed; wherein, the substrate parameters include: the name, material and serial number of the substrate, and the data of the area to be printed includes: the coordinates of the area to be printed and the background image of the area to be printed; Input the substrate parameters into the anti-counterfeiting generative adversarial network to obtain the corresponding anti-counterfeiting code, and combine the anti-counterfeiting color image of the substrate and the corresponding anti-counterfeiting code into an ideal anti-counterfeiting image; The ideal anti-counterfeiting image and the background image of the area to be printed are input into the tone correction model to further obtain the anti-counterfeiting image to be printed; Based on the information of the area to be printed, the anti-counterfeiting image to be printed is adjusted, and the adjusted anti-counterfeiting image is printed onto the area to be printed on the substrate. The anti-counterfeiting image is acquired by illuminating the area to be printed with an anti-counterfeiting light source, and the background of the substrate is removed using a cutout model to obtain a pure anti-counterfeiting image after printing; wherein, the anti-counterfeiting light source includes: ultraviolet light and infrared light; Based on the printed pure anti-counterfeiting image and the ideal anti-counterfeiting image, the printing result is evaluated by calculating a quality index function.
2. The method for printing color anti-counterfeiting images using colorless fluorescent ink according to claim 1, characterized in that, The process of collecting the data for the area to be printed includes: A rectangular area to be printed is selected on the surface of the printing substrate: with the lower left corner of the printing surface of the printing substrate as the origin, the coordinates of the area to be printed are (x, y, x+w, y+h); where (x, y) represents the coordinates of the lower left corner of the area to be printed; (x+w, y+h) represents the coordinates of the upper right corner of the area to be printed; and h and w represent the height and width of the area to be printed, respectively. Acquire the background image of the area to be printed: Use a device to capture a color image of the printing surface of the substrate, and crop and correct the position of the captured color image of the substrate according to the coordinates of the area to be printed to obtain the background image of the area to be printed.
3. The method for printing color anti-counterfeiting images using colorless fluorescent ink according to claim 1, characterized in that, The anti-counterfeiting generation adversarial network includes: a data processing module, a generator, and a discriminator; The substrate parameters are input into the data processing module, and standard parameter data are obtained through data preprocessing; wherein, data preprocessing includes: format calibration, missing value handling and digitization processing; Input the standard parameter data into the generator, generate anti-counterfeiting code through the first generator, and use the second generator to simulate the decoding process to obtain pseudo parameter data; The anti-counterfeiting code and the real anti-counterfeiting code sample are input into the discriminator to determine their authenticity, and the pseudo parameter data is compared with the standard parameters to further constrain the decoding process.
4. The method for printing color anti-counterfeiting images using colorless fluorescent ink according to claim 3, characterized in that, The data processing module includes: Adjust the data format of the substrate parameters, changing the format of all parameters to string format to obtain the substrate parameter string; Verify the data integrity of the substrate parameter string and fill in any missing values to obtain the complete substrate parameters; The complete substrate parameters are digitized by dividing them into n groups, each group corresponding to one substrate parameter. Then, each group of strings is converted into a symmetric matrix, with the value at each position on the diagonal of the matrix corresponding to a single character in the string. Finally, the character parameters in the matrix are converted into numerical values using ASCII codes to obtain standard parameter data.
5. The method for printing color anti-counterfeiting images using colorless fluorescent ink according to claim 3, characterized in that, The generator includes: an encryption unit, an encoder, a decryption unit, and a decoder; The standard parameter data X is input into the encryption unit, a key matrix K of the same dimension is randomly generated, and the key matrix is decomposed into two different symmetric matrices T and V: K = T × V; Using the above matrices as the encryption key for the encryption unit and the decryption key for the decryption unit, respectively, the specific formula for the encryption process is as follows: here, Let T represent the encryption matrix, and T be the encryption key matrix. The encryption matrix is input into the encoder for secondary encryption to obtain the anti-counterfeiting code, using the following formula: Wherein, E represents the anti-counterfeiting code; G1() indicates that the first generator includes the encryption unit and the encoder; Encoder() represents the encoder; Based on the anti-counterfeiting code, the decoder is used to perform a decryption operation to obtain the decryption matrix. The decryption matrix is then decrypted a second time using the aforementioned decryption key to generate pseudo-parameter data. The specific formula is as follows: in, G2() represents the pseudo-parameter data; G2() indicates that the second generator contains the decryption unit and the decoder; V is the decryption key matrix.
6. The method for printing color anti-counterfeiting images using colorless fluorescent ink according to claim 3, characterized in that, The discriminator implementation process includes: The anti-counterfeiting code and a genuine anti-counterfeiting code sample are input into the discriminator to determine the authenticity of the anti-counterfeiting code; further, adversarial loss is used to constrain the discrimination result; wherein, the specific formula of the adversarial loss function is: L D (E,Y)(log(D(Y))+log(1-D(E)) Here, E represents the anti-counterfeiting code; Y represents the real anti-counterfeiting code sample; D() represents the discriminator; log() represents the logarithmic function; Next, the implementation process of the first generator and the second generator is constrained using the cycle consistency loss function. The specific formula for the loss function is as follows: in, X represents the pseudo-parameter data; X represents the standard parameter data. This represents a first-order encryption matrix obtained by passing the standard parameter data through an encryption unit; This represents the decryption matrix obtained by the decoder after the anti-counterfeiting code is processed; This represents the pseudo-anti-counterfeiting code obtained by the pseudo-parameter data through the first generator; ||·||1 represents the first norm.
7. The method for printing color anti-counterfeiting images using colorless fluorescent ink according to claim 1, characterized in that, The tone correction model includes: Color adjustment is performed based on the spectral emission principle of monochromatic fluorescent ink to obtain the desired hue for the anti-counterfeiting image; wherein, the monochromatic fluorescent ink includes red, green, and blue; let the spectral emissivity of the i-th monochromatic fluorescent ink at wavelength λ be F. i (λ), then the specific formula for the spectral emissivity after color matching with different monochromatic fluorescent inks is: Here, 'c' represents the number of types of monochrome fluorescent inks used in color mixing; u i This indicates the proportion of the i-th type of monochrome fluorescent ink used; Based on the ideal anti-counterfeiting image and the background image of the area to be printed, the color is adjusted using the aforementioned monochrome fluorescent ink to obtain the spectral reflectance of the anti-counterfeiting image to be printed. The specific formula is as follows: R(λ)=R base (λ)+αF(λ)·I(λ); Where R(λ) represents the reflectance of the image to be printed at wavelength λ; R base (λ) represents the reflectivity of the substrate at wavelength λ; α refers to the reflectivity of the fluorescent ink to the incident light source; I(λ) represents the intensity of the incident light. Based on the imaging principle of a color camera, the relationship between reflectance and image pixel values is obtained, and a tone correction model is further established to obtain the final anti-counterfeiting image to be printed; wherein, the specific formula of the tone correction model is: U = relu(K2*Z); Z change =(I-ΔI)×F; here, This refers to the anti-counterfeiting image to be printed; This represents the background image of the area to be printed; K1 and K2 represent the anti-counterfeiting image; K1 and K2 represent the learning weights; U represents the proportion matrix of the monochrome fluorescent ink. Represents the reflectance matrix of c types of monochromatic fluorescent inks; The illumination intensity of the counterfeit detection light source; N represents the perturbation of illumination intensity at different pixel locations in the image; Z This represents the noise interference in the model, including white noise and Gaussian noise.
8. The method for printing color anti-counterfeiting images using colorless fluorescent ink according to claim 7, characterized in that, The tone correction model also includes: For the proportion matrix of the monochromatic fluorescent ink, a constraint of "proportion sum is one" is introduced to limit the usage proportion of the monochromatic fluorescent ink at the same pixel position; based on this constraint, a corresponding loss function is further designed, the specific formula of which is: L sum (U)=||1 HW -U×1 c ||1; Wherein, U represents the proportion matrix of the monochromatic fluorescent ink; 1 HW This represents a matrix of dimension H×W; 1 c This represents a matrix of dimension c; ||·||1 denotes the 1-norm. Furthermore, the tone correction model also utilizes structural consistency loss to calculate the structural similarity between the anti-counterfeiting image to be printed and the ideal anti-counterfeiting image, with the specific formula as follows: here, Z represents the anti-counterfeiting image to be printed and the ideal anti-counterfeiting image, respectively; SSIM() represents the structural similarity index.
9. The method for printing color anti-counterfeiting images using colorless fluorescent ink according to claim 1, characterized in that, The adjustment process of the anti-counterfeiting image to be printed includes: Based on the coordinates (x, y, x+w, y+h) of the area to be printed, calculate the coordinates of the anti-counterfeiting image to be printed; let the height and width of the anti-counterfeiting image to be printed be H and W respectively, then the calculation formula is: x1 = x, x2 = x + β·W; y1=y, y2=y+β·H; Where β is the scaling factor of the anti-counterfeiting image to be printed; Min() represents the function for calculating the minimum value; (x1,y1) represents the coordinates of the lower left corner of the anti-counterfeiting image to be printed; (x2,y2) represents the coordinates of the upper right corner of the anti-counterfeiting image to be printed. Therefore, the coordinates of the anti-counterfeiting image to be printed are calculated as (x, y, x+β·W, y+β·H), and the anti-counterfeiting image to be printed is scaled and positioned according to these coordinates.
10. The method for printing color anti-counterfeiting images using colorless fluorescent ink according to claim 1, characterized in that, The process of implementing the quality assessment includes: A passing threshold is set and a quality index is calculated. If the quality index exceeds the passing threshold, the printing quality is considered acceptable; otherwise, the printing quality is considered unacceptable, and an image of the printed area of the substrate after printing is acquired as the image of the area to be printed, and then fed back into the tone correction model for color calibration and printing. The specific formula for the quality index is as follows: Here, Edge() represents the edge quality assessment function; SSIM() represents the structural similarity quality assessment function; Z represents the printed pure anti-counterfeiting image and the ideal anti-counterfeiting image, respectively; DWT() represents the discrete wavelet transform operation.
Citation Information
Patent Citations
Method and System for Digital Watermarking of Spot Color Printed Images
CN108460716B
Anti-counterfeiting image printing method, device, and related equipment
CN114298251B
An anti-counterfeiting method, device, computer equipment, and storage medium
CN115293312B