A method and system for detecting film surface defects
By using different directions and multi-frequency light sources in the film surface defect detection system, combining feature extraction and machine learning models, dynamically adjusting the light source parameters, the problem of high false alarm rate in the existing technology is solved, and efficient and stable film surface defect detection is achieved.
Patent Information
- Application Number
- CN202411755903.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-03
AI Technical Summary
Existing film surface defect detection technology is prone to false alarm problems when the background color or texture is complex, specific light conditions or interference is present, resulting in frequent adjustment and debugging of the detection system.
Using two sets of light sources in different directions (vertical and oblique light sources) and multi-frequency light sources (visible and infrared light sources), through feature extraction and machine learning models, the accuracy of the detection system to identify real defects on the film surface, and dynamically adjust the light source intensity and angle to improve detection accuracy.
It significantly reduces the false alarm rate caused by pseudo-texture, reduces the system false alarm problems caused by lighting conditions or background texture complexity, avoids frequent shutdowns and debugging and calibration, and achieves efficient, stable and highly adaptable operational effects of film surface defect detection.
Smart Images

Figure CN119224001B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of thin film defect detection, and in particular to a thin film surface defect detection method and system. Background Art
[0002] Film surface defect detection is a technical method used to identify and evaluate surface defects of film materials. Film materials are often used in electronics, optics, packaging and other fields, and their surface quality directly affects their performance and service life. The purpose of defect detection is to timely detect and locate scratches, bubbles, particles, wrinkles and other defects on the film surface during the production process to ensure product quality and stability.
[0003] Thin film surface defect detection usually uses a variety of technical means such as optical imaging, laser detection, and ultrasound to identify different types of defects by analyzing reflected, scattered, or transmitted light. Automated defect detection systems use image processing and machine learning algorithms to quickly classify and evaluate thin film surface defects, thereby greatly improving detection efficiency and reducing labor costs. This type of detection technology plays an important role in improving the manufacturing accuracy of thin film materials and the product qualification rate.
[0004] The prior art has the following deficiencies:
[0005] During the film production process, due to the complex background color or texture, especially under specific lighting conditions or interference (such as mechanical oil and dust), the film may reflect non-real textures. These pseudo-textures may be mistaken for defects by the detection system, resulting in a sudden increase in the false alarm rate and interference with normal detection. And when the number of false alarms of pseudo-textures increases, the detection system usually needs to be frequently adjusted and debugged to optimize the detection algorithm and reduce the interference. However, such adjustments are not once and for all, and may cause the detection system to repeatedly have false alarm problems in different production batches and different lighting conditions, forcing the production line to stop for calibration. Summary of the invention
[0006] The purpose of the present invention is to provide a thin film surface defect detection method and system to solve the shortcomings of the background technology.
[0007] In order to achieve the above object, the present invention provides the following technical solution: a method for detecting surface defects of a thin film, comprising the following steps:
[0008] S1: Add two sets of light sources in different directions to the detection system, including a set of vertical light sources and a set of oblique light sources; use a camera to take images of the film surface from two different directions to obtain reflection intensity data under the vertical light source and the oblique light source;
[0009] S2: Introduce a multi-frequency light source into the detection system, including visible light and infrared light sources; collect film images under visible light and infrared light respectively, and obtain the response difference data of each pixel under different frequency light sources;
[0010] S3: For each pixel point, feature extraction is performed on the reflection intensity data of light sources in different directions and the response difference data under illumination of different frequencies, and emission intensity fluctuation features in the reflection intensity data and light source response deviation features in the response difference data are extracted respectively;
[0011] S4: Comprehensively analyze the extracted emission intensity fluctuation characteristics and light source response deviation characteristics, and evaluate the accuracy of the detection system in identifying real defects on the film surface based on the analysis results;
[0012] S5: classify the accuracy of the detection system in identifying the real defects on the film surface into different levels, namely, high accuracy detection level, medium accuracy detection level and low accuracy detection level, and perform corresponding processing;
[0013] S6: For the medium accuracy detection level, the accuracy of the detection system in identifying real defects on the film surface within a fixed time period is predicted, and the intensity and angle of the light source in the detection system are dynamically adjusted according to the prediction results to improve the detection accuracy.
[0014] Preferably, in S3, the emission intensity fluctuation characteristics of each pixel are analyzed to generate an emission intensity fluctuation index, and the emission intensity fluctuation index is obtained by:
[0015] For each pixel, the emission intensity data collected under different light sources are and , where t represents the time series; calculate the intensity difference of light sources in different directions to obtain the emission intensity fluctuation signal , the expression is: ; Use discrete Fourier transform DFT to transform the time domain signal Convert to the frequency domain to analyze its frequency components. The expression of discrete Fourier transform is: ;in: is the Fourier transform result of the fluctuation signal at frequency f, N is the total number of sampling points, is the kernel function of discrete Fourier transform, j is an imaginary unit, representing phase information, f is the frequency, and the amplitude of each frequency component is calculated to obtain the spectrum intensity of the signal. The calculation expression is: ;in: and They are the real and imaginary parts of the spectrum at frequency f, respectively. The spectrum is divided into energy, and the high-frequency energy is extracted as the emission intensity fluctuation index. The calculation expression is: ;in: It is the lowest frequency that defines the high frequency part, taking the middle frequency of the signal , Is the highest sampling frequency, for high frequency energy Normalized, the emission intensity fluctuation index is obtained, the expression is: ; Wherein, HK is the emission intensity fluctuation index.
[0016] Preferably, in S3, after analyzing the light source response deviation characteristics of each pixel point, a light source response deviation index is generated, and the method for obtaining the light source response deviation index is:
[0017] In the detection system, the response intensity of each pixel under different light sources is recorded, and the response intensity under visible light is recorded as , the response intensity under infrared light is recorded as ; Manhattan distance is used to calculate the response difference of the pixel under different light sources. The expression is: ;in: Indicates the response deviation of the pixel under visible light and infrared light, that is, the light source response deviation. Perform normalization processing to generate the light source response deviation index. The normalization formula is: ; Where: GH is the light source response deviation index, and are the minimum and maximum values of the response deviation of all pixels in the image, respectively.
[0018] Preferably, in S4, the extracted emission intensity fluctuation characteristics and light source response deviation characteristics are comprehensively analyzed, and the accuracy of the detection system in identifying real defects on the film surface is evaluated based on the analysis results, specifically:
[0019] The emission intensity fluctuation index and the light source response deviation index are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as the input of the machine learning model. The machine learning model uses each group of comprehensive feature vectors to predict the accuracy value label of the detection system in identifying the real defects on the film surface as the prediction target, and takes minimizing the sum of the prediction errors of the accuracy value labels of all detection systems in identifying the real defects on the film surface as the training target. The machine learning model is trained until the sum of the prediction errors converges and the model training is stopped. The accuracy value of the detection system in identifying the real defects on the film surface is determined according to the model output results, wherein the machine learning model is a polynomial regression model.
[0020] Preferably, in S5, the accuracy of the detection system in identifying real defects on the film surface is divided into different levels, namely, a high accuracy detection level, a medium accuracy detection level and a low accuracy detection level, specifically:
[0021] The acquired accuracy value of the detection system for identifying the real defects on the film surface is compared with the gradient standard threshold, the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the accuracy value of the detection system for identifying the real defects on the film surface is compared with the first standard threshold and the second standard threshold respectively;
[0022] If the accuracy value of the detection system in identifying the real defects on the film surface is greater than the second standard threshold value, it means that the detection system has high accuracy in identifying the real defects on the film surface, and a high-accuracy recognition signal is generated at this time, and the accuracy of the detection system in identifying the real defects on the film surface is classified as a high-accuracy detection level;
[0023] If the accuracy value of the detection system in identifying the real defects on the film surface is greater than or equal to the first standard threshold and less than or equal to the second standard threshold, it means that the accuracy of the detection system in identifying the real defects on the film surface is average, and a medium-accuracy recognition signal is generated at this time, and the accuracy of the detection system in identifying the real defects on the film surface is classified as a medium-accuracy detection level;
[0024] If the accuracy value of the detection system in identifying real defects on the film surface is less than the first standard threshold, it means that the accuracy of the detection system in identifying real defects on the film surface is low. At this time, a low-accuracy identification signal is generated, and the accuracy of the detection system in identifying real defects on the film surface is classified as a low-accuracy detection level.
[0025] Preferably, in S6, for the medium accuracy detection level, the accuracy of the detection system in identifying real defects on the film surface within a fixed time period is predicted, and the intensity and angle of the light source in the detection system are dynamically adjusted according to the prediction results to improve the detection accuracy, specifically:
[0026] Record the accuracy value of the detection system over a fixed period of time , forming a time series ,in Represents the accuracy value at time t, and uses the exponential smoothing method to predict the accuracy value of the next time period. The prediction formula is: ;in: is the prediction accuracy value at the next time point, α is the smoothing factor, and its value is between [0,1];
[0027] If the prediction accuracy value If the prediction accuracy value is greater than or equal to the reference threshold value of the prediction accuracy value under normal conditions set according to historical data, it means that the detection system is stable and maintains the current light source setting; if the prediction accuracy value is greater than or equal to the reference threshold value of the prediction accuracy value under normal conditions set according to historical data, it means that the detection system is stable and maintains the current light source setting; If the value is smaller than the reference threshold of the predicted accuracy value under normal conditions set according to historical data, it means that the detection accuracy of the detection system has decreased and the light source needs to be adjusted.
[0028] Preferably, when the prediction accuracy value is less than the prediction accuracy value reference threshold, the intensity I of the light source is increased to increase the contrast of the real defect, and the intensity adjustment formula is: ;in: is the adjusted light intensity, is the current light intensity, Represents the gap between the current prediction accuracy and the target accuracy value, is the target accuracy value, β is the intensity adjustment coefficient; when the prediction accuracy value is less than the prediction accuracy reference threshold, adjust the light source angle θ to improve the illumination distribution. By changing the incident angle, the defect visibility effect is improved. The angle adjustment formula is: ;in: is the adjusted light source angle, is the current light source angle, and γ is the angle adjustment coefficient.
[0029] The present invention also provides a thin film surface defect detection system, including a light source configuration module, a multi-frequency light source module, a feature extraction module, an accuracy evaluation module, a detection level division module and a dynamic adjustment module;
[0030] Light source configuration module: Add two groups of light sources in different directions to the detection system, including a group of vertical light sources and a group of oblique light sources; use a camera to take images of the film surface from two different directions to obtain reflection intensity data under the vertical light source and the oblique light source;
[0031] Multi-frequency light source module: introduces multi-frequency light sources into the detection system, including visible light and infrared light sources; collects film images under visible light and infrared light respectively, and obtains the response difference data of each pixel under different frequency light sources;
[0032] Feature extraction module: For each pixel point, feature extraction is performed on the reflection intensity data of light sources in different directions and the response difference data under different frequency illumination, and the emission intensity fluctuation characteristics in the reflection intensity data and the light source response deviation characteristics in the response difference data are extracted respectively;
[0033] Accuracy evaluation module: Comprehensively analyze the extracted emission intensity fluctuation characteristics and light source response deviation characteristics, and evaluate the accuracy of the detection system in identifying real defects on the film surface based on the analysis results;
[0034] Detection level classification module: divides the accuracy of the detection system in identifying real defects on the film surface into different levels, namely high accuracy detection level, medium accuracy detection level and low accuracy detection level, and performs corresponding processing;
[0035] Dynamic adjustment module: For medium accuracy detection level, the detection system's accuracy in identifying real defects on the film surface within a fixed time period is predicted, and the intensity and angle of the light source in the detection system are dynamically adjusted based on the prediction results to improve detection accuracy.
[0036] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0037] 1. The present invention introduces two sets of light sources in different directions (vertical light source and oblique light source) and multi-frequency light sources (visible light and infrared light) to enable the detection system to obtain the reflection and response difference data of the film surface under different light source conditions and fully capture the defect characteristics. Through feature extraction technology, the emission intensity fluctuation characteristics and light source response deviation characteristics are extracted, and these characteristics are input into the polynomial regression model to generate accuracy values to evaluate the system's ability to identify real defects in the film, and the detection level is divided into three levels: high, medium, and low according to the accuracy value, which is convenient for adaptive adjustment for different detection accuracy levels.
[0038] 2. The present invention can identify possible performance fluctuations of the detection system at a medium accuracy level by dynamically predicting the detection accuracy value, thereby automatically adjusting the intensity and angle of the light source, optimizing the light distribution, and improving the detection contrast of real defects. This method greatly reduces the false alarm rate caused by pseudo-textures, reduces the system false alarm problem caused by lighting conditions or background texture complexity, avoids frequent shutdowns for debugging and calibration, and achieves efficient, stable and adaptable operation results for thin film surface defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0040] Figure 1 The present invention is a flow chart of the method.
[0041] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] Example 1, please refer to Figure 1 and Figure 2 As shown, a thin film surface defect detection method described in this embodiment includes the following steps:
[0044] S1: Add two sets of light sources in different directions to the detection system, including a set of vertical light sources and a set of oblique light sources; use a camera to take images of the film surface from two different directions to obtain reflection intensity data under the vertical light source and the oblique light source;
[0045] S2: Introduce a multi-frequency light source into the detection system, including visible light and infrared light sources; collect film images under visible light and infrared light respectively, and obtain the response difference data of each pixel under different frequency light sources;
[0046] S3: For each pixel point, feature extraction is performed on the reflection intensity data of light sources in different directions and the response difference data under illumination of different frequencies, and emission intensity fluctuation features in the reflection intensity data and light source response deviation features in the response difference data are extracted respectively;
[0047] S4: Comprehensively analyze the extracted emission intensity fluctuation characteristics and light source response deviation characteristics, and evaluate the accuracy of the detection system in identifying real defects on the film surface based on the analysis results;
[0048] S5: classify the accuracy of the detection system in identifying the real defects on the film surface into different levels, namely, high accuracy detection level, medium accuracy detection level and low accuracy detection level, and perform corresponding processing;
[0049] S6: For the medium accuracy detection level, the accuracy of the detection system in identifying real defects on the film surface within a fixed time period is predicted, and the intensity and angle of the light source in the detection system are dynamically adjusted according to the prediction results to improve the detection accuracy.
[0050] In S1, two groups of light sources in different directions are added to the detection system, including a group of vertical light sources and a group of oblique light sources; a camera is used to take images of the film surface from two different directions to obtain reflection intensity data under the vertical light source and the oblique light source, specifically:
[0051] A set of light sources is set above the detection surface, perpendicular to the film surface. The illumination angle of this set of light sources is close to the normal direction, so that the light is incident perpendicular to the film surface. The advantage of a vertical light source is that it can evenly illuminate the surface, making small scratches, dents and other real defects more obvious in the reflected light. In addition to the vertical light source, another set of oblique light sources is added, and its angle is set to a certain inclination angle (for example, 30° to 45°) with the film surface. This oblique illumination angle makes the subtle height difference of the surface or the slightly convex area of the surface more prominent in the reflected light, which helps to reveal subtle changes or defects on the film surface.
[0052] One or more cameras are used in the detection system to capture images of the film surface from different angles. One camera faces the film surface directly (in line with the direction of the vertical light source), while the other camera captures images from the side, or the same camera position captures images under vertical and oblique light sources in sequence. When shooting, the vertical light source and the oblique light source are turned on respectively, and the reflection intensity data of different pixels on the film surface under the two lighting conditions are recorded by the camera. These data can reflect the brightness changes and texture details of the film under different light sources.
[0053] In the acquired image, the reflection intensity of each pixel is analyzed and compared. The image under the vertical light source usually reflects the shallower defects or normal texture features on the surface, while the image under the oblique light source can better highlight the convexity or concave surface. By extracting the difference in reflection intensity of each pixel under the two light sources, the more obvious defective area can be identified. Pseudo-textures (such as mechanical oil and dust) usually produce unstable reflection intensity under the change of light source. Therefore, if the reflection intensity of a certain area under the vertical light source and the oblique light source varies greatly, it may be a pseudo-defect. Real defects (such as scratches or bubbles) often show relatively stable reflection characteristics under different angles of light, and the change in reflection intensity is relatively small.
[0054] In the present invention, by adding two sets of light sources in different directions and collecting reflection intensity data at different angles, the detection system can more accurately distinguish between real defects and false textures on the film surface. The vertical light source highlights the surface details, and the oblique light source enhances the micro-convex defects. The combination of the two enables the detection system to still work effectively under complex light and background conditions, thereby significantly improving the accuracy and reliability of detection.
[0055] S2: Introduce a multi-frequency light source into the detection system, including visible light and infrared light sources; collect film images under visible light and infrared light respectively, and obtain the response difference data of each pixel under different frequency light sources.
[0056] Visible light sources (such as white, blue or green light) are mainly used to highlight intuitive features on the film surface, such as common defects such as scratches and bubbles. These defects are clearly visible under visible light, and their reflection characteristics can show the fine structure of the defects. Infrared light has a longer wavelength, stronger penetration, and is not easily disturbed by surface dust, oil, etc. It is particularly suitable for detecting stress and strain defects inside or deep in the material. Infrared light has a weak response to non-real defects (such as dust or oil), so it helps to eliminate the influence of these pseudo-textures and make real defects more prominent.
[0057] Configure visible light and infrared light sources in the detection system, and use the same camera or multispectral camera to capture images of the film under visible light and infrared light from the same angle to generate multi-frequency image data. For each pixel, record its brightness value or reflection intensity data under visible light and infrared light respectively. In this way, the response data of each pixel under two different light frequencies form a difference data pair, which can be used for comparative analysis. Ensure that the visible light and infrared light images are accurately aligned, and eliminate displacement errors caused by camera angles, parallax, etc. through image calibration methods (such as geometric transformation calibration) to ensure accurate pixel-level data.
[0058] In the present invention, by introducing multi-frequency light sources such as visible light and infrared light, the detection system can collect the response differences of each pixel on the film surface at different frequencies, thereby distinguishing pseudo textures from real defects. Multi-frequency light source response analysis can improve the accuracy and stability of the detection system under complex backgrounds, help reduce the false alarm rate, and achieve high-precision identification of film surface defects.
[0059] S3: For each pixel point, feature extraction is performed on the reflection intensity data of light sources in different directions and the response difference data under different frequency illumination, and the emission intensity fluctuation features in the reflection intensity data and the light source response deviation features in the response difference data are extracted respectively.
[0060] For each pixel, collect the reflection intensity data of the pixel under different directional light sources (such as vertical light sources and oblique light sources). For example, set the intensity under the vertical light source to and the intensity under oblique light source is The reflection intensity data under different directions of light sources are compared, and the fluctuation amplitude (i.e., intensity difference) is calculated as the fluctuation feature. The following formula can be used to calculate the fluctuation feature: ; This fluctuation feature quantifies the impact of changes in the light source direction on the reflection intensity of the pixel.
[0061] For real defects (such as scratches and dents), the fluctuation characteristics are usually stable, that is, the intensity difference under different light sources is small. However, pseudo textures (such as oil stains or dust) may show obvious intensity fluctuations under different light sources, and the fluctuation characteristic value is large. By observing the fluctuation characteristics, we can preliminarily judge whether the pixel point may be a pseudo defect.
[0062] For each pixel, the response intensity data under different frequency illumination (such as visible light and infrared light) is collected. The response intensity under visible light is assumed to be And the response intensity under infrared light is . Calculate the difference in response of each pixel under visible light and infrared light. This difference is the light source response deviation characteristic. The response deviation can be calculated using the following formula: The response deviation feature quantifies the difference in reflection intensity of a pixel under different frequencies of light. For pseudo-textures (such as dust or oil), the response deviation feature tends to be larger because these surface interferers react significantly differently to visible and infrared light; while real defects (such as bubbles or scratches) show smaller intensity differences under different frequencies of light, and the response deviation feature value is more stable. By setting a threshold, a larger response deviation usually indicates that the pixel is a pseudo-defect, while a smaller deviation may be a real defect.
[0063] After analyzing the emission intensity fluctuation characteristics of each pixel, an emission intensity fluctuation index is generated. The method for obtaining the emission intensity fluctuation index is as follows:
[0064] For each pixel, the emission intensity data collected under different light sources are and , where t represents the time series or sampling point number; calculate the intensity difference of light sources in different directions to obtain the emission intensity fluctuation signal , the expression is: ; Use discrete Fourier transform DFT to transform the time domain signal Convert to the frequency domain to analyze its frequency components. The expression of discrete Fourier transform is: ;in: is the Fourier transform result (spectrum value) of the fluctuation signal at frequency f, N is the total number of sampling points, is the kernel function of discrete Fourier transform, j is an imaginary unit representing phase information, and f is the frequency in Hertz (Hz).
[0065] Calculate the amplitude of each frequency component to obtain the spectral strength of the signal, the amplitude The calculation expression is: ;in: and are the real and imaginary parts of the spectrum at frequency f. Represents the energy distribution at each frequency and can be used to distinguish high-frequency and low-frequency components.
[0066] For pseudo textures, the fluctuation signal often contains more high-frequency components, while the spectrum of real defects is usually concentrated in the low-frequency band. Therefore, the spectrum can be divided into energy and the high-frequency energy can be extracted as the emission intensity fluctuation index. The calculation expression is: ;in: It is the lowest frequency that defines the high frequency part, usually the middle frequency of the signal. , is the highest sampling frequency. High-frequency energy reflects the energy distribution of the pixel in the high-frequency part. Usually, the high-frequency energy of pseudo-texture is larger. For the convenience of comparison, the high-frequency energy Normalized, the emission intensity fluctuation index is obtained, the expression is: ; Wherein, HK is the emission intensity fluctuation index.
[0067] The larger the emission intensity fluctuation index, the higher the proportion of high-frequency components in the signal, which usually means that the fluctuation detected by the pixel is more likely to come from pseudo-texture (such as surface pollution such as oil and dust) or environmental interference. Pseudo-texture will produce significant reflection fluctuations due to changes in illumination under light sources from different directions, and these high-frequency changes can easily be mistaken by the system as defects. Therefore, when the fluctuation index is large, the detection system has low accuracy in identifying real defects on the film surface, and the false alarm rate may increase. A high fluctuation index will increase the system's sensitivity to pseudo-defects, making it impossible to effectively distinguish between real defects and interference signals, affecting the reliability of the detection results.
[0068] On the contrary, the smaller the emission intensity fluctuation index, the higher the proportion of low-frequency components in the signal, which usually means that the detected fluctuations are relatively stable and may be real defects on the surface of the film. Real defects (such as scratches and bubbles) exhibit relatively stable reflection characteristics under different light source directions. Therefore, the fluctuation index dominated by low-frequency signals usually reflects that the pixel point has a high correlation with the real defect. When the fluctuation index is small, the detection system has higher accuracy in identifying real defects and lower false alarm rate, thereby improving the reliability and accuracy of the overall detection. A low fluctuation index helps the system focus on stable defect characteristics, thereby improving the effectiveness of identifying real defects on the surface of the film.
[0069] After analyzing the light source response deviation characteristics of each pixel point, a light source response deviation index is generated. The method for obtaining the light source response deviation index is as follows:
[0070] In the detection system, the response intensity of each pixel under different light sources is recorded, and the response intensity under visible light is recorded as , the response intensity under infrared light is recorded as ; Manhattan distance is used to calculate the response difference of the pixel under different light sources. The expression is: ;in: Indicates the response deviation of the pixel under visible light and infrared light, that is, the light source response deviation. In order to facilitate the comparison between different pixels, the light source response deviation is usually Normalization is performed to generate the light source response deviation index so that its range is between [0,1]. The normalization formula is: ; Where: GH is the light source response deviation index, which reflects the degree of response deviation of the pixel. and They are the minimum and maximum values of the response deviation of all pixels in the image, which are used for normalization.
[0071] After calculating the light source response deviation index of all pixels, a response deviation map can be generated, mapping the deviation index value to a grayscale or heat map to intuitively display the response differences in different areas. Areas with large response deviations may be caused by pseudo textures, while areas with small response deviations may be real defects.
[0072] The larger the light source response deviation index is, the greater the difference in the response of the pixel under different light sources (such as visible light and infrared light). This large response deviation usually indicates that the area may be interfered by surface contaminants (such as dust, oil) or other environmental factors. These pseudo-textures will show obvious brightness changes under different light sources, resulting in an increase in the light source response deviation index. Therefore, when the deviation index is large, the detection system is likely to misjudge the interference area as a defect, reducing the accuracy of identifying real defects and resulting in a higher false alarm rate. A high deviation index usually indicates that the pseudo-texture has a strong impact, and the system has low detection reliability in this case.
[0073] On the other hand, the smaller the light source response deviation index is, the more consistent the response of the pixel under different light sources is. This low deviation usually corresponds to real defects on the film surface, because real defects (such as scratches and bubbles) are relatively stable under light sources of different frequencies and have small response differences. When the deviation index is small, the detection system can more accurately distinguish between real defects and pseudo-texture interference, thereby improving recognition accuracy. A low deviation index indicates that the light source response consistency in this area is high, and the system is more reliable in identifying real defects in this case.
[0074] S4: Comprehensively analyze the extracted emission intensity fluctuation characteristics and light source response deviation characteristics, and evaluate the accuracy of the detection system in identifying real defects on the film surface based on the analysis results.
[0075] The emission intensity fluctuation index and the light source response deviation index are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as the input of the machine learning model. The machine learning model uses each group of comprehensive feature vectors to predict the accuracy value label of the detection system in identifying the real defects on the film surface as the prediction target, and takes minimizing the sum of the prediction errors of the accuracy value labels of all detection systems in identifying the real defects on the film surface as the training target. The machine learning model is trained until the sum of the prediction errors converges and the model training is stopped. The accuracy value of the detection system in identifying the real defects on the film surface is determined according to the model output results, wherein the machine learning model is a polynomial regression model.
[0076] The method for obtaining the accuracy value of the detection system in identifying the real defects on the film surface is as follows: from the comprehensive feature vector training data of the trained machine learning model, the corresponding function expression is obtained: ; In the formula, is the output function of the model, HK is the emission intensity fluctuation index, GH is the light source response deviation index, The accuracy value of the detection system in identifying real defects on the film surface.
[0077] S5: The accuracy of the detection system in identifying the real defects on the film surface is divided into different levels, namely, a high accuracy detection level, a medium accuracy detection level and a low accuracy detection level, and corresponding processing is performed.
[0078] The acquired accuracy value of the detection system for identifying the real defects on the film surface is compared with the gradient standard threshold, the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the accuracy value of the detection system for identifying the real defects on the film surface is compared with the first standard threshold and the second standard threshold respectively;
[0079] If the accuracy value of the detection system in identifying the real defects on the film surface is greater than the second standard threshold, it means that the detection system has high accuracy in identifying the real defects on the film surface. At this time, a high-accuracy recognition signal is generated, and the accuracy of the detection system in identifying the real defects on the film surface is classified as a high-accuracy detection level. The detection result can be directly passed to the quality control link as the final detection result without further re-inspection. At this time, the production process can be accelerated and the intervention of manual inspection can be reduced to improve production efficiency. And the system performance can be continuously monitored to ensure that the high accuracy remains stable.
[0080] If the accuracy value of the detection system in identifying the real defects on the film surface is greater than or equal to the first standard threshold and less than or equal to the second standard threshold, it means that the detection system's accuracy in identifying the real defects on the film surface is average. At this time, a medium-accuracy recognition signal is generated, and the accuracy of the detection system in identifying the real defects on the film surface is classified as a medium-accuracy detection level, and automatic re-inspection is performed, that is, the detection algorithm is run again or the same area is re-inspected using different detection parameters to eliminate false alarms. If production conditions permit, a small amount of manual review can also be introduced to manually mark and confirm suspected defective areas, especially for defects in key areas, to ensure that the detection accuracy meets the requirements.
[0081] If the accuracy value of the detection system in identifying the real defects on the film surface is less than the first standard threshold, it means that the detection system has low accuracy in identifying the real defects on the film surface. At this time, a low-accuracy recognition signal is generated, and the accuracy of the detection system in identifying the real defects on the film surface is classified as a low-accuracy detection level. Pause the detection process, adjust the angle and intensity of the light source, or switch the light source type (such as adjusting the combination of visible light and infrared light) to improve the detection contrast. At the same time, recalibrate the system parameters, adjust the detection threshold or optimize the algorithm parameters. If the interference source is obvious, the environmental interference should be eliminated (such as cleaning the surface, avoiding vibration, etc.). After completing the above adjustments, re-run the test to improve the recognition accuracy.
[0082] S6: For the medium accuracy detection level, the accuracy of the detection system in identifying real defects on the film surface within a fixed time period is predicted, and the intensity and angle of the light source in the detection system are dynamically adjusted according to the prediction results to improve the detection accuracy.
[0083] Record the accuracy of the detection system at a fixed time period (such as every minute or every hour) , forming a time series ,in Represents the accuracy value at time t. Use the exponential smoothing method to predict the accuracy value of the next time period. The prediction formula is: ;in: is the prediction accuracy value at the next time point. α is the smoothing factor, which takes a value between [0,1] and is used to control the smoothing degree of new and old data.
[0084] If the prediction accuracy value If the prediction accuracy value is greater than or equal to the reference threshold value of the prediction accuracy value under normal conditions set according to historical data, it means that the detection system is stable and maintains the current light source setting. If the value is smaller than the reference threshold of the predicted accuracy value under normal conditions set according to historical data, it means that the detection accuracy of the detection system has decreased and the light source needs to be adjusted.
[0085] When the prediction accuracy value is less than the prediction accuracy value reference threshold, the intensity I of the light source is increased to increase the contrast of the real defect. The intensity adjustment formula is: ;in: is the adjusted light intensity, is the current light intensity, Represents the gap between the current prediction accuracy and the target accuracy value, is the target accuracy value, and β is the intensity adjustment coefficient, which controls the amplitude of intensity adjustment.
[0086] When the prediction accuracy value is less than the prediction accuracy reference threshold, adjust the light source angle θ to improve the illumination distribution. By changing the incident angle, the defect appearance effect is improved. The angle adjustment formula is: ;in: is the adjusted light source angle, is the current light source angle, and γ is the angle adjustment coefficient, which determines the sensitivity of angle changes.
[0087] After the adjustment, monitor the accuracy of the system again. If the accuracy is significantly improved, continue with the current settings; if the improvement is not significant, further adjust the intensity coefficient β or angle coefficient γ for fine-tuning.
[0088] In this embodiment, in the film surface defect detection system, two groups of light sources in different directions (vertical light source and oblique light source) are first set, and the reflection intensity data under these two light sources are collected using a camera. Then a multi-frequency light source (visible light and infrared light) is introduced to obtain the response difference data of each pixel under different frequency illumination. Next, feature extraction is performed on the multi-directional reflection intensity and multi-frequency response difference of each pixel point to extract the emission intensity fluctuation characteristics and light source response deviation characteristics. Subsequently, a comprehensive analysis is performed based on these features to evaluate the accuracy of the detection system in identifying real defects on the film surface. The accuracy is divided into three levels: high, medium, and low, and different treatment measures are taken according to the detection level. For the medium accuracy level, the intensity and angle of the light source are dynamically adjusted through accuracy prediction within a fixed time period to further optimize the detection accuracy.
[0089] Embodiment 2, a thin film surface defect detection system described in this embodiment includes a light source configuration module, a multi-frequency light source module, a feature extraction module, an accuracy evaluation module, a detection level division module and a dynamic adjustment module;
[0090] Light source configuration module: Add two groups of light sources in different directions to the detection system, including a group of vertical light sources and a group of oblique light sources; use a camera to take images of the film surface from two different directions to obtain reflection intensity data under the vertical light source and the oblique light source;
[0091] Multi-frequency light source module: introduces multi-frequency light sources into the detection system, including visible light and infrared light sources; collects film images under visible light and infrared light respectively, and obtains the response difference data of each pixel under different frequency light sources;
[0092] Feature extraction module: For each pixel point, feature extraction is performed on the reflection intensity data of light sources in different directions and the response difference data under different frequency illumination, and the emission intensity fluctuation characteristics in the reflection intensity data and the light source response deviation characteristics in the response difference data are extracted respectively;
[0093] Accuracy evaluation module: Comprehensively analyze the extracted emission intensity fluctuation characteristics and light source response deviation characteristics, and evaluate the accuracy of the detection system in identifying real defects on the film surface based on the analysis results;
[0094] Detection level classification module: divides the accuracy of the detection system in identifying real defects on the film surface into different levels, namely high accuracy detection level, medium accuracy detection level and low accuracy detection level, and performs corresponding processing;
[0095] Dynamic adjustment module: For medium accuracy detection level, the detection system's accuracy in identifying real defects on the film surface within a fixed time period is predicted, and the intensity and angle of the light source in the detection system are dynamically adjusted based on the prediction results to improve detection accuracy.
[0096] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for detecting surface defects of a thin film, characterized in that: The following steps are involved: S1: Add two sets of light sources in different directions to the detection system, including a set of vertical light sources and a set of oblique light sources; use a camera to take images of the film surface from two different directions to obtain reflection intensity data under the vertical light source and the oblique light source; S2: Introduce a multi-frequency light source into the detection system, including visible light and infrared light sources; collect film images under visible light and infrared light respectively, and obtain the response difference data of each pixel under different frequency light sources; S3: For each pixel point, feature extraction is performed on the reflection intensity data of light sources in different directions and the response difference data under illumination of different frequencies, and emission intensity fluctuation features in the reflection intensity data and light source response deviation features in the response difference data are extracted respectively; After analyzing the emission intensity fluctuation characteristics of each pixel, an emission intensity fluctuation index is generated. The emission intensity fluctuation index is obtained by: for each pixel, the emission intensity data under different light sources are collected, and the emission intensity data are I dir1 (t) and I dir2 (t), where t represents the time series; the intensity difference of light sources in different directions is calculated to obtain the emission intensity fluctuation signal ΔI(t), which is expressed as: ΔI(t)=I dir1 (t)-I dir2 (t); Use discrete Fourier transform DFT to transform the time domain signal ΔI(t) into the frequency domain to analyze its frequency component. The expression of discrete Fourier transform is: Where: ΔI(f) is the Fourier transform result of the fluctuation signal at frequency f, N is the total number of sampling points, e -j2πft / N is the kernel function of discrete Fourier transform, j is an imaginary unit, representing phase information, f is the frequency, and the amplitude of each frequency component is calculated to obtain the spectrum intensity of the signal. The amplitude |ΔI(f)| is calculated as: Where: Re(ΔI(f)) 2 and Im(ΔI(f)) 2 They are the real and imaginary parts of the spectrum at frequency f, respectively. The spectrum is divided into energy, and the high-frequency energy is extracted as the emission intensity fluctuation index. The high-frequency energy E high The calculation expression is: Where: f high It is the lowest frequency that defines the high frequency part, taking the middle frequency f of the signal high =f max / 2,f max is the highest sampling frequency, for high frequency energy E high Normalized, the emission intensity fluctuation index is obtained, the expression is: Among them, HK is the emission intensity fluctuation index; S4: Comprehensively analyze the extracted emission intensity fluctuation characteristics and light source response deviation characteristics, and evaluate the accuracy of the detection system in identifying real defects on the film surface based on the analysis results; Specifically, the emission intensity fluctuation index and the light source response deviation index are converted into comprehensive feature vectors, and the comprehensive feature vectors are used as inputs of the machine learning model. The machine learning model uses each group of comprehensive feature vectors to predict the accuracy value labels of the detection system for identifying the real defects on the film surface as the prediction target, and takes minimizing the sum of the prediction errors of the accuracy value labels of the real defects on the film surface identified by all detection systems as the training target. The machine learning model is trained until the sum of the prediction errors converges, and the model training is stopped. The accuracy value of the detection system for identifying the real defects on the film surface is determined according to the model output results, wherein the machine learning model is a polynomial regression model; S5: classify the accuracy of the detection system in identifying the real defects on the film surface into different levels, namely, high accuracy detection level, medium accuracy detection level and low accuracy detection level, and perform corresponding processing; S6: For the medium accuracy detection level, the accuracy of the detection system in identifying real defects on the film surface within a fixed time period is predicted, and the intensity and angle of the light source in the detection system are dynamically adjusted according to the prediction results to improve the detection accuracy; Specifically: Record the accuracy value A of the detection system within a fixed time period t , forming a time series {A1,A2,…,A t }, where A t Represents the accuracy value at time t, and uses the exponential smoothing method to predict the accuracy value of the next time period. The prediction formula is: in: is the prediction accuracy value at the next time point, α is the smoothing factor, and its value is between [0,1]; If the prediction accuracy value If the prediction accuracy value is greater than or equal to the reference threshold value of the prediction accuracy value under normal conditions set according to historical data, it means that the detection system is stable and maintains the current light source setting; if the prediction accuracy value is greater than or equal to the reference threshold value of the prediction accuracy value under normal conditions set according to historical data, it means that the detection system is stable and maintains the current light source setting; If the value is smaller than the reference threshold of the predicted accuracy value under normal conditions set according to historical data, it means that the detection accuracy of the detection system has decreased and the light source needs to be adjusted.
2. A thin film surface defect detection method according to claim 1, characterized in that: In S3, the light source response deviation characteristics of each pixel are analyzed to generate a light source response deviation index. The method for obtaining the light source response deviation index is: In the detection system, the response intensity of each pixel under different light sources is recorded, and the response intensity under visible light is recorded as I visible , the response intensity under infrared light is recorded as I infrared ; Manhattan distance is used to calculate the response difference of the pixel under different light sources. The expression is: D response =I visible -I infrared |; Among them: D response It represents the response deviation of the pixel under visible light and infrared light, that is, the light source response deviation. response Perform normalization processing to generate the light source response deviation index. The normalization formula is: Where: GH is the light source response deviation index, D min and D max are the minimum and maximum values of the response deviation of all pixels in the image, respectively.
3. A thin film surface defect detection method according to claim 1, characterized in that: In S5, the accuracy of the detection system in identifying real defects on the film surface is divided into different levels, which are divided into high accuracy detection level, medium accuracy detection level and low accuracy detection level, specifically: The acquired accuracy value of the detection system for identifying the real defects on the film surface is compared with the gradient standard threshold, the gradient standard threshold includes a first standard threshold and a second standard threshold, and the first standard threshold is less than the second standard threshold, and the accuracy value of the detection system for identifying the real defects on the film surface is compared with the first standard threshold and the second standard threshold respectively; If the accuracy value of the detection system in identifying the real defects on the film surface is greater than the second standard threshold value, it means that the detection system has high accuracy in identifying the real defects on the film surface, and a high-accuracy recognition signal is generated at this time, and the accuracy of the detection system in identifying the real defects on the film surface is classified as a high-accuracy detection level; If the accuracy value of the detection system in identifying the real defects on the film surface is greater than or equal to the first standard threshold and less than or equal to the second standard threshold, it means that the accuracy of the detection system in identifying the real defects on the film surface is average, and a medium-accuracy recognition signal is generated at this time, and the accuracy of the detection system in identifying the real defects on the film surface is classified as a medium-accuracy detection level; If the accuracy value of the detection system in identifying real defects on the film surface is less than the first standard threshold, it means that the accuracy of the detection system in identifying real defects on the film surface is low. At this time, a low-accuracy identification signal is generated, and the accuracy of the detection system in identifying real defects on the film surface is classified as a low-accuracy detection level.
4. A thin film surface defect detection method according to claim 3, characterized in that: When the prediction accuracy value is less than the prediction accuracy value reference threshold, the intensity I of the light source is increased to increase the contrast of the real defect. The intensity adjustment formula is: Where: I new is the adjusted light intensity, I current is the current light intensity, Represents the gap between the current prediction accuracy and the target accuracy value, A target is the target accuracy value, β is the intensity adjustment coefficient; when the prediction accuracy value is less than the prediction accuracy reference threshold, adjust the light source angle θ to improve the illumination distribution. By changing the incident angle, the defect visibility effect is improved. The angle adjustment formula is: θ new =θ current +γ·ΔA; where: θ new is the adjusted light source angle, θ current is the current light source angle, and γ is the angle adjustment coefficient.
5. A thin film surface defect detection system, used to implement a thin film surface defect detection method according to any one of claims 1 to 4, characterized in that: It includes a light source configuration module, a multi-frequency light source module, a feature extraction module, an accuracy evaluation module, a detection level division module and a dynamic adjustment module; Light source configuration module: Add two groups of light sources in different directions to the detection system, including a group of vertical light sources and a group of oblique light sources; use a camera to take images of the film surface from two different directions to obtain reflection intensity data under the vertical light source and the oblique light source; Multi-frequency light source module: introduces multi-frequency light sources into the detection system, including visible light and infrared light sources; collects film images under visible light and infrared light respectively, and obtains the response difference data of each pixel under different frequency light sources; Feature extraction module: For each pixel point, feature extraction is performed on the reflection intensity data of light sources in different directions and the response difference data under different frequency illumination, and the emission intensity fluctuation characteristics in the reflection intensity data and the light source response deviation characteristics in the response difference data are extracted respectively; Accuracy evaluation module: Comprehensively analyze the extracted emission intensity fluctuation characteristics and light source response deviation characteristics, and evaluate the accuracy of the detection system in identifying real defects on the film surface based on the analysis results; Detection level classification module: divides the accuracy of the detection system in identifying real defects on the film surface into different levels, namely high accuracy detection level, medium accuracy detection level and low accuracy detection level, and performs corresponding processing; Dynamic adjustment module: For medium accuracy detection level, the detection system's accuracy in identifying real defects on the film surface within a fixed time period is predicted, and the intensity and angle of the light source in the detection system are dynamically adjusted based on the prediction results to improve detection accuracy.
Citation Information
Patent Citations
Method, device and equipment for environment monitoring by using LED driving power supply, and medium
CN118362518A
Online detection system and method for printing and dyeing chromatic aberration and medium
CN118758429A
Cited By
Film surface defect detection method and system
CN120629174A
A method and system for detecting defects on a film surface
CN120629174B