A method and device for calibrating a lens module including a voice coil motor
By obtaining the angle and distance information of the lens module, controlling multiple driving current values to capture images, determining the image with the highest definition, and recording the corresponding driving current values, solving the problem of insufficient focus accuracy of the voice coil motor lens module, realizing high-precision image shooting and reducing calibration costs.
Patent Information
- Application Number
- CN202010839189.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-01
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2040-04-01
AI Technical Summary
In the prior art, the focus accuracy of the lens module with a voice coil motor cannot meet the high-definition image definition standards such as iris recognition.
By obtaining the angle and distance information between the lens module and the horizontal plane, the lens module is controlled to capture the target image with multiple driving current values, determine the calibration image with the highest definition, and record the corresponding driving current values to realize the calibration of the lens module.
It improves the focus accuracy of the lens module, meets the needs of high-definition images, reduces calibration costs, and does not rely on high-precision measurement instruments.
Smart Images

Figure CN113496522B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of high-precision measurement technologies, and particularly relates to a method, apparatus, and device for calibrating a lens module including a voice coil motor. Background Art
[0002] In the prior art, in a lens module with a camera function in devices such as smartphones, a voice coil motor (VCM) is usually provided. The function of the voice coil motor in the lens module is to drive the lens to move, so as to adjust the focal length, enabling the lens module to capture clear images.
[0003] The focusing principle of a lens module with a voice coil motor is that within a permanent magnetic field, by changing the magnitude of the direct current in the coil inside the motor, the stretching position of the spring piece is controlled, thereby driving the lens on the spring piece to move. Based on this principle, a lens module with a voice coil motor can achieve relatively high focusing accuracy by itself.
[0004] However, on the other hand, in some prior art technologies, the requirements for image clarity are higher, resulting in the focusing accuracy of existing lens modules with voice coil motors not being able to meet the standards. For example, in iris recognition technology, the lens module is usually used to collect images of the human eye, and then the iris features in the images are analyzed, so the requirements for image clarity are very high. In the field of iris-based identity recognition, the clarity of the images captured by a lens module with a voice coil motor usually cannot meet the technical standards of iris recognition.
[0005] Therefore, how to further improve the focusing accuracy of a lens module with a voice coil motor has become a technical problem to be urgently solved. Summary of the Invention
[0006] In view of this, embodiments of the present specification provide a method, apparatus, and device for calibrating a lens module including a voice coil motor, which are used to improve the focusing accuracy of a lens module with a voice coil motor.
[0007] To solve the above technical problems, the embodiments of the present specification are implemented as follows:
[0008] A method for calibrating a lens module including a voice coil motor provided by an embodiment of the present specification includes:
[0009] Obtaining first angle information; the first angle information represents a first included angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane;
[0010] Obtaining first distance information; the first distance information represents a first distance between the lens module where the voice coil motor is located and a target image for calibration;
[0011] Control the lens module to capture the target image with multiple drive current values to obtain multiple first calibration images; at one of the drive current values, at least one of the first calibration images is captured.
[0012] Determine the first calibration image with the highest clarity from the multiple first calibration images.
[0013] Record the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value of the first distance at the first angle.
[0014] An apparatus for calibrating a lens module provided by an embodiment of this specification includes:
[0015] A lens module fixing part, a target image fixing part, a calibration angle adjusting unit, an angle measuring unit, a connecting rod, and a slide rail.
[0016] The lens module fixing part is connected to the target image fixing part through the connecting rod.
[0017] The middle of the connecting rod is connected to the rotating shaft of the calibration angle adjusting unit; the calibration angle adjusting unit is used to adjust the angle between the lens orientation of the lens module and the horizontal plane.
[0018] The angle measuring unit is arranged on the connecting rod.
[0019] The lens module fixing part is arranged at one end of the connecting rod.
[0020] The slide rail is arranged at the other end of the connecting rod; a distance scale is arranged on the slide rail.
[0021] The target image fixing part is arranged on the slide rail.
[0022] An apparatus for calibrating a lens module including a voice coil motor provided by an embodiment of this specification includes:
[0023] An angle information acquisition module, configured to acquire first angle information; the first angle information represents a first angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane.
[0024] A distance information acquisition module, configured to acquire first distance information; the first distance information represents a first distance between the lens module where the voice coil motor is located and a target image for calibration.
[0025] An image capturing module, configured to control the lens module to capture the target image with multiple drive current values to obtain multiple first calibrated images; at one of the drive current values, at least one of the first calibrated images is captured;
[0026] A highest clarity image determination module, configured to determine the first calibrated image with the highest clarity from the multiple first calibrated images;
[0027] A recording module, configured to record the drive current value corresponding to the first calibrated image with the highest clarity as the calibrated drive current value of the first distance at the first included angle.
[0028] An electronic device provided by an embodiment of the present specification for calibrating a lens module, including:
[0029] At least one processor; and,
[0030] A memory communicatively connected to the at least one processor; wherein,
[0031] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0032] Obtain first angle information; the first angle information represents a first included angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane;
[0033] Obtain first distance information; the first distance information represents a first distance between the lens module where the voice coil motor is located and the target image for calibration;
[0034] Control the lens module to capture the target image with multiple drive current values to obtain multiple first calibrated images; at one of the drive current values, at least one of the first calibrated images is captured;
[0035] Determine the first calibrated image with the highest clarity from the multiple first calibrated images;
[0036] Record the drive current value corresponding to the first calibrated image with the highest clarity as the calibrated drive current value of the first distance at the first included angle.
[0037] The above at least one technical solution adopted by the embodiment of the present specification can achieve the following beneficial effects:
[0038] By controlling the lens module to capture the target image with multiple drive current values, a plurality of first calibration images are obtained; from the plurality of first calibration images, the first calibration image with the highest clarity is determined; the drive current value corresponding to the first calibration image with the highest clarity is recorded as the calibration drive current value corresponding to the first distance at the first included angle; the object distance and the current value of the drive current of the corresponding voice coil motor can be determined, so as to realize the calibration of the lens module with a voice coil motor. By using the calibrated current value to control the lens module to take pictures, the focusing accuracy of the lens module with a voice coil motor can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0040] Figure 1 is a schematic structural diagram of a lens module with a voice coil motor in an embodiment of the present specification;
[0041] Figure 2 is a schematic flowchart of a method for calibrating a lens module including a voice coil motor provided in an embodiment of the present specification;
[0042] Figure 3 is a schematic structural diagram of a calibration device for a lens module provided in an embodiment of the present specification;
[0043] Figure 4 corresponding to the embodiment of the present specification Figure 2 is a schematic structural diagram of a device for calibrating a lens module including a voice coil motor;
[0044] Figure 5 corresponding to the embodiment of the present specification Figure 2 is a schematic structural diagram of an electronic device for calibrating a lens module. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0046] The following will describe in detail the technical solutions provided by the embodiments of the present application in conjunction with the drawings.
[0047] Figure 1This is a schematic structural diagram of a lens module with a voice coil motor in the embodiments of this specification. As Figure 1 shown, it includes: a housing 101 for forming an air-gap magnetic field, a coil winding 102, a lens 103, and an elastic member 104. After a current is passed through the coil winding 102, the coil winding 102 itself generates a magnetic field, which may be referred to as the first magnetic field. The housing 101 for forming the air-gap magnetic field can be made of a permanent magnet material, and the formed magnetic field is the second magnetic field. The interaction between the first magnetic field and the second magnetic field can generate a force for driving the coil winding 102 to move in the axial direction. One end of the coil winding 102 is connected to the elastic member 104, and the other end is provided with loads such as the lens 103. By adjusting the current value of the current flowing through the coil winding 102, the coil winding 102 can be controlled to drive the lens 103 to move to a specified position. After moving to the specified position, the coil winding 102 can reach an equilibrium state under the action of the magnetic force and the elastic force of the elastic member 104. The above is a brief description of the structure and principle of the lens module with a voice coil motor. In the actual structure of the lens module, there are also other parts, which are not all shown here.
[0048] The inventor has found through research that in actual use, the load weight of structures such as the lens 103 carried by the coil winding 102 will exert a pressure on the elastic member 104 under the action of gravity. Moreover, the lens module may be photographed at various angles. When the angle between the lens module and the horizontal plane is different, the pressure value of the above-mentioned pressure will also change. This change in the pressure value will cause the object distance of the lens focusing to change when the current value of the driving current remains unchanged. From the perspective of the object distance, the range of the changed distance can be several centimeters or more; from the perspective of the image distance, the range of the changed distance is from several micrometers to hundreds of micrometers.
[0049] Although this change value is small, however, due to the extremely high requirements for focusing accuracy in technologies such as iris recognition, the above-mentioned small change value will also cause the focusing accuracy to fail to meet the standard.
[0050] For those skilled in the art, when calibrating the lens module, usually, the deviation (also called posture difference) generated due to the shooting posture of the lens module is measured from the perspective of the image distance. As can be seen from the above content, the range of the distance value of the deviation of the image distance is extremely small. When those skilled in the art face the problem of error measurement within an extremely small distance range, they usually use high-precision measuring instruments such as laser rangefinders. However, the cost of such high-precision measuring instruments is very high.
[0051] In view of this, one or more embodiments of this specification provide a method for calibrating a lens module including a voice coil motor, so as to achieve precise calibration of the lens module without using high-cost high-precision measuring instruments.
[0052] Figure 2 This is a schematic flowchart of a method for calibrating a lens module including a voice coil motor provided by an embodiment of this specification. From a program perspective, the execution subject of the process can be a program running on a server or a terminal.
[0053] As Figure 2 shown, this process may include the following steps:
[0054] Step 202: Obtain first angle information; the first angle information represents a first included angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane;
[0055] The included angle between the lens module and the horizontal plane can be adjusted so that the angle of this included angle becomes the first included angle. Then, for the first included angle, the drive current when the lens module takes pictures of images with different object distances is calibrated.
[0056] In practical applications, communication can be carried out with components such as an angle sensor on the device used to calibrate the lens module to obtain the angle information detected by components such as the angle sensor as the first angle information; or data in a pre-set data table for calibrating the lens module can be read, and this data includes the angle information required for calibrating the lens module. This data table can contain various angle data required for calibrating the lens module, and distance data of various distances required for calibrating the lens module at each angle. Similarly, in step 204, the acquisition method for the distance information can also include at least two methods. One is to obtain the distance information detected by components such as a distance sensor as the first distance information; the other is to read the data in a pre-set data table for calibrating the lens module, and this data includes the distance information required for calibrating the lens module.
[0057] It should be noted that when the method of reading the data in the pre-set data table for calibrating the lens module is adopted, the included angle between the lens orientation of the lens module and the horizontal plane can also be controlled according to the read angle data, and the distance between the lens module and the target image can be controlled according to the read distance data.
[0058] Step 204: Obtain first distance information; the first distance information represents a first distance between the lens module where the voice coil motor is located and the target image for calibration;
[0059] The target image can be an image presented by a calibration card with a pattern, or an image displayed by an electronic device with a screen through the screen.
[0060] When the included angle between the lens module and the horizontal plane is kept unchanged as the first included angle, the distance between the lens module and the target image for calibration can be adjusted to make this distance the first distance.
[0061] Step 206: Control the lens module to capture the target image with multiple drive current values to obtain multiple first calibration images; at one drive current value, at least one first calibration image is captured.
[0062] When both the angle and the distance are determined, a drive current within the allowable operating current value range of the lens module can be used to capture the target image. Since the size of the drive current value will cause a change in the object distance for focusing, one drive current value corresponds to one object distance.
[0063] Step 208: Determine the first calibration image with the highest clarity from the multiple first calibration images.
[0064] Since one drive current value corresponds to one object distance and the object distances corresponding to different drive current values are different, the clarity of the first calibration image corresponding to each drive current value is also different.
[0065] Generally, methods such as the Brenner gradient function, Laplacian gradient function, or variance function can be used to detect the clarity of an image. This will not be elaborated here.
[0066] Step 210: Record the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value corresponding to the first distance at the first included angle.
[0067] After recording this calibration drive current value, during subsequent actual shooting, according to the actual included angle and distance, the calibration drive current value can be directly used to drive the lens module to capture images, thus eliminating the need to perform the process of determining the actual object distance.
[0068] Figure 2 In the method in [reference], by controlling the lens module to capture the target image with multiple drive current values to obtain multiple first calibration images; determining the first calibration image with the highest clarity from the multiple first calibration images; recording the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value corresponding to the first distance at the first included angle; the object distance and the corresponding current value of the drive current of the voice coil motor can be determined, thereby realizing the calibration of the lens module with a voice coil motor. On the one hand, using the calibrated current value to control the lens module to take pictures can improve the focusing accuracy of the lens module with a voice coil motor. On the other hand, in the above calibration process, high-precision measurement devices such as expensive laser rangefinders are not used, so the calibration cost is relatively low.
[0069] In practical applications, the drive current values at multiple distances of the lens module at multiple angles can be calibrated. For example, calibration can be performed in an angle range where the angle between the orientation of the lens and the horizontal plane ranges from zero to ninety degrees. More specifically, for example, calibration can be performed at angles such as 0°, 15°, 30°... 90° respectively. At each angle, calibration can be performed at preset distance intervals. For example, calibration can be performed at distances such as 50 cm, 55 cm, 60 cm... 80 cm between the lens module and the target image for calibration respectively. According to the above calibration method, the calibrated drive current values of the lens module at multiple distances at multiple angles can be obtained.
[0070] In practical applications, since the object distance between the lens module and the actual object to be photographed can be any value and cannot be predicted in advance, if the actual object distance is not calibrated in advance, the corresponding calibrated drive current cannot be directly determined.
[0071] To solve the above problems, in the calibration method of the lens module in the embodiments of this specification, after step 210: recording the drive current value corresponding to the calibration image with the highest clarity as the calibrated drive current value corresponding to the first distance at the first included angle, the following steps may be included:
[0072] Based on multiple pairs of calibration values at the first included angle, perform function fitting to obtain the first focus mapping function at the first included angle; the pair of calibration values includes a distance value and the calibrated drive current value corresponding to the one distance value, and the first focus mapping function is used to determine the drive current value according to the known object distance.
[0073] After performing function fitting using the above steps, a focus mapping function can be obtained. Corresponding to one included angle, one focus mapping function can be obtained. The input of the focus mapping function is the distance between the lens module and the actual image to be photographed, and the output is the corresponding drive current value.
[0074] In practical applications, step 206 controls the lens module to photograph the target image with multiple drive current values, which may specifically include the following steps:
[0075] Within the allowable drive current range of the voice coil motor, photograph the target image in ascending order of the drive current value.
[0076] More specifically, the target image can be captured starting from the minimum drive current value within the allowable drive current range. After obtaining the captured image, a set step current value is added to the minimum drive current value to obtain an updated drive current value. Then, the target image is captured using the updated drive current value. The above steps are repeatedly executed until the updated drive current value is the same as or close to the maximum drive current value within the allowable drive current range.
[0077] Of course, the target image can also be captured in sequence in descending order of the drive current value. The specific process is similar to the foregoing process and will not be elaborated here.
[0078] In practical applications, after determining and recording the calibration drive current value corresponding to the first distance at the first angle, the following steps can also be included:
[0079] Control the lens module to move to a position at a second distance from the target image at the first angle;
[0080] Control the lens module to capture the target image with multiple drive current values to obtain multiple second calibration images; at least one second calibration image is captured at one drive current value;
[0081] Determine the second calibration image with the highest clarity from the multiple second calibration images;
[0082] Record the drive current value corresponding to the second calibration image with the highest clarity as the calibration drive current value corresponding to the second distance at the first angle.
[0083] The above steps can achieve automatic control of the distance between the lens module and the target image.
[0084] After all the distances to be calibrated at the first angle are calibrated, the following steps can also be included:
[0085] Control the angle between the lens of the lens module and the horizontal plane to be a second angle;
[0086] Control the lens module to move to a position at a third distance from the target image at the second angle;
[0087] Control the lens module to capture the target image with multiple drive current values to obtain multiple third calibration images; at least one third calibration image is captured at one drive current value;
[0088] Determine the third calibration image with the highest clarity from the multiple third calibration images;
[0089] Record the drive current value corresponding to the third calibration image with the highest clarity as the calibration drive current value corresponding to the third distance at the second included angle.
[0090] The above steps can achieve the calibration of the drive current value for the set distance at the second included angle.
[0091] In practical applications, some programs are developed based on the correspondence between the image distance of the lens module and the drive current value. To improve the compatibility of the calibration method in the embodiments of this specification, step 210 may further specifically include the following steps:
[0092] According to the imaging formula, determine the first image distance corresponding to the first distance; the first image distance is used to represent the distance between the lens module where the voice coil motor is located and the formed image.
[0093] Record the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value corresponding to the first image distance at the first included angle.
[0094] In the above steps, the imaging formula is the lens imaging formula, also known as the Gaussian imaging formula. The specific expression form is 1 / f = 1 / u + 1 / v. Where f is the focal length, positive for convex and negative for concave; u is the object distance; v is the image distance, positive for real and negative for virtual. When the focal length and the object distance are known, the image distance can be determined by the imaging formula.
[0095] By using the above steps, after obtaining the correspondence between the image distance and the drive current, the compatibility for programs developed based on the correspondence between the image distance of the lens module and the drive current value can be improved.
[0096] In practical applications, after obtaining multiple correspondences between the image distance and the drive current value (the form of expression can be a numerical pair) at the first included angle, a second focus mapping function at the first included angle can be obtained by performing function fitting based on the multiple calibration numerical pairs at the first included angle; the calibration numerical pair includes an image distance value and the corresponding calibration drive current value, and the focus mapping function is used to determine the drive current value according to the known image distance.
[0097] In practical applications, after completing the calibration of the drive current value corresponding to the first image distance at the first included angle, the following steps can also be used to calibrate the drive current of another image distance at the first included angle:
[0098] Control the lens module to move to a position where it is at a fourth distance from the target image at the first included angle;
[0099] Control the lens module to take pictures of the target image with multiple drive current values to obtain multiple fourth calibration images; at least one fourth calibration image is taken at one drive current value.
[0100] Determine the fourth calibration image with the highest clarity from the multiple fourth calibration images;
[0101] Determine the second image distance corresponding to the fourth distance according to the imaging formula;
[0102] Record the drive current value corresponding to the fourth calibration image with the highest clarity as the calibration drive current value corresponding to the second image distance at the first included angle.
[0103] In practical applications, after calibrating the drive currents of all set image distances at the first included angle, the included angle between the lens orientation of the lens module and the horizontal plane can be adjusted to perform a new round of calibration.
[0104] When performing calibration after adjusting the included angle of the lens module, it can specifically include the following steps:
[0105] Control the included angle between the lens orientation of the lens module and the horizontal plane to be the third included angle;
[0106] Control the lens module to move to a position at a fifth distance from the target image at the third included angle;
[0107] Control the lens module to capture the target image with multiple drive current values to obtain multiple fifth calibration images; at least one of the fifth calibration images is captured at one drive current value;
[0108] Determine the fifth calibration image with the highest clarity from the multiple fifth calibration images;
[0109] Determine the third image distance corresponding to the fifth distance according to the imaging formula;
[0110] Record the drive current value corresponding to the fifth calibration image with the highest clarity as the calibration drive current value corresponding to the fifth distance at the second included angle.
[0111] In practical applications, the correspondence between the calibration drive current value and the object distance, or the correspondence between the calibration drive current value and the image distance, can be represented and stored by a function obtained by fitting, or the data related to this correspondence can be stored in a data table without performing function fitting.
[0112] The embodiment of this specification also provides a calibration device for a lens module.
[0113] Figure 3 It is a schematic structural diagram of the calibration device for the lens module provided by the embodiment of this specification. As Figure 3 shown, the device may include:
[0114] Lens module fixing part 301, target image fixing part 302, calibration angle adjustment unit 303, angle measurement unit 304, connecting rod 305 and slide rail 306;
[0115] The lens module fixing part 301 is connected to the target image fixing part 302 through the connecting rod 305;
[0116] The middle part of the connecting rod 305 is connected to the rotating shaft of the calibration angle adjustment unit 303; the calibration angle adjustment unit is used to adjust the included angle between the lens orientation of the lens module and the horizontal plane;
[0117] The angle measurement unit 304 is arranged on the connecting rod 305;
[0118] The lens module fixing part 301 is arranged at one end of the connecting rod 305;
[0119] The slide rail 306 is arranged at the other end of the connecting rod 305; a distance scale is arranged on the slide rail 306;
[0120] The target image fixing part 302 is arranged on the slide rail 306.
[0121] In practical applications, the lens module fixing part 301 may specifically include:
[0122] A first bracket and a module clamp ( Figure 3 not shown); one end of the first bracket is fixed at one end of the connecting rod, and the other end of the first bracket is provided with the module clamp.
[0123] The target image fixing part 302 may specifically include:
[0124] A second bracket and a calibration card placement area ( Figure 3 not shown); one end of the second bracket is movably arranged on the slide rail, and the other end of the second bracket is provided with the calibration card placement area.
[0125] The lens module to be calibrated and the target image for calibration are fixed on the above-mentioned calibration device of the lens module. Then, the object distance between the lens module and the target image, and the included angle between the orientation of the lens module and the horizontal plane can be adjusted manually or automatically. The target image for calibration can be a calibration card with patterns. During the process of adjusting the object distance between the lens module and the target image, and the included angle between the orientation of the lens module and the horizontal plane, or after the adjustment is completed, the angle can be obtained through the angle measurement unit 304, and the object distance can be obtained through the scale on the slide rail 306.
[0126] In practical applications, the calibration device can also be automatically controlled by a computer 310. The computer 310 can control the calibration device based on Figure 2 the method shown in, so as to reduce labor costs and further improve efficiency.
[0127] It should be noted that when no external computer is used, the calibration device itself can also include a controller. The controller is used to execute the same or similar calibration method as the computer 310 to achieve the control of the calibration device. In practical applications, for the adjustment of the angle and distance between the lens module and the target image, it can be manually controlled or controlled by the controller. When controlled by the controller, the controller can control the calibration angle adjustment unit to adjust the angle between the lens orientation of the lens module and the horizontal plane; and / or control the second bracket to move on the slide rail.
[0128] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 4 For the embodiments of this specification to provide the corresponding Figure 2 structural schematic diagram of a device for calibrating a lens module including a voice coil motor. As Figure 4 shown, the device may include:
[0129] An angle information acquisition module 402, configured to acquire first angle information; the first angle information represents a first included angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane;
[0130] A distance information acquisition module 404, configured to acquire first distance information; the first distance information represents a first distance between the lens module where the voice coil motor is located and the target image for calibration;
[0131] An image capturing module 406, configured to control the lens module to capture the target image with multiple drive current values to obtain multiple first calibration images; at least one first calibration image is captured at one drive current value;
[0132] A highest clarity image determination module 408, configured to determine the first calibration image with the highest clarity from the multiple first calibration images;
[0133] A recording module 410, configured to record the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value of the first distance at the first included angle.
[0134] By using the above device, the calibration of a lens module with a voice coil motor can be achieved. Moreover, by controlling the lens module to take pictures with the calibrated current value, the focusing accuracy of the lens module with a voice coil motor can be improved. At the same time, in the above calibration device, high-precision measuring devices such as expensive laser rangefinders are not used, so the calibration cost is relatively low.
[0135] In practical applications, the image capturing module 406 may specifically include:
[0136] A first capturing unit, configured to capture the target image in sequence within the allowable driving current range of the voice coil motor in ascending order of the driving current value.
[0137] Alternatively, a second capturing unit, configured to capture the target image in sequence within the allowable driving current range of the voice coil motor in descending order of the driving current value.
[0138] In practical applications, the recording module 410 may specifically include:
[0139] A first recording unit, configured to record the driving current value corresponding to the first calibration image with the highest clarity as the calibration driving current value corresponding to the first distance at the first included angle.
[0140] In practical applications, the device may further include:
[0141] A first function fitting module, configured to, after recording the driving current value corresponding to the calibration image with the highest clarity as the calibration driving current value corresponding to the first distance at the first included angle, perform function fitting based on multiple first calibration value pairs at the first included angle to obtain a first focusing mapping function at the first included angle; the first calibration value pair includes a distance value and a calibration driving current value corresponding to the distance value, and the first focusing mapping function is used to determine the driving current value according to a known object distance.
[0142] In practical applications, the recording module 410 may specifically include:
[0143] An image distance determining unit, configured to determine a first image distance corresponding to the first distance according to the imaging formula; the first image distance is used to represent the distance between the lens module where the voice coil motor is located and the formed image.
[0144] A second recording unit, configured to record the driving current value corresponding to the first calibration image with the highest clarity as the calibration driving current value corresponding to the first image distance at the first included angle.
[0145] In practical applications, the device may further include:
[0146] A second function fitting module, which is configured to record the drive current value corresponding to the calibrated image with the highest clarity as the calibrated drive current value corresponding to the first image distance at the first included angle, and then perform function fitting based on multiple second calibration value pairs at the first included angle to obtain a second focusing mapping function at the first included angle; each second calibration value pair includes an image distance value and a calibrated drive current value corresponding to the image distance value, and the second focusing mapping function is used to determine the drive current value according to a known image distance.
[0147] In practical applications, the device may further include:
[0148] A distance control module, which is configured to control the lens module to move to a position at a first distance from the target image at the first included angle before controlling the lens module to capture the target image with multiple drive current values.
[0149] In practical applications, the device may further include:
[0150] An angle control module, which is configured to adjust the included angle between the lens orientation of the lens module and the horizontal plane to the first included angle before controlling the lens module to move to a position at a first distance from the target image at the first included angle.
[0151] Based on the same idea, an embodiment of this specification also provides an electronic device corresponding to the above method.
[0152] Figure 5 For the embodiment of this specification, it provides Figure 2 a schematic structural diagram of an electronic device for calibrating a lens module. As Figure 5 shown, the electronic device 500 may include:
[0153] At least one processor 510; and,
[0154] A memory 530 communicatively connected to the at least one processor; wherein,
[0155] the memory 530 stores instructions 520 executable by the at least one processor 510, and when the instructions are executed by the at least one processor 510, the at least one processor 510 is enabled to:
[0156] Obtain first angle information; the first angle information represents a first included angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane;
[0157] Obtain first distance information; the first distance information represents a first distance between the lens module where the voice coil motor is located and a target image for calibration;
[0158] Control the lens module to capture the target image with multiple drive current values to obtain multiple first calibration images; at one of the drive current values, at least one of the first calibration images is captured;
[0159] Determine the first calibration image with the highest clarity from the multiple first calibration images;
[0160] Record the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value of the first distance at the first included angle.
[0161] It should be noted that Figure 3 the computer 310 in Figure 5 can be a specific implementation of the electronic device shown.
[0162] By using Figure 5 the electronic device shown, the calibration of the lens module with a voice coil motor can be realized. Moreover, by controlling the lens module to take pictures with the calibrated current value, the focusing accuracy of the lens module with a voice coil motor can be improved. At the same time, in the above calibration device, high-precision measuring devices such as expensive laser rangefinders are not used, so the calibration cost is low.
[0163] The specific embodiments of this specification are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0164] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structures of diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many method flow improvements today can be regarded as direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented using a hardware entity module. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by the user programming the device. Designers can program themselves to "integrate" a digital system onto a single PLD, without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compilers used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called a Hardware Description Language (HDL), and there is not just one type of HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones currently are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that by simply performing a little logical programming on the method flow using the above-mentioned several hardware description languages and programming it into an integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.
[0165] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to make the controller implement the same function in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or structures within the hardware component.
[0166] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0167] For the convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0168] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0169] The present invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each flow and / or block in the flowchart illustrations and / or block diagrams, and combinations of flows and / or blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device create means for implementing the functions specified in the flowchart Figure 1 for one or more flows and / or blocks Figure 1 for one or more blocks.
[0170] These computer program instructions may also be stored in a computer-readable memory 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 memory produce an article of manufacture including instruction means that implement the functions specified in the flowchart Figure 1 for one or more flows and / or blocks Figure 1 for one or more blocks.
[0171] These computer program instructions may also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flowchart Figure 1 for one or more flows and / or blocks Figure 1 for one or more blocks.
[0172] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0173] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.
[0174] A computer-readable medium includes permanent and non-permanent, removable and non-removable media that can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0175] It should also be noted that the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.
[0176] This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0177] Each embodiment in this specification is described in a progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0178] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various modifications and variations can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for calibrating a lens module including a voice coil motor, comprising: Obtaining first angle information; The first angle information represents a first included angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane; the first angle information is adjusted based on a calibration angle adjustment unit of a device for calibrating the lens module; a rotating shaft of the calibration angle adjustment unit is connected to the middle of a connecting rod of the device for calibrating the lens module; lens module fixing parts and target image fixing parts are respectively arranged at two ends of the connecting rod; Obtaining first distance information; the first distance information represents a first distance between the lens module where the voice coil motor is located and a target image for calibration; the first distance information is measured based on a distance scale of a device for calibrating the lens module; Controlling the lens module to capture the target image with multiple drive current values to obtain multiple first calibration images; Determining the first calibration image with the highest clarity from the multiple first calibration images; Recording the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value for the first distance at the first included angle.
2. The method according to claim 1, wherein the controlling the lens module to capture the target image with multiple drive current values specifically includes: Within the allowable drive current range of the voice coil motor, capturing the target image in sequence according to the order of increasing drive current values; Or, within the allowable drive current range of the voice coil motor, capturing the target image in sequence according to the order of decreasing drive current values.
3. The method according to claim 1, wherein the recording the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value specifically includes: Recording the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value for the first distance corresponding to the first included angle.
4. The method according to claim 3, after the recording the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value for the first distance corresponding to the first included angle, further comprising: Performing function fitting based on multiple first calibration value pairs at the first included angle to obtain a first focusing mapping function at the first included angle; The first calibration value pair includes a first distance value and a calibration drive current value corresponding to the first distance value, and the first focusing mapping function is used to determine the drive current value according to the first distance value.
5. The method according to claim 1, wherein the recording the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value specifically includes: Determining a first image distance corresponding to the first distance according to the imaging formula; The first image distance is used to represent the distance between the lens module where the voice coil motor is located and the formed image; Recording the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value for the first image distance corresponding to the first included angle.
6. The method according to claim 5, after recording the drive current value corresponding to the calibration image with the highest clarity as the calibration drive current value corresponding to the first image distance at the first included angle, further comprising: Performing function fitting based on a plurality of second calibration value pairs at the first included angle to obtain a second focusing mapping function at the first included angle; Each of the second calibration value pairs includes an image distance value and a calibration drive current value corresponding to the image distance value, and the second focusing mapping function is used to determine the drive current value according to a known image distance.
7. The method according to any one of claims 1 to 6, before controlling the lens module to capture the target image with a plurality of drive current values, further comprising: Controlling the lens module to move to a position at a first distance from the target image at the first included angle.
8. The method according to claim 7, before controlling the lens module to move to a position at a first distance from the target image at the first included angle, further comprising: Adjusting the included angle between the lens orientation of the lens module and the horizontal plane to the first included angle.
9. The method according to claim 1, wherein obtaining the first angle information specifically comprises: Obtaining first angle information detected by an angle sensor on a device for calibrating the lens module.
10. A device for calibrating a lens module, comprising: A lens module fixing part, a target image fixing part, a calibration angle adjusting unit, an angle measuring unit, a connecting rod, and a slide rail; The lens module fixing part is connected to the target image fixing part through the connecting rod; The middle of the connecting rod is connected to the rotating shaft of the calibration angle adjusting unit; the calibration angle adjusting unit is used to adjust the included angle between the lens orientation of the lens module and the horizontal plane; The angle measuring unit is arranged on the connecting rod; The lens module fixing part is arranged at one end of the connecting rod; The slide rail is arranged at the other end of the connecting rod; a distance scale is arranged on the slide rail; The target image fixing part is arranged on the slide rail; The device further comprises: A controller, configured to obtain first angle information measured by the angle measuring unit; the first angle information represents a first included angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane; Obtaining first distance information measured based on the distance scale; the first distance information represents a first distance between the lens module where the voice coil motor is located and the target image for calibration; Controlling the lens module to capture the target image with a plurality of drive current values to obtain a plurality of first calibration images, including: sequentially capturing the target image in ascending order or descending order of the drive current values within the allowable drive current range of the voice coil motor; Determining the first calibration image with the highest clarity from the plurality of first calibration images; Recording the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value of the first distance at the first included angle.
11. The device according to claim 10, wherein the lens module fixing part specifically comprises: A first bracket and a module fixture; one end of the first bracket is fixed to one end of the connecting rod, and the module fixture is provided at the other end of the first bracket.
12. The device according to claim 10, wherein the target image fixing part specifically comprises: A second bracket and a target card placement area; one end of the second bracket is movably arranged on the slide rail, and the target card placement area is provided at the other end of the second bracket.
13. The device according to claim 12, wherein the controller is further configured to: Control the calibration angle adjustment unit to adjust the included angle between the lens orientation of the lens module and the horizontal plane; And / or, control the second bracket to move on the slide rail.
14. A device for calibrating a lens module including a voice coil motor, comprising: An angle information acquisition module, configured to acquire first angle information; The first angle information represents a first included angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane; the first angle information is adjusted based on a calibration angle adjustment unit of a device for calibrating the lens module; a rotating shaft of the calibration angle adjustment unit is connected to the middle of a connecting rod of the device for calibrating the lens module; lens module fixing parts and target image fixing parts are respectively arranged at both ends of the connecting rod; A distance information acquisition module, configured to acquire first distance information; the first distance information represents a first distance between the lens module where the voice coil motor is located and a target image for calibration; the first distance information is measured based on a distance scale of a device for calibrating the lens module; An image capturing module, configured to control the lens module to capture the target image with a plurality of drive current values to obtain a plurality of first calibration images; A highest clarity image determination module, configured to determine the first calibration image with the highest clarity from the plurality of first calibration images; A recording module, configured to record the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value of the first distance at the first included angle.
15. The device according to claim 14, wherein the image capturing module specifically comprises: A first capturing unit, configured to sequentially capture the target image in ascending order of drive current values within the allowable drive current range of the voice coil motor; Or, a second capturing unit, configured to sequentially capture the target image in descending order of drive current values within the allowable drive current range of the voice coil motor.
16. The device according to claim 14, wherein the recording module specifically comprises: A first recording unit, configured to record the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value corresponding to the first distance at the first included angle.
17. The device according to claim 16, further comprising: The first function fitting module is configured to, after recording the drive current value corresponding to the calibrated image with the highest clarity as the calibrated drive current value corresponding to the first distance at the first included angle, perform function fitting based on multiple first calibrated value pairs at the first included angle to obtain the first focus mapping function at the first included angle; the first calibrated value pair includes a distance value and the calibrated drive current value corresponding to the distance value, and the first focus mapping function is used to determine the drive current value according to the known object distance.
18. The apparatus according to claim 14, wherein the recording module specifically includes: An image distance determination unit configured to determine the first image distance corresponding to the first distance according to the imaging formula; The first image distance is used to represent the distance between the lens module where the voice coil motor is located and the formed image; A second recording unit configured to record the drive current value corresponding to the first calibrated image with the highest clarity as the calibrated drive current value corresponding to the first image distance at the first included angle.
19. The apparatus according to claim 18, further comprising: A second function fitting module configured to, after recording the drive current value corresponding to the calibrated image with the highest clarity as the calibrated drive current value corresponding to the first image distance at the first included angle, perform function fitting based on multiple second calibrated value pairs at the first included angle to obtain the second focus mapping function at the first included angle; the second calibrated value pair includes an image distance value and the calibrated drive current value corresponding to the image distance value, and the second focus mapping function is used to determine the drive current value according to the known image distance.
20. The apparatus according to any one of claims 14 to 19, further comprising: A distance control module configured to, before controlling the lens module to capture the target image with multiple drive current values, control the lens module to move to a position at a distance of the first distance from the target image at the first included angle.
21. The apparatus according to claim 20, further comprising: An angle control module configured to, before controlling the lens module to move to a position at a distance of the first distance from the target image at the first included angle, adjust the included angle between the lens orientation of the lens module and the horizontal plane to the first included angle.
22. An electronic device for calibrating a lens module, comprising: At least one processor; And, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is capable of: Obtain first angle information; the first angle information represents the first included angle between the lens orientation of the lens module where the voice coil motor is located and the horizontal plane; the first angle information is adjusted by a calibration angle adjustment unit of a device for calibrating the lens module; a rotating shaft of the calibration angle adjustment unit is connected to the middle of a connecting rod of the device for calibrating the lens module; lens module fixing parts and target image fixing parts are respectively arranged at two ends of the connecting rod; Obtain first distance information; the first distance information represents the first distance between the lens module where the voice coil motor is located and the target image for calibration; the first distance information is obtained by measuring the distance scale of the device for calibrating the lens module. Control the lens module to capture the target image with multiple drive current values to obtain multiple first calibration images. Determine the first calibration image with the highest clarity from the multiple first calibration images. Record the drive current value corresponding to the first calibration image with the highest clarity as the calibration drive current value of the first distance at the first included angle.
Citation Information
Patent Citations
Portable electronic devices and auto-focus control methods for cameras therein
CN102752506A
Distance measurement method, device and terminal device
CN105891812A
Method for calibrating image capture device
CN106664365A
Device and method for focusing test of intelligent terminal
CN109451301A