Self-triggering rapid automatic focusing method of infrared zoom imaging system

Through dynamic and static judgment and clarity detection, combined with three-point mountain climbing control logic, the self-triggered fast automatic focus of the infrared zoom imaging system is achieved, solving the problem of slow focus speed and controllable triggering in the existing technology, and improving focus Speed ​​and accuracy.

CN119402747APending Publication Date: 2025-02-07TIANJIN JINHANG INST OF TECH PHYSICS
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411469563.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

At this stage, the infrared zoom imaging system has a slow focus speed, a long focus time, and can only be triggered by control, and lacks self-judgment and fast focus ability.

Method used

A self-triggered fast automatic focusing method based on dynamic and static judgment and clarity detection is proposed, and automatic focusing is achieved through pre-processing infrared images, dynamic and static detection, clarity evaluation and three-point mountain climbing control logic.

Benefits of technology

It realizes automatic identification, automatic triggering and fast focus of the automatic focus process, shortens the focus time, improves the focus speed and accuracy, and is suitable for infrared zoom imaging systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402747A_ABST
    Figure CN119402747A_ABST
Patent Text Reader

Abstract

The invention relates to a self-triggering rapid automatic focusing method of an infrared zoom imaging system, and belongs to the technical field of automatic focusing of the infrared zoom imaging system. According to the method, the scene motion state and the fuzzy degree can be accurately judged, and the focusing operation is automatically triggered if the target area is judged to be out-of-focus fuzzy. Meanwhile, according to the method, automatic focusing control logic with a traversal method as a principle is optimized, rapid moving and positioning of focusing can be achieved, and the overall effects of automatic recognition, automatic triggering and rapid focusing of the automatic focusing process are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of automatic focusing of an infrared zoom imaging system, and in particular relates to a self-triggering rapid automatic focusing method of an infrared zoom imaging system. Background Art

[0002] In the field of infrared zoom imaging systems, judgments are often made based on subjective factors such as whether the target area is out of focus or blurred by a person in the loop. After determining that it is blurred, the infrared zoom imaging system receives an autofocus instruction and performs an autofocus operation to focus the target area clearly. The most mature and convenient autofocus implementation scheme currently used is the traversal method, which takes the current position as the center and controls the focusing lens to move a fixed distance to both ends. During the movement, the clarity parameters are calculated in real time. After the full range segment is traversed, it starts to move to the position with the highest clarity in the entire segment, and the process ends after it moves into place. The flow chart of this type of autofocus algorithm is as follows: Figure 1 shown.

[0003] This type of focusing logic has the following disadvantages: First, the automatic focusing operation needs to be triggered manually and does not have the ability to self-judge fuzzy. Second, it takes a long time. A single automatic focus requires the focus group to move at least 1.5 times the length of the traversal segment, and at most 2 times the length of the traversal segment to achieve focusing. There are redundant action paths, which leads to a long automatic focusing time. Third, the solution requires multiple handshake communications with the lens control component. If there is a communication abnormality, the automatic focusing cannot be completed, and the reliability is not strong. Fourth, during the automatic focusing process, the lens board needs to send back the current focus motor position data in real time, but due to the feedback delay of communication and mechanical control, there is a fixed deviation between the clearest focus position judged and the actual clearest focus position. This deviation is currently compensated by fixed compensation, but due to the difference in lenses, the fixed compensation value is not the same, and it needs to be adjusted after changing the lens, and the versatility is poor. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] The technical problem to be solved by the present invention is: in view of the problems of slow focusing speed, long focusing time and only controlled triggering of the current zoom infrared imaging system, an automatic focusing method of the infrared zoom imaging system is proposed.

[0006] (II) Technical solution

[0007] In order to solve the above technical problems, the present invention provides a self-triggering fast automatic focusing method of an infrared zoom imaging system, comprising the following steps:

[0008] Step 1: Perform preprocessing operations on the collected infrared image, including non-uniform correction, bad pixel replacement, and image enhancement processing to obtain a uniform, high-contrast infrared image data source;

[0009] Step 2: Use the motion detection function to determine whether the current scene is a motion scene. If the scene is determined to have changed, execute the next step to further determine whether the target area is out of focus or blurred. Otherwise, determine the next scene.

[0010] Step 3: Calculate the clarity index of the target area through the clarity evaluation function, and then determine whether the target is in a defocused state through the clarity threshold. If it is determined to be out of focus, enter the next step of the automatic focusing process;

[0011] Step 4: Automatic focusing is achieved based on the three-point hill climbing control logic, in which extreme points are found based on the change of clarity gradient.

[0012] The present invention also provides a system for implementing the method.

[0013] The invention also provides an infrared zoom imaging system realized based on the method.

[0014] (III) Beneficial effects

[0015] The present invention proposes a self-triggering fast focusing method based on motion and stillness judgment and clarity detection. This method can accurately determine the scene motion state and blur level, and automatically trigger the focusing operation if the target area is determined to be out of focus and blurry. At the same time, this method optimizes the automatic focusing control logic based on the traversal method, and can realize fast movement and positioning of the focus, achieving the overall effect of automatic recognition, automatic triggering, and fast focusing of the automatic focusing process. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a flow chart of the controlled traversal autofocus algorithm of the present invention;

[0017] Figure 2 A brief flow chart of the self-triggering fast automatic focusing method of the present invention;

[0018] Figure 3 This is a flow chart of the hill-climbing automatic focusing of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.

[0020] The present invention provides a self-triggering fast automatic focusing method for an infrared zoom imaging system, which mainly includes two parts: one part is motion and stillness judgment and blur detection; the other part is a hill climbing fast focusing control algorithm based on gradient descent, which is finally combined to realize self-triggering fast focusing on the target area. The overall working process of the scheme is briefly shown as follows: Figure 2 As shown, it mainly includes the following steps:

[0021] Step 1: Perform preprocessing operations on the collected infrared image, mainly including non-uniform correction, bad pixel replacement, image enhancement and other processing, to obtain a uniform and high-contrast infrared image data source;

[0022] Step 2: Use the motion detection function to determine whether the current scene is a motion scene. If the scene is determined to have changed, execute the next step to further determine whether the target area is out of focus or blurred. Otherwise, determine the next scene.

[0023] Step 3: Calculate the clarity index of the target area through the clarity evaluation function, and then determine whether the target is in a defocused state through the clarity threshold. If it is determined to be out of focus, enter the next step of the automatic focusing process;

[0024] Step 4: Automatic focusing is realized based on the three-point hill climbing control logic, in which the extreme point is found based on the change of the clarity gradient. Since the clarity evaluation function has a single extreme value characteristic, this characteristic can be used to find the extreme point. Specifically, for step 4, the hill climbing automatic focusing process is mainly divided into three stages:

[0025] In the first stage, the direction of movement needs to be determined. First, move quickly to the left and right in a small range with the current position as the center for a distance, record the clarity values ​​of the center point, the left end point and the right end point, and sort and judge the clarity values ​​of these three points. If these three points are monotonically rising or monotonically falling, the initial direction is determined by the monotonicity of the three points, and then quickly move in the direction of rising clarity. If the three points are non-monotonic, there are two cases. One is that the center point is high and the left and right points are low. It is believed that the clarity extreme value is within this initial small range, so it is necessary to move slowly in the opposite direction after the last movement. The other case is that the center point is low and the left and right points are high. This situation may be caused by calculation errors. Although it does not conform to the single extreme value characteristics of the clarity function, it also exists objectively. In this case, it is necessary to move quickly to the direction of the high-definition point;

[0026] The second stage is the fast movement stage, in which the focus motor is controlled to move quickly toward the clarity point, and the extreme point is found in the process. When the extreme point is exceeded, the movement continues, and the movement stops when the clarity drops below a certain threshold value of the maximum clarity.

[0027] The third stage is reverse slow movement: after passing the clearest point, stop and then move in reverse slowly until the clarity reaches the highest clarity, then stop moving, reach the clearest position, and the autofocus process ends.

[0028] In step 2, the detection principle of the motion detection function is mainly based on the inter-frame changes of the scene, and the inter-frame difference method is used to determine whether the current scene is in motion;

[0029] The inter-frame difference method is mainly used to determine whether an image is in motion. Its expressions are as follows: (1) and (2), where R and C are the number of rows and columns of the image, and p ij n is the gray value of the coordinate (i, j) position in the nth frame image, detaT is the calculated inter-frame difference value, and udT is the calculated single-pixel inter-frame difference value;

[0030]

[0031] udT=detaT / (R·C)……………………(2)

[0032] Furthermore, the following process needs to be performed for step 2:

[0033] (1) Calculate the difference between block frames

[0034] In order to avoid the situation of local small-scale motion in a uniform background, which would lead to the failure of motion detection, the global calculation is optimized to block calculation. The full 640×512 area array image is divided into 4×5 blocks, each containing 128×128 pixels. The adjacent frames are differentiated and optimized to alternate frame differences. The single pixel inter-frame difference value udT of the block is calculated according to the following formula (4): l By optimizing the value, it can be determined whether there is local motion when most of the scene is static, thereby improving the accuracy of frame difference. Its expression is shown in Equation 3 and Equation 4.

[0035]

[0036] T l =detaT l / (LR·LC)……………………(4)

[0037] detaT l is the inter-frame difference value of the block, LR and LC are the number of rows and columns of the block;

[0038] (2) Calculate the number of image blocks exceeding the threshold

[0039] If the inter-block frame difference value is greater than 8, the block (scene block) has moved and can be called a motion block. The number of motion blocks in 20 blocks is counted. If the number of motion blocks in 20 consecutive frames is greater than 10, it is considered that the scene has changed and a fuzzy judgment is required for the target area.

[0040] In step 3, the Sobel convolution operator is used to convolve the image f(x, y) in both horizontal and vertical directions. The gradient value S(x, y) is calculated as formula (5), where S h and S v are Sobel horizontal and vertical convolution operators, respectively, and their expressions are as shown in formula (6); through the Sobel horizontal and vertical operator windows of size 3×3, the convolution operation is performed on the focus target area range, and the square sum of the gradient values ​​of the entire image is obtained to obtain the clarity evaluation function, and its expression is shown in formula (7), which can obtain a better focus evaluation effect;

[0041]

[0042] Step 4: Hill Climbing Autofocus Solution

[0043] The control of lens movement is mainly carried out by stepping focus. Under the stepping focus function, the lens stepping motor performs a movement with the minimum step length. Therefore, the movement distance can be controlled by the number of times the stepping focus is sent, and the movement rate can be adjusted by changing the cycle frequency of sending the stepping focus. Therefore, the movement distance and movement speed of the focusing lens assembly can be controlled by stepping focus.

[0044] The control logic based on the hill climbing method is based on the idea of ​​the change of the definition gradient. Due to the single extreme value characteristic of the definition function, this characteristic can be used to find the extreme point. The specific control process of the hill climbing automatic focusing control scheme is as follows Figure 3 As shown, it mainly includes the following steps:

[0045] (1) Record the clarity value Q2 of the current center point before movement;

[0046] (2) Control the lens motor to move a small range in the direction of decreasing focal length, and perform step-focusing movement N times at a slow speed. After the last movement, record the left endpoint sharpness value Q1;

[0047] (3) Control the lens motor to move a small range in the direction of increasing focal length, perform stepping focus + movement slowly 2N times, and record the left endpoint clarity value Q3 after the last movement;

[0048] (4) Determine the direction of hill-climbing motion based on the relative relationship between points Q1, Q2, and Q3:

[0049] If Q3>Q1>Q2 or Q3>Q2>Q1, it means that the extreme point of clarity is in the direction of Q1-Q2-Q3, so move quickly to the focus + direction and continue to look for the extreme point;

[0050] If Q2>Q1>Q3 or Q2>Q3>Q1, it means that the extreme value of clarity is between the small range of Q1 and Q3, so move slowly in the focus direction to find the extreme value in the small range;

[0051] If Q3>Q2>Q1 or Q1>Q3>Q2, it means that the extreme point of clarity is in the direction of Q3-Q2-Q1, so move quickly in the focus-direction and continue to look for the extreme point;

[0052] (5) While continuing to search for the extreme point, the maximum clarity Qmax of the motion process is updated in real time. If the number of motion steps is less than the upper limit, that is, within the upper limit range of the motion, the clarity of the target area of ​​the current frame is calculated in real time. When the clarity is less than Qmax×Th1, the motion is stopped, indicating that the extreme point has been passed and the clarity is decreasing. Generally, Th1=0.95, then step (6) is entered. If the number of motion steps has reached the upper limit, that is, the upper limit range of the motion has been reached, it means that the clarity of the entire process is in an increasing trend and the extreme inflection point has been found. At this time, it is considered that the extreme point is outside the upper limit, and the automatic focusing process is stopped at the extreme inflection point, and the next trigger is waited for.

[0053] (6) If an extreme point is found within the upper limit range, slow movement is performed in the opposite direction of the fast movement direction. When the real-time clarity is greater than Qmax×Th2, generally Th2=0.98, slow movement is stopped and the current position is considered to be a clear position, and the automatic focusing process ends.

[0054] It can be seen that the present invention proposes a self-triggering fast focusing method based on motion and stillness judgment and clarity detection. This method can accurately determine the motion state and blur degree of the scene. If the target area is determined to be out of focus and blurred, the focusing operation is automatically triggered. At the same time, the automatic focusing control logic based on the traversal method is optimized, which can realize the rapid movement and positioning of the focus, and achieve the overall effect of automatic recognition, automatic triggering, and fast focusing of the automatic focusing process. Under multi-scene verification conditions, the automatic focusing operation is triggered accurately, the fastest automatic focusing speed is controlled within 500ms, and the self-triggering success rate is above 90%. In the development process of a certain optoelectronic system cooled long-wave thermal imager, the above method is used to optimize the automatic focusing control. The average focusing time of the thermal imager is shortened from an average of 4.5s to within 1s, and the focusing speed is significantly improved. It has a certain guiding role in the uncontrolled automatic focusing control of the infrared zoom imaging system and has a certain versatility.

[0055] The method of the present invention starts from the change law of the clarity curve of the infrared zoom imaging system, and specifically proposes an automatic focusing control scheme based on the hill climbing method, improves the shortcomings and deficiencies of the traversal method, and has the following advantages: First, the required time is short, and a variable speed control method of the focusing mechanism is realized. Compared with the traditional uniform speed control method, the focusing time is shortened, and it basically moves directly to the clear point without redundant action paths. The number of reciprocating operations of the focusing motor can be reduced, and the focusing stroke is effectively shortened, and the efficiency of automatic focusing is further improved, which is convenient for engineering implementation; second, the scheme does not need to obtain the position information of the focusing motor in real time, avoiding the influence of the feedback delay introduced by communication and machinery, and the automatic focusing logic can be closed-loop by itself, and does not need to handshake with the lens control board for multiple times. It only needs to send stepping focusing instructions. Third, the focusing motor group is controlled by the stepping focusing operation, and the movement distance and movement speed can be flexibly controlled according to the number of transmissions and cycles, and the reliability and versatility are stronger.

[0056] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A self-triggering fast automatic focusing method for an infrared zoom imaging system, characterized in that: The following steps are involved: Step 1: Perform preprocessing operations on the collected infrared image, including non-uniform correction, bad pixel replacement, and image enhancement processing to obtain a uniform, high-contrast infrared image data source; Step 2: Use the motion detection function to determine whether the current scene is a motion scene. If the scene is determined to have changed, execute the next step to further determine whether the target area is out of focus or blurred. Otherwise, determine the next scene. Step 3: Calculate the clarity index of the target area through the clarity evaluation function, and then determine whether the target is in a defocused state through the clarity threshold. If it is determined to be out of focus, enter the next step of the automatic focusing process; Step 4: Automatic focusing is achieved based on the three-point hill climbing control logic, in which extreme points are found based on the change of clarity gradient.

2. The method according to claim 1, characterized in that In step 2, the detection principle of the motion detection function is based on the inter-frame changes of the scene, and the inter-frame difference method is used to determine whether the current scene is in motion.

3. The method according to claim 2, characterized in that In step 2, the inter-frame difference method is used to determine whether the image is in motion. Its expressions are as shown in equations (1) and (2), where R and C are the number of rows and columns of the image, is the gray value of the coordinate (i, j) position in the nth frame image, detaT is the calculated inter-frame difference value, and udT is the calculated single-pixel inter-frame difference value; udT=detaT / (R·C)……………………(2).

4. The method according to claim 3, characterized in that Step 2 executes the following process: (1) Calculate the difference between block frames The global calculation is optimized to block calculation, and the full 640×512 area array image is divided into 4×5 blocks, each block contains 128×128 pixels. The adjacent frame difference is optimized to the alternate frame difference, and the single pixel inter-frame difference value of the block is calculated according to the following formula (4): l By optimizing the value, it can be determined whether there is local motion when most of the scene is static. The calculation formula of the inter-frame difference value of the block is as follows: udT l =detaT l / (LR·LC)………………………(4) detaT l is the inter-frame difference value of the block, LR and LC are the number of rows and columns of the block; (2) Calculate the number of image blocks exceeding the threshold If the inter-frame difference value of a block is greater than 8, the block moves and is called a motion block. The number of motion blocks in 20 blocks is counted. If the number of motion blocks in 20 consecutive frames is greater than 10, it is considered that the scene has changed and a blur judgment is required for the target area.

5. The method according to claim 1, characterized in that In step 3, the Sobel convolution operator is used to convolve the image f(x, y) in both horizontal and vertical directions. The gradient value S(x, y) is calculated as formula (5), where S h and S v are Sobel horizontal and vertical convolution operators respectively, and the calculation formula is as shown in formula (6); through the 3×3 size Sobel horizontal and vertical operator windows, the convolution operation is performed on the focus target area range, and the square sum of the gradient values ​​of the entire image is obtained to obtain the clarity evaluation function Q, and the expression of Q is shown in formula (7):

6. The method according to claim 1, characterized in that In step 4, the hill climbing autofocusing process based on the three-point hill climbing control logic is divided into three stages: The first stage determines the direction of movement: first, with the current position as the center, quickly move a distance to the left and right in a small range, record the clarity values ​​of the center point, the left end point and the right end point, and sort and judge the clarity values ​​of these three points. If these three points are monotonically rising or monotonically falling, the initial direction is determined by the monotonicity of the three points, and then quickly move in the direction of rising clarity. If the three points are non-monotonic, there are two cases. One is that the center point is high and the left and right points are low. It is considered that the clarity extreme value is within this initial small range, so it is necessary to move slowly in the opposite direction after the last movement. The other case is that the center point is low and the left and right points are high. In this case, it is necessary to quickly move in the direction of the high-definition point. The second stage is the rapid movement stage, in which the focus motor is controlled to move quickly toward the clarity point, and the extreme point is found in the process. When the extreme point is exceeded, the movement continues, and the movement stops when the clarity drops below a certain threshold value of the maximum clarity. The third stage is reverse slow movement: after passing the clearest point, stop and then move in reverse slowly until the clarity reaches the highest clarity, then stop moving, reach the clearest position, and the autofocus process ends.

7. The method according to claim 6, characterized in that In step 4, the movement distance and movement speed of the focusing lens assembly are controlled by stepping focus.

8. The method according to claim 6, characterized in that In step 4, the hill climbing auto-focusing process based on the three-point hill climbing control logic to realize auto-focusing includes the following steps: (1) Record the clarity value Q2 of the center point before movement; (2) Control the lens motor to move a small range in the direction of decreasing focal length, and perform step-focusing movement N times at a slow speed. After the last movement, record the left endpoint sharpness value Q1; (3) Control the lens motor to move a small range in the direction of increasing focal length, perform stepping focus + movement slowly 2N times, and record the left endpoint clarity value Q3 after the last movement; (4) Determine the direction of hill-climbing motion based on the relative relationship between points Q1, Q2, and Q3: If Q3>Q1>Q2 or Q3>Q2>Q1, it means that the extreme point of clarity is in the direction of Q1-Q2-Q3, so move quickly to the focus + direction and continue to look for the extreme point; If Q2>Q1>Q3 or Q2>Q3>Q1, it means that the extreme value of clarity is between the small range of Q1 and Q3, so move slowly in the focus direction to find the extreme value in the small range; If Q3>Q2>Q1 or Q1>Q3>Q2, it means that the extreme point of clarity is in the direction of Q3-Q2-Q1, so move quickly in the focus-direction and continue to look for the extreme point; (5) While continuing to search for the extreme point, the maximum clarity Qmax of the movement process is updated in real time. If the number of movement steps is less than the upper limit, that is, within the upper limit range of the movement, the clarity of the target area of ​​the current frame is calculated in real time. When the clarity is less than Qmax×Th1, the movement is stopped, indicating that the extreme point has been passed and the clarity is on a downward trend. Th1 is a preset value, and then step (6) is entered; if the number of movement steps has reached the upper limit, that is, the upper limit range of the movement has been reached, it means that the clarity of the entire process is on an increasing trend and the extreme inflection point has been found. At this time, it is considered that the extreme point is outside the upper limit, and the automatic focusing process is stopped at the extreme inflection point, and waits for the next trigger; (6) If the extreme point is found within the upper limit range, slow movement is performed in the opposite direction of the fast movement direction. When the real-time clarity is greater than Qmax×Th2, Th2 is the preset value, the slow movement is stopped, and the current position is considered to be a clear position, and the automatic focusing process ends.

9. A system for implementing the method according to any one of claims 1 to 8.

10. An infrared zoom imaging system implemented based on the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Thermal infrared imager automatic focusing method and system based on image definition evaluation

    CN122149648A