A metal mesh quality detection method, system, device and medium
Through clustering analysis and reflective interference measurement, the problem of noise interference in metal mesh quality detection is solved, more accurate quality judgment is achieved, and detection accuracy is improved.
Patent Information
- Application Number
- CN202510926185.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-07
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-07-07
AI Technical Summary
When the prior art uses spectral analysis to detect the mass of the metal mesh, there are many noise interferences caused by the reflection interference of the metal mesh surface, which affects the detection accuracy, especially for defects that do not have obvious changes in light and darkness, it is easy to miss detection.
By clustering, the spectral curve similarity and distance discreteness of hyperspectral data points are quantified, spectral data anomalies and reflective interference are calculated, and noise interference is identified and eliminated, and real defect data points are retained.
It improves the accuracy and reliability of metal mesh quality detection, can accurately distinguish defects from light interference, reduce missed inspection, and improve detection accuracy.
Smart Images

Figure CN120427645B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of metal mesh quality detection, and in particular to a metal mesh quality detection method, system, device and medium. Background Art
[0002] Metal mesh is resistant to acids, alkalis, and high temperatures, and exhibits strong tensile and abrasion resistance. It is commonly used in the petrochemical, aerospace, hydraulic, automotive, and renewable energy power generation industries. During the weaving process of high-density metal mesh, various defects can develop in the wire, affecting the quality of the mesh. Therefore, quality inspections are often required.
[0003] Typically, a method based on vision and laser beams is used to capture images of the metal mesh at a certain frequency, and then the metal mesh is inspected based on the changes in light and dark in the image. However, this method is prone to missing defects where the changes in light and dark are not obvious. Therefore, a method based on spectral analysis is currently used to analyze the impact of the content of each element in the metal mesh on the metal mesh and thus determine the quality of the metal mesh. However, when using spectral technology to collect data on the metal mesh, due to the small aperture and high density of the metal mesh itself, the metal mesh surface is prone to reflection. The collected metal mesh spectral data may contain a lot of noise interference, thereby reducing the accuracy of the metal mesh quality inspection. Summary of the Invention
[0004] In a first aspect, an embodiment of the present application provides a method for detecting the quality of a metal mesh, the method comprising the following steps:
[0005] Obtain a hyperspectral image of the metal mesh to be tested placed on a standard testing table;
[0006] All hyperspectral data points in the hyperspectral image of the metal mesh to be tested are clustered, and the similarity of the peaks on the spectral curve between each hyperspectral data point and other hyperspectral data points in the cluster to which it belongs is analyzed to determine the similar peak pairs of each hyperspectral data point; by analyzing the degree of dispersion of the distance between each hyperspectral data point and all hyperspectral data points in the cluster to which it belongs, and counting the number of similar peak pairs of each hyperspectral data point, the spectral data anomaly of each hyperspectral data point is determined;
[0007] The reflective interference degree of each hyperspectral data point is determined by analyzing the maximum value distribution of the distances between all hyperspectral data points in the cluster where each hyperspectral data point is located, and the average distribution of all peak values on the spectral curve of each hyperspectral data point in the cluster where each hyperspectral data point is located, and combining the difference in the average distribution of all peak values on the spectral curve between each hyperspectral data point and all its adjacent hyperspectral data points.
[0008] Based on the spectral data abnormality and the reflective interference degree, the degree of rejection of each hyperspectral data point is determined to obtain characteristic hyperspectral data points of the metal mesh to be tested, and the quality of the metal mesh to be tested is tested.
[0009] Preferably, the method for determining the similar peak pairs of the hyperspectral data points is:
[0010] The spectral curve between the adjacent troughs of each peak on the spectral curve of each hyperspectral data point is recorded as the peak curve of each peak;
[0011] Calculate the KL divergence of the peak curves of any two peaks between each hyperspectral data point and any hyperspectral data point in its cluster, and record the peaks whose normalized KL divergence value is less than the preset threshold as similar peak pairs;
[0012] All similar peak pairs between each hyperspectral data point and all hyperspectral data points in its cluster are counted to obtain similar peak pairs of hyperspectral data points.
[0013] Preferably, the expression for the spectral data anomaly of each hyperspectral data point is: Where, Indicates the spectral data anomaly of the hyperspectral data point i; represents the number of all similar peak pairs of hyperspectral data point i; Indicates the degree of dispersion of the distance between the hyperspectral data point i and all the hyperspectral data points in its cluster; Indicates a preset constant greater than 0.
[0014] Preferably, the method for determining the reflective interference degree of each hyperspectral data point is:
[0015] Calculate the mean of all peak values on the spectral curve of each hyperspectral data point, and record it as the peak mean of each hyperspectral data point;
[0016] Calculate the range of the peak mean of all hyperspectral data points in the cluster where each hyperspectral data point is located;
[0017] Calculate the cumulative sum of the peak mean differences between each hyperspectral data point and all its adjacent hyperspectral data points;
[0018] The maximum value of the distance between all hyperspectral data points in the cluster where each hyperspectral data point is located is multiplied by the range, and the sum of the multiplication result and the cumulative sum of the peak mean difference is used as the reflective interference degree of each hyperspectral data point.
[0019] Preferably, the removability of each hyperspectral data point is a result of normalizing the ratio of the reflective interference degree of each hyperspectral data point to the spectral data anomaly degree in the hyperspectral image of the metal mesh to be tested.
[0020] Preferably, the step of obtaining characteristic hyperspectral data points of the metal mesh to be tested includes:
[0021] The removability of all hyperspectral data points in the hyperspectral image of the metal network to be tested is used as the input of the threshold segmentation algorithm, and the segmentation threshold is output. The hyperspectral data points with a removability less than the segmentation threshold are used as the characteristic hyperspectral data points of the metal network to be tested.
[0022] Preferably, the quality detection of the metal mesh to be detected includes:
[0023] Calculate the mean of all absorbances on the spectral curve of each characteristic hyperspectral data point in each cluster of the metal mesh to be tested as the representative spectral data of each characteristic hyperspectral data point; obtain all spectral data of the standard test platform, calculate the spectral similarity coefficient between the representative spectral data of all characteristic hyperspectral data points in each cluster and all spectral data of the standard test platform, and use all characteristic hyperspectral data points in all clusters whose spectral similarity coefficient is less than a preset first threshold as the target hyperspectral data points of the metal mesh to be tested;
[0024] All spectral data of the standard metal mesh are obtained, and the spectral similarity coefficient between the representative spectral data of all target hyperspectral data points and all spectral data of the standard metal mesh is calculated and recorded as the characteristic coefficient. If the characteristic coefficient is greater than or equal to the preset second threshold, the quality of the metal mesh to be tested is qualified; otherwise, the quality of the metal mesh to be tested is unqualified.
[0025] In the second aspect, an embodiment of the present application provides a metal mesh quality inspection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of any one of the above-mentioned metal mesh quality inspection methods are implemented.
[0026] In a third aspect, an embodiment of the present application provides a metal mesh quality detection device, wherein a computer program is stored in the device, and when the computer program is executed by a processor, the metal mesh quality detection method described in any one of the above items is implemented.
[0027] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for detecting the quality of a metal mesh.
[0028] As can be seen from the above embodiments, the metal mesh quality inspection method provided in the embodiments of the present application has at least the following beneficial effects:
[0029] The present application constructs spectral data anomaly by analyzing the degree of dispersion of the distance between each hyperspectral data point and all hyperspectral data points in its cluster and the similarity of the peaks on the spectral curve, quantifies the differences in spectral characteristics and spatial distribution between hyperspectral data points and similar hyperspectral data points, and provides a quantitative indicator, so that the anomaly levels of different hyperspectral data points can be compared, providing a more accurate basis for subsequent decision-making; further, the present application quantifies reflective interference by analyzing the distance, peak mean distribution and neighborhood differences of data points within the cluster, effectively identifies and eliminates spectral distortion data points caused by reflection, makes up for the shortcomings of relying solely on spectral anomaly judgment, and can more accurately distinguish metal mesh defects from light interference, thereby improving the accuracy of quality detection; further, the present application comprehensively calculates the removability by combining spectral anomaly and reflective interference, effectively filters out noise interference, and retains data points that can reflect the real defects of the metal mesh. Through subsequent comparison with the standard spectrum, accurate judgment of the quality of the metal mesh is achieved, thereby improving the accuracy of metal mesh quality detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0031] Figure 1 A flowchart of a method for detecting the quality of a metal mesh according to an embodiment of the present application;
[0032] Figure 2 A schematic diagram of the removability extraction process provided in one embodiment of the present application. DETAILED DESCRIPTION
[0033] To further illustrate the technical means and effectiveness of this application to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the metal mesh quality inspection method, system, device, and medium proposed in this application, including its specific implementation, structure, features, and effectiveness. In the following description, different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0034] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0035] The following describes in detail a metal mesh quality detection method, system, device and medium provided by the present application with reference to the accompanying drawings.
[0036] See also Figure 1 , which shows a flow chart of a method for quality inspection of a metal mesh provided by an embodiment of the present application, the method comprising the following steps:
[0037] S1: Obtain a hyperspectral image of the metal mesh to be tested placed on a standard testing table.
[0038] Nowadays, metal mesh is widely used in key fields such as petrochemical industry, aerospace, and automobile. In these applications, metal mesh usually undertakes core functions such as filtering, separation, protection, and structural support. If there are defects in the metal mesh, it may cause equipment damage and other problems. Therefore, in this embodiment, the metal mesh to be tested is placed on a clean standard testing table, and a hyperspectral camera is used to obtain a hyperspectral image of the metal mesh to be tested. There are many hyperspectral data points corresponding to the hyperspectral image, and each hyperspectral data point corresponds to a spectral curve. By analyzing the characteristics of the spectral curves at each hyperspectral data point, the quality of the metal mesh to be tested is tested.
[0039] S2: Cluster all hyperspectral data points in the hyperspectral image of the metal mesh to be tested, analyze the similarity of the peaks on the spectral curve between each hyperspectral data point and other hyperspectral data points in its cluster, and determine the similar peak pairs of each hyperspectral data point; by analyzing the degree of dispersion of the distance between each hyperspectral data point and all hyperspectral data points in its cluster, and counting the number of similar peak pairs of each hyperspectral data point, determine the spectral data anomaly of each hyperspectral data point.
[0040] Metal mesh is usually woven by weaving metal wires through a specific mold or mechanical device according to preset parameters. Therefore, the wires and pores in the metal mesh at the weaving point are evenly spaced. Under normal circumstances, for the hyperspectral image of the metal mesh to be tested, there should only be two major types of spectral data: one is the spectral data of the metal mesh itself, and the other is the spectral data points of the detection platform in the pores of the metal mesh. The distribution intervals of these two data points are similar. When noise appears in the spectral data, it may affect the spectral data of some spectral data points. The impact of noise is relatively random, and the position of the affected hyperspectral data points is also highly random, making the overall distribution of the hyperspectral data points relatively discrete. If there are certain problems with the quality of the metal mesh itself, such as wire size deviation, weaving deviation, broken mesh, etc., some of the spectral data in the collected spectral data will also show abnormal changes. Specifically, a single spectral data point may show peak characteristics of both the detection platform and the metal mesh, or multiple spectral data points may be abnormal in a local area.
[0041] Based on the above characteristics, this embodiment clusters all hyperspectral data points in the hyperspectral image of the metal mesh to be tested, analyzes the similarity of the peaks on the spectral curve between each hyperspectral data point and other hyperspectral data points in the cluster to which it belongs, and determines the similar peak pairs of each hyperspectral data point; by analyzing the degree of dispersion of the distance between each hyperspectral data point and all hyperspectral data points in the cluster to which it belongs, and counting the number of similar peak pairs of each hyperspectral data point, the spectral data abnormality of each hyperspectral data point is determined to accurately identify the defect degree of the metal mesh to be tested, specifically:
[0042] In this embodiment, all hyperspectral data points in the hyperspectral image of the metal mesh to be tested are first clustered, where the metric distance is set to the Euclidean distance between hyperspectral data points, the number of clusters is set to k, and all clusters are finally output. Each cluster represents a hyperspectral cluster corresponding to the metal mesh, the test platform, or a combination of the metal mesh and the test platform.
[0043] It should be noted that there are many commonly used clustering algorithms. In this embodiment, the HDBSCAN clustering algorithm is used to cluster the hyperspectral data points. In actual application, as other implementation methods, the implementer may also adopt other clustering methods such as the DBSCAN clustering algorithm or the DPC density peak clustering algorithm according to specific circumstances. Regarding the selection of the clustering algorithm, this embodiment does not impose any special restrictions.
[0044] Among them, the HDBSCAN clustering algorithm and the calculation process of the Euclidean distance are both well-known technologies, and the specific process of clustering hyperspectral data points using the HDBSCAN clustering algorithm and the specific process of calculating the Euclidean distance are not repeated here.
[0045] In addition, it is supplemented that the value of the number of clusters k is set manually. In this embodiment, the value of the number of clusters k is 5. In actual application, as other implementation methods, the implementer can also set it by himself based on the specific situation. This embodiment does not impose any special restrictions.
[0046] Furthermore, this embodiment determines similar peak pairs of each hyperspectral data point by analyzing the similarity of peaks on the spectral curve between each hyperspectral data point and other hyperspectral data points in its cluster, specifically:
[0047] As an implementation manner, in this embodiment, the spectral curve between adjacent troughs of each peak on the spectral curve of each hyperspectral data point is recorded as the peak curve of each peak;
[0048] Furthermore, the KL divergence of the peak curves between each hyperspectral data point and any hyperspectral data point in its cluster is calculated, and the peaks whose normalized KL divergence value is less than a preset threshold are recorded as similar peak pairs.
[0049] All similar peak pairs between each hyperspectral data point and all hyperspectral data points in its cluster are counted to obtain similar peak pairs of hyperspectral data points.
[0050] The calculation method of KL divergence is a well-known technology, and its specific calculation process is not repeated here.
[0051] Furthermore, this embodiment determines the spectral data anomaly of each hyperspectral data point by analyzing the degree of dispersion of the distance between each hyperspectral data point and all hyperspectral data points in its cluster and counting the number of similar peak pairs of each hyperspectral data point, specifically:
[0052] As an implementation method, in this embodiment, the spectral data abnormality of the hyperspectral data point i is The expression is: Where, represents the number of all similar peak pairs of hyperspectral data point i; Indicates the degree of dispersion of the distance between the hyperspectral data point i and all the hyperspectral data points in its cluster; Indicates a constant greater than 0 to prevent the denominator from being 0. The value of is set artificially. The value of is 0.01. Under the premise of ensuring that the denominator is not 0 and does not excessively affect the calculation results, the implementer can also set it according to the specific situation. This embodiment does not impose any special restrictions.
[0053] It should be noted that there are many methods for measuring the degree of dispersion of a set of data. In this embodiment, the variance of the distance between the hyperspectral data point i and all the hyperspectral data points in the cluster to which it belongs is used as the degree of dispersion of the distance between the hyperspectral data point i and all the hyperspectral data points in the cluster to which it belongs. In actual application, as other implementation methods, the implementer may also select other methods for measuring the degree of dispersion of data, such as standard deviation or dispersion coefficient, according to specific circumstances. This embodiment does not impose any special restrictions on the selection of methods for measuring the degree of dispersion of data.
[0054] According to the spectral data anomaly of each hyperspectral data point, it can be understood that the spectral data anomaly is an indicator used to quantify the degree to which the spectral data in the hyperspectral data point deviates from the normal state. The larger the spectral data anomaly, the more abnormal the spectral data at the hyperspectral data point, and the more likely the metal mesh to be tested has quality defects. If the dispersion degree of the distance between the hyperspectral data point i and all the hyperspectral data points in the cluster where it is located is smaller, it means that the spectral data in the cluster are very similar and concentrated. In this case, if the hyperspectral data point i has many similar peaks with the data points in the cluster where it is located, it means that the spectral characteristics of the hyperspectral data point are significantly different from those of other hyperspectral data points in the cluster. Therefore, the corresponding spectral data anomaly is larger. At the same time, if the hyperspectral data point i has more similar peak pairs, it means that there are a large number of spectral similar features in the spectral curve of the hyperspectral data point i with other hyperspectral data points in the cluster where it is located, indicating that the spectral information of the hyperspectral data point may be mixed, and its spectral characteristics have changed significantly, making it similar to the spectra of multiple different substances. This situation usually corresponds to a quality defect of the metal mesh, resulting in its spectral characteristics no longer being single. Therefore, the corresponding spectral data anomaly is higher.
[0055] On the other hand, if the degree of dispersion of the distance between hyperspectral data point i and all the hyperspectral data points in its cluster is greater, it means that the spectral data in the cluster itself is more diverse and inconsistent. In this case, even if hyperspectral data point i has some similar peaks with the data points in its cluster, it does not necessarily mean that it deviates significantly from the overall range of the data in the cluster, because the cluster itself contains a lot of variation. Therefore, the corresponding spectral data anomaly may not increase significantly, and may even be relatively small, because it is consistent with the diversity of the data in the cluster. At the same time, if the number of similar peak pairs of hyperspectral data point i is smaller, it means that the spectral curve of hyperspectral data point i has few spectral similarities with other clusters. This means that the spectral characteristics of this data point are relatively unique, mainly reflecting the metal mesh or test platform to which its cluster belongs. This indicates that the spectral variation of data point i is not large and is unlikely to be a mixed spectrum or significant variation caused by metal mesh defects. Therefore, the corresponding spectral data anomaly is smaller.
[0056] Thus, this embodiment has clustered and analyzed the hyperspectral data points, and calculated the spectral data anomaly using the peak similarity and the discreteness of the intra-cluster distance, effectively identifying points with abnormal spectral characteristics and large differences from the surrounding areas as potential defects, thereby improving the accuracy and reliability of metal mesh quality detection.
[0057] S3: Determine the reflective interference degree of each hyperspectral data point by analyzing the maximum distribution of distances between all hyperspectral data points in the cluster where each hyperspectral data point is located, and the average distribution of all peak values on the spectral curve of each hyperspectral data point in the cluster where each hyperspectral data point is located, and combining the difference in the average distribution of all peak values on the spectral curve between each hyperspectral data point and all its adjacent hyperspectral data points.
[0058] In addition to being interfered with by ambient light itself, the metal mesh's hyperspectral data points may also produce a certain amount of reflection when light strikes the metal mesh surface. This in turn causes the metal mesh's hyperspectral data points to be interfered with by the light, thereby enhancing the spectral superposition effect and reducing the original characteristic capability of the metal mesh. However, due to differences in illumination angle and the weaving method of the metal mesh, the reflections formed on the technical mesh also vary. Areas with strong reflections may form a large reflective area. The spectral data collected by the hyperspectral data points in this area may have a very strong superposition effect, with the absorption rates of each peak being more prominent than those in the reflective area, and the degree of offset is also more obvious. Areas with relatively weak reflections may have a more discrete distribution, which may be due to interference in several small areas of the metal mesh or the positions of several hyperspectral data points, and the interference is relatively weak. The peak superposition and offset of the spectral data points are relatively small. Therefore, the disturbed hyperspectral data cannot be eliminated by the method of step S2 alone.
[0059] Therefore, further, this embodiment determines the reflective interference degree of each hyperspectral data point by analyzing the maximum value distribution of the distances between all hyperspectral data points in the cluster where each hyperspectral data point is located, and the average distribution of all peak values on the spectral curve of each hyperspectral data point in the cluster where each hyperspectral data point is located, and combining the difference in the average distribution of all peak values on the spectral curve between each hyperspectral data point and all its adjacent hyperspectral data points, so as to better eliminate hyperspectral data interfered by noise, specifically:
[0060] As an implementation manner, in this embodiment, the average of all peak values on the spectrum curve of each hyperspectral data point is calculated and recorded as the peak average value of each hyperspectral data point;
[0061] Furthermore, the range of the peak mean of all hyperspectral data points in the cluster where each hyperspectral data point is located is calculated;
[0062] Further, the cumulative sum of the peak mean differences between each hyperspectral data point and all its adjacent hyperspectral data points is calculated;
[0063] Furthermore, this embodiment calculates the product of the maximum value of the distance between all hyperspectral data points in the cluster where each hyperspectral data point is located and the range, and uses the sum of the multiplication result and the cumulative sum of the peak-mean difference as the reflective interference degree of each hyperspectral data point.
[0064] It should be noted that there are many methods for measuring the differences between data. In this embodiment, the absolute value of the difference between the peak means of each hyperspectral data point and all its adjacent hyperspectral data points is taken as the peak mean difference between each hyperspectral data point and all its adjacent hyperspectral data points. In actual application, as other implementation methods, the implementer may also use other methods such as the square or ratio of the difference to measure the differences between data according to the specific circumstances. This embodiment does not impose any special restrictions on the selection of methods for measuring the differences between data.
[0065] It should be noted that, in this embodiment, as an implementation method, the method for obtaining the adjacent hyperspectral data points of each hyperspectral data point is specifically as follows: the distances between each hyperspectral data point and all the hyperspectral data points in the cluster to which it belongs are arranged in descending order, and the hyperspectral data points corresponding to the first preset number of distances in the arrangement result are used as the adjacent data points of each hyperspectral data point. In this embodiment, the preset number is 8. In actual application, as other implementation methods, the implementer can also set it by himself according to the specific situation. This embodiment does not impose any special restrictions.
[0066] According to the reflective interference degree of each hyperspectral data point, it can be understood that if the maximum value of the distance between all hyperspectral data points in the cluster where the current hyperspectral data point is located is larger, it means that the distribution of hyperspectral data points in the cluster is very scattered, which usually corresponds to the area with strong reflection, because strong reflection may cause the spectra collected at different positions in the same area to be very different, so the corresponding reflective interference degree is also greater; at the same time, if the range of the peak mean of all hyperspectral data points in the cluster where the current hyperspectral data point is located is larger, it means that the difference in the peak absorption rate mean of different hyperspectral data points in the cluster is very large, which usually corresponds to the area with strong reflection, because strong reflection will superimpose a strong signal on the spectrum, causing the peak absorption rate to change. The significant change leads to an increase in the difference in the mean of the peak absorptivity of different data points in the cluster, and the corresponding reflective interference is also greater; in addition, if the cumulative sum of the peak mean differences between the current hyperspectral data point and all its adjacent hyperspectral data points is larger, it is believed that the difference in the mean of the peak absorptivity between the current hyperspectral data point and its adjacent hyperspectral data points is larger, which usually corresponds to the edge of the reflective area or a point with strong local reflectivity. Because in this case, the current hyperspectral data point may be significantly different from its adjacent hyperspectral data points, therefore, it indicates that the spectral characteristics of the current hyperspectral data point and its local environment are significantly different, and it is likely to be subject to strong local reflective interference. Therefore, the greater the corresponding reflective interference, the more the hyperspectral data point should be eliminated;
[0067] On the contrary, if the maximum value of the distance between all hyperspectral data points in the cluster where the current hyperspectral data point is located is small, and the range of the peak mean of all hyperspectral data points in the cluster is small, and the cumulative sum of the peak mean differences between the current hyperspectral data point and all its adjacent hyperspectral data points is also small, this usually corresponds to an area with weak or no reflective interference, then the corresponding reflective interference degree is smaller.
[0068] At this point, this embodiment quantifies reflective interference by analyzing the distance between data points in the cluster, the peak mean distribution and the neighborhood difference, effectively identifying and eliminating data points with spectral distortion caused by reflection, making up for the shortcomings of judging only by spectral anomaly, and being able to more accurately distinguish between metal mesh defects and light interference, thereby improving the accuracy of quality detection.
[0069] S4: Based on the spectral data abnormality and the reflective interference degree, determining the degree of rejection of each hyperspectral data point to obtain characteristic hyperspectral data points of the metal mesh to be tested, and detecting the quality of the metal mesh to be tested.
[0070] Based on the analysis of steps S2 and S3, this embodiment further determines the degree of rejection of each hyperspectral data point based on the spectral data abnormality and the reflective interference degree, so as to obtain characteristic hyperspectral data points of the metal mesh to be tested, and detect the quality of the metal mesh to be tested, specifically:
[0071] In this embodiment, the result of normalizing the ratio of the reflective interference degree to the spectral data abnormality of each hyperspectral data point in the hyperspectral image of the metal mesh to be tested is used as the rejection degree of each hyperspectral data point.
[0072] Preferably, the schematic diagram of the removability extraction process provided in this embodiment is as follows: Figure 2 shown.
[0073] According to the removability of each hyperspectral data point, it can be understood that the removability is used to measure the degree to which the spectral information corresponding to the hyperspectral data point should be eliminated; if the reflective interference degree of the current hyperspectral data point is greater, it means that the data point is more seriously interfered with by the reflective interference, and the degree to which its spectral data deviates from the true metal mesh characteristics is higher, and the corresponding removability is higher, so it should be eliminated to ensure the accuracy of subsequent metal mesh quality inspection; at the same time, if the spectral data anomaly degree of the current hyperspectral data point is smaller, it means that the spectral anomaly of the hyperspectral data point is more likely to be caused by reflective interference rather than by defects in the metal mesh itself, and therefore, the removability should be increased so that the spectral information of the current hyperspectral data point is eliminated;
[0074] On the contrary, if the reflective interference of the current hyperspectral data point is smaller and the spectral data anomaly is greater, the rejection rate will decrease. This reflects that although there are anomalies in the spectral information of the current hyperspectral data point, this anomaly is more likely to be caused by defects in the metal mesh itself rather than environmental noise. Therefore, retaining these data points is crucial for accurately evaluating the quality of the metal mesh. Removing them will lead to missed defects. This mechanism ensures that the algorithm can distinguish between false anomalies caused by noise and valid anomalies caused by real defects, thereby improving the accuracy of detection.
[0075] Furthermore, the removability of all hyperspectral data points in the hyperspectral image of the metal network to be tested is used as the input of the threshold segmentation algorithm, and the segmentation threshold is output. The hyperspectral data points with a removability less than the segmentation threshold are used as the characteristic hyperspectral data points of the metal network to be tested.
[0076] It should be noted that there are many commonly used threshold segmentation algorithms. In this embodiment, the maximum inter-class variance algorithm is used to classify hyperspectral data points. In actual application, as other implementation methods, implementers can also select other threshold segmentation algorithms based on specific circumstances. Regarding the selection of threshold segmentation algorithms, this embodiment does not impose any special restrictions.
[0077] Among them, the maximum inter-class variance algorithm is a well-known technology, and its specific principle is not repeated here.
[0078] Furthermore, in this embodiment, a spline interpolation algorithm is used to interpolate the remaining hyperspectral data points after elimination, and all the hyperspectral data points obtained after data interpolation and all the characteristic hyperspectral data points are used together as characteristic hyperspectral data points of the metal mesh to be tested, so as to further detect the quality of the metal mesh to be tested. In actual application, as other implementation methods, the implementer may also adopt other interpolation algorithms such as linear interpolation in combination with specific circumstances. This embodiment does not impose any special restrictions. The spline interpolation algorithm is a well-known technology, and the specific principle will not be repeated here. The specific process of detecting the quality of the metal mesh to be tested is as follows:
[0079] In this embodiment, the mean of all absorbances on the spectral curve of each characteristic hyperspectral data point in each cluster of the metal mesh to be tested is calculated as the representative spectral data of each characteristic hyperspectral data point; all spectral data of the standard test bench are obtained using the existing metal mesh test bench database, and the spectral similarity coefficient between the representative spectral data of all characteristic hyperspectral data points in each cluster and all spectral data of the standard test bench is calculated, and all characteristic hyperspectral data points in all clusters whose spectral similarity coefficient is less than a preset first threshold are used as target hyperspectral data points of the metal mesh to be tested.
[0080] Furthermore, all spectral data of the standard metal mesh are obtained using the metal mesh spectral database, and the spectral similarity coefficient between the representative spectral data of all target hyperspectral data points and all spectral data of the standard metal mesh is calculated and recorded as the characteristic coefficient. If the characteristic coefficient is greater than or equal to the preset second threshold, the quality of the metal mesh to be tested is qualified. Conversely, if the characteristic coefficient is less than the preset second threshold, the quality of the metal mesh to be tested is unqualified. The calculation method of the spectral similarity coefficient is a well-known technology, and its specific calculation process will not be repeated here.
[0081] It should be noted that the values of the preset first threshold and the preset second threshold are both set manually. In this embodiment, the value of the preset first threshold is 0.9, and the value of the preset second threshold is 0.98. In actual application, as other implementation methods, the implementer can also set them by himself based on the specific situation. This embodiment does not impose any special restrictions.
[0082] Among them, using the existing metal mesh test bench database to obtain all spectral data of the standard test bench, and using the metal mesh spectrum database to obtain all spectral data of the standard metal mesh are both well-known technologies, and the specific acquisition processes are not repeated here.
[0083] At this point, this embodiment calculates the rejection degree by comprehensively combining the spectral anomaly and reflective interference, effectively filtering out noise interference and retaining data points that can reflect the real defects of the metal mesh. Through subsequent comparison with the standard spectrum, it achieves accurate judgment of the quality of the metal mesh, significantly improving the accuracy and reliability of metal mesh quality detection.
[0084] Based on the same inventive concept as the above method, an embodiment of the present application also provides a metal mesh quality inspection system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, it implements any one of the above-mentioned metal mesh quality inspection methods.
[0085] Based on the same inventive concept as the above method, an embodiment of the present application also provides a metal mesh quality detection device, in which a computer program is stored. When the computer program is executed by a processor, it implements any of the above-mentioned metal mesh quality detection methods.
[0086] Based on the same inventive concept as the above method, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements any of the above-mentioned metal mesh quality detection methods.
[0087] It should be noted that the order in which the embodiments of the present application are presented is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. Furthermore, the foregoing descriptions of specific embodiments of this specification are provided. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential sequence shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0088] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0089] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for detecting the quality of a metal mesh, characterized in that: The method comprises the following steps: Obtain a hyperspectral image of the metal mesh to be tested placed on a standard testing table; All hyperspectral data points in the hyperspectral image of the metal mesh to be tested are clustered, and the similarity of the peaks on the spectral curve between each hyperspectral data point and other hyperspectral data points in the cluster to which it belongs is analyzed to determine the similar peak pairs of each hyperspectral data point; by analyzing the degree of dispersion of the distance between each hyperspectral data point and all hyperspectral data points in the cluster to which it belongs, and counting the number of similar peak pairs of each hyperspectral data point, the spectral data anomaly of each hyperspectral data point is determined; The reflective interference degree of each hyperspectral data point is determined by analyzing the maximum value distribution of the distances between all hyperspectral data points in the cluster where each hyperspectral data point is located, and the average distribution of all peak values on the spectral curve of each hyperspectral data point in the cluster where each hyperspectral data point is located, and combining the difference in the average distribution of all peak values on the spectral curve between each hyperspectral data point and all its adjacent hyperspectral data points. Based on the spectral data abnormality and the reflective interference degree, determining the degree of rejection of each hyperspectral data point to obtain characteristic hyperspectral data points of the metal mesh to be tested, and detecting the quality of the metal mesh to be tested; The quality inspection of the metal mesh to be inspected includes: Calculate the mean of all absorbances on the spectral curve of each characteristic hyperspectral data point in each cluster of the metal mesh to be tested as the representative spectral data of each characteristic hyperspectral data point; obtain all spectral data of the standard test platform, calculate the spectral similarity coefficient between the representative spectral data of all characteristic hyperspectral data points in each cluster and all spectral data of the standard test platform, and use all characteristic hyperspectral data points in all clusters whose spectral similarity coefficient is less than a preset first threshold as the target hyperspectral data points of the metal mesh to be tested; All spectral data of the standard metal mesh are obtained, and the spectral similarity coefficient between the representative spectral data of all target hyperspectral data points and all spectral data of the standard metal mesh is calculated and recorded as the characteristic coefficient. If the characteristic coefficient is greater than or equal to the preset second threshold, the quality of the metal mesh to be tested is qualified; otherwise, the quality of the metal mesh to be tested is unqualified.
2. A metal mesh quality inspection method according to claim 1, characterized in that: The method for determining similar peak pairs of each hyperspectral data point is as follows: The spectral curve between the adjacent troughs of each peak on the spectral curve of each hyperspectral data point is recorded as the peak curve of each peak; Calculate the KL divergence of the peak curves of any two peaks between each hyperspectral data point and any hyperspectral data point in its cluster, and record the peaks whose normalized KL divergence value is less than the preset threshold as similar peak pairs; All similar peak pairs between each hyperspectral data point and all hyperspectral data points in its cluster are counted to obtain similar peak pairs of hyperspectral data points.
3. The method for detecting the quality of a metal mesh according to claim 1, wherein: The expression of the spectral data anomaly degree of each hyperspectral data point is: Where, Indicates the spectral data anomaly of the hyperspectral data point i; represents the number of all similar peak pairs of hyperspectral data point i; Indicates the degree of dispersion of the distance between the hyperspectral data point i and all the hyperspectral data points in its cluster; Indicates a preset constant greater than 0.
4. The method for detecting the quality of a metal mesh according to claim 1, wherein: The method for determining the reflective interference degree of each hyperspectral data point is as follows: Calculate the mean of all peak values on the spectral curve of each hyperspectral data point, and record it as the peak mean of each hyperspectral data point; Calculate the range of the peak mean of all hyperspectral data points in the cluster where each hyperspectral data point is located; Calculate the cumulative sum of the peak mean differences between each hyperspectral data point and all its adjacent hyperspectral data points; The maximum value of the distance between all hyperspectral data points in the cluster where each hyperspectral data point is located is multiplied by the range, and the sum of the multiplication result and the cumulative sum of the peak mean difference is used as the reflective interference degree of each hyperspectral data point.
5. The method for detecting the quality of a metal mesh according to claim 1, wherein: The removability of each hyperspectral data point is a result of normalizing the ratio of the reflective interference degree of each hyperspectral data point to the spectral data anomaly degree in the hyperspectral image of the metal mesh to be tested.
6. The method for detecting the quality of a metal mesh according to claim 1, wherein: The step of obtaining characteristic hyperspectral data points of the metal mesh to be tested includes: The removability of all hyperspectral data points in the hyperspectral image of the metal network to be tested is used as the input of the threshold segmentation algorithm, and the segmentation threshold is output. The hyperspectral data points with a removability less than the segmentation threshold are used as the characteristic hyperspectral data points of the metal network to be tested.
7. A metal mesh quality detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the metal mesh quality detection method according to any one of claims 1 to 6 are implemented.
8. A metal mesh quality inspection device, wherein a computer program is stored in the device, characterized in that: When the computer program is executed by a processor, the method for detecting quality of a metal mesh according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer program implements a metal mesh quality detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Wire mesh defect detection method based on laser beams and artificial intelligence system
CN114792314A
Metal mesh defect detection method based on double low-rank decomposition
CN117911379A