Lens adjustment method and device, storage medium and electronic equipment

By obtaining the target movement speed of the lens and calculating the compensation offset, adjusting the lens position solves the problem of reduced performance of the optical anti-shake function in mobile shooting and improves image quality and stability.

CN114531546BActive Publication Date: 2024-09-20GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210170847.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2024-09-20
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

During mobile shooting, because the lens of the terminal device is moving, the performance of the optical anti-shake function is reduced, which in turn affects the image quality.

Method used

By obtaining the current attitude information of the lens, including the target movement speed, the compensation offset for the optical anti-shake stroke is calculated, and the lens position is adjusted according to the offset so that the lens is at the center of the optical anti-shake stroke.

Benefits of technology

It improves the image quality when shooting on the move, ensures the effectiveness of the optical image stabilization function, and enhances the stability and accuracy of the lens in moving situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114531546B
    Figure CN114531546B
Patent Text Reader

Abstract

The present disclosure relates to the field of imaging technology, and in particular to a lens adjustment method and device, a computer-readable storage medium, and an electronic device, the method comprising: obtaining current posture information of a lens at a current moment in a mobile shooting environment, the current posture information including a target motion speed; determining an offset of the lens for compensating for an optical image stabilization stroke according to the target motion speed; and adjusting the position of the lens along the deflection direction of the lens according to the offset. The technical solution of the embodiments of the present disclosure improves the quality of images obtained during mobile shooting.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the development of imaging technology, people are increasingly using image acquisition devices such as lenses on electronic devices to capture images or videos, and the application of mobile photography is increasing.

[0003] When shooting on the move, since the terminal device is always moving, factors such as inertia and the principle of anti-shake will cause the lens to be not in the center position, resulting in reduced performance of the optical anti-shake function, and further reduced image quality.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The purpose of the present disclosure is to provide a lens adjustment method, a lens adjustment device, a computer-readable medium and an electronic device, thereby improving the quality of images obtained during mobile shooting at least to a certain extent.

[0006] According to a first aspect of the present disclosure, a lens adjustment method is provided, comprising: obtaining current posture information of the lens at a current moment in a mobile shooting environment, the current posture information comprising a target motion speed; determining an offset of the lens for compensating for an optical image stabilization stroke according to the target motion speed; and adjusting the position of the lens along a deflection direction of the lens according to the offset.

[0007] According to a second aspect of the present disclosure, a lens adjustment device is provided, comprising: an acquisition module, for acquiring current posture information of the lens at a current moment in a mobile shooting environment, the current posture information including a target motion speed; a determination module, for determining an offset of the lens for compensating for an optical image stabilization stroke according to the target motion speed; and an adjustment module, for adjusting the position of the lens according to the offset.

[0008] According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented.

[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, characterized in that it includes: one or more processors; and a memory for storing one or more programs, which enables the one or more processors to implement the above method when the one or more programs are executed by the one or more processors.

[0010] An adjustment method provided by an embodiment of the present disclosure determines the offset of the lens used to compensate for the optical image stabilization stroke according to the target movement speed; determines the offset of the lens used to compensate for the optical image stabilization stroke according to the target movement speed; and adjusts the position of the lens along the deflection direction of the lens according to the offset. Compared with the prior art, the offset of the lens used to compensate for the optical image stabilization stroke is calculated according to the movement speed of the lens, and then the position of the lens is adjusted in advance, so that the lens is at the center of the optical image stabilization stroke during mobile shooting, so that the optical image stabilization function is not affected, and the quality of the image obtained during mobile shooting is improved.

[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0013] Figure 1 A schematic diagram showing an exemplary system architecture to which embodiments of the present disclosure may be applied;

[0014] Figure 2 A flowchart schematically illustrates a lens adjustment method in an exemplary embodiment of the present disclosure;

[0015] Figure 3 A flowchart for calculating an offset in an exemplary embodiment of the present disclosure is schematically shown;

[0016] Figure 4 A data flow diagram for calculating an offset in an exemplary embodiment of the present disclosure is schematically shown;

[0017] Figure 5 A structural diagram schematically shows an optical image stabilization architecture in an exemplary embodiment of the present disclosure;

[0018] Figure 6 Schematically illustrates the positional relationship between the OIS strokes of the lower lens during normal shooting in an exemplary embodiment of the present disclosure;

[0019] Figure 7 The imaging process of a terminal when performing mobile shooting in an exemplary embodiment of the present disclosure is schematically shown;

[0020] Figure 8Schematically showing the positional relationship between lens OIS strokes when performing mobile shooting without using the lens adjustment method disclosed in the present invention;

[0021] Fig. 9 A schematic diagram schematically shows the composition of a lens adjustment device in an exemplary embodiment of the present disclosure;

[0022] Fig.10 A schematic diagram of an electronic device to which the embodiments of the present disclosure can be applied is shown. DETAILED DESCRIPTION

[0023] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0024] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0025] Figure 1 The schematic diagram of the system architecture is shown, and the system architecture 100 may include a terminal 110 and a server 120. The terminal 110 may be a terminal device such as a smart phone, a tablet computer, a desktop computer, a laptop computer, etc. The server 120 generally refers to a background system that provides imaging technology-related services in this exemplary embodiment, and may be a server or a cluster formed by multiple servers. The terminal 110 and the server 120 may be connected via a wired or wireless communication link to exchange data.

[0026] In one implementation, the lens adjustment method may be performed by the terminal 110. For example, after obtaining the target movement speed of the lens when the terminal 110 performs mobile shooting, the terminal 110 calculates the offset and adjusts the position of the lens according to the offset.

[0027] In one implementation, the lens adjustment method may be performed by the server 120. For example, the target motion speed of the lens when the terminal 110 performs mobile shooting is obtained, and the terminal 110 uploads the target motion speed to the server 120, and the server 120 calculates an offset for compensating the optical image stabilization stroke, and returns the offset to the terminal 110, and then the terminal 110 adjusts the position of the lens according to the offset.

[0028] As can be seen from the above, the execution subject of the lens adjustment method in this exemplary embodiment may be the terminal 110 or the server 120, and the present disclosure does not limit this.

[0029] In the related technologies, optical image stabilization (OIS) is one of the important technologies for lenses, especially mobile phone lenses. Excellent optical image stabilization will greatly improve the success rate and effect of taking photos, and is a technical improvement point that all mobile phone manufacturers and module manufacturers are currently pursuing. However, when taking mobile photos, such as panoramic photos (ring photos), since it is necessary to move continuously in one direction in advance, there is always an angle component in the movement process. Due to the principle of anti-shake, this angle component will cause the lens to be not in the center position, resulting in a decrease in the performance of the optical image stabilization function, and then the quality of the obtained image will be reduced.

[0030] Based on the above shortcomings, the present disclosure first proposes a lens adjustment method. Figure 2 The lens adjustment evaluation method in this exemplary embodiment is described. Figure 2 An exemplary process of the image quality assessment method is shown, which may include:

[0031] Step S210, obtaining current posture information of the lens at the current moment in a mobile shooting environment, wherein the current posture information includes a target motion speed;

[0032] Step S220, determining an offset of the lens for compensating for an optical image stabilization stroke according to the target motion speed;

[0033] Step S230: adjusting the position of the lens along the deflection direction of the lens according to the offset.

[0034] Based on the above method, the offset of the lens relative to the optical image stabilization stroke for compensation is calculated according to the moving speed of the lens, and then the position of the lens is adjusted in advance so that the lens is at the center of the optical image stabilization stroke or slightly biased towards the moving direction during mobile shooting, so that the optical image stabilization function is not affected, thereby improving the quality of the image obtained during mobile shooting.

[0035] Below Figure 2 Each step in the procedure is described in detail.

[0036] refer to Figure 2 In step S210, the current posture information of the lens at the current moment in the mobile shooting environment is obtained, and the current posture information includes the target movement speed.

[0037] In this example implementation, the mobile shooting may be shooting along a preset direction or circular shooting, and the current posture information at the current moment may include target movement speed and current position information, wherein the current position information is used to determine the current travel position of the lens, and the target movement speed may include at least one of angular velocity, angular acceleration, translational velocity, and translational acceleration.

[0038] In an example implementation of the present disclosure, when obtaining the target motion speed of the lens in a mobile shooting environment, the processor may first detect the reference motion speeds at multiple moments during the mobile shooting process; and then obtain the target motion speed based on the fitting of multiple reference motion speeds. Specifically, after the mobile shooting starts, multiple reference motion speeds within a preset time after the mobile shooting starts may be obtained, wherein the reference motion speeds may be detected by a gyroscope and an acceleration sensor, and the number of reference motion speeds may be 3, 5 or more, and may also be customized according to user needs, which is not specifically limited in this example implementation.

[0039] In this example implementation, the preset time may be 1 second, 0.5 seconds, 0.6 seconds, etc., and may also be customized according to user needs, which is not specifically limited in this example implementation.

[0040] After obtaining the above-mentioned multiple reference movement speeds, the average value of the above-mentioned multiple reference movement speeds can be calculated as the above-mentioned target movement speed, or a corresponding curve graph can be made according to the above-mentioned reference movement speeds and their corresponding times, and then the above-mentioned target movement speed can be obtained by fitting the curve graph.

[0041] In another example implementation of the present disclosure, the processor may acquire a plurality of historical motion speeds, and determine the target motion speed according to the historical motion speeds.

[0042] In this example implementation, the historical motion speed may be the motion speed of the lens when the user performs mobile shooting for a preset number of times in the past. After obtaining the historical motion speed, the target motion speed may be determined based on the multiple historical motion speeds. Specifically, the average of the multiple historical motion speeds may be calculated as the target motion speed.

[0043] In this example implementation, the preset number of times may be 10 times, 20 times, or all historical motion speeds, and may also be customized according to user needs, which is not specifically limited in this example implementation.

[0044] In yet another example implementation of the present disclosure, the processor may detect the real-time motion speed and acceleration of the lens in real time; when the acceleration is less than or equal to a preset value, the target motion speed is determined according to the real-time motion speed.

[0045] In this example implementation, the processor may detect the real-time motion speed and acceleration of the lens in real time, and the detection of the motion speed and acceleration may be obtained by a gyroscope and an acceleration sensor.

[0046] Then, the relationship between the acceleration and the preset value can be determined. When the acceleration is less than or equal to the preset value, it can be determined that the user actively speeds up the movement speed during mobile shooting. Therefore, the collected real-time movement speed can be used as the target movement data to calculate the corresponding offset.

[0047] If the acceleration is greater than the preset value, it can be determined that jitter occurs, and the position of the lens is adjusted in the optical image stabilization system according to the real-time motion speed to compensate for the jitter. In this example implementation, the value of the acceleration can be customized according to different devices and different scenarios, and its specific value is not specifically limited in this example real-time method.

[0048] In step S220, an offset of the lens for compensating for an optical image stabilization stroke is determined according to the target movement speed.

[0049] In this example implementation, the optical image stabilization stroke is the distance that the lens can move in different directions from its position, including direction and distance. Specifically, the optical image stabilization stroke is the distance that the lens can move in various directions from its actual position. In this example implementation, when determining the offset of the lens for compensating the optical image stabilization stroke according to the target motion speed, steps S310 to S320 may be included.

[0050] In step S310, previous posture information is acquired, where the previous posture information is posture information of the lens at a previous moment before the current moment.

[0051] In this example implementation, the current posture information refers to information characterizing the posture of the lens at the current moment, and the current posture information includes the target motion speed. The specific meaning of the target motion speed has been described in detail above and will not be repeated here.

[0052] Specifically, the processor can detect the target motion speed of the lens at the current moment. The target speed can be detected by a gyroscope (Gyroscope, referred to as Gyro) sensor and an acceleration (acceleration transducer, referred to as Acc) sensor. The gyroscope sensor is a simple and easy-to-use control system based on free space movement and gesture positioning, and the acceleration sensor is a sensor that can measure acceleration. In one embodiment, the processor can determine the motion speed at the current moment by the acceleration of the lens at the current moment.

[0053] In one embodiment, the processor can detect the angular velocity of the lens through a gyroscope sensor to obtain the angular velocity of the lens at the current moment, and use the current angular velocity information as the movement velocity of the lens. Further, the processor can obtain the three-axis angular velocity of the lens through the gyroscope sensor, correct the three-axis angular velocity and integrate it in the time domain, and output the three-axis angular velocity. At the same time, the processor can detect the acceleration of the lens through an acceleration sensor to obtain the target movement velocity of the lens.

[0054] In step S320, anti-shake strength information is determined based on the target motion speed, where the anti-shake strength information is positively correlated with the target motion speed and is used to characterize the fusion weight of the current posture information and the previous posture information.

[0055] Specifically, the processor may pre-configure the anti-shake strength information corresponding to different posture information, and there is a positive correlation between the posture information and the corresponding anti-shake strength information. For example, when the posture information is represented by a specific numerical value and the anti-shake strength information is represented by an anti-shake strength value, the larger the numerical value representing the posture information, the larger the corresponding anti-shake strength value; the smaller the numerical value representing the posture information, the smaller the corresponding anti-shake strength value.

[0056] In this example implementation, the processor may acquire anti-shake strength information corresponding to the current posture information of the lens at the current moment.

[0057] In step S330, the offset is determined based on the anti-shake strength information, the current posture information and the previous posture information.

[0058] In this example implementation, the posture information at the current moment includes initial posture information at the current moment; the posture information at the previous moment includes filtered posture information at the previous moment.

[0059] Among them, the previous moment refers to the moment before the current moment, which can be the previous moment or multiple previous moments of the current moment, such as the previous two moments, the previous three moments, etc., but is not limited to this.

[0060] Specifically, the processor may obtain the filtering posture information corresponding to the previous moment of the current moment, and determine the offset based on the anti-shake strength information, the current posture information, and the filtering posture information corresponding to the previous moment. For example, the offset is determined based on the anti-shake strength information, the current posture information, and the filtering posture information corresponding to the previous moment of the current moment.

[0061] Furthermore, the processor may obtain the posture information corresponding to the previous moment of the current moment, and filter the posture information of the previous moment to obtain the filtered posture information corresponding to the previous moment.

[0062] In this example implementation, the above filtering process may be low-pass filtering, and a low-pass filter may be used to complete the filtering process. The low-pass filter may be a Butterworth filter or a Chebyshev filter, and may also be customized according to the user, which is not specifically limited in this example implementation.

[0063] In this embodiment, the posture information corresponding to the previous moment of the current moment is obtained, and the posture information corresponding to the previous moment is low-pass filtered. The posture information of the previous moment can be smoothed and denoised, and short-term fluctuations are effectively eliminated to obtain the smoothed filtered posture information corresponding to the previous moment.

[0064] In an example implementation of the present disclosure, the offset compensation amount may be first determined based on the current posture information and the filtered posture information at the current moment. Specifically, the processor may determine the offset compensation amount based on the current posture information and the filtered posture information at the current moment. Further, the processor may calculate the offset compensation amount in the X direction and the offset compensation amount in the Y direction based on the current posture information and the filtered posture information at the current moment.

[0065] In one embodiment, the offset compensation amount is determined based on the current posture information and the filtered posture information at the current moment, including: determining the angle compensation amount and the translation compensation amount based on the current posture information and the filtered posture information at the current moment respectively; determining the offset compensation amount according to the angle compensation amount and the translation compensation amount.

[0066] Specifically, the current posture information may include an angular rotation amount and a translation amount, and the filtered posture information at the current moment also includes the filtered angular rotation amount and the translation amount. The angular rotation amount and the translation amount of the lens at the current moment can be detected by an accelerometer, and the angular rotation amount includes the rotation angle in the XYZ direction, and the translation amount includes the amount of translation in the XY direction. The angular rotation amount and the translation amount can be used to determine the target motion speed of the lens at the current moment. The angle compensation amount can be calculated by the angular rotation amount in the current posture information and the filtered angular rotation amount. The translation compensation amount can be calculated by the translation amount in the current posture information and the filtered translation amount. The angle compensation amount and the translation compensation amount are merged to obtain the offset compensation amount. Specifically, the angle compensation amount, the translation compensation amount and their respective weights can be weighted and summed to obtain the offset compensation amount.

[0067] In an example implementation, the processor may determine the weights corresponding to the angle compensation amount and the translation compensation amount according to the distance between the lens and the photographed object. The smaller the distance between the lens and the photographed object, the greater the weight corresponding to the translation compensation amount, and the smaller the weight corresponding to the angle compensation amount. The greater the distance between the lens and the photographed object, the smaller the weight corresponding to the translation compensation amount, and the greater the weight corresponding to the angle compensation amount.

[0068] In an exemplary implementation of the present disclosure, after obtaining the above-mentioned offset compensation amount, a preset calibration value may be acquired, and the offset amount of the lens may be determined based on the offset compensation amount and the preset calibration value.

[0069] Specifically, the relationship between the offset compensation amount, the preset calibration value and the stroke center position can be preset. The preset calibration value is a preset empirical value that can characterize the relationship between the offset compensation amount and the stroke center position. The stroke center position refers to the center position of the lens in the entire stroke that can be pushed.

[0070] In this example implementation, the processor may determine the stroke center position of the current stroke of the lens, obtain a preset calibration value, and calculate a corresponding offset according to the offset compensation amount, the preset calibration value, and the stroke center position.

[0071] In one embodiment, the product of the offset compensation amount and the preset calibration value and the sum of the stroke center position are taken as the corresponding offset amount.

[0072] In one embodiment, a first association relationship among an offset compensation amount in the X direction, a preset calibration value, and a stroke center position, and a second association relationship among an offset compensation amount in the Y direction, a preset calibration value, and a stroke center position are preset in the electronic device. The processor can determine the stroke center position of the lens in the X direction and the Y direction. The offset in the X direction is calculated based on the offset compensation amount in the X direction, the preset calibration value in the X direction, and the stroke center position in the X direction. The offset in the Y direction is calculated based on the offset compensation amount in the Y direction, the preset calibration value in the Y direction, and the stroke center position in the Y direction.

[0073] Specifically, the processor may use the product of the offset compensation amount in the X direction and the preset calibration value in the X direction, and the sum of the stroke center position in the X direction as the corresponding offset in the X direction. The processor may use the product of the offset compensation amount in the Y direction and the preset calibration value in the Y direction, and the sum of the stroke center position in the Y direction as the corresponding offset in the Y direction.

[0074] Refer to the following Figure 4 As shown, the calculation of the above offset is described in detail with a specific implementation method. The target speed of the lens in the mobile shooting environment is obtained through the detection data of the gyroscope 410 sensor Gyro and the acceleration sensor 420Acc. And the current stroke position of the lens in the XY direction at the current moment is determined, that is, the current stroke position Hall_x in the X direction and the current stroke position Hall_y in the Y direction, and the two values ​​are used to calculate the target stroke position target Hall. The specific processing process is as follows:

[0075] Calculate the current posture information Q of the target at the current moment based on the values ​​detected by the Gyro sensor and the Acc sensor i , the current posture information includes the current travel position, Q i is a vector representing the posture in the X, Y, and Z axis directions. According to the current posture information Q i Get the corresponding anti-shake strength value alpha.

[0076] According to the anti-shake strength value alpha, based on the current posture information Q i And the filtering posture information Qfilter of the previous moment i-1 Calculate the current filtering posture information Qfilter, the formula is as follows:

[0077] Qfilter=f(Q i , alpha)

[0078] Qfilter for Q iand Qfilter i-1 The result of posture fusion, where alpha determines the current posture information Q during the fusion process i And the filtering posture information Qfilter of the previous moment i-1 The respective weights.

[0079] Through the current posture information Q i And the current filtered posture information Qfilter calculates the offset compensation △Q:

[0080] △Q=Q i -Qfilter

[0081] The offset compensation amount △Q is a vector, which can be an angle compensation amount or a fusion of the angle compensation amount and the translation compensation amount.

[0082] When the current posture information Q i When the three Euler angles (X, Y, Z) are used, the calculated offset compensation △Q is the angle compensation △Q1, including the compensation of the rotation angle around the XYZ axis (△x, △y, △z). △z is not involved in the calculation of the target Hall value for the time being, because the target Hall is the value in the XY direction.

[0083] In one embodiment, the current posture information Qi can also be five quantities including acceleration (X, Y, Z, shift_x, shift_y), the first three of which are Euler angle rotations, and the last two are translations. The calculated offset compensation △Q is a fusion of the angle compensation and the translation compensation.

[0084] When the current posture information Q i When the angular rotation and translation are included, that is, when the acceleration (X, Y, Z, shift_x, shift_y) is included, the angle compensation △Q1 can be calculated using the accelerometer's (X, Y, Z) according to the above formula, and the translation compensation △Q2 can be calculated using the accelerometer's (shift_x, shift_y) according to the above formula. △Q2 includes the compensation for translation on the XY axis. The angle compensation △Q1 and the translation compensation △Q2 are fused in the corresponding directions to obtain the offset compensation △Q. Specifically, the angle compensation △Q1, the translation compensation △Q2 and their corresponding weights are weighted summed in the XY directions to obtain the offset compensation △Q.

[0085] Get the preset calibration values ​​(gain_x, gain_y) and calculate the target Hall:

[0086] △code_x=(△x*gain_x)+center_code_x;

[0087] △code_y=(△y*gain_y)+center_code_y;

[0088] target_Hall_x=f(△code_x,Hall_x);

[0089] target_Hall_y=f(△code_y,Hall_y);

[0090] Among them, center_code_x and center_code_y are the middle positions of the full stroke of the lens, and f is the fusion of the current stroke values ​​Hall_x and Hall_y of the current lens and the calculated offsets △code_x and △code_y. The fusion method can be Kalman filtering or other fusion algorithms.

[0091] Send target_Hall to the driver IC 430, so that the motor VCM pushes the lens to the target travel positions target_Hall_x and target_Hall_y to complete the adjustment of the lens.

[0092] In this embodiment, when the motion speed is low, a small anti-shake strength value alpha is adapted, and based on the alpha value at this time, a small ΔQ offset compensation amount is obtained, so that the lens will not be too far from the center point. When the motion speed is high, a large anti-shake strength value alpha is adapted, and based on the alpha value at this time, a large ΔQ offset compensation amount is obtained, so that the above optical anti-shake system can work normally after the adjustment of the lens is completed.

[0093] It should be noted that the above-mentioned current posture information includes the above-mentioned target motion information, and may also include other information, which is not specifically limited in this example implementation.

[0094] In another exemplary implementation of the present disclosure, the target motion speed may be directly used as the offset compensation amount, that is, the target motion speed may be directly used as the ΔQ to complete the calculation of the offset.

[0095] In step S230, the position of the lens is adjusted along the deflection direction of the lens according to the offset.

[0096] After obtaining the above offset, the target position of the lens can be determined according to the current stroke position of the lens, the deflection direction and the offset; and then the lens is driven to move to the target position.

[0097] In this example implementation, refer to Figure 5As shown, the optical image stabilization system may include a bracket 502, a motor 506, and a PCB board 501, wherein a light sensor 503 in the camera module is disposed on the PCB board 501, a filter 504 is fixed to the bracket 502 and is located on a side of the light sensor away from the PCB board, a motor 506 is fixed to the bracket 502, and a lens 505 is located between the motors 506 and is located on a side of the filter 504 away from the light sensor 504, and is spaced apart. The motor 506 may be used to drive the lens 505 to move.

[0098] In another exemplary embodiment of the present disclosure, motors may be provided on both sides of the light sensor to drive the light sensor to move.

[0099] In this example implementation, refer to Figure 6 and Figure 7 As shown, during normal shooting, the lens should be at the center of the OIS travel. The following is based on the above deflection direction. Figure 6 For detailed explanation, refer to the right side of the figure. Figure 8 As shown in the figure, due to the basic movement speed during mobile shooting, the lens position is not at the center of the OIS travel, resulting in the OIS performance on one side being limited. When the lens moves to the right, the lens position is to the right of the center of the OIS travel.

[0100] Therefore, after calculating the above-mentioned offset, the above-mentioned motor can be controlled to push the above-mentioned lens to the right by a preset distance, wherein the above-mentioned preset distance is the above-mentioned offset, so that during mobile shooting, the lens can also be at the center position of the above-mentioned OIS stroke or the above-mentioned lens is offset by a larger distance in the deflection direction, so that the lens is located at a position deviated from the center position of the OIS stroke in the deflection direction by a preset distance, wherein the above-mentioned preset distance can be 0.01 mm, 0.02 mm, etc., and can also be customized according to user needs, so that the above-mentioned optical image stabilization performance can be fully exerted, thereby making the quality of the image obtained by mobile shooting higher.

[0101] In this example implementation, the current travel position can be first determined based on the above-mentioned current position information, and the above-mentioned current position information includes the position in the XYZ directions. The current travel position of the lens can be determined based on the above-mentioned current position information and a pre-set initial position, wherein the above-mentioned current travel position refers to the actual position of the lens in the current travel.

[0102] In this example implementation, the target position of the lens may be calculated based on the current stroke position and the offset, guided by the deflection direction, and then the lens may be driven to move to the target position to complete compensation of the lens.

[0103] To summarize, in this exemplary embodiment, the offset of the lens to be compensated relative to the optical image stabilization stroke is calculated according to the moving speed of the lens, and then the position of the lens is adjusted in advance so that the lens is at the center of the optical image stabilization stroke during mobile shooting, so that the optical image stabilization function is not affected, thereby improving the quality of the image obtained during mobile shooting. At the same time, the filtering posture at the previous moment and the current posture information are used to calculate the offset compensation amount, and then the offset is calculated according to the preset calibration value, which increases the accuracy of the offset and improves the accuracy of the lens adjustment, further improving the anti-shake effect of the optical image stabilization function, thereby making the image obtained during mobile shooting more stable and of higher quality.

[0104] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0105] For further reference, Fig. 9 As shown, in the implementation of this example, a lens adjustment device 900 is also provided, including an acquisition module 910, a determination module 920 and an adjustment module 930. Among them:

[0106] The acquisition module 910 may be used to acquire current posture information of the lens at the current moment in a mobile shooting environment, where the current posture information includes the target motion speed.

[0107] In an example implementation, the acquisition module 910 may be used to detect reference motion speeds at multiple moments during mobile shooting; and obtain the target motion speed based on the fitting of multiple reference motion speeds.

[0108] In another example implementation, the acquisition module 910 may be used to acquire a plurality of historical motion speeds and determine the target motion speed according to the historical motion angles.

[0109] In yet another example implementation, the acquisition module 910 may be used to detect the real-time motion speed and acceleration of the lens in real time; when the acceleration is less than or equal to a preset value, the target motion speed is determined according to the real-time motion speed.

[0110] In this example implementation, the lens adjustment device may further include an anti-shake module for adjusting the position of the lens in the optical anti-shake system according to the real-time motion speed when the acceleration is greater than a preset value, so as to compensate for the shake.

[0111] The determination module 920 may be used to determine an offset of the lens for compensating the optical image stabilization stroke according to the target motion speed.

[0112] In an example implementation, the determination module 920 may first obtain previous posture information, which is the posture information of the lens at a previous moment before the current moment, and then determine the anti-shake strength information based on the target motion speed. The anti-shake strength information is positively correlated with the target motion speed and is used to characterize the fusion weight of the current posture information and the previous posture information. Finally, the offset is determined based on the anti-shake strength information, the current posture information and the previous posture information.

[0113] In this example implementation, the posture information at the current moment includes the initial posture information at the current moment; the posture information at the previous moment includes the filtered posture information at the previous moment; when determining the offset based on the anti-shake strength information, the current posture information and the posture information corresponding to the previous moment of the current moment, the filtered posture information at the current moment can be first determined based on the anti-shake strength information, the current posture information and the filtered posture information corresponding to the previous moment of the current moment; and then the offset can be determined based on the current posture information and the filtered posture information at the current moment.

[0114] In this example implementation, the offset is determined based on the current posture information and the filtered posture information at the current moment, including: determining the offset compensation based on the current posture information and the filtered posture information at the current moment; obtaining a preset calibration value, and determining the offset of the lens based on the offset compensation and the preset calibration value.

[0115] In another exemplary implementation of the present disclosure, the determination module 920 obtains a preset calibration value, and determines the offset based on the target motion speed and the preset calibration value.

[0116] In an exemplary embodiment, the adjustment module 930 can be used to adjust the position of the lens along the deflection direction of the lens according to the offset. Specifically, the current travel position of the lens can be first determined based on the current position information, and then the target position of the lens relative to the optical image stabilization system can be determined based on the current travel position, deflection direction and offset of the lens; and the lens can be driven to move to the target position.

[0117] The specific details of each module in the above device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.

[0118] The exemplary embodiment of the present disclosure also provides an electronic device for executing the above-mentioned lens adjustment method, and the electronic device may be the above-mentioned terminal 110 or the server 120. Generally, the electronic device may include a processor and a memory, the memory is used to store executable instructions of the processor, and the processor is configured to execute the above-mentioned image lens adjustment method by executing the executable instructions.

[0119] Below Fig.10 The mobile terminal 1000 in FIG. 1 is taken as an example to exemplify the structure of the electronic device. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Fig.10 The construction in can also be applied to fixed type equipment.

[0120] like Fig.10 As shown, the mobile terminal 1000 may specifically include: a processor 1001, a memory 1002, a bus 1003, a mobile communication module 1004, an antenna 1, a wireless communication module 1005, an antenna 2, a display screen 1006, a camera module 1007, an audio module 1008, a power module 1009 and a sensor module 1010.

[0121] The processor 1001 may include one or more processing units, for example, the processor 1010 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc. The lens adjustment method in this exemplary embodiment may be executed by an AP, a GPU or a DSP, and when the method involves processing related to a neural network, it may be executed by an NPU.

[0122] The encoder can encode (i.e. compress) an image or video, for example, the target image can be encoded into a specific format to reduce the data size for easy storage or transmission. The decoder can decode (i.e. decompress) the encoded data of the image or video to restore the image or video data, such as reading the encoded data of the target image, decoding it through the decoder to restore the data of the target image, and then perform relevant processing on the data. The mobile terminal 1000 can support one or more encoders and decoders. In this way, the mobile terminal 1000 can process images or videos in multiple encoding formats, such as: JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap) and other image formats, MPEG (Moving Picture Experts Group) 1, MPEG10, H.1063, H.1064, HEVC (High Efficiency Video Coding) and other video formats.

[0123] The processor 1001 may be connected to the memory 1002 or other components via a bus 1003 .

[0124] The memory 1002 may be used to store computer executable program codes, which include instructions. The processor 1001 executes various functional applications and data processing of the mobile terminal 1000 by running the instructions stored in the memory 1002. The memory 1002 may also store application data, such as images, videos and other files.

[0125] The communication function of the mobile terminal 1000 can be implemented by the mobile communication module 1004, antenna 1, wireless communication module 1005, antenna 2, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 1004 can provide 10G, 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 1000. The wireless communication module 1005 can provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. applied to the mobile terminal 1000.

[0126] The display screen 1006 is used to implement display functions, such as displaying user interfaces, images, videos, etc. The camera module 1007 is used to implement shooting functions, such as shooting images, videos, etc. The audio module 1008 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 1009 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 1010 may include a depth sensor 10101, a pressure sensor 10102, a gyroscope sensor 10103, an air pressure sensor 10104, etc., to implement corresponding sensing detection functions.

[0127] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0128] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned "Exemplary Method" section of the present specification.

[0129] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above.

[0130] In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0131] In addition, program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0132] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application 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 technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0133] 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 lens adjustment method, It is characterized in that include: Detecting the real-time motion speed and acceleration of the lens in real time, determining that jitter occurs when the acceleration is greater than a preset value, and adjusting the position of the lens in the optical image stabilization system according to the real-time motion speed to compensate for the jitter; When the acceleration is less than or equal to a preset value, it is determined that the user actively increases the moving speed during mobile shooting, and the target moving speed is determined according to the real-time moving speed; Determining an offset of the lens for compensating for an optical image stabilization stroke according to the target motion speed; adjusting the position of the lens along the moving direction of the lens according to the offset; The current posture information includes the target movement speed, and determining the offset of the lens for compensating the optical image stabilization stroke according to the target movement speed includes: Acquire previous posture information, where the previous posture information is posture information of the lens at a previous moment at a current moment; Determine anti-shake strength information based on the target motion speed, where the anti-shake strength information is positively correlated with the target motion speed and is used to characterize a fusion weight of the current posture information and the previous posture information; The offset is determined based on the anti-shake strength information, the current posture information and the previous posture information.

2. The method according to claim 1, It is characterized in that The current posture information includes the initial posture information at the current moment; the previous posture information includes the filtered posture information at the previous moment; The determining the offset based on the anti-shake strength information, the current posture information and the previous posture information includes: Determine the filtering posture information at the current moment based on the anti-shake strength information, the initial posture information at the current moment, and the filtering posture information at the previous moment; The offset is determined based on the current posture information and the filtered posture information at the current moment.

3. The method according to claim 2, It is characterized in that Determining the offset based on the current posture information and the filtered posture information at the current moment includes: Determine an offset compensation amount based on the current posture information and the filtered posture information at the current moment; A preset calibration value is obtained, and an offset of the lens is determined based on the offset compensation amount and the preset calibration value.

4. The method according to claim 1, It is characterized in that The step of determining, according to the target motion speed, an offset of the lens for compensating for an optical image stabilization stroke comprises: A preset calibration value is obtained, and the offset is determined based on the target motion speed and the preset calibration value.

5. The method according to claim 1, It is characterized in that The current posture information includes current position information, and adjusting the position of the lens along the deflection direction of the lens according to the offset includes: Determining the current travel position of the lens according to the current position information; Determining a target position of the lens according to the current stroke position, the deflection direction, and the offset; The lens is driven to move to the target position.

6. A lens adjustment device, It is characterized in that include: An acquisition module is used to detect the real-time motion speed and acceleration of the lens in real time, determine that jitter occurs when the acceleration is greater than a preset value, and adjust the position of the lens in the optical image stabilization system according to the real-time motion speed to compensate for the jitter; determine that the user actively speeds up the motion speed during mobile shooting when the acceleration is less than or equal to the preset value, and determine the target motion speed according to the real-time motion speed; A determination module, configured to determine an offset of the lens for compensating for an optical image stabilization stroke according to the target motion speed; An adjustment module, used for adjusting the position of the lens along the moving direction of the lens according to the offset; The current posture information includes the target motion speed, and the determination module is used to obtain the previous posture information, which is the posture information of the lens at the previous moment before the current moment; based on the target motion speed, the anti-shake strength information is determined, and the anti-shake strength information is positively correlated with the target motion speed, and is used to characterize the fusion weight of the current posture information and the previous posture information; The offset is determined based on the anti-shake strength information, the current posture information and the previous posture information.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the lens adjustment method according to any one of claims 1 to 5 is implemented.

8. An electronic device, It is characterized in that include: one or more processors; as well as A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the lens adjustment method as described in any one of claims 1 to 5.