A method and apparatus for multi-station parallel lens defect detection
The multi-station parallel lens defect detection method simultaneously acquires multiple lens sample images at multiple stations and generates clear images through image fusion for visual learning. This solves the problems of missed detections and slow detection speed in the manual visual inspection stage of lens defect detection, realizes automated lens detection, improves detection speed and accuracy, and reduces detection costs.
Patent Information
- Application Number
- CN202210617914.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-01
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-06-01
AI Technical Summary
Lens defect detection is still based on manual visual inspection, which has problems such as missed detections, inability to quantify, slow detection speed, and high detection costs. The efficiency of single-station automated detection is low.
A multi-station parallel lens defect detection method is adopted, which simultaneously acquires multiple lens sample images at multiple stations, fuses the images to generate clear images, performs visual learning to obtain a threshold model, and uses the threshold segmentation method for defect detection.
It enables simultaneous automated testing of multiple lenses, improving testing speed and accuracy, reducing testing costs, and achieving quantitative testing.
Smart Images

Figure CN115222658B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology in computer vision learning, and in particular to a multi-station parallel lens defect detection method and apparatus. Background Technology
[0002] Detecting lens defects is not only crucial for ensuring the pass rate of outgoing lenses, but also an effective method for monitoring the lens production process, and a powerful guarantee for improving lens quality. Currently, lens defect detection remains at the stage of manual visual inspection, which seriously hinders the development of fully automated lens production lines. Manual visual inspection suffers from problems such as missed detections, inability to quantify defects, slow inspection speed, and high inspection costs.
[0003] Therefore, existing technologies have enabled single-station automated inspection equipment, but single-station automated inspection is inefficient, can only inspect a single lens, cannot quantify, and is slow. Summary of the Invention
[0004] This invention aims to address at least one of the technical problems existing in the prior art. To this end, this invention proposes a multi-station parallel lens defect detection method and apparatus, which can simultaneously and automatically detect multiple lenses, enabling quantification, improving detection speed, reducing detection costs, and increasing detection accuracy.
[0005] In a first aspect, embodiments of the present invention provide a multi-station parallel lens defect detection method, comprising the following steps:
[0006] Multiple lens sample images are acquired simultaneously at multiple workstations, and the same sample is acquired multiple times along the vertical direction at each workstation to obtain a lens sample image dataset.
[0007] Multiple images of the same sample collected multiple times from the image dataset of the lens sample to be tested are combined into the clearest image using an image fusion method. Defects are identified and marked on all the clearest images to obtain a defect sample dataset.
[0008] The defect sample dataset is subjected to visual learning to obtain a visual learning model;
[0009] The threshold corresponding to the defect sample dataset is obtained based on the visual learning model.
[0010] The actual parameters of the lens to be tested are obtained. Based on the threshold and the parameters, the threshold segmentation method is used to perform defect detection on the lens image corresponding to the lens to be tested, and the defect detection result is obtained.
[0011] Compared with the prior art, the first aspect of the present invention has the following beneficial effects:
[0012] This method simultaneously acquires multiple lens sample images at multiple workstations, with each workstation acquiring the same sample multiple times along the vertical direction to obtain a lens sample image dataset. This method facilitates image acquisition and improves acquisition efficiency by simultaneously acquiring multiple images from the same sample in the lens sample image dataset. The method then uses image fusion to synthesize the clearest image from multiple acquisitions of the same sample in the lens sample image dataset. Defects are identified and labeled on the clearest image to obtain a defect sample dataset. By merging multiple acquisitions of the same sample into the clearest sample image, all defects are revealed, improving detection accuracy. Furthermore, this method performs visual learning on the defect sample dataset to obtain a visual learning model. Based on the visual learning model, a threshold corresponding to the defect sample dataset is obtained. The actual parameters of the lens to be inspected are acquired. Based on the threshold and parameters, a threshold segmentation method is used to perform defect detection on the corresponding lens image of the lens to be inspected, obtaining the defect detection results and achieving automation of defect detection. Therefore, this method can achieve automated and high-precision detection of multiple lenses simultaneously in a single operation. It enables automated detection of multiple lenses at the same time, achieves quantitative detection, improves detection speed, reduces detection costs, and improves detection accuracy.
[0013] According to some embodiments of the present invention, the multi-station parallel lens defect detection method further includes the following steps:
[0014] Obtain the image of the lens to be tested, and select the region of interest in the image of the lens to be tested;
[0015] The outer contour of the lens to be tested in the region of interest is calculated using the Hough circle detection principle, and the pixel coordinates of the outer contour of the lens to be tested are calculated.
[0016] Obtain the diameter of the lens to be tested, and compare the diameter of the outer contour of the lens to be tested with the diameter of the lens to be tested. If the difference between the diameter of the outer contour of the lens to be tested and the diameter of the lens to be tested is less than or equal to 0.1 mm, then continue to select the region of interest of the lens to be tested; if the difference between the diameter of the outer contour of the lens to be tested and the diameter of the lens to be tested is greater than 0.1 mm, then end the selection of the region of interest.
[0017] The outer contour template of the lens to be tested is obtained based on the pixel coordinates of the outer contour of the lens to be tested, and the outer contour template is numbered.
[0018] According to some embodiments of the present invention, the multi-station parallel lens defect detection method, after the selection of the region of interest is completed, further includes the step of:
[0019] Obtain the outer contour template corresponding to the number of the image of the lens to be tested;
[0020] The center of the outer contour of the lens to be tested is calculated using the diameter of the outer contour of the lens to be tested and the pixel coordinates in the outer contour template.
[0021] Obtain the diameter of the lens to be tested, and re-extract the outer contour of the lens to be tested by using the center of the outer contour of the lens to be tested and the diameter of the lens to be tested;
[0022] Determine whether the re-extracted outer contour of the lens to be tested is in the outer contour template. If the re-extracted outer contour of the lens to be tested is not in the outer contour template, then re-extract the outer contour of the lens to be tested again. If the re-extracted outer contour of the lens to be tested is in the outer contour template, then end the extraction of the outer contour of the lens to be tested.
[0023] According to some embodiments of the present invention, the step of performing defect detection on the lens image corresponding to the lens to be tested using a threshold segmentation method based on the threshold and the parameters to obtain defect detection results includes:
[0024] Based on the threshold obtained by the visual learning model and the outer contour of the lens to be tested, the center of the lens to be tested is located.
[0025] Determine whether the center of the lens to be tested coincides with the center of the outer contour of the lens to be tested. If the center of the image of the lens to be tested does not coincide with the center of the outer contour of the lens to be tested, then reposition the center of the image of the lens to be tested. If the center of the image of the lens to be tested coincides with the center of the outer contour of the lens to be tested, then perform lens missing detection. The lens missing detection is used to detect whether the lens in the image of the lens to be tested is fully displayed.
[0026] If the lens in the image of the lens to be tested is not fully displayed, the threshold obtained by the visual learning model is adjusted so that the lens in the image of the lens to be tested is fully displayed; if the lens in the image of the lens to be tested is fully displayed, the defect type is selected and the defect of the lens in the image of the lens to be tested is extracted according to the threshold segmentation method.
[0027] Determine whether the outer contour of the lens to be tested completely overlaps with the lens in the image of the lens to be tested. If the outer contour of the lens to be tested does not completely overlap with the lens in the image of the lens to be tested, then reselect the defect type and re-extract the defect of the lens in the image of the lens to be tested according to the threshold segmentation method. If the outer contour of the lens to be tested completely overlaps with the lens in the image of the lens to be tested, then obtain the size of the defect and save the threshold corresponding to the size to the visual learning model.
[0028] Change the selected defect type to screen all defects of the lens to be tested and obtain the defect detection results.
[0029] According to some embodiments of the present invention, the lens loss detection includes:
[0030] Obtain the outer contour of the lens to be tested, compare the outer contour of the lens to be tested with the image of the lens to be tested, and check for any missing parts. If there are no missing parts, it means that the lens to be tested is fully displayed; if there are missing parts, it means that the lens to be tested is not fully displayed.
[0031] According to some embodiments of the present invention, the multi-station parallel lens defect detection method further includes the following steps:
[0032] The detection range of the lens to be tested is preset so that when the diameter of the lens to be tested is within the detection range, the outer contour of the lens to be tested is obtained.
[0033] Secondly, embodiments of the present invention also provide a multi-station parallel lens defect detection device, which further includes:
[0034] A turntable is mounted on the frame. The turntable is equipped with a loading gripping station, a lens inspection station, and a unloading gripping station. The turntable is used to rotate the lens to be inspected located at the loading gripping station to the lens inspection station, and to rotate the lens to be inspected located at the lens inspection station to the unloading gripping station.
[0035] The feeding mechanism includes a first placement tray and a feeding robot arm mounted on the frame. The first placement tray is used to place the lens to be tested, and the feeding robot arm is used to grab the lens to be tested from the first placement tray and place it on the feeding and grabbing station.
[0036] A multi-station inspection mechanism is set on the frame and located above the lens inspection station. The multi-station inspection mechanism includes a vertical motion mechanism and multiple inspection modules located on the vertical motion mechanism. The vertical motion mechanism is used to control the multiple inspection modules to move in the vertical direction. The multiple inspection modules are used to inspect multiple lenses to be inspected and perform a multi-station parallel lens defect inspection method as described above.
[0037] The unloading mechanism includes an unloading robot arm mounted on a frame and a second placement tray. The unloading robot arm picks up the lens to be tested from the unloading gripping station and places it on the second placement tray.
[0038] Compared with the prior art, the second aspect of the present invention has the following beneficial effects:
[0039] The multi-station inspection mechanism of this device includes a vertical motion mechanism and multiple inspection modules located on the vertical motion mechanism. The vertical motion mechanism controls the movement of the multiple inspection modules in the vertical direction, and the multiple inspection modules inspect multiple lenses to be inspected. The multiple inspection modules can simultaneously inspect the lenses to be inspected at multiple lens inspection stations through the vertical motion mechanism, realizing non-contact measurement. Moreover, multiple lenses to be inspected can be inspected simultaneously in a single operation. The vertical motion mechanism controls the movement of the multiple inspection modules in the vertical direction, and the multiple inspection modules simultaneously inspect the lenses to be inspected at multiple lens inspection stations, enabling quantitative inspection and improving inspection speed.
[0040] According to some embodiments of the present invention, the second placement tray includes a good product placement tray and a defective product placement tray, the good product placement tray and the defective product placement tray are located on one side of the unloading robot, the unloading robot places products that are free of defects into the good product placement tray, and the unloading robot places products that are defective into the defective product placement tray.
[0041] According to some embodiments of the present invention, each of the detection modules includes a detection camera, a telecentric lens, a ring light source, and a station detection fixture. The detection camera is disposed above the lens to be detected and is used to acquire an image of the lens to be detected. The telecentric lens is disposed between the detection camera and the lens to be detected and is used to image the lens to be detected onto the photosensitive element of the detection camera. The ring light source is disposed below the telecentric lens and at a distance, covering the periphery of the lens to be detected and is used to illuminate the lens from the side. The station detection fixture is disposed at the lens detection station, located below the ring light source, and is used to fix the position of the lens to be detected.
[0042] According to some embodiments of the present invention, a point light source is fixed on the telecentric lens, and the point light source is disposed above the lens to be tested for illuminating the lens from the top. Attached Figure Description
[0043] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0044] Figure 1 This is a flowchart of a multi-station parallel lens defect detection method according to an embodiment of the present invention;
[0045] Figure 2 This is a structural diagram of a multi-station parallel lens defect detection device according to an embodiment of the present invention;
[0046] Figure label:
[0047] 110. First placement tray; 120. Loading robot; 130. Loading and gripping station; 210. Turntable; 310. Vertical motion mechanism; 321. Inspection camera; 322. Telecentric lens; 323. Ring light source; 324. Station inspection fixture; 325. Point light source; 326. Bottom light source; 330. Lens inspection station; 410. Unloading robot; 420. Unloading and gripping station; 431. Good product placement tray; 432. Defective product placement tray. Detailed Implementation
[0048] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0049] In the description of this invention, the use of terms such as "first," "second," etc., is for the purpose of distinguishing technical features only and should not be construed as indicating or implying relative importance, or implicitly indicating the number of technical features indicated, or implicitly indicating the order of the technical features indicated.
[0050] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, etc., are based on the orientation or positional relationship shown in the drawings and are only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0051] In the description of this invention, it should be noted that, unless otherwise explicitly defined, terms such as "setting," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.
[0052] Detecting lens defects is not only crucial for ensuring the pass rate of outgoing lenses, but also an effective method for monitoring the lens production process, and a powerful guarantee for improving lens quality. Currently, lens defect detection remains at the stage of manual visual inspection, which seriously hinders the development of fully automated lens production lines. Manual visual inspection suffers from problems such as missed detections, inability to quantify defects, slow inspection speed, and high inspection costs.
[0053] Therefore, existing technologies have enabled single-station automated inspection equipment, but single-station automated inspection is inefficient, can only inspect a single lens, cannot quantify, and is slow.
[0054] To address the aforementioned issues, this invention simultaneously acquires multiple lens sample images at multiple workstations, with each workstation acquiring the same sample multiple times along the vertical direction, thus obtaining a lens sample image dataset. This invention facilitates image acquisition and improves acquisition efficiency by simultaneously acquiring multiple images from multiple workstations. Furthermore, this invention synthesizes multiple images of the same sample acquired multiple times from the lens sample image dataset into a single, clearest image using an image fusion method. This clearest image is then used for defect identification and labeling to obtain a defect sample dataset. By merging multiple images of the same sample acquired multiple times into the clearest sample image, all defects are revealed, improving detection accuracy. This invention also performs visual learning on the defect sample dataset to obtain a visual learning model; based on the visual learning model, a threshold corresponding to the defect sample dataset is obtained; the actual parameters of the lens to be inspected are acquired; and based on the threshold and parameters, a threshold segmentation method is used to perform defect detection on the corresponding lens image, obtaining the defect detection results and automating defect detection. Therefore, the present invention can achieve automated and high-precision detection of multiple lenses to be tested simultaneously in a single operation. The present invention can perform automated detection of multiple lenses at the same time, realize quantitative detection, improve detection speed, reduce detection cost, and improve detection accuracy.
[0055] Reference Figure 1 This invention provides a multi-station parallel lens defect detection method, including the following steps:
[0056] Step S100: Collect multiple lens sample images simultaneously at multiple workstations, and collect the same sample multiple times along the vertical direction at each workstation to obtain a lens sample image dataset.
[0057] Specifically, multiple lens sample images are acquired simultaneously at multiple workstations, and each workstation acquires the same sample multiple times along the vertical direction to obtain a lens sample image dataset. That is, each workstation is equipped with a camera, and multiple workstations have multiple cameras. Multiple cameras simultaneously capture images of the lens samples, and each camera captures images of the lens sample multiple times along the vertical direction (i.e., the vertical direction) of the scanning mechanism to obtain a lens sample image dataset.
[0058] In this embodiment, multiple lens sample images are acquired simultaneously at multiple workstations, and the same sample is acquired multiple times along the vertical direction at each workstation to obtain a lens sample image dataset. Therefore, this embodiment can acquire multiple images simultaneously at multiple workstations, which facilitates image acquisition and improves image acquisition efficiency.
[0059] Step S200: Combine multiple images of the same sample collected multiple times in the lens sample image dataset into the clearest image using an image fusion method. Perform defect identification and labeling on all the clearest images to obtain a defect sample dataset.
[0060] Specifically, the same lens sample is captured multiple times by a camera moving along the vertical direction scanning mechanism. The multiple images of the same sample are then combined into the clearest image using an image fusion method. Defects are identified and labeled in all the clearest images to obtain a defect sample dataset.
[0061] It should be noted that this image fusion method is an existing image fusion method, and therefore will not be described in detail in this embodiment.
[0062] In this embodiment, multiple images of the same sample collected multiple times from the lens sample image dataset are combined into the clearest image using an image fusion method. The clearest image is then used for defect identification and labeling to obtain a defect sample dataset. Therefore, by merging multiple images of the same sample collected multiple times into the clearest sample image, all defects can be revealed, improving the accuracy of detection.
[0063] Step S300: Perform visual learning on the defect sample dataset to obtain a visual learning model.
[0064] Specifically, the defect sample dataset obtained in step S200 is used for visual learning via AI to obtain a visual learning model. In this embodiment, visual learning via AI can learn all defects in the defect sample dataset.
[0065] Step S400: Obtain the threshold corresponding to the defect sample dataset based on the visual learning model.
[0066] Specifically, after learning all defects in the defect sample dataset through a visual learning model, the threshold corresponding to each defect is obtained.
[0067] Step S500: Obtain the actual parameters of the lens to be tested. Based on the threshold and parameters, use the threshold segmentation method to perform defect detection on the lens image corresponding to the lens to be tested, and obtain the defect detection result.
[0068] Specifically, the process involves obtaining images of the lenses to be tested. All images of the lenses to be tested are stored in files or folders. When testing is required, the specified image of the lens to be tested is displayed. The region of interest is selected in the image of the lens to be tested and the selected region of interest is displayed, thus obtaining the region of interest of the image of the lens to be tested.
[0069] It should be noted that the region of interest (ROI) outlined in the image of the lens to be inspected is very rough. This is to prepare for accurately locating the outer contour of the lens to be inspected later. When obtaining the actual image of the lens to be inspected, the actual size of the lens to be inspected (i.e., the actual parameters of the lens to be inspected) will also be obtained from the image of the lens to be inspected. The actual size of the lens to be inspected will be written into the settings file for use when detecting defects. The actual size of the lens to be inspected includes the diameter of the lens to be inspected, etc.
[0070] The outer contour of the lens to be tested and its pixel coordinates within the region of interest are calculated using the Hough circle detection principle. The existing outer contour of the lens to be tested is displayed, and the diameter and pixel coordinates of the outer contour of the lens to be tested are obtained.
[0071] It should be noted that this embodiment will preset the number of outer contours to be detected. The number of outer contours of the lens will be detected by the Hough circle detection principle, and the number of outer contours cannot exceed the preset number of outer contours to be detected.
[0072] Obtain the diameter of the lens to be tested, and compare the diameter of the outer contour of the lens to be tested with the diameter of the lens to be tested. If the difference between the diameter of the outer contour of the lens to be tested and the diameter of the lens to be tested is less than or equal to 0.1 mm, then continue to select the region of interest of the lens to be tested; if the difference between the diameter of the outer contour of the lens to be tested and the diameter of the lens to be tested is greater than 0.1 mm, then end the selection of the region of interest.
[0073] After selecting the region of interest, the outer contour template of the lens to be tested is obtained based on the pixel coordinates of the outer contour of the lens to be tested. The outer contour template is then numbered and saved.
[0074] When it is necessary to test a lens, obtain the outer contour template corresponding to the number of the lens image to be tested;
[0075] The center of the outer contour of the lens to be inspected is calculated using the diameter of the outer contour and the pixel coordinates in the outer contour template, and then the center is displayed.
[0076] Obtain the diameter of the lens to be tested, and re-extract the outer contour of the lens to be tested by using the center of the outer contour of the lens to be tested and the diameter of the lens to be tested;
[0077] The maximum and minimum diameters of the outer contour of the lens to be tested are preset to obtain the lens testing range;
[0078] If the Hough circle detection principle detects that the diameter of the lens to be tested is outside the lens detection range, the outer contour of the lens to be tested cannot be detected; if the Hough circle detection principle detects that the diameter of the lens to be tested is within the lens detection range, the outer contour of the lens to be tested can be detected.
[0079] If the outer contour of the re-extracted lens to be tested can be detected, determine whether the re-extracted outer contour of the lens to be tested is in the outer contour template. If the re-extracted outer contour of the lens to be tested is not in the outer contour template, then the outer contour of the lens to be tested is re-extracted again; if the re-extracted outer contour of the lens to be tested is in the outer contour template, then the extraction of the outer contour of the lens to be tested ends.
[0080] After extracting the outer contour of the lens to be tested, the center of the lens to be tested is located and displayed based on the threshold obtained by the visual learning model and the outer contour of the lens to be tested.
[0081] Determine whether the center of the lens to be tested coincides with the center of the outer contour of the lens to be tested. If the center of the lens image to be tested does not coincide with the center of the outer contour of the lens to be tested, then reposition the center of the lens image to be tested. If the center of the lens image to be tested coincides with the center of the outer contour of the lens to be tested, then perform lens missing detection. Lens missing detection is used to detect whether the lens in the lens image to be tested is fully displayed.
[0082] The process of detecting missing lenses is as follows: obtain the outer contour of the lens to be tested, compare the outer contour of the lens to be tested with the image of the lens to be tested, and look for any missing parts. If there are no missing parts, it means that the lens to be tested is displayed completely; if there are missing parts, it means that the lens to be tested is not displayed completely.
[0083] If the lens in the image to be inspected is not fully displayed, the threshold obtained by the visual learning model is adjusted to make the lens in the image to be fully displayed; if the lens in the image to be inspected is fully displayed, the defect type is selected and the defect of the lens in the image to be inspected is extracted according to the threshold segmentation method.
[0084] After selecting the defect type, it is determined whether the outer contour of the lens to be inspected completely overlaps with the lens in the image of the lens to be inspected. If the outer contour of the lens to be inspected does not completely overlap with the lens in the image of the lens to be inspected, the defect type is reselected, and the defect of the lens in the image of the lens to be inspected is extracted again according to the threshold segmentation method. If the outer contour of the lens to be inspected completely overlaps with the lens in the image of the lens to be inspected, the size of the defect is obtained, and the threshold corresponding to the size is saved to the visual learning model.
[0085] Change the selected defect type to screen all defects of the lens to be tested until all defects have been checked, then end the defect test of the lens to be tested and obtain the defect test results of the lens to be tested.
[0086] In this embodiment, a visual learning model is obtained by performing visual learning on the defect sample dataset; a threshold corresponding to the defect sample dataset is obtained based on the visual learning model; the actual parameters of the lens to be inspected are obtained; and based on the threshold and parameters, a threshold segmentation method is used to perform defect detection on the lens image corresponding to the lens to be inspected, thereby obtaining the defect detection result and realizing the automation of defect detection. Therefore, this embodiment can achieve automated and high-precision detection of multiple lenses to be inspected simultaneously in a single operation. This embodiment can perform automated detection of multiple lenses simultaneously, enabling quantitative detection, improving detection speed, reducing detection costs, and improving detection accuracy.
[0087] Reference Figure 2 The present invention also provides a multi-station parallel lens defect detection device, including a frame, and the multi-station parallel lens defect detection device further includes:
[0088] A turntable 210 is mounted on a frame. The turntable 210 is equipped with a loading gripping station 130, a lens inspection station 330, and a unloading gripping station 420. The turntable 210 is used to rotate the lens to be inspected located on the loading gripping station 130 to the lens inspection station 330, and to rotate the lens to be inspected located on the lens inspection station 330 to the unloading gripping station 420.
[0089] The feeding mechanism includes a first placement tray 110 and a feeding robot 120 mounted on the frame. The first placement tray 110 is used to place the lens to be tested, and the feeding robot 120 is used to grab the lens to be tested from the first placement tray 110 and place it on the feeding gripping station 130.
[0090] A multi-station inspection mechanism is mounted on a frame and located above the lens inspection station 330. The multi-station inspection mechanism includes a vertical motion mechanism 310 and multiple inspection modules located on the vertical motion mechanism 310. The vertical motion mechanism 310 controls the vertical movement of the multiple inspection modules. The multiple inspection modules are used to inspect multiple lenses to be inspected and perform the methods described in the above embodiments, for example, performing the above-described... Figure 1 Method steps S100 to S500;
[0091] The unloading mechanism includes an unloading robot 410 and a second placement tray mounted on the frame. The unloading robot 410 picks up the lens to be inspected from the unloading gripping station 420 and places it on the second placement tray.
[0092] In this embodiment, the multi-station inspection mechanism includes a vertical motion mechanism 310 and multiple inspection modules located on the vertical motion mechanism 310. The vertical motion mechanism 310 controls the movement of the multiple inspection modules in the vertical direction, and the multiple inspection modules inspect multiple lenses to be inspected. The multiple inspection modules can simultaneously inspect multiple lenses to be inspected at multiple lens inspection stations 330 through the vertical motion mechanism 310, realizing non-contact measurement; and multiple lenses to be inspected can be inspected simultaneously in a single operation. The vertical motion mechanism 310 controls the movement of the multiple inspection modules in the vertical direction, and the multiple inspection modules simultaneously inspect multiple lenses to be inspected at multiple lens inspection stations 330, enabling quantitative inspection and improving inspection speed.
[0093] In some embodiments, the second placement tray includes a good product placement tray 431 and a defective product placement tray 432, which are located on one side of the unloading robot 410. The unloading robot 410 places products that are free of defects into the good product placement tray 431 and products that are defective into the defective product placement tray 432.
[0094] In some embodiments, each detection module includes a detection camera 321, a telecentric lens 322, a ring light source 323, and a station detection fixture 324. The detection camera 321 is disposed above the lens to be detected and is used to acquire images of the lens to be detected. The telecentric lens 322 is disposed between the detection camera 321 and the lens to be detected and is used to image the lens to be detected onto the photosensitive element of the detection camera 321. The ring light source 323 is disposed below the telecentric lens 322 and at a distance, covering the periphery of the lens to be detected and is used to illuminate the lens from the side. The station detection fixture 324 is disposed on the lens detection station 330, located below the ring light source 323, and is used to fix the position of the lens to be detected.
[0095] In some embodiments, a point light source 325 is fixed on the telecentric lens 322. The point light source 325 is positioned above the lens to be tested and is used to illuminate the lens from the top.
[0096] In some embodiments, a bottom light source 326 is connected below the lens inspection station 330 for illuminating the bottom of the lens to be inspected.
[0097] In this embodiment, a telecentric lens 322 is used. The telecentric lens 322 has a larger depth of field, ensuring that the magnification of the image remains constant within a certain object distance range. This embodiment also combines a ring light source 323, a bottom light source 326, and a point light source 325. In use, the point light source 325 targets surface defects, the ring light source 323 provides side-level dark-field illumination to the lens, detecting scratches and cracks by reflecting light at various angles, and the bottom light source 326 provides bright-field illumination to the lens, primarily targeting the detection of sand-like fog, ablation, and bubbles. Under the illumination of the bottom light source 326, defective areas will reflect brighter light than other areas, making the defects more obvious. This embodiment provides a comprehensive lighting method for lens inspection, enabling the lens to accurately and comprehensively image the lens under inspection onto the camera's sensor, thereby solving problems such as missed detections and reduced accuracy caused by incomplete lighting methods.
[0098] It should be noted that, Figure 2 All the various device structures in this embodiment are included in this embodiment, and will not be described in detail here.
[0099] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A method for multi-station parallel lens defect detection, characterized in that, Including the following steps: Multiple lens sample images are acquired simultaneously at multiple workstations, and the same sample is acquired multiple times along the vertical direction at each workstation to obtain a lens sample image dataset. Multiple images of the same sample collected multiple times from the image dataset of the lens sample to be tested are combined into the clearest image using an image fusion method. Defects are identified and marked on all the clearest images to obtain a defect sample dataset. The defect sample dataset is subjected to visual learning to obtain a visual learning model; The threshold corresponding to the defect sample dataset is obtained based on the visual learning model. Obtain the actual parameters of the lens to be tested. Based on the threshold and the parameters, use the threshold segmentation method to perform defect detection on the lens image corresponding to the lens to be tested, and obtain the defect detection result, including: Based on the threshold obtained by the visual learning model and the outer contour of the lens to be detected, the center of the image of the lens to be detected is located. Determine whether the center of the image of the lens to be tested coincides with the center of the outer contour of the lens to be tested. If the center of the image of the lens to be tested does not coincide with the center of the outer contour of the lens to be tested, then reposition the center of the image of the lens to be tested. If the center of the image of the lens to be tested coincides with the center of the outer contour of the lens to be tested, then perform lens missing detection. The lens missing detection is used to detect whether the lens in the image of the lens to be tested is fully displayed. If the lens in the image of the lens to be tested is not fully displayed, the threshold obtained by the visual learning model is adjusted so that the lens in the image of the lens to be tested is fully displayed; if the lens in the image of the lens to be tested is fully displayed, the defect type is selected and the defect of the lens in the image of the lens to be tested is extracted according to the threshold segmentation method. Determine whether the outer contour of the lens to be tested completely overlaps with the lens in the image of the lens to be tested. If the outer contour of the lens to be tested does not completely overlap with the lens in the image of the lens to be tested, then reselect the defect type and re-extract the defect of the lens in the image of the lens to be tested according to the threshold segmentation method. If the outer contour of the lens to be tested completely overlaps with the lens in the image of the lens to be tested, then obtain the size of the defect and save the threshold corresponding to the size to the visual learning model. Change the selected defect type to screen all defects of the lens to be tested and obtain the defect detection results.
2. The multi-station parallel lens defect detection method according to claim 1, characterized in that, The multi-station parallel lens defect detection method further includes the following steps: Obtain the image of the lens to be tested, and select the region of interest in the image of the lens to be tested; The outer contour of the lens to be tested in the region of interest is calculated using the Hough circle detection principle, and the pixel coordinates of the outer contour of the lens to be tested are calculated. Obtain the diameter of the lens to be tested, and compare the diameter of the outer contour of the lens to be tested with the diameter of the lens to be tested. If the difference between the diameter of the outer contour of the lens to be tested and the diameter of the lens to be tested is less than or equal to 0.1 mm, then continue to select the region of interest of the lens to be tested; if the difference between the diameter of the outer contour of the lens to be tested and the diameter of the lens to be tested is greater than 0.1 mm, then end the selection of the region of interest. The outer contour template of the lens to be tested is obtained based on the pixel coordinates of the outer contour of the lens to be tested, and the outer contour template is numbered.
3. The multi-station parallel lens defect detection method according to claim 2, characterized in that, The multi-station parallel lens defect detection method, after the selection of the region of interest is completed, further includes the following steps: Obtain the outer contour template corresponding to the number of the image of the lens to be tested; The center of the outer contour of the lens to be tested is calculated using the diameter of the outer contour of the lens to be tested and the pixel coordinates in the outer contour template. Obtain the diameter of the lens to be tested, and re-extract the outer contour of the lens to be tested by using the center of the outer contour of the lens to be tested and the diameter of the lens to be tested; Determine whether the re-extracted outer contour of the lens to be tested is in the outer contour template. If the re-extracted outer contour of the lens to be tested is not in the outer contour template, then re-extract the outer contour of the lens to be tested again. If the re-extracted outer contour of the lens to be tested is in the outer contour template, then end the extraction of the outer contour of the lens to be tested.
4. The multi-station parallel lens defect detection method according to claim 1, characterized in that, The process of detecting missing lenses includes: Obtain the outer contour of the lens to be tested, compare the outer contour of the lens to be tested with the image of the lens to be tested, and check for any missing parts. If there are no missing parts, it means that the lens to be tested is fully displayed; if there are missing parts, it means that the lens to be tested is not fully displayed.
5. The multi-station parallel lens defect detection method according to claim 4, characterized in that, The multi-station parallel lens defect detection method further includes the following steps: The detection range of the lens to be tested is preset so that when the diameter of the lens to be tested is within the detection range, the outer contour of the lens to be tested is obtained.
6. A multi-station parallel lens defect detection device, comprising a frame, characterized in that, The multi-station parallel lens defect detection device also includes: A turntable is mounted on the frame. The turntable is equipped with a loading gripping station, a lens inspection station, and a unloading gripping station. The turntable is used to rotate the lens to be inspected located at the loading gripping station to the lens inspection station, and to rotate the lens to be inspected located at the lens inspection station to the unloading gripping station. The feeding mechanism includes a first placement tray and a feeding robot arm mounted on the frame. The first placement tray is used to place the lens to be tested, and the feeding robot arm is used to grab the lens to be tested from the first placement tray and place it on the feeding and grabbing station. A multi-station inspection mechanism is disposed on the frame and located above the lens inspection station. The multi-station inspection mechanism includes a vertical motion mechanism and multiple inspection modules located on the vertical motion mechanism. The vertical motion mechanism is used to control the multiple inspection modules to move in the vertical direction. The multiple inspection modules are used to inspect multiple lenses to be inspected and perform a multi-station parallel lens defect inspection method as described in any one of claims 1 to 5. The unloading mechanism includes an unloading robot arm mounted on a frame and a second placement tray. The unloading robot arm picks up the lens to be tested from the unloading gripping station and places it on the second placement tray.
7. The multi-station parallel lens defect detection device according to claim 6, characterized in that, The second placement tray includes a good product placement tray and a defective product placement tray, which are located on one side of the unloading robot. The unloading robot places products that are free of defects into the good product placement tray and products that are defective into the defective product placement tray.
8. The multi-station parallel lens defect detection device according to claim 7, characterized in that, Each of the detection modules includes a detection camera, a telecentric lens, a ring light source, and a station detection fixture. The detection camera is positioned above the lens to be inspected and is used to acquire images of the lens. The telecentric lens is positioned between the detection camera and the lens to be inspected and is used to image the lens onto the photosensitive element of the detection camera. The ring light source is positioned below the telecentric lens and at a distance, surrounding the lens to be inspected, and is used to illuminate the lens from the side. The station detection fixture is positioned at the lens inspection station, below the ring light source, and is used to fix the position of the lens to be inspected.
9. The multi-station parallel lens defect detection device according to claim 8, characterized in that, A point light source is fixed on the telecentric lens and is positioned above the lens to be tested, for illuminating the lens from the top.
Citation Information
Patent Citations
Lens defect detection method and device
CN107153072A
Defect detection equipment
CN111122609A
Aluminum die casting surface defect detection method based on deep learning
CN112345539A
KR20220032266A