A laser camera temperature compensation method and system based on visual correction
By collecting calibration plate images at different temperatures and detecting bad pixels, a temperature compensation model is established, which solves the problem of reduced measurement accuracy caused by temperature drift of the laser camera and achieves a more stable and accurate temperature compensation effect.
Patent Information
- Application Number
- CN202410718407.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-05
AI Technical Summary
The image point drift of the laser camera when the temperature changes leads to a reduction in measurement accuracy, and the temperature compensation method in the existing technology lacks stability and accuracy.
By installing a laser camera, collect calibration plate images at different temperatures, establish a training data set, use bad pixel detection methods and polynomial fitting methods to establish a temperature compensation model, and use the least squares method to optimize the model to calculate temperature-compensated image data in real time .
The stability and accuracy of the temperature compensation of the laser camera are improved, ensuring the reliability and integrity of the measurement accuracy.
Smart Images

Figure CN118314220B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a laser camera temperature compensation method and system based on visual correction. Background Art
[0002] Laser cameras can intuitively obtain two-dimensional image information under a panoramic field of view and are widely used in the measurement of shape, size, position, etc., especially the calculation of three-dimensional information of objects. The accuracy of feature extraction of images taken by laser cameras directly affects the accuracy of measurement. When performing three-dimensional calculations, it is necessary to pre-calibrate the camera parameters or reference images. However, in actual applications, as the operating temperature of the camera changes, the components of the camera will deform, resulting in image point drift, affecting the pre-calibrated parameter relationship or the matching result with the reference image, resulting in systematic deviations and affecting the measurement accuracy of the camera.
[0003] Existing technologies such as Chinese patent application CN114943774A establish a temperature compensation value index table for each sub-cube space in the calibration space and compensate for it in the calculation results, thereby realizing a method for improving the calibration accuracy of an infrared binocular camera. The method also calculates the temperature drift suppression method of the relationship between various camera parameters and temperature, and calculates the final temperature compensation value after integrating all factors that cause temperature drift. However, due to the lack of stability in setting the temperature compensation value index table, it has certain limitations. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In view of the deficiencies in the prior art, the present invention provides a laser camera temperature compensation method and system based on visual correction, which has the advantages of stability and accuracy, and solves the problem of temperature drift in laser camera measurement.
[0006] (II) Technical solution
[0007] In order to solve the technical problem of temperature drift measured by the above laser camera, the present invention provides the following technical solution:
[0008] The present invention discloses a laser camera temperature compensation method based on visual correction, which specifically comprises the following steps:
[0009] S1. Install a laser camera, collect images of the calibration plate at different temperatures, and collect feature points in the captured images of the calibration plate to establish a training data set;
[0010] S2, detecting the image data in the training data set based on the bad pixel detection method, and determining the bad pixels in the image data in the training data set;
[0011] S3, performing data processing on bad pixels in the image data of the determined training data set by a data processing method to obtain processed image data;
[0012] S4. Based on the processed image data obtained, the influence of temperature on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a temperature compensation model of the laser camera is established;
[0013] S5. Optimize the established temperature compensation model by the least square method, output the optimal temperature compensation model, and calculate the compensated image data at different temperatures in real time based on the optimal temperature compensation model.
[0014] The present invention installs a laser camera, collects images of a calibration plate at different temperatures, and establishes a training data set. At the same time, the image data in the training data set is detected by a bad pixel detection method to determine the bad pixels in the image data, and the bad pixels in the image data of the training data set are processed by a data processing method. At the same time, based on the processed image data obtained, the influence of temperature on the image parameters taken by the laser camera is calculated by a polynomial fitting method, a temperature compensation model of the laser camera is established, and the established temperature compensation model is optimized by the least squares method. At the same time, based on the optimal temperature compensation model, the compensated image data at different temperatures are calculated in real time, thereby improving the stability and accuracy of the temperature compensation of the laser camera.
[0015] Preferably, the step of installing a laser camera, collecting images of the calibration plate at different temperatures, and collecting feature points in the captured images of the calibration plate, and establishing a training data set comprises the following steps:
[0016] Set the positions of all feature points on the calibration plate, and fix the relative positions of the camera and the calibration plate so that the feature points on the calibration plate are evenly distributed in the entire camera field of view;
[0017] Set the laser camera operating temperature to [-10,50]℃, and select the calibration plate with a thermal expansion coefficient range of ppm·℃;
[0018] Wherein, the calibration plate is made of a material that meets the set range of thermal expansion coefficient;
[0019] Within the preset operating temperature range of the laser camera, according to the preset temperature sampling interval, the calibration plate image taken by the laser camera at each sampling temperature is collected, wherein the ambient temperature during the laser camera calibration is used as the standard temperature, and the image collected at the standard temperature is used as the standard image;
[0020] Combine standard temperature and standard images and establish a training data set.
[0021] The present invention calibrates the positions of all feature points on the plate and fixes the relative positions of the camera and the calibration plate. At the same time, according to a preset temperature sampling interval, the image of the calibration plate taken by the laser camera at each sampling temperature is collected and a training data set is established, thereby ensuring the accuracy and standardization of laser camera data acquisition.
[0022] Preferably, the detecting of the image data in the training data set based on the bad pixel detection method to determine the bad pixels in the image data in the training data set comprises the following steps:
[0023] S21, based on the bad pixels in the laser camera, setting the type of bad pixels in the image data;
[0024] There are two types of bad pixels in laser cameras: bright spots and dark spots.
[0025] S22, detecting the image data of the training data set based on the type of bad pixels, and determining the bad pixels in the image data of the training data set;
[0026] The detecting of the image data of the training data set based on the type of bad pixels includes:
[0027] S221, bright spot detection;
[0028] S222, dark spot detection;
[0029] S223, determining bad pixels in the image data of the training data set.
[0030] Preferably, the bright spot detection comprises the following steps:
[0031] Set a 3×3 detection window and divide the eight pixels in the neighborhood of the pixel to be detected into two parts. , , , and , , , , set the corresponding pixel gray values to , , , and , , , ;
[0032] Determine the position of the pixel to be detected based on the four neighboring pixels, and set the corresponding bright spot detection judgment threshold;
[0033] The bright spot threshold parameter determination formula is as follows:
[0034]
[0035] in, , , , is the gray value of the four neighboring pixels, that is , , , or , , , ; To determine the threshold parameter for bright spots, when the pixel to be detected is in the light spot, , Indicates the threshold parameter of the pixel to be detected in the spot. When the pixel to be detected is in the background, , The threshold parameter indicating that the pixel to be detected is in the background; represents the mean function, represents the threshold determination function, Represents the global grayscale mean;
[0036] Based on the determined bright spot threshold parameters , according to the pixel to be detected and the bright spot threshold parameter Whether the difference is greater than the maximum grayscale value of the four neighboring pixels, determine whether the pixel to be detected is a bright spot;
[0037]
[0038] in, is the pixel detection result, when When it is 1, it means the pixel to be detected is a bright spot. When it is 0, it means that the pixel to be detected is a normal pixel; It represents the bright pixel detection result function, and max represents the maximum value function.
[0039] Preferably, the dark spot detection comprises the following steps:
[0040] set up is the threshold parameter for judging dark spots, Value →0, → indicates close;
[0041]
[0042] in, is the pixel detection result, when When it is 1, it means the pixel to be detected is a dark point. When it is 0, it means that the pixel to be detected is a normal pixel; It represents the dark pixel detection result function, and min represents the minimum value function.
[0043] Preferably, the determining of bad pixels in the image data of the training data set comprises the following steps:
[0044]
[0045] in, It represents the bad pixel detection result function. When the results of the pixel to be detected in both the bright spot detection and the dark spot detection are normal pixels, the pixel to be detected is judged to be a normal pixel. Represents the coordinates of the pixel to be detected.
[0046] The present invention detects image data in a training data set by using a bad pixel detection method, sets the type of bad pixels in the image data, and determines the type of bad pixels in the image data by calculating the grayscale value of each pixel, thereby improving the stability of laser camera image temperature compensation.
[0047] Preferably, the step of performing data processing on bad pixels in the image data of the training data set by means of data processing comprises the following steps:
[0048] S31, selecting a bad pixel point determined in the image data of the training data set, and setting a rectangular window with the bad pixel point as the center;
[0049] S32, calculating the average grayscale value of all pixels in the set rectangular window by using a mean filtering algorithm;
[0050] Set the rectangular window size to n×n;
[0051] The calculation formula of the mean filter algorithm is as follows:
[0052]
[0053] in, Indicates that the selected coordinates are The gray value after mean filtering, n represents the window size, Indicates that the coordinates in the window are Gray value of
[0054] The value of the selected pixel point calculated by the mean filtering algorithm is used as the grayscale value of the pixel point, and data processing is performed on all the bad pixels in the image data of the training data set to obtain the processed image data.
[0055] The present invention calculates the average grayscale value of all pixels in a set rectangular window by using a value filtering algorithm, and uses the calculated value as the grayscale value of the pixel, thereby completing the processing of all bad pixels and improving the integrity and stability of the image collected by the laser camera.
[0056] Preferably, the method of calculating the influence of temperature on the image parameters taken by the laser camera by a polynomial fitting method based on the processed image data obtained, and establishing a temperature compensation model of the laser camera comprises the following steps:
[0057] Extract the pixel-level coordinates of all feature points on each image, record the coordinates of each feature point and the corresponding operating temperature, and use the coordinates of the feature points extracted on the standard image as the standard coordinates to obtain a set of data. ,in, To set the coordinates of the feature points, is the standard coordinate corresponding to the feature point, To obtain the working temperature data of the corresponding standard image, collect the data of all feature points and establish a data set of all feature points;
[0058] Based on the data set of all feature points, a temperature compensation model of the laser camera is established by polynomial fitting;
[0059] The temperature compensation model formula of the laser camera is as follows:
[0060]
[0061]
[0062] in, Indicates the horizontal component offset value from the standard coordinates to the feature point coordinates, represents the vertical component offset value from the standard coordinates to the feature point coordinates, Represents the horizontal component of the feature point coordinates, Represents the vertical component of the feature point coordinates, Indicates the difference between the standard temperature and the operating temperature; , express Polynomial of degree.
[0063] The present invention extracts the pixel-level coordinates of all feature points on each image, establishes a data set of feature points, and establishes a temperature compensation model of the laser camera by polynomial fitting to achieve modeling of the image compensation model collected by the laser camera, thereby improving the reliability of the laser camera image compensation.
[0064] Preferably, the method of optimizing the established temperature compensation model by the least square method, outputting the optimal temperature compensation model, and calculating the compensated image data at different temperatures in real time based on the optimal temperature compensation model comprises the following steps:
[0065] Setting the error threshold between the fitting coordinates and the standard coordinates after the least square method is used to process the established temperature compensation model;
[0066] Take separately is 1, 2, ..., and calculates the error between the fitted coordinates and the standard coordinates;
[0067] When the error between the fitted coordinates and the standard coordinates is less than the set error threshold, the polynomial and coefficients of the temperature compensation model at this time are output, and the polynomial and coefficients of the temperature compensation model at this time are used as the optimal temperature compensation model;
[0068] The optimal temperature compensation model is called to calculate the coordinates of all pixel points in the compensated image data at the working temperature, and the compensated image data is output.
[0069] The present invention uses the least squares method and sets the error threshold between the fitting coordinates and the standard coordinates after the temperature compensation model is processed by the least squares method. At the same time, the optimal temperature compensation model is iteratively searched by continuously adjusting the degree of the polynomial. The image data taken by the laser camera is compensated by the found optimal temperature compensation model, thereby ensuring the temperature sensitivity of the laser camera temperature compensation.
[0070] The present invention discloses a laser camera temperature compensation system based on visual correction, comprising: a laser camera, a temperature detection module, a database, a bad pixel detection module, a temperature compensation model establishment module and a temperature compensation execution module;
[0071] The laser camera is used to collect the captured calibration plate image in real time and transmit the captured calibration plate image to the database;
[0072] The temperature detection module is used to collect the working temperature of the laser camera in real time, and transmit the collected working temperature of the laser camera to the database;
[0073] The database is used to receive and store the captured image data and the collected temperature data;
[0074] The bad pixel detection module is used to detect each pixel in the captured image data to determine whether there is a bad pixel;
[0075] The temperature compensation model establishment module is used to establish and determine the temperature compensation model according to the polynomial fitting method and the least squares method;
[0076] The temperature compensation execution module is used to execute a determined temperature compensation model to compensate the captured image data.
[0077] (III) Beneficial effects
[0078] Compared with the prior art, the present invention provides a laser camera temperature compensation method and system based on visual correction, which has the following beneficial effects:
[0079] 1. The invention installs a laser camera, collects images of calibration plates at different temperatures, and establishes a training data set. At the same time, the image data in the training data set is detected by a bad pixel detection method to determine the bad pixels in the image data, and the bad pixels in the image data of the training data set are processed by a data processing method. At the same time, based on the processed image data, the influence of temperature on the image parameters taken by the laser camera is calculated by a polynomial fitting method, a temperature compensation model of the laser camera is established, and the established temperature compensation model is optimized by the least squares method. At the same time, based on the optimal temperature compensation model, the compensated image data at different temperatures are calculated in real time, thereby improving the stability and accuracy of the temperature compensation of the laser camera.
[0080] 2. The invention calibrates the positions of all feature points on the plate and fixes the relative positions of the camera and the plate. At the same time, according to a preset temperature sampling interval, it collects the image of the calibration plate taken by the laser camera at each sampling temperature and establishes a training data set, thereby ensuring the accuracy and standardization of the laser camera data acquisition.
[0081] 3. The present invention detects the image data in the training data set by using a bad pixel detection method, and at the same time, sets the type of bad pixels in the image data and determines the type of bad pixels in the image data by calculating the gray value of each pixel, thereby improving the stability of the temperature compensation of the laser camera image.
[0082] 4. The invention calculates the average grayscale value of all pixels in a set rectangular window by using a value filtering algorithm, and uses the calculated value as the grayscale value of the pixel to complete the processing of all bad pixels, thereby improving the integrity and stability of the image captured by the laser camera.
[0083] 5. The invention extracts the pixel-level coordinates of all feature points on each image, establishes a data set of feature points, and establishes a temperature compensation model of the laser camera by polynomial fitting to achieve modeling of the image compensation model collected by the laser camera, thereby improving the reliability of the laser camera image compensation.
[0084] 6. The invention uses the least squares method to set the error threshold between the fitting coordinates and the standard coordinates after the temperature compensation model is processed. At the same time, the degree of the polynomial is continuously adjusted to iteratively search for the optimal temperature compensation model. The image data taken by the laser camera is compensated by the found optimal temperature compensation model, thereby ensuring the temperature sensitivity of the laser camera temperature compensation. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 It is a schematic diagram of the structure of the laser camera temperature compensation method process of the present invention. DETAILED DESCRIPTION
[0086] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0087] The present invention discloses a laser camera temperature compensation method based on visual correction, which specifically comprises the following steps:
[0088] S1. Install a laser camera, collect images of the calibration plate at different temperatures, and collect feature points in the captured images of the calibration plate to establish a training data set;
[0089] Install a laser camera, collect images of the calibration plate at different temperatures, and collect feature points in the captured images of the calibration plate. Establishing a training data set includes the following steps:
[0090] Set the positions of all feature points on the calibration plate, and fix the relative positions of the camera and the calibration plate so that the feature points on the calibration plate are evenly distributed in the entire camera field of view;
[0091] Furthermore, the operating temperature of the laser camera is set to [-10,50]℃, and the thermal expansion coefficient range of the calibration plate is selected to be ppm·℃;
[0092] Wherein, the calibration plate is made of a material that meets the set range of thermal expansion coefficient;
[0093] Within the preset operating temperature range of the laser camera, according to the preset temperature sampling interval, the calibration plate image taken by the laser camera at each sampling temperature is collected, wherein the ambient temperature during the laser camera calibration is used as the standard temperature, and the image collected at the standard temperature is used as the standard image;
[0094] Furthermore, the standard temperature and the standard image are combined and a training data set is established;
[0095] S2, detecting the image data in the training data set based on the bad pixel detection method, and determining the bad pixels in the image data in the training data set;
[0096] Detecting the image data in the training data set based on the bad pixel detection method, determining the bad pixels in the image data in the training data set includes the following steps:
[0097] S21, based on the bad pixels in the laser camera, setting the type of bad pixels in the image data;
[0098] There are two types of bad pixels in laser cameras: bright spots and dark spots.
[0099] Among them, bright spots and dark spots indicate that the photosensitive pixels in the laser camera cannot be sensitive to light and can only output a constant value. The bad pixels whose constant output value is close to the saturated background gray value are set as bright spots, and the bad pixels whose background gray value is 0 are set as dark spots. S22, detecting the image data of the training data set based on the type of bad pixels, and determining the bad pixels in the image data of the training data set;
[0100] S221, bright spot detection;
[0101] Set a 3×3 detection window and divide the eight pixels in the neighborhood of the pixel to be detected into two parts. , , , and , , , , set the corresponding pixel gray values to , , , and , , , ;
[0102] Determine the position of the pixel to be detected based on the four neighboring pixels, and set the corresponding bright spot detection judgment threshold;
[0103] The bright spot threshold parameter determination formula is as follows:
[0104]
[0105] in, , , , is the gray value of the four neighboring pixels, that is , , , or , , , ; To determine the threshold parameter for bright spots, when the pixel to be detected is in the light spot, , Indicates the threshold parameter of the pixel to be detected in the spot. When the pixel to be detected is in the background, , The threshold parameter indicating that the pixel to be detected is in the background; represents the mean function, represents the threshold determination function, Represents the global grayscale mean;
[0106] Further, based on the determined bright spot threshold parameter , according to the pixel to be detected and the bright spot threshold parameter Whether the difference is greater than the maximum grayscale value of the four neighboring pixels, determine whether the pixel to be detected is a bright spot;
[0107]
[0108] in, is the pixel detection result, when When it is 1, it means the pixel to be detected is a bright spot. When it is 0, it means that the pixel to be detected is a normal pixel; represents the bright pixel detection result function, and max represents the maximum value function;
[0109] S222, dark spot detection;
[0110] set up is the threshold parameter for judging dark spots, Value →0, → indicates close;
[0111]
[0112] in, is the pixel detection result, when When it is 1, it means the pixel to be detected is a dark point. When it is 0, it means that the pixel to be detected is a normal pixel; represents the dark pixel detection result function, and min represents the minimum value function;
[0113] S223, determining bad pixels in the image data of the training data set;
[0114] The formula for determining bad pixels in the image data of the training dataset is as follows:
[0115]
[0116] in, It represents the bad pixel detection result function. When the results of the pixel to be detected in the bright spot detection and dark spot detection are both normal pixels, the pixel to be detected is judged to be a normal pixel. Represents the coordinates of the pixel to be detected;
[0117] S3, performing data processing on bad pixels in the image data of the determined training data set by a data processing method to obtain processed image data;
[0118] The data processing method for determining bad pixels in the image data of the training data set includes the following steps:
[0119] S31, selecting a bad pixel point determined in the image data of the training data set, and setting a rectangular window with the bad pixel point as the center;
[0120] S32, calculating the average grayscale value of all pixels in the set rectangular window by using a mean filtering algorithm;
[0121] Set the rectangular window size to n×n;
[0122] The calculation formula of the mean filter algorithm is as follows:
[0123]
[0124] in, Indicates that the selected coordinates are The gray value after mean filtering, n represents the window size, Indicates that the coordinates in the window are Gray value of
[0125] Furthermore, the value of the selected pixel point calculated by the mean filtering algorithm is used as the gray value of the pixel point, and all bad pixel points in the image data of the determined training data set are processed to obtain processed image data;
[0126] S4. Based on the processed image data obtained, the influence of temperature on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a temperature compensation model of the laser camera is established;
[0127] Based on the processed image data obtained, the influence of temperature on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a temperature compensation model of the laser camera is established, which includes the following steps:
[0128] Extract the pixel-level coordinates of all feature points on each image, record the coordinates of each feature point and the corresponding operating temperature, and use the coordinates of the feature points extracted on the standard image as the standard coordinates to obtain a set of data. ,in, To set the coordinates of the feature points, is the standard coordinate corresponding to the feature point, To obtain the working temperature data of the corresponding standard image, collect the data of all feature points and establish a data set of all feature points;
[0129] Based on the data set of all feature points, a temperature compensation model of the laser camera is established by polynomial fitting;
[0130] The temperature compensation model formula of the laser camera is as follows:
[0131]
[0132]
[0133] in, Indicates the horizontal component offset value from the standard coordinates to the feature point coordinates, represents the vertical component offset value from the standard coordinates to the feature point coordinates, Represents the horizontal component of the feature point coordinates, Represents the vertical component of the feature point coordinates, Indicates the difference between the standard temperature and the operating temperature; , express Polynomial of degree;
[0134] S5. Optimizing the established temperature compensation model by the least square method, outputting the optimal temperature compensation model, and calculating compensated image data at different temperatures in real time based on the optimal temperature compensation model;
[0135] The established temperature compensation model is optimized by the least square method, the optimal temperature compensation model is output, and the compensated image data at different temperatures is calculated in real time based on the optimal temperature compensation model, including the following steps:
[0136] Setting the error threshold between the fitting coordinates and the standard coordinates after the least square method is used to process the established temperature compensation model;
[0137] Furthermore, we take is 1, 2, ..., and calculates the error between the fitted coordinates and the standard coordinates;
[0138] When the error between the fitted coordinates and the standard coordinates is less than the set error threshold, the polynomial and coefficients of the temperature compensation model at this time are output, and the polynomial and coefficients of the temperature compensation model at this time are used as the optimal temperature compensation model;
[0139] Further, calling the optimal temperature compensation model, calculating the coordinates of all pixel points in the compensated image data at the working temperature, and outputting the compensated image data;
[0140] The present invention discloses a laser camera temperature compensation system based on visual correction, comprising: a laser camera, a temperature detection module, a database, a bad pixel detection module, a temperature compensation model establishment module and a temperature compensation execution module;
[0141] The laser camera is used to collect the captured calibration plate image in real time and transmit the captured calibration plate image to the database;
[0142] The temperature detection module is used to collect the working temperature of the laser camera in real time, and transmit the collected working temperature of the laser camera to the database;
[0143] The database is used to receive and store the captured image data and the collected temperature data;
[0144] The bad pixel detection module is used to detect each pixel in the captured image data to determine whether there is a bad pixel;
[0145] The temperature compensation model establishment module is used to establish and determine the temperature compensation model according to the polynomial fitting method and the least squares method;
[0146] The temperature compensation execution module is used to execute a determined temperature compensation model to compensate the captured image data.
[0147] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A laser camera temperature compensation method based on visual correction, characterized in that: The following steps are involved: S1. Install a laser camera, collect images of the calibration plate at different temperatures, and collect feature points in the captured images of the calibration plate to establish a training data set; S2, detecting the image data in the training data set based on the bad pixel detection method, and determining the bad pixels in the image data in the training data set; S3, performing data processing on bad pixels in the image data of the determined training data set by a data processing method to obtain processed image data; S4. Based on the processed image data obtained, the influence of temperature on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a temperature compensation model of the laser camera is established; S5. Optimizing the established temperature compensation model by the least square method, outputting the optimal temperature compensation model, and calculating compensated image data at different temperatures in real time based on the optimal temperature compensation model; The method of performing data processing on bad pixels in the image data of the training data set by means of data processing includes the following steps: S31, selecting a bad pixel point determined in the image data of the training data set, and setting a rectangular window with the bad pixel point as the center; S32, calculating the average grayscale value of all pixels in the set rectangular window by using a mean filtering algorithm; Set the rectangular window size to n×n; The calculation formula of the mean filter algorithm is as follows: in, Indicates that the selected coordinates are The gray value after mean filtering, n represents the window size, Indicates that the coordinates in the window are Gray value of The value of the selected pixel point calculated by the mean filtering algorithm is used as the gray value of the pixel point, and all the bad pixels in the image data of the training data set are processed to obtain the processed image data; The method of calculating the influence of temperature on the image parameters taken by the laser camera by a polynomial fitting method based on the processed image data obtained, and establishing a temperature compensation model of the laser camera includes the following steps: Extract the pixel-level coordinates of all feature points on each image, record the coordinates of each feature point and the corresponding operating temperature, and use the coordinates of the feature points extracted on the standard image as the standard coordinates to obtain a set of data. ,in, To set the coordinates of the feature points, is the standard coordinate corresponding to the feature point, To obtain the working temperature data of the corresponding standard image, collect the data of all feature points and establish a data set of all feature points; Based on the data set of all feature points, a temperature compensation model of the laser camera is established by polynomial fitting; The temperature compensation model formula of the laser camera is as follows: in, Indicates the horizontal component offset value from the standard coordinates to the feature point coordinates, represents the vertical component offset value from the standard coordinates to the feature point coordinates, Represents the horizontal component of the feature point coordinates, Represents the vertical component of the feature point coordinates, Indicates the difference between the standard temperature and the operating temperature; , express Polynomial of degree; The method of optimizing the established temperature compensation model by the least square method, outputting the optimal temperature compensation model, and calculating the compensated image data at different temperatures in real time based on the optimal temperature compensation model comprises the following steps: Setting the error threshold between the fitting coordinates and the standard coordinates after the least square method is used to process the established temperature compensation model; Take separately is 1, 2, ..., and calculates the error between the fitted coordinates and the standard coordinates; When the error between the fitted coordinates and the standard coordinates is less than the set error threshold, the polynomial and coefficients of the temperature compensation model at this time are output, and the polynomial and coefficients of the temperature compensation model at this time are used as the optimal temperature compensation model; Calling the optimal temperature compensation model, calculating the coordinates of all pixel points in the compensated image data at the working temperature, and outputting the compensated image data; The laser camera is installed to collect images of the calibration plate at different temperatures, and feature points in the captured images of the calibration plate are collected to establish a training data set, which includes the following steps: Set the positions of all feature points on the calibration plate, and fix the relative positions of the camera and the calibration plate so that the feature points on the calibration plate are evenly distributed in the entire camera field of view; Set the laser camera operating temperature to [-10,50]℃, and select the calibration plate with a thermal expansion coefficient range of ppm·℃; Wherein, the calibration plate is made of a material that meets the set range of thermal expansion coefficient; Within the preset operating temperature range of the laser camera, according to the preset temperature sampling interval, the calibration plate image taken by the laser camera at each sampling temperature is collected, wherein the ambient temperature during the laser camera calibration is used as the standard temperature, and the image collected at the standard temperature is used as the standard image; Combine standard temperature and standard images and establish a training data set.
2. The laser camera temperature compensation method based on visual correction according to claim 1, characterized in that: The method for detecting bad pixel points in the image data of the training data set is used to detect the bad pixel points in the image data of the training data set, and the bad pixel points in the image data of the training data set are determined by the following steps: S21, based on the bad pixels in the laser camera, setting the type of bad pixels in the image data; There are two types of bad pixels in laser cameras: bright spots and dark spots. S22, detecting the image data of the training data set based on the type of bad pixels, and determining the bad pixels in the image data of the training data set; The detecting of the image data of the training data set based on the type of bad pixels includes: S221, bright spot detection; S222, dark spot detection; S223, determining bad pixels in the image data of the training data set.
3. The laser camera temperature compensation method based on visual correction according to claim 2, characterized in that: The bright spot detection comprises the following steps: Set a 3×3 detection window and divide the eight pixels in the neighborhood of the pixel to be detected into two parts. , , , and , , , , set the corresponding pixel gray values to , , , and , , , ; Determine the position of the pixel to be detected based on the four neighboring pixels, and set the corresponding bright spot detection judgment threshold; The bright spot threshold parameter determination formula is as follows: in, , , , is the gray value of the four neighboring pixels, that is , , , or , , , ; To determine the threshold parameter for bright spots, when the pixel to be detected is in the light spot, , Indicates the threshold parameter of the pixel to be detected in the spot. When the pixel to be detected is in the background, , The threshold parameter indicating that the pixel to be detected is in the background; represents the mean function, represents the threshold determination function, Represents the global grayscale mean; Based on the determined bright spot threshold parameters , according to the pixel to be detected and the bright spot threshold parameter Whether the difference is greater than the maximum grayscale value of the four neighboring pixels, determine whether the pixel to be detected is a bright spot; in, is the pixel detection result, when When it is 1, it means the pixel to be detected is a bright spot. When it is 0, it means that the pixel to be detected is a normal pixel; represents the bright pixel detection result function, max represents the maximum value function, is the pixel to be detected.
4. The laser camera temperature compensation method based on visual correction according to claim 2, characterized in that: The dark spot detection comprises the following steps: set up is the threshold parameter for judging dark spots, Value →0, → indicates close; in, is the pixel detection result, when When it is 1, it means the pixel to be detected is a dark point. When it is 0, it means that the pixel to be detected is a normal pixel; It represents the dark pixel detection result function, and min represents the minimum value function.
5. The laser camera temperature compensation method based on visual correction according to claim 2, characterized in that: Determining bad pixels in the image data of the training data set comprises the following steps: in, It represents the bad pixel detection result function. When the results of the pixel to be detected in both the bright spot detection and the dark spot detection are normal pixels, the pixel to be detected is judged to be a normal pixel. Represents the coordinates of the pixel to be detected.
6. A system for implementing the laser camera temperature compensation method based on visual correction according to any one of claims 1 to 5, characterized in that: It includes a laser camera, a temperature detection module, a database, a bad pixel detection module, a temperature compensation model building module and a temperature compensation execution module; The laser camera is used to collect the captured calibration plate image in real time and transmit the captured calibration plate image to the database; The temperature detection module is used to collect the working temperature of the laser camera in real time, and transmit the collected working temperature of the laser camera to the database; The database is used to receive and store the captured image data and collected temperature data; The bad pixel detection module is used to detect each pixel in the captured image data to determine whether there is a bad pixel; The temperature compensation model establishment module is used to establish and determine the temperature compensation model according to the polynomial fitting method and the least squares method; The temperature compensation execution module is used to execute a determined temperature compensation model to compensate the captured image data.
Citation Information
Patent Citations
Temperature compensation calculation method for infrared binocular camera
CN114943774A
Depth camera temperature drift correction method, system and equipment based on structured light and medium
CN115205128A
