Search

CN-121861027-B - Glass surface defect detection method and system based on visual detection

CN121861027BCN 121861027 BCN121861027 BCN 121861027BCN-121861027-B

Abstract

The invention relates to the technical field of glass detection, in particular to a glass surface defect detection method and system based on visual detection, comprising the steps of comparing an initial gray image set with a preset static defect characteristic template library, and detecting whether the initial gray image set accords with primary matching; and dynamically adjusting the focal length of the liquid lens and the emergent angle of the polarized light source according to the geometric shape parameter and the initial position coordinate in the initial defect characteristic information, and optimizing the optical parameters of the defect area of the glass surface. The invention dynamically adjusts the optical parameters by utilizing the preliminary defect characteristic information, so that the optimal imaging effect can be obtained under different conditions, and the defect can be identified more clearly.

Inventors

  • WANG YONGGUANG
  • Ning Bingjun
  • WANG TIANBAO

Assignees

  • 安徽兰迪节能玻璃有限公司

Dates

Publication Date
20260512
Application Date
20260313

Claims (10)

  1. 1. The glass surface defect detection method based on visual detection is characterized by comprising the following steps of: Acquiring full-image images of a glass substrate in transmission through a multi-view industrial camera array to obtain an initial gray image set of the glass surface, wherein the multi-view industrial camera array comprises a linear array camera and an area array camera, the linear array camera is used for capturing glass edge contour information, and the area array camera is used for capturing glass main body texture information; comparing the initial gray image set with a preset static defect characteristic template library, and detecting whether the initial gray image set accords with primary matching, wherein the primary matching comprises edge contour matching, texture gray contrast and specific shape geometric matching; if the primary matching performance is not met, extracting preliminary defect characteristic information of the glass surface according to an initial gray level image set, wherein the preliminary defect characteristic information comprises gray level contrast, geometric shape parameters and initial position coordinates of defects; Dynamically adjusting the focal length of the liquid lens and the emergent angle of the polarized light source according to the geometric shape parameter and the initial position coordinate in the preliminary defect characteristic information, and optimizing the optical parameters of the defect area on the surface of the glass; Inputting the refined texture image and the depth image into a depth feature extraction model to extract a current depth feature vector, wherein the current depth feature vector comprises color space distribution, texture complexity and local gradient direction; If the depth feature vector meets the high-level matching property, judging that the glass surface has defects, and adding the current depth feature vector and the corresponding acquisition time parameter into a dynamic defect feature library.
  2. 2. The visual inspection-based glass surface defect detection method of claim 1, further comprising: according to the refined texture image and the depth image and combining the gray contrast in the preliminary defect characteristic information, constructing a three-dimensional topology reconstruction model of the glass surface defect; Calculating the volume parameters and edge sharpness of the defects according to the three-dimensional topological reconstruction model; inputting the volume parameter, the edge sharpness and the current depth feature vector into a pre-trained defect classification neural network, and outputting probability distribution of defects; And according to the probability distribution and the use field Jing Canshu of the glass substrate, inquiring a preset grade mapping table, and determining the final defect grade of the glass surface.
  3. 3. The visual inspection-based glass surface defect detection method according to claim 2, wherein constructing a three-dimensional topology reconstruction model of glass surface defects from the refined texture image and the depth image in combination with gray contrast in the preliminary defect feature information comprises: Mapping the refined texture image to a surface grid of the three-dimensional topological reconstruction model to obtain texture map data; Converting the depth image into high field data of a three-dimensional topological reconstruction model, and correcting noise interference of the high field according to gray contrast in the primary defect characteristic information; according to the texture mapping data and the corrected height field data, iteratively calculating the surface normal vector and curvature change of the defect area; And determining the three-dimensional topological connectivity of the defects according to the normal vector and curvature change of the surface, and generating a three-dimensional topological reconstruction model.
  4. 4. The method for detecting glass surface defects based on visual inspection according to claim 3, wherein the method further comprises, before performing high-frame-rate image tracking acquisition on the defect area according to the multi-view industrial camera array after the optimization of the optical parameters and obtaining the refined texture image and the depth image of the defect area: judging whether the defect is in a field overlapping blind area of an adjacent camera or not according to the geometric shape parameter in the preliminary defect characteristic information; If yes, calculating a blind area compensation angle according to the geometric shape parameters, and controlling a specific camera in the multi-view industrial camera array to perform micro-displacement or rotation until the defect completely enters a field of view overlapping area; According to the camera gesture after displacement or rotation, recalibrating an image acquisition coordinate system to generate a calibrated acquisition area mapping table; The method for tracking and collecting the high-frame-rate image of the defect area according to the multi-view industrial camera array after the optical parameter optimization comprises the following steps: and controlling the multi-view industrial camera array with optimized optical parameters to track and collect the high-frame-rate image of the defect area according to the calibrated collection area mapping table.
  5. 5. The method for detecting glass surface defects based on visual inspection according to claim 4, wherein the validity period of the latest dynamic defect feature library is within a preset production time sliding window corresponding to the acquisition time parameter; Detecting whether the current depth feature vector accords with the high-level matching performance or not with the latest dynamic defect feature library comprises the following steps: identifying whether the latest dynamic defect feature library contains adjacent feature vectors belonging to the same cluster as the current depth feature vector; comparing whether the density value of the adjacent feature vector in the dynamic defect feature library exceeds the corresponding density threshold value; and when the corresponding density threshold is exceeded and the confidence of the current depth feature vector is lower than the average confidence in the library, determining that the current depth feature vector meets the high-level matching.
  6. 6. The visual inspection-based glass surface defect detection method of claim 5, further comprising: Re-extracting a historical depth feature vector corresponding to a historical image frame which is not judged to be defective in the production time sliding window; calculating feature space distances between the historical depth feature vectors and feature vectors in the latest dynamic defect feature library; judging a historical image frame corresponding to a historical depth feature vector with the feature space distance smaller than a preset distance threshold value as a missing defect image; and updating the dynamic defect feature library according to the historical depth feature vector of the detected defect image.
  7. 7. The visual inspection-based glass surface defect detection method of claim 6, further comprising: Reversely adjusting exposure time and gain parameters of the multi-view industrial camera array according to the volume parameters and the edge sharpness corresponding to the final defect level; If the final defect level is a serious level, controlling a sorting mechanism of the glass transmission line body to accurately reject according to the defect position coordinates in the three-dimensional topological reconstruction model; if the final defect grade is a slight grade, calculating laser energy required by repairing according to the volume parameter of the defect, and controlling the laser repairing equipment to perform in-situ repairing.
  8. 8. The method for detecting glass surface defects based on visual inspection according to claim 7, wherein if the final defect level is a severity level, controlling a sorting mechanism of a glass transmission line body to perform accurate rejection according to the defect position coordinates in the three-dimensional topology reconstruction model, comprising: Acquiring real-time running speed and acceleration information of a glass transmission line body; Predicting the time delay of the defect to the sorting mechanism according to the position coordinates of the defect and the real-time running speed of the line body; calculating an advance offset according to the time delay and the action response time of the sorting mechanism; and controlling the opening time of a pneumatic valve of the sorting mechanism according to the advance offset, and removing the glass substrate with serious defects to a waste area.
  9. 9. The visual inspection-based glass surface defect detection method of claim 8, further comprising: acquiring a glass surface image sample set, wherein the glass surface image sample set comprises a true defect label and a defect-free label; Extracting multi-scale defect characteristics from an image sample set; Constructing a static defect feature template library based on the extracted multi-scale defect features; And performing on-line fine adjustment on the depth feature extraction model according to the image frame determined to be the defect, and using the depth feature extraction model after fine adjustment for feature extraction of the current image frame next time.
  10. 10. A visual inspection-based glass surface defect detection system adapted for use in the visual inspection-based glass surface defect detection method according to any one of claims 1 to 9, comprising: The system comprises an image acquisition unit, a glass main body texture information acquisition unit and a glass main body texture information acquisition unit, wherein the image acquisition unit is used for carrying out full-image acquisition on a glass substrate in transmission through a multi-view industrial camera array to acquire an initial gray image set of the glass surface, and the multi-view industrial camera array comprises a linear camera and an area camera; The image comparison unit is used for comparing the initial gray image set with a preset static defect characteristic template library and detecting whether the initial gray image set accords with primary matching performance or not, wherein the primary matching performance comprises edge contour matching, texture gray contrast and specific shape geometric matching; the defect extraction unit is used for extracting preliminary defect characteristic information of the glass surface according to the initial gray level image set if the preliminary defect characteristic information does not accord with the primary matching property, wherein the preliminary defect characteristic information comprises gray level contrast, geometric shape parameters and initial position coordinates of defects; The parameter optimization unit is used for dynamically adjusting the focal length of the liquid lens and the emergent angle of the polarized light source according to the geometric shape parameter and the initial position coordinate in the preliminary defect characteristic information, and carrying out optical parameter optimization on the defect area of the glass surface; The vector extraction unit is used for inputting the refined texture image and the depth image into the depth feature extraction model to extract a current depth feature vector, wherein the current depth feature vector comprises color space distribution, texture complexity and local gradient direction; and the defect matching unit is used for judging that the glass surface has defects if the glass surface meets the high-level matching property, and adding the current depth feature vector and the corresponding acquisition time parameter into the dynamic defect feature library.

Description

Glass surface defect detection method and system based on visual detection Technical Field The invention relates to the technical field of glass detection, in particular to a glass surface defect detection method and system based on visual detection. Background At present, many traditional detection methods rely on a single visual angle to capture images, so that the detection range of defects on the surface of glass is limited, and defects which are difficult to identify by the single visual angle can be missed to be detected, moreover, the traditional methods are unstable in performance under different illumination conditions, cannot dynamically adjust optical parameters to adapt to environmental changes so as to influence imaging quality and accuracy of defect identification, and the traditional methods generally adopt a simpler feature extraction technology, cannot deeply analyze the complexity of the defects, and cannot realize efficient matching and classification. In addition, due to the fact that systematic data analysis and historical image utilization are not available, the traditional method is prone to miss detection and possibly causes defective products to flow into the market, and moreover, a traditional detection system often lacks real-time feedback, and detection strategies are difficult to adjust in time according to new conditions in the production process. Disclosure of Invention In order to achieve the above purpose, the invention provides a glass surface defect detection method based on visual detection, which comprises the following steps: Acquiring full-image images of a glass substrate in transmission through a multi-view industrial camera array to obtain an initial gray image set of the glass surface, wherein the multi-view industrial camera array comprises a linear array camera and an area array camera, the linear array camera is used for capturing glass edge contour information, and the area array camera is used for capturing glass main body texture information; comparing the initial gray image set with a preset static defect characteristic template library, and detecting whether the initial gray image set accords with primary matching, wherein the primary matching comprises edge contour matching, texture gray contrast and specific shape geometric matching; if the primary matching performance is not met, extracting preliminary defect characteristic information of the glass surface according to an initial gray level image set, wherein the preliminary defect characteristic information comprises gray level contrast, geometric shape parameters and initial position coordinates of defects; Dynamically adjusting the focal length of the liquid lens and the emergent angle of the polarized light source according to the geometric shape parameter and the initial position coordinate in the preliminary defect characteristic information, and optimizing the optical parameters of the defect area on the surface of the glass; Inputting the refined texture image and the depth image into a depth feature extraction model to extract a current depth feature vector, wherein the current depth feature vector comprises color space distribution, texture complexity and local gradient direction; If the depth feature vector meets the high-level matching property, judging that the glass surface has defects, and adding the current depth feature vector and the corresponding acquisition time parameter into a dynamic defect feature library. Preferably, the method further comprises: according to the refined texture image and the depth image and combining the gray contrast in the preliminary defect characteristic information, constructing a three-dimensional topology reconstruction model of the glass surface defect; Calculating the volume parameters and edge sharpness of the defects according to the three-dimensional topological reconstruction model; inputting the volume parameter, the edge sharpness and the current depth feature vector into a pre-trained defect classification neural network, and outputting probability distribution of defects; And according to the probability distribution and the use field Jing Canshu of the glass substrate, inquiring a preset grade mapping table, and determining the final defect grade of the glass surface. Preferably, the method for constructing the three-dimensional topological reconstruction model of the glass surface defect according to the refined texture image and the depth image and combining the gray contrast in the preliminary defect characteristic information comprises the following steps: Mapping the refined texture image to a surface grid of the three-dimensional topological reconstruction model to obtain texture map data; Converting the depth image into high field data of a three-dimensional topological reconstruction model, and correcting noise interference of the high field according to gray contrast in the primary defect characteristic information; according to the te