A method for extracting surface defect features of a sheet material

CN122199562BActive Publication Date: 2026-09-11ZHEJIANG CHIXIAO AI INSPECTION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610677569.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-18
Publication Date
2026-09-11
Estimated Expiration
2046-05-18

AI Technical Summary

Technical Problem

[0004]本发明旨在至少在一定程度上解决现有技术中的技术问题之一,通过组装缺陷识别空间,在缺陷识别空间内安装光源以及线阵相机,然后在不同的光源条件下通过线阵相机拍摄片状材料的表面图像,对表面图像进行图像预处理,得到预处理图像,再对预处理图像中的像素灰度进行特征分析,提取预处理图像中像素灰度的分布特征,同时对预处理图像中的像素灰度进行特征分析,提取预处理图像中像素灰度的色差特征,然后对表面特征进行深度学习,得到表面特征的特征标准,最后基于特征标准以及片状材料的表面特征识别片状材料的表面缺陷类型,以解决现有的片状材料表面缺陷识别技术还存在需要采用多模态的检测方法对材料进行检测以及需要较多的缺陷样本,导致对缺陷识别的成本增加并降低材料的生产效率的问题

Benefits of technology

[0015]本发明的有益效果:本发明通过组装缺陷识别空间,在缺陷识别空间内安装光源以及线阵相机,然后在不同的光源条件下通过线阵相机拍摄片状材料的表面图像,对表面图像进行图像预处理,得到预处理图像,再对预处理图像中的像素灰度进行特征分析,提取预处理图像中像素灰度的分布特征,同时对预处理图像中的像素灰度进行特征分析,提取预处理图像中像素灰度的色差特征,优势在于,本发明提取的分布特征以及色差特征能够有效通过单一的图像识别方式完成对微弱划痕以及污渍的检测,提高了片状材料表面缺陷识别的效率并降低了缺陷识别的成本;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122199562B_ABST
    Figure CN122199562B_ABST
Patent Text Reader

Abstract

The application discloses a kind of surface defect feature extraction methods of sheet material, it is related to sheet material surface defect identification technical field, including the following steps: assembling defect identification space, install light source and linear array camera in defect identification space, by changing light source and control linear array camera to shoot the surface image of sheet material;Surface image is preprocessed, and preprocessed image is obtained;The pixel gray in preprocessed image is analyzed, and the surface feature of pixel gray in preprocessed image is extracted;Surface feature is learned deeply, and the feature standard of surface feature is obtained;Surface defect type of sheet material is identified based on feature standard and the surface feature of sheet material;The application is used to solve the problems that the existing sheet material surface defect identification technology still needs to use multi-modal detection method to detect material and needs more defect samples, which leads to the increase of defect identification cost and the reduction of material production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of surface defect identification technology for sheet materials, specifically a method for extracting surface defect features of sheet materials. Background Technology

[0002] Sheet material surface defect identification technology refers to the use of various automated and non-contact technical means to efficiently and accurately discover and assess minute defects on the surface of industrial sheets. This technology integrates advanced achievements from multiple fields such as optics, sensors, image processing, and artificial intelligence, and is a key link in realizing automated quality control in smart factories.

[0003] Existing surface defect identification technologies for sheet materials typically employ multimodal detection methods. This is because current image recognition methods have low accuracy in identifying subtle scratches, while point cloud data of the material surface can effectively identify surface depressions caused by subtle scratches but cannot identify stains on the material surface. Therefore, multiple detection methods need to be combined to complete the identification of sheet materials. However, multimodal detection methods undoubtedly increase detection costs and efficiency, further impacting material production efficiency. Furthermore, existing surface defect identification technologies for sheet materials require a large number of defect samples for learning, while the number of defect samples is scarce in normal production. If defects are artificially created... A large number of defect samples will increase the cost of defect identification. For example, in the patent application with publication number CN113592024A, a "training method and identification method and system for surface defect identification model of cold-rolled copper strip" is disclosed. This scheme requires a large number of surface defect datasets for learning. The number of defect samples generated in the normal production process is insufficient to support the deep learning of the scheme. On the other hand, artificially creating too many defect samples will increase the cost. Existing sheet material surface defect identification technology also has the problem of needing to use multimodal detection methods to detect materials and needing a large number of defect samples, which leads to increased cost of defect identification and reduced material production efficiency. Summary of the Invention

[0004] This invention aims to at least partially solve one of the technical problems in the prior art. It involves assembling a defect identification space, installing a light source and a line scan camera within the space, and then capturing surface images of sheet materials under different light conditions using the line scan camera. The surface images are then preprocessed to obtain preprocessed images. Feature analysis is performed on the pixel grayscale values ​​in the preprocessed images to extract their distribution characteristics and color difference features. Deep learning is then applied to the surface features to obtain feature standards. Finally, based on these feature standards and the surface features of the sheet material, the surface defect types are identified. This addresses the problem that existing sheet material surface defect identification technologies require multimodal detection methods and a large number of defect samples, leading to increased costs and reduced production efficiency.

[0005] To achieve the above objectives, this application provides a method for extracting surface defect features of sheet-like materials, comprising the following steps: Assemble a defect identification space, install a light source and a line scan camera within the defect identification space, set up a left light source and a right light source, and capture surface images of the sheet material by changing the light source and controlling the line scan camera. The surface image is preprocessed to obtain a preprocessed image; Feature analysis is performed on the pixel grayscale values ​​in the preprocessed image to extract surface features of pixel grayscale values. The pixel grayscale values ​​of all pixels are recorded in a grayscale distribution analysis map. A linear regression model is used to perform linear regression on the grayscale distribution analysis map to obtain the slope of the regression line, which is named the grayscale distribution parameter. This grayscale distribution parameter is the distribution feature. The absolute value of the difference between the grayscale values ​​of each row of pixels in the preprocessed image obtained from the left and right light sources is calculated and marked as the heterogeneous light grayscale difference. The maximum value of the heterogeneous light grayscale difference in each row is extracted and marked as the maximum heterogeneous light grayscale difference. All the maximum heterogeneous light grayscale differences constitute the color difference feature. The surface features include both distribution features and color difference features. Deep learning is used to obtain the feature criteria of surface features; Identify surface defect types in sheet materials based on feature standards and surface characteristics.

[0006] Further, assembling a defect identification space, installing a light source and a line scan camera within the defect identification space, and capturing surface images of the sheet material by changing the light source and controlling the line scan camera includes the following sub-steps: Assemble the defect identification space, and install a light source and a line scan camera within the defect identification space; Surface images of sheet materials were captured using a line scan camera under different light source conditions.

[0007] Further, assembling the defect identification space and installing a light source and a line scan camera within the defect identification space includes the following sub-steps: The defect identification space is an opaque square space with four sides: a left side, a right side, a front side, and a rear side, as well as a top surface. A strip light source is installed on the left and right sides respectively, and a line scan camera is installed on the top side. The strip light source illuminates the shooting area of ​​the line scan camera, and it is necessary to ensure that the incident angle of the strip light source in the shooting area is a preset angle.

[0008] Furthermore, capturing surface images of sheet-like materials using a line scan camera under different light source conditions includes the following sub-steps: The strip light source installed on the left side is named the left light source, and the strip light source installed on the right side is named the right light source. When the sheet material enters the shooting area, turn on the left light source and turn off the right light source. Move the sheet material and continuously photograph it using the line scan camera until the sheet material leaves the shooting area. Label the captured line scan images as PL according to the order in which they were captured. n , where n is a non-zero natural number and n is the index of PL; The sheet material is moved back to its position before entering the shooting area. When the sheet material re-enters the shooting area, the right light source is turned on and the left light source is turned off. The sheet material is moved and continuously photographed using a line scan camera until it leaves the shooting area. The captured line scan images are labeled as PR according to the order in which they were captured. n The PL n and PR n This refers to the surface image.

[0009] Further, image preprocessing is performed on the surface image to obtain a preprocessed image, including the following sub-steps: The image preprocessing includes contrast enhancement and image grayscale conversion; For PL n and PR n Perform contrast enhancement and image grayscale conversion, and then process the PL... n and PR n They are respectively labeled as PTL n and PTR n The PTL n and PTR n This refers to the preprocessed image.

[0010] Furthermore, feature analysis is performed on the pixel grayscale values ​​in the preprocessed image to extract the surface features of the pixel grayscale values, including the following sub-steps: Feature analysis is performed on the pixel grayscale values ​​in the preprocessed image to extract the distribution features of pixel grayscale values ​​in the preprocessed image; Feature analysis is performed on the pixel grayscale values ​​in the preprocessed image to extract the color difference features of the pixel grayscale values.

[0011] Furthermore, feature analysis is performed on the pixel grayscale values ​​in the preprocessed image to extract the distribution features of pixel grayscale values, including the following sub-steps: PTL n and PTR n The pixel grayscale value of the pixel located in the m-th row is labeled as PTL. n (m) and PTR n (m), where m is a non-zero natural number and m is a PTL. n and PTR n The serial number; Statistics of all PTLs n (m) and PTR n (m), PTL in ascending order n (m) and PTR n (m) Sort and number the data, and label it as GS h , where h is a non-zero natural number and h is the index of GS; With h as the X-axis, GS h Establish a Cartesian coordinate system for the Y-axis, named the grayscale distribution analysis chart, and set the GS... h Enter the grayscale distribution analysis chart according to h.

[0012] Furthermore, feature analysis is performed on the pixel grayscale values ​​in the preprocessed image to extract the color difference features of the pixel grayscale values, including the following sub-steps: Calculate |PTL| for any values ​​of n and m. n (m)-PTR n (m)|, and name the calculation result as heterogeneous grayscale difference; Calculate all PTLs n (m) and PTR n Find the maximum value of the abnormal grayscale difference (m) and name it the maximum grayscale difference of abnormal light.

[0013] Furthermore, deep learning is performed on the surface features to obtain the feature criteria for the surface features, including the following sub-steps: The first number of normal material samples were manually selected, and the distribution characteristics and color difference characteristics of the normal material samples were extracted and named as normal distribution characteristics and normal color difference characteristics, respectively. An anomalous material sample is artificially manufactured, and the defect in the anomalous material sample must be invisible to the naked eye. The distribution characteristics and color difference characteristics of the anomalous material sample are extracted and named as distribution anomalous characteristics and color difference anomalous characteristics, respectively. The range of normal distribution characteristics is statistically analyzed and named the normal distribution standard. The maximum value among the normal color difference characteristics is found and named the normal color difference standard. The value that differs the least from the distribution anomaly feature in the normal distribution standard is marked as Q1, and the distribution anomaly feature is marked as Q2. The average value of Q1 and Q2 is calculated to obtain the distribution reference standard. Calculate the average value of the normal color difference standard and the abnormal color difference characteristics, and name it the color difference reference standard. The distribution reference standard and the color difference reference standard are the characteristic standards.

[0014] Furthermore, identifying the surface defect types of sheet materials based on feature criteria and surface characteristics includes the following sub-steps: The sheet-like material to be identified is named the real-time identification material. The surface features of the real-time identification material are extracted and named the real-time features. The distribution features and color difference features in the real-time features are named the distribution real-time features and the color difference real-time features, respectively. Determine whether the real-time distribution characteristics are less than the distribution reference standard. If yes, output a normal distribution signal; otherwise, output an abnormal distribution signal. If the output signal is normally distributed, then the material is marked as defect-free in real time. If the output distribution is abnormal, then determine whether the real-time color difference characteristic is greater than or equal to the color difference reference standard. If so, output the color difference abnormal signal; otherwise, output the color difference normal signal. If the output color difference is abnormal, it indicates that the material has scratch-like defects in real time; if the output color difference is normal, it indicates that the material has stain-like defects in real time.

[0015] The beneficial effects of this invention are as follows: This invention assembles a defect identification space, installs a light source and a line scan camera within the defect identification space, and then captures surface images of sheet materials under different light source conditions using the line scan camera. The surface images are preprocessed to obtain preprocessed images. Then, feature analysis is performed on the pixel grayscale values ​​in the preprocessed images to extract the distribution features of the pixel grayscale values ​​in the preprocessed images. At the same time, feature analysis is performed on the pixel grayscale values ​​in the preprocessed images to extract the color difference features of the pixel grayscale values ​​in the preprocessed images. The advantage is that the distribution features and color difference features extracted by this invention can effectively complete the detection of weak scratches and stains through a single image recognition method, improving the efficiency of surface defect identification of sheet materials and reducing the cost of defect identification. This invention uses deep learning to obtain feature standards for surface features. Finally, based on the feature standards and the surface features of sheet materials, the surface defect types of sheet materials are identified. The advantage is that only one defect sample needs to be artificially created to combine with the analysis of many normal samples to obtain the feature standards of the surface features of sheet materials, which improves the effectiveness of surface defect identification of sheet materials and reduces the cost of defect identification. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the steps of the method of the present invention; Figure 2 This is a cross-sectional view showing the positional relationship between the bar light source and the linear array camera of the present invention; Figure 3 This is a schematic diagram of PL1 of the present invention; Figure 4 This is a schematic diagram of PR1 of the present invention; Figure 5 This is a schematic diagram of the grayscale distribution analysis diagram of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Example 1, please refer to Figure 1 As shown, this application provides a method for extracting surface defect features of sheet-like materials, including the following steps: Step S1: Assemble the defect identification space, install a light source and a line scan camera within the defect identification space, and capture surface images of the sheet material by changing the light source and controlling the line scan camera; Step S1 includes the following sub-steps: Step S101: Assemble the defect identification space and install a light source and a line scan camera within the defect identification space; Step S101 includes the following sub-steps: Step S1011: The defect identification space is an opaque square space with four sides: the left side, the right side, the front side, and the rear side, as well as a top surface. Please see Figure 2 As shown, in step S1012, strip light sources are installed on the left and right sides respectively, and a line scan camera is installed on the top side. The strip light sources illuminate the shooting area of ​​the line scan camera, and it is necessary to ensure that the incident angle of the strip light sources in the shooting area is a preset angle. In practice, the bar light source illuminates only the shooting area. The line scan camera is mounted at the geometric center of the top surface, ensuring that the distance between the two bar light sources and the shooting area is the same. The preset angle is set by the installer, usually not exceeding 45°. This is to create a faint shadow area between the light and the recessed area of ​​the scratch. In this embodiment, the preset angle is set to 30°. The lower the preset angle, the more obvious the shadow area. However, the actual installation needs to be combined with the actual assembly line conveyor belt. In this embodiment, the lowest possible installation angle is 30°. Figure 2 A cross-sectional view illustrating the positional relationship between the bar light source and the line scan camera.

[0019] Step S102: Take surface images of the sheet material using a line scan camera under different light source conditions; Step S102 includes the following sub-steps: Step S1021: Name the strip light source installed on the left side as the left light source and the strip light source installed on the right side as the right light source; Step S1022: When the sheet material enters the shooting area, turn on the left light source and turn off the right light source. Move the sheet material and continuously photograph it using the line scan camera until the sheet material leaves the shooting area. Label the captured line scan images as PL according to the order in which they were captured. n , where n is a non-zero natural number and n is the index of PL; Please see Figures 3 to 4 As shown, in step S1023, the sheet material is moved back to its position before entering the shooting area. When the sheet material re-enters the shooting area, the right light source is turned on, the left light source is turned off, the sheet material is moved, and the sheet material is continuously photographed by the line scan camera until the sheet material leaves the shooting area. The captured line scan images are labeled as PR according to the order in which they were captured. n PL n and PR n That is, a surface image; In practice, alternating illumination from left and right light sources can improve the recognizability of depressions on the surface of sheet materials. However, this method is only applicable to sheet materials; if the material surface itself has depressions, misjudgments are likely to occur. When n is the same, PL n and PR n Images representing the same area captured under different lighting conditions, such as PL1 and PR1. Figure 3 and Figure 4 As shown, Figure 3 and Figure 4 Images taken from the same area under different lighting conditions will produce different PL (Photographic Image) results due to the different angles of incidence and distances between the light and the sheet material when illuminated by the left and right light sources. n With PR nThere are minute color value differences between them, which are difficult to distinguish with the naked eye. Figure 3 and Figure 4 All images are preprocessed images, therefore they can be faintly observed. Figure 3 and Figure 4 There are extremely slight color differences between them, which is normal.

[0020] Step S2 involves preprocessing the surface image to obtain a preprocessed image; Step S2 includes the following sub-steps: Step S201, image preprocessing includes contrast enhancement and image grayscale conversion; Step S202, for PL n and PR n Perform contrast enhancement and image grayscale conversion, and then process the PL... n and PR n They are respectively labeled as PTL n and PTR n PTL n and PTR n This refers to the preprocessed image; In practice Figure 3 and Figure 4 In fact, these are pre-processed images after image preprocessing, namely PTL1 and PTR1. Contrast enhancement can enhance the color value differences in the image, making color value deviations easier to observe, while grayscale processing is for the convenience of computer analysis.

[0021] Step S3 involves performing feature analysis on the pixel grayscale values ​​in the preprocessed image to extract the surface features of the pixel grayscale values. Step S3 includes the following sub-steps: Step S301: Perform feature analysis on the pixel grayscale values ​​in the preprocessed image to extract the distribution features of pixel grayscale values ​​in the preprocessed image; Step S301 includes the following sub-steps: Step S3011, PTL n and PTR n The pixel grayscale value of the pixel located in the m-th row is labeled as PTL. n (m) and PTR n (m), where m is a non-zero natural number and m is a PTL. n and PTR n The serial number; Step S3012, count all PTLs n (m) and PTR n (m), PTL in ascending order n (m) and PTR n (m) Sort and number the data, and label it as GSh , where h is a non-zero natural number and h is the index of GS; Please see Figure 5 As shown, in step S3013, with h as the X-axis, GS h Establish a Cartesian coordinate system for the Y-axis, named the grayscale distribution analysis chart, and set the GS... h Enter the grayscale distribution analysis chart according to h; Step S3014: Perform linear regression on the grayscale distribution analysis map using a regression model to obtain the slope of the regression line, which is named the grayscale distribution parameter. The grayscale distribution parameter is the distribution characteristic. In practice, for a sheet-like material, the PTL values ​​in all its preprocessed images are statistically analyzed. n (m) and PTR n (m), then sort and number them to obtain GS h Due to the large amount of data, a detailed list is not provided in this embodiment. Only a rough illustration is given using a grayscale distribution analysis diagram, as shown below. Figure 5 As shown, the grayscale distribution parameter obtained by linear regression is 0.0000089. The grayscale distribution parameter reveals the distribution of grayscale values ​​on the surface of the sheet material between 0 and 255. If the surface of the sheet material has stains or scratches, it will definitely deviate from the normal grayscale distribution parameter, thus obtaining the distribution characteristics.

[0022] Step S302: Perform feature analysis on the pixel grayscale in the preprocessed image and extract the color difference features of the pixel grayscale in the preprocessed image; Step S302 includes the following sub-steps: Step S3021: For any values ​​of n and m, calculate |PTL n (m)-PTR n (m)|, and name the calculation result as heterogeneous grayscale difference; Step S3022, calculate all PTLs n (m) and PTR n Find the maximum value of the abnormal grayscale difference of (m) and name it as the maximum grayscale difference of abnormal light. The maximum grayscale difference of abnormal light is the color difference feature. In specific implementation, the grayscale difference of different light sources is the grayscale difference produced when the same pixel is illuminated by different light sources. For example, PTL1(1) is 86 and PTR1(1) is 89. The grayscale difference of different light sources is calculated to be 3. Similarly, the grayscale difference of different light sources of all pixels is calculated, and the maximum value is found to be 6. This means that the grayscale difference caused by illumination is 6. Due to the different directions of illumination, obvious shadow changes will appear on both sides of the recessed area. The grayscale difference of different light sources caused by this will be much greater than 6. Therefore, the maximum grayscale difference of different light sources is used as the color difference feature.

[0023] Step S4 involves performing deep learning on the surface features to obtain the feature criteria for the surface features; Step S4 includes the following sub-steps: Step S401: The first number of normal material samples are manually selected, and the distribution characteristics and color difference characteristics of the normal material samples are extracted and named as normal distribution characteristics and normal color difference characteristics, respectively. Step S402: An abnormal material sample is artificially manufactured. The abnormal material sample must meet the condition that the defects in it are not visible to the naked eye. The distribution characteristics and color difference characteristics of the abnormal material sample are extracted and named as distribution abnormal characteristics and color difference abnormal characteristics, respectively. In specific implementation, the first quantity is set only to ensure sufficient data samples. In this embodiment, the first quantity is set to 100, that is, 100 defect-free normal material samples are manually selected, and then the normal distribution features and normal color difference features are extracted. Due to the large amount of data, the normal distribution features and normal color difference features are not listed in detail in this embodiment. At the same time, since there are not many defective sheet materials in the actual production process, and if a large number of defective samples are manufactured manually, it will increase the cost. Therefore, in this embodiment, only one abnormal material sample needs to be manufactured manually to save costs. The defects in the manufactured abnormal material sample are scratches that cannot be directly observed by the naked eye and the smallest stains that will affect the qualification of the sheet material. This is because defects that cannot be observed by the naked eye must be very small and belong to the abnormal material sample that is closest to the normal material sample. If the sheet material has more obvious defects, the difference between its surface features and the normal material sample must be greater than the difference between the abnormal material sample and the normal material sample. The extracted abnormal distribution features and abnormal color difference features are 0.0000104 and 17, respectively.

[0024] Step S403: Statistically determine the range of normal distribution characteristics and name it the normal distribution standard; find the maximum value among the normal color difference characteristics and name it the normal color difference standard. Step S404: Mark the value with the smallest difference from the distribution anomaly feature in the normal distribution standard as Q1, and mark the distribution anomaly feature as Q2. Calculate the average of Q1 and Q2 to obtain the distribution reference standard. Step S405: Calculate the average value of the normal color difference standard and the abnormal color difference characteristics, and name it as the color difference reference standard. The distribution reference standard and the color difference reference standard are the characteristic standards. In practice, the normal distribution standard is obtained by statistical analysis of the normal distribution characteristics as [0.0000088, 0.0000095]. At the same time, the normal color difference standard is found to be 8, which means that the distribution characteristics of gray values ​​in normal material samples should be within [0.0000088, 0.0000095]. In addition, the maximum difference in gray values ​​caused by lighting in different normal material samples is 8. Since the abnormal distribution characteristic Q2 is 0.0000104, Q1 is marked as 0.0000095. The distribution reference standard is calculated to be 0.00000995. At the same time, the color difference reference standard is calculated to be (17+8) / 2=12.5. The average value is calculated because there is a certain redundancy between normal and abnormal surface characteristics. The analyzed samples can only include most cases, but cannot include all cases. Therefore, the average value is calculated to prevent misjudgment caused by random events.

[0025] Step S5: Identify the surface defect type of the sheet material based on feature criteria and surface features of the sheet material; Step S5 includes the following sub-steps: Step S501: Name the sheet material to be identified as the real-time identification material, extract the surface features of the real-time identification material and name them as real-time features, and name the distribution features and color difference features in the real-time features as distribution real-time features and color difference real-time features, respectively. Step S502: Determine whether the real-time distribution characteristics are less than the distribution reference standard. If yes, output a normal distribution signal; otherwise, output an abnormal distribution signal. Step S503: If the output signal is normally distributed, mark the material as defect-free in real time. Step S504: If the output distribution is abnormal, determine whether the real-time color difference feature is greater than or equal to the color difference reference standard. If so, output the color difference abnormal signal; otherwise, output the color difference normal signal. Step S505: If the output color difference abnormal signal is used, mark the material as having scratch-like defects in real time; if the output color difference normal signal is used, mark the material as having stain-like defects in real time. In specific implementation, for example, in a defect identification process, the real-time distribution feature and the real-time color difference feature are extracted as 0.0000101 and 15, respectively. By comparison, it is found that the real-time distribution feature is greater than the distribution reference standard, and a distribution anomaly signal is output. Since a distribution anomaly signal is output, it is then determined whether the real-time color difference feature is greater than or equal to the color difference reference standard. By comparison, it is found that the real-time color difference feature is greater than the color difference reference standard, and therefore a color difference anomaly signal is output. Since a color difference anomaly signal is output, the material is marked as having scratch-like defects in real-time identification. This is because under the illumination of left and right lights, there is an area with obvious color difference changes on the surface of the sheet material. This area must have a depression, i.e., a scratch-like defect. Otherwise, the surface of the sheet material would not show obvious color difference changes, because the stain would not show obvious shadow changes under the alternating illumination of left and right lights.

[0026] Example 2: This application provides an electronic device, which may include a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The memory stores computer-readable instructions, and the processor can call these instructions. When the processor executes a computer-readable instruction, it performs steps such as those in a method for extracting surface defect features of sheet materials to achieve the following functions: assembling a defect recognition space; installing a light source and a line scan camera within the defect recognition space; capturing surface images of the sheet material by changing the light source and controlling the line scan camera; performing image preprocessing on the surface image to obtain a preprocessed image; performing feature analysis on the pixel grayscale values ​​in the preprocessed image to extract surface features of the pixel grayscale values; performing deep learning on the surface features to obtain feature standards for the surface features; and identifying the surface defect type of the sheet material based on the feature standards and the surface features of the sheet material.

[0027] Furthermore, when the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0028] Example 3: This application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a method for extracting surface defect features of sheet materials provided by the above methods. The method includes: assembling a defect recognition space; installing a light source and a line scan camera in the defect recognition space; capturing surface images of the sheet material by changing the light source and controlling the line scan camera; performing image preprocessing on the surface images to obtain preprocessed images; performing feature analysis on the pixel grayscale values ​​in the preprocessed images to extract surface features of the pixel grayscale values ​​in the preprocessed images; performing deep learning on the surface features to obtain feature standards for the surface features; and identifying the surface defect type of the sheet material based on the feature standards and the surface features of the sheet material.

[0029] Example 4: This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it performs the steps of the above-described method for extracting surface defect features of sheet materials to achieve the following functions: assembling a defect recognition space; installing a light source and a line scan camera within the defect recognition space; capturing surface images of the sheet material by changing the light source and controlling the line scan camera; performing image preprocessing on the surface images to obtain preprocessed images; performing feature analysis on the pixel grayscale values ​​in the preprocessed images to extract surface features of the pixel grayscale values ​​in the preprocessed images; performing deep learning on the surface features to obtain feature standards for the surface features; and identifying the surface defect type of the sheet material based on the feature standards and the surface features of the sheet material.

[0030] Based on the above description of the embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the above technical solutions, in essence or in terms of their contribution to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or certain parts of the embodiments.

[0031] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces. The indirect coupling or communication connection between systems, modules, and units may be electrical, mechanical, or other forms.

[0032] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for extracting surface defect features of sheet-like materials, characterized in that, The steps include the following: Assemble a defect identification space, install a light source and a line scan camera within the defect identification space, set up a left light source and a right light source, and capture surface images of the sheet material by changing the light source and controlling the line scan camera. The surface image is preprocessed to obtain a preprocessed image; Feature analysis is performed on the pixel grayscale values ​​in the preprocessed image to extract the surface features of the pixel grayscale values ​​in the preprocessed image; The pixel grayscale values ​​of all pixels are recorded in a grayscale distribution analysis map. A linear regression is performed on the grayscale distribution analysis map using a regression model to obtain the slope of the regression line, which is named the grayscale distribution parameter. The grayscale distribution parameter is the distribution feature. The absolute value of the difference between the grayscale values ​​of each row of pixels in the preprocessed image obtained from the left light source and the right light source is calculated and marked as the heterogeneous light grayscale difference. The maximum value of the heterogeneous light grayscale difference in each row is extracted and marked as the heterogeneous light maximum grayscale difference. All heterogeneous light maximum grayscale differences constitute the color difference feature. Surface features include distribution features and color difference features; Analyze the surface features to obtain the characteristic criteria for the surface features; Identify surface defect types of sheet materials based on feature standards and surface characteristics of sheet materials; Analyzing surface features to obtain their characteristic criteria includes the following sub-steps: The first number of normal material samples were manually selected, and the distribution characteristics and color difference characteristics of the normal material samples were extracted and named as normal distribution characteristics and normal color difference characteristics, respectively. An anomalous material sample is artificially manufactured, and the defect in the anomalous material sample must be invisible to the naked eye. The distribution characteristics and color difference characteristics of the anomalous material sample are extracted and named as distribution anomalous characteristics and color difference anomalous characteristics, respectively. The range of normal distribution characteristics is statistically analyzed and named the normal distribution standard. The maximum value among the normal color difference characteristics is found and named the normal color difference standard. The value that differs the least from the distribution anomaly feature in the normal distribution standard is marked as Q1, and the distribution anomaly feature is marked as Q2. The average value of Q1 and Q2 is calculated to obtain the distribution reference standard. Calculate the average value of the normal color difference standard and the abnormal color difference characteristics, and name it the color difference reference standard. The distribution reference standard and the color difference reference standard are the characteristic standards.

2. The method for extracting surface defect features of sheet materials according to claim 1, characterized in that, Assemble a defect identification space, install a light source and a line scan camera within the defect identification space, and capture surface images of the sheet material by changing the light source and controlling the line scan camera, including the following sub-steps: Assemble the defect identification space, and install a light source and a line scan camera within the defect identification space; Surface images of sheet materials were captured using a line scan camera under different light source conditions.

3. The method for extracting surface defect features of sheet materials according to claim 2, characterized in that, Assemble the defect identification space, and install the light source and line scan camera within the defect identification space, including the following sub-steps: The defect identification space is an opaque square space with four sides: a left side, a right side, a front side, and a rear side, as well as a top surface. A strip light source is installed on the left and right sides respectively, and a line scan camera is installed on the top side. The strip light source illuminates the shooting area of ​​the line scan camera, and it is necessary to ensure that the incident angle of the strip light source in the shooting area is a preset angle.

4. The method for extracting surface defect features of sheet materials according to claim 3, characterized in that, Imaging the surface of sheet-like materials using a line scan camera under different lighting conditions includes the following sub-steps: The strip light source installed on the left side is named the left light source, and the strip light source installed on the right side is named the right light source. When the sheet material enters the shooting area, turn on the left light source and turn off the right light source. Move the sheet material and continuously photograph it using the line scan camera until the sheet material leaves the shooting area. Label the captured line scan images as PL according to the order in which they were captured. n , where n is a non-zero natural number and n is the index of PL; The sheet material is moved back to its position before entering the shooting area. When the sheet material re-enters the shooting area, the right light source is turned on and the left light source is turned off. The sheet material is moved and continuously photographed using a line scan camera until it leaves the shooting area. The captured line scan images are labeled as PR according to the order in which they were captured. n The PL n and PR n This refers to the surface image.

5. The method for extracting surface defect features of sheet materials according to claim 4, characterized in that, Preprocessing the surface image to obtain a preprocessed image includes the following sub-steps: The image preprocessing includes contrast enhancement and image grayscale conversion; For PL n and PR n Perform contrast enhancement and image grayscale conversion, and then process the PL... n and PR n They are respectively labeled as PTL n and PTR n The PTL n and PTR n This refers to the preprocessed image.

6. The method for extracting surface defect features of sheet materials according to claim 5, characterized in that, Feature analysis of pixel grayscale values ​​in the preprocessed image, and extraction of surface features of pixel grayscale values ​​in the preprocessed image, includes the following sub-steps: Feature analysis is performed on the pixel grayscale values ​​in the preprocessed image to extract the distribution features of pixel grayscale values ​​in the preprocessed image; Feature analysis is performed on the pixel grayscale values ​​in the preprocessed image to extract the color difference features of the pixel grayscale values.

7. The method for extracting surface defect features of sheet materials according to claim 6, characterized in that, Feature analysis of pixel grayscale values ​​in the preprocessed image, extracting the distribution features of pixel grayscale values, includes the following sub-steps: PTL n and PTR n The pixel grayscale value of the pixel located in the m-th row is labeled as PTL. n (m) and PTR n (m), where m is a non-zero natural number and m is a PTL. n and PTR n The serial number; Statistics of all PTLs n (m) and PTR n (m), PTL in ascending order n (m) and PTR n (m) Sort and number the data, and label it as GS h , where h is a non-zero natural number and h is the index of GS; With h as the X-axis, GS h Establish a Cartesian coordinate system for the Y-axis, named the grayscale distribution analysis chart, and set the GS... h Enter the grayscale distribution analysis chart according to h.

8. The method for extracting surface defect features of sheet materials according to claim 7, characterized in that, The process of performing feature analysis on the pixel grayscale values ​​in the preprocessed image and extracting the color difference features of the pixel grayscale values ​​includes the following sub-steps: Calculate |PTL| for any values ​​of n and m. n (m)-PTR n (m)|, and name the calculation result as heterogeneous grayscale difference; Calculate all PTLs n (m) and PTR n Find the maximum value of the abnormal grayscale difference (m) and name it the maximum grayscale difference of abnormal light.

9. The method for extracting surface defect features of sheet materials according to claim 8, characterized in that, Identifying surface defect types in sheet materials based on feature criteria and surface characteristics includes the following sub-steps: The sheet-like material to be identified is named the real-time identification material. The surface features of the real-time identification material are extracted and named the real-time features. The distribution features and color difference features in the real-time features are named the distribution real-time features and the color difference real-time features, respectively. Determine whether the real-time distribution characteristics are less than the distribution reference standard. If yes, output a normal distribution signal; otherwise, output an abnormal distribution signal. If the output signal is normally distributed, then the material is marked as defect-free in real time. If the output distribution is abnormal, then determine whether the real-time color difference characteristic is greater than or equal to the color difference reference standard. If so, output the color difference abnormal signal; otherwise, output the color difference normal signal. If the output color difference is abnormal, it indicates that the material has scratch-like defects in real time; if the output color difference is normal, it indicates that the material has stain-like defects in real time.

Citation Information

Patent Citations

  • Cold-rolled copper strip surface defect recognition model training method, cold-rolled copper strip surface defect recognition method and system

    CN113592024A

  • Plate strip steel surface defect detection method and device based on machine vision

    CN112697803A

  • Method for detecting surface defects of injection product

    CN114627049A