Thermal imaging image sharpening method
By constructing Tables A and Table B, the focus AD value is calculated in real time using the target distance, field of view, temperature and turntable angle, the problem that traditional thermal imaging equipment needs to manually or automatically adjust focus during the observation process, and achieve rapid positioning and automatic focus, improving observation efficiency.
Patent Information
- Application Number
- CN202411974592.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Traditional thermal imaging devices require manual or automatic adjustment of focus during observation, which is time-consuming and inefficient, especially when switching observation points or field of view.
By constructing Tables A and B, the focus AD value is calculated in real time using the target distance, field of view, temperature and turntable angle to achieve rapid positioning and automatic focus.
This method can quickly locate and maintain focus without affecting the image clarity, significantly improving observation efficiency and overcoming the impact of equipment aging and environmental changes.
Smart Images

Figure CN119788964A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of thermal imaging, in particular to a thermal imaging image clarity method. Background Art
[0002] The thermal imaging lens uses a DC motor to drive the gear to rotate and control the relative position of the lens, thereby achieving the focus point distance and field size of the image. When the traditional method controls the lens zoom or the turntable movement, the focus gear position is fixed. Usually, when switching the observation point or the observation field, it is necessary to manually adjust the focus or trigger the automatic focus. Whether it is manual adjustment of focus or automatic focus, it is relatively time-consuming. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a thermal imaging image clarity method, which uses the target distance and locates the appropriate focus value according to the current field of view angle and temperature for a thermal imager device installed in a fixed position.
[0004] In order to solve the technical problem, the technical solution adopted by the present invention is: a method for making a thermal imaging image clear, comprising the following steps: S01, constructing Table A and Table B, wherein Table A is a table of focus AD values corresponding to different temperatures, fields of view, and distances, and Table B is a table of distances corresponding to different turntable horizontal angles and pitch angles, wherein the distance is the distance between the turntable and the target; S02, the lens or turntable zoom control starts, and the temperature, field of view angle, turntable horizontal angle and pitch angle are obtained in real time; S03, look up Table B according to the horizontal angle and pitch angle of the turntable to obtain the corresponding distance, and then calculate the focus AD value from Table A; S04, determining whether the image clarity suddenly decreases during the control process, if yes, proceed to the next step, if not, return to step S02; S05, recording the angle, field of view, temperature, distance, focus AD value, clarity and control status at this time and storing them in Table C; S06, return to the point position in Table C, search for the latest clear point by focusing and micro-movement, and judge whether the focus AD clarity of the micro-movement search point is higher than that of the unclear point and conforms to the change rule under the same conditions. If not, it is considered as a misjudgment and this information in Table C is deleted. If yes, proceed to step S07; S07, determine whether the current condition is triggered by the turntable control, if not, delete this information in Table C, if yes, reversely calculate the corresponding azimuth and pitch angles here according to Table A and store them in Table B.
[0005] Furthermore, the image clarity during the control process is judged according to the curve output by the clarity evaluation function in combination with the filtering algorithm. If the image clarity of the two frames before and after is greater than 150, it is considered that the image clarity suddenly becomes low.
[0006] Furthermore, when executing step S03, if there is no distance corresponding to the horizontal and pitch angles of the turntable in the table, a solution is performed, and the solution formula is: , Where D is the distance to be calculated, H is the height of the target, and A is the pitch angle of the target.
[0007] Furthermore, after the lens zoom is completed, determine whether the difference between the focus AD value at the stop position and the focus AD value at the final positioning position is within the set threshold. If it is within the set threshold, it means that the record in Table B is correct. If it is not within the threshold range, reconstruct the data to generate a set of horizontal angles, pitch angles, and distances and store them in Table B.
[0008] Furthermore, the data reconstruction process is as follows: , Where D is the distance to be solved, H is the height of the target at the stopping position, and A is the pitch angle of the target at the stopping position.
[0009] Furthermore, step S06 is performed after the thermal imager is idle or manually authorized.
[0010] Beneficial effects of the present invention: Traditional equipment observation requires manual control of focus or use of automatic focus to search and locate over a large range, and the focusing time is relatively long. The present focusing algorithm runs at the program speed and can maintain a good clarity effect regardless of the control process of the turntable or the lens.
[0011] This focusing algorithm has learning capabilities, in which the distance in the orientation table is both the approximate calculated distance and a parameter for focusing compensation, which can overcome the impact of equipment aging.
[0012] Thermal imaging effects are easily affected by temperature. The temperature variable introduced in this focusing algorithm can offset most of the imaging effects caused by environmental changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A flowchart of the method is shown in FIG. Figure 2 To control the process clarity change trend chart; Figure 3 Schematic diagram of distance calculation. DETAILED DESCRIPTION
[0014] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0015] Example 1 This embodiment discloses a method for clearing thermal imaging images. Figure 1 As shown, the method comprises the following steps: S01. Construct Table A and Table B. Table A is a table of focus AD values corresponding to different temperatures, fields of view, and distances. Table B is a table of distances corresponding to different turntable horizontal angles and pitch angles. The distance is the distance between the turntable and the target. The distance variable in Table B can be updated. Rapid positioning is achieved by combining the two tables.
[0016] Table A Table B NULL in Table B means there is no target object beyond three kilometers. In optics, this distance can be considered infinite, and the depth of field here is close.
[0017] S02, the lens or turntable zoom control starts, and the temperature, field of view angle, turntable horizontal angle and pitch angle are obtained in real time.
[0018] S03, look up Table B according to the horizontal angle and pitch angle of the turntable to obtain the corresponding distance, and then calculate the focus AD value from Table A.
[0019] S04, determining whether the image clarity suddenly decreases during the control process, if yes, proceed to the next step, if not, return to step S02.
[0020] Figure 2 Schematic diagram of the clarity collected during control. 2A and 2C are the changes in clarity when the fixed scene is magnified, 2B and 2D are the changes in clarity when the turntable is moved, and the close view in the middle of 2B causes a sudden change in clarity.
[0021] This embodiment determines the image clarity during the control process by combining a filter algorithm with a curve output by a clarity evaluation function. If the image clarity of the two frames before and after is greater than 150, it is considered that the image clarity suddenly becomes low.
[0022] S05. Record the angle, field of view, temperature, distance, focus AD value, clarity and control status at this time and store them in Table C.
[0023] S06. When the thermal imager is idle or manually authorized, it returns to the point position in Table C, and focuses forward and backward to search for the latest clear point. It is determined whether the focus AD clarity of the micro-motion search point is higher than that of the unclear point and conforms to the change rule under the same conditions. If not, it is considered a misjudgment and this information in Table C is deleted. If yes, proceed to step S07.
[0024] S07, determine whether the current condition is triggered by the turntable control, if not, delete this information in Table C, if yes, reversely calculate the corresponding azimuth and pitch angles here according to Table A and store them in Table B.
[0025] When executing step S03, if there is no distance corresponding to the horizontal and pitch angles of the turntable in the table, a solution is performed, and the solution formula is: , Where D is the distance to be calculated, H is the height of the target, and A is the pitch angle of the target.
[0026] After the lens zoom is completed, determine whether the difference between the focus AD value at the stop position and the focus AD value at the final positioning position is within the set threshold. If it is within the set threshold, it means that the record in Table B is correct. If it is not within the threshold range, reconstruct the data to generate a set of horizontal angle, pitch angle, and distance and store them in Table B. Figure 3 As shown, the process of reconstructing the data is: , Where D is the distance to be solved, H is the height of the target at the stopping position, and A is the pitch angle of the target at the stopping position.
[0027] The thermal imager is used with a turntable, which can realize horizontal and pitch rotation and change the field of view of the thermal imager, so as to realize 360-degree observation of the surrounding environment. If the turntable angle is known, because the installation position is fixed, the target distance has a fixed matching relationship with the turntable position, that is, the observation clarity and the turntable angle have a direct matching relationship. What the azimuth table construction algorithm needs to do is to continuously build and update the corresponding relationship through the algorithm. When executing equipment control, the focus AD value can be obtained according to the turntable azimuth pitch angle, field of view angle, and temperature.
[0028] In the traversal process of the suspicious point storage table C, the image changes linearly during the turntable and lens control process. According to the curve output by the clarity evaluation function combined with the filtering algorithm, if there is a large and continuous sudden change in clarity in the middle, the point is identified as a suspicious point and stored in the C table. When the machine is idle or manually authorized, it traverses the suspicious points and performs focus micro-movement to re-search for the clearest point.
[0029] In the control stop inspection process, if the user controls the focus change after the turntable control stops, if the difference between the stop position focus AD and the final positioning position is within 10, it proves that the current position table B corresponds accurately. If the difference is large and within the filtering range, the AD average value is taken to recalculate the distance and construct it into the orientation table B in order to improve accuracy.
[0030] The purpose of the data comparison process is to compare the results output during the traversal process of the suspicious point storage table C. If the two clearest focused AD results are basically the same, it means that this place was already the clearest at that time and does not need to be rebuilt; if the difference is large but it is not within the filtering range, this place is considered to be temporary interference and discarded; if the difference is large and within the filtering range, it proves that the distance has changed suddenly due to reasons such as terrain or buildings. The distance value here is inferred to be updated to the orientation table B in order to improve accuracy.
[0031] After the focus AD value is obtained, focus positioning is performed. After experimental verification, the picture is always clear during continuous control.
[0032] The orientation construction table B1 is constructed using a two-dimensional array. The first data element is the horizontal angle X (n), the second data element is the pitch angle Z (n), and the size of the array n is 180*40. The array is initialized using the ideal state form based on the known height of the observation point, and the distance can be obtained according to the trigonometric function. During the later stage of the turntable control operation of the equipment, if there is a sudden change in clarity, the equipment will automatically obtain the distance based on the corresponding relationship between the field of view angle, distance and focus in the lens, and update it to Table B; after the control turntable stops, it will also automatically detect whether the current position distance is appropriate. If it is not a clear position at this time, the data will be reconstructed to generate a set of (X (n), Z (n), D (n)) values, and the data will be updated to Table B through the orientation table construction algorithm.
[0033] During the operation of the equipment, after the equipment adjusts its azimuth, it searches Table B according to the azimuth and elevation data to obtain the distance to this point.
[0034] like Figure 3 As shown, the azimuth distance (P6) is calculated using trigonometric functions. Given that the tower height is H and the pitch angle is A, then .
[0035] The update value algorithm used in the construction algorithm is as follows: after the array is initialized, the first dimension represents the distance information. When the new element (X(n), Z(n), D(n)) is updated, the first dimension is facilitated to find the array subscript m closest to the updated data, and replace (X(m), Z(m), D(m)) with (X(n), Z(n), D(n)).
[0036] As the device runs for a long time, the array is continuously updated and the internal data becomes more and more accurate.
[0037] Lens table B is constructed using a three-dimensional array. The array is initialized using manual calibration, adjusting the field of view, target distance, clarity, recording the ambient temperature, and then saving the data. To ensure accurate variable calculation, this data opens a calibration interface but does not automatically update the data.
[0038] The above description is only the basic principle and preferred embodiments of the present invention. Improvements and substitutions made by those skilled in the art based on the present invention belong to the protection scope of the present invention.
Claims
1. A method for clarifying a thermal imaging image, characterized in that: The following steps are involved: S01, constructing Table A and Table B, wherein Table A is a table of focus AD values corresponding to different temperatures, fields of view, and distances, and Table B is a table of distances corresponding to different turntable horizontal angles and pitch angles, wherein the distance is the distance between the turntable and the target; S02, the lens or turntable zoom control starts, and the temperature, field of view angle, turntable horizontal angle and pitch angle are obtained in real time; S03, look up Table B according to the horizontal angle and pitch angle of the turntable to obtain the corresponding distance, and then calculate the focus AD value from Table A; S04, determining whether the image clarity suddenly decreases during the control process, if yes, proceed to the next step, if not, return to step S02; S05, recording the angle, field of view, temperature, distance, focus AD value, clarity and control status at this time and storing them in Table C; S06, return to the point position in Table C, search for the latest clear point by focusing and micro-movement, and judge whether the focus AD clarity of the micro-movement search point is higher than that of the unclear point and conforms to the change rule under the same conditions. If not, it is considered as a misjudgment and this information in Table C is deleted. If yes, proceed to step S07; S07, determine whether the current condition is triggered by the turntable control, if not, delete this information in Table C, if yes, reversely calculate the corresponding azimuth and pitch angles here according to Table A and store them in Table B.
2. The thermal imaging image clearing method according to claim 1, characterized in that: The image clarity during the control process is judged according to the curve output by the clarity evaluation function combined with the filtering algorithm. If the image clarity of the two frames before and after is greater than 150, it is considered that the image clarity suddenly becomes low.
3. The thermal imaging image clearing method according to claim 1, characterized in that: When executing step S03, if there is no distance corresponding to the horizontal and pitch angles of the turntable in the table, a solution is performed, and the solution formula is: , Where D is the distance to be calculated, H is the height of the target, and A is the pitch angle of the target.
4. The thermal imaging image clearing method according to claim 1, characterized in that: After the lens zoom is completed, determine whether the difference between the focus AD value at the stop position and the focus AD value at the final positioning position is within the set threshold. If it is within the set threshold, it means that the record in Table B is correct. If it is not within the threshold range, reconstruct the data to generate a set of horizontal angle, pitch angle, and distance and store them in Table B.
5. The thermal imaging image clearing method according to claim 4, characterized in that: The process of reconstructing the data is: , Where D is the distance to be solved, H is the height of the target at the stop position, and A is the pitch angle of the target at the stop position.
6. The thermal imaging image clearing method according to claim 1, characterized in that: After the thermal imager is idle or manually authorized, step S06 is performed.
Citation Information
Patent Citations
Method for synchronizing focusing operation and zooming operation
CN103728813A
Quick-focusing foldable visual aid
CN105511051A
Focusing method, device and equipment of lens module
CN111158107A
Oil and gas field personnel and vehicle positioning association video monitoring method
CN113115002A
Thermal infrared imager rapid automatic focusing method based on target identification and spatial learning
CN114112066A
Cited By
Target definition self-adaption method and device suitable for high-frequency infrared thermal imaging and medium
CN120593567A