Array lens consistency rapid detection method based on self-calibration algorithm
Through self-calibration algorithm and digital camera technology, the focal spot data of the microlens array is extracted for consistency judgment, which solves the problem of consistency detection of array lenses in optical devices, and realizes a fast and robust detection method, which is suitable for unknowns. The array lens with focal length and period improves the installation stability and measurement speed of the optical path.
Patent Information
- Application Number
- CN202410922354.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-11-08
AI Technical Summary
Microlens arrays in optical devices have array consistency problems due to processing errors and assembly errors, which affect the wavefront measurement results. It is difficult for the prior art to quickly detect the consistency of array lenses, especially in the case of unknown focal lengths and array periods.
Using a fast detection method for array lens consistency based on a custom scaling algorithm, the focal spot data is received through a digital camera, gradient calculation and graphical operations are performed, the connection domain index and center of mass positioning are extracted, and the edge mesh is excluded by combining matrix expansion and group coding. , adjust the center of mass offset to realize the consistency judgment of the array lens.
It realizes rapid detection of array lens consistency, reduces environmental requirements during the measurement process, improves optical path installation stability and measurement speed, and is suitable for microlens arrays with unknown focal lengths and periods, simplifying the detection process.
Smart Images

Figure CN118913628A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of optical device detection, and in particular to a method for quickly detecting consistency of an array lens based on a self-calibration algorithm. Background Art
[0002] Microlens arrays are widely used in optical imaging, wavefront detection, medical diagnosis and other fields due to their extremely high diffraction efficiency, high filling factor and wide band. Hartmann wavefront sensor is a wavefront detection device that uses a wavefront segmentation sampling array to focus the incident light on a matching array photodetector to obtain wavefront curvature information. The microlens array is the core component for wavefront segmentation and sampling. The array consistency and element surface error accuracy have a direct impact on the fitted curvature distribution function. With the continuous development of processing technology and manufacturing materials, microlens arrays have made significant progress in the field of optics.
[0003] The optical performance of the microlens array is affected by its surface morphology, processing quality, and adjustment stress. High-precision processing technology and corresponding equipment are required during the manufacturing process, and there is a certain manufacturing cost. During use, it is also necessary to accurately control the alignment and assembly process to control the device in a working state. For example, in the application of the classic Hartmann wavefront sensor, the microlens array is generally used to complete the segmentation sampling of the spatial wavefront during measurement. The incident wavefront is divided into array sub-unit wavefronts. The wavefront of each sub-unit is converged by a single microlens to generate a focal spot at the focal plane. The relative offset of the center of mass of each focal spot relative to the center position of the microlens array sub-unit is calculated to obtain the phase measurement data of the incident wavefront. If there are errors introduced by processing or adjustment of the array lens itself, the calculated focal spot data will be inconsistent, that is, some sub-units on the lens array cannot work normally, thereby introducing error function distribution to interfere with the calculation results of the device. For a qualified microlens array, the ideal state of all sub-units on its surface is equivalent, that is, the response of all sub-units to the change of the incident light wave signal should be consistent. If the consistency test can be completed quickly while assembling the array lens device, it can be directly determined whether the microlens array is qualified without screening all sub-units one by one.
[0004] The present invention proposes a method for rapid detection of array lens consistency based on a self-calibration algorithm. The method can realize rapid detection of array lens consistency without introducing external modulation devices, and is suitable for rapid detection and judgment of microlens arrays with unknown parameters such as focal length and array period. Summary of the invention
[0005] In order to solve the above-mentioned problems in the prior art, the present invention provides a method for rapid detection of array lens consistency based on a self-calibration algorithm. The method can realize rapid detection of array lens consistency without introducing external modulation devices. The method is suitable for rapid judgment of microlens arrays with unknown focal length, array period and other parameters. The measurement can be completed under the premise of external interference, and has a certain robustness.
[0006] The array lens consistency rapid detection method based on the self-calibration algorithm of the present invention comprises the following steps S1 to S4;
[0007] S1. Receive the array focus data matrix D from the array lens to be detected through a digital camera fixed on the translation stage, and then use gradient calculation and graphics operations to obtain the connected domain index and the connected domain centroid positioning coordinates of the calculation subunit area. The specific steps are as follows:
[0008] S1.1. The array focus data matrix D is processed by gradient calculation in the following manner: the absolute horizontal gradient matrix Gx of the data is calculated in the horizontal direction, and the absolute vertical gradient matrix Gy of the data is obtained in the vertical direction;
[0009] S1.2. Take the union of the binarized regions of Gx and Gy, and perform binarization processing to obtain a black and white sieve image;
[0010] S1.3. Perform hole filling and opening operations on the black and white sieve image to obtain a noise-free binary image matrix D G ;
[0011] S1.4. For the noise-free binary image matrix D G Number the connected domains, and use the regional feature function to extract the numbered region index and the corresponding centroid positioning coordinates. Suppose there are N numbered sub-unit regions, the corresponding connected domain indexes are 1, 2, ..., N, the connected domain n corresponds to the sub-unit region of the nth lens, and the centroid positioning coordinates of the connected domain n are s n Represented as s n =(x n ,y n ), where x represents the centroid of the connected domain of this connected domain located in the matrix D G The xth column, y indicates that the centroid of the connected domain of this connected domain is located in the matrix D G row y;
[0012] S2. Perform matrix expansion and group coding on the connected domain index and the connected domain centroid positioning coordinates, exclude the edge grid and then complete the group coding to obtain the calibration sequence matrix, obtain the calibration sequence matrix M, and use the calibration sequence matrix to process the array focus data matrix D to obtain the reference focus centroid. The specific steps are as follows:
[0013] S2.1. Take the centroid of the connected domain to calculate the sampling window coordinates. The preset length of the sampling window is h pixels. Then the sampling window coordinates of the nth connected domain are W n Represented as W n =[y n -h,y n +h-1,x n -h,x n +h-1];
[0014] S2.2. Perform matrix expansion and group coding. The expansion matrix of the nth connected domain is M n , then M n Indicated as M n =[W n ,s n ], and then locate the coordinate s according to the centroid of the connected domain n Get the expanded matrix M by ascending order of elements x n The corresponding centroid column is coded in ascending order x' u , get the expanded matrix M according to the ascending order of element y n The corresponding centroid row is coded in ascending order y' u , then the centroid of the nth connected domain is encoded in ascending order as u n =(x' u ,y' u ), the expanded matrix is further expressed as M n =[W n ,s n ,u n ];
[0015] S2.3. Exclude edge grids and take ascending code u n The sequence x' u The minimum and maximum values correspond to the expanded matrix subvectors and the sequence y' u The minimum and maximum values correspond to the expanded matrix subvectors and are set to empty. Then, step S2.2 is executed again to obtain the centroid of the nth connected domain and encode it in ascending order u' n =(x n ' u ',y n ' u '), the expanded matrix of the nth connected domain after processing is expressed as M n =[W n ,s n ,u' n ];
[0016] S2.4. Perform group coding and take the centroid location coordinate s n , the grouping interval is h / 2, and u' is encoded in ascending order along the centroid n x n ' u'Sequence judgments N The corresponding column group c n , and then encode u' in ascending order along the centroid n of y n ' u 'Sequence judgments n The corresponding row group r n , record the group coordinate g corresponding to the expansion matrix of the nth connected domain n Represented as g n =(c n ,r n ), then the expansion matrix of the nth connected domain is expressed as M n =[W n ,s n ,u' n ,g n ];
[0017] S2.5. Obtain the reference centroid according to the corresponding subunit of the array focus data matrix according to the calibration sequence matrix index.
[0018] The calibration sequence matrix M obtained by calculating the coding sequence according to the above steps S2.1 to S2.4 has the following form:
[0019]
[0020] The array focal spot data matrix D is the original information received by the digital camera from the array lens to be detected. The sampling window coordinates of the calibration sequence matrix in formula (1) are used to select the calculation unit, and then the centroid within the calculation unit is obtained by the first-order centroid calculation formula. For the reference focal spot centroid (px) in the sampling window of the nth connected domain n ,py n ), the calculation formula is as follows:
[0021]
[0022] Among them, px i,j Represents the column coordinates of the pixel in the i-th row and j-th column in the n-th connected domain sampling pane, py i,j represents the row coordinates of the pixel in the i-th row and j-th column in the n-th connected domain sampling window, D i,j Represents the pixel value of the pixel in the i-th row and j-th column in the n-th connected domain sampling pane, px n Represents the centroid abscissa of the focal spot data in the nth connected domain sampling window, py n Represents the centroid ordinate of the focal spot data in the nth connected domain sampling window;
[0023] S3. Fine-tune the horizontal angle or pitch angle of the digital camera target surface to introduce the center of mass offset, and control the offset in the camera target surface coordinate direction to be less than a single lens cycle. The specific steps are as follows:
[0024] S3.1. Rotate the horizontal inclination angle of the translation platform where the digital camera is located to control the offset of the array focal spot image relative to the camera target surface to not exceed h / 2;
[0025] S3.2. Rotate the pitch angle of the translation stage where the digital camera is located to control the offset of the array focal spot image relative to the camera target surface to not exceed h / 2;
[0026] S3.3. If the translation stage where the digital camera is located has no horizontal / pitch angle adjustment, then steps S3.1 and S3.2 need to be replaced by adjusting the horizontal / vertical translation amount, and the horizontal / vertical translation amount of the array focal spot image relative to the camera target surface needs to be controlled not to exceed h / 2;
[0027] S4. Record the array focal spot after adjusting the camera offset, complete the processing in steps S1 to S2 for this group of recorded data to obtain the first-order centroid of the valid data in the sampling window after the offset, and record the offset focal spot centroid (px') in the nth connected domain sampling window after adjustment. n ,py' n ), the corresponding center of mass offset (δx n ,δy n ) is expressed as:
[0028]
[0029] Correspondingly, the centroid offset vector δ x and δ y It is expressed as:
[0030]
[0031] By comparing with the reference centroid offset vector, the consistency of the array lens can be determined.
[0032] In steps S2 to S4, the sampling window selected by calculation is the sampling window with the smaller effective area obtained after the array focus data are processed twice.
[0033] In step S4, the reference centroid offset vector comes from the centroid offset vector obtained after a commercial high-precision array lens having specifications similar to those of the lens to be tested is processed by steps S1 to S4 of the method.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] 1. The image processing of the present invention is combined with a self-calibration algorithm to extract the focal spot array of the incident wavefront and complete the relative displacement vector calculation, which improves the stability of the installation and debugging process of components in the optical path, reduces the environmental requirements during the measurement process, has a simple structure, and is easy to operate.
[0036] 2. The present invention adopts a self-calibration algorithm to complete the full effective area encoding of the microlens array, which can quickly find the faulty microlens array and eliminate invalid data, thereby improving the measurement speed.
[0037] 3. The present invention can be applied to the consistency detection of microlens arrays with unknown parameters such as focal length and period, and can also be applied to the detection of diffraction microlens array optical components. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 The present invention is a flowchart of a method for quickly detecting consistency of an array lens based on a self-calibration algorithm.
[0039] Figure 2 Schematic diagram of the optical path of an embodiment of the present invention.
[0040] Figure 3 The diagram is a diagram of the change of array focal spot data received by the digital camera in an embodiment of the present invention. The data sampling points in the large circle are the calculation area, and the coding window in the calculation area is the calculation reference parameter grid provided by the self-calibration algorithm under the condition that the array lens has an offset.
[0041] Figure 4 The test results of the array lens consistency rapid detection method based on the self-calibration algorithm in the embodiment of the present invention are compared with the reference parameter tilt offset provided by the commercial Hartmann sensor, wherein (a) is the offset data reference result, and (b) is the offset data test result completed by this method on another unknown microlens array. DETAILED DESCRIPTION
[0042] The present invention will be further described below in conjunction with examples and drawings. It should be pointed out that the examples described below are intended to facilitate the understanding of the present invention and do not have any limiting effect on the present invention and should not be used to limit the protection scope of the present invention.
[0043] Please refer to Figure 2 A schematic diagram of the test optical path of an embodiment of the present invention is shown in the figure. The test optical path structure is shown in the figure, wherein the incident light beam is a collimated plane wave, which passes through the microlens array P1 to be tested and reaches the digital camera target surface P2. Then, the computer P3 synchronously completes the initial calibration process S1-S2, and then fine-tunes the camera to make the focal spot signal produce a horizontal or vertical offset. Then, the calculation and calibration comparison of S3-S4 are completed, and the consistency judgment result of the microlens array to be tested is given.
[0044] The digital camera described in the embodiment is a CCD recording camera, a CMOS image sensor or a pyroelectric array recording camera.
[0045] The self-calibration algorithm provides the reference parameters and calculation window detected at this time when the optical path is inserted into the microlens array to be measured to complete the initial self-calibration of the lens to be measured.
[0046] In the embodiment, the light source used in the experiment is a He-Ne laser with a wavelength of 632.8nm. During the process of receiving the focal spot of the array, a self-calibration algorithm is used to determine whether the focal plane of the lens coincides with the plane where the target surface of the recording camera is located. After completing steps S1 and S2, the fixing device of the recording camera is adjusted or the camera is slightly translated in a certain direction to control the position of the focal spot array to produce a displacement that does not exceed the interval of its own sub-units, and then steps S3 and S4 are completed.
[0047] The digital camera of the embodiment records the changes of the array focal spot before and after the movement relative to the camera target surface. Figure 3 As shown, the data retained in the largest circle is the valid data recording area determined by the self-calibration algorithm, the sub-pane is the data calculation window determined according to the change of the focal spot before and after, and the arrow on the focal spot indicates the direction in which the focal spot moves after the camera is offset.
[0048] The centroid offset vector δ of the embodiment x and δ y The results and comparison benchmarks are as follows Figure 4 As shown, in the data diagram, the + mark is the horizontal axis offset, the × mark is the vertical axis offset, the benchmark test camera is the same camera used to measure the unknown lens array, and the unit of the focus offset is pixel (unit: pix). Figure 4 (a) shows the test benchmark results of the embedded microlens array of the commercial Hartmann camera produced by Thorlab, where the mean offset of the horizontal axis is -5.29pix, the peak-to-valley value is 0.17pix, and the data standard deviation is 0.026pix; the mean offset of the vertical axis is 11.72pix, the peak-to-valley value is 0.18pix, and the data standard deviation is 0.026pix. Figure 4 (b) shows the test results of the unknown parameter microlens array, where the mean value of the horizontal axis offset is 18.58pix, the peak-to-valley value is 2.04pix, and the data standard deviation is 0.205pix; the mean value of the vertical axis offset is -3.44pix, the peak-to-valley value is 1.49pix, and the data standard deviation is 0.214pix. Obviously, the peak-to-valley value of the offset of the lens to be tested in this test result is about 8 to 12 times that of the benchmark data, and the standard deviation data is about 8 times that of the benchmark data. Obviously, in the measurement of this embodiment, the quality of the microlens array to be tested in the tilt offset data is significantly lower than the test benchmark, from Figure 4The data distribution in (b) also shows that the data dispersion of the microlens array to be tested is significantly higher than the test benchmark. In summary, the consistency of the unknown microlens array to be tested in this embodiment cannot complete the accurate measurement of the complex wavefront.
[0049] Some parts of the present invention are not described in detail and belong to the common knowledge of those skilled in the art.
[0050] The key technology of the present invention is a method for rapid detection of array lens consistency based on a self-calibration algorithm. The method can realize rapid detection of array lens consistency without introducing external modulation devices, and is suitable for rapid detection and judgment of microlens arrays with unknown parameters such as focal length and array period.
[0051] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific implementation case of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement or improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for rapid detection of array lens consistency based on a self-calibration algorithm, characterized in that: The following steps are involved: S1. Receive the array focus data matrix D from the array lens to be detected through a digital camera fixed on the translation stage, and calculate the connected domain index and the centroid positioning coordinates of the connected domain of the sub-unit area; S2. Perform matrix expansion and group coding on the connected domain index and the connected domain centroid positioning coordinates of the sub-unit area, exclude the edge grid, obtain the calibration sequence matrix M, and use the calibration sequence matrix to process the array focus data matrix D to obtain the reference focus centroid; S3. Fine-tune the horizontal angle or pitch angle of the digital camera target surface to shift the center of mass of the reference focal spot, and control the offset in the camera target surface coordinate direction to be less than a single lens period; S4. Record the array focal spot after the shift, and complete the processing in steps S1 to S2 for the group of recorded data, obtain the shifted centroid of the valid data in the sampling window after the shift, and calculate the centroid shift vector; By comparing the peak-to-valley values and standard deviation of the centroid offset vector, the consistency of the array lens can be determined.
2. The method for rapid detection of consistency of an array lens based on a self-calibration algorithm according to claim 1, characterized in that: The step S1 of calculating the connected domain index and the connected domain centroid positioning coordinates of the sub-unit area specifically includes: S1.
1. Perform gradient calculation on the array focus data matrix D, calculate the absolute horizontal gradient matrix Gx in the horizontal direction, and calculate the absolute vertical gradient matrix Gy in the vertical direction; S1.
2. Take the union of the binarized regions of the absolute horizontal gradient matrix Gx and the absolute vertical gradient matrix Gy, and obtain a black and white sieve image by binarization processing; S1.
3. Perform hole filling and opening operations on the black and white sieve image to obtain a noise-free binary image matrix D G ; S1.
4. For the noise-free binary image matrix D G Number the connected domains and extract the connected domain index and the connected domain centroid location coordinates: Assuming there are N sub-unit regions in total, the corresponding connected domain indexes are 1, 2, ...n, ..., N, that is, the nth connected domain corresponds to the nth sub-unit region; The centroid location coordinates s of the nth connected domain n =(x n ,y n ), where x n Indicates that the centroid of the connected domain of the nth connected domain is located in the absolute horizontal gradient matrix D G No. x n Column,y n Indicates that the centroid of the connected domain of the nth connected domain is located in the absolute horizontal gradient matrix D G yth n OK.
3. The method for rapid detection of consistency of an array lens based on a self-calibration algorithm according to claim 1, characterized in that: The step S2 specifically includes: S2.
1. Take the centroid of the connected domain to calculate the sampling window coordinates. The preset length of the sampling window is h pixels. Then the sampling window coordinates of the nth connected domain are W n Represented as W n =[y n -h,y n +h-1,x n -h,x n +h-1]; S2.
2. Perform matrix expansion and group coding, and record the expansion matrix M of the nth connected domain n , denoted as M n =[W n ,s n ], locate the coordinate s according to the centroid of the connected domain n Element x n In ascending order, get the expanded matrix M n The corresponding centroid column is coded in ascending order x n ' u , according to the element y n In ascending order, get the expanded matrix M n The corresponding centroid row is coded in ascending order y n ' u , then the centroid of the nth connected domain is encoded in ascending order u n =(x n ' u ,y n ' u ), after matrix expansion and group coding, M n =[W n ,s n ,u n ]; S2.
3. Exclude edge grids and take ascending code u n In the sequence x n ' u The extended matrix subvectors and sequences y corresponding to the minimum and maximum values n ' u After the expanded matrix subvectors corresponding to the minimum and maximum values are set to zero, the matrix expansion and group coding in S2.2 are performed again to obtain the centroid of the nth connected domain and then encode u' in ascending order. n =(x n ' u ', y n ' u '), then the expansion matrix of the nth connected domain is expressed as M n =[W n ,s n ,u' n ]; S2.
4. Perform matrix expansion and group coding again, with h / 2 as the grouping interval, and encode u' in ascending order along the centroid. n In the sequence x n ' u ' and y n ' u 'The ascending direction marks the centroid location coordinates s of the connected domain n The corresponding column grouping coordinate c n and row grouping coordinates r n , record the group coordinate g corresponding to the expansion matrix of the nth connected domain n =(c n ,r n ), then the expansion matrix M of the nth connected domain n =[W n ,s n ,u' n ,g n ]; S2.
5. According to the coding order, the calibration sequence matrix M is calculated, and the formula is as follows: S2.
6. According to the calibration sequence matrix M, the corresponding sub-unit of the array focus data matrix is indexed, and then the reference focus centroid in the sampling window is calculated by the first-order centroid formula (2) and (3). For the reference focal spot centroid (px) in the nth connected domain sampling window n ,py n ), the formula is as follows: Among them, px i,j Represents the column coordinates of the pixel in the i-th row and j-th column in the n-th connected domain sampling pane, py i,j represents the row coordinates of the pixel in the i-th row and j-th column in the n-th connected domain sampling window, D i,j Represents the pixel value of the pixel in the i-th row and j-th column in the n-th connected domain sampling pane, px n Represents the centroid abscissa of the focal spot data in the nth connected domain sampling window, py n Represents the centroid ordinate of the focal spot data in the nth connected domain sampling window.
4. The method for rapid detection of consistency of an array lens based on a self-calibration algorithm according to claim 1, characterized in that: The step S3 specifically includes: S3.
1. Rotate the horizontal inclination angle of the translation platform where the digital camera is located to control the offset of the array focal spot image relative to the camera target surface to not exceed h / 2; S3.
2. Rotate the pitch angle of the translation stage where the digital camera is located to control the offset of the array focal spot image relative to the camera target surface to not exceed h / 2; S3.
3. If the translation stage where the digital camera is located has no horizontal / pitch angle adjustment, steps S3.1 and S3.2 need to be replaced by adjusting the horizontal / vertical translation amount, and the horizontal / vertical translation amount of the array focal spot image relative to the camera target surface must be controlled not to exceed h / 2.
5. The method for rapid detection of consistency of an array lens based on a self-calibration algorithm according to claim 1, characterized in that: The step S4 specifically includes: repeating the process of S1 to S2 to obtain the centroid of the nth sampling window from the array focal spot after the shift, and recording it as the shifted centroid (px' n ,py' n ), then the centroid offset (δx n ,δy n ) is expressed as: Center of mass offset vector δ x and δ y It is expressed as: Then calculate the center of mass offset vector δ x and δ y The peak-to-valley value V p and standard deviation S p , if V p Less than 1.2 times the peak-to-valley value of the calibration vector and S p If it is less than 1.5 times the standard deviation of the calibration vector, it can be said that the consistency of the array lens to be tested is qualified, otherwise the consistency is unqualified; The calibration vector is a centroid offset vector obtained by calculating through steps S1 to S4 a commercial array lens having the same focal length, size and lens spacing as the array lens to be measured.
6. The method for rapid detection of consistency of an array lens based on a self-calibration algorithm according to claim 1, characterized in that: The absolute horizontal gradient matrix Gx and the absolute vertical gradient matrix Gy in step S1 are obtained by processing the array focal spot data matrix D with the horizontal and vertical gradient algorithms and taking their absolute values.
7. The method for rapid detection of consistency of an array lens based on a self-calibration algorithm according to claim 1, characterized in that: In step S1, the binarization regions of Gx and Gy are processed by using a binarization threshold. The resulting noise-free binary image matrix D G Each sub-binarized region is a ring structure.
8. The method for rapid detection of consistency of an array lens based on a self-calibration algorithm according to claim 1, characterized in that: In step S4, the reference centroid offset vector comes from the centroid offset vector obtained after a commercial high-precision array lens with specifications similar to those of the lens to be tested is processed in steps S1 to S4 of the method.
