A sensor-based light source adjustment method and system

By establishing a coordinate system, calculating rotation and displacement compensation parameters, performing three-dimensional correction and Gaussian pyramid decomposition analysis, the problem that existing light source adjustment technology is difficult to achieve three-dimensional alignment and wavefront phase consistency is solved, and high-precision light source adjustment and imaging quality improvement are achieved.

CN119228700BActive Publication Date: 2025-02-28EASDAR OPTOELECTRONICS (GUANGDONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411726058.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-28
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

Existing light source adjustment technologies are difficult to accurately identify the three-dimensional relationship between the light source and the target detection point, and cannot achieve accurate adjustment and calibration of three-dimensional space. The lack of multi-level wavefront phase analysis makes it difficult to ensure the phase consistency of the light source.

Method used

By acquiring image data, establishing a coordinate system, constructing a rotation matrix and displacement vector, calculating geometric error values, determining rotation and displacement compensation parameters, constructing an error compensation matrix for three-dimensional correction, and using Gaussian pyramid decomposition to analyze wavefront errors, adjusting the wavefront phase of the light source.

Benefits of technology

High-precision three-dimensional alignment between the light source and the sensor is achieved, phase consistency of the light source is ensured, and imaging quality and measurement accuracy are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228700B_ABST
    Figure CN119228700B_ABST
Patent Text Reader

Abstract

The present invention discloses a sensor-based light source adjustment method and system, including collecting image data to establish a coordinate system, constructing a rotation matrix and a displacement vector to calculate a geometric error value, and determining rotation and displacement compensation parameters; constructing an error compensation matrix based on the determined optimal rotation and displacement compensation parameters, determining correction coordinates based on the constructed error compensation matrix, and using a SPAD array to construct a two-dimensional brightness distribution map to verify the correction result. The present invention constructs an error image layer by layer at different resolutions by performing Gaussian pyramid processing on the correction coordinates. The multi-scale error analysis method can capture the error characteristics of the light spot at different scales, so that both subtle errors and large-scale offsets can be fully identified, ensuring that the final calibration result takes into account high precision and stability. By performing Fourier transform on the error value of the multi-resolution smoothed image, the frequency domain phase distribution information is obtained, so that the phase offset of the wavefront at each point can be extracted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of light source adjustment, and in particular to a sensor-based light source adjustment method and system. Background Art

[0002] With the widespread application of optical systems in industrial inspection, autonomous driving, precision measurement and scientific research, precise control and adjustment of light sources have become important factors in achieving high-precision imaging and detection. Traditional light source adjustment technologies mostly rely on mechanical adjustment or a single light intensity adjustment method.

[0003] However, the existing light source adjustment method only captures the two-dimensional information of the light source through the image sensor during application, and is unable to accurately identify the three-dimensional relationship between the light source and the target detection point, making it difficult to achieve accurate adjustment and calibration in three-dimensional space, thereby affecting the accuracy of the optical system; in addition, due to the lack of multi-level wavefront phase analysis, it is difficult to ensure the phase consistency of the light source in high-precision scenarios, and there is a lack of multi-level error quantification means for the wavefront phase of the light source. Especially in the wavefront phase adjustment process, it is difficult to achieve comprehensive correction for different spatial levels, which makes it easy to cause phase distortion problems, affecting imaging quality and measurement accuracy. Summary of the invention

[0004] The present invention aims to provide a sensor-based light source adjustment method and system to solve the above-mentioned problem.

[0005] The present invention is achieved through the following technical solutions:

[0006] A sensor-based light source adjustment method, comprising:

[0007] Collect image data to establish a coordinate system, construct a rotation matrix and displacement vector to calculate geometric error values, and determine rotation and displacement compensation parameters;

[0008] An error compensation matrix is ​​constructed based on the determined optimal rotation and displacement compensation parameters. The correction coordinates are determined based on the constructed error compensation matrix. A two-dimensional brightness distribution map is constructed using the SPAD array to verify the correction results. According to the time difference measured by TOF, the z-axis depth from the light source to the sensor is calculated to achieve three-dimensional correction.

[0009] Based on the correction coordinates, the wavefront error is analyzed, and the phase offset difference of different layers is calculated using Gaussian pyramid decomposition. The comprehensive phase offset difference is calculated by weight allocation and converted into the offset angle of the wavefront.

[0010] The light source is corrected in three dimensions based on a multi-axis controller, and the wavefront phase of the light source is adjusted based on the offset angle of the wavefront. The correction adjustment value is timestamped and data is backed up.

[0011] As a preferred solution of the sensor-based light source adjustment method of the present invention, wherein: the acquisition of image data to establish a coordinate system includes:

[0012] Collecting image data of the light spot transmitted through the filter through a sensor;

[0013] Perform stability check based on the light intensity fluctuation of the spot image data, and determine the fluctuation threshold based on historical data. If the change value of the light intensity fluctuation exceeds the fluctuation threshold, it is judged that the light source fluctuates greatly and needs maintenance.

[0014] Preprocessing the spot image data, including noise elimination;

[0015] Based on the filter and the sensor, a filter coordinate system and a sensor coordinate system are established respectively;

[0016] Filter coordinate system The origin is set to the center of the filter, and the x-axis and y-axis are set along the horizontal and vertical directions of the filter respectively;

[0017] Sensor coordinate system The origin is set at the center of the sensor, and the x-axis and y-axis are aligned along the horizontal and vertical directions of sensing, respectively.

[0018] As a preferred solution of the sensor-based light source adjustment method of the present invention, the step of constructing a rotation matrix and a displacement vector to calculate a geometric error value and determine rotation and displacement compensation parameters includes:

[0019] Based on filter coordinate system and sensor coordinate system The rotation relationship between them defines the rotation matrix , expressed as:

[0020] ;

[0021] in and Respectively represent the offset rotation angle of the filter coordinate system relative to the sensor coordinate system The sine and cosine of ;

[0022] Based on filter coordinate system and sensor coordinate system The translation relationship between them defines the displacement vector , expressed as:

[0023] ;

[0024] in Indicates the offset of the filter in the x-axis direction, Indicates the offset of the filter in the y-axis direction, and U represents the transpose calculation;

[0025] Based on the points in the filter coordinate system, the coordinates are transformed to the sensor coordinates, which can be expressed as:

[0026] ;

[0027] in Represents the point coordinates converted to the sensor coordinate system, represents the coordinates of the point in the filter coordinate system, and Respectively indicate points The x-axis and y-axis coordinates, U represents the transposed calculation;

[0028] Calculate the Euclidean distance between the filter and sensor coordinate systems, expressed as:

[0029] ;

[0030] in represents the geometric error value between the coordinates of the ith collected light spot and the ideal light spot coordinates, and represents the coordinates of the i-th light spot collected on the sensor after the light source beam passes through the filter, and represents the coordinates of the i-th spot position under ideal installation conditions of the filter and sensor;

[0031] The sum of the mean and standard deviation of historical geometric error values ​​is used as the position offset threshold. If the geometric error value is greater than or equal to the position offset threshold, it is judged that the offset is large and calibration is performed;

[0032] Counting the geometric error values ​​of the total number of collected spot coordinates and using minimization of the geometric error value as an objective function;

[0033] Defines the offset rotation angle of the filter coordinate system relative to the sensor coordinate system and the displacement vector of the filter coordinate system origin in the sensor coordinate system As error compensation, use the rotation matrix and displacement vector Represents the position of a point in the filter coordinate system in the sensor coordinate system. The objective function is iteratively optimized and derived using the least squares method to find the optimal offset rotation angle of the filter coordinate system relative to the sensor coordinate system. The translation values ​​of the x-axis and y-axis As rotation and displacement compensation parameters.

[0034] As a preferred solution of the sensor-based light source adjustment method of the present invention, wherein: the error compensation matrix is ​​constructed based on the determined optimal rotation and displacement compensation parameters, the correction coordinates are determined based on the constructed error compensation matrix, a two-dimensional brightness distribution map is constructed using a SPAD array to verify the correction result, and the z-axis depth from the light source to the sensor is calculated according to the time difference measured by TOF to achieve three-dimensional correction, including:

[0035] Based on the determined optimal rotation and displacement compensation parameters, the rotation matrix and displacement vector are reconstructed and combined to construct the error compensation matrix , expressed as:

[0036] ;

[0037] in and Respectively indicate angle The cosine and sine of represents the error compensation matrix;

[0038] Based on the error compensation matrix , perform calibration transformation on the point coordinates that need to be calibrated and transformed to the sensor coordinate system, and obtain the correction coordinates in the calibrated sensor coordinate system ;

[0039] Use the SPAD array to detect the light spot reflected by the light source and construct a two-dimensional brightness distribution map of the light spot. Count the corrected coordinates of the sensor coordinate system after calibration, calculate the average Euclidean distance between the corrected coordinate system and the two-dimensional brightness distribution map, and determine the verification threshold based on historical data. If the average Euclidean distance is greater than or equal to the verification threshold, it is judged that the verification deviation is large, and the rotation and displacement compensation parameters are recalculated.

[0040] The TOF technology is used to measure the time when the light pulse is emitted from the light source and the time when it is received by the SPAD array. The time difference between the emission time and the reception time is used as the flight time of the light pulse.

[0041] According to the time difference measured by TOF, the z-axis depth from the light source to the sensor is calculated, which is expressed as:

[0042] ;

[0043] in represents the z-axis depth of the sensor, c represents the speed of light, Indicates the time difference of TOF measurement;

[0044] Based on the sum of the mean and standard deviation of historical z-axis depth data as the depth threshold, if the calculated z-axis depth of the sensor is greater than or equal to the depth threshold, it is judged that the deviation is too large, and a separate mechanical adjustment is performed on the sensor.

[0045] As a preferred solution of the sensor-based light source adjustment method of the present invention, wherein: the wavefront error is analyzed based on the correction coordinates, the phase shift difference of different layers is calculated by using Gaussian pyramid decomposition, the comprehensive phase shift difference is calculated by weight allocation, and converted into the offset angle of the wavefront, including:

[0046] For calibration coordinates Further analyze the wavefront error and calculate the Euclidean distance between the correction spot coordinates in the sensor coordinate system and the calibrated ideal spot coordinates as the correction offset value , the correction offset value is taken as the 0th layer, and the Gaussian convolution kernel is used to perform Gaussian blur and downsampling as the initial error image. The error image is generated layer by layer according to the Gaussian pyramid of different scales, which is expressed as:

[0047] ;

[0048] in Indicates the coordinates of the kth layer The smoothed image at represents the Gaussian convolution kernel, where i and j represent the offset values ​​relative to the center position within the convolution kernel, k represents the kth layer, Indicates the offset coordinates of the kth layer The error value at ;

[0049] Determine the lowest similarity resolution based on historical experience, and construct a Gaussian pyramid layer based on the multi-resolution smoothed image;

[0050] Based on the error value corresponding to each Gaussian pyramid layer smoothed image, Fourier transform is performed to obtain the frequency domain matrix The phase distribution in is calculated and the deviation between the phase distribution and the ideal phase is calculated to determine the phase offset, which is expressed as:

[0051] ;

[0052] ;

[0053] in represents the wavefront phase distribution information of the k-th layer correction coordinates, and Represents the k-th frequency domain matrix The imaginary frequency domain matrix and real frequency domain matrix obtained by Fourier transform, represents the phase offset difference between the actual phase and the ideal phase of the kth layer, Represents ideal phase distribution information;

[0054] The phase shift difference of each Gaussian pyramid layer is weighted, and the weight of each layer is calculated based on the decreasing number of total layers, and the comprehensive phase shift difference is calculated, which is expressed as:

[0055] ;

[0056] ;

[0057] Where K represents the highest number of layers, represents the overall phase offset, represents the weight of the kth layer;

[0058] The overall phase shift is converted into the shift angle of the wavefront, expressed as:

[0059] ;

[0060] in represents the final phase shift angle, and Represents the coordinates in the sensor coordinate system The sine and cosine components of the direction are offset relative to the local phase of the wavefront.

[0061] As a preferred solution of the sensor-based light source adjustment method of the present invention, wherein: the light source is corrected in three dimensions based on a multi-axis controller, and the wavefront phase of the light source is adjusted based on the offset angle of the wavefront, including:

[0062] Based on the error compensation matrix of the multi-axis controller Get the corrected coordinates in the calibrated sensor coordinate system , and z-axis depth based on TOF measurement Construct three-dimensional adjustment values ​​to accurately calibrate and adjust the projection position of the light source;

[0063] Based on the final phase offset angle, the wavefront phase of the light source is further adjusted, the micro-vibration platform of the light source is controlled, and the phase angle of the wavefront is adjusted in real time to align the wavefront output by the light source with the ideal detection point of the sensor.

[0064] As a preferred solution of the sensor-based light source adjustment method of the present invention, wherein: the correction adjustment value is timestamped and data is backed up, including:

[0065] Performing timestamp marking based on the real-time adjusted phase angle of the adjustment wavefront and the projection position correction adjustment value of the light source;

[0066] Data storage of time-stamped data is performed, and data is backed up by wireless transmission to the cloud platform, and data is backed up regularly;

[0067] Use the data visualization tool Grafana to monitor light source adjustment data.

[0068] Another object of the present invention is to provide a system for a sensor-based light source adjustment method, which comprises:

[0069] Image acquisition module, collects image data and establishes the coordinate system of the filter and sensor;

[0070] An error compensation module calculates the geometric error value based on the rotation matrix and the displacement vector, and determines the rotation and displacement compensation parameters of the filter coordinate system;

[0071] The correction verification module calculates the correction coordinates in the sensor coordinate system according to the error compensation matrix and verifies the correction results using the two-dimensional brightness distribution map constructed by the SPAD array;

[0072] The 3D correction module calculates the z-axis depth from the light source to the sensor based on the time difference measured by TOF, determines the spatial relationship between the light source and the sensor, and performs 3D correction;

[0073] The phase correction module analyzes the wavefront error based on the correction coordinates, uses Gaussian pyramid decomposition to calculate the phase offset difference of different layers, and performs weight distribution to calculate the comprehensive phase offset difference and convert it into the offset angle of the wavefront;

[0074] A correction and adjustment module uses a multi-axis controller to perform three-dimensional correction on the light source and adjust the wavefront phase of the light source based on the calculated wavefront deviation angle;

[0075] The data storage module timestamps the correction adjustment values ​​and transmits the data wirelessly to the cloud platform for backup.

[0076] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of the above-mentioned sensor-based light source adjustment method when executing the computer program.

[0077] A computer-readable storage medium stores a computer program, which implements the steps of the above-mentioned sensor-based light source adjustment method when executed by a processor.

[0078] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0079] 1. The present invention defines a rotation matrix and a displacement vector between the filter coordinate system and the sensor coordinate system, accurately maps the points in the filter coordinate system to the sensor coordinate system, realizes high-precision spatial coordinate alignment, uses rotation and displacement compensation parameters for dynamic calibration, uses a SPAD array to detect the light spot reflected by the light source, and constructs a two-dimensional brightness distribution map of the light spot, thereby accurately capturing the light intensity distribution of the light spot, and cooperates with the geometric error, light spot brightness distribution and z-axis depth data collected in real time by TOF technology to realize all-round monitoring and adjustment of two-dimensional and three-dimensional alignment errors, ensuring high-precision control of the system in terms of light source direction and position.

[0080] 2. The present invention constructs error images layer by layer at different resolutions by performing Gaussian pyramid processing on the correction coordinates. The multi-scale error analysis method can capture the error characteristics of the light spot at different scales, so that both subtle errors and large-scale offsets can be fully identified, ensuring that the final calibration result takes into account both high precision and stability. By performing Fourier transform on the error values ​​of the multi-resolution smoothed image, the frequency domain phase distribution information is obtained, thereby being able to extract the phase offset of the wavefront at each point. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0082] Figure 1 A flow chart of a sensor-based light source adjustment method.

[0083] Figure 2 Schematic diagram of the structure of the sensor-based light source adjustment system. DETAILED DESCRIPTION

[0084] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and drawings. The schematic implementation modes and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention. It should be noted that the present invention is already in the actual development and use stage.

[0085] Example 1, reference Figure 1 , is the first embodiment of the present invention, which provides a sensor-based light source adjustment method, the sensor-based light source adjustment method includes:

[0086] S1, collect image data to establish a coordinate system, construct a rotation matrix and a displacement vector to calculate the geometric error value, and determine the rotation and displacement compensation parameters;

[0087] Preferably, collecting image data to establish a coordinate system includes:

[0088] Collecting image data of the light spot transmitted through the filter through a sensor;

[0089] Perform stability check based on the light intensity fluctuation of the spot image data, and determine the fluctuation threshold based on historical data. If the change value of the light intensity fluctuation exceeds the fluctuation threshold, it is judged that the light source fluctuates greatly and needs maintenance.

[0090] Preprocessing the spot image data, including noise elimination;

[0091] Based on the filter and the sensor, a filter coordinate system and a sensor coordinate system are established respectively;

[0092] Filter coordinate system The origin of is set as the filter center, and the x-axis and y-axis are set along the horizontal and vertical directions of the filter, respectively, to describe the position distribution of the wavefront error on the filter plane;

[0093] Sensor coordinate system The origin of is set at the center of the sensor, and the x-axis and y-axis are aligned along the horizontal and vertical directions of sensing, respectively, to describe the detected wavefront intensity distribution.

[0094] By collecting the spot image data transmitted through the filter through the sensor and monitoring the light intensity fluctuation, the working status of the light source can be evaluated in real time. By preprocessing the spot image data (such as noise elimination), the noise interference in the collected data can be eliminated to ensure the accuracy of the light intensity distribution data. By establishing respective coordinate systems for the filter, sensor and light source irradiating the ground, and defining the origin and axis for the filter and sensor respectively, the spatial position relationship between each component can be clearly described, and accurate calibration between the filter, sensor and light source can be achieved, thereby improving the alignment accuracy of the system. This coordinate system setting method makes the detection and compensation of wavefront errors more intuitive, helps to locate the source of errors in real time and make precise adjustments.

[0095] Furthermore, the rotation matrix and displacement vector are constructed to calculate the geometric error value and determine the rotation and displacement compensation parameters, including:

[0096] Based on filter coordinate system and sensor coordinate system The rotation relationship between them defines the rotation matrix , expressed as:

[0097] ;

[0098] in and Respectively represent the offset rotation angle of the filter coordinate system relative to the sensor coordinate system The sine and cosine of ;

[0099] Based on filter coordinate system and sensor coordinate system The translation relationship between them defines the displacement vector , expressed as:

[0100] ;

[0101] in Indicates the offset of the filter in the x-axis direction, Indicates the offset of the filter in the y-axis direction, and U represents the transpose calculation;

[0102] Based on the points in the filter coordinate system, the coordinates are transformed to the sensor coordinates, which can be expressed as:

[0103] ;

[0104]

[0105] in Represents the point coordinates converted to the sensor coordinate system, represents the coordinates of the point in the filter coordinate system, and Respectively indicate points The x-axis and y-axis coordinates, U represents the transposed calculation;

[0106] Calculate the Euclidean distance between the filter and sensor coordinate systems, expressed as:

[0107] ;

[0108] in represents the geometric error value between the coordinates of the ith collected light spot and the ideal light spot coordinates, and represents the coordinates of the i-th light spot collected on the sensor after the light source beam passes through the filter, and represents the coordinates of the i-th spot position under ideal installation conditions of the filter and sensor;

[0109] The sum of the mean and standard deviation of historical geometric error values ​​is used as the position offset threshold. If the geometric error value is greater than or equal to the position offset threshold, it is judged that the offset is large and calibration is performed;

[0110] Counting the geometric error values ​​of the total number of collected spot coordinates and using minimization of the geometric error value as an objective function;

[0111] Defines the offset rotation angle of the filter coordinate system relative to the sensor coordinate system and the displacement vector of the filter coordinate system origin in the sensor coordinate system As error compensation, use the rotation matrix and displacement vector Represents the position of a point in the filter coordinate system in the sensor coordinate system. The objective function is iteratively optimized and derived using the least squares method to find the optimal offset rotation angle of the filter coordinate system relative to the sensor coordinate system. The translation values ​​of the x-axis and y-axis As rotation and displacement compensation parameters.

[0112] By defining a rotation matrix and a displacement vector between the filter coordinate system and the sensor coordinate system, the points in the filter coordinate system are accurately mapped to the sensor coordinate system, achieving high-precision spatial coordinate alignment. Dynamic calibration is performed using rotation and displacement compensation parameters to reduce coordinate deviations caused by equipment installation or environmental factors, ensuring that the filter and sensor work in an ideal geometric alignment state, further improving the accuracy and stability of the system. The least squares method is used to minimize the geometric error and reduce the overall error to a minimum, which helps to ensure the reliability and accuracy of the data collected by the sensor. The optimization algorithm based on the objective function can accurately calculate the rotation angle and displacement compensation parameters of the filter, providing an optimization solution for the construction of the error compensation matrix, making error correction more accurate and effective.

[0113] S2, constructing an error compensation matrix based on the determined optimal rotation and displacement compensation parameters, determining the correction coordinates based on the constructed error compensation matrix, using the SPAD array to construct a two-dimensional brightness distribution map to verify the correction result, and calculating the z-axis depth from the light source to the sensor according to the time difference measured by TOF to achieve three-dimensional correction;

[0114] Preferably, an error compensation matrix is ​​constructed based on the determined optimal rotation and displacement compensation parameters, a correction coordinate is determined based on the constructed error compensation matrix, a two-dimensional brightness distribution map is constructed using a SPAD array to verify the correction result, and a z-axis depth from the light source to the sensor is calculated according to the time difference measured by TOF to achieve three-dimensional correction, including:

[0115] Based on the determined optimal rotation and displacement compensation parameters, the rotation matrix and displacement vector are reconstructed and combined to construct the error compensation matrix , expressed as:

[0116] ;

[0117] in and Respectively indicate angle The cosine and sine of represents the error compensation matrix;

[0118] Based on the error compensation matrix , perform calibration transformation on the point coordinates that need to be calibrated and transformed to the sensor coordinate system, and obtain the correction coordinates in the calibrated sensor coordinate system ;

[0119] By calculating the geometric error and the error compensation matrix To correct the alignment error between the filter and sensor coordinate systems, so that the actual spot position in the filter coordinate system can be correctly projected in the sensor coordinate system, solving the spot position offset caused by installation or positioning deviation. Through the geometric calibration stage, the geometric position of the spot is optimized;

[0120] Use the SPAD array to detect the light spot reflected by the light source and construct a two-dimensional brightness distribution map of the light spot. Count the corrected coordinates of the sensor coordinate system after calibration, calculate the average Euclidean distance between the corrected coordinate system and the two-dimensional brightness distribution map, and determine the verification threshold based on historical data. If the average Euclidean distance is greater than or equal to the verification threshold, it is judged that the verification deviation is large, and the rotation and displacement compensation parameters are recalculated.

[0121] The TOF technology is used to measure the time when the light pulse is emitted from the light source and the time when it is received by the SPAD array. The time difference between the emission time and the reception time is used as the flight time of the light pulse.

[0122] According to the time difference measured by TOF, the z-axis depth from the light source to the sensor is calculated, which is expressed as:

[0123] ;

[0124] in represents the z-axis depth of the sensor, c represents the speed of light, Indicates the time difference of TOF measurement;

[0125] Based on the sum of the mean and standard deviation of historical z-axis depth data as the depth threshold, if the calculated z-axis depth of the sensor is greater than or equal to the depth threshold, it is judged that the deviation is too large, and a separate mechanical adjustment is performed on the sensor.

[0126] By determining the optimal rotation and displacement compensation parameters, constructing the error compensation matrix and performing coordinate transformation, the alignment error between the filter and sensor coordinate systems can be effectively corrected. Through the geometric calibration stage, the actual spot position in the filter coordinate system is ensured to be correctly projected in the sensor coordinate system, thereby reducing the spot position offset caused by installation errors or positioning deviations. This precise coordinate calibration and alignment process ensures more accurate imaging of the light source on the sensor, reduces error accumulation, and ensures the overall high positioning accuracy of the light source system. The SPAD array is used to detect the light spot reflected by the light source and construct a two-dimensional brightness distribution map of the light spot, thereby accurately capturing the light intensity distribution of the light spot. The high sensitivity and high resolution of the SPAD array improve the accuracy of light spot detection and the verification efficiency. By calculating the average Euclidean distance between the corrected coordinates and the two-dimensional brightness distribution map, the verification threshold is set using historical data. The calibration effect can be judged in real time to ensure that there is no obvious deviation in the coordinate conversion between the light source and the sensor. Based on TOF technology, the flight time difference of the light pulse (the time difference is determined by the time when the light source is emitted and the SPAD array is received) is used to accurately measure the z-axis depth from the light source to the sensor. It is suitable for fine z-axis measurement and alignment. According to the real-time collected geometric error, spot brightness distribution and z-axis depth data, the system can dynamically adjust the calibration parameters and compensation thresholds to make the system adapt to environmental changes, reduce manual intervention, and improve the degree of automation. Combined with rotation and displacement compensation, SPAD detection of spot brightness distribution, TOF depth measurement and other means, the two-dimensional and three-dimensional alignment errors are fully monitored and adjusted to ensure high-precision control of the system in terms of light source direction and position, effectively reducing the accumulation of deviations caused by environmental or mechanical factors during long-term operation, and ensuring the long-term stability of the system.

[0127] S3, analyzing the wavefront error based on the correction coordinates, using Gaussian pyramid decomposition to calculate the phase shift difference of different layers, performing weight distribution to calculate the comprehensive phase shift difference, and converting it into the offset angle of the wavefront;

[0128] Preferably, the wavefront error is analyzed based on the correction coordinates, the phase shift differences of different layers are calculated using Gaussian pyramid decomposition, the comprehensive phase shift differences are calculated by weight allocation, and converted into the shift angle of the wavefront, including:

[0129] For calibration coordinates Further analyze the wavefront error and calculate the Euclidean distance between the correction spot coordinates in the sensor coordinate system and the calibrated ideal spot coordinates as the correction offset value , the correction offset value is taken as the 0th layer, and the Gaussian convolution kernel is used to perform Gaussian blur and downsampling as the initial error image. The error image is generated layer by layer according to the Gaussian pyramid of different scales, which is expressed as:

[0130] ;

[0131] in Indicates the coordinates of the kth layer The smoothed image at represents the Gaussian convolution kernel, where i and j represent the offset values ​​relative to the center position within the convolution kernel, k represents the kth layer, Indicates the offset coordinates of the kth layer The error value at ;

[0132] Determine the lowest similarity resolution based on historical experience, and construct a Gaussian pyramid layer based on the multi-resolution smoothed image;

[0133] Based on the error value corresponding to each Gaussian pyramid layer smoothed image, Fourier transform is performed to obtain the frequency domain matrix The phase distribution in is calculated and the deviation between the phase distribution and the ideal phase is calculated to determine the phase offset, which is expressed as:

[0134] ;

[0135] ;

[0136] in represents the wavefront phase distribution information of the k-th layer correction coordinates, and Represents the k-th frequency domain matrix The imaginary frequency domain matrix and real frequency domain matrix obtained by Fourier transform, represents the phase offset difference between the actual phase and the ideal phase of the kth layer, Represents ideal phase distribution information;

[0137] The phase shift difference of each Gaussian pyramid layer is weighted, and the weight of each layer is calculated based on the decreasing number of total layers, and the comprehensive phase shift difference is calculated, which is expressed as:

[0138] ;

[0139] ;

[0140] Where K represents the highest number of layers, represents the overall phase offset, represents the weight of the kth layer;

[0141] The overall phase shift is converted into the shift angle of the wavefront, expressed as:

[0142] ;

[0143] in represents the final phase shift angle, and Represents the coordinates in the sensor coordinate system Sine and cosine components of the direction of the local phase shift relative to the wavefront;

[0144] The wavefront error quantification stage further analyzes the spot position after geometric calibration and obtains the phase distribution through Fourier transform , thereby identifying the phase offset of the wavefront at each point, and calculating the phase offset matrix and the final phase shift angle It provides the phase deviation data of the wavefront in each direction. By correcting the wavefront phase, it can ensure that the light wave remains consistent throughout the entire propagation path and reduce wavefront distortion.

[0145] By performing Gaussian pyramid processing on the correction coordinates, error images are constructed layer by layer at different resolutions. The multi-scale error analysis method can capture the error characteristics of the light spot at different scales, so that both subtle errors and large-scale offsets can be fully identified. In the process of gradual optimization at each level, the wavefront error can be corrected more accurately to ensure that the final calibration result takes into account both high precision and stability. By performing Fourier transform on the error values ​​of the multi-resolution smoothed image, the frequency domain phase distribution information is obtained, so that the phase offset of the wavefront at each point can be extracted. The phase offset calculation method based on frequency domain analysis effectively avoids the complex interference factors in the time domain, making the phase information more accurate. The multi-layer Fourier analysis method helps to accurately calculate the phase offset matrix, making the quantification of the phase offset more refined and accurate. The calibrated light waves are ensured to have uniform consistency in all directions, thereby improving the overall optical performance of the system. The phase offset difference of each layer is calculated according to the weight of the decreasing number of layers to ensure that the high-level (detail layer) and low-level (overall offset layer) information occupy a reasonable proportion in the comprehensive phase offset. The contribution of multi-scale error information in the final correction can be balanced, and excessive reliance on error information of a certain scale can be effectively avoided. Through the frequency domain analysis of Fourier transform and weighted weighting, the final wavefront offset angle accurately reflects the phase deviation in the system. By accurately correcting the phase offset angle of the wavefront, the phase consistency of the light wave on the transmission path can be ensured, the wavefront distortion can be reduced, and the imaging blur and distortion caused by phase inconsistency can be effectively eliminated, so that the imaging quality of the optical system is significantly improved.

[0146] S4, performing three-dimensional correction on the light source based on the multi-axis controller, adjusting the wavefront phase of the light source based on the offset angle of the wavefront, timestamping the correction adjustment value, and performing data backup;

[0147] Preferably, the light source is three-dimensionally corrected based on a multi-axis controller, and the wavefront phase of the light source is adjusted based on the offset angle of the wavefront, including:

[0148] Based on the error compensation matrix of the multi-axis controller Get the corrected coordinates in the calibrated sensor coordinate system , and z-axis depth based on TOF measurement Construct three-dimensional adjustment values ​​to accurately calibrate and adjust the projection position of the light source;

[0149] Based on the final phase offset angle, the wavefront phase of the light source is further adjusted, the micro-vibration platform of the light source is controlled, and the phase angle of the wavefront is adjusted in real time to align the wavefront output by the light source with the ideal detection point of the sensor.

[0150] By combining the correction coordinates obtained through the error compensation matrix with the z-axis depth data measured by TOF, a three-dimensional calibration of the projection position of the light source is achieved, allowing the system to perform fine corrections in the x and y planes while adjusting the z-axis depth, thereby ensuring that the projection position of the light source is accurately aligned with the ideal detection point of the sensor in three-dimensional space, eliminating deviations in the plane and depth directions, and improving the accuracy and consistency of the system. The micro-vibration platform of the light source is controlled by the final phase offset angle, and the wavefront phase angle of the light source can be adjusted in real time to align it with the ideal wavefront phase of the sensor detection point, which helps the system achieve stable, high-quality imaging or detection effects.

[0151] Furthermore, the correction adjustment value is time-stamped and data backup is performed, including:

[0152] Performing timestamp marking based on the real-time adjusted phase angle of the adjustment wavefront and the projection position correction adjustment value of the light source;

[0153] Data storage of time-stamped data is performed, and data is backed up by wireless transmission to the cloud platform, and data is backed up regularly;

[0154] Use the data visualization tool Grafana to monitor light source adjustment data.

[0155] Through the recording of timestamps and adjustment parameters, the system can easily trace the adjustment details at a specific time point, facilitate the analysis and improvement of system performance, enhance the stability and accuracy of the system, and ensure the security and integrity of the data by wirelessly transmitting data to the cloud platform for data backup. Even if the local storage device fails, key data can still be protected in the cloud to avoid data loss. The Grafana tool is used to monitor the light source adjustment data in real time and provide intuitive data display for operators and managers, making the adjustment status, wavefront phase change and position calibration clear at a glance.

[0156] Example 2, reference Figure 2 , which is the second embodiment of the present invention, and which is different from the previous embodiment, provides a system for a sensor-based light source adjustment method, comprising:

[0157] Image acquisition module, collects image data and establishes the coordinate system of the filter and sensor;

[0158] An error compensation module calculates the geometric error value based on the rotation matrix and the displacement vector, and determines the rotation and displacement compensation parameters of the filter coordinate system;

[0159] The correction verification module calculates the correction coordinates in the sensor coordinate system according to the error compensation matrix and verifies the correction results using the two-dimensional brightness distribution map constructed by the SPAD array;

[0160] The 3D correction module calculates the z-axis depth from the light source to the sensor based on the time difference measured by TOF, determines the spatial relationship between the light source and the sensor, and performs 3D correction;

[0161] The phase correction module analyzes the wavefront error based on the correction coordinates, uses Gaussian pyramid decomposition to calculate the phase offset difference of different layers, and performs weight distribution to calculate the comprehensive phase offset difference and convert it into the offset angle of the wavefront;

[0162] A correction and adjustment module uses a multi-axis controller to perform three-dimensional correction on the light source and adjust the wavefront phase of the light source based on the calculated wavefront deviation angle;

[0163] The data storage module timestamps the correction adjustment values ​​and transmits the data wirelessly to the cloud platform for backup.

[0164] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A sensor-based light source adjustment method, characterized in that: include, Collect image data to establish a coordinate system, construct a rotation matrix and displacement vector to calculate geometric error values, and determine rotation and displacement compensation parameters; An error compensation matrix is ​​constructed based on the determined optimal rotation and displacement compensation parameters. The correction coordinates are determined based on the constructed error compensation matrix. A two-dimensional brightness distribution map is constructed using the SPAD array to verify the correction results. Based on the time difference measured by TOF, the z-axis depth from the light source to the sensor is calculated to achieve three-dimensional correction. Based on the correction coordinates, the wavefront error is analyzed, and the phase offset difference of different layers is calculated using Gaussian pyramid decomposition. The comprehensive phase offset difference is calculated by weight allocation and converted into the offset angle of the wavefront. The light source is corrected in three dimensions based on a multi-axis controller, and the wavefront phase of the light source is adjusted based on the offset angle of the wavefront. The correction adjustment value is timestamped and data is backed up.

2. The sensor-based light source adjustment method according to claim 1, characterized in that: The collecting of image data to establish a coordinate system includes: Collecting image data of the light spot transmitted through the filter through a sensor; Perform stability check based on the light intensity fluctuation of the spot image data, and determine the fluctuation threshold based on historical data. If the change value of the light intensity fluctuation exceeds the fluctuation threshold, it is judged that the light source fluctuates greatly and needs maintenance. Preprocessing the spot image data, including noise elimination; A filter coordinate system and a sensor coordinate system are established based on the filter and the sensor respectively; Filter coordinate system The origin is set to the center of the filter, and the x-axis and y-axis are set along the horizontal and vertical directions of the filter respectively; Sensor coordinate system The origin of is set at the center of the sensor, and the x-axis and y-axis are aligned along the horizontal and vertical directions of the sensor, respectively.

3. A sensor-based light source adjustment method according to claim 2, characterized in that: The method of constructing a rotation matrix and a displacement vector to calculate a geometric error value and determine rotation and displacement compensation parameters includes: Based on filter coordinate system and sensor coordinate system The rotation relationship between them defines the rotation matrix , expressed as: ; in and Respectively represent the offset rotation angle of the filter coordinate system relative to the sensor coordinate system The sine and cosine of ; Based on filter coordinate system and sensor coordinate system The translation relationship between them defines the displacement vector , expressed as: ; in Indicates the offset of the filter in the x-axis direction, Indicates the offset of the filter in the y-axis direction, and U represents the transpose calculation; Based on the points in the filter coordinate system, the coordinates are transformed to the sensor coordinates, which can be expressed as: ; ; in Represents the point coordinates converted to the sensor coordinate system, represents the point coordinates in the filter coordinate system, and Respectively indicate points The x-axis and y-axis coordinates, U represents the transposed calculation; Calculate the Euclidean distance between the filter and sensor coordinate systems, expressed as: ; in represents the geometric error value between the coordinates of the ith collected light spot and the ideal light spot coordinates, and represents the coordinates of the i-th light spot collected on the sensor after the light source beam passes through the filter, and represents the coordinates of the i-th spot position under ideal installation conditions of the filter and sensor; The sum of the mean and standard deviation of historical geometric error values ​​is used as the position offset threshold. If the geometric error value is greater than or equal to the position offset threshold, it is judged that the offset is large and calibration is performed; Counting the geometric error values ​​of the total number of collected spot coordinates and using minimization of the geometric error value as an objective function; Defines the offset rotation angle of the filter coordinate system relative to the sensor coordinate system and the displacement vector of the filter coordinate system origin in the sensor coordinate system As error compensation, use the rotation matrix and displacement vector Represents the position of a point in the filter coordinate system in the sensor coordinate system. The objective function is iteratively optimized and derived using the least squares method to find the optimal offset rotation angle of the filter coordinate system relative to the sensor coordinate system. The translation values ​​of the x-axis and y-axis As rotation and displacement compensation parameters.

4. The sensor-based light source adjustment method according to claim 3, characterized in that: The method comprises constructing an error compensation matrix based on the determined optimal rotation and displacement compensation parameters, determining correction coordinates based on the constructed error compensation matrix, using a SPAD array to construct a two-dimensional brightness distribution map to verify the correction result, and calculating the z-axis depth from the light source to the sensor according to the time difference measured by TOF to realize three-dimensional correction, including: Based on the determined optimal rotation and displacement compensation parameters, the rotation matrix and displacement vector are reconstructed and combined to construct the error compensation matrix , expressed as: ; in and Respectively indicate angle The cosine and sine of ; Based on the error compensation matrix , perform calibration transformation on the point coordinates that need to be calibrated and transformed to the sensor coordinate system, and obtain the correction coordinates in the calibrated sensor coordinate system ; Use the SPAD array to detect the light spot reflected by the light source and construct a two-dimensional brightness distribution map of the light spot. Count the corrected coordinates of the sensor coordinate system after calibration, calculate the average Euclidean distance between the corrected coordinate system and the two-dimensional brightness distribution map, and determine the verification threshold based on historical data. If the average Euclidean distance is greater than or equal to the verification threshold, it is judged that the verification deviation is large, and the rotation and displacement compensation parameters are recalculated. The TOF technology is used to measure the time when the light pulse is emitted from the light source and the time when it is received by the SPAD array. The time difference between the emission time and the reception time is used as the flight time of the light pulse. According to the time difference measured by TOF, the z-axis depth from the light source to the sensor is calculated, which is expressed as: ; in represents the z-axis depth of the sensor, c represents the speed of light, Indicates the time difference of TOF measurement; Based on the sum of the mean and standard deviation of historical z-axis depth data as the depth threshold, if the calculated z-axis depth of the sensor is greater than or equal to the depth threshold, it is judged that the deviation is too large, and a separate mechanical adjustment is performed on the sensor.

5. The sensor-based light source adjustment method according to claim 4, characterized in that: The method of analyzing the wavefront error based on the correction coordinates, calculating the phase shift difference of different layers using Gaussian pyramid decomposition, performing weight distribution to calculate the comprehensive phase shift difference, and converting it into the shift angle of the wavefront includes: For calibration coordinates Further analyze the wavefront error and calculate the Euclidean distance between the correction spot coordinates in the sensor coordinate system and the calibrated ideal spot coordinates as the correction offset value , the correction offset value is taken as the 0th layer, and the Gaussian convolution kernel is used to perform Gaussian blur and downsampling as the initial error image. The error image is generated layer by layer according to the Gaussian pyramid of different scales, which is expressed as: ; in Represents the k-th layer coordinates The smoothed image at represents the Gaussian convolution kernel, where i and j represent the offset values ​​relative to the center position within the convolution kernel, k represents the kth layer, Indicates the offset coordinates of the kth layer The error value at ; Determine the lowest similarity resolution based on historical experience, and construct a Gaussian pyramid layer based on the multi-resolution smoothed image; Based on the error value corresponding to each Gaussian pyramid layer smoothed image, Fourier transform is performed to obtain the frequency domain matrix The phase distribution in is calculated and the deviation between the phase distribution and the ideal phase is calculated to determine the phase offset, which is expressed as: ; ; in represents the wavefront phase distribution information of the k-th layer correction coordinates, and Represents the k-th frequency domain matrix The imaginary frequency domain matrix and real frequency domain matrix obtained by Fourier transform, represents the phase offset difference between the actual phase and the ideal phase of the kth layer, Represents ideal phase distribution information; The phase shift difference of each Gaussian pyramid layer is weighted, and the weight of each layer is calculated based on the decreasing number of total layers, and the comprehensive phase shift difference is calculated, which is expressed as: ; ; Where K represents the highest number of layers, represents the overall phase offset, represents the weight of the kth layer; The overall phase shift is converted into the shift angle of the wavefront, expressed as: ; in represents the final phase shift angle, and Represents the coordinates in the sensor coordinate system The sine and cosine components of the direction are offset relative to the local phase of the wavefront.

6. The sensor-based light source adjustment method according to claim 5, characterized in that: The method of performing three-dimensional correction on the light source based on the multi-axis controller and adjusting the wavefront phase of the light source based on the offset angle of the wavefront includes: Based on the error compensation matrix of the multi-axis controller Get the corrected coordinates in the calibrated sensor coordinate system , and z-axis depth based on TOF measurement Construct three-dimensional adjustment values ​​to accurately calibrate and adjust the projection position of the light source; The wavefront phase of the light source is further adjusted based on the final phase offset angle, the micro-vibration platform of the light source is controlled, and the phase angle of the wavefront is adjusted in real time to align the wavefront output by the light source with the ideal detection point of the sensor.

7. The sensor-based light source adjustment method according to claim 6, characterized in that: The time stamping of the correction adjustment value and data backup include: Performing timestamp marking based on the real-time adjusted phase angle of the adjustment wavefront and the projection position correction adjustment value of the light source; Data storage of time-stamped data is performed, and data is backed up by wireless transmission to the cloud platform, and data is backed up regularly; Use the data visualization tool Grafana to monitor light source adjustment data.

8. A system based on the sensor-based light source adjustment method according to any one of claims 1 to 7, characterized in that: include, Image acquisition module, collects image data and establishes the coordinate system of the filter and sensor; An error compensation module calculates the geometric error value based on the rotation matrix and the displacement vector, and determines the rotation and displacement compensation parameters of the filter coordinate system; The correction verification module calculates the correction coordinates in the sensor coordinate system according to the error compensation matrix and verifies the correction results using the two-dimensional brightness distribution map constructed by the SPAD array; The 3D correction module calculates the z-axis depth from the light source to the sensor based on the time difference measured by TOF, determines the spatial relationship between the light source and the sensor, and performs 3D correction; The phase correction module analyzes the wavefront error based on the correction coordinates, uses Gaussian pyramid decomposition to calculate the phase offset difference of different layers, and performs weight distribution to calculate the comprehensive phase offset difference and convert it into the offset angle of the wavefront; A correction and adjustment module uses a multi-axis controller to perform three-dimensional correction on the light source and adjust the wavefront phase of the light source based on the calculated wavefront deviation angle; The data storage module timestamps the correction adjustment values ​​and transmits the data wirelessly to the cloud platform for backup.

9. A computer device comprising: Memory and processor; The memory stores a computer program, wherein the processor implements the steps of the sensor-based light source adjustment method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the sensor-based light source adjustment method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Self-adaptation optical system near-field wave-front sensor calibration device and calibration method based on phase-diversity method

    CN102889935A

  • Error compensation method of photoelectric autocollimator under long distance working condition

    CN110440715A