CN114157801A - Switching control method and device of camera module and storage medium - Google Patents
Switching control method and device of camera module and storage medium Download PDFInfo
- Publication number
- CN114157801A CN114157801A CN202010934848.7A CN202010934848A CN114157801A CN 114157801 A CN114157801 A CN 114157801A CN 202010934848 A CN202010934848 A CN 202010934848A CN 114157801 A CN114157801 A CN 114157801A
- Authority
- CN
- China
- Prior art keywords
- physical distance
- motor driving
- current
- driving current
- camera module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000013507 mapping Methods 0.000 claims abstract description 105
- 230000006870 function Effects 0.000 claims description 21
- 230000008569 process Effects 0.000 abstract description 10
- 238000012545 processing Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 10
- 238000001514 detection method Methods 0.000 description 8
- 238000003384 imaging method Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/66—Remote control of cameras or camera parts, e.g. by remote control devices
- H04N23/663—Remote control of cameras or camera parts, e.g. by remote control devices for controlling interchangeable camera parts based on electronic image sensor signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/67—Focus control based on electronic image sensor signals
- H04N23/671—Focus control based on electronic image sensor signals in combination with active ranging signals, e.g. using light or sound signals emitted toward objects
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
The disclosure relates to a switching control method and device of a camera module and a storage medium. The switching control method of the camera module comprises the following steps: determining a current motor driving current logic value for switching based on the focusing logic value of the camera module; compensating the current physical distance corresponding to the current logical value of the motor driving current based on the mapping relation between the logical value of the motor driving current and the actual physical distance to obtain a first compensated physical distance; based on the first compensation physical distance, the camera module is controlled to be switched. Through the embodiment of the disclosure, in the switching process of the camera module, the physical distance of OTP burning is compensated based on the mapping relation between the logical value of the driving current of the driving motor of the camera module and the actual physical distance, the camera is controlled to switch by utilizing the more accurate physical distance, and the smooth switching of the lens module of the multi-camera lens is ensured.
Description
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a method and an apparatus for controlling switching of a camera module, and a storage medium.
Background
With the development of scientific technology, the terminal and the image processing technology are receiving much attention, the shooting function of the terminal is more and more powerful, and the configuration of the terminal is higher and higher. In order to obtain a higher quality picture during shooting using the terminal, the terminal is configured with a plurality of lens modules, such as a short-focus lens, a long-focus lens, a medium-focus lens, and the like, so as to shoot scenes at different distances.
And focusing by using the terminal camera, namely zooming according to the current shooting scene, namely switching different lens modules for switching so as to obtain the picture with the highest definition. To the terminal that has different focuses and visual field, can appear blurring, the shake of image in the switching of camera module, greatly reduced user experience.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method and an apparatus for controlling switching of a camera module, and a storage medium.
According to an aspect of the embodiments of the present disclosure, a method for controlling switching of a camera module is provided, including: determining a current motor driving current logic value for driving the camera module to switch based on a focusing logic value of the camera module; compensating the current physical distance corresponding to the current motor driving current logical value based on the mapping relation between the motor driving current logical value and the actual physical distance to obtain a first compensation physical distance; and controlling the camera module to switch based on the first compensation physical distance.
In an embodiment, compensating a current physical distance corresponding to the current logical value of the motor driving current based on a mapping relationship between the logical value of the motor driving current and an actual physical distance to obtain a first compensated physical distance includes: determining two motor driving current logic values having the smallest difference value with the current motor driving current logic value among a plurality of motor driving current logic values included in the mapping relation; and compensating the current physical distance corresponding to the current motor driving current logical value based on the actual physical distance corresponding to the two motor driving current logical values respectively to obtain a first compensation physical distance.
In an embodiment, compensating a current physical distance corresponding to the current motor driving current logical value based on an actual physical distance corresponding to each of the two motor driving current logical values to obtain a first compensated physical distance includes: determining a linear difference function based on the actual physical distances corresponding to the two motor driving current logic values respectively; and determining a first compensation physical distance for compensating the current physical distance corresponding to the current motor driving current logic value based on the linear difference function.
In one embodiment, the preset mapping relationship between the logical value of the motor driving current and the actual physical distance is determined as follows: determining a plurality of actual physical distances obtained by the camera module through laser radar ranging for a plane object, respectively focusing each actual physical distance in the plurality of actual physical distances to obtain a focusing logic value, and determining a plurality of motor driving current logic values of the camera module based on the corresponding relation between the focusing logic value and the motor driving current logic value; and establishing mapping relations between the plurality of motor driving current logical values and the plurality of actual physical distances, and storing the mapping relations between the plurality of motor driving current logical values and the plurality of actual physical distances.
In an embodiment, controlling the camera module to switch based on the first compensation physical distance includes: acquiring a current temperature value of the camera module; compensating the first compensation physical distance corresponding to the current temperature value based on the mapping relation between the temperature value and the actual physical distance to obtain a second compensation physical distance; and controlling the camera module to switch based on the second compensation physical distance.
In an embodiment, compensating for the first compensated physical distance corresponding to the current temperature value based on a mapping relationship between the temperature value and an actual physical distance includes: determining two temperature values with the smallest difference value with the current temperature value in a plurality of temperature values included in the mapping relation; and compensating the first compensation physical distance corresponding to the current temperature value based on the actual physical distances corresponding to the two temperature values respectively.
In an embodiment, the method further comprises: in the mapping relation storage space created in advance, a mapping relation among the focusing logical value, the plurality of motor driving current logical values, the temperature, and the plurality of actual physical distances is saved.
According to a second aspect of the embodiments of the present disclosure, there is provided a switching control apparatus for a camera module, including a determining module, configured to determine a current motor driving current logic value for driving the camera module to switch based on a focusing logic value of the camera module; the compensation module is used for compensating the current physical distance corresponding to the current logical value of the motor driving current based on the mapping relation between the logical value of the motor driving current and the actual physical distance; and the control module is used for controlling the camera module to switch based on the compensated current physical distance.
In an embodiment, the compensation module compensates a current physical distance corresponding to the current logical value of the motor driving current based on a mapping relationship between the logical value of the motor driving current and an actual physical distance in the following manner to obtain a first compensated physical distance: determining two motor driving current logic values having the smallest difference value with the current motor driving current logic value among a plurality of motor driving current logic values included in the mapping relation; and compensating the current physical distance corresponding to the current motor driving current logical value based on the actual physical distance corresponding to the two motor driving current logical values respectively to obtain a first compensation physical distance.
In an embodiment, the compensation module compensates a current physical distance corresponding to the current logical value of the motor driving current based on an actual physical distance corresponding to each of the two logical values of the motor driving current in the following manner to obtain a first compensated physical distance: determining a linear difference function based on actual physical distances corresponding to the two motor driving current logic values respectively; and determining a first compensation physical distance for compensating the current physical distance corresponding to the current motor driving current logic value based on the linear difference function.
In one embodiment, the determination module determines the preset mapping relationship between the logical value of the motor driving current and the actual physical distance by: determining a plurality of actual physical distances obtained by the camera module through laser radar ranging for a planar object, determining focusing logic values obtained by focusing for each actual physical distance in the actual physical distances, and determining a plurality of motor driving current logic values of the camera module based on the corresponding relation between the focusing logic values and the motor driving current logic values; and establishing mapping relations between the plurality of motor driving current logical values and the plurality of actual physical distances, and storing the mapping relations between the plurality of motor driving current logical values and the plurality of actual physical distances.
In an embodiment, the control module controls the camera module to switch based on the first compensation physical distance in the following manner: acquiring a current temperature value of the camera module; compensating the first compensation physical distance corresponding to the current temperature value based on the mapping relation between the temperature value and the actual physical distance to obtain a second compensation physical distance; and controlling the camera module to switch based on the second compensation physical distance.
In an embodiment, the control module compensates the first compensated physical distance corresponding to the current temperature value based on a mapping relationship between the temperature value and the actual physical distance in the following manner: determining two temperature values with the smallest difference value with the current temperature value in a plurality of temperature values included in the mapping relation; and compensating the first compensation physical distance corresponding to the current temperature value based on the actual physical distances corresponding to the two temperature values respectively.
In one embodiment, the determining module is further configured to: in the mapping relation storage space created in advance, the mapping relation among the focusing logical value, the motor driving current logical value, the temperature and the actual physical distance is saved.
According to yet another aspect of the embodiments of the present disclosure, there is provided an apparatus, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: performing the method of any of the preceding claims.
According to yet another aspect of embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium having instructions stored thereon that, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the method of any one of the preceding claims.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: based on the mapping relation between the logical value of the motor driving current and the actual physical distance, the current physical distance corresponding to the logical value of the current motor driving current is compensated to obtain a first compensated physical distance, so that the defect of inaccurate physical distance caused by OTP burning can be overcome to obtain a more accurate physical distance. Based on the first compensation physical distance, the camera module is controlled to be switched, the camera is controlled to be switched by utilizing the more accurate physical distance, and smooth switching of the lens module of the multi-camera lens is guaranteed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a switching control method of a camera module according to an exemplary embodiment of the present disclosure.
FIG. 2 is a schematic diagram illustrating determination of a current physical distance using originally burned OTP data according to an exemplary embodiment of the disclosure.
Fig. 3 is a flowchart illustrating a method of compensating for a current physical distance according to an exemplary embodiment of the present disclosure.
Fig. 4 is a flow chart illustrating a method of deriving a first compensated physical distance according to an exemplary embodiment of the present disclosure.
Fig. 5 is a flowchart illustrating a method of determining a preset mapping relationship between a logical value of a motor driving current and an actual physical distance according to an exemplary embodiment of the present disclosure.
FIG. 6 is a schematic diagram illustrating compensation for a present physical distance corresponding to a present motor drive current logical value according to one example of the present disclosure.
FIG. 7 is a schematic diagram illustrating compensation for a present physical distance to which a present motor drive current logical value corresponds according to yet another example of the present disclosure.
Fig. 8 is a flowchart illustrating a method for controlling a camera module to switch based on a first compensated physical distance according to an exemplary embodiment of the present disclosure.
Fig. 9 is a flowchart illustrating a method of compensating a first compensated physical distance corresponding to a current temperature value according to an exemplary embodiment of the present disclosure.
Fig. 10 is a block diagram illustrating a switching control apparatus of a camera module according to an exemplary embodiment of the present disclosure.
Fig. 11 is a block diagram illustrating an apparatus according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
With the continuous development of the technology, the terminal technology is concerned with, and a camera arranged in the terminal can be used conveniently and has good operability, so that a user can shoot at any time and any place in work and life. The function of the camera becomes one of important performance parameters of the terminal, is paid much attention by the user, and becomes an important consideration for the user to select the electronic equipment. The shooting function of the terminal is more and more abundant, and in order to make the definition and the pixel quality of the shot picture or video meet the use requirements of users, the configuration of the terminal is higher and higher.
In order to obtain a higher quality picture during photographing using the terminal, the terminal is configured with a plurality of lens modules, such as a short-focus lens, a long-focus lens, a medium-focus lens, and the like, for photographing scenes at different distances. Because individual difference, its formation of image effect is different between the module of making a video recording, only leans on one set of fixed imaging parameter to make all modules of making a video recording all reach unanimous formation of image effect hardly.
In order to improve the consistency of the imaging effect of the camera module, before the camera module leaves the factory, the original imaging parameters and the calibration imaging parameters of the camera module are generally programmed into a One Time Programmable (OTP) memory. For example, a focusing logic value, a motor driving current logic value, etc. required for driving the physical distance are correspondingly calculated according to the physical distance of the shot object, and the calculated focusing logic value and the motor driving current logic value are burned in the OTO. When the shooting module of the terminal is used for shooting, the original imaging parameters burnt in the OTP are read and the imaging parameters are calibrated so as to realize the consistency of imaging effects between the shooting modules.
However, due to the influence of cost, manufacturing process and temperature, the OTP data actually recorded by the camera module has a deviation with an ideal value, and cannot be completely consistent. The influence caused by the deviation of the burning data causes the unsmooth switching among the camera modules in the focusing debugging.
Therefore, the switching control method of the camera module compensates OTP burning data, utilizes the compensated data to switch the camera module, realizes more accurate physical distance control camera switching, ensures smooth switching of the lens module of the multi-camera lens, prevents the lens from being stretched too much, and further improves user experience.
Fig. 1 is a flowchart illustrating a method for controlling switching of a camera module according to an exemplary embodiment of the present disclosure, where the method for controlling switching of a camera module is used in a terminal, as shown in fig. 1. The terminal can be a smart phone, a tablet computer, a wearable device or a PC, and the like, and is configured with a plurality of camera modules. The embodiment of the present disclosure does not limit the kind of the applied device. Referring to fig. 1, the switching control method of the camera module includes the following steps.
In step S101, a current motor driving current logic value for driving the camera module to switch is determined based on the focusing logic value of the camera module.
In step S102, a current physical distance corresponding to the current logical value of the motor driving current is compensated based on a mapping relationship between the logical value of the motor driving current and the actual physical distance, so as to obtain a first compensated physical distance.
In step S103, the camera module is controlled to switch based on the first compensation physical distance.
In the embodiment of the disclosure, when the camera module focuses, the camera module focuses to obtain a focusing logic value. The focusing logic value of the camera module and the motor driving current logic value of the driving camera module have a one-to-one correspondence relationship. Therefore, based on the focusing logic value of the camera module, the current motor driving current logic value for driving the camera module to switch can be determined, so that the motor of the camera module controls the camera module to move according to the driving current logic value, and the focusing function can be realized.
The mapping relationship exists between the logical value of the motor driving current and the actual physical distance, which can be burnt in the OTP, and the current physical distance corresponding to the logical value of the current motor driving current is compensated according to the mapping relationship between the logical value of the motor driving current and the actual physical distance, so that a more accurate compensated first compensated physical distance is obtained.
Wherein, based on the more accurate first compensation physical distance after the compensation, control the camera module and switch, the camera module switches including, whether the switching of camera module is carried out to the first compensation physical distance after the compensation is confirmed to when confirming to carry out the switching of camera module, give the camera module after switching back first compensation physical distance, as the initial position of focusing, realize focusing more accurately, effectively.
Fig. 2 shows a schematic diagram of determining the current physical distance using the originally burned OTP data. As shown in fig. 2, the raw OTP data may be a mapping between the logical value of the motor drive current and the physical distance.
In the focusing process, the corresponding motor driving current logic value is searched by using the focusing logic value determined by focusing, and the physical distance corresponding to the motor driving current logic value is read in the original OTP data.
For example, the actual physical distance in an ideal state in which the camera module 1 and the camera module 2 are switched is 1m, and the actual physical focus distance is 1.1 m. In the focusing process, due to inaccurate OTP burning, the camera module 1 determines to drive the camera module to switch the distance value to a value smaller than 1m based on the original OTP data according to the focusing logic value of the camera module obtained by normal focusing and focusing, so that the camera module 2 cannot be successfully switched, and the switching fails.
According to the embodiment of the disclosure, the current motor driving current logical value for driving the camera module to switch is determined through the focusing logical value based on the camera module, the current physical distance corresponding to the current motor driving current logical value is compensated based on the mapping relation between the motor driving current logical value and the actual physical distance, the camera module is controlled to switch based on the compensated first compensation physical distance, the shooting focusing process of a multi-camera lens terminal is guaranteed, the smooth switching of focusing pictures is achieved, the lens is prevented from being stretched too much, and therefore user experience is improved.
Fig. 3 is a flowchart illustrating a method of compensating for a current physical distance according to an exemplary embodiment of the present disclosure, and as shown in fig. 3, the method of compensating for a current physical distance includes the following steps.
In step S201, of the plurality of motor drive current logical values included in the mapping relationship, two motor drive current logical values having the smallest difference from the present motor drive current logical value are determined.
In step S202, a current physical distance corresponding to the current logical value of the motor driving current is compensated based on actual physical distances corresponding to the two logical values of the motor driving current, so as to obtain a first compensated physical distance.
In the embodiment of the present disclosure, a mapping relationship exists between the logical value of the motor driving current and the actual physical distance, and when the current physical distance corresponding to the current logical value of the motor driving current is compensated, two logical values of the motor driving current having the smallest difference with the current logical value of the motor driving current are determined among the plurality of logical values of the motor driving current included in the mapping relationship, so that the current logical value of the motor driving current is located between the two logical values of the motor driving current.
In the embodiment of the disclosure, the actual physical distance corresponding to the logical value of the two motor driving currents is respectively referred to, and the current physical distance corresponding to the logical value of the current motor driving current is compensated.
For example, the logical value of the motor driving current and the actual physical distance are mapped as follows, the logical value of the motor driving current 100mA corresponds to the actual physical distance of 1m, the logical value of the motor driving current 150mA corresponds to the actual physical distance of 1.5m, the logical value of the motor driving current 200mA corresponds to the actual physical distance of 2m, and the logical value of the motor driving current 250mA corresponds to the actual physical distance of 2.5 m. And determining that the current motor driving current logic value is 120mA based on the focusing logic value of the camera module, and determining two motor driving current logic values with the smallest difference value with the current motor driving current logic value 120mA, namely 100mA and 150mA, in the plurality of motor driving current logic values included in the mapping relation.
Further, the present physical distance corresponding to the present motor drive current logical value 120mA is compensated based on the actual physical distances corresponding to 100mA, 150mA, respectively, i.e., 1m and 1.5 m.
According to the embodiment of the disclosure, when the current physical distance corresponding to the current motor driving current logical value is compensated based on the mapping relationship between the motor driving current logical value and the actual physical distance, two motor driving current logical values with the smallest difference value with the current motor driving current logical value are determined in a plurality of motor driving current logical values included in the mapping relationship, the current physical distance corresponding to the current motor driving current logical value is compensated based on the actual physical distances corresponding to the two motor driving current logical values, and the accurate current physical distance can be obtained through compensation, so that an accurate data basis is provided for switching of the camera module.
Fig. 4 is a flowchart illustrating a method of obtaining a first compensated physical distance according to an exemplary embodiment of the present disclosure, and as shown in fig. 4, the method of obtaining the first compensated physical distance includes the following steps.
In step S301, a linear difference function is determined based on the actual physical distances corresponding to the respective logical values of the two motor drive currents.
In step S302, a first compensation physical distance for compensating a current physical distance corresponding to a current motor driving current logical value is determined based on the linear difference function.
In the embodiment of the present disclosure, a mapping relationship exists between the logical value of the motor driving current and the actual physical distance, and the current physical distance corresponding to the logical value of the current motor driving current is compensated based on the actual physical distance corresponding to each of the two logical values of the motor driving current having the smallest difference between the logical values of the current motor driving current.
The linear difference function is determined based on the actual physical distances corresponding to the two logical values of the motor driving current, and still in the above example, the current logical value of the motor driving current is 120mA, and the two logical values of the motor driving current having the smallest difference with the current logical value of the motor driving current 120mA are determined, i.e., 100mA and 150mA, and the actual physical distances corresponding to 100mA and 150mA are 1m and 1.5m, respectively. In determining the linear difference function, the following formula is used:
in the above formula, y0 is 1, y1 is 1.5, x0 is 100, and x1 is 150, and when x is 120, the corresponding y value is 1.2 m. In the disclosed embodiment, the actual physical distance corresponding to a logical value of the motor drive current of 120mA is 1.2 m.
It can be understood that, when the actual physical distance corresponding to each of the two logical values of the motor driving current is used to compensate the current physical distance corresponding to the current logical value of the motor driving current, a nonlinear interpolation method may also be used, and the interpolation method is not limited in the embodiment of the present disclosure.
Fig. 5 is a flowchart illustrating a method of determining a preset mapping relationship between a logical value of a motor driving current and an actual physical distance according to an exemplary embodiment of the present disclosure, where the method of determining the preset mapping relationship between the logical value of the motor driving current and the actual physical distance, as illustrated in fig. 5, includes the following steps.
In step S401, a plurality of actual physical distances obtained by the camera module performing laser radar ranging on the planar object are determined.
In step S402, focusing is performed on each of the plurality of actual physical distances to obtain a focusing logic value, and a plurality of motor driving current logic values of the camera module are determined based on a correspondence between the focusing logic value and the motor driving current logic value.
In step S403, mapping relationships between the plurality of logical values of the motor driving current and the plurality of actual physical distances are established, and the mapping relationships between the plurality of logical values of the motor driving current and the plurality of actual physical distances are saved.
In the embodiment of the present disclosure, the laser radar ranging is performed on the planar object, that is, under the condition that the coincidence degree of the field angle of the laser radar and the field angle of the focusing area is higher, the actual physical distance obtained by the camera module performing the laser radar ranging on the planar object is closer to the physical distance value in the actual ideal state. The camera module performs plane detection for multiple times to obtain multiple actual physical distances, so that the adopted physical distance is higher in precision when the mapping relation between the motor driving current logical value and the actual physical distances is determined.
Wherein, utilize the camera module to carry out many times plane detection, obtain a plurality of actual physical distances that laser radar range finding obtained. And focusing to obtain a focusing logic value when each actual physical distance in the actual physical distances is reached, and determining a plurality of motor driving current logic values of the camera module based on the one-to-one correspondence relationship between the focusing logic value and the motor driving current logic value.
Further, the logical values of the motor driving currents and the actual physical distances are recorded correspondingly, that is, mapping relationships between the logical values of the motor driving currents and the actual physical distances are established, and the mapping relationships between the logical values of the motor driving currents and the actual physical distances are stored.
According to the embodiment of the disclosure, the mapping relationship between the logical value of the motor driving current and the actual physical distance is predetermined, so that the current physical distance after accurate compensation is obtained by using the stored mapping relationship between the logical value of the motor driving current and the actual physical distance during subsequent focusing.
In the embodiment of the disclosure, the laser radar ranging is performed on a planar object, the actual physical distance is obtained by the laser radar ranging, the camera module focuses, the focusing logic value is obtained by focusing, and the corresponding relation among the actual physical distance, the focusing logic value and the motor driving current logic value for driving the camera module is established. When switching between camera modules is subsequently performed, a motor driving current logical value can be determined according to the focusing logical value and an actual physical distance can be determined according to the motor driving current logical value based on the mapping relation among the pre-created actual physical distance, the focusing logical value and the motor driving current logical value. Compared with the traditional implementation process of switching the camera module by obtaining the logical value of the motor driving current through OTP burning based on the physical distance, the control process of switching the camera module provided by the embodiment of the disclosure can be understood as a mode of performing feedback correction and compensation on the camera module. The camera module switching method and device have the advantages that the current motor driving current logic value for driving the camera module to switch in the camera module switching process is the compensated and more accurate current logic value, the motor of the camera module controls the camera module to move according to the driving current logic value, focusing is conducted according to the compensated motor driving current logic value, and accordingly focusing is more accurate.
Fig. 6 is a schematic diagram illustrating compensation for a present physical distance corresponding to a present motor drive current logical value according to an exemplary embodiment of the present disclosure. As shown in fig. 6, the actual physical distance in the ideal state of switching between the camera module 1 and the camera module 2 is 1m, and the actual physical focus distance is 1.1 m.
In the embodiment of the disclosure, in the focusing process of the camera module, the data compensation of the current physical distance is performed by using the flat scene detection and laser radar ranging. Under the condition of multi-time plane detection, the focusing logic value 1 of the position camera module at different positions, the focusing logic value 2 of the camera module and the focusing logic value M of the … camera module can be obtained. The logic values of the motor driving current corresponding to the focusing logic value are respectively the logic value 1 of the motor driving current, the logic value 2 of the motor driving current, and the logic value M of the motor driving current …. The actual physical distances obtained by the laser radar ranging are actual physical distance 1 and actual physical distance 2 …, namely actual physical distance M.
The method comprises the steps of determining and storing a preset mapping relation between a motor driving current logical value and an actual physical distance based on the plane detection mode, determining a focusing logical value A of a camera module when the actual physical distance is determined by the method of the embodiment of the disclosure, and determining the current motor driving current logical value A based on the one-to-one correspondence relation between the focusing logical value A of the camera module and the current motor driving current logical value A. Determining two motor driving current logic values with the smallest difference value between the current motor driving current logic value A and the current motor driving current logic value A, namely a motor driving current logic value 1 and a motor driving current logic value 2, in the plurality of motor driving current logic values included in the mapping relation, and obtaining an accurate actual physical distance A 'corresponding to the current motor driving current logic value A after compensation by using an interpolation method, so that the effective switching from the camera module 1 to the camera module 2 is realized by using the actual physical distance A'.
In the prior art, different temperature values affect the hardware performance of the module, and the logic value of the motor driving current is affected by the temperature to generate deviation, so that the same logic value of the motor driving current corresponds to different actual physical distances at different temperatures, and the influence of the OTP error is amplified. And when the focusing logic value, the motor driving current logic value and the actual physical distance are determined, recording temperature data to obtain a mapping relation between the motor driving current logic value reflecting the temperature influence and the actual physical distance.
Fig. 7 is a schematic diagram illustrating compensation for a present physical distance corresponding to a present motor drive current logical value according to an exemplary embodiment of the present disclosure. As shown in fig. 7, the actual physical distance in an ideal state of switching between the camera module 1 and the camera module 2 is 1m, the actual physical focusing distance is 1.1m, and the camera module 1 determines, based on the original OTP data, to drive the camera module to switch the distance value to a value smaller than 1m according to the focusing logic value of the camera module obtained by normal focusing and focusing.
In the embodiment of the disclosure, in the focusing process of the camera module, based on the obtained temperature value, data compensation of the current physical distance is performed by using the method based on flat scene detection and laser radar ranging. Under the condition of multi-time plane detection, the focusing logic value 1 of the position camera module at different positions, the focusing logic value 2 of the camera module and the focusing logic value M of the … camera module can be obtained. The logic values of the motor driving current corresponding to the focusing logic value are respectively the logic value 1 of the motor driving current, the logic value 2 of the motor driving current, and the logic value M of the motor driving current …. The actual physical distances obtained by the laser radar ranging, namely the actual physical distance 1 and the actual physical distance 2 …, are temperature values 1, 2 and … respectively.
Based on the measurement mode, a preset mapping relation among the temperature value, the motor driving current logic value and the actual physical distance is determined and stored. In an embodiment of the present disclosure, a mapping relationship between a focusing logical value, a motor driving current logical value, a temperature, and an actual physical distance is saved in a mapping relationship storage space created in advance.
When the method of the embodiment of the present disclosure is used to determine the actual physical distance, the actual physical distance a' corresponding to the logical value a of the motor driving current at the compensated temperature can be obtained by searching for the difference and determining the range of the logical value interval of the motor driving current in which the logical value a of the motor driving current is located, that is, between the logical value 1 of the motor driving current and the logical value 2 of the motor driving current. According to the embodiment of the disclosure, temperature data is utilized, the hardware performance of the module is influenced by the temperature value, and the deviation of the logical value of the motor driving current caused by the influence of the temperature is reduced, so that the effective switching from the camera module 1 to the camera module 2 is realized by utilizing the accurate actual physical distance A' after compensation.
Fig. 8 is a flowchart illustrating a method for controlling a camera module to switch based on a first compensation physical distance according to an exemplary embodiment of the present disclosure, where the method includes the following steps, as shown in fig. 8.
In step S501, a current temperature value of the camera module is obtained.
In step S502, a first compensation physical distance corresponding to the current temperature value is compensated based on a mapping relationship between the temperature value and the actual physical distance, so as to obtain a second compensation physical distance.
In step S503, the camera module is controlled to switch based on the second compensation physical distance.
In the embodiment of the present disclosure, in order to determine the actual physical distance more accurately, the actual physical distance is corrected for the influence due to the temperature change. Based on the first compensation physical distance, when the camera module is controlled to be switched, the current temperature value of the camera module is obtained, for example, the temperature value reported by the sensor monitoring can be obtained.
In the embodiment of the disclosure, a mapping relationship exists between different temperature values and actual physical distances, the actual physical distance corresponding to the current temperature is compensated according to the mapping relationship between the temperature values and the actual physical distances, and a more accurate second compensated physical distance after compensation is obtained on the basis of the first compensated physical distance.
According to the embodiment of the disclosure, the current physical distance corresponding to the current motor driving current logical value is compensated based on the mapping relation between the compensated motor driving current logical value and the actual physical distance, the first compensation physical distance is compensated based on the compensated first compensation physical distance according to the mapping relation between the temperature value and the actual physical distance, the camera module is controlled to be switched based on the compensated second compensation physical distance, and the fluency during switching of the lens module between the multi-shot lenses is further ensured.
Fig. 9 is a flowchart illustrating a method for compensating a first compensation physical distance corresponding to a current temperature value according to an exemplary embodiment of the present disclosure, where the method includes the following steps, as shown in fig. 9.
In step S601, among a plurality of temperature values included in the mapping relationship, two temperature values having the smallest difference from the current temperature value are determined.
In step S602, a first compensation physical distance corresponding to the current temperature value is compensated based on the actual physical distances corresponding to the two temperature values.
In the embodiment of the present disclosure, a mapping relationship exists between the temperature values and the actual physical distance, and when the current physical distance corresponding to the current temperature value is compensated, two temperature values having the smallest difference with the current temperature value are determined among a plurality of temperature values included in the mapping relationship, so that the current temperature value is located between the two temperature values.
And respectively compensating the current physical distance corresponding to the current temperature value by referring to the actual physical distances corresponding to the two temperature values.
For example, the mapping between the temperature values and the actual physical distances is as follows, with a temperature value of 10 ℃ corresponding to an actual physical distance of 1m, a temperature value of 20 ℃ corresponding to an actual physical distance of 3m, a temperature value of 15 ℃ corresponding to an actual physical distance of 1.5m, and a temperature value of 25 ℃ corresponding to an actual physical distance of 3.5 m. Based on the current temperature value of 18 ℃, two temperature values having the smallest difference of 18 ℃ from the current temperature value, namely 15 ℃ and 20 ℃, are determined among the plurality of temperature values included in the mapping relationship.
Wherein the current physical distance corresponding to the current temperature of 18 ℃ is compensated based on the actual physical distances corresponding to 15 ℃ and 20 ℃, respectively, i.e. 1m and 1.5 m. The method for compensating the first compensation physical distance corresponding to the current temperature value based on the actual physical distance corresponding to each of the two temperature values is not limited in the embodiment of the present disclosure.
In the embodiment of the present disclosure, a storage space is created for storing a mapping relationship between the focusing logical value, the motor driving current logical value, the temperature, and the actual physical distance, that is, a mapping relationship between a plurality of focusing logical values, a plurality of motor driving current logical values, and a plurality of actual physical distances is saved. And subsequently triggering plane scene detection, carrying out laser radar ranging, recording the mapping relation between the logical value of the motor driving current and the actual physical distance in the plane scene, recording the corresponding temperature, and updating the mapping relation between the logical value of the motor driving current and the actual physical distance in a storage space by using the recorded mapping relation.
According to the embodiment of the disclosure, the mapping relations between a plurality of focusing logic values, a plurality of motor driving current logic values, temperature and a plurality of actual physical distances are stored in a mapping relation storage space which is created in advance, and when whether the camera module is switched is determined in the subsequent focusing process, the stored mapping relations are utilized to obtain the accurate compensated current physical distance, so that the effective switching of the camera module is realized.
Based on the same conception, the embodiment of the disclosure also provides a switching control device of the camera module.
It can be understood that, in order to implement the above functions, the switching control device of the camera module provided in the embodiments of the present disclosure includes a hardware structure and/or a software module corresponding to each function. The disclosed embodiments can be implemented in hardware or a combination of hardware and computer software, in combination with the exemplary elements and algorithm steps disclosed in the disclosed embodiments. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
Fig. 10 is a block diagram illustrating a switching control apparatus of a camera module according to an exemplary embodiment of the present disclosure. Referring to fig. 10, the switching control apparatus 100 of the camera module includes a determination module 101, a compensation module 102, and a control module 103.
The determining module 101 is configured to determine a current motor driving current logical value for driving the camera module to switch based on the focusing logical value of the camera module.
The compensation module 102 is configured to compensate for a current physical distance corresponding to a current logical value of the motor driving current based on a mapping relationship between the logical value of the motor driving current and the actual physical distance.
And the control module 103 is used for controlling the camera module to switch based on the compensated current physical distance.
In an embodiment of the disclosure, the compensation module 102 compensates a current physical distance corresponding to a current logical value of the motor driving current based on a mapping relationship between the logical value of the motor driving current and an actual physical distance in the following manner to obtain a first compensated physical distance: determining two motor driving current logic values with the smallest difference value with the current motor driving current logic value from a plurality of motor driving current logic values included in the mapping relation; and compensating the current physical distance corresponding to the current motor driving current logical value based on the actual physical distance corresponding to the two motor driving current logical values respectively to obtain a first compensation physical distance.
In an embodiment of the disclosure, the compensation module 102 compensates a current physical distance corresponding to a current logical value of the motor driving current based on an actual physical distance corresponding to each of two logical values of the motor driving current in the following manner to obtain a first compensated physical distance: determining a linear difference function based on the actual physical distances corresponding to the two motor driving current logic values respectively; a first compensation physical distance for compensating a present physical distance corresponding to the present motor drive current logical value is determined based on the linear difference function.
In one embodiment of the present disclosure, the determining module 101 determines the preset mapping relationship between the logical value of the motor driving current and the actual physical distance by: determining a plurality of actual physical distances obtained by the camera module through laser radar ranging aiming at a planar object, respectively determining focusing to obtain a focusing logic value aiming at each actual physical distance in the plurality of actual physical distances, and determining a plurality of motor driving current logic values of the camera module based on the corresponding relation between the focusing logic value and the motor driving current logic value; and establishing mapping relations between a plurality of motor driving current logical values and a plurality of actual physical distances, and storing the mapping relations between the plurality of motor driving current logical values and the plurality of actual physical distances.
In an embodiment of the disclosure, the control module 103 controls the camera module to switch based on the first compensation physical distance in the following manner: acquiring a current temperature value of the camera module; compensating a first compensation physical distance corresponding to the current temperature value based on a mapping relation between the temperature value and the actual physical distance to obtain a second compensation physical distance; and controlling the camera module to switch based on the second compensation physical distance.
In an embodiment of the disclosure, the control module 103 compensates the first compensated physical distance corresponding to the current temperature value based on the mapping relationship between the temperature value and the actual physical distance in the following manner: determining two temperature values with the minimum difference value with the current temperature value in a plurality of temperature values included in the mapping relation; and compensating a first compensation physical distance corresponding to the current temperature value based on the actual physical distances corresponding to the two temperature values respectively.
In one embodiment of the present disclosure, the determining module 101 is further configured to: in the mapping relation storage space created in advance, the mapping relation among the focusing logical value, the motor driving current logical value, the temperature and the actual physical distance is saved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 11 is a block diagram illustrating an apparatus 800 for switching control of a camera module according to an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 11, the apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It is understood that "a plurality" in this disclosure means two or more, and other words are analogous. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. The singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It will be further understood that the terms "first," "second," and the like are used to describe various information and that such information should not be limited by these terms. These terms are only used to distinguish one type of information from another and do not denote a particular order or importance. Indeed, the terms "first," "second," and the like are fully interchangeable. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure.
It will be further understood that, unless otherwise specified, "connected" includes direct connections between the two without the presence of other elements, as well as indirect connections between the two with the presence of other elements.
It is further to be understood that while operations are depicted in the drawings in a particular order, this is not to be understood as requiring that such operations be performed in the particular order shown or in serial order, or that all illustrated operations be performed, to achieve desirable results. In certain environments, multitasking and parallel processing may be advantageous.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (16)
1. A switching control method of a camera module is characterized by comprising the following steps:
determining a current motor driving current logic value for driving the camera module to switch based on a focusing logic value of the camera module;
compensating the current physical distance corresponding to the current motor driving current logical value based on the mapping relation between the motor driving current logical value and the actual physical distance to obtain a first compensation physical distance;
and controlling the camera module to switch based on the first compensation physical distance.
2. The method for controlling switching of the camera module according to claim 1, wherein compensating the current physical distance corresponding to the current logical value of the motor driving current based on a mapping relationship between the logical value of the motor driving current and an actual physical distance to obtain a first compensated physical distance comprises:
determining two motor driving current logic values having the smallest difference value with the current motor driving current logic value among a plurality of motor driving current logic values included in the mapping relation;
and compensating the current physical distance corresponding to the current motor driving current logical value based on the actual physical distance corresponding to the two motor driving current logical values respectively to obtain a first compensation physical distance.
3. The method for controlling switching of the camera module according to claim 2, wherein compensating the current physical distance corresponding to the current logical value of the motor driving current based on the actual physical distance corresponding to each of the two logical values of the motor driving current to obtain a first compensated physical distance comprises:
determining a linear difference function based on the actual physical distances corresponding to the two motor driving current logic values respectively;
and determining a first compensation physical distance for compensating the current physical distance corresponding to the current motor driving current logic value based on the linear difference function.
4. The switching control method of the camera module according to claim 1, wherein the preset mapping relationship between the logical value of the motor driving current and the actual physical distance is determined as follows:
determining a plurality of actual physical distances obtained by the camera module through laser radar ranging aiming at the plane object, and
focusing is respectively carried out on each actual physical distance in the actual physical distances to obtain a focusing logic value, and a plurality of motor driving current logic values of the camera module are determined based on the corresponding relation between the focusing logic value and the motor driving current logic value;
and establishing mapping relations between the plurality of motor driving current logical values and the plurality of actual physical distances, and storing the mapping relations between the plurality of motor driving current logical values and the plurality of actual physical distances.
5. The method for controlling switching of the camera module according to claim 1, wherein controlling the camera module to switch based on the first compensation physical distance comprises:
acquiring a current temperature value of the camera module;
compensating the first compensation physical distance corresponding to the current temperature value based on the mapping relation between the temperature value and the actual physical distance to obtain a second compensation physical distance;
and controlling the camera module to switch based on the second compensation physical distance.
6. The method for controlling switching of the camera module according to claim 5, wherein compensating for the first compensated physical distance corresponding to the current temperature value based on a mapping relationship between the temperature value and an actual physical distance comprises:
determining two temperature values with the smallest difference value with the current temperature value in a plurality of temperature values included in the mapping relation;
and compensating the first compensation physical distance corresponding to the current temperature value based on the actual physical distances corresponding to the two temperature values respectively.
7. The method for controlling switching of the camera module according to claim 1, further comprising:
in the mapping relation storage space created in advance, the mapping relation among the focusing logical value, the motor driving current logical value, the temperature and the actual physical distance is saved.
8. The utility model provides a switching control device of camera module which characterized in that includes:
the determining module is used for determining a current motor driving current logic value for driving the camera module to switch based on the focusing logic value of the camera module;
the compensation module is used for compensating the current physical distance corresponding to the current logical value of the motor driving current based on the mapping relation between the logical value of the motor driving current and the actual physical distance to obtain a first compensation physical distance;
and the control module is used for controlling the camera module to switch based on the first compensation physical distance.
9. The switching control device of the camera module according to claim 8, wherein the compensation module compensates a current physical distance corresponding to the current logical value of the motor driving current based on a mapping relationship between the logical value of the motor driving current and an actual physical distance in the following manner to obtain a first compensated physical distance:
determining two motor driving current logic values having the smallest difference value with the current motor driving current logic value among a plurality of motor driving current logic values included in the mapping relation;
and compensating the current physical distance corresponding to the current motor driving current logical value based on the actual physical distance corresponding to the two motor driving current logical values respectively to obtain a first compensation physical distance.
10. The switching control device of the camera module according to claim 9, wherein the compensation module compensates a current physical distance corresponding to the current logical value of the motor driving current based on an actual physical distance corresponding to each of the two logical values of the motor driving current in the following manner to obtain a first compensated physical distance:
determining a linear difference function based on the actual physical distances corresponding to the two motor driving current logic values respectively;
and determining a first compensation physical distance for compensating the current physical distance corresponding to the current motor driving current logic value based on the linear difference function.
11. The switching control device of the camera module according to claim 9, wherein the determining module determines the preset mapping relationship between the logical value of the motor driving current and the actual physical distance by:
determining a plurality of actual physical distances obtained by the camera module through laser radar ranging aiming at the plane object, and
respectively determining focusing to obtain a focusing logic value aiming at each actual physical distance in the actual physical distances, and determining a plurality of motor driving current logic values of the camera module based on the corresponding relation between the focusing logic value and the motor driving current logic value;
and establishing mapping relations between the plurality of motor driving current logical values and the plurality of actual physical distances, and storing the mapping relations between the plurality of motor driving current logical values and the plurality of actual physical distances.
12. The switching control device of the camera module according to claim 8, wherein the control module controls the camera module to switch based on the first compensation physical distance in the following manner:
acquiring a current temperature value of the camera module;
compensating the first compensation physical distance corresponding to the current temperature value based on the mapping relation between the temperature value and the actual physical distance to obtain a second compensation physical distance;
and controlling the camera module to switch based on the second compensation physical distance.
13. The switching control device of the camera module according to claim 12, wherein the control module compensates the first compensated physical distance corresponding to the current temperature value based on a mapping relationship between the temperature value and an actual physical distance in the following manner:
determining two temperature values with the smallest difference value with the current temperature value in a plurality of temperature values included in the mapping relation;
and compensating the first compensation physical distance corresponding to the current temperature value based on the actual physical distances corresponding to the two temperature values respectively.
14. The apparatus for controlling switching of a camera module according to claim 8, wherein the determining module is further configured to:
in the mapping relation storage space created in advance, the mapping relation among the focusing logical value, the motor driving current logical value, the temperature and the actual physical distance is saved.
15. The utility model provides a switching control device of camera module which characterized in that includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: the method of controlling switching of the camera module according to any one of claims 1 to 7 is executed.
16. A non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the method of controlling switching of a camera module according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010934848.7A CN114157801B (en) | 2020-09-08 | 2020-09-08 | Switching control method and device of camera module and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010934848.7A CN114157801B (en) | 2020-09-08 | 2020-09-08 | Switching control method and device of camera module and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114157801A true CN114157801A (en) | 2022-03-08 |
CN114157801B CN114157801B (en) | 2024-02-27 |
Family
ID=80462259
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010934848.7A Active CN114157801B (en) | 2020-09-08 | 2020-09-08 | Switching control method and device of camera module and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114157801B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005165058A (en) * | 2003-12-03 | 2005-06-23 | Sharp Corp | Automatic focusing device |
US20120257099A1 (en) * | 2011-04-06 | 2012-10-11 | Apple Inc. | Driver circuit for a camera voice coil motor |
US20150198781A1 (en) * | 2014-01-13 | 2015-07-16 | Lg Electronics Inc. | Mobile terminal and controlling method thereof |
CN105391943A (en) * | 2015-12-03 | 2016-03-09 | 广东欧珀移动通信有限公司 | Rapid focusing method and system of shooting device |
CN106249508A (en) * | 2016-08-15 | 2016-12-21 | 广东欧珀移动通信有限公司 | Atomatic focusing method and system, filming apparatus |
CN107846546A (en) * | 2016-09-18 | 2018-03-27 | 中兴通讯股份有限公司 | Focusing compensating device and its method, the camera shooting terminal of a kind of camera module |
CN108989791A (en) * | 2018-07-11 | 2018-12-11 | 昆山丘钛微电子科技有限公司 | A kind of linear detection method of motor, device and computer readable storage medium |
CN110602382A (en) * | 2019-08-27 | 2019-12-20 | 珠海市广浩捷精密机械有限公司 | Focusing detection method of camera module |
CN111158107A (en) * | 2020-01-03 | 2020-05-15 | 支付宝(杭州)信息技术有限公司 | Focusing method, device and equipment of lens module |
-
2020
- 2020-09-08 CN CN202010934848.7A patent/CN114157801B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005165058A (en) * | 2003-12-03 | 2005-06-23 | Sharp Corp | Automatic focusing device |
US20120257099A1 (en) * | 2011-04-06 | 2012-10-11 | Apple Inc. | Driver circuit for a camera voice coil motor |
US20150198781A1 (en) * | 2014-01-13 | 2015-07-16 | Lg Electronics Inc. | Mobile terminal and controlling method thereof |
CN105391943A (en) * | 2015-12-03 | 2016-03-09 | 广东欧珀移动通信有限公司 | Rapid focusing method and system of shooting device |
CN106249508A (en) * | 2016-08-15 | 2016-12-21 | 广东欧珀移动通信有限公司 | Atomatic focusing method and system, filming apparatus |
CN107846546A (en) * | 2016-09-18 | 2018-03-27 | 中兴通讯股份有限公司 | Focusing compensating device and its method, the camera shooting terminal of a kind of camera module |
CN108989791A (en) * | 2018-07-11 | 2018-12-11 | 昆山丘钛微电子科技有限公司 | A kind of linear detection method of motor, device and computer readable storage medium |
CN110602382A (en) * | 2019-08-27 | 2019-12-20 | 珠海市广浩捷精密机械有限公司 | Focusing detection method of camera module |
CN111158107A (en) * | 2020-01-03 | 2020-05-15 | 支付宝(杭州)信息技术有限公司 | Focusing method, device and equipment of lens module |
Also Published As
Publication number | Publication date |
---|---|
CN114157801B (en) | 2024-02-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110557547B (en) | Lens position adjusting method and device | |
EP3945718A2 (en) | Control method and apparatus, electronic device, and storage medium | |
US10798357B2 (en) | Method and device for correcting color temperature of flash lamp | |
CN111294511B (en) | Focusing method and device of camera module and storage medium | |
EP3373282A1 (en) | Method and device for adjusting current of backlight, and display apparatus | |
CN109167921B (en) | Shooting method, shooting device, shooting terminal and storage medium | |
CN115134505B (en) | Preview picture generation method and device, electronic equipment and storage medium | |
CN107241535B (en) | Flash lamp adjusting device and terminal equipment | |
US11792518B2 (en) | Method and apparatus for processing image | |
CN114339022B (en) | Camera shooting parameter determining method and neural network model training method | |
CN114157801B (en) | Switching control method and device of camera module and storage medium | |
CN112235509B (en) | Focal length adjusting method and device, mobile terminal and storage medium | |
CN110876000B (en) | Camera module, image correction method and device, electronic equipment and storage medium | |
CN115134517A (en) | Shooting control method and device and storage medium | |
CN114268731B (en) | Camera switching method, camera switching device and storage medium | |
CN113079310B (en) | Automatic focusing method, automatic focusing device, electronic equipment and computer readable storage medium | |
CN114339018B (en) | Method and device for switching lenses and storage medium | |
WO2023230860A1 (en) | Zooming method, zooming device, electronic equipment, and storage medium | |
CN115550537A (en) | Motor control method, motor control device and storage medium | |
CN116489507A (en) | Focusing method, focusing device, electronic equipment and storage medium | |
CN118190352A (en) | Method, device, terminal and storage medium for determining lens structure information | |
CN115731296A (en) | Image processing method, device, terminal and storage medium | |
CN118102095A (en) | Camera control method, device, camera, readable storage medium and chip | |
CN117764895A (en) | Image processing method, device and storage medium | |
CN117412168A (en) | Focusing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |