Pixel-level clarity judgment and 3D fusion reconstruction system and method based on confocal

Through a pixel-level clarity judgment based on confocal and a 3D fusion reconstruction system, the shortcomings in the detection of tiny and internal defects of the optical components of VR glasses in the prior art are solved, and high-precision and automated detection and analysis are realized, which improves detection efficiency and product quality.

CN119354504BActive Publication Date: 2025-03-21XINXIWANG INTELLIGENT TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411910477.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-21
Estimated Expiration
2044-12-24

AI Technical Summary

Technical Problem

The prior art has problems such as insufficient resolution, difficulty in identifying, insufficient impact analysis and low detection efficiency when detecting tiny defects and internal defects in the optical components of VR glasses, which cannot meet the needs of high precision and automated production.

Method used

The pixel-level clarity judgment based on confocalization and 3D fusion reconstruction system are adopted, and pixel-level laser beam scanning is performed through the confocal detection module, and combined with the defect identification module, the 3D reconstruction module and the data analysis module, the high-precision detection and analysis of the lens surface and internal defects are realized.

Benefits of technology

It realizes comprehensive and accurate detection and analysis of the optical components of VR glasses, improves the detection accuracy of micro defects, the identification ability of internal defects, the impact evaluation of defects on imaging effects, and the detection efficiency, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119354504B_ABST
    Figure CN119354504B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of optical component detection technology, and proposes a confocal-based pixel-level clarity judgment and 3D fusion reconstruction system and method. The confocal detection module is used to perform high-precision clarity detection on each pixel of the lens through point-by-point scanning technology to ensure the identification of tiny defects on the surface and inside. Next, the defect recognition module analyzes the detection results, determines the specific location and type of the defect, and generates a detailed defect report. Subsequently, the 3D reconstruction module constructs a three-dimensional model of the lens based on the defect recognition results, evaluates the impact of these defects on the imaging effect, and helps manufacturers understand the severity of the defects. Finally, the data analysis module organizes and analyzes all detection and reconstruction data to provide comprehensive production optimization suggestions to ensure the quality and stability of optical components. Through the close collaboration of these four modules, the present invention can achieve comprehensive and accurate detection and analysis of the optical components of VR glasses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of optical component detection, and in particular to a system and method for pixel-level clarity judgment and 3D fusion reconstruction based on confocal imaging. Background Art

[0002] With the rapid development of virtual reality technology, the market demand for VR devices continues to grow. Among them, optical components with lenses as the core are key components of VR imaging systems. Their design and manufacturing quality directly determine the user's visual experience and immersion. Optical components, especially lenses, usually adopt a folded optical path design to achieve lightweight and high-performance imaging through multi-layer lenses. However, this complex design places extremely high demands on the size, curvature and surface smoothness of the lenses. Any tiny flaws may have an adverse effect on the imaging quality, resulting in a decline in user experience. Traditional optical inspection methods mainly rely on manual or simple optical equipment, which cannot accurately judge the tiny defects on the surface and inside of the lens, especially the multiple lens structure in the folded optical path, which increases the difficulty of inspection. Due to the limitations of inspection technology, lenses often miss or misdetect during the manufacturing and assembly process, resulting in a large number of defective products entering the production process, ultimately increasing production costs and reducing the product yield. These problems have become bottlenecks that hinder the further optimization of VR glasses' optical components.

[0003] At present, most of the optical components of VR glasses adopt a folded optical path design, which achieves lightweight and efficient imaging through multi-layer lenses. During the manufacturing and assembly process of these lenses, traditional optical inspection technology is relied on to ensure their quality. The existing inspection methods mainly include the following: (1) Visual inspection: Detecting surface defects of lenses through human eyes or low-precision optical equipment. Due to the limitation of the resolution ability of the human eye, this method can usually only detect relatively obvious defects, such as scratches and cracks, while it is difficult to accurately identify tiny dents and subtle surface inequalities. (2) Optical interference method: This method uses the change of interference fringes to detect the refractive difference on the surface or inside of the lens. Although it performs well in flatness and curvature detection, when dealing with multi-layer complex lens structures, the detection effect will be affected by the mutual interference of different optical paths, resulting in increased errors, and it cannot effectively deal with subtle defects inside the lens. (3) Laser profile scanning: Laser profile scanning can detect the external shape of the lens relatively accurately, but it cannot effectively detect the refractive defects inside the lens. In addition, it is limited by the resolution of the equipment and the scanning angle, making it difficult to perform efficient and accurate full-scale inspection of each lens in the complex optical path structure. (4) Manual inspection and correction: Currently, the more commonly used method still includes manual inspection and correction, which not only relies on the experience of the operator, but is also prone to missed inspections or human misjudgment. Especially in the face of large-scale production, the efficiency and consistency of manual inspection are difficult to guarantee.

[0004] Therefore, in the process of testing the optical components of VR glasses, although the existing testing methods can achieve quality control of the lenses to a certain extent, they still have significant limitations. In particular, in the face of complex optical path design and accurate detection of tiny defects in lenses, current technical means still fail to meet the needs of high-precision and automated production. The following are several specific problems of the existing technology, which directly affect the imaging quality, production efficiency and product yield of optical components. (1) Insufficient detection of tiny defects: Existing testing methods mostly focus on the detection of macro defects. For tiny defects on the surface and inside of the lens, especially small defects at the pixel level (such as tiny depressions, bubbles, etc.), the resolution of the existing methods is low and cannot be effectively captured. These tiny defects have an unpredictable impact on the imaging quality in the design of the folded optical path, and ultimately lead to unclear imaging of the finished product. (2) Difficulty in identifying internal defects: Traditional testing methods are mainly aimed at defect detection on the surface of the lens, but the existing technology cannot effectively identify internal defects in the multi-layer lens structure. The refractive index changes, material unevenness or deviation of the light propagation path inside the lens cannot be accurately judged by existing equipment, increasing the risk of missed detection or misjudgment. (3) Insufficient analysis of the impact of defects on imaging effects: Although existing inspection technologies can detect physical flaws, it is difficult to evaluate the specific impact of these defects on imaging quality. Since it is impossible to establish an effective mapping relationship between the inspection results and the imaging effects, the impact of the defects is unclear, resulting in excessive or insufficient repair measures, which affects the effectiveness of the overall inspection and the accuracy of production adjustments. (4) Low inspection efficiency and low automation level: The current inspection process relies heavily on manual operation or inefficient optical equipment, resulting in slow inspection speed and difficulty in meeting the needs of large-scale production. The lack of highly automated inspection methods increases production costs, while extending the product delivery cycle and affecting the market competitiveness of the product.

[0005] Therefore, how to improve the detection accuracy of tiny defects, enhance the ability to identify internal defects, quantify the impact of defects on imaging effects, improve detection efficiency and reduce costs during the lens inspection process is a technical problem that needs to be solved urgently. Summary of the invention

[0006] The present invention provides a confocal-based pixel-level clarity judgment and 3D fusion reconstruction system and method, aiming to solve at least one problem raised by the above-mentioned prior art.

[0007] The present invention provides a confocal-based pixel-level clarity judgment and 3D fusion reconstruction system, the system comprising:

[0008] A confocal detection module is configured to use a confocal detection device including a detection laser generating component and a defect laser collecting component to perform a pixel-level laser beam scan on the lens to be detected, so as to obtain a laser detection image of the lens to be detected;

[0009] A defect recognition module is configured to perform image segmentation on the laser detection image, and determine defect information of the laser detection image according to the image segmentation result; wherein the defect information includes defect locations and defect types of a plurality of defects;

[0010] A 3D reconstruction module is configured to generate a defect three-dimensional model of the lens to be inspected based on the defect position and defect type of each defect in the defect information of the laser inspection image;

[0011] The data analysis module is configured to store the laser detection image, the defect information and the defect three-dimensional model of each lens to be detected as a group of defect-related data in a defect database, call the defect-related data in the defect database to analyze the lens defects, and generate lens production optimization suggestions.

[0012] Optionally, the detection laser generating component specifically includes:

[0013] a light source configured to provide a laser beam;

[0014] A rotating polygon mirror is arranged in the irradiation direction of the laser beam of the light source and is configured to control the scanning angle of the laser beam and adjust the irradiation scanning range of the laser beam when receiving the laser beam;

[0015] a cylindrical lens disposed in the direction indicated by the laser beam adjusted by the rotating polygon mirror, and configured to focus the laser beam into a linear beam when receiving the laser beam;

[0016] The slit hole is arranged in the irradiation optical path of the linear light beam of the cylindrical lens, and is configured to perform focal light screening on the linear light beam focused by the cylindrical lens to obtain a detection laser beam for performing defect detection.

[0017] Optionally, the defect laser collection component specifically includes:

[0018] a photomultiplier tube, arranged in the irradiation direction of the detection laser beam, configured to amplify the received optical signal of the detection laser beam, and irradiate the lens to be detected with the detection laser beam after the optical signal is amplified;

[0019] A defect laser reflecting mirror is disposed in the irradiation optical path between the slit hole and the photomultiplier tube, and is configured to transmit the detection laser beam output by the slit hole to the photomultiplier tube, and transmit part of the detection laser beam irradiated to the lens to be inspected and reflected back as a defect detection beam to the linear array detector;

[0020] The linear array detector is arranged in the emission direction of the defect detection light beam, and is configured to receive the defect detection light beam emitted by the defect laser reflector, and convert the defect detection light beam into an electrical signal to obtain a laser detection image.

[0021] Optionally, the defect identification module specifically includes:

[0022] The lens edge detection unit is configured to construct a Hessian matrix based on the second-order partial derivative of the laser detection image, calculate the eigenvalue of the Hessian matrix, extract the lens edge from the laser detection image according to the eigenvalue calculation result, and obtain the lens detection image; the expression of the Hessian matrix is ​​specifically:

[0023] ;

[0024] Where, I represents the gray value of the laser detection image;

[0025] The adaptive threshold determination unit is configured to dynamically calculate the optimal threshold for defect area division using the Otsu algorithm; the expression of the optimal threshold for defect division is specifically:

[0026] ;

[0027] in, and are the number of pixels in the two categories after segmentation, and is the average gray value of each class, N is the total number of pixels in the lens detection image, is the between-class variance;

[0028] The defect area division unit is configured to calculate the gradient value of each pixel in the lens inspection image using a Sobel filter, calculate the gradient modulus value of each pixel according to the gradient components in the horizontal direction and the vertical direction in the gradient value of each pixel, and divide the defect area and the non-defect area in the lens inspection image based on the defect division optimal threshold, and extract the defect position and defect type of each defect area; the expression of the gradient modulus value is specifically:

[0029] ;

[0030] in, and Represent the gradient components in the horizontal and vertical directions respectively.

[0031] Optionally, the defect identification module further includes:

[0032] The defect classification unit is configured to classify each defect area divided in the lens inspection image by using a decision tree classification based on information gain; the expression of the information gain is specifically:

[0033] ;

[0034] Among them, H(D) is the entropy of the data set D, A is the current feature, The subset of feature A whose value is v.

[0035] Optionally, the 3D reconstruction module specifically includes:

[0036] A spatial coordinate allocation unit is configured to obtain a defect area division result of the lens detection image, and allocate corresponding spatial coordinates to each defect area in the lens detection image;

[0037] The propagation path simulation unit is configured to run a ray tracing model to simulate the propagation path of the reflected light and the refracted light of the detection laser beam on the lens to be detected, calculate the incident and outgoing intensities of the detection laser beam under different light conditions, and generate three-dimensional spatial information of each defect area; the expression of the ray tracing model is specifically:

[0038] ;

[0039] Among them, I represents the final image brightness, E is the incident light intensity, R is the reflection coefficient, T is the transmission coefficient, S is the surface property function, and Ω is the angle range of light propagation;

[0040] The 3D reconstruction unit is configured to calculate the depth information using the parallax under stereoscopic vision according to the images taken by the two cameras, and reconstruct the defective three-dimensional model of the lens to be inspected in the three-dimensional space; the expression of the parallax under stereoscopic vision is specifically:

[0041] ;

[0042] Where D represents the disparity, f is the focal length of the camera, B is the baseline distance between the two cameras, and Z is the depth of the target object.

[0043] Optionally, the 3D reconstruction module further includes:

[0044] The three-dimensional model optimization unit is configured as an optimization algorithm based on the least square method to optimize the parameters of the defect three-dimensional model of the lens to be detected to obtain the final defect three-dimensional model of the lens to be detected; the expression of the optimization target of the optimization algorithm is specifically:

[0045] ;

[0046] in, represents the true depth of the i-th point, is the depth predicted by the reconstructed model, N is the total number of points, and the predicted value is obtained by continuously adjusting the model parameters of the defective three-dimensional model of the lens to be tested. Gradually approaching the true value .

[0047] Optionally, the data analysis module specifically includes:

[0048] A defect data storage unit is configured to store the laser detection image, the defect information and the defect three-dimensional model of each lens to be detected as a set of defect associated data into a defect database;

[0049] The clustering analysis unit is configured to use the K-means algorithm to optimize the clustering of several groups of defect-related data in the defect database, and divide the several groups of defect-related data into multiple clusters, so that the similarity of the defect-related data in the same cluster is the highest, and the similarity of the defect-related data between different clusters is the lowest; the expression of the optimization target of the optimized clustering is specifically:

[0050] ;

[0051] Where K is the number of clusters, is the sample set in the i-th cluster, x is the sample point, is the center point of the i-th cluster, and |·| is the Euclidean distance.

[0052] Optionally, the data analysis module further includes:

[0053] The defect feature and imaging quality analysis unit is configured to establish a linear regression model to perform regression analysis and quantification on the relationship between the defect feature and the imaging quality; the expression of the linear regression model is specifically:

[0054] ;

[0055] Among them, y represents the evaluation index of imaging quality, For different defect characteristics, is the intercept term, is the regression coefficient, is the error term;

[0056] The abnormal data detection unit is configured to use an abnormal detection algorithm based on an isolation forest to construct a random partitioning tree to isolate abnormal points; the expression of the abnormal detection algorithm is specifically:

[0057] ;

[0058] Among them, C(x) is the anomaly score of sample point x, E(x) is the average depth of isolated points, is the normalization factor, The depth of the Huffman tree is n;

[0059] The lens production optimization suggestion unit is configured to identify the defect characteristics that have the greatest impact on the imaging quality based on minimizing the sum of squared error terms, and generate lens production optimization suggestions based on the calculated abnormality scores and preset rules.

[0060] The present invention also provides a method for pixel-level clarity judgment and 3D fusion reconstruction based on confocal imaging, the method comprising:

[0061] S1: using a confocal detection device including a detection laser generating component and a defect laser collecting component to perform a pixel-level laser beam scanning on the lens to be detected, and obtaining a laser detection image of the lens to be detected;

[0062] S2: performing image segmentation on the laser detection image, and determining defect information of the laser detection image according to the image segmentation result; wherein the defect information includes defect locations and defect types of a plurality of defects;

[0063] S3: generating a defect three-dimensional model of the lens to be inspected based on the defect position and defect type of each defect in the defect information of the laser inspection image;

[0064] S4: storing the laser detection image, the defect information and the defect three-dimensional model of each lens to be detected as a set of defect-related data in a defect database, calling the defect-related data in the defect database to analyze the lens defects, and generating lens production optimization suggestions.

[0065] The beneficial effects of the present invention are as follows: a confocal-based pixel-level clarity judgment and 3D fusion reconstruction system and method are proposed, and the confocal detection module is used to perform high-precision clarity detection on each pixel of the lens through point-by-point scanning technology to ensure the identification of tiny defects on the surface and inside. Next, the defect recognition module analyzes the detection results, determines the specific location and type of the defect, and generates a detailed defect report. Subsequently, the 3D reconstruction module constructs a three-dimensional model of the lens based on the defect recognition results, evaluates the impact of these defects on the imaging effect, and helps manufacturers understand the severity of the defects. Finally, the data analysis module organizes and analyzes all detection and reconstruction data to provide comprehensive production optimization suggestions to ensure the quality and stability of optical components. Through the close collaboration of these four modules, the present invention can achieve comprehensive and accurate detection and analysis of the optical components of VR glasses. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 This is a schematic diagram of the structure of the confocal-based pixel-level clarity judgment and 3D fusion reconstruction system provided in this embodiment.

[0067] Figure 2 This is a schematic diagram of the structure of the confocal detection device provided in this embodiment.

[0068] Figure 3 The figure is a flow chart of the confocal-based pixel-level clarity judgment and 3D fusion reconstruction method provided in this embodiment.

[0069] Reference numerals:

[0070] 1-light source; 2-rotating polygonal mirror; 3-cylindrical lens; 4-slit hole; 5-photomultiplier tube; 6-defect laser reflector; 7-linear detector; 8-lens to be tested;

[0071] 10-confocal detection module; 20-defect recognition module; 30-3D reconstruction module; 40-data analysis module. DETAILED DESCRIPTION

[0072] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0073] Embodiment 1:

[0074] like Figure 1As shown, a pixel-level clarity judgment and 3D fusion reconstruction system based on confocal is provided, and the system comprises: a confocal detection module 10, configured to use a confocal detection device including a detection laser generating component and a defect laser collecting component to perform pixel-level laser beam scanning on a lens to be detected, and obtain a laser detection image of the lens to be detected; a defect recognition module 20, configured to perform image segmentation on the laser detection image, and determine defect information of the laser detection image according to the image segmentation result; wherein the defect information comprises defect positions and defect types of several defects; a 3D reconstruction module 30, configured to generate a defect three-dimensional model of the lens to be detected based on the defect position and defect type of each defect in the defect information of the laser detection image; a data analysis module 40, configured to store the laser detection image, the defect information and the defect three-dimensional model of each lens to be detected as a set of defect-related data in a defect database, call the defect-related data in the defect database to analyze the lens defects, and generate lens production optimization suggestions.

[0075] It should be noted that, in the process of testing the optical components of VR glasses, although the existing testing methods can achieve quality control of the lenses to a certain extent, they still have significant limitations. In particular, in the face of complex optical path design and accurate detection of tiny defects in lenses, current technical means still fail to meet the needs of high-precision and automated production. The following are several specific problems of the prior art, which directly affect the imaging quality, production efficiency and product yield of optical components: (1) Insufficient detection of tiny defects; (2) Difficulty in identifying internal defects; (3) Insufficient analysis of the impact of defects on imaging effects; (4) Low detection efficiency. In order to solve the above problems, this embodiment uses the confocal detection module 10 to perform high-precision clarity detection on each pixel of the lens through point-by-point scanning technology to ensure the identification of tiny defects on the surface and inside. Next, the defect recognition module 20 analyzes the detection results, determines the specific location and type of the defect, and generates a detailed defect report. Subsequently, the 3D reconstruction module 30 constructs a three-dimensional model of the lens based on the defect recognition results, evaluates the impact of these defects on the imaging effect, and helps manufacturers understand the severity of the defects. Finally, the data analysis module 40 organizes and analyzes all the detection and reconstruction data to provide comprehensive production optimization suggestions to ensure the quality and stability of the optical components. Through the close cooperation of these four modules, the present invention can achieve comprehensive and accurate detection and analysis of the optical components of VR glasses.

[0076] In a preferred embodiment, the confocal detection device specifically includes: a light source 1, configured to provide a laser beam; a rotating polygon mirror 2, arranged in the irradiation direction of the laser beam of the light source, configured to control the scanning angle of the laser beam when receiving the laser beam, and adjust the irradiation scanning range of the laser beam; a cylindrical lens 3, arranged in the direction indicated by the laser beam adjusted by the rotating polygon mirror, configured to focus the laser beam into a linear light beam when receiving the laser beam; a slit hole 4, arranged in the irradiation optical path of the linear light beam of the cylindrical lens, configured to perform focal light screening on the linear light beam focused by the cylindrical lens, and obtain a detection laser beam for performing defect detection.

[0077] Furthermore, the defect laser collection component specifically includes: a photomultiplier tube 5, which is arranged in the irradiation direction of the detection laser beam, and is configured to amplify the optical signal of the received detection laser beam, and use the detection laser beam after the optical signal is amplified to irradiate the lens to be inspected with a laser beam; a defect laser reflector 6, which is arranged in the irradiation optical path between the slit hole and the photomultiplier tube, and is configured to transmit the detection laser beam output by the slit hole to the photomultiplier tube, and transmit the part of the detection laser beam irradiated to the lens to be inspected 8 and reflected back as a defect detection beam to the linear array detector 7; the linear array detector 7, which is arranged in the emission direction of the defect detection beam, is configured to receive the defect detection beam emitted by the defect laser reflector 6, and convert the defect detection beam into an electrical signal to obtain a laser detection image.

[0078] In this embodiment, the confocal detection module 10 is designed based on the optical path of the rotating polygon mirror combined with the laser line scanning system. The core of the module is to reflect the laser beam through the rotating polygon mirror so that the laser beam scans along the surface of the optical element. The laser is focused to a precise focus through the f-θ lens, and the photomultiplier tube is used to detect the scattered light caused by surface defects to ensure the high sensitivity of the system when dealing with tiny defects. The method of combining the rotating polygon mirror and the cylindrical lens is adopted to achieve high-speed and high-precision linear scanning.

[0079] like Figure 2 As shown, the working principle of the detection laser generation component is as follows:

[0080] Light source 1: Provides a stable laser light source for irradiating the lens to be inspected; Rotating polygon mirror 2: Controls the scanning angle of the laser beam by changing the angular velocity of the rotating polygon mirror , the scanning range of the laser beam on the target surface can be adjusted ; Cylindrical lens 3 (f-θ lens): focuses the laser beam into a linear beam and projects it onto the surface of the semiconductor device to achieve linear scanning; Slit hole 4: is set in the optical path to screen the incident light and only allows light from the focal area to pass through, providing higher spatial selectivity, helping to filter out light from the non-focal area, and improving the spatial resolution and contrast of the image; Linear array detector 7: receives the light reflected from the semiconductor device and converts it into an electrical signal; Photomultiplier tube 5: amplifies the received light signal to improve the sensitivity of the system; Defect laser reflector 6: is set in the irradiation optical path between the slit hole and the photomultiplier tube, and is configured to transmit the detection laser beam output by the slit hole to the photomultiplier tube, and transmit the part of the detection laser beam irradiated to the lens to be detected and reflected back as a defect detection beam to the linear array detector 7; The lens to be detected 8: is placed at the bottom of the system, receives the irradiation of the laser beam, and reflects part of the light back to the linear array detector 7.

[0081] The relationship between the scanning angular velocity of the rotating polygon mirror and the scanning range of the laser beam can be expressed by the following formula:

[0082] ;

[0083] in, represents the scanning angle, is the angular velocity of the polygon mirror, is the focal length of the f-θ lens. This formula indicates that when the angular velocity of the mirror increases, the scanning range of the laser beam on the target surface increases accordingly, and the corresponding signal intensity is described by the following formula:

[0084] ;

[0085] in, is the received scattered light signal, is the energy of the incident laser, is the reflection coefficient, is the transmission coefficient, is the efficiency of the detector. Combined with dark field illumination, this design can effectively enhance the detection intensity of scattered signals, especially for the detection of surface defects. The resolution of the system mainly depends on the wavelength of the light source and the numerical aperture of the optical element, and the minimum resolution is calculated by the Abbe limit.

[0086] When the numerical aperture and laser wavelength reach a certain accuracy, the imaging system can distinguish extremely small structures. In this system, 1*1 pixel-level clarity judgment can be achieved because the resolution d can be smaller than the size of a single pixel by optimizing the optical system. Assuming the laser wavelength is 500 nm and the numerical aperture is 0.9, the minimum resolution is:

[0087] ;

[0088] This means that the system can resolve details as small as 278 nanometers, while the size of an ordinary 1*1 pixel is much larger than this, so the resolution of the system can support pixel-level detection.

[0089] At the same time, the system introduces focus-limited pinhole imaging to ensure that only light from the focal area can pass through the pinhole for imaging. The setting of the pinhole plays a role in excluding non-focal light, ensuring that only light from the focal area can be imaged. The diameter of the pinhole is closely related to the resolution of the system. By controlling the size of the pinhole, the optical resolution of the system can be improved. Assume that the diameter of the pinhole is , when the light beam in the focal area passes through the small hole, its light intensity attenuation function can be described by Gaussian distribution:

[0090] ;

[0091] Here, is the light intensity at the focus, r is the distance the light deviates from the focus, is the diameter of the small hole. , ensuring that only light very close to the focal area can pass through, which greatly improves the spatial selectivity of the system. The smaller the diameter of the system's pinhole, the stronger its ability to exclude non-focal light, which further improves the effective resolution of the system, which is also the key to achieving 1*1 pixel-level detection.

[0092] For example, during the inspection process, suppose there is a tiny bubble on the lens to be inspected, with a diameter of about 100 microns, and the surface defects of the lens include fine depressions with a depth of only a few microns. Through the confocal inspection module 10, the system scans the lens point by point with a precise laser beam. In this process, the laser is focused to a focal point through an f-θ lens to form a beam with a diameter of only hundreds of nanometers, which can penetrate the tiny defects of the optical components to accurately evaluate the clarity of each pixel, so that even tiny defects can be accurately identified.

[0093] In a specific implementation, it is assumed that there is a bubble with a diameter of only 100 microns and multiple fine depressions with a depth of several microns on the surface of the lens to be inspected. The confocal detection module 10 uses a rotating polygon mirror and a laser line scanning system to focus the laser beam to an extremely small light spot (such as a few nanometers). This high-resolution imaging capability enables tiny defects such as bubbles and depressions to be clearly captured. In particular, through pinhole imaging technology, the system only allows light from the focal area to pass, thereby effectively eliminating interference from other non-focal light and further improving imaging clarity.

[0094] When capturing these tiny defects, the laser light source shines on the surface of bubbles and depressions, causing light scattering and reflection. By using photomultiplier tubes, the system can amplify these scattered light signals so that subtle changes in light intensity can be accurately recorded. Subsequently, the system will apply image processing algorithms based on the Hessian matrix and Sobel filter to analyze high-resolution images. These algorithms can extract edge information from images, further enhance the ability to identify tiny defects, and ensure that the imaging quality is not affected by these tiny defects.

[0095] Therefore, in this embodiment, by using a rotating polygon mirror combined with laser line scanning and f-θ lens technology, the system can efficiently cover the entire surface of the optical element. At the same time, using the pinhole imaging technology, the optical system sets a very small pinhole to allow only light from the focal area to pass through the detector, further improving the spatial resolution and signal-to-noise ratio. Combined with the minimum resolution formula and the pinhole attenuation formula, the system achieves sub-micron resolution, so that the optical characteristics of each 1*1 pixel can be accurately judged, achieving pixel-level clarity.

[0096] In a preferred embodiment, the defect identification module 20 specifically includes:

[0097] The lens edge detection unit is configured to construct a Hessian matrix based on the second-order partial derivative of the laser detection image, calculate the eigenvalue of the Hessian matrix, extract the lens edge from the laser detection image according to the eigenvalue calculation result, and obtain the lens detection image; the adaptive threshold determination unit is configured to dynamically calculate the optimal threshold for defect area division using the Otsu algorithm; the defect area division unit is configured to calculate the gradient value of each pixel in the lens detection image using a Sobel filter, calculate the gradient modulus value of each pixel according to the gradient components in the horizontal and vertical directions of the gradient value of each pixel, and divide the defect area and non-defect area in the lens detection image based on the optimal threshold for defect division, and extract the defect position and defect type of each defect area.

[0098] Furthermore, the defect recognition module 20 further includes: a defect classification unit configured to perform defect classification on each defect area divided in the lens inspection image by using a decision tree classification based on information gain.

[0099] In this embodiment, the main task of the defect recognition module 20 is to analyze the high-resolution images collected by the confocal detection module 10 to accurately identify and classify various defects in the lens. First, the module analyzes the clarity heat map generated by the confocal detection and uses image segmentation technology to distinguish different areas in the image. This process uses an image gradient-based segmentation method to identify potential defective areas. Specifically, after the image acquisition is completed, the system generates a series of high-resolution image data. In order to further improve the accuracy of the detection, these image data will be input into the defect recognition module 20 for clarity evaluation after preprocessing. In this process, the system introduces an edge detection algorithm based on the Hessian matrix to enhance the recognition ability of tiny defects. The Hessian matrix consists of the second-order partial derivatives of the image, and its form is:

[0100] ;

[0101] Here, I represents the grayscale value of the input image. By calculating the eigenvalue of the Hessian matrix, the system can effectively identify the edges and corners in the image, laying the foundation for subsequent defect analysis. When the eigenvalue is greater than zero, it indicates that the point is an edge, and when the eigenvalue is less than zero, it indicates that the point is a flat area. Therefore, the Hessian matrix not only provides the edge information of the lens, but also provides the necessary data support for defect location.

[0102] In order to improve the sensitivity of detection, the module combines adaptive threshold segmentation technology and uses the Otsu algorithm to automatically select the optimal threshold to achieve more accurate defect determination:

[0103] ;

[0104] In the formula, and are the number of pixels in the two categories after segmentation, and is the average gray value of each class, N is the total number of pixels in the lens detection image, By dynamically adjusting the sensitivity during the inspection process, we can ensure that tiny defects can be accurately captured under various environmental conditions, thereby optimizing the overall inspection process.

[0105] The module uses the Sobel filter to calculate the gradient of the image. S is the convolution kernel used to calculate the gradient in the horizontal direction, which can effectively detect the edges and changes in the image. By convolving the Sobel filter with the image, the gradient value of each pixel can be obtained, and then the edge information of the image in the horizontal direction can be obtained. Then, the gradient modulus value of each pixel is calculated:

[0106] ;

[0107] in, and Represent the gradient components in the horizontal and vertical directions respectively. By setting an appropriate threshold (denoted as T), the image can be segmented into defective areas and non-defective areas, thereby effectively identifying potential defects.

[0108] In addition, the module also implements an adaptive learning mechanism to dynamically optimize the recognition algorithm by providing real-time feedback of the detection results. In this process, the detected defects are further classified using a decision tree-based classification algorithm (denoted as C). The decision tree construction process measures the importance of feature selection through information gain (IG), which is expressed as:

[0109] ;

[0110] Among them, H(D) is the entropy of the data set D, A is the current feature, The feature A is taken as a subset of v. In this way, the system can automatically select the optimal segmentation point according to the different characteristics of the defect and improve the accuracy of classification.

[0111] Therefore, the main task of the defect recognition module 20 provided in this embodiment is to analyze the high-resolution image generated by the confocal detection module 10 to accurately identify and classify various defects in the lens. The module first uses an image gradient-based segmentation method to preprocess the clarity heat map, calculates the gradient of the image through a Sobel filter, and identifies potential defect areas. Then, the Hessian matrix edge detection algorithm is used to enhance the recognition ability of tiny defects, and the Otsu algorithm is combined for adaptive threshold segmentation to automatically select the optimal threshold to achieve more accurate defect determination. In addition, the module also implements an adaptive learning mechanism, optimizes the recognition algorithm through real-time feedback of detection results, and uses a decision tree-based classification algorithm to further classify the detected defects to ensure the high sensitivity and accuracy of the system.

[0112] In a preferred embodiment, the 3D reconstruction module 30 specifically includes: a spatial coordinate allocation unit, configured to obtain the defect area division result of the lens detection image, and allocate corresponding spatial coordinates to each defect area in the lens detection image; a propagation path simulation unit, configured to run a ray tracing model to simulate the propagation path of the reflected light and refracted light of the detection laser beam on the lens to be detected, calculate the incident and emitted intensities of the detection laser beam under different light conditions, and generate three-dimensional spatial information of each defect area; a 3D reconstruction unit, configured to calculate the depth information based on the images taken by the two cameras using the parallax under stereoscopic vision, and reconstruct the defective three-dimensional model of the lens to be detected in the three-dimensional space.

[0113] Furthermore, the 3D reconstruction module 30 further includes: a 3D model optimization unit configured to optimize the parameters of the defect 3D model of the lens to be inspected based on a least squares optimization algorithm to obtain a final defect 3D model of the lens to be inspected;

[0114] In this embodiment, the main task of the 3D reconstruction module 30 is to convert the two-dimensional detection results provided by the defect recognition module 20 into a three-dimensional model, so as to deeply evaluate the impact of these defects on the imaging quality of the lens. By using the three-dimensional reconstruction technology, the module can not only show the external morphology of the lens, but also reveal the complexity of its internal structure, providing manufacturers with a more comprehensive basis for quality control and repair.

[0115] Before 3D reconstruction, the module first integrates the defect information generated by the defect recognition module 20. Each detected defect area will be assigned corresponding spatial coordinates, which will serve as the basis for subsequent 3D reconstruction. During the reconstruction process, structured light illumination technology combined with camera calibration is used to obtain real 3D spatial information by accurately measuring the reflection and refraction of light on the lens.

[0116] It should be noted that for each defect area generated by the defect recognition module 20, a spatial coordinate is assigned to it. Assuming that the coordinates of the center point of the defect area in the two-dimensional image are (x, y), it is converted into coordinates (X, Y, Z) in three-dimensional space. This conversion is based on the intrinsic and extrinsic parameter matrices of the camera, as well as the distance of the plane where the defect is located relative to the camera. Camera intrinsic parameter matrix: represents the characteristics of the camera itself, such as focal length, principal point position, etc. Camera extrinsic parameter matrix: represents the position of the camera relative to the world coordinates, that is, translation and rotation. Assume that the intrinsic parameter matrix of the camera is K, the extrinsic parameter matrix is ​​P, and the plane equation where the defect is known to be located is , then the following relationship can be established to solve the value of Z:

[0117] ;

[0118] Then, using the camera's intrinsic parameter matrix K and extrinsic parameter matrix P, the two-dimensional image coordinates (x, y) can be converted to three-dimensional world coordinates (X, Y, Z).

[0119] After that, the structured light illumination technology is combined with the camera calibration method to obtain the real three-dimensional spatial information by accurately measuring the reflection and refraction of light on the lens. Specifically, the reconstruction module regards the lens as a complex optical body and uses the ray tracing model to simulate the propagation path of light under different conditions. Structured light illumination: By projecting a grid pattern onto the surface of the lens, and then capturing the deformation of the pattern through the camera, the three-dimensional information of the lens surface is calculated. Camera calibration: Determine the camera's intrinsic parameters K and extrinsic parameters P, and convert the image coordinates into world coordinates. Ray tracing model: Simulate the propagation path of light in the lens, taking into account factors such as the refractive index of the lens material, to obtain the propagation trajectory of light under different conditions.

[0120] Specifically, the reconstruction module treats the lens as a complex optical body and uses a ray tracing model To simulate the propagation path of light under different conditions, the integration here is performed on all possible light directions. Represents a tiny directional angle element, I represents the final image brightness, E is the incident light intensity, R is the reflection coefficient, T is the transmission coefficient, S is the surface property function, and Ω is the angle range of light propagation. By calculating the incident and outgoing intensities under different light conditions, the true reflection of the lens in three-dimensional space can be generated.

[0121] Next, the reconstruction module uses stereo vision to compare the images taken by the two cameras and uses parallax to calculate the depth information represented as , D represents the disparity, f is the focal length of the camera, B is the baseline distance between the two cameras, and Z is the depth of the target object. By collecting image data from multiple perspectives and calculating their disparity, the shape and structure of the object in the three-dimensional space can be reconstructed.

[0122] To improve the accuracy of reconstruction, the module introduces an optimization algorithm based on the least squares method to refine the parameters of the 3D model. By minimizing the error between the reconstructed model and the actual inspection result, the algorithm ensures that the generated 3D model is as consistent as possible with the characteristics of the actual defect. Its optimization objectives are:

[0123] ;

[0124] In this formula, represents the true depth of the i-th point, is the depth predicted by the reconstructed model, N is the total number of points, and the predicted value is obtained by continuously adjusting the model parameters of the defective three-dimensional model of the lens to be tested. Gradually approaching the true value , to achieve optimization of three-dimensional reconstruction.

[0125] Therefore, the main task of the 3D reconstruction module 30 provided in this embodiment is to convert the two-dimensional detection results provided by the defect recognition module 20 into a three-dimensional model in order to deeply evaluate the impact of these defects on the imaging quality of the lens. The module integrates the detected defect information, assigns corresponding spatial coordinates to each defect area, and uses structured light illumination technology and camera calibration methods to accurately measure the reflection and refraction of light on the lens, thereby obtaining real three-dimensional spatial information. By simulating the propagation path of light under different conditions through the ray tracing algorithm, the module can generate a true reflection of the lens in three-dimensional space. In addition, the module also uses stereo vision technology to further reconstruct the shape and structure of objects in three-dimensional space by comparing the images taken by two cameras and using parallax to calculate depth information. In order to improve the accuracy of reconstruction, the module introduces an optimization algorithm based on the least squares method to ensure that the generated three-dimensional model is as consistent as possible with the actual defect characteristics by minimizing the error between the reconstructed model and the actual detection result.

[0126] In a preferred embodiment, the data analysis module 40 specifically includes: a defect data storage unit, configured to store the laser detection image, the defect information and the defect three-dimensional model of each lens to be detected as a group of defect-related data in a defect database; a clustering analysis unit, configured to use a K-means algorithm to optimize clustering of several groups of defect-related data in the defect database, and divide the several groups of defect-related data into multiple clusters, so that the similarity of the defect-related data within the same cluster is the highest, and the similarity of the defect-related data between different clusters is the lowest.

[0127] Furthermore, the data analysis module 40 also includes: a defect feature and imaging quality analysis unit, which is configured to establish a linear regression model to perform regression analysis and quantification on the relationship between defect features and imaging quality; an abnormal data detection unit, which is configured to adopt an abnormality detection algorithm based on an isolation forest to construct a random partitioning tree to isolate abnormal points; a lens production optimization suggestion unit, which is configured to identify the defect features that have the greatest impact on imaging quality based on minimizing the sum of squared error terms, and generate lens production optimization suggestions based on the calculated abnormality scores and preset rules.

[0128] In this embodiment, the main task of the data analysis module 40 is to comprehensively analyze the data generated by the confocal detection module 10, the defect recognition module 20 and the 3D reconstruction module 30 to provide comprehensive quality assessment and production optimization suggestions. This module integrates information from multiple data sources by using data mining and analysis algorithms to identify potential quality problems and optimize production processes, thereby further improving the overall performance of VR glasses optical components.

[0129] During the data analysis process, the module first systematically organizes the clarity, defect type and location, and depth information of the 3D reconstructed model obtained from each inspection module. These data are stored in a structured database for subsequent analysis. By building a database, data can be efficiently accessed and various analysis operations can be performed to ensure the accuracy and completeness of the data. After the data is sorted, the module uses statistical analysis and machine learning methods to deeply mine the data and extract valuable information.

[0130] Specifically, the module uses cluster analysis to group defect data to identify characteristic patterns of similar defects. The basic principle of cluster analysis is to divide the data set into multiple clusters so that the similarity of data points within the same cluster is the highest, while the similarity between different clusters is the lowest. This process usually uses the K-means algorithm, and its optimization goal is:

[0131] ;

[0132] In this formula, K is the number of clusters, is the sample set in the i-th cluster, x is the sample point, is the center point of the ith cluster, and |·| is the Euclidean distance. By iteratively optimizing the objective function, the module can effectively classify defect data and identify the main factors affecting product quality.

[0133] In addition, the data analysis module 40 also integrates regression analysis to quantify the relationship between defect characteristics and imaging quality. By establishing a linear regression model, the module can be expressed as:

[0134] ;

[0135] Here, y represents the evaluation index of imaging quality, For different defect characteristics (such as depth, area, type, etc.), is the intercept term, is the regression coefficient, is the error term. By minimizing the sum of squares of the error terms, the model can identify which defect features have the greatest impact on imaging quality, thereby providing specific recommendations for production optimization.

[0136] The data analysis module 40 uses an anomaly detection algorithm based on an isolation forest, the basic principle of which is to isolate anomalies by constructing a random partitioning tree. The principle of the algorithm is:

[0137] ;

[0138] Among them, C(x) is the anomaly score of sample point x, E(x) is the average depth of isolated points, is the normalization factor, is the depth of the Huffman tree n. By analyzing the anomaly score, the system can identify abnormal situations in production that may lead to quality degradation and take timely measures.

[0139] The analysis report generated by the data analysis module 40 will provide manufacturers with detailed insights and suggestions on quality control, helping them to optimize the production process and improve the yield rate of products.

[0140] In summary, the embodiment of the present invention proposes a pixel-level clarity judgment method based on confocal and a 3D fusion reconstruction technology. The system consists of a confocal detection module 10, a defect recognition module 20, a 3D reconstruction module 30 and a data analysis module 40. The confocal detection module 10 uses a rotating polygon mirror combined with a laser line scanning system to focus the laser to a precise focus through an f-θ lens to achieve high-sensitivity micro-defect detection. The signal intensity and resolution can be described by relevant formulas to ensure that the system supports 1*1 pixel-level clarity judgment. The defect recognition module 20 analyzes the high-resolution image generated by the confocal detection, and uses an algorithm based on the Hessian matrix and the Sobel filter to perform image segmentation and feature extraction to accurately identify and classify defects. The 3D reconstruction module 30 integrates the results of the defect recognition module 20, uses a ray tracing algorithm and stereo vision technology to generate a three-dimensional model of the lens, thereby evaluating the impact of defects on imaging quality. Finally, the data analysis module 40 integrates the data from each detection module, and uses cluster analysis, regression analysis and anomaly detection algorithms to provide comprehensive suggestions for production optimization to ensure the quality and stability of optical components.

[0141] Embodiment 2:

[0142] Reference Figure 3 , Figure 3 A flowchart of a confocal-based pixel-level clarity judgment and 3D fusion reconstruction method provided in an embodiment of the present invention.

[0143] like Figure 3 As shown, a method for pixel-level clarity judgment and 3D fusion reconstruction based on confocal is used in the above-mentioned pixel-level clarity judgment and 3D fusion reconstruction system based on confocal, comprising:

[0144] S1: using a confocal detection device including a detection laser generating component and a defect laser collecting component to perform a pixel-level laser beam scanning on the lens to be detected, and obtaining a laser detection image of the lens to be detected;

[0145] S2: performing image segmentation on the laser detection image, and determining defect information of the laser detection image according to the image segmentation result; wherein the defect information includes defect locations and defect types of a plurality of defects;

[0146] S3: generating a defect three-dimensional model of the lens to be inspected based on the defect position and defect type of each defect in the defect information of the laser inspection image;

[0147] S4: storing the laser detection image, the defect information and the defect three-dimensional model of each lens to be detected as a set of defect-related data in a defect database, calling the defect-related data in the defect database to analyze the lens defects, and generating lens production optimization suggestions.

[0148] This embodiment provides a pixel-level clarity judgment and 3D fusion reconstruction method based on confocal, which uses the confocal detection module to perform high-precision clarity detection on each pixel of the lens through point-by-point scanning technology to ensure the identification of tiny defects on the surface and inside. Next, the defect recognition module analyzes the detection results, determines the specific location and type of the defect, and generates a detailed defect report. Subsequently, the 3D reconstruction module constructs a three-dimensional model of the lens based on the defect recognition results, evaluates the impact of these defects on the imaging effect, and helps manufacturers understand the severity of the defects. Finally, the data analysis module organizes and analyzes all detection and reconstruction data to provide comprehensive production optimization suggestions to ensure the quality and stability of optical components. Through the close collaboration of these four modules, the present invention can achieve comprehensive and accurate detection and analysis of the optical components of VR glasses.

[0149] The specific implementation of the method for pixel-level clarity judgment and 3D fusion reconstruction based on confocal in the present application is basically the same as the above-mentioned embodiment of the system for pixel-level clarity judgment and 3D fusion reconstruction based on confocal, and will not be repeated here.

[0150] In the description of the embodiments of the present invention, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "center", "top", "bottom", "top", "bottom", "inside", "outside", "inner side", "outer side" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Among them, "inside" refers to an internal or enclosed area or space. "Periphery" refers to the area surrounding a specific component or a specific area.

[0151] In the description of the embodiments of the present invention, the terms "first", "second", "third", and "fourth" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", "third", and "fourth" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0152] In the description of the embodiments of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", and "assemble" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0153] In the description of the embodiments of the present invention, specific features, structures, materials or characteristics may be combined in a suitable manner in any one or more embodiments or examples.

[0154] In the description of the embodiments of the present invention, it should be understood that "-" and "~" represent a range between two values, and the range includes the endpoints. For example: "AB" represents a range greater than or equal to A and less than or equal to B. "A~B" represents a range greater than or equal to A and less than or equal to B.

[0155] In the description of the embodiments of the present invention, the term "and / or" herein is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " herein generally indicates that the associated objects before and after are in an "or" relationship.

[0156] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A confocal-based pixel-level clarity judgment and 3D fusion reconstruction system, characterized in that: The system comprises: A confocal detection module is configured to use a confocal detection device including a detection laser generating component and a defect laser collecting component to perform a pixel-level laser beam scan on the lens to be detected, so as to obtain a laser detection image of the lens to be detected; A defect recognition module is configured to perform image segmentation on the laser detection image, and determine defect information of the laser detection image according to the image segmentation result; wherein the defect information includes defect locations and defect types of a plurality of defects; A 3D reconstruction module is configured to generate a defect three-dimensional model of the lens to be inspected based on the defect position and defect type of each defect in the defect information of the laser inspection image; The data analysis module is configured to store the laser detection image, the defect information and the defect three-dimensional model of each lens to be detected as a group of defect-related data in a defect database, call the defect-related data in the defect database to analyze the lens defects, and generate lens production optimization suggestions.

2. The confocal-based pixel-level clarity judgment and 3D fusion reconstruction system according to claim 1, characterized in that: The detection laser generating component specifically comprises: a light source configured to provide a laser beam; A rotating polygon mirror is arranged in the irradiation direction of the laser beam of the light source and is configured to control the scanning angle of the laser beam and adjust the irradiation scanning range of the laser beam when receiving the laser beam; a cylindrical lens disposed in the direction indicated by the laser beam adjusted by the rotating polygon mirror, and configured to focus the laser beam into a linear beam when receiving the laser beam; The slit hole is arranged in the irradiation optical path of the linear light beam of the cylindrical lens, and is configured to perform focal light screening on the linear light beam focused by the cylindrical lens to obtain a detection laser beam for performing defect detection.

3. The confocal-based pixel-level clarity judgment and 3D fusion reconstruction system according to claim 2, characterized in that: The defect laser collection component specifically includes: a photomultiplier tube, arranged in the irradiation direction of the detection laser beam, configured to amplify the received optical signal of the detection laser beam, and irradiate the lens to be detected with the detection laser beam after the optical signal is amplified; A defect laser reflecting mirror is disposed in the irradiation optical path between the slit hole and the photomultiplier tube, and is configured to transmit the detection laser beam output by the slit hole to the photomultiplier tube, and transmit part of the detection laser beam irradiated to the lens to be inspected and reflected back as a defect detection beam to the linear array detector; The linear array detector is arranged in the emission direction of the defect detection light beam, and is configured to receive the defect detection light beam emitted by the defect laser reflector, and convert the defect detection light beam into an electrical signal to obtain a laser detection image.

4. The confocal-based pixel-level clarity judgment and 3D fusion reconstruction system according to claim 1, characterized in that: The defect recognition module specifically includes: The lens edge detection unit is configured to construct a Hessian matrix based on the second-order partial derivative of the laser detection image, calculate the eigenvalue of the Hessian matrix, extract the lens edge from the laser detection image according to the eigenvalue calculation result, and obtain the lens detection image; the expression of the Hessian matrix is ​​specifically: ; Where, I represents the gray value of the laser detection image; The adaptive threshold determination unit is configured to dynamically calculate the optimal threshold for defect area division using the Otsu algorithm; the expression of the optimal threshold for defect area division is specifically: ; in, and are the number of pixels in the two categories after segmentation, and is the average gray value of each class, N is the total number of pixels in the lens detection image, is the between-class variance; The defect area division unit is configured to calculate the gradient value of each pixel in the lens inspection image using a Sobel filter, calculate the gradient modulus value of each pixel according to the gradient components in the horizontal direction and the vertical direction in the gradient value of each pixel, and divide the defect area and the non-defect area in the lens inspection image based on the defect area division optimal threshold, and extract the defect position and defect type of each defect area; the expression of the gradient modulus value is specifically: ; in, and Represent the gradient components in the horizontal and vertical directions respectively.

5. The confocal-based pixel-level clarity judgment and 3D fusion reconstruction system according to claim 4, characterized in that: The defect recognition module further includes: The defect classification unit is configured to classify each defect area divided in the lens inspection image by using a decision tree classification based on information gain; the expression of the information gain is specifically: ; Among them, H(D) is the entropy of the data set D, A is the current feature, The subset of feature A whose value is v.

6. The confocal-based pixel-level clarity judgment and 3D fusion reconstruction system according to claim 1, characterized in that: The 3D reconstruction module specifically includes: A spatial coordinate allocation unit is configured to obtain a defect area division result of the lens detection image, and allocate corresponding spatial coordinates to each defect area in the lens detection image; The propagation path simulation unit is configured to run a ray tracing model to simulate the propagation path of the reflected light and the refracted light of the detection laser beam on the lens to be detected, calculate the incident and outgoing intensities of the detection laser beam under different light conditions, and generate three-dimensional spatial information of each defect area; the expression of the ray tracing model is specifically: ; Among them, I represents the final image brightness, E is the incident light intensity, R is the reflection coefficient, T is the transmission coefficient, S is the surface property function, and Ω is the angle range of light propagation; The 3D reconstruction unit is configured to calculate the depth information using the parallax under stereoscopic vision according to the images taken by the two cameras, and reconstruct the defective three-dimensional model of the lens to be inspected in the three-dimensional space; the expression of the parallax under stereoscopic vision is specifically: ; Where D represents the disparity, f is the focal length of the camera, B is the baseline distance between the two cameras, and Z is the depth of the target object.

7. The confocal-based pixel-level clarity judgment and 3D fusion reconstruction system according to claim 6, characterized in that: The 3D reconstruction module further includes: The three-dimensional model optimization unit is configured as an optimization algorithm based on the least square method to optimize the parameters of the defect three-dimensional model of the lens to be detected to obtain the final defect three-dimensional model of the lens to be detected; the expression of the optimization target of the optimization algorithm is specifically: ; in, represents the true depth of the i-th point, is the depth predicted by the reconstructed model, N is the total number of points, and the predicted value is obtained by continuously adjusting the model parameters of the defective three-dimensional model of the lens to be tested. Gradually approaching the true value .

8. The confocal-based pixel-level clarity judgment and 3D fusion reconstruction system according to claim 7, characterized in that: The data analysis module specifically includes: A defect data storage unit is configured to store the laser detection image, the defect information and the defect three-dimensional model of each lens to be detected as a set of defect associated data into a defect database; The clustering analysis unit is configured to optimize clustering of several groups of defect-related data in the defect database by using a K-means algorithm, and divide the several groups of defect-related data into multiple clusters, so that the similarity of the defect-related data in the same cluster is the highest, and the similarity of the defect-related data between different clusters is the lowest; the expression of the optimization target of the optimized clustering is specifically: ; Where K is the number of clusters, is the sample set in the i-th cluster, x is the sample point, is the center point of the i-th cluster, and |·| is the Euclidean distance.

9. The confocal-based pixel-level clarity judgment and 3D fusion reconstruction system according to claim 8, characterized in that: The data analysis module further includes: The defect feature and imaging quality analysis unit is configured to establish a linear regression model to perform regression analysis and quantification on the relationship between the defect feature and the imaging quality; the expression of the linear regression model is specifically: ; Among them, y represents the evaluation index of imaging quality, For different defect characteristics, is the intercept term, is the regression coefficient, is the error term; The abnormal data detection unit is configured to use an abnormal detection algorithm based on an isolation forest to construct a random partitioning tree to isolate abnormal points; the expression of the abnormal detection algorithm is specifically: ; Among them, C(x) is the anomaly score of sample point x, E(x) is the average depth of isolated points, is the normalization factor, The depth of the Huffman tree is n; The lens production optimization suggestion unit is configured to identify the defect characteristics that have the greatest impact on the imaging quality based on minimizing the sum of squared error terms, and generate lens production optimization suggestions based on the calculated abnormality scores and preset rules.

10. A confocal-based pixel-level clarity judgment and 3D fusion reconstruction method, characterized in that: The method comprises: S1: Using a confocal detection device including a detection laser generating component and a defect laser collecting component to perform pixel-level laser beam scanning on the lens to be detected, to obtain a laser detection image of the lens to be detected; S2: performing image segmentation on the laser detection image, and determining defect information of the laser detection image according to the image segmentation result; wherein the defect information includes defect locations and defect types of a plurality of defects; S3: generating a defect three-dimensional model of the lens to be inspected based on the defect position and defect type of each defect in the defect information of the laser inspection image; S4: storing the laser detection image, the defect information and the defect three-dimensional model of each lens to be detected as a set of defect-related data in a defect database, calling the defect-related data in the defect database to analyze the lens defects, and generating lens production optimization suggestions.

Citation Information

Patent Citations

  • Method for synchronously acquiring 3D shapes of multiple abrasive particles based on photometric stereo

    CN107677216A

  • Device and method for detecting micro bubbles in spectacle lens

    CN112485261A