Method and device for identifying solitary printed matter based on machine vision
By using a machine vision-based method for identifying unique printed materials, and by extracting the smudged features of the printed materials using a pre-trained D2-Net network, the problem of easy counterfeiting and high equipment precision requirements in existing technologies for identifying printed materials is solved, and high-accuracy identification is achieved under low-precision equipment.
Patent Information
- Application Number
- CN202511049750.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-11-11
AI Technical Summary
Existing technologies for authenticating unique printed materials are easily counterfeited and require sophisticated image acquisition equipment, making it difficult to achieve high accuracy with low-precision devices.
A machine vision-based method for identifying unique printed materials is adopted. By acquiring images of the target printed material at preset locations, image preprocessing and feature extraction are performed. A pre-trained, finely tuned D2-Net network is used to extract the features of the tainted parts, and the identification is performed by matching with a database.
It enables accurate identification of unique printed materials using ordinary image acquisition equipment, improving the accuracy of identification and the ability to resist counterfeiting.
Smart Images

Figure CN120932242A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision technology, and in particular to a method and apparatus for identifying unique printed materials based on machine vision. Background Technology
[0002] Zero watermarking refers to a technology that does not embed information in the carrier file, but instead collects information from the carrier file itself as a watermark for storage and verification.
[0003] Existing watermark-free data acquisition technology for unique item authentication involves capturing surface images of printed materials, then extracting common surface features, including high-frequency domain features such as corners, edges, and textures. These features are then matched against preset template features to determine if a match is successful. However, the common property of these image features selected by existing methods is that they are discernible to the human eye, making forgery relatively easy.
[0004] The market today needs a method for identifying unique printed materials that can still achieve a very high accuracy rate even with low requirements for image acquisition equipment. Summary of the Invention
[0005] The purpose of this invention is to at least address one of the shortcomings of the prior art by providing a method and apparatus for identifying unique printed materials based on machine vision.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] Specifically, a machine vision-based method for identifying unique printed materials is proposed, including the following:
[0008] Step 110: Obtain a preset position image of the target printed material, and obtain the image to be detected based on this image;
[0009] Step 120: Perform image preprocessing on the image to be detected to obtain a preprocessed image;
[0010] Step 130: Perform image recognition on the preprocessed image to extract information about its tainted portion;
[0011] Step 140: Input the infected part information into the pre-trained fine-tuned D2-Net network to extract the infected part features, and store the extracted infected part feature vectors;
[0012] Step 150: Match the feature vector of the infected part with the pre-stored feature description set under the ID corresponding to the target printed product in the pre-established database. If the match is successful, the target printed product is determined to be a registered product. If the match is unsuccessful, the target printed product is determined to be a non-registered product.
[0013] Step 160: Visualize the matching results for the user according to the preset display method.
[0014] Furthermore, specifically, an image of a preset position of the target printed material is acquired, and based on this, an image to be detected is obtained, including:
[0015] A sub-image sequence is obtained by acquiring multiple images of the target printed material under the same environmental conditions and at preset positions;
[0016] A high-probability rendering region is searched in each image of the sub-image sequence using a search algorithm based on pixel rendering coefficients;
[0017] The base image is obtained by averaging all images in the sub-image sequence. The averaging refers to accumulating the pixel values of the same pixel in each image and averaging them.
[0018] Then, according to the sequence number of the sub-image sequence, the high-probability regions of each image are replaced with the corresponding regions in the base image to obtain the final image to be detected.
[0019] Furthermore, specifically, a search algorithm based on pixel rendering coefficients is used to search for high-probability rendering regions in each image of the sub-image sequence, including:
[0020] First, the calculation method for the pixel rendering coefficient is defined as follows:
[0021]
[0022] Where Val_i refers to the pixel value of pixel i, equ_i refers to the average value of the neighboring pixels of pixel i in its image matrix, max_i refers to the maximum value of the neighboring pixels of pixel i in its image matrix, and min_i refers to the minimum value of the neighboring pixels of pixel i in its image matrix.
[0023] Based on the above definition, high-probability regions are searched for in each image of the sub-image sequence using the following method:
[0024] For the image with sequence number 1 in the sub-image sequence, let it be image_1. Traverse the image matrix of image_1 and find the two pixels with the largest pixel rendering coefficient. Then, the first straight line can be obtained from these two pixels. Next, find another pixel in the image matrix of image_1 that is not on the first straight line and has the largest pixel value. The region with these three pixels as vertices is the high rendering probability region of image_1.
[0025] For the image with sequence number T in the sub-image sequence, let it be denoted as image_T, where T is a natural number greater than 1. Then, calculate the average pixel value of all pixels in the high rendering probability region of image_T-1, and denot it as equ_image_T-1. Then, traverse the image matrix of image_T and find two pixels with pixel values greater than equ_image_T-1, and denot them as the first pixel and the second pixel. The second straight line can be obtained from the first pixel and the second pixel. Then, find a pixel with the largest pixel value that is not on the second straight line from the image matrix of image_T, and denot it as the third pixel. The region with the first, second and third pixels as fixed points is the high rendering probability region of image_T.
[0026] Furthermore, specifically, image recognition is performed on the preprocessed image to extract information about its tainted portion, including:
[0027] The preprocessed image is subjected to Fourier transform to obtain the spectrum, and the spectrum is shifted. Then, the amplitude spectrum is calculated and normalized to obtain the processed spectrum.
[0028] The processed spectrum is then processed using a preset high-pass filter to extract the high-frequency components.
[0029] After performing inverse shift and inverse Fourier transform on the high-frequency components, the real part is taken and normalized to obtain the contaminated part information.
[0030] Furthermore, specifically, the process of obtaining the pre-trained, fine-tuned D2-Net network includes,
[0031] We use the official open-source D2-Net architecture and employ a pre-trained ResNet-101 residual network as the backbone network.
[0032] Remove the final classification layer and retain only the convolutional layers for feature description set extraction;
[0033] The extracted feature description set is optimized using a contrastive loss function;
[0034] The optimized feature description set is then propagated forward through the network to obtain the feature map of the feature description set;
[0035] Based on the correspondence given by SFM, positive and negative pairs are formed, and the loss is calculated;
[0036] Performance of the periodic validation network on the validation set;
[0037] The final trained D2-Net model is obtained.
[0038] Furthermore, specifically, the construction of the database includes,
[0039] Printing scanning stage: In the final stage of printing production, high-precision scanning equipment is used to acquire surface images of the product.
[0040] Feature extraction: Input the acquired image into the trained D2-Net model to obtain a feature description set including information about the infiltrated part. Based on the feature point positions and corresponding descriptors output by D2-Net, store the feature description set of the entire image.
[0041] Database storage: Create a new entry in the database for each printed item, and the entry shall include at least the following information:
[0042] Product ID: A unique identifier.
[0043] Feature description set set: The feature description set extracted by D2-Net.
[0044] Furthermore, specifically, the method for matching the feature vector of the infiltrated portion with the pre-stored feature description set under the ID corresponding to the target printed item in the pre-established database is as follows:
[0045] The KNN matcher is used to find the nearest neighbor matching pair in the feature description set space.
[0046] The system calculates the distance distribution and number of matches. If the proportion of the number of matches exceeds a preset threshold, the verification is considered successful.
[0047] Furthermore, specifically, the methods for visualizing the presentation are as follows:
[0048] If the match is successful, the relevant product information will be returned to the user's front end, including the registration time and the product's unique ID.
[0049] If the match fails, the system will directly return to the user's front end that the target printed product is an unregistered product.
[0050] This invention also proposes a machine vision-based device for identifying unique printed materials, comprising the following:
[0051] The data acquisition module is used to acquire a preset position image of the target printed material and obtain the image to be detected based on it;
[0052] The preprocessing module is used to perform image preprocessing on the image to be detected to obtain a preprocessed image;
[0053] The image recognition module is used to perform image recognition on the preprocessed image to extract information about its tainted portion;
[0054] The feature extraction module is used to input the infection part information into the pre-trained fine-tuned D2-Net network to extract the infection part features, and to store the extracted infection part feature vectors.
[0055] The feature matching module is used to match the feature vector of the infected part with the pre-stored feature description set under the ID of the target printed product in the pre-established database. If the match is successful, the target printed product is determined to be a registered product; if the match is unsuccessful, the target printed product is determined to be a non-registered product.
[0056] The visualization module is used to visualize the matching results for users according to a preset display method.
[0057] The beneficial effects of this invention are as follows:
[0058] This invention provides a machine vision-based method for identifying unique printed materials. It uses feature vectors of the smudged portion of the printed material during production as a template. Then, it acquires the corresponding feature vectors of the target printed material to be identified. The entire process utilizes a pre-trained, finely tuned D2-Net network for feature extraction, enabling accurate feature vector acquisition even with limited image acquisition equipment precision. Finally, it matches the corresponding feature vectors of the target printed material with the feature vectors of its template for unique material identification. This invention identifies unique printed materials by extracting features of the smudged portion of the target printed material. Combined with the pre-trained, finely tuned D2-Net network proposed in this invention, it can accurately identify unique printed materials using ordinary image acquisition equipment. Attached Figure Description
[0059] The above and other features of this disclosure will become more apparent from the detailed description of the embodiments shown in conjunction with the accompanying drawings. In the accompanying drawings, the same reference numerals denote the same or similar output voltages. Obviously, the drawings described below are merely some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort. In the drawings:
[0060] Figure 1 The flowchart shown is a process for identifying unique printed materials based on machine vision, according to the present invention. Detailed Implementation
[0061] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The same reference numerals used throughout the accompanying drawings indicate the same or similar parts.
[0062] Reference Figure 1 Example 1: This invention proposes a machine vision-based method for identifying unique printed materials, comprising the following:
[0063] Step 110: Obtain a preset position image of the target printed material, and obtain the image to be detected based on this image;
[0064] Step 120: Perform image preprocessing on the image to be detected to obtain a preprocessed image;
[0065] Step 130: Perform image recognition on the preprocessed image to extract information about its tainted portion;
[0066] Step 140: Input the infected part information into the pre-trained fine-tuned D2-Net network to extract the infected part features, and store the extracted infected part feature vectors;
[0067] Step 150: Match the feature vector of the infected part with the pre-stored feature description set under the ID corresponding to the target printed product in the pre-established database. If the match is successful, the target printed product is determined to be a registered product. If the match is unsuccessful, the target printed product is determined to be a non-registered product.
[0068] Step 160: Visualize the matching results for the user according to the preset display method.
[0069] In this embodiment 1, the feature vector of the smeared portion of the printed matter is obtained during the production process and used as a template. Then, the corresponding feature vector of the target printed matter to be identified is collected. The entire process uses a pre-trained, finely tuned D2-Net network for feature extraction, enabling accurate feature vector acquisition even with generally low-precision image acquisition equipment. The corresponding feature vector of the target printed matter is then matched with the feature vector of its template for unique item identification. This invention identifies unique printed matter by extracting the smeared portion features of the target printed matter. Combined with the pre-trained, finely tuned D2-Net network proposed in this invention, it enables accurate identification of unique printed matter using ordinary image acquisition equipment.
[0070] In a preferred embodiment of the present invention, specifically, an image of a preset position of the target printed matter is acquired, and an image to be detected is obtained based on this image, including:
[0071] A sub-image sequence is obtained by acquiring multiple images of the target printed material under the same environmental conditions and at preset positions;
[0072] A high-probability rendering region is searched in each image of the sub-image sequence using a search algorithm based on pixel rendering coefficients;
[0073] The base image is obtained by averaging all images in the sub-image sequence. The averaging refers to accumulating the pixel values of the same pixel in each image and averaging them.
[0074] Then, according to the sequence number of the sub-image sequence, the high-probability regions of each image are replaced with the corresponding regions in the base image to obtain the final image to be detected.
[0075] In this preferred embodiment, considering that the image acquisition device has low precision, the image fusion method described above can continuously iterate the fused image with high-probability regions, thereby making the quality of the fused image content relatively high. In addition, the proposed pre-trained fine-tuned D2-Net network can further ensure the accuracy of the identification of unique printed items.
[0076] In a preferred embodiment of the present invention, specifically, a search algorithm based on pixel rendering coefficients is used to search for high rendering probability regions in each image of the sub-image sequence, including:
[0077] First, the calculation method for the pixel rendering coefficient is defined as follows:
[0078]
[0079] Where Val_i refers to the pixel value of pixel i, equ_i refers to the average value of the neighboring pixels of pixel i in its image matrix, max_i refers to the maximum value of the neighboring pixels of pixel i in its image matrix, and min_i refers to the minimum value of the neighboring pixels of pixel i in its image matrix.
[0080] Based on the above definition, high-probability regions are searched for in each image of the sub-image sequence using the following method:
[0081] For the image with sequence number 1 in the sub-image sequence, let it be image_1. Traverse the image matrix of image_1 and find the two pixels with the largest pixel rendering coefficient. Then, the first straight line can be obtained from these two pixels. Next, find another pixel in the image matrix of image_1 that is not on the first straight line and has the largest pixel value. The region with these three pixels as vertices is the high rendering probability region of image_1.
[0082] For the image with sequence number T in the sub-image sequence, let it be denoted as image_T, where T is a natural number greater than 1. Then, calculate the average pixel value of all pixels in the high rendering probability region of image_T-1, and denot it as equ_image_T-1. Then, traverse the image matrix of image_T and find two pixels with pixel values greater than equ_image_T-1, and denot them as the first pixel and the second pixel. The second straight line can be obtained from the first pixel and the second pixel. Then, find a pixel with the largest pixel value that is not on the second straight line from the image matrix of image_T, and denot it as the third pixel. The region with the first, second and third pixels as fixed points is the high rendering probability region of image_T.
[0083] In this preferred embodiment, the above method can basically enable the high-probability rendering area of the image with a larger sequence number to have a higher detail rendering capability than the background image updated after being replaced by the previous image.
[0084] In a preferred embodiment of the present invention, specifically, image recognition is performed on the preprocessed image to extract information about its tainted portion, including:
[0085] The preprocessed image is subjected to Fourier transform to obtain the spectrum, and the spectrum is shifted. Then, the amplitude spectrum is calculated and normalized to obtain the processed spectrum.
[0086] The processed spectrum is then processed using a preset high-pass filter to extract the high-frequency components.
[0087] After performing inverse shift and inverse Fourier transform on the high-frequency components, the real part is taken and normalized to obtain the contaminated part information.
[0088] In this preferred embodiment, it is considered that, generally speaking, after printed materials are printed on paper, smudges will occur in the high-frequency texture areas of the image due to the fusion of paper, ink, and toner. The smudges vary depending on the quality of the carrier paper; generally, the smudged area on ordinary paper is about 0.5 mm, while the smudged area on coated paper and anti-smudge paper is 500 micrometers, and the smudged area on RMB printing paper is less than 100 micrometers. These are all imperceptible to the naked eye. Therefore, using this characteristic for unique identification of printed materials can essentially ensure that the printed materials cannot be counterfeited.
[0089] Specifically, the preferred solution for the above content is as follows:
[0090] Fourier transform and spectrum preprocessing
[0091] Input requirements: A grayscale image (single channel) that has been denoised and distortion corrected (a preprocessed image obtained from image preprocessing).
[0092] Operating steps:
[0093] Two-dimensional Discrete Fourier Transform (2D DFT):
[0094] Use numpy.fft.fft2() or OpenCV's cv2.dft() to compute the Fourier transform of the image.
[0095] Output characteristics: Complex matrix (real part + imaginary part), with low frequency at the center and high frequency increasing outwards.
[0096] Spectrum shift (DC component):
[0097] Use np.fft.fftshift() to move the DC component (zero frequency) to the center of the spectrum for easier visualization and analysis.
[0098] Effect: Low frequencies are in the center, and high frequencies are on the periphery, forming a concentric ring distribution.
[0099] Amplitude spectrum calculation and normalization:
[0100] Calculate the amplitude spectrum: magnitude = np.abs(F_shifted);
[0101] Normalize to the range of 0-255: magnitude_normalized = cv2.normalize(magnitude,None,0,255,cv2.NORM_MINMAX);
[0102] Objective: To eliminate the influence of uneven illumination on spectral intensity.
[0103] High-frequency component extraction:
[0104] Strategy selection: Use an ideal high-pass filter or a Gaussian high-pass filter to suppress low-frequency background and preserve high-frequency details.
[0105] Implementation method:
[0106] Constructing a high-pass filter template:
[0107] Ideal Qualcomm Filter: Circular mask, radius r = min(M,N) / 2 * low_cutoff;
[0108] low_cutoff is the low-frequency cutoff ratio (0.1 to 0.3 is recommended to avoid distortion caused by completely removing low frequencies).
[0109] Gaussian High Pass: Two-dimensional Gaussian kernel with inverse (negative exponential decay), more suitable for smooth transitions.
[0110] Frequency domain multiplication: F_filtered = F_shifted * high_pass_filter;
[0111] Physical meaning: It shields low-frequency background and retains only high-frequency details (such as edges and texture abrupt changes).
[0112] Inverse Fourier Transform and Spatial Domain Reconstruction:
[0113] Operating steps:
[0114] Inverse shift: F_filtered_unshifted=np.fft.ifftshift(F_filtered);
[0115] Inverse Fourier Transform: f_reconstructed = np.fft.ifft2(F_filtered_unshifted);
[0116] Extract the real part and normalize: result = np.abs(f_reconstructed).astype(np.uint8);
[0117] Output characteristics: Images that highlight high-frequency details, with infiltrated areas appearing as high-brightness patches.
[0118] In a preferred embodiment of the present invention, the process of obtaining the pre-trained fine-tuned D2-Net network specifically includes:
[0119] We use the official open-source D2-Net architecture and employ a pre-trained ResNet-101 residual network as the backbone network.
[0120] Remove the final classification layer and retain only the convolutional layers for feature description set extraction;
[0121] The extracted feature description set is optimized using a contrastive loss function;
[0122] The optimized feature description set is then propagated forward through the network to obtain the feature map of the feature description set;
[0123] Based on the correspondence given by SFM, positive and negative pairs are formed, and the loss is calculated;
[0124] Performance of the periodic validation network on the validation set;
[0125] The final trained D2-Net model is obtained.
[0126] In this preferred embodiment, considering that D2-NET is a feature extraction model, it can extract feature points from images (that is, image features, which we use to match whether two images are consistent), but it may not be suitable for our usage environment. What we do is to pre-collect a large number of nanoscale images, and then use the collected images as a dataset to input into the model to train a model suitable for our usage environment.
[0127] In the implementation of D2-Net, low-level features are typically extracted by a pre-trained convolutional neural network (e.g., VGG16). Theoretically, it is also feasible to replace it with other high-performance backbone networks, such as the ResNet architecture. As long as the feature extraction network can output a series of feature maps with good discriminative power and robustness, the subsequent feature detection and description modules of D2-Net can complete the extraction of key points and their descriptors in this feature map space.
[0128] The VGG16 standard used by D2-NET itself is not well-suited to the actual requirements, so it was replaced with ResNet-101.
[0129] This will have the following advantages:
[0130] 1. Enhanced feature representation capabilities:
[0131] ResNet's residual structure better mitigates the vanishing gradient problem, allowing deeper networks to be trained and potentially yielding richer and more robust feature representations.
[0132] 2. Better generalization performance:
[0133] ResNet and its variants have demonstrated excellent generalization ability and high feature discrimination on a variety of visual tasks, potentially making features more robust to scale changes, viewpoint changes, and illumination changes.
[0134] 3. Trainability and transfer learning:
[0135] Using ResNet, which is pre-trained on large-scale datasets such as ImageNet, as the feature extraction network can reduce the difficulty of training from scratch and facilitate feature matching tasks on small-scale datasets, further improving the performance of D2-Net.
[0136] In a preferred embodiment of the present invention, specifically, the construction of the database includes,
[0137] Printing scanning stage: In the final stage of printing production, high-precision scanning equipment is used to acquire surface images of the product.
[0138] Feature extraction: Input the acquired image into the trained D2-Net model to obtain a feature description set including information about the infiltrated part. Based on the feature point positions and corresponding descriptors output by D2-Net, store the feature description set of the entire image.
[0139] Database storage: Create a new entry in the database for each printed item, and the entry shall include at least the following information:
[0140] Product ID: A unique identifier.
[0141] Feature description set: The feature description set extracted by D2-Net. (Using NumPy .npy files)
[0142] Additionally, sampling and pre-training are performed using the following methods.
[0143] A wide range of nanoscale image sampling was conducted on various types of product packaging on the market using sampling equipment, with no less than 2,000 images for each type of product and a total of no less than 100,000 images.
[0144] These images should have multiple viewpoints, scales, and lighting conditions in order to pass the SFM (Structured Focal Frame) test.
[0145] -from-Motion) or multi-image registration techniques can automatically obtain feature correspondences under unlabeled conditions.
[0146] Self-supervised annotation (using SFM)
[0147] Traditional features (such as SIFT and SURF) are used to extract and match features from the image set acquired in step 1.1, and the sparse 3D point cloud of the corresponding scene is reconstructed using the SFM pipeline.
[0148] Each 3D point has a corresponding 2D projection point in multiple images, and these correspondences are the naturally generated positive sample pairs.
[0149] Negative sample pairs are constructed by randomly selecting non-corresponding point pairs (e.g., using the random function).
[0150] Building the training set:
[0151] The above correspondence is used to generate a large number of positive / negative feature pairs.
[0152] The training samples we ultimately obtain are: inputting the original image, from which the network extracts local feature descriptors; positive corresponding points should produce similar descriptors, while negative corresponding points should produce descriptors with significant differences.
[0153] As a preferred embodiment of the present invention, specifically, the method of matching the feature vector of the stained portion with the pre-stored feature description set under the ID corresponding to the target printed matter in the pre-established database is as follows:
[0154] The KNN matcher is used to find the nearest neighbor matching pair in the feature description set space.
[0155] The system calculates the distance distribution and number of matches. If the proportion of the number of matches exceeds a preset threshold, the verification is considered successful.
[0156] As a preferred embodiment of the present invention, the visualization is presented in the following manner.
[0157] If the match is successful, the relevant product information will be returned to the user's front end, including the registration time and the product's unique ID.
[0158] If the match fails, the system will directly return to the user's front end that the target printed product is an unregistered product.
[0159] Example 2: The present invention also proposes a machine vision-based device for identifying unique printed materials, comprising the following:
[0160] The data acquisition module is used to acquire a preset position image of the target printed material and obtain the image to be detected based on it;
[0161] The preprocessing module is used to perform image preprocessing on the image to be detected to obtain a preprocessed image;
[0162] The image recognition module is used to perform image recognition on the preprocessed image to extract information about its tainted portion;
[0163] The feature extraction module is used to input the infection part information into the pre-trained fine-tuned D2-Net network to extract the infection part features, and to store the extracted infection part feature vectors.
[0164] The feature matching module is used to match the feature vector of the infected part with the pre-stored feature description set under the ID of the target printed product in the pre-established database. If the match is successful, the target printed product is determined to be a registered product; if the match is unsuccessful, the target printed product is determined to be a non-registered product.
[0165] The visualization module is used to visualize the matching results for users according to a preset display method.
[0166] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment, depending on actual needs.
[0167] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0168] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0169] Although the description of the invention has been quite detailed and particularly of several described embodiments, it is not intended to limit it to any of these details or embodiments or any particular embodiment, but should be considered as providing a broad possible interpretation of the claims by referring to the appended claims and taking into account the prior art, thereby effectively covering the intended scope of the invention. Furthermore, the invention has been described above with respect to embodiments foreseeable by the inventors in order to provide a useful description, and non-substantial modifications to the invention that have not yet been foreseen may still represent equivalent modifications.
[0170] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. Any embodiment that achieves the technical effects of the present invention using the same means should fall within the protection scope of the present invention. Within the protection scope of the present invention, various modifications and variations can be made to the technical solutions and / or implementation methods.
Claims
1. A machine vision-based method for identifying unique printed materials, characterized in that, Including the following: Step 110: Obtain a preset position image of the target printed material, and obtain the image to be detected based on this image; Step 120: Perform image preprocessing on the image to be detected to obtain a preprocessed image; Step 130: Perform image recognition on the preprocessed image to extract information about its tainted portion; Step 140: Input the infected part information into the pre-trained fine-tuned D2-Net network to extract the infected part features, and store the extracted infected part feature vectors; Step 150: Match the feature vector of the infected part with the pre-stored feature description set under the ID corresponding to the target printed product in the pre-established database. If the match is successful, the target printed product is determined to be a registered product. If the match is unsuccessful, the target printed product is determined to be a non-registered product. Step 160: Visualize the matching results for the user according to the preset display method.
2. The method for identifying unique printed materials based on machine vision according to claim 1, characterized in that, Specifically, an image of a preset position of the target printed material is acquired, and based on this, an image to be detected is obtained, including: A sub-image sequence is obtained by acquiring multiple images of the target printed material under the same environmental conditions and at preset positions; A high-probability rendering region is searched in each image of the sub-image sequence using a search algorithm based on pixel rendering coefficients; The base image is obtained by averaging all images in the sub-image sequence. The averaging refers to accumulating the pixel values of the same pixel in each image and averaging them. Then, according to the sequence number of the sub-image sequence, the high-probability regions of each image are replaced with the corresponding regions in the base image to obtain the final image to be detected.
3. The method for identifying unique printed materials based on machine vision according to claim 2, characterized in that, Specifically, a search algorithm based on pixel rendering coefficients is used to search for regions with high rendering probability in each image of the sub-image sequence. include, First, the calculation method for the pixel rendering coefficient is defined as follows: Where Val_i refers to the pixel value of pixel i, equ_i refers to the average value of the neighboring pixels of pixel i in its image matrix, max_i refers to the maximum value of the neighboring pixels of pixel i in its image matrix, and min_i refers to the minimum value of the neighboring pixels of pixel i in its image matrix. Based on the above definition, high-probability regions are searched for in each image of the sub-image sequence using the following method: For the image with sequence number 1 in the sub-image sequence, let it be image_1. Traverse the image matrix of image_1 and find the two pixels with the largest pixel rendering coefficient. Then, the first straight line can be obtained from these two pixels. Next, find another pixel in the image matrix of image_1 that is not on the first straight line and has the largest pixel value. The region with these three pixels as vertices is the high rendering probability region of image_1. For the image with sequence number T in the sub-image sequence, let it be denoted as image_T, where T is a natural number greater than 1. Then, calculate the average pixel value of all pixels in the high rendering probability region of image_T-1, and denot it as equ_image_T-1. Then, traverse the image matrix of image_T and find two pixels with pixel values greater than equ_image_T-1, and denot them as the first pixel and the second pixel. The second straight line can be obtained from the first pixel and the second pixel. Then, find a pixel with the largest pixel value that is not on the second straight line from the image matrix of image_T, and denot it as the third pixel. The region with the first, second and third pixels as fixed points is the high rendering probability region of image_T.
4. The method for identifying unique printed materials based on machine vision according to claim 1, characterized in that, Specifically, image recognition is performed on the preprocessed image to extract information about its tainted portion, including: The preprocessed image is subjected to Fourier transform to obtain the spectrum, and the spectrum is shifted. Then, the amplitude spectrum is calculated and normalized to obtain the processed spectrum. The processed spectrum is then processed using a preset high-pass filter to extract the high-frequency components. After performing inverse shift and inverse Fourier transform on the high-frequency components, the real part is taken and normalized to obtain the contaminated part information.
5. The method for identifying unique printed materials based on machine vision according to claim 1, characterized in that, Specifically, the process of obtaining the pre-trained, fine-tuned D2-Net network includes: We use the official open-source D2-Net architecture and employ a pre-trained ResNet-101 residual network as the backbone network. Remove the final classification layer and retain only the convolutional layers for feature description set extraction; The extracted feature description set is optimized using a contrastive loss function; The optimized feature description set is then propagated forward through the network to obtain the feature map of the feature description set; Based on the correspondence given by SFM, positive and negative pairs are formed, and the loss is calculated; Performance of the periodic validation network on the validation set; The final trained D2-Net model is obtained.
6. The method for identifying unique printed materials based on machine vision according to claim 1, characterized in that, Specifically, the construction of the database includes, Printing scanning stage: In the final stage of printing production, high-precision scanning equipment is used to acquire surface images of the product. Feature extraction: Input the acquired image into the trained D2-Net model to obtain a feature description set including information about the infiltrated part. Based on the feature point positions and corresponding descriptors output by D2-Net, store the feature description set of the entire image. Database storage: Create a new entry in the database for each printed item, and the entry shall include at least the following information: Product ID: A unique identifier. Feature description set set: The feature description set extracted by D2-Net.
7. The method for identifying unique printed materials based on machine vision according to claim 1, characterized in that, Specifically, the method for matching the feature vector of the infiltrated portion with the pre-stored feature description set under the ID corresponding to the target printed item in the pre-established database is as follows: The KNN matcher is used to find the nearest neighbor matching pair in the feature description set space. The system calculates the distance distribution and number of matches. If the proportion of the number of matches exceeds a preset threshold, the verification is considered successful.
8. The method for identifying unique printed materials based on machine vision according to claim 1, characterized in that, Specifically, the visualization method is as follows: If the match is successful, the relevant product information will be returned to the user's front end, including the registration time and the product's unique ID. If the match fails, the system will directly return to the user's front end that the target printed product is an unregistered product.
9. A machine vision-based device for identifying unique printed items, characterized in that, Including the following: The data acquisition module is used to acquire a preset position image of the target printed material and obtain the image to be detected based on it; The preprocessing module is used to perform image preprocessing on the image to be detected to obtain a preprocessed image; The image recognition module is used to perform image recognition on the preprocessed image to extract information about its tainted portion; The feature extraction module is used to input the infection part information into the pre-trained fine-tuned D2-Net network to extract the infection part features, and to store the extracted infection part feature vectors. The feature matching module is used to match the feature vector of the infected part with the pre-stored feature description set under the ID of the target printed product in the pre-established database. If the match is successful, the target printed product is determined to be a registered product; if the match is unsuccessful, the target printed product is determined to be a non-registered product. The visualization module is used to visualize the matching results for users according to a preset display method.