Method and device for detecting printed matter
Through multispectral image data processing and feature extraction technology, combined with frequent feature modes and Bayesian network models, efficient detection and defect analysis of complex situations of printed materials are achieved, and the problems of poor detection results and lack of in-depth analysis in the existing technology are solved, and the accuracy and management level of printed materials are improved.
Patent Information
- Application Number
- CN202411400053.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2044-10-09
AI Technical Summary
The existing printed materials testing system is not effective when detecting complex situations such as special inks and anti-counterfeiting printing, and it is difficult to effectively extract and analyze defect characteristics, realize accurate defect classification and positioning, and lack in-depth analysis and utilization of the inspection results, resulting in insufficient printing quality management level.
Multispectral image data acquisition and processing technology is adopted to generate a comprehensive spectral feature map through spectral feature extraction and multi-level fusion; a spectral fingerprint library is constructed based on frequent feature mode extraction and hash index to conduct region division and matching degree search; multi-scale decomposition and local spectral similarity calculation are used to perform adaptive threshold segmentation and defect region segmentation; based on spectral clustering and hierarchical clustering methods, a defect classifier is built, and the probability causal relationship generated by defects is deeply analyzed through Bayesian network model to achieve closed-loop control of printing quality.
It improves the accuracy and robustness of print product inspection, enhances the detection ability of different types of print products and special inks, realizes the accurate classification and positioning of defects, in-depth analysis and utilization of test results, improves the level of printing quality management, and reduces human intervention and subjective errors.
Smart Images

Figure CN120088185A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular, to a method and device for printed matter detection. Background Art
[0002] The quality inspection of printed matter is a crucial link in the printing industry, directly affecting the final quality of products and customer satisfaction. Traditional printed matter detection methods mainly rely on manual visual inspection. This method is not only time-consuming and laborious, but also easily affected by subjective factors, making it difficult to ensure the consistency and accuracy of detection. With the continuous development of printing technology and the continuous improvement of product quality requirements, traditional detection methods have been difficult to meet the needs of modern printing industry.
[0003] With the rapid development of computer vision and image processing technology, automated printed matter detection systems based on machine vision have gradually become a research hotspot. However, most existing detection systems mainly focus on image analysis in the visible light range, and the detection effects for some complex situations such as special inks and anti-counterfeiting printing still need to be improved. At the same time, due to the variety of printed matter defects with different shapes, how to effectively extract and analyze defect features to achieve accurate defect classification and positioning is still an urgent problem to be solved. In addition, most existing printed matter detection systems stay at the level of defect detection and classification, lacking in-depth analysis and utilization of detection results. How to effectively feedback and adjust the printing process based on detection results to achieve closed-loop control of printing quality is the key to improving the quality management level of printed matter. At the same time, in the face of different types of printed matter and changing production environments, the adaptability and robustness of the detection system also need to be further improved. Summary of the Invention
[0004] This application provides a method and device for printed matter detection, and this application improves the accuracy of printed matter quality inspection.
[0005] In a first aspect, this application provides a method for printed matter detection, and the method for printed matter detection includes: Collect multi-spectral image data of the printed matter to be tested in different spectral bands; Extract spectral features and perform multi-level fusion on the multi-spectral image data to obtain a comprehensive spectral feature map; Obtain the sample spectral feature maps of multiple sample printed matters to perform frequent feature pattern extraction, generate a spectral fingerprint library, perform regional division and matching degree search to obtain a reference spectral fingerprint map; Perform multi-scale decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map, obtain multiple scale layers, perform local spectral similarity calculation and adaptive threshold segmentation to obtain a binary mask map of the defect area; Perform spectral feature clustering analysis on the binary mask image of the defect area to obtain the defect category; Based on the binary mask image of the defect area and the defect category, perform defect root cause analysis and process adjustment on the printing process parameters to generate a process adjustment plan.
[0006] In a second aspect, the present application provides a device for printed matter detection, and the device for printed matter detection includes: An acquisition module, configured to acquire multi-spectral image data of a printed matter to be measured in different spectral bands; A fusion module, configured to perform spectral feature extraction and multi-level fusion on the multi-spectral image data to obtain a comprehensive spectral feature map; A search module, configured to obtain sample spectral feature maps of multiple sample printed matters to perform frequent feature pattern extraction, generate a spectral fingerprint library, perform regional division and matching degree search to obtain a reference spectral fingerprint map; A decomposition module, configured to perform multi-scale decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map, obtain multiple scale layers, perform local spectral similarity calculation and adaptive threshold segmentation to obtain a binary mask image of the defect area; An analysis module, configured to perform spectral feature clustering analysis on the binary mask image of the defect area to obtain the defect category; A generation module, configured to perform defect root cause analysis and process adjustment on the printing process parameters according to the binary mask image of the defect area and the defect category, and generate a process adjustment plan.
[0007] In a third aspect of the present application, a computer device is provided, including: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory to enable the computer device to execute the above-mentioned method for printed matter detection.
[0008] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is enabled to execute the above-mentioned method for printed matter detection.
[0009] In the technical solution provided by this application, by collecting multi-spectral image data including visible light, near-infrared, and ultraviolet bands, the detection ability for different types of printed matter and special inks is improved, and the detection range is expanded. The feature extraction method is adopted, and through the multi-level fusion of the data layer, feature layer, and decision layer, the spectral and spatial features of the printed matter are comprehensively captured, and the richness and distinctiveness of feature expression are improved. By performing frequent feature pattern extraction and hash index construction on multiple sample printed matters, an efficient spectral fingerprint library is established. By using Gaussian pyramid decomposition and multi-scale energy feature extraction, combined with local spectral similarity calculation, the defect features at different scales are effectively captured, and the detection accuracy and robustness are improved. By constructing a multi-scale image segmentation tree and cross-scale feature fusion, adaptive threshold segmentation is achieved, and the accuracy and adaptive ability of defect area segmentation are improved. Based on spectral clustering and hierarchical clustering methods, the spectral common patterns of defects are extracted, and an efficient defect classifier is constructed, improving the accuracy and efficiency of defect classification. By constructing a defect-process parameter correlation matrix and a Bayesian network model, the probabilistic causal relationship of defect generation is deeply analyzed, the closed-loop control of printing quality is realized, the stability of the printing process and the product quality are improved, and thus the detection accuracy of the printing quality of the printed matter is improved, and human intervention and subjective errors are reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0011] Figure 1 It is a schematic diagram of an embodiment of the method for printed matter detection in the embodiments of this application; Figure 2 It is a schematic diagram of an embodiment of the device for printed matter detection in the embodiments of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0012] The embodiments of the present application provide a method and device for printed matter detection. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and above-mentioned drawings of the present application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described here can be implemented in an order other than those illustrated or described here. In addition, the term "comprising" or "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0013] For ease of understanding, the specific process of the embodiments of the present application will be described below. Please refer to Figure 1 , an embodiment of the method for printed matter detection in the embodiments of the present application includes: Step 101, collect multi-spectral image data of the printed matter to be measured in different spectral bands; It can be understood that the execution subject of the present application can be a device for printed matter detection, or a terminal or a server. Specifically, it is not limited here. The embodiments of the present application will be described by taking the server as the execution subject as an example.
[0014] Specifically, perform multispectral imaging acquisition on the printed matter to be measured to obtain the original image data of multiple spectral channels including visible light, near-infrared, and ultraviolet bands. Perform spectral response correction on the original image data to correct the errors caused by inconsistent sensor responses or environmental light changes, and obtain the first image data. Perform geometric registration on the first image data to ensure that the images of each spectral channel are spatially aligned, and obtain the second image data. Perform spectral curve smoothing processing on the second image data to eliminate the spectral curve fluctuations caused by noise, and obtain the third image data. Perform wavelet transform denoising on the third image data to remove the noise components in the image through wavelet transform, and obtain the clearer fourth image data. Perform spectral normalization processing on the fourth image data to eliminate the spectral data deviation caused by uneven illumination intensity or sensor sensitivity differences, and obtain the fifth image data. Generate a spectral angle mapping diagram by calculating the spectral angle mapping values of each pixel point. The spectral angle mapping value is used to measure the similarity between the spectral characteristics of each pixel point and the reference spectrum, and can effectively distinguish different spectral characteristic regions. Perform adaptive threshold segmentation on the spectral angle mapping diagram, automatically adjust the threshold according to the image content, and obtain the target region mask. Perform region growing on the fifth image data according to the target region mask to expand the target region so that it covers the entire region of interest, and obtain the complete target segmentation region. Perform morphological processing on the target segmentation region. Through morphological operations, the region boundary can be repaired, the holes in the region can be filled, and the isolated points can be removed, etc., and finally the multispectral image data is obtained.
[0015] Step 102: Extract spectral features and perform multi-level fusion on the multispectral image data to obtain a comprehensive spectral feature map; Specifically, perform principal component analysis on the multi-spectral image data to reduce the dimensionality of the high-dimensional spectral data, extract the main characteristic components, and obtain the principal component feature map. The principal component feature map can effectively retain the main information in the original data and reduce redundant data. Calculate the spectral angle of each pixel point based on the principal component feature map to obtain the spectral angle feature map. The spectral angle feature map is used to measure the similarity between each pixel point and the reference spectrum. Perform continuous wavelet transform on the multi-spectral image data to generate a wavelet coefficient matrix. Wavelet transform can analyze the detailed features in the image at different scales and provide a joint representation in the time-frequency domain. Based on the wavelet coefficient matrix, extract energy, entropy, and standard deviation features to obtain the wavelet statistical feature map, and these features can reflect the energy distribution and complexity of the image in different frequency bands. Perform texture analysis on the multi-spectral image data by generating a gray-level co-occurrence matrix to quantify the spatial relationship between pixel pairs in the image. According to the gray-level co-occurrence matrix, calculate contrast, correlation, and homogeneity features to obtain the texture feature map, and these features describe the texture structure and similarity of the image. Perform weighted average fusion on the principal component feature map, spectral angle feature map, wavelet statistical feature map, and texture feature map to obtain the data layer fusion feature map. By assigning different weights to different feature maps and comprehensively considering the importance of various features, a more comprehensive feature representation is generated. Based on the data layer fusion feature map, extract local binary pattern and histogram of oriented gradients features to obtain the feature layer fusion feature map. These features can capture the local texture patterns and gradient direction information in the image and enhance the detailed representation ability of the image. Apply multiple weak classifiers to the feature layer fusion feature map for classification. Each weak classifier is trained and predicted on different feature subsets to obtain multiple classification results. Adopt the voting fusion method to integrate the multiple classification results, and finally obtain the comprehensive spectral feature map of the printed matter to be tested according to the voting results.
[0016] Step 103: Obtain the sample spectral feature maps of multiple sample printed matters, perform frequent feature pattern extraction, generate a spectral fingerprint library, and conduct regional division and matching degree search to obtain the reference spectral fingerprint map; Specifically, obtain the sample spectral feature maps of multiple sample printed materials, perform grid division on the sample spectral feature maps to obtain multiple local feature blocks. The local feature blocks represent the detailed information of the printed materials on different spectral channels. Extract local binary pattern features from the multiple local feature blocks to capture local texture patterns, and obtain a set of local feature descriptors. Construct a visual word bag model according to the set of local feature descriptors. The visual word bag model can quantify the local features to form a feature dictionary. Perform frequent item set mining on the feature dictionary to identify the feature combinations that frequently appear in multiple samples, and obtain a set of frequent feature patterns. Construct a hash table index structure according to the frequent feature patterns to generate a spectral fingerprint library. The spectral fingerprint library can efficiently store and retrieve feature patterns. Perform adaptive grid division on the comprehensive spectral feature map of the printed material to be detected to obtain multiple regions to be matched. The regions to be matched represent different parts of the printed material to be detected, and each part needs to be matched with the features in the spectral fingerprint library. Extract local binary pattern features from the multiple regions to be matched to obtain descriptors to be matched. Perform nearest neighbor search in the spectral fingerprint library according to the descriptors to be matched to obtain candidate matching fingerprints for each region to be matched. Perform geometric consistency verification on the candidate matching fingerprints to screen out the best matching fingerprints for each region to be matched. Geometric consistency verification can exclude those matches that are similar in the feature space but inconsistent in the actual geometric layout, improving the reliability of the matching. Reconstruct the reference features of each region to be matched by the method of weighted average interpolation according to the ideal spectral features corresponding to the best matching fingerprints. Perform spatial stitching on the reference features of all regions to be matched to obtain a reference spectral fingerprint map.
[0017] Step 104: Perform multi-scale decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map, obtain multiple scale layers, perform local spectral similarity calculation and adaptive threshold segmentation to obtain a binary mask map of the defective area; Specifically, perform Gaussian pyramid decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map, decompose the image into multiple scale layers with different resolutions to form an image pyramid. Calculate the local energy feature map for each scale layer of the image pyramid to obtain a multi-scale energy feature map set. The local energy feature map can capture the local energy distribution characteristics of the image at different scales and provide more information for similarity calculation. Perform a sliding window process on each scale layer of the multi-scale energy feature map set. Through the sliding window, spectral feature vectors can be extracted within a local range, and these feature vectors can reflect the spectral characteristics of the local area. Calculate the Euclidean distance between the comprehensive spectral feature map and the reference spectral fingerprint map based on the feature vectors to obtain a distance map for each scale layer. The Euclidean distance, as a commonly used similarity measurement method, quantifies the difference between two spectral feature vectors. Perform a non-linear mapping on the distance map for each scale layer. Through the non-linear mapping, the significant features in the image can be enhanced to obtain an initial similarity map. Based on the initial similarity map, construct a multi-scale image segmentation tree. The multi-scale image segmentation tree can organize the segmentation results of the image at different scales to form a hierarchical image segmentation structure. Perform a bottom-up region merging on the hierarchical image segmentation structure. Through region merging, similar regions can be merged together to obtain multi-scale region features. Perform cross-scale feature fusion based on the multi-scale region features. By fusing features at different scales, the consistency and stability of the features can be improved to obtain a multi-scale spectral consistency map. The multi-scale spectral consistency map can comprehensively reflect the spectral characteristics of the image at different scales. Perform adaptive threshold segmentation on the multi-scale spectral consistency map. By automatically adjusting the threshold through adaptive threshold segmentation to adapt to the feature changes in different regions, a binary mask map of the defect region is obtained.
[0018] Step 105: Perform spectral feature clustering analysis on the binary mask map of the defect region to obtain the defect category; Specifically, perform feature spectral clustering on the binary mask image of the defect area. Through feature spectral clustering, pixel points with similar spectral features can be clustered together to form an initial clustering result. Feature spectral clustering utilizes the spectral information of the image to cluster adjacent and spectrally similar regions in space, thereby initially dividing different defect categories. Calculate the spectral similarity between different categories based on the initial clustering result. Spectral similarity is an indicator for measuring the degree of similarity of spectral features between different categories. By calculating the spectral similarity, determine which initial categories can be merged. Based on the calculated spectral similarity, determine the category merging threshold, which is used to guide the subsequent category merging process. Perform hierarchical clustering on the initial clustering result. Through hierarchical clustering, gradually merge categories with high similarity to form a more stable clustering result. Hierarchical clustering can effectively identify the spectral common patterns of different defect categories, and these patterns reflect the common spectral characteristics of different defect categories. After obtaining the spectral common patterns of different defect categories, construct a defect classifier based on these patterns. The defect classifier can classify unknown defects by learning the spectral features of different categories. Extract comprehensive spectral features from the defect area to generate a feature vector to be classified. The comprehensive spectral features include the spectral information of each band of the multi-spectral image, as well as the features extracted after processing these information, such as spectral angle, energy feature, etc. Input the generated feature vector to be classified into the defect classifier, and classify the feature vector through the classifier to obtain the defect category. The classifier utilizes the previously learned spectral common patterns to discriminate the feature vector to be classified and assign it to the corresponding defect category.
[0019] Step 106: Based on the binary mask image of the defect area and the defect category, perform defect root cause analysis and process adjustment on the printing process parameters to generate a process adjustment plan.
[0020] Specifically, perform connected component analysis on the binary mask image of the defect area to obtain the position and area information of each defect area. Connected component analysis can identify the pixel areas that are connected to each other in the image, thereby determining the position, shape, and size of each defect. Perform defect statistical clustering based on the position, area information, and defect category. Statistical clustering can quantify the number, total area, and their spatial distribution characteristics of various defects. Extract the local spectral features of the defect area to generate a spectral feature sample set. The spectral feature sample set includes the spectral data of different defect areas, and these data reflect the spectral characteristic patterns of the defects. Construct a Gaussian mixture model according to the spectral feature sample set and defect category. The Gaussian mixture model can describe the typical spectral feature patterns of different categories of defects. By learning the sample data, the model can accurately capture the spectral distribution characteristics of various defects. Perform correlation analysis on the typical spectral feature patterns and the current printing process parameters to obtain a defect-process parameter correlation matrix. Correlation analysis is used to reveal the relationship between spectral features and process parameters, and to find out which process parameters have a significant impact on the generation of defects by analysis, and generate a correlation matrix. Construct a Bayesian network model based on the defect-process parameter correlation matrix. The Bayesian network model can reveal the probabilistic causal relationship of defect generation by describing the probabilistic dependence relationship between variables. Based on the Bayesian network model, perform Monte Carlo simulation. Monte Carlo simulation evaluates the effect and risk of process parameter adjustment under uncertain conditions by generating and simulating a large number of random samples. The simulation results can reveal the probability distribution of defect reduction for different process parameter adjustments, thereby providing data support for process adjustment. Finally, generate a process adjustment plan according to the results of the Monte Carlo simulation.
[0021] In the embodiments of the present application, by collecting multi-spectral image data including visible light, near-infrared, and ultraviolet bands, the detection ability for different types of printed matter and special inks is improved, and the detection range is expanded. The feature extraction method is adopted, and through multi-level fusion of the data layer, feature layer, and decision layer, the spectral and spatial features of the printed matter are comprehensively captured, improving the richness and distinctiveness of feature expression. By performing frequent feature pattern extraction and hash index construction on multiple sample printed matters, an efficient spectral fingerprint library is established. By using Gaussian pyramid decomposition and multi-scale energy feature extraction, combined with local spectral similarity calculation, the defect features at different scales are effectively captured, improving the detection accuracy and robustness. By constructing a multi-scale image segmentation tree and cross-scale feature fusion, adaptive threshold segmentation is achieved, improving the accuracy and adaptability of defect area segmentation. Based on spectral clustering and hierarchical clustering methods, the spectral common mode of defects is extracted, and an efficient defect classifier is constructed, improving the accuracy and efficiency of defect classification. By constructing a defect-process parameter correlation matrix and a Bayesian network model, the probability causal relationship of defect generation is deeply analyzed, realizing the closed-loop control of printing quality, improving the stability of the printing process and product quality, and thus improving the detection accuracy of the printing quality of printed matter, reducing human intervention and subjective errors.
[0022] In a specific embodiment, the process of executing step 101 may specifically include the following steps: (1) Perform multi-spectral imaging acquisition on the printed matter to be measured to obtain original image data of multiple spectral channels including visible light, near-infrared, and ultraviolet bands; (2) Perform spectral response correction on the original image data to obtain first image data, and perform geometric registration on the first image data to obtain second image data; (3) Perform spectral curve smoothing processing on the second image data to obtain third image data, and perform wavelet transform denoising on the third image data to obtain fourth image data; (4) Perform spectral normalization processing on the fourth image data to obtain fifth image data, and calculate the spectral angle mapping value of each pixel point according to the fifth image data to obtain a spectral angle mapping map; (5) Perform adaptive threshold segmentation on the spectral angle mapping map to obtain a target region mask; (6) Perform region growing on the fifth image data according to the target region mask to obtain a target segmentation region, and perform morphological processing on the target segmentation region to obtain multi-spectral image data.
[0023] Specifically, multispectral imaging acquisition is performed on the printed matter to be measured. The multispectral imaging system can capture image data of the printed matter in different spectral bands, including visible light, near-infrared, and ultraviolet bands. These spectral channels provide spectral information of different wavelengths, thereby capturing detailed information on the surface and inside of the printed matter. Through the multispectral imaging system, original image data containing multiple spectral channels is obtained. Spectral response correction is performed on the original image data. The spectral response correction aims to correct errors caused by inconsistent sensor responses or changes in ambient light. The spectral response correction can be performed using the following formula: ; where, represents the corrected image data, represents the original image data, represents the dark current, represents the spectral response curve of the sensor. Through spectral response correction, the first image data is obtained. Geometric registration is performed on the first image data to ensure that the images in different spectral channels are spatially aligned, obtaining the second image data. Spectral curve smoothing processing is performed on the second image data. The spectral curve smoothing processing can eliminate the spectral curve fluctuations caused by noise, obtaining the third image data. Wavelet transform denoising is performed on the third image data. The wavelet transform can analyze the detailed features in the image at different scales. Through wavelet transform denoising, the noise components in the image are effectively removed, obtaining the fourth image data. Spectral normalization processing is performed on the fourth image data to eliminate the spectral data deviation caused by uneven illumination intensity or differences in sensor sensitivity, obtaining the fifth image data. The spectral angle mapping value of each pixel point is calculated based on the fifth image data. The spectral angle mapping value is used to measure the similarity between the spectral features of each pixel point and the reference spectrum and can be calculated using the following formula: ; where, represents the spectral angle mapping value, represents the normalized image data, Represents the reference spectrum. By calculating the spectral angle mapping value, a spectral angle mapping diagram is obtained. Adaptive threshold segmentation is performed on the spectral angle mapping diagram. Through adaptive threshold segmentation, the threshold can be automatically adjusted to adapt to the characteristic changes in different regions, and a target region mask is obtained. For example, the Otsu method is used to determine the optimal threshold by maximizing the between-class variance. According to the target region mask, region growing is performed on the fifth image data. Region growing can expand the target region to cover the entire region of interest. The steps of region growing include selecting an initial seed point and then expanding the region according to the similarity criterion until all similar pixels are included, obtaining the target segmentation region. Morphological processing is performed on the target segmentation region. Through morphological operations, the region boundary can be repaired, holes in the region can be filled, and isolated points can be removed, etc. Commonly used morphological operations include dilation, erosion, opening operation, and closing operation. Through these steps, multi-spectral image data is finally obtained.
[0024] In a specific embodiment, the process of performing step 102 may specifically include the following steps: (1) Perform principal component analysis on the multi-spectral image data to obtain a principal component feature map, and calculate the spectral angle of each pixel point according to the principal component feature map to obtain a spectral angle feature map; (2) Perform continuous wavelet transform on the multi-spectral image data to obtain a wavelet coefficient matrix, and extract energy, entropy, and standard deviation features according to the wavelet coefficient matrix to obtain a wavelet statistical feature map; (3) Perform texture analysis on the multi-spectral image data to obtain a gray-level co-occurrence matrix, and calculate contrast, correlation, and homogeneity features according to the gray-level co-occurrence matrix to obtain a texture feature map; (4) Perform weighted average fusion on the principal component feature map, spectral angle feature map, wavelet statistical feature map, and texture feature map to obtain a data layer fusion feature map; (5) Extract local binary pattern and histogram of oriented gradients features according to the data layer fusion feature map to obtain a feature layer fusion feature map; (6) Apply multiple weak classifiers to the feature layer fusion feature map for classification to obtain multiple classification results, and perform voting fusion according to the multiple classification results to obtain a comprehensive spectral feature map of the printed matter to be measured.
[0025] Specifically, principal component analysis is performed on the multi-spectral image data. Principal component analysis is a dimensionality reduction technique that can transform high-dimensional spectral data into low-dimensional principal component feature maps, extracting the main information from the data and reducing redundancy. By performing principal component analysis on the multi-spectral image data, several main component images are obtained, which represent the most important change patterns in the data. The spectral angle of each pixel point is calculated based on the principal component feature map. The spectral angle is an index for measuring the similarity of spectral features. By calculating the spectral angle of each pixel point in the principal component space, a spectral angle feature map is obtained. The calculation formula for the spectral angle is: ; where represents the spectral angle, and respectively represent the spectral values of two pixel points in the principal component feature map, is the number of spectral bands. Continuous wavelet transform is performed on the multi-spectral image data. Continuous wavelet transform is a tool for analyzing signals in the time-frequency domain. Through wavelet transform, a wavelet coefficient matrix can be obtained. The wavelet coefficient matrix contains information about the image at different scales. Based on the wavelet coefficient matrix, energy, entropy, and standard deviation features can be extracted to obtain a wavelet statistical feature map. The energy feature reflects the intensity of the signal in the image, the entropy feature describes the complexity of the image, and the standard deviation feature measures the dispersion of the signal in the image. Texture analysis is performed on the multi-spectral image data. By calculating the gray-level co-occurrence matrix, the texture features in the image can be obtained. The gray-level co-occurrence matrix is a matrix that describes the gray-level relationship between pixel pairs in the image. Based on the gray-level co-occurrence matrix, contrast, correlation, and homogeneity features can be calculated. The contrast feature reflects the difference in gray-level values in the image, the correlation feature describes the linear dependence relationship between pixel pairs in the image, and the homogeneity feature represents the degree of similar pixels in the image. Through these calculations, a texture feature map is obtained. After obtaining the principal component feature map, spectral angle feature map, wavelet statistical feature map, and texture feature map, these feature maps are weighted and averaged for fusion. The different feature maps are weighted and summed according to certain weights to integrate the information of different features and obtain a data-level fusion feature map. Based on the data-level fusion feature map, local binary pattern (LBP) and histogram of oriented gradients (HOG) features are extracted. Local binary pattern is a feature used to describe texture. By comparing the gray-level values of the central pixel and its neighboring pixels, a binary pattern code is generated to reflect the local texture information of the image. The histogram of oriented gradients is a feature used to describe the distribution of image gradient directions. By calculating the gradients of the image in different directions, a histogram of oriented gradients is generated to reflect the edge information of the image. By extracting these features, a feature-level fusion feature map is obtained. Multiple weak classifiers are applied to the feature-level fusion feature map for classification. A weak classifier is a classifier with relatively weak performance. By integrating multiple weak classifiers, the classification accuracy can be improved. Through the Adaboost algorithm, multiple weak classifiers are weighted and combined to obtain a strong classifier. By classifying the feature-level fusion feature map, multiple classification results are obtained.
[0026] In a specific embodiment, the process of performing step 103 may specifically include the following steps: (1) Obtain the sample spectral feature maps of multiple sample printed materials, and perform grid division on the sample spectral feature maps to obtain multiple local feature blocks; (2) Extract local binary pattern features from the multiple local feature blocks to obtain a set of local feature descriptors, and construct a visual word bag model based on the set of local feature descriptors to obtain a feature dictionary; (3) Perform frequent item set mining on the feature dictionary to obtain a set of frequent feature patterns, and construct a hash table index structure based on the set of frequent feature patterns to obtain a spectral fingerprint library; (4) Perform adaptive grid division on the comprehensive spectral feature map of the printed matter to be detected to obtain multiple regions to be matched, and extract local binary pattern features from the multiple regions to be matched to obtain feature descriptors to be matched; (5) Perform nearest neighbor search in the spectral fingerprint library according to the feature descriptors to be matched to obtain candidate matching fingerprints for each region to be matched, and perform geometric consistency verification on the candidate matching fingerprints to obtain the best matching fingerprints for each region to be matched; (6) Reconstruct the reference features of each region to be matched by weighted average interpolation according to the ideal spectral features corresponding to the best matching fingerprints, and perform spatial stitching on the reference features of all regions to be matched to obtain a reference spectral fingerprint map.
[0027] Specifically, obtain the sample spectral feature maps of multiple sample printed materials. Each sample spectral feature map contains the image data of the printed material in different spectral bands, and these image data can reflect the color and material characteristics of the printed material. Perform grid division on the sample spectral feature maps to divide the images into multiple local feature blocks. Extract local binary pattern (LBP) features from the multiple local feature blocks. The local binary pattern is an effective method for describing texture features. By comparing the gray value of each pixel with the gray values of its surrounding pixels, a binary pattern code is generated to describe the local texture structure of the image, and a set of local feature descriptors for each local feature block is obtained. These sets of descriptors can effectively capture the detailed features of the printed material under different spectral bands. Construct a bag-of-visual-words model based on the set of local feature descriptors. The bag-of-visual-words model is a method for quantifying image features into fixed-length feature vectors. By clustering similar feature descriptors into visual words, a feature dictionary is formed. Use the k-means clustering algorithm to cluster the local feature descriptors into k visual words, and each visual word represents a typical local feature. In this way, each local feature block is described as a feature vector composed of visual words, and a feature dictionary is obtained. Perform frequent item set mining on the feature dictionary. Frequent item set mining is a method for discovering frequently occurring patterns in data. By mining frequently occurring combinations of visual words, a set of frequent feature patterns is obtained. The frequent feature patterns can effectively describe the typical features of the sample printed materials. Based on the set of frequent feature patterns, construct a hash table index structure to generate a spectral fingerprint library. The hash table index structure can quickly store and retrieve frequent feature patterns, providing efficient support for subsequent matching. Perform adaptive grid division on the comprehensive spectral feature map of the printed material to be detected to obtain multiple regions to be matched. The adaptive grid division method can dynamically adjust the grid size according to the image content, thereby improving the accuracy of feature matching. Extract local binary pattern features from the regions to be matched to generate descriptors to be matched. In this way, compare the local features of the printed material to be detected with the features in the spectral fingerprint library. Perform nearest neighbor search in the spectral fingerprint library according to the descriptors to be matched to find the candidate matching fingerprints for each region to be matched. The nearest neighbor search is an efficient similarity search method that can find the frequent feature pattern most similar to the descriptor to be matched. Perform geometric consistency verification on the candidate matching fingerprints. By comparing the geometric consistency between the candidate matching fingerprints and the regions to be matched, filter out the best matching fingerprints for each region to be matched. According to the ideal spectral features corresponding to the best matching fingerprints, reconstruct the reference features of each region to be matched through the weighted average interpolation method. The weighted average interpolation method can comprehensively consider the similarities of different candidate matching fingerprints and obtain a more accurate reference feature through weighted average. Through weighted average interpolation, reconstruct the reference features of each region to be matched. Perform spatial stitching on the reference features of all regions to be matched to obtain a reference spectral fingerprint map.Seamlessly combine the reference features of each region to be matched to form a complete reference spectral feature map.
[0028] In a specific embodiment, the process of executing step 104 may specifically include the following steps: (1) Perform Gaussian pyramid decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map to obtain an image pyramid of multiple scale levels; (2) Calculate the local energy feature map for each scale level of the image pyramid to obtain a multi-scale energy feature map set, and perform a sliding window process on each scale level of the multi-scale energy feature map set to obtain local spectral feature vectors; (3) Calculate the Euclidean distance between the comprehensive spectral feature map and the reference spectral fingerprint map according to the local spectral feature vectors to obtain a distance map for each scale level; (4) Perform non-linear mapping on the distance map of each scale level to obtain an initial similarity map, and construct a multi-scale image segmentation tree according to the initial similarity map to obtain a hierarchical image segmentation structure; (5) Perform bottom-up region merging on the hierarchical image segmentation structure to obtain multi-scale region features, and perform cross-scale feature fusion according to the multi-scale region features to obtain a multi-scale spectral consistency map; (6) Perform adaptive threshold segmentation on the multi-scale spectral consistency map to obtain a binary mask map of the defective region.
[0029] Specifically, perform Gaussian pyramid decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map. Gaussian pyramid decomposition is a commonly used multi-scale image processing method. By repeatedly performing Gaussian blur and downsampling operations on the image, the image is decomposed into multiple scale levels, and each scale level is a low-resolution version of the original image. Perform Gaussian blur processing on the image using the Gaussian kernel function
[0030] ; where is the standard deviation of the Gaussian blur, and are the coordinates of the image. Perform downsampling on the blurred image: ; where represents the th layer image, represents the th layer image. Calculate the local energy feature map for each scale level of the image pyramid. The local energy feature map can be obtained by calculating the energy distribution of the image in a local region. The local energy can be expressed as the sum of the squares of the pixel values in a certain window of the image: ; Among them, represents the local energy value of a pixel point , represents the pixel value of an image, represents the window radius. A sliding window process is performed on each scale layer of the multi-scale energy feature map set to obtain local spectral feature vectors. The sliding window process is to define a moving window on the image and calculate the feature vectors at each position to obtain the feature descriptions of each local area in the image. According to the local spectral feature vectors, the Euclidean distance between the comprehensive spectral feature map and the reference spectral fingerprint map is calculated. The Euclidean distance is a commonly used similarity measurement method and can be calculated by the following formula: ; Among them, represents the Euclidean distance between two feature vectors and , and respectively represent the values of the th feature. By calculating the Euclidean distance on each scale layer, a distance map for each scale layer is obtained. A non-linear mapping is performed on the distance map for each scale layer to enhance the significant features in the image and obtain an initial similarity map. The non-linear mapping can be achieved by performing a logarithmic transformation or other forms of non-linear transformation on the distance map: ; Among them, represents the initial similarity map, represents the distance map. According to the initial similarity map, a multi-scale image segmentation tree is constructed. The multi-scale image segmentation tree is a hierarchical structure for image segmentation. By performing image segmentation at different scales, the segmentation results are gradually refined. Preliminary segmentation is performed at the coarsest scale layer, and then further refinement is performed at finer scale layers, finally forming a hierarchical image segmentation structure. A bottom-up region merging is performed on the hierarchical image segmentation structure. According to the similarity of adjacent regions, similar regions are merged together to obtain multi-scale region features. The similarity measurement for region merging can use the following formula: ; Among them, represents the similarity between region and region , and respectively represent the gray values of the pixels and within the regions, It is the standard deviation of the similarity metric. Cross-scale feature fusion is performed based on multi-scale regional features. By fusing features at different scales, the consistency and stability of the features are improved, and a multi-scale spectral consistency map is obtained. The multi-scale spectral consistency map can comprehensively reflect the spectral features of the image at different scales and provide a more reliable feature representation. Adaptive threshold segmentation is performed on the multi-scale spectral consistency map. Through adaptive threshold segmentation, the threshold can be automatically adjusted to adapt to the feature changes in different regions, and a binary mask map of the defect region is obtained. One of the methods of adaptive threshold segmentation is to use the Otsu method to determine the optimal threshold by maximizing the between-class variance.
[0031] In a specific embodiment, the process of executing step 105 may specifically include the following steps: (1) Perform feature-spectrum clustering on the binary mask map of the defect region to obtain an initial clustering result, and calculate the spectral similarity between different classes according to the initial clustering result to obtain a class merging threshold; (2) Perform hierarchical clustering on the initial clustering result to obtain the spectral common patterns of different defect classes, and construct a defect classifier according to the spectral common patterns; (3) Extract comprehensive spectral features from the defect region to generate a feature vector to be classified, and input the feature vector to be classified into the defect classifier to obtain the defect class.
[0032] Specifically, perform feature-spectrum clustering on the binary mask map of the defect region. Feature-spectrum clustering is a method of clustering by analyzing the spectral features of image pixels. By calculating the similarity of spectral features, similar pixels are clustered together. The feature-spectrum matrix S is used to represent the spectral features of each pixel in the image, and each row of the matrix represents the spectral feature vector of a pixel.
[0033] ; Among them, represents the value of the th pixel in the th spectral band, is the number of pixels, is the number of spectral bands. Through clustering analysis of the feature-spectrum matrix, an initial clustering result is obtained, and each clustering represents a class of similar spectral features. Calculate the spectral similarity between different classes according to the initial clustering result to obtain a class merging threshold. The spectral similarity can be calculated using cosine similarity, and the formula is as follows: ; Among them, and b respectively represent two spectral feature vectors, · represents the dot product of vectors, and Denotes the modulus of a vector. By calculating the cosine similarity between each cluster center, a spectral similarity matrix between classes is obtained, and a threshold for class merging is determined based on this matrix. If the spectral similarity between two classes is greater than the threshold, they can be considered similar and merged. Hierarchical clustering is performed on the initial clustering result to obtain the spectral common patterns of different defect classes. Hierarchical clustering is a clustering method that forms a hierarchical structure by continuously merging similar classes. During the hierarchical clustering process, similar classes are gradually merged according to the spectral similarity between classes, and finally several classes are formed, each class representing the spectral common pattern of a type of defect. After obtaining the spectral common patterns of different defect classes, a defect classifier is constructed based on these patterns. The defect classifier can be constructed by supervised learning methods, and common methods include support vector machines, random forests, etc. Prepare a training dataset, including the labeled defect regions and their corresponding spectral feature vectors. Use the training dataset to train the classifier so that it can accurately predict the defect class based on the input spectral feature vector. Extract comprehensive spectral features from the defect regions to generate the feature vectors to be classified. The comprehensive spectral features can be obtained through multispectral imaging technology, including performing multispectral imaging on the defect regions, obtaining image data in different bands, and preprocessing these data (such as normalization, smoothing, etc.). By extracting features from the processed image data, the comprehensive spectral feature vectors of each defect region are obtained. Input the feature vectors to be classified into the defect classifier to obtain the defect class. The classifier makes predictions based on the input spectral feature vector and outputs the corresponding defect class. Through this method, the defect regions are accurately classified, thus achieving the goal of defect detection and classification.
[0034] In a specific embodiment, the process of executing step 106 may specifically include the following steps: (1) Perform connected component analysis on the binary mask image of the defect region to obtain the position and area information of each defect region; (2) Perform defect statistical clustering based on the position, area information, and defect class to obtain the quantity, total area, and spatial distribution characteristics of each type of defect, and extract local spectral features to obtain a spectral feature sample set; (3) Construct a Gaussian mixture model based on the spectral feature sample set and the defect class to obtain the typical spectral feature pattern, and perform correlation analysis on the typical spectral feature pattern and the current printing process parameters to obtain the defect-process parameter correlation matrix; (4) Construct a Bayesian network model based on the defect-process parameter correlation matrix to obtain the probability causal relationship of defect generation, and perform Monte Carlo simulation based on the probability causal relationship to generate a process adjustment plan.
[0035] Specifically, perform connected component analysis on the binary mask image of the defect area. Connected component analysis is an image processing technique used to identify and label connected pixel regions in an image. Through connected component analysis, the position and area information of each defect area are obtained. This information can be represented as the bounding box coordinates and the number of pixels of the region. Perform defect statistical clustering based on the position, area information, and defect category. Through statistical clustering analysis, the quantity, total area, and spatial distribution characteristics of various types of defects are obtained. For example, assume there are three defect categories , the number of defects in each category can be counted , the total area , and their spatial distribution in the image. The spatial distribution can be represented by calculating the centroid position of each defect : Centroid ; Extract the local spectral features of the defect area to generate a spectral feature sample set. Spectral features can be obtained through hyperspectral imaging technology, including the reflectance values of each defect area in different spectral bands. By processing and extracting the spectral data of each defect area, a spectral feature vector is obtained. For example, for the defect area , its spectral feature vector can be expressed as , where represents the value of the th spectral band. Based on the spectral feature sample set and the defect category, construct a Gaussian mixture model. The Gaussian mixture model is a probability model used to represent the data distribution with the weighted sum of multiple Gaussian distributions. Through maximum likelihood estimation, fit the parameters of the Gaussian mixture model, including the mean vector , the covariance matrix , and the mixing coefficients
[0036] ; where N represents the probability density function of the th Gaussian component. The Gaussian mixture model obtained through training represents the typical spectral feature pattern of each defect category. Perform correlation analysis on the typical spectral feature pattern and the current printing process parameters to obtain the defect-process parameter correlation matrix. Assume there are process parameters , and the correlation matrix represents the correlation between the spectral feature pattern and the process parameters: ; where represents the spectral feature pattern and the process parameter The correlation coefficient between. By calculating the correlation matrix, determine which process parameters have a significant impact on defect generation. Construct a Bayesian network model based on the defect-process parameter correlation matrix. A Bayesian network is a probabilistic graphical model used to represent causal relationships between variables. Nodes represent variables, and edges represent conditional dependencies between variables. By learning the Bayesian network model, obtain the probabilistic causal relationship of defect generation. Suppose there is a Bayesian network containing nodes, where the nodes represent defect categories and process parameters, and the edges represent conditional dependencies. By calculating the conditional probability distribution, the probabilistic causal relationship of defect generation can be obtained: ; where, represents the defect category, represents the process parameter, Pa represents the set of parent nodes of node . Based on the probabilistic causal relationship of the Bayesian network, perform Monte Carlo simulation to generate a process adjustment plan. Monte Carlo simulation is a method of simulating complex systems through a large number of random samples. By performing Monte Carlo simulation on the Bayesian network model, evaluate the impact of different process parameter adjustments on defect generation and generate an optimal process adjustment plan. Suppose simulations are performed for each process parameter, record the occurrence probability of defects in each simulation, and then select the combination of process parameters with the lowest defect occurrence probability as the process adjustment plan according to the simulation results: ; For example, suppose detecting ink defects in printed products. Obtain the position and area information of each defect area through connected component analysis. Based on this information and the defect category, perform defect statistical clustering to obtain the quantity, total area, and spatial distribution characteristics of various defects. For example, suppose there are three defect categories , and it is statistically obtained that the number of defects in category is 10, the total area is 500 pixels, and the spatial distribution characteristic is that the defects are concentrated in the upper left corner of the image. Extract the local spectral characteristics of each defect area to generate a spectral feature sample set. Suppose the spectral feature vector of the defect area is . Based on the spectral feature sample set and the defect category, construct a Gaussian mixture model to obtain the typical spectral feature patterns of each defect category. For example, the Gaussian mixture model parameters of category are the mean vector and the covariance matrix: ; Perform correlation analysis on the typical spectral feature patterns and the current printing process parameters to obtain the defect-process parameter correlation matrix. For example, suppose there are two process parameters and , the calculated correlation matrix is as follows: ; Among them, represents the spectral feature pattern and the process parameter The correlation coefficient between them is 0.8. A Bayesian network model is constructed based on the defect-process parameter correlation matrix to obtain the probability causal relationship of defect generation. Through the Bayesian network model, the probability of defect occurrence under different process parameter combinations is calculated. Monte Carlo simulation is performed based on the probability causal relationship of the Bayesian network to generate a process adjustment plan. Assume that 1000 simulations are performed for each process parameter, and the probability of defect occurrence in each simulation is recorded. Then, the process parameter combination with the lowest probability of defect occurrence is selected as the process adjustment plan. For example, the simulation results show that when the process parameter combination is and , the probability of defect occurrence is the lowest. Therefore, this parameter combination is selected as the process adjustment plan.
[0037] The method for printed matter detection in the embodiments of the present application has been described above. Next, the device for printed matter detection in the embodiments of the present application will be described. Please refer to Figure 2 , an embodiment of the device for printed matter detection in the embodiments of the present application includes: An acquisition module 201, configured to acquire multi-spectral image data of a printed matter to be measured in different spectral bands; A fusion module 202, configured to perform spectral feature extraction and multi-level fusion on the multi-spectral image data to obtain a comprehensive spectral feature map; A search module 203, configured to obtain sample spectral feature maps of multiple sample printed matters for frequent feature pattern extraction, generate a spectral fingerprint library, perform region division and matching degree search, and obtain a reference spectral fingerprint map; A decomposition module 204, configured to perform multi-scale decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map, obtain multiple scale layers, perform local spectral similarity calculation and adaptive threshold segmentation, and obtain a binary mask map of the defect region; An analysis module 205, configured to perform spectral feature clustering analysis on the binary mask map of the defect region to obtain defect categories; A generation module 206, configured to perform defect root cause analysis and process adjustment on the printing process parameters according to the binary mask map of the defect region and the defect categories, and generate a process adjustment plan.
[0038] Through the collaborative cooperation of the above-mentioned various components, by collecting multi-spectral image data including visible light, near-infrared, and ultraviolet bands, the detection ability for different types of printed matter and special inks is improved, and the detection range is expanded. Feature extraction methods are adopted, and through multi-level fusion of the data layer, feature layer, and decision layer, the spectral and spatial features of printed matter are comprehensively captured, improving the richness and distinctiveness of feature expression. By frequently extracting feature patterns and constructing hash indexes for multiple sample printed matters, an efficient spectral fingerprint library is established. By using Gaussian pyramid decomposition and multi-scale energy feature extraction, combined with local spectral similarity calculation, defect features at different scales are effectively captured, improving the detection accuracy and robustness. By constructing a multi-scale image segmentation tree and cross-scale feature fusion, adaptive threshold segmentation is achieved, improving the accuracy and adaptability of defect area segmentation. Based on spectral clustering and hierarchical clustering methods, the spectral common patterns of defects are extracted, and an efficient defect classifier is constructed, improving the accuracy and efficiency of defect classification. By constructing a defect-process parameter correlation matrix and a Bayesian network model, the probabilistic causal relationship of defect generation is deeply analyzed, realizing the closed-loop control of printing quality, improving the stability of the printing process and product quality, and further improving the accuracy of printing quality detection of printed matter, reducing human intervention and subjective errors.
[0039] This application also provides a computer device, which includes a memory and a processor. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the processor executes the steps of the method for printed matter detection in the above-mentioned various embodiments.
[0040] This application also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer, the computer executes the steps of the method for printed matter detection.
[0041] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, systems, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0042] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0043] As described above, the above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of various embodiments of this application.
Claims
1. A method for printed matter detection, characterized in that: The method for printed matter detection comprises: Collect multispectral image data of the printed product to be tested in different spectral bands; Extracting spectral features and fusing the multi-spectral image data at multiple levels to obtain a comprehensive spectral feature map; Obtain sample spectral characteristic graphs of multiple sample prints to extract frequent characteristic patterns, generate a spectral fingerprint library, perform area division and matching degree search, and obtain a reference spectral fingerprint graph; Performing multi-scale decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map to obtain multiple scale layers and performing local spectral similarity calculation and adaptive threshold segmentation to obtain a binary mask map of the defect area; Performing spectral feature clustering analysis on the binary mask image of the defect area to obtain a defect category; According to the binary mask image of the defect area and the defect category, defect root cause analysis and process adjustment are performed on the printing process parameters to generate a process adjustment plan.
2. The method for printed matter detection according to claim 1, characterized in that: The collecting of multispectral image data of the printed product to be tested in different spectral bands includes: Performing multispectral imaging acquisition on the printed product to be tested to obtain original image data of multiple spectral channels including visible light, near infrared and ultraviolet bands; Performing spectral response correction on the original image data to obtain first image data, and performing geometric registration on the first image data to obtain second image data; Performing spectral curve smoothing processing on the second image data to obtain third image data, and performing wavelet transform denoising on the third image data to obtain fourth image data; Performing spectral normalization processing on the fourth image data to obtain fifth image data, and calculating the spectral angle mapping value of each pixel point according to the fifth image data to obtain a spectral angle mapping diagram; Performing adaptive threshold segmentation on the spectral angle map to obtain a target area mask; The fifth image data is subjected to region growing according to the target region mask to obtain a target segmentation region, and the target segmentation region is subjected to morphological processing to obtain multispectral image data.
3. The method for printed matter detection according to claim 2, characterized in that: The step of extracting spectral features and fusing the multi-spectral image data at multiple levels to obtain a comprehensive spectral feature map includes: Performing principal component analysis on the multispectral image data to obtain a principal component characteristic map, and calculating the spectral angle of each pixel point according to the principal component characteristic map to obtain a spectral angle characteristic map; Performing continuous wavelet transform on the multispectral image data to obtain a wavelet coefficient matrix, and extracting energy, entropy and standard deviation features according to the wavelet coefficient matrix to obtain a wavelet statistical feature map; Performing texture analysis on the multispectral image data to obtain a gray level co-occurrence matrix, and calculating contrast, correlation and homogeneity features according to the gray level co-occurrence matrix to obtain a texture feature map; Performing weighted average fusion on the principal component feature map, the spectral angle feature map, the wavelet statistical feature map and the texture feature map to obtain a data layer fusion feature map; Extracting local binary pattern and directional gradient histogram features according to the data layer fusion feature map to obtain a feature layer fusion feature map; A plurality of weak classifiers are applied to the feature layer fusion feature map to perform classification to obtain a plurality of classification results, and voting fusion is performed according to the plurality of classification results to obtain a comprehensive spectral feature map of the printed product to be tested.
4. The method for printed matter detection according to claim 3, characterized in that: The method of obtaining sample spectral characteristic graphs of a plurality of sample printed products to extract frequent characteristic patterns, generating a spectral fingerprint library, performing area division and matching degree search, and obtaining a reference spectral fingerprint graph includes: Acquire sample spectral characteristic graphs of a plurality of sample printed products, and perform grid division on the sample spectral characteristic graphs to obtain a plurality of local characteristic blocks; Performing local binary pattern feature extraction on the multiple local feature blocks to obtain a local feature descriptor set, and constructing a visual word bag model according to the local feature descriptor set to obtain a feature dictionary; Performing frequent item set mining on the feature dictionary to obtain a frequent feature pattern set, and constructing a hash table index structure according to the frequent feature pattern set to obtain a spectral fingerprint library; Adaptively gridding the comprehensive spectral feature map of the printed matter to be detected to obtain a plurality of regions to be matched, and extracting local binary pattern features from the plurality of regions to be matched to obtain feature descriptors to be matched; Performing a nearest neighbor search in the spectral fingerprint library according to the feature descriptor to be matched to obtain a candidate matching fingerprint for each area to be matched, and performing geometric consistency verification on the candidate matching fingerprint to obtain the best matching fingerprint for each area to be matched; According to the ideal spectral features corresponding to the best matching fingerprint, the reference features of each area to be matched are reconstructed by weighted average interpolation, and the reference features of all areas to be matched are spatially spliced to obtain a reference spectral fingerprint.
5. The method for printed matter detection according to claim 1, characterized in that: The method of performing multi-scale decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map to obtain multiple scale layers and performing local spectral similarity calculation and adaptive threshold segmentation to obtain a binary mask map of the defect area includes: Performing Gaussian pyramid decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map to obtain an image pyramid of multiple scale layers; Performing local energy feature map calculation on each scale layer of the image pyramid to obtain a multi-scale energy feature atlas, and performing sliding window processing on each scale layer of the multi-scale energy feature atlas to obtain a local spectral feature vector; Calculate the Euclidean distance between the comprehensive spectral feature map and the reference spectral fingerprint map according to the local spectral feature vector to obtain a distance map of each scale layer; Performing nonlinear mapping on the distance graph of each scale layer to obtain an initial similarity graph, and constructing a multi-scale image segmentation tree according to the initial similarity graph to obtain a hierarchical image segmentation structure; Performing bottom-up region merging on the hierarchical image segmentation structure to obtain multi-scale regional features, and performing cross-scale feature fusion based on the multi-scale regional features to obtain a multi-scale spectral consistency map; Adaptive threshold segmentation is performed on the multi-scale spectral consistency map to obtain a binary mask map of the defect area.
6. The method for printed matter detection according to claim 5, characterized in that: The performing spectral feature clustering analysis on the binary mask image of the defect area to obtain the defect category includes: Performing feature spectrum clustering on the binary mask image of the defect area to obtain an initial clustering result, and calculating the spectral similarity between categories based on the initial clustering result to obtain a category merging threshold; Performing hierarchical clustering on the initial clustering results to obtain spectral commonality patterns of different defect categories, and constructing a defect classifier based on the spectral commonality patterns; A comprehensive spectral feature is extracted from the defect area to generate a feature vector to be classified, and the feature vector to be classified is input into the defect classifier to obtain a defect category.
7. The method for printed matter detection according to claim 6, characterized in that: The defect root cause analysis and process adjustment of printing process parameters are performed according to the binary mask image of the defect area and the defect category to generate a process adjustment plan, including: Performing connected domain analysis on the binary mask image of the defect area to obtain the position and area information of each defect area; Perform defect statistical clustering according to the position and area information and the defect category to obtain the number, total area and spatial distribution characteristics of each type of defect, and extract local spectral features to obtain a spectral feature sample set; A Gaussian mixture model is constructed according to the spectral feature sample set and the defect category to obtain a typical spectral feature pattern, and a correlation analysis is performed on the typical spectral feature pattern and a current printing process parameter to obtain a defect-process parameter correlation matrix; A Bayesian network model is constructed according to the defect-process parameter correlation matrix to obtain the probabilistic causal relationship of defect generation, and a Monte Carlo simulation is performed based on the probabilistic causal relationship to generate a process adjustment plan.
8. A device for printed matter detection, used for executing the method for printed matter detection as claimed in any one of claims 1 to 7, characterized in that: The device for printed matter detection comprises: An acquisition module, used for acquiring multispectral image data of the printed product to be tested in different spectral bands; A fusion module is used to extract spectral features and perform multi-level fusion on the multispectral image data to obtain a comprehensive spectral feature map; A search module is used to obtain sample spectral feature maps of multiple sample prints to extract frequent feature patterns, generate a spectral fingerprint library, and perform region division and matching degree search to obtain a reference spectral fingerprint map; A decomposition module, used to perform multi-scale decomposition on the comprehensive spectral feature map and the reference spectral fingerprint map to obtain multiple scale layers and perform local spectral similarity calculation and adaptive threshold segmentation to obtain a binary mask map of the defect area; An analysis module, used for performing spectral feature clustering analysis on the binary mask image of the defect area to obtain a defect category; A generation module is used to perform defect root cause analysis and process adjustment on printing process parameters according to the binary mask image of the defect area and the defect category, and generate a process adjustment plan.
9. A computer device, characterized in that: The computer device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the computer device to execute the method for printed product detection according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the method for printed matter detection according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Hyperspectral image classification algorithm based on dual denoising in combination with multi-scale superpixel dimension reduction
CN112633202A
Printing quality defect detection method and storage medium
CN113034492A
Intelligent control method and system for quality inspection of printing ink presswork
CN117576101A
Multispectral image-based water pollution area identification method and system
WO2022252242A1
Defect detection method and apparatus for silicone product, and terminal device and medium
WO2024187356A1
Cited By
Industrial defect classification detection method and device, medium and electronic equipment
CN120374628A
Image-based defect detection method, electronic equipment, medium and program product
CN120782774A
Printing defect detection method and device based on cross-modal alignment
CN120807492A
Printing product defect detection method and device and readable medium
CN120912601A
Ink printing defect detection method based on image processing
CN121414680A