Zoom tracking curve determination method and apparatus, computer device, and storage medium

By calculating depth of field and using a concave-convexity algorithm to approximate the target zoom tracking curve, the problem of insufficient sharpness during camera zooming is solved, and image sharpness and search efficiency are improved during zooming.

CN116567412BActive Publication Date: 2026-02-03ZHEJIANG HUACHUANG VISION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310328382.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2026-02-03
Estimated Expiration
2043-03-27

AI Technical Summary

Technical Problem

In existing technologies, cameras are prone to out-of-focus issues during zooming, resulting in insufficient sharpness, and there is a lack of effective solutions.

Method used

By acquiring the camera's imaging data, calculating the depth of field, and using a set of preset zoom tracking curves within the depth of field as the curve search range, the depth of field is used to limit the search range. Combined with the concave-convex algorithm, the target zoom tracking curve is gradually approached to ensure image clarity.

Benefits of technology

Maintaining image sharpness during zooming and focusing improves the search efficiency and focusing speed of the zoom tracking curve, ensuring image clarity throughout.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116567412B_ABST
    Figure CN116567412B_ABST
Patent Text Reader

Abstract

The application relates to a zoom tracking curve determination method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring imaging data of a camera, wherein the imaging data comprises a camera parameter and a predicted object distance; calculating a depth of field based on the imaging data, taking a corresponding preset zoom tracking curve set in which a reference object distance is located in the depth of field as a curve search range; and performing curve search based on the curve search range to determine a target zoom tracking curve. By acquiring the predicted object distance, the search range of the zoom tracking curve is reduced, and zoom and focusing operations are performed in the limited curve search range, so that the image definition in the whole zooming and focusing process of the camera can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of camera technology, and in particular to a method, apparatus, computer device, and storage medium for determining zoom tracking curves. Background Technology

[0002] To ensure that images captured by a camera remain sharp during zooming, zoom tracking is required. This means that the focusing motor in the camera must change synchronously with the position of the zoom motor. The position of the zoom motor determines the optical magnification. The higher the optical magnification, the greater the range of focus changes for the focusing motor, making it more difficult to find the focus point.

[0003] In related technologies, automatic focusing is performed upon camera startup. The zoom tracking curve with sharp focus at startup is then used as a reference curve for zooming. The zoom process from wide-angle to telephoto is then initiated, generating a focus evaluation value corresponding to the current object distance. This focus evaluation value is used to correct the reference object distance corresponding to the reference curve, and the corrected object distance is used as the new reference object distance. The drawback of this method is that using a zoom tracking curve with sharp focus at camera startup as a reference curve can easily result in out-of-focus areas when the camera zooms to the telephoto end, compromising the sharpness of the zoom and focusing process.

[0004] There is currently no effective solution to the problem of insufficient sharpness during camera zooming and focusing in related technologies. Summary of the Invention

[0005] Therefore, it is necessary to provide a zoom tracking curve determination method, apparatus, computer equipment, and computer-readable storage medium that can improve focusing efficiency in response to the above-mentioned technical problems.

[0006] Firstly, this application provides a method for determining a zoom tracking curve. The method includes:

[0007] Acquire imaging data from the camera, the imaging data including camera parameters and predicted object distance;

[0008] The depth of field is calculated based on the imaging data, and the set of preset zoom tracking curves whose reference object distance is within the depth of field is used as the curve search range.

[0009] Based on the curve search range, a curve search is performed to determine the target zoom tracking curve.

[0010] In one embodiment, the step of calculating the depth of field based on the camera parameters and the predicted object distance includes: detecting whether the predicted object distance is within the depth of field; if the predicted object distance is not within the depth of field, then increasing the depth of field by adjusting the aperture size until the predicted object distance is within the depth of field.

[0011] In one embodiment, the step of performing curve search based on the curve search range to determine the target zoom tracking curve includes: obtaining a predicted search direction; switching a preset zoom tracking curve within the curve search range according to the predicted search direction; synchronously changing the zoom position according to the switching process of the preset zoom tracking curve; calculating a corresponding focus evaluation value based on the real-time preset zoom tracking curve and the real-time zoom position; and determining the target tracking curve based on multiple focus evaluation values.

[0012] In one embodiment, obtaining the predicted search direction includes: obtaining a first search direction in which the zoom motor moves from the previous two zoom positions to the previous zoom position; obtaining a second search direction in which the zoom motor moves from the previous zoom position to the current zoom position; if the second search direction is the same as the first search direction, then the predicted search direction is opposite to the second search direction.

[0013] In one embodiment, obtaining the predicted search direction further includes: obtaining the current zoom position; detecting whether the current zoom position is located at the edge of the depth of field; if so, the predicted search direction is opposite to the second search direction.

[0014] In one embodiment, obtaining the predicted search direction further includes: if the second search direction is opposite to the first search direction, obtaining the first two zoom positions and calculating the first two focus evaluation values ​​corresponding to the first two zoom positions based on a first preset zoom tracking curve; obtaining the previous zoom position and selecting a second preset zoom tracking curve based on the change in object distance in the first search direction to calculate the previous focus evaluation value corresponding to the previous zoom position; obtaining the current zoom position and selecting a third preset zoom tracking curve based on the change in object distance in the second search direction to calculate the current focus evaluation value corresponding to the current zoom position; and determining the predicted search direction based on the first two zoom positions and the first two focus evaluation values, the previous zoom position and the previous focus evaluation value, and the current zoom position and the current focus evaluation value.

[0015] Secondly, this application also provides a zoom tracking curve determination device. The device includes:

[0016] An acquisition module is used to acquire imaging data from the camera, the imaging data including camera parameters and predicted object distance;

[0017] The calculation module is used to calculate the depth of field based on the imaging data, and to use the set of preset zoom tracking curves whose reference object distance is within the depth of field as the curve search range;

[0018] The processing module is used to perform curve search based on the curve search range to determine the target zoom tracking curve.

[0019] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0020] Acquire imaging data from the camera, the imaging data including camera parameters and predicted object distance;

[0021] The depth of field is calculated based on the imaging data, and the set of preset zoom tracking curves whose reference object distance is within the depth of field is used as the curve search range.

[0022] Based on the curve search range, a curve search is performed to determine the target zoom tracking curve.

[0023] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0024] Acquire imaging data from the camera, the imaging data including camera parameters and predicted object distance;

[0025] The depth of field is calculated based on the imaging data, and the set of preset zoom tracking curves whose reference object distance is within the depth of field is used as the curve search range.

[0026] Based on the curve search range, a curve search is performed to determine the target zoom tracking curve.

[0027] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0028] Acquire imaging data from the camera, the imaging data including camera parameters and predicted object distance;

[0029] The depth of field is calculated based on the imaging data, and the set of preset zoom tracking curves whose reference object distance is within the depth of field is used as the curve search range.

[0030] Based on the curve search range, a curve search is performed to determine the target zoom tracking curve.

[0031] The aforementioned zoom tracking curve determination method, apparatus, computer equipment, and storage medium acquire camera imaging data, including camera parameters and predicted object distance; calculate the depth of field based on the imaging data; and use a set of preset zoom tracking curves whose reference object distance falls within the depth of field as the curve search range; then perform a curve search based on the curve search range to determine the target zoom tracking curve. By predicting the object distance and placing it within a range that ensures clear imaging, the search range for the zoom tracking curve is narrowed. Performing zoom and focus operations within this limited range guarantees image sharpness throughout the entire zoom and focus process. Attached Figure Description

[0032] Figure 1 This is a flowchart illustrating a zoom tracking curve determination method in one embodiment;

[0033] Figure 2 This is a schematic diagram of optical imaging in one embodiment;

[0034] Figure 3 This is a schematic diagram illustrating the relationship between depth of field and aperture in one embodiment;

[0035] Figure 4 This is a schematic diagram of depth-of-field adjustment in one embodiment;

[0036] Figure 5 This is a schematic diagram of depth-of-field limiting in one embodiment;

[0037] Figure 6 This is a schematic diagram of the approximation of the target zoom tracking curve in one embodiment;

[0038] Figure 7 This is a schematic diagram illustrating the relationship between camera magnification and depth of field in one embodiment;

[0039] Figure 8 This is a schematic diagram illustrating the relationship between camera magnification and zoom step size in one embodiment;

[0040] Figure 9 This is a schematic diagram illustrating the convexity of the concave-convex algorithm in one embodiment;

[0041] Figure 10 This is a schematic diagram illustrating the convexity of the concave-convex algorithm in another embodiment;

[0042] Figure 11 This is a schematic diagram illustrating the concavity of the concave-convex algorithm in one embodiment;

[0043] Figure 12 This is a schematic diagram of the concavity of the concave-convex algorithm in another embodiment;

[0044] Figure 13This is a schematic diagram of a zoom tracking curve determination method in another embodiment;

[0045] Figure 14 This is a schematic diagram of a zoom tracking curve determination device in one embodiment;

[0046] Figure 15 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] With the widespread use of zoom lenses, zoom tracking technology has become an important function of digital cameras and is widely used in industrial inspection and leisure activities. Zoom tracking refers to changing the focal length of the system by moving the zoom lens during zooming. As the zoom motor moves, the focusing motor tracks the movement synchronously according to a pre-calibrated zoom tracking curve, thereby achieving lens focusing and improving image clarity.

[0049] Typically, before a camera leaves the factory, manufacturers set multiple preset zoom tracking curves, each corresponding to a different reference object distance. These preset zoom tracking curves represent the relationship between the zoom position and the focus position at which the image is sharpest at that reference object distance. However, if the initial zoom position is near the wide-angle end, the curves overlap, and as the zoom motor moves towards the telephoto end, the curves gradually separate, making it difficult to determine an evaluation tracking curve without any strategy. Related technologies often use the zoom tracking curve with the initial sharp focus as the target tracking curve, but this method is prone to producing out-of-focus images when the camera zooms to the telephoto end. Therefore, there is an urgent need for a solution that can ensure the camera maintains sharp images throughout the zoom and focus process.

[0050] In one embodiment, such as Figure 1 As shown, a method for determining zoom tracking curves is provided, such as... Figure 1 As shown, it includes the following steps:

[0051] Step S101: Obtain the imaging data from the camera, which includes camera parameters and predicted object distance.

[0052] Specifically, "camera" refers to an imaging system in a broad sense, including but not limited to video conferencing cameras, surveillance cameras, digital cameras, mobile phone camera modules, and computer camera modules. A terminal capable of autofocus is considered a camera in this embodiment. Camera parameters include parameters related to the camera's optical path system, such as the camera's circle of confusion diameter δ, aperture value F, and lens focal length f. Predicted object distance is an estimate of the actual object distance obtained through measurement techniques; the process of obtaining the predicted object distance is the assisted focusing process. Methods for estimating target object distance include laser ranging, time-of-flight (TOF) technology, phase difference autofocus (PDAF) technology, and spatial calibration distance techniques.

[0053] Step S102: Calculate the depth of field based on the imaging data, and use the set of preset zoom tracking curves whose reference object distance is within the depth of field as the curve search range.

[0054] Specifically, by using imaging data, especially predicted object distance, a general curve search range can be defined. In one embodiment, the predicted object distance can be used as a reference, and a lookup table based on the relationship between the pre-measured predicted object distance and the curve search range can be placed in the camera. The curve search range is then determined based on this lookup table. For example, the depth of field can be calculated in real time, and the curve search range can be determined through real-time calculation. Depth of field refers to the range of distances in front of and behind the subject that can be captured in a clear image by the front edge of the camera lens or other imaging device. It includes the foreground depth of field and the background depth of field, with the subject as the boundary. Aperture, lens, and the distance from the focal plane to the subject are important factors affecting the depth of field. After calculating the depth of field of the imaging data, the predicted object distance can be made to fall within the depth of field range by adjusting the camera aperture, etc. Adjusting the object distance curve within the depth of field range can ensure the image sharpness throughout the zoom tracking process. By limiting the range of reference object distances corresponding to the preset zoom tracking curve for searching by depth of field, the search range of the curve is narrowed, thereby improving the curve search efficiency.

[0055] Step S103: Perform curve search based on the curve search range to determine the target zoom tracking curve.

[0056] Specifically, after determining the curve search range, the target zoom tracking curve is determined based on the curve search algorithm. Existing curve search methods, or zoom tracking methods, mainly include three categories: table lookup methods, geometric methods, and machine learning methods. The table lookup method refers to storing a large number of tracking curves for various object distances in memory, and estimating the true trajectory by selecting the closest curve from the stored curves. Geometric methods mainly include Geometric Zoom Tracking (GZT), Adaptive Zoom Tracking (AZT), and Simplified Zoom Tracking (RZT). GZT estimates the trajectory curves using linear interpolation based solely on two trajectory curves for near and far targets. AZT, an improvement on GZT, also stores two tracking curves for near and far object distances. It selects a position within the zoom motor's entire stroke as the boundary between the linear and nonlinear regions. When the zoom motor reaches this boundary during zooming, it pauses and uses a focusing algorithm to find the clearest point in the image at that position, thus reducing tracking errors. RZT improves upon both the lookup table method and GZT, significantly increasing the number of stored curves and outperforming GZT in tracking accuracy within the nonlinear region.

[0057] In the above-described zoom tracking curve determination method, the predicted object distance is obtained by calculating the estimated object distance. Based on the predicted object distance and camera parameters, the depth of field is calculated, narrowing the search range of the zoom tracking curve. Zooming and focusing operations are performed according to the zoom tracking curve within this range, ensuring image sharpness throughout the entire process. Furthermore, the speed of determining the target zoom tracking curve is improved, thereby increasing the efficiency of target zoom tracking curve determination and focusing speed.

[0058] In one embodiment, determining the curve search range of the target zoom tracking curve based on the imaging data includes: calculating the depth of field based on the camera parameters and the predicted object distance; and using a set of preset zoom tracking curves whose reference object distance is within the depth of field as the curve search range.

[0059] Specifically, such as Figure 2 As shown, when a camera lens is focused clearly on an object, points on the same plane perpendicular to the lens axis at the center of the lens can form a fairly clear image on the film or receiver. Points within a certain range in front of and behind this plane along the lens axis can also form relatively clear image points acceptable to the eye. The distance of all objects in front of and behind this plane is called the camera's depth of field.

[0060] Before and after the focal point, light begins to converge and diffuse, blurring the image of the point and forming an enlarged circle called the circle of confusion. In reality, images are viewed in some way (such as projection, magnification into a photograph, etc.). The image perceived by the human eye is greatly influenced by the magnification, projection distance, and viewing distance. If the diameter of the circle of confusion is smaller than the human eye's resolving power, the blur produced by the actual image within a certain range will be unrecognizable. This unrecognizable circle of confusion is called the permissible circle of confusion. There is a permissible circle of confusion before and after the focal point. The depth of field is calculated as follows:

[0061] Promising future:

[0062] Depth of field:

[0063] Depth of field:

[0064] Where δ is the diameter of the circle of confusion, F is the aperture value, f is the focal length, and L is the focusing distance, which is the sum of the estimated object distance and the image distance.

[0065] In one embodiment, the step of calculating the depth of field based on the camera parameters and the predicted object distance includes: detecting whether the predicted object distance is within the depth of field; if the predicted object distance is not within the depth of field, then increasing the depth of field by adjusting the aperture size until the predicted object distance is within the depth of field.

[0066] Specifically, aperture, lens, and distance to the subject are important factors affecting depth of field: such as Figure 3 As shown, aperture size is inversely proportional to depth of field. A larger aperture, or a smaller f-number, results in a shallower depth of field; a smaller aperture, or a larger f-number, results in a deeper depth of field. The longer the focal length of the lens, the shallower the depth of field; the farther the subject, the deeper the depth of field. By controlling the depth of field to limit the zoom tracking curve, aperture size is the most effective adjustment factor for controlling depth of field. Figure 4 As shown, when the estimated object distance exceeds the depth of field range, the aperture can be adjusted appropriately to expand the depth of field range, ensuring the predicted object distance falls within it. This limits the zoom and focus processes. When the predicted object distance is within the depth of field range, the search range of the target zoom tracking curve is as follows: Figure 5 As shown, Figure 5Along the vertical direction, the reference object distance corresponding to the preset zoom tracking curve from top to bottom gradually increases. By determining the preset zoom tracking curve corresponding to the foreground depth of field and the preset zoom tracking curve corresponding to the background depth of field, it can be determined that the target zoom tracking curve is located between these two preset zoom tracking curves, which narrows the curve search range of the target zoom tracking curve and helps to improve the search accuracy and search efficiency of determining the target zoom tracking curve.

[0067] In one embodiment, the step of performing curve search based on the curve search range to determine the target zoom tracking curve includes: obtaining a predicted search direction; switching a preset zoom tracking curve within the curve search range according to the predicted search direction; synchronously changing the zoom position according to the switching process of the preset zoom tracking curve; calculating a corresponding focus evaluation value based on the real-time preset zoom tracking curve and the real-time zoom position; and determining the target tracking curve based on multiple focus evaluation values.

[0068] Specifically, the predicted search direction refers to the direction in which the target zoom tracking curve is found. After determining the curve search range, a computer algorithm can be used to search within this range. For example, the target zoom tracking curves can be switched one by one according to the reference object distance, from near to far or from far to near, until the target zoom tracking curve with the highest focus evaluation value is found. Here, the focus evaluation value is the FV value, which characterizes the image sharpness or contrast. Preferably, the predicted search direction can also be adjusted frame by frame according to the algorithm. By adjusting the search direction and the zoom step size per frame, the target zoom tracking curve can be found faster and more accurately.

[0069] In one embodiment, within a defined depth-of-field limit, the zoom tracking curve is switched to gradually approach the zoom tracking curve with the highest contrast while ensuring image sharpness, thus determining the actual object distance of the subject. Preferably, a concave-convex algorithm is used for approximation, and the approximation process is as follows: Figure 6 As shown, when searching for the position with the highest sharpness, the method for switching the zoom tracking curve is to perform a reverse search after two consecutive searches in the foreground or background direction. This is to fully utilize the concave-convex algorithm, which only requires two reverse searches to complete one calculation and determine the direction of the target zoom tracking curve. During the algorithm execution, as... Figure 7 As shown, the depth of field is significantly affected by magnification; it decreases rapidly as the camera's magnification increases. Therefore, it is necessary to adjust the zoom step size for each frame. Figure 8 As shown, the zoom step size for each frame decreases rapidly at first, and then decreases slowly.

[0070] In one embodiment, obtaining the predicted search direction includes: obtaining a first search direction in which the zoom motor moves from the previous two zoom positions to the previous zoom position; obtaining a second search direction in which the zoom motor moves from the previous zoom position to the current zoom position; if the second search direction is the same as the first search direction, then the predicted search direction is opposite to the second search direction.

[0071] In one embodiment, obtaining the predicted search direction further includes: obtaining the current zoom position; detecting whether the current zoom position is located at the edge of the depth of field; if so, the predicted search direction is opposite to the second search direction. Specifically, the preset search direction determination method of this embodiment can ensure that the image sharpness is within an acceptable range throughout the entire search process, ensuring that the image is sharp throughout the zoom and focus process.

[0072] In one embodiment, obtaining the predicted search direction further includes: if the second search direction is opposite to the first search direction, obtaining the first two zoom positions and calculating the first two focus evaluation values ​​corresponding to the first two zoom positions based on a first preset zoom tracking curve; obtaining the previous zoom position and selecting a second preset zoom tracking curve based on the change in object distance in the first search direction to calculate the previous focus evaluation value corresponding to the previous zoom position; obtaining the current zoom position and selecting a third preset zoom tracking curve based on the change in object distance in the second search direction to calculate the current focus evaluation value corresponding to the current zoom position; and determining the predicted search direction based on the first two zoom positions and the first two focus evaluation values, the previous zoom position and the previous focus evaluation value, and the current zoom position and the current focus evaluation value.

[0073] Specifically, the predicted search direction is determined using a concave-convex algorithm. For example... Figure 9 Where point 0 corresponds to the two previous zoom positions, point 1 corresponds to the previous zoom position, and point 2 corresponds to the current zoom position. This refers to the zoom position; To focus on the evaluation value, namely the FV value, the estimated FV value of point 1 can be calculated based on the concavity / convexity points 0 and 2. The formula for calculating the estimated FV value is as follows:

[0074]

[0075] Where V 1计 Let V1 be the estimated FV value for point 1 (convex / concave), V2 be the current focus evaluation value, V0 be the previous two focus evaluation values, P2 be the current focus position, P0 be the previous two focus positions, and P1 be the previous focus position. After calculating the estimated FV value, the estimated FV value corresponding to the previous focus position is compared with the actual tested FV value V1 corresponding to the previous focus position. 1实A comparison was performed to determine the convexity and concavity of the material tested. Convexity is as follows: Figure 9 and Figure 10 As shown, V 1实 >V 1计 This indicates that the search direction for point 1 (concave / convex) is correct, and the predicted search direction will continue along the direction pointed to by point 1. Concavity is as follows... Figure 11 and Figure 12 As shown, V 1实 <V 1计 This indicates that the search direction for point 1 is incorrect, and the predicted search direction is to proceed in the opposite direction to the direction pointed to by point 1.

[0076] According to the concave-convex algorithm, it can continuously approach the target zoom tracking curve, and eventually reach or even hit the target zoom tracking curve, achieving a clear effect throughout the zoom tracking process.

[0077] In one embodiment, such as Figure 13 As shown, a method for determining a zoom tracking curve is provided. This method includes: assisted focusing to estimate the target distance and calculating the depth of field range. If the edge of the depth of field range has been reached, the next probe direction is opposite to the previous direction. The probe direction refers to the direction pointed to by the middle detection position among three adjacent detection positions. If the previous search direction is opposite to the next search direction, a concave-convex algorithm is used to determine the next probe direction, where the search direction refers to the direction in which the current detection position is about to move. If two consecutive probe directions are the same, the next probe direction is opposite to the previous direction.

[0078] The zoom tracking curve determination method in this embodiment estimates the target distance based on auxiliary focusing and calculates the depth of field. Within the depth of field, it infinitely adjusts the target distance curve to ensure image sharpness during zoom tracking. Furthermore, it utilizes a concave-convex algorithm to gradually approximate the actual target distance curve, ensuring clarity throughout the zoom tracking process. In addition, this zoom tracking curve determination method is applicable not only to video conferencing but also to zoom lens control in security and other fields.

[0079] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0080] Based on the same inventive concept, this application also provides a zoom tracking curve determination device for implementing the zoom tracking curve determination method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more zoom tracking curve determination device embodiments provided below can be found in the limitations of the zoom tracking curve determination method described above, and will not be repeated here.

[0081] In one embodiment, such as Figure 14 As shown, a zoom tracking curve determination device is provided, comprising: an acquisition module 10, a calculation module 20, and a processing module 30, wherein:

[0082] The acquisition module 10 is used to acquire imaging data from the camera, including camera parameters and predicted object distance.

[0083] The calculation module 20 is used to calculate the depth of field based on the imaging data, and to use the set of preset zoom tracking curves whose reference object distance is within the depth of field as the curve search range.

[0084] Processing module 30 is used to perform curve search based on the curve search range to determine the target zoom tracking curve.

[0085] The calculation module 20 is also used to detect whether the predicted object distance is within the depth of field. If the predicted object distance is not within the depth of field, the depth of field is expanded by adjusting the aperture size until the predicted object distance is within the depth of field.

[0086] The processing module 30 is also used to obtain the predicted search direction; switch the preset zoom tracking curve according to the predicted search direction; change the zoom position synchronously according to the switching process of the preset zoom tracking curve; calculate the corresponding focus evaluation value according to the real-time preset zoom tracking curve and the real-time zoom position; and determine the target tracking curve according to multiple focus evaluation values.

[0087] The processing module 30 is further configured to obtain a first search direction for the zoom motor to move from the previous two zoom positions to the previous zoom position; obtain a second search direction for the zoom motor to move from the previous zoom position to the current zoom position; if the second search direction is the same as the first search direction, then the predicted search direction is opposite to the second search direction.

[0088] The processing module 30 is also used to obtain the current zoom position; detect whether the current zoom position is located at the edge of the depth of field; if so, the predicted search direction is opposite to the second search direction.

[0089] The processing module 30 is further configured to: if the second search direction is opposite to the first search direction, obtain the first two zoom positions and calculate the first two focus evaluation values ​​corresponding to the first two zoom positions based on a first preset zoom tracking curve; obtain the previous zoom position and select a second preset zoom tracking curve based on the change in object distance in the first search direction to calculate the previous focus evaluation value corresponding to the previous zoom position; obtain the current zoom position and select a third preset zoom tracking curve based on the change in object distance in the second search direction to calculate the current focus evaluation value corresponding to the current zoom position; and determine the predicted search direction based on the first two zoom positions and the first two focus evaluation values, the previous zoom position and the previous focus evaluation value, and the current zoom position and the current focus evaluation value.

[0090] The modules in the aforementioned zoom tracking curve determination device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0091] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 15As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a zoom tracking curve determination method. The display screen can be an LCD screen or an e-ink display screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0092] Those skilled in the art will understand that Figure 15 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0093] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0094] Acquire imaging data from the camera, the imaging data including camera parameters and predicted object distance;

[0095] The depth of field is calculated based on the imaging data, and the set of preset zoom tracking curves whose reference object distance is within the depth of field is used as the curve search range.

[0096] Based on the curve search range, a curve search is performed to determine the target zoom tracking curve.

[0097] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the steps in the above method embodiments.

[0098] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0099] Acquire imaging data from the camera, the imaging data including camera parameters and predicted object distance;

[0100] The depth of field is calculated based on the imaging data, and the set of preset zoom tracking curves whose reference object distance is within the depth of field is used as the curve search range.

[0101] Based on the curve search range, a curve search is performed to determine the target zoom tracking curve.

[0102] In one embodiment, the computer program, when executed by a processor, is also used to implement the steps in the above-described method embodiments.

[0103] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0104] Acquire imaging data from the camera, the imaging data including camera parameters and predicted object distance;

[0105] The depth of field is calculated based on the imaging data, and the set of preset zoom tracking curves whose reference object distance is within the depth of field is used as the curve search range.

[0106] Based on the curve search range, a curve search is performed to determine the target zoom tracking curve.

[0107] In one embodiment, the computer program, when executed by a processor, implements the steps in the above method embodiments.

[0108] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0109] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0110] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0111] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for determining a zoom tracking curve, characterized in that, The method includes: Acquire imaging data from the camera, including camera parameters and predicted object distance; the predicted object distance is used to assist in focusing estimation; calculate the depth of field based on the imaging data, and use the set of preset zoom tracking curves whose reference object distance is within the depth of field as the curve search range; Based on the curve search range, a curve search is performed to determine the target zoom tracking curve; the target zoom tracking curve is determined by switching zoom tracking curves within a defined depth of field limit, while ensuring image clarity, and using a concave-convex algorithm to gradually approach the zoom tracking curve with the highest focus evaluation value. The method further includes, after calculating the depth of field based on the imaging data: The system detects whether the predicted object distance is within the depth of field. If the predicted object distance is not within the depth of field, the system adjusts the aperture size to expand the depth of field until the predicted object distance is within the depth of field.

2. The method according to claim 1, characterized in that, The step of performing curve search based on the curve search range to determine the target zoom tracking curve includes: Obtain the predicted search direction; Switch the preset zoom tracking curve within the curve search range according to the predicted search direction; According to the switching process of the preset zoom tracking curve, the zoom position is changed synchronously, and the corresponding focus evaluation value is calculated based on the real-time preset zoom tracking curve and the real-time zoom position. The target tracking curve is determined based on multiple focused evaluation values.

3. The method according to claim 2, characterized in that, The process of obtaining the predicted search direction includes: Obtain the first search direction for the zoom motor to move from the previous two zoom positions to the previous zoom position; Obtain the second search direction for the zoom motor to move from the previous zoom position to the current zoom position; If the second search direction is the same as the first search direction, then the predicted search direction is opposite to the second search direction.

4. The method according to claim 3, characterized in that, The process of obtaining the predicted search direction also includes: Get the current zoom position; If the current zoom position is located at the edge of the depth of field, then the predicted search direction is opposite to the second search direction.

5. The method according to claim 3, characterized in that, The process of obtaining the predicted search direction also includes: If the second search direction is opposite to the first search direction, the first two zoom positions are obtained, and the first two focus evaluation values ​​corresponding to the first two zoom positions are calculated based on the first preset zoom tracking curve. Obtain the previous zoom position, and select a second preset zoom tracking curve based on the change in object distance in the first search direction to calculate the previous focus evaluation value corresponding to the previous zoom position; Obtain the current zoom position, and select a third preset zoom tracking curve based on the change in object distance in the second search direction to calculate the current focus evaluation value corresponding to the current zoom position; The predicted search direction is determined based on the previous two zoom positions and the previous two focus evaluation values, the previous zoom position and the previous focus evaluation value, and the current zoom position and the current focus evaluation value.

6. A zoom tracking curve determination device, characterized in that, The device includes: An acquisition module is used to acquire imaging data from the camera, the imaging data including camera parameters and predicted object distance; the predicted object distance is used to assist in focus estimation. The calculation module is used to calculate the depth of field based on the imaging data, and to use the set of corresponding preset zoom tracking curves with reference object distances within the depth of field as the curve search range; the calculation module is also used to detect whether the predicted object distance is within the depth of field, and if the predicted object distance is not within the depth of field, to increase the depth of field by adjusting the aperture size until the predicted object distance is within the depth of field. The processing module is used to perform curve search based on the curve search range to determine the target zoom tracking curve. The target zoom tracking curve is determined by switching zoom tracking curves within a defined depth of field limit, while ensuring image clarity, and using a concave-convex algorithm to gradually approach the zoom tracking curve with the highest focus evaluation value.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Focusing method and device based on BP neural network, terminal and storage device

    CN110913129A

  • Imaging device, method for controlling imaging device, and control program for imaging device

    CN111133355A