A target definition self-adaptive method, device and medium suitable for high-frequency infrared thermal imaging
Through the clarity fusion adjustment algorithm and energy density locking technology, the zoom and focus of the infrared lens are adjusted in real time, which solves the problem of unstable clarity of high-frame-rate infrared thermal imaging systems in drone detection and achieves efficient target recognition.
Patent Information
- Application Number
- CN202511079976.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-08-04
AI Technical Summary
Existing high-frame-rate infrared thermal imaging systems are affected by temperature, detection distance, and target type during drone detection, and cannot maintain clarity around the clock. Traditional autofocus methods also have a blurring process that causes target loss.
A clarity fusion adjustment algorithm is used to generate a target connected domain by receiving RAW data, calculate the target energy intensity and density, determine the zoom and focus positions by combining table lookup, adjust the lens in real time to maintain clarity, and use energy density locking and local extreme value estimation algorithms to perform focus fine-tuning.
It achieves pixel-level analysis within 10 milliseconds and adjusts the lens in real time to maintain picture clarity, avoid blur, and ensure the sharpness of the edges of the drone target and the accuracy of image recognition.
Smart Images

Figure CN120593567B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of high-energy laser UAV countermeasures and strikes, and in particular to a target clarity adaptive method, device, and medium suitable for high-frequency infrared thermal imaging. Background Art
[0002] Drone detection technology is a prerequisite for counter-drone operations, and high-frame-rate infrared thermal imaging is a common technique for drone detection. Thermal imagers passively receive infrared radiation and can detect drone targets in all weather conditions. However, the clarity of thermal imagers in general applications is affected by factors such as temperature, detection distance, and target type, making them incapable of maintaining full-time clarity, leading to target loss. Existing conventional thermal imaging systems have certain limitations. Even after calibration, manual intervention is still required to ensure full-time focus and clarity, and they are particularly limited in detecting small targets, such as drones.
[0003] A high-frame-rate infrared thermal imaging system consists of an infrared lens, a high-frame-rate detector, and an image processing module. The infrared lens, with its zoom and focus capabilities, can focus energy from drone targets and the sky background at varying distances onto the focal plane of the high-frame-rate detector. The high-frame-rate detector converts the energy signals received at the focal plane into photoelectric signals, pixel by pixel, and transmits these signals as digital data to the image processing module. The image processing module runs image processing and lens control algorithms to produce high-quality, real-time image output. The clarity of drone targets is determined by the infrared lens's zoom and focus systems. Traditional infrared systems typically achieve a clear image of the target by manually adjusting the infrared lens's zoom and focus, or by using lens calibration lookup tables and autofocus methods to automatically adjust the lens to the target for a clear image. These methods all have limitations. Manual adjustment is impractical in unmanned applications, and in rapid-response applications like counter-drone surveillance, calibration and autofocus methods can introduce blurring, leading to target loss.
[0004] Traditional autofocus uses a clarity evaluation function to determine image clarity. This algorithm is based on Y8 image data, which is derived from raw RAW data and processed through algorithms such as non-uniformity correction, bad pixel correction, platform histogram, filtering, and enhancement. This data reflects visual information adapted to human perception and is unable to reproduce temperature differences within the image. Because Y8 data undergoes multiple algorithms, the overall latency is over 20ms. The algorithm uses a 5x5 template to analyze edge gradients, which cannot be performed at the pixel level. Only after the human eye has already detected blur can the algorithm recognize changes in image clarity and provide feedback and adjustments, resulting in a blurring process. Summary of the Invention
[0005] In response to the shortcomings of the existing technology, the present invention provides a target clarity adaptive method suitable for high-frequency infrared thermal imaging. Starting from the imaging principle of thermal imaging, energy is introduced into image clarity analysis. At the same time, combined with traditional calibration methods, a clarity fusion adjustment algorithm is used to integrate the calculation results to obtain the optimal zoom focus position, thereby ensuring that the image remains clear at all times and the edge sharpness of the drone target is maintained, thereby ensuring that the image recognition algorithm accurately locks the target.
[0006] In order to solve the above technical problems, the present invention adopts a technical solution: a target clarity adaptive method suitable for high-frequency infrared thermal imaging, comprising the following steps:
[0007] S01, receiving RAW data from the infrared detector, extracting target information and generating a target connected domain. The pixel energy of the target connected domain forms a matrix A. Matrix A is assigned values, with pixels corresponding to the target assigned a value of 1 and pixels corresponding to the background assigned a value of 0, thereby forming a matrix B.
[0008] S02. Obtain target energy intensity based on matrix A, and calculate target distance based on the target energy intensity;
[0009] S03, determining the positioning zoom value and positioning focus value corresponding to the target distance by looking up the table;
[0010] S04. Generate a matrix C based on the target type. Matrix C is the same size as matrix A and contains the target with the expected clarity. Pixels corresponding to the target in matrix C are assigned a value of 1, and pixels corresponding to the background are assigned a value of 0. Matrix B is compared with matrix C to obtain the target overlap area. The energy density comprehensive coefficient of the target overlap area is calculated based on matrices A, B, and C.
[0011] S05, traversing the energy density comprehensive coefficient at different times to obtain the maximum and minimum values of the energy density comprehensive coefficient;
[0012] S06. Calculate and lock the focus blur direction based on the focus values at two moments;
[0013] S07, calculating the locked focus blur amount based on the energy density comprehensive coefficient at time T, the maximum value and the minimum value of the energy density comprehensive coefficient;
[0014] S08: At the first moment after the target appears, the positioning zoom value and positioning focus value calculated in step S03 are output, and the zoom and focus are set to be executed at the maximum speed;
[0015] S09: After the target enters the infrared thermal imaging field of view, focus fine-tuning is performed based on the locked focus blur direction and the locked focus blur amount.
[0016] As a further preferred method, in step S04, the energy density comprehensive coefficient of the target overlapping area is calculated based on matrices A, B, and C. The process is as follows: first, matrix C is multiplied by the corresponding pixels in matrix B to obtain matrix D, which contains the target overlapping area. The energy density evaluation coefficient is obtained by summing and averaging the pixels in matrix D. ; Calculate the pixel energy mean of matrix A , multiply the corresponding pixels in matrix A and matrix D to obtain matrix E, sum and average the energy of all pixels in matrix E to obtain the mean pixel energy of matrix E , calculate the energy mean coefficient , ; Calculate the comprehensive energy density coefficient of the target overlapping area , .
[0017] As a further preferred embodiment, in step S02, the target energy intensity is obtained based on the matrix A as follows:
[0018] ;
[0019] in is the target energy intensity, m is the number of rows and columns of the target connected domain, M=m*m, represents the energy of the pixel at row k and column j;
[0020] The formula for calculating target distance based on target energy intensity is:
[0021] ;
[0022] Where D is the target distance, is the target energy intensity, is an adjustable correction parameter, is the emissivity, is the current temperature.
[0023] As a further preferred embodiment, the calculation formula for locking the focus blur direction is: ,in To lock the focus blur direction, 、 Separate moments 、 The focus value;
[0024] The formula for calculating the locked focus blur is: ,in To lock the amount of focus blur, 、 are the scale factor and offset factor respectively, is the comprehensive energy density coefficient at time T, 、 are the maximum and minimum values of the comprehensive energy density coefficient, respectively.
[0025] As a further preferred embodiment, the focus speed is adjusted based on the locked focus blur direction and the locked focus blur amount, thereby achieving focus fine-tuning. The focus speed adjustment formula is: ,in is the focus speed after adjustment, is the adjustable coefficient, To lock the focus blur direction, To lock the focus blur amount.
[0026] As a further preferred method, the positioning zoom value is first performed before executing step S08. and positioning focus value Effective judgment and positioning of zoom value The effective judgment process is:
[0027] First, calculate the average of the real-time zoom position of the most recent M frames at the time corresponding to the positioning zoom value, and determine the positioning zoom value based on the average of the real-time zoom position. Whether it is valid, the judgment formula is:
[0028] ,
[0029] Indicates the judgment result, =0 means positioning zoom value Invalid, continue to execute the effective judgment of positioning zoom value, Indicates the positioning zoom value If valid, proceed to step S08; is the mean value of real-time zoom position;
[0030] Positioning focus value The effective judgment process is:
[0031] First, calculate the positioning focus value The average real-time focus position of the latest M frames at the corresponding moment, based on which the focus value is determined Whether it is valid, the judgment formula is:
[0032] ,
[0033] To judge the result, if =0, indicating the positioning focus value Invalid, continue to execute the valid judgment of positioning focus value, if =1, indicating the positioning focus value If valid, proceed to step S08; is the real-time focus position average.
[0034] As a further preferred embodiment, the method further includes target local extreme value estimation, and the positioning speed and the focusing speed are compensated by the target local extreme value estimation. The target local extreme value estimation implementation process is:
[0035] S10, receiving the dimmed Y8 image data, extracting target information and generating a target connected domain, wherein the pixel values of the target connected domain form a matrix F;
[0036] S11. Generate a matrix G based on the input target type. The matrix G is the same size as the matrix F and contains the target with the expected clarity. The pixels corresponding to the target are assigned a value of 1, and the pixels corresponding to the background are assigned a value of 0.
[0037] S12. Use the Sobel edge detection operator to perform edge detection on the matrix F, calculate the detected edge gradient amplitude, perform statistics on the edge gradient amplitude, and obtain a gradient value representing the image clarity. , is the target gradient value;
[0038] S13. Multiply the matrix G by the corresponding pixels in the matrix F to obtain the matrix H. The matrix H is the matrix after being clipped using the target morphology. Calculate the target morphology gradient value of the matrix H. ;
[0039] S14, set 、 are the target gradient value and target morphological gradient value at time T, respectively. , then determine Valid, recorded as ;
[0040] S15, traversing different moments ,get The maximum value and minimum value ;
[0041] S16. Calculate clarity determination variables , ,in is a negative gain coefficient, is the gain coefficient;
[0042] S17, based on the clarity of the judgment variable Compensate for the positioning zoom speed and positioning focus speed. The compensation formula is:
[0043] , is the zoom speed after compensation;
[0044] , is the focusing speed after compensation, It is an adjustable coefficient open to users.
[0045] As a further preferred embodiment, the process of extracting target information and generating a target connected domain is as follows: binarizing the RAW data, extracting target information based on the input target type, and taking the minimum square area containing the target pixel as the target connected domain.
[0046] The present invention also discloses a target clarity adaptation device suitable for high-frequency infrared thermal imaging, comprising a processor and a memory storing program instructions. The processor is configured to execute the target clarity adaptation method suitable for high-frequency infrared thermal imaging as described above when running the program instructions.
[0047] The present invention also discloses a storage medium storing program instructions, which, when running, execute the target clarity adaptation method applicable to high-frequency infrared thermal imaging as described above.
[0048] The beneficial effects of the present invention are as follows: The present invention describes clarity from the perspectives of energy intensity and density distribution. Energy analysis uses raw RAW data, with a delay of less than 10 milliseconds, enabling pixel-level analysis and processing. This allows for more direct reflection of minute real-time changes in image clarity, enabling rapid adjustments based on these changes. When the image is about to become blurred, the algorithm can discern pixel-level changes within 10 milliseconds, enabling feedback and adjustments without the human eye perceiving the blur, maintaining image clarity at all times. This method also incorporates algorithmic techniques such as energy positioning, energy locking, and extreme value discrimination to achieve real-time adaptive adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 Flowchart of this method;
[0050] Figure 2 This is the flowchart of Algorithm 1;
[0051] Figure 3 This is the flowchart of Algorithm 2;
[0052] Figure 4 This is the flowchart of Algorithm 3;
[0053] Figure 5 This is the flowchart of Algorithm 4;
[0054] Figure 6 This is a functional block diagram of the device described in Example 3. DETAILED DESCRIPTION
[0055] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0056] Example 1
[0057] This embodiment discloses a target definition adaptive method suitable for high-frequency infrared thermal imaging, such as Figure 1 As shown in Figure 2, this method consists of four parts: a UAV target energy intensity positioning algorithm (Algorithm 2), a UAV target energy density locking algorithm (Algorithm 3), a UAV target local extreme value estimation algorithm (Algorithm 4), and a UAV target clarity fusion adjustment algorithm (Algorithm 1). The intensity positioning algorithm quickly adjusts the zoom focus position to the clear point landing range based on energy intensity, at which point the image is close to the clearest state. The energy density locking algorithm calculates and provides a real-time focus offset based on the maximum energy density value. The local extreme value estimation algorithm determines image clarity from the perspective of image gradient extremes and compensates for the focus offset. Finally, through the comprehensive processing of the clarity fusion adjustment algorithm, the zoom and focus are adjusted to maintain adaptive clarity of the image.
[0058] Specifically, the UAV target energy intensity positioning algorithm (Algorithm 2) uses calibration and table lookup to calculate the target distance based on the UAV energy intensity, determines the zoom and focus range based on the target distance, and drives the zoom and focus motors to quickly reach the predetermined range.
[0059] The UAV target energy density locking algorithm (Algorithm 3) is based on the imaging principle. When focusing on the clearest point, the energy density of the UAV will reach a peak, and this peak has a certain regularity. This algorithm will lock the peak as the goal and continuously adjust the focus motor position to keep the target locked at the best clear point at all times.
[0060] The UAV target local extreme value estimation algorithm (Algorithm 4) uses a gradient analysis algorithm based on shape matching to accurately calculate the extreme value and estimate the clear point, and adjust the focus motor position to keep the image clear.
[0061] The UAV target clarity fusion adjustment algorithm (Algorithm 1) is the interface for data aggregation and output of this invention. Algorithm 2 will adjust the zoom and focus, and Algorithms 3 and 4 will adjust the focus motor. In order to make the motor adjustment outputs of Algorithms 2, 3, and 4 effectively act on the zoom and focus control module, we use the four processes in Algorithm 1 to integrate the outputs of the above algorithms, so as to keep the focus motor in the optimal position at all times and ensure that the image clarity is adaptively maintained at the best effect.
[0062] Specifically, the specific implementation process of this method is:
[0063] I. UAV target energy intensity positioning (algorithm 2), for the UAV target with sky as the background, the distance of the target is calculated through the energy intensity of the target, the distance is identified, and the target is quickly positioned to prevent the target from being lost, and to create a basis for further focusing fine-tuning and adaptive adjustment.
[0064] As shown in Figure 3 , this part is specifically:
[0065] S21, generating a target connected domain, the embodiment is applied to focusing on a UAV, because the scene is single, that is, the UAV target with sky as the background, therefore, the way to generate the target connected domain is: performing binaryzation on the original RAW data, combining the input target type, extracting the target information, and taking the smallest square region containing the target pixels, and the region is the target connected domain.
[0066] S22, removing the background of the RAW data of the target connected domain, and the remaining part is the target part in the original RAW data, which forms a target connected domain matrix, denoted as matrix A, the data in the matrix A is composed of pixels, and the value of each pixel is represented by , wherein k represents the row position of the pixel in the matrix, j represents the column position of the pixel in the matrix, , which represents the strength of the pixel energy, the larger the value, the stronger the target energy received by the pixel, and the smaller the value, the weaker the target radiation energy received. This step is to count the total energy of each pixel in the connected domain , and then take the average, and the obtained average is the energy intensity of the UAV target , that is, the target radiation intensity. The calculation formula of the energy intensity is:
[0067] ,
[0068] , wherein m is the side length of the target connected domain, and M is the number of pixels.
[0069] S23, according to the Stefan-Boltzmann law, the radiation intensity is inversely proportional to the square of the distance , that is, the energy intensity of the UAV is inversely proportional to the square of the distance, and the corresponding distance of the energy intensity is calculated based on the principle, and the calculation formula is:
[0070] ,
[0071] , wherein D is the target distance, is the current temperature, is the adjustable correction parameter open to the user, This is the radiation coefficient measured based on the target type, with a value range of 0-1. For general observation of drones, the default coefficient is 0.8.
[0072] S24: Combine the distance information D generated in step S13 with the temperature information to query the zoom value in the zoom and focus relationship table. and positioning focus value , which is then transmitted to the clarity fusion adjustment algorithm in Algorithm 1. The zoom and focus relationship table is obtained by calibrating the thermal imager and is a common general method. By performing fixed-point calibration of focus, zoom, and distance information, a corresponding relationship between distance, temperature, zoom, and focus is established. When looking up the table, temperature and distance are used as input to query the desired zoom and focus positions.
[0073] Second, energy density lock (algorithm 3). Infrared thermal imagers use infrared radiation to create images. When the image is clear, the target's energy density is high and concentrated on the target. When the image is blurred, the target's energy density is dispersed, with a divergent energy distribution around the target. This characteristic is clearly visible in the raw RAW data and can be used to accurately determine whether the focus is clear. This principle is the fundamental theory of this invention. Algorithm 3 is the energy density lock algorithm. This algorithm is implemented based on the basic principle that the clearer the image, the greater the energy density. The algorithm calculates the energy density within the drone's connected domain and estimates the lock value based on the target type, temperature, and density information. The energy density lock algorithm then runs in real time, continuously outputting the focus offset to lock the energy density at the estimated lock value.
[0074] like Figure 4 As shown, this step includes:
[0075] S31. Generate a target connected domain. This embodiment is applied to focusing on a drone. Because the scene is simple, i.e., the drone target with the sky as the background, the target connected domain is generated by binarizing the original RAW data, extracting the target information based on the input target type, and taking the smallest square area containing the target pixels. This area is the target connected domain.
[0076] S32. Remove the background from the RAW data of the target connected domain. The remaining portion is the target portion in the original RAW data. This portion forms the target connected domain matrix, denoted as Matrix A. In Matrix A, the pixel positions corresponding to the drone's portion with strong energy radiation are assigned a value of 1, while the pixel positions corresponding to the sky with low radiation are assigned a value of 0. The resulting matrix is denoted as B. When the target is clear, the drone's outline converges well, as evidenced by a small number of pixels with a value of 1. When the target is blurred, the drone's outline is distributed widely, as evidenced by a large number of pixels with a value of 1.
[0077] S33. Generate an expected connected domain matrix. According to the input target type, generate an expected connected domain matrix that adapts to the shape of the drone target type, denoted as matrix C. Matrix C is the same size as matrix A and includes targets that achieve the expected clarity. In matrix C, the pixel value of the drone part is assigned to 1, and the pixel value of the other parts is assigned to 0.
[0078] S34. Multiply the corresponding pixels in matrix C and matrix B to obtain matrix D. Matrix D contains the target overlapping area. Sum and average the pixels in matrix D to obtain the energy density evaluation coefficient. ; The larger it is, the higher the similarity between matrix B and matrix C is, and the clearer the outline of the drone is. The calculation formula is:
[0079] ,
[0080] Where n is the number of rows and columns of matrix c, N=n*n, are the elements in the matrix C.
[0081] S35. Calculate the pixel energy mean of matrix A , multiply the corresponding pixels in matrix A and matrix D to obtain matrix E, sum and average the energy of all pixels in matrix E to obtain the mean pixel energy of matrix E , calculate the energy mean coefficient , ; Calculate the comprehensive energy density coefficient of the target overlapping area , .
[0082] S36, by frame rate beat Continuous scanning ,but for The energy density evaluation coefficient at the moment is set is the maximum value of the energy density evaluation coefficient, then continuously compare and If the value of > , then Assign the value of , that is, always keep is the maximum energy density evaluation coefficient, that is is the energy density lock value. Similarly, the minimum energy density value is obtained .
[0083] S37, by frame rate beat Continuous scanning ,but The real-time focus value at the moment is , suppose two moments 、 ,but 、 is the focus value at two moments, and 100 millisecond interval. Calculate the direction of the locked focus blur :
[0084] ,
[0085] Calculate the amount of locked focus blur :
[0086] ,
[0087] in and They are proportional coefficient and offset coefficient respectively, which can be adjusted by the user according to the hardware system. The default value is 0.85, The default value is 2048.
[0088] By time Run and build and , sent to Algorithm 1, Algorithm 1 according to and Adjust the focus position so that and Always stay close.
[0089] Third, local extreme value estimation of drone targets (Algorithm 4). This algorithm is based on dimmed Y8 image data and uses gradient values cropped according to the drone's morphology to dynamically estimate extreme values. It then accurately generates focus discrimination information based on these extreme values, indicating whether the image clarity is abnormal and transmitting this information to Algorithm 1. While using Y8 data to calculate gradient values to determine image clarity has a significant disadvantage in speed and cannot guarantee real-time image clarity, it does have an advantage in accuracy. Gradient values can effectively evaluate contours, making them a viable auxiliary tool for ensuring image clarity.
[0090] like Figure 5 As shown, the method includes:
[0091] S41. Receive the dimmed Y8 image data, binarize the image data Y8, extract target information based on the input target type, and generate a target connected domain. The pixel values of the target connected domain form a matrix F.
[0092] S42. Generate a matrix G based on the input target type. The matrix G contains Y8 data pixel values, not binarized values. The matrix G is the same size as the matrix F and contains targets that achieve the expected clarity. Pixels corresponding to the targets are assigned a value of 1, and pixels corresponding to the background are assigned a value of 0.
[0093] S43. Use the Sobel edge detection operator to perform edge detection on the matrix F, calculate the gradient amplitude of the detected edge, and perform statistics on these amplitudes to obtain a gradient value representing the image clarity. , is the target gradient value; gradient value As a clarity evaluation index, the larger the value, the clearer the image.
[0094] S44. Multiply the corresponding pixels in matrix G and matrix F to obtain matrix H. Matrix H is the matrix clipped with the target morphology, which can more directly reflect the gradient value of the target. Calculate the target morphology gradient value of matrix H. .
[0095] S45, set 、 are the target gradient value and target morphological gradient value at time T, respectively. , then determine Valid, recorded as .
[0096] S46, set is the maximum value of the target morphological gradient, then continuously compare and If the value of > , then Assign the value of , that is, always keep is the maximum target morphological gradient value. Similarly, the minimum target morphological gradient value is obtained .
[0097] S47. Calculate clarity determination variable , ,in It is a negative gain coefficient, with a range of 1-100 and a default value of 10. is the gain coefficient, the value range is 5-15, and the default value is 10.
[0098] In this embodiment, The larger the value, the clearer the picture. The maximum value is limited to 10 and the minimum value is 0.
[0099] Four, clarity fusion adjustment (algorithm 1), obtain real-time data, based on the data input by algorithm 2, algorithm 3, algorithm 4, query zoom focus relationship data table, through a series of determination and calculation, get zoom focus information that can be recognized by lens driving module, drive zoom focus motor to drive lens group movement, keep infrared picture clear at all times. Algorithm 1 input contains three parts: the first part is the system real-time data, including real-time zoom value , real-time focus value ; the second part is the data input by algorithm 2, 3, 4, including positioning zoom value , positioning focus value , lock focus blur amount , lock focus blur direction , clarity determination variable ; the third part is the zoom focus relationship table, which stores calibration data such as zoom, focus, temperature and distance. Algorithm output is uniformly organized by step S19, according to the different algorithm operation results, it will output composite signals containing zoom signal, focus signal, zoom positioning, focus positioning, etc., to keep the picture clear at all times.
[0100] The following describes the details of each process, describes the input-output relationship, describes the implementation details and innovation points within the process. Steps S11, S12, S13 complete the zoom positioning function, steps S14, S15, S16 complete the focus positioning function, steps S17, S18 complete the focus locking function, each process cooperates with each other to realize the output of zoom focus information and ensure the self-adaptive adjustment of picture clarity.
[0101] As shown in Figure 2 , the specific process of this part is:
[0102] S11, real-time zoom value filtering, the filtering formula is:
[0103] ,
[0104] The above formula is used to calculate the average value of the real-time zoom position of the last 100 frames at any time, to prevent abnormal mutation and fluctuation, which may lead to misjudgment of the subsequent algorithm. The average value is calculated by using the ordinary cumulative average method, which is efficient and reliable, and consumes less computing resources.
[0105] S12, positioning zoom value effective judgment, ,
[0106] represents the judgment result, =0 indicates that the positioning zoom value is invalid, continue to execute the positioning zoom value effective judgment, indicates that the positioning zoom value If valid, execute step S13 to perform zoom speed calculation.
[0107] S13, zoom solution output, the effective and The value is forwarded to the next link. Determine variables based on clarity Get, when The smaller the size, the faster the zoom speed, and vice versa. and The value range is the same, then:
[0108] .
[0109] S14, real-time focus value filtering, the filtering formula is:
[0110] ,
[0111] The above formula is used to calculate the real-time focus position average of the most recent 100 frames at any time to prevent abnormal mutations and fluctuations that may lead to misjudgment of subsequent algorithms. The average is calculated using the ordinary cumulative averaging method, which is efficient, reliable, and consumes less computing resources.
[0112] S15, determine whether the positioning focus value is valid, the judgment formula is:
[0113] ,
[0114] To judge the result, if =0, indicating the positioning focus value Invalid, continue to execute the valid judgment of positioning focus value, if =1, indicating the positioning focus value If valid, execute step S13 to perform zoom speed calculation.
[0115] S16, zoom solution output, the effective It is passed to the next link, which is set to focus at the maximum speed.
[0116] S17. This step is mutually exclusive with the zoom settlement output in step S13 and the focus settlement output in step S16. Positioning zoom and positioning focus occur at the first moment after the target appears. The zoom and focus are adjusted over a large range to bring the target into the infrared thermal imaging field of view and ensure that the picture is basically clear. The locked focus in this step is used for focus fine-tuning to allow the picture clarity to be adaptively adjusted to keep it clear at all times.
[0117] This step receives the locked focus blur value output by Algorithm 3 , lock focus blur direction The algorithm calculates the focusing speed according to the blur amount, determines the focusing direction according to the blur direction, and then generates the locked focusing speed with direction. :
[0118] ,
[0119] Lock focus blur amount The smaller the value, the blurrier the image. In this case, a faster focus speed is needed to correct the image. Lock the focus blur direction The value is 0 or 1, representing focus far and focus near, It has its own speed. A negative number indicates that the focus is far, and a positive number indicates that the focus is near. It is an adjustable coefficient. Each device has different individual characteristics and needs to be adjusted accordingly. The value range is [0,1]. Based on the test experience of multiple devices, the default value is 0.35.
[0120] S18, focus offset output, introduce the clarity judgment variable output by algorithm 4 , The generated offset can be compensated by discriminating the row, and the compensation formula is:
[0121] ,
[0122] in It is an adjustable coefficient open to users, with a value range of [0,10] and a default of 8. The final output variable is , represents the focus shift speed.
[0123] S19, zoom focus information output, summarizing the information output in steps S13, S18, and S16 、 、 、 , sent to the zoom and focus control module to adjust the zoom and focus to ensure a clear picture.
[0124] In the above description, the multiplication of the corresponding pixels in matrix C and matrix B, the multiplication of the corresponding pixels in matrix A and matrix D, and the multiplication of the corresponding pixels in matrix G and matrix F is different from matrix multiplication. Here, the corresponding elements in the matrix are multiplied. For example, matrix C is , the matrix B is , then the result of multiplying the corresponding pixels in matrix C and matrix B is: .
[0125] Example 2
[0126] Compared with Example 1, this embodiment only executes Algorithms 1, 2, and 3. The implementation process of Algorithms 2 and 3 is the same as that of Example 1. The implementation process of Algorithm 1 is slightly different, that is, only steps S11, S12, S14, S15, S16, S17, and S18 of Algorithm 1 are executed, that is, positioning and zooming are performed at the fastest speed, and focus fine-tuning is performed at the speed supplemented by Algorithm 3.
[0127] Example 3
[0128] This embodiment provides a target definition adaptive device 300 for high-frequency infrared thermal imaging, such as Figure 6 As shown, the device includes a processor 304 and a memory 301. Optionally, the device may also include a communication interface 302 and a bus 303. The processor 304, communication interface 302, and memory 301 may communicate with each other via bus 303. Communication interface 302 may be used for information transmission. Processor 304 may invoke logic instructions in memory 301 to execute the target clarity adaptive method for high-frequency infrared thermal imaging described in the above embodiment.
[0129] In addition, the logic instructions in the memory 301 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0130] Memory 301, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as the program instructions / modules corresponding to the methods in the embodiments of the present disclosure. Processor 304 executes the program instructions / modules stored in memory 301 to perform functional applications and data processing, thereby implementing the target clarity adaptive method for high-frequency infrared thermal imaging in the above-mentioned embodiments.
[0131] The memory 301 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal device. Furthermore, the memory 301 may include high-speed random access memory and non-volatile memory.
[0132] Example 4
[0133] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the target clarity adaptation method applicable to high-frequency infrared thermal imaging.
[0134] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0135] The technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present disclosure. The aforementioned storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, and other media that can store program code, or a transient storage medium.
[0136] The above description and the accompanying drawings sufficiently illustrate the embodiments of the present disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible variations. Unless expressly required, individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terms used in this application are only used to describe the embodiments and are not used to limit the scope of protection. As used in the description herein, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to also include the plural forms. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variations "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, an element defined by the sentence "comprising a..." does not exclude the presence of other identical elements in the process, method or device that includes the element. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments can be referenced to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can be referred to the description of the method part.
[0137] Those skilled in the art can clearly understand the unit and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software manner can depend on the specific application and design constraints of the technical solution. The skilled person can use different methods for each specific application to realize the described functions, but such implementation should not be considered beyond the scope of the embodiments of the present disclosure. The skilled person can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0138] In the embodiments disclosed herein, the disclosed methods, products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units can only be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be omitted or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms. The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to implement the embodiments. In addition, the functional units in the embodiments of the present disclosure can be integrated in one processing unit, or each unit can be a physically independent unit, or two or more units can be integrated in one unit.
Claims
1. A target definition adaptive method for high-frequency infrared thermal imaging, characterized by: The following steps are involved: S01, receiving RAW data from the infrared detector, extracting target information and generating a target connected domain. The pixel energy of the target connected domain forms a matrix A. Matrix A is assigned values, with pixels corresponding to the target assigned a value of 1 and pixels corresponding to the background assigned a value of 0, thereby forming a matrix B. S02. Obtain target energy intensity based on matrix A, and calculate target distance based on the target energy intensity; the target energy intensity obtained based on matrix A is: ; in is the target energy intensity, m is the number of rows and columns of the target connected domain, M=m*m, represents the energy of the pixel at row k and column j; The formula for calculating target distance based on target energy intensity is: ; Where D is the target distance, is the target energy intensity, is an adjustable correction parameter, is the emissivity, is the current temperature; S03, determining the positioning zoom value and positioning focus value corresponding to the target distance by looking up the table; S04. Generate a matrix C based on the target type. Matrix C is the same size as matrix A and contains the target with the expected clarity. Pixels corresponding to the target in matrix C are assigned a value of 1, and pixels corresponding to the background are assigned a value of 0. Matrix B is compared with matrix C to obtain the target overlap area. The energy density comprehensive coefficient of the target overlap area is calculated based on matrices A, B, and C. The energy density comprehensive coefficient of the target overlapping area is calculated based on matrices A, B, and C The process is as follows: first, matrix C is multiplied by the corresponding pixels in matrix B to obtain matrix D, which contains the target overlapping area. The energy density evaluation coefficient is obtained by summing and averaging the pixels in matrix D. ; Calculate the pixel energy mean of matrix A , multiply the corresponding pixels in matrix A and matrix D to obtain matrix E, sum and average the energy of all pixels in matrix E to obtain the mean pixel energy of matrix E , calculate the energy mean coefficient , ; Calculate the comprehensive energy density coefficient of the target overlapping area , ; S05, traversing the energy density comprehensive coefficient at different times to obtain the maximum and minimum values of the energy density comprehensive coefficient; S06. Calculate the locked focus blur direction based on the focus values at the two moments. The calculation formula for the locked focus blur direction is: ,in To lock the focus blur direction, 、 Separate moments 、 The focus value; The formula for calculating the locked focus blur is: ,in To lock the amount of focus blur, 、 are the scale factor and offset factor respectively, is the comprehensive energy density coefficient at time T, 、 are the maximum and minimum values of the comprehensive energy density coefficient respectively; S07, calculating the locked focus blur amount based on the energy density comprehensive coefficient at time T, the maximum value and the minimum value of the energy density comprehensive coefficient; S08: At the first moment after the target appears, the positioning zoom value and positioning focus value calculated in step S03 are output, and the zoom and focus are set to be executed at the maximum speed; S09: After the target enters the infrared thermal imaging field of view, focus fine-tuning is performed based on the locked focus blur direction and the locked focus blur amount; The focus speed is adjusted based on the locked focus blur direction and the locked focus blur amount, thereby achieving focus fine-tuning. The focus speed adjustment formula is: ,in is the focus speed after adjustment, is the adjustable coefficient, To lock the focus blur direction, To lock the focus blur amount.
2. The target definition adaptive method for high-frequency infrared thermal imaging according to claim 1, characterized in that: Before executing step S08, first perform the positioning zoom value and positioning focus value Effective judgment and positioning of zoom value The effective judgment process is: First, calculate the average of the real-time zoom position of the most recent M frames at the time corresponding to the positioning zoom value, and determine the positioning zoom value based on the average of the real-time zoom position. Whether it is valid, the judgment formula is: , Indicates the judgment result, =0 means positioning zoom value Invalid, continue to execute the effective judgment of positioning zoom value, Indicates the positioning zoom value If valid, proceed to step S08; is the mean value of real-time zoom position; Positioning focus value The effective judgment process is: First, calculate the positioning focus value The average real-time focus position of the latest M frames at the corresponding moment, based on which the focus value is determined Whether it is valid, the judgment formula is: , To judge the result, if =0, indicating the positioning focus value Invalid, continue to execute the valid judgment of positioning focus value, if =1, indicating the positioning focus value If valid, proceed to step S08; is the real-time focus position average.
3. The target definition adaptive method for high-frequency infrared thermal imaging according to claim 1, characterized in that: It also includes target local extreme value estimation, which is used to compensate the positioning speed and focusing speed. The target local extreme value estimation implementation process is as follows: S10, receiving the dimmed Y8 image data, extracting target information and generating a target connected domain, wherein the pixel values of the target connected domain form a matrix F; S11. Generate a matrix G based on the input target type. The matrix G is the same size as the matrix F and contains the target with the expected clarity. The pixels corresponding to the target are assigned a value of 1, and the pixels corresponding to the background are assigned a value of 0. S12. Use the Sobel edge detection operator to perform edge detection on the matrix F, calculate the detected edge gradient amplitude, perform statistics on the edge gradient amplitude, and obtain a gradient value representing the image clarity. , is the target gradient value; S13. Multiply the corresponding pixels in matrix G and matrix F to obtain matrix H. Matrix H is the matrix after clipping with the target morphology. Calculate the target morphology gradient value of matrix H. ; S14, set 、 are the target gradient value and target morphological gradient value at time T, respectively. , then determine Valid, recorded as ; S15, traversing different moments ,get The maximum value and minimum value ; S16. Calculate clarity determination variables , ,in is a negative gain coefficient, is the gain coefficient; S17, based on the clarity of the judgment variable Compensate for the positioning zoom speed and positioning focus speed. The compensation formula is: , is the zoom speed after compensation; , is the focusing speed after compensation, It is an adjustable coefficient open to users.
4. The target definition adaptive method for high-frequency infrared thermal imaging according to claim 1, characterized in that: The process of extracting target information and generating target connected domain is as follows: binarizing the RAW data, extracting target information based on the input target type, and taking the minimum square area containing the target pixel as the target connected domain.
5. A target definition adaptive device suitable for high-frequency infrared thermal imaging, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the target clarity adaptation method applicable to high-frequency infrared thermal imaging according to any one of claims 1 to 4 when running the program instructions.
6. A storage medium storing program instructions, characterized in that: When the program instructions are executed, the target clarity adaptation method applicable to high-frequency infrared thermal imaging according to any one of claims 1 to 4 is executed.
Citation Information
Patent Citations
Feature analysis method and system for infrared thermal imager
CN119887817A
Methods and Apparatus for Calibrating Focused Plenoptic Camera Data
US20130127901A1