Photoelectric automatic zoom tracking method and system, terminal and readable storage medium

Through the closed-loop idea and proportional integral control algorithm, the problems of poor accuracy and low stability in photoelectric automatic zoom technology are solved, and efficient image tracking and imaging quality are achieved.

CN118945469APending Publication Date: 2024-11-12XIAN TIANYUAN ELECTRO-OPTICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410999051.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing photoelectric automatic zoom technology has problems such as poor follow-up zoom accuracy, low stability, poor image clarity and poor imaging quality in complex environments.

Method used

The closed-loop idea is used to track the target changes, generate zoom commands based on the change of the target size in the tracker image, and introduce a proportional integral control algorithm to achieve automatic zoom and focus through the zoom motor and focus motor to ensure the constant proportion of the target in the image and the stable clarity of the target in the image.

Benefits of technology

It improves zoom accuracy and stability, increases the camera's zoom bandwidth, achieves fast response and high user experience, and improves imaging quality in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945469A_ABST
    Figure CN118945469A_ABST
Patent Text Reader

Abstract

The invention discloses a photoelectric automatic zoom tracking method and system, a terminal and a readable storage medium, and relates to the technical field of photoelectric automatic zoom. The photoelectric automatic zoom tracking method comprises the following steps: configuring a target size at an initial moment; calculating a difference value between a target size in the tracker image and a target size at an initial moment, generating a zooming instruction based on the difference value, receiving the zooming instruction by the camera unit, enabling the target size in the tracker image to be the same as the target size at the initial moment, and outputting a tracking focal length value at the moment; aiming at different preset object distances of the camera, respectively obtaining focusing values of the clear images corresponding to different focal length values, and obtaining a change curve of the focusing values along with the focal length values under the different preset object distances; obtaining a tracking focus value corresponding to the tracking focal length value based on the change curve; the target is tracked based on the tracking focus value. According to the invention, the problems of poor following zooming precision, low stability, poor tracking image definition, poor imaging quality in a complex environment and the like in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photoelectric automatic zoom, and in particular to a photoelectric automatic zoom tracking method, system, terminal, and readable storage medium. Background Art

[0002] With the continuous advancement of science and technology, the demand for photoelectric automatic zoom technology in various applications is growing. Photoelectric automatic zoom technology is mainly used to track and capture moving targets in real time, ensuring that the proportion of the target in the image is constant and the clarity is stable. This technology is widely used in security turntables, drone pods, military reconnaissance and other scenarios.

[0003] In traditional optical zoom systems, zooming usually relies on manual operation or simple automatic adjustment, and relies on simple zoom algorithms. These zoom methods are difficult to meet the requirements of real-time and accuracy. Manual zoom is not only complicated and inefficient, but also cannot guarantee the clarity of the image and the constancy of the target scale when tracking fast-moving targets. Simple automatic adjustment systems usually lack sufficient intelligence and cannot make real-time and accurate zoom adjustments according to the target's moving speed and distance.

[0004] In summary, the prior art has at least the following defects:

[0005] ① The existing technology uses a stepper motor controlled by a simple algorithm, which has poor accuracy and low stability;

[0006] ② The zoom motor used in the prior art uses a simple algorithm of limit plus stepping motor, and the low bandwidth has a great impact on the follow zoom;

[0007] ③ The existing technology cannot guarantee the clarity of the image and the constancy of the target ratio, which affects the image tracking process;

[0008] ④ The existing technology has poor imaging quality in complex environments, resulting in a poor user experience. Summary of the invention

[0009] The purpose of the present invention is to provide a photoelectric automatic zoom tracking method, system, terminal, and readable storage medium, which can solve the problems existing in the prior art such as poor follow-up zoom accuracy, low stability, poor tracking image clarity, and poor imaging quality in complex environments.

[0010] To achieve the above object, the present invention provides the following technical solutions:

[0011] In a first aspect, the present invention provides a photoelectric automatic zoom tracking method, comprising the following steps:

[0012] S1. Configure the target size at the initial moment;

[0013] S2. Calculate the difference between the target size in the tracker image and the target size at the initial moment, generate a zoom command based on the difference, the camera unit receives the zoom command, makes the target size in the tracker image the same as the target size at the initial moment, and outputs the tracking focal length value at this time;

[0014] S3. For different camera object distances, respectively, obtain the focus value of the clear image corresponding to the preset focal length value, and obtain the focus value change curve with the focal length value at different object distances;

[0015] S4. Based on the change curve, obtain the tracking focus value corresponding to the tracking focal length value;

[0016] S5. Track the target based on the tracking focus value.

[0017] As a possible implementation, when the difference is a positive value, the zoom command controls the camera unit to zoom in or out; when the difference is a negative value, the zoom command controls the camera unit to zoom in or out.

[0018] As a possible implementation method, S3 specifically includes the following sub-steps:

[0019] S30. Testing the focus value of a clear image corresponding to a preset focal length value at different object distances of the camera;

[0020] S31. With the focal length value as the horizontal coordinate and the focus value as the vertical coordinate, determine the change trend of the focus value along the X-axis direction with the preset focal length value. When determining the preset focal length value X1~X n When the corresponding focus value connection line is an approximate straight line, the slope and intercept are calculated, and the straight line segment is determined based on the slope and intercept; when the preset focal length value X is determined n ~X n+m When the corresponding focus value connection line is a curve, connect X n ~X n+m The focusing value of the segment is used to obtain the curve segment; the straight line segment and the curve segment form a change curve; X n is the critical point of focal length.

[0021] As a possible implementation manner, S4 is specifically: when the tracking focal length value is less than the focal length critical point, query the straight line segment to obtain the tracking focus value corresponding to the tracking focal length value.

[0022] As a possible implementation, S4 is specifically: when the tracking focal length value is greater than the focal length critical point and the tracking focal length value is within the camera object distance, obtaining the tracking focus value corresponding to the tracking focal length value based on a table lookup method.

[0023] As a possible implementation method, S4 is specifically as follows: when the tracking focal length value is greater than the focal length value critical point, and the focus value corresponding to the tracking focal length value is not within the camera object distance, the curve segment of the object distance where the tracking focal length value is located is predicted based on the curve segment of the adjacent object distance to obtain the predicted focus value, and the predicted focus value is added to the compensation value to obtain the tracking focus value corresponding to the tracking focal length value, and the compensation value is an empirical value.

[0024] As a possible implementation method, the curve segment of the object distance where the tracking focal value is located is predicted based on the curve segment of the adjacent object distance to obtain the predicted focus value. Specifically, the proportional coefficient of the curve segment of the object distance where the tracking focal value is located is calculated based on the curve segment of the adjacent object distance; the predicted focus value is obtained based on the proportional coefficient and the focus value of the curve segment of the adjacent object distance.

[0025] In a second aspect, the present invention provides an optoelectronic automatic zoom tracking system for executing the optoelectronic automatic zoom tracking method provided in the first aspect, comprising: a camera unit, a tracker, a distance measurement unit, and a proportional integral controller;

[0026] The camera unit includes a zoom motor, a focus motor, and a movement. The movement is used to receive a zoom instruction. The zoom motor is used to execute the zoom instruction so that the target size in the tracker image is the same as the target size at the initial moment. The focus motor tracks the target based on the focus value of the clear image.

[0027] The tracker is used to track the target and provide feedback on the target size;

[0028] The ranging unit is used to measure the distance from the camera lens to the target;

[0029] The proportional-integral controller generates a zoom command based on the difference between the target size in the tracker image and the target size at the initial moment.

[0030] In a third aspect, the present invention provides a terminal, including a processor and a communication interface coupled to the processor, wherein the processor is used to run a computer program or instruction to implement the photoelectric automatic zoom tracking method provided in the first aspect.

[0031] In a fourth aspect, the present invention provides a computer-readable storage medium, comprising a processor and a communication interface coupled to the processor, wherein the processor is used to run a computer program or instruction to implement the photoelectric automatic zoom tracking method provided in the first aspect.

[0032] Compared with the prior art, the beneficial effects of the present invention are:

[0033] 1. The photoelectric automatic zoom tracking method provided by the present invention adopts a closed-loop approach to track changes in the target, and performs zoom control based on changes in the size of the target in the tracker image, so that the size of the target in the tracker image remains unchanged, and the image size control is more accurate and stable.

[0034] 2. The photoelectric automatic zoom tracking method provided by the present invention introduces a proportional integral control algorithm, so that the zoom bandwidth of the camera is increased, the real-time performance is strong, and the response speed is faster.

[0035] 3. The photoelectric automatic zoom tracking method provided by the present invention does not require manual operation of zooming and focusing, and all operations are completed automatically. The present invention is more intelligent and more flexible.

[0036] 4. The photoelectric automatic zoom tracking method provided by the present invention adopts real-time focus adjustment during the zooming process, which positively affects the automatic zoom effect, improves the target imaging quality and provides a better user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0038] Figure 1 A flow chart of the photoelectric automatic zoom tracking method provided by an embodiment of the present invention;

[0039] Figure 2 A graph showing a change in the focus value of a clear image corresponding to a preset focal length value at different object distances provided by an embodiment of the present invention;

[0040] Figure 3 A schematic diagram of a photoelectric automatic zoom tracking system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. For example, the first threshold and the second threshold are only used to distinguish different thresholds, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0042] It should be noted that, in the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0043] In the present invention, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The following at least one item (items) or similar expressions thereof refer to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one item (items) of a, b or c can mean: a, b, c, the combination of a and b, the combination of a and c, the combination of b and c, or the combination of a, b and c, where a, b, c can be single or multiple.

[0044] Traditional optical zoom usually relies on manual operation or simple automatic adjustment, which is difficult to meet the requirements of real-time and accuracy, and cannot guarantee the clarity of the image and the constancy of the target ratio in the fast-moving target tracking. The present invention provides a photoelectric automatic zoom tracking method, system, terminal, and readable storage medium, which can solve the problems of poor follow-up zoom accuracy, low stability, poor tracking image clarity, and poor imaging quality in complex environments in the prior art.

[0045] In a first aspect, the present invention provides a photoelectric automatic zoom tracking method, see Figure 1 , including the following steps:

[0046] S1. Configure the target size at the initial moment;

[0047] As an example, when tracking a target, the size of the target at the initial moment is known and is set as S_ref.

[0048] S2. Calculate the difference between the target size in the tracker image and the target size at the initial moment, and generate a zoom instruction based on the difference;

[0049] As an example, the tracker tracks the target and feeds back the target size in real time. Assuming that the target size fed back by the tracker at time k is S_res, a zoom instruction is generated according to the difference between the target size S_res in the tracker image and the target size S_ref at the initial time.

[0050] As a possible implementation, when the difference is a positive value, the zoom command controls the camera unit to zoom in or out; when the difference is a negative value, the zoom command controls the camera unit to zoom in or out.

[0051] As an example, the difference is a positive value, that is, the target size S_res in the tracker image is greater than the target size S_ref at the initial moment, indicating that the target is approaching the camera at this moment, and the zoom instruction controls the zoom reduction of the camera unit at this time; the difference is a negative value, that is, the target size S_res in the tracker image is less than the target size S_ref at the initial moment, indicating that the target is moving away from the camera at this moment, and the zoom instruction controls the zoom increase of the camera unit at this time.

[0052] The camera unit receives the zoom command, makes the target size in the tracker image the same as the target size at the initial moment, and outputs the tracking focal length value at this moment;

[0053] Exemplarily, when the target size S_res in the tracker image is greater than the target size S_ref at the initial moment, the camera unit receives a zoom instruction to control zoom reduction, so that the target size in the tracker image is the same as the target size at the initial moment, so that the target size in the tracker image remains constant, and outputs the tracking focal length value at this time.

[0054] The photoelectric automatic zoom tracking method provided by the present invention adopts a closed-loop approach to track changes in a target, and performs zoom control based on size changes of the target in a tracker image, so that the size of the target in the tracker image remains unchanged, and image size control is more accurate and stable.

[0055] S3. For different camera object distances, respectively, obtain the focus value of the clear image corresponding to the preset focal length value, and obtain the focus value change curve with the focal length value at different object distances;

[0056] As a possible implementation method, S3 specifically includes the following sub-steps:

[0057] S30. Testing the focus value of a clear image corresponding to a preset focal length value at different object distances of the camera;

[0058] As an example, based on the imaging principle of a zoom camera, at a specific object distance and focal length, there should be a focus value within a certain range to make the image clear. Therefore, according to the focal range of the camera, the focus value of the clear image corresponding to the preset focal length value at different object distances of the camera is actually tested and recorded. Exemplarily, the object distance resolution is set to 20m, that is, the focal length value of the clear image corresponding to the preset focus value when the object distance is 10m, 30m, 50m, 70m... is recorded respectively. The preset focal length value is selected with a resolution of 1mm. For example, assuming that the focal range of the camera is 70~200mm, the preset focal length values ​​are 70mm, 71mm, 72mm...198mm, 199mm, 200mm. The camera automatically focuses to obtain the above-mentioned focal length ordinate Y-axis, and judges the change trend of the focus value along the X-axis direction with the preset focal length value. When the preset focal length values ​​X1~X nWhen the line connecting the corresponding focus values ​​is an approximate straight line, the slope and the intercept are calculated, and the straight line segment is determined based on the slope and the intercept;

[0059] As an example, when determining the preset focal length values ​​X1 to X n When the corresponding focus value connection line is an approximate straight line, the least square method is used to determine the fitting straight line segment, and y=ax+b is obtained, where y represents the focus value, x represents the preset focal length value, a represents the slope, and b is the intercept;

[0060] When determining the preset focal length value X n ~X n+m When the corresponding focus value connection line is a curve, connect X n ~X n+m The focusing value of the segment is used to obtain the curve segment; the straight line segment and the curve segment constitute the change curve; the X n is the critical point of focal length.

[0061] S4. Based on the change curve, obtain the tracking focus value corresponding to the tracking focal length value;

[0062] As a possible implementation manner, S4 is specifically: when the tracking focal length value is less than the focal length critical point, query the straight line segment to obtain the tracking focus value corresponding to the tracking focal length value.

[0063] As a possible implementation, S4 is specifically: when the tracking focal length value is greater than the focal length critical point and the tracking focal length value is within the camera object distance, obtaining the tracking focus value corresponding to the tracking focal length value based on a table lookup method.

[0064] As a possible implementation method, S4 is specifically as follows: when the tracking focal length value is greater than the focal length value critical point, and the focus value corresponding to the tracking focal length value is not within the camera object distance, the curve segment of the object distance where the tracking focal length value is located is predicted based on the curve segment of the adjacent object distance to obtain the predicted focus value, and the predicted focus value is added to the compensation value to obtain the tracking focus value corresponding to the tracking focal length value, and the compensation value is an empirical value.

[0065] As an example, it is found from the table that the focus value corresponding to the tracking focal length value is not within the preset object distance. For example, the curve segment of the focus value corresponding to the tracking focal length value is S n , at the object distance S n-1 and S n+1 Between the curve segments, based on the adjacent S n-1 and S n+1 The curve segment predicts the curve segment S at the object distance where the tracking focal length value is located n , obtain the predicted focus value, determine the compensation value according to the image clarity, and add the predicted focus value to the compensation value to obtain the tracking focus value corresponding to the tracking focal length value.

[0066] As a possible implementation method, the curve segment of the object distance where the tracking focal value is located is predicted based on the curve segment of the adjacent object distance to obtain the predicted focus value. Specifically, the proportional coefficient of the curve segment of the object distance where the tracking focal value is located is calculated based on the curve segment of the adjacent object distance; the predicted focus value is obtained based on the proportional coefficient and the focus value of the curve segment of the adjacent object distance.

[0067] As an example, the following formula is used to calculate the proportional coefficient of the curve segment at the object distance where the tracking focal length value is located:

[0068]

[0069] In the formula, K s The proportional coefficient of the curve segment that tracks the focal length value at the object distance, S n Indicates the object distance of the curve segment to be predicted, S n-1 and S n+1 They respectively represent the object distances of the two curve segments adjacent to the curve segment to be predicted.

[0070] As an example, the predicted focus value is calculated using the following formula:

[0071] Y S =K S ×(Y S+1 -Y S-1 )+Y S-1 +I

[0072] In the formula, K s The proportional coefficient of the curve segment that tracks the focal length value at the object distance, Y S Represents the predicted focus value, Y S-1 and Y S+1 They respectively represent the recorded focus values ​​close to the predicted focus value, and I represents the compensation value.

[0073] The photoelectric automatic zoom tracking method provided by the present invention introduces a proportional integral control algorithm, so that the zoom bandwidth of the camera is increased, the real-time performance is strong, and the response speed is faster.

[0074] S5. Track the target based on the tracking focus value.

[0075] The photoelectric automatic zoom tracking method provided by the present invention adopts real-time focus adjustment during the zooming process, which positively affects the automatic zoom effect, improves the target imaging quality, and improves the user experience.

[0076] To facilitate understanding of the technical solution of the present application, further description is given below in conjunction with specific embodiments.

[0077] See also Figure 2, select an integrated camera with a focal length range of 6.5 to 247 mm, and use the photoelectric automatic zoom tracking method of the present invention to track the target. With a focal length resolution of 1 mm and an object distance resolution of 20 m, the focus value data of about 240 groups of clear images corresponding to the focal length values ​​at each object distance are obtained by testing, with the focal length value as the horizontal coordinate and the focus value as the vertical coordinate. The straight line segment of the change curve is calculated by fitting: y = 7.69x + 0.1, and the critical point of the focal length value is 24.5 mm after observing the change curve.

[0078] The target size at the initial moment is set to 100*100 pixels. Assuming that the target moves away from the tracker radially, the target size fed back by the tracker at the nth cycle is 98*98, which is smaller than the target size at the initial moment. At this time, the proportional integral controller outputs a motor speed command of 1° / s, causing the zoom motor to zoom in and out, and the field of view is reduced so that the target area in the tracker image changes toward the 100*100 pixel area. Through query, the current tracking focal length value is 20mm and the object distance is 80m. The current tracking focal length value is less than the critical point of the focal length value, so the straight line segment relationship y=7.69x+0.1 is used to calculate the tracking focus value of the clear image corresponding to the current tracking focal length value, which is 153.9. 153.9 is sent to the integrated camera as the tracking focus command, and the focus motor tracks the target based on the tracking focus value to keep the target image clear.

[0079] Assume that the target size fed back by the tracker in the n+1th cycle is 101*101, which is larger than the target size at the initial moment. At this time, the proportional-integral controller outputs a motor speed command of -1° / s, causing the zoom motor to zoom out, and the field of view is enlarged so that the area of ​​the target in the tracker image changes toward the area of ​​100*100 pixels. By querying, the current tracking focal length value is 50mm, the object distance is 140m, and the current tracking focal length value is greater than the focal length critical point. The table lookup method is used to find that the current tracking focal length value is not in the recorded curve segment. By comparison, it is found that the object distances of the adjacent curve segments are 130m and 150m. Substituting it into the above proportional coefficient solution formula, the proportional coefficient K is calculated. s =0.5, and substitute it into the predicted focus value calculation formula to get the predicted focus value Y S =-115, -115 is sent to the integrated camera as the tracking focus instruction. At this time, it is found that the image is not in the clearest state. The compensation value I=5 is initially set, and it is found that the image clarity is worse. Reverse compensation is required at this time. Therefore, the compensation value is determined to be I=-5, and the sum of the predicted focus value and the compensation value is used as the tracking focus value. The focusing motor tracks the target based on the tracking focus value to keep the target image clear.

[0080] The photoelectric automatic zoom tracking method provided by the present invention does not require manual operation of zooming and focusing, and all operations are completed automatically. The present invention is more intelligent and more flexible.

[0081] In a second aspect, the present invention provides an optoelectronic automatic zoom tracking system for executing the optoelectronic automatic zoom tracking method provided in the first aspect, see Figure 3 , including: camera unit, tracker, ranging unit, proportional integral controller;

[0082] The camera unit includes a zoom motor, a focus motor, and a movement. The movement is used to receive a zoom instruction. The zoom motor is used to execute the zoom instruction so that the target size in the tracker image is the same as the target size at the initial moment. The focus motor tracks the target based on the focus value of the clear image.

[0083] The tracker is used to track the target and provide feedback on the target size;

[0084] The ranging unit is used to measure the distance from the camera lens to the target;

[0085] The proportional-integral controller generates a zoom command based on the difference between the target size in the tracker image and the target size at the initial moment.

[0086] In a third aspect, the present invention provides a terminal, including a processor and a communication interface coupled to the processor, wherein the processor is used to run a computer program or instruction to implement the photoelectric automatic zoom tracking method provided in the first aspect.

[0087] In a fourth aspect, the present invention provides a computer-readable storage medium, comprising a processor and a communication interface coupled to the processor, wherein the processor is used to run a computer program or instruction to implement the photoelectric automatic zoom tracking method provided in the first aspect.

[0088] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the drawings, etc. In the specification, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the specification. Certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good results.

[0089] Although the present invention has been described in conjunction with specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present invention. Accordingly, this specification and the accompanying drawings are merely exemplary illustrations of the present invention and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present invention. Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, the present invention is intended to include such modifications and variations if they fall within the scope of the present invention and its equivalents.

Claims

1. A photoelectric automatic zoom tracking method, characterized in that: The steps include: S1. Configure the target size at the initial moment; S2. Calculate the difference between the target size in the tracker image and the target size at the initial moment, generate a zoom command based on the difference, the camera unit receives the zoom command, makes the target size in the tracker image the same as the target size at the initial moment, and outputs the tracking focal length value at this time; S3. For different camera object distances, respectively, obtain the focus value of the clear image corresponding to the preset focal length value, and obtain the focus value change curve with the focal length value at different object distances; S4. Based on the change curve, obtaining the tracking focus value corresponding to the tracking focal length value; S5. Tracking a target based on the tracking focus value.

2. The photoelectric automatic zoom tracking method according to claim 1, characterized in that: When the difference is a positive value, the zoom instruction controls the camera unit to zoom in or out; when the difference is a negative value, the zoom instruction controls the camera unit to zoom in or out.

3. The photoelectric automatic zoom tracking method according to claim 1, characterized in that: The S3 specifically includes the following sub-steps: S30. Testing the focus value of a clear image corresponding to a preset focal length value at different object distances of the camera; S31. With the focal length value as the horizontal coordinate and the focus value as the vertical coordinate, determine the change trend of the focus value along the X-axis direction with the preset focal length value. When determining the preset focal length value X1~X n When the corresponding focus value connection line is an approximate straight line, the slope and intercept are calculated, and the straight line segment is determined based on the slope and intercept; when the preset focal length value X is determined n ~X n+m When the corresponding focus value connection line is a curve, connect X n ~X n+m The focusing value of the segment is used to obtain the curve segment; the straight line segment and the curve segment constitute the change curve; the X n is the critical point of focal length.

4. The photoelectric automatic zoom tracking method according to claim 3, characterized in that: The step S4 specifically includes: when the tracking focal length value is less than the focal length critical point, querying the straight line segment to obtain the tracking focus value corresponding to the tracking focal length value.

5. The photoelectric automatic zoom tracking method according to claim 3, characterized in that: The S4 is specifically as follows: when the tracking focal length value is greater than the focal length critical point and the tracking focal length value is within the camera object distance, obtaining a tracking focus value corresponding to the tracking focal length value based on a table lookup method.

6. The photoelectric automatic zoom tracking method according to claim 3, characterized in that: Specifically, S4 includes: when the tracking focal value is greater than the focal value critical point and the focusing value corresponding to the tracking focal value is not within the object distance of the camera, predicting the curve segment of the object distance where the tracking focal value is located based on the curve segment of the adjacent object distance to obtain a predicted focusing value, adding the predicted focusing value to the compensation value to obtain the tracking focusing value corresponding to the tracking focal value, and the compensation value is an empirical value.

7. The photoelectric automatic zoom tracking method according to claim 6, characterized in that: The curve segment of the object distance where the tracking focal length value is located is predicted based on the curve segment of the adjacent object distance to obtain the predicted focusing value, specifically: based on the curve segment of the adjacent object distance, a proportional coefficient of the curve segment of the object distance where the tracking focal length value is located is calculated; and the predicted focusing value is obtained based on the proportional coefficient and the focusing value of the curve segment of the adjacent object distance.

8. An optoelectronic automatic zoom tracking system, used to execute the optoelectronic automatic zoom tracking method according to any one of claims 1 to 7, characterized in that: include: Camera unit, tracker, ranging unit, proportional integral controller; The camera unit includes a zoom motor, a focus motor, and a movement, wherein the movement is used to receive a zoom instruction, and the zoom motor is used to execute the zoom instruction so that the target size in the tracker image is the same as the target size at the initial moment; the focus motor tracks the target based on the focus value of the clear image; The tracker is used to track the target and feedback the target size; The distance measuring unit is used to measure the distance from the camera lens to the target; The proportional-integral controller generates a zoom command based on a difference between a target size in a tracker image and a target size at the initial time.

9. A terminal, characterized in that: It comprises a processor and a communication interface coupled to the processor, wherein the processor is used to run a computer program or instruction to implement the photoelectric automatic zoom tracking method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, comprising a processor and a communication interface coupled to the processor, wherein the processor is configured to run a computer program or instruction to implement the optoelectronic automatic zoom tracking method according to any one of claims 1 to 7.