Automatic zooming method based on lens curve and terminal

By pre-fitting the lens zoom curve function and performing equal interpolation, a set of lens curve functions is generated, which solves the problems of slow zoom speed and image stuttering/blurring caused by large computational load in the existing technology, and achieves a faster and more stable zoom process.

CN121815077APending Publication Date: 2026-04-07FUZHOU XINTU OPTOELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing automatic zoom technology involves a large amount of computation, resulting in slow zoom speed and a tendency for images to stutter or become blurry.

Method used

By pre-fitting lens zoom curve functions at different object distances and interpolating adjacent curves equally, a set of lens curve functions is generated. Subsequently, the zoom motor and zoom motor are adjusted according to historical position and sharpness change trends, reducing real-time calculations.

Benefits of technology

It reduces the amount of computation, increases the processing speed of zooming, avoids stuttering and blurring, and improves the stability and efficiency of zooming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121815077A_ABST
    Figure CN121815077A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic zooming method and terminal based on a lens curve, and the method comprises the steps: obtaining a data set which comprises the position of a zooming motor, the position of a zooming motor and the corresponding definition in a lens under different object distances; respectively fitting lens zooming curve functions corresponding to different object distances according to the data set; performing equal division interpolation on adjacent lens zooming curve functions according to a first preset number and obtaining an equal division interpolation function, and combining the lens zooming curve functions and the equal division interpolation function to form a lens curve function set; and adjusting the zoom motor and the zoom motor according to the historical positions of the zoom motor and the zoom motor in the lens curve function set and the definition change trend. According to the invention, the adjustment direction can be determined only according to the historical position of the lens curve function set and the definition change trend, the confidence space does not need to be calculated in real time, the operand is reduced, the processing speed in the zooming process is improved, and the situation of lagging or blurring is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to an automatic zooming method based on lens curve and a terminal. BACKGROUND

[0002] Automatic zoom tracking is an important part of automatic focusing function, which refers to that during the adjustment of zoom motor, the camera automatically adjusts the focusing motor to keep the scene in focus.

[0003] The current main automatic zoom calculates the initial confidence interval and the zoom tracking curve, adjusts the direction of the zoom tracking curve and updates the confidence interval, so that the zoom tracking curve is adjusted within a relatively narrow confidence interval, which ensures that the position of the focusing motor during the zoom operation process is in the focus position. The confidence interval is calculated in real time during the zoom process to ensure accuracy. However, it has the following shortcomings:

[0004] (1) The confidence interval is calculated in real time, which has a large amount of calculation and affects the speed of zooming, which may cause the picture to be stuck or the zoom confidence interval to be calculated, and the zoom motor has moved to the next position, so that the image is in a blurred state.

[0005] (2) The confidence interval is a range, and the position of the zoom motor is calculated according to the upper and lower limits of the confidence interval according to the weight. When the camera is in a wide-angle state, the weight calculation error may cause the picture to be blurred. SUMMARY

[0006] The technical problem to be solved by the present application is to provide an automatic zooming method based on lens curve and a terminal, which reduces the amount of calculation during zooming and avoids the occurrence of sticking or blurred conditions.

[0007] To solve the above technical problems, the technical scheme adopted by the present application is:

[0008] An automatic zooming method based on lens curve, comprising the steps of:

[0009] S1, acquiring a data set including the position of zoom motor, the position of zoom motor and the corresponding definition under different object distances in the lens;

[0010] S2, fitting a lens zoom curve function corresponding to different object distances according to the data set;

[0011] S3, equally dividing and interpolating the adjacent lens zoom curve functions according to a first preset number to obtain an equally divided interpolation function, and combining the lens zoom curve functions and the equally divided interpolation function to form a lens curve function set;

[0012] S4, adjusting the zoom motor and the zoom motor according to the historical positions of the zoom motor and the zoom motor in the lens curve function set and the clarity change trend.

[0013] To solve the above technical problems, another technical solution adopted by the present application is:

[0014] An automatic zooming zoom terminal based on a lens curve function, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor completes the following steps when executing the computer program:

[0015] S1, obtaining a data set including the positions of the zoom motor and the zoom motor and the corresponding clarity under different object distances;

[0016] S2, fitting a lens zooming zoom curve function corresponding to different object distances according to the data set;

[0017] S3, equally dividing and interpolating the adjacent lens zooming zoom curve functions according to a first preset number to obtain an equally divided interpolation function, and combining the lens zooming zoom curve functions and the equally divided interpolation function to form a lens curve function set;

[0018] S4, adjusting the zoom motor and the zoom motor according to the historical positions of the zoom motor and the zoom motor in the lens curve function set and the clarity change trend.

[0019] The present application has the beneficial effects of providing an automatic zooming zoom method and terminal based on a lens curve function, fitting lens zooming zoom curve functions under different object distances in advance, equally dividing and interpolating adjacent curve functions to generate a lens curve function set, and determining the adjustment direction according to the historical positions in the lens curve function set and the clarity change trend during the subsequent zooming zoom process, without the need for real-time calculation of the confidence space, reducing the amount of calculation, improving the processing speed during the zooming zoom process, and avoiding the occurrence of lag or blur. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 A flowchart of an automatic zooming zoom method based on a lens curve function in an embodiment of the present application;

[0021] Figure 2 A specific flowchart of an automatic zooming zoom method based on a lens curve function in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of an automatic zooming zoom terminal based on a lens curve function in an embodiment of the present application;

[0023] REFERENCE NUMERALS:

[0024] 1. An automatic zooming zoom terminal based on lens curve; 2. Memory;

[0025] 3. Processor. DETAILED DESCRIPTION

[0026] To illustrate the technical content of the present application, the purposes and effects achieved, the following embodiments are described in conjunction with the accompanying drawings.

[0027] Please refer to Figure 1 and Figure 2 An automatic zooming zoom method based on lens curve, comprising the steps of:

[0028] S1, obtaining a data set including lens zoom motor position, zoom motor position and corresponding sharpness under different object distances;

[0029] S2, fitting lens zoom curve functions corresponding to different object distances according to the data set respectively;

[0030] S3, dividing and interpolating the adjacent lens zoom curve functions according to the first preset number to obtain interpolation functions, and combining the lens zoom curve functions and the interpolation functions to form a lens curve function collection;

[0031] S4, adjusting the zoom motor and the zoom motor according to the historical positions of the zoom motor and the zoom motor in the lens curve function collection and the sharpness change trend.

[0032] From the above description, the beneficial effects of the present application are that an automatic zooming zoom method based on lens curve is provided, lens zoom curve functions under different object distances are fitted in advance, adjacent curves are divided and interpolated, a lens curve function collection is generated, and in the subsequent zooming process, only the adjustment direction can be determined according to the historical positions in the lens curve function collection and the sharpness change trend, without the need for real-time calculation of confidence space, reducing the amount of calculation, improving the processing speed in the zooming process, and avoiding the occurrence of lag or blur.

[0033] In the embodiments of the present application, the step S1 is specifically:

[0034] S11, setting a preset object distance, adjusting the positions of the zoom motor and the zoom motor in the lens under the preset object distance, and calculating the sharpness corresponding to the positions;

[0035] S12, recording the zoom motor position corresponding to the best sharpness under each zoom motor position, and forming a data set matching the preset object distance;

[0036] For example, assuming the preset object distance is 200 mm, the current zoom motor position is set as x at the preset object distance, then the zoom motor is moved from 1 to the maximum zoom motor position with a fixed interval, and the sharpness of the lens is recorded when the zoom motor is at each position, and the position of the zoom motor with the maximum sharpness is recorded. The zoom motor position corresponding to the best sharpness is recorded and a data set is formed. Preferably, for each preset object distance, 200 zoom motor positions with the best sharpness are collected to form a data set corresponding to the preset object distance.

[0037] S13, adjust the preset object distance, and return to step S11 until the number of preset object distances meets the second preset number.

[0038] From the above description, the data set corresponding to the second preset number of preset object distances is calculated in advance, which covers the approximate range that the lens may involve during zooming and focusing, and does not need to be calculated in real time, which improves the processing speed during zooming and focusing. Preferably, the second preset number is 7, and the corresponding preset object distances are: 100 mm, 200 mm, 300 mm, 500 mm, 1000 mm, 2000 mm and 10000 mm.

[0039] In the embodiment of the application, the step S2 is specifically:

[0040] S21, using a high-order function to preliminarily fit the data set, and generating a preliminary fitting function;

[0041] S22, parameter estimation of the preliminary fitting function to obtain a first fitting parameter;

[0042] S23, using the second preset number of preset object distances as the fitting input independent variable to perform secondary fitting on the first fitting parameter, and obtaining a secondary fitting parameter;

[0043] S24, substituting the secondary fitting parameter into the preliminary fitting function to obtain a lens zooming and focusing curve function corresponding to each preset object distance.

[0044] From the above description, in order to obtain the relationship within the data set, the data in the data set is preliminarily fitted using a high-order function, and the parameter is accurately processed subsequently. The process is as follows: first, parameter estimation is performed to obtain a first fitting parameter, and then the preset object distance is used as the fitting input independent variable to perform secondary fitting on the parameter, and finally the lens zooming and focusing curve function is obtained.

[0045] In addition, the inventors found in the test process that the fitting effects of different orders of the high-order function under the application conditions in this case are not the same. After multiple tests, in order to prevent overfitting caused by too high order or too large fitting error caused by too low order, it is determined that the fitting effect is best when the high-order function is a six-order exponential function, and specific examples are as follows:

[0046] The data is fitted by a six-order exponential function, and the formula is as follows:

[0047] f(x)=(ax+b)e x +ce 2x +de 3x +ee 4x +fe 5x +ge 6x +h;

[0048] The variable magnification motor position in the data set is taken as the independent variable, the variable speed motor position is taken as the dependent variable, the initial value is calculated by using the fit function in matlab, and the curve fitting is carried out by using the lsqcurvefit function, to obtain the parameter value after the first fitting.

[0049] In order to improve the accuracy of parameter fitting, a preset number of parameter values are selected, four in this case, and the remaining four are taken as undetermined coefficients. Different object distances are taken as fitting input independent variables (100mm, 200mm, 300mm, 500mm, 1000mm, 2000mm and 10000mm), and the four undetermined coefficients are taken as output dependent variables. The power function fitting is adopted, and the formula is as follows:

[0050] f(x)=ax b +c;

[0051] The parameters in this formula are also fitted by using the lsqcurvefit function in matlab to determine the remaining four coefficients, and the original six-order exponential function formula is completed.

[0052] In the embodiment of the application, the step S4 is specifically:

[0053] S41, acquiring the variable magnification motor position z0, the variable zoom motor position f0 and the corresponding curve in the lens curve function set in the last step of the variable magnification motor and the variable zoom motor;

[0054] S42, acquiring the current variable magnification motor position z1, and calculating the corresponding variable zoom motor position f1 of the variable magnification motor position z1 in the corresponding curve in the last step;

[0055] S43, controlling the variable zoom motor to run to the position and acquiring the sharpness Q1 of the corresponding position;

[0056] The zoom motor is controlled to run to position z2, and the zoom motor position is kept at and the definition Q2 at the corresponding position is obtained;

[0057] The number of change curves is calculated and is expressed as follows:

[0058]

[0059] In the formula:

[0060] D is the difference between the zoom motor position at z1 and the current curve and the curve in the last step;

[0061] n is the number of change curves;

[0062] The change direction is determined. If Q1>Q2, n is considered as positive, and the direction corresponding to the curve with a decreasing preset object distance is moved; otherwise, n is considered as negative, and the direction corresponding to the curve with an increasing preset object distance is moved.

[0063] From the above description, it can be seen that the automatic zooming process in this example is not fixed along a certain curve in the lens curve function set, but the corresponding curve is constantly changed during the zooming process. The specific principle is that the position of the zoom motor and the zoom motor in the last step (z0, f0) is recorded, and the corresponding zoom motor position f1 of z1 in the curve function in the last step is calculated according to the current zoom motor position. Based on this, the number of change curves and the direction of change curves are calculated according to the above formula. If Q1>Q2, it indicates that the definition value is decreasing, n is positive, and the direction of the curve of 100 mm is approached; otherwise, n is negative, and the direction of the curve of 10000 mm is approached.

[0064] Please refer to Figure 3 An automatic zooming terminal 1 based on a lens curve function, comprising a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3, wherein the processor 3 executes the computer program to complete the following steps:

[0065] S1, obtaining a data set including the positions of the zoom motor and the zoom motor and the corresponding definition under different object distances;

[0066] S2, fitting the lens zooming curve functions corresponding to different object distances according to the data set;

[0067] S3, equally dividing and interpolating the adjacent lens zooming curve functions according to a first preset number to obtain an equally divided interpolation function, and combining the lens zooming curve functions and the equally divided interpolation function to form a lens curve function set;

[0068] S4, adjusting the zoom motor and the zoom motor according to the historical positions of the zoom motor and the zoom motor in the lens curve function set and the change trend of the sharpness.

[0069] From the above description, an execution carrier of an automatic zooming method based on a lens curve is provided. When performing the steps in the method, the lens zooming curve functions at different object distances are fitted in advance, and the adjacent curves are equally divided to generate a lens curve function set. In the subsequent zooming process, the adjustment direction can be determined only according to the historical positions in the lens curve function set and the change trend of the sharpness, without the need for real-time calculation of the confidence space, reducing the amount of calculation, improving the processing speed in the zooming process, and avoiding the occurrence of lag or blur.

[0070] The application provides an automatic zooming method based on a lens curve and a terminal, which are mainly applied to automatic zooming of a lens.

[0071] Please refer to Figures 1 to 2 , the first embodiment of the application is:

[0072] An automatic zooming method based on a lens curve comprises the following steps:

[0073] S1, acquiring a data set including the positions of a zoom motor and a zoom motor and corresponding sharpness at different object distances;

[0074] S2, fitting lens zooming curve functions corresponding to different object distances according to the data set;

[0075] S3, equally dividing adjacent lens zooming curve functions according to a first preset number to obtain equally divided interpolation functions, and combining the lens zooming curve functions and the equally divided interpolation functions to form a lens curve function set;

[0076] S4, adjusting the zoom motor and the zoom motor according to the historical positions of the zoom motor and the zoom motor in the lens curve function set and the change trend of the sharpness.

[0077] That is, in the embodiment, the lens zooming curve functions at different object distances are fitted in advance, and the adjacent curves are equally divided to generate a lens curve function set. In the subsequent zooming process, the adjustment direction can be determined only according to the historical positions in the lens curve function set and the change trend of the sharpness, without the need for real-time calculation of the confidence space, reducing the amount of calculation, improving the processing speed in the zooming process, and avoiding the occurrence of lag or blur.

[0078] Please refer to Figures 1 to 2 , the second embodiment of the application is:

[0079] On the basis of the embodiment one, the step S1 is specifically:

[0080] S11, set a preset object distance, adjust the position of the zoom motor and the position of the variable focus motor in the lens at the preset object distance, and calculate the sharpness of the corresponding position;

[0081] S12, record the variable focus motor position corresponding to the best sharpness at each zoom motor position, and form a data set matching the preset object distance;

[0082] Specifically, assuming that the preset object distance is 200mm, at the preset object distance, the current zoom motor position is set to x, then the variable focus motor is moved from 1 to the maximum variable focus motor position at a fixed interval, and the sharpness of the lens when the variable focus motor is at each position is recorded when the zoom motor position is x, and the position of the variable focus motor with the maximum sharpness is recorded. Subsequently, the zoom motor position is changed, the variable focus motor position corresponding to the best sharpness is continuously recorded, and a data set is formed; preferably, for each preset object distance, 200 zoom motor positions and variable focus motor positions with the best sharpness are collected to form a data set corresponding to the preset object distance.

[0083] S13, adjust the preset object distance, and return to step S11 until the number of preset object distances meets a second preset number.

[0084] Specifically, the second preset number is 7, and according to actual factors, the corresponding preset object distances are selected as: 100mm, 200mm, 300mm, 500mm, 1000mm, 2000mm and 10000mm.

[0085] Please refer to Figures 1 to 2 , the embodiment three of the present application is:

[0086] On the basis of the embodiment two, the step S2 is specifically:

[0087] The data is fitted by a 6-order exponential function, and the formula is as follows:

[0088] f(x)=(ax+b)e x +ce 2x +de 3x +ee 4x +fe 5x +ge 6x +h ;

[0089] Wherein, the independent variable x is the zoom motor position, and the dependent variable f(x) is the position of the variable focus motor corresponding to the best sharpness at the x position.

[0090] The positions of the variable speed motors in the dataset are used as independent variables and the positions of the variable speed motors are used as dependent variables. The initial values ​​are calculated using the fit function in MATLAB, and then the lsqcurvefit function is used to perform curve fitting to obtain the parameter values ​​after one fitting.

[0091] To improve the accuracy of parameter fitting, a preset number of parameter values ​​are selected; in this example, four are chosen, with the remaining four as undetermined coefficients. Different object distances are used as the input independent variables for fitting (100mm, 200mm, 300mm, 500mm, 1000mm, 2000mm, and 10000mm), and the four undetermined coefficients are used as the output dependent variables. A power function is used for fitting, as shown in the following formula:

[0092] f(x) = ax b +c;

[0093] The parameters in this formula are also fitted using the lsqcurvefit function in MATLAB to determine the remaining four coefficients, thus completing the initial sixth-order exponential function formula.

[0094] Specifically, step S3 involves: based on the seven 6th-order exponentially fitted lens zoom curve functions obtained in step S2, selecting two adjacent curves for 9-part interpolation. For example, when interpolating the first and second curves, the zoom motor position is x, the zoom motor corresponding to the first curve is y1, and the zoom motor corresponding to the second curve is y2. The interpolation method is as follows:

[0095]

[0096] Where k = 1, 2, 3... 9.

[0097] Please refer to Figures 1 to 2 Embodiment four of the present invention is as follows:

[0098] Based on Embodiment 2, step S4 specifically includes: Step S4 specifically includes:

[0099] S41. Obtain the zoom motor position z0 and zoom motor position f0 in the lens curve function set from the previous step, as well as the corresponding curves they are located on.

[0100] S42. Obtain the current zoom motor position z1, and calculate the zoom motor position f1 corresponding to the zoom motor position z1 in the curve of the previous step;

[0101] S43, Control the zoom motor to run to position And obtain the sharpness Q1 at the corresponding location;

[0102] Control the zoom motor to position z2, and keep the zoom motor position at... And obtain the sharpness Q2 at the corresponding location;

[0103] The number of change curves is calculated and represented as follows:

[0104]

[0105] In the formula:

[0106] D is the difference between the position of the zoom motor at z1, the position of the zoom motor on the previous curve and the position of the zoom motor on the current curve;

[0107] n is the number of curves showing variation;

[0108] Determine the direction of change. If Q1 > Q2, then consider the n value to be positive and move in the direction of the curve corresponding to the decrease of the preset object distance; otherwise, consider the n value to be negative and move in the direction of the curve corresponding to the increase of the preset object distance.

[0109] In this example, the automatic zoom process does not move along a fixed curve in the lens curve function set. Instead, it continuously changes the corresponding curve during the zoom process. The specific principle is as follows: record the position (z0, f0) of the zoom motor in the previous step, and calculate the zoom motor position f1 corresponding to z1 in the curve function of the previous step based on the current zoom motor position. Based on this, calculate the number of curves and the direction of the curves according to the above formula. If Q1 > Q2, it means that the sharpness value is decreasing, n is positive, and it moves closer to the 100mm curve direction; otherwise, n is negative, and it moves closer to the 10000mm curve.

[0110] Please refer to Figure 3 Embodiment 5 of the present invention is: an automatic zoom terminal based on lens curve, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it completes the steps in any of the methods in Embodiments 1 to 4.

[0111] In summary, the present invention provides an automatic zoom and magnification method and terminal based on lens curves. By pre-fitting lens zoom and magnification curve functions under different object distances and dividing adjacent curves into equal parts by difference, a set of lens curve functions is generated and stored locally as a pre-made file of the lens, without the need for real-time calculation.

[0112] Meanwhile, during zooming, the adjustment direction can be determined simply by the historical position of the lens curve function set and the trend of sharpness change. There is no need to calculate the confidence space in real time. Only two sharpness values ​​and a simple calculation of the number of lines need to be obtained, which reduces the amount of computation and obtains the value determined by the zoom motor, rather than the upper and lower limits of the confidence space, thus avoiding stuttering or blurring.

[0113] In addition, equal-interval interpolation is used in the curve interpolation process, so only the zoom motor movement interval of the two curves needs to be saved in the data storage process, which reduces the memory usage.

[0114] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. An automatic zoom method based on lens curves, characterized in that: Including the following steps: S1. Obtain datasets including the positions of the zoom motor and zoom motor in the lens, as well as the corresponding sharpness, at different object distances; S2. Fit the lens zoom curve function corresponding to different object distances based on the dataset; S3. Divide the adjacent lens zoom curve functions into equal parts according to a first preset number and obtain the equal part interpolation function. Combine the lens zoom curve functions and the equal part interpolation function to form a set of lens curve functions. S4. Adjust the zoom motor and zoom motor according to their historical positions in the lens curve function set and the trend of sharpness changes.

2. The automatic zoom method based on lens curves according to claim 1, characterized in that: Step S1 specifically involves: S11. Set a preset object distance, adjust the position of the zoom motor and the zoom motor in the lens under the preset object distance, and calculate the sharpness of the corresponding position. S12. Record the zoom motor position corresponding to the best sharpness at each zoom motor position, and form a dataset that matches the preset object distance; S13. Adjust the preset object distance and return to step S11 until the number of preset object distances meets the second preset number.

3. The automatic zoom method based on lens curves according to claim 2, characterized in that: Step S2 specifically involves: S21. Use higher-order functions to perform preliminary fitting on the dataset and generate a preliminary fitting function; S22. Perform parameter estimation on the preliminary fitting function to obtain the first-order fitting parameters; S23. Using the second preset number of preset object distances as the fitting input independent variable, perform a second fitting on the first fitting parameters and obtain the second fitting parameters. S24. Substitute the secondary fitting parameters into the initial fitting function to obtain the lens zoom curve function corresponding to each preset object distance.

4. The automatic zoom method based on lens curves according to claim 3, characterized in that: The higher-order function is a sixth-order exponential function.

5. The automatic zoom method based on lens curves according to claim 3 or 4, characterized in that: Step S4 specifically involves: S41. Obtain the zoom motor position z0 and zoom motor position f0 in the lens curve function set from the previous step, as well as the corresponding curves they are located on. S42. Obtain the current zoom motor position z1, and calculate the zoom motor position f1 corresponding to the zoom motor position z1 in the curve of the previous step; S43, Control the zoom motor to run to position And obtain the sharpness Q1 at the corresponding location; Control the zoom motor to position z2, and keep the zoom motor position at... And obtain the sharpness Q2 at the corresponding position; The number of change curves is calculated as follows: In the formula: D is the difference between the position of the zoom motor at z1, the position of the zoom motor on the previous curve and the position of the zoom motor on the current curve; n is the number of curves showing variation; Determine the direction of change. If Q1 > Q2, then consider the n value to be positive and move in the direction of the curve corresponding to the decrease of the preset object distance; otherwise, consider the n value to be negative and move in the direction of the curve corresponding to the increase of the preset object distance.

6. An automatic zoom terminal based on lens curves, characterized in that: Includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps: S1. Obtain datasets including the positions of the zoom motor and zoom motor in the lens, as well as the corresponding sharpness, at different object distances; S2. Fit the lens zoom curve function corresponding to different object distances based on the dataset; S3. Divide the adjacent lens zoom curve functions into equal parts according to a first preset number and obtain the equal part interpolation function. Combine the lens zoom curve functions and the equal part interpolation function to form a set of lens curve functions. S4. Adjust the zoom motor and zoom motor according to their historical positions in the lens curve function set and the trend of sharpness changes.

7. The automatic zoom terminal based on lens curves according to claim 6, characterized in that: Step S1 specifically involves: S11. Set a preset object distance, adjust the position of the zoom motor and the zoom motor in the lens under the preset object distance, and calculate the sharpness of the corresponding position. S12. Record the zoom motor position corresponding to the best sharpness at each zoom motor position, and form a dataset that matches the preset object distance; S13. Adjust the preset object distance and return to step S11 until the number of preset object distances meets the second preset number.

8. The automatic zoom terminal based on lens curves according to claim 7, characterized in that: Step S2 specifically involves: S21. Use higher-order functions to perform preliminary fitting on the dataset and generate a preliminary fitting function; S22. Perform parameter estimation on the preliminary fitting function to obtain the first-order fitting parameters; S23. Using the second preset number of preset object distances as the fitting input independent variable, perform a second fitting on the first fitting parameters and obtain the second fitting parameters. S24. Substitute the secondary fitting parameters into the initial fitting function to obtain the lens zoom curve function corresponding to each preset object distance.

9. An automatic zoom terminal based on lens curves according to claim 8, characterized in that: The higher-order function is a sixth-order exponential function.

10. An automatic zoom terminal based on lens curves according to claim 8 or 9, characterized in that: Step S4 specifically involves: S41. Obtain the zoom motor position z0 and zoom motor position f0 in the lens curve function set from the previous step, as well as the corresponding curves they are located on. S42. Obtain the current zoom motor position z1, and calculate the zoom motor position f1 corresponding to the zoom motor position z1 in the curve of the previous step; S43, Control the zoom motor to run to position And obtain the sharpness Q1 at the corresponding location; Control the zoom motor to position z2, and keep the zoom motor position at... And obtain the sharpness Q2 at the corresponding position; The number of change curves is calculated as follows: In the formula: D is the difference between the position of the zoom motor at z1, the position of the zoom motor on the previous curve and the position of the zoom motor on the current curve; n is the number of curves showing variation; Determine the direction of change. If Q1 > Q2, then consider the n value to be positive and move in the direction of the curve corresponding to the decrease of the preset object distance; otherwise, consider the n value to be negative and move in the direction of the curve corresponding to the increase of the preset object distance.