Film surface defect detection method and system
By using different directions and multi-frequency light sources in the film surface detection system for feature extraction and accuracy evaluation, dynamically adjusting the light source parameters, solving the problem of high false alarm rate for film surface defect detection under complex backgrounds, and achieving efficient and stable detection Effect.
Patent Information
- Application Number
- CN202411755903.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-12-03
AI Technical Summary
Existing film surface defect detection systems are prone to false alarms under complex background and light conditions, resulting in high false alarm rates and require frequent adjustment and calibration to optimize detection algorithms, affecting production efficiency and product quality.
Two sets of light sources in different directions (vertical and oblique light sources) and multi-frequency light sources (visible and infrared lights) are used for detection, and the accuracy of identifying real defects on the film surface is evaluated through feature extraction and machine learning models, and the light source intensity is dynamically adjusted. and angles 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, and achieves efficient, stable and highly adaptable operational effects of film surface defect detection.
Smart Images

Figure CN119224001A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of thin film defect detection, and in particular to a method and system for detecting thin film surface defects. Background Art
[0002] Film surface defect detection is a technical method used to identify and evaluate surface defects in thin film materials. Thin film materials are commonly used in electronics, optics, and packaging, and their surface quality directly impacts their performance and service life. The goal of defect detection is to promptly detect and locate surface defects such as scratches, bubbles, particles, and wrinkles during the production process to ensure product quality and stability.
[0003] Thin film surface defect detection typically utilizes a variety of technologies, including optical imaging, laser detection, and ultrasound, to identify different types of defects by analyzing reflected, scattered, or transmitted light. Automated defect detection systems utilize image processing and machine learning algorithms to rapidly classify and evaluate thin film surface defects, significantly improving inspection efficiency and reducing labor costs. These inspection technologies play a crucial role in improving the manufacturing precision and product yield of thin film materials.
[0004] The existing technology has the following shortcomings:
[0005] During film production, complex background colors or textures, particularly under specific lighting conditions or interference from objects like machinery oil or dust, can cause the film to reflect textures that appear unrealistic. These artifacts can be mistaken for defects by the inspection system, leading to a sudden increase in false alarms and disrupting normal inspection. Furthermore, as false alarms from artifacts increase, the inspection system often requires frequent adjustments and debugging to optimize the detection algorithm and mitigate the interference. However, these adjustments are not permanent and can lead to repeated false alarms across different production batches and lighting conditions, forcing production line downtime 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 one set of vertical light sources and one set of oblique light sources. Use a camera to capture 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: Introducing a multi-frequency light source into the detection system, including visible light and infrared light sources; collecting film images under visible light and infrared light respectively, and obtaining the response difference data of each pixel under different frequency light sources;
[0010] S3: For each pixel, feature extraction is performed on the reflection intensity data of light sources in different directions and the response difference data under different frequency illumination. The emission intensity fluctuation feature in the reflection intensity data and the light source response deviation feature 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: classifying 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 performing corresponding processing;
[0013] S6: 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. The intensity and angle of the light source in the detection system are dynamically adjusted based on the prediction results to improve detection accuracy.
[0014] Preferably, in S3, after analyzing the emission intensity fluctuation characteristics of each pixel point, an emission intensity fluctuation index is generated, 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 the imaginary unit, which represents the 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, 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, and takes the middle frequency of the signal , Is the highest sampling frequency, for high frequency energy Normalization is performed to obtain the emission intensity fluctuation index, which is expressed as: ; Wherein, HK is the emission intensity fluctuation index.
[0016] Preferably, in S3, the light source response deviation characteristics of each pixel are analyzed to generate a light source response deviation index, and the light source response deviation index is obtained by:
[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 ; Use Manhattan distance 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 response deviations 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 inputs of the machine learning model. The machine learning model uses each set of comprehensive feature vectors to predict the accuracy value labels of the detection system in identifying 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 real defects on the film surface as the training target. The machine learning model is trained until the sum of the prediction errors reaches convergence, and the model training is stopped. The accuracy value of the detection system in identifying 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] Comparing the obtained accuracy value of the detection system in identifying real defects on the film surface with a gradient standard threshold, the gradient standard threshold including a first standard threshold and a second standard threshold, wherein the first standard threshold is less than the second standard threshold, and comparing the accuracy value of the detection system in identifying real defects on the film surface 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, it means that the detection system has high accuracy in identifying the real defects on the film surface. In this case, 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.
[0023] If the accuracy value of the detection system in identifying 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 real defects on the film surface is average, and a medium accuracy recognition signal is generated, and the accuracy of the detection system in identifying 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 recognition 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 range is [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 normal state 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 normal state set according to historical data, it means that the detection system is stable and maintains the current light source setting; If the value is less than the reference threshold of the prediction accuracy value under normal conditions set based on 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. The intensity adjustment formula is: ;in: is the adjusted light intensity, is the current light intensity, Indicates the gap between the current prediction accuracy and the target accuracy value, is the target accuracy value, and β is the intensity adjustment coefficient. When the predicted accuracy value is less than the predicted accuracy reference threshold, the light source angle θ is adjusted 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, comprising a light source configuration module, a multi-frequency light source module, a feature extraction module, an accuracy evaluation module, a detection level classification module, and a dynamic adjustment module;
[0030] Light source configuration module: Add two sets of light sources in different directions to the detection system, including one set of vertical light sources and one set of oblique light sources. Use a camera to capture 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. 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 Assessment Module: This module comprehensively analyzes the extracted emission intensity fluctuation characteristics and light source response deviation characteristics, and evaluates 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 levels, the module predicts the detection system's accuracy in identifying true defects on the film surface within a fixed time period and dynamically adjusts the intensity and angle of the light source in the detection system 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. By incorporating two sets of light sources with different orientations (vertical and oblique) and a multi-frequency light source (visible and infrared), this invention enables the detection system to capture reflectance and response differences on the film surface under different light source conditions, comprehensively capturing defect characteristics. Feature extraction techniques extract emission intensity fluctuation characteristics and light source response deviation characteristics. These characteristics are input into a polynomial regression model to generate an accuracy value to evaluate the system's ability to identify true film defects. Based on the accuracy value, the detection level is classified into high, medium, and low, facilitating adaptive adjustment for different detection accuracy levels.
[0038] 2. By dynamically predicting detection accuracy values, this invention can identify potential performance fluctuations in detection systems at medium accuracy levels, automatically adjusting the intensity and angle of the light source to optimize illumination distribution and improve the contrast of detection for real defects. This method significantly reduces the false alarm rate caused by spurious textures, mitigates system false alarms due to lighting conditions or complex background textures, avoids frequent downtime for debugging and calibration, and achieves efficient, stable, and adaptable 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 following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0040] Figure 1 Flow chart of the method of the present invention.
[0041] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION
[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0043] Example 1, please refer to Figure 1 and Figure 2 As shown, the method for detecting surface defects of a thin film described in this embodiment includes the following steps:
[0044] S1: Add two sets of light sources in different directions to the detection system, including one set of vertical light sources and one set of oblique light sources. Use a camera to capture 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: Introducing a multi-frequency light source into the detection system, including visible light and infrared light sources; collecting film images under visible light and infrared light respectively, and obtaining the response difference data of each pixel under different frequency light sources;
[0046] S3: For each pixel, feature extraction is performed on the reflection intensity data of light sources in different directions and the response difference data under different frequency illumination. The emission intensity fluctuation feature in the reflection intensity data and the light source response deviation feature 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: classifying 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 performing corresponding processing;
[0049] S6: 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. The intensity and angle of the light source in the detection system are dynamically adjusted based on the prediction results to improve detection accuracy.
[0050] In S1, two sets of light sources in different directions are added to the detection system, including a vertical light source and an oblique light source. A camera is used to capture 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 positioned above the inspection surface, perpendicular to the film surface. The illumination angle of these 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 real defects such as small scratches and dents more obvious in the reflected light. In addition to the vertical light sources, another set of oblique light sources is added, and its angle is set at a certain angle to the film surface (for example, 30° to 45°). This oblique illumination angle makes subtle surface height differences or slightly convex areas more prominent in the reflected light, helping to reveal subtle changes or defects on the film surface.
[0052] The inspection system uses one or more cameras to capture images of the film surface from different angles. One camera is positioned directly on the film surface (aligned with the vertical light source), while another captures images from the side. Alternatively, the same camera position can capture images under both vertical and oblique light sources. During capture, both vertical and oblique light sources are activated, and the cameras record the reflective intensity data for different pixels on the film surface under each lighting condition. This data reveals changes in brightness 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. Images under vertical light sources generally reflect shallower defects or normal texture features on the surface, while images under oblique light sources tend to highlight surface bumps or depressions. By extracting the difference in reflection intensity for each pixel under the two light sources, more obvious defective areas can be identified. False textures (such as mechanical oil stains and dust) typically produce unstable reflection intensity under changes in light source. Therefore, if the reflection intensity of an area varies significantly under vertical and oblique light sources, it may be a false defect. Real defects (such as scratches or bubbles) often exhibit relatively stable reflection characteristics under different light angles, with relatively small changes in reflection intensity.
[0054] In this invention, by incorporating two sets of light sources from 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 surface details, while the oblique light source enhances micro-convex defects. The combination of these two enables the detection system to operate effectively even in complex lighting and background conditions, significantly improving detection accuracy and reliability.
[0055] S2: Introduce multi-frequency light sources 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 primarily used to highlight visual features on film surfaces, such as common defects like scratches and bubbles. These defects are clearly visible under visible light, and their reflective characteristics can reveal the fine structure of the defect. Infrared light, with its longer wavelength and greater penetrating power, is less susceptible to interference from surface dust and oil, making it particularly suitable for detecting stress and strain defects deep within or within the material. Infrared light is less sensitive to non-real defects (such as dust or oil), thus helping to eliminate the influence of these artifacts and making real defects stand out more clearly.
[0057] The inspection system is equipped with visible and infrared light sources. Using the same camera or multispectral camera, images of the film are captured from the same angle under both visible and infrared light, generating multi-frequency image data. For each pixel, the brightness value or reflectance intensity data is recorded separately under visible and infrared light. This creates a difference data pair based on the response of each pixel under two different light frequencies, enabling comparative analysis. Precise alignment of the visible and infrared images is ensured, and image calibration methods (such as geometric transformation calibration) are used to eliminate displacement errors caused by camera angle, parallax, and other factors, ensuring accurate pixel-level data.
[0058] In this invention, by introducing multi-frequency light sources, such as visible and infrared light, the detection system can capture the differences in the response of each pixel on the film surface at different frequencies, thereby distinguishing between false textures and real defects. Multi-frequency light source response analysis improves the accuracy and stability of the detection system in complex backgrounds, helps reduce false alarm rates, and achieves 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, respectively extracting the emission intensity fluctuation features in the reflection intensity data and the light source response deviation features in the response difference data.
[0060] For each pixel, collect the reflection intensity data of the pixel under different directional light sources (such as vertical light source and oblique light source). For example, if the intensity under the vertical light source is and the intensity under oblique light source is Compare the reflection intensity data under different light sources and calculate the fluctuation amplitude (i.e., intensity difference) 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 generally stable, meaning the intensity differences under different lighting directions are small. However, pseudo-textures (such as oil stains or dust) may exhibit significant intensity fluctuations under different lighting sources, resulting in larger fluctuation characteristics. By observing the fluctuation characteristics, we can preliminarily determine whether a pixel is likely 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 set to 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 at a pixel under different frequencies of illumination. False textures (such as dust or oil) often have larger response deviations because these surface disturbances react differently to visible and infrared light. Real defects (such as bubbles or scratches) exhibit smaller intensity differences under different frequencies of illumination, resulting in more stable response deviation values. By setting a threshold, a larger response deviation typically indicates a false defect, while a smaller deviation may indicate a real defect.
[0063] After analyzing the emission intensity fluctuation characteristics of each pixel, the emission intensity fluctuation index is generated. The emission intensity fluctuation index is obtained 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 the imaginary unit, representing the 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 sake of comparison, the high-frequency energy Normalization is performed to obtain the emission intensity fluctuation index, which is expressed as: ; Wherein, HK is the emission intensity fluctuation index.
[0067] A larger emission intensity fluctuation index indicates a higher proportion of high-frequency components in the signal. This generally indicates that the fluctuation detected at that pixel is more likely to be due to artifacts (such as surface contamination like oil and dust) or environmental interference. Artifacts can produce significant fluctuations in reflection due to varying illumination from different directions, and these high-frequency variations can easily be mistaken by the system as defects. Therefore, when the fluctuation index is high, the inspection system's accuracy in identifying true defects on the film surface is reduced, potentially increasing the false alarm rate. A high fluctuation index increases the system's sensitivity to artifacts, making it less able to distinguish between true defects and interference signals, thus impacting the reliability of inspection results.
[0068] Conversely, a smaller emission intensity fluctuation index indicates a higher proportion of low-frequency components in the signal, which generally indicates that the detected fluctuations are relatively stable and may represent a true defect on the film surface. Real defects (such as scratches and bubbles) exhibit relatively stable reflection characteristics under different light source directions. Therefore, a fluctuation index dominated by low-frequency signals generally reflects a high correlation between that pixel and the real defect. When the fluctuation index is small, the detection system can more accurately identify real defects and has a lower false alarm rate, thereby improving the overall reliability and accuracy of detection. A low fluctuation index helps the system focus on stable defect characteristics, thereby improving the effectiveness of identifying real defects on the film surface.
[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 ; Use Manhattan distance 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 are the minimum and maximum values of the response deviation of all pixels in the image, respectively, which are used for normalization.
[0071] After calculating the light source response deviation index for all pixels, a response deviation map can be generated. This maps the deviation index values to a grayscale or heat map, visually displaying the response differences between different areas. Areas with large response deviations may be caused by artifacts, while areas with small response deviations may be real defects.
[0072] A larger light source response deviation index indicates significant differences in pixel response under different light sources (such as visible light and infrared light). This large response deviation often indicates that the area may be affected by surface contaminants (such as dust and oil) or other environmental factors. These artifacts exhibit significant brightness variations under different light sources, leading to an increased light source response deviation index. Therefore, when the deviation index is large, the inspection system is more likely to misidentify the interfering areas as defects, reducing the accuracy of identifying true defects and resulting in a high false alarm rate. A high deviation index generally indicates a strong influence of artifacts, and the system's detection reliability in this situation is low.
[0073] On the other hand, a smaller light source response deviation index indicates a more consistent response for that pixel under different light sources. This low deviation typically corresponds to real defects on the film surface, as real defects (such as scratches and bubbles) exhibit relatively stable responses under different light sources, with minimal differences in response. A smaller deviation index allows the inspection system to more accurately distinguish real defects from artifacts, thereby improving recognition accuracy. A low deviation index indicates a high degree of consistency in the light source response in that area, making the system more reliable in identifying real defects.
[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 inputs of the machine learning model. The machine learning model uses each set of comprehensive feature vectors to predict the accuracy value labels of the detection system in identifying 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 real defects on the film surface as the training target. The machine learning model is trained until the sum of the prediction errors reaches convergence, and the model training is stopped. The accuracy value of the detection system in identifying 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 accuracy value of the detection system in identifying real defects on the film surface is obtained by obtaining the corresponding function expression from the comprehensive feature vector training data of the trained machine learning model: Where, 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: Divide 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 perform corresponding processing.
[0078] Comparing the obtained accuracy value of the detection system in identifying real defects on the film surface with a gradient standard threshold, the gradient standard threshold including a first standard threshold and a second standard threshold, wherein the first standard threshold is less than the second standard threshold, and comparing the accuracy value of the detection system in identifying real defects on the film surface with the first standard threshold and the second standard threshold respectively;
[0079] If the detection system's accuracy in identifying true defects on the film surface exceeds the second standard threshold, it indicates a high degree of accuracy. A high-accuracy recognition signal is generated, and the system is classified as having a high-accuracy detection level. The test result can be directly passed to the quality control process as the final result without further review. This can accelerate the production process, reduce manual inspection intervention, and improve production efficiency. System performance can also be continuously monitored to ensure that high accuracy remains stable.
[0080] If the detection system's accuracy in identifying true 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, the detection system's accuracy in identifying true defects on the film surface is average. A medium-accuracy recognition signal is generated, and the detection system's accuracy in identifying true defects on the film surface is classified as medium-accuracy. Automatic re-inspection is then performed, re-running the detection algorithm or re-inspecting the same area using different detection parameters to eliminate false positives. If production conditions permit, a small amount of manual review can also be introduced to manually mark and confirm suspected defect areas, especially defects in critical areas, to ensure that detection accuracy meets requirements.
[0081] If the detection system's accuracy in identifying true defects on the film surface falls below the first standard threshold, it indicates low accuracy. A low-accuracy recognition signal is generated, and the detection system's accuracy in identifying true defects on the film surface is classified as low. Pause the inspection process and adjust the light source angle and intensity, or switch the light source type (for example, between visible and infrared light) to improve detection contrast. Recalibrate system parameters, adjust detection thresholds, or optimize algorithm parameters. If interference sources are significant, eliminate environmental interference (for example, clean the surface and avoid vibration). After completing these adjustments, rerun the inspection to improve recognition accuracy.
[0082] S6: 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. The intensity and angle of the light source in the detection system are dynamically adjusted based on the prediction results to improve 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 exponential smoothing to predict the accuracy value for 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 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 less than the reference threshold of the prediction accuracy value under normal conditions set based on 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 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, Indicates 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 light 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, which determines the sensitivity of angle changes.
[0087] After the adjustment, monitor the system's accuracy again. If the accuracy has improved significantly, 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, a thin film surface defect detection system first sets up two sets of light sources with different directions (vertical light source and oblique light source), and uses a camera to collect reflection intensity data under these two light sources. Then, a multi-frequency light source (visible light and infrared light) is introduced to obtain response difference data for each pixel under different frequencies of light. Next, feature extraction is performed on the multi-directional reflection intensity and multi-frequency response differences of each pixel to extract 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. 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 based on accuracy prediction within a fixed time period to further optimize 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 assessment module, a detection level classification module, and a dynamic adjustment module;
[0090] Light source configuration module: Add two sets of light sources in different directions to the detection system, including one set of vertical light sources and one set of oblique light sources. Use a camera to capture 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. 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 Assessment Module: This module comprehensively analyzes the extracted emission intensity fluctuation characteristics and light source response deviation characteristics, and evaluates 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 levels, the module predicts the detection system's accuracy in identifying true defects on the film surface within a fixed time period and dynamically adjusts the intensity and angle of the light source in the detection system based on the prediction results to improve detection accuracy.
[0096] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection 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; 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; 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.
2. A thin film surface defect detection method according to claim 1, characterized in that: In S3, the emission intensity fluctuation characteristics of each pixel are analyzed to generate an emission intensity fluctuation index. The emission intensity fluctuation index is obtained as follows: 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.
3. A thin film surface defect detection method according to claim 2, 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 , 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.
4. A thin film surface defect detection method according to claim 3, characterized in that: 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: 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.
5. A method for detecting surface defects of a thin film according to claim 4, 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.
6. A thin film surface defect detection method according to claim 1, characterized in that: 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: 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]; 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.
7. A thin film surface defect detection method according to claim 6, 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: ;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.
8. 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 7, 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
Undulation inspecting device, undulation inspecting method, control program of undulation inspecting device, and recording medium
CN101466997A
Machine vision system and method for enhancing raised features on surface of pattern
CN111879791A
AI-based visual detection light source control method, system, equipment and medium
CN117615484A
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
LED annular light source testing method, device and equipment and storage medium
CN119804465A
Quality detection method and system for tiles
CN120177512A
Textile surface defect detection method and system
CN120761390A
Plastic film surface defect detection method based on machine vision
CN120976210A
AI learning system and method for reducing AVI machine false points
CN121214179A
