Optical glass lens surface detection device and detection method thereof
By designing an automated optical glass lens detection device, using a three-axis mobile station and a robotic arm for image acquisition, combined with a machine learning model, the existing problem of low detection efficiency is solved, efficient lens screening and defect proofreading is achieved, and the Productivity.
Patent Information
- Application Number
- CN202411281465.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-09-13
AI Technical Summary
The surface detection efficiency of existing optical glass lenses is low, and the manual detection accuracy is not high, making it difficult to meet the needs of large-scale production.
An optical glass lens surface detection device including a three-axis mobile station, an optical profiler, a robotic arm and a barcode scanner was designed. Combined with the support vector machine model and reinforcement learning model, it realizes automatic image acquisition and defect recognition, and quickly screens and passes. The lenses and re-examine the area without passing.
The detection efficiency of optical glass lenses is improved, detection errors are reduced, qualified lenses are accelerated through automated processes, and defect areas are proofreaded through multiple rounds of detection, improving processing efficiency.
Smart Images

Figure CN118808159B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of optical glass detection, and in particular relates to an optical glass lens surface detection device and a detection method thereof. Background Art
[0002] Surface defects of optical glass are generally micrometer-level in lateral dimension and randomly distributed on the surface of optical glass. They often cause unavoidable impact on the optical system and lead to abnormal operation of the entire optical system. Therefore, optical glass lenses need to be inspected for surface defects during the production process.
[0003] The surface quality defect detection of related optical glass lenses is mainly carried out by manual observation and inspection under a microscope. Manual inspection has the disadvantages of low detection accuracy and slow detection speed. For the inspection of multiple surfaces of optical glass lenses, it is necessary to manually rotate the optical glass lenses and observe and inspect the upper surface, lower surface and side surfaces of the optical glass lenses. The detection efficiency is very low, which is not conducive to the mass production of optical glass lenses. Summary of the invention
[0004] The present invention provides an optical glass lens surface detection device, which can effectively solve the problems raised in the above background technology.
[0005] To achieve the above-mentioned object, the present invention provides the following technical solutions: an optical glass lens surface detection device, comprising an image acquisition area, the image acquisition area comprising a three-axis moving table, an optical profiler mounted on the surface of the three-axis moving table, and a collection platform mounted on the surface of the three-axis moving table; and further comprising: a material transfer unit and a control unit for controlling the operation of the material transfer unit;
[0006] The material transfer unit includes: a material discharge platform arranged on one side of the three-axis movable table, a material loading box is arranged on the surface of the material discharge platform, the material loading box is used to carry and protect optical glass lenses, a plurality of transfer tables are installed on the surface of the material discharge platform, the transfer tables are used to transfer the material loading box carrying optical glass lenses, a mechanical arm is installed on the surface of the three-axis movable table, the mechanical arm is used to transfer the optical glass lenses in the material loading box and transfer the optical glass lenses on the acquisition platform, the mechanical arm is also used to cooperate with the image acquisition of the optical profiler to complete the flipping and rotation of the optical glass lenses, a barcode scanner is installed on the surface of the optical profiler, the barcode scanner is used to synchronously scan the barcode corresponding to the surface of the material loading box during the image acquisition process of the optical glass lenses.
[0007] Furthermore, the control unit comprises:
[0008] A data acquisition module, which collects lens image data;
[0009] A defect recognition module, used for inputting image data into the trained first learning model, and outputting predicted defect data, area number and classification data;
[0010] The acquisition sequence planning module controls the three-axis mobile stage to collect the optical profiler according to the predicted trajectory through the trained second learning model, so as to collect the first defect data as quickly as possible;
[0011] The execution module is used to control the three-axis mobile stage and the optical profiler to collect image data, and to control the material transfer unit to move the material box containing the optical glass lens to the corresponding area based on the area number and classification data, and to control the robotic arm to complete the placement of the corresponding optical glass lens.
[0012] Furthermore, a material discharge platform is provided on one side of the three-axis movable table, and a plurality of transfer tables are provided on the surface of the material discharge platform. A plurality of slide grooves are provided on the surface of the transfer table in a ring array. The transfer table is rotatably connected to the installation groove provided on the surface of the material discharge platform through a first bearing. A gear ring is fixedly connected to the bottom surface of the transfer table, and a gear is meshedly connected to the surface of the gear ring. A second motor is installed on the bottom surface of the material discharge platform, and an end of an output shaft of the second motor is fixedly connected to the gear.
[0013] Furthermore, a truncated table is provided in the through circular groove opened on the surface of the transfer table, and a U-shaped fixed plate is provided on the surface of the truncated table. The truncated table is rotatably connected to the accommodating circular groove opened on the surface of the U-shaped fixed plate through a second bearing, and the U-shaped fixed plate is fixedly connected to the discharge platform. A first motor is installed on the bottom surface of the U-shaped fixed plate, and the end of the output shaft of the first motor passes through the accommodating circular groove opened on the surface of the U-shaped fixed plate and is fixedly connected to the truncated table. A U-shaped frame is fixedly connected to the surface of the truncated table, and an electric push rod is installed on the surface of the U-shaped frame. The telescopic ends of the electric push rod are symmetrically hinged with connecting rods, and the ends of the connecting rods are hinged with magnetic plates. Telescopic rods are symmetrically provided on the surface of the magnetic plate, and the telescopic rods are fixedly connected to the truncated table, and the telescopic ends of the telescopic rods are fixedly connected to the surface of the magnetic plate.
[0014] Furthermore, a plurality of guide posts are arranged on the surface of the discharge platform, and the guide posts are rotatably connected to the discharge platform via a third bearing. The guide posts are symmetrically arranged along the axial direction of the slide slot, and the interior of the slide slot is symmetrically fixedly connected with a limiting block.
[0015] Furthermore, a carrying block is slidably connected to the interior of the loading box, a surface of the carrying block is provided with a containing groove corresponding to the size of the optical glass lens, a barcode is provided on the surface of the carrying block, and a barcode scanner is installed on the surface of the optical profiler.
[0016] Furthermore, the first learning model training method includes:
[0017] Collect K groups of historical defect characteristic data and the area numbers corresponding to the historical defect characteristic data and the defect grades corresponding to the historical defect characteristic data;
[0018] The historical defect feature data and the area numbers corresponding to the historical defect feature data and the defect levels corresponding to the historical defect feature data are taken as a sample set, and the sample set is divided into a training set and a test set. The historical defect feature data and the defect levels corresponding to the historical defect feature data in the training set are taken as inputs of a first learning model, and the area numbers corresponding to the historical defect data and the defect levels corresponding to the historical defect feature data in the training set are taken as outputs of the first learning model. The first learning model is trained to output a first learning model that meets a preset accuracy. The first learning model is a support vector machine model.
[0019] Furthermore, the second learning model training method includes:
[0020] Collect M groups of historical defect characteristic data and the area numbers corresponding to the historical defect characteristic data;
[0021] The historical defect feature data and the area number corresponding to the historical defect feature data are used as the input of the second learning model, and the time taken to first collect any defect data is used as the output of the second learning model. The second learning model is trained to output a second learning model that satisfies the requirement that the average output data for N consecutive times reaches a preset value.
[0022] Further, the execution module includes a control panel, and the control panel is electrically connected to the optical profiler, the three-axis moving platform, the first motor, the second motor, the electric push rod, the barcode scanner and the robot arm through wires;
[0023] When the first learning model outputs the first defect grade data of the sth optical lens, the control tablet controls the mechanical arm to put the optical glass lens on the surface of the collection platform back into the corresponding holding groove opened on the surface of the carrier block, and then controls the first motor, the second motor and the electric push rod to move accordingly to move the material loading box to the transfer area;
[0024] When the highest defect level of the f-th optical lens output by the first learning model reaches the corresponding set value, the material loading box is moved to the set area.
[0025] Furthermore, when the optical profiler scans the optical glass lens for the second time, the three-axis moving platform controls the starting position of the optical profiler scanning to be the area corresponding to the first defect data. When the first defect data collected twice are inconsistent, the corresponding optical glass lens is marked and removed from the device.
[0026] Furthermore, a method for detecting the surface of an optical glass lens is divided into:
[0027] Step 1: Place the optical lenses to be scanned into the corresponding material loading boxes respectively, and insert the optical lenses into the corresponding receiving grooves of the supporting blocks, and arrange the supporting blocks between the guide pillars;
[0028] Step 2: The feeding transfer table is close to the connecting rod, and the material distribution transfer table is around the feeding transfer table. The electric push rod in the feeding transfer table is controlled to extend. The extension of the electric push rod drives the two magnetic plates to enter the corresponding chute respectively through the linkage of the connecting rod and the constraint of the two telescopic rods. The loading box containing the optical glass lens to be inspected is magnetically grabbed by the magnetic plate that generates attraction, and the other magnetic plate that generates repulsion pushes the loading box that has been loaded with the optical lens after inspection to the outside of the chute. The mechanical arm takes out the corresponding optical glass lens from the loading box and places it at the set position on the acquisition platform. The optical profiler is moved by controlling the three-axis moving stage and the optical profiler is controlled to collect images of the optical glass lens.
[0029] Step three, in the process of collecting images of optical glass lenses, it is divided into two rounds of collection stages. The first round of collection stage is divided into three collection actions, namely, the first mirror collection action, the edge collection action and the second mirror collection action. The three-axis mobile stage controls the collection trajectory of the optical profiler according to the output of the second learning model to quickly detect whether there are unqualified defects on the mirror surface. The three collection actions are performed in sequence. If unqualified defects are detected, the detection is stopped immediately, and the mechanical arm is controlled to put the optical glass lens back into the corresponding material loading box, and the corresponding transfer table is controlled to rotate to collect images for the next optical glass lens, and the material loading box containing unqualified defects is pushed into the transfer area through the magnetic plate that generates repulsive force to wait for the second round of detection. During this process, the barcode scanner scans the barcode on the surface of the carrier block of the optical glass lens that has just been taken away, and records the data of the optical glass lens being scanned;
[0030] Step 4. After all lenses have been inspected, all lenses in the transfer area are transferred again through the transfer table and grabbed by the robotic arm for the second round of inspection. The second round of inspection starts from the location of the defect data detected in the first round. If the data at the same location in the two rounds of inspection are inconsistent, the corresponding lenses will be transferred to the problem area for manual processing. If they are consistent, the inspection path set by the second learning model will be used to continue the inspection, and according to the defect grading data output by the first learning model, the transfer table will be controlled to transfer the corresponding material box to the set area.
[0031] Compared with the prior art, the above solution of the present invention has at least the following beneficial effects:
[0032] By using the first learning model and the second learning model, a large number of qualified optical glass lenses can be screened out more quickly during the first round of inspection of optical glass lenses, which is beneficial to improving the processing efficiency of optical glass lenses; by connecting the first and second rounds of inspection, repeated re-inspection of the first defective area can play a role in proofreading the first learning model and reduce the inspection error of optical glass lenses; by using a transfer table, an electric push rod, a magnetic plate and a limit block, the carrier box containing optical glass lenses can be transferred to the required position, and at the same time, the carrier boxes can be classified and transferred to different areas through the set multiple transfer tables, which is convenient for subsequent processing of the carrier boxes and further improves the processing efficiency of optical lenses. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0034] Figure 1 It is a schematic diagram of the overall structure of the present invention.
[0035] Figure 2 It is a schematic diagram of the installation structure of the transfer platform in the present invention.
[0036] Figure 3 It is a schematic diagram of the installation structure of the guide column in the present invention.
[0037] Figure 4 For the present invention Figure 3 A is an enlarged view of the figure.
[0038] Figure 5 It is a schematic diagram of the installation structure of the round table in the present invention.
[0039] Figure 6 It is a schematic diagram of the installation structure of the bearing block in the present invention.
[0040] Figure 7 It is a schematic diagram of the location of the transfer area in the present invention.
[0041] Figure 8 It is a flow chart of two rounds of data collection in the present invention.
[0042] In the figure: 101, optical profiler; 102, three-axis moving table; 103, acquisition platform; 201, unloading platform; 202, transfer table; 203, slide; 204, U-shaped fixing plate; 205, first motor; 206, round table; 207, magnetic plate; 208, telescopic rod; 209, U-shaped frame; 210, electric push rod; 211, connecting rod; 212, gear ring; 213, second motor; 214, gear; 215, loading box; 216, loading block; 217, barcode scanner; 219, guide column; 220, limit block; 221, robotic arm; 2021, feeding table; 2022, first transfer table; 2023, second transfer table; 2031, first sliding trough; 2032, second sliding trough; 2033, third sliding trough; 2034, fourth sliding trough. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Example: Figures 1 to 8 As shown, the present invention provides a technical solution, an optical glass lens surface detection device, including an image acquisition area, the image acquisition area includes a three-axis mobile platform 102, an optical profiler 101 installed on the surface of the three-axis mobile platform 102, and a collection platform 103 installed on the surface of the three-axis mobile platform 102; it also includes: a material transfer unit and a control unit for controlling the material transfer unit; the material transfer unit includes:
[0045] A material discharging platform 201 is arranged on one side of the three-axis movable table 102, and a material loading box 215 is arranged on the surface of the material discharging platform 201, and the material loading box 215 is used to carry and protect the optical glass lenses. A plurality of transfer tables 202 are installed on the surface of the material discharging platform 201, and the transfer tables 202 are used to transfer the material loading box 215 carrying the optical glass lenses. A mechanical arm 221 is installed on the surface of the three-axis movable table 102, and the mechanical arm 221 is used to transfer the optical glass lenses in the material loading box 215 and the optical glass lenses on the transfer collection platform 103. The mechanical arm 221 is also used to cooperate with the image acquisition of the optical profiler 101 to complete the flipping and rotation of the optical glass lenses. A barcode scanner 217 is installed on the surface of the optical profiler 101, and the barcode scanner 217 is used to synchronously scan the barcode on the surface of the corresponding material loading box 215 during the image acquisition process of the optical glass lenses.
[0046] The surface of the material discharging platform 201 is provided with a loading area for placing a material box 215 containing lenses to be tested according to the situation of the optical glass lenses, a transfer area for placing a material box 215 containing lenses that have undergone a round of testing, a whole lens repair area for placing a material box 215 containing lenses that need to undergo whole lens repair, and a partial lens repair area for placing a material box 215 containing lenses that need to undergo partial lens repair. The mechanical arm 221 absorbs the lenses in the material box 215 through the vacuum suction cup on its surface and moves them to the device of the collection platform 103. Image acquisition is performed in a certain area. During the image acquisition process, the robot arm 221 cooperates with the shooting of the optical profiler 101. The lens needs to be turned over and rotated so that the optical profiler 101 can shoot the entire surface of the lens. After the robot arm 221 takes the lens out of the carrier box 215, the barcode scanner 217 synchronously scans the barcode set in the carrier box 215, and saves the image data of the corresponding lens scanned by the optical profiler 101, so that the barcode corresponds to the data, so that the data can be read in subsequent operations.
[0047] The lens surface is divided into i sub-areas, and each sub-area is numbered respectively to collect lens image data, including:
[0048] According to the shape and size of the lens, its surface is initially divided into i sub-regions; each sub-region is numbered; and a suitable coding method is selected to represent the division of each sub-region. For example, binary coding can be used, in which each bit or a group of bits represents the boundary or position of a sub-region; an initial population is randomly generated, and each individual in the population represents a division method of the lens surface sub-region; a fitness function is defined to evaluate the pros and cons of each division method. The fitness of each individual in the population is evaluated according to the fitness function, and the roulette wheel selection method is used to select individuals with high fitness to enter the next generation. Two individuals in the population are randomly selected as parents, and new offspring individuals are generated using single-point crossover, multi-point crossover or uniform crossover. Some gene positions of the offspring individuals are randomly changed with a certain probability of mutation to increase the diversity of the population.
[0049] The new individuals generated by selection, crossover and mutation operations form a new population, and images are collected for each sub-region according to the optimized sub-region division method.
[0050] The calculation formula of the fitness function is:
[0051] ;
[0052] in, represents the standard deviation of the sub-region area; and Two are weight coefficients; is the number of sub-regions, indicating the total number of sub-regions into which the lens surface is divided; Indicates The area of the sub-region; Indicates The perimeter of each sub-region is used to guide the evolution of the population to find the optimal division scheme. Through the above steps, it is possible to optimize the division method in the process of dividing the lens surface into sub-regions and collect high-quality lens image data.
[0053] like Figures 1 to 8 As shown, a material discharging platform 201 is provided on one side of the three-axis moving platform 102, and a plurality of transfer platforms 202 are provided on the surface of the material discharging platform 201. A plurality of slide grooves 203 are provided on the surface of the transfer platform 202 in a circular array. The transfer platform 202 is rotatably connected to the mounting groove provided on the surface of the material discharging platform 201 through a first bearing. A gear ring 212 is fixedly connected to the bottom surface of the transfer platform 202, and a gear 214 is meshedly connected to the surface of the gear ring 212. A second motor 213 is installed on the bottom surface of the material discharging platform 201, and the end of the output shaft of the second motor 213 is fixedly connected to the gear 214. In the process of collecting lens images, the transfer platform 202 is rotated to move the material loading box 215 toward the mechanical arm 221, and after the lens collection is completed, the material loading box 215 is moved between the transfer platforms 202 through the corresponding slide grooves 203 through the rotational cooperation between the plurality of transfer platforms 202, until the material loading box 215 moves to the corresponding set area.
[0054] like Figures 1 to 8 As shown, a truncated platform 206 is arranged in the through circular groove opened on the surface of the transfer platform 202, and a U-shaped fixed plate 204 is arranged on the surface of the truncated platform 206. The truncated platform 206 is rotatably connected to the accommodating circular groove opened on the surface of the U-shaped fixed plate 204 through a second bearing. The U-shaped fixed plate 204 is fixedly connected to the discharge platform 201, and a first motor 205 is installed on the bottom surface of the U-shaped fixed plate 204. The end of the output shaft of the first motor 205 penetrates into the accommodating circular groove opened on the surface of the U-shaped fixed plate 204. The circular groove is fixedly connected to the truncated table 206, the surface of the truncated table 206 is fixedly connected with a U-shaped frame 209, the surface of the U-shaped frame 209 is installed with an electric push rod 210, the telescopic end of the electric push rod 210 is symmetrically hinged with a connecting rod 211, the ends of the connecting rod 211 are hinged with a magnetic plate 207, the surface of the magnetic plate 207 is symmetrically provided with a telescopic rod 208, the telescopic rod 208 is fixedly connected to the truncated table 206, and the telescopic end of the telescopic rod 208 is fixedly connected to the surface of the magnetic plate 207.
[0055] The second motor 213 under the transfer platform 202 is controlled to operate so that the transfer platform 202 rotates ninety degrees counterclockwise, and the mechanical arm 221 is controlled to take out the optical glass lens in the corresponding slide slot 203 and place it on the acquisition platform 103 for image acquisition. After the acquisition is completed, the optical glass lens is put back into the loading box 215, and at the same time, the electric push rod 210 in the transfer platform 202 is controlled again to complete a telescopic operation, so that the loading box 215 containing the optical glass lens to be inspected is placed in the slide slot 203, and the transfer platform 202 is rotated ninety degrees again. The optical glass lens in the slide slot 203 is inspected through the transfer of the mechanical arm 221, and at the same time, the electric push rod 210 is controlled again to complete a telescopic operation. At this time, the loading box 215 containing the lens whose image information has just been collected in the slide slot 203 will be pushed out of the transfer platform 202 by the magnetic plate 207 which is set to generate repulsive force. At the same time, another magnetic plate 207 grabs the loading box 215 containing the lens to be collected into the corresponding slide slot 203 through magnetic attraction.
[0056] like Figures 1 to 8 As shown, a plurality of guide posts 219 are arranged on the surface of the material discharging platform 201, and the guide posts 219 are rotatably connected to the material discharging platform 201 through a third bearing. The guide posts 219 are symmetrically arranged along the axial direction of the slide slot 203, and the inner part of the slide slot 203 is symmetrically fixedly connected with the limit block 220. The guide posts 219 are used to restrict the movement of the material carrying box 215 so that it can be grasped by the magnetic plate 207, and the limit block 220 enables the material carrying box 215 to move to a fixed position in the slide slot 203, which is convenient for the robot arm 221 to identify and grasp.
[0057] like Figures 1 to 8 As shown, the inside of the material loading box 215 is slidably connected with a bearing block 216, the surface of the bearing block 216 is provided with a holding groove corresponding to the size of the optical glass lens, the surface of the bearing block 216 is provided with a barcode, and the surface of the optical profiler 101 is installed with a barcode scanner 217. The bearing block 216 is provided with holding grooves of different sizes to assemble optical glass lenses of different specifications, so that the material loading box 215 can hold lenses of various specifications, and the barcode provided on the surface of the bearing block 216 is convenient for cooperating with the scanning of the barcode scanner 217 to complete the recording and tracking of data.
[0058] like Figures 1 to 8As shown, the first learning model training method includes: collecting K groups of historical defect feature data and the area numbers corresponding to the historical defect feature data and the defect levels corresponding to the historical defect feature data; using the historical defect feature data and the area numbers corresponding to the historical defect feature data and the defect levels corresponding to the historical defect feature data as a sample set, dividing the sample set into a training set and a test set, using the historical defect feature data and the defect levels corresponding to the historical defect feature data in the training set as inputs of the first learning model, using the area numbers corresponding to the historical defect data and the defect levels corresponding to the historical defect feature data in the training set as outputs of the first learning model, training the first learning model, and outputting a first learning model that meets a preset accuracy, wherein the first learning model is a support vector machine model.
[0059] When specifically applied, this includes:
[0060] Collect K groups of historical defect feature data from production records, quality inspection reports or other reliable sources. Clean the collected historical defect feature data to remove duplicate, missing or abnormal data. Normalize or standardize the data to eliminate the dimensional differences between different features. Divide the preprocessed data set into training and test sets, which can be 70%-30% or 80%-20%.
[0061] Divide the training set from the existing data set to ensure that the training set contains historical defect feature data and the corresponding defect level. Preprocess the data, including normalization and standardization, to eliminate the impact of dimensional differences and outliers on model training.
[0062] Import the SVM algorithm in a machine learning library (such as scikit-learn). Initialize the SVM model and set parameters such as kernel function and penalty parameter. These parameters can be optimized using cross-validation, grid search, and other techniques.
[0063] The historical defect feature data and the corresponding defect level in the training set are used as input data (X_train). The area number and defect level are combined into a label (which can be multidimensional) as the output data (y_train). The SVM model is trained using the training set data (X_train, y_train). During the training process, the performance of the model, such as accuracy and recall, can be monitored to ensure the effectiveness and generalization ability of the model.
[0064] Evaluate the trained SVM model using a validation set (if available) or cross-validation. Adjust model parameters based on the evaluation results, such as changing the kernel function, adjusting the penalty coefficient, etc., to optimize model performance. Repeat the training and evaluation process until satisfactory model performance is achieved. When the SVM model achieves satisfactory performance, save it as a model file for subsequent use. Deploy the model to a production environment to make predictions and analyze new data.
[0065] like Figures 1 to 8 As shown, the second learning model training method includes:
[0066] Collect M groups of historical defect feature data and the area numbers corresponding to the historical defect feature data; use the historical defect feature data and the area numbers corresponding to the historical defect feature data as the input of the second learning model, use the time taken to first collect any defect data as the output of the second learning model, train the second learning model, and output a second learning model that satisfies the requirement that the average of the output data for N consecutive times reaches a preset value.
[0067] When specifically applied, this includes:
[0068] Collect M groups of historical defect feature data, and ensure that each group of data contains the corresponding area number. Organize and clean the data, remove invalid or abnormal data points, and ensure data quality. Prepare a label set that records the time it takes to first collect any defect data, which will serve as the output target of the second learning model.
[0069] Define the reinforcement learning environment and elements:
[0070] State: defines the state as a combination of the current defect feature data and the area number.
[0071] Action: In the reinforcement learning framework, an action is usually a change to the environment. Here, an action can be defined as the behavior of the model predicting the first acquisition time.
[0072] Reward: Define a reward function to evaluate the accuracy of the model's predictions. For example, if the predicted time is close to the true time, a positive reward is given; otherwise, a negative reward is given.
[0073] Environment: Build a simulation environment that receives states, performs actions, and returns new states and rewards.
[0074] Choose a suitable reinforcement learning algorithm, such as Q-learning, based on the complexity of the problem and the dimensionality of the data. Initialize the model's parameters, including learning rate, discount factor, exploration rate, etc.
[0075] Perform multiple rounds of training (Episodes) in the environment, and each round of training starts from the initial state. In each round of training, the model selects an action based on the current state (i.e., predicts the first acquisition time). After executing the action, the environment returns the new state and reward. The model updates its own strategy or value function based on the reward to maximize the cumulative reward. Repeat the above steps until the mean of the model's output data for N consecutive times reaches the preset value, or reaches the preset number of training rounds. During the training process, regularly evaluate the performance of the model, such as calculating the error between the predicted time and the actual time.
[0076] Adjust the model parameters or improve the reinforcement learning algorithm based on the evaluation results to improve the prediction accuracy. If the mean of the model's output data for N consecutive times does not reach the preset value, continue training or adjust the model structure.
[0077] When the model meets the condition that the mean of the output data reaches the preset value for N consecutive times, the model is saved and output. In practical applications, the model is used to predict the first collection time of newly collected defect data. The performance of the model is monitored regularly and updated or retrained as needed.
[0078] like Figures 1 to 8 As shown, the execution module includes a control tablet, which is electrically connected to the optical profiler 101, the three-axis moving platform 102, the first motor 205, the second motor 213, the electric push rod 210, the barcode scanner 217 and the robotic arm 221 through wires; when the first learning model outputs the first defect level data of the s-th optical lens, the control tablet controls the robotic arm 221 to put the optical glass lens on the surface of the acquisition platform 103 back into the corresponding receiving groove opened on the surface of the supporting block 216, and then controls the first motor 205, the second motor 213 and the electric push rod 210 to move accordingly, and moves the carrier box 215 to the transfer area; when the first learning model outputs that the highest defect level of the f-th optical lens reaches the corresponding set value, the carrier box 215 is moved to the set area.
[0079] When the first learning model outputs the first defect grade data of the sth optical lens, the specific steps are as follows:
[0080] The control panel receives the first defect grade data of the sth optical lens output from the first learning model. This data is the result of defect detection of the optical lens by the previously trained model. The control panel processes the received defect grade data and parses out the specific defect grade and the corresponding optical lens information. This information will be used for subsequent control instruction generation.
[0081] According to the analyzed defect level and optical lens information, the control panel generates corresponding control instructions, including motion instructions of the mechanical arm 221, movement instructions of the first motor 205, the second motor 213 and the electric push rod 210, etc.
[0082] The control panel sends the generated robot arm motion command to the robot arm 221. After receiving the command, the robot arm 221 starts to execute the action. Specifically, the robot arm 221 moves to the surface of the collection platform 103 to grab the optical glass lens that has completed the defect detection.
[0083] The mechanical arm 221 puts the grabbed optical glass lens back into the corresponding storage groove provided on the surface of the supporting block 216. This process needs to ensure that the lens is placed in an accurate position to avoid damage or contamination of the lens.
[0084] When the mechanical arm 221 puts back the optical lens, the control panel will also control the first motor 205, the second motor 213 and the electric push rod 210 to move accordingly. The purpose of these movements is to move the material box 215 from the transfer area to the next processing position.
[0085] When all the above steps are completed, the control panel will record the current processing status and wait to receive the next defect grade data or other control instructions from the first learning model. At the same time, the system will continue to detect and process defects on subsequent optical lenses.
[0086] Through the above steps, when the first learning model outputs the first defect level data of the sth optical lens, the execution module can accurately execute the corresponding control instructions to complete operations such as retrieving and placing the optical lens and moving the carrier box 215.
[0087] like Figures 1 to 8 As shown, when the optical profiler 101 scans the optical glass lens for the second time, the three-axis moving stage 102 controls the starting position of the optical profiler 101 to be the area corresponding to the first defect data. When the first defect data is inconsistent with the two collected data, the corresponding optical glass lens is marked and removed from the device.
[0088] like Figures 1 to 8 As shown, a method for detecting the surface of an optical glass lens is divided into:
[0089] Step 1: Place the optical lenses to be scanned into the corresponding material loading boxes 215, and insert the optical lenses into the corresponding receiving grooves of the supporting blocks 216, and arrange the supporting blocks 216 between the guide pillars 219;
[0090] Step 2: The feeding transfer table 202 is close to the connecting rod 211, and the material distribution transfer table 202 is surrounded by the feeding transfer table 202. The electric push rod 210 in the feeding transfer table 202 is controlled to extend. The extension of the electric push rod 210 drives the two magnetic plates 207 to enter the corresponding slide groove 203 respectively through the linkage of the connecting rod 211 and the constraint of the two telescopic rods 208. The loading box 215 carrying the optical glass lens to be inspected is magnetically captured by the magnetic plate 207 that generates attraction, and the other magnetic plate 207 that generates repulsion pushes the loading box 215 that has been loaded with the optical lens after inspection to the outside of the slide groove 203. The mechanical arm 221 takes the corresponding optical glass lens out of the loading box 215 and places it at the set position on the acquisition platform 103. The optical profiler 101 is moved by controlling the three-axis moving table 102 and the optical profiler 101 is controlled to capture the image of the optical glass lens.
[0091] Step three, in the process of collecting images of optical glass lenses, it is divided into two rounds of collection stages. The first round of collection stage is divided into three collection actions, namely, the first mirror collection action, the edge collection action and the second mirror collection action. According to the second learning model output, the three-axis moving table 102 controls the collection trajectory of the optical profiler 101 to quickly detect whether there are unqualified defects on the mirror surface. The three collection actions are performed in sequence. If unqualified defects are detected, the detection is stopped immediately, and the mechanical arm 221 is controlled to put the optical glass lens back into the corresponding loading box 215, and the corresponding transfer table 202 is controlled to rotate to collect the image of the next optical glass lens, and the loading box 215 containing unqualified defects is pushed into the transfer area through the magnetic plate 207 that generates repulsive force to wait for the second round of detection. During this process, the barcode scanner 217 scans the barcode on the surface of the carrier block 216 from which the optical glass lens has just been taken away, and records the data of the optical glass lens being scanned.
[0092] Step 4. After all lenses have been inspected, all lenses in the transfer area are transferred again through the transfer table 202 and grabbed by the robot arm 221 for a second round of inspection. The second round of inspection starts from the defect data position detected in the first round. If the data at the same position in the two rounds of inspection are inconsistent, the corresponding lenses are transferred to the problem area for manual processing. If they are consistent, the inspection path set by the second learning model is continued, and according to the defect grading data output by the first learning model, the transfer table 202 is controlled to transfer the corresponding carrier box 215 to the set area.
[0093] like Figures 1 to 8As shown, it should be noted that: the use of this device needs to be combined with an external light source. The common method is to set a plurality of LED lights in a circular array in the optical glass lens detection area, and the irradiation angle is set to 30 to 45 degrees. This is the prior art and will not be described in detail. The surface of the material carrier 215 is provided with a magnetic sheet, which is convenient for the magnetic plate 207 to grab and push out the material carrier 215 through the magnetic sheet. The robotic arm 221 is a three-axis robot that can complete the grabbing action of the optical lens, and its claw is a vacuum suction cup. This is the prior art and will not be described in detail. The first learning model is a support vector machine model, and the second learning model is a reinforcement learning method. Both are prior art. The principles and usage methods of both are well known in the prior art and will not be described in detail here.
[0094] The acquisition platform 103 is made of non-reflective material, which is convenient for cooperating with the three-axis movable platform 102 to acquire images of optical glass lenses; the working principles and workflows of the optical profiler 101, the three-axis movable platform 102, the acquisition platform 103 and the barcode scanner 217 are well known in the prior art and will not be described in detail here.
[0095] Attached Figure 7 In the figure, W represents the overall repair area, Y represents the scrap area, Q represents the loading area, L represents the local repair area, Z represents the qualified lens removal area, and D represents the transfer area.
[0096] Working principle: In this embodiment, the material discharging platform 201 is provided with three transfer tables 202, namely the feeding table 2021, the first transfer table 2022, and the second transfer table 2023. The surface of the transfer table 202 is provided with three slide grooves 203 in a circular array. Two robotic arms 221 are provided. The defect levels are divided into qualified and unqualified. The unqualified ones are further divided into three levels: scrap, entire lens repair processing and partial lens repair processing.
[0097] In this embodiment, the optical glass lens is placed in the holding groove of the carrier block 216, and the carrier block 216 is placed in the inside of the material loading box 215, and the material loading box 215 carrying the optical lens is placed in the loading area set outside the first sliding groove 2031 opened on the surface of the feeding platform 2021, and the placed material loading box 215 is located between the parallel guide columns 219, and the guide columns 219 play a restraining and guiding role, so that the material loading box 215 can enter the inside of the sliding groove 203, and the control tablet controls the electric push rod 210 in the corresponding U-shaped frame 209 to extend, The extension of the electric push rod 210 causes the connecting rod 211 to rotate, and pushes the two magnetic plates 207 at the ends of the two groups of telescopic rods 208 to move toward the first sliding groove 2031 and the third sliding groove 2033 respectively. The magnetic plate 207 in the first sliding groove 2031 attracts the loading box 215 through magnetic attraction. At this time, the extended electric push rod 210 is controlled to contract, so that the magnetic plate 207 pulls the attracted loading box 215 into the first sliding groove 2031 until the loading box 215 is separated from the magnetic plate 207 under the obstruction of the limit block 220.
[0098] In this embodiment, the second motor 213 under the feeding platform 2021 is controlled to operate so that the feeding platform 2021 rotates ninety degrees counterclockwise, and one of the mechanical arms 221 is controlled to take out the optical glass lens inside the first sliding groove 2031 and place it on the acquisition platform 103 for image acquisition. At the same time, the barcode scanner 217 scans the barcode on the surface of the corresponding supporting block 216 and records the image data collected by the corresponding optical glass lens. After the acquisition is completed, the optical glass lens is put back into the loading box 215, and at the same time, the electric push rod 210 in the feeding platform 2021 is controlled again to complete a telescopic operation, so that the optical glass lens to be inspected is placed inside the fourth sliding groove 2034, and the feeding platform 2021 is rotated ninety degrees again to inspect the optical glass lens in the fourth sliding groove 2034, and at the same time, the electric push rod 210 is controlled again to complete a telescopic operation. At this time, the loading box 215 in the first sliding groove 2031 will be configured to generate a repulsive magnetic plate 207 to push the feeding platform 2021 out.
[0099] In this embodiment, the first round of acquisition stage of the image acquisition process aims to quickly screen out optical glass lenses containing a small number of unqualified defects, so that a large number of qualified optical glass lenses can be quickly screened out, which is beneficial to improving the production efficiency of optical glass lenses. During the acquisition process, the lens surface is divided into i sub-areas, and each sub-area is numbered respectively. Image acquisition is performed through the acquisition route set by the second learning model. When the acquired data outputs the defect level of scrap for the first time through the first learning model, the image acquisition is stopped, and the optical glass lens is put back into the loading box 215, and the loading box 215 is moved to the scrap area set on the surface of the material discharging platform 201 by rotating the feeding table 2021. When the output defect level is unqualified, the loading box 215 is moved to the transfer area set on the surface of the material discharging platform 201 by rotating the feeding table 2021, waiting for the second round of image acquisition.
[0100] In this embodiment, after all lenses have undergone one round of collection, the second round of collection begins. The collection objects are all unqualified defective optical glass lenses accumulated in the transfer area. The starting position of this round of collection is the area where defects appeared in the first round of collection. This area is re-collected and the data collected twice are compared. If the data are inconsistent, the lens is put back into the corresponding material box 215 and moved to the problem area divided on the surface of the material discharge platform 201 for manual processing. If the data are consistent, the collection continues according to the path planned by the second learning model. During this process, the first learning model outputs a defect level of scrap for the first time, then the collection is stopped, the lens is placed in the corresponding material box 215, and moved to the scrap area set on the surface of the material discharge platform 201. When the three collection actions of the lens are completed, the lens is transported to the corresponding area divided on the surface of the material discharge platform 201 according to the highest defect level output by the first learning model.
[0101] In this embodiment, the transfer of the loading box 215 in the first sliding groove 2031, the second sliding groove 2032, the third sliding groove 2033 and the fourth sliding groove 2034 on the surface of the feeding table 2021 can be completed by rotating the feeding table 2021 and controlling the corresponding electric push rod 210 to extend and retract, so as to complete the grabbing and pushing out of the loading box 215. Alternatively, the feeding table 2021 can be kept unchanged, and the first motor 205 under the feeding table 2021 can be controlled to operate to rotate the round table 206, and then the electric push rod 210 can be controlled to extend and retract, so as to complete the transfer of the loading box 215 in the first sliding groove 2031, the second sliding groove 2032, the third sliding groove 2033 and the fourth sliding groove 2034.
[0102] Finally, it should be noted that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An optical glass lens surface detection device, comprising an image acquisition area, the image acquisition area comprising a three-axis moving platform (102), an optical profiler (101) mounted on the surface of the three-axis moving platform (102), and a collection platform (103) mounted on the surface of the three-axis moving platform (102); It is characterized in that Also includes: A material transfer unit and a control unit for controlling the operation of the material transfer unit; The material transfer unit comprises: a material discharging platform (201) arranged on one side of the three-axis moving platform (102); a material loading box (215) is arranged on the surface of the material discharging platform (201); the material loading box (215) is used to carry and protect the optical glass lens; a plurality of transfer tables (202) are installed on the surface of the material discharging platform (201); the transfer tables (202) are used to transfer the material loading boxes (215) carrying the optical glass lens; a mechanical arm (221) is installed on the surface of the three-axis moving platform (102); the mechanical arm (221) 21) is used to transfer the optical glass lenses in the material carrier box (215) and the optical glass lenses on the acquisition platform (103), the mechanical arm (221) is also used to cooperate with the image acquisition of the optical profiler (101) to complete the flipping and rotation of the optical glass lenses, and a barcode scanner (217) is installed on the surface of the optical profiler (101), and the barcode scanner (217) is used to synchronously scan the barcode corresponding to the surface of the material carrier box (215) during the process of image acquisition of the optical glass lenses; The control unit includes: A data acquisition module, used for dividing the lens surface into i sub-areas and numbering each sub-area respectively, so as to acquire lens image data; A defect recognition module, used for inputting image data into the trained first learning model, and outputting predicted defect data, area number and classification data; A collection sequence planning module controls the three-axis moving platform (102) to collect the optical profiler (101) according to the predicted trajectory through the trained second learning model, so as to collect the first defect data; an execution module, used to control the three-axis moving platform (102) and the optical profiler (101) to collect image data, and to control the material transfer unit to operate based on the area number and the classification data, to move the material loading box (215) carrying the optical glass lens to a corresponding area, and to control the mechanical arm (221) to complete the picking and placing of the corresponding optical glass lens; A material discharge platform (201) is provided on one side of the three-axis moving platform (102); a plurality of transfer platforms (202) are provided on the surface of the material discharge platform (201); a plurality of slide grooves (203) are provided on the surface of the transfer platform (202) in a ring array; the transfer platform (202) is rotatably connected to a mounting groove provided on the surface of the material discharge platform (201) via a first bearing; a gear ring (212) is fixedly connected to the bottom surface of the transfer platform (202); a gear (214) is meshedly connected to the surface of the gear ring (212); a second motor (213) is installed on the bottom surface of the material discharge platform (201); and an end of an output shaft of the second motor (213) is fixedly connected to the gear (214); A truncated platform (206) is arranged in a through circular groove provided on the surface of the transfer platform (202); a U-shaped fixed plate (204) is arranged on the surface of the truncated platform (206); the truncated platform (206) is rotatably connected to the accommodating circular groove provided on the surface of the U-shaped fixed plate (204) via a second bearing; the U-shaped fixed plate (204) is fixedly connected to the discharge platform (201); a first motor (205) is installed on the bottom surface of the U-shaped fixed plate (204); the end of the output shaft of the first motor (205) passes through the accommodating circular groove provided on the surface of the U-shaped fixed plate (204) and is in contact with the truncated platform (201). The truncated table (206) is fixedly connected, a U-shaped frame (209) is fixedly connected to the surface of the truncated table (206), an electric push rod (210) is installed on the surface of the U-shaped frame (209), the telescopic end of the electric push rod (210) is symmetrically hinged with a connecting rod (211), the ends of the connecting rod (211) are both hinged with a magnetic plate (207), and telescopic rods (208) are symmetrically arranged on the surface of the magnetic plate (207), the telescopic rods (208) are fixedly connected to the truncated table (206), and the telescopic end of the telescopic rod (208) is fixedly connected to the surface of the magnetic plate (207); A plurality of guide columns (219) are arranged on the surface of the material discharging platform (201), the guide columns (219) are rotatably connected to the material discharging platform (201) via a third bearing, the guide columns (219) are symmetrically arranged along the axial direction of the slide groove (203), and the interior of the slide groove (203) is symmetrically fixedly connected to a limit block (220); A bearing block (216) is slidably connected to the interior of the material loading box (215); a surface of the bearing block (216) is provided with a receiving groove corresponding to the size of the optical glass lens; a barcode is provided on the surface of the bearing block (216); and a barcode scanner (217) is installed on the surface of the optical profiler (101); The first learning model training method includes: Collect K groups of historical defect characteristic data, the area numbers corresponding to the historical defect characteristic data, and the defect grades corresponding to the historical defect characteristic data; The historical defect feature data and the area numbers corresponding to the historical defect feature data and the defect levels corresponding to the historical defect feature data are used as a sample set, and the sample set is divided into a training set and a test set. The historical defect feature data and the defect levels corresponding to the historical defect feature data in the training set are used as inputs of a first learning model, and the area numbers corresponding to the historical defect data and the defect levels corresponding to the historical defect feature data in the training set are used as outputs of the first learning model. The first learning model is trained to output a first learning model that meets a preset accuracy, and the first learning model is a support vector machine model. The second learning model training method includes: Collect M groups of historical defect characteristic data and the area numbers corresponding to the historical defect characteristic data; The historical defect feature data and the area number corresponding to the historical defect feature data are used as the input of the second learning model, and the time taken for first collecting any defect data is used as the output of the second learning model, and the second learning model is trained to output a second learning model that satisfies that the average of the output data for N consecutive times reaches a preset value; The execution module comprises a control panel, which is electrically connected to the optical profiler (101), the three-axis moving platform (102), the first motor (205), the second motor (213), the electric push rod (210), the barcode scanner (217) and the mechanical arm (221) through wires; When the first learning model outputs the first defect grade data of the sth optical lens, the control tablet controls the mechanical arm (221) to place the optical glass lens on the surface of the collection platform (103) back into the corresponding receiving groove opened on the surface of the carrier block (216), and then controls the first motor (205), the second motor (213) and the electric push rod (210) to move accordingly, so as to move the material loading box (215) to the transfer area; When the first learning model outputs that the highest defect level of the f-th optical lens reaches a corresponding set value, the material loading box (215) is moved to a set area.
2. A method for detecting the surface of an optical glass lens, characterized in that: Applied to the device as claimed in claim 1, comprising the following steps: Step 1: Place the optical lenses to be scanned into the corresponding material loading boxes (215) respectively, and insert the optical lenses into the receiving grooves of the corresponding bearing blocks (216), and arrange the bearing blocks (216) between the guide pillars (219); Step 2: The feeding transfer platform (202) is close to the connecting rod (211), and the material distribution transfer platform (202) is surrounded by the feeding transfer platform (202). The electric push rod (210) in the feeding transfer platform (202) is controlled to extend. The extension of the electric push rod (210) is driven by the linkage of the connecting rod (211) and the constraints of the two telescopic rods (208), so that the two magnetic plates (207) enter the corresponding chute (203) respectively, and the material loading box (215) carrying the optical glass lens to be tested is generated. The magnetic plate (207) with attractive force magnetically grabs, and the other magnetic plate (207) with repulsive force pushes the loading box (215) carrying the optical lens after inspection to the outside of the slide slot (203), and the mechanical arm (221) takes out the corresponding optical glass lens from the loading box (215) and places it at a set position on the collection platform (103), and controls the moving optical profiler (101) of the three-axis moving platform (102) and controls the optical profiler (101) to collect images of the optical glass lens; Step 3: In the process of collecting images of the optical glass lens, there are two collection stages. The first collection stage is divided into three collection actions, namely, a first mirror surface collection action, an edge surface collection action, and a second mirror surface collection action. The three-axis moving platform (102) controls the collection trajectory of the optical profiler (101) according to the output of the second learning model to quickly detect whether the mirror surface has unqualified defects. The three collection actions are performed in sequence. If unqualified defects are detected, the detection is stopped immediately, the mechanical arm (221) is controlled to put the optical glass lens back into the corresponding material loading box (215), and the corresponding transfer platform (202) is controlled to rotate to collect images of the next optical glass lens, and the material loading box (215) containing unqualified defects is pushed into the transfer area through the magnetic plate (207) that generates repulsive force to wait for the second round of detection. During this process, the barcode scanner (217) scans the barcode on the surface of the carrier block (216) from which the optical glass lens has just been taken, and records the data of the optical glass lens being scanned; Step 4, when all lenses have been inspected, all lenses in the transfer area are transferred again through the transfer table (202) and grabbed by the robot arm (221) for a second round of inspection. The second round of inspection starts from the position of the defect data detected in the first round. If the data at the same position in the two rounds of inspection are inconsistent, the corresponding lenses are transferred to the problem area for manual processing. If they are consistent, the inspection path set by the second learning model is continued, and according to the defect classification data output by the first learning model, the transfer table (202) is controlled to transfer the corresponding material loading box (215) to the set area.
Citation Information
Patent Citations
An optical detection system
CN107543827A
Surface defect detection device and detection method for high-precision optical element
CN108152299A
Lens flaw detection method, device and equipment and storage medium
CN115082416A
Method for automatically detecting and screening optical glass lenses
CN117415050A
Typical defect detection method and system for target object in industrial video image
CN118470013A
