Lens module control method, device and readable storage medium

CN122525757APending Publication Date: 2026-08-07KUNSHAN QIUTI PHOTOELECTRIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
KUNSHAN QIUTI PHOTOELECTRIC TECH CO LTD
Filing Date
2026-06-26
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

双层滚珠结构有两层独立的滚珠结构,每一层的沟槽会限制滚珠发生偏移,只沿着沟槽移动,圆槽单层滚珠相较于双层滚珠少了轨道沟槽的限制,滚珠在圆槽里移动时位置相对不可控,因此,现有镜头模组的控制方法存在控制精度较低等技术问题

Benefits of technology

[0009] A fourth aspect of this application provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the lens module control method as described in any of the above embodiments. Therefore, this readable storage medium possesses all the beneficial effects of the lens module control method described in any of the above embodiments, which will not be elaborated further here.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122525757A_ABST
    Figure CN122525757A_ABST
Patent Text Reader

Abstract

The application discloses a lens module control method, device and readable storage medium, and relates to the technical field of camera shooting. The lens module control method comprises the following steps: acquiring a moving area of a floating lens in a lens module; establishing a plane coordinate system of the floating lens according to the moving area; acquiring an actual moving track of the floating lens in the plane coordinate system; determining a position compensation value corresponding to the floating lens according to the plane coordinate system, the moving area and the actual moving track; and correcting the position of the floating lens based on the position compensation value when a driving motor drives the floating lens to move. The application improves the control precision of the lens module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of camera technology, and in particular to a control method, apparatus and readable storage medium for a lens module. Background Technology

[0002] Currently, OIS (Optical Image Stabilization) corrects optical axis misalignment through floating lenses. Ideally, this embodiment aims for a perfect linear relationship between lens movement and the control signal applied to the motor (e.g., doubling the signal voltage doubles the displacement). However, in reality, OIS systems have numerous nonlinear factors, requiring the addition of linear compensation algorithms to compensate for their effects.

[0003] Ball motors are a structural form of OIS modules, and most currently on the market are double-layer ball motor structures. Current linear compensation methods in the industry are mostly applicable to double-layer ball motor structures. A double-layer ball motor structure has two independent ball structures, and the grooves in each layer restrict the ball's offset, causing it to move only along the grooves. In contrast, a single-layer ball motor with circular grooves lacks the restriction of the grooves, making the ball's position relatively uncontrollable as it moves within the groove. Therefore, existing control methods for lens modules suffer from technical problems such as low control precision. Summary of the Invention

[0004] This application provides a control method, device, and readable storage medium for a lens module. It employs a grid-based architecture algorithm to determine in real time which grid interval the ball is in and uses the calibration value of that grid interval to compensate for linear deviation, thereby solving technical problems such as low control accuracy in the prior art.

[0005] A first aspect of this application provides a control method for a lens module, the lens module including a drive motor and a suspended lens, the drive motor being used to drive the suspended lens to move, the method including: Obtain the movement area of ​​the suspended lens within the lens module; Establish a planar coordinate system for the suspended lens based on the moving area; In a planar coordinate system, obtain the actual movement trajectory of the suspended lens; Based on the planar coordinate system, the moving area, and the actual moving trajectory, determine the position compensation value corresponding to the suspended lens; When the drive motor moves the suspended lens, the position of the suspended lens is corrected based on the position compensation value.

[0006] The control method for the lens module in this embodiment establishes a planar coordinate system for the suspended lens based on the movement area of ​​the suspended lens within the lens module. Based on the actual movement trajectory of the suspended lens in the planar coordinate system, the planar coordinate system, and the movement area, the corresponding position compensation value for the suspended lens is determined, ensuring the accuracy of the position compensation value. Then, when the drive motor moves the suspended lens, the position of the suspended lens is corrected based on the accurate position compensation value, ensuring the position accuracy of the suspended lens and thus improving the control precision of the lens module.

[0007] A second aspect of this application provides a control device for a lens module, the lens module including a drive motor and a suspended lens, the drive motor being used to drive the suspended lens to move, the device including: The acquisition unit is used to acquire the movement area of ​​the suspended lens in the lens module; The first processing unit is used to establish a planar coordinate system for the suspended lens based on the moving area; The second processing unit is used to obtain the actual movement trajectory of the suspended lens in the planar coordinate system; The third processing unit is used to determine the position compensation value corresponding to the suspended lens based on the planar coordinate system, the moving area and the actual moving trajectory. The fourth processing unit is used to correct the position of the suspended lens based on the position compensation value when the drive motor drives the suspended lens to move.

[0008] A third aspect of this application provides another control device for a lens module, including a processor and a memory. The memory stores a computer program, which, when executed by the processor, implements the steps of the lens module control method as described in any of the above embodiments. Therefore, this lens module control device possesses all the beneficial effects of the lens module control method in any of the above embodiments, and will not be elaborated further here.

[0009] A fourth aspect of this application provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the steps of the lens module control method as described in any of the above embodiments. Therefore, this readable storage medium possesses all the beneficial effects of the lens module control method described in any of the above embodiments, which will not be elaborated further here. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart illustrating the control method for the lens module provided in this application embodiment; Figure 2 This is one of the schematic diagrams of the code-code coordinate system for the moving area provided in the embodiments of this application; Figure 3 This is the second schematic diagram of the code-code coordinate system of the floating lens moving area provided in the embodiments of this application; Figure 4 The suspended lens provided in this application embodiment is fixed in the X-axis direction of the code-code coordinate system and moves in the Y-axis code-pixel coordinate system. Figure 1 ; Figure 5 The suspended lens provided in this application embodiment is fixed in the X-axis direction of the code-code coordinate system and moves in the Y-axis code-pixel coordinate system. Figure 2 ; Figure 6 Functional block diagram of the control device for the lens module provided in the embodiments of this application; Figure 7 A structural block diagram of the control device for the lens module provided in the embodiments of this application. Detailed Implementation

[0012] To better understand the technical solutions provided in the embodiments of this specification, the technical solutions of the embodiments of this specification will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of this specification and the specific features in the embodiments are detailed descriptions of the technical solutions of the embodiments of this specification, rather than limitations on the technical solutions of this specification. In the absence of conflict, the embodiments of this specification and the technical features in the embodiments can be combined with each other.

[0013] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The term "two or more" includes two or more cases.

[0014] In some embodiments, Figure 1 A flowchart of the control method for the lens module provided in the embodiments of this application is shown below. Figure 1 As shown, an embodiment of this application provides a control method for a lens module. In this embodiment, the lens module includes a drive motor and a suspended lens, and the drive motor is used to drive the suspended lens to move.

[0015] For example, the lens module is a core component for optical imaging in modern electronic devices, equivalent to the "eyes" of the device, and is widely used in smartphones, security monitoring, automotive electronics, drones, medical devices and other fields.

[0016] The lens module mainly consists of the following key components: Optical lens: Composed of multiple glass or plastic lenses, responsible for focusing light from the scene onto the sensor, determining the focal length, aperture, and field of view.

[0017] Image sensor: The core photosensitive element that converts light signals into electrical signals; its size and pixels directly affect image quality.

[0018] Infrared cut-off filter: Located between the lens and the sensor, it filters infrared light, making color reproduction closer to what the human eye sees.

[0019] Voice coil motor: Enables autofocus by controlling the lens movement to the optimal point of sharpness via electrical current.

[0020] Optical image stabilization: Equipped in some high-end modules, it uses lens or sensor displacement to counteract shake and improve shooting stability.

[0021] For example, existing lens modules use double-layer ball bearings, which have two independent ball bearing structures. The grooves in each layer restrict the ball bearing from shifting and allow it to move only along the grooves. In contrast, the lens module in this embodiment uses a single-layer ball bearing with a circular groove. Compared to double-layer ball bearings, the single-layer ball bearing with a circular groove lacks the restriction of the track groove, making the position of the ball bearing relatively uncontrollable when moving in the circular groove. Therefore, a grid-based architecture algorithm is used to determine in real time which grid interval the ball bearing is in and to use the calibration value of that grid interval to compensate for linear deviation.

[0022] The control methods for the lens module include: Step S101: Obtain the movement area of ​​the suspended lens in the lens module; Based on the lens module, the moving area of ​​the suspended lens is determined, where the moving area is the area where the suspended lens can move within the lens module.

[0023] For example, the moving area can be specifically a circular area.

[0024] For example, the movable area can be specifically a square area.

[0025] For example, the suspended lens is disposed on the ball bearing. In this embodiment, the lens module is a single-layer ball bearing with a circular groove, and the moving area is any area on the circular groove.

[0026] Step S102: Establish the planar coordinate system of the suspended lens based on the moving area; The coordinate system is expressed on the moving region, using the planar coordinate system corresponding to the suspended lens, where the planar coordinate system is the coordinate system that the suspended lens can move.

[0027] For example, the planar coordinate system is a two-dimensional coordinate system with the XY axes.

[0028] For example, the planar coordinate system is parallel to the moving region.

[0029] Step S103: Obtain the actual movement trajectory of the suspended lens in the planar coordinate system; Obtain the actual movement trajectory of the suspended lens in the planar coordinate system, where the actual movement trajectory is the existing movement trajectory of the suspended lens.

[0030] For example, the actual movement trajectory of the suspended lens is recorded during the historical operation of the lens module.

[0031] For example, the actual movement trajectory can be a simulated movement trajectory.

[0032] For example, the actual movement trajectory may include multiple movement trajectories.

[0033] Step S104: Determine the position compensation value corresponding to the suspended lens based on the planar coordinate system, the moving area, and the actual moving trajectory; Data calculations are performed on the planar coordinate system, the moving area, and the actual moving trajectory to determine the position compensation value corresponding to the suspended lens. The position compensation value is the compensation value for correcting the position of the suspended lens.

[0034] For example, when the actual movement trajectory includes multiple movement trajectories, data calculations can be performed on the multiple movement trajectories in the plane coordinate system and the movement area to determine the position compensation value corresponding to the suspended lens.

[0035] Step S105: When the drive motor drives the suspended lens to move, the position of the suspended lens is corrected based on the position compensation value.

[0036] When the drive motor moves the suspended lens, the position of the suspended lens is corrected based on the position compensation value.

[0037] For example, when the drive motor drives the suspended lens to move, the suspended lens experiences position drift. Based on the position compensation value, the position of the suspended lens is corrected to ensure the positional accuracy of the suspended lens.

[0038] For example, when the drive motor drives the suspended lens to move, the movement trajectory of the suspended lens will be non-linear. Based on the position compensation value, the position of the suspended lens is corrected to ensure that the movement trajectory of the suspended lens is linear.

[0039] The control method for the lens module in this embodiment establishes a planar coordinate system for the suspended lens based on the movement area of ​​the suspended lens within the lens module. Based on the actual movement trajectory of the suspended lens in the planar coordinate system, the planar coordinate system, and the movement area, the corresponding position compensation value for the suspended lens is determined, ensuring the accuracy of the position compensation value. Then, when the drive motor moves the suspended lens, the position of the suspended lens is corrected based on the accurate position compensation value, ensuring the position accuracy of the suspended lens and thus improving the control precision of the lens module.

[0040] In some embodiments, this application provides a lens module control method that determines the position compensation value corresponding to the suspended lens based on a planar coordinate system, a moving area, and an actual moving trajectory, including: Based on a planar coordinate system, the moving region is divided into M×N sub-regions, where M and N are integers greater than 1. Determine the location information of the actual movement trajectory in each sub-region to obtain M×N location information; Based on M×N location information, determine the correction curve corresponding to the actual movement trajectory; Determine the position compensation value based on the correction curve.

[0041] In this embodiment, the moving region is divided into M×N sub-regions based on a planar coordinate system, where M and N are integers greater than 1, and the sub-regions are sub-regions in the planar coordinate system.

[0042] For example, both M and N can be 3. Based on the planar coordinate system, the moving region is divided into 3×3 sub-regions.

[0043] Determine the location information of the actual movement trajectory in each sub-region to obtain M×N location information, where the location information represents the position of the actual movement trajectory in the sub-region.

[0044] For example, in the case where the movement area includes 3×3 sub-regions, the location information of the actual movement trajectory in each sub-region is determined to obtain 3×3 location information.

[0045] For example, M×N location information corresponds one-to-one with M×N sub-regions.

[0046] Based on M×N location information, determine the correction curve corresponding to the actual movement trajectory, where the correction curve is the curve that corrects the actual movement trajectory.

[0047] Determine the position compensation value based on the correction curve.

[0048] For example, a curve correction can correct the actual movement trajectory to a linear curve.

[0049] In some embodiments, this application provides a control method for a lens module. The planar coordinate system includes a first coordinate axis and a second coordinate axis. Based on the planar coordinate system, a moving region is divided into M×N sub-regions, including: The first coordinate axis is divided into regions to determine M first partitions on the first coordinate axis; The second coordinate axis is divided into regions to determine N second partitions on the second coordinate axis; Based on M first partitions and N second partitions, the mobile area is divided into M×N sub-regions.

[0050] In this embodiment, the planar coordinate system includes a first coordinate axis and a second coordinate axis, wherein the first coordinate axis and the second coordinate axis are independent coordinate axes.

[0051] For example, the first coordinate axis and the second coordinate axis are perpendicular to each other.

[0052] The first coordinate axis is divided into regions to determine M first regions on the first coordinate axis, where each first region is a sub-region on the first coordinate axis.

[0053] For example, by dividing the coordinate axis into regions according to a preset step size, M first regions can be obtained.

[0054] The second coordinate axis is divided into regions to determine N second regions on the second coordinate axis, where each second region is a sub-region on the second coordinate axis.

[0055] For example, by dividing the coordinate axis into regions according to a preset step size, N second regions can be obtained.

[0056] Based on M first partitions and N second partitions, the mobile area is divided into M×N sub-regions.

[0057] For example, the moving area is divided into M×N sub-regions based on M first partitions and N second partitions.

[0058] In some embodiments, this application provides a lens module control method, which determines a correction curve corresponding to the actual movement trajectory based on M×N position information, including: Obtain the preset linear equation; Determine M×N location information and linear equations, and determine the coordinates of M×N compensation points; The correction curve is determined based on the coordinates of M×N compensation points.

[0059] In this embodiment, a preset linear equation is obtained, which is a preset standard linear equation.

[0060] Determine M×N location information and linear equations, and determine the coordinates of M×N compensation points, where the coordinates of the M×N compensation points correspond one-to-one with the M×N location information.

[0061] For example, the compensation point coordinates are the reference coordinate points used for linear correction.

[0062] The correction curve is determined based on the coordinates of M×N compensation points.

[0063] In some embodiments, this application provides a control method for a lens module, wherein the position compensation value includes M×N first compensation values ​​and M×N second compensation values ​​that correspond one-to-one. The position compensation value is determined according to a correction curve, including: Based on the correction curve, determine the M×N first compensation values ​​corresponding to the first coordinate axis; Based on the correction curve, determine the M×N second compensation values ​​corresponding to the second coordinate axis.

[0064] In this embodiment, the position compensation value includes M×N first compensation values ​​and M×N second compensation values, with each of the M×N first compensation values ​​and M×N second compensation values ​​corresponding one-to-one.

[0065] Based on the correction curve, determine M×N first compensation values ​​corresponding to the first coordinate axis, where the first compensation value is the compensation value corresponding to the first coordinate axis.

[0066] For example, when the first coordinate axis is the X-axis, the M×N first compensation values ​​are compensation values ​​for the X-axis.

[0067] Based on the correction curve, determine M×N second compensation values ​​corresponding to the second coordinate axis, where the second compensation values ​​are the compensation values ​​corresponding to the second coordinate axis.

[0068] For example, when the second coordinate axis is the Y-axis, the M×N second compensation values ​​are compensation values ​​for the Y-axis.

[0069] In some embodiments, this application provides a lens module control method, which establishes a planar coordinate system for a suspended lens based on a moving area, including: Shape recognition is performed on the moving region to determine the first and second edges of the moving region, which are perpendicular to each other; Based on the first edge, determine the first coordinate axis, and based on the second edge, determine the second coordinate axis; A planar coordinate system is established based on the first and second coordinate axes.

[0070] In this embodiment, shape recognition is performed on the moving region to determine the first edge and the second edge of the moving region, wherein the first edge and the second edge are perpendicular to each other.

[0071] For example, when the moving area is a square area, the first edge can be the edge of the long side of the moving area.

[0072] For example, when the moving area is a square area, the second edge can be the edge of the short side of the moving area.

[0073] For example, when the moving area is a circular area, the first edge is a specified diameter in the circular area, and the second edge is a diameter in the circular area that is perpendicular to the specified diameter.

[0074] A first coordinate axis is determined based on a first edge, and a second coordinate axis is determined based on a second edge, wherein the first coordinate axis and the second coordinate axis are independent coordinate axes.

[0075] For example, the first edge is parallel to the first coordinate axis.

[0076] For example, the second edge is parallel to the second coordinate axis.

[0077] A planar coordinate system is established based on the first and second coordinate axes.

[0078] For example, the first coordinate axis can be the X-axis, and the second coordinate axis can be the Y-axis.

[0079] For example, a planar coordinate system is established based on mutually perpendicular X-axis and Y-axis.

[0080] In some embodiments, this application provides a method for controlling a lens module, which obtains the movement area of ​​a suspended lens within the lens module, including: The drive motor is controlled to move the suspended lens in order to determine the maximum moving distance of the suspended lens; The movement area of ​​the suspended lens is determined based on the maximum movement distance.

[0081] In this embodiment, the drive motor is controlled to move the suspended lens to determine the maximum moving distance of the suspended lens, wherein the maximum moving distance is the maximum distance that the suspended lens can move.

[0082] For example, the maximum moving distance can be the maximum moving radius of the suspended lens.

[0083] The movement area of ​​the suspended lens is determined based on the maximum movement distance.

[0084] For example, when the maximum moving distance is the maximum moving radius of the suspended lens, the moving area is a circular area.

[0085] For example, assume the IC (driver chip) range for the drive motor is 0 to 4095 codes (a unit commonly used in OIS systems). The grid size can be set according to requirements; a larger number of grids corresponds to a better compensation effect. Let's say there are m rows and n columns, meaning a total of m × n grids. For example... Figure 2 As shown, the compensation data for a given cell is used in real time to determine which cell it is in. Assuming m=n=3, and the coordinates of the point to be compensated are X1Y1 (1300 code, 1300 code), then it is located in the bottom left cell. Figure 3 As shown. The compensation values ​​for the X1Y1 coordinates are tempx and tempy, so the compensated coordinates should be (1300 + tempxcode, 1300 + tempycode). It's understandable that the more grid divisions, the higher the compensation accuracy.

[0086] The algorithm involves units including code and pixel. Code is a digital count value that drives the output current / voltage of the DAC (digital-to-analog converter), a purely digital dimensionless scale; pixel is an image offset unit used to measure the image offset and reflect the actual displacement state of the lens.

[0087] It should be noted that the compensation values ​​for the X-axis and Y-axis are independent of each other. The calculation of the X-axis compensation value depends only on the X-axis data, and the calculation of the Y-axis compensation value depends only on the Y-axis data.

[0088] Based on the coordinates (1300, 1300) of point X1Y1, determine that point X1Y1 is located at... Figure 3 In the bottom left corner of the 3x3 grid, the X coordinate of the point corresponds to the range (0-1365), and the Y coordinate also corresponds to the range (0-1365). Based on the bottom left corner of the 3x3 grid, two sets of pixel coordinates are obtained. Using these two sets of coordinates, the compensation value for all coordinate positions within that grid area can be calculated.

[0089] Given that X corresponds to the (0-1365) code region and Y corresponds to the (0-1365) code region, calculate the theoretical compensation curve of Y when X is stationary at code 1365 and the theoretical compensation curve of X when Y is stationary at code 1365.

[0090] The calculation steps for the compensation value tempy include: Figure 5 The floating lens provided in this embodiment is fixed in the X-axis direction and moves in the Y-axis in the code-code coordinate system. In the code-pixel coordinate system, the horizontal coordinate is given as code 4095 and the vertical coordinate is given as pixel 120. First, determine how many steps to push. If n steps are pushed, there will be n+1 target coordinates.

[0091] In this embodiment, it is preferable to push forward 10 steps, which will generate 11 target coordinates, and then determine them. Figure 5 The code axis in tempy has 10 equally spaced coordinate points (actually each step is equal to 4095 / 10, that is, the first step is 409, the second step is 409*2, and so on, here 409 is approximated as 400). Therefore, tempy's code array is {0,400,800,1200,1600,2000,2400,2800,3200,3600,4095}.

[0092] Based on the coordinate array of code, obtain the pixel coordinates of 10 coordinate points, and obtain the pixel array of tempy as {0.2,5,14,26,38,50.4,62.3,76,88,97,105}. With the pixel as the ordinate and code as the abscissa, establish the code-pixel coordinate system of the Y-axis movement trajectory.

[0093] In the code-pixel coordinate system, the curve equation of the theoretical linear equation yt is calculated as yt=k1×x+b1, where the maximum difference of the pixel array is 105, the maximum difference of the code array is 4095, k1=105 / 4095=0.0256, and b1 is set to 0, resulting in the curve equation yt=0.0256x.

[0094] Known Figure 5Point 1 represents the code before compensation, with coordinates 1300. The equation corresponding to the actual curve yr in the range of 1200 to 1600 codes is calculated as yr = k2 × x + b2. Here, the pixel coordinate corresponding to the code axis at 1200 is 26, and the pixel coordinate corresponding to the code axis at 1600 is 38.3. Therefore, k2 = (38.3 - 26) / (1600 - 1200) = 0.03075. Setting b2 = -10.9, we obtain yr = 0.03075x - 10.9.

[0095] Figure 5 The coordinates of point 1 (before compensation) are (1300, 0). Based on the coordinates of point 1, the coordinates of point 4 (after compensation) can be calculated as (1300 + tempy, 0).

[0096] It should be noted that, Figure 5 The theoretical compensation curve for Y (yt=0.0256x) is a linear curve, and the code and pixel have a linear relationship, which is what this embodiment aims to achieve. However, the actual motor motion is non-linear, meaning... Figure 5 The goal of this embodiment is to compensate nonlinear curves to make them nearly linear.

[0097] In this embodiment, the actual movement of the motor is divided into segments. Pushing Y for 10 steps means dividing it into 10 segments. The curve segment to be used as the actual curve yr is selected based on the X1Y1 coordinate points to be compensated. Since the current coordinates (1300, 1300) are within the range of 1200-1600, the actual curve of Y in the range of 1200 to 1600 is selected: yr = 0.03075x - 10.9. Figure 5 In this example, the x-coordinate of point 1 (1300 code) is substituted into the theoretical curve to obtain the y-coordinate of point 2. The y-coordinate of point 2 is the theoretical pixel in this embodiment, while the actual pixel is substituted into the actual curve yr, which is the y-coordinate of point 5. Therefore, the difference between the y-coordinates of point 2 and point 5 is what this embodiment needs to compensate for. Once the y-coordinate of point 2 is known, the y-coordinate of point 3 is also known. Substituting the y-coordinate of point 3 into yr, we obtain the x-coordinate of point 3 on the yr curve, which is the x-coordinate of point 4. Subtracting the x-coordinate of point 1 from the x-coordinate of point 4 gives us the compensation value tempy for Y.

[0098] Substituting x=1300 into the yr equation, we get yr=29.075, which means the pixel value before compensation is 29.075. Figure 5 The 5 code-pixel coordinates are (1300, 29.075).

[0099] Substituting x=1300 into the yt equation, we get yt=33.28, meaning the theoretical pixel coordinate should be 33.28. Figure 5 The code-pixel coordinates of the two points are (1300, 33.28).

[0100] Substituting yt = 33.28 into the equation yr, we get x = 1436.75, which is the result. Figure 5 The code-pixel coordinates of the three points are (1436.75, 33.28).

[0101] exist Figure 5 In the diagram, point 5 represents the coordinates before compensation, and point 3 represents the coordinates after compensation. The compensation value tempy is equal to 1436.75 - 1300 = 136.75code.

[0102] The yt and yr mentioned above are the compensation curves corresponding to y1. Similarly, x1 can be used to derive the corresponding xt and xr curves. Thus, each element of matrix Q corresponds to four compensation curves. The appropriate compensation curve is determined based on the actual position. The more elements and curves, the better the compensation effect.

[0103] For example, the calculation steps for the compensation value tempx include: Determine how many steps to push. If you push n steps, there will be n+1 target coordinates. Here, pushing 10 steps will generate 11 target coordinates.

[0104] Given that X corresponds to the (0-1365) code region and Y corresponds to the (0-1365) code region, calculate the theoretical compensation curve of Y when X is stationary at code 1365 and the theoretical compensation curve of X when Y is stationary at code 1365.

[0105] Calculate the theoretical compensation curve for X: With Ycode remaining constant at 1365, Xcode increases by 400 each time, finally reaching code 4095, resulting in 11 target coordinates. (0,1365), (400,1365), (800,1365), (1200,1365), (1600,1365), (2000,1365), (2400,1365), (2800,1365), (3200,1365), (3600,1365), (4095,1365). These 11 target coordinates are the actual DAC values ​​sent to the IC to drive the motor. With each target, the lens is pushed by the motor, and simultaneously, an image is captured, resulting in the corresponding pixel coordinates. (0.2,24.3), (5,24.7), (14,24.3), (26,24.5), (38,24.5), (50.4,24.3), (62.3,24.5), (76,24.4), (88,24), (97,24.4), (105,24).

[0106] Since the calculation of the theoretical compensation curve for X depends only on the coordinates of X, there are two sets of coordinates: The code array for X is (0, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 3600, 4095).

[0107] The pixel array of X is (0.2,5,14,26,38,50.4,62.3,76,88,97,105).

[0108] Establish a code-pixel coordinate system with the vertical axis as pixel and the horizontal axis as code.

[0109] The theoretical compensation curve xt of X is calculated as follows: xt = k3x + b3. The maximum difference between the code coordinates is 105, the maximum difference between the code array is 4095, the maximum difference between the pixel array is 105, k3 = 105 / 4095 = 0.0256. Setting b3 to 0, we get xt = 0.0256x.

[0110] Known Figure 5 Point 1 represents the code before compensation, with code-pixel coordinates of (1300, 0). Calculate the actual curve xr for the range of X from 1200 to 1600: xr = k4x + b4, where the pixel coordinate corresponding to 1200 code is 26, and the pixel coordinate corresponding to 1600 code is 38.3. Therefore, k4 = (38.3 - 26) / (1600 - 1200) = 0.03075. Set b4 to -10.9 to obtain xr = 0.03075x - 10.9.

[0111] At this point, the theoretical compensation curve for X is xt=0.0256x, and the actual curve for X in the range of 1200 to 1600 is xr=0.03075x-10.9.

[0112] according to Figure 5 The coordinates of point 1 (before compensation) are (1300, 0), and the coordinates of point 4 (after compensation) are (1300 + tempx, 0). It should be noted that... Figure 5The theoretical compensation curve for X (xt=0.0256x) is a linear curve, and the code and pixel have a linear relationship, which is what this embodiment aims to achieve. However, the actual motor movement is non-linear, meaning... Figure 5 The goal of this embodiment is to compensate nonlinear curves to make them nearly linear.

[0113] This embodiment uses a method that divides the actual motor movement into segments. For example, pushing X for 10 steps is divided into 10 segments. The curve segment to be used as the actual curve xr is selected based on the X1Y1 coordinates to be compensated. Since the current coordinates (1300, 1300) are within the range of 1200-1600, the actual curve within the 1200-1600 range is selected: xr = 0.03075x - 10.9. Substituting the x-coordinate of point 1 (1300 code) into the theoretical curve yields the y-coordinate of point 2. The y-coordinate of point 2 is the theoretical pixel in this embodiment, while the actual pixel is the y-coordinate of point 5, which is the actual curve xr. The difference between the y-coordinates of point 2 and point 5 is what this embodiment needs to compensate for. Knowing the y-coordinate of point 2, the y-coordinate of point 3 is also known. Substituting the y-coordinate of point 3 into xr gives the x-coordinate of point 3 on the xr curve, thus calculating the actual pixel of x before compensation.

[0114] Substituting 1300code into xr, we get xr=29.075, which means the pixel before compensation is 29.075, and the coordinates of the 5 points are (1300, 29.075).

[0115] To find the theoretical pixel of x before compensation, substitute 1300 into xr=0.03075x-10.9, and we get xt=33.28. That is, the theoretical pixel coordinates should be 33.28, and the coordinates of point 2 are (1300, 33.28).

[0116] Calculate the compensation value tempx. Substituting 33.28 into xt, we get x = 1436.75, and the coordinates of point 3 are (1436.75, 33.28). Point 5 represents the coordinates before compensation, and point 3 represents the coordinates after compensation. The compensation value tempx is equal to 1436.75 - 1300 = 136.75code. The xt and xr used above are the compensation curve corresponding to x1.

[0117] In this embodiment, the coordinates are (1300, 1300 code). After compensation, the coordinates should be (1300 + 136.75 code, 1300 + 136.75 code), that is, (1436.75 code, 1436.75 code).

[0118] In summary, the compensation values ​​for all coordinates within the XY (0-1365) code range of the lower left corner of the nine-grid can be calculated based on the four curves yt, yr, xt, and xr. The principle is the same for the other ranges, so I will not go into details. Then, the curves of each region are saved, and compensation is performed in real time according to the XY code when OIS stabilizes the image.

[0119] In some embodiments, Figure 6 A functional block diagram of the control device for the lens module provided in the embodiments of this application is shown below. Figure 6 As shown, an embodiment of this application provides a control device 300 for a lens module, including: The acquisition unit 302 is used to acquire the movement area of ​​the suspended lens in the lens module; The first processing unit 304 is used to establish a planar coordinate system for the suspended lens based on the moving area. The second processing unit 306 is used to obtain the actual movement trajectory of the suspended lens in a planar coordinate system; The third processing unit 308 is used to determine the position compensation value corresponding to the suspended lens based on the planar coordinate system, the moving area and the actual moving trajectory. The fourth processing unit 310 is used to correct the position of the suspended lens based on the position compensation value when the drive motor drives the suspended lens to move.

[0120] In some embodiments of this application, a control device 300 for a lens module is provided, and the third processing unit 308 is further configured to: Based on a planar coordinate system, the moving region is divided into M×N sub-regions, where M and N are integers greater than 1. Determine the location information of the actual movement trajectory in each sub-region to obtain M×N location information; Based on M×N location information, determine the correction curve corresponding to the actual movement trajectory; Determine the position compensation value based on the correction curve.

[0121] In some embodiments of this application, a control device 300 for a lens module is provided, and the third processing unit 308 is further configured to: The first coordinate axis is divided into regions to determine M first partitions on the first coordinate axis; The second coordinate axis is divided into regions to determine N second partitions on the second coordinate axis; Based on M first partitions and N second partitions, the mobile area is divided into M×N sub-regions.

[0122] In some embodiments of this application, a control device 300 for a lens module is provided, and the third processing unit 308 is further configured to: Obtain the preset linear equation; Determine M×N location information and linear equations, and determine the coordinates of M×N compensation points; The correction curve is determined based on the coordinates of M×N compensation points.

[0123] In some embodiments of this application, a control device 300 for a lens module is provided, and the third processing unit 308 is further configured to: Based on the correction curve, determine the M×N first compensation values ​​corresponding to the first coordinate axis; Based on the correction curve, determine the M×N second compensation values ​​corresponding to the second coordinate axis.

[0124] In some embodiments of this application, a control device 300 for a lens module is provided, wherein the first processing unit 304 is further configured to: Shape recognition is performed on the moving region to determine the first and second edges of the moving region, which are perpendicular to each other; Based on the first edge, determine the first coordinate axis, and based on the second edge, determine the second coordinate axis; A planar coordinate system is established based on the first and second coordinate axes.

[0125] In some embodiments of this application, a control device 300 for a lens module is provided, and the acquisition unit 302 is further configured to: The drive motor is controlled to move the suspended lens in order to determine the maximum moving distance of the suspended lens; The movement area of ​​the suspended lens is determined based on the maximum movement distance.

[0126] In some embodiments, Figure 7 A structural block diagram of the control device for the lens module provided in the embodiments of this application is shown below. Figure 7 As shown, a lens module control device 400 is proposed. The lens module control device 400 includes a processor 402 and a memory 404. The memory 404 stores a computer program, which, when executed by the processor 402, implements the steps of the lens module control method as described in any of the above embodiments. Therefore, the lens module control device 400 possesses all the beneficial effects of the lens module control method in any of the above embodiments, which will not be elaborated further here.

[0127] In some embodiments, a readable storage medium is provided having a program stored thereon, which, when executed by a processor, implements the steps of the lens module control method as described in any of the above embodiments, and thus has all the beneficial technical effects of the lens module control method described in any of the above embodiments.

[0128] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0129] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-readable program code.

[0130] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0131] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0132] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.

[0133] This application also provides a computer program product, which includes computer software instructions that, when executed on a processing device, cause the processing device to execute a process of controlling a lens module.

[0134] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0135] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0136] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

[0137] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0138] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0139] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0140] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

[0141] Although preferred embodiments have been described in this specification, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this specification.

[0142] Obviously, those skilled in the art can make various modifications and variations to this specification without departing from its spirit and scope. Therefore, if such modifications and variations fall within the scope of the claims and their equivalents, this specification is also intended to include such modifications and variations.

Claims

1. A control method for a lens module, characterized in that, The lens module includes a drive motor and a suspended lens, the drive motor being used to drive the suspended lens to move, and the method including: The movement area of ​​the suspended lens in the lens module is obtained; Based on the moving area, establish the planar coordinate system of the suspended lens; In the aforementioned planar coordinate system, the actual movement trajectory of the suspended lens is obtained; Based on the planar coordinate system, the moving area, and the actual moving trajectory, the position compensation value corresponding to the suspended lens is determined. When the drive motor drives the suspended lens to move, the position of the suspended lens is corrected based on the position compensation value.

2. The method according to claim 1, characterized in that, The step of determining the position compensation value corresponding to the suspended lens based on the planar coordinate system, the moving area, and the actual moving trajectory includes: Based on the planar coordinate system, the moving region is divided into M×N sub-regions, where M and N are integers greater than 1. Determine the location information of the actual movement trajectory in each of the sub-regions to obtain M×N location information; Based on the M×N location information, determine the correction curve corresponding to the actual movement trajectory; The position compensation value is determined based on the correction curve.

3. The method according to claim 2, characterized in that, The planar coordinate system includes a first coordinate axis and a second coordinate axis. The process of dividing the moving region into M×N sub-regions based on the planar coordinate system includes: The first coordinate axis is divided into regions to determine M first partitions on the first coordinate axis; The second coordinate axis is divided into regions to determine N second partitions on the second coordinate axis; Based on M first partitions and N second partitions, the mobile area is divided into M×N sub-regions.

4. The method according to claim 3, characterized in that, The step of determining the correction curve corresponding to the actual movement trajectory based on the M×N location information includes: Obtain the preset linear equation; Determine M×N location information and the linear equation, and determine the coordinates of M×N compensation points; The correction curve is determined based on the coordinates of the M×N compensation points.

5. The method according to claim 3, characterized in that, The position compensation value includes M×N first compensation values ​​and M×N second compensation values ​​that correspond one-to-one. Determining the position compensation value based on the correction curve includes: Based on the correction curve, determine M×N first compensation values ​​corresponding to the first coordinate axis; Based on the correction curve, determine M×N second compensation values ​​corresponding to the second coordinate axis.

6. The method according to any one of claims 1 to 5, characterized in that, Establishing the planar coordinate system of the suspended lens based on the moving region includes: Shape recognition is performed on the moving region to determine a first edge and a second edge of the moving region, wherein the first edge and the second edge are perpendicular to each other; Based on the first edge, a first coordinate axis is determined, and based on the second edge, a second coordinate axis is determined; The planar coordinate system is established based on the first coordinate axis and the second coordinate axis.

7. The method according to any one of claims 1 to 5, characterized in that, The step of obtaining the movement area of ​​the suspended lens in the lens module includes: The drive motor is controlled to move the suspended lens in order to determine the maximum moving distance of the suspended lens; The movement area of ​​the suspended lens is determined based on the maximum movement distance.

8. A control device for a lens module, characterized in that, The lens module includes a drive motor and a suspended lens, the drive motor being used to drive the suspended lens to move, and the device comprising: The acquisition unit is used to acquire the movement area of ​​the suspended lens in the lens module; The first processing unit is used to establish the planar coordinate system of the suspended lens based on the moving area; The second processing unit is used to obtain the actual movement trajectory of the suspended lens in the plane coordinate system; The third processing unit is used to determine the position compensation value corresponding to the suspended lens based on the planar coordinate system, the moving area and the actual moving trajectory. The fourth processing unit is used to correct the position of the suspended lens based on the position compensation value when the drive motor drives the suspended lens to move.

9. A control device for a lens module, characterized in that, include: processor; A memory, which stores programs or instructions, wherein a processor, when executing the programs or instructions in the memory, implements the steps of the control method for the lens module as described in any one of claims 1 to 7.

10. A readable storage medium, characterized in that, A program or instruction is stored on a readable storage medium, which, when executed by a processor, implements the steps of the control method for the lens module as described in any one of claims 1 to 7.