Movement lens motor out-of-step processing method and device, electronic equipment and storage medium
By detecting and comparing the actual position and reference position of the zoom motor in the movement lens, determining the stepping state and compensating, the lens out-of-focus and picture blur caused by the stepping motor are solved, and clarity and smoothness are achieved Keep sexually.
Patent Information
- Application Number
- CN202310967343.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2025-02-14
AI Technical Summary
The stepper motor in the movement lens is prone to lose steps during the start acceleration and stop deceleration, resulting in the lens loss and blurred picture, and it is difficult for the prior art to quickly detect and compensate.
By controlling the movement lens to zoom in at the current object distance according to the reference magnification motor position, the actual magnification motor position when the magnification is completed, the actual position and the reference position are compared to the magnification position to determine the loss state, and the loss compensation is performed.
Timely step-out detection and compensation of the movement lens motor is realized, the clarity and fluency of the lens image are maintained, and the lens loss and picture blur caused by motor loss is solved.
Smart Images

Figure CN119450209A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for processing a motor out of step of a movement lens, an electronic device and a storage medium. Background Art
[0002] In the field of video surveillance, integrated movement lenses are widely used in cameras with wider monitoring ranges and more complex scenes, such as dome cameras and pan / tilt cameras.
[0003] The movement lens can realize that the zoom motor and the focus motor move according to a certain corresponding relationship during the entire zoom process, so that the picture remains clear. However, the motor commonly used in the movement lens is a stepper motor, which converts the electrical pulse signal into an open-loop control element of angular displacement or linear displacement. During the startup and acceleration process of the motor, due to the inertia of the motor and its load, it is possible to lose steps when the acceleration time is too short; the torque of the motor will decrease as the speed increases. During the stop and deceleration process, the motor may have insufficient torque, resulting in loss of steps, resulting in lens defocus, blurred pictures and other problems. Therefore, how to deal with the motor out of step in a timely manner becomes particularly important. Summary of the invention
[0004] The present invention provides a method and device for processing a motor out of step of a movement lens, an electronic device and a storage medium, so as to solve the problem that it is impossible to quickly detect whether a movement lens has lost step and perform compensation.
[0005] According to one aspect of the present invention, a method for processing a motor out of step of a movement lens is provided, the method comprising:
[0006] Control the movement lens to change the magnification according to the reference zoom motor position at the current object distance;
[0007] Detecting the actual zoom motor position when the movement lens zooms to trigger automatic focusing and the lens image meets the target focus clarity, wherein the actual zoom motor position is determined based on the field of view angle of the lens image when the movement lens meets the target focus clarity;
[0008] Determining the out-of-step state information of the zoom motor of the movement lens according to the actual zoom motor position and the reference zoom motor position;
[0009] According to the out-of-step state information of the zoom motor of the movement lens, the zoom motor of the movement lens is controlled to perform out-of-step compensation.
[0010] According to another aspect of the present invention, a device for processing out-of-step of a movement lens motor is provided, the device comprising:
[0011] A control module is used to control the movement lens to change the magnification according to the reference zoom motor position at the current object distance;
[0012] A detection module, used to detect the actual zoom motor position when the movement lens zooms to trigger automatic focusing and the lens image meets the target focus clarity, wherein the actual zoom motor position is determined based on the field of view angle of the lens image when the movement lens meets the target focus clarity;
[0013] A determination module, used to determine the out-of-step state information of the zoom motor of the movement lens according to the actual zoom motor position and the reference zoom motor position;
[0014] The compensation module is used to control the zoom motor of the movement lens to perform step-out compensation according to the step-out state information of the zoom motor of the movement lens.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for processing the movement lens motor out of step as described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for processing a motor out-of-step of a movement lens as described in any embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention is that during the operation of the movement lens, by controlling the movement lens to change magnification according to the reference magnification motor position at the current object distance, the actual magnification motor position of the movement lens when the magnification change is completed and triggering automatic focusing and making the lens image meet the target focus clarity can be detected based on the field angle of view of the movement lens corresponding to the lens image, and then by comparing the actual magnification motor position with the reference magnification motor position, it is possible to detect whether the magnification motor of the movement lens is out of step and the number of steps lost by the magnification motor, so that the magnification motor of the movement lens can be compensated for out of step in time. Through the above process, whether the movement lens is out of step can be accurately detected and effective compensation can be performed while maintaining the clarity and smoothness of the lens image and not affecting the user experience, thereby solving the problem of lens defocus and image blur due to motor out of step.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flow chart of a method for processing a motor out of step of a movement lens provided in accordance with an embodiment of the present invention;
[0024] Figure 2 is a schematic diagram of the mapping relationship between the position of the zoom motor of the movement lens applicable to the embodiment of the present invention and the field of view angle;
[0025] Figure 3 is a flow chart of another method for processing a motor out of step of a movement lens provided according to an embodiment of the present invention;
[0026] Figure 4 is a flow chart of another method for processing a motor out of step of a movement lens provided in accordance with an embodiment of the present invention;
[0027] Figure 5a is a schematic diagram of matching between an actual image and a reference image at the same zoom motor position applicable to an embodiment of the present invention;
[0028] Figure 5b is a schematic diagram of a scaling ratio between an actual image and a reference image at the same zoom motor position applicable to an embodiment of the present invention;
[0029] Figure 6 It is a calibration schematic diagram of the mapping relationship between the zoom motor position and the field of view angle of the movement lens applicable to the embodiment of the present invention.
[0030] Figure 7 2 is a schematic structural diagram of a device for processing a motor out-of-step of a movement lens according to an embodiment of the present invention;
[0031] Figure 8 The present invention is a schematic diagram of the structure of an electronic device for implementing the method for processing a motor out of step of a movement lens according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] Figure 1 A flowchart of a method for processing a motor out of step of a movement lens is provided for an embodiment of the present invention. This embodiment can be applied to the situation where a movement lens is detected to be out of step and compensated for in time during operation. The method can be executed by a movement lens motor out of step processing device. The movement lens motor out of step processing device can be implemented in the form of hardware and / or software. The movement lens motor out of step processing device can be configured in any electronic device with a network communication function, and the electronic device can be a camera with a movement lens, etc.
[0035] like Figure 1 As shown, the method for processing the out-of-step of the movement lens motor of this embodiment may include the following process:
[0036] S110, controlling the movement lens to change the magnification according to the reference zoom motor position at the current object distance.
[0037] The movement lens can be called an integrated movement, which is mainly highly integrated by the lens group, imaging sensor, and circuit board. The lens group includes a zoom lens and a focus lens. The zoom lens and the focus lens are driven by a zoom motor and a focus motor respectively. The zoom motor moves to change the focal length, and the focus motor moves to change the front and back position of the focus. The current object distance is the object distance of the movement lens when the motor out of step detection is performed on the movement lens.
[0038] During the start-up and acceleration process of the movement lens motor, due to the inertia of the motor and its load, it may lose steps when the acceleration time is too short. The torque of the motor will decrease as the speed increases. During the stop and deceleration process of the motor, there may be insufficient torque, resulting in loss of steps. During the long-term operation of the movement lens motor, the loss of steps may accumulate. If the loss of steps is not detected and compensated in time, the movement lens may be out of focus and the picture may be blurred.
[0039] To this end, during the operation of the movement lens motor, if the mechanism for detecting motor desynchronization of the movement lens is triggered, a reference zoom motor position that is closest to the current zoom motor position can be selected from the zoom motor positions allowed by the movement lens's zoom motor. Since the reference zoom motor position is very close to the current zoom motor position, the zoom motor of the movement lens can still ensure the clarity of the lens image as much as possible during the process of motor desynchronization detection when zooming according to the reference zoom motor position, and the movement lens will not be unable to perform image acquisition normally due to the triggering of the motor desynchronization detection mechanism. Among them, the reference zoom motor position is selected from the pre-configured candidate zoom motor positions that assist in zoom motor desynchronization detection.
[0040] S120, detecting the actual zoom motor position when the movement lens zooms to trigger automatic focusing and makes the lens image meet the target focus clarity, the actual zoom motor position is determined based on the field of view angle of the lens image when the movement lens meets the target focus clarity.
[0041] See also Figure 2 The field of view angle of the movement lens is very important in the zoom focusing business. The field of view angle of the movement lens is related to the focal length, including the relationship between the focal length, horizontal field of view angle and vertical field of view angle under each zoom motor position of the movement lens. Figure 2 The field of view angle information of the movement lens is shown in the figure. The horizontal axis is the position of the zoom motor of the movement lens, and the vertical axis is the field of view angle of the movement lens. The unit is "degree". The data of the field of view angle information of the movement lens is a nonlinear relationship. The key corresponding zoom motor position can be selected to interpolate the field of view angle data of other zoom motor positions.
[0042] When the zoom motor of the movement lens changes the magnification and triggers the automatic focus so that the lens image meets the target focus clarity, there will be a mapping correspondence between the zoom motor position used by the zoom motor of the movement lens and the field of view angle of the lens image of the movement lens. To this end, when the zoom motor of the movement lens finishes the zoom and causes the movement lens to automatically focus to meet the target focus clarity, the field of view angle of the lens image can be determined. At this time, according to the mapping correspondence between the zoom motor position of the zoom motor and the field of view angle of the lens image of the movement lens, the actual zoom motor position when the movement lens zoom triggers the automatic focus is completed is inferred.
[0043] S130, determining the out-of-step state information of the zoom motor of the movement lens according to the actual zoom motor position and the reference zoom motor position.
[0044] The step-out status information of the zoom motor of the movement lens is used to indicate whether the zoom motor of the movement lens has a motor step-out phenomenon, and when the motor step-out is detected, the step-out status information is used to indicate the motor step-out direction and the number of motor step-out steps of the zoom motor.
[0045] If the actual zoom motor position is the same as the reference zoom motor position, or the position difference between the actual zoom motor position and the reference zoom motor position is within a preset difference range, it is determined that the zoom motor of the movement lens has not experienced motor step-out.
[0046] If the actual zoom motor position is different from the reference zoom motor position, or the position difference between the actual zoom motor position and the reference zoom motor position is not within the preset difference range, it is determined that the zoom motor of the movement lens has motor desynchronization. The desynchronization direction of the zoom motor is determined according to the relative position between the actual zoom motor position and the reference zoom motor position, and the number of desynchronization steps of the zoom motor is determined according to the position difference between the actual zoom motor position and the reference zoom motor position.
[0047] S140, controlling the zoom motor of the movement lens to perform step-out compensation according to the step-out state information of the zoom motor of the movement lens.
[0048] As an optional but non-limiting implementation, according to the out-of-step state information of the zoom motor of the movement lens, controlling the zoom motor of the movement lens to perform out-of-step compensation may include the following steps:
[0049] If the out-of-step status information of the zoom motor of the movement lens indicates that the number of out-of-step steps of the zoom motor is less than or equal to the preset step threshold, the zoom motor is compensated for out-of-step according to the out-of-step direction and the number of out-of-step steps indicated by the out-of-step status information of the zoom motor.
[0050] After detecting the loss of step of the zoom motor of the movement lens and determining the number of lost steps, it is necessary to reasonably compensate for the specific loss of step of the zoom motor. The number of lost steps in the early stage of the operation of the shooting equipment to which the movement lens belongs is generally small. If the number of lost steps Step of the zoom motor is less than or equal to the preset step threshold StepTh, the zoom motor is compensated for the number of steps according to the loss direction and the number of lost steps of the zoom motor. The motor loses step because the motor does not take the corresponding number of steps according to the instructions, or does not go to the corresponding position. Therefore, the zoom motor can be controlled to take a few more steps for correction when changing the zoom, or the coordinate system of the zoom motor can be corrected and updated.
[0051] As another optional but non-limiting implementation, according to the out-of-step state information of the zoom motor of the movement lens, controlling the zoom motor of the movement lens to perform out-of-step compensation may include steps A1-C3:
[0052] Step A1: If the out-of-step status information of the zoom motor of the movement lens indicates that the number of out-of-step steps of the zoom motor is greater than a preset step threshold, then detect whether the movement lens is in a preset low-illuminance high-gain scene.
[0053] Step A2: When the movement lens is in a preset low illumination and high gain scene, the zoom motor of the movement lens is controlled to perform an initialization operation, so that the zoom motor of the movement lens searches for the optical coupling point and re-establishes the coordinate system of the zoom motor.
[0054] Step A3: when the movement lens is not in the preset low illumination high gain scene, the zoom motor is compensated for the step-out according to the step-out direction and the step-out number indicated by the step-out state information of the zoom motor.
[0055] After the shooting equipment to which the movement lens belongs has been running for a period of time, the number of de-stepping steps may be relatively large. If one-time compensation is performed, the zoom adjustment may be large, and image acquisition cannot be performed better during this period. If simple step micro-adjustment is used, multiple micro-adjustments may be required to achieve complete compensation.
[0056] Based on the above considerations, if the number of out-of-step steps Step of the zoom motor of the movement lens is greater than the preset step threshold StepTh, then the acquisition scene where the movement lens is located is detected first. If the movement lens is in the preset low-illuminance high-gain scene, such as the low-illuminance high-gain scene at night, the brightness and clarity of the lens image of the movement lens are low, and the image quality is poor. At this time, it can be considered that the lens image utilization rate of the movement lens is not high, and the movement lens initialization command can be issued to enable the lens to re-establish the coordinate system by searching for the optical coupling point. If the movement lens is not in the preset low-illuminance high-gain scene, at this time, the zoom motor step compensation is still selected according to the out-of-step direction and out-of-step step number of the zoom motor.
[0057] The technical solution of the embodiment of the present invention is that during the operation of the movement lens, by controlling the movement lens to change magnification according to the reference magnification motor position at the current object distance, the actual magnification motor position of the movement lens when the magnification change is completed and triggering automatic focusing and making the lens image meet the target focus clarity can be detected based on the field angle of view of the movement lens corresponding to the lens image, and then by comparing the actual magnification motor position with the reference magnification motor position, it is possible to detect whether the magnification motor of the movement lens is out of step and the number of steps lost by the magnification motor, so that the magnification motor of the movement lens can be compensated for out of step in time. Through the above process, whether the movement lens is out of step can be accurately detected and effective compensation can be performed while maintaining the clarity and smoothness of the lens image and not affecting the user experience, thereby solving the problem of lens defocus and image blur due to motor out of step.
[0058] Figure 3 A flowchart of another method for handling out-of-step of a movement lens motor is provided for an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of controlling the movement lens to change magnification according to the reference magnification motor position at the current object distance in the aforementioned embodiment on the basis of the aforementioned embodiment. This embodiment can be combined with various optional solutions in one or more of the aforementioned embodiments.
[0059] like Figure 3 As shown, the method for processing the out-of-step of the movement lens motor of this embodiment may include the following process:
[0060] S310, after the movement lens is zoomed out and triggers automatic focusing, the current focus clarity of the movement lens when automatically focusing at the current zoom motor position corresponding to the zooming out is detected.
[0061] See also Figure 2 Through the field of view angle information data of the movement lens, it can be found that the zoom motor of the movement lens has less effect on the field of view angle when it is in a telephoto position, and has a greater effect on the field of view angle when it is in a wide-angle position. Therefore, it can be decided whether to trigger the zoom motor out-of-step detection mechanism after the zoom motor completes the zooming action.
[0062] S320: If it is detected that the current focus clarity is less than the preset focus clarity associated with the current zoom motor position, the movement lens is controlled to zoom according to the reference zoom motor position at the current object distance.
[0063] At the same time, each time the movement lens zooms out and triggers the auto focus, it does not mean that the zoom motor will be directly started to detect the loss of step. It is also necessary to first count the focus clarity of the movement lens at the current zoom motor position corresponding to the zoom completion to obtain the corresponding current focus clarity. Among them, the evaluation value of the focus clarity can be an evaluation parameter that reflects the focus clarity of the lens picture image of the movement lens. The clearer the lens picture image, the greater the evaluation value of the focus clarity.
[0064] The preset focus clarity associated with the current zoom motor position is a focus clarity measured after zooming and auto-focusing at the current zoom motor position, which is pre-calibrated when the movement lens motor is not out of step. Under normal circumstances, if the movement lens motor is not out of step, the focus clarity obtained by auto-focusing after zooming at the current zoom motor position should not be lower than the associated preset focus clarity. Therefore, if the current focus clarity is less than the preset focus clarity threshold FV associated with the current zoom motor position, th (The evaluation value of focus clarity is expressed in percentage), it can be considered that the zoom motor of the movement lens is likely to be out of step, thereby triggering the zoom motor out of step detection mechanism.
[0065] By adopting the above method, the motor out-of-step detection mechanism can be activated only when there is a real need for motor out-of-step detection, so that the zoom motor of the movement lens can perform zoom operations towards the reference zoom motor position, avoiding frequent activation of motor out-of-step detection to affect the normal use of the movement lens.
[0066] As an optional but non-limiting implementation method, the preset focus clarity associated with the current zoom motor position is screened from a preset focus clarity set. The preset focus clarity set is constructed by controlling the movement lens to keep the zoom motor of the movement lens from losing step at the current object distance and performing zooming and auto-focusing according to different usage time, different shooting scenes and different zoom motor positions. The focus clarity is then statistically constructed.
[0067] When the shooting device where the movement lens is located is powered on and started, the zoom motor and focus motor of the movement lens will be initialized. The coordinate system of the zoom motor and focus motor will be established by finding the optical coupling points on the zoom motor and focus motor. If there is no hardware failure in the zoom motor and focus motor, the loss of step of the zoom motor and focus motor at the beginning of initialization can be ignored.
[0068] Under the premise of keeping the zoom motor of the movement lens from losing step, the zoom motor of the movement lens is controlled to perform the zoom operation to the maximum magnification. In the process of zooming from wide-angle to telephoto, the zoom motor position corresponding to the key point can be selected from the focus curve to perform zooming and automatic focusing. The evaluation value data of the focus clarity when the focus clarity meets the target focus clarity can be counted and saved.
[0069] By continuously updating the evaluation values of the focus clarity of automatic focusing at different zoom motor positions after the zoom motor stops zooming, a focus clarity evaluation value mapping table is constructed to show that the focus clarity of the movement lens meets the target focus clarity at different usage times, different scenes and different zoom motor positions at the current object distance. Among them, the reference zoom motor position required for the subsequent zoom motor out-of-step detection can be selected from the zoom motor position corresponding to the key point of the focus curve.
[0070] Optionally, the preset focus clarity set stores preset focus clarity associated with different zoom motor positions of the core lens at the current object distance. Further, the preset focus clarity set stores preset focus clarity associated with different usage times, different shooting scenes and different zoom motor positions of the core lens at the current object distance.
[0071] By adopting the above optional method, the appropriate focus clarity can be selected according to the object distance of the movement lens, the usage time, the shooting scene and the position of the zoom motor, so as to avoid the influence of environmental factors on the focus clarity, which may lead to the misjudgment of the motor out of step detection.
[0072] As an optional but non-limiting implementation, controlling the movement lens to change the magnification according to the reference zoom motor position at the current object distance may include steps B1-B2:
[0073] Step B1, determining a reference zoom motor position from candidate zoom motor positions associated with the focus curve of the movement lens, the movement distance of the zoom motor of the movement lens to the reference zoom motor position is less than the movement distance to the candidate zoom motor positions excluding the reference zoom motor position.
[0074] Step B2, controlling the movement lens to move toward the reference zoom motor position at the current object distance.
[0075] When the out-of-step detection mechanism of the movement lens's zoom motor is triggered, the movement lens may be in use. If the movement lens's zoom motor is significantly zoomed, it may affect the movement lens's current image acquisition, and may very likely affect the clarity and smoothness of the lens's image, making it easy for the lens to become out of focus or the image to become blurred, causing the movement lens to be unable to be used normally.
[0076] To this end, the zoom motor position corresponding to the key point of the focus curve can be used as a candidate zoom motor position associated with the focus curve. In this way, there is no need to load more zoom motor positions. At the same time, the zoom motor of the movement lens does not need to perform long-distance zoom movement when performing out-of-step detection. It is only necessary to select a reference zoom motor position that is closer to the current zoom motor position from the candidate zoom motor positions for zooming. For example, the nearest candidate zoom motor position can be searched forward and reversely as the reference zoom motor position. After the zoom is performed according to the reference zoom motor position, the clarity of the lens image can be guaranteed as much as possible during the process of motor out-of-step detection, and the movement lens will not be unable to perform image acquisition normally due to triggering the motor out-of-step detection mechanism.
[0077] Optionally, a reference zoom motor position is determined from candidate zoom motor positions associated with the focus curve of the movement lens, and the distance between the reference zoom motor position and the current zoom motor position is smaller than the distance between the current zoom motor position and candidate zoom motor positions other than the reference zoom motor position.
[0078] S330, detecting the actual zoom motor position when the movement lens zooms to trigger automatic focusing and makes the lens image meet the target focus clarity, the actual zoom motor position is determined based on the field of view angle of the lens image when the movement lens meets the target focus clarity.
[0079] S340: Determine the out-of-step state information of the zoom motor of the movement lens according to the actual zoom motor position and the reference zoom motor position.
[0080] S350: Control the zoom motor of the movement lens to perform step-out compensation according to the step-out state information of the zoom motor of the movement lens.
[0081] The technical solution of the embodiment of the present invention can trigger motor de-stepping detection under appropriate conditions during the operation of the movement lens, and by controlling the movement lens to change magnification according to the reference magnification motor position at the current object distance, it can detect the actual magnification motor position of the movement lens when the magnification change is completed and the automatic focus is triggered and the lens image meets the target focus clarity based on the field of view angle of the movement lens corresponding to the lens image, and then by comparing the actual magnification motor position with the reference magnification motor position, it can detect whether the magnification motor of the movement lens is out of step and the number of steps of the magnification motor that have been lost, and the magnification motor of the movement lens can be compensated for the de-stepping in time. Through the above process, whether the movement lens is out of step can be accurately detected and effective compensation can be performed while maintaining the clarity and smoothness of the lens image and not affecting the user experience, thereby solving the problem of lens defocus and image blur caused by motor de-stepping.
[0082] Based on the above embodiment, optionally, the method for processing the motor out of step of the movement lens of this embodiment may further include the following steps C1-C3:
[0083] Step C1, when the movement lens zooms in and triggers the automatic focus, and the zoom motor of the movement lens is in a preset zoom motor position, detect the actual focus motor position when the movement lens zooms in and triggers the automatic focus and makes the lens image meet the target focus clarity.
[0084] The larger the zoom focal length of the movement lens, the smaller the depth of field. When the zoom motor of the movement lens is in the medium-telephoto position, the depth of field becomes smaller, and the focus motor of the movement lens is out of step and it is easy to produce out-of-focus. At this time, it can be seen that the focus motor has a greater impact on the field of view angle, so it is necessary to first detect the focus motor of the movement lens out of step to ensure that the focus motor does not have a step out of step when the zoom motor is detected, or the step out has been compensated, so it is necessary to detect the focus motor out of step at this stage. The triggering conditions for the motor out of step detection of the focus motor are: after the zoom magnification action of the movement lens is completed, the zoom motor is in the medium-telephoto position, and the focus motor out of step detection is triggered after the automatic focus is completed. The preset zoom motor position can be a zoom motor position that puts the zoom motor in the medium-telephoto position.
[0085] Optionally, the absolute value of the difference between the measured value measured by the motor in the forward direction and the measured value measured in the reverse direction can be called the return difference, which is a lens property and can be considered fixed. Therefore, when the movement lens zooms according to the reference zoom motor position at the current object distance, the return difference of the zoom motor needs to be considered to control the zoom motor to perform accurate zooming.
[0086] Optionally, when the shooting device to which the movement lens belongs is powered on and started, the return difference of the zoom motor and the focus motor of the movement lens is measured. During the detection of loss of step between the zoom motor and the focus motor, the return difference data measured when the shooting device to which the movement lens belongs is started needs to be subtracted.
[0087] Step C2: determining the out-of-step state information of the focus motor of the movement lens according to the focus motor position associated with the actual focus motor position and the preset zoom motor position.
[0088] Step C3: According to the out-of-step state information of the focus motor of the movement lens, the focus motor of the movement lens motor is controlled to perform out-of-step compensation.
[0089] After the movement lens zoom operation is completed, the zoom motor position is at the medium-to-long focal position and automatic focusing is completed, the zoom is performed according to the focus curve and then automatically focuses. If there is no defocus, it proves that the lens image that meets the target focus clarity can be focused within the focus search range of the focus motor position associated with the preset zoom motor position of the focus curve, and the focusing effect is not affected. At this time, it is considered that the focus motor of the movement lens has not lost step, or the number of lost steps is small.
[0090] If the focus is not clear, that is, the lens image that meets the target focus clarity cannot be focused within the focus search range of the focus motor position associated with the preset zoom motor position of the focus curve, it is necessary to enlarge the focus search range by a certain proportion and re-trigger the focus until the focus is clear, so as to determine the actual focus motor position that can focus on the lens image that meets the target focus clarity.
[0091] Subtract the actual focus motor position from the focus motor position associated with the preset zoom motor position at the current object distance to obtain the focus motor position difference Fpos offset , and count the focus motor position difference detection data for a certain number of times. If several times are close to a certain value, it can be considered that the focus motor of the current movement lens has lost step, and the average value is used as the number of focus motor lost step steps.
[0092] As an optional but non-limiting implementation, according to the out-of-step state information of the focus motor of the movement lens, controlling the focus motor of the movement lens motor to perform out-of-step compensation may include the following steps:
[0093] If the out-of-step state information of the focus motor of the movement lens indicates that the out-of-step number of the focus motor is less than or equal to the preset step number threshold, the focus motor is compensated for out-of-step according to the out-of-step direction and the out-of-step number indicated by the out-of-step state information of the focus motor.
[0094] As another optional but non-limiting implementation, according to the out-of-step state information of the focus motor of the movement lens, the focus motor of the movement lens motor is controlled to perform out-of-step compensation, including steps D1-D3:
[0095] Step D1: If the out-of-step state information of the focus motor of the movement lens indicates that the number of out-of-step steps of the focus motor is greater than a preset step threshold, it is detected whether the movement lens is in a preset low-illuminance high-gain scene.
[0096] Step D2: When the movement lens is in a preset low illumination and high gain scene, the focus motor of the movement lens is controlled to perform an initialization operation, so that the focus motor of the movement lens searches for the optical coupling point and re-establishes the coordinate system of the focus motor.
[0097] Step D3: when the movement lens is not in the preset low illumination high gain scene, the focus motor is compensated for the step-out according to the step-out direction and the step-out number indicated by the step-out state information of the focus motor.
[0098] Figure 4 A flowchart of another method for handling out-of-step movement of a lens motor is provided for an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of detecting the actual position of the movement lens motor when the movement lens zoom is completed, triggering automatic focusing and making the lens image meet the target focus clarity in the aforementioned embodiment on the basis of the above embodiment. This embodiment can be combined with various optional schemes in one or more of the above embodiments.
[0099] like Figure 4 As shown, the method for processing the out-of-step of the movement lens motor of this embodiment may include the following process:
[0100] S410, controlling the movement lens to change the magnification according to the reference zoom motor position at the current object distance.
[0101] Among them, the movement distance of the zoom motor of the movement lens to the reference zoom motor position is less than the movement distance to the candidate zoom motor position excluding the reference zoom motor position, and the candidate zoom motor position is the zoom motor position corresponding to the key point selected from the focus curve.
[0102] S420, determining the actual image corresponding to when the movement lens zooming completes triggering the automatic focusing and makes the lens image meet the target focus clarity.
[0103] When the zoom motor desynchronization detection mechanism is triggered, the zoom motor of the movement lens is moved to the reference zoom motor position closest to the zoom motor position corresponding to the selected focus curve key point, and auto focus is triggered (the focus curve after the focus motor desynchronization compensation can be used). When the lens image of the movement lens meets the target focus clarity, the image Img is saved. curr As the actual image corresponding to the target focus clarity.
[0104] S430, determining a reference image associated with a reference zoom motor position, where the reference image is an image that meets a target focus clarity when zooming according to the reference zoom motor position and triggering autofocus while keeping the zoom motor of the movement lens from losing step.
[0105] While keeping the zoom motor of the movement lens from losing step, the zoom motor is zoomed according to different zoom motor positions and triggers autofocus, and the reference images corresponding to different zoom motor positions that meet the target focus clarity are obtained, and a reference image set is formed. The corresponding reference zoom motor position and the reference image Img corresponding to the reference zoom motor position are queried from the reference image set. ref .
[0106] S440, by matching feature points of the actual image with the reference image, determine the actual zoom motor position when the movement lens zoom completes triggering automatic focusing and makes the lens image meet the target focus clarity.
[0107] Among them, the actual zoom motor position is determined based on the field of view angle of the lens image when the movement lens meets the target focus clarity.
[0108] By matching the feature points of the actual image with the reference image, the difference between the feature points in the actual image and the feature points in the reference image can be determined, and the corresponding field of view angle can be determined by the reference zoom motor position corresponding to the reference image. Combined with the field of view angle of the reference image, the difference between the feature points in the actual image and the feature points in the reference image can be used to estimate the field of view angle of the actual image and the corresponding actual zoom motor position.
[0109] As an optional but non-limiting implementation, by matching feature points between the actual image and the reference image, determining the actual zoom motor position when the movement lens zoom completes triggering automatic focusing and makes the lens image meet the target focus clarity, may include steps E1-E3:
[0110] Step E1: determining the image scaling ratio of the actual image relative to the reference image by matching feature points between the actual image and the reference image.
[0111] Step E2, determining the field of view of the actual image based on the image zoom ratio and the field of view of the reference image. The field of view of the reference image is obtained by calibrating the field of view of the lens image after controlling the zoom motor of the movement lens to move to the reference zoom motor position.
[0112] Step E3, according to the field of view angle of the actual image, determine the actual zoom motor position when the movement lens zoom is completed to trigger the automatic focus and make the lens image meet the target focus clarity.
[0113] Compared with the focusing motor, the desynchronization of the zoom motor is more likely to cause out-of-focus problems, so the accuracy of the zoom motor desynchronization detection result is crucial. In this solution, feature point extraction and feature point matching of the actual image and the reference image can accurately extract the key pixels of the image, and then the image scaling ratio of the actual image relative to the reference image can be calculated by calculating the distance of the key pixels, and then the field of view angle information of the actual image can be finally calculated by combining the field of view angle of the reference image.
[0114] There is a one-to-one mapping relationship between the field of view angle information of the movement lens and the position of the zoom motor of the movement lens. Therefore, the field of view angle information of the movement lens corresponding to the actual image can be used to accurately characterize the actual zoom motor position of the movement lens, so as to accurately determine the number of out-of-step steps of the zoom motor through the actual zoom motor position and the reference zoom motor position. The field of view angle data is simple and convenient to obtain, and the method can realize out-of-step detection during the normal zoom and focusing process of the movement lens, thereby maintaining the clarity and smoothness of the actual situation without affecting the user experience.
[0115] As an optional but non-limiting implementation, the image scaling ratio of the actual image relative to the reference image is determined by matching feature points between the actual image and the reference image, including steps G1-G3:
[0116] Step G1: extract feature points from the actual image and the reference image respectively, and match feature points from the actual image and the reference image.
[0117] Step G2: extract key feature points from the matched feature points, and determine a first feature point distance between the key feature points in the actual image and a second feature point distance between the key feature points in the reference image.
[0118] Step G3: Determine the image scaling ratio of the actual image relative to the reference image based on the first feature point distance and the second feature point distance.
[0119] See also Figure 5a , the feature extraction method of scale-invariant feature transformation is used to extract the actual image Img curr With reference Img ref Extract feature points and perform curr With reference Img ref Perform feature point matching and map the feature points to pixels. Use edge extraction algorithms to select key feature points from the matched feature points, and try to select feature points with obvious edge features, such as high-rise buildings, windows, and other key feature points. Among them, scale-invariant feature transformation can extract local features of the image, remain unchanged for rotation, scale scaling, brightness changes, and maintain a certain degree of stability for changes in field of view angle, radiation transformation, and noise.
[0120] See also Figure 5b , in the reference image Img ref On the top, select two feature points with a large distance difference (for example Figure 5b Pixels A and B in the image, and calculate the pixel distance between the two pixels. And in the actual image Img curr Find the image Img from the reference image ref The two feature points selected from the feature points that match each other (for example Figure 5b, and calculate the pixel distance That is, the actual image Img can be calculated curr and the reference image Img ref Image scaling ratio between scale , the calculation method is as follows:
[0121] See also Figure 5b , reference image Img ref The field of view is Actual image Img curr The field of view is The image scaling ratio is Ratio scale . Then, we can use the formula Calculate the actual image Img curr Field of view information
[0122] As an optional but non-limiting implementation method, according to the field of view of the actual image, determining the actual zoom motor position when the movement lens zoom completes triggering the automatic focus and makes the lens image meet the target focus clarity may include steps H1-H2:
[0123] Step H1, based on the field of view angle information table of the movement lens, query the zoom motor position corresponding to the field of view angle of the actual image. The field of view angle information table is obtained by controlling the zoom motor of the movement lens to perform zoom movement at different zoom motor positions and then calibrating the field of view angle of the lens image.
[0124] Step H2, determining the zoom motor position corresponding to the field angle of the actual image being queried as the actual zoom motor position when the movement lens zooms to trigger automatic focusing and makes the lens image meet the target focus clarity.
[0125] See also Figure 6 , you can use the scale paper in the collimator to calibrate the field of view angle information of the movement lens in advance. Calibration method: fix the distance between the imaging sensor sensor surface of the movement lens and the scale paper, that is, the object distance u, and obtain the horizontal and / or vertical scale width w in the field of view. Calculate the angle through trigonometric functions, and the field of view angle Select several key points of the zoom motor position (key points of the focus curve), calibrate them one by one using this method, and save them in the field of view angle information lookup table.
[0126] See also Figure 6 , it can be seen from the field of view information table of the movement lens that the field of view decreases when zooming in, and increases when zooming out. If Ratio scaleIf it is greater than 1, it means that the actual image is magnified relative to the reference image, and the field of view of the actual image becomes smaller than that of the reference image. Search along the positive direction of the reference zoom motor position (greater than the current zoom motor position). If it is less than 1, search in the reverse direction to obtain the number of out-of-step steps of the zoom motor and then compensate for it.
[0127] S450: Determine the out-of-step state information of the zoom motor of the movement lens according to the actual zoom motor position and the reference zoom motor position.
[0128] S460: Control the zoom motor of the movement lens to perform step-out compensation according to the step-out state information of the zoom motor of the movement lens.
[0129] The technical solution of the embodiment of the present invention is that during the operation of the movement lens, the movement lens is controlled to change magnification according to the reference magnification motor position at the current object distance. There is a one-to-one correspondence between the field of view angle information of the movement lens and the magnification motor position. Therefore, the field of view angle information can accurately characterize the position of the magnification motor of the movement lens. In this way, the actual magnification motor position when the movement lens has completed the magnification change and triggered automatic focusing and made the lens image meet the target focus clarity can be detected based on the field of view of the movement lens corresponding to the lens image. Then, by comparing the actual magnification motor position with the reference magnification motor position, it is possible to detect whether the magnification motor of the movement lens is out of step and the number of steps the magnification motor has lost, so that the magnification motor of the movement lens can be compensated for in time. Through the above process, whether the movement lens is out of step and effective compensation can be performed while maintaining the clarity and smoothness of the lens image and not affecting the user experience, thereby solving the problem of lens defocus and image blur caused by motor loss of step.
[0130] Figure 7 A structural block diagram of a movement lens motor out-of-step processing device is provided for an embodiment of the present invention. This embodiment can be applied to the situation where the movement lens is out of step and the out-of-step compensation is performed in time during the operation of the movement lens. The movement lens motor out-of-step processing device can be implemented in the form of hardware and / or software. The movement lens motor out-of-step processing device can be configured in any electronic device with a network communication function, and the electronic device can be a camera with a movement lens, etc.
[0131] like Figure 7 As shown, the movement lens motor out-of-step processing device of this embodiment may include:
[0132] The control module 710 is used to control the movement lens to change the magnification according to the reference zoom motor position at the current object distance;
[0133] A detection module 720 is used to detect the actual zoom motor position when the movement lens zooms to trigger the automatic focus and the lens image meets the target focus clarity, wherein the actual zoom motor position is determined based on the field of view angle of the lens image when the movement lens meets the target focus clarity;
[0134] A determination module 730, configured to determine the out-of-step state information of the zoom motor of the movement lens according to the actual zoom motor position and the reference zoom motor position;
[0135] The compensation module 740 is used to control the zoom motor of the movement lens to perform step-out compensation according to the step-out state information of the zoom motor of the movement lens.
[0136] Based on the above embodiment, optionally, controlling the movement lens to change the magnification according to the reference zoom motor position at the current object distance includes:
[0137] After the movement lens is zoomed out and the automatic focusing is triggered, the current focus clarity of the movement lens when the automatic focusing is performed at the current zoom motor position corresponding to the zooming out;
[0138] If it is detected that the current focus clarity is less than the preset focus clarity associated with the current zoom motor position, the movement lens is controlled to perform zooming according to the reference zoom motor position at the current object distance.
[0139] Based on the above embodiment, optionally, the preset focus clarity associated with the current zoom motor position is obtained by screening from a preset focus clarity set, and the preset focus clarity set is constructed by controlling the movement lens to keep the zoom motor of the movement lens from losing step at the current object distance and performing zooming and auto-focusing according to different usage time, different shooting scenes and different zoom motor positions, and then calculating the focus clarity based on statistics when the auto-focus is completed.
[0140] Based on the above embodiment, optionally, controlling the movement lens to change the magnification according to the reference zoom motor position at the current object distance includes:
[0141] Determine a reference zoom motor position from candidate zoom motor positions associated with the focus curve of the movement lens, wherein a movement distance of the zoom motor of the movement lens toward the reference zoom motor position is less than a movement distance toward candidate zoom motor positions excluding the reference zoom motor position;
[0142] The control movement lens moves toward the reference zoom motor position at the current object distance.
[0143] Based on the above embodiment, optionally, detecting the actual zoom motor position when the movement lens zoom is completed to trigger the automatic focus and the lens image meets the target focus clarity includes:
[0144] Determine the actual image corresponding to when the movement lens zoom is completed, triggering the automatic focus and making the lens image meet the target focus clarity;
[0145] Determine a reference image associated with a reference zoom motor position, wherein the reference image is an image that satisfies a target focus clarity when zooming is performed according to the reference zoom motor position and autofocus is triggered while keeping the zoom motor of the movement lens from losing step;
[0146] By matching the feature points of the actual image with the reference image, the actual position of the zoom motor when the movement lens zooms to trigger the automatic focusing and makes the lens image meet the target focus clarity is determined.
[0147] On the basis of the above embodiment, optionally, by matching feature points of the actual image with the reference image, determining the actual zoom motor position when the movement lens zoom completes triggering automatic focusing and makes the lens image meet the target focus clarity, includes:
[0148] Determining an image scaling ratio of the actual image relative to the reference image by matching feature points between the actual image and the reference image;
[0149] Determine the field angle of the actual image according to the image scaling ratio and the field angle of the reference image, wherein the field angle of the reference image is obtained by calibrating the field angle of the lens image after controlling the zoom motor of the movement lens to move to the reference zoom motor position;
[0150] According to the field of view angle of the actual image, the actual zoom motor position when the movement lens zoom is completed to trigger automatic focusing and make the lens image meet the target focus clarity is determined.
[0151] Based on the above embodiment, optionally, determining the image scaling ratio of the actual image relative to the reference image by matching feature points between the actual image and the reference image includes:
[0152] Extracting feature points from the actual image and the reference image respectively, and matching feature points from the actual image and the reference image;
[0153] Extracting key feature points from the matched feature points, and determining a first feature point distance between the key feature points in the actual image and a second feature point distance between the key feature points in the reference image;
[0154] An image scaling ratio of the actual image relative to the reference image is determined according to the first feature point distance and the second feature point distance.
[0155] On the basis of the above embodiment, optionally, according to the field of view angle of the actual image, determining the actual zoom motor position when the movement lens zoom completes triggering the automatic focusing and makes the lens image meet the target focus clarity includes:
[0156] Based on the field of view angle information table of the movement lens, query the zoom motor position corresponding to the field of view angle of the actual image, wherein the field of view angle information table is obtained by calibrating the field of view angle of the lens image after controlling the zoom motor of the movement lens to perform zoom movement at different zoom motor positions;
[0157] The zoom motor position corresponding to the field angle of the actual image being queried is determined as the actual zoom motor position when the movement lens zoom completes triggering automatic focusing and makes the lens image meet the target focus clarity.
[0158] On the basis of the above embodiment, optionally, according to the out-of-step state information of the zoom motor of the movement lens, controlling the zoom motor of the movement lens to perform out-of-step compensation includes:
[0159] If the out-of-step state information of the zoom motor of the movement lens indicates that the number of out-of-step steps of the zoom motor is less than or equal to a preset step number threshold, then the zoom motor is compensated for out-of-step according to the out-of-step direction and the number of out-of-step steps indicated by the out-of-step state information of the zoom motor;
[0160] If the out-of-step state information of the zoom motor of the movement lens indicates that the number of out-of-step steps of the zoom motor is greater than a preset step number threshold, detecting whether the movement lens is in a preset low-illuminance high-gain scene;
[0161] When the movement lens is in a preset low-illuminance high-gain scene, controlling the zoom motor of the movement lens to perform an initialization operation, so that the zoom motor of the movement lens searches for an optical coupling point to re-establish a coordinate system of the zoom motor;
[0162] When the movement lens is not in a preset low-illuminance high-gain scene, the zoom motor is compensated for out-of-step according to the out-of-step direction and the number of out-of-step steps indicated by the out-of-step state information of the zoom motor.
[0163] Based on the above embodiment, optionally, the method for processing the movement lens motor out of step in this embodiment further includes:
[0164] When the movement lens zooms in and triggers the completion of automatic focusing, and the zoom motor of the movement lens is at a preset zoom motor position, the actual focus motor position when the movement lens zooms in and triggers the automatic focusing and the lens image meets the target focus clarity is detected;
[0165] Determining the out-of-step state information of the focus motor of the movement lens according to the focus motor position associated with the actual focus motor position and the preset zoom motor position;
[0166] According to the out-of-step state information of the focus motor of the movement lens, the focus motor of the movement lens motor is controlled to perform out-of-step compensation.
[0167] By adopting the above scheme, during the operation of the movement lens, the two kinds of data, image and lens operation parameters, are analyzed and determined respectively to realize the out-of-step detection of the lens motor. During the detection process, the actual clarity and smoothness can be maintained without affecting the user experience.
[0168] On the basis of the above embodiment, optionally, according to the out-of-step state information of the focus motor of the movement lens, controlling the focus motor of the movement lens motor to perform out-of-step compensation may include:
[0169] If the out-of-step state information of the focus motor of the movement lens indicates that the number of out-of-step steps of the focus motor is less than or equal to the preset step number threshold, the focus motor is compensated for out-of-step according to the out-of-step direction and the number of out-of-step steps indicated by the out-of-step state information of the focus motor;
[0170] If the out-of-step status information of the focus motor of the movement lens indicates that the number of out-of-step steps of the focus motor is greater than a preset step threshold, it is detected whether the movement lens is in a preset low-illuminance high-gain scene.
[0171] When the movement lens is in a preset low illumination high gain scene, the focus motor of the movement lens is controlled to perform an initialization operation, so that the focus motor of the movement lens searches for an optical coupling point and re-establishes a coordinate system of the focus motor.
[0172] When the movement lens is not in the preset low-illuminance high-gain scene, the focus motor is compensated for out-of-step according to the out-of-step direction and the number of out-of-step steps indicated by the out-of-step state information of the focus motor.
[0173] The technical solution of the embodiment of the present invention is that during the operation of the movement lens, by controlling the movement lens to change magnification according to the reference magnification motor position at the current object distance, the actual magnification motor position of the movement lens when the magnification change is completed and triggering automatic focusing and making the lens image meet the target focus clarity can be detected based on the field angle of view of the movement lens corresponding to the lens image, and then by comparing the actual magnification motor position with the reference magnification motor position, it is possible to detect whether the magnification motor of the movement lens is out of step and the number of steps lost by the magnification motor, so that the magnification motor of the movement lens can be compensated for out of step in time. Through the above process, whether the movement lens is out of step can be accurately detected and effective compensation can be performed while maintaining the clarity and smoothness of the lens image and not affecting the user experience, thereby solving the problem of lens defocus and image blur due to motor out of step.
[0174] The movement lens motor out-of-step processing device provided in the embodiment of the present invention can execute the movement lens motor out-of-step processing method provided in any embodiment of the present invention mentioned above, and has the corresponding functions and beneficial effects of executing the movement lens motor out-of-step processing method. For the detailed process, please refer to the relevant operations of the movement lens motor out-of-step processing method in the above embodiment.
[0175] Figure 8 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0176] like Figure 8 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0177] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0178] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for processing a motor out of step for a movement lens.
[0179] In some embodiments, the method for processing the movement lens motor out of step can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for processing the movement lens motor out of step described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for processing the movement lens motor out of step by any other appropriate means (for example, by means of firmware).
[0180] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0181] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0182] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0183] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0184] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0185] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0186] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0187] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for processing a motor out of step of a movement lens, characterized in that: The method comprises: Control the movement lens to change the magnification according to the reference zoom motor position at the current object distance; Detecting the actual zoom motor position when the movement lens zooms to trigger automatic focusing and the lens image meets the target focus clarity, wherein the actual zoom motor position is determined based on the field of view angle of the lens image when the movement lens meets the target focus clarity; Determining the out-of-step state information of the zoom motor of the movement lens according to the actual zoom motor position and the reference zoom motor position; According to the out-of-step state information of the zoom motor of the movement lens, the zoom motor of the movement lens is controlled to perform out-of-step compensation.
2. The method according to claim 1, characterized in that Control the movement lens to change the magnification according to the reference zoom motor position at the current object distance, including: After the movement lens is zoomed out and the automatic focusing is triggered, the current focus clarity of the movement lens when the automatic focusing is performed at the current zoom motor position corresponding to the zooming out; If it is detected that the current focus clarity is less than the preset focus clarity associated with the current zoom motor position, the movement lens is controlled to perform zooming according to the reference zoom motor position at the current object distance; Among them, the preset focus clarity associated with the current zoom motor position is screened from a preset focus clarity set, and the preset focus clarity set is constructed by controlling the movement lens to keep the zoom motor of the movement lens from losing step at the current object distance and performing zooming and automatic focusing according to different usage time, different shooting scenes and different zoom motor positions. The focus clarity is statistically constructed when the autofocus is completed.
3. The method according to claim 1 or 2, characterized in that: Control the movement lens to change the magnification according to the reference zoom motor position at the current object distance, including: Determine a reference zoom motor position from candidate zoom motor positions associated with the focus curve of the movement lens, wherein a movement distance of the zoom motor of the movement lens toward the reference zoom motor position is less than a movement distance toward candidate zoom motor positions excluding the reference zoom motor position; The control movement lens moves toward the reference zoom motor position at the current object distance.
4. The method according to claim 1, characterized in that: Detect the actual zoom motor position when the movement lens zoom is completed, triggering auto focus and making the lens image meet the target focus clarity, including: Determine the actual image corresponding to when the movement lens zoom is completed, triggering the automatic focus and making the lens image meet the target focus clarity; Determine a reference image associated with a reference zoom motor position, wherein the reference image is an image that satisfies a target focus clarity when zooming is performed according to the reference zoom motor position and autofocus is triggered while keeping the zoom motor of the movement lens from losing step; By matching the feature points of the actual image with the reference image, the actual position of the zoom motor when the movement lens zooms to trigger the automatic focusing and makes the lens image meet the target focus clarity is determined.
5. The method according to claim 4, characterized in that By matching the feature points of the actual image with the reference image, determining the actual zoom motor position when the movement lens zoom is completed and the automatic focusing is triggered so that the lens image meets the target focus clarity, including: Determining an image scaling ratio of the actual image relative to the reference image by matching feature points between the actual image and the reference image; Determine the field angle of the actual image according to the image scaling ratio and the field angle of the reference image, wherein the field angle of the reference image is obtained by calibrating the field angle of the lens image after controlling the zoom motor of the movement lens to move to the reference zoom motor position; According to the field of view angle of the actual image, the actual zoom motor position when the movement lens zoom is completed to trigger automatic focusing and make the lens image meet the target focus clarity is determined.
6. The method according to claim 1, characterized in that The method further comprises: When the movement lens zooms in and triggers the completion of automatic focusing, and the zoom motor of the movement lens is at a preset zoom motor position, the actual focus motor position when the movement lens zooms in and triggers the automatic focusing and the lens image meets the target focus clarity is detected; Determining the out-of-step state information of the focus motor of the movement lens according to the focus motor position associated with the actual focus motor position and the preset zoom motor position; According to the out-of-step state information of the focus motor of the movement lens, the focus motor of the movement lens motor is controlled to perform out-of-step compensation.
7. The method according to claim 1, characterized in that According to the out-of-step state information of the zoom motor of the movement lens, the zoom motor of the movement lens is controlled to perform out-of-step compensation, including: If the out-of-step state information of the zoom motor of the movement lens indicates that the number of out-of-step steps of the zoom motor is less than or equal to a preset step number threshold, then the zoom motor is compensated for out-of-step according to the out-of-step direction and the number of out-of-step steps indicated by the out-of-step state information of the zoom motor; If the out-of-step state information of the zoom motor of the movement lens indicates that the number of out-of-step steps of the zoom motor is greater than a preset step number threshold, detecting whether the movement lens is in a preset low-illuminance high-gain scene; When the movement lens is in a preset low-illuminance high-gain scene, controlling the zoom motor of the movement lens to perform an initialization operation, so that the zoom motor of the movement lens searches for an optical coupling point to re-establish a coordinate system of the zoom motor; When the movement lens is not in a preset low-illuminance high-gain scene, the zoom motor is compensated for out-of-step according to the out-of-step direction and the number of out-of-step steps indicated by the out-of-step state information of the zoom motor.
8. A device for processing a motor out of step of a movement lens, characterized in that: The device comprises: A control module is used to control the movement lens to change the magnification according to the reference zoom motor position at the current object distance; A detection module, used to detect the actual zoom motor position when the movement lens zooms to trigger automatic focusing and the lens image meets the target focus clarity, wherein the actual zoom motor position is determined based on the field of view angle of the lens image when the movement lens meets the target focus clarity; A determination module, used to determine the out-of-step state information of the zoom motor of the movement lens according to the actual zoom motor position and the reference zoom motor position; The compensation module is used to control the zoom motor of the movement lens to perform step-out compensation according to the step-out state information of the zoom motor of the movement lens.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for processing the movement lens motor out of step according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for processing a motor out of step of a movement lens according to any one of claims 1 to 7 when the processor executes the instructions.
Citation Information
Cited By
Optical lens stable driving test method and device and camera
CN120538801A