Optical detection calibration method based on laser cross calibration method
Through the optical detection and calibration method of laser cross calibration method, the ambient light interference and optical distortion problems in the detection of complex surface workpieces are solved, high-precision three-dimensional calibration and splicing optimization are achieved, and the accuracy and stability of complex surface detection are improved.
Patent Information
- Application Number
- CN202510647397.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-05-20
AI Technical Summary
The existing laser calibration technology has problems such as ambient light interference, spot superposition, optical distortion and mechanical error coupling in the detection of complex surface workpieces, resulting in large positioning errors and splicing errors, affecting the accuracy and efficiency of precision detection.
The optical detection and calibration method based on laser cross calibration method is adopted, and ambient light data is collected in real time through a multi-spectral sensor array, laser power is dynamically adjusted, and a curvature-constrained coordinate transformation matrix is constructed, and a dynamic closed-loop compensation model is established to optimize multi-view angle splicing and temperature compensation.
It improves the accuracy and reliability of optical detection, reduces interference from environmental factors, ensures the system to operate stably in a dynamic environment, and improves the accuracy and efficiency of complex surface detection.
Smart Images

Figure CN120558128A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical detection and calibration, and in particular to an optical detection and calibration method based on a laser cross calibration method. Background Art
[0002] In precision manufacturing, the 3D topography detection of complex curved workpieces (such as aircraft engine blades and automotive panels) places stringent demands on optical calibration technology. Existing laser calibration technology has the following technical bottlenecks that need to be addressed in practical applications:
[0003] The traditional single-wavelength laser calibration method uses a fixed power output mode. In the multi-spectral mixed lighting environment of the workshop, it is impossible to effectively distinguish the laser signal from the ambient interference light. Especially when there are high-reflection areas on the workpiece surface, the secondary reflection of the ambient light on the metal surface will be superimposed on the laser spot, resulting in a deviation in the position of the feature point extraction (measured data shows that when the illumination fluctuates by ±20%, the positioning error can reach ±15μm). Although existing technologies have attempted to add filters, the fixed setting of the filter bandwidth does not match the dynamic ambient light spectrum, which will excessively attenuate the effective signal when detecting dark light-absorbing materials.
[0004] In addition, the mainstream calibration method uses a fixed threshold segmentation algorithm, which is prone to the following problems in areas with sudden changes in curvature:
[0005] When projecting line laser light onto a steep surface, the spot deforms, and a fixed threshold makes it difficult to accurately identify the center line.
[0006] When stitching multiple views, the local coordinate system transformation depends on the mechanical positioning accuracy, without considering the coupling effect of 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] The existing distortion correction model is based on fixed working distance calibration and does not compensate for lens focal length drift caused by temperature changes, resulting in systematic deviations during continuous operation.
[0008] These technical flaws have serious consequences for precision inspection in fields like automotive manufacturing and aerospace. For example, in body panel inspection, ambient light interference can cause excessive gap and flushness measurement errors, necessitating repeated manual re-inspections and increasing single-part inspection time by 40%. In turbine blade inspection, errors in multi-view stitching cause distortion of aerodynamic profiles, directly impacting engine performance evaluation. Therefore, developing optical calibration methods capable of dynamic environmental suppression and multi-error collaborative compensation has become a key technological breakthrough for improving the accuracy of complex surface inspection. Summary of the Invention
[0009] Based on the above objectives, the present invention provides an optical detection calibration method based on a laser cross calibration method, comprising the following steps:
[0010] Step 1: Dynamic ambient light suppression and laser parameter adjustment:
[0011] The multi-spectral sensor array collects spectral distribution data of ambient light in real time, dynamically calculates the laser power compensation coefficient based on the energy proportion of the interference band that overlaps with the laser wavelength in the spectral distribution data, and controls the dual-wavelength laser to project a cross-calibration line;
[0012] Step 2: Anti-distortion feature point extraction:
[0013] Receive the laser power parameter adjusted in step 1, collect the laser projection image, dynamically divide the processing area according to the local image contrast, perform adaptive threshold segmentation and sub-pixel edge detection in the processing area, extract the coordinates of the crosshairs intersection and perform optical distortion correction;
[0014] Step 3: Multi-view error collaborative optimization:
[0015] The corrected coordinates output from step 2 and the mechanical motion parameters of the rotary shaft encoder are input into the splicing optimization model 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 of 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 of step 1 and the distortion correction parameters of step 2.
[0018] Preferably, the method for calculating the interference band energy ratio in step 1 includes:
[0019] Performing band separation 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;
[0020] Calculate the energy integral value of each sub-band and perform weighted summation according to the preset wavelength sensitivity coefficient;
[0021] The wavelength sensitivity coefficient is determined as follows:
[0022] In a standard darkroom environment, samples of different materials were used to measure the interference rate of ambient light in each band on the laser reflection signal.
[0023] Establish a mapping database between material types and sensitivity coefficients;
[0024] Call the corresponding sensitivity coefficient according to the material type of the current workpiece being detected.
[0025] Preferably, the method for dynamically dividing the processing area in step 2 includes:
[0026] Calculate the pixel grayscale gradient distribution along the extension direction of the laser line, and use the Sobel operator to detect the horizontal and vertical gradient components;
[0027] Identifying boundary locations where the gradient value suddenly exceeds a set ratio, where the set ratio is dynamically adjusted based on the overall image contrast;
[0028] The area between adjacent mutation boundaries is divided into independent processing units, and the unit size is linearly related to the inverse of the local signal-to-noise ratio;
[0029] An anti-saturation processing unit is added to the high reflectivity area, and the anti-saturation processing includes:
[0030] Detect whether the pixel grayscale value reaches the sensor saturation threshold;
[0031] The dynamic range is compressed by piecewise linear transformation in the saturated area, 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 called. The method for constructing the table is as follows:
[0034] During the calibration phase, standard grid plates are placed at fixed intervals along the optical axis;
[0035] Collect grid distortion images of each distance layer and calculate radial and tangential distortion coefficients;
[0036] Select two adjacent layers of benchmark coefficient groups based on the current working distance;
[0037] Bilinear interpolation compensation is performed on the reference coefficient group based on real-time temperature sensor data, and the interpolation weight is dynamically adjusted according to the temperature change rate;
[0038] When performing reverse mapping, thermal focus drift caused by laser power adjustment is synchronously compensated, and the compensation method includes:
[0039] According to the relationship between the laser power change and the thermal expansion coefficient, the equivalent focal length change is calculated;
[0040] The focal length change is converted into a pixel offset and added to the distortion correction matrix.
[0041] Preferably, the method for constructing the curvature constraint in step 3 includes:
[0042] Calculate the main curvature direction in the neighborhood of the feature point. The specific steps are:
[0043] a. Select an N×N pixel area centered on the feature point;
[0044] b. Fitting the local quadratic surface equation by the least squares method;
[0045] c. Take partial derivatives of the surface equation to obtain the direction of the principal curvature;
[0046] The constraint weight is assigned based on the correlation between the curvature radius and the historical calibration error, which is established in the following way:
[0047] a. Extract error distribution data of different curvature areas from the calibration history database;
[0048] b. Use polynomial regression to fit the relationship curve between curvature radius and average error.
[0049] Preferably, the local resampling mechanism includes:
[0050] Increase the laser scan line density in the conflict area by:
[0051] a. Control the galvanometer system to perform supplementary scanning with a step length of 1 / 2 of the original scanning angle;
[0052] b. Apply a time-staggered trigger strategy to the newly added scan lines to avoid interference with the original signal;
[0053] Perform curvature consistency check on the newly added feature points, including:
[0054] a. Calculate the projection distance between the new point and the original point cloud in 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, including:
[0057] a. Use the random sampling consensus (RANSAC) algorithm to filter the internal point set;
[0058] b. Construct a weighted least squares objective function based on the interior point set, where the weight is 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 main peak offset of the spectrum of the spot image, the real-time change value of the laser wavelength can be inferred. The specific steps are as follows:
[0061] a. Perform one-dimensional Fourier transform on the spot image along the laser line direction;
[0062] b. Detect the main peak position of the spectrum and calculate the pixel offset between it and the calibration reference position;
[0063] c. Convert the pixel shift into a wavelength change based on the magnification and imaging resolution of the optical system;
[0064] A quadratic response surface model of temperature-wavelength drift is constructed, and the model coefficient update method is:
[0065] a. Collect a set of temperature-wavelength data pairs at set intervals;
[0066] b. Use recursive least squares to update the quadratic term coefficients, retaining the exponential decay weights of historical data;
[0067] The compensated equivalent wavelength parameters are fed back to the distortion correction algorithm. The correction methods include:
[0068] a. Recalculate the chromatic aberration coefficient of the optical system according to the wavelength change;
[0069] b. Embed the chromatic aberration coefficient into the tangential distortion component of the inverse mapping matrix.
[0070] Preferably, the method for generating the reflectivity weight mapping table includes:
[0071] Statistically calculate the grayscale distribution histogram of the laser spot image and the relative reflectivity value of each area. The specific steps are as follows:
[0072] a. Divide the image into M×M subregions;
[0073] b. Calculate the ratio of the grayscale mean of each sub-region to the grayscale mean of the entire image as the relative reflectivity value;
[0074] The weight adjustment gradient is determined based on the correlation curve between the relative reflectivity value and the calibration accuracy. The correlation curve is calibrated in the following way:
[0075] a. Perform calibration experiments using standard samples of known reflectivity;
[0076] b. Record the feature point positioning error data under different reflectivity;
[0077] c. Fitting the negative correlation curve of reflectivity and error;
[0078] Two-stage compensation for low reflectivity areas:
[0079] a. In the first stage, the laser power is increased according to the reflectivity loss ratio;
[0080] b. In the second stage, the local contrast enhancement is increased during image processing, and the enhancement is proportional to the power increase.
[0081] Preferably, abnormal operating condition processing is also included:
[0082] When the splicing residuals in step 3 exceed the limit continuously, perform the following operations:
[0083] Backtrack the intermediate parameters from step 1 to step 4 and construct an error propagation path tree. The construction method includes:
[0084] Apply small perturbations to the key parameters of each step;
[0085] Calculate the influence factor of the disturbance on the final residual and generate the sensitivity matrix;
[0086] According to the contribution ranking of the path tree nodes, the parameters of the link with the highest contribution are adjusted first. 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, the distortion coefficient table of step 2 is updated;
[0089] Initiate redundant device switching for suspected hardware failures. Switching methods include:
[0090] Connect spare laser and camera channels in parallel;
[0091] When the primary channel fails calibration three times in a row, it seamlessly switches to the backup channel and resets the calibration process.
[0092] Preferably, the method for constructing the error propagation path tree includes:
[0093] Establish the sensitivity matrix of the parameters of each step and calculate the influence factor of parameter disturbance on the final residual. The specific steps are:
[0094] Apply small perturbations to each parameter, keeping other parameters unchanged;
[0095] Calculate the residual change rate before and after the disturbance as the influencing factor of the parameter;
[0096] A directed graph model is used to describe the coupling relationship between parameters, including:
[0097] Parameters are regarded as nodes, and the physical relationships between parameters are regarded as directed edges;
[0098] Assign a weight to each edge, and the weight value is the product of the two parameter influence factors;
[0099] The critical path is identified by using a modified Dijkstra algorithm, wherein the modification includes:
[0100] The path weight is defined as the sum of the influence factors of each node;
[0101] When the path weight exceeds 3 times the average value of all paths, it is marked as a critical path;
[0102] Lock protection is implemented on parameters on critical paths, prohibiting automatic adjustment to avoid system oscillation.
[0103] Beneficial effects of the present invention:
[0104] This invention combines precise ambient light compensation, distortion correction, and error optimization mechanisms, enabling the calibration system to adapt to diverse operating conditions and environmental changes. Dynamic closed-loop compensation ensures system stability and reduces interference from external factors, enabling optical calibration to achieve higher accuracy and reliability. Furthermore, a mechanism for handling abnormal operating conditions allows the system to quickly recover from problems, avoiding prolonged downtime or calibration failures, thereby improving the system's overall fault tolerance and operational reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0105] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0106] Figure 1 is a flow chart of the steps of the method of the present invention;
[0107] Figure 2 Flow chart of the steps of the method for constructing a table in the method of the present invention;
[0108] Figure 3 This is a flow chart of the steps for calculating the principal curvature direction within the neighborhood of a feature point in the method of the present invention. DETAILED DESCRIPTION
[0109] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. It is also noted that, to provide a more detailed description, the following embodiments are best and preferred embodiments, and those skilled in the art may employ alternative methods for implementing certain known technologies. Furthermore, the accompanying drawings are intended only to provide a more detailed description of the embodiments and are not intended to limit the present invention.
[0110] See Figure 1-Figure 3This embodiment of the present invention provides an optical detection and calibration method based on the laser cross calibration method. The purpose of step 1 is to acquire the spectral distribution data of ambient light in real time 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 the interference of ambient light on the laser signal. This process is crucial for subsequent steps, as stable laser power is the basis for accurate measurement and subsequent image processing.
[0111] In step 1, the laser power is adjusted based on the ambient light to ensure a stable projection signal. Step 2 captures the adjusted laser projection image, dynamically divides the processing area based on local image contrast, and uses adaptive threshold segmentation and sub-pixel edge detection to extract the coordinates of the intersection points of the crosshairs. These feature points must be accurately extracted, and optical distortion correction is used to eliminate distortion caused by optical components such as lenses in the system.
[0112] In step 2, the feature points have undergone optical distortion correction to obtain accurate coordinates. Next, in step 3, these corrected coordinates, along with the mechanical motion parameters of the rotary shaft encoder, are input into the splicing optimization model to construct a coordinate transformation matrix with curvature constraints. Through iterative optimization, a 3D calibration point cloud is obtained. This process is designed to perform error correction at multiple viewing angles, achieving higher-precision calibration.
[0113] Finally, based on the stitching residual data obtained in step 3, as well as the real-time collected ambient temperature and surface reflectivity parameters, a wavelength drift compensation model and reflectivity weight mapping table were established in step 4. This compensation model dynamically adjusts the laser power compensation coefficient and optical distortion correction parameters to account for calibration errors caused by factors such as temperature fluctuations and reflectivity changes. This step ensures that the system maintains high-precision calibration during long-term operation.
[0114] In one possible implementation, in step 1, a multispectral sensor array first collects spectral distribution data of ambient light in real time. This data contains information from different wavelength bands, from ultraviolet to infrared. Next, using a spectral unmixing algorithm, the portion of the data overlapping with the red laser wavelength range is extracted as the first interference sub-band, and the portion overlapping with the blue laser wavelength range is extracted as the second interference sub-band. This process accurately identifies the interference portion of the ambient light that overlaps with the laser wavelength, providing a basis for subsequent interference energy calculation.
[0115] Energy is integrated for each interfering subband to obtain a specific energy value. These energy values are then weighted and summed based on a preset wavelength sensitivity coefficient to determine the total energy contribution of each interfering band. The key to this step is the selection of the sensitivity coefficient, which represents the degree of interference a light band will have on the laser reflection signal under different materials and environmental conditions. This weighted summation yields the final energy contribution of the interfering band, allowing for a precise determination of the degree of ambient light interference.
[0116] Determining the wavelength sensitivity coefficient is the core of this calculation method. First, in a standard darkroom environment, samples of various materials (such as metal, glass, and plastic) are used to measure the interference rate of ambient light in each wavelength band on the laser reflection signal. This experimental data is used to establish a database mapping material types and sensitivity coefficients. Based on the material type of the workpiece being inspected, the system calls the corresponding sensitivity coefficient from the database to achieve accurate compensation for different materials.
[0117] Implementation of this method first requires band separation and sensitivity coefficient measurement in a laboratory environment. The measured data from samples of various materials is then analyzed experimentally to establish a comprehensive mapping database. This database provides support for mapping materials and sensitivity coefficients for real-time on-site inspection. In practical applications, when inspecting a workpiece, the system automatically selects the appropriate sensitivity coefficient based on the material type, adjusting the laser power compensation factor to ensure laser signal accuracy.
[0118] In one possible implementation, the grayscale gradient distribution of the image pixels is first calculated along the extension direction of the laser line. Using the Sobel operator, the horizontal and vertical gradient components of the image are calculated separately. The Sobel operator can effectively detect areas with dramatic grayscale value changes in an image, thereby identifying possible boundary locations. Sudden 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 boundaries where grayscale gradient values suddenly change. This ratio is dynamically adjusted based on the overall image contrast, ensuring accurate identification of important structures and object boundaries in images under varying lighting and reflection conditions. This dynamic adjustment mechanism enables the system to adapt to changing environmental conditions, avoiding inaccurate boundary detection caused by low or high contrast.
[0120] After identifying boundaries, the area between adjacent abrupt boundaries is divided into independent processing units. The size of each processing unit is linearly proportional to the inverse of the local signal-to-noise ratio. This means that in areas with low signal-to-noise ratio, smaller processing units are used to more accurately process the details of low-signal areas; while in areas with high signal-to-noise ratio, larger processing units are used to improve processing efficiency.
[0121] During processing, special attention is paid to areas of high reflectivity to determine whether the pixel grayscale values have reached the sensor's saturation threshold. To prevent information loss due to saturation, the system incorporates an anti-saturation processing unit in these areas. This unit detects the grayscale values of image pixels to determine whether the sensor's saturation threshold has been reached. For saturated areas, a piecewise linear transformation is used to compress the dynamic range, bringing the grayscale values within the sensor's processing range. The compression slope is adaptively adjusted based on the local light intensity distribution to ensure that the compressed image retains sufficient detail.
[0122] In practical applications, the Sobel operator is first used to calculate the image's grayscale gradient distribution and identify image boundaries. Based on a set dynamic adjustment ratio, the boundaries of the processing area are determined, and the size of the area is adjusted based on the signal-to-noise ratio. High-reflectivity areas are processed by detecting sensor saturation and performing dynamic range compression 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 detail and effective processing of high-reflectivity areas.
[0123] In one possible implementation, during the calibration phase, to establish an accurate optical distortion model, a standard grid is first placed at regular intervals along the optical axis. This method allows for the acquisition of grid-distorted images at different distances (i.e., at different distances from the sensor). These images reflect the optical distortion at different distances, primarily radial and tangential distortion.
[0124] For each layer of the grid image collected at different distances, the radial and tangential distortion coefficients are calculated. These distortion coefficients reflect the geometric distortion of the image due to the non-idealities of the optical system. In this way, the distortion characteristics at different working distances can be obtained.
[0125] Based on the current working distance, the two most adjacent reference coefficient groups are selected from the multi-distance layer distortion coefficient table. The reference coefficients represent how the distortion characteristics change with distance at different working distances.
[0126] In practical applications, temperature changes can affect the physical properties of optical components and, consequently, distortion coefficients. Therefore, real-time temperature sensor data is used to perform bilinear interpolation compensation on the selected baseline coefficient set. Dynamic adjustment of interpolation weights based on the rate of temperature change ensures that distortion correction adapts to varying ambient temperatures.
[0127] In addition to temperature effects, laser power adjustments can also cause thermal focal drift, which affects image geometry. To correct for this, the focal length change is first calculated based on the relationship between laser power changes and the thermal expansion coefficient. This focal length change is then converted into a pixel offset and added to the distortion correction matrix. This compensates for thermal focal drift caused by laser power changes, ensuring image accuracy.
[0128] In practical applications, the calibration phase begins with image acquisition at multiple distances to determine distortion coefficients at different working distances. Standard grid plates are placed at regular intervals to ensure that the acquired images cover the different distance layers, allowing for detailed distortion coefficient calculations. During real-time operation, sensor temperature data and laser power changes are monitored in real time, and bilinear interpolation 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 a feature point is first selected. This step aims to obtain pixel information surrounding the feature point, which serves as the basis for subsequent fitting of the local surface equation. This region must be selected to ensure that it contains sufficient neighborhood information to avoid errors in curvature calculation due to sparse local information.
[0130] Within the neighborhood of the feature point, the least squares method is used to fit the local quadratic surface equation. The least squares method effectively fits the image data within the area, resulting in an approximate quadratic surface model. This surface model describes the morphology of the local area and can be used for subsequent curvature calculations.
[0131] By taking partial derivatives of the local quadratic surface equation, we can obtain the principal curvature directions. Curvature is an important parameter for measuring surface morphological changes, and the principal curvature directions reveal the directions in which surface changes most significantly within the neighborhood of a feature point. By calculating the principal curvature directions, we can more accurately understand the geometric characteristics of image distortion and apply distortion correction based on these characteristics.
[0132] To further optimize the calibration process, it's necessary to analyze the relationship between the curvature radius and historical calibration errors. First, we extract error distribution data for different curvature regions from the historical calibration database. This error data reflects the calibration error behavior in different curvature regions. Then, we use polynomial regression to fit a curve showing the relationship between the curvature radius and the average error. This curve reveals how the error varies under different curvature conditions.
[0133] Constraint weights are assigned based on the correlation between curvature radius and historical calibration errors. Specifically, areas with smaller curvature radii are likely to produce larger distortion errors and therefore require higher constraint weights, while areas with larger curvature radii are relatively stable and have smaller errors, so they can be assigned lower constraint weights. This ensures stronger constraints on high-error areas during calibration, ensuring the accuracy of the final calibration.
[0134] In one possible implementation, during the calibration process, some areas may have sparse data due to scanning angles or equipment limitations, especially in conflicting areas (i.e., areas with large image distortion or weak features). In order to improve the data quality and calibration accuracy in these areas, it is necessary to increase the density of laser scan lines. The specific operation is to control the galvanometer system to perform a supplementary scan with a step length of 1 / 2 of the original scanning angle. In this way, by increasing the density of scan lines, data loss can be effectively reduced, thereby providing more refined local feature information.
[0135] The newly added scan lines need to be distinguished from the original scan signal to avoid interference caused by signal overlap or time synchronization issues. To achieve this, a time-staggered triggering strategy is used, staggering the triggering of the newly added scan lines with the original signal. This ensures that the original scan signal and the newly added scan lines do not conflict, maintaining data accuracy and consistency.
[0136] After adding laser scan lines and acquiring new feature points, the newly added feature points need to be checked for curvature consistency. The purpose of this check is to ensure that the newly added feature points conform to the geometric characteristics of the local area to avoid unexpected errors. The specific operation is to calculate the projection distance between the newly added points and the original point cloud in the normal vector direction. If the projection distance between the newly added feature point and the original point cloud in the normal vector direction exceeds 3 times the standard deviation, the point is considered an outlier and marked. This step helps to eliminate outliers introduced by noise or unstable factors, thereby improving the reliability of the final calibration results.
[0137] In order to ensure data consistency during the calibration process, the coordinate transformation matrix needs to be recalculated. At this time, the robust estimation method is used to optimize the newly added data. Specifically, the random sampling consensus (RANSAC) algorithm is used to screen the inlier set. The RANSAC algorithm can identify and exclude outliers in the data, thereby fitting the coordinate transformation matrix more accurately. Then, based on the inlier set, a weighted least squares objective function is constructed, in which the weight of each data point is inversely proportional to its projection error. In this way, points with smaller projection errors will receive larger weights, ensuring that these points have a greater impact on the final transformation matrix, thereby improving the accuracy of the overall calibration.
[0138] In a possible implementation, first, in step 4, a spot image after laser scanning is acquired and a one-dimensional Fourier transform is performed along the laser line direction to extract spectral information of the image.
[0139] Then, the change trend of the main peak of the spectrum is obtained by detecting the position of the main peak of the spectrum and calculating the pixel offset between the main peak and the calibration reference position.
[0140] Using the imaging parameters of the optical system (such as magnification and imaging resolution), this pixel shift is converted into the actual change in laser wavelength. This conversion provides the basis for real-time perception of wavelength drift.
[0141] In order to model the wavelength drift of the laser caused by temperature, a set of data pairs of temperature and wavelength change are collected at regular intervals.
[0142] The coefficients of the quadratic response model are updated in real time using recursive least squares. Exponential decay weights are introduced into the update process to reduce the impact of outdated data, thereby achieving online adaptive correction of the model.
[0143] The model can predict the wavelength drift trend under different temperature conditions and form 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 chromatic aberration and lateral chromatic aberration caused by the wavelength change.
[0145] The corrected chromatic aberration coefficient is embedded into the tangential distortion term in the inverse mapping matrix, which is the key part of the correction algorithm for image restoration, to achieve dynamic compensation of image distortion.
[0146] In a possible implementation, first, the image is divided into M×M sub-regions. This division method can perform local analysis on the spot image and obtain more detailed reflectivity information.
[0147] For each sub-region, the grayscale mean of the region is calculated and then compared with the grayscale mean of the entire image to obtain the relative reflectivity value of the region. The relative reflectivity value reflects the reflectivity of the region and provides basic data for subsequent calibration.
[0148] A series of calibration experiments were conducted using standard samples of 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 is obtained. This curve shows that when the reflectivity is low, the positioning error is generally larger, so corresponding compensation is required.
[0150] Based on the reflectivity-error curve, the relationship between reflectivity and calibration accuracy is determined, and a weight adjustment gradient is derived. This gradient provides a theoretical basis for the subsequent compensation step, enabling precise adjustment of the weights of low-reflectivity areas to compensate for the errors caused by insufficient reflectivity.
[0151] For low reflectivity areas, a two-stage compensation strategy is adopted:
[0152] Phase 1: Increase the laser power to enhance the laser reflection signal in low-reflectivity areas. This step can effectively increase the brightness of the light spot in low-reflectivity areas and reduce signal attenuation caused by insufficient reflection.
[0153] Phase 2: During image processing, the image quality of low-reflectivity areas is further improved by enhancing local contrast. The degree of enhancement is proportional to the increase in laser power, ensuring the consistency and accuracy of compensation.
[0154] In one possible implementation, if the stitching residual error continuously exceeds a set threshold during calibration, the system deems it an abnormal condition and requires further analysis and resolution. This condition may be caused by environmental interference, equipment failure, or improper parameter settings. Promptly detecting and addressing stitching residual anomalies is crucial.
[0155] To analyze the causes of splicing residual anomalies, we first need to backtrack the intermediate parameters from step 1 to step 4. By backtracking, we can find which links may have a significant impact on the final result and then determine the error propagation path.
[0156] During this process, it is necessary to impose small perturbations on the key parameters of each link and observe their impact on the final splicing residual. By calculating the impact of the perturbations, a sensitivity matrix is obtained, which can help analyze the error contribution of each link.
[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 the node indicates the degree of influence of the link on the splicing residual.
[0158] Nodes are ranked based on their contribution, and the parameters of the links that contribute most to the stitching residual are adjusted first to most effectively reduce the residual. Common influencing factors include ambient light, distortion correction, etc.
[0159] If the contribution of ambient light interference is found to be greater than 50% in the path tree, the system will trigger the recalculation of the compensation coefficient in step 1 to eliminate the influence of ambient light on the measurement accuracy.
[0160] If the contribution of the distortion correction link exceeds a certain threshold, the distortion coefficient table update in step 2 is triggered to correct the distortion error, thereby improving the calibration accuracy.
[0161] If the path tree analysis finds that a certain link may have a hardware failure (such as a laser or camera failure), the system will enable redundant equipment for switching.
[0162] The system has preset backup laser and camera channels. If the primary channel fails calibration three times in a row, it automatically and seamlessly switches to the backup channel and restarts the calibration process. This mechanism ensures continuous system operation in the event of a device failure, avoiding extended downtime or data loss.
[0163] Specifically, through software simulation, small perturbations are applied to each key parameter (for example, 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 links have a significant impact on the error.
[0164] Using the sensitivity matrix results, an error propagation path tree is constructed. Each link is ranked according to its contribution to the final error, thereby determining the priority of adjustments and ensuring that the most important links are optimized first.
[0165] To ensure system stability, if the primary channel fails three times in a row, the system automatically switches to the backup device. This 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 the other parameters constant. Perturbations typically involve small adjustments to a parameter's value, such as changing laser power or adjusting camera exposure time, to ensure relative stability of experimental conditions.
[0167] By calculating the residual change rate before and after the disturbance, we can determine the parameter's impact factor on the final residual. The impact factor is a measure of the parameter's impact on the system output and provides the necessary data support for subsequent path tree construction.
[0168] The key parameters in all steps are considered nodes in a graph. The coupling relationships between these parameters are determined based on physical principles or experimental conditions, thereby constructing a directed graph model. In this model, the associations between parameter nodes are represented by directed edges, and the direction of the edge 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. A larger weight indicates a tighter coupling relationship and a greater influence.
[0170] The improved Dijkstra algorithm defines path weight as the sum of the influence factors of each node along the path. Unlike traditional shortest path algorithms, this weight definition emphasizes the impact of each node on the final residual, helping the system better identify which paths play a key role in error propagation.
[0171] During algorithm execution, when a path weight exceeds three times the average of all paths, the path is marked as a critical path. This means that the path has a particularly large impact on error propagation and must be given more attention.
[0172] The system locks parameters on identified critical paths. This means these critical parameters cannot be automatically adjusted to prevent changes that could cause system oscillation or instability. Locking parameters on critical paths ensures system stability during complex calibration processes, preventing unnecessary adjustments that could cause system overreaction.
[0173] Specifically, through experiments or numerical simulations, small perturbations are applied to each parameter (such as laser intensity and camera focal length) and the changes in the stitching residual before and after the perturbation are monitored. A sensitivity matrix is calculated from this data, where the influence factor of each parameter on the residual provides a measure of its importance. These influence factors are then input as weights into the subsequent directed graphical model.
[0174] In a graph model, each parameter corresponds to a node. The coupling relationship between parameters can be established through physical analysis (e.g., the effect of laser power on camera exposure). The weight of each edge is determined by multiplying the influence factors between nodes, ensuring that parameters with greater influence have a greater weight on the impact of other parameters.
[0175] When implementing the Dijkstra algorithm, path weights take into account the combined impact of all parameters along the path. When a path weight significantly exceeds the average of all paths, the path is marked as a critical path and protection is applied to the nodes along the path to prevent instability caused by automatic adjustments.
[0176] The error propagation path tree construction method significantly improves the calibration accuracy, stability and automation level of the optical detection system through the optimization of multiple links such as sensitivity matrix, coupling relationship modeling, Dijkstra algorithm optimization and locking protection mechanism, effectively avoids unnecessary error propagation and system oscillation, and ensures the efficiency and accuracy of the calibration process.
[0177] The present invention encompasses any alternatives, modifications, equivalents, and solutions that fall within the spirit and scope of the present invention. To provide a thorough understanding of the present invention, specific details are described in detail below in connection with the preferred embodiments of the present invention, but those skilled in the art will be able to fully understand the present invention without these detailed descriptions. Furthermore, to avoid unnecessary confusion regarding the essence of the present invention, well-known methods, processes, procedures, components, and circuits have not been described in detail.
[0178] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. An optical detection calibration method based on laser cross calibration method, characterized in that: The following steps are involved: Step 1: Dynamic ambient light suppression and laser parameter adjustment: The multi-spectral sensor array collects spectral distribution data of ambient light in real time, dynamically calculates the laser power compensation coefficient based on the energy proportion of the interference band that overlaps with the laser wavelength in the spectral distribution data, and controls the dual-wavelength laser to project a cross-calibration line; Step 2: Anti-distortion feature point extraction: Receive the laser power parameter adjusted in step 1, collect the laser projection image, dynamically divide the processing area according to the local image contrast, perform adaptive threshold segmentation and sub-pixel edge detection in the processing area, extract the coordinates of the crosshairs intersection and perform optical distortion correction; Step 3: Multi-view error collaborative optimization: The corrected coordinates output from step 2 and the mechanical motion parameters of the rotary shaft encoder are input into the splicing optimization model 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. Step 4: Dynamic closed-loop compensation: Based on the splicing residual data of 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 of step 1 and the distortion correction parameters of step 2.
2. The optical detection and calibration method based on the laser cross calibration method according to claim 1, characterized in that: The calculation method of the interference band energy ratio in step 1 includes: Performing band separation 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; Calculate the energy integral value of each sub-band and perform weighted summation according to the preset wavelength sensitivity coefficient; The wavelength sensitivity coefficient is determined as follows: In a standard darkroom environment, samples of different materials were used to measure the interference rate of ambient light in each band on the laser reflection signal. Establish a mapping database between material types and sensitivity coefficients; Call the corresponding sensitivity coefficient according to the material type of the current workpiece being detected.
3. The optical detection and calibration method based on the laser cross calibration method according to claim 1, characterized in that: The method for dynamically dividing the processing area in step 2 includes: Calculate the pixel grayscale gradient distribution along the extension direction of the laser line, and use the Sobel operator to detect the horizontal and vertical gradient components; Identifying boundary locations where the gradient value suddenly exceeds a set ratio, where the set ratio is dynamically adjusted based on the overall image contrast; The area between adjacent mutation 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 includes: Detect whether the pixel grayscale value reaches the sensor saturation threshold; The dynamic range is compressed by piecewise linear transformation in the saturated area, and the compression slope is adaptively adjusted according to the local light intensity distribution.
4. The optical detection and calibration method based on the laser cross calibration method according to claim 1, characterized in that: The optical distortion correction in step 2 includes: The pre-stored multi-distance layer distortion coefficient table is called. The method for constructing the multi-distance layer distortion coefficient table is as follows: During the calibration phase, standard grid plates are placed at fixed intervals along the optical axis; Collect grid distortion images of each distance layer and calculate radial and tangential distortion coefficients; Select two adjacent layers of benchmark coefficient groups based on the current working distance; Bilinear interpolation compensation is performed on the reference coefficient group based on real-time temperature sensor data, and the interpolation weight is dynamically adjusted according to the temperature change rate; When performing reverse mapping, thermal focus drift caused by laser power adjustment is synchronously compensated, and the compensation method includes: According to the relationship between the laser power change and the thermal expansion coefficient, the equivalent focal length change is calculated; The focal length change is converted into a pixel offset and added to the distortion correction matrix.
5. The optical detection and calibration method based on the laser cross calibration method according to claim 1, characterized in that: The method for constructing the curvature constraint in step 3 includes: Calculate the main curvature direction in the neighborhood of the feature point. The specific steps are: a. Select an N×N pixel area centered on the feature point; b. Fitting the local quadratic surface equation by the least squares method; c. Take partial derivatives of the surface equation to obtain the direction of the principal curvature; The constraint weight is assigned based on the correlation between the curvature radius and the historical calibration error, which is established in the following way: a. Extract error distribution data of different curvature areas from the calibration history database; b. Use polynomial regression to fit the relationship curve between curvature radius and average error.
6. The optical detection and calibration method based on the laser cross calibration method according to claim 5, characterized in that: The local resampling mechanism includes: Increase the laser scan line density in the conflict area by: a. Control the galvanometer system to perform supplementary scanning with a step length of 1 / 2 of the original scanning angle; b. Apply a time-staggered trigger strategy to the newly added scan lines to avoid interference with the original signal; Perform curvature consistency check on the newly added feature points, including: a. Calculate the projection distance between the new point and the original point cloud in the normal vector direction; b. If the distance exceeds 3 times the standard deviation, it is marked as an outlier; The coordinate transformation matrix is recalculated using a robust estimation method, including: a. Use the random sampling consensus (RANSAC) algorithm to filter the internal point set; b. Construct a weighted least squares objective function based on the interior point set, where the weight is inversely proportional to the projection error.
7. The optical detection and calibration method based on the laser cross calibration method according to claim 1, characterized in that: The method for establishing the wavelength drift compensation model in step 4 includes: By analyzing the main peak offset of the spectrum of the spot image, the real-time change value of the laser wavelength can be inferred. The specific steps are as follows: a. Perform one-dimensional Fourier transform on the spot image along the laser line direction; b. Detect the main peak position of the spectrum and calculate the pixel offset between it and the calibration reference position; c. Convert the pixel shift into a wavelength change based on the magnification and imaging resolution of the optical system; A quadratic response surface model of temperature-wavelength drift is constructed, and the model coefficient update method is: a. Collect a set of temperature-wavelength data pairs at set intervals; b. Use recursive least squares to update the quadratic term coefficients, retaining the exponential decay weights of historical data; The compensated equivalent wavelength parameters are fed back to the distortion correction algorithm. The correction methods include: 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 inverse mapping matrix.
8. The optical detection and calibration method based on the laser cross calibration method according to claim 1, characterized in that: The method for generating the reflectivity weight mapping table includes: Statistically calculate the grayscale distribution histogram of the laser spot image and the relative reflectivity value of each area. The specific steps are as follows: a. Divide the image into M×M subregions; b. Calculate the ratio of the grayscale mean of each sub-region to the grayscale mean of the entire image as the relative reflectivity value; The weight adjustment gradient is determined based on the correlation curve between the relative reflectivity value and the calibration accuracy. The correlation curve is calibrated in the following way: a. Perform calibration experiments using standard samples of known reflectivity; b. Record the feature point positioning error data under different reflectivity; c. Fitting the negative correlation curve of reflectivity and error; Two-stage compensation for low reflectivity areas: a. In the first stage, the laser power is increased according to the reflectivity loss ratio; b. In the second stage, the local contrast enhancement is increased during image processing, and the enhancement is proportional to the power increase.
9. The optical detection and calibration method based on the laser cross calibration method according to claim 1, characterized in that: It also includes abnormal operating condition handling: When the splicing residuals in step 3 exceed the limit continuously, perform the following operations: Backtrack the intermediate parameters from step 1 to step 4 and construct an error propagation path tree. The construction method includes: Apply small perturbations to the key parameters of each step; Calculate the influence factor of the disturbance on the final residual and generate the sensitivity matrix; According to the contribution ranking of the path tree nodes, the parameters of the link with the highest contribution are adjusted first. The adjustment strategies include: If the contribution of ambient light interference exceeds 50%, the compensation coefficient in step 1 will be recalculated; If the distortion correction contribution exceeds the threshold, the distortion coefficient table of step 2 is updated; Initiate redundant device switching for suspected hardware failures. Switching methods include: Connect spare laser and camera channels in parallel; When the primary channel fails calibration three times in a row, it seamlessly switches to the backup channel and resets the calibration process.
10. The optical detection and calibration method based on the laser cross calibration method according to claim 9, characterized in that: The method for constructing the error propagation path tree includes: Establish the sensitivity matrix of the parameters of each step and calculate the influence factor of parameter disturbance on the final residual. The specific steps are: Apply small perturbations to each parameter, keeping other parameters unchanged; Calculate the residual change rate before and after the disturbance as the influencing factor of the parameter; A directed graph model is used to describe the coupling relationship between parameters, including: Parameters are regarded as nodes, and the physical relationships between parameters are regarded as directed edges; Assign a weight to each edge, and the weight value is the product of the two parameter influence factors; The critical path is identified by using a modified Dijkstra algorithm, wherein the modification includes: The path weight is defined as the sum of the influence factors of each node; When the path weight exceeds 3 times the average value of all paths, it is marked as a critical path; Lock protection is implemented on parameters on critical paths, prohibiting 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
Complex-shape guide rail sliding block size measurement method based on intelligent vision
CN119984033A
Optical datum plate with positioning and clamping functions
CN214223988U
Calibration device, calibration method, and calibration program
JP2022038102A
Cited By
Circuit compensation correction method based on threshold drift analysis
CN121008642A
Intelligent position control dynamic calibration method
CN121541473A
Method and system for measuring distance by adopting dual-wavelength laser
CN121559531A
Multi-source disturbance self-calibration method and system for rotary filtering type monochromator
CN122016255A
Automatic calibration system of five-point laser module precision test bench
CN122042216A
