Method for detecting defects on a metal surface and related apparatus
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU JIANGLING SEMICON CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-08-07
AI Technical Summary
金属带材是金属掩模版制造的基础材料,金属带材固有的晶粒结构及轧制加工痕迹在成像过程中会形成复杂的背景纹理,其形态与灰度特征与金属掩模版表面的真实微观缺陷高度相似,导致基于单一图像和固定阈值的传统算法极易产生误判
[0048]本申请实施例可以获取样品金属板的第一属性信息和样品表面图像序列,样品表面图像序列包括在不同光强下采集样品金属板表面得到的多个样品表面图像;对样品表面图像进行缺陷检测,得到疑似缺陷块;统计疑似缺陷块的面积在样品表面图像序列的变化趋势数据,并根据变化趋势数据,从多个样品表面图像各自对应的光强中筛选目标光强参数;根据目标光强参数对应的样品表面图像中疑似缺陷块的灰度信息,计算样品金属板的缺陷检测参数;基于目标光强参数和缺陷检测参数,对具有第一属性信息的待检金属板进行缺陷检测。
Smart Images

Figure CN122156211B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of semiconductor quantity detection technology, specifically to a method and related equipment for detecting defects on metal surfaces. Background Technology
[0002] As a critical precision component in OLED panel manufacturing, the microscopic defects on the surface of metal masks (such as scratches and pits) directly affect the accuracy of the vapor deposition pattern, thus requiring 100% inspection. Metal strip is the basic material for manufacturing metal masks. The inherent grain structure and rolling marks of the metal strip create complex background textures during imaging. These textures and grayscale characteristics are highly similar to the actual microscopic defects on the surface of the metal mask, making traditional algorithms based on a single image and fixed threshold prone to misjudgment. Existing technologies attempt to introduce multimodal imaging and complex artificial intelligence models to improve detection accuracy, but these methods are computationally intensive and time-consuming, making it difficult to meet the efficiency requirements of production lines. Summary of the Invention
[0003] This application provides a method and related equipment for detecting defects on metal surfaces, which can improve the efficiency of industrial batch inspection of metal plates.
[0004] This application provides a method for detecting defects on a metal surface, including:
[0005] The sequence module is used to acquire the first attribute information of the sample metal plate and the sample surface image sequence. The sample surface image sequence includes multiple sample surface images obtained by acquiring the sample metal plate surface under different light intensities.
[0006] The first detection module is used to detect defects in the sample surface image and obtain suspected defect blocks;
[0007] The trend module is used to statistically analyze the changing trend data of the area of suspected defective blocks in the sample surface image sequence, and to filter the target light intensity parameter from the light intensity corresponding to each of the multiple sample surface images based on the changing trend data.
[0008] The parameter module is used to calculate the defect detection parameters of the sample metal plate based on the grayscale information of the suspected defect blocks in the sample surface image corresponding to the target light intensity parameters.
[0009] The second detection module is used to perform defect detection on the metal plate to be inspected, which has the first attribute information, based on the target light intensity parameters and defect detection parameters.
[0010] In some embodiments of this application, the first detection module may be specifically used for:
[0011] Determine the location information of the candidate detection regions for each of multiple sample surface images;
[0012] The location information of the target detection region is obtained by finding the intersection of the location information of multiple candidate detection regions.
[0013] Based on the location information of the target detection area, the target detection area is segmented from multiple sample surface images respectively;
[0014] Defect detection is performed on the target detection area to obtain suspected defect blocks.
[0015] In some embodiments of this application, the trend module may be specifically used for:
[0016] Each target detection region is divided into multiple sub-detection regions and their respective location information;
[0017] Determine the area of the suspected defect block in the sub-detection region;
[0018] The area trend data of suspected defect blocks in multiple sub-detection regions that belong to different target detection regions but have the same location information is statistically analyzed.
[0019] Based on area trend data, target light intensity parameters are selected from multiple light intensities corresponding to each target detection area.
[0020] In some embodiments of this application, the trend module may be specifically used for:
[0021] From multiple area trend data, find the light intensity corresponding to the target detection area to which the sub-detection area that meets the preset first distribution condition belongs, and obtain multiple candidate light intensity parameters;
[0022] The number of sub-detection regions with zero area corresponding to the suspected defect block in the target detection region for each of the multiple candidate light intensity parameters is counted to obtain the quantity trend data.
[0023] Candidate light intensity parameters that meet the preset second distribution conditions in the quantitative trend data are identified as target light intensity parameters.
[0024] In some embodiments of this application, the preset first distribution condition includes: the area of the suspected defective block is reduced to 0 for the first time.
[0025] In some embodiments of this application, the sample metal plate includes a metal plate to be inspected on the production line or a standard metal plate used as a detection standard, and the preset second distribution condition includes: the number of sub-detection areas with zero area of suspected defective blocks first exceeds half of the total number of sub-detection areas.
[0026] In some embodiments of this application, the sample metal plate includes a standard metal plate used as a detection standard, and the preset second distribution condition includes: the number of sub-detection regions with an area of zero for suspected defective blocks is equal to the total number of sub-detection regions.
[0027] In some embodiments of this application, the first detection module may be specifically used for:
[0028] The gray-level histogram of the sample surface image is statistically analyzed, and the gray-level histogram is smoothed to obtain the histogram contour curve.
[0029] Find the minimum point in the histogram profile curve that meets the preset third distribution condition;
[0030] Threshold segmentation of the sample surface image is performed based on the minimum point to obtain the location information of the candidate detection region of the sample surface image.
[0031] In some embodiments of this application, the first detection module may be specifically used for:
[0032] The target detection area is inverted in grayscale, and defects are detected in the inverted target detection area using a preset first threshold and a preset second threshold to obtain suspected defect blocks. The preset first threshold is greater than the preset second threshold.
[0033] In some embodiments of this application, the second detection module may be specifically used for:
[0034] The trigger control unit adjusts the light source based on the target light intensity parameters and captures an image of the metal plate under inspection illuminated by the light source;
[0035] Defect detection is performed on the image to obtain at least one potential defect region;
[0036] Calculate the grayscale statistics of potential defect areas, and based on the grayscale statistics and defect detection parameters, determine whether the potential defect area is the target defect area.
[0037] In some embodiments of this application, the grayscale statistics include the average grayscale value and the maximum grayscale value, and the parameter module can be specifically used for:
[0038] Calculate the average grayscale value and standard deviation of all suspected defect blocks in the sample surface image corresponding to the target light intensity parameter;
[0039] At this point, the second detection module can be specifically used for:
[0040] By integrating grayscale statistics, maximum grayscale value, average grayscale value, and grayscale standard deviation, the detection reliability of potential defect areas is obtained. The detection reliability characterizes the confidence that a real defect exists in a potential defect area.
[0041] If the detection reliability matches the preset reliability threshold, the potential defect area is determined as the target defect area.
[0042] In some embodiments of this application, the defect detection device for metal surfaces further includes a recipe set module, which can be specifically used for:
[0043] Save the correspondence between the first attribute information, the target light intensity parameters, and the defect detection parameters to obtain the detection formula set;
[0044] Obtain the first attribute information of the metal plate to be inspected, and search for the target light intensity parameter and defect detection parameter corresponding to the first attribute information from the detection formula set.
[0045] Accordingly, this application also provides a computer device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the steps in the defect detection method for metal surfaces provided in this application.
[0046] Accordingly, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps in the defect detection method for metal surfaces provided in embodiments of this application.
[0047] Accordingly, embodiments of this application also provide a computer program product, including a computer program or instructions, which are executed by a processor to implement the steps in the defect detection method for metal surfaces provided in embodiments of this application.
[0048] This application embodiment can acquire first attribute information of a sample metal plate and a sample surface image sequence. The sample surface image sequence includes multiple sample surface images obtained by acquiring the sample metal plate surface under different light intensities. Defect detection is performed on the sample surface images to obtain suspected defect blocks. The variation trend data of the area of the suspected defect blocks in the sample surface image sequence is statistically analyzed, and target light intensity parameters are selected from the light intensities corresponding to the multiple sample surface images based on the variation trend data. Defect detection parameters of the sample metal plate are calculated based on the grayscale information of the suspected defect blocks in the sample surface images corresponding to the target light intensity parameters. Based on the target light intensity parameters and the defect detection parameters, defect detection is performed on the metal plate to be inspected, which has first attribute information.
[0049] This application eliminates the need for complex multimodal imaging. It only requires acquiring multiple sample surface images of a metal plate under different light intensities. Then, by creatively analyzing the defect change trends in the image sequence, the optimal light intensity is selected, and defect detection parameters are calculated. This allows for rapid batch inspection of the metal plates to be inspected on the production line based on the optimal light intensity and defect detection parameters, effectively improving the efficiency of industrial-grade defect detection while meeting accuracy requirements. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a schematic flowchart of the defect detection method for metal surfaces provided in the embodiments of this application;
[0052] Figure 2 This is a schematic diagram of an image sequence of a method for detecting defects on metal surfaces provided in an embodiment of this application;
[0053] Figure 3 This is a trend data graph of the defect detection method for metal surfaces provided in the embodiments of this application;
[0054] Figure 4 This is a schematic diagram of image partitioning for the defect detection method on metal surfaces provided in the embodiments of this application;
[0055] Figure 5 This is another trend data graph of the defect detection method for metal surfaces provided in the embodiments of this application;
[0056] Figure 6 This is another schematic flowchart of the defect detection method for metal surfaces provided in the embodiments of this application;
[0057] Figure 7 This is another trend data graph of the defect detection method for metal surfaces provided in the embodiments of this application;
[0058] Figure 8 This is another trend data graph of the defect detection method for metal surfaces provided in the embodiments of this application;
[0059] Figure 9 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0060] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0061] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0062] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0063] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0064] This application discloses a method and related equipment for detecting defects on metal surfaces, which can be applied to a defect detection device (hereinafter referred to as a detection device) for metal surfaces, such as the surface of a metal mask.
[0065] The detection device can acquire the first attribute information of the sample metal plate and the sample surface image sequence, which includes multiple sample surface images obtained by acquiring the sample metal plate surface under different light intensities; perform defect detection on the sample surface images to obtain suspected defect blocks; statistically analyze the changing trend data of the area of the suspected defect blocks in the sample surface image sequence, and based on the changing trend data, filter the target light intensity parameter from the light intensities corresponding to each of the multiple sample surface images; calculate the defect detection parameters of the sample metal plate based on the grayscale information of the suspected defect blocks in the sample surface images corresponding to the target light intensity parameters; and perform defect detection on the metal plate to be inspected with the first attribute information based on the target light intensity parameters and the defect detection parameters.
[0066] The detection device may integrate at least one computer device, and multiple computer devices can be connected via a wired or wireless network. The computer device may include, for example, a terminal or a server. Terminal device types include, but are not limited to, at least one of: tablet computers, personal computers (PCs), laptop computers, and desktop computers. Those skilled in the art will understand that the number of terminals may be more or less. This application does not limit the number or type of terminals.
[0067] A server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services such as cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
[0068] For example, the detection device may include computer equipment, vision system, adjustable light source, moving and supporting components of metal mask, etc. The adjustable light source can be set at a preset position to illuminate the metal mask on the moving and supporting components at a preset angle, and the vision system can acquire surface images of the metal mask at a preset viewing angle.
[0069] The detection equipment can place a metal mask sample at a predetermined station by moving and carrying components, control the adjustable light source to adjust the light intensity in a preset gradient, and control the vision system to acquire surface images of the metal mask sample under different light intensities to obtain a sequence of sample surface images.
[0070] The computer equipment can receive the sample surface image sequence transmitted by the vision system, and perform defect detection on each sample surface image to obtain suspected defect blocks; it can statistically analyze the changing trend data of the area of the suspected defect blocks in the sample surface image sequence, and based on the changing trend data, it can filter the target light intensity parameter from the light intensities corresponding to each of the multiple sample surface images; based on the grayscale information of the suspected defect blocks in the sample surface image corresponding to the target light intensity parameter, it can calculate the defect detection parameters of the metal mask sample.
[0071] Then, the detection equipment can adjust the adjustable light source based on the target light intensity parameters, and control the computer equipment to perform defect detection on other metal masks belonging to the same batch as the metal mask sample based on the defect detection parameters, thereby achieving efficient and rapid batch detection.
[0072] The method for detecting defects on metal surfaces according to this application will be further described below with reference to specific embodiments.
[0073] See Figure 1 , Figure 1 This is a flowchart illustrating the present application. The defect detection method for metal surfaces of this application includes:
[0074] Step 110: Obtain the first attribute information of the sample metal plate and the sample surface image sequence. The sample surface image sequence includes multiple sample surface images obtained by acquiring the sample metal plate surface under different light intensities.
[0075] The sample metal plate can include metal plates that require industrial-scale batch testing. The sample metal plate can be a pre-fabricated standard metal plate used as a testing standard, a metal plate that has passed testing, etc., provided that there are no defects on the standard / qualified metal plate based on the defect detection method mentioned in this application. Alternatively, the sample metal plate can be any metal plate to be tested on the production line, where the number and area of defects are unknown. The metal plate can be a metal mask.
[0076] The first attribute information can characterize the sample metal plate in a certain aspect, such as model, batch, production date, strip source, key machine model / number, etc.
[0077] The sample surface image sequence can include multiple sample surface images taken of the same metal plate at different light intensities. Each sample surface image includes images of the metal plate surface and can include part or all of the metal plate's surface. For example, the surface image sequence of sample metal plate 1 can be found in [reference needed]. Figure 2 .
[0078] Step 120: Perform defect detection on the sample surface image to obtain suspected defect blocks.
[0079] The suspected defect blocks include areas containing defects as initially identified through defect detection. Defects can include scratches, particles, dents, pinholes, etc. Because defects have a high similarity to the inherent background texture of the metal plate, the suspected defect blocks here may also include areas that are actually background textures but were mistakenly detected as defects.
[0080] Based on the characteristics of defect distribution on the metal plate, the type of defects, the imaging characteristics of the metal plate, and the actual detection requirements, defect detection can be performed directly on the sample surface image. For example, if defects may exist in all areas of the metal plate, defect detection can be performed on the entire sample surface image. Alternatively, the detection area can be segmented on the sample surface image, and then defect detection can be performed on the detection area. There are various ways to segment the detection area, such as pre-setting the location information of the detection area and segmenting the detection area in each sample surface image based on the location information.
[0081] For example, in some embodiments of this application, in order to reduce errors such as imaging distortion and improve the extraction accuracy of the detection area, the position information of the candidate detection areas of each of the multiple sample surface images can be determined first, the intersection of the position information of the multiple candidate detection areas can be obtained to obtain the position information of the target detection area, and then the target detection area can be segmented from the multiple sample surface images according to the position information of the target detection area. Finally, defect detection is performed on the target detection area to obtain the suspected defect block.
[0082] Specifically, there are multiple ways to determine the location information of candidate detection regions in a sample surface image. If there is a significant difference in grayscale between the candidate detection region and other regions of the sample surface image, the grayscale value range of the candidate detection region can be preset, or the grayscale value range of the candidate detection region can be calculated by measuring the grayscale features of the sample surface image. Candidate detection regions within the grayscale value range can be identified by binarization, morphological operations, etc., and then the boundary contour can be found in the binarized image to obtain the location information of the candidate detection region.
[0083] Calculating the grayscale range of candidate detection regions based on the grayscale features of a sample surface image can include: calculating the average grayscale value based on the entire surface image; calculating the average grayscale value of several preset key local regions, such as at least two local regions that are typically not detection areas (e.g., ...). Figure 2 (partial regions of the left and right boundaries in the middle) and at least two local regions that are usually the detection area (such as...) Figure 2(A portion of the image along the vertical midline). Since the grayscale difference between the detection area and the non-detection area of the metal plate, and the average grayscale of the metal plate exhibit certain patterns under different light intensities (for example, the grayscale difference between the detection area and the non-detection area, the grayscale difference between the detection area and the entire image, and the grayscale difference between the non-detection area and the entire image all have a reasonable range), at this time, the multi-dimensional difference can be calculated using the previously calculated average grayscale of the entire image and the average grayscale of the local area, and these differences can be verified to be within a reasonable range. If they are within a reasonable range, the grayscale value range of the candidate detection area is determined based on the average grayscale of the key local area located in the detection area and the preset floating range.
[0084] In some embodiments of this application, when there is a significant difference in grayscale between the candidate detection region and other regions of the sample surface image, the grayscale histogram of the sample surface image can be statistically analyzed and smoothed to obtain a histogram contour curve. The grayscale histogram can statistically represent the proportion of pixels with different grayscale values in the sample surface image. Figure 2 Taking the metal mask shown as an example, since there is a significant difference in gray values between the detection area and the non-detection area in the image, and even if the light intensity is different, the gray value of the detection area is significantly greater than that of the non-detection area, this application takes advantage of this point to find the minimum point that meets the preset third distribution condition in the histogram contour curve, and then performs threshold segmentation on the sample surface image based on the minimum point to obtain the position information of the candidate detection area of the sample surface image.
[0085] The preset third distribution condition can include the Nth minimum point in the histogram profile curve (N is a positive integer, such as...). Figure 3 The settings include N=3, the minimum value of the histogram contour curve that is greater than the preset gray value / the maximum gray value, etc. The specific settings can be flexibly combined with the application scenario.
[0086] by Figure 3 For example, Figure 3 For the smoothed histogram contour curve of the grayscale histogram of sample surface image 1, find the third minimum point. Based on the grayscale value corresponding to the minimum point, perform threshold segmentation on the sample surface image to obtain a binary image containing multiple small regions. Then, denoise the binary image by opening operation, select the largest connected component and fill the holes in it. Use the processed largest connected component as the candidate detection region of the sample surface image and determine the location information of the candidate detection region.
[0087] To accurately locate the detection area and avoid contamination of subsequent processing by any non-detection area, the intersection of the location information of multiple candidate detection areas can be obtained to obtain the location information of the target detection area. Then, based on the location information of the target detection area, the target detection area is segmented from multiple sample surface images. Finally, defect detection is performed on the target detection area to obtain suspected defect blocks.
[0088] For example, the location information of the candidate detection regions of each of the 14 sample surface images in the sample surface image sequence is solved, and the intersection of these 14 location information is calculated to obtain the location information of the target detection region. Based on the location information of the target detection region, the target detection region is segmented from the multiple sample surface images to obtain 14 target detection regions, and then the suspected defect blocks of each target detection region are obtained.
[0089] In this application embodiment, there are multiple ways to perform defect detection on the sample surface image / target detection area.
[0090] For example, when the sample surface image contains unknown defects and background textures, the sample surface image / target detection area can be preprocessed first to filter the background textures and highlight the defects. Then, the preprocessed sample surface image / target detection area can be thresholded to obtain suspected defect blocks.
[0091] Specifically, because background textures typically exhibit periodicity (e.g., rolling marks, certain grain structures), directionality (e.g., rolling marks), and relatively stable grayscale levels in the image (e.g., rolling marks, grain structures), they are usually more concentrated in specific frequency bands in the frequency domain. Preprocessing can use frequency domain band-stop filtering to initially remove background textures such as grain structures and rolling marks from the image. The filter parameters can be flexibly determined based on practical experience and are not limited here.
[0092] Defects are usually non-periodic and localized, and their gray-level changes are significant compared to the surrounding area. The gray-level fluctuations inside the defect block are also relatively large, which makes the defects more concentrated in the high frequency domain. At this time, the contrast of randomly appearing defects in the image is improved by high-pass filtering in the frequency domain, and then suspected defect blocks are obtained by threshold segmentation.
[0093] Defect enhancement can also be achieved through Gabor filtering. For example, a set of Gabor filters with different directions / wavelengths can be set, and the response map corresponding to each Gabor filter can be determined by convolution calculation. Then, the response differences of pixels in various directions can be analyzed. Since the direction of the background texture is relatively stable, pixels with significantly large response values only in specific directions (such as the difference between the response value and the average response value being greater than a preset threshold) are initially identified as background texture. Pixels with response values greater than the average response value in at least three directions are initially identified as pit defect pixels. Pixels with significantly large response values in non-specific directions are initially identified as scratch defect pixels. Multiple pit defect pixels and multiple scratch defect pixels connected together are identified as suspected defect blocks.
[0094] In some embodiments of this application, the sample surface image / target detection area can also be grayscale inverted, and a preset first threshold and a preset second threshold can be used to perform defect detection on the grayscale-inverted sample surface image / target detection area to obtain suspected defect blocks, where the preset first threshold is greater than the preset second threshold. Here, the "dark" features in the image are first converted into "bright" features by grayscale inversion, and then, based on the hysteresis thresholding method, the suspected defects on the image are extracted using the preset first threshold and the preset second threshold.
[0095] For example, the target detection area A is inverted in grayscale. Then, based on the hysteresis thresholding method, pixels in the target detection area A that are greater than threshold 1 are identified as seed points (strong edge pixels). Pixels that are less than threshold 1 and greater than threshold 2 (threshold 1 is greater than threshold 2) and whose adjacent pixels are seed points are identified as weak edge pixels. Suspected defect blocks are obtained based on the set of strong edge pixels and weak edge pixels.
[0096] Step 130: Statistically analyze the trend data of the area of suspected defective blocks in the sample surface image sequence, and select target light intensity parameters from the light intensities corresponding to each of the multiple sample surface images based on the trend data.
[0097] Among them, the trend data can characterize the changing trend of the area of suspected defect blocks in the sample surface image sequence. There are various ways to calculate it. For example, the area of suspected defect blocks in each sample surface image / target detection area can be statistically analyzed to obtain the trend data of the area of suspected defect blocks under different light intensities.
[0098] In some embodiments of this application, the trend data may include area trend data. This application may also partition each sample surface image / target detection area to obtain multiple sub-detection areas and their respective location information. Here, processing can be performed based on the same partitioning method. Therefore, each sample surface image / target detection area has the same distribution pattern. The location information of the sub-detection areas of different sample surface images / target detection areas is the same / corresponds to each other. The area of the suspected defect block in the sub-detection area can be determined. Then, the area trend data of the area of the suspected defect block in multiple sub-detection areas belonging to different target detection areas but having the same location information is statistically analyzed. The area trend data can be in units of sub-detection areas to characterize the trend of the suspected defect block at each position in the sample surface image / target detection area.
[0099] For example, see Figure 4 The target detection area 1 was divided into 24 sub-detection areas at different locations. Then, the areas of suspected defect blocks in the same sub-regions within target areas 1-14 were calculated, resulting in 24 area trend data points. These area trend data included the area of defect blocks corresponding to 14 light intensities. For example... Figure 5The trend curve 1 is shown as the trend data 1.
[0100] Then, based on the trend data (such as area trend data), the target light intensity parameter can be selected from multiple light intensities corresponding to each sample surface image / target detection area.
[0101] For example, when a metal sample plate has unknown defects and background textures, the area of suspected defective blocks can be trended under different light intensities. First, the range where the area gradually decreases with increasing light intensity can be identified. Then, based on the maximum and minimum area values within this range, the median area of the defective block can be determined. The light intensity corresponding to the sample surface image / target detection area to which the median value belongs can then be defined as the target light intensity parameter. For example... Figure 5 In the range of light intensity 2-9, the light intensity decreases, with a midpoint of 10. Therefore, the corresponding light intensity 6 is determined as the target light intensity parameter.
[0102] In some embodiments of this application, target light intensity parameters can also be selected from multiple light intensities corresponding to each sample surface image / target detection area based on area trend data.
[0103] Specifically, multiple candidate light intensity parameters can be obtained by finding the light intensity of the target detection area to which the sub-detection area that meets the preset first distribution conditions belongs from multiple area trend data.
[0104] The preset first distribution conditions can be flexibly handled according to actual needs to adapt to different application scenarios.
[0105] In some embodiments of this application, a corresponding preset first distribution condition can be determined based on the source of the sample metal plate. If the sample metal plate is a standard metal plate used as a testing standard or a qualified metal plate, it is considered to contain only known background textures but not defects under the current testing accuracy. The preset first distribution condition can be: the area of the suspected defect block is reduced to 0 for the first time. If the sample metal plate is any metal plate to be tested on the production line, and there are unknown defects and background textures, the preset first distribution condition can be: the area of the suspected defect block is reduced to half of the area of the target detection area for the first time.
[0106] In some embodiments of this application, when the sample metal plate is a metal plate to be inspected on the production line, multiple area trend data can also be analyzed. For example, the length of the decreasing interval of each area trend data can be calculated (e.g., Figure 5The light intensity range of 2-9 represents a decreasing interval (length 8). After filtering out certain decreasing interval lengths, it's important to note that suspected defect blocks in the sample metal plate simultaneously contain unknown defects and background textures. While background textures are insensitive to light intensity during imaging, defects (such as scratches and dents) are sensitive. This results in less variation in the background texture image across different sample surface images, a gentler decreasing trend, and a longer decreasing interval. Conversely, defect images show greater variation across different sample surface images, with a more dramatic decreasing trend. Therefore, there is a significant difference in the length of the decreasing intervals, which can be used to initially distinguish between defects and background textures within the suspected defect block. Specifically, the average length of all decreasing intervals can be calculated. The area trend data corresponding to each decreasing interval length less than this average can be determined. From this area trend data, the light intensity corresponding to key points within the decreasing interval can be identified as candidate light intensity parameters. Key points include the light intensity start point, the next point after the light intensity start point, the light intensity end point, the previous point after the light intensity end point, the light intensity midpoint, and the light intensity corresponding to the median area of the suspected defect block, etc.
[0107] Then, based on multiple candidate light intensity parameters, the target light intensity parameter can be selected. For example, the light intensity that appears most frequently among the candidate light intensity parameters can be determined as the target light intensity parameter.
[0108] In some embodiments of this application, the number of sub-detection regions with zero area of suspected defect blocks in the target detection region corresponding to each of the multiple candidate light intensity parameters can be counted to obtain quantity trend data. Finally, the candidate light intensity parameters that meet the preset second distribution conditions in the quantity trend data are determined as the target light intensity parameters.
[0109] The preset second distribution conditions can be flexibly handled according to actual needs to adapt to different application scenarios.
[0110] In some embodiments of this application, the preset second distribution condition may include the number of sub-detection regions with zero area of suspected defective blocks exceeding half of the total number of sub-detection regions for the first time.
[0111] In some embodiments of this application, a corresponding preset second distribution condition can also be determined based on the source of the sample metal plate. If the sample metal plate is a standard metal plate used as a detection standard, and the current detection accuracy is considered to include only known background textures but not defects, the preset second distribution condition can be: the number of sub-detection areas with zero area of suspected defect blocks is equal to the total number of sub-detection areas. If the sample metal plate is any metal plate to be detected on the production line, and there are unknown defects and background textures, the preset second distribution condition can be: the number of sub-detection areas with zero area of suspected defect blocks exceeds half of the total number of sub-detection areas for the first time.
[0112] Step 140: Calculate the defect detection parameters of the sample metal plate based on the grayscale information of the suspected defect blocks in the sample surface image corresponding to the target light intensity parameters.
[0113] Defect detection parameters can include parameters that characterize the distribution characteristics of suspected defects within an image when performing defect detection on a sample metal plate based on target light intensity parameters.
[0114] Defect detection parameters include the average gray value, standard deviation of gray value, total area, average area, elongation (major axis length / minor axis length, for scratch-type defects), and roundness (4π×area / perimeter², for pit-type defects).
[0115] For example, the total number of pixels in all suspected defect blocks can be counted to obtain the total area of the suspected defect blocks; based on the total area of the suspected defect blocks and the number of them in the sample surface image / target detection region, the average area of the suspected defect blocks can be calculated; another example is that the average grayscale value and standard deviation of all suspected defect blocks in the sample surface image / target detection region corresponding to the target light intensity parameter can be calculated. For example, if the light intensity 3 corresponding to target detection region 3 is the target light intensity parameter, the average grayscale value 1 and standard deviation 1 of all suspected defect blocks in target detection region 3 can be calculated.
[0116] For example, one can first distinguish between scratch defects and pit defects among suspected defect blocks, and then calculate defect detection parameters for all scratch defects and all pit defects. Specifically, the elongation and roundness of each suspected defect block can be calculated. Scratch defects have a more elongated geometry and a more significant elongation value, while pit defects have an elliptical or near-circular geometry and a more significant roundness value. The directional consistency of each suspected defect block can also be calculated (specifically, the standard deviation of the gradient direction histogram (the larger the value, the higher the directional consistency), the structural tensor consistency (the larger the value, the higher the directional consistency), or the Gabor energy standard deviation (the smaller the value, the higher the directional consistency)). Pits have poor directional consistency, while scratch defects have high directional consistency. Then, based on roundness and elongation, the type of suspected defect block can be initially distinguished. For suspected defect blocks that are difficult to distinguish (e.g., a suspected defect block whose roundness falls within the range of pit defects and whose elongation falls within the range of segmentation defects), the directional consistency can be calculated. If the directional consistency of the suspected defect block is high, it is determined to be a scratch defect.
[0117] Then, the mean and standard deviation of elongation can be calculated based on the elongation of all scratch defects, the mean and standard deviation of directional consistency can be calculated based on the directional consistency of all segmented defects, and the mean and standard deviation of roundness can be calculated based on the mean of roundness of all pit defects. These data are the defect detection parameters.
[0118] If the area of the suspected defect block in the sample surface image / target detection region corresponding to the target light intensity parameter is zero, the defect detection parameter here is recorded as zero.
[0119] In some embodiments of this application, a detection recipe set can be constructed to store the correspondence between the first attribute information, the target light intensity parameter, and the defect detection parameter. When it is necessary to inspect a metal plate to be tested on the production line, the target light intensity parameter and defect detection parameter corresponding to the attribute information of the metal plate to be tested can be found from the detection recipe set. For example, when it is necessary to perform defect detection on a metal plate to be tested that has first attribute information, the target light intensity parameter and defect detection parameter corresponding to the first attribute information can be found from the detection recipe set.
[0120] For example, the defect detection system can automatically identify the model of the metal mask to be inspected and read the corresponding detection formula from the database according to the model. The detection formula includes target light intensity parameters and defect detection parameters.
[0121] Step 150: Based on the target light intensity parameters and defect detection parameters, perform defect detection on the metal plate to be inspected that has the first attribute information.
[0122] Specifically, the control unit can be triggered to adjust the light source based on the target light intensity parameters and capture an image of the metal plate to be inspected illuminated by the light source. Defect detection is performed on the image to obtain at least one potential defect area. Gray-scale statistics of the potential defect area are calculated, and based on the gray-scale statistics and defect detection parameters, it is determined whether the potential defect area is the target defect area.
[0123] The defect detection methods for the images of the metal plate to be inspected and the sample surface images are the same. For example, the images of the metal plate to be inspected are preprocessed (such as first performing frequency domain band-stop filtering, then frequency domain high-pass filtering / Gabor filtering, or grayscale inversion), and then potential defect areas are determined by threshold segmentation (such as simple threshold segmentation, hysteresis thresholding based on double thresholds) or region segmentation based on geometric shape.
[0124] In order to improve the accuracy of defect detection, this application will combine defect detection parameters to verify potential defect areas, and the potential defect areas that pass the verification will be the target defect areas.
[0125] In some embodiments of this application, the sample metal plate is defect-free at the current detection accuracy, and the detected suspected defect blocks are actually background textures. Here, the defect detection parameters are used as parameters to characterize the background. If the parameters of the potential defect area are significantly different from the background parameters, the potential defect area is identified as the target defect area.
[0126] Specifically, the detection reliability of a potential defect area can be obtained by integrating grayscale statistics, maximum grayscale value, average grayscale value, and grayscale standard deviation parameters. The detection reliability characterizes the degree of certainty that a real defect exists in the potential defect area. If the detection reliability matches the preset reliability threshold, the potential defect area is determined to be the target defect area.
[0127] For example, for potential defect region 1, the detection reliability Score1 = (means + maxs - 2 * mean0) / std0, where means and maxs are the average and maximum gray values of potential defect region 1, and mean0 and std0 are the average and standard deviation gray values. If Score1 is within the preset reliability threshold range (e.g., 0-0.3), potential defect region 1 is determined to be the target defect region.
[0128] In some embodiments of this application, the defects in the sample metal plate are unknown, but by filtering out background textures using the aforementioned method, suspected defect blocks are identified as defects, and defect detection parameters are parameters characterizing defects. Here, it can be determined whether the parameters of a potential defect area are within the range determined based on the defect detection parameters; if so, it is identified as a target defect area.
[0129] In mass industrial production scenarios, the causes of metal surface defects are limited and traceable. This application can analyze the potential defect areas in the image of the metal plate to be inspected based on the characteristic data (defect detection parameters) of the defects in the sample metal plate, identify potential defects that match the defect characteristics in the sample metal plate as target defects, further optimize the detection results, and improve the detection accuracy.
[0130] As mentioned above, there are various defect detection parameters. Here, one or more parameters can be selected based on the needs of the scenario. If multiple parameters are selected, a weight can be set for each parameter.
[0131] For example, it can calculate the average grayscale value, maximum grayscale value, elongation data, roundness data, and orientation consistency data of the potential defect area, and obtain the grayscale average value parameter, grayscale standard deviation parameter, elongation mean parameter, roundness mean parameter, and orientation consistency mean parameter, as well as the preset threshold interval length or standard deviation parameter for each parameter. Then, it can determine the elongation parameter interval, roundness parameter interval, and orientation consistency parameter interval with the midpoint, start value, and end value of the interval using the elongation parameter, roundness parameter, and orientation consistency parameter, or determine the elongation parameter interval, roundness parameter interval, and orientation consistency parameter interval with the midpoint of the interval and the corresponding standard deviation parameter as the one-sided interval length using the corresponding standard deviation parameter.
[0132] Then, preliminary verification can be performed based on the grayscale average value, grayscale maximum value, grayscale average value parameter, and grayscale standard deviation parameter. For example, whether the sum of the grayscale average value and the grayscale maximum value is within the interval formed by the grayscale average value parameter and the grayscale standard deviation parameter. If it is, the preliminary verification is considered to have passed.
[0133] Then compare whether the data of the potential defect area is located in the corresponding interval to obtain the verification result. For example, if the roundness data does not match the roundness parameter interval, but the directional consistency data matches the directional consistency parameter interval, the potential defect area is determined to be a scratch defect area; if the roundness data matches the roundness parameter interval, but the directional consistency data does not match the directional consistency parameter interval, the potential defect area is determined to be a pit defect area.
[0134] This application eliminates the need for complex multimodal imaging. It only requires acquiring multiple sample surface images of a metal plate under different light intensities. Then, by creatively analyzing the defect change trends in the image sequence, the optimal light intensity is selected, and defect detection parameters are calculated. This allows for rapid batch inspection of the metal plates to be inspected on the production line based on the optimal light intensity and defect detection parameters, effectively improving the efficiency of industrial-grade defect detection while meeting accuracy requirements.
[0135] The following will use a metal surface as an example to further illustrate the defect detection method for the metal surface of this application. The metal mask in the embodiments of this application may include a finished metal mask, or a semi-finished product in the metal mask manufacturing process (such as a bare metal plate received from an upstream manufacturer, or a semi-finished metal mask before photoresist coating, after photoresist stripping, after cleaning, after photolithography, after etching, or after dicing). See also Figure 6 Methods for detecting defects on the surface of metal photomasks include:
[0136] Step 210: Obtain a sample surface image sequence of a qualified metal mask sample. The sample surface image sequence includes multiple sample surface images obtained by acquiring the surface of the metal mask sample under different light intensities. The qualified metal mask sample corresponds to the first attribute information.
[0137] For example, a qualified metal mask sample is placed at the detection station of a metal mask defect detection device. The device controls the light source to increase the light intensity according to a preset gradient, obtaining multiple images of the sample surface (such as...). Figure 2 The image includes the light intensity value corresponding to each sample surface image, and the corresponding object signal information of the qualified metal mask sample.
[0138] Step 220: Determine the location information of the target detection area in the sample surface image, and segment each sample surface image based on the location information to obtain multiple target detection areas.
[0139] For example, calculate the gray-level distribution histogram of each sample surface image and smooth it to obtain the histogram contour curve (e.g., ...). Figure 3 Find the m-th minimum value (m is a positive integer) in the histogram profile curve (e.g., Figure 2 The left and right edges of the sample surface image are dark areas with low grayscale values, while the grayscale value of the area in the middle where defects need to be detected is significantly lower than that on the sides. Therefore, peaks with lower grayscale values (representing dark areas) should be excluded from the histogram. Figure 3 You can find the third minimum value in the histogram profile curve.
[0140] Based on the grayscale values of local minima, thresholding, opening denoising, selection of the largest connected component, and hole filling can be performed on the sample surface image to obtain the location information of candidate detection regions. The intersection of the location information of candidate detection regions across all sample surfaces in the sequence yields the location information of the target detection region. Based on this location information, the target detection region is segmented from each sample surface image, resulting in multiple target detection regions and their corresponding light intensity values. This effectively eliminates regional boundary fluctuations caused by illumination changes and removes interference from non-target detection regions.
[0141] Step 230: Divide each target detection area into multiple sub-detection areas and their respective location information, determine the area of suspected defect blocks in the sub-detection areas, and statistically analyze the area trend data of suspected defect blocks in multiple sub-detection areas that belong to different target detection areas but have the same location information.
[0142] like Figure 4 The target detection area is divided into multiple sub-detection areas, all with the same area and segmentation method. Therefore, any sub-detection area within any target detection area has corresponding sub-detection areas within other target detection areas. Specifically, the positional relationship between multiple sub-detection areas can be determined using the location information of the sub-detection areas. Then, the changing trend of the area of suspected defective blocks in each sub-detection area with changes in light intensity is statistically analyzed to obtain area trend data. For example... Figure 7 The area trend curves of the three sub-detection regions are shown.
[0143] Defect detection can be carried out based on the hysteresis threshold method. Specifically, the grayscale of the target detection area can be reversed first, and then the high threshold (such as 30) and low threshold (such as 5) of the hysteresis threshold method can be used to detect defects in the reversed target detection area to obtain suspected defect blocks.
[0144] Step 240: Find the light intensity corresponding to the target detection area of the sub-detection area that meets the preset first distribution conditions from multiple area trend data, and obtain multiple candidate light intensity parameters.
[0145] For example, the light intensity value that is initially 0 in each area trend data is identified as a candidate light intensity parameter. Figure 7 Two candidate light intensity parameters can be obtained from three light intensity trend data: light intensity g and light intensity q.
[0146] Step 250: Count the number of sub-detection regions with zero area of suspected defect blocks in the target detection region corresponding to each of the multiple candidate light intensity parameters, obtain the quantity trend data, and determine the candidate light intensity parameters that meet the preset second distribution conditions in the quantity trend data as the target light intensity parameters.
[0147] Quantity trend data such as Figure 8 The shown quantity trend curve can be used to identify candidate light intensity parameters whose quantity first exceeds half of the total number of sub-detection regions as the target light intensity parameter (e.g., light_opt). Figure 8 (The marked points). Background noise has been sufficiently suppressed at most locations under the target light intensity parameters.
[0148] Step 260: Calculate the defect detection parameters of the sample metal plate based on the grayscale information of the suspected defect block in the sample surface image corresponding to the target light intensity parameters, and save the correspondence between the first attribute information, the target light intensity parameters and the defect detection parameters to the detection formula, and save the detection formula to the detection formula set.
[0149] For example, if the suspected defect blocks remaining under the target light intensity parameters are pseudo-defects generated by the background texture, the average grayscale value (mean0) and standard deviation (std0) of all suspected defect blocks can be calculated here. The {light_opt, mean0, std0} and their associated object model information are packaged and stored in the database as a detection recipe.
[0150] Step 270: Obtain the attribute information of the metal mask to be inspected, find the detection formula that matches the attribute information from the detection formula set, and perform defect detection on the metal mask to be inspected based on the target light intensity parameter in the detection formula to obtain the potential defect area.
[0151] For example, during batch inspection on a production line, a metal mask defect detection device can automatically search for a detection formula from the detection formula set based on the model information of the metal mask to be inspected. It then sets the light intensity of the light source to the target light intensity parameter `light_opt` in the detection formula and acquires an image of the metal mask. The image is then inverted in grayscale, and defect detection is performed based on the same high and low thresholds of the hysteresis thresholding method as before, yielding potential defect areas.
[0152] Step 280: Verify the potential defect area based on the defect detection parameters in the test formula to determine whether the potential defect area is a real defect area.
[0153] For example, calculate the mean gray value and the maximum gray value (maxs) of the potential defect area, and then calculate the score of the potential defect area by detecting the mean gray value (mean0) and the standard deviation (std0) of gray value in the formula: Scores = (means + maxs - 2 * mean0) / std0. If the score is within the preset threshold range (e.g., greater than 0.05), the potential defect area is determined to be a real defect area.
[0154] Since even tiny scratches and dents in metal masks can affect their use, and these scratches and dents are extremely similar in shape and grayscale characteristics to the inherent grain structure and rolling marks of the metal strip, this application uses multi-intensity imaging on qualified metal masks. Based on the defect characteristics under each intensity, imaging analysis and suspected defect trend analysis are performed. The optimal intensity is selected, and the grayscale characteristics of the pseudo-defects (i.e., suspected defects) formed by the background texture at the optimal intensity are calculated. Thus, during batch inspection on the production line, the grayscale characteristics of potential defects can be compared with those of the background texture. The grayscale variation of the defect block is greater and more uneven than that of the background texture block. By comparing the average and maximum grayscale values of the potential defects, it can be determined whether the potential defects are real defects. This method is simple, efficient, and significantly improves inspection efficiency.
[0155] This application also provides a computer device, such as... Figure 9 As shown, it illustrates a structural schematic diagram of a computer device involved in an embodiment of this application. This computer device can be a terminal or a server, etc. Specifically:
[0156] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 9 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0157] The processor 401 is the control center of the computer device, connecting various parts of the computer device through various interfaces and lines. It performs various functions and processes data by running or executing computer programs and / or modules stored in the memory 402, and by calling data stored in the memory 402. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and computer programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.
[0158] The memory 402 can be used to store computer programs and modules. The processor 401 executes various functional applications and data processing by running the computer programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0159] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0160] The computer device may also include an input unit 404, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0161] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402 to realize various functions, as follows:
[0162] The process involves acquiring the first attribute information and a sequence of sample surface images of a metal plate. These images include multiple surface images acquired under different light intensities. Defect detection is performed on the surface images to identify suspected defect blocks. The area of these suspected defect blocks is statistically analyzed within the sample surface image sequence, and a target light intensity parameter is selected from the light intensities corresponding to each of the multiple surface images based on this trend. Defect detection parameters for the metal plate are calculated based on the grayscale information of the suspected defect blocks in the surface images corresponding to the target light intensity parameters. Finally, defect detection is performed on the metal plate with the first attribute information based on the target light intensity parameters and the defect detection parameters.
[0163] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0164] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0165] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the defect detection methods for metal surfaces provided in embodiments of this application. For example, the computer program can execute the following steps:
[0166] The process involves acquiring the first attribute information and a sequence of sample surface images of a metal plate. These images include multiple surface images acquired under different light intensities. Defect detection is performed on the surface images to identify suspected defect blocks. The area of these suspected defect blocks is statistically analyzed within the sample surface image sequence, and a target light intensity parameter is selected from the light intensities corresponding to each of the multiple surface images based on this trend. Defect detection parameters for the metal plate are calculated based on the grayscale information of the suspected defect blocks in the surface images corresponding to the target light intensity parameters. Finally, defect detection is performed on the metal plate with the first attribute information based on the target light intensity parameters and the defect detection parameters.
[0167] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0168] Since the computer program stored in the computer-readable storage medium can execute the steps in any of the metal surface defect detection methods provided in the embodiments of this application, the beneficial effects that any of the metal surface defect detection methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0169] This application also provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the methods provided in various optional implementations of the above-described method for detecting defects on metal surfaces.
[0170] The above provides a detailed description of a method for detecting defects on a metal surface provided by the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and its core ideas. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for detecting defects on a metal surface, characterized in that, include: Acquire first attribute information of the sample metal plate and a sample surface image sequence, wherein the sample surface image sequence includes multiple sample surface images obtained by acquiring the sample metal plate surface under different light intensities; Defect detection was performed on the surface image of the sample to obtain suspected defect blocks; The variation trend data of the area of the suspected defect block in the image sequence of the sample surface is statistically analyzed, and the target light intensity parameter is selected from the light intensity corresponding to each of the multiple sample surface images based on the variation trend data. Based on the grayscale information of the suspected defect blocks in the sample surface image corresponding to the target light intensity parameters, the defect detection parameters of the sample metal plate are calculated. Based on the target light intensity parameters and the defect detection parameters, defect detection is performed on the metal plate to be inspected that has the first attribute information.
2. The method according to claim 1, characterized in that, The defect detection of the sample surface image to obtain suspected defect blocks includes: Determine the location information of the candidate detection regions for each of the multiple sample surface images; The location information of the target detection region is obtained by finding the intersection of the location information of multiple candidate detection regions. Based on the location information of the target detection area, the target detection area is segmented from the plurality of sample surface images respectively; Defect detection is performed on the target detection area to obtain suspected defect blocks.
3. The method according to claim 2, characterized in that, The process of statistically analyzing the trend data of the area of the suspected defective block in the sequence of sample surface images, and filtering target light intensity parameters from the light intensities corresponding to each of the multiple sample surface images based on the trend data, includes: Each target detection region is divided into multiple sub-detection regions and their respective location information; Determine the area of the suspected defect block in the sub-detection region; The area trend data of suspected defect blocks in multiple sub-detection regions that belong to different target detection regions but have the same location information is statistically analyzed. Based on the area trend data, target light intensity parameters are selected from multiple light intensities corresponding to each target detection area.
4. The method according to claim 3, characterized in that, The step of filtering target light intensity parameters from multiple light intensities corresponding to each target detection area based on the area trend data includes: From the multiple area trend data, find the light intensity corresponding to the target detection area to which the sub-detection area that meets the preset first distribution condition belongs, and obtain multiple candidate light intensity parameters; The number of sub-detection regions with zero area corresponding to each of the multiple candidate light intensity parameters in the target detection region is counted to obtain the quantity trend data. The candidate light intensity parameters that meet the preset second distribution conditions in the quantity trend data are determined as the target light intensity parameters.
5. The method according to claim 4, characterized in that, The preset first distribution condition includes: the area of the suspected defective block is reduced to 0 for the first time.
6. The method according to claim 4, characterized in that, The sample metal plate includes a metal plate to be inspected on the production line or a standard metal plate used as a detection standard. The preset second distribution condition includes: the number of sub-detection areas with zero area of the suspected defect block exceeds half of the total number of sub-detection areas for the first time.
7. The method according to claim 4, characterized in that, The sample metal plate includes a standard metal plate used as a detection standard, and the preset second distribution condition includes: the number of sub-detection regions with an area of zero for the suspected defect block is equal to the total number of sub-detection regions.
8. The method according to claim 2, characterized in that, Determining the location information of the candidate detection regions for each of the plurality of sample surface images includes: The gray-level histogram of the sample surface image is statistically analyzed, and the gray-level histogram is smoothed to obtain the histogram contour curve. Find the minimum point in the histogram contour curve that meets the preset third distribution condition; Threshold segmentation is performed on the sample surface image based on the minimum point to obtain the location information of the candidate detection region of the sample surface image.
9. The method according to claim 2, characterized in that, The defect detection of the target detection area to obtain suspected defect blocks includes: The target detection area is inverted in grayscale, and defects are detected in the inverted target detection area using a preset first threshold and a preset second threshold to obtain suspected defect blocks, wherein the preset first threshold is greater than the preset second threshold.
10. The method according to claim 1, characterized in that, The defect detection of the metal plate to be inspected, which has the first attribute information, based on the target light intensity parameters and the defect detection parameters includes: The trigger control unit adjusts the light source based on the target light intensity parameters and captures an image of the metal plate under inspection illuminated by the light source; Defect detection is performed on the image to obtain at least one potential defect region; Calculate the grayscale statistics of the potential defect area, and determine whether the potential defect area is a target defect area based on the grayscale statistics and the defect detection parameters.
11. The method according to claim 10, characterized in that, The grayscale statistics include the average grayscale value and the maximum grayscale value. The calculation of defect detection parameters for the sample metal plate based on the grayscale data of suspected defect blocks in the sample surface image corresponding to the target light intensity parameter includes: Calculate the average grayscale value and standard deviation of all suspected defect blocks in the sample surface image corresponding to the target light intensity parameter; The step of determining whether the potential defect region is a real defect region based on the grayscale statistical data and the defect detection parameters includes: By integrating the grayscale statistics, the maximum grayscale value, the average grayscale value parameter, and the grayscale standard deviation parameter, the detection reliability of the potential defect region is obtained, and the detection reliability characterizes the confidence that a real defect exists in the potential defect region; If the detection reliability matches the preset reliability threshold, the potential defect region is determined to be the target defect region.
12. The method according to claim 10, characterized in that, Before the trigger control unit adjusts the light source based on the target light intensity parameter and captures an image of the metal plate under inspection illuminated by the light source, the method further includes: Save the correspondence between the first attribute information, the target light intensity parameter, and the defect detection parameter to obtain the detection formula set; Obtain the first attribute information of the metal plate to be inspected, and search for the target light intensity parameter and defect detection parameter corresponding to the first attribute information from the detection formula set.
13. A defect detection device for metal surfaces, characterized in that, include: The sequence module is used to acquire the first attribute information of the sample metal plate and the sample surface image sequence, wherein the sample surface image sequence includes multiple sample surface images obtained by acquiring the sample metal plate surface under different light intensities. The first detection module is used to perform defect detection on the sample surface image to obtain suspected defect blocks; The trend module is used to statistically analyze the changing trend data of the area of the suspected defect block in the image sequence of the sample surface, and to filter the target light intensity parameter from the light intensity corresponding to each of the multiple sample surface images based on the changing trend data. The parameter module is used to calculate the defect detection parameters of the sample metal plate based on the grayscale information of the suspected defect blocks in the sample surface image corresponding to the target light intensity parameters. The second detection module is used to perform defect detection on the metal plate to be inspected, which has the first attribute information, based on the target light intensity parameters and the defect detection parameters.
Citation Information
Patent Citations
Product appearance defect detection system and method based on image semantics
CN120088232A
Preformed dish semi-finished product defect identification method and system with AI algorithm
CN120953190A