Glass defect online identification system based on machine vision

By suppressing ambient light fluctuations through a high-resolution camera and Kalman filter algorithm, and combining deep learning models and online learning to optimize parameters, the problems of uneven imaging brightness and reflective spots in glass coating production were solved, achieving high-precision defect detection and adaptive capabilities.

CN122016869AInactive Publication Date: 2026-05-12HUNAN YUNDI TEMPERED GLASS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN YUNDI TEMPERED GLASS CO LTD
Filing Date
2026-02-03
Publication Date
2026-05-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During the glass coating production process, fluctuations in ambient light, equipment vibration, and light source attenuation can lead to uneven imaging brightness and reflective spots, causing image feature distortion and resulting in misjudgment or missed detection of defects.

Method used

Image acquisition is performed using a high-resolution camera and an adjustable LED array. The Kalman filter algorithm is used to suppress ambient light fluctuations. A deep learning model is used for defect detection. The detection threshold is dynamically adjusted through an online learning mechanism and the system parameters are optimized through reinforcement learning to enhance the ability to identify minute defects.

Benefits of technology

It improves the accuracy and reliability of glass coating surface defect detection, reduces the false positive and false negative rates, realizes the stability and adaptability of the system in complex environments, and enhances the detection rate and type differentiation accuracy of multi-scale defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122016869A_ABST
    Figure CN122016869A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine vision, and discloses a glass defect online identification system based on machine vision, which comprises an image acquisition module, an image preprocessing module, a defect identification module, a result output module and an environment self-adaption module, an interference suppression unit in the environment self-adaption module adopts a Kalman filtering algorithm to predict and compensate environment illumination data collected in real time, interference of environment light fluctuation, equipment vibration and light source attenuation on imaging can be suppressed, the problems of uneven image brightness and reverse light spots caused by abnormal illumination are solved, and the imaging quality is improved. Therefore, authenticity and stability of image features input to the defect identification module are guaranteed, misjudgment and missed judgment caused by image distortion are reduced, the detection precision and reliability of the system in a complex industrial environment are improved, global parameters of the system are continuously optimized through a feedback unit by adopting a reinforcement learning algorithm, and the detection precision and reliability of the system are improved. And the detection rate of flaws such as tiny scratches and pinholes is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision technology, specifically to an online glass defect identification system based on machine vision. Background Technology

[0002] Machine vision is a comprehensive technology that integrates digital image processing, mechanics, control, lighting, optics, and computer hardware and software. Machine vision systems can achieve non-contact inspection of products and quickly acquire a large amount of information. When applied to industrial production, it is easy to integrate with design information and processing control information. Therefore, machine vision technology, as an important inspection method, has increasingly attracted people's attention and has been more and more widely used in industrial inspection.

[0003] Currently, due to the complex and variable production environment of glass coating, the light projected onto the glass surface by the lighting system during online inspection is easily affected by ambient light fluctuations, equipment vibrations, and the attenuation of the light source itself, resulting in uneven imaging brightness and the generation of reflective spots. When such lighting anomalies cannot be monitored and compensated in real time, it will directly cause image feature distortion, thereby leading to misjudgment and missed judgment of defects.

[0004] Therefore, a machine vision-based online glass defect identification system is proposed to solve the above problems. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an online glass defect identification system based on machine vision, which solves the problems of uneven imaging brightness and reflective spots mentioned in the background technology.

[0006] To achieve the above objectives, the present invention provides the following technical solution: an online glass defect identification system based on machine vision, comprising: The image acquisition module uses a high-resolution camera unit to acquire image data of the glass coating surface, adjusts the ambient light through the illumination control unit to reduce interference, and outputs the raw image data through the image transmission unit. The image preprocessing module receives the original image data, removes noise using a median filtering algorithm through a denoising unit, improves image contrast through histogram equalization using an enhancement unit, and outputs preprocessed image data through a filtering unit. The defect identification module receives the preprocessed image data, performs defect detection using a convolutional neural network through a deep learning model unit, identifies the defect type using a classification unit based on a softmax function, and outputs the defect location coordinates through a localization unit. The result output module receives the defect location coordinates and defect type, calculates the defect size through the data fusion unit, generates a structured inspection report through the report generation unit, and displays the real-time results on the user interface through the visualization unit. The environment adaptive module receives the real-time results and environmental sensor data, uses an adaptive filtering algorithm through the interference suppression unit to reduce the impact of environmental fluctuations, dynamically adjusts the detection threshold parameters through the calibration unit, and optimizes the system performance parameters based on historical data through the feedback unit.

[0007] Preferably, the high-resolution camera unit of the image acquisition module includes a CCD sensor and a telecentric optical lens, the illumination control unit includes an adjustable LED array and a photometric sensor, and the image transmission unit uses the Gigabit Ethernet protocol to transmit the raw image data.

[0008] Preferably, the denoising unit of the image preprocessing module uses a wavelet transform algorithm for noise suppression, the enhancement unit improves image details through a contrast-limited adaptive histogram equalization algorithm, and the filtering unit includes a Gaussian filter and a bilateral filter to output smooth preprocessed image data.

[0009] Preferably, the deep learning model unit of the defect recognition module proposes defect regions based on the Faster R-CNN architecture, the classification unit uses a multilayer perceptron network to identify defect types, including scratches, bubbles and stains, and the localization unit outputs the accurate coordinates of the defects through bounding box regression.

[0010] Preferably, the data fusion unit of the result output module integrates defect location, type, and size information; the report generation unit outputs the inspection report in XML format; and the visualization unit uses the OpenGL library to achieve three-dimensional overlay display of the defect results.

[0011] Preferably, the interference suppression unit of the environment adaptive module uses a Kalman filter algorithm to compensate for changes in ambient light, the calibration unit dynamically updates the detection threshold through an online learning mechanism, and the feedback unit optimizes system parameters based on a reinforcement learning algorithm to improve robustness.

[0012] Preferably, the defect identification module further includes a feature extraction unit, which uses a residual network to extract multi-scale defect features and uses an attention mechanism unit to enhance the identification accuracy of minute defects.

[0013] Preferably, the result output module further includes an alarm unit, which outputs a warning signal through an audible and visual alarm when the detected defect size exceeds a preset threshold, and links with the production line control system to achieve automatic sorting.

[0014] Preferably, the system further includes a real-time monitoring module, which receives the raw image data from the image acquisition module, temporarily stores the image stream through a frame buffer unit, detects system latency using a delay analysis unit, and outputs system real-time performance indicators through a performance evaluation unit.

[0015] Preferably, the frame buffer unit of the real-time monitoring module adopts a circular buffer structure, the latency analysis unit calculates the image processing latency through timestamps, and the performance evaluation unit generates system optimization suggestions based on throughput and accuracy.

[0016] Compared with existing technologies, the present invention provides an online glass defect identification system based on machine vision, which has the following advantages: 1. In this invention, when performing online identification of defects on the glass coating surface, the interference suppression unit in the environment adaptive module uses a Kalman filter algorithm to predict and compensate for the real-time acquired ambient light data. This can suppress the interference of ambient light fluctuations, equipment vibrations, and light source attenuation on imaging, and solve the problems of uneven image brightness and reflective spots caused by abnormal lighting. This ensures the authenticity and stability of the image features input to the defect identification module, reduces misjudgments and missed judgments caused by image distortion, and improves the detection accuracy and reliability of the system in complex industrial environments.

[0017] 2. In this invention, when performing online identification of defects on the glass coating surface, the feature extraction unit in the defect identification module uses a residual network to extract multi-scale defect features, and the attention mechanism unit enhances the focus on minute defect features. This enables the system to simultaneously capture different scale features, from sub-pixel-level minute point defects to macroscopic line and surface defects, solving the problem of insufficient sensitivity of traditional models to multi-scale defects. This improves the detection rate of defects such as minute scratches and pinholes, and achieves more accurate semantic distinction of defect types.

[0018] 3. In this invention, when performing online identification of defects on the glass coating surface, the calibration unit in the environmental adaptive module dynamically adjusts the defect detection threshold based on an online learning mechanism, and the feedback unit uses a reinforcement learning algorithm to continuously optimize the global parameters of the system. This enables the system to self-adjust according to production line speed, coating process changes, and long-term performance drift, solving the problem of insufficient robustness caused by static setting of system parameters. This ensures the performance stability and adaptability of the detection system under different production batches and working conditions, achieving long-term consistency of quality control effects. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the online glass defect identification system based on machine vision according to the present invention. Detailed Implementation

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

[0021] Please see Figure 1 This machine vision-based online glass defect identification system includes: The image acquisition module uses a high-resolution camera unit to acquire image data of the glass coating surface, adjusts the ambient light through the illumination control unit to reduce interference, and outputs the raw image data through the image transmission unit. The image preprocessing module receives the raw image data, removes noise using a median filtering algorithm through a denoising unit, improves image contrast through histogram equalization using an enhancement unit, and outputs preprocessed image data through a filtering unit. The defect recognition module receives preprocessed image data, uses a convolutional neural network to detect defects through a deep learning model unit, identifies the defect type using a classification unit based on a softmax function, and outputs the defect location coordinates through a localization unit. The results output module receives the defect location coordinates and defect type, calculates the defect size through the data fusion unit, generates a structured inspection report through the report generation unit, and displays the real-time results on the user interface through the visualization unit. The environment adaptive module receives real-time results and environmental sensor data. It uses an adaptive filtering algorithm through the interference suppression unit to reduce the impact of environmental fluctuations, dynamically adjusts the detection threshold parameters through the calibration unit, and optimizes the system performance parameters based on historical data through the feedback unit.

[0022] The high-resolution camera unit of the image acquisition module includes a CCD sensor and a telecentric optical lens, the illumination control unit includes an adjustable LED array and a photometric sensor, and the image transmission unit uses the Gigabit Ethernet protocol to transmit raw image data.

[0023] The noise reduction unit of the image preprocessing module uses a wavelet transform algorithm for noise suppression. The specific implementation process is as follows: First, a two-dimensional discrete wavelet transform is performed on the input single-frame grayscale image signal of the glass surface. This transform decomposes the image into multiple resolution scales. and direction The above yields a set of wavelet coefficients. Among these coefficients, those with larger amplitudes usually correspond to the true edges and textures of the image, while those with smaller amplitudes and wider distributions mostly correspond to noise. The next crucial step is denoising, which involves thresholding the high-frequency wavelet coefficients obtained from the decomposition. The system uses a soft thresholding function to shrink the coefficients, and its mathematical expression is as follows: ; in, It depends on the decomposition scale Adaptive threshold, These are the estimated wavelet coefficients after denoising. Indicates scale. Indicates direction, This represents the coordinate position of the wavelet coefficient in two-dimensional space. These are the original wavelet coefficient values; This formula means that the absolute value of each wavelet coefficient is multiplied by a threshold. Comparison: When the absolute value is less than the threshold, the coefficient is determined to be mainly contributed by noise and is set to zero; when the absolute value is greater than the threshold, it is determined to contain effective signal components and is shrunk towards zero. This processing method can smooth noise while avoiding the introduction of obvious artifacts in the reconstructed image. The enhancement unit improves image details by limiting the contrast adaptive histogram equalization algorithm. The specific implementation process is as follows: Image segmentation: The preprocessed grayscale image of the glass surface is divided into multiple rectangular sub-regions of equal size. This segmentation is the basis of "adaptive". It allows the algorithm to perform independent enhancement according to the grayscale distribution characteristics of each local region, so as to deal with the global illumination unevenness and local reflection differences in the glass coating. Calculate the local histogram: For each sub-region, calculate its gray-level histogram, which counts the frequency of each gray-level pixel in the local region. Contrast Limitation: To prevent excessive noise amplification in uniform background areas due to statistical fluctuations of a small number of pixels, CLAHE introduces contrast limitation. For the histogram of each sub-region, a cropping threshold is preset. The algorithm crops all "peaks" in the histogram that exceed the threshold. The total count of the cropped pixels is then evenly redistributed to all gray levels of the histogram, thus forming a "limited" histogram. This step ensures that the subsequent equalization transformation is gentle and reduces the drastic stretching of local contrast. Local histogram equalization: For each contrast-limited sub-region, calculate the cumulative distribution function based on its limited histogram, and then apply the equalization transformation formula to equalize the original gray values. Mapped to new grayscale values

[0024] ; in, The original grayscale value. It is grayscale. The cumulative distribution function value, and These are the minimum and maximum grayscale values ​​that actually exist in the current sub-region, respectively. The total number of gray levels. For the new grayscale value, For indexing; Through CLAHE processing, the edges of tiny scratches, light-colored haze spots, and tiny bubbles in the glass coating image that originally had low contrast with the background are significantly enhanced, and the difference between their gray values ​​and the surrounding normal area is amplified. At the same time, due to the contrast limitation, the noise and texture of the uniform coating area itself will not be over-amplified and misjudged as defects. The filtering unit includes a Gaussian filter and a bilateral filter to output smooth preprocessed image data. The core objective of this step is to further filter out residual noise and irrelevant textures by utilizing the unique edge-preserving properties of the bilateral filter, based on the basic noise suppression and image smoothing performed by the Gaussian filter, while accurately preserving the sharp edge information that characterizes glass defects. This results in an image that is both smooth and retains key details, providing optimal input for subsequent defect identification. Specifically, the bilateral filter, as the core algorithm of this step, does not perform a simple spatial averaging operation. Instead, its filtering operation is determined by two cooperating weight kernels. For images located in the image to be processed... The pixel, its filtered output value It is calculated by weighted average of all pixels in the neighborhood, with the weights depending on two dimensions: spatial proximity and gray-level similarity. Its mathematical expression is as follows: ; in, and They represent the center points respectively. and neighboring points The original pixel intensity value, Indicates A local neighborhood window centered on the center, For spatial weight kernel, For range weight kernel, As the normalization factor, With the center point, For points within the neighborhood, Represents geometric distance, Indicates pixel intensity differences; In summary, the bilateral filtering operation defined by this formula is the core mathematical principle for the filtering unit in this system to achieve "intelligent smoothing". By combining spatial distance and gray-level similarity, it effectively suppresses noise while solving the edge blurring problem caused by traditional linear filtering, ensuring that the integrity and distinguishability of defect features are maximized in the image data output to the defect recognition module.

[0025] The deep learning model unit of the defect identification module proposes defect regions based on the Faster R-CNN architecture. This step involves sliding anchor points on the feature map through the region proposal network to predict the probability that each anchor point contains a defect and to perform preliminary coordinate adjustments. The core formula is to perform a preliminary coordinate adjustment for each anchor point. Output of binary classification foreground / background scores and bounding box regression offsets:

[0026] in, Indicates anchor point The corresponding feature vector, For the weights and biases of the classification layer, For the sigmoid function, Here are the weight matrix and bias vector for the regression layer. This represents the normalized offset of the anchor point center coordinates. This indicates the logarithmic scale offset of width and height. It is a transpose operator. Indicates the number of classification layers. Indicates the number of regression layers; Final candidate box coordinates passed Decode back to image space in the form of ; The classification unit uses a multilayer perceptron network to identify defect types, including scratches, bubbles, and blemishes, and extracts feature vectors for each candidate region. The scores are mapped to each category using an MLP, and then normalized to a probability distribution using Softmax. ; in, This is the fixed-dimensional feature vector extracted after Rol pooling. For the corresponding number Class weights and biases Output the total number of categories. The probability of a defect belonging to a specific category. For indexing, For indexing, For the corresponding number Class weights and biases It is a transpose operator; The localization unit outputs the accurate coordinates of the defect through bounding box regression. This step fine-tunes the candidate boxes to better fit the actual defect boundaries. The regression target is relative to the candidate boxes. Scale-invariant offset: ; ; in, The center coordinates and width and height of the candidate box. The coordinates of the actual bounding box are shown. The regression target is the mean; After the network predicts these offsets, it performs an inverse transformation. By obtaining refined coordinates, sub-pixel level positioning accuracy can be achieved.

[0027] The data fusion unit of the results output module integrates defect location, type, and size information; the report generation unit outputs the inspection report in XML format; and the visualization unit uses the OpenGL library to achieve three-dimensional overlay display of defect results.

[0028] The interference suppression unit of the environment adaptive module uses a Kalman filter algorithm to compensate for changes in ambient light. The specific implementation process is as follows: The system deploys a high-response photometric sensor near the lens of the image acquisition module to sample the ambient illuminance in real time. The Kalman filter treats the change process of this physical quantity as a state-space model. State Prediction: The filter first predicts the ambient light state at the current moment based on the best estimate from the previous moment. Its core state equation is: ; in, yes State vector estimation at time t. The state transition matrix is ​​dimensionless. This represents the state prediction value based on the model's prior knowledge. yes State vector estimation at time t. Indicates time; Measurement Update: Subsequently, the filter fuses the actual measurements from the photometric sensor at the current moment. To correct the predicted values ​​and obtain a better posterior state estimate.

[0029] ; in, For the observation matrix, The Kalman gain is calculated dynamically over time. These are actual measured values. yes State vector estimation at time t. This represents the state prediction value based on the model's prior knowledge. Indicates time; Ultimately, from Obtain the optimal ambient light intensity estimate; The calibration unit dynamically updates the detection threshold through an online learning mechanism. The specific implementation process is as follows: The system maintains a dynamic database of "suspected defects" features. Whenever a region is identified as a potential defect, its image features are extracted and temporarily stored, and an online learning cycle is set. Statistics and Objective Function: Within each learning cycle, calculate the statistics of the feature vectors of the current batch of products. The objective is to adjust the classification threshold. This ensures that the overall false alarm rate is kept below a preset upper limit. At the same time, maximize the detection rate; Threshold iteration formula: Employing an online update strategy based on gradients and search, a simplified adaptive rule can be expressed as: ; in, It is the first The defect discrimination threshold at the end of each learning cycle. It is based on the threshold within the current period. The calculated actual false alarm rate, This is the target value for the false alarm rate allowed by the system. It's the learning rate. Indicates the number of learning cycles; This mechanism makes the system no longer static; as the coating process deteriorates and the number of minute defects increases, the feature distribution changes. It will increase, and the above formula will make the threshold... The system automatically lowers the sensitivity to maintain the sensitivity, and conversely, when the process is excellent, the threshold will be automatically raised to reduce false alarms. This ensures that the system maintains stable detection performance throughout the entire production life cycle. The feedback unit optimizes system parameters based on reinforcement learning algorithms to improve robustness. The specific implementation process is as follows: Define the basic elements of reinforcement learning: State: A vector describing the system's and environment's condition, which may include: recent average ambient light fluctuation value, current detection threshold, defect detection rate and confidence variance of recent frames, and computation delay; Actions: The system can adjust parameters such as the learning rate in the online learning mechanism and certain filtering intensities in image preprocessing; Rewards: Immediate evaluation after each step is the core of driver learning, and the reward function needs to be carefully designed. ; in, , , These are positive weighting coefficients; Strategy and Learning: An agent continuously observes the state, selects actions, and receives rewards after execution. It then transitions to a new state to update its "value function" and "policy network"; After extensive offline and online training, the reinforcement learning agent will learn a complex parameter mapping strategy. This closed-loop optimization based on long-term gains enables the parameters of multiple subsystems to be adjusted in a coordinated manner, ultimately significantly improving the overall robustness and adaptability of the system in the face of complex and unsteady industrial environments.

[0030] The defect identification module also includes a feature extraction unit, which uses a residual network to extract multi-scale defect features. Specifically, this unit is accomplished by implementing the basic unit of residual learning—the residual block. Its core operation consists of a shortcut connection and a residual mapping, mathematically expressed as follows: ; in, and These represent the input and output feature maps of the residual block, respectively. This represents the residual mapping that needs to be learned. These represent the weight parameters of the convolutional layers. For indexing; By introducing the above residual learning formula and the deep network it constitutes, this system can stably and efficiently extract and fuse multi-scale features of glass coating surface defects from micro to macro. Furthermore, the accuracy of identifying minute defects is enhanced through an attention mechanism unit.

[0031] The output module also includes an alarm unit. When a defect size is detected to exceed a preset threshold, an alarm signal is output through an audible and visual alarm, and automatic sorting is achieved in conjunction with the production line control system.

[0032] The system also includes a real-time monitoring module, which receives raw image data from the image acquisition module, temporarily stores the image stream through the frame buffer unit, detects system latency using the latency analysis unit, and outputs system real-time performance indicators through the performance evaluation unit.

[0033] The frame buffer unit of the real-time monitoring module adopts a circular buffer structure, and the delay analysis unit calculates the image processing delay through timestamps. The specific implementation method is as follows: The system generates high-precision timestamps through hardware and the operating system kernel at the following key stages of the image processing chain: Data collection completion point When the camera sensor of the image acquisition module finishes reading the data of a frame of image and storing it in the memory buffer; Preprocessing completion point When the image preprocessing module completes processing and outputs the image frame; Identify completion point When the deep learning model of the defect identification module completes inference and outputs defect category and location information; Result output point When the result output module completes result encapsulation, logging, and triggering external signals; The core formula for delayed computation is as follows: The system calculates the total processing latency and the sub-latencies of each stage. Among these, the end-to-end total latency is the most critical real-time performance indicator, and its calculation formula is as follows: ; in, and These represent the timestamps for data collection completion and result output, respectively. This is the calculated total processing delay. Indicates time; Workflow and role within the system: Synchronization and logging: After completing their phase tasks, all processing modules immediately send a timestamped event signal to the delay analysis unit, which uses a monotonic clock source to ensure time consistency across cores and processes. Calculation and Analysis: The unit is calculated according to the above formula. Meanwhile, the delays at each stage are calculated to perform fine-grained performance profiling. Output and Decision: The resulting delay data It is sent to the performance evaluation unit in real time, when If the real-time threshold is exceeded, the system will trigger an alarm and the adaptive optimization module will dynamically adjust the processing strategy to ensure that the real-time requirements of online detection are continuously met. The performance evaluation unit generates system optimization suggestions based on throughput and accuracy.

[0034] The operation steps of a machine vision-based online glass defect identification system are as follows: Step 1: Image Acquisition and Illumination Control The system continuously captures images of the moving glass coating surface using a high-resolution industrial camera. To reduce environmental interference, an illumination control unit composed of an adjustable LED array and a photometric sensor monitors changes in ambient light in real time and dynamically adjusts the intensity and angle of the light source to ensure that the acquired images have uniform illumination and high contrast characteristics. The image data is transmitted to the processing terminal via gigabit Ethernet protocol to form a raw image database. During this process, the interference suppression unit of the environmental adaptive module uses a Kalman filter algorithm to predict and compensate for illumination fluctuations, ensuring image quality stability.

[0035] Step 2: Multi-cascade image preprocessing: The raw image data first enters the denoising unit, where a wavelet transform algorithm is used for multi-scale decomposition: after separating the high-frequency details of the image from the low-frequency background, the high-frequency coefficients representing noise are subjected to soft threshold shrinkage processing to suppress random noise while preserving the integrity of defect edges. Subsequently, the enhancement unit divides the image into local blocks and independently calculates gray-level histograms by limiting the contrast adaptive histogram equalization algorithm. By limiting the local contrast increase, the excessive enhancement of background texture is reduced, and the visibility of small scratches and low-contrast defects is improved. Finally, edge-preserving smoothing processing is performed through a bilateral filter. By coordinating the spatial distance weight and gray-level similarity weight, residual noise is eliminated while ensuring that the defect contour is not blurred.

[0036] Step 3: Deep Feature Extraction and Defect Identification The preprocessed image input is based on a deep learning model with a Faster R-CNN architecture. In this stage, a potential defect candidate box is first generated through a region proposal network, and then a residual network is used for multi-scale feature extraction: the shallow network captures the pixel-level features of tiny point defects, the deep network identifies the semantic features of macroscopic linear defects, and by introducing an attention mechanism, the model adaptively strengthens the feature weights of defect regions, improving the sensitivity to easily overlooked targets such as pinholes and micro-scratches. The classification unit uses a multilayer perceptron and a softmax function to output the defect type, and the localization unit accurately calibrates the defect coordinates through a bounding box regression algorithm.

[0037] Step 4: Result Fusion and Adaptive Optimization The identification results enter the data fusion unit, which generates a structured report by integrating the defect location, type, and pixel size information. The visualization unit displays the defects in three dimensions on the user interface using the OpenGL library. When an out-of-limit defect is detected, the alarm unit triggers an audible and visual warning and links the sorting mechanism. At the same time, the environment adaptation module continues to operate: the calibration unit dynamically adjusts the detection threshold based on historical false alarm rate data and optimizes the discrimination criteria as the production process drifts through an online learning mechanism. The feedback unit, based on a reinforcement learning framework, uses detection accuracy, false alarm rate, and processing latency as reward indicators to autonomously adjust image preprocessing parameters and model inference strategies, thereby achieving closed-loop optimization of system parameters.

[0038] Step 5: Full-process monitoring and performance evaluation: The real-time monitoring module temporarily stores the image stream through a circular buffer. The delay analysis unit embeds high-precision timestamps at four key nodes: acquisition, preprocessing, recognition, and output. It calculates the end-to-end processing delay and determines whether it exceeds the limit. The performance evaluation unit comprehensively analyzes the throughput, recognition accuracy, and resource utilization indicators. When it detects a decrease in system efficiency, it automatically generates parameter adjustment suggestions to ensure that online detection meets the production line cycle time requirements. This monitoring mechanism works in conjunction with the adaptive optimization module to jointly ensure the stability and reliability of the system during long-term operation.

[0039] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0040] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A machine vision-based online glass defect identification system, characterized in that, include: The image acquisition module uses a high-resolution camera unit to acquire image data of the glass coating surface, adjusts the ambient light through the illumination control unit to reduce interference, and outputs the raw image data through the image transmission unit. The image preprocessing module receives the original image data, removes noise using a median filtering algorithm through a denoising unit, improves image contrast through histogram equalization using an enhancement unit, and outputs preprocessed image data through a filtering unit. The defect identification module receives the preprocessed image data, performs defect detection using a convolutional neural network through a deep learning model unit, identifies the defect type using a classification unit based on a softmax function, and outputs the defect location coordinates through a localization unit. The result output module receives the defect location coordinates and defect type, calculates the defect size through the data fusion unit, generates a structured inspection report through the report generation unit, and displays the real-time results on the user interface through the visualization unit. The environment adaptive module receives the real-time results and environmental sensor data, uses an adaptive filtering algorithm through the interference suppression unit to reduce the impact of environmental fluctuations, dynamically adjusts the detection threshold parameters through the calibration unit, and optimizes the system performance parameters based on historical data through the feedback unit.

2. The online glass defect identification system based on machine vision according to claim 1, characterized in that: The high-resolution camera unit of the image acquisition module includes a CCD sensor and a telecentric optical lens, the illumination control unit includes an adjustable LED array and a photometric sensor, and the image transmission unit uses the Gigabit Ethernet protocol to transmit the raw image data.

3. The online glass defect identification system based on machine vision according to claim 1, characterized in that: The image preprocessing module's denoising unit uses a wavelet transform algorithm for noise suppression, the enhancement unit improves image details through a contrast-limited adaptive histogram equalization algorithm, and the filtering unit includes a Gaussian filter and a bilateral filter to output smooth preprocessed image data.

4. The online glass defect identification system based on machine vision according to claim 1, characterized in that: The deep learning model unit of the defect identification module proposes defect regions based on the Faster R-CNN architecture. The classification unit uses a multilayer perceptron network to identify defect types, including scratches, bubbles, and stains. The localization unit outputs the accurate coordinates of the defects through bounding box regression.

5. The online glass defect identification system based on machine vision according to claim 1, characterized in that: The data fusion unit of the result output module integrates defect location, type, and size information; the report generation unit outputs the inspection report in XML format; and the visualization unit uses the OpenGL library to achieve three-dimensional overlay display of defect results.

6. The online glass defect identification system based on machine vision according to claim 1, characterized in that: The interference suppression unit of the environment adaptive module uses a Kalman filter algorithm to compensate for changes in ambient light, the calibration unit dynamically updates the detection threshold through an online learning mechanism, and the feedback unit optimizes system parameters based on a reinforcement learning algorithm.

7. The online glass defect identification system based on machine vision according to claim 1, characterized in that: The defect identification module also includes a feature extraction unit, which uses a residual network to extract multi-scale defect features and uses an attention mechanism unit to enhance the identification accuracy of minute defects.

8. The online glass defect identification system based on machine vision according to claim 1, characterized in that: The result output module also includes an alarm unit. When the detected defect size exceeds a preset threshold, an alarm signal is output through an audible and visual alarm, and automatic sorting is achieved in conjunction with the production line control system.

9. The online glass defect identification system based on machine vision according to claim 1, characterized in that: The system also includes a real-time monitoring module, which receives the raw image data from the image acquisition module, temporarily stores the image stream through a frame buffer unit, detects system latency using a latency analysis unit, and outputs system real-time performance indicators through a performance evaluation unit.

10. The online glass defect identification system based on machine vision according to claim 9, characterized in that: The frame buffer unit of the real-time monitoring module adopts a circular buffer structure, the latency analysis unit calculates the image processing latency through timestamps, and the performance evaluation unit generates system optimization suggestions based on throughput and accuracy.