A thermal image lens temperature focusing compensation method and system based on mathematical modeling

CN122430973APending Publication Date: 2026-07-21SHENZHEN NAIJIE ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610572502.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-28
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, the focusing curves of thermal imaging lenses are highly sensitive to temperature changes, which means that each lens needs to be calibrated individually in a high and low temperature chamber. This process is time-consuming and highly susceptible to the subjective influence of operators, making it impossible to achieve rapid batch adaptation.

Method used

By decomposing the temperature-focusing curve of a thermal imaging lens into a linear segment at the wide-angle end, a linear segment at the telephoto end, and a nonlinear inflection point segment, a corresponding mathematical model is established and combined into a general mathematical model. Data from a small number of reference temperatures are then used to fit and generate a complete curve for the entire temperature range.

Benefits of technology

It significantly shortened the calibration time from 2-3 days to a few hours, eliminated the subjective error of manual calibration, and improved production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122430973A_ABST
    Figure CN122430973A_ABST
Patent Text Reader

Abstract

The application provides a thermal imaging lens temperature focusing compensation method and system based on mathematical modeling, comprising: obtaining multiple focusing curves of the same type of basic thermal imaging lens at different temperatures; respectively establishing a first mathematical model of a wide-angle end linear segment changing with temperature, a second mathematical model of a telephoto end linear segment changing with temperature, and a third mathematical model of a nonlinear inflection point segment changing with temperature; combining the first mathematical model, the second mathematical model and the third mathematical model to form a general mathematical model for describing the focusing curve at any temperature; obtaining partial focusing curve data of a target lens at at least one reference temperature, fitting individual difference parameters of the target lens by using the general mathematical model, so as to determine the complete focusing curve of the target lens in the full temperature range; and outputting the corresponding focusing motor driving position according to the complete focusing curve. The application can solve the problem of long time consumption of individual calibration of each lens in the full temperature range in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of thermal imaging technology, and more specifically, to a method and system for temperature focusing compensation of thermal imaging lenses based on mathematical modeling. Background Technology

[0002] The focusing curve of thermal imaging zoom lenses is highly sensitive to temperature changes. The current industry practice is to calibrate the temperature profile of each lens in a high-low temperature chamber before it leaves the factory. This method is very time-consuming, typically requiring 2 to 3 days for calibration per lens, which is highly detrimental to large-volume, short-term product delivery. Furthermore, this method is significantly affected by the subjective judgment of the operators.

[0003] Existing technologies include solutions that collect temperature sensor data and compensate using lookup tables, but each lens still requires individual calibration, making rapid batch adaptation impossible. Therefore, a method is needed that can universally generate focusing curves at any temperature based on a small amount of calibration data using a mathematical model, in order to significantly reduce calibration time and cost. Summary of the Invention

[0004] The present invention aims to overcome the shortcomings of the prior art and provide a thermal imaging lens temperature focusing compensation method and system based on mathematical modeling, so as to solve the problem that each lens needs to be individually calibrated across the entire temperature range and the time consumption is too long in the prior art.

[0005] In a first aspect, the present invention provides a thermal imaging lens temperature focusing compensation method based on mathematical modeling, the method comprising: Obtain multiple focusing curves at different temperatures from similar basic thermal imaging lenses; The focusing curve is decomposed into a linear segment at the wide-angle end, a linear segment at the telephoto end, and a nonlinear inflection point segment between the two. A first mathematical model for the change of the linear segment at the wide-angle end with temperature, a second mathematical model for the change of the linear segment at the telephoto end with temperature, and a third mathematical model for the change of the nonlinear inflection point segment with temperature are established respectively. The first mathematical model, the second mathematical model, and the third mathematical model are combined to form a general mathematical model describing the focusing curve at any temperature; Acquire partial focusing curve data of the target lens at at least one reference temperature, and use the general mathematical model to fit the individual difference parameters of the target lens to determine the complete focusing curve of the target lens over the entire temperature range; The current temperature is detected in real time, and the corresponding focusing motor drive position is output according to the complete focusing curve.

[0006] Preferably, the step of decomposing the focusing curve into a wide-angle linear segment, a telephoto linear segment, and a nonlinear inflection point segment between the two includes: The focusing curve is used as input, and the focusing curve describes the relationship between the position of the focusing motor and the temperature. Calculate the rate of change of the slope at each point on the focusing curve; The region where the slope change rate is less than a first threshold and the continuous length exceeds a first length threshold is determined as a linear segment. The linear segment located at the starting temperature part of the focusing curve is designated as the wide-angle end linear segment, and the linear segment located at the ending temperature part of the focusing curve is designated as the telephoto end linear segment. The region located between the wide-angle end linear segment and the telephoto end linear segment, and whose slope change rate exceeds the second threshold, is determined to be the nonlinear inflection point segment.

[0007] Preferably, the first mathematical model is constructed in the following ways: Based on reference temperature Wide-angle linear equations As input, where Indicates temperature. Indicates the position of the focusing motor; Based on the variation of the slope and intercept of the linear segment at the wide-angle end with respect to the reference temperature at different temperatures, a first function of the slope as a function of temperature is fitted. and the second function of the intercept as a function of temperature ; Output arbitrary temperature Wide-angle linear model ; The second mathematical model is constructed in the same way as the first mathematical model, using a reference temperature. The following linear equations at the telescope end As input, based on the variation of the slope and intercept of the telescope's linear segment with respect to the reference temperature at different temperatures, a third function of the slope as a function of temperature is fitted. The fourth function of intercept as a function of temperature Output arbitrary temperature The following is a linear model of the telescope end. .

[0008] Preferably, the third mathematical model is constructed in the following ways: The inflection point position sequence at different temperatures is used as input, where the inflection point position is the temperature value corresponding to the turning point on the focusing curve from the linear segment at the wide-angle end to the linear segment at the telephoto end. The lower and upper temperature limits of the temperature range without inflection points are identified, and it is determined that when the temperature is higher than the upper temperature limit, the inflection point position shows a monotonically increasing trend with increasing temperature, and when the temperature is lower than the lower temperature limit, the inflection point position shows a monotonically decreasing trend with decreasing temperature. Fast Fourier transform is performed on the inflection point position sequences with temperatures above the upper limit temperature value and the inflection point position sequences with temperatures below the lower limit temperature value, respectively, to obtain the frequency domain fitting function, and then the inflection point position at any temperature is generated. The inflection point position is output as the third mathematical model.

[0009] Preferably, the step of acquiring partial focusing curve data of the target lens at at least one reference temperature and fitting individual difference parameters includes: The input consists of the complete focusing curve of the target lens at room temperature and a local focusing curve segment at an additional temperature point. Substituting the input into the general mathematical model, the individual difference parameters of the target lens are obtained by fitting using the least squares method.

[0010] Preferably, after determining the complete focusing curve of the target lens across the entire temperature range, a storage step is further included, the storage step comprising: The generated full-temperature-range focusing curve is used as input; The position of the focusing motor at each temperature is compressed into a lookup table using a variable step size method, and the first temperature step size is used in the temperature range where the inflection point changes drastically. A second temperature step size larger than the first temperature step size is used in the linear temperature range; The output of the lookup table is stored in non-volatile memory.

[0011] Preferably, the step of real-time detection of the current temperature and outputting the corresponding focusing motor drive position based on the complete focusing curve includes: The current temperature, detected in real time, is used as input; Determine whether the current temperature belongs to a temperature range without an inflection point; If the current temperature is between the lower and upper temperature values ​​of the no-inflection-point temperature range, then the first or second mathematical model is directly used for linear interpolation calculation to output the corresponding focusing motor drive position. If the current temperature is lower than the lower limit temperature value or higher than the upper limit temperature value, the complete focusing curve is invoked, and the focusing motor drive position is calculated segment by segment according to the current temperature range, and the focusing motor drive position is output.

[0012] Secondly, the present invention provides a thermal imaging lens temperature focusing compensation system based on mathematical modeling, comprising: The focus curve acquisition module is used to acquire multiple focus curves of the same type of basic thermal imaging lens at different temperatures; The decomposition module is used to decompose the focusing curve into a wide-angle linear segment, a telephoto linear segment, and a nonlinear inflection point segment between the two. The model building module is used to build a first mathematical model of the change of the linear segment at the wide-angle end with temperature, a second mathematical model of the change of the linear segment at the telephoto end with temperature, and a third mathematical model of the change of the nonlinear inflection point segment with temperature. The model combination module is used to combine the first mathematical model, the second mathematical model and the third mathematical model to form a general mathematical model describing the focusing curve at any temperature; The complete focus curve determination module is used to acquire partial focus curve data of the target lens at at least one reference temperature, and use the general mathematical model to fit the individual difference parameters of the target lens to determine the complete focus curve of the target lens in the entire temperature range. The drive position output module is used to detect the current temperature in real time and output the corresponding focus motor drive position according to the complete focus curve.

[0013] Thirdly, the present invention provides a readable medium including executable instructions, which, when executed by a processor of an electronic device, cause the electronic device to perform any of the methods described in the first aspect.

[0014] Fourthly, the present invention provides an electronic device including a processor and a memory storing execution instructions, wherein when the processor executes the execution instructions stored in the memory, the processor performs the method as described in any of the first aspects.

[0015] This invention provides a thermal imaging lens temperature focusing compensation method and system based on mathematical modeling. By decomposing the temperature-focusing curve of the thermal imaging lens into a linear segment at the wide-angle end, a linear segment at the telephoto end, and a nonlinear inflection point segment, and establishing mathematical models that change with temperature for each segment, a general mathematical model is obtained by combining them. Thus, only a small amount of focusing curve data at a reference temperature of the target lens is needed to fit and generate a complete curve for the entire temperature range. There is no need to calibrate each lens for the entire temperature range, which greatly shortens the calibration time and improves production efficiency.

[0016] The further effects of the aforementioned non-conventional preferred method will be explained below in conjunction with specific embodiments. Attached Figure Description

[0017] To more clearly illustrate the embodiments of the present invention or the existing technical solutions, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1This is a schematic diagram of a thermal imaging lens temperature focusing compensation method based on mathematical modeling, provided in an embodiment of the present invention. Figure 2 A schematic diagram of another thermal imaging lens temperature focusing compensation method based on mathematical modeling provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the composition of a thermal imaging lens temperature focusing compensation system based on mathematical modeling, provided in an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0020] See Figure 1 The image shown is a specific embodiment of a thermal imaging lens temperature focusing compensation method based on mathematical modeling provided by the present invention. In this embodiment, the thermal imaging lens temperature focusing compensation method based on mathematical modeling includes:

[0021] Step 101: Obtain multiple focusing curves at different temperatures for the same type of basic thermal imaging lens; Specifically, in this embodiment, the "same type" basic thermal imaging lens refers to a lens with the same optical design, mechanical structure, and temperature sensor model as the target lens to be compensated, typically from the same product series. The focusing curve is a function curve showing the change in the focusing motor position (unit: steps or pulses) with ambient temperature (unit: degrees Celsius) at a fixed zoom position. In this step, a basic lens is calibrated in a high and low temperature test chamber, for example, at 15 temperature points: -20℃, -15℃, -10℃, -5℃, 0℃, 5℃, 10℃, 15℃, 20℃, 25℃, 30℃, 35℃, 40℃, 45℃, and 50℃. After holding each temperature point for 30 minutes, the number of steps the focusing motor takes from the closest focusing distance to the farthest focusing distance is measured, and 15 focusing curves are recorded. The horizontal axis of each curve represents temperature, and the vertical axis represents the focusing motor position. These curves constitute the basic dataset for subsequent modeling.

[0022] Step 102: Decompose the focusing curve into a linear segment at the wide-angle end, a linear segment at the telephoto end, and a nonlinear inflection point segment between the two; Further, each focusing curve obtained in step 101 is used as input, which describes the relationship between the position of the focusing motor and temperature changes. First, the slope change rate at each point on the focusing curve is calculated. The slope change rate is the ratio of the absolute value of the slope difference between two adjacent points to the temperature difference, used to measure the curvature of the curve. Then, regions with a slope change rate less than a first threshold (e.g., 0.05) and a continuous length exceeding a first length threshold (e.g., covering more than 5 consecutive temperature points) are identified as linear segments. Among them, the linear segments located in the starting temperature part of the focusing curve (i.e., the low-temperature region, e.g., between -20℃ and 10℃) are designated as wide-angle end linear segments; the linear segments located in the ending temperature part of the focusing curve (i.e., the high-temperature region, e.g., between 30℃ and 50℃) are designated as telephoto end linear segments. Finally, the regions located between the wide-angle end linear segments and the telephoto end linear segments, where the slope change rate exceeds a second threshold (e.g., 0.2), are identified as nonlinear inflection point segments. Based on the above determination, each focusing curve is completely divided into three segments: a straight section at the wide-angle end, a curved section in the middle, and a straight section at the telephoto end. This decomposition is based on experimental findings: in the low and high temperature regions, the position of the focusing motor changes approximately linearly with temperature; while in the intermediate temperature region, due to the nonlinear effect of thermal expansion inside the lens, a clear inflection point appears.

[0023] Step 103: Establish the first mathematical model of the change of the linear segment at the wide-angle end with temperature, the second mathematical model of the change of the linear segment at the telephoto end with temperature, and the third mathematical model of the change of the nonlinear inflection point segment with temperature. The first mathematical model is constructed using a reference temperature. Wide-angle linear equations at (e.g., 20°C) As input, where Indicates temperature. This indicates the position of the focusing motor; based on the variation of the slope and intercept of the linear segment at the wide-angle end with respect to the reference temperature at different temperatures, a univariate linear regression method is used to fit the first function of the slope changing with temperature. and the second function of the intercept as a function of temperature For example, actual measurements have shown that the slope increases slightly with increasing temperature, which can be used... Formal expression, in which This is the slope temperature coefficient. The final output can be any temperature. Wide-angle linear model .

[0024] The second mathematical model is constructed in exactly the same way as the first mathematical model, except that the input is changed to a reference temperature. The following linear equations at the telescope end Based on the variation of the slope and intercept of the linear segment at the telescope end with respect to the reference temperature at different temperatures, a third function of the slope as a function of temperature is fitted. The fourth function of intercept as a function of temperature Output arbitrary temperature The following is a linear model of the telescope end. .

[0025] The third mathematical model is constructed by using a sequence of inflection point positions at different temperatures as input. These inflection points refer to the temperature values ​​corresponding to the transition points on the focusing curve from the linear segment at the wide-angle end to the linear segment at the telephoto end. Experimental data shows that within a certain intermediate temperature range (e.g., 25℃ to 28℃), the focusing curve does not exhibit a clear inflection point, appearing as a smooth straight line. When the temperature exceeds the upper limit of this range (28℃), the inflection point position monotonically increases with increasing temperature (i.e., the inflection point moves towards higher temperatures). When the temperature falls below the lower limit of this range (25℃), the inflection point position monotonically decreases with decreasing temperature (i.e., the inflection point moves towards lower temperatures). Based on this, the lower limit temperature value of the temperature range without inflection points is first identified. and upper limit temperature value Then, extract samples at temperatures higher than [a certain temperature]. The inflection point sequence and temperature are below The inflection point position sequence is obtained. For each sequence, a Fast Fourier Transform (FFT) is performed to transform it from the time domain (temperature domain) to the frequency domain, yielding a frequency domain fitting function. This function is composed of several superimposed sine and cosine components, capable of accurately fitting the complex nonlinear changes in inflection point position with temperature. Finally, the inflection point position at any temperature can be generated through inverse transform, and this inflection point position function is output as the third mathematical model. FFT is a deterministic mathematical transformation that does not require training data; its input is discrete (temperature, inflection point position) sampling points, and its output is a frequency domain coefficient sequence, which is then transformed into a continuous function through inverse transform.

[0026] Step 104: The first mathematical model, the second mathematical model, and the third mathematical model are combined to form a general mathematical model describing the focusing curve at any temperature; Furthermore, the general mathematical model in this embodiment is a piecewise function: below the lower limit of the interval without an inflection point... or above the upper limit At this time, the focusing motor position is directly given by the first mathematical model (wide-angle end) or the second mathematical model (telephoto end); within the temperature range without inflection points, the focusing curve is linear, and either the first or second mathematical model can be used for interpolation; in the inflection point region, it is necessary to combine the third mathematical model to determine the accurate location of the inflection point, thereby completely describing the shape of the entire curve. The core value of this general mathematical model is that it transforms the originally discrete and individualized temperature-focusing curve relationship into a set of continuous functions determined by a few parameters (such as the reference slope, temperature coefficient, FFT coefficient, etc.), thus allowing the entire curve to be inferred from a small amount of data.

[0027] Step 105: Obtain partial focus curve data of the target lens at at least one reference temperature, and use a general mathematical model to fit the individual difference parameters of the target lens in order to determine the complete focus curve of the target lens in the full temperature range. Further, this step specifically includes: taking the complete focusing curve of the target lens at room temperature (e.g., 20°C) and a segment of the local focusing curve at an additional temperature point (e.g., 40°C) as input. Substituting the above input data into the general mathematical model established in step 104, the least squares method is used for fitting. The goal of the least squares method is to minimize the sum of squared residuals between the measured focusing motor position and the model prediction. This is achieved by adjusting individual variability parameters in the model (e.g., baseline slope). , and temperature coefficient (etc.) to ensure the model output best matches the measured data. After fitting, a set of individual difference parameters adapted to the target lens is obtained. Substituting these parameters back into the general mathematical model, the complete focusing curve of the target lens at all operating temperatures (e.g., -20℃ to 50℃) can be calculated. This step solves the problem of traditional methods requiring full-temperature calibration for each lens, requiring only two temperature points (a complete curve plus a local segment) to complete the adaptation.

[0028] It should be noted that the target lens and the basic thermal imaging lens in step 101 are the same model products, but due to factors such as assembly errors of the back focal structure, differences in the installation position and accuracy of the temperature sensor, there are individual differences between the two. Therefore, the focusing curve of the basic lens cannot be directly mapped onto the target lens.

[0029] Step 106: Detect the current temperature in real time and output the corresponding focusing motor drive position based on the complete focusing curve.

[0030] Further, this step specifically includes: using the real-time detected current temperature as input (acquired by a temperature sensor installed inside or near the lens, with a sampling frequency typically of 1Hz). First, determine whether the current temperature falls within a temperature range without an inflection point, i.e., whether it is located within […]. , Between the lower and upper temperature limits. If the current temperature is between the lower and upper temperature limits, it means the focusing curve is approximately linear at that temperature. In this case, linear interpolation can be performed using either the first mathematical model (if the current focusing ring is near the wide-angle end) or the second mathematical model (if the current focusing ring is near the telephoto end) to obtain and output the corresponding focusing motor drive position. If the current temperature is below... or higher Then, the complete focusing curve generated in step 105 is called, and the focusing motor drive position is calculated segment by segment according to the specific segment where the current temperature is located (e.g., belonging to the wide-angle end linear segment, inflection point segment, or telephoto end linear segment), and the focusing motor drive position is finally output. This drive position is usually sent to the stepper motor or servo motor in the form of pulse count or PWM signal, driving the focusing lens group to move to the correct position, thereby realizing automatic compensation for temperature drift.

[0031] As can be seen from the above technical solution, the beneficial effects of this embodiment are: by decomposing the temperature-focus curve into a structure with linear ends and an inflection point in the middle, and establishing a general mathematical model, only a small amount of data from the target lens at two temperature points is needed to generate a complete curve for the entire temperature range, shortening the calibration time from 2-3 days to a few hours, and eliminating the subjective error of manual calibration.

[0032] Figure 1 The embodiments shown are merely basic examples of the method of the present invention. Other preferred embodiments of the method can be obtained by making certain optimizations and extensions based on them.

[0033] like Figure 2 The image shown is another specific embodiment of the thermal imaging lens temperature focusing compensation method based on mathematical modeling of the present invention. This embodiment further describes the method based on the foregoing embodiments, and includes the following steps:

[0034] Step 201: Use the generated full-temperature-range focusing curve as input; This embodiment, based on the previous embodiment, adds a storage optimization step to reduce real-time computation, making it suitable for resource-constrained embedded system scenarios. After step 105 of the previous embodiment is completed, complete focusing curve data of the target lens at 1°C intervals across the entire operating temperature range (e.g., -20°C to 50°C) has been obtained; that is, each temperature point corresponds to a curve showing the relationship between the focusing motor position and temperature. The total amount of this data depends on the temperature resolution and temperature range. If the interval is 1°C, there are 71 curves. If each curve is sampled at a 0.1mm focusing ring position interval, the data volume is large. To efficiently store and quickly retrieve data in the embedded microcontroller (MCU), data compression is required.

[0035] Step 202: Compress the focusing motor position at each temperature into a lookup table using a variable step size method, and use the first temperature step size in the temperature range where the inflection point changes drastically. Furthermore, the variable step size method refers to dynamically adjusting the temperature sampling interval based on the nonlinearity of the focusing motor position change with temperature. Specifically, in temperature ranges where the inflection point changes drastically (e.g., within ±5℃ of the inflection point), the rate of change of the focusing motor position with temperature is large. If the sampling step size is too large, linear interpolation will introduce a large error. Therefore, a smaller first temperature step size (e.g., 0.5℃) is used in this range to ensure high accuracy. In this embodiment, the lookup table is a two-dimensional array. The first dimension is the temperature sampling point, and the second dimension is the focusing motor position at the corresponding temperature (or a complete mapping of the focusing motor position to the focusing ring position). The lookup table is stored in non-volatile memory (such as EEPROM or Flash) and loaded into RAM after system power-on for fast access.

[0036] Step 203: Use a second temperature step size larger than the first temperature step size in the linear segment temperature range; Furthermore, the linear segment temperature range refers to the temperature range corresponding to the linear segments at the wide-angle and telephoto ends. Within these ranges, the relationship between the focus motor position and temperature is approximately linear and changes slowly. Therefore, a larger second temperature step size (e.g., 2℃ to 5℃) can be used, significantly reducing storage space. In actual use, if the real-time temperature falls exactly between the sampling points, the focus motor position is calculated through linear interpolation. The lookup table generated by the variable step size is then written into the lens's non-volatile memory. For example, for a lens with an operating temperature of -20℃ to 50℃, if the inflection point region (e.g., 20℃ to 30℃) uses a 0.5℃ step size (21 points in total), and the linear segment uses a 2℃ step size (-20℃ to 18℃, 20 points in total; 32℃ to 50℃, 10 points in total), the total number of storage points is approximately 51, which is about 28% less than the 71 points sampled at 1℃ intervals, while the accuracy of the inflection point region is actually improved.

[0037] As can be seen from the above technical solutions, the beneficial effects of this embodiment are: by using a variable step size compressed lookup table, while ensuring high accuracy in the inflection point area, storage space and real-time computing overhead are reduced, which is particularly suitable for embedded thermal imaging systems with limited resources.

[0038] This invention also provides a thermal imaging lens temperature focusing compensation system based on mathematical modeling. See also Figure 3 The image shown is a specific embodiment of a thermal imaging lens temperature focusing compensation system based on mathematical modeling provided by the present invention. This embodiment of the system is used to execute... Figures 1-2 The physical apparatus of the method. Its technical solution is essentially the same as the embodiments described above, and the corresponding descriptions in the embodiments above also apply to this embodiment. The system includes:

[0039] The focus curve acquisition module 301 is configured to acquire multiple focus curves of the same type of basic thermal imaging lens at different temperatures; Decomposition module 302 is configured to decompose the focus curve into a wide-angle linear segment, a telephoto linear segment, and a non-linear inflection point segment between the two. The model building module 303 is configured to build a first mathematical model of the change of the linear segment at the wide-angle end with temperature, a second mathematical model of the change of the linear segment at the telephoto end with temperature, and a third mathematical model of the change of the nonlinear inflection point segment with temperature. The model combination module 304 is configured to combine a first mathematical model, a second mathematical model and a third mathematical model to form a general mathematical model describing the focusing curve at any temperature; The complete focus curve determination module 305 is configured to acquire partial focus curve data of the target lens at at least one reference temperature, and use a general mathematical model to fit the individual difference parameters of the target lens in order to determine the complete focus curve of the target lens in the full temperature range. The drive position output module 306 is configured to detect the current temperature in real time and output the corresponding focus motor drive position according to the complete focus curve.

[0040] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. The memory may include main memory, such as high-speed random-access memory (RAM), or it may also include non-volatile memory, such as at least one disk storage device. Of course, the electronic device may also include other hardware required for other services.

[0041] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. Buses can be categorized as address buses, data buses, and other types. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0042] Memory is used to store instructions for execution. Specifically, instructions for execution are computer programs that can be executed. Memory can include main memory and non-volatile memory, and it provides the processor with execution instructions and data.

[0043] In one possible implementation, the processor reads the corresponding execution instructions from non-volatile memory into memory and then executes them. Alternatively, it can obtain the corresponding execution instructions from other devices to form a thermal imaging lens temperature focusing compensation device based on mathematical modeling at the logical level. The processor executes the execution instructions stored in memory to implement the thermal imaging lens temperature focusing compensation method based on mathematical modeling provided in any embodiment of the present invention.

[0044] The above is as described in the present invention. Figure 3 The method for implementing a thermal imaging lens temperature focusing compensation system based on mathematical modeling, as provided in the illustrated embodiment, can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed through integrated logic circuits in the processor's hardware or through software instructions. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.

[0045] The steps of the method disclosed in the embodiments of this invention can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0046] This invention also proposes a readable medium storing execution instructions. When these instructions are executed by a processor of an electronic device, the device can perform a thermal imaging lens temperature focusing compensation method based on mathematical modeling provided in any embodiment of this invention, specifically for executing, for example... Figure 1 , Figure 2 The method shown.

[0047] The electronic devices in the foregoing embodiments may be computers.

[0048] Those skilled in the art will understand that embodiments of the present invention can be provided as methods or computer program products. Therefore, the present invention can be implemented in a completely hardware embodiment, a completely software embodiment, or a combination of software and hardware.

[0049] The various embodiments in this invention are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0050] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0051] The above are merely embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A thermal imaging lens temperature focusing compensation method based on mathematical modeling, characterized in that, The method includes: Obtain multiple focusing curves at different temperatures from similar basic thermal imaging lenses; The focusing curve is decomposed into a linear segment at the wide-angle end, a linear segment at the telephoto end, and a nonlinear inflection point segment between the two. A first mathematical model for the change of the linear segment at the wide-angle end with temperature, a second mathematical model for the change of the linear segment at the telephoto end with temperature, and a third mathematical model for the change of the nonlinear inflection point segment with temperature are established respectively. The first mathematical model, the second mathematical model, and the third mathematical model are combined to form a general mathematical model describing the focusing curve at any temperature; Acquire partial focusing curve data of the target lens at at least one reference temperature, and use the general mathematical model to fit the individual difference parameters of the target lens to determine the complete focusing curve of the target lens over the entire temperature range; The current temperature is detected in real time, and the corresponding focusing motor drive position is output according to the complete focusing curve.

2. The method according to claim 1, characterized in that, The process of decomposing the focusing curve into a wide-angle linear segment, a telephoto linear segment, and a nonlinear inflection point segment between the two includes: The focusing curve is used as input, and the focusing curve describes the relationship between the position of the focusing motor and the temperature. Calculate the rate of change of the slope at each point on the focusing curve; The region where the slope change rate is less than a first threshold and the continuous length exceeds a first length threshold is determined as a linear segment. The linear segment located at the starting temperature part of the focusing curve is designated as the wide-angle end linear segment, and the linear segment located at the ending temperature part of the focusing curve is designated as the telephoto end linear segment. The region located between the wide-angle end linear segment and the telephoto end linear segment, and whose slope change rate exceeds the second threshold, is determined to be the nonlinear inflection point segment.

3. The method according to claim 1, characterized in that, The first mathematical model is constructed in the following ways: Based on reference temperature Wide-angle linear equations As input, where Indicates temperature. Indicates the position of the focusing motor; Based on the variation of the slope and intercept of the linear segment at the wide-angle end with respect to the reference temperature at different temperatures, a first function of the slope as a function of temperature is fitted. and the second function of the intercept as a function of temperature ; Output arbitrary temperature Wide-angle linear model ; The second mathematical model is constructed in the same way as the first mathematical model, using a reference temperature. The following linear equations at the telescope end As input, based on the variation of the slope and intercept of the telescope's linear segment with respect to the reference temperature at different temperatures, a third function of the slope as a function of temperature is fitted. The fourth function of intercept as a function of temperature Output arbitrary temperature The following is a linear model of the telescope end. .

4. The method according to claim 1, characterized in that, The construction methods of the third mathematical model include: The inflection point position sequence at different temperatures is used as input, where the inflection point position is the temperature value corresponding to the turning point on the focusing curve from the linear segment at the wide-angle end to the linear segment at the telephoto end. The lower and upper temperature limits of the temperature range without inflection points are identified, and it is determined that when the temperature is higher than the upper temperature limit, the inflection point position shows a monotonically increasing trend with increasing temperature, and when the temperature is lower than the lower temperature limit, the inflection point position shows a monotonically decreasing trend with decreasing temperature. Fast Fourier transform is performed on the inflection point position sequences with temperatures above the upper limit temperature value and the inflection point position sequences with temperatures below the lower limit temperature value, respectively, to obtain the frequency domain fitting function, and then the inflection point position at any temperature is generated. The inflection point position is output as the third mathematical model.

5. The method according to claim 1, characterized in that, The process of acquiring partial focusing curve data of the target lens at at least one reference temperature and fitting individual difference parameters includes: The input consists of the complete focusing curve of the target lens at room temperature and a local focusing curve segment at an additional temperature point. Substituting the input into the general mathematical model, the individual difference parameters of the target lens are obtained by fitting using the least squares method.

6. The method according to claim 1, characterized in that, After determining the complete focusing curve of the target lens across the entire temperature range, a storage step is further included, which includes: The generated full-temperature-range focusing curve is used as input; The position of the focusing motor at each temperature is compressed into a lookup table using a variable step size method, and the first temperature step size is used in the temperature range where the inflection point changes drastically. A second temperature step size larger than the first temperature step size is used in the linear temperature range; The output of the lookup table is stored in non-volatile memory.

7. The method according to claim 1, characterized in that, The real-time detection of the current temperature and the output of the corresponding focusing motor drive position based on the complete focusing curve include: The current temperature, detected in real time, is used as input; Determine whether the current temperature belongs to a temperature range without an inflection point; If the current temperature is between the lower and upper limits of the no-inflection-point temperature range, then the first or second mathematical model is directly used for linear interpolation calculation to output the corresponding focusing motor drive position. If the current temperature is lower than the lower limit temperature value or higher than the upper limit temperature value, the complete focusing curve is invoked, and the focusing motor drive position is calculated segment by segment according to the current temperature range, and the focusing motor drive position is output.

8. A thermal imaging lens temperature focusing compensation system based on mathematical modeling, characterized in that, include: The focus curve acquisition module is used to acquire multiple focus curves of the same type of basic thermal imaging lens at different temperatures; The decomposition module is used to decompose the focusing curve into a wide-angle linear segment, a telephoto linear segment, and a nonlinear inflection point segment between the two. The model building module is used to build a first mathematical model of the change of the linear segment at the wide-angle end with temperature, a second mathematical model of the change of the linear segment at the telephoto end with temperature, and a third mathematical model of the change of the nonlinear inflection point segment with temperature. The model combination module is used to combine the first mathematical model, the second mathematical model and the third mathematical model to form a general mathematical model describing the focusing curve at any temperature; The complete focus curve determination module is used to acquire partial focus curve data of the target lens at at least one reference temperature, and use the general mathematical model to fit the individual difference parameters of the target lens to determine the complete focus curve of the target lens in the entire temperature range. The drive position output module is used to detect the current temperature in real time and output the corresponding focus motor drive position according to the complete focus curve.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 7.

10. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 7.