Infrared binocular camera temperature change compensation calculation method, device, equipment and medium

Through a temperature change compensation calculation method based on infrared binocular camera, the problem of high temperature drift suppression cost, cumbersome use and poor compensation effect in the prior art is solved, and high-precision temperature compensation is achieved, cost and complexity are reduced, and the adaptability and stability of the system are enhanced.

CN118885728BActive Publication Date: 2025-03-28GUANGZHOU AIMUYI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing infrared binocular camera temperature drift suppression method is expensive, has cumbersome use process, and the temperature compensation effect is not refined enough.

Method used

A calculation method for temperature change compensation of infrared binocular cameras is proposed. By obtaining the temperature and subpixel offset values ​​of the marking plate in the camera at each object distance, calculating the fitting parameters k and b based on a linear relationship, and performing parameter fitting and interpolation algorithm calculations, obtaining the values ​​of k and b at any object distance, real-time temperature compensation is achieved.

Benefits of technology

It improves the accuracy of temperature compensation, reduces equipment cost and complexity, simplifies the calibration process, enhances the adaptability and stability of the system, and can be widely used in a variety of application fields to meet the needs of high-precision imaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885728B_ABST
    Figure CN118885728B_ABST
Patent Text Reader

Abstract

The present application relates to the field of temperature compensation technology for infrared binocular cameras, and discloses a method, device, equipment and medium for calculating temperature change compensation for infrared binocular cameras. The method includes: obtaining the temperature and sub-pixel offset value of the marking plate inside the infrared binocular camera at each object distance; calculating the parameters k and b to be fitted based on the linear relationship between the temperature and the sub-pixel offset value and performing parameter fitting to obtain the law of how k and b change with the object distance; calculating the values ​​of k and b at any object distance through an interpolation algorithm based on the law to obtain the specific relationship between temperature and sub-pixel offset; obtaining the real-time temperature of the infrared binocular camera, and calculating the corresponding sub-pixel real-time offset value based on the specific relationship; calculating the corrected coordinates in the camera's internal imaging coordinate system based on the sub-pixel real-time offset value, and converting it to the actual world coordinate system, and solving it using matrix transformation. The present application can achieve dynamic real-time compensation, achieve low-cost suppression of the impact of camera temperature drift, and improve camera accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of temperature compensation for infrared binocular cameras, and in particular to a method, device, equipment and medium for calculating temperature change compensation for infrared binocular cameras. Background Art

[0002] Infrared binocular vision cameras are widely used in vehicle navigation, industrial inspection, surgical robots and other fields. With the rapid development of these fields and the increasing maturity of infrared technology, the requirements for the accuracy of temperature change compensation calculation of infrared binocular cameras are becoming higher and higher. However, the calibration accuracy of infrared binocular cameras is affected by many factors. In addition to the camera's own factors such as lens distortion and camera response speed, temperature will also have a certain impact on the calibration accuracy. On the one hand, temperature will cause mechanical deformation inside electronic components, causing deformation of the imaging effect; on the other hand, the refractive index of the optical material in the camera lens will also change with temperature, affecting the imaging effect. This phenomenon is called temperature drift. The accuracy of the camera calibration result will directly affect the accuracy of the results produced during camera operation, and is an important prerequisite for subsequent work. Therefore, temperature drift needs to be eliminated or suppressed.

[0003] At present, the commonly used methods for suppressing camera temperature drift are generally divided into two categories: hardware and software. The most direct way to suppress temperature drift is to ensure the temperature stability of the imaging system, so directly using hardware to control the temperature is often the most direct and effective method, but this type of method often has disadvantages such as high cost and cumbersome use, and it will increase the complexity of the camera structure, so it can only be applied to some scenarios. The method of using software for correction and compensation can greatly reduce the cost of use and expand its application scenarios. In the past, some temperature compensation methods were to establish a temperature compensation index table, and directly apply the existing fitting equations of temperature compensation for temperature compensation in actual use. If the number of temperature compensation fitting equations in the temperature compensation index table is too small, it is impossible to perform fine temperature compensation at any object distance and position. However, increasing the number of temperature compensation fitting equations in the temperature compensation index table requires a large number of experiments for mathematical modeling, and the process is very cumbersome.

[0004] Therefore, the existing camera temperature drift suppression methods are expensive, cumbersome to use, and the temperature compensation effect is not refined enough, which needs to be solved urgently. Summary of the invention

[0005] The main purpose of this application is to provide a method, device, equipment and medium for calculating temperature change compensation for an infrared binocular camera, aiming to solve the technical problems that the existing camera temperature drift suppression method is expensive, the use process is cumbersome and the temperature compensation effect is not sufficiently refined.

[0006] The first aspect of the present application provides a method for calculating temperature change compensation for an infrared binocular camera, comprising:

[0007] Obtain the temperature of the marker plate inside the infrared binocular camera at each object distance and the corresponding sub-pixel offset value;

[0008] Based on the linear relationship between the temperature and the corresponding sub-pixel offset value, the parameters k and b to be fitted are calculated;

[0009] Perform parameter fitting based on the parameters k and b to be fitted, and obtain the law of how k and b change with the object distance;

[0010] Based on the rule, the values ​​of k and b at any object distance are calculated by an interpolation algorithm to obtain the specific relationship between temperature and sub-pixel offset;

[0011] Obtain the real-time temperature of the infrared binocular camera, and calculate the corresponding sub-pixel real-time offset value based on the specific relationship between temperature and sub-pixel offset;

[0012] Based on the real-time sub-pixel offset value, the corrected coordinates in the camera's internal imaging coordinate system are calculated;

[0013] The corrected coordinates are converted from the camera's internal imaging coordinate system to the actual world coordinate system, and are solved using matrix transformation to complete temperature compensation.

[0014] Furthermore, the step of calculating the parameters k and b to be fitted based on the linear relationship between the temperature and the corresponding sub-pixel offset value includes:

[0015] The first formula of the linear equation: y=kt+b is used to calculate the parameters k and b to be fitted; wherein y is the offset value of the sub-pixel point, t is the temperature, and k and b are both equation parameters.

[0016] Furthermore, the step of performing parameter fitting based on the parameters to be fitted k and b to obtain the law of how k and b change with the object distance includes:

[0017] The parameters of k and b are fitted by the following formula 2 and formula 3 to obtain the law of k and b changing with the object distance:

[0018] Formula 2: k = m k l+n k

[0019] Formula 3: b = m b l+n b

[0020] Wherein, l is the distance between the camera and the object, i.e., the object distance; m k and n k is the parameter of the equation between k and object distance l; m b and n b It is the parameter of the equation of b and object distance l.

[0021] Furthermore, the step of calculating the values ​​of k and b at any object distance by an interpolation algorithm based on the rule to obtain the specific relationship between temperature and sub-pixel offset includes:

[0022] Obtain an input object distance, and substitute the object distance into Formula 2 and Formula 3 to calculate the values ​​of k and b;

[0023] Based on the values ​​of k and b, the specific relationship between temperature and sub-pixel offset is calculated through the linear relationship between temperature and the corresponding sub-pixel offset value.

[0024] Furthermore, the step of obtaining the real-time temperature of the infrared binocular camera and calculating the corresponding sub-pixel real-time offset value based on the specific relationship between the temperature and the sub-pixel offset includes:

[0025] Acquiring the real-time temperature of the infrared binocular camera based on the built-in temperature sensor of the infrared binocular camera;

[0026] Based on the real-time temperature, the corresponding sub-pixel real-time offset value is calculated through the specific relationship between the temperature and the sub-pixel offset.

[0027] Furthermore, the step of calculating the corrected coordinates in the camera internal imaging coordinate system based on the real-time sub-pixel offset value includes:

[0028] Obtaining the real-time offset value of the sub-pixel point;

[0029] Get the coordinates of the camera's internal marker points;

[0030] The real coordinates of the marking point are obtained by subtracting the sub-pixel real-time offset value from the coordinates of the marking point inside the camera, that is, the corrected coordinates in the imaging coordinate system inside the camera.

[0031] Furthermore, the step of converting the corrected coordinates from the camera internal imaging coordinate system to the actual world coordinate system and solving using matrix transformation includes:

[0032] Based on the camera calibration parameters, construct the transformation matrix from the camera's internal imaging coordinate system to the actual world coordinate system;

[0033] Substitute the corrected coordinates into the transformation matrix, perform matrix operations, and obtain the coordinates in the actual world coordinate system.

[0034] The second aspect of the present application provides a temperature change compensation calculation device for an infrared binocular camera, comprising:

[0035] An acquisition module is used to obtain the temperature of the marking plate in the infrared binocular camera at each object distance and the corresponding sub-pixel offset value;

[0036] A linear calculation module, used for calculating the parameters k and b to be fitted based on the linear relationship between the temperature and the corresponding sub-pixel offset value;

[0037] A fitting module, used for performing parameter fitting based on the parameters k and b to be fitted, and obtaining a law of how k and b change with object distance;

[0038] An interpolation calculation module, used to calculate the values ​​of k and b at any object distance through an interpolation algorithm based on the rule, and obtain a specific relationship between temperature and sub-pixel offset;

[0039] A real-time calculation module is used to obtain the real-time temperature of the infrared binocular camera and calculate the corresponding sub-pixel real-time offset value based on the specific relationship between temperature and sub-pixel offset;

[0040] A correction module, used to calculate the corrected coordinates in the camera's internal imaging coordinate system based on the real-time sub-pixel offset value;

[0041] The conversion module is used to convert the corrected coordinates from the camera's internal imaging coordinate system to the actual world coordinate system, and use matrix transformation to solve and complete temperature compensation.

[0042] The third aspect of the present application provides an infrared binocular camera temperature change compensation calculation device, comprising:

[0043] processor;

[0044] Memory for storing computer programs;

[0045] Wherein, when the processor executes the computer program, the infrared binocular camera temperature change compensation calculation method described in any one of the above is implemented.

[0046] A fourth aspect of the present application provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the infrared binocular camera temperature change compensation calculation method described in any one of the above is implemented.

[0047] Beneficial effects:

[0048] This application establishes a dynamic mathematical model through an interpolation algorithm to obtain the specific parameters of the fitting curve at any object distance, so as to obtain the fitting curve of the sub-pixel offset of the compensation temperature under each object distance state, thereby obtaining the corresponding temperature compensation correction parameters, which greatly improves the accuracy of temperature compensation. The dynamic real-time compensation capability can flexibly adjust the sub-pixel offset according to the real-time temperature change of the camera to adapt to a variety of environmental conditions. Compared with traditional hardware solutions, this compensation method based on software algorithms reduces equipment cost and complexity, simplifies the calibration process, and improves work efficiency. The interpolation algorithm calculates the parameters at any object distance, which makes the method highly adaptable and can be widely used in a variety of application fields to meet the growing demand for high-precision imaging. In summary, this method has significant beneficial effects in improving imaging accuracy, reducing costs and enhancing system stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 This is a schematic diagram of the steps of a method for calculating temperature change compensation for an infrared binocular camera according to an embodiment of the present application;

[0050] Figure 2 This is a schematic block diagram of the structure of a temperature change compensation calculation device for an infrared binocular camera according to an embodiment of the present application;

[0051] Figure 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the present application;

[0052] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] It will be appreciated by those skilled in the art that, unless expressly stated, the singular forms "one", "above", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when an element is said to be "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may also be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any module and all combinations of one or more associated listed items.

[0055] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0056] Reference Figure 1 The present application embodiment provides a method for calculating temperature change compensation of an infrared binocular camera, comprising the following steps S1-S7:

[0057] S1, obtaining the temperature of the marking plate in the infrared binocular camera at each object distance and the corresponding sub-pixel offset value;

[0058] S2, calculating the parameters k and b to be fitted based on the linear relationship between the temperature and the corresponding sub-pixel offset value;

[0059] S3, performing parameter fitting based on the parameters to be fitted k and b, and obtaining a law of how k and b change with object distance;

[0060] S4. Calculate the values ​​of k and b at any object distance by using an interpolation algorithm based on the rule to obtain a specific relationship between temperature and sub-pixel offset;

[0061] S5. Obtain the real-time temperature of the infrared binocular camera, and calculate the corresponding sub-pixel real-time offset value based on the specific relationship between the temperature and the sub-pixel offset;

[0062] S6. Based on the real-time sub-pixel offset value, the corrected coordinates in the camera internal imaging coordinate system are calculated;

[0063] S7. Convert the corrected coordinates from the camera internal imaging coordinate system to the actual world coordinate system, use matrix transformation to solve, and complete temperature compensation.

[0064] In step S1, data is collected based on an infrared binocular camera and a marking plate with a mark, and the distance between the camera and the marking plate is adjusted to ensure that the camera can collect multiple sets of relevant data at different object distances. At the same time, it is necessary to ensure that the camera can clearly capture the image of the marking plate during the movement process to ensure the validity of subsequent data. For example, starting from 1300mm, it gradually increases to 2300mm, and the object distance is adjusted by 100mm each time, so that 11 sets of relevant data at object distances can be collected; during each movement, the temperature of the camera is recorded in real time using a temperature sensor, and then the captured image is analyzed by image processing technology, feature points are extracted and their sub-pixel offset values ​​are calculated; the corresponding camera temperature and the corresponding sub-pixel offset value at each collected object distance are systematically recorded in the database to form a complete data set, which provides the necessary basis for subsequent calculations. In this step, by accurately obtaining the temperature and sub-pixel offset values ​​of the camera at different object distances, a quantitative relationship between temperature change and imaging offset can be established.

[0065] In step S2, based on the obtained marking plate temperature at different object distances and its corresponding sub-pixel offset value. These data form a scatter plot containing multiple points, with the horizontal axis being the temperature and the vertical axis being the sub-pixel offset value. It is assumed that there is a linear relationship between temperature and sub-pixel offset, in the form of y=kt+b, where y is the offset value of the sub-pixel point, t is the temperature, k and b are both equation parameters, (k is the slope, indicating the effect of temperature change on the sub-pixel offset value, and b is the intercept, indicating the offset value when the temperature is zero.) Linear fitting can accurately describe the relationship between temperature and sub-pixel offset, ensuring the scientific nature of the compensation calculation. The assumption of a linear relationship reduces the computational complexity of the calculation process; it is suitable for data acquisition at a variety of object distances, enhances the adaptability of the model, and can handle temperature changes in different scenarios.

[0066] In step S3, in step S1, the camera temperature and its corresponding sub-pixel offset value at different object distances have been obtained. At this time, the k and b values ​​are obtained based on the linear relationship between temperature and sub-pixel offset. These data will be used as input for further parameter fitting. First, it is necessary to analyze the k and b values ​​at different object distances. By associating the obtained k and b data points with the object distance data respectively, the potential relationship between the object distance, k value and b value is evaluated to form a three-dimensional scatter plot containing object distance, k and b, and the inherent law between these variables is found, so as to establish a more accurate model to describe the relationship between them. The corresponding expression will be used as a temperature compensation model to predict the sub-pixel offset value according to the temperature and object distance of the camera in practical applications. When the camera works at different object distances, the corresponding sub-pixel offset value can be obtained by measuring the temperature of the camera and inputting it into the model. Then, this offset value is used to correct the image to eliminate the influence of temperature change on the imaging quality. The technical advantage of step S3 is that it can train and optimize the model through a large amount of experimental data, so that the model can accurately describe the relationship between object distance, temperature and sub-pixel offset value. This data-driven approach is more scientific and reliable than traditional empirical formulas or simplified models. In addition, this approach has good scalability and flexibility, and can adjust and optimize the model according to different actual application scenarios.

[0067] In step S4, the relationship between the object distance, temperature, k and b values ​​obtained in step S3 is used to calculate the k and b values ​​at any object distance through an interpolation algorithm; the data set from step S3 needs to be sorted, including the k and b values ​​at different object distances. These data are usually presented in the form of a three-dimensional scatter plot, with the horizontal axis being the object distance, the vertical axis being the k value, and the vertical plane being the b value. Through these data, the trend and law between the object distance and the k and b values ​​can be identified. Next, an appropriate interpolation algorithm is selected, such as linear interpolation, spline interpolation, and Lagrange interpolation. When selecting an interpolation method, the distribution characteristics of the data and the required accuracy need to be considered. For example, if the data shows an obvious linear trend, linear interpolation may be the simplest and most effective choice; if the data changes are more complex, spline interpolation can provide smoother results. Taking linear interpolation as an example, it is assumed that the k and b values ​​at a specific object distance have been obtained. The known k and b values ​​can be used, combined with the change of the object distance, to predict the k and b values ​​at other object distances through linear equations (based on the linear relationship in step 2). The key to this step is to establish a linear relationship between k and b about the object distance according to the change of the object distance to ensure the accuracy of the calculation. Once the interpolation model is built, the corresponding k and b values ​​can be quickly obtained by inputting any object distance value. These calculation results will provide the necessary parameters for the subsequent steps, so that in practical applications, the sub-pixel offset value can be adjusted in time according to the temperature data obtained in real time. The main function of step S4 is to achieve effective derivation from known data to unknown data. Through the interpolation algorithm, the k and b values ​​can be accurately calculated at different object distances, thereby providing an accurate quantitative basis for the relationship between temperature and sub-pixel offset. This process not only improves the flexibility of the model, but also enhances the system's adaptability to various object distances and temperature changes. Compared with traditional methods, the interpolation algorithm can provide more accurate prediction results to ensure the accuracy of temperature compensation and sub-pixel offset calculations.

[0068] In step S5, the interpolation model constructed in step S4 is used to take the current temperature value as input to quickly calculate the corresponding k and b values. These values ​​are key parameters that describe the relationship between temperature and sub-pixel offset. According to the known k and b values, combined with real-time temperature data, the real-time offset value of the sub-pixel point is calculated by a linear equation or other applicable formula to accurately reflect the impact of temperature changes on the imaging effect. In this step, by obtaining the temperature in real time and calculating the sub-pixel offset, the system can quickly respond to environmental changes and ensure the stability of the imaging quality. The system can automatically adjust the sub-pixel offset according to different temperature conditions and working environments to adapt to a variety of application scenarios.

[0069] In step S6, the camera internal imaging coordinate system is corrected by using the sub-pixel real-time offset value calculated in the previous step, and the definition of the camera internal imaging coordinate system is clarified. Generally, the imaging coordinate system is centered on the camera optical axis, and the X-axis and Y-axis represent the horizontal and vertical directions of the image, respectively. Each pixel in the original image has a corresponding coordinate (x, y). For each pixel (x, y), correction is performed according to the real-time offset value. Assuming that the offset value is (dx, dy), the corrected coordinates (x', y') can be calculated by the following formula: [x'=x+dx][y'=y+dy]; In addition, in order to prevent the corrected coordinates from not falling at the integer pixel position due to the sub-pixel offset, an interpolation algorithm (such as bilinear interpolation) can be used to calculate the pixel value corresponding to the corrected coordinates. This process can ensure that the quality of the corrected image is not affected, and the processed new pixel value is updated to the image data. Ensure that the corrected coordinates are used when the image is output to reflect the real-time imaging effect. In this step, by correcting the camera internal imaging coordinate system based on the real-time offset value, the system can effectively compensate for the image distortion caused by temperature changes.

[0070] In step S7, the relationship between the camera internal imaging coordinate system and the real world coordinate system is established, and the transformation matrix is ​​usually obtained through a calibration process. The corrected coordinates are converted into homogeneous coordinate form, and the coordinates are transformed through the transformation matrix to calculate the real world coordinates. The corrected coordinates are updated to the system to ensure that the subsequent processing uses the temperature-compensated real world coordinates. This step ensures the accurate conversion from the camera internal imaging coordinate system to the real world coordinate system and the effective compensation of temperature effects.

[0071] Through steps S1-S7, the sub-pixel offset can be adjusted in real time according to the real-time temperature change of the camera to adapt to a variety of environmental conditions. Compared with traditional hardware solutions, this compensation method based on software algorithms reduces equipment cost and complexity, simplifies the calibration process, and improves work efficiency. The interpolation algorithm calculates the parameters at any object distance, making the method highly adaptable and widely used in multiple application fields to meet the growing demand for high-precision imaging. In summary, this method has significant beneficial effects in improving imaging accuracy, reducing costs, and enhancing system stability.

[0072] In one embodiment, the step of calculating the parameters k and b to be fitted based on the linear relationship between the temperature and the corresponding sub-pixel offset value includes:

[0073] S10. Calculate the parameters k and b to be fitted based on the first formula of the linear equation: y=kt+b; wherein y is the offset value of the sub-pixel point, t is the temperature, and k and b are both equation parameters.

[0074] In this embodiment, based on the linear relationship between temperature and the corresponding sub-pixel offset value, the first formula of the linear equation y=kt+b is used to calculate the parameters k and b to be fitted, and a mathematical model between temperature and image distortion is established. First, in order to collect enough experimental data to fit the equation, it is necessary to capture images and measure the corresponding sub-pixel offset values ​​under temperature conditions corresponding to different object distances. These data points will form the basis for fitting the linear equation. Next, the collected data points are used to solve the parameters k and b of the linear equation by the least squares method, and the best function matching of the data is found by minimizing the sum of squares of the errors. In this scenario, a straight line is found so that the sum of the vertical distances from all data points to this straight line is minimized. By solving the linear equation system, the parameters k and b can be obtained. Here, k represents the influence coefficient of temperature on the sub-pixel offset value, and b is the sub-pixel offset value when the temperature is 0 (or a certain reference temperature). These two parameters provide a simple mathematical model for predicting the sub-pixel offset value at any temperature.

[0075] This embodiment can more accurately compensate for image distortion caused by temperature changes by accurately fitting the linear relationship between temperature and sub-pixel offset values, thereby improving the accuracy and stability of the imaging system; and no complex hardware equipment is required.

[0076] In one embodiment, the step of performing parameter fitting based on the parameters to be fitted k and b to obtain the law of how k and b change with the object distance includes:

[0077] S20, performing parameter fitting on the k and b by the following formula 2 and formula 3, and obtaining the law of k and b changing with the object distance:

[0078] Formula 2: k = m k l+n k

[0079] Formula 3: b = m b l+n b

[0080] Wherein, l is the distance between the camera and the object, i.e., the object distance; m k and n k is the parameter of the equation between k and object distance l; m b and n b It is the parameter of the equation of b and object distance l.

[0081] In this embodiment, in order to more accurately compensate for the image distortion caused by the change of temperature and object distance, how the two parameters k and b change with the change of object distance l is further analyzed in this embodiment. First, the mathematical model of the change of k and b with the object distance l is determined, that is, Formula 2 and Formula 3 are used for fitting. Formula 2: describes the relationship between the change of k and the object distance l. Formula 3: describes the relationship between the change of b and the object distance l. Therefore, two new linear equations (Formula 2 and Formula 3) are used to describe the relationship between k and b and the object distance l. The collected data (sub-pixel offset value y and corresponding temperature t at different object distances, and the corresponding object distance l is recorded) are substituted into these two formulas, and these data will be used to fit the parameter m in Formula 2 and Formula 3. k 、n k 、m b and n b . The least squares method is used again to solve these parameters, and the best matching data function is found by minimizing the sum of squares of errors. The implementation process of this step can more accurately predict the sub-pixel offset value at any temperature and object distance by fitting the law of how k and b change with object distance, thereby performing more accurate image distortion compensation. Not only the effect of temperature on image distortion is considered, but also the effect of object distance on image distortion is further considered. This comprehensive consideration makes the model more comprehensive and accurate, and can better adapt to various complex scenarios in practical applications. In addition, the least squares method is used to solve the parameters. This method is simple and effective, can quickly find the best matching data function, and improves computational efficiency.

[0082] In one embodiment, the step of calculating the values ​​of k and b at any object distance by an interpolation algorithm based on the rule to obtain the specific relationship between temperature and sub-pixel offset includes:

[0083] S30, obtaining an input object distance, substituting the object distance into Formula 2 and Formula 3 to calculate values ​​of k and b;

[0084] S31. Based on the values ​​of k and b, a specific relationship between temperature and sub-pixel offset is calculated through a linear relationship between temperature and a corresponding sub-pixel offset value.

[0085] In this embodiment, the values ​​of k and b are calculated by the input object distance. First of all, it should be clear that k and b here are parameters in the linear fitting model, which represent the linear relationship between temperature and sub-pixel offset. Formula 2 and Formula 3 are empirical formulas obtained based on a large amount of experimental data or actual measurement data, which describe the mathematical relationship between object distance, k and b. First, an input object distance value will be received, which represents the distance between the measured object and the imaging device (such as a camera). Then, this object distance value will be substituted into Formula 2 and Formula 3. These two formulas are obtained in advance through statistical analysis or experimental verification, and they accurately describe the quantitative relationship between object distance and k and b parameters. After substituting the object distance value, it will be calculated according to the calculation rules of Formula 2 and Formula 3 to obtain the corresponding k and b values. The specific values ​​of k and b can be accurately determined based on the input object distance value. On the basis of obtaining k and b, the relationship between temperature t and sub-pixel offset value is established using a linear relationship. Generally, the relationship can be expressed as: y=kt+b, where y is the offset value of the sub-pixel point, t is the temperature, k and b are both equation parameters, (k is the slope, indicating the influence of temperature change on the sub-pixel offset value, and b is the intercept, indicating the offset value when the temperature is zero.) For different temperature values, substitute the above formula to calculate the corresponding sub-pixel offset value. This process can help the system obtain the change of image offset at different temperatures. It enables the subsequent system to dynamically adjust the linear relationship between temperature and sub-pixel offset according to the actual object distance. This dynamic adjustment can significantly improve the accuracy and reliability of the measurement results. This embodiment realizes the derivation from known data to unknown data. By inputting any object distance and calculating the corresponding k and b values, the system can dynamically adapt to different shooting conditions, ensuring that the system can obtain accurate k, b values ​​and sub-pixel offsets under different object distances and temperature conditions. This process not only enhances the flexibility of the system, but also ensures that accurate parameters can be obtained at different object distances, thereby optimizing the effect of subsequent image processing.

[0086] In one embodiment, the step of obtaining the real-time temperature of the infrared binocular camera and calculating the corresponding sub-pixel real-time offset value based on the specific relationship between the temperature and the sub-pixel offset includes:

[0087] S40, acquiring the real-time temperature of the infrared binocular camera based on the built-in temperature sensor of the infrared binocular camera;

[0088] S41. Based on the real-time temperature, calculate the corresponding sub-pixel real-time offset value according to the specific relationship between the temperature and the sub-pixel offset.

[0089] In this embodiment, the temperature data of the camera is captured and recorded in real time using the built-in temperature sensor of the infrared binocular camera. During the operation of the camera, due to the influence of environmental factors, its internal temperature may change due to the heating of components. This temperature change will directly affect the image quality, especially may cause sub-pixel offset of the image, thereby affecting the accuracy of subsequent image processing. After obtaining the real-time temperature data, based on the k and b values ​​previously calculated by fitting and interpolation, and the specific relationship between temperature and sub-pixel offset (i.e., the linear relationship of y=kt+b), the read real-time temperature is substituted into the model to calculate the corresponding sub-pixel real-time offset value. By calculating the offset value of the sub-pixel point in real time, the image can be accurately corrected, thereby eliminating the image offset caused by temperature changes and ensuring the accuracy of subsequent image processing.

[0090] In one embodiment, the step of calculating the corrected coordinates in the camera internal imaging coordinate system based on the sub-pixel real-time offset value includes:

[0091] S50, obtaining the real-time offset value of the sub-pixel point;

[0092] S51, obtaining the coordinates of the camera's internal marking points;

[0093] S52: Subtract the sub-pixel real-time offset value from the camera internal marker point coordinates to obtain the real marker point coordinates, that is, the corrected coordinates in the camera internal imaging coordinate system.

[0094] In this embodiment, the system first needs to obtain the sub-pixel real-time offset value from the previous calculation. The sub-pixel real-time offset value is calculated based on the real-time temperature to ensure that it can reflect the impact of the current environment on the imaging. The sub-pixel offset value can be read and stored in real time through the program interface to obtain the marker coordinates of the preset marker from the camera. These markers are the positions presented by the marker plate in the coordinate system inside the camera for subsequent offset calculations. The coordinate information of the marker is read and stored through the camera control system. These coordinates may be stored in the form of a two-dimensional or three-dimensional array, depending on the imaging model of the camera. The corrected coordinates are obtained by subtracting the sub-pixel real-time offset value from the coordinates of the marker inside the camera. Through real-time sub-pixel offset calculation, the system can achieve high-precision coordinate correction during image processing. The corrected coordinate mapping improves the robustness of the system, reduces the errors caused by environmental changes, and makes positioning and measurement more accurate. The corrected coordinates make the image clearer and more accurate, which can effectively improve the image quality. This embodiment not only ensures the accuracy of camera imaging, but also improves the overall image quality through real-time data processing.

[0095] In one embodiment, the step of converting the corrected coordinates from the camera internal imaging coordinate system to the actual world coordinate system and solving using matrix transformation includes:

[0096] S60, constructing a transformation matrix from the camera internal imaging coordinate system to the actual world coordinate system based on the camera calibration parameters;

[0097] S61. Substitute the corrected coordinates into the transformation matrix, perform matrix operations, and obtain the coordinates in the actual world coordinate system.

[0098] In this embodiment, constructing a transformation matrix from the camera's internal imaging coordinate system to the real world coordinate system can ensure that the position of the object in the image can be accurately mapped to the real world. First, it is necessary to obtain the internal and external parameters of the camera, which describe the camera's imaging characteristics and its position and posture relative to the real world. On the basis of camera calibration, a corresponding mathematical model can be established to describe the mapping relationship from the camera's internal imaging coordinate system to the real world coordinate system. This model is usually represented by a transformation matrix, which contains internal parameters such as the camera's focal length, principal point position, distortion coefficient, and external parameters such as the camera's rotation matrix and translation vector. Through these parameters, each pixel in the image captured by the camera can be mapped to a three-dimensional coordinate point in the real world. Substitute the corrected coordinates into the transformation matrix for matrix operations to obtain the coordinates in the real world coordinate system. Through calculation, the accurate position of each pixel in the real world can be obtained, thereby realizing accurate measurement and positioning of the object position. This embodiment can not only accurately map the information in the image captured by the camera to the real world, but also eliminate the error caused by temperature drift caused by factors such as temperature changes in the environment by mapping the corrected coordinates to the real world coordinate system.

[0099] refer to Figure 2 , a temperature change compensation calculation device for an infrared binocular camera, comprising:

[0100] An acquisition module 100 is used to acquire the temperature of the marking plate in the infrared binocular camera at each object distance and the corresponding sub-pixel offset value;

[0101] A linear calculation module 200, used to calculate the parameters k and b to be fitted based on the linear relationship between the temperature and the corresponding sub-pixel offset value;

[0102] A fitting module 300 is used to perform parameter fitting based on the parameters k and b to be fitted, and obtain the law of how k and b change with the object distance;

[0103] An interpolation calculation module 400 is used to calculate the values ​​of k and b at any object distance through an interpolation algorithm based on the rule, and obtain a specific relationship between temperature and sub-pixel offset;

[0104] A real-time calculation module 500 is used to obtain the real-time temperature of the infrared binocular camera and calculate the corresponding sub-pixel real-time offset value based on the specific relationship between the temperature and the sub-pixel offset;

[0105] A correction module 600, for calculating the corrected coordinates in the camera internal imaging coordinate system based on the real-time sub-pixel offset value;

[0106] The conversion module 700 is used to convert the corrected coordinates from the camera internal imaging coordinate system to the actual world coordinate system, and use matrix transformation to solve and complete temperature compensation.

[0107] Furthermore, the linear calculation module 200 includes:

[0108] The linear calculation subunit is used to calculate the parameters k and b to be fitted based on the first formula of the linear equation: y=kt+b; wherein y is the offset value of the sub-pixel point, t is the temperature, and k and b are both equation parameters.

[0109] Furthermore, the fitting module 300 includes:

[0110] The fitting subunit is used to perform parameter fitting on the k and b by using the following formula 2 and formula 3 to obtain the law of k and b changing with the object distance:

[0111] Formula 2: k = m k l+n k

[0112] Formula 3: b = m b l+n b

[0113] Wherein, l is the distance between the camera and the object, i.e., the object distance; m k and n k is the parameter of the equation between k and object distance l; m b and n b It is the parameter of the equation of b and object distance l.

[0114] Furthermore, the interpolation calculation module 400 includes:

[0115] An object distance substitution unit, used to obtain an input object distance, and substitute the object distance into Formula 2 and Formula 3 to calculate the values ​​of k and b;

[0116] The relationship calculation unit is used to calculate the specific relationship between the temperature and the sub-pixel point offset based on the values ​​of k and b through the linear relationship between the temperature and the corresponding sub-pixel offset value.

[0117] Furthermore, the above-mentioned real-time calculation module 500 includes:

[0118] A real-time acquisition subunit, used for acquiring the real-time temperature of the infrared binocular camera based on the built-in temperature sensor of the infrared binocular camera;

[0119] The real-time offset calculation unit is used to calculate the corresponding sub-pixel real-time offset value based on the real-time temperature through the specific relationship between the temperature and the sub-pixel offset.

[0120] Furthermore, the correction module 600 includes:

[0121] A first acquisition unit, used to acquire the real-time offset value of the sub-pixel point;

[0122] A coordinate acquisition unit, used to acquire the coordinates of the internal marking points of the camera;

[0123] The computing unit is used to obtain the real coordinates of the marking point by subtracting the real-time offset value of the sub-pixel point from the coordinates of the marking point inside the camera, that is, the corrected coordinates in the imaging coordinate system inside the camera.

[0124] Furthermore, the conversion module 700 includes:

[0125] A matrix transformation unit, used to construct a transformation matrix from the camera's internal imaging coordinate system to the actual world coordinate system based on the camera calibration parameters;

[0126] The transformation substitution unit is used to substitute the corrected coordinates into the transformation matrix, perform matrix operations, and obtain the coordinates in the actual world coordinate system.

[0127] Reference Figure 3 In an embodiment of the present application, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a network interface and a database connected by a bus. Among them, the processor designed by the computer is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores operations, computer programs and databases. The memory provides an environment for the operation and computer program in the non-volatile storage medium. The database of the computer device is used to store data such as the calculation method for temperature change compensation of the infrared binocular camera. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by a processor, a temperature change compensation calculation method for an infrared binocular camera is implemented, comprising the following steps: obtaining the temperature of a marking plate in an infrared binocular camera at each object distance and a corresponding sub-pixel offset value; calculating parameters k and b to be fitted based on a linear relationship between the temperature and the corresponding sub-pixel offset value; performing parameter fitting based on the parameters k and b to be fitted to obtain a law of how k and b change with the object distance; calculating the values ​​of k and b at any object distance through an interpolation algorithm based on the law to obtain a specific relationship between temperature and sub-pixel offset; obtaining the real-time temperature of the infrared binocular camera, and calculating the corresponding real-time offset value of the sub-pixel point based on the specific relationship between the temperature and the sub-pixel point offset; calculating the corrected coordinates in the camera's internal imaging coordinate system based on the sub-pixel point real-time offset value; converting the corrected coordinates from the camera's internal imaging coordinate system to an actual world coordinate system, solving them using matrix transformation, and completing temperature compensation.

[0128] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for calculating temperature change compensation for an infrared binocular camera is implemented, including the following steps: obtaining the temperature of a marking plate inside the infrared binocular camera at each object distance and the corresponding sub-pixel offset value; calculating parameters k and b to be fitted based on a linear relationship between the temperature and the corresponding sub-pixel offset value; performing parameter fitting based on the parameters k and b to be fitted to obtain a law of how k and b change with the object distance; calculating the values ​​of k and b at any object distance through an interpolation algorithm based on the law to obtain a specific relationship between temperature and sub-pixel offset; obtaining the real-time temperature of the infrared binocular camera, and calculating the corresponding sub-pixel real-time offset value based on the specific relationship between the temperature and the sub-pixel offset; calculating the corrected coordinates in the camera's internal imaging coordinate system based on the sub-pixel real-time offset value; converting the corrected coordinates from the camera's internal imaging coordinate system to the actual world coordinate system, solving them using matrix transformation, and completing temperature compensation.

[0129] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in the present application and used in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0130] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for calculating temperature change compensation for an infrared binocular camera, characterized in that: include: Obtain the temperature of the marker plate inside the infrared binocular camera at each object distance and the corresponding sub-pixel offset value; Based on the linear relationship between the temperature and the corresponding sub-pixel offset value, the slope k and the intercept b of the parameters to be fitted are calculated; Perform parameter fitting based on the parameters k and b to be fitted, and obtain the law of how k and b change with the object distance; Based on the rule, the values ​​of k and b at any object distance are calculated by an interpolation algorithm to obtain the specific relationship between temperature and sub-pixel offset; Obtain the real-time temperature of the infrared binocular camera, and calculate the corresponding sub-pixel real-time offset value based on the specific relationship between temperature and sub-pixel offset; Based on the real-time sub-pixel offset value, the corrected coordinates in the camera's internal imaging coordinate system are calculated; The corrected coordinates are converted from the camera's internal imaging coordinate system to the actual world coordinate system, and are solved using matrix transformation to complete temperature compensation; The parameters of k and b are fitted by the following formula 2 and formula 3 to obtain the law of k and b changing with the object distance: Formula 2: k = m k l+n k Formula 3: b = m b l+n b Wherein, l is the distance between the camera and the object, i.e., the object distance; m k and n k is the parameter of the equation between k and object distance l; m b and n b It is the parameter of the equation of b and object distance l.

2. The temperature change compensation calculation method for an infrared binocular camera according to claim 1, characterized in that: The step of calculating the parameters k and b to be fitted based on the linear relationship between the temperature and the corresponding sub-pixel offset value comprises: The parameters k and b to be fitted are calculated based on the first formula of the linear equation: y=kt+b; wherein y is the offset value of the sub-pixel point, and t is the temperature.

3. The temperature change compensation calculation method for an infrared binocular camera according to claim 1, characterized in that: The step of calculating the values ​​of k and b at any object distance by an interpolation algorithm based on the rule to obtain the specific relationship between temperature and sub-pixel offset includes: Obtain an input object distance, and substitute the object distance into Formula 2 and Formula 3 to calculate the values ​​of k and b; Based on the values ​​of k and b, the specific relationship between temperature and sub-pixel offset is calculated through the linear relationship between temperature and the corresponding sub-pixel offset value.

4. The temperature change compensation calculation method for an infrared binocular camera according to claim 1, characterized in that: The step of obtaining the real-time temperature of the infrared binocular camera and calculating the corresponding sub-pixel real-time offset value based on the specific relationship between the temperature and the sub-pixel offset includes: Acquiring the real-time temperature of the infrared binocular camera based on the built-in temperature sensor of the infrared binocular camera; Based on the real-time temperature, the corresponding sub-pixel real-time offset value is calculated through the specific relationship between the temperature and the sub-pixel offset.

5. The temperature change compensation calculation method for an infrared binocular camera according to claim 1, characterized in that: The step of calculating the corrected coordinates in the camera internal imaging coordinate system based on the real-time sub-pixel offset value includes: Obtaining the real-time offset value of the sub-pixel point; Get the coordinates of the camera's internal marker points; The real coordinates of the marking point are obtained by subtracting the sub-pixel real-time offset value from the coordinates of the marking point inside the camera, that is, the corrected coordinates in the imaging coordinate system inside the camera.

6. The temperature change compensation calculation method for an infrared binocular camera according to claim 1, characterized in that: The step of converting the corrected coordinates from the camera internal imaging coordinate system to the actual world coordinate system and solving using matrix transformation includes: Based on the camera calibration parameters, construct the transformation matrix from the camera's internal imaging coordinate system to the actual world coordinate system; Substitute the corrected coordinates into the transformation matrix, perform matrix operations, and obtain the coordinates in the actual world coordinate system.

7. An infrared binocular camera temperature change compensation calculation device, used to execute the method described in any one of claims 1 to 6, characterized in that: include: An acquisition module is used to obtain the temperature of the marking plate in the infrared binocular camera at each object distance and the corresponding sub-pixel offset value; A linear calculation module, used to calculate the slope k and intercept b of the parameters to be fitted based on the linear relationship between the temperature and the corresponding sub-pixel offset value; A fitting module, used for performing parameter fitting based on the parameters k and b to be fitted, and obtaining a law of how k and b change with object distance; An interpolation calculation module, used to calculate the values ​​of k and b at any object distance through an interpolation algorithm based on the rule, and obtain a specific relationship between temperature and sub-pixel offset; A real-time calculation module is used to obtain the real-time temperature of the infrared binocular camera and calculate the corresponding sub-pixel real-time offset value based on the specific relationship between temperature and sub-pixel offset; A correction module, used to calculate the corrected coordinates in the camera's internal imaging coordinate system based on the real-time sub-pixel offset value; The conversion module is used to convert the corrected coordinates from the camera's internal imaging coordinate system to the actual world coordinate system, and use matrix transformation to solve and complete temperature compensation.

8. An infrared binocular camera temperature change compensation calculation device, characterized in that: include: processor; Memory for storing computer programs; Wherein, when the processor executes the computer program, the infrared binocular camera temperature change compensation calculation method described in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the infrared binocular camera temperature change compensation calculation method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Stereo camera dynamic calibration algorithm based on Harris corner mutual information matching

    CN110910456A

  • Three-dimensional calibration algorithm of long-focus binocular camera

    CN110969668A