Defect detection method and device, computer equipment and readable storage medium

By determining the correlation relationship between the pixel points to be detected and the referenced pixels in the image processing, and calculating their characteristic values ​​to identify defects, the problem of high misjudgment rate in the prior art is solved, and the accuracy and reliability of defect detection are improved.

CN119810024APending Publication Date: 2025-04-11HUAXING YUANCHUANG (SHENZHEN) TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411781279.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When comparing multiple grayscale values ​​abnormally, the prior art can easily lead to misjudgment, unable to accurately identify product defects, and poor recognition accuracy.

Method used

By acquiring the grayscale image of the object to be detected, a plurality of target pixel points are determined, including the pixel points to be detected and the reference pixel points. According to the correlation relationship between each target pixel point and the corresponding neighborhood pixel point, the reference feature value and the image feature value are determined, and the defect detection result is then determined.

Benefits of technology

It improves the accuracy of defect detection, avoids defect misjudgment caused by multiple pixel abnormalities, and is suitable for more application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810024A_ABST
    Figure CN119810024A_ABST
Patent Text Reader

Abstract

The invention relates to a defect detection method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps that a gray level image corresponding to a to-be-detected object is acquired, a plurality of target pixel points are determined in a preset detection range of the gray level image, and the target pixel points comprise to-be-detected pixel points and reference pixel points; determining a reference feature value corresponding to the plurality of target pixel points and an image feature value corresponding to the pixel point to be detected according to an association relationship between each target pixel point and a corresponding neighborhood pixel point; and determining a defect detection result of the target pixel point according to the reference feature value and the image feature value. By adopting the method, the defect detection accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a defect detection method, apparatus, computer equipment, and computer-readable storage medium. Background Art

[0002] In the field of semiconductors, in order to ensure the quality of the products produced, it is necessary to detect defects in the products. Usually, images of the products can be collected and processed and identified through machine vision technology to determine whether the products have defects.

[0003] In the related art, when the image of the product corresponds to a regular periodic pattern, the grayscale value of the image can be compared by using the neighborhood five-point comparison method to determine the point that deviates from the normal grayscale value as a defect point. However, this method is prone to misjudgment when there are multiple abnormal grayscale values ​​in the compared points, and the defect cannot be accurately identified, resulting in a poor recognition accuracy. Summary of the invention

[0004] Based on this, it is necessary to provide a defect detection method, device, computer equipment, computer-readable storage medium and computer program product that can improve recognition accuracy in response to the above technical problems.

[0005] In a first aspect, the present application provides a defect detection method, comprising:

[0006] Acquire a grayscale image corresponding to the object to be detected, and determine a plurality of target pixels within a preset detection range of the grayscale image, wherein the target pixels include pixels to be detected and reference pixels;

[0007] Determine, according to the association relationship between each of the target pixel points and the corresponding neighborhood pixel points, the reference feature values ​​corresponding to the multiple target pixel points and the image feature values ​​corresponding to the pixel points to be detected;

[0008] A defect detection result of the target pixel is determined according to the reference feature value and the image feature value.

[0009] In one embodiment, determining the image feature value corresponding to the pixel to be detected includes:

[0010] Determine a plurality of initial feature values ​​of different feature dimensions corresponding to the pixel to be detected according to the grayscale values ​​of the pixel to be detected and the corresponding neighboring pixel points, wherein the feature dimension includes at least one of similarity and gradient;

[0011] The image feature value corresponding to the pixel point to be detected is determined according to the multiple initial feature values ​​corresponding to the pixel point to be detected.

[0012] In one embodiment, determining the image feature value corresponding to the pixel to be detected according to the multiple initial feature values ​​corresponding to the pixel to be detected includes:

[0013] Obtaining feature weights corresponding to the different feature dimensions respectively;

[0014] According to the feature weights, a weighted sum calculation is performed on a plurality of initial feature values ​​corresponding to the pixel point to be detected to obtain an image feature value corresponding to the pixel point to be detected.

[0015] In one of the embodiments, determining the reference feature values ​​corresponding to the plurality of target pixels according to the association relationship between each of the target pixels and the corresponding neighborhood pixels includes:

[0016] Determine, according to the grayscale values ​​of each of the target pixels and the corresponding neighboring pixels, a plurality of initial feature values ​​of different feature dimensions corresponding to each of the target pixels, wherein the feature dimensions include at least one of similarity and gradient;

[0017] Determine an initial eigenvalue group corresponding to each feature dimension according to a plurality of initial eigenvalues ​​of different feature dimensions corresponding to the plurality of target pixels;

[0018] For each of the initial feature value groups, determining the data feature value corresponding to each feature dimension;

[0019] A reference feature value is determined according to the multiple data feature values ​​corresponding to the different feature dimensions.

[0020] In one embodiment, determining the reference feature value according to the multiple data feature values ​​of the different feature dimensions includes:

[0021] Obtaining feature weights corresponding to the different feature dimensions respectively;

[0022] According to the feature weights, a weighted sum is calculated for the multiple data feature values ​​to obtain a reference feature value.

[0023] In one embodiment, determining the data feature value corresponding to each feature dimension for each of the initial feature value groups includes:

[0024] For each initial eigenvalue group, determining the eigenvalue median and eigenvalue variance corresponding to the initial eigenvalue group;

[0025] The data eigenvalues ​​of the eigenvalue dimension to which the initial eigenvalue group belongs are determined according to the eigenvalue median and the eigenvalue variance.

[0026] In one embodiment, determining a plurality of target pixels within a preset detection range of the grayscale image includes:

[0027] Determining a pixel point to be detected within a preset detection range of the grayscale image;

[0028] From the position of the pixel to be detected, a plurality of reference pixel points are determined by moving in a preset moving direction and moving distance.

[0029] In a second aspect, the present application also provides a defect detection device, comprising:

[0030] An acquisition module is used to acquire a grayscale image corresponding to the object to be detected, and determine a plurality of target pixels within a preset detection range of the grayscale image, wherein the target pixels include pixels to be detected and reference pixels;

[0031] A first determination module is used to determine the reference feature values ​​corresponding to the plurality of target pixels and the image feature values ​​corresponding to the pixel to be detected according to the association relationship between each of the target pixels and the corresponding neighborhood pixels;

[0032] The second determination module is used to determine the defect detection result of the target pixel point according to the reference feature value and the image feature value.

[0033] In one embodiment, the first determining module is further configured to:

[0034] Determine a plurality of initial feature values ​​of different feature dimensions corresponding to the pixel to be detected according to the grayscale values ​​of the pixel to be detected and the corresponding neighboring pixel points, wherein the feature dimension includes at least one of similarity and gradient;

[0035] The image feature value corresponding to the pixel point to be detected is determined according to the multiple initial feature values ​​corresponding to the pixel point to be detected.

[0036] In one embodiment, the first determining module is further configured to:

[0037] Obtaining feature weights corresponding to the different feature dimensions respectively;

[0038] According to the feature weights, a weighted sum calculation is performed on a plurality of initial feature values ​​corresponding to the pixel point to be detected to obtain an image feature value corresponding to the pixel point to be detected.

[0039] In one embodiment, the first determining module is further configured to:

[0040] Determine, according to the grayscale values ​​of each of the target pixels and the corresponding neighboring pixels, a plurality of initial feature values ​​of different feature dimensions corresponding to each of the target pixels, wherein the feature dimensions include at least one of similarity and gradient;

[0041] Determine an initial eigenvalue group corresponding to each feature dimension according to a plurality of initial eigenvalues ​​of different feature dimensions corresponding to the plurality of target pixels;

[0042] For each of the initial feature value groups, determining the data feature value corresponding to each feature dimension;

[0043] A reference feature value is determined according to the multiple data feature values ​​corresponding to the different feature dimensions.

[0044] In one embodiment, the first determining module is further configured to:

[0045] Obtaining feature weights corresponding to the different feature dimensions respectively;

[0046] According to the feature weights, a weighted sum is calculated for the multiple data feature values ​​to obtain a reference feature value.

[0047] In one embodiment, the first determining module is further configured to:

[0048] For each initial eigenvalue group, determining the eigenvalue median and eigenvalue variance corresponding to the initial eigenvalue group;

[0049] The data eigenvalues ​​of the eigenvalue dimension to which the initial eigenvalue group belongs are determined according to the eigenvalue median and the eigenvalue variance.

[0050] In one embodiment, the acquisition module is further used for:

[0051] Determining a pixel point to be detected within a preset detection range of the grayscale image;

[0052] From the position of the pixel to be detected, a plurality of reference pixel points are determined by moving in a preset moving direction and moving distance.

[0053] In a third aspect, an embodiment of the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods in the embodiments of the present disclosure are implemented.

[0054] In a fourth aspect, the embodiments of the present disclosure further provide a computer-readable storage medium, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods in the embodiments of the present disclosure are implemented.

[0055] In a fifth aspect, the embodiments of the present disclosure further provide a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of any one of the methods in the embodiments of the present disclosure are implemented.

[0056] The above-mentioned defect detection method, device, computer equipment, computer-readable storage medium and computer program product, when performing defect detection, obtain the grayscale image corresponding to the object to be detected, and determine multiple target pixels within a preset detection range, and determine the reference feature values ​​corresponding to the multiple target pixels and the image feature values ​​corresponding to the pixel to be detected according to the association relationship between each target pixel and the corresponding neighborhood pixel, and determine the defect detection result of the target pixel by comparing the reference feature value and the image feature value; the reference feature value and the image feature value used for comparison are determined by the association relationship between the target pixel and the neighborhood pixel, so as to ensure the accuracy and reliability of the obtained image feature value, and better reflect the image features of the pixel. Comparing the reference feature value and the image feature value can determine the relationship between the pixel to be detected and the corresponding reference pixel, thereby obtaining the defect detection result of the pixel to be detected, determining whether the pixel to be detected is a defective pixel, and can quickly and accurately perform defect detection on the pixel to be detected, effectively improving the accuracy of defect detection, avoiding the situation of defect misjudgment caused by multiple pixel anomalies, and being suitable for more application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 is a schematic flow chart of a defect detection method in one embodiment;

[0059] Figure 2 is a schematic diagram of a target pixel in one embodiment;

[0060] Figure 3 is a flow chart of a defect detection method in another embodiment;

[0061] Figure 4 is a flow chart of a defect detection method in another embodiment;

[0062] Figure 5 is a schematic diagram of a target pixel point in another embodiment;

[0063] Figure 6 is a structural block diagram of a defect detection device in one embodiment;

[0064] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0066] In one embodiment, Figure 1 As shown, a defect detection method is provided. This embodiment takes the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0067] Step S110, obtaining a grayscale image corresponding to the object to be detected, and determining a plurality of target pixels within a preset detection range of the grayscale image, wherein the target pixels include pixels to be detected and reference pixels;

[0068] Exemplarily, a grayscale image corresponding to the object to be inspected is obtained, wherein the object to be inspected may include an object that needs to be inspected for defects, such as a display panel, etc. In one example, the grayscale image corresponding to the object to be inspected may be obtained by capturing an image of the object to be inspected using a preset image acquisition device.

[0069] In one example, the image corresponding to the object to be detected may be a regular periodic pattern; or may be a monochrome pattern, etc., which may be determined according to the actual application scenario.

[0070] Within a preset detection range of the grayscale image, a plurality of target pixel points are determined. Optionally, the preset detection range may be determined according to an actual application scenario. In one example, the preset detection range may be an area to be detected of a display panel, for example, the preset detection range may be the entire surface or a local area of ​​the display panel, and the target pixel points may be pixel points within the preset detection range, wherein the pixel points to be detected may include any pixel point within the preset detection range.

[0071] Optionally, the number of multiple target pixel points can be determined according to the actual application scenario, and the distribution of the target pixel points can be determined according to the actual application scenario. For example, taking the pixel point to be detected as the center, multiple surrounding pixel points are taken as reference pixel points to determine whether the pixel point to be detected is a defect point; or multiple reference pixel points can be taken at equal intervals within a preset detection range, etc.

[0072] Step S120, determining reference feature values ​​corresponding to the plurality of target pixels and image feature values ​​corresponding to the pixel to be detected according to the association relationship between each of the target pixels and the corresponding neighborhood pixels;

[0073] In one example, each target pixel point may correspond to multiple neighborhood pixel points, and the number of neighborhood pixel points may be set according to the actual application scenario. For example, the neighborhood pixel points may be nine neighborhoods, sixteen neighborhoods, or twenty-five neighborhoods centered on the target pixel point, etc., which may be determined according to the actual application scenario.

[0074] Optionally, the association relationship between each target pixel and the corresponding neighboring pixel can be determined based on the grayscale value of each target pixel and the grayscale value of the corresponding neighboring pixel. In one example, the association relationship can be determined based on the similarity between the grayscale value of the target pixel and the grayscale value of the neighboring pixel; in another example, the association relationship can be determined based on the gradient between the grayscale value of the target pixel and the grayscale value of the neighboring pixel; in another example, the association relationship can be determined based on the texture features between the target pixel and the neighboring pixel; in other possible implementations, the association relationship can also be determined by other possible characterization parameters.

[0075] According to the association relationship, the reference feature values ​​of multiple target pixels can be determined to characterize the common features of the multiple target pixels. In one example, the image feature value corresponding to the pixel to be detected can be determined based on the grayscale value of the pixel to be detected and the grayscale value of the corresponding neighboring pixel.

[0076] In a possible implementation manner, the reference feature value and the image feature value may be determined based on one or more association relationships.

[0077] Figure 2 This is a schematic diagram of a target pixel point according to an exemplary embodiment, wherein p0, p1, p2, p3, p4 are multiple target pixel points, p0 is a pixel point to be detected, p1, p2, p3, p4 are reference pixel points, and taking nine neighborhoods as an example, each target pixel point corresponds to 8 neighborhood pixel points.

[0078] Step S130: determining a defect detection result of the target pixel point according to the reference feature value and the image feature value.

[0079] For example, the image feature value of the pixel to be detected can be used to characterize the image feature of the pixel to be detected, and the reference feature value can be used to represent the image features of multiple target pixels. By comparing the reference feature value and the image feature value, the defect detection result of the target pixel can be determined.

[0080] Optionally, the image feature value of the pixel to be detected is compared with the reference feature value. If the difference is large, it can be considered that there is a large deviation between the image feature of the pixel to be detected and the image features of multiple target pixels at this time, and the defect detection result is determined to be that the pixel to be detected is a defective pixel. In one example, if the difference is small, it can be considered that the image feature of the pixel to be detected is close to the image features of multiple target pixels at this time, and the defect detection result is determined to be that the pixel to be detected is a normal pixel.

[0081] Optionally, a defective pixel point is determined, and the defect position on the object to be inspected is determined according to the position of the defective pixel point on the grayscale image, thereby realizing defect detection of the object to be inspected.

[0082] In the disclosed embodiment, when performing defect detection, a grayscale image corresponding to the object to be detected is obtained, and multiple target pixels are determined within a preset detection range. According to the association relationship between each target pixel and the corresponding neighboring pixel, the reference feature values ​​corresponding to the multiple target pixels and the image feature values ​​corresponding to the pixel to be detected are determined. By comparing the reference feature values ​​and the image feature values, the defect detection result of the target pixel is determined. The reference feature values ​​and the image feature values ​​used for comparison are determined by the association relationship between the target pixel and the neighboring pixel, thereby ensuring the accuracy and reliability of the obtained image feature values ​​and better reflecting the image features of the pixel. Comparing the reference feature values ​​and the image feature values ​​can determine the relationship between the pixel to be detected and the corresponding reference pixel, thereby obtaining the defect detection result of the pixel to be detected, determining whether the pixel to be detected is a defective pixel, and being able to quickly and accurately perform defect detection on the pixel to be detected, effectively improving the accuracy of defect detection, and avoiding the situation of misjudgment of defects caused by multiple pixel anomalies, and being suitable for more application scenarios.

[0083] In one embodiment, Figure 3 As shown, the determining of the image feature value corresponding to the pixel to be detected includes:

[0084] Step S121, determining a plurality of initial feature values ​​of different feature dimensions corresponding to the pixel to be detected according to the grayscale values ​​of the pixel to be detected and the corresponding neighboring pixel points, wherein the feature dimension includes at least one of similarity and gradient;

[0085] Step S122, determining the image feature value corresponding to the pixel to be detected according to the multiple initial feature values ​​corresponding to the pixel to be detected.

[0086] Exemplarily, the image feature values ​​of the pixel to be detected are calculated from multiple feature dimensions. In one example, multiple initial feature values ​​corresponding to different feature dimensions are determined based on the grayscale value of the pixel to be detected and the grayscale value of the corresponding neighboring pixel. The feature dimensions include but are not limited to similarity, gradient, texture features, etc. In one example, similarity may include but is not limited to structural similarity, local information similarity, etc.

[0087] In one example, when the feature dimension corresponds to similarity, the grayscale value similarity between the pixel to be detected and each neighboring pixel can be determined based on the grayscale value of the pixel to be detected and the grayscale value of the corresponding neighboring pixel, and multiple grayscale value similarities are obtained, and the initial eigenvalue of the pixel to be detected in the similarity dimension is determined based on the multiple grayscale value similarities. In one example, the structural similarity SSIM or local information similarity ORB algorithm can be used to calculate the initial eigenvalue of the similarity dimension.

[0088] In one example, when the feature dimension corresponds to a gradient, the grayscale value gradient corresponding to the pixel to be detected and each neighboring pixel can be determined based on the grayscale value of the pixel to be detected and the grayscale value of the corresponding neighboring pixel, and multiple grayscale value gradients are obtained, and the initial eigenvalue of the target pixel in the gradient dimension is determined based on the multiple grayscale value gradients. In one example, the Sobel or HOG method can be used to calculate the initial eigenvalue of the gradient dimension.

[0089] Optionally, the pixel to be detected has initial eigenvalues ​​corresponding to different feature dimensions, that is, multiple initial eigenvalues, and the image eigenvalue corresponding to the pixel to be detected can be determined based on the multiple initial eigenvalues. In one example, the sum of the multiple initial eigenvalues ​​can be directly determined as the image eigenvalue; in another example, the multiple initial eigenvalues ​​can be weighted and summed according to preset feature weights to obtain the image eigenvalue; in another example, one or more image eigenvalues ​​can be selected from the multiple initial eigenvalues ​​to calculate the image eigenvalue according to the actual application scenario; the image eigenvalue used to characterize the image characteristics of the pixel to be detected can also be calculated in other possible ways.

[0090] In the disclosed embodiment, when determining the image eigenvalue, the initial eigenvalues ​​of different feature dimensions corresponding to the pixel to be detected are determined according to the grayscale values ​​of the pixel to be detected and the corresponding neighborhood pixels, and the image eigenvalue corresponding to the pixel to be detected is determined according to the multiple initial eigenvalues ​​corresponding to the pixel to be detected. The image eigenvalue is obtained by determining the initial eigenvalues ​​of different dimensions, thereby further improving the accuracy and reliability of the image eigenvalue. By adding the eigenvalue of the gradient feature dimension, the influence of single grayscale information on the data is effectively avoided, thereby improving the algorithm accuracy.

[0091] In one embodiment, Figure 4 As shown, the determining of the image feature value corresponding to the pixel to be detected according to the multiple initial feature values ​​corresponding to the pixel to be detected includes:

[0092] Step S1221, obtaining feature weights corresponding to the different feature dimensions respectively;

[0093] Step S1222: performing weighted sum calculation on multiple initial eigenvalues ​​corresponding to the pixel to be detected according to the feature weights to obtain the image eigenvalue corresponding to the pixel to be detected.

[0094] Exemplarily, the initial eigenvalues ​​are weighted and summed to obtain the image eigenvalues. In one example, different feature dimensions correspond to different feature weights, wherein the same feature dimension may correspond to different feature weights in different application scenarios, which may be determined based on the actual application scenario.

[0095] Optionally, feature weights corresponding to different feature dimensions are obtained, and weighted summation is performed on multiple initial feature values ​​corresponding to the pixel to be detected according to the feature weights to obtain the image feature value corresponding to the pixel to be detected. In one example, feature weights can be set according to the different contributions of different feature dimensions to defect detection, with larger feature weights corresponding to larger contributions and smaller feature weights corresponding to smaller contributions.

[0096] In the disclosed embodiment, the initial eigenvalues ​​are weightedly summed according to the feature weights corresponding to different feature dimensions to obtain the image feature values ​​corresponding to the pixels to be detected, so that different feature weights can be set according to the contributions of different feature dimensions to defect detection, thereby effectively improving the accuracy of the image feature values, enabling them to better reflect whether a pixel is a defective pixel, and improving the accuracy of defect detection.

[0097] In one embodiment, determining the reference feature values ​​corresponding to the plurality of target pixels according to the association relationship between each of the target pixels and the corresponding neighboring pixels includes:

[0098] Determine, according to the grayscale values ​​of each of the target pixels and the corresponding neighboring pixels, a plurality of initial feature values ​​of different feature dimensions corresponding to each of the target pixels, wherein the feature dimensions include at least one of similarity and gradient;

[0099] Determine an initial eigenvalue group corresponding to each feature dimension according to a plurality of initial eigenvalues ​​of different feature dimensions corresponding to the plurality of target pixels;

[0100] For each of the initial feature value groups, determining the data feature value corresponding to each feature dimension;

[0101] A reference feature value is determined according to the multiple data feature values ​​corresponding to the different feature dimensions.

[0102] Exemplarily, in one example, the reference eigenvalue is calculated based on initial eigenvalues ​​corresponding to a plurality of target pixel points.

[0103] Optionally, each target pixel point has an initial eigenvalue corresponding to different feature dimensions, and multiple initial eigenvalues ​​of different feature dimensions corresponding to multiple target pixel points are obtained, and an initial eigenvalue group corresponding to each feature dimension is determined, wherein each initial eigenvalue group includes the initial eigenvalues ​​corresponding to multiple target pixel points in the feature dimension.

[0104] For each initial eigenvalue group, determine the data eigenvalue corresponding to each feature dimension. In one example, the data eigenvalue is obtained after data processing of multiple initial eigenvalues ​​in each initial eigenvalue group. For example, the data eigenvalue of the feature dimension can be calculated based on the mean, median, variance, standard deviation, etc. of the multiple initial eigenvalues ​​in the initial eigenvalue group.

[0105] After determining the data feature value of each feature dimension, multiple data feature values ​​corresponding to different feature dimensions are obtained, and a reference feature value is calculated based on the multiple data feature values. In one example, the sum of multiple data feature values ​​can be determined as the reference feature value; in another example, a weighted sum of multiple data feature values ​​can be performed to obtain a reference feature value; in another example, the reference feature value can be determined based on a portion of the multiple data feature values; the reference feature value can also be calculated in other possible ways. Optionally, in order to ensure the accuracy of defective pixel detection, the calculation method of the reference feature value can be set to be the same as the calculation method of the image feature value of the pixel to be detected.

[0106] Exemplarily, the image feature value and the reference feature value are compared, and when the difference between the image feature value and the reference feature value is outside the preset difference range, the pixel to be detected is determined to be a defective pixel. In one example, the preset difference range can be determined according to the actual application scenario. When the difference between the image feature value and the reference feature value is outside the preset difference range, it can be considered that the difference between the image feature of the pixel to be detected and the reference pixel is large, and there may be a defect, and it is determined to be a defective pixel; when the difference between the image feature value and the reference feature value is within the preset difference range, it can be considered that the difference between the image feature of the pixel to be detected and the reference pixel is small, and the probability of a defect is small, and it is determined to be a non-defective pixel, that is, a normal pixel.

[0107] The disclosed embodiment determines an initial eigenvalue group based on multiple initial eigenvalues ​​of different feature dimensions corresponding to multiple target pixels, obtains data eigenvalues ​​corresponding to each feature dimension, and determines reference eigenvalues ​​based on multiple data eigenvalues ​​corresponding to different feature dimensions, thereby enabling rapid and accurate reference eigenvalue acquisition based on multiple target pixels, providing comparison values ​​for defect detection, and determining pixels to be detected that have a large difference from the reference eigenvalues ​​as defective pixels, thereby improving the accuracy and reliability of defect detection and being suitable for more application scenarios.

[0108] In one embodiment, determining the reference feature value according to the multiple data feature values ​​corresponding to the different feature dimensions includes:

[0109] Obtaining feature weights corresponding to the different feature dimensions respectively;

[0110] According to the feature weights, a weighted sum is calculated for the multiple data feature values ​​to obtain a reference feature value.

[0111] Exemplarily, feature weights corresponding to different feature dimensions are obtained. In one example, different feature dimensions correspond to different feature weights, wherein the same feature dimension may correspond to different feature weights in different application scenarios, which may be determined based on the actual application scenario.

[0112] Optionally, feature weights corresponding to different feature dimensions are obtained, and weighted sum calculation is performed on multiple data feature values ​​according to the feature weights to obtain reference feature values. In one example, feature weights can be set according to the different contributions of different feature dimensions to defect detection, with larger feature weights corresponding to larger contributions and smaller feature weights corresponding to smaller contributions. In one example, the feature weights when calculating the reference feature value can be set to be consistent with the feature weights for calculating the image feature value.

[0113] In the embodiment of the present disclosure, when calculating the reference eigenvalue, the data eigenvalues ​​are weighted and summed according to the feature weights corresponding to different feature dimensions, so that different feature weights can be set according to the contribution of different feature dimensions to defect detection, thereby effectively improving the accuracy of the reference eigenvalue, ensuring that the obtained reference eigenvalue can accurately reflect the non-defect features of the object to be detected, and improving the accuracy of defect detection.

[0114] In one embodiment, determining the data feature value corresponding to each feature dimension for each of the initial feature value groups includes:

[0115] For each initial eigenvalue group, determining the eigenvalue median and eigenvalue variance corresponding to the initial eigenvalue group;

[0116] The data eigenvalues ​​of the eigenvalue dimension to which the initial eigenvalue group belongs are determined according to the eigenvalue median and the eigenvalue variance.

[0117] Exemplarily, when calculating the data eigenvalues ​​according to each initial eigenvalue group, for each initial eigenvalue group, the eigenvalue median and the eigenvalue variance corresponding to the multiple initial eigenvalues ​​in the initial eigenvalue group are determined.

[0118] Optionally, the data eigenvalue corresponding to the initial eigenvalue group, that is, the data eigenvalue of the eigenvalue dimension, is determined according to the eigenvalue median and the eigenvalue variance. In one example, the sum of the eigenvalue median and the eigenvalue variance can be directly determined as the data eigenvalue; in another example, the eigenvalue median and the eigenvalue variance can be weighted summed to obtain the data eigenvalue; the data eigenvalue corresponding to the data dimension can also be calculated by other possible methods.

[0119] The disclosed embodiment determines the data eigenvalue of each feature dimension based on the eigenvalue median and the eigenvalue variance, so that more accurate and reliable data eigenvalues ​​can be obtained from multiple angles of median and variance, thereby effectively improving the accuracy of reference eigenvalues ​​and ensuring the accuracy of defect detection.

[0120] In one embodiment, determining a plurality of target pixels within a preset detection range of the grayscale image includes:

[0121] Determining a pixel point to be detected within a preset detection range of the grayscale image;

[0122] From the position of the pixel to be detected, a plurality of reference pixel points are determined by moving in a preset moving direction and moving distance.

[0123] Exemplarily, the preset detection range can be determined according to an actual application scenario. For example, the preset detection range can be determined according to a range where defect detection is required in an actual application scenario, such as the entire surface or a local area of ​​a display panel. In one example, the grayscale image can be divided to obtain multiple small detection ranges, and each small detection range is used as a preset detection range for defect detection.

[0124] Optionally, multiple reference pixels are determined within a preset range of the pixel to be detected. In one example, the preset range can be determined according to an actual application scenario. For example, a rectangular area of ​​a preset area is divided into the preset range with the pixel to be detected as the center.

[0125] In one example, the number of reference pixels can be determined according to the actual application scenario, such as 4, 8, etc. In one example, when the grayscale image of the object to be detected is a regular periodic pattern, the position of the reference pixel can be determined according to the change law of the regular periodic pattern, such as locating the position of the pattern that is the same as the pattern corresponding to the pixel to be detected according to the distribution of the regular periodic pattern as the reference pixel.

[0126] Exemplarily, from the position of the pixel to be detected, a plurality of reference pixel points are determined by moving in a preset moving direction and moving distance. The preset moving direction and moving distance may be determined according to an actual application scenario, for example, the preset moving direction and moving distance may be set according to a change rule of a regular periodic pattern. In one example, a plurality of reference pixel points may be obtained by moving in different preset moving directions and different moving distances.

[0127] In a possible implementation, after determining the pixel to be detected, n reference pixels can be located after periodically moving n times in the XY direction according to a periodic pattern. Taking 4 reference pixels as an example, the moving step length in the X direction is period_X, and the moving step length in the Y direction is period_Y. After P0 (X0, Y0) moves four times, four reference pixels are obtained, P2 (X2, Y2) (X2=X0, Y2=Y0-period_Y), P3 (X3, Y3) (X3=X0+period_Y, Y3=Y0), and P4 (X4, Y4) (X4=X0, Y3=Y0-period_Y). In an example, Figure 5 As shown, the movement mode can also be set to move 8 times to obtain 8 reference pixel points P1, P2, P3, P4, P5, P6, P7, P8, and can also be set to move horizontally n times or vertically n times, etc. The movement mode and path can be set and matched according to the actual application scenario, and the present disclosure does not limit this. The more reference points are selected, the less interference is received, and the more accurate the result of the current pixel to be measured is.

[0128] The embodiment of the present disclosure first determines the pixel point to be detected, and then determines multiple reference pixel points within a preset range of the pixel point to be detected, thereby ensuring the rationality of the arrangement of multiple target pixel points, thereby improving the accuracy of defective pixel detection and avoiding the misjudgment of defects caused by unreasonable pixel selection, and is suitable for more application scenarios.

[0129] In one embodiment, the feature dimensions include similarity and gradient, and the multiple target pixels include a pixel to be detected and n reference pixels centered on the pixel to be detected, for example Figure 2 P0, P1, P2, P3, P4 in.

[0130] The initial eigenvalues ​​A0 to An corresponding to the similarity dimension are determined according to each target pixel point and the corresponding neighborhood pixel point, and the initial eigenvalues ​​D0 to Dn corresponding to the gradient dimension are determined according to each target pixel point and the corresponding neighborhood pixel point.

[0131] The feature weight corresponding to the similarity dimension is a, and the feature weight corresponding to the gradient dimension is b, where a+b=1. The initial eigenvalues ​​are weighted and summed to obtain the image eigenvalue F0=(A0)*a+(D0)*b of the pixel to be detected.

[0132] Determine the median M of the eigenvalues ​​of the similarity dimension based on multiple initial eigenvalues A and the eigenvalue variance S A , the median of the eigenvalues ​​of the gradient dimension M G and the eigenvalue variance S G , where M A is the median of A0-An, M G is the median of D0-Dn, S A is the variance of A0-An, S G is the variance of D0-Dn. The data feature value of the similarity dimension is determined as M A +S A , the data feature value of the gradient dimension is M G +S G , the reference eigenvalue Ft is obtained by weighted summation based on the feature weight a and feature weight b, Ft=(M A +S A )*a + (M G +S G )*b.

[0133] The difference between the image feature value and the reference feature value is calculated. When the difference is outside the preset difference range, the pixel to be detected is determined to be a defective pixel. In one example, the absolute value F of the difference between the image feature value and the reference feature value of the pixel to be detected can be calculated, and a judgment value T can be set. When F>T, it can be considered that the difference is outside the preset difference range, and it is determined that this is a defective pixel.

[0134] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0135] Based on the same inventive concept, the embodiment of the present application also provides a defect detection device for implementing the defect detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more defect detection device embodiments provided below can refer to the limitations on the defect detection method above, and will not be repeated here.

[0136] In an exemplary embodiment, Figure 6 As shown, a defect detection device 600 is provided, comprising:

[0137] An acquisition module 610 is used to acquire a grayscale image corresponding to the object to be detected, and determine a plurality of target pixels within a preset detection range of the grayscale image, wherein the target pixels include pixels to be detected and reference pixels;

[0138] A first determination module 620 is used to determine the reference feature values ​​corresponding to the plurality of target pixels and the image feature values ​​corresponding to the pixel to be detected according to the association relationship between each of the target pixels and the corresponding neighboring pixels;

[0139] The second determination module 630 is used to determine the defect detection result of the target pixel point according to the reference feature value and the image feature value.

[0140] In one embodiment, the first determining module is further configured to:

[0141] Determine a plurality of initial feature values ​​of different feature dimensions corresponding to the pixel to be detected according to the grayscale values ​​of the pixel to be detected and the corresponding neighboring pixel points, wherein the feature dimension includes at least one of similarity and gradient;

[0142] The image feature value corresponding to the pixel point to be detected is determined according to the multiple initial feature values ​​corresponding to the pixel point to be detected.

[0143] In one embodiment, the first determining module is further configured to:

[0144] Obtaining feature weights corresponding to the different feature dimensions respectively;

[0145] According to the feature weights, a weighted sum calculation is performed on a plurality of initial feature values ​​corresponding to the pixel point to be detected to obtain an image feature value corresponding to the pixel point to be detected.

[0146] In one embodiment, the first determining module is further configured to:

[0147] Determine, according to the grayscale values ​​of each of the target pixels and the corresponding neighboring pixels, a plurality of initial feature values ​​of different feature dimensions corresponding to each of the target pixels, wherein the feature dimensions include at least one of similarity and gradient;

[0148] Determine an initial eigenvalue group corresponding to each feature dimension according to a plurality of initial eigenvalues ​​of different feature dimensions corresponding to the plurality of target pixels;

[0149] For each of the initial feature value groups, determining the data feature value corresponding to each feature dimension;

[0150] A reference feature value is determined according to the multiple data feature values ​​corresponding to the different feature dimensions.

[0151] In one embodiment, the first determining module is further configured to:

[0152] Obtaining feature weights corresponding to the different feature dimensions respectively;

[0153] According to the feature weights, a weighted sum is calculated for the multiple data feature values ​​to obtain a reference feature value.

[0154] In one embodiment, the first determining module is further configured to:

[0155] For each initial eigenvalue group, determining the eigenvalue median and eigenvalue variance corresponding to the initial eigenvalue group;

[0156] The data eigenvalues ​​of the eigenvalue dimension to which the initial eigenvalue group belongs are determined according to the eigenvalue median and the eigenvalue variance.

[0157] In one embodiment, the acquisition module is further used for:

[0158] Determining a pixel point to be detected within a preset detection range of the grayscale image;

[0159] From the position of the pixel to be detected, a plurality of reference pixel points are determined by moving in a preset moving direction and moving distance.

[0160] Each module in the above defect detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0161] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store grayscale images and other data involved in the method described in this embodiment. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a defect detection method is implemented.

[0162] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0163] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0164] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0165] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0166] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0167] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0168] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0169] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A defect detection method, characterized in that: The method comprises: Acquire a grayscale image corresponding to the object to be detected, and determine a plurality of target pixels within a preset detection range of the grayscale image, wherein the target pixels include pixels to be detected and reference pixels; Determine, according to the association relationship between each of the target pixel points and the corresponding neighborhood pixel points, the reference feature values ​​corresponding to the multiple target pixel points and the image feature values ​​corresponding to the pixel points to be detected; A defect detection result of the target pixel is determined according to the reference feature value and the image feature value.

2. The method according to claim 1, characterized in that The determining of the image feature value corresponding to the pixel to be detected includes: Determine a plurality of initial feature values ​​of different feature dimensions corresponding to the pixel to be detected according to the grayscale values ​​of the pixel to be detected and the corresponding neighboring pixel points, wherein the feature dimension includes at least one of similarity and gradient; The image feature value corresponding to the pixel point to be detected is determined according to the multiple initial feature values ​​corresponding to the pixel point to be detected.

3. The method according to claim 2, characterized in that The step of determining the image feature value corresponding to the pixel to be detected according to the multiple initial feature values ​​corresponding to the pixel to be detected includes: Obtaining feature weights corresponding to the different feature dimensions respectively; According to the feature weights, a weighted sum calculation is performed on a plurality of initial feature values ​​corresponding to the pixel point to be detected to obtain an image feature value corresponding to the pixel point to be detected.

4. The method according to claim 1, characterized in that The step of determining reference feature values ​​corresponding to the plurality of target pixels according to the association relationship between each of the target pixels and the corresponding neighboring pixels comprises: Determine, according to the grayscale values ​​of each of the target pixels and the corresponding neighboring pixels, a plurality of initial feature values ​​of different feature dimensions corresponding to each of the target pixels, wherein the feature dimensions include at least one of similarity and gradient; Determine an initial eigenvalue group corresponding to each feature dimension according to a plurality of initial eigenvalues ​​of different feature dimensions corresponding to the plurality of target pixels; For each of the initial feature value groups, determining the data feature value corresponding to each feature dimension; A reference feature value is determined according to the multiple data feature values ​​corresponding to the different feature dimensions.

5. The method according to claim 4, characterized in that The step of determining a reference feature value according to the plurality of data feature values ​​of the different feature dimensions includes: Obtaining feature weights corresponding to the different feature dimensions respectively; According to the feature weights, a weighted sum is calculated for the multiple data feature values ​​to obtain a reference feature value.

6. The method according to claim 4, characterized in that The step of determining, for each of the initial feature value groups, a data feature value corresponding to each feature dimension includes: For each initial eigenvalue group, determining the eigenvalue median and eigenvalue variance corresponding to the initial eigenvalue group; The data eigenvalues ​​of the eigenvalue dimension to which the initial eigenvalue group belongs are determined according to the eigenvalue median and the eigenvalue variance.

7. The method according to claim 1, characterized in that Determining a plurality of target pixel points within a preset detection range of the grayscale image includes: Determining a pixel point to be detected within a preset detection range of the grayscale image; From the position of the pixel to be detected, a plurality of reference pixel points are determined by moving in a preset moving direction and moving distance.

8. A defect detection device, characterized in that: The device comprises: An acquisition module is used to acquire a grayscale image corresponding to the object to be detected, and determine a plurality of target pixels within a preset detection range of the grayscale image, wherein the target pixels include pixels to be detected and reference pixels; A first determination module is used to determine the reference feature values ​​corresponding to the multiple target pixels and the image feature values ​​corresponding to the pixel to be detected according to the association relationship between each target pixel and the corresponding neighborhood pixel; The second determination module is used to determine the defect detection result of the target pixel point according to the reference feature value and the image feature value.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Flange plate metal piece surface flatness detection method and system

    CN120259292A