An optical detection calibration method based on laser cross calibration
By employing the optical inspection and calibration method of laser cross calibration, combined with multispectral sensors and dynamic compensation technology, the problems of ambient light interference, spot deformation, and temperature changes in the inspection of complex curved workpieces have been solved, achieving high-precision and reliable optical inspection.
Patent Information
- Application Number
- CN202510647397.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-05-20
AI Technical Summary
Existing laser calibration technology suffers from systematic deviations caused by ambient light interference, spot deformation, multi-view splicing errors, and temperature changes in the inspection of complex curved workpieces, resulting in insufficient detection accuracy and reliability.
An optical detection and calibration method based on laser cross calibration is adopted. Ambient light data is collected in real time through a multispectral sensor array, the laser power is dynamically adjusted, and a coordinate transformation matrix with curvature constraint is constructed by combining adaptive threshold segmentation and optical distortion correction. A dynamic closed-loop compensation model is established to optimize multi-view stitching and temperature effects.
It improves the accuracy and reliability of complex surface detection, reduces the impact of ambient light interference and temperature changes, and ensures the stability and high-precision calibration of the system in dynamic environments.
Smart Images

Figure CN120558128B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical testing and calibration technology, and in particular to an optical testing and calibration method based on laser crosshair calibration. Background Technology
[0002] In precision manufacturing, the three-dimensional morphology inspection of complex curved surface workpieces (such as aero-engine blades and automotive body panels) places stringent demands on optical calibration technology. Existing laser calibration technology faces the following critical technical bottlenecks in practical applications:
[0003] Traditional single-wavelength laser calibration methods employ a fixed power output mode, which cannot effectively distinguish between the laser signal and ambient interference light in the multispectral mixed lighting environment of a workshop. Especially when there are highly reflective areas on the workpiece surface, the secondary reflection of ambient light on the metal surface will superimpose with the laser spot, leading to deviations in the feature point extraction position (actual measurement data shows that the positioning error can reach ±15μm when the illuminance fluctuates by ±20%). While existing technologies attempt to add filters, the fixed setting of the filter bandwidth is mismatched with the dynamic ambient light spectrum, resulting in excessive attenuation of the effective signal when detecting dark-colored light-absorbing materials.
[0004] In addition, the mainstream calibration method uses a fixed threshold segmentation algorithm, which is prone to the following problems in regions with abrupt changes in curvature:
[0005] When line laser projection is applied to a steep curved surface, the spot shape is distorted, making it difficult to accurately identify the center line with a fixed threshold.
[0006] When stitching multiple viewpoints, the local coordinate system transformation relies on mechanical positioning accuracy, without considering the coupling effect between optical distortion and mechanical error (experiments show that when the workpiece curvature radius is less than 50mm, the cumulative stitching error of the traditional method can reach 0.3mm / m). 2 );
[0007] Existing distortion correction models are calibrated based on a fixed working distance and do not compensate for lens focal length drift caused by temperature changes, resulting in systematic deviations during continuous operation.
[0008] The aforementioned technical deficiencies have serious consequences in precision testing in fields such as automobile manufacturing and aerospace: in the inspection of body panels, ambient light interference causes gap and surface difference measurement errors to exceed limits, requiring repeated manual re-inspections and increasing the inspection time per part by 40%; in the inspection of turbine blades, multi-view splicing errors cause aerodynamic profile distortion, directly affecting engine performance evaluation. Therefore, developing optical calibration methods with dynamic environment suppression and multi-error collaborative compensation capabilities has become a key technological breakthrough direction for improving the inspection accuracy of complex curved surfaces. Summary of the Invention
[0009] To achieve the above objectives, this invention provides an optical detection and calibration method based on the laser crosshair calibration method, comprising the following steps:
[0010] Step 1: Dynamic ambient light suppression and laser parameter adjustment:
[0011] Ambient light spectral distribution data is collected in real time by a multispectral sensor array. Based on the energy ratio of the interference bands that overlap with the laser wavelength in the spectral distribution data, the laser power compensation coefficient is dynamically calculated, and the dual-wavelength laser is controlled to project crosshair calibration lines.
[0012] Step 2: Extraction of anti-distortion feature points:
[0013] Receive the laser power parameters adjusted in step 1, acquire the laser projection image, dynamically divide the processing area according to the local image contrast, perform adaptive threshold segmentation and sub-pixel level edge detection in the processing area, extract the coordinates of the crosshair intersection and perform optical distortion correction.
[0014] Step 3: Multi-view error collaborative optimization:
[0015] The corrected coordinates output from step 2 are input into the mechanical motion parameters of the rotary shaft encoder to construct a coordinate transformation matrix with curvature constraints. The three-dimensional calibration point cloud in the global coordinate system is obtained through iterative optimization.
[0016] Step 4: Dynamic closed-loop compensation:
[0017] Based on the splicing residual data from step 3 and the real-time collected ambient temperature and surface reflectivity parameters, a wavelength drift compensation model and a reflectivity weight mapping table are established to dynamically correct the laser power compensation coefficient from step 1 and the distortion correction parameters from step 2.
[0018] Preferably, the method for calculating the proportion of interference band energy in step 1 includes:
[0019] Band separation is performed on the multispectral data to extract the first interference sub-band that overlaps with the red laser wavelength range and the second interference sub-band that overlaps with the blue laser wavelength range;
[0020] Calculate the energy integral value of each sub-band and perform a weighted sum based on the preset wavelength sensitivity coefficient;
[0021] The wavelength sensitivity coefficient is determined in the following way:
[0022] In a standard anechoic chamber environment, the interference rate of ambient light on the laser reflection signal at each wavelength was measured using samples of different materials.
[0023] Establish a database mapping the relationship between material type and sensitivity coefficient;
[0024] The corresponding sensitivity coefficient is applied based on the material type of the workpiece being inspected.
[0025] Preferably, the method for dynamically dividing the processing region in step 2 includes:
[0026] The pixel gray-level gradient distribution is calculated along the laser line extension direction, and the Sobel operator is used to detect the horizontal and vertical gradient components.
[0027] Identify boundary locations where gradient value abrupt changes exceed a set proportion, the set proportion being dynamically adjusted based on the overall image contrast;
[0028] The region between adjacent mutation boundaries is divided into independent processing units, and the unit size is linearly related to the reciprocal of the local signal-to-noise ratio.
[0029] An anti-saturation treatment unit is added to the high reflectivity region, the anti-saturation treatment including:
[0030] Detect whether the pixel grayscale value has reached the sensor saturation threshold;
[0031] For the saturated region, a piecewise linear transformation is used to compress the dynamic range, and the compression slope is adaptively adjusted according to the local light intensity distribution.
[0032] Preferably, the optical distortion correction in step 2 includes:
[0033] The pre-stored multi-distance layer distortion coefficient table is invoked, and the table is constructed as follows:
[0034] During the calibration phase, standard grid plates are placed at fixed intervals along the optical axis.
[0035] Collect mesh distortion images at each distance layer and calculate the radial and tangential distortion coefficients;
[0036] Select the reference coefficient group for the two adjacent layers based on the current working distance;
[0037] Bilinear interpolation compensation is performed on the reference coefficient set based on real-time temperature sensor data, and the interpolation weights are dynamically adjusted according to the temperature change rate.
[0038] During reverse mapping, the thermal focal length drift caused by laser power adjustment is compensated synchronously. The compensation method includes:
[0039] The equivalent focal length change is calculated based on the relationship between the change in laser power and the coefficient of thermal expansion.
[0040] The focal length change is converted into a pixel offset and superimposed on the distortion correction matrix.
[0041] Preferably, the method for constructing curvature constraints in step 3 includes:
[0042] The principal curvature directions are calculated within the neighborhood of the feature point. The specific steps are as follows:
[0043] a. Select an N×N pixel region centered on the feature point;
[0044] b. Fit the local quadratic surface equation using the least squares method;
[0045] c. Obtain the principal curvature directions by taking partial derivatives of the surface equation;
[0046] Constraint weights are assigned based on the correlation between the radius of curvature and historical calibration errors. This correlation is established in the following way:
[0047] a. Extract error distribution data for different curvature regions from the calibration history database;
[0048] b. Use polynomial regression to fit the relationship curve between the radius of curvature and the average error.
[0049] Preferably, the local resampling mechanism includes:
[0050] To increase the laser scanning line density in the conflict area, the specific method is as follows:
[0051] a. Control the galvanometer system to perform supplementary scanning in steps of 1 / 2 of the original scanning angle;
[0052] b. Apply a time-interleaved triggering strategy to the newly added scan lines to avoid interference with the original signal;
[0053] Perform curvature consistency verification on newly added feature points, including:
[0054] a. Calculate the projection distance between the newly added point and the original point cloud along the normal vector direction;
[0055] b. If the distance exceeds 3 times the standard deviation, it is marked as an outlier;
[0056] The coordinate transformation matrix is recalculated using a robust estimation method, specifically including:
[0057] a. Use the Random Sampling Consensus (RANSAC) algorithm to filter the set of interior points;
[0058] b. Construct a weighted least squares objective function based on the set of interior points, where the weights are inversely proportional to the projection error.
[0059] Preferably, the method for establishing the wavelength drift compensation model in step 4 includes:
[0060] By analyzing the spectral peak shift of the light spot image, the real-time change value of the laser wavelength is deduced. The specific steps are as follows:
[0061] a. Perform a one-dimensional Fourier transform on the spot image along the laser line direction;
[0062] b. Detect the position of the main peak of the spectrum and calculate its pixel offset from the calibration reference position;
[0063] c. Based on the magnification and imaging resolution of the optical system, convert the pixel offset into a wavelength change.
[0064] A quadratic response surface model with temperature-wavelength drift is constructed, and the model coefficients are updated using the following method:
[0065] a. Collect a set of temperature-wavelength data pairs at set time intervals;
[0066] b. Update the quadratic term coefficients using the recursive least squares method, while retaining the exponentially decaying weights of historical data;
[0067] The compensated equivalent wavelength parameters are fed back to the distortion correction algorithm, and the correction methods include:
[0068] a. Recalculate the chromatic aberration coefficient of the optical system based on the wavelength change;
[0069] b. Embed the chromatic aberration coefficients into the tangential distortion component of the inverse mapping matrix.
[0070] Preferably, the method for generating the reflectance weight mapping table includes:
[0071] The specific steps for analyzing the gray-level distribution histogram of the laser spot image and calculating the relative reflectance of each region are as follows:
[0072] a. Divide the image into M×M sub-regions;
[0073] b. Calculate the ratio of the average gray level of each sub-region to the average gray level of the entire image as the relative reflectance value;
[0074] The weight adjustment gradient is determined based on the correlation curve between the relative reflectance value and the calibration accuracy. The correlation curve is calibrated in the following way:
[0075] a. Perform calibration experiments using standard samples with known reflectance;
[0076] b. Record the feature point positioning error data under different reflectivities;
[0077] c. Fit the negative correlation curve between reflectance and error;
[0078] Two-stage compensation is applied to low reflectivity regions:
[0079] a. In the first stage, increase the laser power according to the proportion of reflectivity loss;
[0080] b. In the second stage, the local contrast enhancement is increased during image processing, and the enhancement magnitude is proportional to the power increase.
[0081] Preferably, it also includes abnormal operating condition handling:
[0082] When the splicing residual in step 3 continuously exceeds the limit, perform the following operation:
[0083] By tracing back the intermediate parameters from steps 1 to 4, an error propagation path tree is constructed. The construction method includes:
[0084] Apply small perturbations to the key parameters of each step;
[0085] Calculate the impact factor of the disturbance on the final residual and generate the sensitivity matrix;
[0086] Based on the contribution of the path tree nodes, prioritize adjusting the parameters of the links with the highest contribution. The adjustment strategies include:
[0087] If the contribution of ambient light interference exceeds 50%, the compensation coefficient in step 1 will be recalculated.
[0088] If the distortion correction contribution exceeds the threshold, then update the distortion coefficient table in step 2;
[0089] For components suspected of hardware failure, initiate redundant equipment switching. Switching methods include:
[0090] Parallel connection between the backup laser and the camera channel;
[0091] When the main channel fails to calibrate three times in a row, it will seamlessly switch to the backup channel and reset the calibration process.
[0092] Preferably, the method for constructing the error propagation path tree includes:
[0093] Establish the sensitivity matrix of the parameters for each step, and calculate the influence factor of parameter perturbation on the final residual. The specific steps are as follows:
[0094] Apply small perturbations to each parameter while keeping other parameters constant;
[0095] Calculate the rate of change of the residuals before and after the disturbance, and use it as an influencing factor for this parameter;
[0096] A directed graph model is used to describe the coupling relationships between parameters, including:
[0097] The parameters are treated as nodes, and the physical relationships between the parameters are treated as directed edges;
[0098] Each edge is assigned a weight, which is the product of the two influencing factors.
[0099] Identifying critical paths using an improved Dijkstra algorithm, the improvements including:
[0100] The path weight is defined as the sum of the influence factors of each node;
[0101] A path is marked as a critical path when its weight exceeds three times the average weight of all paths.
[0102] Implement locking protection for parameters on the critical path and prohibit automatic adjustment to avoid system oscillation.
[0103] The beneficial effects of this invention are:
[0104] This invention combines precise ambient light compensation, distortion correction, and error optimization mechanisms, enabling the calibration system to adapt to different working conditions and environmental changes. Dynamic closed-loop compensation ensures system stability, reduces interference from external factors, and allows optical calibration to achieve higher accuracy and reliability. Furthermore, the abnormal operating condition handling mechanism allows the system to recover quickly when problems occur, avoiding prolonged downtime or calibration failures, thereby improving the overall fault tolerance and reliability of the system. Attached Figure Description
[0105] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0106] Figure 1 This is a flowchart of the steps of the method of the present invention;
[0107] Figure 2 This is a flowchart illustrating the steps of the table construction method in the present invention.
[0108] Figure 3 This is a flowchart illustrating the steps of calculating the principal curvature direction within the neighborhood of a feature point in the method of this invention. Detailed Implementation
[0109] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should also be noted that, to make the embodiments more comprehensive, the following embodiments are the best and preferred embodiments, and those skilled in the art can use other alternative methods to implement some well-known technologies; moreover, the accompanying drawings are only for more specific description of the embodiments and are not intended to specifically limit the present invention.
[0110] Please see Figures 1-3This invention provides an optical detection and calibration method based on laser crosshair calibration. Step 1 aims to acquire real-time spectral distribution data of ambient light using a multispectral sensor array, thereby identifying interference bands that overlap with the laser wavelength. After detecting these interference bands, the laser power compensation coefficient is dynamically calculated, and the laser power output is adjusted to eliminate interference from ambient light on the laser signal. This process is crucial for subsequent steps, as stable laser power is fundamental to ensuring accurate measurement and subsequent image processing results.
[0111] In step 1, the laser power has been adjusted according to the ambient light to ensure a stable projection signal. Step 2 involves acquiring the adjusted laser projection image, dynamically dividing the processing area based on local image contrast, and using adaptive thresholding and sub-pixel edge detection to extract the intersection coordinates of the crosshairs. The extraction of these feature points needs to be precise, and optical distortion correction is used to eliminate distortions caused by optical components such as lenses in the system.
[0112] In step 2, the feature points have undergone optical distortion correction, resulting in accurate coordinates. Next, in step 3, these corrected coordinates are input into a splicing optimization model along with the mechanical motion parameters of the rotary shaft encoder. This model constructs a coordinate transformation matrix with curvature constraints, and iterative optimization yields a 3D calibration point cloud. This process aims to correct errors from multiple perspectives, thereby achieving higher-precision calibration.
[0113] Finally, based on the splicing residual data obtained in step 3, and the real-time acquired ambient temperature and surface reflectivity parameters, a wavelength drift compensation model and a reflectivity weight mapping table were established in step 4. This compensation model can dynamically correct the laser power compensation coefficient and optical distortion correction parameters to cope with calibration errors caused by factors such as temperature fluctuations and reflectivity changes. This step ensures that the system can maintain high-precision calibration even during long-term operation.
[0114] In one possible implementation, in step 1, ambient light spectral distribution data is first acquired in real time using a multispectral sensor array. This data includes information from different wavelengths, from ultraviolet to infrared. Next, using a spectral separation algorithm, the portion of the data overlapping with the red laser wavelength range is extracted as a first interference sub-band, and the portion overlapping with the blue laser wavelength range is extracted as a second interference sub-band. This process accurately identifies the interference portions in the ambient light that overlap with laser wavelengths, providing a basis for subsequent interference energy calculations.
[0115] For each interfering sub-band, energy integration is performed to obtain the energy value of each sub-band. Then, based on a preset wavelength sensitivity coefficient, these energy values are weighted and summed to obtain the total energy proportion of each interfering band. The key to this step is the selection of the sensitivity coefficient, which represents the degree of interference of the light band to the laser reflection signal under different material and environmental conditions. By weighted summing, the final energy proportion of the interfering band can be obtained, thereby accurately determining the degree of interference from ambient light.
[0116] Determining the wavelength sensitivity coefficient is the core of this calculation method. First, in a standard anechoic chamber environment, the interference rate of ambient light on the laser reflection signal at each wavelength is measured using samples of different materials (such as metal, glass, and plastic). This experimental data is used to establish a database mapping the relationship between material type and sensitivity coefficient. Based on the material type of the workpiece to be inspected, the system retrieves the corresponding sensitivity coefficient from the database to achieve accurate compensation for different materials.
[0117] The implementation of this method first requires band separation and sensitivity coefficient measurement in a laboratory environment. Measurement data from samples of different materials are experimentally analyzed to establish a complete mapping database. This database provides material-sensitivity coefficient mapping support for real-time on-site detection. In practical applications, when detecting a workpiece, the system automatically selects an appropriate sensitivity coefficient based on its material type, thereby adjusting the laser power compensation coefficient to ensure the accuracy of the laser signal.
[0118] In one possible implementation, the pixel gray-level gradient distribution of the image is first calculated along the direction of the laser line. Then, the horizontal and vertical gradient components in the image are calculated separately using the Sobel operator. The Sobel operator can efficiently detect regions in the image with drastic changes in gray-level values, thereby identifying possible boundary locations. Abrupt changes in gradient values typically indicate significant structural changes in the image, or the boundary between the target and the background.
[0119] By setting a threshold ratio, the system identifies boundary locations where grayscale gradient values abruptly change. This ratio is dynamically adjusted based on the overall image contrast, ensuring accurate identification of important structures and object boundaries under varying lighting and reflection conditions. This dynamic adjustment mechanism allows the system to adapt to changes in environmental conditions, avoiding inaccurate boundary detection caused by excessively low or high contrast.
[0120] After identifying the boundaries, the regions between adjacent abrupt boundary changes are divided into independent processing units. The size of each processing unit is linearly related to the inverse of the local signal-to-noise ratio (SNR). This means that in regions with low SNR, smaller processing units are used to process the detailed information of low-signal areas more accurately; while in regions with high SNR, larger processing units are used to improve processing efficiency.
[0121] During processing, special attention needs to be paid to whether the pixel grayscale value in high-reflectivity areas reaches the sensor's saturation threshold. To avoid information loss due to saturation, the system adds an anti-saturation processing unit to these areas. This processing determines whether the sensor's saturation threshold has been reached by detecting the grayscale value of the image pixels. For saturated areas, a piecewise linear transform is used to compress the dynamic range, compressing the grayscale value to within the sensor's processing range. The compression slope is adaptively adjusted according to the local light intensity distribution to ensure that the compressed image still retains sufficient detail.
[0122] In practical applications, the gray-level gradient distribution of the image is first calculated using the Sobel operator to identify the boundary locations within the image. Based on a set dynamic adjustment ratio, the boundaries of the processing area are determined, and the size of the area is adjusted according to the signal-to-noise ratio. For high-reflectivity areas, the sensor's saturation state is detected, and dynamic range compression is performed to avoid image overexposure and distortion. In terms of system hardware, the sensor needs to support high resolution and a wide dynamic range to ensure the preservation of image details and effective processing of high-reflectivity areas.
[0123] In one possible implementation, during the calibration phase, to establish an accurate optical distortion model, standard grid plates are first placed at fixed intervals along the optical axis. This method allows for the acquisition of grid distortion images at different distances (i.e., different distances from the sensor). These images reflect the optical distortion at different distances, primarily including radial and tangential distortion.
[0124] For the acquired grid images at different distance layers, the radial and tangential distortion coefficients of each layer are calculated. These distortion coefficients reflect the geometric distortion of the image caused by the non-ideals of the optical system. In this way, distortion characteristics at different working distances can be obtained.
[0125] Based on the current working distance, select two closest reference coefficient groups from the multi-distance layer distortion coefficient table. The reference coefficients represent the variation of distortion characteristics with distance at different working distances.
[0126] In practical applications, temperature variations affect the physical properties of optical components, thus influencing the distortion coefficient. Therefore, bilinear interpolation compensation is performed on a selected set of reference coefficients using real-time temperature sensor data. The dynamic adjustment of the interpolation weights is based on the rate of temperature change, ensuring that distortion correction can adapt to variations in ambient temperature.
[0127] Besides temperature effects, adjustments to laser power can also cause thermal focal length drift, which affects image geometry. To correct this, the change in focal length is first calculated based on the relationship between the change in laser power and the coefficient of thermal expansion. Then, the focal length change is converted into a pixel offset and added to the distortion correction matrix. This simultaneously compensates for the thermal focal length drift caused by laser power variations, ensuring image accuracy.
[0128] In practical applications, the calibration phase first involves acquiring images at multiple distance layers to obtain distortion coefficients at different working distances. Standard grid plates are placed at fixed intervals to ensure that the acquired images cover different distance layers, and detailed distortion coefficient calculations are performed. During real-time operation, changes in sensor temperature data and laser power are monitored in real time, and bilinear interpolation compensation and focal drift compensation algorithms are applied to ensure accurate distortion correction results for each image acquisition.
[0129] In one possible implementation, when performing local curvature analysis, an N×N pixel region centered on the feature point is first selected. The purpose of this step is to obtain pixel information around the feature point as the basis for subsequent fitting of the local surface equation. The selection of this region needs to ensure that it contains sufficient neighborhood information to avoid errors in curvature calculation due to excessively sparse local information.
[0130] Within the neighborhood of the feature points, a local quadratic surface equation is fitted using the least squares method. The least squares method effectively fits the image data within this region, yielding an approximate quadratic surface model. This surface model describes the morphology of the local region and can be used for subsequent curvature calculations.
[0131] By taking the partial derivatives of the equation of the local quadratic surface, the principal curvature directions are obtained. Curvature is an important parameter for measuring changes in surface shape, and the principal curvature directions reveal the directions in which the surface changes most significantly within the neighborhood of feature points. Calculating the principal curvature directions allows for a more accurate understanding of the geometric characteristics of image distortion, enabling distortion correction based on these characteristics.
[0132] To further optimize the calibration process, it is necessary to analyze the relationship between the radius of curvature and historical calibration errors. First, error distribution data for different curvature regions are extracted from the historical calibration database. This error data reflects the error performance of the calibration process under different curvature regions. Then, a polynomial regression is used to fit the relationship curve between the radius of curvature and the average error. This curve reveals the variation pattern of error under different curvature conditions.
[0133] Constraint weights are assigned based on the correlation between the radius of curvature and historical calibration errors. Specifically, regions with smaller radii of curvature may produce larger distortion errors, thus requiring higher constraint weights, while regions with larger radii of curvature are relatively stable with smaller errors, and therefore can have relatively lower constraint weights. This results in stronger constraints on high-error regions during calibration, ensuring the accuracy of the final calibration.
[0134] In one possible implementation, during calibration, certain areas may experience data sparsity due to scanning angle or equipment limitations, especially in conflict areas (i.e., areas with significant image distortion or weak features). To improve data quality and calibration accuracy in these areas, the density of laser scan lines needs to be increased. Specifically, the galvanometer system is controlled to perform supplementary scans at half the original scanning angle step size. This increases the scan line density, effectively reducing data loss and providing more refined local feature information.
[0135] Newly added scan lines need to be distinguished from the original scan signal to avoid interference due to signal overlap or time synchronization issues. To achieve this, a time-interleaved triggering strategy is adopted, that is, the new scan lines are triggered at different times than the original signal. This ensures that the original scan signal and the new scan signal do not conflict, maintaining the accuracy and consistency of the data.
[0136] After adding laser scan lines and acquiring new feature points, the curvature consistency of these new feature points needs to be checked. This check aims to ensure that the newly added feature points conform to the geometric characteristics of the local region, thus avoiding unexpected errors. Specifically, the projected distance between the new point and the original point cloud along the normal vector direction is calculated. If the projected distance between the new feature point and the original point cloud along the normal vector direction exceeds three times the standard deviation, the point is considered an outlier and is marked. This step helps to eliminate outliers introduced by noise or instability, thereby improving the reliability of the final calibration results.
[0137] To ensure data consistency during calibration, the coordinate transformation matrix needs to be recalculated. At this point, a robust estimation method is used to optimize the new data. Specifically, the Random Sample Consensus (RANSAC) algorithm is used to filter the set of interior points. RANSAC can identify and exclude outliers in the data, thus fitting the coordinate transformation matrix more accurately. Next, based on the set of interior points, a weighted least squares objective function is constructed, where the weight of each data point is inversely proportional to its projection error. This way, points with smaller projection errors receive larger weights, ensuring that these points have a greater impact on the final transformation matrix, thereby improving the overall calibration accuracy.
[0138] In one possible implementation, firstly, in step 4, a one-dimensional Fourier transform is performed on the laser spot image after laser scanning along the laser line direction to extract the spectral information of the image.
[0139] Next, by detecting the position of the main peak of the spectrum and calculating its pixel offset from the calibration reference position, the changing trend of the main peak of the spectrum is obtained.
[0140] By utilizing the imaging parameters of the optical system (such as magnification and imaging resolution), this pixel offset is converted into an actual change in the laser wavelength. This conversion provides the basis for real-time sensing of wavelength drift.
[0141] To model the wavelength drift of a laser caused by temperature, a set of data pairs of temperature and wavelength changes were collected at regular intervals.
[0142] The coefficients of the quadratic response model are updated in real time using the recursive least squares method. An exponentially decaying weight is introduced during the update process to reduce the impact of outdated data, thereby enabling online adaptive correction of the model.
[0143] This model can predict the wavelength drift trend under different temperature conditions, forming a prediction mechanism for real-time compensation.
[0144] Based on the calculated wavelength change, the chromatic aberration in the optical system is corrected, especially the axial and lateral chromatic aberration caused by the wavelength change.
[0145] The corrected chromatic aberration coefficients are embedded into the tangential distortion term in the inverse mapping matrix, which is the key part of the correction algorithm used for image restoration, to achieve dynamic compensation for image distortion.
[0146] In one possible implementation, the image is first divided into M×M sub-regions. This division allows for local analysis of the spot image, yielding more refined reflectivity information.
[0147] For each sub-region, the mean gray level of that region is calculated and then compared with the mean gray level of the entire image to obtain the relative reflectance value of that region. The relative reflectance value reflects the reflectivity of that region and provides basic data for subsequent calibration.
[0148] A series of calibration experiments were conducted using standard samples with known reflectivity. This process recorded the feature point positioning error data of the laser scanning system under different reflectivity conditions.
[0149] By fitting the reflectivity and positioning error data, a negative correlation curve between reflectivity and error was obtained. This curve indicates that when reflectivity is low, the positioning error is usually large, thus requiring appropriate compensation.
[0150] Based on the reflectance-error curve, the relationship between reflectance and calibration accuracy is determined, and a weight adjustment gradient is derived. This gradient provides a theoretical basis for subsequent compensation steps, enabling precise adjustment of the weights in low-reflectance regions to compensate for errors caused by insufficient reflectance.
[0151] For low reflectivity regions, a two-stage compensation strategy is adopted:
[0152] The first stage involves increasing the laser power to enhance the laser reflection signal in low reflectivity areas. This step effectively increases the brightness of the laser spot in low reflectivity areas, reducing signal weakening caused by insufficient reflection.
[0153] The second stage involves enhancing local contrast during image processing to further improve image quality in low-reflectivity areas. The enhancement is proportional to the increase in laser power, ensuring consistency and accuracy in compensation.
[0154] In one possible implementation, when the splicing residual continuously exceeds a set threshold during the calibration process, the system considers this an abnormal operating condition, requiring in-depth analysis and processing. This situation may be caused by environmental interference, equipment failure, or improper parameter settings; timely detection and handling of splicing residual abnormalities are crucial.
[0155] To analyze the reasons for the abnormal splicing defects, it is first necessary to trace back the intermediate parameters from steps 1 to 4. By tracing back, we can identify which steps may have had a significant impact on the final result, and thus determine the error propagation path.
[0156] In this process, it is necessary to apply small perturbations to the key parameters of each step and observe the impact of these perturbations on the final splicing residual. By calculating the impact of the perturbations, a sensitivity matrix is obtained, which can help analyze the degree of error contribution of each step.
[0157] Based on the sensitivity matrix, an error propagation path tree is constructed. In the path tree, each node represents a link, and the contribution of a node indicates the degree of influence of that link on the splicing residual.
[0158] The parameters of each node are sorted according to their contribution, and the parameters of the nodes that contribute the most to the splicing residual are adjusted first to reduce the residual most effectively. Common influencing factors include ambient light and distortion correction.
[0159] If the contribution of ambient light interference in the path tree exceeds 50%, the system will trigger the recalculation of the compensation coefficient in step 1 to eliminate the impact of ambient light on measurement accuracy.
[0160] If the contribution of the distortion correction step exceeds a certain threshold, the distortion coefficient table update in step 2 is triggered to correct the distortion error and thus improve the calibration accuracy.
[0161] If path tree analysis reveals a potential hardware failure (such as a laser or camera malfunction), the system will activate redundant equipment for switching.
[0162] The system has pre-set backup laser and backup camera channels. In the event of three consecutive calibration failures on the main channel, it automatically and seamlessly switches to the backup channel and restarts the calibration process. This mechanism ensures that the system can continue to operate in the event of equipment failure, avoiding prolonged downtime or data loss.
[0163] Specifically, through software simulation, small perturbations are applied to each key parameter (e.g., fine-tuning laser power, adjusting camera exposure time, etc.), and then the impact of these perturbations on the stitching residuals is calculated. By calculating the sensitivity matrix, it is possible to clearly determine which aspects have a significant impact on the error.
[0164] Using the results of the sensitivity matrix, an error propagation path tree is constructed. The steps are then ranked according to their contribution to the final error to determine the priority of adjustments, ensuring that the most critical steps are optimized first.
[0165] To ensure system stability, the system will automatically switch to backup equipment if the main channel fails three times consecutively. The switching process requires no manual intervention, ensuring the continuity of calibration work.
[0166] In one possible implementation, a small perturbation is first applied to each key parameter while keeping other parameters constant. The perturbation typically refers to a small adjustment to a parameter value, such as changing the laser power or adjusting the camera exposure time, to ensure the relative stability of the experimental conditions.
[0167] By calculating the rate of change of the residuals before and after the disturbance, the influence factor of this parameter on the final residuals is obtained. The influence factor is a measure of the degree of influence of a parameter on the system output, which can provide necessary data support for subsequent path tree construction.
[0168] By treating all key parameters in the steps as nodes in a graph and determining the coupling relationships between these parameters based on physical principles or experimental conditions, a directed graph model is constructed. In this model, the associations between parameter nodes are represented by directed edges, and the direction of the edges reflects the influence of one parameter on another.
[0169] The weight of each edge is determined by the product of the influence factors of the parameters at both ends. The weight of an edge represents the combined influence of one parameter on another; the larger the weight, the tighter the coupling and the greater the influence.
[0170] The improved Dijkstra algorithm defines path weights as the sum of the influence factors of each node on the path. Unlike traditional shortest path algorithms, this weight definition method emphasizes the impact of each node in the path on the final residual, thereby helping the system better identify which paths play a key role in error propagation.
[0171] During algorithm execution, a path is marked as a critical path when its weight exceeds three times the average weight of all paths. This means that the path has a particularly large impact on error propagation and must be given more attention.
[0172] For parameters identified on the critical path, the system will implement lockout protection. This means that these critical parameters cannot be automatically adjusted to avoid changes that could cause system oscillations or instability. By locking the parameters on the critical path, the system can remain stable during complex calibration processes, preventing unnecessary adjustments from causing overreactions.
[0173] Specifically, through experiments or numerical simulations, small perturbations are applied to each parameter (such as laser intensity, camera focal length, etc.), and the changes in the stitching residuals before and after the perturbations are monitored. A sensitivity matrix is calculated using this data, where the influence factor of each parameter on the residuals provides a measure of the parameter's importance. These influence factors are then used as weights input into the subsequent directed graphical model.
[0174] In the graph model, each parameter corresponds to a node. The coupling relationships between parameters can be established through physical analysis (such as the effect of laser power on camera exposure). The weight of each edge is determined by calculating the product of the influence factors between nodes, ensuring that parameters with higher influence have greater weight in their impact on other parameters.
[0175] When implementing Dijkstra's algorithm, the path weights take into account the combined effect of all parameters on the path. When a path weight significantly exceeds the average of the entire path, the path is marked as a critical path, and protection is applied to the nodes on that path to prevent instability caused by automatic adjustments.
[0176] The method for constructing the error propagation path tree significantly improves the calibration accuracy, stability, and automation level of the optical detection system through optimization of multiple aspects, including sensitivity matrix, coupling relationship modeling, Dijkstra algorithm optimization, and locking protection mechanism. It effectively avoids unnecessary error propagation and system oscillation, ensuring the efficiency and accuracy of the calibration process.
[0177] This invention encompasses any substitutions, modifications, equivalent methods, and solutions made within the spirit and scope of this invention. To provide the public with a thorough understanding of this invention, specific details are described in detail in the following preferred embodiments; however, those skilled in the art will fully understand the invention even without these details. Furthermore, to avoid unnecessary misunderstanding of the essence of this invention, well-known methods, processes, procedures, components, and circuits are not described in detail.
[0178] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An optical detection calibration method based on laser cross-hair calibration method, characterized in that, The method comprises the following steps: Step 1: dynamic ambient light suppression and laser parameter adjustment: Real-time acquisition of spectral distribution data of ambient light through a multispectral sensor array, dynamic calculation of laser power compensation coefficient based on the energy proportion of the interference waveband overlapping with the laser wavelength in the spectral distribution data, and control of the double-wavelength laser to project a cross calibration line; Step 2: anti-distortion feature point extraction: Receiving the adjusted laser power parameter in step 1, collecting the laser projection image, dynamically dividing the processing area according to the local image contrast, performing adaptive threshold segmentation and sub-pixel level edge detection in the processing area, extracting the cross point coordinates of the cross line and performing optical distortion correction; Step 3: multi-view error collaborative optimization: Inputting the corrected coordinates output by step 2 and the mechanical motion parameters of the rotary shaft encoder into a stitching optimization model, constructing a coordinate transformation matrix with curvature constraint, and obtaining a three-dimensional calibration point cloud in a global coordinate system through iterative optimization; Step 4: dynamic closed-loop compensation: Based on the stitching residual data of step 3 and the real-time collected environmental temperature and surface reflectivity parameters, a wavelength drift compensation model and a reflectivity weight mapping table are established to dynamically correct the laser power compensation coefficient of step 1 and the distortion correction parameter of step 2; The calculation method of the energy proportion of the interference waveband in step 1 comprises: Band separation is performed on the multispectral data to extract a first interference sub-band overlapping with the red laser wavelength range and a second interference sub-band overlapping with the blue laser wavelength range; The energy integral values of each sub-band are calculated, and weighted summation is performed according to the preset wavelength sensitivity coefficient; The wavelength sensitivity coefficient is determined by the following method: In a standard darkroom environment, different material samples are used to measure the interference rate of each waveband ambient light on the laser reflection signal; A mapping relationship database of material type and sensitivity coefficient is established; According to the material type of the current detected workpiece, the corresponding sensitivity coefficient is called.
2. The optical detection calibration method based on laser cross calibration method according to claim 1, characterized in that, The method for dynamically dividing the processing area in step 2 comprises: The pixel gray gradient distribution is calculated along the laser line extension direction, and the Sobel operator is used to detect the horizontal and vertical gradient components; The boundary positions where the gradient value suddenly changes by more than a set proportion are identified, and the set proportion is dynamically adjusted according to the overall contrast of the image; The area between adjacent sudden boundaries is divided into independent processing units, and the unit size is linearly related to the inverse of the local signal-to-noise ratio; An anti-saturation processing unit is added to the high reflectivity area, and the anti-saturation processing comprises: Detecting whether the pixel gray value reaches the sensor saturation threshold; Segmented linear transformation is used to compress the dynamic range of the saturated area, and the compression slope is adaptively adjusted according to the local light intensity distribution.
3. The optical detection calibration method based on laser cross calibration method according to claim 1, characterized in that, The optical distortion correction in step 2 comprises: A pre-stored multi-distance layer distortion coefficient table is called, and the construction method of the multi-distance layer distortion coefficient table is as follows: In the calibration stage, a standard grid plate is placed at a fixed interval along the optical axis; Grid distortion images of each distance layer are collected, and radial and tangential distortion coefficients are calculated; The adjacent two layers of reference coefficient tables are selected according to the current working distance; The reference coefficient table is bilinearly interpolated and compensated based on real-time temperature sensor data, and the interpolation weight is dynamically adjusted according to the temperature change rate; When performing reverse mapping, the thermal focal length drift caused by laser power adjustment is compensated by a method comprising: According to the relationship between the amount of change in laser power and the thermal expansion coefficient, the amount of change in equivalent focal length is calculated; The amount of change in focal length is converted into pixel offset and superimposed on the distortion correction matrix.
4. The optical detection calibration method based on laser cross calibration method according to claim 1, characterized in that, The construction method of curvature constraint in step 3 includes: The principal curvature direction is calculated in the neighborhood of the feature point, and the specific steps are: a. Select a N×N pixel area centered on the feature point; b. Fit the local quadratic surface equation by least squares method; c. Obtain the principal curvature direction by taking the partial derivative of the surface equation; According to the correlation between the curvature radius and the historical calibration error, the constraint weight is allocated, and the correlation is established by the following method: a. Extract the error distribution data of different curvature regions from the calibration history database; b. Use polynomial regression to fit the relationship curve between the curvature radius and the average error.
5. The optical detection calibration method based on laser cross calibration method according to claim 4, characterized in that, The local resampling mechanism includes: Increase the density of laser scanning lines in the conflict area, and the specific method is: a. Control the galvanometer system to perform supplementary scanning with a step size of 1 / 2 of the original scanning angle; b. Apply a time staggered triggering strategy to the newly added scanning lines to avoid interference with the original signal; The newly added feature points are checked for curvature consistency, including: a. Calculate the projection distance of the newly added points and the original point cloud in the normal vector direction; b. If the distance exceeds 3 times the standard deviation range, mark it as an abnormal point; Use robust estimation method to recalculate the coordinate transformation matrix, including: a. Use the random sample consensus (RANSAC) algorithm to filter the inlier set; b. Based on the inlier set, construct a weighted least squares objective function, and the weight is inversely proportional to the projection error.
6. The optical detection calibration method based on laser cross calibration method according to claim 1, characterized in that, The establishment method of wavelength shift compensation model in step 4 includes: By analyzing the spectral main peak shift of the light spot image, the real-time change value of the laser wavelength is back calculated, and the specific steps are: a. Perform one-dimensional Fourier transform on the light spot image along the laser line direction; b. Detect the position of the spectral main peak and calculate the pixel offset from the calibration reference position; c. According to the magnification of the optical system and the imaging resolution, convert the pixel offset into the wavelength change; Construct a quadratic response surface model of temperature-wavelength shift, and the model coefficient updating method is: a. Collect a set of temperature-wavelength data pairs every interval; b. Update the quadratic term coefficients using the recursive least squares method, and retain the exponential decay weight of historical data; The compensated equivalent wavelength parameter is fed back to the distortion correction algorithm, and the correction method includes: a. Recalculate the chromatic aberration coefficient of the optical system according to the wavelength change; b. Embed the chromatic aberration coefficient into the tangential distortion component of the reverse mapping matrix.
7. The optical detection calibration method based on laser cross calibration method according to claim 1, characterized in that, The generation method of the reflectivity weight mapping table includes: Statistical gray level distribution histogram of laser light spot image, calculate the reflectivity relative value of each region, the specific steps are: a. Divide the image into M×M sub-regions; b. Calculate the ratio of the average gray value of each sub-region to the average gray value of the whole image as the reflectivity relative value; According to the correlation curve between the reflectivity relative value and the calibration accuracy, the weight adjustment gradient is determined, and the correlation curve is calibrated by the following method: a. Use standard samples with known reflectivity to perform calibration experiments; b. Record feature point positioning error data under different reflectivity; c. Fit the negative correlation curve of reflectivity-error; Implement two-stage compensation for low reflectivity areas: a. The first stage increases the laser power according to the missing proportion of reflectivity; b. The second stage increases the local contrast enhancement amplitude during image processing, and the enhancement amplitude is proportional to the power increase.
8. The optical detection calibration method based on laser cross calibration method according to claim 1, characterized in that, Also includes abnormal working condition processing: When the splicing residual error of step 3 continuously exceeds the limit, perform the following operations: Backtrack the intermediate parameters of steps 1 to 4, construct an error propagation path tree, and the construction method includes: Apply a small perturbation to the key parameters of each step; Calculate the influence factor of the final residual error on the perturbation, and generate a sensitivity matrix; According to the contribution degree of the path tree node, the parameters of the highest contribution degree are adjusted first, and the adjustment strategy includes: If the contribution degree of ambient light interference exceeds 50%, trigger the compensation coefficient recalculation of step 1; If the distortion correction contribution degree exceeds the threshold, update the distortion coefficient table of step 2; For suspected hardware failure links, start redundant device switching, and the switching method includes: Parallelly connect the backup laser and the camera channel; When the main channel fails three times in a row, seamlessly switch to the backup channel and reset the calibration process.
9. The optical detection calibration method based on laser cross calibration method according to claim 8, characterized in that, The construction method of the error propagation path tree includes: Establish the sensitivity matrix of each step parameter, calculate the influence factor of parameter perturbation on the final residual error, and the specific steps are: Apply a small perturbation to each parameter, keeping other parameters unchanged; Calculate the residual error change rate before and after the perturbation as the influence factor of the parameter; Use a directed graph model to describe the coupling relationship between parameters, including: Take the parameter as the node, and the physical relationship between the parameters as the directed edge; Assign a weight to each edge, and the weight value is the product of the influence factors of the two parameters; Identify the critical path through the improved Dijkstra algorithm, which includes: Define the path weight as the sum of the influence factors of each node; When the path weight exceeds 3 times the average value of the whole path, it is marked as a critical path; Lock protection is implemented on the parameters on the critical path to prevent automatic adjustment to avoid system oscillation.
Citation Information
Patent Citations
Three-dimensional measurement method, system and device resistant to strong ambient light interference and storage medium
CN115187649A
Wavelength power calibration method and device for wavelength tunable light source
CN119812915A