A method and apparatus for inspecting printed matter
By employing multispectral image acquisition and feature fusion technology, the accuracy and consistency issues in printed matter inspection have been resolved, enabling closed-loop control of the printing process and improving the accuracy and stability of printed matter quality inspection.
Patent Information
- Application Number
- CN202411400053.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-10-09
AI Technical Summary
Existing printed matter inspection methods rely on manual visual inspection, which is time-consuming, labor-intensive, and susceptible to subjective factors, making it difficult to guarantee the consistency and accuracy of the inspection. Furthermore, existing systems are not effective in detecting complex situations and classifying defects, lack in-depth analysis of inspection results and process feedback, and have insufficient adaptability and robustness.
Multispectral image acquisition is employed, and a comprehensive spectral feature map is generated through spectral feature extraction and multi-level fusion. Combined with frequent feature pattern extraction and spectral fingerprint database, multi-scale decomposition and adaptive threshold segmentation are performed to segment defect regions and perform cluster analysis. A defect classifier and Bayesian network model are then constructed to achieve process adjustment.
It improves the accuracy and robustness of printed matter inspection, expands the inspection range, reduces human intervention and subjective errors, realizes closed-loop control of printing quality, and enhances the stability of printing process and product quality.
Smart Images

Figure CN120088185B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method and apparatus for inspecting printed matter. Background Art
[0002] Print quality inspection is a crucial step in the printing industry, directly impacting final product quality and customer satisfaction. Traditional inspection methods primarily rely on manual visual inspection, which is not only time-consuming and labor-intensive but also susceptible to subjective factors, making it difficult to guarantee consistency and accuracy. With the continuous development of printing technology and increasingly stringent product quality requirements, traditional inspection methods are no longer sufficient to meet the demands of the modern printing industry.
[0003] With the rapid development of computer vision and image processing technologies, automated printing inspection systems based on machine vision have gradually become a research hotspot. However, most existing inspection systems mainly focus on image analysis within the visible light range, and their effectiveness in detecting complex situations such as special inks and anti-counterfeiting printing still needs improvement. Meanwhile, due to the diverse types and forms of printing defects, effectively extracting and analyzing defect features to achieve accurate defect classification and location remains a pressing issue. Furthermore, most existing printing inspection systems remain at the level of defect detection and classification, lacking in-depth analysis and utilization of the detection results. How to effectively provide feedback and adjustments to the printing process based on the detection results, achieving closed-loop control of printing quality, is key to improving the level of printing quality management. At the same time, the adaptability and robustness of the inspection system also need further improvement in the face of different types of printed materials and constantly changing production environments. Summary of the Invention
[0004] This application provides a method and apparatus for inspecting printed matter, which improves the accuracy of printing quality inspection.
[0005] In a first aspect, this application provides a method for inspecting printed matter, the method comprising:
[0006] Collect multispectral image data of the printed material under test in different spectral bands;
[0007] The multispectral image data is subjected to spectral feature extraction and multi-level fusion to obtain a comprehensive spectral feature map;
[0008] The sample spectral feature maps of multiple printed samples are obtained, frequent feature patterns are extracted, a spectral fingerprint database is generated, and region division and matching degree search are performed to obtain a reference spectral fingerprint map.
[0009] The comprehensive spectral feature map and the reference spectral fingerprint map are decomposed into multiple scale layers, and local spectral similarity calculation and adaptive threshold segmentation are performed to obtain a binary mask map of the defect region.
[0010] Spectral feature clustering analysis is performed on the binary mask image of the defect region to obtain the defect category;
[0011] Based on the binary mask image of the defective region and the defect category, the printing process parameters are analyzed for root causes and the process is adjusted to generate a process adjustment plan.
[0012] Secondly, this application provides an apparatus for inspecting printed matter, the apparatus comprising:
[0013] The acquisition module is used to acquire multispectral image data of the printed material under test in different spectral bands;
[0014] The fusion module is used to extract spectral features and fuse them at multiple levels from the multispectral image data to obtain a comprehensive spectral feature map.
[0015] The search module is used to obtain the spectral feature maps of multiple sample printed materials, extract frequent feature patterns, generate a spectral fingerprint database, perform region division and matching degree search, and obtain a reference spectral fingerprint map.
[0016] The decomposition module is 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 region.
[0017] The analysis module is used to perform spectral feature clustering analysis on the binary mask image of the defect region to obtain the defect category;
[0018] The generation module is used to perform root cause analysis and process adjustment on printing process parameters based on the binary mask image of the defect area and the defect category, and generate a process adjustment plan.
[0019] A third aspect of this application provides a computer device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the computer device to perform the above-described method for printing inspection.
[0020] A fourth aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described method for inspecting printed matter.
[0021] The technical solution provided in this application improves the detection capability for different types of printed materials and special inks and expands the detection range by acquiring multispectral image data including visible light, near-infrared, and ultraviolet bands. It employs feature extraction methods and, through multi-level fusion of data, feature, and decision layers, comprehensively captures the spectral and spatial features of printed materials, improving the richness and discriminative power of feature representation. By extracting frequent feature patterns and constructing hash indexes from multiple sample printed materials, an efficient spectral fingerprint database is established. Gaussian pyramid decomposition and multi-scale energy feature extraction, combined with local spectral similarity calculation, effectively capture defect features at different scales, improving 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 region segmentation. Based on spectral clustering and hierarchical clustering methods, common spectral patterns of defects are extracted, constructing an efficient defect classifier and 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 was analyzed in depth, realizing closed-loop control of printing quality, improving the stability of printing process and product quality, thereby improving the accuracy of printing quality inspection and reducing human intervention and subjective errors. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of one embodiment of the method for inspecting printed matter in this application.
[0024] Figure 2 This is a schematic diagram of one embodiment of the apparatus for printing inspection in this application. Detailed Implementation
[0025] This application provides a method and apparatus for inspecting printed matter. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0026] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the method for inspecting printed matter in this application includes:
[0027] Step 101: Collect multispectral image data of the printed material to be tested in different spectral bands;
[0028] It is understood that the executing entity of this application can be a device for printing inspection, a terminal, or a server; no specific limitation is made here. This application's embodiments use a server as an example for illustration.
[0029] Specifically, multispectral imaging is performed on the printed material under test to acquire raw image data from multiple spectral channels, including visible, near-infrared, and ultraviolet bands. Spectral response correction is applied to the raw image data to correct errors caused by inconsistent sensor responses or changes in ambient light, resulting in the first image data. Geometric registration is performed on the first image data to ensure spatial alignment of each spectral channel, resulting in the second image data. Spectral curve smoothing is applied to the second image data to eliminate spectral curve fluctuations caused by noise, resulting in the third image data. Wavelet transform denoising is performed on the third image data to remove noise components, resulting in a clearer fourth image data. Spectral normalization is performed on the fourth image data to eliminate spectral data deviations caused by uneven illumination intensity or differences in sensor sensitivity, resulting in the fifth image data. A spectral angle mapping map is generated by calculating the spectral angle mapping value of each pixel. The spectral angle mapping value measures the similarity between the spectral features of each pixel and the reference spectrum, effectively distinguishing different spectral feature regions. Adaptive threshold segmentation is performed on the spectral angle mapping map, automatically adjusting the threshold according to the image content to obtain a target region mask. Based on the target region mask, region growing is performed on the fifth image data to expand the target region so that it covers the entire region of interest, resulting in a complete target segmentation region. Morphological processing is then performed on the target segmentation region to repair region boundaries, fill holes within the region, remove isolated points, etc., ultimately yielding multispectral image data.
[0030] Step 102: Extract spectral features and perform multi-level fusion on the multispectral image data to obtain a comprehensive spectral feature map;
[0031] Specifically, principal component analysis (PCA) is performed on the multispectral image data to reduce the dimensionality of the high-dimensional spectral data and extract the main feature components, resulting in a PCA feature map. The PCA feature map effectively preserves the main information in the original data and reduces redundant data. Based on the PCA feature map, the spectral angle of each pixel is calculated, resulting in a spectral angle feature map. The spectral angle feature map is used to measure the similarity between each pixel and the reference spectrum. Continuous wavelet transform is performed on the multispectral image data to generate a wavelet coefficient matrix. Wavelet transform can analyze detailed features in the image at different scales and provide a joint representation in the time and frequency domains. Based on the wavelet coefficient matrix, energy, entropy, and standard deviation features are extracted to obtain a wavelet statistical feature map. These features reflect the energy distribution and complexity of the image in different frequency bands. Texture analysis is performed on the multispectral image data by generating a gray-level co-occurrence matrix (GLCM) to quantify the spatial relationships between pixel pairs in the image. Based on the GLCM, contrast, correlation, and homogeneity features are calculated to obtain a texture feature map. These features describe the texture structure and similarity of the image. A weighted average fusion of principal component feature maps, spectral angular feature maps, wavelet statistical feature maps, and texture feature maps is performed to obtain a data-layer fused feature map. By assigning different weights to different feature maps, the importance of various features is comprehensively considered to generate a more comprehensive feature representation. Based on the data-layer fused feature map, local binary pattern and directional gradient histogram features are extracted to obtain a feature-layer fused feature map. These features can capture local texture patterns and gradient direction information in the image, enhancing the image's detail representation capability. Multiple weak classifiers are applied to the feature-layer fused feature map for classification. Each weak classifier is trained and predicts on different feature subsets, resulting in multiple classification results. A voting fusion method is used to integrate the multiple classification results, and the final comprehensive spectral feature map of the printed material to be tested is obtained based on the voting results.
[0032] Step 103: Obtain the sample spectral feature maps of multiple sample printed materials, extract frequent feature patterns, generate a spectral fingerprint database, and perform region division and matching degree search to obtain a reference spectral fingerprint map.
[0033] Specifically, the process involves acquiring spectral feature maps of multiple printed samples and dividing these maps into grids to obtain multiple local feature blocks. These local feature blocks represent detailed information about the printed material across different spectral channels. Local binary pattern feature extraction is performed on these local feature blocks to capture local texture patterns, resulting in a set of local feature descriptors. A bag-of-words model is constructed based on this set of local feature descriptors, quantizing local features to form a feature dictionary. Frequent itemset mining is performed on the feature dictionary to identify frequently occurring feature combinations across multiple samples, resulting in a set of frequent feature patterns. A hash table index structure is built based on these frequent feature patterns to generate a spectral fingerprint database, which efficiently stores and retrieves feature patterns. Adaptive grid division is applied to the comprehensive spectral feature map of the printed material to be tested, resulting in multiple regions to be matched. These regions represent different parts of the printed material, and each part needs to be matched with features in the spectral fingerprint database. Local binary pattern features are extracted from these multiple regions to obtain matching feature descriptors. Nearest neighbor search is performed in the spectral fingerprint database based on these matching feature descriptors to obtain candidate matching fingerprints for each region. Geometric consistency verification is performed on candidate matching fingerprints to select the best matching fingerprint for each region to be matched. Geometric consistency verification can eliminate matches that are similar in feature space but inconsistent in actual geometric layout, thus improving the reliability of the matching. Based on the ideal spectral features corresponding to the best matching fingerprint, reference features for each region to be matched are reconstructed using a weighted average interpolation method. The reference features of all regions to be matched are spatially stitched together to obtain a reference spectral fingerprint map.
[0034] Step 104: 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 region.
[0035] Specifically, Gaussian pyramid decomposition is performed on the comprehensive spectral feature map and the reference spectral fingerprint map, decomposing the image into multiple scale layers of different resolutions to form an image pyramid. Local energy feature maps are calculated for each scale layer of the image pyramid, resulting in a multi-scale energy feature map set. Local energy feature maps capture the local energy distribution characteristics of the image at different scales, providing more information for similarity calculation. A sliding window process is applied to each scale layer of the multi-scale energy feature map set. The sliding window extracts spectral feature vectors within a local range, reflecting the spectral characteristics of the local region. The Euclidean distance between the comprehensive spectral feature map and the reference spectral fingerprint map is calculated based on the feature vectors, resulting in a distance map for each scale layer. Euclidean distance, a commonly used similarity metric, quantifies the difference between two spectral feature vectors. A nonlinear mapping is applied to the distance map at each scale layer. This nonlinear mapping enhances salient features in the image, resulting in an initial similarity map. Based on the initial similarity map, a multi-scale image segmentation tree is constructed. This multi-scale image segmentation tree organizes the segmentation results of the image at different scales, forming a hierarchical image segmentation structure. A bottom-up region merging process is performed on the hierarchical image segmentation structure. This merges similar regions together, resulting in multi-scale region features. Cross-scale feature fusion is then performed based on these multi-scale region features. By fusing features from different scales, the consistency and stability of the features are improved, resulting in a multi-scale spectral consistency map. This multi-scale spectral consistency map comprehensively reflects the spectral features of the image at different scales. Adaptive thresholding is then applied to the multi-scale spectral consistency map. This adaptive thresholding automatically adjusts the threshold to adapt to feature variations in different regions, resulting in a binary mask image of the defective region.
[0036] Step 105: Perform spectral feature clustering analysis on the binary mask image of the defect region to obtain the defect category;
[0037] Specifically, feature spectrum clustering is performed on the binary mask image of the defect region. This clustering groups pixels with similar spectral features together, forming an initial clustering result. Feature spectrum clustering utilizes the spectral information of the image to cluster spatially adjacent and spectrally similar regions, thus initially classifying different defect categories. The spectral similarity between categories is calculated based on the initial clustering results. Spectral similarity is an indicator of the degree of similarity in spectral features between different categories. By calculating spectral similarity, it is determined which initial categories can be merged. Based on the calculated spectral similarity, a category merging threshold is determined, which guides the subsequent category merging process. Hierarchical clustering is then performed on the initial clustering results, gradually merging categories with high similarity to form a more stable clustering result. Hierarchical clustering can effectively identify common spectral patterns among different defect categories; these patterns reflect the common spectral features of different defect categories. After obtaining the common spectral patterns of different defect categories, a defect classifier is constructed based on these patterns. The defect classifier can learn the spectral features of different categories to classify unknown defects. Finally, comprehensive spectral features are extracted from the defect region to generate a feature vector to be classified. The comprehensive spectral features include spectral information from each band of the multispectral image, as well as features extracted from this information after processing, such as spectral angle and energy characteristics. The generated feature vector to be classified is input into a defect classifier, which classifies the feature vector to obtain the defect category. The classifier uses previously learned common spectral patterns to discriminate the feature vector to be classified and assign it to the corresponding defect category.
[0038] 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.
[0039] Specifically, connected component analysis is performed on the binary mask image of the defect area to obtain the location and area information of each defect area. Connected component analysis can identify interconnected pixel regions in the image, thereby determining the location, shape, and size of each defect. Based on the location and area information and the defect category, statistical clustering of defects is performed. Statistical clustering can quantify the number, total area, and spatial distribution characteristics of each type of defect. Local spectral features of the defect areas are extracted to generate a spectral feature sample set. The spectral feature sample set includes spectral data from different defect areas, reflecting the spectral characteristic patterns of defects. Based on the spectral feature sample set and defect categories, a Gaussian mixture model is constructed. The Gaussian mixture model can describe the typical spectral feature patterns of different types of defects. By learning from the sample data, the model can accurately capture the spectral distribution characteristics of various types of defects. Correlation analysis is performed on the typical spectral feature patterns and 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, identifying which process parameters have a significant impact on defect generation and generating the correlation matrix. Based on the defect-process parameter correlation matrix, a Bayesian network model is constructed. Bayesian network models, by describing the probabilistic dependencies between variables, can reveal the probabilistic causal relationships of defect occurrence. Based on the Bayesian network model, Monte Carlo simulations are performed. Monte Carlo simulations, through the generation and simulation of a large number of random samples, evaluate the effects and risks of process parameter adjustments under conditions of uncertainty. The simulation results can reveal the probability distribution of defect reduction caused by different process parameter adjustments, thus providing data support for process adjustment. Finally, based on the results of the Monte Carlo simulations, a process adjustment plan is generated.
[0040] In this embodiment, by acquiring multispectral image data including visible, near-infrared, and ultraviolet bands, the detection capability for different types of printed materials and special inks is improved, and the detection range is expanded. Feature extraction methods are employed, and through multi-level fusion of data, feature, and decision layers, the spectral and spatial features of printed materials are comprehensively captured, improving the richness and discriminative power of feature representation. By extracting frequent feature patterns and constructing hash indexes from multiple sample printed materials, an efficient spectral fingerprint database is established. Gaussian pyramid decomposition and multi-scale energy feature extraction, combined with local spectral similarity calculation, effectively capture defect features at different scales, improving detection accuracy and robustness. By constructing multi-scale image segmentation trees and cross-scale feature fusion, adaptive threshold segmentation is achieved, improving the accuracy and adaptability of defect region segmentation. Based on spectral clustering and hierarchical clustering methods, common spectral patterns of defects are extracted, constructing an efficient defect classifier, 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 was analyzed in depth, realizing closed-loop control of printing quality, improving the stability of printing process and product quality, thereby improving the accuracy of printing quality inspection and reducing human intervention and subjective errors.
[0041] In one specific embodiment, the process of performing step 101 may specifically include the following steps:
[0042] (1) Multispectral imaging acquisition of the printed matter to be tested to obtain raw image data of multiple spectral channels including visible light, near infrared and ultraviolet bands;
[0043] (2) Perform spectral response correction on the original image data to obtain the first image data, and perform geometric registration on the first image data to obtain the second image data;
[0044] (3) The second image data is smoothed by spectral curve processing to obtain the third image data, and the third image data is denoised by wavelet transform to obtain the fourth image data;
[0045] (4) Perform spectral normalization on the fourth image data to obtain the fifth image data, and calculate the spectral angle mapping value of each pixel based on the fifth image data to obtain the spectral angle mapping map;
[0046] (5) Perform adaptive threshold segmentation on the spectral angle mapping map to obtain the target region mask;
[0047] (6) Perform region growing on the fifth image data according to the target region mask to obtain the target segmentation region, and perform morphological processing on the target segmentation region to obtain multispectral image data.
[0048] Specifically, multispectral imaging is performed on the printed material under test. A multispectral imaging system can capture image data of the printed material in different spectral bands, including visible, near-infrared, and ultraviolet bands. These spectral channels provide spectral information at different wavelengths, thereby capturing detailed information about the surface and interior of the printed material. The multispectral imaging system yields raw image data containing multiple spectral channels. Spectral response correction is then performed on the raw image data. Spectral response correction aims to correct errors caused by inconsistent sensor responses or changes in ambient light. Spectral response correction can be performed using the following formula:
[0049] ;
[0050] in, This represents the corrected image data. Represents the original image data. Indicates dark current. The sensor's spectral response curve is represented. First image data is obtained through spectral response correction. Geometric registration is performed on the first image data to ensure spatial alignment of images from different spectral channels, resulting in second image data. Spectral curve smoothing is applied to the second image data. Spectral curve smoothing eliminates spectral curve fluctuations caused by noise, resulting in third image data. Wavelet transform denoising is performed on the third image data. Wavelet transform can analyze detailed features in the image at different scales; denoising effectively removes noise components from the image, resulting in fourth image data. Spectral normalization is performed on the fourth image data to eliminate spectral data deviations caused by uneven illumination intensity or differences in sensor sensitivity, resulting in fifth image data. The spectral angle mapping value for each pixel is calculated based on the fifth image data. The spectral angle mapping value measures the similarity between the spectral features of each pixel and the reference spectrum and can be calculated using the following formula:
[0051] ;
[0052] in, Represents the spectral angle mapping value. This represents the normalized image data. The reference spectrum is represented. A spectral angle mapping is obtained by calculating the spectral angle mapping value. Adaptive thresholding segmentation is performed on the spectral angle mapping. Adaptive thresholding automatically adjusts the threshold to adapt to feature variations in different regions, resulting in a target region mask. For example, the Otsu method is used to determine the optimal threshold by maximizing the inter-class variance. Based on the target region mask, region growing is performed on the fifth image data. Region growing expands 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 a similarity criterion until all similar pixels are included, resulting in the target segmented region. Morphological processing is performed on the target segmented region. Morphological operations can repair region boundaries, fill holes within the region, and remove isolated points, etc. Commonly used morphological operations include dilation, erosion, opening, and closing operations. Through these steps, the multispectral image data is finally obtained.
[0053] In one specific embodiment, the process of performing step 102 may specifically include the following steps:
[0054] (1) Perform principal component analysis on the multispectral image data to obtain the principal component feature map, and calculate the spectral angle of each pixel based on the principal component feature map to obtain the spectral angle feature map;
[0055] (2) Perform continuous wavelet transform on the multispectral image data to obtain the wavelet coefficient matrix, and extract energy, entropy and standard deviation features based on the wavelet coefficient matrix to obtain the wavelet statistical feature map;
[0056] (3) Perform texture analysis on the multispectral image data to obtain the gray-level co-occurrence matrix, and calculate the contrast, correlation and homogeneity features based on the gray-level co-occurrence matrix to obtain the texture feature map;
[0057] (4) The principal component feature map, spectral angle feature map, wavelet statistical feature map and texture feature map are fused by weighted average to obtain the data layer fused feature map;
[0058] (5) Extract local binary pattern and directional gradient histogram features from the data layer fusion feature map to obtain the feature layer fusion feature map;
[0059] (6) Multiple weak classifiers are applied to classify the feature map of the feature layer fusion to obtain multiple classification results. The multiple classification results are then fused by voting to obtain the comprehensive spectral feature map of the printed matter to be tested.
[0060] Specifically, principal component analysis (PCA) is performed on multispectral image data. PCA is a dimensionality reduction technique that transforms high-dimensional spectral data into low-dimensional principal component feature maps, retaining the main information in the data and reducing redundancy. By performing PCA on multispectral image data, several main component images are obtained, which represent the most important variation patterns in the data. The spectral angle of each pixel is calculated based on the principal component feature maps. The spectral angle is an indicator of the similarity of spectral features. By calculating the spectral angle of each pixel in the principal component space, a spectral angle feature map is obtained. The formula for calculating the spectral angle is:
[0061] ;
[0062] in, Indicates the spectral angle. and These represent the spectral values of two pixels in the principal component feature map. This refers to the number of spectral bands. Continuous wavelet transform is performed on the multispectral image data. Continuous wavelet transform is a tool for analyzing signals in the time-frequency domain, and it yields a wavelet coefficient matrix. 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. Energy features reflect the signal intensity in the image, entropy features describe the image complexity, and standard deviation features measure the dispersion of the signal in the image. Texture analysis is performed on the multispectral image data. By calculating the gray-level co-occurrence matrix (GLCM), texture features in the image are obtained. The GLCM is a matrix describing the gray-level relationship between pixel pairs in the image. Based on the GLCM, contrast, correlation, and homogeneity features can be calculated. Contrast features reflect the differences in gray values in the image, correlation features describe the linear dependence of pixel pairs in the image, and homogeneity features represent the degree of similarity of pixels in the image. Through these calculations, a texture feature map is obtained. The principal component feature map, spectral angle feature map, wavelet statistical feature map, and texture feature map are then weighted and averaged for fusion. Different feature maps are weighted and summed according to certain weights to synthesize information from different features, resulting in a data-layer fused feature map. Based on the data-layer fused feature map, Local Binary Pattern (LBP) and Histogram of Oriented Gradients (HOG) features are extracted. LBP is a feature used to describe texture; it generates a binary pattern code by comparing the gray values of the center pixel with neighboring pixels, thus reflecting the local texture information of the image. HOG is a feature used to describe the distribution of gradient directions in an image; it generates an HOG histogram by calculating the gradients in different directions, thus reflecting the edge information of the image. By extracting these features, a feature-layer fused feature map is obtained. Multiple weak classifiers are applied to the feature-layer fused feature map for classification. Weak classifiers are relatively weak classifiers; integrating multiple weak classifiers improves classification accuracy. The Adaboost algorithm is used to weight and combine multiple weak classifiers to obtain a strong classifier. Multiple classification results are obtained by classifying the feature-layer fused feature map.
[0063] In one specific embodiment, the process of performing step 103 may specifically include the following steps:
[0064] (1) Obtain the sample spectral feature maps of multiple sample printed materials, and divide the sample spectral feature maps into grids to obtain multiple local feature blocks;
[0065] (2) Extract local binary pattern features from multiple local feature blocks to obtain a set of local feature descriptors, and construct a visual bag-of-words model based on the set of local feature descriptors to obtain a feature dictionary;
[0066] (3) Frequent itemset mining is performed on the feature dictionary to obtain a frequent feature pattern set, and a hash table index structure is constructed based on the frequent feature pattern set to obtain the spectral fingerprint database;
[0067] (4) Adaptively divide the comprehensive spectral feature map of the printed matter to be detected into multiple regions to be matched, and extract local binary pattern features from the multiple regions to be matched to obtain the feature descriptor to be matched.
[0068] (5) Based on the feature descriptor to be matched, perform nearest neighbor search in the spectral fingerprint database 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 fingerprint for each region to be matched.
[0069] (6) Based on the ideal spectral features corresponding to the best matching fingerprint, the reference features of each region to be matched are reconstructed by weighted average interpolation, and the reference features of all regions to be matched are spatially stitched together to obtain the reference spectral fingerprint map.
[0070] Specifically, sample spectral feature maps of multiple printed materials are obtained. Each sample spectral feature map contains image data of the printed material in different spectral bands, reflecting its color and material characteristics. The sample spectral feature maps are then divided into grids, creating multiple local feature blocks. Local Binary Pattern (LBP) feature extraction is performed on these local feature blocks. LBP is an effective method for describing texture features; by comparing the grayscale values of each pixel with its surrounding pixels, a binary pattern code is generated, thus describing the local texture structure of the image and obtaining a set of local feature descriptors for each local feature block. These descriptor sets effectively capture the detailed features of the printed material in different spectral bands. A bag-of-visual-words (BPV) model is constructed based on the set of local feature descriptors. The BPV is a method for quantizing image features into fixed-length feature vectors by clustering similar feature descriptors into visual words, forming a feature dictionary. Using the k-means clustering algorithm, the local feature descriptors are clustered into k visual words, each representing a typical local feature. In this way, each local feature block is described as a feature vector composed of visual words, resulting in the feature dictionary. Frequent itemset mining is performed on the feature dictionary. Frequent itemset mining is a method for discovering frequently occurring patterns in data. By mining frequently occurring visual word combinations, a set of frequent feature patterns is obtained. Frequent feature patterns can effectively describe the typical features of the sample printed materials. Based on the frequent feature pattern set, a hash table index structure is constructed to generate a spectral fingerprint database. The hash table index structure can quickly store and retrieve frequent feature patterns, providing efficient support for subsequent matching. Adaptive grid partitioning is applied to the comprehensive spectral feature map of the printed materials to be detected, resulting in multiple regions to be matched. The adaptive grid partitioning method can dynamically adjust the grid size according to the image content, thereby improving the accuracy of feature matching. Local binary pattern features are extracted from the regions to be matched to generate feature descriptors to be matched. In this way, the local features of the printed materials to be detected are compared with the features in the spectral fingerprint database. Based on the feature descriptors to be matched, a nearest neighbor search is performed in the spectral fingerprint database to find candidate matching fingerprints for each region to be matched. Nearest neighbor search is an efficient similarity search method that can find the frequent feature patterns most similar to the feature descriptors to be matched. Geometric consistency verification is performed on candidate matching fingerprints. By comparing the geometrical consistency between the candidate matching fingerprints and the regions to be matched, the best matching fingerprint for each region is selected. Based on the ideal spectral features corresponding to the best matching fingerprint, a weighted average interpolation method is used to reconstruct the reference features of each region to be matched. The weighted average interpolation method comprehensively considers the similarity of different candidate matching fingerprints, obtaining a more accurate reference feature through weighted averaging. The reference features of each region to be matched are reconstructed through weighted average interpolation. The reference features of all regions to be matched are spatially stitched together to obtain a reference spectral fingerprint map.The reference features of each region to be matched are seamlessly combined to form a complete reference spectral feature map.
[0071] In one specific embodiment, the process of performing step 104 may specifically include the following steps:
[0072] (1) Gaussian pyramid decomposition is performed on the comprehensive spectral feature map and the reference spectral fingerprint map to obtain image pyramids with multiple scale levels;
[0073] (2) Calculate the local energy feature map for each scale layer of the image pyramid to obtain a multi-scale energy feature map set, and perform sliding window processing on each scale layer of the multi-scale energy feature map set to obtain the local spectral feature vector;
[0074] (3) Calculate the Euclidean distance between the integrated spectral feature map and the reference spectral fingerprint map based on the local spectral feature vectors to obtain the distance map for each scale layer;
[0075] (4) Perform nonlinear mapping on the distance map of each scale layer to obtain the initial similarity map, and construct a multi-scale image segmentation tree based on the initial similarity map to obtain a hierarchical image segmentation structure;
[0076] (5) Perform bottom-up region merging on the hierarchical image segmentation structure to obtain multi-scale region features, and perform cross-scale feature fusion based on the multi-scale region features to obtain a multi-scale spectral consistency map.
[0077] (6) Adaptive threshold segmentation is performed on the multi-scale spectral consistency map to obtain a binary mask map of the defect region.
[0078] Specifically, Gaussian pyramid decomposition is performed on the comprehensive spectral feature map and the reference spectral fingerprint map. Gaussian pyramid decomposition is a commonly used multi-scale image processing method that decomposes the image into multiple scale layers by repeatedly applying Gaussian blur and downsampling operations, with each scale layer being a low-resolution version of the original image. Gaussian blur processing is performed on the image using a Gaussian kernel function.
[0079] ;
[0080] in, It is the standard deviation of Gaussian blur. and These are the coordinates of the image. Downsampling is performed on the blurred image:
[0081] ;
[0082] in, Indicates the first Layer image, Indicates the first Layered image. Local energy feature maps are calculated for each scale layer of the image pyramid. Local energy feature maps can be obtained by calculating the energy distribution of the image within a local region. Local energy can be represented as the sum of squares of pixel values within a certain window of the image:
[0083] ;
[0084] in, Represents pixels The local energy value, Represents the pixel values of an image. This represents the window radius. A sliding window process is applied to each scale layer of the multi-scale energy feature map to obtain local spectral feature vectors. The sliding window process involves defining a moving window on the image and calculating the feature vector at each location to obtain a feature description of each local region in the image. Based on the local spectral feature vectors, the Euclidean distance between the composite spectral feature map and the reference spectral fingerprint map is calculated. Euclidean distance is a commonly used similarity metric and can be calculated using the following formula:
[0085] ;
[0086] in, Represents two eigenvectors and The Euclidean distance between them and They represent the first The values of each feature are calculated. A distance map for each scale level is obtained by calculating the Euclidean distance at each scale level. A nonlinear mapping is then applied to the distance map at each scale level to enhance salient features in the image, resulting in an initial similarity map. This nonlinear mapping can be achieved by performing a logarithmic transformation or other forms of nonlinear transformation on the distance map.
[0087] ;
[0088] in, This represents the initial similarity graph. The distance map is represented. Based on the initial similarity map, a multi-scale image segmentation tree is constructed. A multi-scale image segmentation tree is a hierarchical structure for image segmentation that progressively refines the segmentation results by performing image segmentation at different scales. Initial segmentation is performed at the coarsest scale layer, followed by further refinement at finer scale layers, ultimately forming a hierarchical image segmentation structure. Bottom-up region merging is then performed on the hierarchical image segmentation structure. Similar regions are merged based on their similarity to obtain multi-scale region features. The similarity metric for region merging can be calculated using the following formula:
[0089] ;
[0090] in, Indicates the area and region similarity, and Representing pixels within the region and grayscale value, This is the standard deviation of the similarity measure. Cross-scale feature fusion is performed based on multi-scale regional features. By fusing features from different scales, the consistency and stability of features are improved, resulting in a multi-scale spectral consistency map. The multi-scale spectral consistency map comprehensively reflects the spectral features of the image at different scales, providing a more reliable feature representation. Adaptive thresholding segmentation is then applied to the multi-scale spectral consistency map. This adaptive thresholding automatically adjusts the threshold to adapt to feature variations in different regions, resulting in a binary mask image of the defect region. One method for adaptive thresholding segmentation is the Otsu method, which determines the optimal threshold by maximizing the inter-class variance.
[0091] In one specific embodiment, the process of performing step 105 may specifically include the following steps:
[0092] (1) Perform feature spectrum clustering on the binary mask image of the defect region to obtain the initial clustering result, and calculate the spectral similarity between each category based on the initial clustering result to obtain the category merging threshold;
[0093] (2) Perform hierarchical clustering on the initial clustering results to obtain the spectral common patterns of different defect categories, and construct a defect classifier based on the spectral common patterns;
[0094] (3) Extract comprehensive spectral features from the defect area, generate a feature vector to be classified, and input the feature vector to be classified into the defect classifier to obtain the defect category.
[0095] Specifically, feature spectrum clustering is performed on the binary mask image of the defect region. Feature spectrum clustering is a method that clusters pixels by analyzing their spectral features. By calculating the similarity of spectral features, similar pixels are clustered together. A feature spectrum matrix S is used to represent the spectral features of each pixel in the image, with each row of the matrix representing the spectral feature vector of a pixel.
[0096] ;
[0097] in, Indicates the first The pixel in the first Values for each spectral band It is the number of pixels. This refers to the number of spectral bands. Initial clustering results are obtained by performing cluster analysis on the feature spectral matrix, with each cluster representing a class of similar spectral features. The spectral similarity between each class is calculated based on the initial clustering results to obtain the class merging threshold. Spectral similarity can be calculated using cosine similarity, as shown in the following formula:
[0098] ;
[0099] in, b and 'b' represent two spectral eigenvectors, respectively, and '·' represents the dot product of the vectors. and The magnitude of the vector is represented. A spectral similarity matrix between clusters is obtained by calculating the cosine similarity between each cluster center, and a threshold for merging clusters is determined based on this matrix. If the spectral similarity between two clusters is greater than the threshold, they are considered similar and can be merged. Hierarchical clustering is performed on the initial clustering results to obtain the common spectral patterns of different defect categories. Hierarchical clustering is a clustering method that forms a hierarchical structure by continuously merging similar categories. During hierarchical clustering, similar categories are gradually merged based on the spectral similarity between categories, eventually forming several categories, each representing a common spectral pattern of a defect. After obtaining the common spectral patterns of different defect categories, a defect classifier is constructed based on these patterns. The defect classifier can be constructed using supervised learning methods, commonly including support vector machines and random forests. A training dataset is prepared, including labeled defect regions and their corresponding spectral feature vectors. The classifier is trained using the training dataset to accurately predict defect categories based on the input spectral feature vectors. Comprehensive spectral features are extracted from the defect regions to generate the feature vector to be classified. Comprehensive spectral features can be obtained through multispectral imaging techniques. This involves performing multispectral imaging on the defect area to acquire image data in different spectral bands, and preprocessing this data (e.g., normalization, smoothing). Feature extraction is then performed on the processed image data to obtain a comprehensive spectral feature vector for each defect area. This feature vector is then input into a defect classifier to determine the defect category. The classifier makes predictions based on the input spectral feature vectors and outputs the corresponding defect category. This method allows for accurate classification of defect areas, thus achieving the goal of defect detection and classification.
[0100] In one specific embodiment, the process of performing step 106 may specifically include the following steps:
[0101] (1) Perform connected component analysis on the binary mask map of the defect region to obtain the location and area information of each defect region;
[0102] (2) Based on the location and area information and the defect category, perform defect statistical clustering 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;
[0103] (3) Construct a Gaussian mixture model based on the spectral feature sample set and defect categories to obtain typical spectral feature patterns, and perform correlation analysis between typical spectral feature patterns and current printing process parameters to obtain the defect-process parameter correlation matrix;
[0104] (4) Construct a Bayesian network model based on the defect-process parameter correlation matrix to obtain the probabilistic causal relationship of defect generation, and perform Monte Carlo simulation based on the probabilistic causal relationship to generate a process adjustment scheme.
[0105] Specifically, connected component analysis is performed on the binary mask image of the defect region. Connected component analysis is an image processing technique used to identify and label connected pixel regions in an image. Through connected component analysis, the location and area information of each defect region are obtained. This information can be represented as the bounding box coordinates and the number of pixels in the region. Based on the location and area information and the defect category, statistical clustering of defects is performed. Through statistical clustering analysis, the number, total area, and spatial distribution characteristics of each type of defect are obtained. For example, suppose there are three defect categories. It can count the number of defects in each category. Total area And their spatial distribution in the image. The spatial distribution can be calculated by determining the centroid location of each defect. To indicate:
[0106] Center of mass ;
[0107] Local spectral features of the defect region are extracted to generate a spectral feature sample set. Spectral features can be obtained through multispectral imaging techniques, including reflectance values of each defect region in different spectral bands. By processing and extracting the spectral data of each defect region, a spectral feature vector is obtained. For example, for the defect region... Its spectral eigenvector can be expressed as ,in Indicates the first The values for each spectral band are calculated. A Gaussian mixture model is constructed based on the spectral feature sample set and defect categories. A Gaussian mixture model is a probabilistic model used to represent a data distribution that is a weighted sum of multiple Gaussian distributions. The parameters of the Gaussian mixture model, including the mean vector, are fitted using maximum likelihood estimation. Covariance matrix and mixing coefficient
[0108] ;
[0109] Where, N Indicates the first The probability density function of each Gaussian component. A Gaussian mixture model, obtained through training, represents the typical spectral characteristic pattern of each defect category. Correlation analysis is performed between the typical spectral characteristic patterns and current printing process parameters to obtain the defect-process parameter correlation matrix. Assume that... Process parameters Correlation matrix Indicating the correlation between spectral characteristic modes and process parameters:
[0110] ;
[0111] in, Representing spectral characteristic modes With process parameters The correlation coefficient between the defects and process parameters is calculated. By calculating the correlation matrix, it is determined which process parameters have a significant impact on defect generation. A Bayesian network model is constructed 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, the probabilistic causal relationship of defect generation is obtained. Assume there is a... A Bayesian network with n nodes, where nodes represent defect categories and process parameters, and edges represent conditional dependencies. By calculating the conditional probability distribution, the probabilistic causal relationship of defect occurrence can be obtained:
[0112] ;
[0113] in, Indicates the defect category, Indicates process parameters, Pa Represents a node The set of parent nodes. Monte Carlo simulation based on the probabilistic causal relationships of Bayesian networks is used to generate process adjustment schemes. Monte Carlo simulation is a method for simulating complex systems using a large number of random samples. By performing Monte Carlo simulation on the Bayesian network model, the impact of different process parameter adjustments on defects is evaluated, and the optimal process adjustment scheme is generated. It is assumed that for each process parameter... Each simulation records the probability of defect occurrence in each simulation. Then, based on the simulation results, the combination of process parameters with the lowest probability of defect occurrence is selected as the process adjustment scheme:
[0114] ;
[0115] For example, suppose we are detecting ink defects in printed materials. Connected component analysis is used to obtain the location and area information of each defect region. Based on this information and the defect category, statistical clustering of defects is performed to obtain the quantity, total area, and spatial distribution characteristics of each type of defect. For example, suppose there are three defect categories. Statistics yielded categories The number of defects is 10, with a total area of 500 pixels. The spatial distribution of the defects is concentrated in the upper left corner of the image. Local spectral features of each defect region are extracted to generate a spectral feature sample set. Assume the spectral feature vector of the defect region is... Based on the spectral feature sample set and defect categories, a Gaussian mixture model is constructed to obtain the typical spectral feature patterns for each defect category. For example, category The parameters of the Gaussian mixture model are the mean vector. Sum of covariance matrix:
[0116] ;
[0117] Correlation analysis is performed on typical spectral characteristic patterns and current printing process parameters to obtain a defect-process parameter correlation matrix. For example, suppose there are two process parameters. and The calculated correlation matrix is as follows:
[0118] ;
[0119] in, Representing spectral characteristic modes With process parameters 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 probabilistic causal relationship of defect occurrence. Using the Bayesian network model, the probability of defect occurrence under different combinations of process parameters is calculated. Monte Carlo simulations are performed based on the probabilistic causal relationship of the Bayesian network to generate process adjustment schemes. It is assumed that 1000 simulations are performed for each process parameter, recording the probability of defect occurrence in each simulation, and then the process parameter combination with the lowest defect occurrence probability is selected as the process adjustment scheme. For example, simulation results show that when the process parameter combination is... and When the probability of defect occurrence is lowest, this parameter combination is chosen as the process adjustment scheme.
[0120] The method for printing inspection in the embodiments of this application has been described above. The apparatus for printing inspection in the embodiments of this application is described below. Please refer to [link / reference]. Figure 2 One embodiment of the apparatus for printing inspection in this application includes:
[0121] The acquisition module 201 is used to acquire multispectral image data of the printed matter under test in different spectral bands;
[0122] The fusion module 202 is used to extract spectral features and perform multi-level fusion on multispectral image data to obtain a comprehensive spectral feature map;
[0123] The search module 203 is used to obtain the sample spectral feature maps of multiple sample printed materials, extract frequent feature patterns, generate a spectral fingerprint database, perform region division and matching degree search, and obtain a reference spectral fingerprint map.
[0124] The decomposition module 204 is 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 region.
[0125] Analysis module 205 is used to perform spectral feature clustering analysis on the binary mask image of the defect region to obtain the defect category;
[0126] The generation module 206 is used to perform root cause analysis and process adjustment on printing process parameters based on the binary mask image of the defect area and the defect category, and generate a process adjustment plan.
[0127] Through the collaborative efforts of the aforementioned components, and by acquiring multispectral image data encompassing visible, near-infrared, and ultraviolet bands, the detection capability for different types of printed materials and special inks has been improved, expanding the detection range. Feature extraction methods, employing multi-level fusion at the data, feature, and decision layers, comprehensively capture the spectral and spatial characteristics of printed materials, enhancing the richness and discriminative power of feature representation. By extracting frequent feature patterns and constructing hash indexes from multiple sample printed materials, an efficient spectral fingerprint database was established. Gaussian pyramid decomposition and multi-scale energy feature extraction, combined with local spectral similarity calculation, effectively captured defect features at different scales, improving detection accuracy and robustness. By constructing multi-scale image segmentation trees and cross-scale feature fusion, adaptive threshold segmentation was achieved, improving the accuracy and adaptability of defect region segmentation. Based on spectral clustering and hierarchical clustering methods, common spectral patterns of defects were extracted, constructing an efficient defect classifier and 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 was analyzed in depth, realizing closed-loop control of printing quality, improving the stability of printing process and product quality, thereby improving the accuracy of printing quality inspection and reducing human intervention and subjective errors.
[0128] This application also provides a computer device, which includes a memory and a processor. The memory stores computer-readable instructions, which, when executed by the processor, cause the processor to perform the steps of the method for printing inspection described in the above embodiments.
[0129] 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, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the method for printing inspection.
[0130] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0131] If the integrated unit is implemented as 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 the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0132] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for inspecting printed matter, characterized in that, The method for inspecting printed matter includes: Collect multispectral image data of the printed material under test in different spectral bands; The multispectral image data is subjected to spectral feature extraction and multi-level fusion to obtain a comprehensive spectral feature map; The sample spectral feature maps of multiple printed samples are obtained, frequent feature patterns are extracted, a spectral fingerprint database is generated, and region division and matching degree search are performed to obtain a reference spectral fingerprint map. The comprehensive spectral feature map and the reference spectral fingerprint map are decomposed into multiple scale layers, and local spectral similarity calculation and adaptive threshold segmentation are performed to obtain a binary mask map of the defect region. Spectral feature clustering analysis is performed on the binary mask image of the defect region to obtain the defect category; Based on the binary mask image of the defective region and the defect category, the printing process parameters are analyzed for root causes and the process is adjusted to generate a process adjustment plan.
2. The method for inspecting printed matter according to claim 1, characterized in that, The acquisition of multispectral image data of the printed matter under test in different spectral bands includes: Multispectral imaging was performed on the printed material to be tested to obtain raw image data including multiple spectral channels, including visible light, near-infrared and ultraviolet bands. The original image data is subjected to spectral response correction to obtain first image data, and the first image data is geometrically registered to obtain second image data; The second image data is subjected to spectral curve smoothing to obtain the third image data, and the third image data is subjected to wavelet transform denoising to obtain the fourth image data. The fourth image data is subjected to spectral normalization to obtain the fifth image data, and the spectral angle mapping value of each pixel is calculated based on the fifth image data to obtain the spectral angle mapping map. Adaptive threshold segmentation is performed on the spectral angle mapping to obtain a target region mask; Based on the target region mask, region growing is performed on the fifth image data to obtain the target segmentation region, and morphological processing is performed on the target segmentation region to obtain multispectral image data.
3. The method for inspecting printed matter according to claim 2, characterized in that, The step of extracting spectral features and performing multi-level fusion on the multispectral image data to obtain a comprehensive spectral feature map includes: Principal component analysis is performed on the multispectral image data to obtain a principal component feature map, and the spectral angle of each pixel is calculated based on the principal component feature map to obtain a spectral angle feature map; The multispectral image data is subjected to continuous wavelet transform to obtain a wavelet coefficient matrix, and energy, entropy and standard deviation features are extracted based on the wavelet coefficient matrix to obtain a wavelet statistical feature map; Texture analysis is performed on the multispectral image data to obtain a gray-level co-occurrence matrix, and contrast, correlation, and homogeneity features are calculated based on the gray-level co-occurrence matrix to obtain a texture feature map; The principal component feature map, the spectral angle feature map, the wavelet statistical feature map, and the texture feature map are weighted and averaged to obtain the data layer fusion feature map; Based on the data layer fusion feature map, local binary pattern and directional gradient histogram features are extracted to obtain the feature layer fusion feature map; Multiple weak classifiers are applied to classify the feature map fused in the feature layer to obtain multiple classification results. Then, voting is performed on the multiple classification results to obtain the comprehensive spectral feature map of the printed matter to be tested.
4. The method for inspecting printed matter according to claim 3, characterized in that, The process involves obtaining sample spectral feature maps from multiple printed samples, extracting frequent feature patterns, generating a spectral fingerprint database, performing region segmentation and matching degree search, and obtaining a reference spectral fingerprint map, including: The sample spectral feature maps of multiple printed samples are obtained, and the sample spectral feature maps are divided into grids to obtain multiple local feature blocks; Local binary pattern features are extracted from the multiple local feature blocks to obtain a set of local feature descriptors. A visual bag-of-words model is then constructed based on the set of local feature descriptors to obtain a feature dictionary. Frequent itemset mining is performed on the feature dictionary to obtain a frequent feature pattern set, and a hash table index structure is constructed based on the frequent feature pattern set to obtain a spectral fingerprint database. Adaptive grid division is performed on the comprehensive spectral feature map of the printed matter to be tested to obtain multiple regions to be matched, and local binary pattern features are extracted from the multiple regions to be matched to obtain the feature descriptor to be matched. Based on the feature descriptor to be matched, a nearest neighbor search is performed in the spectral fingerprint database to obtain candidate matching fingerprints for each region to be matched, and geometric consistency verification is performed on the candidate matching fingerprints to obtain the best matching fingerprint for each region to be matched. Based on the ideal spectral features corresponding to the best matching fingerprint, the reference features of each region to be matched are reconstructed by weighted average interpolation, and the reference features of all regions to be matched are spatially stitched together to obtain a reference spectral fingerprint map.
5. The method for inspecting printed matter according to claim 1, characterized in that, The process of performing multi-scale decomposition on the integrated spectral feature map and the reference spectral fingerprint map to obtain multiple scale layers, and then performing local spectral similarity calculation and adaptive threshold segmentation to obtain a binary mask map of the defect region includes: Gaussian pyramid decomposition is performed on the comprehensive spectral feature map and the reference spectral fingerprint map to obtain an image pyramid with multiple scale levels; Local energy feature maps are calculated for each scale layer of the image pyramid to obtain a multi-scale energy feature map set, and a sliding window process is applied to each scale layer of the multi-scale energy feature map set to obtain a local spectral feature vector. The Euclidean distance between the integrated spectral feature map and the reference spectral fingerprint map is calculated based on the local spectral feature vector to obtain the distance map for each scale layer; A nonlinear mapping is performed on the distance map of each scale layer to obtain an initial similarity map, and a multi-scale image segmentation tree is constructed based on the initial similarity map to obtain a hierarchical image segmentation structure; The hierarchical image segmentation structure is merged from bottom to top to obtain multi-scale region features, and cross-scale feature fusion is performed based on the multi-scale region 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 region.
6. The method for inspecting printed matter according to claim 5, characterized in that, The spectral feature clustering analysis performed on the binary mask image of the defect region yields defect categories, including: Feature spectrum clustering is performed on the binary mask image of the defect region to obtain an initial clustering result. The spectral similarity between each category is calculated based on the initial clustering result to obtain the category merging threshold. Hierarchical clustering is performed on the initial clustering results to obtain the spectral common patterns of different defect categories, and a defect classifier is constructed based on the spectral common patterns. The comprehensive spectral features of the defect region are extracted to generate a feature vector to be classified, and the feature vector to be classified is input into the defect classifier to obtain the defect category.
7. The method for inspecting printed matter according to claim 6, characterized in that, The step of performing defect root cause analysis and process adjustment on printing process parameters based on the binary mask image of the defect area and the defect category, and generating a process adjustment plan, includes: Connectivity analysis is performed on the binary mask image of the defective region to obtain the location and area information of each defective region. Based on the location and area information and the defect category, defect statistical clustering is performed to obtain the number, total area and spatial distribution characteristics of each type of defect, and local spectral features are extracted to obtain a spectral feature sample set; A Gaussian mixture model is constructed based on the spectral feature sample set and the defect category to obtain typical spectral feature patterns. Correlation analysis is then performed on the typical spectral feature patterns and the current printing process parameters to obtain a defect-process parameter correlation matrix. A Bayesian network model is constructed based on the defect-process parameter correlation matrix to obtain the probabilistic causal relationship of defect occurrence. Monte Carlo simulation is then performed based on the probabilistic causal relationship to generate a process adjustment scheme.
8. An apparatus for inspecting printed matter, for performing the method for inspecting printed matter as described in any one of claims 1-7, characterized in that, The device for inspecting printed matter includes: The acquisition module is used to acquire multispectral image data of the printed material under test in different spectral bands; The fusion module is used to extract spectral features and fuse them at multiple levels from the multispectral image data to obtain a comprehensive spectral feature map. The search module is used to obtain the spectral feature maps of multiple sample printed materials, extract frequent feature patterns, generate a spectral fingerprint database, perform region division and matching degree search, and obtain a reference spectral fingerprint map. The decomposition module is 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 region. The analysis module is used to perform spectral feature clustering analysis on the binary mask image of the defect region to obtain the defect category; The generation module is used to perform root cause analysis and process adjustment on printing process parameters based on 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 includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor invokes the instructions in the memory to cause the computer device to perform the method for inspecting printed matter as claimed in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the method for printing inspection as described in any one of claims 1-7.
Citation Information
Patent Citations
Printing quality defect detection method and storage medium
CN113034492A
Intelligent control method and system for quality inspection of printing ink presswork
CN117576101A