Cover film defect intelligent detection method and system based on multi-feature fusion
Through the multi-feature fusion method, the covering film images under different shooting parameters are acquired and analyzed, and the correlation between grayscale and morphological structural features is established, which solves the problems of low efficiency and poor accuracy of covering film defect detection in the existing technology, and realizes efficient and accurate defect identification and report generation.
Patent Information
- Application Number
- CN202511190547.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing cover film defect detection methods rely on manual inspection and single image features, resulting in low detection efficiency, poor accuracy and reliability, and unable to fully utilize the multi-dimensional information in the image.
By acquiring multiple groups of cover film image units under different shooting parameters, feature screening and correlation mapping are performed, the correlation relationship between regional grayscale features and morphological structure features is established, and the pre-built defect recognition model is called for analysis to generate defect recognition results.
It realizes the automation and intelligence of cover film defect detection, improves the accuracy, reliability and efficiency of detection, and generates a detection report containing the specific location coordinates of the defect.
Smart Images

Figure CN120707568A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for intelligent detection of cover film defects based on multi-feature fusion. Background Art
[0002] In the industrial production field, cover film, as an important functional material, is widely used in various industries such as electronics, packaging, and printing. Its quality directly affects the performance and service life of the product. Therefore, defect detection of cover film is a key step in ensuring product quality.
[0003] Currently, cover film defect detection primarily relies on manual visual inspection and traditional image processing techniques. Manual visual inspection is inefficient and easily influenced by subjective factors of the inspector, making it difficult to ensure the consistency and accuracy of the test results. While traditional image processing techniques have improved detection efficiency to a certain extent, they typically identify defects based on only a single image feature, such as grayscale or texture. However, the manifestations of cover film defects are complex and diverse, and a single image feature cannot fully and accurately describe the characteristics of the defect, which can easily lead to missed detections and false detections. In addition, existing detection methods lack the ability to explore and utilize the correlations between different features, making it impossible to fully utilize the multi-dimensional information in the image, further limiting the accuracy and reliability of detection. Summary of the Invention
[0004] In view of the above-mentioned problems, in combination with the first aspect of the present invention, an embodiment of the present invention provides an intelligent detection method for cover film defects based on multi-feature fusion, the method comprising: Acquire an image data set of the cover film to be inspected, wherein the image data set includes a plurality of groups of cover film image units acquired under different shooting parameters; Performing feature screening processing on the image data set to screen out a candidate feature set corresponding to a potential defect area from the cover film image unit, the candidate feature set comprising regional grayscale features and morphological structure features; Performing association mapping processing on the candidate feature set to establish an association relationship between regional grayscale features and morphological structure features to obtain an association feature map; Calling a pre-built defect recognition model to perform defect recognition analysis on the associated feature map to generate a defect recognition result of the cover film, wherein the defect recognition result includes a predicted category identifier and area range parameters of the defect; A detection report including the specific location coordinates of the defect is generated based on the defect identification result, and the detection report is sent to the detection management system to complete the defect recording operation.
[0005] On the other hand, an embodiment of the present invention also provides an intelligent detection system for covering film defects based on multi-feature fusion, including a processor and a machine-readable storage medium, wherein the machine-readable storage medium is connected to the processor, the machine-readable storage medium is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the machine-readable storage medium to implement the above method.
[0006] Based on the above aspects, the embodiment of the present invention obtains multiple groups of image units of the covering film to be inspected under different shooting parameters, performs feature screening processing on the image data set, and accurately locates the candidate feature set corresponding to the potential defect area, thereby effectively reducing the amount of data for subsequent processing and improving the detection efficiency. It performs association mapping processing on the candidate feature set, establishes the association relationship between the regional grayscale features and the morphological structure features, forms an associated feature map, fully explores the intrinsic connection between different features, and enhances the characterization capability of defect features. It calls a pre-built defect recognition model to analyze the associated feature map, which can comprehensively consider multi-dimensional feature information and generate accurate recognition results including defect prediction category identification and area range parameters. Based on the recognition results, it generates a detection report including the specific location coordinates of the defect and sends it to the detection management system, thereby realizing the automation and intelligence of defect detection and greatly improving the accuracy, reliability and efficiency of covering film defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 It is a schematic diagram of the execution flow of the intelligent detection method for covering film defects based on multi-feature fusion provided by an embodiment of the present invention.
[0008] Figure 2 Schematic diagram of exemplary hardware and software components of a cover film defect intelligent detection system based on multi-feature fusion provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0009] The present invention will be described in detail below with reference to the accompanying drawings. Figure 1 This is a flow chart of an intelligent detection method for covering film defects based on multi-feature fusion provided by an embodiment of the present invention. The intelligent detection method for covering film defects based on multi-feature fusion is introduced in detail below.
[0010] Step S110: obtaining an image data set of the cover film to be inspected, wherein the image data set includes a plurality of groups of cover film image units acquired under different shooting parameters.
[0011] On the cover film production line, defect detection is required for all produced cover films. To comprehensively capture potential defects, specialized industrial cameras are used to capture images of the same batch of cover films. During the acquisition process, camera parameters are adjusted, including but not limited to exposure time, focal length, light intensity, and shooting angle. By varying these parameters, images of the cover film can be captured from various viewing angles and lighting conditions, resulting in an image data set containing multiple groups of cover film image units. For example, adjusting the exposure time yields images of the cover film under varying brightness conditions; varying the focal length allows for images of varying clarity, ensuring that even subtle defects are captured.
[0012] Step S120: performing feature screening processing on the image data set, screening out a candidate feature set corresponding to a potential defect area from the cover film image unit, wherein the candidate feature set includes regional grayscale features and morphological structure features.
[0013] After obtaining the image data set, the next step is to perform feature screening to identify areas where defects may exist and extract relevant features. This step is the foundation for subsequent defect identification. Through precise screening, it can reduce interference from irrelevant information and improve detection efficiency and accuracy.
[0014] Step S121: performing layered processing on the cover film image units in the image data set, dividing the cover film image units into a plurality of definition levels according to image definition, each definition level including a plurality of cover film image units.
[0015] First, the clarity of all the cover film image units in the image data set is evaluated. During the evaluation, the clarity of the image is judged by analyzing indicators such as the grayscale change gradient between pixels in the image and the richness of edge information. Based on the evaluation results, the image is divided into multiple levels from high to low clarity. For example, images with clear edges and rich details will be divided into a higher clarity level; while images with blurred edges and more lost details will be divided into a lower clarity level. Each level contains a certain number of cover film image units. After such stratification, it is convenient to perform feature extraction and analysis at different clarity levels, avoiding the impact of large differences in image clarity on the screening results.
[0016] Step S122: Select a representative image unit from each definition level. The representative image unit must be able to reflect the overall image quality characteristics of the definition level.
[0017] In each clarity level, representative image units are selected. The selection criteria are that the image unit can reflect the overall quality characteristics of the image at that level, including grayscale distribution range, noise level, detail rendering ability, etc. For example, in a certain clarity level, most images have similar grayscale distribution and noise conditions, so the image that best matches these characteristics is selected as the representative image unit of that level. During the selection process, the similarity between each image unit and other image units in the level can be calculated, and the image unit with the highest similarity is selected as the representative image unit.
[0018] Step S123: performing local enhancement processing on the selected representative image unit.
[0019] After selecting representative image units, they need to be locally enhanced to highlight possible defective areas. Because the original image may have insufficient contrast and local blur, enhancement can make the difference between defective areas and normal areas more obvious, facilitating subsequent feature extraction.
[0020] Step S1231: performing grayscale histogram analysis on the representative image unit, counting the distribution of the number of pixels in different grayscale value intervals, and determining the overall grayscale range and peak grayscale value of the representative image unit.
[0021] First, a grayscale histogram analysis is performed on the representative image unit. A grayscale histogram is a graph that shows the distribution of the number of pixels of different grayscale values in an image. By counting the number of pixels within each grayscale value interval, the image's grayscale distribution can be clearly understood. From the grayscale histogram, the overall grayscale range of the representative image unit can be determined—the interval between the minimum and maximum grayscale values. The peak grayscale value, the grayscale value with the largest number of pixels, can also be found.
[0022] Step S1232: determining a grayscale stretching interval according to the grayscale histogram, and setting the grayscale stretching interval to a range that includes a peak grayscale value and covers a main pixel distribution.
[0023] Based on the grayscale histogram obtained in the previous step, determine the grayscale stretching interval. This grayscale stretching interval should include the peak grayscale value, as a large number of pixels are concentrated near the peak grayscale value, which represents the main information of the image. At the same time, this interval should also cover the distribution range of the main pixels to ensure that the grayscale values of most pixels are effectively adjusted during the stretching process. For example, if the peak grayscale value is a certain value, and the grayscale values of most pixels are distributed within a range near this value, then this range is determined as the grayscale stretching interval.
[0024] Step S1233: performing grayscale stretching processing on the representative image unit, linearly mapping the grayscale values within the grayscale stretching interval to a preset target grayscale range, enlarging the difference between the grayscale values, and obtaining a stretched image.
[0025] After determining the grayscale stretching range, grayscale stretching is performed on representative image elements. This process linearly maps the grayscale values within the stretching range to a preset target grayscale range. The target grayscale range is typically a wider grayscale range. This mapping amplifies the differences between grayscale values, sharpening previously blurred details in the image. In particular, the grayscale difference between defective and normal areas becomes more pronounced, resulting in a stretched image.
[0026] Step S1234: using an adaptive threshold segmentation algorithm to perform preliminary segmentation on the stretched image, identifying suspicious areas with abnormal grayscale values, and using the suspicious areas as candidate areas for potential defects.
[0027] The stretched image is initially segmented using an adaptive threshold segmentation algorithm. This algorithm automatically adjusts the threshold based on the grayscale characteristics of different image regions, thereby segmenting the image into distinct regions. This algorithm can identify suspicious areas with significantly different grayscale values from surrounding areas. These areas are likely to contain defects and are therefore considered candidate areas for potential defects.
[0028] Step S1235: performing local contrast enhancement on the suspicious area, calculating the grayscale mean and standard deviation in the suspicious area, and dynamically adjusting the contrast enhancement coefficient according to the mean and standard deviation.
[0029] For identified suspicious areas, local contrast enhancement is performed. First, the grayscale mean of all pixels within the suspicious area is calculated, along with the square root of the average of the squared deviations of these grayscale values from the mean, also known as the standard deviation. The grayscale mean reflects the overall brightness level of the area, while the standard deviation reflects the dispersion of grayscale values. The contrast enhancement factor is dynamically adjusted based on these two metrics. A small standard deviation indicates small variations in grayscale values within the area, requiring a larger enhancement factor to amplify these differences. A large standard deviation reduces the enhancement factor appropriately to avoid excessive enhancement and noise amplification.
[0030] Step S1236: Apply the calculated contrast enhancement coefficient to the suspicious area, enhance the grayscale distribution in the suspicious area using a contrast-limited adaptive histogram equalization algorithm, perform a smooth transition between the enhanced suspicious area and the surrounding normal area, perform edge-preserving filtering on the image after the smooth transition processing, and then perform overall grayscale normalization to obtain an enhanced representative image unit.
[0031] The calculated contrast enhancement coefficient is applied to the suspicious area, and the grayscale distribution in that area is enhanced using a contrast-limited adaptive histogram equalization algorithm. This algorithm enhances contrast while avoiding noise caused by over-enhancement. After enhancement, a smooth transition is performed to create a natural transition between the suspicious area and the surrounding normal areas, reducing the abruptness between regions. Next, an edge-preserving filter is applied to the smoothed image to remove noise while maintaining edge clarity. Finally, the image undergoes overall grayscale normalization, mapping the grayscale values to a standard range to facilitate subsequent feature extraction and comparison, resulting in enhanced representative image units.
[0032] Step S124: performing block processing on the enhanced representative image unit to generate multiple image blocks of the same size, each image block serving as an independent analysis unit.
[0033] The enhanced representative image unit still represents a single image. To perform more detailed feature analysis, it needs to be segmented. The image is evenly divided into multiple equal-sized blocks according to a preset size. Each block serves as an independent analysis unit, allowing for individual feature extraction for each small area, avoiding overlooking subtle local defects due to overly large areas.
[0034] Step S125: Perform a grayscale scan on each image block, record the grayscale value of each pixel in the image block, calculate the arithmetic mean of the grayscale values of all pixels as the grayscale mean of the image block, and simultaneously calculate the average of the sum of squares of the deviations of the grayscale values of all pixels from the grayscale mean as the grayscale variance. The grayscale mean and grayscale variance are taken together as the regional grayscale features of the image block.
[0035] For each image block, a grayscale scan is performed, recording the grayscale value of each pixel within the block. The arithmetic mean of these grayscale values is then calculated. This is done by adding the grayscale values of all pixels and dividing the sum by the total number of pixels to obtain the grayscale mean for that image block. Simultaneously, the difference between the grayscale value of each pixel and the grayscale mean is calculated. These differences are squared, summed, and then divided by the total number of pixels to obtain the grayscale variance. The grayscale mean reflects the overall brightness of the image block, while the grayscale variance reflects the uniformity of the grayscale distribution within the image block. These two metrics are collectively used as the regional grayscale characteristics of the image block.
[0036] Step S126: Perform edge tracing on each image block, identify pixel points with sudden changes in grayscale value within the image block by pixel-by-pixel scanning, connect the pixel points to form contour lines, analyze the degree of curvature, number of intersections, and closed state of the contour lines, and determine the morphological structural characteristics of the image block based on the degree of curvature, number of intersections, and closed state of the contour lines.
[0037] In addition to grayscale features, the morphological structural features of image blocks are also crucial for defect detection, so edge tracking is required for each image block.
[0038] Step S1261: perform pixel-level scanning on the image block, and read the grayscale value of each pixel in sequence from left to right and from top to bottom.
[0039] The image block is scanned at the pixel level from left to right and from top to bottom, so that the grayscale value of each pixel can be read in an orderly manner to ensure that no pixel information is missed.
[0040] Step S1262: Calculate the grayscale difference between the current pixel and the adjacent pixels. When the absolute value of the grayscale difference exceeds a preset edge threshold, mark the current pixel as an edge point.
[0041] During the scanning process, the grayscale difference between the current pixel and its adjacent pixels (including those in eight directions: up, down, left, right, upper left, upper right, lower left, and lower right) is calculated. When the absolute value of this grayscale difference exceeds the preset edge threshold, the current pixel is at the edge of the image and is marked as an edge point. The edge threshold is set based on the overall grayscale characteristics of the image and the required accuracy for defect detection.
[0042] Step S1263: Connect all marked edge points, use the eight-neighborhood connection criterion to connect adjacent edge points to form continuous edge segments, and smooth the edge segments. Identify the curved parts of the smoothed edge lines, calculate the curvature radius of the curved parts, and record the curvature radius values of all curved parts as bending feature parameters.
[0043] All marked edge points are collected and connected according to the eight-neighborhood connection principle. The eight-neighborhood connection principle states that if two edge points are adjacent in eight directions, they are connected to form a continuous edge segment. After connection, the edge segment is smoothed to remove burrs and irregular fluctuations, making the edge line smoother. Then, the curved sections in the smoothed edge line are identified and the curvature radius of each curved section is calculated. The size of the curvature radius can reflect the degree of curvature. These curvature radius values are recorded as curvature feature parameters.
[0044] Step S1264: Count the number of intersections of edge lines. When two or more edge lines intersect to form an intersection point, record the coordinates of the intersection point and the number of intersecting lines to obtain the number of intersections.
[0045] After edge line processing is complete, the number of edge line intersections is counted. When two or more edge lines intersect to form an intersection point, the coordinates of the intersection point and the number of lines involved in the intersection are recorded. This information can be used to determine the number of intersections, which can reflect the complexity of the structure within the image block.
[0046] Step S1265: Determine the closed state of the edge line. When the start point and end point of the edge line coincide and form a closed figure, mark it as a closed line; otherwise, mark it as an open line. Record the number and area ratio of the closed lines to obtain the closed state parameters.
[0047] Determine the closed state of each edge line. If the starting and ending points of an edge line are the same and form a closed shape, mark it as a closed line; otherwise, mark it as an open line. Also, record the number of closed lines and the ratio of the area enclosed by these closed lines to the total area of the image block. This information is used as the closed state parameter.
[0048] Step S1266: Integrate the bending feature parameters, the number of crossings and the closed state parameters to form a morphological structure feature vector of the image block, normalize the morphological structure feature vector, and associate the normalized morphological structure feature vector with the position information of the image block and store them as the morphological structure feature of the image block.
[0049] The previously obtained curvature parameters, number of crossings, and closure parameters are combined to form a feature vector that comprehensively reflects the morphological structure of the image block. To facilitate subsequent feature comparison and analysis, this morphological structure feature vector is normalized to map all parameter values to the same numerical range. This normalized morphological structure feature vector is then associated with the image block's positional information in the original image (e.g., the coordinates of the upper left and lower right corners) and stored as the morphological structure feature of the image block.
[0050] Step S127: Compare the regional grayscale features of each image block with the preset normal region grayscale range. When the grayscale mean or grayscale variance exceeds the normal range, mark the image block as a potential defect candidate region.
[0051] A grayscale range for a normal region is preset. This grayscale range is derived from statistical analysis of the regional grayscale features of a large number of defect-free cover film images. The regional grayscale features (grayscale mean and grayscale variance) of each image block are compared with this normal range. If the grayscale mean or grayscale variance exceeds the normal range, the grayscale features of the image block differ from the normal region and the image block is marked as a potential defect candidate.
[0052] Step S128: comparing the morphological structural features of each image block with a preset standard morphological template, calculating the morphological similarity between the two, and marking the image block as a potential defect candidate region when the morphological similarity is lower than a preset similarity threshold.
[0053] A standard morphological template is preset based on the morphological and structural features of a defect-free cover film. The morphological and structural features of each image block are compared with the standard morphological template, and the morphological similarity between the two is calculated. Morphological similarity is calculated by comparing the differences in the various parameters in the feature vector; the smaller the difference, the higher the similarity. When the morphological similarity falls below a preset similarity threshold, the morphological structure of the image block is significantly different from that of a normal region, and the image block is marked as a potential defect candidate.
[0054] Step S129: Merge and remove duplicates of the potential defect candidate regions obtained by the two markings, extract corresponding regional grayscale features and morphological structure features from the merged potential defect candidate regions, and arrange them in order of the positions of the image blocks to form the candidate feature set.
[0055] Because steps S127 and S128 may mark some of the same potential defect candidate regions, it is necessary to merge and de-duplicate the results of these two markings to remove the duplicated marked regions and obtain the final set of potential defect candidate regions. Then, the corresponding regional grayscale features and morphological structural features are extracted from these merged potential defect candidate regions and arranged according to the position order of the image blocks in the original image to form a candidate feature set.
[0056] Step S130: performing association mapping processing on the candidate feature set, establishing an association relationship between regional grayscale features and morphological structure features, and obtaining an association feature map.
[0057] After obtaining the candidate feature set, it is necessary to explore the correlation between the regional grayscale features and the morphological structure features, and construct a correlation feature map through correlation mapping processing. This will help to have a deeper understanding of the characteristic manifestations of defects and improve the accuracy of subsequent defect identification.
[0058] Step S131: performing standardized encoding on the regional grayscale features in the candidate feature set, converting the grayscale mean and grayscale variance into a fixed-length numerical sequence, where each numerical value corresponds to a specific attribute of the feature.
[0059] First, the regional grayscale features in the candidate feature set are standardized and encoded. The grayscale mean and grayscale variance of each region are converted into a fixed-length numerical sequence according to certain rules. Each value in the sequence corresponds to a specific attribute of the regional grayscale feature. For example, some values may correspond to the range of grayscale means, while others may correspond to the degree of change in grayscale variance. This standardized encoding facilitates unified processing and comparison of regional grayscale features.
[0060] Step S132: performing a structural description on the morphological structural features in the candidate feature set, converting the curvature, number of intersections and closed state of the contour lines into a quantifiable parameter sequence, where each parameter corresponds to a dimension of the morphology.
[0061] A structured description of morphological structural features is performed. Information such as the degree of contour curvature (e.g., the distribution of curvature radius), number of intersections, and closure (e.g., the number and area percentage of closed lines) is converted into a quantifiable sequence of parameters. Each parameter represents a dimension of the morphological structure, and these parameters can be used to comprehensively describe all aspects of the morphological structural features.
[0062] Step S133: constructing a feature correlation matrix, wherein the row dimension of the feature correlation matrix corresponds to the coding sequence of the regional grayscale features, the column dimension corresponds to the parameter sequence of the morphological structure features, and the matrix elements represent the correlation strength between the two.
[0063] Construct a feature correlation matrix, where the rows correspond to the encoding sequence of the regional grayscale features, and the columns correspond to the parameter sequence of the morphological and structural features. Each element in the matrix represents the strength of the correlation between the corresponding regional grayscale feature and the morphological and structural feature, and the magnitude of the correlation strength reflects the closeness of the relationship between the two.
[0064] Step S134: Calculate the co-occurrence frequency of regional grayscale features and morphological structural features, count the number of times specific regional grayscale features and specific morphological structural features appear simultaneously in the same potential defect candidate region, use the number as the initial value of the association strength, and assign different weights according to the importance of the features in defect identification. Perform weighted adjustment on the initial value of the association strength and assign different weights according to the importance of the features in defect identification.
[0065] Calculate the co-occurrence frequency of regional grayscale features and morphological and structural features. This means counting the number of times a specific regional grayscale feature and a specific morphological and structural feature appear simultaneously within the same potential defect candidate region. This number is used as the initial value for the association strength. Then, weights are assigned to different features based on their importance in defect identification. For example, features that have a greater impact on defect type determination are given higher weights, while features with less impact on defect identification are given lower weights. These weights are used to adjust the initial association strength values to obtain a more accurate value, which is then entered into the feature association matrix.
[0066] Step S135: Analyze the feature association matrix through the association rule mining algorithm to identify the strong correlation feature combination of regional grayscale features and morphological structures, where the strong correlation feature combination of regional grayscale features and morphological structures meets the dual threshold conditions of support and confidence.
[0067] When applying association rule mining algorithms, the first step is to define the criteria for strongly correlated feature combinations, namely, the dual thresholds of support and confidence. Support reflects the prevalence of a feature combination across all potential defect candidate regions, while confidence reflects the reliability of the accompanying presence of one feature when another occurs. The algorithm conducts an in-depth analysis of the feature association matrix, traversing all possible combinations of regional grayscale features and morphological structural features, and calculating their support and confidence one by one. When both the support and confidence of a feature combination reach or exceed the preset thresholds, it is identified as a strongly correlated feature combination. This step helps identify feature pairs that are closely related in defect manifestations.
[0068] Step S1351: setting a support threshold and a confidence threshold, wherein the support threshold represents the minimum frequency of the feature combination appearing in all potential defect candidate regions, and the confidence threshold represents the minimum probability of the morphological structure feature appearing simultaneously when the regional grayscale feature appears.
[0069] Based on the actual needs of cover film defect detection and historical data statistics, appropriate support and confidence thresholds are set. The support threshold is set as a specific ratio, representing the minimum proportion of the number of times a feature combination appears in all potential defect candidate regions. Only when this proportion is reached can the feature combination have a certain degree of universality. The confidence threshold is also set as a ratio, reflecting the probability that the corresponding morphological structural features will also appear when a regional grayscale feature appears, to ensure the reliability of the association between the two.
[0070] Step S1352: Scan the feature correlation matrix to extract all possible feature combinations of regional grayscale features and morphological structure features, each feature combination including a regional grayscale feature and a morphological structure feature.
[0071] The constructed feature correlation matrix is fully scanned, and the regional grayscale features in the row dimension and the morphological structure features in the column dimension are combined in pairs to generate all possible feature combinations. Each feature combination consists of a regional grayscale feature and a morphological structure feature, ensuring that no potentially correlated feature pairs are missed.
[0072] Step S1353: Calculate the support of each feature combination, where the support is the ratio of the number of times the feature combination appears in all potential defect candidate regions to the total number of regions.
[0073] For each extracted feature combination, the number of times it appears simultaneously in all potential defect candidate regions is counted. This number is then divided by the total number of potential defect candidate regions. The result is the support of the feature combination. By calculating the support, we can understand the prevalence of the feature combination in defect regions. The higher the support, the more representative the combination.
[0074] Step S1354: Calculate the confidence of each feature combination, where the confidence is the ratio of the number of times the morphological structure feature appears simultaneously with the regional grayscale feature to the number of times the regional grayscale feature appears alone.
[0075] For each feature combination, we count the number of times the corresponding morphological and structural features appear when the regional grayscale feature appears. This number is then divided by the total number of times the regional grayscale feature appears alone to determine the confidence level of the feature combination. The confidence level reflects the closeness of the association between two features. A higher confidence level indicates a greater likelihood that the morphological and structural features will also appear when the regional grayscale feature appears.
[0076] Step S1355: Filter out strong correlation feature combinations whose support is greater than or equal to the support threshold and whose confidence is greater than or equal to the confidence threshold.
[0077] The support and confidence of each feature combination are compared with a preset threshold. Only when the support of a feature combination is greater than or equal to the support threshold and its confidence is also greater than or equal to the confidence threshold is it screened out and determined to be a strongly correlated feature combination. This ensures that the selected feature combinations have both a certain degree of universality and a high degree of correlation reliability.
[0078] Step S1356: Calculate the lift of the strong correlation feature combination, where the lift represents the degree of enhancement of the correlation of the strong correlation feature combination relative to random occurrence. A combination with a lift greater than 1 represents a positive correlation.
[0079] For the strongly correlated feature combinations identified, we further calculated their lift. Lift is calculated by dividing the confidence level of the feature combination by the probability of the morphological and structural features occurring individually. Lift measures the degree of correlation between the feature combination relative to random chance. When lift is greater than 1, it indicates a positive correlation between the two features—meaning their co-occurrence is more likely than random chance—and the correlation is more meaningful.
[0080] Step S1357: Sort the strongly correlated feature combinations according to the degree of improvement, compare the sorted strongly correlated feature combinations with the known covering film defect feature library, verify the validity of the strongly correlated feature combinations, eliminate the strongly correlated feature combinations that do not match the known defect features, and obtain the final strongly correlated feature combinations.
[0081] Strongly correlated feature combinations are sorted from highest to lowest lift. The higher the lift, the greater the positive reinforcement of the association. These sorted feature combinations are then compared with a known cover film defect feature library, which stores feature combination patterns corresponding to various common defects. This comparison verifies that these strongly correlated feature combinations match the actual defect signatures, eliminating any mismatches to ultimately identify truly effective strongly correlated feature combinations.
[0082] Step S136: The strong correlation feature combinations are used as node pairs to construct the basic framework of the association network, where each node pair includes a regional grayscale feature node and a morphological structure feature node; in the association network, the length of the connection between nodes is determined according to the correlation strength, where the connection is short when the correlation strength is high and long when the correlation strength is low.
[0083] The finalized strong correlation feature combinations are used as node pairs in the correlation network. Each node pair consists of a regional grayscale feature node and a morphological structure feature node, thus constructing the basic framework of the correlation network. In this network, nodes are connected by lines, and the length of the lines is determined by the correlation strength of the corresponding feature combination. Feature combinations with higher correlation strengths have shorter lines between nodes to intuitively reflect the close relationship between the two. For feature combinations with lower correlation strengths, the lines are longer, clearly demonstrating the difference in correlation strength.
[0084] Step S137: performing clustering processing on the nodes in the association network, clustering nodes with similar association patterns together to form multiple feature association clusters, each feature association cluster representing a feature combination pattern of a type of defect.
[0085] A clustering algorithm is used to process the nodes in the association network. Clustering is based on the similarity of the association patterns between nodes. Specifically, the algorithm analyzes the strength of each node's association with other nodes, the combination of associated features, and other information. Nodes with highly similar association patterns are clustered together to form multiple feature association clusters. The similarity in the feature combination patterns represented by the nodes within each feature association cluster typically corresponds to a specific type of cover film defect, enabling a clearer distinction between the characteristic manifestations of different defect types.
[0086] Step S138: adding an identification label to each feature association cluster, wherein the identification label includes the main regional grayscale features and morphological structure feature types in the feature association cluster.
[0087] For each feature association cluster, a corresponding identification label is added. This identification label includes the main regional grayscale feature types within the cluster, such as the approximate range of grayscale mean and grayscale variance, as well as the main morphological structural feature types, such as the degree of contour curvature, number of intersections, and type of closure. The identification label allows for quick understanding of the main feature information corresponding to each feature association cluster, facilitating subsequent identification and analysis.
[0088] Step S139: Visually render the association network, use different colors to distinguish different feature association clusters, and convert the association network into the association feature map through a visualization tool. The association feature map is used to display all association relationships and association strengths between regional grayscale features and morphological structure features.
[0089] Visualization techniques are used to render the association network, assigning different colors to different feature association clusters to facilitate visual distinction. Then, using specialized visualization tools, the entire association network is converted into an association feature map. This map intuitively displays all associations between regional grayscale features and morphological structural features, including information such as which features are associated and the strength of the association.
[0090] Step S140: calling a pre-built defect recognition model to perform defect recognition analysis on the associated feature map to generate a defect recognition result of the cover film, wherein the defect recognition result includes a predicted category identifier and area range parameters of the defect.
[0091] Once the associated feature map is generated, a pre-built defect recognition model is used to perform defect recognition analysis. This defect recognition model, trained on a large number of cover film defect samples, extracts key information from the associated feature map, determines the defect type and location, and ultimately generates a recognition result that includes the defect prediction category identifier and area range parameters.
[0092] Step S141: pre-processing the associated feature map, extracting node coordinates, connection attributes and clustering information, and converting them into a tensor format acceptable to the defect recognition model, which is trained based on the defect characteristics of the covering film.
[0093] First, the correlation feature map is preprocessed to extract the coordinates of each node from the map. These coordinates reflect the node's position within the map. Line attributes, including length and the strength of the association, are also extracted. Clustering information, such as the feature association clusters to which each node belongs, is also extracted. This extracted information is then organized and converted into a tensor format that can be accepted by the defect recognition model. This defect recognition model is specifically tailored to the characteristics of cover film defects and trained on a large number of labeled defect samples. It can effectively identify various common cover film defects.
[0094] Step S142: input the converted tensor into the input layer of the defect recognition model, perform preliminary feature mapping on the tensor through the weight matrix of the input layer, and obtain an initial feature vector, which contains basic feature information of the cover film defect.
[0095] The converted tensor is fed into the defect recognition model's input layer, which performs preliminary processing and feature mapping on the tensor using its internal weight matrix. During this process, each element in the tensor is calculated against the corresponding weights in the weight matrix, converting the information in the associated feature map into an initial feature vector that the model can further process. This initial feature vector contains some basic characteristic information about the cover film defect, such as the basic correlation between different features and the approximate distribution of features.
[0096] Step S143: Input the initial feature vector into the hidden layer of the defect recognition model, the hidden layer includes multiple convolution modules and pooling modules, the convolution module uses a multi-size convolution kernel to extract features from the initial feature vector to generate a multi-scale feature map, the multi-scale feature map includes the feature representation of the cover film defect at different scaling ratios, and the pooling module downsamples the multi-scale feature map to retain key feature information.
[0097] The initial feature vector is input into the model's hidden layer, which consists of multiple alternating convolutional and pooling modules. The convolution module uses convolution kernels of varying sizes to convolve the initial feature vector, extracting features through a sliding window approach. Convolution kernels of varying sizes can capture feature regions of varying sizes, generating multi-scale feature maps. These maps encompass the characteristic manifestations of cover film defects at varying scales, effectively capturing both large defect areas and subtle defect details. The pooling module then downsamples the multi-scale feature maps, reducing the dimensionality of the feature data by selecting the maximum or average value within a specific region, while retaining key feature information and improving the model's processing efficiency.
[0098] Step S144: performing channel fusion on the downsampled feature maps, and splicing the feature maps output by different convolution modules in the channel dimension to form a fused feature tensor, which integrates the multi-dimensional features of the cover film defects.
[0099] Each downsampled feature map originates from a different convolutional module and contains defect signature information from a different angle. These feature maps are concatenated along the channel dimension to achieve channel fusion. This concatenation combines the feature information from different convolutional modules to form a fused feature tensor. This fused feature tensor integrates the multi-dimensional characteristics of the cover film defect, including features at different scales and angles, enabling the model to understand the defect characteristics from a more comprehensive perspective.
[0100] Step S145: Input the fused feature tensor into the attention mechanism layer of the defect recognition model. The attention mechanism layer performs weighted adjustment on the fused feature tensor by calculating the importance weights of the feature channels to obtain the feature tensor processed by the attention mechanism.
[0101] The fused feature tensor is input into the attention mechanism layer, which emphasizes important feature channels and suppresses less important ones. By calculating the importance weight of each feature channel in defect recognition, more important channels are assigned higher weights, and their feature information receives more attention in subsequent processing; less important channels are assigned lower weights. These weights are used to weight the fused feature tensor, resulting in a feature tensor processed by the attention mechanism. This allows the defect recognition model to focus more on the feature information that is critical to defect recognition.
[0102] Step S146: The feature tensor processed by the attention mechanism is input into the fully connected layer of the defect recognition model. The fully connected layer converts the feature tensor into a high-dimensional feature vector through nonlinear transformation of multiple layers of neurons. The high-dimensional feature vector contains the deep feature information required for covering film defect recognition.
[0103] The feature tensor processed by the attention mechanism is input into a fully connected layer, which consists of multiple layers of neurons, each connected to all neurons in the previous layer. Through nonlinear transformations between these layers, the feature tensor is converted into a high-dimensional feature vector. This high-dimensional feature vector contains the deep feature information required for cover film defect identification. This information further abstracts and refines the original features, more accurately reflecting the essential characteristics of the defect.
[0104] Step S147: Divide the high-dimensional feature vector into two paths, input one of the high-dimensional feature vectors into the defect category classifier, calculate the matching probability between the high-dimensional feature vector and the template vector of each covering film defect category, and output the probability value of each covering film defect category. The defect category classifier includes multiple parallel recognition units, and each recognition unit corresponds to a covering film defect category.
[0105] The resulting high-dimensional feature vector is processed in two ways, one of which is input into a defect classification classifier. This defect classification classifier comprises multiple parallel recognition units, each dedicated to a specific cover film defect category. During the classification process, each recognition unit calculates the matching probability between the input high-dimensional feature vector and a template vector for the defect category corresponding to that unit. The template vector is pre-constructed based on the feature information of a large number of defect samples of that type. By calculating the matching probability, each recognition unit outputs a probability value for that defect category. A higher probability value indicates a closer match between the input features and the defect category.
[0106] Step S148: Select the covering film defect category with the highest probability value as the predicted category identifier of the defect, and record the probability value of the covering film defect category as the confidence level.
[0107] Among the probability values for each defect category output by the defect category classifier, the defect category with the highest probability value is selected and used as the predicted category identifier for the defect. This highest probability value is also recorded as the confidence level. The confidence level reflects the reliability of the prediction result; the higher the confidence level, the more accurate the prediction.
[0108] Step S149: Input another high-dimensional feature vector into the defect area locator, and determine the set of regional coordinate parameters of the defect through iterative optimization of the bounding box parameters, wherein the regional coordinate parameters include the pixel coordinates of the upper left corner and lower right corner of the defect area, which are used to frame the range of the covering film defect.
[0109] Another high-dimensional feature vector is input into the defect area locator, which determines the specific area where the defect is located. By iteratively optimizing the bounding box parameters, the position and size of the bounding box are continuously adjusted to accurately frame the defect area. The final set of regional coordinate parameters includes the pixel coordinates of the upper left and lower right corners of the defect area. These coordinates accurately identify the defect area on the cover film.
[0110] Step S1491: extracting the spatial position feature component from the other high-dimensional feature vector, wherein the spatial position feature component includes pixel coordinate distribution information of the potential defect area.
[0111] Feature components related to spatial position are extracted from the high-dimensional feature vector input to the defect area locator. The above spatial position feature components contain the pixel coordinate distribution information of the potential defect area in the image, such as the approximate location range where the defect area may exist and the distribution density of pixels within this range.
[0112] Step S1492: generating initial bounding box parameters based on the spatial position feature components, wherein the initial bounding box parameters include the upper left corner pixel horizontal coordinate, the upper left corner pixel vertical coordinate, the lower right corner pixel horizontal coordinate, and the lower right corner pixel vertical coordinate.
[0113] Based on the extracted spatial position feature components, the initial bounding box parameters are generated. These parameters include the horizontal and vertical coordinates of the upper left corner pixel and the horizontal and vertical coordinates of the lower right corner pixel. These parameters are initially determined based on the approximate location of the potential defect area. They can roughly frame the area where the defect may exist, but they may not be accurate enough and require further optimization and adjustment.
[0114] Step S1493: Mark a candidate area in the cover film image unit according to the initial bounding box parameters, and extract actual grayscale features and actual morphological features in the candidate area.
[0115] Based on the initial bounding box parameters, a candidate region is marked in the cover film image unit. This candidate region is the initial range of possible defects. Then, the actual grayscale features within this candidate region, such as grayscale mean and grayscale variance, as well as actual morphological features such as the degree of contour curvature, number of intersections, and closed state, are extracted.
[0116] Step S1494: Compare the actual grayscale features and the actual morphological features with the corresponding features in the high-dimensional feature vector, and calculate the feature fit. When the feature fit is less than a preset fit threshold, adjust the initial bounding box parameters, expand the coverage of the bounding box, and repeatedly adjust the bounding box parameters and calculate the feature fit until the feature fit is greater than or equal to the fit threshold, thereby obtaining the adjusted bounding box parameters.
[0117] The actual grayscale features and actual morphological features extracted from the candidate region are compared in detail with the corresponding features in the high-dimensional feature vector. The degree of feature fit is calculated by comparing the differences between the two. When the feature fit is less than the preset fit threshold, it indicates that the current candidate region does not accurately contain all the defect features. The initial bounding box parameters need to be adjusted to expand the bounding box coverage. The process of adjusting the bounding box parameters and calculating the feature fit is repeated until the feature fit is greater than or equal to the fit threshold. At this point, the adjusted bounding box parameters are obtained, and the candidate region corresponding to these bounding box parameters can better contain the defect features.
[0118] Step S1495: Perform edge calibration on the adjusted bounding box parameters, and confirm whether the bounding box edge coincides with the actual edge of the defect by pixel-by-pixel scanning. When there is a deviation between the bounding box edge and the actual edge of the defect, fine-tune the coordinate parameters of the bounding box until the bounding box edge completely coincides with the actual edge of the defect, and record the final bounding box parameters as the area range parameters of the defect, which include the calibrated upper left and lower right pixel coordinates.
[0119] The adjusted bounding box parameters are then edge-calibrated by scanning each pixel along the edge of the bounding box, starting from the upper left corner to the lower right corner. During the scanning process, the grayscale values and morphological characteristics of the bounding box edge pixels are compared one by one with the grayscale values and morphological characteristics of the actual edge pixels of the defect.
[0120] If a deviation is detected between the bounding box edge and the actual defect edge—for example, if a pixel on the bounding box edge doesn't actually correspond to the defect edge, or if a pixel on the defect edge isn't contained within the bounding box—the bounding box coordinate parameters need to be fine-tuned. The magnitude of the fine-tuning is determined by the magnitude of the deviation: larger deviations require a larger adjustment, while smaller deviations require a smaller adjustment.
[0121] After fine-tuning, the bounding box edge is scanned and compared pixel by pixel again, repeating this process until the bounding box edge completely overlaps with the actual edge of the defect. At this point, the final bounding box parameters are recorded and used as the defect's area range parameters. These area range parameters, which include the precisely calibrated upper-left and lower-right pixel coordinates, accurately define the defect's specific location and range within the cover film image.
[0122] Step S1496: Associating the area range parameters with the corresponding defect category identifiers to form a set of area coordinate parameters of the defects.
[0123] The obtained area range parameters are associated with the predicted category identifier corresponding to the defect, so that each area range parameter can be clearly mapped to a defect type. Through this association, a complete set of defect area coordinate parameters is formed, which includes both the specific location information of the defect and the defect type information.
[0124] Step S150: Generate a test report containing the specific location coordinates of the defect based on the defect identification result, and send the test report to the test management system to complete the defect recording operation.
[0125] After obtaining the defect identification results, a detailed inspection report needs to be generated based on these results and sent to the inspection management system to complete the recording of the defects so that the defects can be tracked and analyzed later.
[0126] Step S151: parse the area range parameters in the defect recognition result and extract the pixel coordinates of the upper left corner and lower right corner of the bounding box.
[0127] First, the area range parameters in the defect recognition results are parsed to extract the pixel coordinates of the upper left corner and the lower right corner of the bounding box. These coordinates are key data for determining the defect location. Through parsing, the specific boundaries of the defect in the cover film image can be clearly identified.
[0128] Step S152: Calculate the center coordinates of the defect area. The center x coordinate is obtained by averaging the x coordinates of the upper left corner and the x coordinates of the lower right corner. The center y coordinate is obtained by averaging the y coordinates of the upper left corner and the y coordinates of the lower right corner. The center coordinates are the specific location coordinates of the defect.
[0129] To more intuitively represent the defect's location, the center coordinates of the defect area need to be calculated. This is calculated by adding the x-coordinates of the upper-left and lower-right corners of the bounding box and dividing by 2. This result is the center x-coordinate. Similarly, the y-coordinates of the upper-left and lower-right corners are added and divided by 2 to obtain the center y-coordinate. This center coordinate represents the specific location of the defect on the cover film and provides a more concise indication of the defect's approximate location.
[0130] Step S153: Arrange the predicted category identifier, the specific location coordinates, and the area range parameters according to a preset field format to obtain defect feature information, where each field includes a field name and a corresponding value.
[0131] The predicted category identifier, the specific defect location coordinates (center coordinates), and the area range parameters (the coordinates of the upper left and lower right corners of the bounding box) are organized according to the preset field format. The preset field format includes the order of each information and the definition of the field name. For example, the "Defect Type" field corresponds to the predicted category identifier, the "Center Coordinates" field corresponds to the specific location coordinates, and the "Area Range" field corresponds to the area range parameters. Each field contains a clear field name and corresponding specific value. This organization forms structured defect feature information, making the information clearer and more standardized.
[0132] Step S154: Collect metadata information of the image data set, where the metadata information includes the image acquisition device model, acquisition time, shooting angle, lighting conditions, batch number of the cover film, and production time.
[0133] In addition to the characteristic information of the defect itself, metadata information of the image data set also needs to be collected. The above metadata information includes the model of the device used to collect the image. Different device models may have a certain impact on the image quality; the image acquisition time, accurate to the year, month, day, hour, minute, and second, to facilitate tracing the time when the defect occurred; the shooting angle, that is, the angle at which the camera shoots the cover film. Different angles may cause the defect to be presented differently; lighting conditions, such as light intensity, light source type, etc., which will affect the grayscale characteristics of the image; the batch number of the cover film, which is used to identify the production batch to which the cover film belongs; and the production time of the cover film, which records the specific time point of the cover film production. The above metadata information is of great reference value for analyzing the causes of defects.
[0134] Step S155: Integrate the metadata information with the defect feature information to form the basic data of the inspection report, perform structured processing on the basic data, convert it into a tabular form, add a defect feature description to the inspection report, call the preset defect description template according to the predicted category identifier, generate a natural language description and send it to the inspection management system to complete the defect recording operation.
[0135] The collected metadata is integrated with the organized defect feature information to form the basic data for the inspection report. This basic data is structured and converted into a table format, with rows and columns corresponding to different information categories and specific data, making the data more intuitive, easier to read, and easier to analyze.
[0136] At the same time, a defect description is added to the inspection report. Based on the predicted defect category, the corresponding template is called from a preset defect description template library. Each defect category has a corresponding natural language description template, which contains information such as the typical characteristics and possible impact of that defect. Based on the actual defect characteristic information, the template is filled in and adjusted to generate a natural language description that matches the actual defect situation.
[0137] Finally, the generated inspection report containing tabular data and natural language descriptions is sent to the inspection management system. After receiving the report, the inspection management system stores and records the defect information in the report, completing the defect recording operation, so that subsequent defect statistical analysis, tracking, and processing can be carried out.
[0138] Figure 2 A schematic diagram illustrates exemplary hardware and software components of a multi-feature fusion-based intelligent detection system 100 for cover film defects, which can implement the concepts of the present invention, according to some embodiments of the present invention. For example, the processor 120 can be used in the multi-feature fusion-based intelligent detection system 100 for cover film defects and perform the functions described in the present invention.
[0139] For example, the intelligent detection system 100 for covering film defects based on multi-feature fusion may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and different forms of storage media 140, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the intelligent detection system 100 for covering film defects based on multi-feature fusion may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present application can be implemented according to these program instructions. The intelligent detection system 100 for covering film defects based on multi-feature fusion also includes an I / O interface 150 between the computer and other input and output devices.
[0140] In addition, an embodiment of the present invention further provides a readable storage medium, in which computer-executable instructions are preset. When a processor executes the computer-executable instructions, the above-mentioned intelligent detection method for cover film defects based on multi-feature fusion is implemented.
[0141] It should be noted that in order to simplify the description of the present invention and thus help understand one or more embodiments of the invention, in the foregoing description of the embodiments of the present invention, multiple features are sometimes combined into one embodiment, figure or description thereof.
Claims
1. A method for intelligent detection of cover film defects based on multi-feature fusion, characterized in that: The method comprises: Acquire an image data set of the cover film to be inspected, wherein the image data set includes a plurality of groups of cover film image units acquired under different shooting parameters; Performing feature screening processing on the image data set to screen out a candidate feature set corresponding to a potential defect area from the cover film image unit, the candidate feature set comprising regional grayscale features and morphological structure features; Performing association mapping processing on the candidate feature set to establish an association relationship between regional grayscale features and morphological structure features to obtain an association feature map; Calling a pre-built defect recognition model to perform defect recognition analysis on the associated feature map to generate a defect recognition result of the cover film, wherein the defect recognition result includes a predicted category identifier and area range parameters of the defect; A detection report including the specific location coordinates of the defect is generated based on the defect identification result, and the detection report is sent to the detection management system to complete the defect recording operation.
2. The intelligent detection method for cover film defects based on multi-feature fusion according to claim 1 is characterized in that: The performing feature screening processing on the image data set to screen out a candidate feature set corresponding to a potential defect area from the cover film image unit includes: performing layered processing on the cover film image units in the image data set, dividing the cover film image units into a plurality of clarity levels according to image clarity, each clarity level including a plurality of cover film image units; Selecting a representative image unit from each definition level, wherein the representative image unit must be able to reflect the overall image quality characteristics of the definition level; Performing local enhancement processing on the selected representative image unit, dividing the enhanced representative image unit into blocks to generate multiple image blocks of the same size, each of which serves as an independent analysis unit; Performing a grayscale scan on each image block, recording the grayscale value of each pixel in the image block, calculating the arithmetic mean of all pixel grayscale values as the grayscale mean of the image block, and calculating the average of the sum of squares of the deviations of all pixel grayscale values from the grayscale mean as the grayscale variance, and using the grayscale mean and grayscale variance together as the regional grayscale feature of the image block; Perform edge tracing on each image block, identifying pixels with sudden grayscale changes within the image block by pixel-by-pixel scanning, connecting the pixels to form contour lines, analyzing the degree of curvature, number of intersections, and closure of the contour lines, and determining the morphological structural characteristics of the image block based on the degree of curvature, number of intersections, and closure of the contour lines; Compare the regional grayscale features of each image block with the preset normal region grayscale range. When the grayscale mean or grayscale variance exceeds the normal range, mark the image block as a potential defect candidate region. Comparing the morphological structural features of each image block with a preset standard morphological template, calculating the morphological similarity between the two, and marking the image block as a potential defect candidate area when the morphological similarity is lower than a preset similarity threshold; The potential defect candidate regions obtained by the two markings are merged and deduplicated, and the corresponding regional grayscale features and morphological structure features are extracted from the merged potential defect candidate regions, and are arranged in order according to the position of the image blocks to form the candidate feature set.
3. The intelligent detection method for cover film defects based on multi-feature fusion according to claim 2, characterized in that: The locally enhancing the selected representative image unit includes: Performing a grayscale histogram analysis on the representative image unit, counting the number of pixels in different grayscale value intervals, and determining the overall grayscale range and peak grayscale value of the representative image unit; Determine a grayscale stretching interval according to the grayscale histogram, and set the grayscale stretching interval to a range that includes a peak grayscale value and covers a main pixel distribution; Performing grayscale stretching processing on the representative image unit, linearly mapping the grayscale values within the grayscale stretching interval to a preset target grayscale range, enlarging the difference between the grayscale values, and obtaining a stretched image; Performing preliminary segmentation on the stretched image using an adaptive threshold segmentation algorithm to identify suspicious areas with abnormal grayscale values, wherein the suspicious areas are used as candidate areas for potential defects; Performing local contrast enhancement on the suspicious area, calculating the grayscale mean and standard deviation within the suspicious area, and dynamically adjusting the contrast enhancement coefficient according to the mean and standard deviation; The calculated contrast enhancement coefficient is applied to the suspicious area, the grayscale distribution in the suspicious area is enhanced by a contrast-limited adaptive histogram equalization algorithm, a smooth transition is performed between the enhanced suspicious area and the surrounding normal area, an edge-preserving filter is performed on the image after the smooth transition, and then the overall grayscale is normalized to obtain an enhanced representative image unit.
4. The intelligent detection method for cover film defects based on multi-feature fusion according to claim 2, characterized in that: The edge tracing of each image block is performed, and pixel points with sudden changes in grayscale value within the image block are identified by pixel-by-pixel scanning, and the pixel points are connected to form contour lines. The degree of curvature, number of intersections, and closed state of the contour lines are analyzed, and the morphological structural features of the image block are determined based on the degree of curvature, number of intersections, and closed state of the contour lines. The method includes: Perform pixel-level scanning on the image block, and read the grayscale value of each pixel in sequence from left to right and from top to bottom; Calculate the grayscale difference between the current pixel and the adjacent pixels, and mark the current pixel as an edge point when the absolute value of the grayscale difference exceeds a preset edge threshold; Connect all marked edge points, using the eight-neighborhood connection criterion to connect adjacent edge points to form continuous edge segments, and smooth the edge segments. Identify the curved parts of the smoothed edge lines, calculate the curvature radius of the curved parts, and record the curvature radius values of all curved parts as curvature feature parameters. Counting the number of intersections of edge lines, when two or more edge lines intersect to form an intersection point, recording the coordinates of the intersection point and the number of intersecting lines to obtain the number of intersections; Determine the closed state of the edge line. When the starting point and end point of the edge line coincide and form a closed figure, mark it as a closed line. Otherwise, mark it as an open line. Record the number and area ratio of the closed lines to obtain the closed state parameters. The bending feature parameter, the number of crossings, and the closed state parameter are integrated to form a morphological structure feature vector of the image block, and the morphological structure feature vector is normalized. The normalized morphological structure feature vector is associated with the position information of the image block and stored as the morphological structure feature of the image block.
5. The intelligent detection method for cover film defects based on multi-feature fusion according to claim 1, characterized in that: The performing association mapping processing on the candidate feature set to establish an association relationship between regional grayscale features and morphological structure features to obtain an association feature map includes: Standardize and encode the regional grayscale features in the candidate feature set, convert the grayscale mean and grayscale variance into a fixed-length numerical sequence, where each numerical value corresponds to a specific attribute of the feature; Performing a structured description of the morphological structural features in the candidate feature set, converting the curvature, number of intersections, and closed state of the contour lines into a quantifiable parameter sequence, where each parameter corresponds to a dimension of the morphology; Constructing a feature correlation matrix, wherein the row dimension of the feature correlation matrix corresponds to the coding sequence of the regional grayscale feature, the column dimension corresponds to the parameter sequence of the morphological structure feature, and the matrix elements represent the correlation strength between the two; Calculate the co-occurrence frequency of regional grayscale features and morphological structural features, count the number of times specific regional grayscale features and specific morphological structural features appear simultaneously in the same potential defect candidate region, use the number as the initial value of the association strength, and assign different weights based on the importance of the features in defect identification. Perform weighted adjustment on the initial value of the association strength and assign different weights based on the importance of the features in defect identification. Analyzing the feature association matrix through an association rule mining algorithm to identify a combination of strongly correlated regional grayscale features and strongly correlated features of morphological structures, wherein the combination of strongly correlated regional grayscale features and strongly correlated features of morphological structures satisfies dual threshold conditions of support and confidence; The strong correlation features are combined as node pairs to construct the basic framework of the association network, each node pair includes a regional grayscale feature node and a morphological structure feature node; in the association network, the length of the connection between nodes is determined by the correlation strength, the higher the correlation strength, the shorter the connection, and the lower the correlation strength, the longer the connection; Clustering the nodes in the association network, clustering nodes with similar association patterns together to form multiple feature association clusters, each feature association cluster representing a feature combination pattern of a type of defect; Add an identification label to each feature association cluster, wherein the identification label includes the main regional grayscale features and morphological structure feature types in the feature association cluster; The association network is visually rendered, different colors are used to distinguish different feature association clusters, and the association network is converted into the association feature map through a visualization tool. The association feature map is used to display all association relationships and association strengths between regional grayscale features and morphological structure features.
6. The intelligent detection method for cover film defects based on multi-feature fusion according to claim 5, characterized in that: The method of analyzing the feature association matrix by an association rule mining algorithm to identify a combination of strongly correlated regional grayscale features and strongly correlated features of morphological structures includes: Setting a support threshold and a confidence threshold, wherein the support threshold represents the minimum frequency of the feature combination appearing in all potential defect candidate regions, and the confidence threshold represents the minimum probability of the morphological structure feature appearing simultaneously when the regional grayscale feature appears; Scanning the feature correlation matrix to extract all possible feature combinations of regional grayscale features and morphological structure features, each feature combination including a regional grayscale feature and a morphological structure feature; Calculate the support of each feature combination, where the support is the ratio of the number of times the feature combination appears in all potential defect candidate regions to the total number of regions; Calculate the confidence of each feature combination, where the confidence is the ratio of the number of times the morphological structure feature appears when the regional grayscale feature appears to the number of times the regional grayscale feature appears alone; Screening out strong correlation feature combinations whose support is greater than or equal to the support threshold and whose confidence is greater than or equal to the confidence threshold; Calculating the lift of the strongly correlated feature combination, where the lift represents the degree of enhancement of the correlation of the strongly correlated feature combination relative to random occurrence, and a combination with a lift greater than 1 represents a positive correlation; The strongly correlated feature combinations are sorted according to the improvement degree, and the sorted strongly correlated feature combinations are compared with a known covering film defect feature library to verify the validity of the strongly correlated feature combinations, and the strongly correlated feature combinations that do not match the known defect features are eliminated to obtain the final determined strongly correlated feature combinations.
7. The intelligent detection method for cover film defects based on multi-feature fusion according to claim 1, characterized in that: The calling of the pre-built defect recognition model to perform defect recognition analysis on the associated feature map to generate a defect recognition result of the cover film includes: Preprocessing the associated feature map to extract node coordinates, connection attributes, and clustering information, and converting them into a tensor format acceptable to the defect recognition model, which is trained based on the defect characteristics of the cover film; Inputting the converted tensor into the input layer of the defect recognition model, performing preliminary feature mapping on the tensor through the weight matrix of the input layer to obtain an initial feature vector, wherein the initial feature vector contains basic feature information of the cover film defect; Inputting the initial feature vector into the hidden layer of the defect recognition model, the hidden layer comprising multiple convolution modules and pooling modules. The convolution module uses multi-size convolution kernels to extract features from the initial feature vector to generate a multi-scale feature map. The multi-scale feature map includes characteristic representations of the cover film defect at different scaling ratios. The pooling module downsamples the multi-scale feature map to retain key feature information. Perform channel fusion on the downsampled feature maps, concatenate the feature maps output by different convolution modules in the channel dimension to form a fused feature tensor that integrates the multi-dimensional features of the cover film defects; Inputting the fused feature tensor into the attention mechanism layer of the defect recognition model, the attention mechanism layer performs weighted adjustment on the fused feature tensor by calculating the importance weights of the feature channels to obtain a feature tensor processed by the attention mechanism; The feature tensor processed by the attention mechanism is input into the fully connected layer of the defect recognition model. The fully connected layer converts the feature tensor into a high-dimensional feature vector through nonlinear transformation of multiple layers of neurons. The high-dimensional feature vector contains the deep feature information required for cover film defect recognition. The high-dimensional feature vector is divided into two paths, one of which is input into a defect category classifier, and a probability value of each cover film defect category is output by calculating the matching probability between the high-dimensional feature vector and a template vector of each cover film defect category. The defect category classifier includes multiple parallel recognition units, each recognition unit corresponding to a cover film defect category; The covering film defect category with the highest probability value is selected as the predicted category identifier of the defect, and the probability value of the covering film defect category is recorded as the confidence level; The other high-dimensional feature vector is input into the defect area locator, and a set of regional coordinate parameters of the defect is determined through iterative optimization of the bounding box parameters. The regional coordinate parameters include the pixel coordinates of the upper left corner and the lower right corner of the defect area, which are used to frame the range of the cover film defect; The predicted category identifier and the set of regional coordinate parameters are cross-validated to check whether the typical regional features corresponding to the predicted category match the actual features of the positioning area. When the cross-validation passes, the predicted category identifier and the regional coordinate parameters are integrated into the defect recognition result; when the validation fails, the model parameters are readjusted and the recognition process is repeated until a valid defect recognition result is obtained.
8. The intelligent detection method for cover film defects based on multi-feature fusion according to claim 7, characterized in that: The step of inputting another high-dimensional feature vector into the defect area locator and determining a set of defect area coordinate parameters through iterative optimization of bounding box parameters includes: Extracting a spatial position feature component from the other high-dimensional feature vector, wherein the spatial position feature component includes pixel coordinate distribution information of a potential defect area; generating initial bounding box parameters based on the spatial position feature component, the initial bounding box parameters comprising the upper left corner pixel horizontal coordinate, the upper left corner pixel vertical coordinate, the lower right corner pixel horizontal coordinate, and the lower right corner pixel vertical coordinate; Marking a candidate region in the cover film image unit according to the initial bounding box parameters, and extracting actual grayscale features and actual morphological features within the candidate region; Comparing the actual grayscale features and the actual morphological features with corresponding features in the high-dimensional feature vector, calculating feature consistency, and when the feature consistency is less than a preset consistency threshold, adjusting the initial bounding box parameters to expand the coverage of the bounding box, and repeatedly adjusting the bounding box parameters and calculating the feature consistency until the feature consistency is greater than or equal to the consistency threshold, thereby obtaining adjusted bounding box parameters; Performing edge calibration on the adjusted bounding box parameters, confirming whether the bounding box edge coincides with the actual defect edge by pixel-by-pixel scanning, and if there is a deviation between the bounding box edge and the actual defect edge, fine-tuning the coordinate parameters of the bounding box until the bounding box edge completely coincides with the actual defect edge, and recording the final bounding box parameters as the area range parameters of the defect, the area range parameters including the calibrated upper left corner and lower right corner pixel coordinates; The area range parameters are associated with corresponding defect category identifiers to form a set of area coordinate parameters of the defects.
9. The intelligent detection method for cover film defects based on multi-feature fusion according to claim 1, characterized in that: Generating a detection report including specific location coordinates of the defect based on the defect identification result, and sending the detection report to the detection management system to complete the defect recording operation, including: Parse the region range parameters in the defect recognition results and extract the pixel coordinates of the upper left and lower right corners of the bounding box; Calculate the center coordinates of the defect area by averaging the x-coordinates of the upper left corner and the x-coordinates of the lower right corner, and the y-coordinates of the center by averaging the y-coordinates of the upper left corner and the y-coordinates of the lower right corner. The center coordinates are the specific location coordinates of the defect. Arrange the predicted category identifier, the specific location coordinates, and the area range parameters according to a preset field format to obtain defect feature information, where each field includes a field name and a corresponding value; Collecting metadata information of the image data set, the metadata information including image acquisition device model, acquisition time, shooting angle, lighting conditions, batch number and production time of the cover film; The metadata information is integrated with the defect feature information to form the basic data of the inspection report, the basic data is structured and converted into a table form, and a defect feature description is added to the inspection report. The preset defect description template is called according to the predicted category identifier, and a natural language description is generated and sent to the inspection management system to complete the defect recording operation.
10. An intelligent detection system for cover film defects based on multi-feature fusion, characterized in that It includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the intelligent detection method for covering film defects based on multi-feature fusion as described in any one of claims 1 to 9.
Citation Information
Cited By
Wafer defect identification method and system under multi-feature fusion
CN120912615A
Coal mine safety production video intelligent analysis system
CN120953897A
Global defect positioning method and system for inspection image
CN121305403A
TAC film casting defect intelligent detection method based on machine vision
CN121353239B
Template matching defect detection method and system for BC cell silk-screen printing
CN121724988A