Focusing method of zoom lens
By calculating the moving distance and speed change curve of the zoom motor, predicting its position after the preset time, and determining the focus position based on the zoom zoom correlation curve, the lens blur problem caused by the mismatch between zoom and focus time in the security camera is solved, ensuring image clarity and monitoring safety during the zoom process.
Patent Information
- Application Number
- CN202510764184.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-08-05
AI Technical Summary
During the preset point state switching of the security camera, the mismatch between zoom and focus time causes the lens to blur, affecting monitoring safety.
By calculating the moving distance and speed change curve of the variable-magnetic motor, predict its position after the preset time, and determine the focus position based on the variable-magnetic zoom correlation curve to ensure the clarity of the image sequence during the variable-magnetic process.
It effectively solves the problem of lens blur, ensures image clarity during the zoom process, and improves the monitoring security of security cameras.
Smart Images

Figure CN120428397A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of optical equipment, and in particular to a focusing method of a variable magnification lens. Background Art
[0002] Preset Position Mode allows users to pre-set and save camera configurations in security cameras, enabling quick and accurate state switching between configurations for monitoring critical areas or automated patrols. Commonly used preset positions are the wide-angle and telephoto ends of a zoom lens. In this case, state switching in Preset Position Mode requires a slow zoom-focus linkage (i.e., fine-tuning the focus parameters during zooming, referred to as zooming) to achieve switching between different states.
[0003] In the related art, during the switching of preset point states, the time required for zooming is different from the time required for focusing, resulting in a period of lens blur during the zoom process, affecting the safety of security monitoring. Summary of the Invention
[0004] The embodiments of the present disclosure provide a focusing method for a zoom lens to solve the problem of lens blurring for a period of time during the switching of preset point states in the related art.
[0005] In a first aspect, an embodiment of the present application provides a vehicle battery maintenance and discharge method, including: In a first aspect, an embodiment of the present disclosure provides a focusing method for a zoom lens, the focusing method for a zoom lens including:
[0006] In response to an instruction for instructing the lens to perform zooming, calculating a first distance that the zoom motor needs to travel;
[0007] Constructing at least two judgment conditions associated with the first distance;
[0008] Construct the same number of zoom curves as the judgment conditions;
[0009] In response to a comparison result between the first distance and at least two judgment conditions, selecting a zoom curve from a number of zoom curves;
[0010] According to the running distance and the selected zoom curve, the predicted position of the zoom motor after the preset time is obtained;
[0011] Determine the focal position corresponding to the predicted position according to a preset zoom correlation curve;
[0012] Among them, the preset time is limited to: after reaching the preset time, the magnification motor has run to the magnification position corresponding to the instruction and the zoom motor has run to the focus position, so that the image sequence output by the lens during the magnification process is synchronously focused.
[0013] The focusing method of the zoom lens provided by the embodiment of the present disclosure automatically determines the moving distance of the zoom motor and the corresponding zoom curve when the lens performs zooming, and determines the predicted position of the zoom motor after a preset time period based on the moving distance and the zoom curve, thereby determining the focal position based on the predicted position. As a result, when the zoom motor moves to the zoom position, it can be ensured that the zoom motor has moved to the corresponding focal position, ensuring that the image sequence output by the zoom motor during the movement of the zoom motor is focused and there is no image blur, thereby ensuring image clarity during the zooming process, effectively solving the problem of lens blur for a period of time during the switching of preset point states, and ensuring the monitoring safety of security cameras. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0015] Figure 1 A diagram illustrating an application scenario of the focusing method of the zoom lens provided in an embodiment of the present disclosure;
[0016] Figure 2 A flowchart of a focusing method for a zoom lens provided in one embodiment of the present disclosure;
[0017] Figure 3 for Figure 2 A schematic diagram of a zoom correlation curve provided by the illustrated embodiment;
[0018] Figure 4 A schematic diagram of a zoom curve structure provided by an embodiment of the present disclosure;
[0019] Figure 5 A schematic structural diagram of a focusing device of a zoom lens provided in yet another embodiment of the present disclosure;
[0020] Figure 6 A schematic diagram of the structure of a control device provided in one embodiment of the present disclosure.
[0021] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0022] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0023] The following detailed description of the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above-mentioned technical problems is provided with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.
[0024] The following is a description of the concepts involved in the embodiments of the present disclosure:
[0025] Preset Position Mode: This feature, also known as Preset Position Mode, is available on cameras with zoom lenses. It allows users to pre-set and save specific camera positions and configurations, enabling quick and accurate switching between different positions or states for monitoring critical areas or automated patrols. Common state switching involves switching between wide-angle and telephoto, or selecting between two different states, to adjust the camera's field of view and magnification for targeted monitoring.
[0026] Zoom refers to the process of changing the focal length of a lens, thereby enlarging or reducing the field of view, without moving the camera itself. This allows the user to zoom in or out of the subject without changing their physical position. Zooming requires a corresponding motor to drive the movement of the corresponding lens. In the disclosed embodiments, the motor for zooming is referred to as a variable magnification motor.
[0027] Focusing refers to the process of adjusting the lens position to achieve the clearest possible image of the subject on the sensor. Focusing requires a motor to drive the lens movement and ensure the relative distance between the lens and the zoom lens. In this embodiment, the focusing motor is referred to as the zoom motor.
[0028] Zooming: The zooming process in the disclosed embodiment is used to represent a slow-linked zooming process, that is, during the zooming process, the position of the focus lens is synchronously fine-tuned to ensure that the image captured by the camera is always in the best focus state.
[0029] Preset mode allows users to pre-set and save camera configurations in security cameras, enabling quick and accurate state switching between configurations for monitoring critical areas or automated patrols. State switching in preset mode requires slow zoom-focus linkage (i.e., fine-tuning the focus parameters during zooming, referred to as zooming) to achieve switching between different states.
[0030] In related technologies, during the zoom process, taking the state switching between the wide-angle end and the telephoto end as an example, the total time of the zoom process takes about 0.8 to 1 second. During this period, due to the different time taken for zooming and focusing (the time required for zooming is longer than the time required for focusing), the zoom and focus states do not match, and the lens will be blurred for a period of time, affecting the safety of security monitoring.
[0031] Therefore, it is necessary to provide a solution that can solve the problem of lens blur during the zoom process.
[0032] In order to solve this problem, the embodiment of the present disclosure provides a focusing method for a zoom lens, which calculates the distance that the zoom motor runs when a zoom command is received, and determines the predicted position and focus position of the zoom motor under a preset time length based on the distance and the corresponding speed change curve (i.e., the zoom curve). The zoom motor can be controlled to move to the focus position at the corresponding moment, ensuring that the camera can always obtain a clear image with accurate focus when taking images, thereby ensuring the clarity of the image sequence during the zoom process and effectively solving the lens blur problem.
[0033] The following explains the application scenarios of the embodiments of the present disclosure:
[0034] Figure 1 This is an application scenario diagram of the focusing method of the zoom lens provided by the embodiment of the present disclosure. Figure 1 As shown, during the zooming process of the zoom motor, the controller 100 controls the zoom motor 110 to move according to the set distance, and based on the predicted position of the zoom motor 110 at each image acquisition moment, controls the zoom motor 120 to move to the corresponding focus position, and then performs image acquisition to complete focusing.
[0035] It should be noted that Figure 1 In the illustrated scenario, only one controller, one magnification motor, and one zoom motor are used as an example for illustration, but the present disclosure is not limited thereto. That is, the number of controllers, magnification motors, and zoom motors can be arbitrary.
[0036] The focusing method of the zoom lens provided by the present disclosure is described in detail below through specific embodiments.
[0037] Figure 2This is a flow chart of a focusing method for a zoom lens provided by an embodiment of the present disclosure. Figure 2 As shown, the focusing method of the zoom lens provided in this embodiment includes the following steps:
[0038] S201 , in response to an instruction for instructing a lens to perform a zoom, calculating a first distance that a zoom motor needs to run.
[0039] Specifically, the execution subject of the embodiment of the present disclosure is a controller or a control processor of a camera where the zoom lens is located, which is collectively referred to as a controller hereinafter for the convenience of description.
[0040] The command used to instruct the lens to perform zoom is called zoom command.
[0041] The magnification process usually involves multiple lenses in the magnification lens. When receiving the magnification instruction, the controller will send a control signal to the magnification motor according to the magnification instruction, so that the magnification motor drives the corresponding multiple lenses to move (the magnification motor can be one or more, so that the same magnification motor corresponds to only one lens, or corresponds to multiple lenses at the same time) to ensure that the focal length of the magnification lens switches to the value corresponding to the magnification instruction.
[0042] The distance that the zoom motor needs to move varies depending on the specific zoom command. In this case, the zoom command will not directly indicate the distance that each zoom motor needs to move, but usually gives the focal length value or gear position that needs to be adjusted (i.e., switching between multiple preset focal lengths). Based on the focal length value, the controller can determine the corresponding movement distance of the zoom motor, which is also the first distance. The specific conversion relationship between the first distance and the focal length value can be configured according to the corresponding algorithm of different lens structures. The relevant technology is the existing technology in this field and is not the content that needs to be protected by this solution, so it will not be explained in detail here.
[0043] It should be noted that, in this solution, when the controller receives a zoom instruction, it can calculate the first distance that the zoom motor needs to move according to a preset algorithm.
[0044] S202: Construct at least two judgment conditions associated with the first distance.
[0045] Specifically, since the zoom motor does not directly move at a uniform speed throughout the entire process when actually moving, but there will be a process of acceleration and deceleration, it is necessary to judge the actual changes in the speed and position of the zoom motor during the movement process, so as to judge the position of the zoom motor at each moment when the image needs to be captured through the lens, so as to control the zoom motor to drive the lens to the corresponding position, ensure the focus of the lens when capturing the image, and thus ensure the image capture effect.
[0046] Depending on the first distance, the speed and position corresponding to each moment will be different. Therefore, it is necessary to establish different judgment conditions corresponding to the first distance. Each judgment condition corresponds to a certain distance length range. In this way, the distribution of the speed and position of the variable magnification motor at different moments in the corresponding situation can be determined based on which length range corresponds to the judgment condition to which the first distance belongs.
[0047] S203, constructing the same number of zoom curves as the judgment conditions.
[0048] Specifically, a corresponding zoom curve can be established for each judgment condition. The zoom curve is used to represent the speed of the zoom motor at different times (i.e., the horizontal axis of the zoom curve is time, and the vertical axis is the speed of the zoom motor). By integrating the zoom curve along time, the specific movement distance of the zoom motor at each time can be calculated, and the position of the zoom motor at each time can be determined.
[0049] Different zoom curves can be composed of different acceleration segments and deceleration segments. For example, a zoom curve with a longer distance can simultaneously contain multiple acceleration segments with different accelerations, a constant speed segment, and multiple deceleration segments with different decelerations, while a zoom curve with a shorter distance can only contain one acceleration segment corresponding to one acceleration and one deceleration segment corresponding to one deceleration.
[0050] S204 : Selecting a zoom curve from a number of zoom curves in response to a comparison result between the first distance and at least two judgment conditions.
[0051] Specifically, each judgment condition corresponds to a zoom curve. Therefore, by comparing the first distance with each judgment condition and determining which judgment condition the first distance satisfies, it is possible to determine which zoom curve's variation rule the first distance satisfies.
[0052] Depending on the first distance, there is usually only one judgment condition that matches the first distance (the exception is that the length of the first distance just meets the critical point of two judgment conditions, then any magnification curve corresponding to the judgment condition can be selected), so there is only one magnification curve that can correspond to the first distance.
[0053] S205 , obtaining a predicted position of the zoom motor after a preset time period according to the running distance and the selected zoom curve.
[0054] Specifically, based on the determined magnification curve, the speed and moving distance of the magnification motor at each moment can be determined. Therefore, combined with its current moving distance (running distance), its moving distance from the current moment to the next moment (that is, after a preset time length, such as 1 second, 1 / 12 second, 1 / 24 second) can also be determined, and then the predicted position of the magnification motor at the next moment can be determined.
[0055] S206 : Determine a focus position corresponding to the predicted position according to a preset zoom correlation curve.
[0056] Among them, the preset time is limited to: after reaching the preset time, the magnification motor has run to the magnification position corresponding to the instruction and the zoom motor has run to the focus position, so that the image sequence output by the lens during the magnification process is synchronously focused.
[0057] Specifically, the zoom-zoom correlation curve is used to reflect the position correspondence between the zoom motor and the zoom motor while ensuring the focus of the lens. Through the zoom-zoom correlation curve, it can be determined that when the zoom motor moves to different positions, the corresponding position (i.e., the focus position) where the zoom motor should be located can be determined.
[0058] Therefore, in order to ensure that the image output by the lens can be focused, it is necessary to ensure that when the zoom motor moves to the predicted position, the zoom correlation curve (such as Figure 3 As shown in the figure, it is a schematic diagram of the zoom-zoom correlation curve, where the horizontal axis is the distance moved by the zoom motor and the vertical axis is the moving position of the zoom motor. The curve in the figure is the relative position relationship between the zoom motor and the zoom motor in order to ensure focusing. The curve is usually stored in the controller in the form of a function expression or a specific distance value form to facilitate quick query or distance conversion) to determine the corresponding focal position to which the zoom motor should drive the corresponding lens, thereby ensuring that the relative distance between each lens meets the distance required for focusing.
[0059] Therefore, during the movement of the zoom motor, each time the lens needs to capture and output an image, the zoom motor moves to the corresponding focus position, thereby focusing the sequence of output images, ensuring that during the movement of the zoom motor, that is, during the zoom process, the images captured by the camera can maintain focus and clarity, thereby ensuring the safety of security monitoring.
[0060] The focusing method of the zoom lens provided by the embodiment of the present disclosure automatically determines the moving distance of the zoom motor and the corresponding zoom curve when the lens performs zooming, and determines the predicted position of the zoom motor after a preset time period based on the moving distance and the zoom curve, thereby determining the focal position based on the predicted position. As a result, when the zoom motor moves to the zoom position, it can be ensured that the zoom motor has moved to the corresponding focal position, ensuring that the image sequence output by the zoom motor during the movement of the zoom motor is focused and there is no image blur, thereby ensuring image clarity during the zooming process, effectively solving the problem of lens blur for a period of time during the switching of preset point states, and ensuring the monitoring safety of security cameras.
[0061] Based on the above embodiments, some of the concepts are further explained below.
[0062] In some embodiments, the preset duration is equal to the duration of a single frame of the shot.
[0063] Specifically, the controller captures and outputs an image every preset time interval. To ensure a continuous image sequence based on the captured images, the preset time interval must correspond to the time the controller captures the images. Therefore, the preset time interval is typically the duration of a single frame.
[0064] For example, if the image capture mode of the controller is configured to 12 frames per second, the preset duration is 1 / 12 second. If the image capture mode is configured to 30 frames per second, the preset duration is 1 / 30 second.
[0065] In some embodiments, the controller is further configured to use a video field blanking interrupt signal as a trigger signal, where the trigger signal is used to determine a moment of acquiring a predicted position so that focusing is performed on any frame image in the output image sequence.
[0066] Specifically, in actual applications, the controller needs to specifically determine the moment to obtain the predicted position of the zoom motor after a preset time length, that is, the frame interval, that is, the time when synchronization is required each time. It is necessary to obtain the preset position and control the zoom motor to move to the corresponding focus position based on the preset position.
[0067] Therefore, the controller will configure the specific type of trigger signal to ensure the accuracy of determining the preset position and controlling the focus position, thereby ensuring the stability of the captured image sequence.
[0068] For example, the controller can use the video field blanking interrupt signal as a trigger signal to ensure that exposure and image data collection begin when the zoom motor and focus motor reach the clear point position, which is beneficial to ensure the clarity of the picture output by the controller.
[0069] For another example, the controller may also use the signal corresponding to the image signal or related data received when the image capture of the current frame is completed and the output is started as a trigger signal, and determine the preset duration and the corresponding predicted position according to the trigger signal.
[0070] On this basis, the first distance-related judgment condition, the zoom curve and the corresponding relationship are further explained below.
[0071] In some embodiments of the present disclosure, the aforementioned “number of zoom curves” specifically include five types, namely:
[0072] The first zoom curve includes one acceleration segment and one deceleration segment.
[0073] The second zoom curve includes 2 acceleration segments and 1 deceleration segment.
[0074] The third zoom curve includes 3 acceleration segments and 2 deceleration segments.
[0075] The fourth zoom curve includes 4 acceleration segments and 2 deceleration segments.
[0076] The fifth zoom curve includes 4 acceleration segments, 1 uniform speed segment and 2 deceleration segments.
[0077] The duration of any zoom curve is the same and the running distance of the zoom motor is equal to the first distance.
[0078] Specifically, the zoom motor continuously moves according to the speed variation pattern in the zoom curve throughout the zoom process. The speed variation during movement varies depending on the length of the first distance. The longer the first distance, the higher the maximum speed of the zoom motor, to minimize movement time and complete the zoom process more quickly.
[0079] To reach the maximum speed, the zoom motor will accelerate from a standstill until it reaches the maximum speed, and then maintain that speed for uniform motion, or directly decelerate. Therefore, the zoom curve can be classified according to the composition of the acceleration, uniform speed, and deceleration parts.
[0080] It should be noted that each zoom curve corresponds to a range of first distances, rather than a fixed first distance value. As long as the first distance falls within the corresponding value range of the same zoom curve, the same zoom curve can be used to represent it, differing only in the speed values corresponding to the endpoints of each line segment in the zoom curve.
[0081] When the first distance is short and the maximum speed can be reached by accelerating at a single acceleration, the zoom curve includes only one acceleration segment and one deceleration segment, which is the first zoom curve.
[0082] If the first distance increases on the basis of the above, the acceleration time required by the zoom motor will be longer, and it may include multiple acceleration segments. In order to quickly complete the acceleration process, the torque of the zoom motor in the low-speed range may be greater, so as to accelerate to the maximum speed faster. At this time, when approaching the maximum speed, the torque will decrease to avoid the motor from losing step. Therefore, in a longer acceleration range, there will be multiple acceleration segments. In the deceleration process, since there is no need to worry about the motor losing step, it is only necessary to reduce the speed to zero. Therefore, there can be a zoom curve containing two acceleration segments and one deceleration segment to better reflect the characteristics corresponding to the longer first distance, that is, the second zoom curve.
[0083] On the basis of the second zoom curve, if the first distance is further increased, the number of acceleration segments can be increased to three to make the initial acceleration higher and reach the maximum speed faster. At the same time, when the maximum speed is higher, in order to minimize the deceleration time, the number of deceleration segments can be increased to two. When the zoom motor speed is high, the motor speed can be quickly reduced by a higher deceleration rate, and the deceleration rate can be reduced when the motor speed is high to ensure that the zoom motor stops smoothly at the zoom position corresponding to the zoom command. This is the third zoom curve.
[0084] On the basis of the third magnification curve, if the first distance continues to increase, the number of acceleration segments can be further increased to four to achieve a higher acceleration in a shorter time. This is the fourth magnification curve.
[0085] The zoom motor in the fourth zoom curve has already reached a relatively high speed (and is close to the maximum speed under the zoom condition). Based on the fourth zoom curve, if the first distance continues to increase, the zoom curve at this time may no longer increase the number of acceleration segments. Instead, the duration of the last acceleration segment will be extended until the zoom motor reaches the maximum speed under the zoom condition. It will then maintain this maximum speed for a period of time, i.e., a uniform speed segment, and then begin to decelerate. Therefore, the zoom curve contains four acceleration segments, one uniform speed segment, and two deceleration segments, i.e., the fifth zoom curve.
[0086] Furthermore, it can be seen from the above description that the types and compositions of the magnification curves in actual applications are not limited to the above examples, and may include more types. For example, there may be only two or three types of magnification curves, or there may be six, seven or more types of magnification curves. Different types of magnification curves may also include more deceleration segments and / or more acceleration segments.
[0087] In some embodiments of the present disclosure, the judgment condition is constructed as follows:
[0088] A first judgment condition, wherein the first judgment condition includes that the first distance is greater than the sum of the running distances corresponding to the fourth magnification curve;
[0089] A second judgment condition, wherein the second judgment condition includes that the first distance is greater than the sum of the running distances corresponding to the third magnification curve;
[0090] A third judgment condition, the third judgment condition includes that the first distance is greater than the sum of the running distances of the second magnification curve;
[0091] A fourth judgment condition, the fourth judgment condition includes that the first distance is greater than the sum of the running distances of the first zoom curve;
[0092] The fifth judgment condition includes that the first distance is less than the total running distance of the first magnification curve.
[0093] Specifically, the first judgment condition corresponds to the corresponding moving distance range of the fifth zoom curve, that is, the first distance is greater than the sum of the running distances corresponding to the line segments in the fourth zoom curve. At this time, the first distance is the longest.
[0094] Similarly, the second judgment condition corresponds to the fourth magnification curve. At this time, the first distance is less than the length corresponding to the first judgment condition, greater than the total running distance corresponding to the third magnification curve, and less than the total running distance corresponding to the fifth magnification curve.
[0095] When the third judgment condition corresponds to the third magnification curve, the first distance is greater than the total running distance of the second magnification curve and less than the total running distance corresponding to the fourth magnification curve.
[0096] The fourth judgment condition corresponds to the second magnification curve. At this time, the first distance is greater than the total running distance of the first magnification curve, but less than the total running distance corresponding to the third magnification curve.
[0097] The fifth judgment condition is the case where the first distance is the shortest. In this case, the first distance should be within the total range of the running distances of the first zoom curve.
[0098] It can be seen from the above description that in the embodiment of the present disclosure, each line segment endpoint of each magnification curve has a corresponding maximum speed value, so that each magnification curve has a corresponding distance range corresponding to the first distance. When the first distance required to be moved by the magnification motor exceeds the distance range corresponding to a magnification curve, it is necessary to select a magnification curve with a larger distance range. That is, the first distance corresponding to the magnification motor will usually only meet one judgment condition, and only when the first distance is at the critical point of the distance range corresponding to the two judgment conditions, will the first distance meet both judgment conditions at the same time.
[0099] Furthermore, from the above description, it can be seen that the construction of a number of zoom curves further includes:
[0100] Configure the first acceleration, the second acceleration, the third acceleration, the fourth acceleration, the first deceleration, and the second deceleration;
[0101] Further construction:
[0102] The fifth magnification curve and the fourth magnification curve both have a first acceleration, a second acceleration, a third acceleration, a fourth acceleration, a first deceleration, and a second deceleration, and a uniform speed segment of the fifth magnification curve is arranged between an acceleration segment corresponding to the fourth acceleration and a deceleration segment corresponding to the first deceleration;
[0103] The third variable magnification curve has a first acceleration, a second acceleration, a third acceleration, a first deceleration, and a second deceleration;
[0104] The second magnification curve has a first acceleration, a second acceleration and a second deceleration;
[0105] The first magnification curve has a first acceleration and a second deceleration.
[0106] Specifically, as can be seen from the foregoing analysis, in the disclosed embodiment, the five zoom curves each include a different number of acceleration and deceleration segments. The acceleration in the zoom curve from zero to acceleration is the highest, representing the first acceleration. If subsequent acceleration segments exist, corresponding second, third, and fourth accelerations will also exist. Accordingly, when the zoom motor decelerates from its highest speed, its absolute deceleration is also the largest, representing the first deceleration. When the zoom motor decelerates to a stop, its absolute deceleration decreases, representing the second deceleration.
[0107] When only one deceleration segment is included, the speed of the zoom motor is not high enough, so only the second deceleration is needed. That is, the second zoom curve and the first zoom curve only include the second deceleration, and the third zoom curve, the fourth zoom curve and the fifth zoom curve include the first deceleration and the second deceleration.
[0108] From this we can also know that the first acceleration>the second acceleration>the third acceleration>the fourth acceleration.
[0109] Specifically, the motor has a large torque at low speed, so the acceleration is the largest, which improves the rapid response time. As the motor speed gradually approaches the maximum speed, the torque decreases and the acceleration decreases. The smaller acceleration can avoid the motor from losing steps, conforming to the motor torque-frequency curve, and making the motion curve more consistent with the S-shaped motion curve.
[0110] Likewise, the first deceleration is smaller than the second deceleration.
[0111] Specifically, during the deceleration process, the motor needs to quickly complete the deceleration and stop. Therefore, the deceleration value is relatively high to quickly complete the deceleration. After the motor speed drops to a certain level, the deceleration can be reduced to ensure the stability of the motor when it stops.
[0112] In summary, the specific process of selecting a zoom curve based on the judgment conditions includes:
[0113] In response to the running distance satisfying the first judgment condition, selecting the fifth magnification curve;
[0114] In response to the running distance satisfying the second judgment condition, selecting the fourth magnification curve;
[0115] In response to the running distance satisfying the third judgment condition, selecting the third zoom curve;
[0116] In response to the running distance satisfying the fourth judgment condition, selecting the second zoom curve;
[0117] In response to the running distance satisfying the fifth judgment condition, the first magnification curve is selected.
[0118] Specifically, as can be seen from the preceding description, the first zoom curve is the shortest. Therefore, when the fifth judgment condition is met, the controller will select the first zoom curve to calculate the corresponding predicted position of the zoom motor. Correspondingly, when the fourth judgment condition is met, the controller will select the second zoom curve. Similarly, the third judgment condition corresponds to the second zoom curve, the second judgment condition corresponds to the fourth zoom curve, and the first judgment condition corresponds to the fifth zoom curve.
[0119] Based on the above description, the following describes how to combine the zoom curve, the duration corresponding to each acceleration of the zoom motor, and the first distance to calculate the predicted position. That is, the construction of the zoom curve further includes the following cases:
[0120] In one case, the first distance is the longest. In this case, the controller configures the duration corresponding to the first acceleration, the second acceleration, the third acceleration, the fourth acceleration, the first deceleration, and the second deceleration, and then calculates the duration of the uniform motion based on the first distance of the zoom motor to construct a fifth zoom curve.
[0121] Specifically, the controller can determine the real-time acceleration of the zoom motor based on the power delivered to the zoom motor, and can obtain the time length that the zoom motor is in each acceleration. That is, the controller can determine the time length that the zoom motor is in the first acceleration, the second acceleration, the third acceleration, the fourth acceleration, the first deceleration, and the second deceleration, and can calculate the real-time speed of the zoom motor and the total distance moved under various accelerations / decelerations based on the time length in each acceleration / deceleration.
[0122] The length that the first distance exceeds the total distance is the distance that the zoom motor moves in a uniform motion state. Since the zoom motor is at the highest speed at this time, that is, the speed obtained by adding the values after multiplying the first acceleration, the second acceleration, the third acceleration, and the fourth acceleration with the corresponding time length, the length of time that the zoom motor is in uniform motion can be determined by the ratio of this distance to the maximum speed.
[0123] For ease of understanding, the following Figure 4 This is a schematic diagram of the structure of the zoom curve. Figure 4In the figure, A1, A2, A3, and AM are the first, second, third, and fourth accelerations, respectively; DM and D1 are the first and second decelerations, respectively; S1, S2, S3, and S4 are the distances traveled for the first, second, third, and fourth acceleration segments, respectively; S5 is the distance traveled for the uniform velocity segment; S6 and S7 are the distances traveled for the first and second deceleration segments, respectively. V1, V2, V3, and VM are the maximum speeds of the first, second, and third acceleration segments, respectively; and the maximum motor speed. Similarly, VD1 is the motor speed at the end of the first deceleration segment. S61 and S62 are the distances traveled from VM to V3 and from V3 to V2 (V2 is equal to VD1), respectively. Similarly, S71 and S72 are the distances traveled from VD1 (also known as V2) to V1 and from V1 to motor disable, respectively.
[0124] For example, the calculation formula for the duration T5 of the uniform motion can be expressed as:
[0125] T5=(S-S1-S2-S3-S4-S6-S7) / VM;
[0126] Wherein, S is the first distance.
[0127] At this time, the fifth magnification curve can be obtained (the vertical axis of the magnification curve is the speed of the magnification motor, and the horizontal axis is the time of the magnification motor. Therefore, by determining the speed of the magnification motor at each moment and the duration of various speeds, the corresponding magnification curve can be obtained), and the predicted position of the magnification motor after the preset time length corresponding to any moment can be determined based on the fifth magnification curve.
[0128] In another case, the first distance is shorter. At this time, the controller will configure the time length corresponding to the first acceleration, the time length corresponding to the second acceleration, the time length corresponding to the third acceleration, and the time length corresponding to the second deceleration, and then calculate the fourth acceleration of the zoom motor and the time length corresponding to the first deceleration based on the first distance of the zoom motor to construct the fourth zoom curve.
[0129] Specifically, in this case, the time lengths corresponding to the first acceleration, second acceleration, third acceleration and second deceleration of the variable magnification motor are determined, and the time lengths corresponding to the fourth acceleration and first deceleration can be determined based on the first distance to obtain the corresponding variable magnification curve, that is, the fourth variable magnification curve.
[0130] The controller can determine the fourth acceleration and the first deceleration. Therefore, by combining the distances and speeds corresponding to the first, second, third, and second acceleration segments, the total distance of the fourth acceleration and the first deceleration at the first distance can be calculated. This is similar to determining the area of the triangle formed by the fourth acceleration segment, the first deceleration segment, and the line connecting the lower ends of the two segments (i.e., the total distance of the fourth acceleration and the first deceleration) and the slopes of the two sides (i.e., the fourth acceleration and the first deceleration). This allows the corresponding maximum speed, the duration of the fourth acceleration, and the duration of the first deceleration to be calculated.
[0131] For example, combined Figure 4 (There is no uniform speed section at this time), the calculation formula of the maximum speed V can be expressed as:
[0132] (V-V3)² / 2AM + (V-VD1)² / 2DM = S-S1-S2-S3-S7;
[0133] The fourth acceleration time T4 can be expressed as:
[0134] T4 = (V-V3) / AM;
[0135] The corresponding first deceleration time T6 can be expressed as:
[0136] T6 = (V-VD1) / DM.
[0137] After determining the maximum speed, the duration under the fourth acceleration and the first deceleration can be further determined, thereby completing the construction of the fourth variable magnification curve. The subsequent calculations are the same as the previous case and will not be repeated here.
[0138] In another case, the first distance is shorter. In this case, the controller will configure the time length corresponding to the first acceleration, the time length corresponding to the second acceleration, and the time length corresponding to the second deceleration, and then calculate the third acceleration and the time length corresponding to the first deceleration of the zoom motor based on the first distance of the zoom motor to construct a third zoom curve.
[0139] Specifically, similar to the previous case, it is also necessary to combine the first distance to determine the maximum speed, the duration of the third acceleration in the process of reaching the maximum speed, and the duration of the first deceleration corresponding to the deceleration, so as to complete the construction of the third magnification curve.
[0140] For example, combined Figure 4 (There is no corresponding part of the fourth acceleration line segment S4 and the uniform speed line segment S5 at this time) The calculation formula of the maximum speed V can be expressed as:
[0141] (V-V2)² / 2AM + (V-VD1)² / 2DM = S-S1-S2-S7;
[0142] The corresponding third acceleration duration T3 can be expressed as:
[0143] T3=(V-V2) / A3;
[0144] The corresponding first deceleration duration T6 can be expressed as:
[0145] T6 = (V-VD1) / DM.
[0146] In another case, the first distance is shorter. In this case, the controller will configure the duration corresponding to the first acceleration, and then calculate the duration corresponding to the second acceleration and the second deceleration of the zoom motor according to the first distance of the zoom motor to construct a second zoom curve.
[0147] Specifically, in the case corresponding to the second magnification curve, it is also necessary to calculate the maximum speed, the duration of the second acceleration, and the duration of the second deceleration in combination with the first distance.
[0148] For example, combined Figure 4 (At this time, there is no corresponding part of the third acceleration segment S3, the fourth acceleration segment S4, the uniform speed segment S5 and the first deceleration segment S6). The calculation formula of the maximum speed V can be expressed as:
[0149] (V-V1)² / 2AM + (V)² / 2D1 = S-S1-S72;
[0150] The corresponding second acceleration duration T2 can be expressed as:
[0151] T2=(V-V1) / A2;
[0152] The corresponding second deceleration duration T7 can be expressed as:
[0153] T7 =V / D1.
[0154] In another case, the first distance is the shortest. In this case, the controller calculates the durations corresponding to the first acceleration and the second deceleration of the zoom motor according to the first distance of the zoom motor, and constructs a first zoom curve.
[0155] Specifically, in this case, the corresponding maximum speed and the corresponding duration can be directly calculated by combining the first distance, the first acceleration, and the second deceleration.
[0156] For example, combined Figure 4(At this time, there are no corresponding parts of the second acceleration segment S2, the third acceleration segment S3, the fourth acceleration segment S4, the uniform speed segment S5, and the first deceleration segment S6). The maximum speed V can be calculated as: V² / 2A1 + V² / 2D1 = S;
[0157] The corresponding first acceleration duration T1 can be expressed as:
[0158] T1= V / A1;
[0159] The corresponding second deceleration duration T7 can be expressed as:
[0160] T7 = V / D1.
[0161] From the above description, it can be seen that the controller can determine the duration of the zoom motor under various accelerations. Therefore, in actual applications, the maximum speed can be directly calculated based on the acceleration duration, and the corresponding zoom curve can be established accordingly. Then, according to the zoom curve, the predicted position of the zoom motor corresponding to the preset time length at any moment can be determined.
[0162] In summary, this solution constructs different magnification curves and judgment conditions to ensure accurate calculation of the predicted positions of the magnification motors corresponding to different first distances during the magnification process, thereby ensuring the accuracy of the determination of the focus position corresponding to the zoom motor, and then ensuring that the image sequence output by the lens during the magnification process is focused synchronously, and the clarity of the generated images and videos meets the monitoring requirements.
[0163] Figure 5 This is a schematic diagram of the structure of a focusing device of a zoom lens provided by an embodiment of the present disclosure. Figure 5 As shown, the focusing device 500 of the zoom lens includes:
[0164] A calculation module 510 is configured to calculate a first distance that the zoom motor needs to travel in response to an instruction for instructing the lens to perform zooming;
[0165] A first constructing module 520 is configured to construct at least two judgment conditions associated with the first distance;
[0166] The second construction module 530 is used to construct the same number of zoom curves as the judgment conditions;
[0167] A selection module 540 is configured to select a zoom curve from a number of zoom curves in response to a comparison result between the first distance and at least two judgment conditions;
[0168] Prediction module 550, for obtaining a predicted position of the zoom motor after a preset time period based on the running distance and the selected zoom curve;
[0169] A determination module 560 is configured to determine a focal position corresponding to the predicted position according to a preset zoom correlation curve;
[0170] Among them, the determination module 560 also includes that the preset time length is limited to: after reaching the preset time length, the magnification motor has run to the magnification position corresponding to the instruction and the zoom motor has run to the focus position, so that the image sequence output by the lens during the magnification process is synchronously focused.
[0171] Optionally, the determining module 560 specifically includes: the preset duration is equal to the single-frame duration of the shot.
[0172] Optionally, the determination module 560 is specifically configured to use a video field blanking interrupt signal as a trigger signal, wherein the trigger signal is used to determine a moment of acquiring the predicted position so as to enable focusing to be performed on any frame image in the output image sequence.
[0173] Optionally, the second construction module 530 specifically includes a number of magnification curves including: the first magnification curve including 1 acceleration segment and 1 deceleration segment, the second magnification curve including 2 acceleration segments and 1 deceleration segment, the third magnification curve including 3 acceleration segments and 2 deceleration segments, the fourth magnification curve including 4 acceleration segments and 2 deceleration segments, and the fifth magnification curve including 4 acceleration segments, 1 uniform speed segment and 2 deceleration segments, wherein the duration of any magnification curve is the same and the running distance of the magnification motor is equal to the first distance.
[0174] Optionally, the first construction module 520 specifically includes a number of magnification curves including: the first magnification curve including 1 acceleration segment and 1 deceleration segment, the second magnification curve including 2 acceleration segments and 1 deceleration segment, the third magnification curve including 3 acceleration segments and 2 deceleration segments, the fourth magnification curve including 4 acceleration segments and 2 deceleration segments, and the fifth magnification curve including 4 acceleration segments, 1 uniform speed segment and 2 deceleration segments, wherein the duration of any magnification curve is the same and the running distance of the magnification motor is equal to the first distance.
[0175] Optionally, the first construction module 520 specifically includes that the construction of a number of magnification curves further includes: configuring a first acceleration, a second acceleration, a third acceleration, a fourth acceleration, a first deceleration and a second deceleration; further constructing: the fifth magnification curve and the fourth magnification curve both have a first acceleration, a second acceleration, a third acceleration, a fourth acceleration, a first deceleration and a second deceleration, and the uniform speed segment of the fifth magnification curve is set between the acceleration segment corresponding to the fourth acceleration and the deceleration segment corresponding to the first deceleration; the third magnification curve has a first acceleration, a second acceleration, a third acceleration, a first deceleration and a second deceleration; the second magnification curve has a first acceleration, a second acceleration and a second deceleration; and the first magnification curve has a first acceleration and a second deceleration.
[0176] Optionally, the first building module 520 specifically includes: first acceleration>second acceleration>third acceleration>fourth acceleration.
[0177] Optionally, the first building module 520 specifically includes that the first deceleration is smaller than the second deceleration.
[0178] Optionally, the selection module 540 is specifically used to select the fifth magnification curve in response to the running distance satisfying the first judgment condition; select the fourth magnification curve in response to the running distance satisfying the second judgment condition; select the third magnification curve in response to the running distance satisfying the third judgment condition; select the second magnification curve in response to the running distance satisfying the fourth judgment condition; and select the first magnification curve in response to the running distance satisfying the fifth judgment condition.
[0179] Optionally, the first construction module 520 specifically includes: a number of variable magnification curve constructions further include: configuring the duration corresponding to the first acceleration, the duration corresponding to the second acceleration, the duration corresponding to the third acceleration, the duration corresponding to the fourth acceleration, the duration corresponding to the first deceleration, and the duration corresponding to the second deceleration, and then calculating the duration of uniform motion according to the first distance of the variable magnification motor to construct a fifth variable magnification curve; configuring the duration corresponding to the first acceleration, the duration corresponding to the second acceleration, the duration corresponding to the third acceleration, and the duration corresponding to the second deceleration, and then calculating the duration of the fourth acceleration and the first deceleration of the variable magnification motor according to the first distance of the variable magnification motor. The fourth magnification curve is constructed according to the corresponding time length; the time length corresponding to the first acceleration, the time length corresponding to the second acceleration and the time length corresponding to the second deceleration are configured, and then the third acceleration and the time length corresponding to the first deceleration of the magnification motor are calculated according to the first distance of the magnification motor to construct the third magnification curve; the time length corresponding to the first acceleration and the time length corresponding to the second deceleration are configured, and then the time length corresponding to the second acceleration and the second deceleration of the magnification motor are calculated according to the first distance of the magnification motor to construct the second magnification curve; the time lengths corresponding to the first acceleration and the second deceleration of the magnification motor are calculated according to the first distance of the magnification motor to construct the first magnification curve.
[0180] The functions and principles of each module in this embodiment can be found in the aforementioned method embodiment and will not be repeated here.
[0181] Figure 6 A schematic diagram of the structure of a control device provided in one embodiment of the present disclosure is shown in FIG. Figure 6 As shown, the control device 600 includes: a memory 610 and a processor 620.
[0182] The memory 610 stores a computer program executable by at least one processor 620. The computer program is executed by at least one processor 620 to enable the control device to implement the material removal method provided in any of the above embodiments or the focusing method of the variable magnification lens provided in any of the above embodiments.
[0183] The memory 610 and the processor 620 may be connected via a bus 630 .
[0184] The relevant instructions can be understood by referring to the relevant descriptions and effects corresponding to the method embodiments, which will not be repeated here.
[0185] The relevant instructions can be understood by referring to the relevant descriptions and effects corresponding to the method embodiments, which will not be repeated here.
[0186] An embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the material removal method provided in any of the above method embodiments or the focusing method of the variable magnification lens provided in any of the above embodiments.
[0187] The computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0188] One embodiment of the present disclosure provides a computer program product comprising computer-executable instructions, which, when executed by a processor, are used to implement the material removal method in the above method embodiment or the focusing method of the variable magnification lens provided in any of the above embodiments.
[0189] In the several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0190] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0191] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A focusing method for a zoom lens, characterized in that: The method comprises: In response to an instruction for instructing the lens to perform zooming, calculating a first distance that the zoom motor needs to travel; Establishing at least two judgment conditions associated with the first distance; Constructing the same number of zoom curves as the judgment conditions; In response to a comparison result between the first distance and the at least two judgment conditions, selecting a zoom curve from the number of zoom curves; Obtaining a predicted position of the zoom motor after a preset time period according to the running distance and the selected zoom curve; Determining a focal position corresponding to the predicted position according to a preset zoom correlation curve; Among them, the preset time length is defined as: after reaching the preset time length, the magnification motor has run to the magnification position corresponding to the instruction and the zoom motor has run to the focus position, so that the image sequence output by the lens during the magnification process is synchronously focused.
2. The method according to claim 1, characterized in that The preset duration is equal to the single-frame duration of the shot.
3. The method according to claim 1, characterized in that The method further comprises: A video field blanking interrupt signal is used as a trigger signal, and the trigger signal is used to determine the moment of acquiring the predicted position so that any frame image in the output image sequence is focused.
4. The method according to claim 3, characterized in that The number of magnification curves include: The first zoom curve includes one acceleration segment and one deceleration segment. The second zoom curve includes 2 acceleration segments and 1 deceleration segment. The third zoom curve includes 3 acceleration segments and 2 deceleration segments. The fourth zoom curve includes 4 acceleration segments and 2 deceleration segments. The fifth zoom curve includes 4 acceleration segments, 1 uniform speed segment and 2 deceleration segments. The duration of any of the variable magnification curves is the same and the running distance of the variable magnification motor is equal to the first distance.
5. The method according to claim 4, characterized in that The judgment condition is constructed as follows: a first judgment condition, wherein the first judgment condition includes that the first distance is greater than the sum of the running distances corresponding to the fourth magnification curve; a second judgment condition, wherein the second judgment condition includes that the first distance is greater than the sum of the running distances corresponding to the third magnification curve; a third judgment condition, the third judgment condition including that the first distance is greater than the sum of the running distances of the second zoom curve; A fourth judgment condition, wherein the fourth judgment condition includes that the first distance is greater than the sum of the running distances of the first zoom curve; A fifth judgment condition, the fifth judgment condition includes that the first distance is less than the total running distance of the first magnification curve.
6. The method according to claim 5, characterized in that The construction of the plurality of magnification curves further includes: Configure the first acceleration, the second acceleration, the third acceleration, the fourth acceleration, the first deceleration, and the second deceleration; Further construction: The fifth and fourth magnification curves each have a first acceleration, a second acceleration, a third acceleration, a fourth acceleration, a first deceleration, and a second deceleration, and a uniform speed segment of the fifth magnification curve is arranged between an acceleration segment corresponding to the fourth acceleration and a deceleration segment corresponding to the first deceleration; The third variable magnification curve comprises a first acceleration, a second acceleration, a third acceleration, a first deceleration, and a second deceleration; The second variable magnification curve has a first acceleration, a second acceleration and a second deceleration; The first magnification curve has a first acceleration and a second deceleration.
7. The method according to claim 6, characterized in that The first acceleration>the second acceleration>the third acceleration>the fourth acceleration.
8. The method according to claim 7, characterized in that The first deceleration is smaller than the second deceleration.
9. The method according to claim 8, characterized in that The selecting of a zoom curve comprises: In response to the running distance satisfying the first judgment condition, selecting the fifth magnification curve; In response to the running distance satisfying the second judgment condition, selecting the fourth magnification curve; In response to the running distance satisfying a third judgment condition, selecting the third magnification curve; In response to the running distance satisfying a fourth judgment condition, selecting the second zoom curve; In response to the running distance satisfying the fifth judgment condition, the first zoom curve is selected.
10. The method according to claim 9, characterized in that The number of variable magnification curve structures further includes: configuring a duration corresponding to the first acceleration, a duration corresponding to the second acceleration, a duration corresponding to the third acceleration, a duration corresponding to the fourth acceleration, a duration corresponding to the first deceleration, and a duration corresponding to the second deceleration, and then calculating the duration of the uniform motion according to the first distance of the variable magnification motor to construct a fifth variable magnification curve; Configure the duration corresponding to the first acceleration, the second acceleration, the third acceleration, and the second deceleration, and then calculate the fourth acceleration of the variable power motor and the duration corresponding to the first deceleration according to the first distance of the variable power motor to construct a fourth variable power curve; configuring a duration corresponding to the first acceleration, a duration corresponding to the second acceleration, and a duration corresponding to the second deceleration, and then calculating the third acceleration of the variable power motor and the duration corresponding to the first deceleration according to the first distance of the variable power motor to construct a third variable power curve; Configuring a duration corresponding to the first acceleration and a duration corresponding to the second deceleration, and then calculating the durations corresponding to the second acceleration and the second deceleration of the variable power motor according to the first distance of the variable power motor to construct a second variable power curve; The durations corresponding to the first acceleration and the second deceleration of the variable power motor are calculated according to the first distance of the variable power motor, and a first variable power curve is constructed.
Citation Information
Patent Citations
Zooming tracking method and apparatus
CN104836954A
Apparatus and method for finding optimal zooming speed
CN105472235A
Zoom tracking curve correction method and device
CN105554387A
Image pickup device, image pickup method, and lens control device
JP1998239580A
Variable power imaging apparatus
JP2006322984A