Configuration method and device, electronic equipment and storage medium
By acquiring and matching the configuration data of the IMU model to configure OIS, the problem that changes in IMU model affect the anti-shake effect is solved, and the compatibility of electronic devices to multiple IMU models and the stability of anti-shake effect is achieved.
Patent Information
- Application Number
- CN202311595586.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-27
- Publication Date
- 2025-05-27
AI Technical Summary
In the prior art, the same type of IMU needs to be used in the same type of electronic equipment. If the model of the IMU in the electronic equipment produced at different times changes, the original configuration of the OIS will no longer be applicable, thereby affecting the anti-shake effect.
A configuration method is provided, by obtaining multiple sets of configuration data, each set of configuration data corresponds to the model of an IMU, selecting the target configuration data that matches the current IMU model, and configuring the OIS based on the target configuration data.
It is realized that the same type of electronic equipment can be compatible with various models of IMU. Even if the model of the IMU is changed, it will not affect the anti-shake effect and avoid parameter reconfiguration of electronic equipment.
Smart Images

Figure CN120050519A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technologies, and in particular, to a configuration method, apparatus, electronic device, and storage medium. Background Art
[0002] The OIS (Optical Image Stabilizer) in a camera module has a crucial impact on the final imaging quality. Since the OIS can significantly reduce image blurring and large changes in the video FOV (Field of View), more and more electronic devices are equipped with the OIS. The effect of the OIS is related to the angular velocity information and acceleration information provided by the IMU (Inertial Measurement Unit). The OIS algorithm needs to process the angular velocity information and acceleration information to generate the distance that the OIS actuator needs to move, so as to achieve the anti-shake effect.
[0003] In the related art, the same type of IMU needs to be used in the same type of electronic device. If the model of the IMU in the electronic devices produced at different times changes, the original configuration for the OIS will no longer be applicable, thus affecting the anti-shake effect. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a configuration method, apparatus, electronic device, and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a configuration method is provided, and the method includes:
[0006] Obtain multiple sets of configuration data, where the configuration data is used to configure an Optical Image Stabilizer (OIS), and each set of configuration data corresponds to a model of an Inertial Measurement Unit (IMU);
[0007] Obtain first model information, where the first model information is used to characterize the model of the IMU;
[0008] Select target configuration data that matches the first model information from the multiple sets of configuration data;
[0009] Configure the OIS based on the target configuration data.
[0010] In some embodiments, the OIS is a first OIS, and the obtaining of the multiple sets of configuration data includes:
[0011] Read multiple sets of initial configuration data from a preset memory;
[0012] Convert the multiple groups of initial configuration data based on the format conversion method corresponding to the first OIS to obtain multiple groups of first configuration data after format conversion;
[0013] Read multiple groups of second configuration data from a preset configuration file.
[0014] In some embodiments, the selecting the configuration data matching the first model information from the multiple groups of configuration data includes:
[0015] Select first target configuration data matching the first model information from the multiple groups of first configuration data;
[0016] Select second target configuration data matching the first model information from the multiple groups of second configuration data.
[0017] In some embodiments, when the OIS is the first OIS, the method further includes:
[0018] Combine the first model information with the identification information of the first OIS to obtain combined information;
[0019] Obtain firmware matching the combined information;
[0020] Configure the first OIS based on the firmware.
[0021] In some embodiments, when the OIS is the second OIS, the obtaining multiple groups of configuration data includes:
[0022] Read multiple groups of initial configuration data from a preset memory;
[0023] Convert the multiple groups of first configuration data based on the format conversion method corresponding to the second OIS to obtain multiple groups of third configuration data after format conversion.
[0024] In some embodiments, the selecting the target configuration data matching the first model information from the multiple groups of configuration data includes:
[0025] Select third target configuration data matching the first model information from the multiple groups of third configuration data;
[0026] The configuring the OIS based on the target configuration data includes:
[0027] Send the third target configuration data to a baseband processor, and a preset algorithm in the baseband processor is used to process the third target configuration data.
[0028] In some embodiments, when the OIS is the second OIS, the method further includes:
[0029] Obtain second model information, where the second model information is used to characterize the model of the gyroscope;
[0030] Based on the second model information, obtain the orientation information of the gyroscope;
[0031] Configure the second OIS based on the orientation information.
[0032] In some embodiments, before obtaining the multiple sets of configuration data, the method further includes:
[0033] Turn on the OIS automatic configuration function.
[0034] According to the second aspect of the embodiments of the present disclosure, a configuration device is provided, and the device includes:
[0035] A configuration data acquisition module configured to acquire multiple sets of configuration data, where the configuration data is used to configure an optical image stabilizer (OIS), and each set of configuration data corresponds to a model of an inertial measurement unit (IMU);
[0036] A model acquisition module configured to acquire first model information, where the first model information is used to characterize the model of the IMU;
[0037] A configuration data selection module configured to select target configuration data that matches the first model information from the multiple sets of configuration data;
[0038] A configuration module configured to configure the OIS based on the target configuration data.
[0039] In some embodiments, the OIS is a first OIS, and the configuration data acquisition module is configured to:
[0040] Read multiple sets of initial configuration data from a preset memory;
[0041] Based on the format conversion method corresponding to the first OIS, perform format conversion on the multiple sets of initial configuration data to obtain multiple sets of first configuration data after format conversion;
[0042] Read multiple sets of second configuration data from a preset configuration file.
[0043] In some embodiments, the configuration data selection module is configured to:
[0044] Select first target configuration data that matches the first model information from the multiple sets of first configuration data;
[0045] Select second target configuration data that matches the first model information from the multiple sets of second configuration data.
[0046] In some embodiments, the OIS is a first OIS, and the device further includes:
[0047] A combination module configured to combine the first model information with the identification information of the first OIS to obtain combined information;
[0048] A firmware acquisition module configured to acquire firmware that matches the combined information;
[0049] The configuration module is further configured to configure the first OIS based on the firmware.
[0050] In some embodiments, the OIS is a second OIS, and the configuration data acquisition module is configured to:
[0051] Read multiple groups of initial configuration data from a preset memory;
[0052] Based on the format conversion method corresponding to the second OIS, perform format conversion on the multiple groups of first configuration data to obtain multiple groups of third configuration data after format conversion.
[0053] In some embodiments, the configuration data selection module is configured to select third target configuration data that matches the first model information from the multiple groups of third configuration data;
[0054] The configuration module is configured to send the third target configuration data to a baseband processor, and a preset algorithm in the baseband processor is used to process the third target configuration data.
[0055] In some embodiments, the OIS is a second OIS, and the device further includes:
[0056] The model acquisition module is further configured to acquire second model information, and the second model information is used to characterize the model of the gyroscope;
[0057] A direction acquisition module configured to acquire the direction information of the gyroscope based on the second model information;
[0058] The configuration module is further configured to configure the second OIS based on the direction information.
[0059] In some embodiments, the device further includes:
[0060] A function activation module configured to activate the OIS automatic configuration function.
[0061] According to the third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0062] A processor;
[0063] A memory for storing processor-executable instructions;
[0064] Wherein, the processor is configured to execute the method described in the first aspect of the embodiments of the present disclosure.
[0065] According to a fourth aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method described in the first aspect of the embodiments of the present disclosure.
[0066] Adopting the above method of the present disclosure has the following beneficial effects:
[0067] The method provided by the embodiments of the present disclosure provides multiple sets of configuration data for OIS. Each set of configuration data corresponds to a model of IMU. Obtain the first model information of the current IMU, and then select the target configuration data that matches the first model information from the multiple sets of configuration data, and configure the OIS based on the target configuration data. For any model of IMU, matching configuration data can be obtained according to the model of the IMU, and the OIS can be configured, so that the same type of electronic device can be compatible with various models of IMU. Even if the model of the IMU changes, the anti-shake effect will not be affected.
[0068] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Description of the Drawings
[0069] The drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments that conform to the present invention, and are used together with the specification to explain the principles of the present invention.
[0070] Figure 1 is a flowchart of a configuration method shown according to an exemplary embodiment;
[0071] Figure 2 is a flowchart of a configuration method shown according to an exemplary embodiment;
[0072] Figure 3 is a flowchart of a configuration method shown according to an exemplary embodiment;
[0073] Figure 4 is a flowchart of a configuration method shown according to an exemplary embodiment;
[0074] Figure 5 is a block diagram of a configuration device shown according to an exemplary embodiment;
[0075] Figure 6 is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners
[0076] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0077] In the related art, the same type of IMU needs to be used in the same type of electronic devices. If the model of the IMU in the electronic devices produced at different times changes, the original configuration for OIS will no longer be applicable, thus affecting the anti-shake effect. Moreover, since the same type of IMU is used in the same type of electronic devices, it depends on a specific supplier, and the supply situation of the supplier will also affect the production of the electronic devices.
[0078] Embodiments of the present disclosure address the above problems by providing multiple sets of configuration data. Regardless of which model of IMU the electronic device uses, appropriate target configuration data can be matched to configure OIS, so that the same type of electronic devices can be compatible with various models of IMUs. Even if the model of the IMU changes, it will not affect the anti-shake effect. Moreover, since it is compatible with multiple models of IMUs, it no longer depends on a specific supplier.
[0079] The method provided by the embodiments of the present disclosure is executed by an electronic device, which can be a device with a camera module such as a mobile phone, a tablet computer, a laptop computer, a vehicle-mounted terminal, a smart home device, a wearable device, etc.
[0080] Figure 1 is a flowchart of a configuration method shown according to an exemplary embodiment, which is executed by an electronic device. Refer to Figure 1 , and the method includes the following steps:
[0081] Step S101, obtain multiple sets of configuration data, where the configuration data is used to configure OIS, and each set of configuration data corresponds to a model of IMU.
[0082] Among them, the configuration data is used to configure OIS, and each set of configuration data corresponds to a model of IMU, that is, for various models of IMUs, a set of configuration data is respectively set.
[0083] Configuration data is used to configure OIS. The configuration data may include gyroscope compensation parameters (Gyro Offset), gyroscope gain parameters (Gyro Gain), initialization register parameters, etc. The types of parameters included in multiple sets of configuration data are the same, but the values of the parameters of each type are different. Among them, the multiple sets of configuration data are pre-stored in the electronic device, and when OIS needs to be configured, the multiple sets of configuration data are directly read.
[0084] Step S102: Obtain first model information, where the first model information is used to characterize the model of the IMU.
[0085] For an IMU, the model of the IMU is fixed. When configuring OIS, in order to achieve a better anti-shake effect, it is necessary to configure OIS according to the model of the IMU. Therefore, it is necessary to obtain the first model information, that is, to obtain the model of the IMU.
[0086] Step S103: Select target configuration data that matches the first model information from multiple sets of configuration data.
[0087] Among them, the target configuration data matches the first model information, that is, the target configuration data is the configuration data corresponding to the model of the IMU.
[0088] Step S104: Configure OIS based on the target configuration data.
[0089] Configuring OIS based on the target configuration data means writing the target configuration data into OIS.
[0090] The method provided by the embodiments of the present disclosure provides multiple sets of configuration data for OIS. Each set of configuration data corresponds to a model of an IMU. Obtain the first model information of the current IMU, and then select the target configuration data that matches the first model information from multiple sets of configuration data, and configure OIS based on the target configuration data. For any model of IMU, matching configuration data can be obtained according to the model of the IMU, and OIS can be configured, so that the same type of electronic device can be compatible with various models of IMUs. Even if the model of the IMU changes, the anti-shake effect will not be affected.
[0091] In addition, in a related technology, when an electronic device cannot dynamically be compatible with different IMUs, when the model of the IMU of the same type of electronic device changes, it is necessary to reconfigure the parameters of the electronic device for the changed model of the IMU. In the embodiments of the present disclosure, since multiple sets of configuration data are pre-stored in the electronic device, when the model of the IMU changes, only the adapted configuration data needs to be reselected from the multiple sets of configuration data for configuration, and there is no need to reconfigure the parameters of the electronic device.
[0092] In some embodiments, the OIS includes multiple different types of OIS. Optionally, the OIS includes a first OIS and a second OIS. For example, the first OIS is a traditional OIS, and the second OIS is an OIS on the AP (Application Processor) side (i.e., APOIS). The configuration methods of these two types of OIS are different. The following will use Figure 2 the embodiments shown to illustrate the configuration process of the first OIS, and use Figure 3 the embodiments shown to illustrate the configuration process of the second OIS respectively.
[0093] Figure 2 is a flowchart of a configuration method shown according to an exemplary embodiment, which is executed by an electronic device. Refer to Figure 2 , and the method includes the following steps:
[0094] Step S201: Read multiple groups of initial configuration data from a preset memory, and perform format conversion on the multiple groups of initial configuration data based on the format conversion method corresponding to the first OIS to obtain multiple groups of first configuration data after format conversion.
[0095] Among them, the preset memory is the memory in the camera module. For example, the preset memory can be an EEPROM (Electrically Erasable Programmable read only memory) or other memories. Each group of initial configuration data corresponds to a model of the IMU.
[0096] In the embodiments of the present disclosure, since there are multiple different types of OIS in the electronic device, the initial configuration data is configuration data applicable to multiple types of OIS. However, for different OIS, due to the different working principles of different OIS, it is necessary to perform format conversion on the initial configuration data to convert the format of the initial configuration data into a format adapted to the OIS. For the first OIS, perform format conversion on multiple groups of initial configuration data based on the format conversion method corresponding to the first OIS to obtain multiple groups of first configuration data after format conversion, and the multiple groups of first configuration data are configuration data applicable to the first OIS.
[0097] In some embodiments, the first configuration data includes gyro compensation parameters (Gyro Offset) and gyro gain parameters (Gyro Gain). The gyro compensation parameters are used to compensate for the temperature drift of the gyroscope. Of course, the first configuration data may also include other parameters, and the embodiments of the present disclosure do not limit this.
[0098] In some embodiments, before reading multiple sets of initial configuration data from a preset memory, it is necessary to first probe the preset memory (Probe EEPROM) to determine whether the preset memory can work properly. For example, it is probed whether data can be read from the preset memory. When it is determined that the preset memory can work properly, multiple sets of initial configuration data are read from the preset memory.
[0099] In some embodiments, when reading initial configuration data from a preset memory, it is first determined whether multiple sets of initial configuration data are stored in the preset memory. If multiple sets of initial configuration data are stored, then multiple sets of initial configuration data are read. If no initial configuration data is stored or only one set of initial configuration data is stored, then no more reading is performed.
[0100] It should be noted that the embodiments of the present disclosure only take storing initial configuration data in a preset memory as an example. In another embodiment, multiple sets of first configuration data can be directly stored in the preset memory, so that multiple sets of first configuration data can be directly read without performing format conversion on the initial configuration data.
[0101] Step S202, read multiple sets of second configuration data from a preset configuration file.
[0102] Among them, the preset configuration file is a configuration file pre-stored in the electronic device, and the preset configuration file can be a file in xml format or other formats. Each set of second configuration data corresponds to a model of an IMU.
[0103] In some embodiments, the second configuration data includes initialization parameters such as initialization register parameters, and the second configuration data is used to configure various initialization parameters of the OIS. Of course, the second configuration data can also include other parameters, and the embodiments of the present disclosure do not limit this.
[0104] In some embodiments, before reading multiple sets of second configuration data from a preset configuration folder, it is necessary to first probe the first OIS (Probe OIS) to determine whether the first OIS can work properly. For example, it is probed whether the communication of the first OIS is normal. When it is determined that the first OIS can work properly, multiple sets of second configuration data are read from the preset configuration file.
[0105] In some embodiments, when reading second configuration data from a preset configuration file, it is first determined whether multiple sets of second configuration data are stored in the preset configuration file. If multiple sets of second configuration data are stored, then multiple sets of second configuration data are read. If no second configuration data is stored or only one set of second configuration data is stored, then no more reading is performed.
[0106] It should be noted that the embodiments of the present disclosure only take the example of first executing step S201 and then executing step S202. In another embodiment, step S202 can be restricted first and then step S201 is executed, or steps S201 and S202 are executed simultaneously. The embodiments of the present disclosure do not limit the order of execution of the steps.
[0107] Step S203, obtain the first model information.
[0108] Among them, the first model information is used to represent the model of the IMU.
[0109] In some embodiments, the first model information is read in the NCS (Networked Control System) framework. Optionally, the first model information is read through QSEE (Qualcomm Secure Execution Environment).
[0110] In some embodiments, after obtaining the first model information, the first model information is transmitted to the first OIS through sensorCaps.
[0111] Step S204, select the first target configuration data that matches the first model information from multiple groups of first configuration data, and configure the first OIS based on the first target configuration data.
[0112] In the embodiments of the present disclosure, in order to achieve a better anti-shake effect, the first OIS is configured according to the model of the IMU, that is, the first target configuration data that matches the first model information is selected from multiple groups of first configuration data, and the first target configuration data corresponds to the first model information. Configuring the first OIS based on the first target configuration data means writing the first target configuration data into the first OIS.
[0113] In some embodiments, multiple groups of first configuration data are transmitted to the first OIS, and then in the first OIS, the first target configuration data is selected and written into the first OIS.
[0114] Step S205, select the second target configuration data that matches the first model information from multiple groups of second configuration data, and configure the first OIS based on the second target configuration data.
[0115] In the embodiments of the present disclosure, in order to achieve a better anti-shake effect, the first OIS is configured according to the model of the IMU, that is, the second target configuration data that matches the first model information is selected from multiple groups of second configuration data, and the second target configuration data corresponds to the first model information. Configuring the first OIS based on the second target configuration data means writing the second target configuration data into the first OIS.
[0116] Step S206: Combine the first model information with the identification information of the first OIS to obtain combined information, acquire the firmware that matches the combined information, and configure the first OIS based on the firmware.
[0117] Among them, the combined information contains the first model information and the identification information of the first OIS. The identification information can be the name of the first OIS or other identifiers used to represent the first OIS. Optionally, add the first model information after the identification information to obtain the combined information, or add the first model information before the identification information to obtain the combined information, or combine the first model information with the identification information in other ways to obtain the combined information.
[0118] In some embodiments, after obtaining the combined information, send the combined information to the kernel, and then in the kernel, according to the combined information, acquire the firmware that matches the combined information, that is, acquire the firmware adapted to the first OIS.
[0119] Configuring the first OIS based on the firmware means writing the firmware into the first OIS.
[0120] It should be noted that steps S204 - S206 configure the first OIS from three aspects. In another embodiment, when configuring the OIS, step S205 can be executed first, then step S204, or step S206 can be executed first, and then steps S204 and S205, or the first OIS can also be configured in other orders. The embodiments of the present disclosure do not limit the sequence of execution during configuration.
[0121] In addition, in some embodiments, to avoid configuring the OIS under unnecessary circumstances, it is necessary to start executing step S201 when the OIS automatic configuration function is enabled. For example, when making configuration changes to the program code, use StaticSettings as a switch.
[0122] The method provided by the embodiments of the present disclosure provides multiple groups of first configuration data and multiple groups of second configuration data. Each group of first configuration data corresponds to a model of an IMU, and each type of second configuration data corresponds to a model of an IMU. Obtain the first model information of the current IMU, then select the first target configuration data that matches the first model information from the multiple groups of first configuration data, select the second target configuration data that matches the first model information from the multiple groups of second configuration data, and then configure the OIS based on the first target configuration data and the second target configuration data. For any model of IMU, matching configuration data can be obtained according to the model of the IMU to configure the OIS, so that the same type of electronic device can be compatible with various models of IMUs. Even if the model of the IMU changes, the anti-shake effect will not be affected. Moreover, since it is compatible with multiple models of IMUs, it is no longer dependent on a specific supplier.
[0123] Figure 3 is a flowchart of a configuration method shown according to an exemplary embodiment, which is executed by an electronic device. Refer to Figure 3 This method includes the following steps:
[0124] Step S301, read multiple groups of initial configuration data from a preset memory, and perform format conversion on the multiple groups of first configuration data based on the format conversion method corresponding to the second OIS to obtain multiple groups of third configuration data after format conversion.
[0125] In the embodiments of the present disclosure, since there are multiple different types of OISs in the electronic device, the initial configuration data is configuration data applicable to multiple types of OISs. However, for different OISs, due to the different working principles of different OISs, it is necessary to perform format conversion on the initial configuration data to convert the format of the initial configuration data into a format adapted to the OIS. For the second OIS, perform format conversion on the multiple groups of initial configuration data based on the format conversion method corresponding to the second OIS to obtain multiple groups of third configuration data after format conversion. The multiple groups of third configuration data are configuration data applicable to the second OIS.
[0126] In some embodiments, the third configuration data includes gyroscope compensation parameters and gyroscope gain parameters. The gyroscope compensation parameters are used to compensate for the temperature drift of the gyroscope. Of course, the third configuration data may also include other parameters, and the embodiments of the present disclosure do not limit this.
[0127] For other implementation manners of step S301, refer to the above step S201, and details are not described herein again.
[0128] Step S302, obtain the first model information.
[0129] For the implementation manner of step S302, refer to the above step S203, and details are not described herein again.
[0130] Step S303: Select the third target configuration data that matches the first model information from multiple groups of third configuration data, and configure the second OIS based on the third target configuration data.
[0131] In the embodiments of the present disclosure, in order to achieve a better anti-shake effect, the second OIS is configured according to the model of the IMU, that is, the third target configuration data that matches the first model information is selected from multiple groups of third configuration data, and the third target configuration data corresponds to the first model information.
[0132] In some embodiments, configuring the second OIS based on the third target configuration data includes: sending the third target configuration data to a baseband processor (BP), and a preset algorithm in the baseband processor is used to process the third target configuration data, and the preset algorithm is an OIS algorithm. Optionally, the baseband processor processes the third target configuration data to obtain a Hall value, and then writes the Hall value into the motor.
[0133] Step S304: Obtain the second model information, based on the second model information, obtain the direction information of the gyroscope, and configure the second OIS based on the direction information.
[0134] Wherein, the second model information is used to represent the model of the gyroscope. Optionally, the second model information is read through the baseband processor. Different gyroscope models correspond to different direction information, and based on the second model information, the direction information corresponding to the second model information is obtained.
[0135] In some embodiments, configuring the second OIS based on the direction information includes: processing the direction information based on a preset algorithm in the baseband processor.
[0136] The method provided by the embodiments of the present disclosure can obtain matching configuration data according to the model of any model of IMU for configuring the OIS, so that electronic devices of the same type can be compatible with various models of IMUs. Even if the model of the IMU changes, the anti-shake effect will not be affected. And because it is compatible with multiple models of IMUs, it no longer depends on a specific supplier.
[0137] Moreover, in the embodiments of the present disclosure, for different types of OISs, configuration can be performed, and configuration of different types of OISs can be achieved.
[0138] In one example, the above Figure 2 and Figure 3 shown configuration method flow is as Figure 4 shown.
[0139] Figure 4It is a flowchart of a configuration method shown according to an exemplary embodiment, which is executed by an electronic device. Refer to Figure 4 , the method includes the following steps:
[0140] Step S401, determine whether the OIS automatic configuration function is enabled. If the OIS automatic configuration function is enabled, execute step S402. If the OIS automatic configuration function is not enabled, end the process.
[0141] In some embodiments, a switch "enableOisGryoSwitch" is set in the electronic device. If "enableOisGryoSwitch" is turned on, it is determined that the OIS automatic configuration function is enabled. If "enableOisGryoSwitch" is not turned on, it is determined that the OIS automatic configuration function is not enabled.
[0142] Step S402, determine whether multiple groups of initial configuration data are saved in the EEPROM. If multiple groups of initial configuration data are saved, execute step S403. If multiple groups of initial configuration data are not saved, end the process.
[0143] Step S403, read multiple groups of initial configuration data from the EEPROM.
[0144] Step S404, determine whether multiple groups of second configuration data are stored in the preset configuration file. If multiple groups of second configuration data are stored, execute step S404. If multiple groups of second configuration data are not saved, end the process.
[0145] Step S405, read multiple groups of second configuration data from the preset configuration file.
[0146] Step S406, read the first model information through the NCS.
[0147] Step S407, configure the first OIS based on the first model information.
[0148] Configuring the first OIS based on the first model information includes:
[0149] 1. Based on multiple groups of initial configuration data, select the first target configuration data and write the first target configuration data into the first OIS. Among them, the first target configuration data includes the first Gyro Offset data and the first Gyro Gain data.
[0150] 2. Based on multiple groups of second configuration data, select the second target configuration data and write the second target configuration data into the first OIS.
[0151] 3. Based on the first model information and the identification information of the first OIS, determine the firmware and write the firmware into the first OIS.
[0152] Step S408: Configure the second OIS based on the first model information.
[0153] Configuring the second OIS based on the first model information includes:
[0154] 1. Based on multiple groups of initial configuration data, select the third target configuration data and transmit the third target configuration data to the baseband processor. Among them, the third target configuration data includes the second Gyro Offset data and the second Gyro Gain data.
[0155] 2. Read the second model information through the baseband processor and configure the direction of the gyroscope based on the second model information.
[0156] It should be noted that, in the embodiments of the present disclosure, only the example of first executing step S407 and then executing step S408 is taken. In another embodiment, step S408 can be executed first and then step S407, or step S407 and step S408 can be executed simultaneously. The sequence of the configuration processes of the first OIS and the second OIS in the embodiments of the present disclosure is not limited.
[0157] Figure 4 For the detailed implementation manners of each step, refer to the above Figure 2 and Figure 3 illustrated embodiments, which will not be elaborated here.
[0158] Figure 5 is a block diagram of a configuration device shown according to an exemplary embodiment, which is configured in an electronic device. Refer to Figure 5 , and the device includes:
[0159] A configuration data acquisition module 501, configured to acquire multiple groups of configuration data, where the configuration data is used to configure an optical image stabilizer (OIS), and each group of configuration data corresponds to a model of an inertial measurement unit (IMU);
[0160] A model acquisition module 502, configured to acquire first model information, where the first model information is used to characterize the model of the IMU;
[0161] A configuration data selection module 503, configured to select target configuration data that matches the first model information from multiple groups of configuration data;
[0162] A configuration module 504, configured to configure the OIS based on the target configuration data.
[0163] In some embodiments, the OIS is the first OIS, and the configuration data acquisition module 501 is configured to:
[0164] Read multiple groups of initial configuration data from a preset memory;
[0165] Based on the format conversion method corresponding to the first OIS, perform format conversion on multiple groups of initial configuration data to obtain multiple groups of first configuration data after format conversion;
[0166] Read multiple groups of second configuration data from a preset configuration file.
[0167] In some embodiments, the configuration data selection module 503 is configured to:
[0168] Select first target configuration data that matches the first model information from multiple groups of first configuration data;
[0169] Select second target configuration data that matches the first model information from multiple groups of second configuration data.
[0170] In some embodiments, when the OIS is the first OIS, the device further includes:
[0171] A combination module, configured to combine the first model information with the identification information of the first OIS to obtain combined information;
[0172] A firmware acquisition module, configured to acquire firmware that matches the combined information;
[0173] The configuration module 504 is further configured to configure the first OIS based on the firmware.
[0174] In some embodiments, when the OIS is the second OIS, the configuration data acquisition module 501 is configured to:
[0175] Read multiple groups of initial configuration data from a preset memory;
[0176] Based on the format conversion method corresponding to the second OIS, perform format conversion on multiple groups of first configuration data to obtain multiple groups of third configuration data after format conversion.
[0177] In some embodiments, the configuration data selection module 503 is configured to select third target configuration data that matches the first model information from multiple groups of third configuration data;
[0178] The configuration module 504 is configured to send the third target configuration data to a baseband processor, and a preset algorithm in the baseband processor is used to process the third target configuration data.
[0179] In some embodiments, when the OIS is the second OIS, the device further includes:
[0180] The model acquisition module 502 is further configured to acquire second model information, and the second model information is used to characterize the model of the gyroscope;
[0181] A direction acquisition module, configured to acquire the direction information of the gyroscope based on the second model information;
[0182] The configuration module 504 is further configured to configure the second OIS based on the direction information.
[0183] In some embodiments, the device further includes:
[0184] A function enabling module, configured to enable the OIS automatic configuration function.
[0185] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.
[0186] An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the configuration method in the above embodiments.
[0187] Figure 6 It is a block diagram of an electronic device 600 shown according to an exemplary embodiment.
[0188] Referring to Figure 6 , the electronic device 600 may include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.
[0189] The processing component 602 generally controls the overall operation of the electronic device 600, such as operations associated with display, telephone call, data communication, camera operation, and recording operation. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0190] The memory 604 is configured to store various types of data to support the operation of the electronic device 600. Examples of such data include instructions for any application or method operating on the electronic device 600, contact data, phone book data, messages, pictures, videos, and the like. The memory 604 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, a magnetic disk, or an optical disk.
[0191] The power supply component 606 provides power to various components of the electronic device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 600.
[0192] The multimedia component 608 includes a screen that provides an output interface between the electronic device 600 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 can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of the touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the electronic device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0193] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 600 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, the audio component 610 further includes a speaker for outputting audio signals.
[0194] The I / O interface 612 provides an interface between the processing component 602 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a start button, and a lock button.
[0195] The sensor assembly 614 includes one or more sensors for providing a status assessment of various aspects for the electronic device 600. For example, the sensor assembly 614 can detect the on / off state of the electronic device 600, the relative positioning of components, such as the display and keypad of the electronic device 600. The sensor assembly 614 can also detect a change in the position of the electronic device 600 or a component of the electronic device 600, the presence or absence of user contact with the electronic device 600, the orientation or acceleration / deceleration of the electronic device 600, and the temperature change of the electronic device 600. The sensor assembly 614 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0196] The communication component 616 is configured to facilitate communication between the electronic device 600 and other devices in a wired or wireless manner. The electronic device 600 can access a wireless network based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 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 616 further 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.
[0197] In an exemplary embodiment, the electronic device 600 can 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 for performing the above method.
[0198] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as the memory 604 including instructions, and the above instructions can be executed by the processor 620 of the electronic device 600 to complete the above 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, and an optical data storage device, etc.
[0199] Embodiments of the present disclosure also provide a non-transitory computer-readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the configuration method in the above embodiments.
[0200] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present invention. This application is intended to cover any variations, uses, or adaptations of the present invention, which follow the general principles of the present invention and include known common knowledge or conventional technical means in the technical field not disclosed in this disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present invention are pointed out by the following claims.
[0201] It should be understood that the present invention is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A configuration method, characterized in that, the method includes: obtaining multiple groups of configuration data, where the configuration data is used to configure an Optical Image Stabilizer (OIS), and each group of configuration data corresponds to a model of an Inertial Measurement Unit (IMU); obtaining first model information, where the first model information is used to characterize the model of the IMU; selecting target configuration data that matches the first model information from the multiple groups of configuration data; configuring the OIS based on the target configuration data.
2. The method according to claim 1, characterized in that, the OIS is a first OIS, and the obtaining of the multiple groups of configuration data includes: reading multiple groups of initial configuration data from a preset memory; performing format conversion on the multiple groups of initial configuration data based on the format conversion method corresponding to the first OIS to obtain multiple groups of first configuration data after format conversion; reading multiple groups of second configuration data from a preset configuration file.
3. The method according to claim 2, characterized in that, the selecting of the configuration data that matches the first model information from the multiple groups of configuration data includes: selecting first target configuration data that matches the first model information from the multiple groups of first configuration data; selecting second target configuration data that matches the first model information from the multiple groups of second configuration data.
4. The method according to claim 1, characterized in that, the OIS is a first OIS, and the method further includes: combining the first model information with the identification information of the first OIS to obtain combined information; obtaining firmware that matches the combined information; configuring the first OIS based on the firmware.
5. The method according to claim 1, characterized in that, the OIS is a second OIS, and the obtaining of the multiple groups of configuration data includes: reading multiple groups of initial configuration data from a preset memory; performing format conversion on the multiple groups of first configuration data based on the format conversion method corresponding to the second OIS to obtain multiple groups of third configuration data after format conversion.
6. The method according to claim 5, characterized in that, the selecting of the target configuration data that matches the first model information from the multiple groups of configuration data includes: selecting third target configuration data that matches the first model information from the multiple groups of third configuration data; the configuring of the OIS based on the target configuration data includes: sending the third target configuration data to a baseband processor, and a preset algorithm in the baseband processor is used to process the third target configuration data.
7. The method according to claim 1, characterized in that, the OIS is a second OIS, and the method further includes: obtaining second model information, where the second model information is used to characterize the model of a gyroscope; obtaining the direction information of the gyroscope based on the second model information; configuring the second OIS based on the direction information.
8. The method according to claim 1, characterized in that, before the obtaining of the multiple groups of configuration data, the method further includes: enabling the OIS automatic configuration function.
9. A configuration device, characterized in that, the device includes: A configuration data acquisition module, configured to acquire multiple groups of configuration data for configuring an optical image stabilizer (OIS), where each group of configuration data corresponds to a model of an inertial measurement unit (IMU); A model acquisition module, configured to acquire first model information for characterizing the model of the IMU; A configuration data selection module, configured to select target configuration data that matches the first model information from the multiple groups of configuration data; A configuration module, configured to configure the OIS based on the target configuration data.
10. An electronic device, characterized in that, it includes: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to execute the method according to any one of claims 1-8.
11. A non-transitory computer-readable storage medium, characterized in that, when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method according to any one of claims 1-8.