Motor focusing calibration method and device, electronic equipment and medium
By identifying the target focus scene and obtaining reference focus parameters, determining the focus start position and adjustment direction, and controlling the motor movement to achieve fast focus calibration, it solves the complex and time-consuming problem of the focus calibration process in the factory test of the whole machine, and improves production efficiency and Economic benefits.
Patent Information
- Application Number
- CN202310854989.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2043-07-12
AI Technical Summary
In the factory test of electronic equipment, the motor focus accuracy of the camera device is affected by the assembly process and power supply environment, resulting in the complex and time-consuming focus calibration process, affecting production efficiency and economic benefits.
By obtaining the reference focus parameters in the target focus scene, determining the focus start position and adjustment direction, controlling the motor to move at a preset step length, and obtaining the optimal value of the response parameters to achieve fast focus calibration and eliminating the focus rough search stage.
Fast focus calibration is achieved, saving time and cost, improving productivity and economic benefits, while retaining focus stability and accuracy.
Smart Images

Figure CN119316708A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic equipment, and in particular to a motor focus calibration method, device, electronic equipment and medium. Background Art
[0002] Electronic devices with shooting functions involve many testing and calibration steps during the production process. The testing of camera device hardware is mainly divided into module factory testing and whole machine factory testing.
[0003] In order to eliminate the influence of the assembly process of the camera device and the power supply environment of the electronic equipment on the focusing accuracy of the motor of the camera device during the assembly of the electronic equipment, it is necessary to calibrate and test multiple hardware performances such as the focusing state of the motor during the factory testing of the whole machine. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a motor focus calibration method, device, electronic device and medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a motor focus calibration method is provided, and the focus test method includes:
[0006] Acquire a reference focus parameter in a target focus scene, wherein the reference focus parameter is a focus parameter obtained when the camera device is not assembled on the electronic device, the focus parameter corresponds to a motor position of the camera device, and the target focus scene is a near focus scene or a far focus scene;
[0007] Controlling the focus motor to move from a focus starting position to an adjustment direction with a preset step length, wherein the focus starting position and the adjustment direction are determined based on the reference focus parameter, the focus starting position is a starting position of the focus motor of the camera device, and the adjustment direction is a moving direction of the focus motor;
[0008] Acquire an optimal value of a response parameter during the movement of the focus motor, wherein the response parameter is used to characterize the clarity of an image acquired by the camera device;
[0009] The position of the focus motor corresponding to the optimal value of the response parameter is used as the target focus position of the focus motor in the target focus scene.
[0010] In some exemplary embodiments of the present disclosure, the method for determining the focus starting position and the adjustment direction based on the reference focus parameter includes:
[0011] Acquire preset adjustment parameters and a preset adjustment model, wherein the preset adjustment parameters and the preset adjustment model are both related to the hardware parameters of the focus motor;
[0012] Based on the preset adjustment parameters, the preset adjustment model and the reference focus parameters, the focus start position and the adjustment direction are determined.
[0013] In some exemplary embodiments of the present disclosure, determining the focus starting position and the adjustment direction based on the preset adjustment parameter, the preset adjustment model and the reference focus parameter includes:
[0014] The difference between the reference focus parameter and the preset adjustment parameter is taken as the first parameter, the motor position corresponding to the first parameter is taken as the focus starting position, the motor position corresponding to the first parameter is located on the first side of the motor position corresponding to the reference focus parameter, and the direction of the motor position corresponding to the first parameter toward the motor position corresponding to the reference focus parameter is taken as the adjustment direction.
[0015] In some exemplary embodiments of the present disclosure, determining the focus starting position and the adjustment direction based on the preset adjustment parameter, the preset adjustment model and the reference focus parameter includes:
[0016] The sum of the reference focus parameter and the preset adjustment parameter is taken as the second parameter, the motor position corresponding to the second parameter is taken as the focus starting position, the motor position corresponding to the second parameter is located on the second side of the motor position corresponding to the reference focus parameter, and the direction of the motor position corresponding to the second parameter toward the motor position corresponding to the reference focus parameter is taken as the adjustment direction.
[0017] In some exemplary embodiments of the present disclosure, the method for determining the target focus scene includes:
[0018] Acquire ranging information of a ranging device;
[0019] The ranging information falls within a first threshold range, and the target focus scene is determined to be a near focus scene;
[0020] The ranging information falls within a second threshold range, and the target focus scene is determined to be a far focus scene;
[0021] The second threshold range is greater than the first threshold range.
[0022] In some exemplary embodiments of the present disclosure, the method for determining the target focus scene includes:
[0023] Based on the received first instruction information, determining that the target focus scene is a near focus scene;
[0024] Based on the received second instruction information, it is determined that the target focus scene is a far-focus scene.
[0025] In some exemplary embodiments of the present disclosure, the response parameter includes a spatial frequency response, and obtaining an optimal value of the response parameter during the movement of the focus motor includes:
[0026] The maximum value of the spatial frequency response during the movement of the focus motor is obtained.
[0027] In some exemplary embodiments of the present disclosure, the motor focus calibration method includes:
[0028] Based on the received third instruction information, controlling the focus motor to move to a preset position;
[0029] Based on the received fourth instruction information, the focus motor is controlled to move from the preset position to the focus starting position.
[0030] According to a second aspect of an embodiment of the present disclosure, a motor focus calibration device is provided, the focus calibration device comprising:
[0031] an acquisition module, configured to acquire reference focus parameters in a target focus scene, wherein the reference focus parameters are focus parameters obtained when the camera device is not assembled on the electronic device, the focus parameters correspond to a motor position of the camera device, and the target focus scene is a near focus scene or a far focus scene;
[0032] A control module, configured to control the focus motor to move from a focus starting position to an adjustment direction with a preset step length, wherein the focus starting position and the adjustment direction are determined based on the reference focus parameter, the focus starting position is a starting position of the focus motor of the camera device, and the adjustment direction is a moving direction of the focus motor;
[0033] The acquisition module is further used to acquire an optimal value of a response parameter during the movement of the focus motor, wherein the response parameter is used to characterize the clarity of the image acquired by the camera device;
[0034] A determination module is used to use the position of the focus motor corresponding to the optimal value of the response parameter as the target focus position of the focus motor in the target focus scenario.
[0035] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device comprising:
[0036] processor;
[0037] a memory for storing processor-executable instructions;
[0038] Among them, the processor is configured to execute executable instructions in the memory to implement the motor focus calibration method provided in the first aspect of the present disclosure.
[0039] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, on which executable instructions are stored. When the executable instructions are executed by a processor, the motor focus calibration method provided in the first aspect of the present disclosure is implemented.
[0040] The above method disclosed in the present invention has the following beneficial effects: the present invention obtains reference focus parameters by identifying the target focus scene, so that the focus motor determines the focus starting position and adjustment direction. Since the focus starting position is near the target focus position, the focus coarse search stage of the focus calibration process is omitted, and rapid focus calibration is achieved, which saves time and cost in the calibration process and is conducive to improving economic benefits.
[0041] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] 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 present disclosure.
[0043] Figure 1 The figure is a flow chart of a motor focus calibration method according to an exemplary embodiment.
[0044] Figure 2 is a schematic diagram showing the corresponding relationship between the focus motor position and the response parameter according to an exemplary embodiment.
[0045] Figure 3 The figure is a flow chart of a motor focus calibration method according to an exemplary embodiment.
[0046] Figure 4 The figure is a flow chart of a motor focus calibration method according to an exemplary embodiment.
[0047] Figure 5 The figure is a flow chart of a motor focus calibration method according to an exemplary embodiment.
[0048] Figure 6 The figure is a flow chart of a motor focus calibration method according to an exemplary embodiment.
[0049] Figure 7 is a block diagram of a motor focus calibration device according to an exemplary embodiment.
[0050] Figure 8 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0051] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0052] The present invention provides a motor focus calibration method, which is applied to the test process of an electronic device with a camera device. By identifying the target focus scene and obtaining reference focus parameters, the focus motor determines the focus starting position and adjustment direction. Since the focus starting position is near the target focus position, the focus coarse search stage of the focus calibration process is omitted, and rapid focus calibration is achieved, saving time and cost in the calibration process. The motor focus calibration method in the present invention retains the advantages of good focus stability and high focus accuracy of the contrast focus method, and can also improve the speed of focus calibration, effectively improving the speed of the test calibration process, thereby improving the average production capacity of the production line and improving economic benefits.
[0053] An exemplary embodiment of the present disclosure provides a motor focus calibration method, which is applied to a test process of an electronic device with a camera device. The electronic device may specifically be a smart phone, a tablet computer, a smart wearable device, a camera, or other smart electronic device with a camera device.
[0054] The execution subject of the motor focus calibration method disclosed in the present invention can be a test host computer used in the test process, or an electronic device equipped with a camera device. The specific test process can be written into the electronic device through the host computer, and the processor of the electronic device controls the motor to run and complete the motor focus calibration method. Among them, the electronic device or the test host computer includes a motor focus calibration device, that is, a control chip of the electronic device or the test host computer, which has a data processing function, as well as information and instruction receiving and sending functions, etc. For example, it may include an acquisition module for obtaining reference focus parameters, response parameters and other parameters.
[0055] When describing the method in the present disclosure, the application scenario of the method in the present disclosure is described first. In the whole machine factory, it is necessary to test the resolution of the camera device and calibrate the motor's near and far focus. The focusing process is to move the lens to make the image in the focus area the clearest. At present, the methods for AF (Auto Focus) calibration in the whole machine factory mainly include: Contrast AF (CAF) and Phase Detection Auto Focus (PDAF).
[0056] The focusing principle of PDAF is based on phase difference measurement. The principle is to reserve some regularly symmetrical masked pixels on the photosensitive chip specifically for phase detection. When light enters the camera device through the lens, the light will be divided into two beams. The distance and change between the pixels determine the focus offset, that is, the phase difference, thereby determining the focal position and achieving focus.
[0057] The focusing principle of CAF is to drive the motor to the default position based on the photo command, enter the coarse focus search stage, obtain the image of the current focus position, calculate the spatial frequency response (SFR) of the preview image, move the lens in one direction, and calculate the SFR of the next preview image. After the motor's coarse search (the motor moves in large steps), confirm the possible position range of the peak in the spatial frequency response curve. Then perform a fine search within this range (the motor moves in small steps), and finally confirm that the position of the SFR maximum value is the focus target position, and move the lens to the SFR peak to complete this focus.
[0058] Although the PDAF method can speed up the focusing speed, the focusing accuracy and stability of PDAF are worse than CAF, and the PDAF method requires the module to reserve PDAF pixels during design and production, which places high demands on the module itself. However, since the CAF method requires two processes, namely, a rough search and a fine search, the focusing process takes a long time during the testing process of the whole machine factory, which is not conducive to improving the production capacity in the large-scale production process. Based on this, the present disclosure provides a motor focus calibration method to improve the focusing efficiency while achieving a better focusing effect.
[0059] like Figure 1 As shown, the motor focus calibration method shown in the present disclosure includes:
[0060] S101, obtaining reference focus parameters in a target focus scenario;
[0061] S102, controlling the focus motor to move in an adjustment direction with a preset step length from a focus starting position;
[0062] S103, obtaining an optimal value of a response parameter during the movement of the focus motor, where the response parameter is used to characterize the clarity of an image acquired by the camera device;
[0063] S104: Taking the position of the focus motor corresponding to the optimal value of the response parameter as the target focus position of the focus motor in the target focus scene.
[0064] In step S101, the target focus scene includes a near-focus scene and a far-focus scene, and the distance between the photographed object and the electronic device is used to determine whether it belongs to a near-focus scene or a far-focus scene. When the camera device leaves the factory, the values corresponding to the near-focus scene and the far-focus scene will be set. Different values can be set for different electronic devices used by the camera device. For example, if the camera device is used in an ordinary smart phone, the photographed object can be set to a near-focus scene if it is within 8m from the electronic device, and a far-focus scene if it is more than 10m; if the camera device is used in a camera, the photographed object can be set to a near-focus scene if it is within 10m from the electronic device, and a far-focus scene if it is more than 10m. Here, it should be noted that the above-mentioned specific values are only used to illustrate the concepts of far-focus scenes and near-focus scenes. According to the specific application scenarios of the camera device and the electronic device, the threshold ranges defining the far-focus scenes and near-focus scenes can be adjusted.
[0065] The motor focus calibration device can receive the detection information of the sensor by connecting to the sensor, and then determine the distance between the photographed object and the electronic device to judge the target focus scene. The sensor can be a laser focus sensor, a time of flight distance sensor (TOF, Time Of Flight), etc. In addition, the motor focus calibration device can also directly obtain the instructions of the test host computer, which directly gives the distance between the photographed object and the electronic device in the current test scene, and then judge whether it is a near focus scene or a far focus scene based on the instructions.
[0066] The reference focus parameter is the focus parameter obtained when the camera device is tested by the module factory but has not yet been assembled on the electronic device. The focus parameter is a DAC value (a value obtained through analog-to-digital conversion). For each DAC value, the motor has a corresponding position. For example, when the focus parameter is A, the corresponding position of the motor is at X; when the focus parameter is B, the corresponding position of the motor is at Y. Since the reference focus parameters corresponding to the target focus scene are stored in EEPROM (Electrically Erasable Programmable Read-Only Memory), after determining the target focus scene, the motor focus calibration device can obtain the reference focus parameters under the target focus scene.
[0067] In step S102, the motor focus calibration device determines the starting position and moving direction of the focus motor of the camera device based on the obtained reference focus parameters. For example, if the obtained reference focus parameter is A, the starting position of the corresponding focus motor is determined to be at X, and the moving direction is the positive direction; if the obtained reference focus parameter is B, the starting position of the corresponding focus motor is determined to be at Y, and the moving direction is the reverse direction. It should be noted that the focus starting position of the focus motor is not the default position of the focus motor. After the motor focus calibration device determines the starting position based on the reference focus parameters, it will move the focus motor from the default position to the starting position of the focus motor. For example, the default position of the focus motor is at 0, and the starting position of the focus motor is determined to be at X based on the reference focus parameters. The motor focus calibration device will move the focus motor from 0 to X.
[0068] Since the focus starting position is determined based on the reference focus parameters, and the reference focus parameters are determined based on the target focus scene, the focus starting position is near the target focus position. The motor focus calibration device moves the focus motor from the default initial position to the focus starting position, so that the focus motor does not need to perform a large-step focus search, but only needs to move in the adjustment direction from the focus starting position with a small preset step length. The specific value of the preset step length can be set according to the requirements of the electronic device for the camera quality. For example, if the camera device is used in an ordinary smart phone, the preset step length can be set to 5 steps; if the camera device is used in a camera, the preset step length can be set to 2 steps.
[0069] In step S103, while the motor focus calibration device controls the focus motor to move from the focus start position to the adjustment direction with a preset step length, an image of the position of the focus motor in the camera device is obtained, and the response parameters corresponding to the image are calculated. The position corresponding to the focus motor and the response parameters corresponding to the acquired image during the movement of the focus motor are expressed with a smooth curve and data markers to obtain the following: Figure 2 The scatter plot shown contains a curve with a peak value, and the peak value is the optimal value of the response parameter. The response parameter is used to characterize the clarity of the image acquired by the camera device. The larger the response parameter, the higher the clarity of the image. Therefore, during the movement of the focus motor, the optimal value of the response parameter corresponds to the highest clarity of the image.
[0070] In step S104, since the image obtained by the position of the focus motor corresponding to the optimal value of the response parameter is the clearest, it can be determined that the lens is in a focused state at this time. Therefore, the position of the focus motor corresponding to the optimal value of the response parameter is used as the target focus position of the focus motor in the target focus scene, and the motor focus calibration device completes the focus by moving the focus motor to the target focus position.
[0071] In the present disclosure, by identifying the target focus scene and obtaining the reference focus parameters, the focus motor determines the focus starting position and adjustment direction. Since the focus starting position is near the target focus position, the focus coarse search stage is omitted, and fast focus is achieved, saving the focus time and cost during the test process, effectively improving the average production capacity of the production line and improving economic benefits.
[0072] According to an exemplary embodiment, Figure 3 As shown, the motor focus calibration method in this embodiment includes:
[0073] S301, obtaining reference focus parameters in a target focus scenario;
[0074] S302, obtaining preset adjustment parameters and a preset adjustment model, wherein the preset adjustment parameters and the preset adjustment model are both related to hardware parameters of the focus motor;
[0075] S303, determining a focus starting position and an adjustment direction based on preset adjustment parameters, a preset adjustment model and a reference focus parameter;
[0076] S304, controlling the focus motor to move in an adjustment direction with a preset step length from a focus starting position;
[0077] S305, obtaining an optimal value of a response parameter during the movement of the focus motor, where the response parameter is used to characterize the clarity of an image acquired by the camera device;
[0078] S306 : Using the position of the focus motor corresponding to the optimal value of the response parameter as the target focus position of the focus motor in the target focus scene.
[0079] Among them, the implementation method of step S301 is the same as the implementation method of S101 in the above embodiment, and the implementation methods of S304-S306 are the same as the implementation methods of S102-S104 in the above embodiment, which will not be repeated here. Electronic equipment with shooting functions involves many testing and calibration links in the production process. The test of the camera device hardware is mainly divided into module factory test and whole machine factory test. Among them, the module factory passes the whiteboard test, dark state test, resolution test and other links to confirm that the performance of module components such as camera devices meets the indicators. At the same time, during the module factory testing process, many module parameters of the camera device will also be calibrated. After the module factory completes the test, the qualified and calibrated camera device will be handed over to the assembly factory for testing and assembly.
[0080] In step S302, since the power supply environment of the camera device changes during the installation of the electronic device using various modules, and extrusion occurs during the assembly process, causing some structures of the module to be deformed, there is a difference between the performance of the camera device in the whole machine factory and the performance in the module factory. Therefore, there is a difference between the focus parameters obtained when the camera device is assembled on the electronic device and the reference focus parameters obtained when the camera device is not assembled on the electronic device. By obtaining a certain number of reference focus parameters of the camera device before it is assembled on the electronic device and the focus parameters after it is assembled on the electronic device, the difference between the two is used as the preset adjustment parameter, and each position of the focus motor has a corresponding preset adjustment parameter, thereby forming a preset adjustment model. The preset adjustment parameters in the preset adjustment model can be used for the subsequent test calibration process of the camera devices of the same batch. Among them, the hardware parameters such as the power supply voltage and installation position of the focus motor will affect the preset adjustment parameters and the preset adjustment model. If the power supply environment of the whole machine is significantly different from the power supply environment of the module factory, and there is obvious squeezing during the assembly process, the difference between the preset adjustment parameters corresponding to each position in the preset adjustment model of the focus motor and the reference focus parameters is large, and the value of the preset step length can be set to a large value; on the contrary, if the hardware parameters of the focus motor during the assembly process are slightly different from the hardware parameters of the focus motor when the camera device is not assembled in the electronic device, the difference between the preset adjustment parameters corresponding to each position in the preset adjustment model of the focus motor and the reference focus parameters is small, and the value of the preset step length can be set to a small value. Therefore, in step S303, after obtaining the preset adjustment parameters and the preset adjustment model, the motor focus calibration device determines the focus starting position and adjustment direction based on the preset adjustment parameters, the preset adjustment model and the reference focus parameters, which can improve the speed and accuracy of the focusing process.
[0081] According to an exemplary embodiment, Figure 4 As shown, the motor focus calibration method in this embodiment includes:
[0082] S401, obtaining reference focus parameters in a target focus scenario;
[0083] S402, obtaining preset adjustment parameters and a preset adjustment model, wherein the preset adjustment parameters and the preset adjustment model are both related to hardware parameters of the focus motor;
[0084] S403, taking the difference between the reference focus parameter and the preset adjustment parameter as the first parameter, taking the motor position corresponding to the first parameter as the focus start position, the motor position corresponding to the first parameter being located on a first side of the motor position corresponding to the reference focus parameter, and taking the direction of the motor position corresponding to the first parameter toward the motor position corresponding to the reference focus parameter as the adjustment direction;
[0085] S404, controlling the focus motor to move in an adjustment direction with a preset step length from a focus starting position;
[0086] S405, obtaining an optimal value of a response parameter during the movement of the focus motor, where the response parameter is used to characterize the clarity of an image acquired by the camera device;
[0087] S406 : Using the position of the focus motor corresponding to the optimal value of the response parameter as the target focus position of the focus motor in the target focus scenario.
[0088] Among them, steps S401-S402 and S404-S406 are the same as those in the above embodiment and will not be repeated here.
[0089] In step S403, if the focus motor position corresponding to the reference focus parameter is determined to be located in the opposite direction of the target focus position based on the preset adjustment parameter and the preset adjustment model, the motor focus calibration device uses the difference between the reference focus parameter and the preset adjustment parameter as the first parameter, wherein the reference focus parameter can be represented by DAC1, the preset adjustment parameter can be represented by DAC_DIFF, and the first parameter can be represented by DAC2, so the first parameter DAC2 = DAC1-DAC_DIFF. Considering the difference between the focus motor during the assembly process and when the camera device is not assembled in the electronic device, the motor focus calibration device uses the motor position corresponding to the first parameter as the focus starting position, wherein the motor position corresponding to the first parameter is located on the first side of the motor position corresponding to the reference focus parameter, and the motor focus calibration device uses the direction of the motor position corresponding to the first parameter toward the motor position corresponding to the reference focus parameter as the adjustment direction.
[0090] like Figure 2 As shown, the value of the reference focus parameter DAC1 is A, the value of the preset adjustment parameter DAC_DIFF is △a, the Z position of the focus motor is the target focus position, and the motor position corresponding to the reference focus parameter is at X, which is located in the opposite direction of the target focus position. Therefore, the value of the first parameter DAC2 is a=A-△a, and the motor position M corresponding to the first parameter is used as the focus starting position. The adjustment direction of the focus motor is from M to X, that is, the adjustment direction is the positive direction.
[0091] According to an exemplary embodiment, Figure 5 As shown, the motor focus calibration method in this embodiment includes:
[0092] S501, obtaining reference focus parameters in a target focus scenario;
[0093] S502, obtaining preset adjustment parameters and a preset adjustment model, wherein the preset adjustment parameters and the preset adjustment model are both related to hardware parameters of the focus motor;
[0094] S503, taking the sum of the reference focus parameter and the preset adjustment parameter as the second parameter, taking the motor position corresponding to the second parameter as the focus start position, the motor position corresponding to the second parameter being located on a second side of the motor position corresponding to the reference focus parameter, and taking the direction of the motor position corresponding to the second parameter toward the motor position corresponding to the reference focus parameter as the adjustment direction;
[0095] S504, controlling the focus motor to move in an adjustment direction with a preset step length from a focus starting position;
[0096] S505, obtaining an optimal value of a response parameter during the movement of the focus motor, where the response parameter is used to characterize the clarity of an image acquired by the camera device;
[0097] S506 : Using the position of the focus motor corresponding to the optimal value of the response parameter as the target focus position of the focus motor in the target focus scene.
[0098] Among them, steps S501-S502 and S504-S506 are the same as those in the above embodiment and will not be repeated here.
[0099] In step S503, if the focus motor position corresponding to the reference focus parameter is determined to be in the positive direction of the target focus position based on the preset adjustment parameter and the preset adjustment model, the motor focus calibration device uses the sum of the reference focus parameter and the preset adjustment parameter as the second parameter, wherein the reference focus parameter can be represented by DAC1, the preset adjustment parameter can be represented by DAC_DIFF, and the second parameter can be represented by DAC3, so the first parameter DAC3=DAC1+DAC_DIFF. Considering the difference between the focus motor during the assembly process and when the camera device is not assembled in the electronic device, the motor focus calibration device uses the motor position corresponding to the second parameter as the focus starting position, wherein the motor position corresponding to the second parameter is located on the second side of the motor position corresponding to the reference focus parameter, and the motor focus calibration device uses the direction of the motor position corresponding to the second parameter toward the motor position corresponding to the reference focus parameter as the adjustment direction.
[0100] like Figure 2 As shown, the value of the reference focus parameter DAC1 is B, the value of the preset adjustment parameter DAC_DIFF is △b, the Z position of the focus motor is the target focus position, and the motor position corresponding to the reference focus parameter is at Y, which is located in the positive direction of the target focus position. Therefore, the value of the second parameter DAC3 is b=B+△b, and the motor position N corresponding to the second parameter is used as the focus starting position. The adjustment direction of the focus motor is from N to Y, that is, the adjustment direction is in the opposite direction.
[0101] According to an exemplary embodiment, Figure 6 As shown, the motor focus calibration method in this embodiment includes:
[0102] S601, obtaining ranging information of a ranging device;
[0103] S602, determining whether the ranging information falls within a first threshold range, if the ranging information falls within the first threshold range, executing step S603; if the ranging information does not fall within the first threshold range, executing step S604;
[0104] S603: The distance measurement information falls within a first threshold range, and the target focus scene is determined to be a near focus scene;
[0105] S604: The distance measurement information falls within a second threshold range, and the target focus scene is determined to be a far focus scene;
[0106] S605, obtaining reference focus parameters in a target focus scenario;
[0107] S606, obtaining preset adjustment parameters and a preset adjustment model, wherein the preset adjustment parameters and the preset adjustment model are both related to hardware parameters of the focus motor;
[0108] S607, determining a focus starting position and an adjustment direction based on preset adjustment parameters, a preset adjustment model and a reference focus parameter;
[0109] S608, controlling the focus motor to move in an adjustment direction with a preset step length from a focus starting position;
[0110] S609, obtaining an optimal value of a response parameter during the movement of the focus motor, where the response parameter is used to characterize the clarity of an image acquired by the camera device;
[0111] S610: Taking the position of the focus motor corresponding to the optimal value of the response parameter as the target focus position of the focus motor in the target focus scene.
[0112] Among them, steps S605-S610 are the same as those in the above embodiment and will not be repeated here.
[0113] In step S601, the motor focus calibration device can maintain a communication connection with the distance measuring device to obtain the distance measuring information of the distance measuring device. The distance measuring device can be a laser focus sensor, a time of flight distance measuring sensor (TOF, Time OfFlight), etc. The time of flight distance measuring sensor is used as the distance measuring device for explanation below. The time of flight distance measuring sensor measures the time that infrared light flies in space, and converts the time into the distance between the object and the electronic device in the shooting picture by calculation.
[0114] In step S602, based on the setting of the electronic device for the far focus scene and the near focus scene, the first threshold range and the second threshold range can be clarified, wherein the target focus scene corresponding to the first threshold range is the near focus scene, and the target focus scene corresponding to the second threshold range is the far focus scene. Since the distance between the photographed object and the electronic device in the far focus scene is greater than the distance between the photographed object and the electronic device in the near focus scene, the second threshold range is greater than the first threshold range. The motor focus calibration device determines the threshold range within which the ranging information falls based on the acquired ranging information. If the acquired ranging information falls within the first threshold range, step S603 is executed to determine that the target focus scene is the near focus scene. If the acquired ranging information falls within the second threshold range, step S604 is executed to determine that the target focus scene is the far focus scene. For example, the first threshold range corresponding to the near focus scene is [0, 10m], and the second threshold range corresponding to the far focus scene is (10m, 40m]. If the distance information obtained by the motor focus calibration device is 8m, the motor focus calibration device determines that the distance information falls into the first threshold range, and determines that the target focus scene is a near focus scene; if the distance information obtained by the motor focus calibration device is 12m, the motor focus calibration device determines that the distance information falls into the second threshold range, and determines that the target focus scene is a far focus scene. When it is determined in step S603 that the target focus scene is a near focus scene, the reference focus parameters of the near focus scene are obtained in the subsequent step S605. When the target focus scene is a far focus scene, the reference focus parameters of the far focus scene are obtained in the subsequent step S605. It should be noted that the above specific values are only used to illustrate the concepts of far focus scenes and near focus scenes. According to the specific application scenarios of the camera device and the electronic device, the threshold ranges defining the far focus scene and the near focus scene can be adjusted.
[0115] In some embodiments, a method for determining a target focus scene includes:
[0116] Based on the received first instruction information, determining that the target focus scene is a near focus scene;
[0117] Based on the received second instruction information, it is determined that the target focus scene is a far focus scene.
[0118] The motor focus calibration device can obtain the command information sent by the electronic device or the test host computer, and determine whether it is a near focus scene or a far focus scene based on the command information, wherein the command information can be numerical information, touch information, voice information, etc. The electronic device or the test host computer uses the command information for determining that the target focus scene is a near focus scene as the first command information, and uses the command information for determining that the target focus scene is a far focus scene as the second command information. Therefore, when the motor focus calibration device receives the first command information, it can determine that the target focus scene is a near focus scene; when the motor focus calibration device receives the second command information, it can determine that the target focus scene is a far focus scene.
[0119] For example, during the test calibration process, when it is determined to start the shooting function of the electronic device, the test host computer sends numerical information to the motor focus calibration device. If the first instruction information with the ranging information being within the first threshold range is sent, the motor focus calibration device can determine the near focus scene based on the received first instruction information; if the second instruction information with the ranging information being within the second threshold range is sent, the motor focus calibration device can determine the far focus scene based on the received second instruction information. For another example, an option for the target focus scene will pop up on the display screen of the electronic device or the test host computer. If the "near focus scene" option is selected, the first instruction information is sent to the motor focus calibration device, and the motor focus calibration device can determine the near focus scene based on the received first instruction information; if the "far focus scene" option is selected, the second instruction information is sent to the motor focus calibration device, and the motor focus calibration device can determine the far focus scene based on the received second instruction information. For another example, there are two fixed buttons for selecting the target focus scene on the test host computer. If the "near focus scene" button is selected, the first instruction information is sent to the motor focus calibration device, and the motor focus calibration device can determine the near focus scene based on the received first instruction information; if the "far focus scene" button is selected, the second instruction information is sent to the motor focus calibration device, and the motor focus calibration device can determine the far focus scene based on the received second instruction information.
[0120] In some embodiments, the response parameter includes a spatial frequency response, and obtaining an optimal value of the response parameter during the movement of the focus motor includes:
[0121] Gets the maximum value of the spatial frequency response during focus motor movement.
[0122] The response parameters include the spatial frequency response (SFR), which is mainly used to measure the impact of increasing spatial frequency lines on a single image. The larger the spatial frequency response, the higher the image clarity. Therefore, obtaining the maximum value of the spatial frequency response during the movement of the focus motor corresponds to the optimal value of the response parameter. Since the image obtained by the camera device in the quasi-focus state is the clearest, during the movement of the focus motor, the target focus position can be determined based on obtaining the maximum value of the spatial frequency response, that is, the position of the focus motor corresponding to the maximum value of the spatial frequency response is the target focus position.
[0123] In some embodiments, a motor focus calibration method includes:
[0124] Based on the received third instruction information, controlling the focus motor to move to a preset position;
[0125] Based on the received fourth instruction information, the focus motor is controlled to move from the preset position to the focus starting position.
[0126] In a close-focus scenario, since the object being photographed is relatively close to the electronic device, the focus motor can have multiple target focus positions corresponding to it in the quasi-focus state. The focus motor needs to move multiple preset steps to determine the target focus position so that the lens can be in the quasi-focus state to obtain a clear image. Therefore, the motor focus calibration device only needs to control the focus motor to move to a preset position, and then move in the adjustment direction from the preset position with a small preset step length. In a far-focus scenario, since the object being photographed is relatively far from the electronic device, the focus motor has fewer target focus positions corresponding to it in the quasi-focus state. In order to save time spent in the focusing process, the motor focus calibration device can control the focus motor to move to the focus starting position, and then move in the adjustment direction with a small preset step length to determine the target focus position.
[0127] The motor focus calibration device can obtain the command information sent by the electronic device or the test host computer, and determine whether it is a near focus scene or a far focus scene based on the command information, wherein the command information can be numerical information, touch information, voice information, etc. The electronic device or the test host computer uses the command information for determining that the target focus scene is a near focus scene as the third command information, and uses the command information for determining that the target focus scene is a far focus scene as the fourth command information. Therefore, when the motor focus calibration device receives the third command information, it can determine that the target focus scene is a near focus scene, and control the focus motor to move to a preset position; when the motor focus calibration device receives the fourth command information, it can determine that the target focus scene is a far focus scene, and control the focus motor to move from the preset position to the focus starting position.
[0128] For example, during the test calibration process, when it is determined to start the shooting function of the electronic device, the test host computer sends numerical information to the motor focus calibration device. If the third instruction information with the distance measurement information being within the first threshold range is sent, the motor focus calibration device can determine the near focus scene based on the received third instruction information and control the focus motor to move to the preset position; if the fourth instruction information with the distance measurement information being within the second threshold range is sent, the motor focus calibration device can determine the far focus scene based on the received second instruction information and control the focus motor to move from the preset position to the focus start position. For another example, the third instruction and the fourth instruction are both voice instructions. When the motor focus calibration device obtains the third instruction with the voice content including "near focus scene" sent by the electronic device or the test host computer, the focus motor is controlled to move to the preset position; when the motor focus calibration device obtains the fourth instruction with the voice content including "far focus scene" sent by the electronic device or the test host computer, the focus motor is controlled to move from the preset position to the focus start position.
[0129] The calibration value is obtained during the test calibration process in the whole machine state, and can be used by users after the electronic equipment leaves the factory. When the user shoots a distant scene, the camera device is in a telefocus scene, and the motor can move directly to the focus starting position, improving the user experience.
[0130] In an exemplary embodiment of the present disclosure, a motor focus calibration method is provided. The motor focus calibration device can determine the target focus scene by acquiring the distance measurement information of the distance measurement device. If the distance measurement information falls within the first threshold range, the target focus scene is determined to be a near focus scene. If the distance measurement information falls within the second threshold range, the target focus scene is determined to be a far focus scene. In addition, the motor focus calibration device can also determine the target focus scene based on the received instruction information.
[0131] The motor focus device obtains the reference focus parameter under the target focus scene based on the determined target focus scene. If the focus motor position corresponding to the reference focus parameter is determined to be located in the opposite direction of the target focus position based on the preset adjustment parameter and the preset adjustment model, the motor focus calibration device uses the difference between the reference focus parameter and the preset adjustment parameter as the first parameter, the motor position corresponding to the first parameter is the focus start position, and the direction of the motor position corresponding to the first parameter toward the motor position corresponding to the reference focus parameter is used as the adjustment direction. If the focus motor position corresponding to the reference focus parameter is determined to be located in the positive direction of the target focus position based on the preset adjustment parameter and the preset adjustment model, the motor focus calibration device uses the sum of the reference focus parameter and the preset adjustment parameter as the second parameter, the motor position corresponding to the second parameter is the focus start position, and the direction of the motor position corresponding to the second parameter toward the motor position corresponding to the reference focus parameter is used as the adjustment direction. The motor focus device also obtains the optimal value of the response parameter that characterizes the clarity of the image of the camera device during the movement of the focus motor, and uses the position of the focus motor corresponding to the optimal value of the response parameter as the target focus position under the target focus scene. The motor focusing device controls the focusing motor to move in the adjustment direction at a preset step length from the focusing starting position. When the focusing motor moves to the target focusing position, the motor focus calibration is completed.
[0132] If there is extrusion during the module assembly process, the actual target focus position of the camera device in the target focus scene after assembly will deviate from the target focus position in the target focus scene during the calibration process, resulting in a decrease in the clarity of the image captured by the camera device in the target focus scene. Therefore, after completing the focus calibration of the above-mentioned motor, the quasi-focus position corresponding to the near focus scene and the far focus scene can be obtained respectively, and then the motor focus device can generate the lenspos-step curve of the autofocus algorithm that the subsequent user will use in the process of shooting with the camera device. The curve determines the position where the motor needs to be pushed to move in each step process when the motor is adjusted during the shooting process using the shooting device. The curve is used to calibrate the camera device in the whole machine factory to determine the direction and position of the motor that needs to be adjusted during the focus calibration process, which can effectively reduce the focusing time of the camera device during the motor focus calibration process in the whole machine factory, effectively improve the efficiency of the factory production line, and improve economic benefits.
[0133] In addition, if the quasi-focus position of the far-focus scene and the near-focus scene deviates from the actual position of the camera device due to assembly squeezing during the assembly process of the whole machine factory, the shooting clarity of the far-focus scene and the near-focus scene will be reduced during the subsequent user use. Using the method disclosed in the present invention to calibrate the automatic focus of the whole machine can avoid the adverse effects of squeezing on the camera device during the assembly process of the whole machine, thereby improving the focus clarity in various scenes, thereby reducing the focusing time and improving the factory efficiency and revenue.
[0134] The exemplary embodiment of the present disclosure provides a motor focus calibration device. Figure 7 As shown, a block diagram of a motor focus calibration device shown in the present disclosure.
[0135] The shooting device includes: an acquisition module 701, a control module 702 and a determination module 703. The acquisition module 701 is used to acquire reference focus parameters in a target focus scene, wherein the reference focus parameters are focus parameters obtained when the camera device is not assembled on an electronic device, the focus parameters correspond to the motor position of the camera device, and the target focus scene is a near focus scene or a far focus scene; the control module 702 is used to control the focus motor to move in an adjustment direction with a preset step length from a focus start position, wherein the focus start position and the adjustment direction are determined based on the reference focus parameters, the focus start position is the start position of the focus motor of the camera device, and the adjustment direction is the moving direction of the focus motor; the acquisition module 701 is also used to acquire the optimal value of the response parameter during the movement of the focus motor, and the response parameter is used to characterize the clarity of the image acquired by the camera device; the determination module 703 is used to use the position of the focus motor corresponding to the optimal value of the response parameter as the target focus position of the focus motor in the target focus scene.
[0136] In an exemplary embodiment of the present disclosure, the determination module 703 is also used to: obtain preset adjustment parameters and a preset adjustment model, wherein the preset adjustment parameters and the preset adjustment model are both related to the hardware parameters of the focus motor; determine the focus starting position and adjustment direction based on the preset adjustment parameters, the preset adjustment model and the reference focus parameters.
[0137] In an exemplary embodiment of the present disclosure, the determination module 703 is also used to: use the difference between the reference focus parameter and the preset adjustment parameter as the first parameter, use the motor position corresponding to the first parameter as the focus starting position, the motor position corresponding to the first parameter is located on the first side of the motor position corresponding to the reference focus parameter, and use the direction of the motor position corresponding to the first parameter toward the motor position corresponding to the reference focus parameter as the adjustment direction.
[0138] In an exemplary embodiment of the present disclosure, the determination module 703 is also used to: use the sum of the reference focus parameter and the preset adjustment parameter as the second parameter, use the motor position corresponding to the second parameter as the focus starting position, the motor position corresponding to the second parameter is located on the second side of the motor position corresponding to the reference focus parameter, and use the direction of the motor position corresponding to the second parameter toward the motor position corresponding to the reference focus parameter as the adjustment direction.
[0139] In an exemplary embodiment of the present disclosure, the determination module 703 is also used to: obtain ranging information of the ranging device; when the ranging information falls into a first threshold range, determine that the target focus scene is a near focus scene; when the ranging information falls into a second threshold range, determine that the target focus scene is a far focus scene; wherein the second threshold range is greater than the first threshold range.
[0140] In an exemplary embodiment of the present disclosure, the determination module 703 is further used to: determine that the target focus scene is a near focus scene based on the received first instruction information; and determine that the target focus scene is a far focus scene based on the received second instruction information.
[0141] In an exemplary embodiment of the present disclosure, the acquisition module 701 is further used to: acquire the maximum value of the spatial frequency response during the movement of the focus motor.
[0142] In an exemplary embodiment of the present disclosure, the control module 702 is further used to: control the focus motor to move to a preset position based on the received third instruction information; and control the focus motor to move from the preset position to the focus starting position based on the received fourth instruction information.
[0143] Regarding the motor focus calibration device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0144] Figure 88 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0145] Reference Figure 8 , the electronic device 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 .
[0146] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0147] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk or optical disk.
[0148] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0149] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the 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 input signals from the 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 boundaries of the 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 camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0150] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0151] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as 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.
[0152] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical 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 accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0153] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can 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 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0154] In an exemplary embodiment, the electronic device 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, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0155] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to complete the motor focus calibration method. For example, the non-transitory computer-readable storage medium can 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.
[0156] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables a processing device of the electronic device to execute a motor focus calibration method provided by an exemplary embodiment of the present disclosure.
[0157] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0158] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A motor focus calibration method, characterized in that: The motor focus calibration method comprises: Acquire a reference focus parameter in a target focus scene, wherein the reference focus parameter is a focus parameter obtained when the camera device is not assembled on the electronic device, the focus parameter corresponds to a motor position of the camera device, and the target focus scene is a near focus scene or a far focus scene; Controlling the focus motor to move from a focus starting position to an adjustment direction with a preset step length, wherein the focus starting position and the adjustment direction are determined based on the reference focus parameter, the focus starting position is a starting position of the focus motor of the camera device, and the adjustment direction is a moving direction of the focus motor; Acquire an optimal value of a response parameter during movement of the focus motor, wherein the response parameter is used to characterize the clarity of an image acquired by the camera device; The position of the focus motor corresponding to the optimal value of the response parameter is used as the target focus position of the focus motor in the target focus scene.
2. The motor focus calibration method according to claim 1, characterized in that: The method for determining the focus starting position and the adjustment direction based on the reference focus parameter includes: Acquire preset adjustment parameters and a preset adjustment model, wherein the preset adjustment parameters and the preset adjustment model are both related to the hardware parameters of the focus motor; Based on the preset adjustment parameters, the preset adjustment model and the reference focus parameters, the focus start position and the adjustment direction are determined.
3. The motor focus calibration method according to claim 2, characterized in that: The determining the focus starting position and the adjustment direction based on the preset adjustment parameter, the preset adjustment model and the reference focus parameter includes: The difference between the reference focus parameter and the preset adjustment parameter is taken as the first parameter, the motor position corresponding to the first parameter is taken as the focus starting position, the motor position corresponding to the first parameter is located on the first side of the motor position corresponding to the reference focus parameter, and the direction of the motor position corresponding to the first parameter toward the motor position corresponding to the reference focus parameter is taken as the adjustment direction.
4. The motor focus calibration method according to claim 2, characterized in that: The determining the focus starting position and the adjustment direction based on the preset adjustment parameter, the preset adjustment model and the reference focus parameter includes: The sum of the reference focus parameter and the preset adjustment parameter is taken as the second parameter, the motor position corresponding to the second parameter is taken as the focus starting position, the motor position corresponding to the second parameter is located on the second side of the motor position corresponding to the reference focus parameter, and the direction of the motor position corresponding to the second parameter toward the motor position corresponding to the reference focus parameter is taken as the adjustment direction.
5. The motor focus calibration method according to any one of claims 1 to 4, characterized in that: The method for determining the target focus scene includes: Acquire ranging information of a ranging device; The ranging information falls within a first threshold range, and the target focus scene is determined to be a near focus scene; The ranging information falls within a second threshold range, and the target focus scene is determined to be a far focus scene; The second threshold range is greater than the first threshold range.
6. The motor focus calibration method according to any one of claims 1 to 4, characterized in that: The method for determining the target focus scene includes: Based on the received first instruction information, determining that the target focus scene is a near focus scene; Based on the received second instruction information, it is determined that the target focus scene is a far-focus scene.
7. The motor focus calibration method according to any one of claims 1 to 4, characterized in that: The response parameter includes a spatial frequency response, and obtaining an optimal value of the response parameter during the movement of the focus motor includes: The maximum value of the spatial frequency response during the movement of the focus motor is obtained.
8. The motor focus calibration method according to any one of claims 1 to 4, characterized in that: The motor focus calibration method comprises: Based on the received third instruction information, controlling the focus motor to move to a preset position; Based on the received fourth instruction information, the focus motor is controlled to move from the preset position to the focus starting position.
9. A motor focus calibration device, characterized in that: The motor focus calibration device comprises: an acquisition module, configured to acquire reference focus parameters in a target focus scene, wherein the reference focus parameters are focus parameters obtained when the camera device is not assembled on the electronic device, the focus parameters correspond to a motor position of the camera device, and the target focus scene is a near focus scene or a far focus scene; A control module, configured to control the focus motor to move from a focus starting position to an adjustment direction with a preset step length, wherein the focus starting position and the adjustment direction are determined based on the reference focus parameter, the focus starting position is a starting position of the focus motor of the camera device, and the adjustment direction is a moving direction of the focus motor; The acquisition module is further used to acquire an optimal value of a response parameter during the movement of the focus motor, wherein the response parameter is used to characterize the clarity of the image acquired by the camera device; A determination module is used to use the position of the focus motor corresponding to the optimal value of the response parameter as the target focus position of the focus motor in the target focus scenario.
10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to execute executable instructions in the memory to implement the motor focus calibration method as described in any one of claims 1 to 8.
11. A non-transitory computer-readable storage medium having executable instructions stored thereon, characterized in that: When the executable instruction is executed by the processor, the motor focus calibration method as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Focusing test method and system of mobile device and mobile device
CN106961553A
Test method and device, electronic equipment and readable storage medium
CN115379201A
Automatic focusing device and method
JP2002072074A