Calibration method and device of focusing motor, electronic equipment and storage medium

By identifying the setting calibration conditions for the focus motor to calibrate and update the stored data, the problem of low accuracy of the focus motor calibration data in the prior art is solved, accurate control of the focus motor and lens is achieved, and the focus accuracy of the camera module is improved. .

CN118972552AInactive Publication Date: 2024-11-15四川易景智能终端有限公司

Patent Information

Application Number
CN202411427134.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2024-11-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the calibration data accuracy of the focus motor is low, which affects the focus accuracy of the camera module.

Method used

By identifying and setting calibration conditions, if the conditions are met, the focus motor will calibrate, obtain the current calibration data, and delete the historical calibration data from the storage space, store the current calibration data in the storage space, and realize multiple active and automatic calibration of the focus motor. and real-time updates.

Benefits of technology

It improves the accuracy and real-time performance of the calibration data of the focus motor, ensures the accurate movement of the focus motor and lens, and improves the focus accuracy of the camera module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972552A_ABST
    Figure CN118972552A_ABST
Patent Text Reader

Abstract

The invention provides a focusing motor calibration method and device, electronic equipment and a storage medium, and belongs to the technical field of cameras. Wherein the camera module comprises a focusing motor, a Hall sensor, a lens and a magnet, and the method comprises the following steps: identifying whether a set calibration condition is satisfied; if the set calibration condition is met, the focusing motor is calibrated, multiple sets of current calibration data are obtained, and each set of current calibration data comprises the corresponding relation between the candidate output signal of the Hall sensor and the candidate stroke of the focusing motor; multiple groups of historical calibration data are deleted from the storage space, and each group of historical calibration data comprises the corresponding relation between the historical output signal of the Hall sensor and the historical stroke of the focusing motor; and storing the multiple groups of current calibration data into a storage space. Therefore, multiple times of active and automatic calibration of the focusing motor can be realized, the calibration data of the focusing motor in the storage space can be updated in real time, and the accuracy and the real-time performance of the calibration data of the focusing motor are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of camera technology, and in particular to a calibration method, device, electronic device and storage medium for a focus motor. Background Art

[0002] At present, the focus motor has the advantages of fast focusing speed, high precision, smooth focusing, strong adaptability, etc., and has been widely used in the camera field. In order to ensure the normal use of the focus motor, the focus motor needs to be calibrated. However, in the related technology, the calibration data of the focus motor is inaccurate, which affects the focusing accuracy of the camera module. Summary of the invention

[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0004] To this end, the first objective of the present application is to provide a focus motor calibration method.

[0005] The second objective of the present application is to provide a calibration device for a focus motor.

[0006] The third objective of the present application is to provide an electronic device.

[0007] A fourth objective of the present application is to provide a computer-readable storage medium.

[0008] A fifth object of the present application is to provide a computer program product.

[0009] To achieve the above-mentioned purpose, the first aspect embodiment of the present application proposes a method for calibrating a focus motor, wherein the camera module includes a focus motor, a Hall sensor, a lens and a magnet, and the method includes: identifying whether a set calibration condition is met; if the set calibration condition is met, calibrating the focus motor to obtain multiple sets of current calibration data, wherein each set of the current calibration data includes a correspondence between a candidate output signal of the Hall sensor and a candidate stroke of the focus motor; deleting multiple sets of historical calibration data from a storage space, wherein each set of the historical calibration data includes a correspondence between a historical output signal of the Hall sensor and a historical stroke of the focus motor; and storing the multiple sets of current calibration data in the storage space.

[0010] To achieve the above-mentioned purpose, the second aspect embodiment of the present application proposes a calibration device for a focus motor, wherein the camera module includes a focus motor, a Hall sensor, a lens and a magnet, and the device includes: an identification module, used to identify whether a set calibration condition is met; a calibration module, used to calibrate the focus motor if the set calibration condition is met, and obtain multiple sets of current calibration data, wherein each set of the current calibration data includes a correspondence between a candidate output signal of the Hall sensor and a candidate stroke of the focus motor; a deletion module, used to delete multiple sets of historical calibration data from a storage space, wherein each set of historical calibration data includes a correspondence between a historical output signal of the Hall sensor and a historical stroke of the focus motor; and a storage module, used to store multiple sets of current calibration data in the storage space.

[0011] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect embodiment above.

[0012] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the method described in the first aspect embodiment above.

[0013] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect of the present application.

[0014] The focus motor calibration method, device, electronic device and storage medium provided in the present application can calibrate the focus motor when the set calibration conditions are met to obtain multiple sets of current calibration data, delete multiple sets of historical calibration data from the storage space, and store the multiple sets of current calibration data in the storage space, so as to realize multiple active and automatic calibration of the focus motor and update the calibration data of the focus motor in the storage space in real time, thereby improving the accuracy and real-time performance of the calibration data of the focus motor, so as to accurately control the focus motor and lens movement, and improve the focus accuracy of the camera module.

[0015] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which: Figure 1 A schematic flow chart of a focus motor calibration method provided in an embodiment of the present application; Figure 2 A schematic diagram of a focus motor calibration method provided in an embodiment of the present application; Figure 3 A schematic diagram of another focus motor calibration method provided in an embodiment of the present application; Figure 4 A schematic flow chart of another focus motor calibration method provided in an embodiment of the present application; Figure 5 A schematic flow chart of another focus motor calibration method provided in an embodiment of the present application; Figure 6 A schematic flow chart of another focus motor calibration method provided in an embodiment of the present application; Figure 7 A schematic structural diagram of a focus motor calibration device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0017] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0018] The following describes a focus motor calibration method, device, electronic device, and storage medium according to embodiments of the present application with reference to the accompanying drawings.

[0019] Figure 1 A schematic flow chart of a focus motor calibration method provided in an embodiment of the present application.

[0020] At present, the focus motor has the advantages of fast focusing speed, high precision, smooth focusing, strong adaptability, etc., and has been widely used in the camera field. In order to ensure the normal use of the focus motor, the focus motor needs to be calibrated. However, in the related technology, the calibration data of the focus motor is inaccurate, which affects the focusing accuracy of the camera module.

[0021] To address this problem, the embodiment of the present application provides a method for calibrating a focus motor. When the set calibration conditions are met, the focus motor can be calibrated to obtain multiple sets of current calibration data, and multiple sets of historical calibration data can be deleted from the storage space and stored in the storage space. This can realize multiple active and automatic calibrations of the focus motor, and update the calibration data of the focus motor in the storage space in real time, thereby improving the accuracy and real-time performance of the calibration data of the focus motor, thereby accurately controlling the focus motor and lens movement, and improving the focus accuracy of the camera module. Figure 1 As shown, the method comprises the following steps: S101, identifying whether a set calibration condition is met.

[0022] In the embodiment of the present application, the camera module includes a focus motor, a Hall sensor, a lens and a magnet. No excessive restrictions are made on the above-mentioned components of the camera module. No excessive restrictions are made on the relative positions between the above-mentioned components of the camera module.

[0023] For example, a focus motor includes a fixed part and a movable part. The fixed part refers to the part of the focus motor that does not move with the lens, and the movable part refers to the part of the focus motor that moves with the lens. For example, a magnet is attached to the lens.

[0024] like Figure 2-3 As shown, the fixed part includes a motor housing, the Hall sensor is fixed to the motor housing, and the Hall sensor does not move with the lens, that is, the position of the Hall sensor is fixed. The magnet is fixed to the movable part of the focus motor, and the magnet moves with the lens.

[0025] It should be noted that there are no excessive restrictions on setting the calibration conditions.

[0026] In one embodiment, setting the calibration condition includes at least one of the following: (1) the camera module is started; (2) the electronic device where the camera module is located is in a set state, wherein the set state includes at least one of a static state, a screen-off state, and an idle state; (3) the time interval between the most recent calibration moment and the current moment reaches a set duration; (4) the initial relative position between the Hall sensor and the magnet changes; (5) the current moment reaches the set moment; (6) the current moment is in a set time period. Thus, if the camera module is started, and / or, if the electronic device where the camera module is located is in a set state, and / or, if the time interval between the most recent calibration moment and the current moment reaches a set duration, and / or, if the initial relative position between the Hall sensor and the magnet changes, and / or, the current moment reaches the set moment, and / or, if the current moment is in a set time period, continue to execute step S102 and its subsequent steps to recalibrate the focus motor and obtain multiple sets of current calibration data.

[0027] It should be noted that the camera module startup may include the camera module starting startup, startup process, startup completion, etc., which are not limited here. The triggering method of the camera module startup is not limited too much. For example, the user's opening operation of the camera preview interface can be detected to control the camera module startup.

[0028] It should be noted that there are not too many restrictions on the electronic devices where the camera module is located. For example, it can include mobile phones, computers, wearable devices, smart home appliances (such as smart doorbells), vehicles, robots, etc. There are not too many restrictions on the static state. For example, it can include static, small movement range, slow movement speed, etc.

[0029] In some examples, the method further includes obtaining a movement speed of the electronic device, and if the movement speed of the electronic device is less than a first threshold, identifying that the electronic device is in a stationary state.

[0030] In some examples, the method further includes obtaining statistical parameters of motion data of the electronic device at multiple moments in the current time period, and if the statistical parameters are less than or equal to a second threshold, it indicates that the discreteness of the motion data of the electronic device at multiple moments in the current time period is low, and the electronic device is identified as being in a stationary state in the current time period. The statistical parameters are positively correlated with the discreteness. For example, the statistical parameters include variance, standard deviation, difference, etc.

[0031] It should be noted that the most recent calibration time refers to the most recent (i.e., last) time when the focus motor was calibrated. There are no excessive restrictions on the set duration, set time, and set time period. For example, the set duration may include 1 day, the set time may include 0:00 a.m., 2:00 a.m., etc., and the set time period may include 0:00 a.m. to 4:00 a.m.

[0032] It should be noted that the initial relative position between the Hall sensor and the magnet refers to the actual relative position between the Hall sensor and the magnet when the focus motor and the lens do not move, that is, the initial value of the actual relative position between the Hall sensor and the magnet. It is understandable that if the focus motor and the lens move, it will not cause the above-mentioned initial relative position to change, but will cause the actual relative position between the Hall sensor and the magnet to change. There are no excessive restrictions on the triggering conditions for the change in the above-mentioned initial relative position. For example, it may include the camera module being impacted by external force (such as falling).

[0033] In some examples, when the position of the Hall sensor is fixed, the calibration condition is set to include a change in the initial position of the magnet. It is understandable that when the position of the Hall sensor is fixed, if the initial position of the magnet changes, the initial relative position between the Hall sensor and the magnet will change. Therefore, when the position of the Hall sensor is fixed, if the initial position of the magnet changes, step S102 and subsequent steps are continued to be performed to recalibrate the focus motor and obtain multiple sets of current calibration data.

[0034] In some examples, when the position of the magnet is fixed, the calibration condition is set to include a change in the initial position of the Hall sensor. It is understandable that when the position of the magnet is fixed, if the initial position of the Hall sensor changes, the initial relative position between the Hall sensor and the magnet will change. Therefore, when the position of the magnet is fixed, if the initial position of the Hall sensor changes, step S102 and subsequent steps are continued to be performed to recalibrate the focus motor and obtain multiple sets of current calibration data.

[0035] It should be noted that the initial position of the magnet refers to the actual position of the magnet when the focus motor and the lens are not moving, that is, the initial value of the actual position of the magnet. The initial position of the Hall sensor refers to the actual position of the Hall sensor when the focus motor and the lens are not moving, that is, the initial value of the actual position of the Hall sensor.

[0036] For example, the camera module before being impacted by external force is Figure 2 As shown in the left area, the camera module after being impacted by external force is as follows Figure 2 As shown in the right area. Figure 2 As shown, the positions of the Hall sensor and the lens are fixed. After being impacted by an external force, the magnet moves downward, that is, the initial position of the magnet changes, which causes the initial relative position between the Hall sensor and the magnet to change.

[0037] S102, if the set calibration conditions are met, calibrate the focus motor to obtain multiple groups of current calibration data, wherein each group of current calibration data includes a correspondence between a candidate output signal of the Hall sensor and a candidate stroke of the focus motor.

[0038] It should be noted that there are no excessive restrictions on the candidate output signals. For example, the candidate output signal is positively correlated with the magnetic field strength detected by the Hall sensor, and the candidate stroke refers to the distance that the focus motor drives the lens to move along the optical axis. There are multiple candidate output signals and multiple candidate strokes, and there is a corresponding relationship between the candidate output signals and the candidate strokes. For example, the candidate output signals correspond to the candidate strokes one by one.

[0039] It should be noted that there is no excessive restriction on the number of sets of current calibration data. For example, if the driving device of the focus motor is a 10-bit (Binary digit) Driver IC (Integrated Circuit), the Driver IC is a driver integrated circuit, the driving range is 1024 codes, the code is the driving signal (such as a digital signal) output by the Driver IC, and the code corresponds to the candidate stroke one by one, then there are 1024 sets of current calibration data. For example, the candidate stroke can be represented by code.

[0040] It should be noted that the focus motor can be calibrated to obtain multiple sets of current calibration data, which can be achieved by using any focus motor calibration method in the relevant technology, and no excessive restrictions are made here.

[0041] In one implementation, the focus motor is calibrated to obtain multiple sets of current calibration data, including obtaining the moving distance of the lens from the closest position to the farthest position as the maximum stroke of the focus motor, and controlling the focus motor to gradually move from the initial stroke to the maximum stroke to obtain multiple candidate strokes. In this way, multiple candidate strokes can be obtained.

[0042] It should be noted that the closest position refers to the position of the lens at the closest focusing distance, the farthest position refers to the position of the lens at the farthest focusing distance, and the maximum stroke of the focus motor refers to the maximum distance that the focus motor drives the lens to move along the optical axis. There are no excessive restrictions on the initial stroke and maximum stroke. For example, the initial stroke can be 0mm (millimeter) and the maximum stroke can be 10mm.

[0043] For example, when the focus motor is in the initial stroke, the lens is in the closest position, and when the focus motor is in the maximum stroke, the lens is in the farthest position. For example, when the focus motor is in the initial stroke, the output signal of the Hall sensor is 0.

[0044] S103, deleting multiple groups of historical calibration data from the storage space, wherein each group of historical calibration data includes a correspondence between a historical output signal of the Hall sensor and a historical stroke of the focus motor.

[0045] S104, storing multiple sets of current calibration data into a storage space.

[0046] It should be noted that the acquisition time of the historical calibration data is earlier than the acquisition time of the current calibration data, and is pre-stored in the storage space. The relevant content of the historical calibration data can refer to the relevant content of the current calibration data, which will not be repeated here. There is no excessive limitation on the storage space, for example, it can include the storage space of the camera module, the storage space of the electronic device where the camera module is located, etc.

[0047] It is understandable that the current calibration data has better real-time performance and accuracy. If multiple sets of historical calibration data continue to be used to control the focus motor and lens movement, the focus motor and lens may be moved to the wrong position.

[0048] For example, the camera module before being impacted by external force is Figure 3 As shown in the left area, the actual position to which the lens moves is consistent with the target position to which the lens is to move. Figure 3 As shown in the right area, if the multiple sets of historical calibration data obtained before the initial relative position between the Hall sensor and the magnet changes are continued to be used to control the focus motor and lens movement, the actual position to which the lens moves is above the target position to which the lens is to be moved, and the lens has not moved to the target position at this time.

[0049] In summary, according to the calibration method of the focus motor of the embodiment of the present application, it is identified whether the set calibration conditions are met. If the set calibration conditions are met, the focus motor is calibrated to obtain multiple sets of current calibration data, wherein each set of current calibration data includes the correspondence between the candidate output signal of the Hall sensor and the candidate stroke of the focus motor, and multiple sets of historical calibration data are deleted from the storage space, wherein each set of historical calibration data includes the correspondence between the historical output signal of the Hall sensor and the historical stroke of the focus motor, and the multiple sets of current calibration data are stored in the storage space. Therefore, when the set calibration conditions are met, the focus motor can be calibrated to obtain multiple sets of current calibration data, and multiple sets of historical calibration data are deleted from the storage space, and multiple sets of current calibration data are stored in the storage space, which can realize multiple active and automatic calibration of the focus motor, and update the calibration data of the focus motor in the storage space in real time, thereby improving the accuracy and real-time performance of the calibration data of the focus motor, so that the focus motor and lens movement can be accurately controlled, and the focus accuracy of the camera module is improved.

[0050] An embodiment of the present application provides another method for calibrating a focus motor.

[0051] like Figure 4 As shown, the method may include the following steps: S401, identifying whether a set calibration condition is met.

[0052] For the relevant contents of step S401, please refer to the above embodiment, which will not be repeated here.

[0053] S402, if the set calibration condition is met, obtaining the i-th candidate output signal of the Hall sensor when the focus motor is in the i-th candidate stroke, where i is a positive integer.

[0054] S403 , establishing a corresponding relationship between the ith candidate output signal and the ith candidate stroke as the ith group of current calibration data.

[0055] It should be noted that the i-th candidate output signal refers to the candidate output signal of the Hall sensor when the focus motor is in the i-th candidate stroke. For example, the first candidate stroke is the initial stroke of the focus motor, and the last candidate stroke is the maximum stroke of the focus motor.

[0056] For example, if the number of sets of current calibration data is N, i is a positive integer not greater than N, and N is a positive integer. For example, the initial value of i is 1.

[0057] For example, taking N=1024 as an example, the first candidate output signal of the Hall sensor when the focus motor is in the first candidate stroke can be obtained, and the corresponding relationship between the first candidate output signal and the first candidate stroke is established as the first set of current calibration data.

[0058] The second candidate output signal of the Hall sensor when the focus motor is in the second candidate stroke can be obtained, and a corresponding relationship between the second candidate output signal and the second candidate stroke is established as the second set of current calibration data.

[0059] It should be noted that the acquisition content of the 3rd to 1024th groups of current calibration data can refer to the acquisition content of the 1st to 2nd groups of current calibration data, which will not be repeated here.

[0060] In one embodiment, after establishing a correspondence between the i-th candidate output signal and the i-th candidate stroke as the i-th group of current calibration data, it also includes controlling the focus motor to move from the i-th candidate stroke to the i+1-th candidate stroke, obtaining the i+1-th candidate output signal of the Hall sensor when the focus motor is in the i+1-th candidate stroke, and establishing a correspondence between the i+1-th candidate output signal and the i+1-th candidate stroke as the i+1-th group of current calibration data.

[0061] For example, taking N=1024 as an example, the first candidate output signal of the Hall sensor when the focus motor is in the first candidate stroke can be obtained, and the corresponding relationship between the first candidate output signal and the first candidate stroke is established as the first set of current calibration data.

[0062] The focus motor can be controlled to move from the first candidate stroke to the second candidate stroke, the second candidate output signal of the Hall sensor when the focus motor is in the second candidate stroke is obtained, and the corresponding relationship between the second candidate output signal and the second candidate stroke is established as the second set of current calibration data.

[0063] The focus motor can be controlled to move from the second candidate stroke to the third candidate stroke, the third candidate output signal of the Hall sensor is obtained when the focus motor is in the third candidate stroke, and a corresponding relationship between the third candidate output signal and the third candidate stroke is established as the third set of current calibration data.

[0064] It should be noted that the acquisition content of the 4th to 1024th groups of current calibration data can refer to the acquisition content of the 1st to 3rd groups of current calibration data, which will not be repeated here.

[0065] In some examples, before controlling the focus motor to move from the i-th candidate stroke to the i+1-th candidate stroke, it also includes identifying that the i-th candidate stroke is not the maximum stroke of the focus motor. Thus, when the i-th candidate stroke is not the maximum stroke, the control of the focus motor to move from the i-th candidate stroke to the i+1-th candidate stroke and subsequent steps can be continued.

[0066] S404, deleting multiple groups of historical calibration data from the storage space, wherein each group of historical calibration data includes a correspondence between a historical output signal of the Hall sensor and a historical stroke of the focus motor.

[0067] S405, storing multiple sets of current calibration data into a storage space.

[0068] For the relevant contents of steps S404-S405, please refer to the above embodiment and will not be repeated here.

[0069] In summary, according to the calibration method of the focus motor of the embodiment of the present application, the i-th candidate output signal of the Hall sensor when the focus motor is in the i-th candidate stroke is obtained, where i is a positive integer, and a corresponding relationship between the i-th candidate output signal and the i-th candidate stroke is established as the i-th group of current calibration data. Thus, the i-th candidate output signal of the Hall sensor when the focus motor is in the i-th candidate stroke can be obtained, and a corresponding relationship between the i-th candidate output signal and the i-th candidate stroke is established as the i-th group of current calibration data, so that the acquisition of multiple groups of current calibration data can be achieved.

[0070] An embodiment of the present application provides another method for calibrating a focus motor.

[0071] like Figure 5 As shown, the method may include the following steps: S501, identifying whether a set calibration condition is met.

[0072] S502: If the set calibration conditions are met, calibrate the focus motor to obtain multiple sets of current calibration data, wherein each set of current calibration data includes a correspondence between a candidate output signal of the Hall sensor and a candidate stroke of the focus motor.

[0073] S503, deleting multiple groups of historical calibration data from the storage space, wherein each group of historical calibration data includes a correspondence between a historical output signal of the Hall sensor and a historical stroke of the focus motor.

[0074] S504, storing multiple sets of current calibration data into a storage space.

[0075] For the relevant contents of steps S501 - S504 , please refer to the above embodiment and will not be described again here.

[0076] S505, collecting the actual output signal of the Hall sensor.

[0077] S506, obtaining multiple sets of current calibration data from the storage space.

[0078] S507 , obtaining a candidate stroke that has a corresponding relationship with the actual output signal as the actual stroke of the focus motor.

[0079] It should be noted that the actual output signal refers to the actual output signal of the Hall sensor during the focusing process, and the actual stroke refers to the actual stroke of the Hall sensor during the focusing process. The candidate stroke corresponding to the actual output signal refers to the candidate stroke in the current calibration data where the actual output signal is located.

[0080] For example, if multiple sets of current calibration data include (hall0, code0), (hall1, code1), (hall2, code2), (hall3, code3). Among them, hall0 to hall3 are all candidate output signals, and code0 to 3 are all candidate strokes. (hall0, code0), (hall1, code1), (hall2, code2), (hall3, code3) are all a set of current calibration data. In this embodiment, code is used to characterize the stroke of the focus motor.

[0081] If the actual output signal is hall2, a candidate stroke code2 corresponding to hall2 may be obtained as the actual stroke of the focus motor.

[0082] If the actual output signal is hall3, a candidate stroke code3 corresponding to hall3 may be obtained as the actual stroke of the focus motor.

[0083] In one embodiment, before collecting the actual output signal of the Hall sensor, the method further includes controlling the movement of the focus motor based on the target focus distance of the lens and / or the target position to which the lens is to be moved. It should be noted that the content related to controlling the movement of the focus motor can be implemented by any focusing method based on a focus motor in the relevant technology, and no further limitation is made here.

[0084] In summary, according to the calibration method of the focus motor of the embodiment of the present application, after storing multiple sets of current calibration data in the storage space, it also includes collecting the actual output signal of the Hall sensor, obtaining multiple sets of current calibration data from the storage space, and obtaining a candidate stroke corresponding to the actual output signal as the actual stroke of the focus motor. Thus, a candidate stroke corresponding to the actual output signal can be obtained as the actual stroke of the focus motor, that is, the actual output signal and the multiple sets of current calibration data are taken into consideration to obtain the actual stroke of the focus motor.

[0085] An embodiment of the present application provides another method for calibrating a focus motor.

[0086] like Figure 6 As shown, the method may include the following steps: S601, identifying whether a set calibration condition is met.

[0087] For the relevant contents of step S601, please refer to the above embodiment, which will not be repeated here.

[0088] S602: If the set calibration condition is not met, retain the multiple groups of historical calibration data in the storage space.

[0089] S603, collecting the actual output signal of the Hall sensor.

[0090] S604, obtaining multiple groups of historical calibration data from the storage space.

[0091] S605 , obtaining a historical stroke corresponding to the actual output signal as the actual stroke of the focus motor.

[0092] It is understandable that if the set calibration conditions are not met, multiple sets of current calibration data are not obtained at this time, and multiple sets of historical calibration data in the storage space can be retained. The historical trip corresponding to the actual output signal refers to the historical trip in the historical calibration data where the actual output signal is located.

[0093] For example, if multiple groups of historical calibration data include (hall4, code4), (hall5, code5), (hall6, code6), (hall7, code7). Among them, hall4 to hal7 are all historical output signals, and code4 to 7 are all historical travels. hall4, code4), (hall5, code5), (hall6, code6), (hall7, code7) are all a group of historical calibration data. In this embodiment, code is used to characterize the travel of the focus motor.

[0094] If the actual output signal is hall4, a historical stroke code4 corresponding to hall4 may be obtained as the actual stroke of the focus motor.

[0095] If the actual output signal is hall6, a historical stroke code6 corresponding to hall6 may be obtained as the actual stroke of the focus motor.

[0096] In summary, according to the calibration method of the focus motor of the embodiment of the present application, if the set calibration conditions are not met, multiple sets of historical calibration data in the storage space are retained; if the set calibration conditions are not met, the actual output signal of the Hall sensor is collected, multiple sets of historical calibration data are obtained from the storage space, and the historical stroke corresponding to the actual output signal is obtained as the actual stroke of the focus motor. Therefore, when the set calibration conditions are not met, multiple sets of historical calibration data in the storage space can be retained, and the historical stroke corresponding to the actual output signal can be obtained as the actual stroke of the focus motor, that is, the actual output signal and multiple sets of historical calibration data are taken into consideration to obtain the actual stroke of the focus motor.

[0097] In order to implement the above embodiment, the present application also proposes a focus motor calibration device. The camera module includes a focus motor, a Hall sensor, a lens and a magnet.

[0098] Figure 7 A schematic structural diagram of a focus motor calibration device provided in an embodiment of the present application.

[0099] like Figure 7 As shown, the focus motor calibration device 100 includes: an identification module 110 , a calibration module 120 , a deletion module 130 and a storage module 140 .

[0100] An identification module 110 is used to identify whether a set calibration condition is met; A calibration module 120, configured to calibrate the focus motor if the set calibration condition is met, and obtain multiple sets of current calibration data, wherein each set of current calibration data includes a correspondence between a candidate output signal of the Hall sensor and a candidate stroke of the focus motor; A deletion module 130, configured to delete multiple groups of historical calibration data from a storage space, wherein each group of historical calibration data includes a correspondence between a historical output signal of the Hall sensor and a historical stroke of the focus motor; The storage module 140 is used to store multiple groups of the current calibration data into the storage space.

[0101] Furthermore, in a possible implementation of an embodiment of the present application, the set calibration conditions include at least one of the following: the camera module is started; the electronic device where the camera module is located is in a stationary state; the time interval between the most recent calibration moment and the current moment reaches a set duration; the initial relative position between the Hall sensor and the magnet changes.

[0102] Furthermore, in a possible implementation manner of the embodiment of the present application, when the position of the Hall sensor is fixed, the setting of the calibration condition includes: the initial position of the magnet changes.

[0103] Furthermore, in a possible implementation of the embodiment of the present application, when the position of the magnet is fixed, the setting of the calibration condition includes: the initial position of the Hall sensor changes.

[0104] Furthermore, in a possible implementation of an embodiment of the present application, the calibration module 120 is also used to: obtain the i-th candidate output signal of the Hall sensor when the focus motor is in the i-th candidate stroke, where i is a positive integer; establish a corresponding relationship between the i-th candidate output signal and the i-th candidate stroke as the i-th group of current calibration data.

[0105] Furthermore, in a possible implementation method of an embodiment of the present application, after establishing the correspondence between the i-th candidate output signal and the i-th candidate stroke as the i-th group of current calibration data, the calibration module 120 is also used to: control the focus motor to move from the i-th candidate stroke to the i+1-th candidate stroke; obtain the i+1-th candidate output signal of the Hall sensor when the focus motor is in the i+1-th candidate stroke; establish the correspondence between the i+1-th candidate output signal and the i+1-th candidate stroke as the i+1-th group of current calibration data.

[0106] Furthermore, in a possible implementation of the embodiment of the present application, before controlling the focus motor to move from the i-th candidate stroke to the (i+1)-th candidate stroke, the calibration module 120 is also used to: identify that the i-th candidate stroke is not the maximum stroke of the focus motor.

[0107] Furthermore, in a possible implementation of an embodiment of the present application, the calibration module 120 is also used to: obtain the moving distance of the lens from the nearest position to the farthest position as the maximum stroke of the focus motor; control the focus motor to move gradually from the initial stroke to the maximum stroke to obtain a plurality of candidate strokes.

[0108] Furthermore, in a possible implementation method of the embodiment of the present application, after storing the multiple sets of the current calibration data in the storage space, the calibration device 100 of the focus motor also includes: a first processing module, used to: collect the actual output signal of the Hall sensor; obtain the multiple sets of the current calibration data from the storage space; obtain a candidate stroke that has a corresponding relationship with the actual output signal as the actual stroke of the focus motor.

[0109] Furthermore, in a possible implementation of the embodiment of the present application, the focus motor calibration device 100 also includes: a second processing module, used to: retain the multiple groups of historical calibration data in the storage space if the set calibration condition is not met.

[0110] Furthermore, in a possible implementation of an embodiment of the present application, the calibration device 100 of the focus motor also includes: a third processing module, used to: if the set calibration conditions are not met, collect the actual output signal of the Hall sensor; obtain multiple groups of historical calibration data from the storage space; obtain the historical stroke that has a corresponding relationship with the actual output signal as the actual stroke of the focus motor.

[0111] It should be noted that the above explanation of the embodiment of the focus motor calibration method is also applicable to the focus motor calibration device of this embodiment, and will not be repeated here.

[0112] In summary, the calibration device of the focus motor of the embodiment of the present application identifies whether the set calibration conditions are met. If the set calibration conditions are met, the focus motor is calibrated to obtain multiple sets of current calibration data, wherein each set of current calibration data includes the correspondence between the candidate output signal of the Hall sensor and the candidate stroke of the focus motor, and multiple sets of historical calibration data are deleted from the storage space, wherein each set of historical calibration data includes the correspondence between the historical output signal of the Hall sensor and the historical stroke of the focus motor, and the multiple sets of current calibration data are stored in the storage space. Therefore, when the set calibration conditions are met, the focus motor can be calibrated to obtain multiple sets of current calibration data, and multiple sets of historical calibration data are deleted from the storage space, and multiple sets of current calibration data are stored in the storage space, which can realize multiple active and automatic calibration of the focus motor, and update the calibration data of the focus motor in the storage space in real time, thereby improving the accuracy and real-time performance of the calibration data of the focus motor, so that the focus motor and lens movement can be accurately controlled, and the focus accuracy of the camera module is improved.

[0113] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.

[0114] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.

[0115] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.

[0116] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0117] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.

[0118] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.

[0119] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they contradict each other.

[0120] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood to control or imply relative importance or implicitly indicate the number of technical features controlled. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0121] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0122] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0123] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0124] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0125] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0126] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for calibrating a focus motor, characterized in that: The camera module includes a focus motor, a Hall sensor, a lens and a magnet, and the method includes: Identify whether the set calibration conditions are met; If the set calibration condition is met, calibrating the focus motor to obtain multiple sets of current calibration data, wherein each set of the current calibration data includes a correspondence between a candidate output signal of the Hall sensor and a candidate stroke of the focus motor; Deleting multiple groups of historical calibration data from the storage space, wherein each group of historical calibration data includes a correspondence between a historical output signal of the Hall sensor and a historical stroke of the focus motor; A plurality of sets of the current calibration data are stored in the storage space.

2. The method according to claim 1, characterized in that: The setting of calibration conditions includes at least one of the following: The camera module is started; The electronic device where the camera module is located is in a stationary state; The time interval between the most recent calibration time and the current time reaches the set time length; The initial relative position between the Hall sensor and the magnet changes.

3. The method according to claim 2, characterized in that When the position of the Hall sensor is fixed, the setting of the calibration condition includes: the initial position of the magnet changes.

4. The method according to claim 2, characterized in that: When the position of the magnet is fixed, the setting of the calibration condition includes: the initial position of the Hall sensor changes.

5. The method according to claim 1, characterized in that The focusing motor is calibrated to obtain multiple sets of current calibration data, including: Acquire an i-th candidate output signal of the Hall sensor when the focus motor is in an i-th candidate stroke, where i is a positive integer; A corresponding relationship between the i-th candidate output signal and the i-th candidate stroke is established as the i-th group of current calibration data.

6. The method according to claim 5, characterized in that After establishing the corresponding relationship between the i-th candidate output signal and the i-th candidate stroke as the i-th group of current calibration data, the method further includes: Controlling the focus motor to move from the i-th candidate stroke to the i+1-th candidate stroke; Acquire the i+1th candidate output signal of the Hall sensor when the focus motor is in the i+1th candidate stroke; A corresponding relationship between the i+1th candidate output signal and the i+1th candidate stroke is established as the i+1th set of current calibration data.

7. The method according to claim 6, characterized in that Before controlling the focus motor to move from the i-th candidate stroke to the (i+1)-th candidate stroke, the method further includes: It is identified that the i-th candidate stroke is not the maximum stroke of the focus motor.

8. The method according to claim 1, characterized in that The focusing motor is calibrated to obtain multiple sets of current calibration data, including: Obtaining a moving distance of the lens from the closest position to the farthest position as the maximum stroke of the focus motor; The focus motor is controlled to move gradually from an initial stroke to the maximum stroke to obtain a plurality of candidate strokes.

9. The method according to claim 1, characterized in that: After storing the plurality of sets of the current calibration data in the storage space, the method further includes: Collecting the actual output signal of the Hall sensor; Acquire multiple sets of the current calibration data from the storage space; A candidate stroke corresponding to the actual output signal is obtained as the actual stroke of the focus motor.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: If the set calibration condition is not met, the plurality of sets of historical calibration data in the storage space are retained.

11. The method according to claim 10, characterized in that The method further comprises: If the set calibration condition is not met, collecting the actual output signal of the Hall sensor; Acquire multiple groups of the historical calibration data from the storage space; A historical stroke corresponding to the actual output signal is acquired as the actual stroke of the focus motor.

12. A focus motor calibration device, characterized in that: The camera module includes a focus motor, a Hall sensor, a lens and a magnet, and the device includes: An identification module, used to identify whether a set calibration condition is met; a calibration module, configured to calibrate the focus motor if the set calibration condition is met, and obtain multiple sets of current calibration data, wherein each set of current calibration data includes a correspondence between a candidate output signal of the Hall sensor and a candidate stroke of the focus motor; A deleting module, configured to delete multiple groups of historical calibration data from a storage space, wherein each group of the historical calibration data includes a correspondence between a historical output signal of the Hall sensor and a historical stroke of the focus motor; The storage module is used to store multiple groups of the current calibration data into the storage space.

13. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 11 when executed by a processor.

Citation Information

Patent Citations

  • Method for actively carrying out motor precision calibration

    CN108344356A

  • Camera module debugging method, camera module and storage medium

    CN110213570A

  • Position calibration module, calibration method, electronic equipment, calibration device and storage medium

    CN112584136A

  • Photographing equipment, focusing method thereof and computer readable storage medium

    CN112616020A

Cited By

  • Acoustic quantitative evaluation method and device for vibration performance of equipment motor

    CN121702534A