Optical lens imaging system and optical lens defect detection method

By employing a four-angle imaging scheme and a deep learning model in the optical lens inspection system, the problems of low efficiency and large blind spots in existing inspection methods have been solved, enabling efficient and accurate detection of various defects in optical lenses.

CN121955019APending Publication Date: 2026-05-01CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2026-01-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing methods for detecting defects in optical lenses are inefficient and inconsistent. Single light source and single point detection schemes are insufficient to comprehensively detect multiple defects in lenses, especially surface and internal defects.

Method used

A bidirectional four-angle imaging scheme is adopted, which combines parallel light transmission illumination, grating phase-shifting imaging, and ring light reflection illumination at four imaging points. By combining a multi-branch feature extraction aggregation network and a deep learning model, multi-mode imaging and recognition of surface and internal defects of optical lenses can be achieved.

Benefits of technology

It improves the comprehensiveness and accuracy of optical lens defect detection, avoids detection blind spots, and enables efficient identification and quantitative evaluation of different types of defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121955019A_ABST
    Figure CN121955019A_ABST
Patent Text Reader

Abstract

The invention discloses an optical lens imaging system and an optical lens defect detection method, and relates to the field of optical lens detection.The system comprises a conveying belt, a large-face transmission imaging module, a large-face reflection imaging module, a small-face reflection imaging module, a small-face transmission imaging module and a control module, and different types of light sources are arranged at four detection points respectively. Multi-angle imaging is carried out from the upper direction and the lower direction of a lens, a grating modulation technology is adopted for parallel light transmission point positions, the internal defect display effect is enhanced through differential processing, and the detection method comprises the steps that preprocessing such as segmentation, difference, enhancement and registration is carried out on six images; constructing a multi-branch feature extraction network, and adopting a priori guided feature fusion mechanism; constructing a defect detector comprising classification, positioning and quantification; according to the invention, comprehensive detection of defects on the surface and inside of the lens is realized, the sensitivity is high, the efficiency is high, the structure is compact, and the method is suitable for industrial mass production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of optical inspection technology, and in particular to an optical lens imaging system and a method for detecting defects in optical lenses. Background Technology

[0002] Optical lenses are widely used in eyeglasses, cameras, microscopes, telescopes, and other fields, and their quality directly affects the performance of the final product. Optical lens testing involves inspecting and measuring the quality and performance of optical lenses during the manufacturing process, including aspects such as appearance, dimensions, and optical properties.

[0003] Existing methods for detecting defects in optical lenses mainly include manual visual inspection and machine vision inspection. Manual visual inspection relies on the experience of inspectors and suffers from problems such as low inspection efficiency, poor consistency, and fatigue. Machine vision inspection achieves automated inspection through industrial cameras and image processing algorithms, but existing machine vision inspection systems mostly adopt a configuration scheme with a single light source and a single inspection point.

[0004] The problems with a single light source configuration are as follows: Optical lenses have various defect types, including surface scratches, pitting, edge breakage, surface contamination, and poor grinding. Different types of defects exhibit significantly different imaging characteristics under different lighting conditions. For example, edge breakage defects show high contrast under ring light reflection illumination, while internal stress defects such as scratches are more easily revealed under parallel light transmission illumination. The problems with single-point detection are also as follows: Lenses are double-sided transparent elements, making it difficult to simultaneously detect defects on both the upper and lower surfaces at a single point, resulting in a detection blind zone.

[0005] Therefore, there is an urgent need to develop a compact, cost-effective, comprehensive, and efficient optical lens imaging and defect detection system to meet the quality control requirements of modern optical lens production. Summary of the Invention

[0006] This invention provides an optical lens imaging system and an optical lens defect detection method, aiming to solve at least one of the above-mentioned technical problems.

[0007] This invention provides the following technical solution: The optical lens imaging system includes a conveyor belt, a large-area transmission imaging module, a large-area reflection imaging module, a small-area reflection imaging module, a small-area transmission imaging module, and a control module.

[0008] The conveyor belt is used to carry the positioning mold plate containing the optical lens to be tested and to move in a stepping manner; The large-area transmission imaging module is located at a first position along the conveying direction of the conveyor belt, and includes a first camera located above the conveyor belt, a first parallel light source located below the conveyor belt, a first grating plate located between the conveyor belt and the first parallel light source, and a first driving device for driving the first grating plate to move. The large-area reflection imaging module is located at a second position along the conveying direction of the conveyor belt, and includes a second camera located above the conveyor belt and a first ring light source located between the conveyor belt and the second camera; The facet reflection imaging module is located at a third position along the conveying direction of the conveyor belt, and includes a third camera located below the conveyor belt and a second ring light source located between the conveyor belt and the third camera. The small-facet transmission imaging module is located at a fourth position along the conveyor belt in the conveying direction, and includes a fourth camera located below the conveyor belt, a second parallel light source located above the conveyor belt, a second grating plate located between the conveyor belt and the second parallel light source, and a second driving device for driving the second grating plate to move.

[0009] The control module is electrically connected to the industrial camera, light source, and grating plate.

[0010] Furthermore, the control module is configured to: when the optical lens reaches the first detection point, control the first parallel light source to turn on, control the first camera to acquire a first image when the first grating plate is in the first position, and control the first grating plate to move to the second position and acquire a second image; when the optical lens reaches the fourth detection point, control the second parallel light source to turn on, control the fourth camera to acquire a third image when the second grating plate is in the first position, and control the second grating plate to move to the second position and acquire a fourth image.

[0011] Furthermore, the positioning mold plate is provided with positioning holes that are adapted to the size of the optical lens to be tested. The diameter tolerance of the positioning holes is ±0.05mm, which is used to fix the position of the lens during the transport process. The conveyor belt is supported and driven by multiple drive rollers. To ensure that the drive rollers do not interfere with the imaging, the distance between the drive rollers is greater than the minimum diameter of the optical lens to be tested, and there is no obstruction in the imaging area.

[0012] Furthermore, the four imaging modules are arranged in the following order along the transport direction: large-area transmission imaging module, large-area reflection imaging module, small-area reflection imaging module, and small-area transmission imaging module. The two large-area imaging modules and the two small-area imaging modules are arranged adjacent to each other to facilitate mechanical structure design. The large-area transmission imaging module and the small-area transmission imaging module are not arranged adjacent to each other to avoid optical crosstalk between parallel light sources.

[0013] Furthermore, the center-to-center distance between the large-area transmission imaging module and the large-area reflection imaging module... The center distance between the facet reflection imaging module and the facet transmission imaging module The following conditions must be met:

[0014] in The effective illumination diameter of the parallel light source is set at this spacing to ensure that the illumination range of the parallel light source does not extend to adjacent detection points, thus avoiding cross-point optical interference.

[0015] Furthermore, the first and second parallel light sources employ LED arrays, achieving an illumination uniformity of no less than 90% and without interfering with the imaging of other points.

[0016] Furthermore, the first and second ring light sources can be height-adjusted according to the lens size, so that the self-reflection of the ring light source will not affect the imaging.

[0017] Furthermore, the grating plate adopts a black and white stripe structure, with the width of the black stripes being equal to the width of the white stripes, and the stripe spacing matching the camera pixel size, ensuring the formation of a clear black and white stripe projection on the surface of the optical lens.

[0018] Furthermore, the first driving device and the second driving device are each configured independently and electrically connected to the control module to receive independent driving control signals, thereby realizing independent control and precise timing control of the movement of the grating plate at each detection point.

[0019] An optical lens defect detection system, implemented based on the above system, includes the following steps: S10: The imaging system is used to acquire images of the optical lenses, and six images of each lens are acquired under different point positions and light source conditions; S20: Preprocess the acquired images, including lens segmentation, difference processing, and registration; S30: Construct a multi-branch feature extraction and aggregation network, including four parallel deep convolutional neural network branches and a feature fusion module based on prior guidance; S40: Construct a defect detector to classify, locate, and quantify the size of defects; S50: Post-processing of test results, including cross-site defect fusion and quality assessment based on classification criteria.

[0020] The difference processing formula in step S20 is:

[0021] in, and These are two images collected at the first detection point. and These are two images acquired at the fourth detection point, and then the difference image needs to be analyzed. Normalization is performed.

[0022] Each branch of the multi-branch feature extraction network in step S30 includes a deep convolutional neural network backbone and a top-down feature fusion network, wherein the top-down feature fusion network adopts a feature pyramid structure.

[0023] The prior guidance feature fusion in step S30 is based on the probability distribution of defect types at each detection point. Determine prior weights .

[0024] Step S40 includes cross-point defect matching, which determines whether the defects detected at different points are the same defect by comparing their locations and areas.

[0025] The defect identification in step S40 is based on a deep learning model, covering at least six types of defects, including scratches, broken edges, pits, pores, poor grinding, and sand grains.

[0026] The quality assessment of the cracked edge in step S50 is based on the defect location, and the calculation formula is as follows:

[0027] in, d 交 Let O be the distance from the center O to the intersection of the crack edge arcs. b 1 represents the projection coefficient of the line connecting the ray direction and the center of the circle. c This is the square of the distance between the centers of the circles;

[0028] The unit vector in the direction of the center of the detection box. E To fit the center of the circular arc ,R To fit the radius of the arc, which is also the length of the diagonal of the detection box, O It is the center of the circular boundary.

[0029] And when If the lens is defective, then the lens is not up to standard. For the boundary radius, For tolerance.

[0030] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit the invention.

[0031] This invention employs a bidirectional four-angle imaging scheme, which, by configuring parallel light transmission illumination, grating plate phase-shifting imaging, and ring light reflection illumination at four imaging points, achieves multi-mode imaging of surface and internal defects in optical lenses, improving the detection capability of different types of defects. Simultaneously, this invention constructs a weighted feature aggregation network by statistically analyzing the distribution patterns of different defect types at each detection point, allowing the features at points that show good display effects for specific defects to contribute more significantly, thus improving the accuracy of defect identification. Finally, this invention establishes an evaluation model that comprehensively considers defect type, location, size, and quantity, achieving an objective and quantitative assessment of lens quality.

[0032] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0033] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic diagram of the overall structure of the optical lens imaging system of the present invention; Figure 2 This is a schematic diagram of the large-area transmission imaging module at the first detection point; Figure 3 A schematic diagram of the ring-shaped light reflection imaging structure at the second detection point; Figure 4 In the diagram, A is a schematic diagram of the structure of the first grating plate before phase shift, and B is a schematic diagram of the structure of the first grating plate after phase shift. Figure 5 Comparison of imaging effects of typical defects under different location conditions; Figure 6 A probability distribution chart of various defects at different detection points; Figure 7 This is a flowchart of the optical lens defect detection system of the present invention; Figure 8 This is a diagram of the overall architecture of the defect detector; Figure 9 This is a flowchart for the defect acceptance determination process; Figure 10 This is a diagram of the overall system architecture of the present invention.

[0034] In the figure: 1. Conveyor belt; 2. First camera; 3. Second camera; 4. Third camera; 5. Fourth camera; 6. First parallel light source; 7. Second parallel light source; 8. First ring light source; 9. Second ring light source; 10. First grating plate; 11. Second grating plate; 12. Optical lens; 13. Positioning mold plate; 14. First drive device; 15. Second drive device. Detailed Implementation

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

[0036] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.

[0037] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0038] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0039] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0040] To better understand the purpose, function, and specific design of this invention, the invention will be described in further detail below with reference to the accompanying drawings.

[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0042] See Figure 1 This embodiment provides an optical lens imaging system for detecting optical lenses with a diameter of 12mm.

[0043] The system includes a conveyor belt 1, a large-area transmission imaging module, a large-area reflection imaging module, a small-area reflection imaging module, and a small-area transmission imaging module.

[0044] The conveyor belt 1 adopts a high-precision synchronous belt structure with a width of 300mm and a stepping positioning accuracy of ±0.1mm. The first imaging point to the fourth imaging point are arranged sequentially along the transmission direction of the conveyor belt 1, and the center distance between adjacent imaging points is 135mm.

[0045] See Figure 2 The large-area transmission imaging module includes a first camera 2, a first parallel light source 6, a first grating plate 10, and a first driving device 14. The first camera 2 is positioned above the conveyor belt 1, employing a 5-megapixel CMOS image sensor with an image resolution of 2448×2048 and a frame rate of 30fps. The first parallel light source 6 is positioned below the conveyor belt 1, using a high-brightness LED array with adjustable light intensity and a light uniformity of 92%. The first grating plate 10 is positioned between the conveyor belt 1 and the first parallel light source 6, featuring a black and white striped structure. The grating strips are parallel to the drive rollers of the conveyor belt 1, with a grating pitch p1 of 2mm and an effective area of ​​100mm×100mm. The first driving device 14 is a linear motor used to drive the first grating plate 10 to move in a direction perpendicular to the grating strips, with a positioning accuracy of ±3μm and a stroke of 5mm.

[0046] The small-area transmission imaging module includes a fourth camera 5, a second parallel light source 7, a second grating plate 11, and a second driving device 15. The fourth camera 5 is positioned below the conveyor belt 1 and has the same specifications as the first camera 2. The second parallel light source 7 is positioned above the conveyor belt 1 and has the same specifications as the first parallel light source 6. The second grating plate 11 is positioned between the conveyor belt 1 and the second parallel light source 7, with a grating pitch p4 of 2mm, and other parameters are the same as the first grating plate 10. The second driving device 15 is a linear motor with the same specifications as the first driving device.

[0047] See Figure 3 The large-area reflective imaging module includes a second camera 3 and a first ring light source 8. The second camera 3 is positioned above the conveyor belt 1 and has the same specifications as the first camera 2. The first ring light source 8 is positioned between the conveyor belt 1 and the second camera 3, with an inner diameter of 60mm and an outer diameter of 80mm. It is a high-brightness white LED ring light with adjustable illumination intensity.

[0048] The facet reflection imaging module includes a third camera 4 and a second ring light source 9. The third camera 4 is located below the conveyor belt 1 and has the same specifications as the first camera 2. The second ring light source 9 is located between the conveyor belt 1 and the third camera 4 and has the same specifications as the first ring light source 8.

[0049] A positioning mold plate 13 is provided on the conveyor belt 1. The positioning mold plate 13 is a rectangular thin plate structure made of brown POM. A positioning hole is formed in the center of the positioning mold plate 13. The positioning hole is a circular through hole with a shrinkage step below it. The diameter of the shrinkage step is smaller than the diameter of the through hole, used to support the optical lens. The diameter of the positioning hole is the lens diameter plus a clearance of 0.1mm-0.2mm, with a tolerance of +0.05 / -0.05mm. The lower step is designed to have a clearance of 0.2mm-0.3mm less than the lens diameter, with a tolerance of +0.05 / -0.05mm. For a 12mm diameter lens, the positioning hole diameter is designed to be 12.15mm. After the lens is placed in the positioning hole, because the outer diameter of the lens is larger than the shrinkage step size, it rests stably on the shrinkage step, effectively limiting the translational and rotational displacement of the lens during transport. In addition, to prevent translational and rotational displacement of the lens during transport, washers can be placed on the step to increase the stability of the lens.

[0050] In this embodiment, the four detection points are sequentially configured along the conveyor belt direction as: point 1 (large-area transmission imaging module), point 2 (large-area reflection imaging module), point 3 (small-area reflection imaging module), and point 4 (small-area transmission imaging module). This configuration order is chosen because the effective illumination diameter of the parallel light source is 105mm, which is much larger than the illumination range of the ring light source. If the first and fourth positions of the parallel light source are configured adjacent to each other, the illumination ranges of adjacent parallel light sources will overlap, leading to cross-point optical crosstalk and affecting image quality. By inserting a reflection imaging point between the two transmission imaging points, optical isolation is achieved using the small illumination range of the ring light source, effectively avoiding mutual interference between parallel light sources. The center-to-center distance between adjacent detection points is set to 135mm, which is greater than 1.2 times the effective illumination diameter of the parallel light source, ensuring that the illumination range of the parallel light source does not extend to adjacent detection points.

[0051] Under the constraint that the parallel light sources are not adjacent, the arrangement order of the four detection points can be adjusted, but the configuration scheme of this embodiment achieves the optimal balance in terms of optical isolation, spatial layout and detection logic.

[0052] See Figure 10 The working process of this embodiment is as follows: The optical lens 12 to be tested is placed in the positioning mold plate 13 of the conveyor belt 1, and the center of the positioning mold plate 13 is aligned with the center line of the conveyor belt 1. The conveyor belt 1 advances 135mm in a step, bringing the optical lens 12 under test to the first imaging point. The first parallel light source 6 is illuminated, and after the illumination intensity stabilizes at 8000 lux, the first camera 2 acquires the first transmitted light image. I 1. Exposure time is 10ms. (See also...) Figure 4 The first driving device 14 drives the first grating plate 10 to move 1 mm, with a movement time of 40 ms. After the first grating plate 10 stabilizes, the first camera 2 acquires the second transmitted light image. I 2. The exposure time is 10ms. The first transmitted light image I1 and the second transmitted light image I2 exhibit moiré fringes with opposite phase. Then, the first driving device 14 drives the first grating plate 10 to reset, with a reset time of 40ms.

[0053] The conveyor belt 1 advances 135mm in a step, bringing the optical lens 12 under test to the second imaging point. The first ring light source 8 is illuminated, and after the light source stabilizes, the second camera 3 acquires the first reflected light image. I 3. The exposure time is 10ms.

[0054] The conveyor belt 1 advances 135mm, bringing the optical lens 12 under test to the third imaging point. The second ring light source 9 is then illuminated. After the light source stabilizes, the third camera 4 acquires the image of the second reflected light. I 4. The exposure time is 10ms.

[0055] The conveyor belt 1 advances 135mm, bringing the optical lens 12 under test to the fourth imaging point. The second parallel light source 7 is then illuminated. After the light source stabilizes, the fourth camera 5 acquires the third transmitted light image. I 5. The exposure time is 10ms. The second driving device 15 drives the second grating plate 11 to move 1mm. After the second grating plate 11 stabilizes, the fourth camera 5 acquires the fourth transmitted light image. I 6. The exposure time is 10ms. Then the second driving device 15 drives the second grating plate 11 to reset.

[0056] The method provided by this invention can accurately image various types of defects on the surface of optical lenses while ensuring real-time detection.

[0057] To verify the necessity of multi-point, multi-light source configuration, this embodiment systematically analyzes the imaging effects of various defects at different detection points.

[0058] Statistical analysis of 10,000 labeled samples yielded probability data on the distribution of various defects at different detection points. (See also...) Figure 5 and Figure 6 The visibility of different types of defects varies significantly under different light source conditions and detection points.

[0059] Table 1 summarizes the imaging effects of various defects at different detection points. In this embodiment, an optical lens with a diameter of 12mm is used to collect data on the system. It can be seen that for point defects such as pits and holes, the imaging effect at the ring light reflection point is poor, while it is clearly visible at the parallel light transmission point (point 1 and point 4).

[0060] If only ring light reflection imaging is used, point defects such as pits and pinholes will be seriously missed. For linear defects such as scratches, which mainly appear on large surfaces, although they are visible at various points, the imaging effect at ring light reflection points is significantly better than at parallel light transmission points. In addition, there are defect types that can only be seen at a certain point: such as hazy sand grains, which can only be seen under ring light reflection on large surfaces, and ring-shaped sand grains, which can only be seen under parallel light transmission on small surfaces.

[0061] Therefore, considering all defect types, no single defect can achieve optimal imaging results at all four detection points, and no single detection point can clearly display all types of defects. Different types of defects have different sensitivities to light source conditions, and configurations using a single light source or a single detection point have significant detection blind spots. Therefore, this invention employs a scheme with four detection points configured with two light sources, which can provide optimal imaging conditions for different defect types, avoid missed detections, and improve the comprehensiveness and accuracy of detection.

[0062] Table 1. Imaging effects of various defects at different detection points

[0063] In addition, Table 1 shows that some defect types are visible at multiple points but with different levels of clarity. Therefore, this invention proposes the following optical lens defect detection method, which makes full use of the information from the optimal imaging point to further improve the accuracy of defect identification.

[0064] This embodiment provides a method for detecting optical lens defects based on the above-described optical lens imaging system.

[0065] S10: Using the aforementioned optical lens imaging system, images are acquired from the optical lens to obtain a total of six images at four detection points. Specifically, two grating-modulated images are acquired at the first detection point. I 1 and I 2. Acquire a ring-shaped light reflection image at the second detection point. I 3. Collect a ring-shaped light reflection image at the third detection point. I 4. Two raster-modulated images are acquired at the fourth detection point. I 5 and I 6.

[0066] S20: Preprocess the acquired data, including lens segmentation, difference processing, and registration. The steps are as follows: Lens segmentation: Apply a circle detection algorithm to the acquired raw image to locate and segment the effective area of ​​the lens.

[0067] The Hough circle transform algorithm is used, and the specific steps are as follows: Gaussian filtering is applied to the original image, with a filter kernel size of 5×5 and a standard deviation of [missing information]. The Canny edge detection algorithm is used to extract image edges, with a low threshold of 50 and a high threshold of 150. The Hough circle transform is applied to detect circular boundaries, with the accumulator threshold set to 60% of the circumference. A circular mask is generated based on the detected center coordinates (x0, y0) and radius r, and the mask is applied to the original image to obtain the segmented lens image.

[0068] Differential processing: Differential processing is performed on the raster-modulated images acquired at the first and fourth detection points. The two images acquired at the first detection point are respectively... and The difference image is calculated to obtain the result image after the first point is differencing: ; The two images acquired at the fourth detection point are respectively and The difference image is calculated to obtain the result image after the fourth point is differencing: .

[0069] The difference image is normalized to obtain the normalized result image: .

[0070] Among them, I1 ( x, y ), I2 ( x, y I5 represents two images acquired at the first detection point. x, y ), I6 ( x, yThese are two images collected at the fourth detection point. min ( D )for, max ( D The same processing is applied to the image at the fourth detection point. The differential processing utilizes the phase-opposite characteristic of the bright and dark fringes on the lens when the grating plate is in two positions, and suppresses background noise through differential operation to enhance the display effect of internal defects in the lens.

[0071] Image registration: Due to the different spatial positions of the four detection points, the processed images need to be registered to ensure that the position and size of the lens remain consistent across different images. A registration method based on center coordinates is adopted, using the center of the lens circle as the reference point, and performing translation and scaling transformations on the images to align the center of the lens circle and ensure that the radius is consistent across all images.

[0072] S30: Construct a multi-branch feature extraction and aggregation network, including four feature extraction branches and a feature fusion module.

[0073] Each feature extraction branch corresponds to an image input at a detection point. All branches employ the same network structure, including an input layer, a deep convolutional neural network backbone, a top-down feature fusion network, and a feature output layer. The input layer receives a preprocessed single-channel grayscale image; the deep convolutional neural network backbone uses a multi-layer convolutional network to extract image features; the top-down feature fusion network uses a feature pyramid structure to fuse features from different levels, enhancing multi-scale feature representation capabilities; and the feature output layer obtains a fixed-dimensional feature vector through global average pooling.

[0074] Suppose that the feature extraction branch is the first j The feature vectors extracted from each branch are f , j =1,2,3,4, and the dimension of the feature vector is 512.

[0075] Based on statistical analysis of the labeled dataset, prior knowledge of the defect distribution can be obtained, allowing feature fusion weights to be assigned to each detection point. For the... i Class defect, number j Prior weights of each detection point The calculation formula is:

[0076] in, The prior weights represent the probability of occurrence of various defects at each detection point, and reflect the sensitivity of each detection point to different defect types.

[0077] In the feature fusion module, for the first... i Defect detection, fusion of feature vectors Fi The result is obtained through weighted summation:

[0078] The fused feature vector F i By combining the feature information of the four detection points, the weight allocation makes the feature of the points that have a better display effect on this type of defect contribute more.

[0079] S40: Construct a defect detector based on fused feature vectors to achieve defect classification, localization and size quantization. The defect detector adopts an end-to-end deep learning network structure, including a feature processing layer, a prediction layer and a post-processing layer.

[0080] Feature processing layer for fused feature vectors F i Further processing is performed, extracting high-level semantic features through a fully connected layer. The prediction layer then uses the processed features to classify and locate defects, outputting a probability distribution of defect categories. P 类别 and defect location information L 位置 The post-processing layer processes the prediction results, including nonmaximum suppression, bounding box regression, and size quantization.

[0081] Defect classification uses a multi-class cross-entropy loss function, while defect localization uses a regression loss function. The network learns the mapping relationship from fused features to defect detection results through end-to-end training.

[0082] For detected defect areas, based on image pixel size Given the pixel coordinates of the defect region, calculate the physical size of the defect. Let the bounding box coordinates of the defect region be... The length L and width W of the defect are then calculated as follows:

[0083] Defect area A Calculated based on the number of pixels in the defective area:

[0084] in N This represents the number of pixels contained in the defective region.

[0085] S50: After training, the best model is selected for lens surface defect detection, and the detection results are post-processed. The post-processing of the detection results includes cross-point defect fusion and quality judgment based on classification criteria.

[0086] Cross-site defect fusion, specifically, involves integrating the detection results from various detection points to perform cross-site matching and confirmation of the same defect. Let's assume the point... j The detected first k The center coordinates of each defect region are: The defect area is .

[0087] The matching criterion for determining whether the detection results of two points correspond to the same defect is:

[0088] in, This is a distance threshold, with a value ranging from 5% of the lens radius. This is the area difference threshold, ranging from 0.2 to 0.4; here, we choose 0.3. d The Euclidean distance is the distance between the center points of the two defects.

[0089] For defects that meet the matching criteria, they are classified as the same defect, and the weighted average of the detection results from each location is taken as the final defect parameter. For defects detected only at a single location, whether to retain them is determined based on the detection reliability of that location for that type of defect, where the detection reliability is determined by the historical detection accuracy of that type of defect at that location.

[0090] Based on the detection results obtained from the above cross-site defect fusion, the quality is finally judged using classification criteria.

[0091] Specifically, the judgment criteria are as follows: (1) Edge cracks, small-circle edge cracks, and succulent defects: Judgment is based on the defect location. The diagonal of the detection frame is fitted with an arc, and the distance from the defect to the boundary is calculated by solving the intersection problem of the ray and the circle. Specifically, the distance from the defect to the boundary is calculated from the center of the circular boundary. O A ray is emitted along the detection frame direction and intersects with the fitted circular arc. The center of the fitted circular arc is... E , radius is R Intersection distance d 交 The solution is given by the analytical solution of the quadratic equation:

[0092] in, , Let be the unit vector along the direction of the detection box center, where d 交 Let O be the distance from the center O to the intersection of the crack edge arcs. b 1 represents the projection coefficient of the line connecting the ray direction and the center of the circle. c This is the squared term of the distance between the centers of the circles.

[0093] Intersection pixel distance d 交 After being converted to actual distance, it is compared with the boundary radius. and tolerance In comparison, if If the defect intrudes into the boundary restricted area, it is judged as unqualified; otherwise, it is judged as qualified.

[0094] (2) Pores and pitting defects: A comprehensive judgment is made based on size and quantity, with size and quantity evaluated sequentially:

[0095] in a For the width of the detection frame, b 1 represents the height of the detection frame. For tolerance, This is the standard diameter threshold. If the equivalent diameter of any defect... If the value exceeds the standard value, it is deemed unqualified.

[0096]

[0097] Where D is the diameter of the lens. , The number of defects is calculated. If the calculated number exceeds the threshold, it is judged as unqualified; otherwise, it is judged as qualified. Specifically, in this embodiment, the threshold is 2.

[0098] (3) In addition, lenses that meet any of the following conditions are directly deemed unqualified: If there are special defects on the large and small surfaces, it is judged as unqualified. Special defects include poor grinding of large and small surfaces, poor steps, and ring-shaped mist-like sand particles. Scratches and short scratches with a defect width greater than the defect width threshold W1 are judged as unqualified. The defect width threshold W1 is 0.06mm. Any type of defect in the central optical area is considered unqualified.

[0099] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. In the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An optical lens imaging system, characterized in that, include: Conveyor belt (1), large-area transmission imaging module, large-area reflection imaging module, small-area reflection imaging module, small-area transmission imaging module, control module; The conveyor belt (1) is used to carry the positioning mold plate (13) containing the optical lens (12) to be tested and to transport it in a stepping manner; The large-area transmission imaging module, the large-area reflection imaging module, the small-area reflection imaging module, and the small-area transmission imaging module are arranged sequentially along the conveying direction of the conveyor belt (1). The large-area transmission imaging module includes a first camera (2) disposed above the conveyor belt (1), a first parallel light source (6) disposed below the conveyor belt (1), a first grating plate (10) disposed between the conveyor belt (1) and the first parallel light source (6), and a first driving device (14) for driving the first grating plate (10) to move along the conveying direction; The large-area reflection imaging module includes a second camera (3) disposed above the conveyor belt (1) and a first ring light source (8) disposed between the conveyor belt (1) and the second camera (3); The facet reflection imaging module includes a third camera (4) disposed below the conveyor belt (1) and a second ring light source (9) disposed between the conveyor belt (1) and the third camera (4); The small-faceted transmission imaging module includes a fourth camera (5) disposed below the conveyor belt (1), a second parallel light source (7) disposed above the conveyor belt (1), a second grating plate (11) disposed between the conveyor belt (1) and the second parallel light source (7), and a second driving device (15) for driving the second grating plate (11) to move along the conveying direction. The control module is electrically connected to the camera, light source, and grating plate driving device.

2. The optical lens imaging system according to claim 1, characterized in that, The positioning mold plate (13) is provided with positioning holes that are adapted to the size of the optical lens (12) to be tested. The diameter tolerance of the positioning holes is ±0.05mm, which is used to fix the position of the lens during the transport process. The conveyor belt (1) is supported and driven by multiple transmission rollers. In order to ensure that the transmission rollers do not interfere with the imaging, the distance between the transmission rollers is greater than the minimum diameter of the optical lens to be tested, and there is no obstruction in the imaging area.

3. The optical lens imaging system according to claim 1, characterized in that, The center distance between the large-area transmission imaging module and the large-area reflection imaging module The center distance between the facet reflection imaging module and the facet transmission imaging module The following conditions must be met: in The effective illumination diameter of the parallel light source is set at this spacing to ensure that the illumination range of the parallel light source does not extend to adjacent detection points, thus avoiding cross-point optical interference.

4. A method for detecting defects in optical lenses, characterized in that, The method for defect detection of optical lenses in the aforementioned optical lens imaging system includes the following steps: S10: The imaging system is used to acquire images of the optical lenses, and six images of each lens are acquired under different point positions and light source conditions; S20: Preprocess the acquired images, including lens segmentation, difference processing, and registration; S30: Construct a multi-branch feature extraction and aggregation network, including four parallel deep convolutional neural network branches and a feature fusion module based on prior guidance; S40: Construct a defect detector to classify, locate, and quantify the size of defects; S50: Post-processing of test results, including cross-site defect fusion and quality assessment based on classification criteria.

5. The optical lens defect detection system according to claim 4, characterized in that, The difference processing formula in step S20 is: in, and These are two images collected at the first detection point. and These are two images acquired at the fourth detection point, and then the difference image needs to be analyzed. Normalization is performed.

6. The optical lens defect detection system according to claim 4, characterized in that, Each branch of the multi-branch feature extraction network in step S30 includes a deep convolutional neural network backbone and a top-down feature fusion network, wherein the top-down feature fusion network adopts a feature pyramid structure.

7. The optical lens defect detection system according to claim 4, characterized in that, The prior guidance feature fusion in step S30 is based on the probability distribution of defect types at each detection point. Determine prior weights .

8. The optical lens defect detection system according to claim 4, characterized in that, Step S40 includes cross-point defect matching, which determines whether the defects detected at different points are the same defect by comparing their locations and areas.

9. The optical lens defect detection system according to claim 4, characterized in that, The defect identification in step S40 is based on a deep learning model, covering at least six types of defects, including scratches, broken edges, pits, pores, poor grinding, and sand grains.

10. The optical lens defect detection system according to claim 4, characterized in that, The quality assessment of the cracked edge in step S50 is based on the defect location, and the calculation formula is as follows: in, d 交 Let O be the distance from the center O to the intersection of the crack edge arcs. b 1 represents the projection coefficient of the line connecting the ray direction and the center of the circle. c This is the square of the distance between the centers of the circles; The unit vector in the direction of the center of the detection box. E To fit the center of the circular arc ,R To fit the radius of the arc, which is also the length of the diagonal of the detection box, O It is the center of the circular boundary. And when If the lens is defective, then the lens is not up to standard. For the boundary radius, For tolerance.