Glass sheet cleanliness detection method and system
Through the machine vision detection system, the feature points of glass sheets are extracted and matched using PFAST and BEBLID algorithms, which solves the problems of artificial error and low efficiency of traditional detection methods, and achieves high-precision glass sheet cleanliness detection.
Patent Information
- Application Number
- CN202410801706.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-11-15
AI Technical Summary
Traditional glass sheet cleanliness detection methods have problems of artificial error and low detection efficiency, and cannot effectively detect tiny pollutants or surface chemical reactions.
Using a detection system based on machine vision, the feature points of blank image of glass sheets are extracted through the PFAST algorithm, the feature points are described by the BEBLID algorithm, and the feature matching algorithm is used to match the feature points of the blank image with the defective image feature points in the FLANN library. , improve detection accuracy.
It improves the accuracy and efficiency of glass sheet cleanliness detection, reduces the time of image processing and feature extraction, and can effectively detect tiny pollutants and surface chemical reactions.
Smart Images

Figure CN118961706A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cleanliness detection, and in particular to a method and system for detecting the cleanliness of a glass sheet. Background Art
[0002] Traditional glass cleanliness detection methods are mostly manual methods or rely on detection instruments (microscopes) to measure one by one, rely on manual readings, are prone to human errors, and have low detection efficiency. The simplest method is to evaluate the cleanliness of the glass surface through visual inspection. Observe whether there are stains, spots, grease, dust and other impurities on the glass surface. This method is suitable for more obvious pollution, but it cannot detect tiny pollutants or surface chemical reactions. Secondly, the wettability and cleanliness are evaluated by measuring the contact angle of water droplets on the glass surface. A smaller contact angle indicates that the surface is clean and has good wettability. The contact angle measurement can be performed using a contact angle meter or a simple water drop placement method. This paper designs a precision detection system inspection based on machine vision for the cleanliness detection of square glass sheets. The principle is: it uses hardware to collect images and obtains the parameters of the object to be tested through operations such as image processing. It can detect glass sheets of different shapes and sizes, and the environmental requirements are not high.
[0003] To this end, patent CN201210032391.6 discloses a glass substrate cleanliness detection method and device. The invention provides a measurement method and device that accurately measures the contact angle formed by a droplet on a glass substrate, and indirectly determines the cleanliness of the glass plate through the contact angle parameters.
[0004] To this end, patent CN202310723426.9 discloses a method and device for detecting surface defects of a glass substrate. The measurement method and equipment provided by the invention extract the features of the defect image through the image information of the entire plate, compare the feature values of the defect image, and determine the location of the defect based on the comparison results. Summary of the invention
[0005] The purpose of this application is to provide a glass sheet cleanliness detection method and system. The feature points of the blank image are described by using the BEBLID algorithm; the feature points of the blank image of the glass sheet are matched with the feature points of the defective image of the glass sheet in the FLANN library by using the feature matching algorithm, so as to improve the matching rate of the image and improve the accuracy of the cleanliness detection of the glass sheet.
[0006] In a first aspect, the present application provides a method for detecting cleanliness of a glass sheet, the method comprising the following steps:
[0007] Collecting a blank image of a glass sheet as an image to be identified;
[0008] The PFAST algorithm (particle swarm optimization fast search algorithm) is used to extract the feature points of the blank image of the glass sheet;
[0009] The BEBLID algorithm is used to describe the feature points of the blank image;
[0010] The feature matching algorithm is used to match the feature points of the glass blank image with the feature points of the glass defect image in the FLANN library;
[0011] According to the matching results of the feature matching algorithm, the cleanliness test results of the glass sheet are output.
[0012] Optionally, the method for extracting the defect feature points is:
[0013] Taking the glass sheet image, including the pixel point p in the glass sheet blank pattern and the glass sheet defect image as the center of the circle, a number of pixels are evenly selected on the circumference. If the pixel values of n consecutive pixels among the number of pixels and the pixel center point p are all greater than a preset threshold, then the pixel point p is a defect feature point of the glass sheet, otherwise the pixel point is not a defect feature point of the glass sheet; wherein n≥1.
[0014] Optionally, the describing the feature points of the blank image by using the BEBLID algorithm specifically includes:
[0015] Select N pairs of square areas with a side length of S and centered on the feature point as sampling pairs, initialize the preset threshold of each feature learner, and calculate the average grayscale difference of the sampling pair area through the feature extraction function.
[0016] Optionally, the feature extraction function is:
[0017]
[0018] Where f(x) is the feature extraction function; I(q) is the grayscale value of pixel q; I(r) is the grayscale value of pixel r; R(p,s) is the rectangular border centered at pixel p with a side length of s.
[0019] Optionally, the loss function of the feature learner is:
[0020]
[0021] Among them, γ is the unified weight of all feature learners, which is 0.0055; l i ∈{-1.1}; h k (x) is the kth feature learner.
[0022] Optionally, the expression of the k-th feature learner is:
[0023]
[0024] Among them, T is the preset threshold of the feature learner.
[0025] Optionally, the feature matching algorithm is used to match the feature points of the blank image of the glass sheet with the feature points of the defective image of the glass sheet in the FLANN library, specifically:
[0026] Calculate the Euclidean distance between the feature point p of the blank image of the glass sheet and the feature point of the defect image to find the feature point p of the blank image corresponding to the feature point of the defect image of the glass sheet in the FLANN database;
[0027] All Euclidean distances D are stored through the KD-TREE structure to obtain the matching point pair set of the feature point p of the blank image of the glass sheet;
[0028] The calculation formula of Euclidean distance D is:
[0029]
[0030] Where D is the Euclidean distance between two feature points; (x, y) is the pixel coordinates of the feature points; X i ,Y i is the value of the pixel coordinate in the i-th space;
[0031] Recursively search the matching point pair set from top to bottom to obtain the feature point q corresponding to the minimum Euclidean distance and obtain the matching point pair (p,q);
[0032] Match the feature points of the blank image of the glass sheet one by one;
[0033] The similarity of the matching point pairs is calculated, and the feature points are sorted according to the similarity; if the integrity is lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be unqualified; if the integrity is not lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be qualified.
[0034] A second aspect of the present invention provides a glass sheet cleanliness detection system, the system comprising a conveyor belt, a mechanical arm, a detection base, a lighting device, an industrial camera, and a microcomputer;
[0035] The conveyor belt is used to convey the glass piece to be inspected;
[0036] The mechanical arm is used to clamp the glass sheet to be tested on the conveyor belt and place it on the testing base;
[0037] The lighting device is used to provide lighting for the glass sheet to be inspected, so that the industrial camera can collect a blank image of the glass sheet to be inspected;
[0038] The microcomputer is used to control the operation of the conveyor belt, the movement of the mechanical arm, the lighting of the lighting device, and the industrial camera to collect the blank image of the glass sheet to be detected and receive the blank graphic information of the glass sheet;
[0039] The microcomputer performs a glass sheet cleanliness detection method, including:
[0040] Collecting a blank image of a glass sheet as an image to be identified;
[0041] The PFAST algorithm (particle swarm optimization fast search algorithm) is used to extract the feature points of the blank image of the glass sheet;
[0042] The BEBLID algorithm is used to describe the feature points of the blank image;
[0043] The feature matching algorithm is used to match the feature points of the glass blank image with the feature points of the glass defect image in the FLANN library;
[0044] According to the matching results of the feature matching algorithm, the cleanliness test results of the glass sheet are output.
[0045] Optionally, the method for extracting the defect feature points is:
[0046] Taking the pixel point p in the glass sheet image (including the glass sheet blank image and the glass sheet defect image) as the center of the circle, a number of pixels are evenly selected on the circumference. If the pixel values of n consecutive pixels among the number of pixels and the pixel center point p are all greater than a preset threshold, the pixel point p is a defect feature point of the glass sheet, otherwise the pixel point is not a defect feature point of the glass sheet;
[0047] Where n≥1;
[0048] The description of the feature points of the blank image by using the BEBLID algorithm specifically includes:
[0049] Select N pairs of square areas with a side length of S and centered on the feature point as sampling pairs, initialize the preset threshold of each feature learner, and calculate the average grayscale difference of the sampling pair area through the feature extraction function.
[0050] Optionally, the feature matching algorithm is used to match the feature points of the blank image of the glass sheet with the feature points of the defective image of the glass sheet in the FLANN library, specifically:
[0051] Calculate the Euclidean distance between the feature point p of the blank image of the glass sheet and the feature point of the defect image to find the feature point p of the blank image corresponding to the feature point of the defect image of the glass sheet in the FLANN database;
[0052] All Euclidean distances D are stored through the KD-TREE structure to obtain the matching point pair set of the feature point p of the blank image of the glass sheet;
[0053] Recursively search the matching point pair set from top to bottom to obtain the feature point q corresponding to the minimum Euclidean distance and obtain the matching point pair (p,q);
[0054] Match the feature points of the blank image of the glass sheet one by one;
[0055] The similarity of the matching point pairs is calculated, and the feature points are sorted according to the similarity; if the integrity is lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be unqualified; if the integrity is not lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be qualified.
[0056] As can be seen from the above, the present application provides a glass sheet cleanliness detection method and system. The present application extracts the feature points of the glass sheet blank image by the PFAST algorithm to reduce the image processing and feature extraction time; describes the feature points of the blank image by using the BEBLID algorithm; and uses the feature matching algorithm to match the feature points of the glass sheet blank image with the feature points of the glass sheet defect image in the FLANN library. This improves the image matching rate and the accuracy of glass sheet cleanliness detection.
[0057] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0059] Figure 1 A flow chart of a glass sheet cleanliness detection method provided in an embodiment of the present application.
[0060] Figure 2 A schematic diagram of a glass sheet cleanliness detection system provided in an embodiment of the present application.
[0061] Figure 3 Schematic diagram of the spray cleaning device provided in an embodiment of the present application.
[0062] Figure 4Schematic diagram of a glass sheet substrate cleaning device provided in an embodiment of the present application.
[0063] Figure 5 Schematic diagram of a drying device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0065] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0066] Please refer to Figure 1 , is a flow chart of a glass sheet cleanliness detection method in some embodiments of the present application. The method comprises the following steps:
[0067] S102: Collecting a blank image of a glass sheet as an image to be recognized;
[0068] S104: extracting feature points of the blank image of the glass sheet using a particle swarm optimization fast search algorithm (PFAST algorithm);
[0069] S106: Describing the feature points of the blank image using the BEBLID algorithm;
[0070] S108: Matching feature points of the blank image of the glass sheet with feature points of the defective image of the glass sheet in the FLANN library using a feature matching algorithm;
[0071] S110: Outputting the glass sheet cleanliness detection result according to the matching result of the feature matching algorithm.
[0072] It should be noted that the PFAST algorithm, i.e., the particle swarm optimization fast search algorithm, is a heuristic algorithm for solving discrete optimization problems. It is an improved version of the particle swarm optimization algorithm, which aims to converge to the global optimal solution faster. The algorithm is usually used to solve problems such as task allocation, path planning and scheduling.
[0073] The BEBLID (Batch Gradient Boosting with Learning Rate Adaptation and Individualized Data Augmentation) algorithm is an algorithm for solving large-scale machine learning problems. It is an optimization algorithm based on gradient descent that minimizes the loss function by iteratively updating the parameters of the model. The BEBLID algorithm combines the advantages of batch gradient descent (BGD) and adaptive learning rate (ALR), which can effectively accelerate the learning process and improve the stability of model training. The core idea of the BEBLID algorithm is to divide a batch of samples into two parts in each iteration, one part is used to calculate the gradient and use ALR to adjust the learning rate, and the other part is used to estimate the uncertainty of the model and the initial update of the parameters. The algorithm gradually optimizes the parameters of the model and the learning rate of the parameters, and finally reaches convergence and obtains the optimal model parameters.
[0074] FLANN is the Fast Library for Approximate Nearest Neighbors, which is the most complete (approximate) nearest neighbor open source library. It not only implements a series of search algorithms, but also includes a mechanism to automatically select the fastest algorithm.
[0075] According to an embodiment of the present invention, the method for extracting defect feature points is:
[0076] Taking the pixel point p in the glass sheet image (including the glass sheet blank image and the glass sheet defect image) as the center of the circle, a number of pixels are evenly selected on the circumference. If the pixel values of n consecutive pixels among the number of pixels and the pixel center point p are all greater than a preset threshold, the pixel point p is a defect feature point of the glass sheet, otherwise the pixel point is not a defect feature point of the glass sheet;
[0077] Wherein, n≥1. In the present application, n=16.
[0078] According to an embodiment of the present invention, the description of the feature points of the blank image by using the BEBLID algorithm specifically includes:
[0079] Select N pairs of square areas with a side length of S and centered on the feature point as sampling pairs, initialize the preset threshold of each feature learner, and calculate the average grayscale difference of the sampling pair area through the feature extraction function.
[0080] It should be noted that the feature learner requires a large number of glass sheet images to be constructed, and can also be constructed by directly collecting standard images.
[0081] It should be noted that the preset threshold of the feature learner is given by a training set, which is generally determined from previous measurements or literature.
[0082] According to an embodiment of the present invention, the feature extraction function is:
[0083]
[0084] Where f(x) is the feature extraction function; I(q) is the grayscale value of pixel q; I(r) is the grayscale value of pixel r; R(p,s) is the rectangular border centered at pixel p with a side length of s.
[0085] According to an embodiment of the present invention, the loss function of the feature learner is:
[0086]
[0087] Among them, γ is the unified weight of all feature learners, which is 0.0055; l i ∈{-1.1}; h k (x) is the kth feature learner.
[0088] It should be noted that for the loss function of the feature learner, this application continuously iterates p1, p2, s through the adaptive boost (AdaBoost) algorithm, and trains the feature learner and the loss function L. During the training process, the loss is minimized, the loss function is continuously optimized, and k feature learners with the smallest loss function are obtained and combined to obtain the feature learner.
[0089] According to an embodiment of the present invention, the expression of the k-th feature learner is:
[0090]
[0091] Among them, T is the preset threshold of the feature learner.
[0092] According to an embodiment of the present invention, the feature matching algorithm is used to match the feature points of the blank image of the glass sheet with the feature points of the defective image of the glass sheet in the FLANN library, specifically:
[0093] Calculate the Euclidean distance between the feature point p of the blank image of the glass sheet and the feature point of the defect image to find the feature point p of the blank image corresponding to the feature point of the defect image of the glass sheet in the FLANN database;
[0094] All Euclidean distances D are stored through the KD-TREE structure to obtain the matching point pair set of the feature point p of the blank image of the glass sheet;
[0095] The calculation formula of Euclidean distance D is:
[0096]
[0097] Where D is the Euclidean distance between two feature points; (x, y) is the pixel coordinates of the feature points; X i ,Y i is the value of the pixel coordinate in the i-th space.
[0098] Recursively search the matching point pair set from top to bottom to obtain the feature point q corresponding to the minimum Euclidean distance and obtain the matching point pair (p,q);
[0099] Match the feature points of the blank image of the glass sheet one by one;
[0100] The similarity of the matching point pairs is calculated, and the feature points are sorted according to the similarity; if the integrity is lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be unqualified; if the integrity is not lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be qualified.
[0101] It should be noted that this application optimizes the loss function and obtains the feature learner h k After (x), -1 is converted to 0 and +1 is converted to 1, and the vector D(x) is obtained, which is the BEBLID descriptor. This descriptor is the average gray value difference of a series of pixels in the feature point area, mainly containing gray value information.
[0102] The feature matching algorithm of the present application is implemented based on the KD-TREE operation. The feature space where the feature point is located is the n-dimensional real vector space Rn. The feature point corresponding to the feature point p is found by calculating the Euclidean distance between the feature point p of the target glass sheet recognition image and the feature point of the defect image. The calculation formula is:
[0103]
[0104] Where D is the Euclidean distance between two feature points; (x, y) is the pixel coordinates of the feature points; X i ,Y iis the value of the pixel coordinate in the i-th space. All Euclidean distances D are stored in the KD-TREE structure to obtain the matching point pair set of feature point p. The matching point pair set is recursively searched from top to bottom to obtain the feature point q corresponding to the minimum D, and the matching point pair (p, q) is obtained. The above operation is performed on each feature point to match the feature points of the glass sheet one by one.
[0105] By pairing feature points and sorting them according to similarity, for example, the best similar feature points can be calculated through the defective / intact feature points of the glass piece, and then the output can be used to determine whether the detected glass piece is a defective glass piece or a complete glass piece. The defective glass piece can be picked out through the subsequent sorting system.
[0106] According to an embodiment of the present invention, the system includes a conveyor belt 21, a mechanical arm 22, a detection base 23, a lighting device 24, an industrial camera 25, and a microcomputer 26;
[0107] The conveyor belt 21 is used to convey the glass sheet to be inspected;
[0108] The mechanical arm 22 is used to clamp the glass piece to be tested on the conveyor belt and place it on the testing base 23;
[0109] The lighting device 24 is used to provide lighting for the glass sheet to be inspected, so that the industrial camera 25 can collect a blank image of the glass sheet to be inspected;
[0110] The microcomputer 26 is used to control the operation of the conveyor belt 21, the movement of the mechanical arm 22, the lighting of the lighting device 24, and the industrial camera 25 to collect the blank image of the glass sheet to be detected and receive the blank graphic information of the glass sheet;
[0111] The microcomputer 25 executes a glass sheet cleanliness detection method, including:
[0112] S102: Collecting a blank image of a glass sheet as an image to be recognized;
[0113] S104: extracting feature points of the blank image of the glass sheet using a particle swarm optimization fast search algorithm (PFAST algorithm);
[0114] S106: Describing the feature points of the blank image using the BEBLID algorithm;
[0115] S108: Matching feature points of the blank image of the glass sheet with feature points of the defective image of the glass sheet in the FLANN library using a feature matching algorithm;
[0116] S110: Outputting the glass sheet cleanliness detection result according to the matching result of the feature matching algorithm.
[0117] It should be noted that the PFAST algorithm, i.e., the particle swarm optimization fast search algorithm, is a heuristic algorithm for solving discrete optimization problems. It is an improved version of the particle swarm optimization algorithm, which aims to converge to the global optimal solution faster. The algorithm is usually used to solve problems such as task allocation, path planning and scheduling.
[0118] The BEBLID (Batch Gradient Boosting with Learning Rate Adaptation and Individualized Data Augmentation) algorithm is an algorithm for solving large-scale machine learning problems. It is an optimization algorithm based on gradient descent that minimizes the loss function by iteratively updating the parameters of the model. The BEBLID algorithm combines the advantages of batch gradient descent (BGD) and adaptive learning rate (ALR), which can effectively accelerate the learning process and improve the stability of model training. The core idea of the BEBLID algorithm is to divide a batch of samples into two parts in each iteration, one part is used to calculate the gradient and use ALR to adjust the learning rate, and the other part is used to estimate the uncertainty of the model and the initial update of the parameters. The algorithm gradually optimizes the parameters of the model and the learning rate of the parameters, and finally reaches convergence and obtains the optimal model parameters.
[0119] FLANN is the Fast Library for Approximate Nearest Neighbors, which is the most complete (approximate) nearest neighbor open source library. It not only implements a series of search algorithms, but also includes a mechanism to automatically select the fastest algorithm.
[0120] According to an embodiment of the present invention, the method for extracting defect feature points is:
[0121] Taking the pixel point p in the glass sheet image (including the glass sheet blank pattern and the glass sheet defect image) as the center of the circle, a number of pixels are evenly selected on the circumference. If the pixel values of n consecutive pixels among the number of pixels and the pixel center point p are all greater than a preset threshold, then the pixel point p is a defect feature point of the glass sheet, otherwise the pixel point is not a defect feature point of the glass sheet; wherein n≥1;
[0122] The description of the feature points of the blank image by using the BEBLID algorithm specifically includes:
[0123] Select N pairs of square areas with a side length of S and centered on the feature point as sampling pairs, initialize the preset threshold of each feature learner, and calculate the average grayscale difference of the sampling pair area through the feature extraction function.
[0124] It should be noted that the feature learner requires a large number of glass sheet images to be constructed, and can also be constructed by directly collecting standard images.
[0125] It should be noted that the preset threshold of the feature learner is given by a training set, which is generally determined from previous measurements or literature.
[0126] According to an embodiment of the present invention, the feature matching algorithm is used to match the feature points of the blank image of the glass sheet with the feature points of the defective image of the glass sheet in the FLANN library, specifically:
[0127] Calculate the Euclidean distance between the feature point p of the blank image of the glass sheet and the feature point of the defect image to find the feature point p of the blank image corresponding to the feature point of the defect image of the glass sheet in the FLANN database;
[0128] All Euclidean distances D are stored through the KD-TREE structure to obtain the matching point pair set of the feature point p of the blank image of the glass sheet;
[0129] Recursively search the matching point pair set from top to bottom to obtain the feature point q corresponding to the minimum Euclidean distance and obtain the matching point pair (p,q);
[0130] Match the feature points of the blank image of the glass sheet one by one;
[0131] The similarity of the matching point pairs is calculated, and the feature points are sorted according to the similarity; if the integrity is lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be unqualified; if the integrity is not lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be qualified.
[0132] It should be noted that this application optimizes the loss function and obtains the feature learner h k After (x), -1 is converted to 0 and +1 is converted to 1, and the vector D(x) is obtained, which is the BEBLID descriptor. This descriptor is the average gray value difference of a series of pixels in the feature point area, mainly containing gray value information.
[0133] The feature matching algorithm of the present application is implemented based on the KD-TREE operation. The feature space where the feature point is located is the n-dimensional real vector space Rn. The feature point corresponding to the feature point p is found by calculating the Euclidean distance between the feature point p of the target glass sheet recognition image and the feature point of the defect image. The calculation formula is:
[0134]
[0135] Where D is the Euclidean distance between two feature points; (x, y) is the pixel coordinates of the feature points; X i ,Y i is the value of the pixel coordinate in the i-th space. All Euclidean distances D are stored in the KD-TREE structure to obtain the matching point pair set of feature point p. The matching point pair set is recursively searched from top to bottom to obtain the feature point q corresponding to the minimum D, and the matching point pair (p, q) is obtained. The above operation is performed on each feature point to match the feature points of the glass sheet one by one.
[0136] By pairing feature points and sorting them according to similarity, for example, the best similar feature points can be calculated through the defective / intact feature points of the glass piece, and then the output can be used to determine whether the detected glass piece is a defective glass piece or a complete glass piece. The defective glass piece can be picked out through the subsequent sorting system.
[0137] As a specific embodiment, during use, the glass sheet cleanliness detection system 2 is also used in conjunction with a spray cleaning device and a drying device, and the four can form a whole as a glass sheet cleanliness and cleanliness detection system.
[0138] like Figure 3 As shown, the spray cleaning device includes a water tank 31, a pipe 32, a nozzle 33, a glass sheet base cleaning device, and a stainless steel box 35;
[0139] The water tank 31, the pipe 32, the nozzle 33, and the glass sheet base cleaning device are all arranged in a stainless steel box 35. When in use, the glass sheet is placed on the sponge glass tray 34, the nozzle 33 is turned on, and the cleaning liquid in the water tank 31 flows to the nozzle 33 through the pipe 32 to clean the glass sheet.
[0140] like Figure 4 As shown, the glass sheet base cleaning device includes a stainless steel pressure cake 41, a sponge glass tray 34, and a stainless steel drain 42. The sponge glass tray 34 is used to prevent the glass sheet, the stainless steel pressure cake 41 is used to press the glass sheet, and the stainless steel drain 42 is used to hold the sponge glass tray 34 and provide a drainage channel for water used to clean the glass sheet.
[0141] like Figure 5 As shown, the drying device includes: an insulation box 51 and a hot air blower 52; the hot air blower 52 is arranged in the insulation box for drying the glass sheets with heat, and the insulation box 51 is also provided with an air outlet.
[0142] When in use, first manually insert the glass piece to be washed into the sponge glass tray 34, and after the insertion is completed, put it into the stainless steel box 35 of the spray cleaning device 3, and prepare to start spraying the cleaning liquid for spray cleaning. Taking a normal dirty glass piece as an example, first add an appropriate amount of 100% anhydrous ethanol to the upper part of the box, and spray it for the first time. After the anhydrous ethanol spraying is completed, add clean water and repeat the spraying twice. After the last spraying is completed, take out the glass piece and the sponge glass tray 34 together, insert the glass piece into a sponge glass tray 34, and put it into the drying box.
[0143] Taking ordinary glass pieces as an example, the temperature in the insulation box 51 is set to 60°C, and it is taken out after drying for half an hour; the cleaned sponge glass tray 34 is placed in the base cleaning device 4, and the pressure device is used three times to observe the cleaning situation. Taking ordinary glass pieces as an example, it is necessary to manually add clean water and continue to press three times to achieve the ideal cleaning effect. Then the sponge glass tray 34 is placed in the drying device, and the parameter settings are the same as the glass piece parameters. After drying, it is ready for next time.
[0144] Then the glass sheet is inserted into the conveyor belt 21, and the robot arm 22 clamps the glass sheet onto the detection base 23, and then the industrial camera 25 starts to work and detects the cleanliness of the glass sheet.
[0145] The glass sheet cleanliness detection system described in the present application also includes a glass sheet lighting device 27. For glass sheets that pass the detection, the lighting device 27 will show a green light, and for glass sheets whose cleanliness does not meet the requirements, the lighting device 27 will light a red light.
[0146] The glass sheet cleanliness detection system described in the present application further includes a back plate 28 , and the back plate 28 is used to facilitate the industrial camera 25 to capture images of the glass sheet.
[0147] As can be seen from the above, the present application provides a glass sheet cleanliness detection method and system. The present application extracts the feature points of the glass sheet blank image by the PFAST algorithm to reduce the image processing and feature extraction time; describes the feature points of the blank image by using the BEBLID algorithm; and uses the feature matching algorithm to match the feature points of the glass sheet blank image with the feature points of the glass sheet defect image in the FLANN library. This improves the image matching rate and the accuracy of glass sheet cleanliness detection.
[0148] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0149] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0150] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0151] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.
[0152] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A method for detecting the cleanliness of a glass sheet, characterized in that: The method comprises the following steps: Collecting a blank image of a glass sheet as an image to be identified; The particle swarm optimization fast search algorithm is used to extract the feature points of the blank image of the glass sheet; The BEBLID algorithm is used to describe the feature points of the blank image; The feature matching algorithm is used to match the feature points of the glass blank image with the feature points of the glass defect image in the FLANN library; According to the matching results of the feature matching algorithm, the glass sheet cleanliness test results are output.
2. A glass sheet cleanliness detection method according to claim 1, characterized in that: The method for extracting the defect feature points is: Taking pixel point p in the glass sheet image as the center, a number of pixels are evenly selected on the circumference. If the pixel values of n consecutive pixels among the number of pixels and the pixel center point p are greater than a preset threshold, then the pixel point p is a defect feature point of the glass sheet, otherwise the pixel point is not a defect feature point of the glass sheet; wherein n≥1.
3. A glass sheet cleanliness detection method according to claim 2, characterized in that: The description of the feature points of the blank image by using the BEBLID algorithm specifically includes: Select N pairs of square areas with a side length of S and centered on the feature point as sampling pairs, initialize the preset threshold of each feature learner, and calculate the average grayscale difference of the sampling pair area through the feature extraction function.
4. A glass sheet cleanliness detection method according to claim 3, characterized in that: The feature extraction function is: Where f(x) is the feature extraction function; I(q) is the grayscale value of pixel q; I(r) is the grayscale value of pixel r; R(p,s) is the rectangular border centered at pixel p with a side length of s.
5. A glass sheet cleanliness detection method according to claim 4, characterized in that: The loss function of the feature learner is: Among them, γ is the unified weight of all feature learners, which is 0.0055; l i ∈{-1.1}; h k (x) is the kth feature learner.
6. A glass sheet cleanliness detection method according to claim 5, characterized in that: The expression of the k-th feature learner is: Where T is the preset threshold of the feature learner.
7. A glass sheet cleanliness detection method according to claim 6, characterized in that: The feature matching algorithm is used to match the feature points of the blank image of the glass sheet with the feature points of the defective image of the glass sheet in the FLANN library, specifically: Calculate the Euclidean distance between the feature point p of the blank image of the glass sheet and the feature point of the defect image to find the feature point p of the blank image corresponding to the feature point of the defect image of the glass sheet in the FLANN database; All Euclidean distances D are stored through the KD-TREE structure to obtain the matching point pair set of the feature point p of the blank image of the glass sheet; The calculation formula of Euclidean distance D is: Where D is the Euclidean distance between two feature points; (x, y) is the pixel coordinates of the feature points; X i ,Y i is the value of the pixel coordinate in the i-th space; Recursively search the matching point pair set from top to bottom to obtain the feature point q corresponding to the minimum Euclidean distance and obtain the matching point pair (p,q); Match the feature points of the blank image of the glass sheet one by one; The similarity of the matching point pairs is calculated, and the feature points are sorted according to the similarity; if the integrity is lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be unqualified; if the integrity is not lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be qualified.
8. A glass sheet cleanliness detection system, characterized in that: The system includes a conveyor belt, a mechanical arm, a detection base, a lighting device, an industrial camera, and a microcomputer; The conveyor belt is used to convey the glass piece to be inspected; The mechanical arm is used to clamp the glass sheet to be tested on the conveyor belt and place it on the testing base; The lighting device is used to provide lighting for the glass sheet to be inspected, so that the industrial camera can collect a blank image of the glass sheet to be inspected; The microcomputer is used to control the operation of the conveyor belt, the movement of the mechanical arm, the lighting of the lighting device, and the industrial camera to collect the blank image of the glass sheet to be detected and receive the blank graphic information of the glass sheet; The microcomputer performs a glass sheet cleanliness detection method, including: Collecting a blank image of a glass sheet as an image to be identified; The PFAST algorithm is used to extract the feature points of the blank image of the glass sheet; The BEBLID algorithm is used to describe the feature points of the blank image; The feature matching algorithm is used to match the feature points of the glass blank image with the feature points of the glass defect image in the FLANN library; According to the matching results of the feature matching algorithm, the cleanliness test results of the glass sheet are output.
9. A glass sheet cleanliness detection system according to claim 8, characterized in that: The method for extracting the defect feature points is: Taking pixel point p in the glass sheet image as the center of the circle, a number of pixels are uniformly selected on the circumference. If the pixel values of n consecutive pixels among the number of pixels and the pixel center point p are greater than a preset threshold, then the pixel point p is a defect feature point of the glass sheet, otherwise the pixel point is not a defect feature point of the glass sheet; wherein n≥1; The description of the feature points of the blank image by using the BEBLID algorithm specifically includes: Select N pairs of square areas with a side length of S and centered on the feature point as sampling pairs, initialize the preset threshold of each feature learner, and calculate the average grayscale difference of the sampling pair area through the feature extraction function.
10. A glass sheet cleanliness detection system according to claim 9, characterized in that: The feature matching algorithm is used to match the feature points of the blank image of the glass sheet with the feature points of the defective image of the glass sheet in the FLANN library, specifically: Calculate the Euclidean distance between the feature point p of the blank image of the glass sheet and the feature point of the defect image to find the feature point p of the blank image corresponding to the feature point of the defect image of the glass sheet in the FLANN database; All Euclidean distances D are stored through the KD-TREE structure to obtain the matching point pair set of the feature point p of the blank image of the glass sheet; Recursively search the matching point pair set from top to bottom to obtain the feature point q corresponding to the minimum Euclidean distance and obtain the matching point pair (p,q); Match the feature points of the blank image of the glass sheet one by one; The similarity of the matching point pairs is calculated, and the feature points are sorted according to the similarity; if the integrity is lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be unqualified; if the integrity is not lower than the preset integrity threshold, the cleanliness of the glass sheet is determined to be qualified.
