A zoom follow method for zoom lens in live broadcast scene
Through lens curve correction and advanced polynomial fitting, combined with the mountain climbing algorithm to search for quasi-focus, the automatic focus blur and lag problems of the zoom lens in live scenes are solved, and smooth zoom and clear images are achieved during the zoom process.
Patent Information
- Application Number
- CN202310440451.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-23
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-04-23
AI Technical Summary
In live broadcast scenarios, the zoom lens is prone to automatic focus blur and stuttering during pulling, affecting the live broadcast effect.
By defining the control parameters of the zoom lens, lens curve correction is performed, different object distances are simulated using the correction light box and the teleconverter, the focus curve is recorded, and the high-order polynomial fitting and mountain climbing algorithm are used to search for quasi-focus to ensure that the image remains clear during the zoom process.
The zoom lens can achieve smooth zooming during the pulling process, avoiding the jamming phenomenon and ensuring the stability and clarity of the live broadcast image.
Smart Images

Figure CN116546326B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a zoom follow method for a zoom lens in a live broadcast scene, and is used in the field of cameras. Background Art
[0002] In recent years, online live streaming has become an important development direction of social trends. Many methods such as live streaming with goods, live streaming education, and live streaming communication have developed rapidly, especially in the field of live streaming with goods, which has promoted the rapid operation of the market economy. People's demand for live streaming has gradually increased, and the content of live streaming has also been constantly innovating, bringing people many different experiences.
[0003] The online live broadcast environment is mainly indoor live broadcast, and the length of the live broadcast room is basically around 3-8m. In order to make the live broadcast effect more realistic and exciting, a zoom camera is usually used.
[0004] At present, indoor live broadcasting is mainly divided into sitting and standing live broadcasting. The distance between the camera and the subject in sitting live broadcasting is about 1m, and the distance between the camera and the subject in standing live broadcasting is about 3-7m. Zoom lenses are mainly used in standing live broadcasting environments. Imagine that when the anchor is standing 3-7m away from the camera and needs to show the details of the items he is holding or the details of the clothes and accessories he is wearing, he can walk closer to the camera for a close-up shot, or he can zoom in to a zoomed-in position to show the details. For most live broadcasters, walking back and forth in front of and behind the live broadcast scene will greatly affect the live broadcast effect and easily cause the zoom lens to automatically focus blur. On the contrary, the assistant can control the lens to automatically zoom to the required position. The zoom follow method can maintain continuous clarity during the zoom process, effectively improving the focus stability and giving the viewer a good intuitive picture experience.
[0005] Whether it is live streaming with goods or live education, the use of high-magnification zoom cameras will inevitably involve zoom lens magnification stretching. During the magnification stretching process, we must find a way to ensure that the current scene is clear during the stretching process, and the zoom is smooth during the stretching process without any stuttering, giving people a sensory experience of soft and smooth changes. Summary of the Invention
[0006] The purpose of the present invention is to overcome the above-mentioned shortcomings in the prior art and to provide a reasonably designed zoom follow method for a zoom lens in a live broadcast scene, which can ensure that the current scene is clear during the zooming process and that the zooming is smooth during the zooming process without any lag.
[0007] The technical solution adopted by the present invention to solve the above problem is: a zoom follow method for a zoom lens in a live broadcast scene, characterized by comprising the following steps:
[0008] Step 1: Define the control parameters of the zoom lens, determine the maximum and minimum travel ranges of the zoom motor and focus motor, the number of zoom motor points, and the control direction of the drive motor;
[0009] Step 2: Use the calibration light box to perform slow calibration of the lens curve. Align the zoom lens with the calibration light box light port and drive zoom The motor moves from the near focus end to the far focus end one by one according to the number of points defined in step 1. At each zoom motor point, the focus motor is controlled to search back and forth for the focus motor position corresponding to the zoom motor point where the lens is in focus. The position is recorded and stored as a slow correction basic focus curve.
[0010] Step 3: Align the zoom lens closely with the teleconverter and adjust the teleconverter to simulate different object distances. At each fixed object distance simulated, drive the zoom motor from the near focus end to the far focus end, one point at a time, according to the number of points defined in step 1. At each zoom motor point, control the focus motor to search back and forth for the focus motor position corresponding to the zoom motor point, record the position, and store it as multiple object distance focus curves at different object distances.
[0011] Step 4: Obtain the focus difference curve at each object distance, that is, use the slow correction basic focus curve obtained in step 1 to subtract the focus curve values at different object distances obtained in step 3 to obtain the focus difference curves at multiple object distances;
[0012] Step 5: Fit the focus difference curves at multiple object distances obtained in step 4 into a high-order polynomial by curve fitting.
[0013] Step 6. Use the calibration light box to recalibrate the lens. The calibration method is fast calibration. Use the specified interval number to evenly divide the number of zoom motor points in step 1, search for the focus motor position of the lens at the current zoom motor point, and the focus point position of the previous zoom point in the interval. Then, based on the focus motor position corresponding to the current zoom position and the previous zoom position in the slow calibration basic focus curve in step 2, calculate the focus quasi-focus position corresponding to the zoom point between the current zoom point and the previous zoom motor point. In this way, obtain the focus motor quasi-focus corresponding to all zoom motor points in step 1, and you can get the fast calibration basic focus curve.
[0014] Step 7: Search the focus motor position value FP corresponding to the current scene image quasi-focus under the current magnification based on the hill climbing algorithm;
[0015] Step 8. Using the current zoom motor position, use the high-order polynomials for different object distances in step 5 to obtain the focus motor position for each zoom motor magnification corresponding to each different object distance; based on the focus motor point value FP corresponding to the current scene image quasi-focus calculated in step 7, obtain the focus motor point values corresponding to the two object distance focus curves closest to the point value at the current magnification, that is, the focus motor position upper limit FP UP and the lower limit FP DOWN ;
[0016] Step 9: Set the upper and lower position limits FP obtained in step 8 UP FP DOWN Perform interval subdivision, and then obtain the current focus motor position after subdivision, and obtain the closest point position FP' of the focus motor in the interval, respectively using FP in step eight UP and FP DOWN The two object distance focusing curves are used as the reference, and FP' is at FP UP FP DOWN The focus motor position is calculated point by point from the near focus end to the far focus end. At this time, the zoom tracking curve under the current focus object distance can be obtained. During the zoom process, each zoom motor position corresponds to a focus motor position, which can ensure that the zoom lens always maintains a clear image within the depth of field during the zoom process.
[0017] In step 2 of the present invention, each point searches for the quasi-focus using a back-and-forth search mechanism, with an initial speed of 2, which is adjusted to 1 after reversal.
[0018] In step three of the present invention, the teleconverter simulated object distance is set to 1m, 1.5m, 2m, 2.5m, 3m, 3.5m, 4m, 4.5m, 5m, 5.5m, 6m, 6.5m, 7m, 7.5m, and 8m respectively.
[0019] In step six of the present invention, the number of zoom motor point intervals in the rapid correction is 40.
[0020] In step 4 of the present invention, the high-order polynomial is set to an 8th-order polynomial, and the corresponding polynomial analytical expression is recorded:
[0021] δ(x)=ax 8 +bx 7 +cx 6 +dx 5 +ex 4 +fx 3 +gx 2 + hx 1 +i (a≠0);
[0022] Where [a, b, c, d, e, f, g, h, i] are the polynomial coefficients, x is the number of zoom motor points, and δ is the number of focus motor points corresponding to x.
[0023] In step seven of the present invention, the specific steps are: before the algorithm is started, a quick correction basic focus curve is obtained, and the current focus motor forward speed is set according to the lens curve and image clarity, wherein the focus motor speed is positively correlated with the image clarity change trend; when the focus motor is along the current direction, the image clarity values of multiple frames are on an upward trend, then the focus motor operating speed needs to be appropriately increased; if a downward trend appears afterwards, and the image clarity values of several consecutive frames show an obvious downward trend, then it can be determined that the highest point of the current scene has been found along this direction, and the focus motor direction is turned to continue searching; if the image clarity value continuously rises, and the image clarity values of several consecutive frames show an obvious downward trend, then it can be determined that the scene quasi-focus is found, and the focus motor goes to the position with the highest scene clarity, and the current hill climbing search algorithm ends, that is, the quasi-focus position of the current scene image corresponds to the focus motor point value FP.
[0024] In step nine of the present invention, the upper and lower position limits FP UP FP DOWN The segmentation is 1:2:3:4.
[0025] Compared with the existing technology, the present invention has the following advantages and effects: 1. In the actual use of lens stretching scenes, it can quickly determine the zoom following curve under the current object distance, avoiding the screen freeze caused by the uneven curve change during the lens zoom pulling process, which gives people a sense of frustration; 2. It has strong versatility in products of the same specifications. When importing a new lens of the same model, only one basic focus curve needs to be corrected to introduce other difference curves, which optimizes the engineering workload. 3. The focus curve of the current object distance can be known in advance, allowing the motor to move smoothly according to the focus curve, and the magnification drive motor and the focus motor to reach the determined clear position at the same time to ensure that every point is clear. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 Schematic diagram of a hill climbing algorithm according to an embodiment of the present invention.
[0027] Figure 2 This is a focus curve diagram of the 10x zoom lens actually measured at object distances of 1m-20m in an embodiment of the present invention.
[0028] Figure 3 In the embodiment of the present invention, the image is clearest at the current magnification. focus The motor position corresponds to the focus curve of its nearest object distance Focus Schematic diagram of motor position.
[0029] Figure 4 Schematic diagram of obtaining a fast correction basic focusing curve based on a slow correction basic curve according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The present invention will be further described in detail below with reference to the accompanying drawings and through examples. The following examples are intended to explain the present invention but the present invention is not limited to the following examples.
[0031] The embodiment of the present invention includes the following steps:
[0032] Step 1: Define the control parameters for the zoom lens. Based on the lens specifications and the corresponding motor step table, determine the maximum and minimum travel ranges of the zoom and focus motors, the number of zoom motor points, and the drive motor control direction.
[0033] Step 2: Use the calibration light box to perform slow calibration of the lens curve. Align the zoom lens with the calibration light box light port and drive zoom The motor moves from the W end (near focus end) to the T end (far focus end) one by one, according to the number of points defined in step 1. At each zoom motor position, the focus motor is controlled to search back and forth for the focus motor position corresponding to the zoom motor position where the lens is in focus. This position is recorded and stored as a slow correction basic focus curve. The present invention uses a two-way search mechanism to search for in-focus at each point, with an initial speed of 2, which is adjusted to 1 after reversing.
[0034] Step 3: Use a teleconverter to align the zoom lens closely with the teleconverter; adjust the teleconverter to simulate different object distances; at each fixed object distance simulated, drive zoom Motor, from the W end (near focus end) according to the number of points defined in step 1,
[0035] Move each point to the T end (telephoto end), and at each zoom motor point, control the focus motor to search back and forth for the focus motor position corresponding to the zoom motor point, record it, and store it as multiple object distance focus curves at different object distances;
[0036] In this embodiment, the teleconverter is set to simulate object distances of 1m, 1.5m, 2m, 2.5m, 3m, 3.5m, 4m, 4.5m, 5m, 5.5m, 6m, 6.5m, 7m, 7.5m, and 8m, respectively. Therefore, there are 15 object distance focusing curves at different object distances.
[0037] Step 4: Obtain the focus difference curve at each object distance, that is, use the slow correction basic focus curve obtained in step 1 to subtract the focus curve values at different object distances in step 3 to obtain the focus difference curves at multiple object distances.
[0038] Step 5: Fit the focus difference curves at multiple object distances obtained in step 4 into a high-order polynomial by curve fitting. The present invention sets the high-order polynomial to an 8th-order polynomial and records the corresponding polynomial analytical expression:
[0039] δ(x)=ax 8 +bx 7 +cx 6 +dx 5 +ex 4 +fx 3 +gx 2 + hx 1 +i (a≠0);
[0040] Where [a, b, c, d, e, f, g, h, i] are the polynomial coefficients, x is the number of zoom motor points, and δ is the number of focus motor points corresponding to x.
[0041] With the help of the algorithm platform, the code is used to solve the coefficient values of high-order polynomials, and the focus curve of the lens at different object distances is obtained by calculation. Through this focus curve, the current autofocus object distance can be roughly calculated, so as to obtain the current object distance focus curve for zoom tracking.
[0042] Step 6. Based on the method in step 2, use the calibration light box to recalibrate the lens. This calibration method is fast calibration, which is different from step 2. The number of zoom motor points in step 1 is evenly divided by a specified interval number, that is, an autofocus is performed with an interval equal to the number of zoom points. The focus motor position F1 of the lens is in focus under the current zoom motor point, and the focus motor position F2 of the previous zoom point in the interval is searched. Then, based on the focus motor positions F3 and F4 corresponding to the current zoom position and the previous zoom position in the slow calibration basic focus curve in step 2, the focus quasi-focus position corresponding to the zoom point between the current zoom point and the previous zoom motor point is calculated through the interval limit ratio clamping algorithm. In this way, the focus motor quasi-focus corresponding to all zoom motor points in step 1 is obtained, and the fast calibration basic focus curve can be obtained.
[0043] The zoom motor point interval in quick calibration is 40.
[0044] Step 7: Search the focus motor position value corresponding to the current scene image quasi-focus under the current magnification based on the hill climbing algorithm FP. Its specific implementation method is: before the algorithm is started, a fast-corrected focus curve is obtained, that is, the infinity focus curve data, and the current focus motor forward speed is set according to the lens curve and image clarity, wherein the focus motor speed is positively correlated with the image clarity change trend. When the focus motor is along the current direction, the clarity value of multiple frames of images is on an upward trend, then the focus motor running speed needs to be appropriately increased. If a downward trend appears afterwards, and the clarity value of 3 consecutive frames of images shows an obvious downward trend, it can be determined that the highest point of the current scene has been found along this direction, and the focus motor direction is turned to continue searching. If the image clarity value rises continuously, and the clarity value of 2 consecutive frames of images shows an obvious downward trend, it can be determined that the scene is in quasi-focus, and the focus motor goes to the position with the highest scene clarity. The current hill climbing search algorithm ends, that is, the quasi-focus position of the current scene image corresponds to the focus motor point value ( FP value).
[0045] Step 8: Through the current zoom The motor position is obtained by using the high-order polynomials of different object distances in step 5. zoom The motor magnification corresponds to the focus motor position at different object distances; the focus motor position value corresponding to the current scene image quasi-focus calculated in step 7 FP , get the focus motor point value corresponding to the two object distance focus curves closest to the point value at the current magnification, that is, the focus motor position upper limit FP UP and the lower limit FP DOWN ;like Figure 3 As shown, at the current zoom motor position, after an autofocus is completed, the focus motor quasi-focus point value at the current magnification is obtained. FP , the point value corresponds to a certain object distance, and the Focus motor position corresponding to each object distance focus curve under the current zoom motor is calculated through the high-order polynomial of each different object distance in step 5, and the corresponding Focus motor position is found. FP The two nearest Focus positions, FP UP FP DOWN .
[0046] Step 9: Set the upper and lower position limits FP obtained in step 8 UP FP DOWN Use 1:2:3:4 to subdivide the interval; after subdivision, get the current focus motor position and the closest point position FP' of the focus motor in the interval, respectively with FP in step 8 UP and FP DOWN The two object distance focusing curves are used as the reference, and FP' is at FP UP FP DOWNThe proportion of the focus motor {FP1, FP2, FP3, ..., FP n}, n is zoom The total number of points in the motor range, at this time, the zoom tracking curve L={FP1,FP2,FP3,……,FP n}, the zoom lens can follow the zoom tracking curve at the current focus distance; during the zoom process, each zoom The motor position corresponds to a focus motor position, which can ensure that the zoom lens always maintains a clear image within the depth of field during the zoom process.
[0047] In addition, it should be noted that the shapes and names of the parts and components of the specific embodiments described in this specification may be different, and the above content described in this specification is only an example of the structure of the present invention. Any equivalent changes or simple changes made based on the structure, features and principles described in the patent concept of the present invention are included in the protection scope of the patent of the present invention. Those skilled in the art of the technology to which the present invention belongs can make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the present invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.
Claims
1. A zoom tracking method for a zoom lens in a live broadcast scenario, characterized by: The steps include: Step 1: Define the control parameters of the zoom lens, determine the maximum and minimum travel ranges of the zoom motor and focus motor, the number of zoom motor points, and the control direction of the drive motor; Step 2: Use the calibration light box to perform slow calibration of the lens curve. Align the zoom lens with the calibration light box light port and drive zoom The motor moves from the near focus end to the far focus end one by one according to the number of points defined in step 1. At each zoom motor point, the focus motor is controlled to search back and forth for the focus motor position corresponding to the zoom motor point where the lens is in focus. The position is recorded and stored as a slow correction basic focus curve. Step 3: Align the zoom lens closely with the teleconverter and adjust the teleconverter to simulate different object distances. At each fixed object distance simulated, drive the zoom motor from the near focus end to the far focus end, one point at a time, according to the number of points defined in step 1. At each zoom motor point, control the focus motor to search back and forth for the focus motor position corresponding to the zoom motor point, record the position, and store it as multiple object distance focus curves at different object distances. Step 4: Obtain focus difference curves at each object distance, that is, subtract the object distance focus curves at different object distances obtained in step 3 from the slow correction basic focus curve obtained in step 2 to obtain focus difference curves at multiple object distances; Step 5: Fit the focus difference curves at multiple object distances obtained in step 4 into a high-order polynomial by curve fitting. Step 6. Use the calibration light box to recalibrate the lens. The calibration method is fast calibration. Use the specified interval number to evenly divide the number of zoom motor points in step 1, search for the focus motor position of the lens at the current zoom motor point, and the focus point position of the previous zoom point in the interval. Then, based on the focus motor position corresponding to the current zoom position and the previous zoom position in the slow calibration basic focus curve in step 2, calculate the focus quasi-focus position corresponding to the zoom point between the current zoom point and the previous zoom motor point. In this way, obtain the focus motor quasi-focus corresponding to all zoom motor points in step 1, and you can get the fast calibration basic focus curve. Step 7: Search the focus motor position value FP corresponding to the current scene image quasi-focus under the current magnification based on the hill climbing algorithm; Step 8: Using the current zoom motor position and the high-order polynomials for different object distances in step 5, obtain the focus motor position for the image at different object distances corresponding to the zoom motor magnification. According to the focus motor point value FP corresponding to the current scene image quasi-focus calculated in step 7, the focus motor point value corresponding to the two object distance focus curves closest to the point value at the current magnification is obtained, that is, the focus motor position upper limit value FP UP and the lower limit FP DOWN ; Step 9: Set the upper and lower position limits FP obtained in step 8 UP , FP DOWN Perform interval subdivision, and then obtain the current focus motor position after subdivision, and obtain the closest point position FP' of the focus motor in the interval, respectively using FP in step eight UP and FP DOWN The two object distance focusing curves are used as the reference, and FP' is at FP UP , FP DOWN The focus motor position is calculated point by point from the near focus end to the far focus end. At this time, the zoom tracking curve under the current focus object distance can be obtained. During the zoom process, each zoom motor position corresponds to a focus motor position, which can ensure that the zoom lens always maintains a clear image within the depth of field during the zoom process.
2. The zoom tracking method for a zoom lens in a live broadcast scenario according to claim 1, characterized in that: In step 2, each point searches for the quasi-focus using a two-way search mechanism, with an initial speed of 2, which is adjusted to 1 after reversing.
3. The zoom tracking method for a zoom lens in a live broadcast scenario according to claim 1, characterized in that: In step 3, set the teleconverter to simulate the object distance of 1m, 1.5m, 2m, 2.5m, 3m, 3.5m, 4m, 4.5m, 5m, 5.5m, 6m, 6.5m, 7m, 7.5m, and 8m respectively.
4. The zoom tracking method for a zoom lens in a live broadcast scenario according to claim 1, characterized in that: In step 6, the zoom motor point interval in quick calibration is 40.
5. The zoom tracking method for a zoom lens in a live broadcast scenario according to claim 1, characterized in that: In step 5, set the high-order polynomial to an 8th-order polynomial and record the corresponding polynomial expression: δ(x)=ax 8 +bx 7 +cx 6 +dx 5 +ex 4 +fx 3 +gx 2 + hx 1 +i (a≠0); Where [a, b, c, d, e, f, g, h, i] are the polynomial coefficients, x is the number of zoom motor points, and δ is the number of focus motor points corresponding to x.
6. The zoom tracking method for a zoom lens in a live broadcast scenario according to claim 1, characterized in that: In step seven, the specific steps are as follows: before the algorithm is started, the basic focus curve for rapid correction is obtained, and the current forward speed of the focus motor is set according to the lens curve and image clarity, wherein the focus motor speed is positively correlated with the image clarity change trend. When the focus motor is along the current direction, the clarity values of multiple frames of images are on an upward trend, then the focus motor speed needs to be increased. If a downward trend appears afterwards, and the clarity values of several consecutive frames of images show a downward trend, it can be determined that the highest point of the current scene has been found along this direction, and the direction of the focus motor is turned to continue searching. If the image clarity value rises continuously, and the clarity values of several consecutive frames of images show a downward trend, it can be determined that the scene is quasi-focused, and the focus motor goes to the position with the highest scene clarity. The current hill climbing search algorithm ends, that is, the quasi-focus position of the current scene image corresponds to the focus motor point value FP.
7. The zoom tracking method for a zoom lens in a live broadcast scenario according to claim 1, characterized in that: In step nine, the upper and lower position limits FP UP FP DOWN The segmentation is 1:2:3:4.
Citation Information
Patent Citations
Rapid and automatic focusing method and system for camera zoom
CN103929588A
Zoom tracking curve correction method and device
CN105554387A