A camera module parameter setting method, electronic device and chip system
By burning the manufacturer's identifier and version number of the camera module into the electronic device and obtaining the corresponding parameters according to the configuration file, the abnormal problem of camera modules from different manufacturers or versions in the same electronic device model is solved, and the functional consistency and data security of the device are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-08-28
- Publication Date
- 2026-06-30
AI Technical Summary
When using camera modules from different manufacturers or versions in the same model of electronic device, abnormal camera functions may occur, such as black stripes appearing in front-facing shooting scenes.
The manufacturer's identifier and version number of the camera module are burned into the memory of the electronic device, and the corresponding setting parameters are obtained through the configuration file to ensure that the parameters match the manufacturer's identifier and version number of the module, so as to reduce abnormal phenomena.
By matching the manufacturer's identifier and version number of the camera module, the occurrence of camera malfunctions due to parameter errors is reduced, and data security and device consistency are improved.
Smart Images

Figure CN120751236B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, and in particular to a method for setting camera module parameters, an electronic device, and a chip system. Background Technology
[0002] With the development of technology, electronic devices are performing more and more functions, and correspondingly, there are more and more sensor modules installed in electronic devices, such as camera modules, ambient light sensor modules, and infrared distance sensor modules; these sensor modules can be used to achieve certain functions.
[0003] When manufacturing electronic devices of the same model, manufacturers typically use camera modules from the same camera module manufacturer, meaning that camera modules for the same model of electronic device can use the same settings parameters. In practical applications, due to various factors (such as inventory levels, price differences, and hardware upgrades), electronic devices of the same model may also use camera modules from multiple manufacturers. In this case, electronic devices using camera modules from the same manufacturer can be configured with a single set of parameters. However, even with a single set of parameters, the camera function of electronic devices using camera modules from the same manufacturer may still exhibit some abnormal phenomena, such as black stripes appearing in the preview screen when shooting with the front camera. Summary of the Invention
[0004] This application provides a method for setting camera module parameters, an electronic device, and a chip system, which can reduce abnormal phenomena in the camera function of electronic devices.
[0005] To achieve the above objectives, the first aspect of this application provides a method for setting camera module parameters, employing the following technical solution:
[0006] Read the first configuration file of the first camera module to obtain the first burning address of the first camera module, and store the burning identification information of the first camera module in the first burning address;
[0007] Read the first programming identifier information of the first camera module from the first programming address of the first camera module. The first programming identifier information includes the first programming manufacturer identifier and the first programming version number.
[0008] Set parameters for the first camera module that correspond to the first burning identifier information.
[0009] In this application, the manufacturer's identifier and version number of the camera module used by the electronic device can be programmed into the memory of the electronic device; the programming address for programming the manufacturer's identifier and version number can be set in the configuration file; when the electronic device is powered on, the programmed manufacturer's identifier and version number of the camera module used by the electronic device can be obtained according to the programming address in the configuration file; thereby setting parameters for the camera module of the electronic device that correspond to the programmed manufacturer's identifier and version number; since the parameters of the camera module of an electronic device are related to the manufacturer's identifier and version number of the camera module, the parameter errors that occur due to the use of the same set of settings parameters because of different version numbers are reduced, thereby reducing the abnormal phenomena caused by camera module parameter errors.
[0010] As one implementation of the first aspect, the first configuration file also includes first identification information of the first camera module, the first identification information including a first manufacturer identifier and a first version number;
[0011] The step of setting parameters for the first camera module corresponding to the first programming identifier information includes:
[0012] Compare the first identification information with the first programming identification information;
[0013] If the first identification information and the first burning identification information are consistent, the first parameter corresponding to the first identification information is obtained from the first configuration file where the first identification information is located;
[0014] Set the first parameter for the first camera module.
[0015] In this application, data security can also be improved by adding the manufacturer's identifier and version number of the camera module of the electronic device to the configuration file to determine parameters that are consistent with the burned manufacturer's identifier and version number.
[0016] As another implementation of the first aspect, the first camera module has multiple configuration files, and the method further includes:
[0017] Read the second configuration file of the first camera module to obtain the second identification information of the first camera module;
[0018] After comparing the first identification information and the first programming identification information, the method further includes:
[0019] If the first identification information and the first programming identification information are inconsistent, compare the second identification information and the first programming identification information.
[0020] If the second identification information and the first burning identification information are consistent, the second parameter corresponding to the second identification information is obtained from the second configuration file where the second identification information is located.
[0021] In this application, when an electronic device of a certain model uses multiple camera modules (camera modules with different setting parameters), each electronic device can have its manufacturer's identifier and version number burned into its memory; the configuration file of the electronic device can store the setting parameters corresponding to the various camera modules (combinations of manufacturer and version numbers); the setting parameters corresponding to the identifier information that matches the manufacturer's identifier and version number burned into the electronic device can be found from multiple identifier information (manufacturer's identifier and version number); in specific implementation, the setting parameters corresponding to the identifier information that matches the burned identifier information of the electronic device can be determined by comparing the burned identifier information with multiple identifier information in the configuration file in turn.
[0022] As another implementation of the first aspect, the burning addresses in multiple configuration files of the first camera module are the same.
[0023] In this application, the manufacturer's identifier and version number can be programmed at the same address in the first camera module of the same model of electronic device, which facilitates the hardware management of the camera module of the electronic device.
[0024] As another implementation of the first aspect, after comparing the second identification information and the first programming identification information, the method further includes:
[0025] If the second identification information and the first burning identification information are inconsistent, continue to compare the identification information in other configuration files of the first camera module with the first burning identification information;
[0026] The first camera module is set with parameters corresponding to the identification information consistent with the first burning identification information until the identification information in each configuration file of the first camera module is inconsistent with the first burning identification information, or until the identification information in one configuration file of the first camera module is consistent with the first burning identification information.
[0027] In this application, taking the front-facing camera module as an example, multiple front-facing camera modules may be set in the same model of electronic device. The manufacturer's identifier and version number of the front-facing camera module used in each electronic device are fixed, but the configuration file may contain the identification information of multiple front-facing camera modules of this model of electronic device. If the identification information that matches the burned identification information can be found, the setting parameters of the front-facing camera module of this electronic device can be determined. If the identification information that matches the burned identification information cannot be found, the configuration file of this electronic device may be incorrect, and it is not necessary to configure the front-facing camera module of this electronic device to avoid data errors.
[0028] As another implementation of the first aspect, the electronic device further includes a second camera module. If the identification information in each configuration file of the first camera module is inconsistent with the first programmed identification information, or if the first camera module is set with parameters corresponding to identification information consistent with the first programmed identification information, the device further includes:
[0029] The third configuration file of the second camera module is read to obtain the second burning address of the second camera module, and the burning identification information of the second camera module is stored in the second burning address;
[0030] Read the second programming identifier information of the second camera module from the second programming address of the second camera module. The second programming identifier information includes the second programming manufacturer identifier and the second programming version number.
[0031] Set parameters for the second camera module that correspond to the second burning identifier information.
[0032] In this application, the electronic device may have camera modules set in multiple locations, such as a front camera module and a rear camera module. The parameter setting process of the camera modules is the same, and after the parameter setting of one camera module is completed, the parameter setting of the next camera module is performed.
[0033] As another implementation of the first aspect, when the first identification information and the first programming identification information are consistent, obtaining the first parameter corresponding to the first identification information from the first configuration file where the first identification information is located includes:
[0034] If the first manufacturer identifier in the first identification information is consistent with the first programming manufacturer identifier, and the first version number in the first identification information is consistent with the first programming version number, then the first parameter corresponding to the first identification information is obtained from the first configuration file where the first identification information is located.
[0035] As another implementation of the first aspect, the step of comparing the second identification information and the first programming identification information when the first identification information and the first programming identification information are inconsistent includes:
[0036] If the first manufacturer identifier in the first identification information is inconsistent with the first programming manufacturer identifier, and / or the first version number in the first identification information is inconsistent with the first programming version number, then the second identification information and the first programming identification information shall be compared.
[0037] As another implementation of the first aspect, the first version number in the first identification information is multiple version numbers, and the first burning version number is 1 version number;
[0038] The first version number in the first identification information is the same as the first burning version number, which means that the first version number in the first identification information includes the first burning version number.
[0039] The discrepancy between the first version number in the first identification information and the first burning version number is as follows: the first version number in the first identification information does not include the first burning version number.
[0040] As another implementation of the first aspect, the burning identification information further includes: the first burning component identifier of the first camera module, and the first identification information further includes: the first component identifier of the first camera module.
[0041] In this application, the parameters of the camera module of the same model of electronic device may not only be related to the manufacturer and version, but also to the components in the camera module. This is because the burning identification information may also include component identification, and the identification information in the configuration file also includes component identification. When determining whether the identification information in the configuration file and the burning identification information read from the burning address are consistent, it is necessary to determine whether each identification information is consistent, thereby reducing abnormal phenomena of the camera caused by incorrect parameter settings.
[0042] In a second aspect, an electronic device is provided, including a processor for calling a computer program stored in a memory to implement the method of any one of the first aspects of this application.
[0043] Thirdly, a chip system is provided, including a processor coupled to a memory, wherein the processor executes a computer program stored in the memory to cause an electronic device to implement the method of any one of the first aspects of this application.
[0044] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when computer instructions are executed on an electronic device, causes the electronic device to implement the method of any one of the first aspects of this application.
[0045] Fifthly, embodiments of this application provide a computer program product that, when run on a device, causes the electronic device to execute the method of any one of the first aspects of this application.
[0046] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0047] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0048] Figure 2 A schematic diagram of the front-view preview interface of different electronic devices in a batch of electronic devices provided in the embodiments of this application;
[0049] Figure 3 A schematic diagram illustrating the relationship between information in the configuration file and hardware programming information of an electronic device provided in this application embodiment;
[0050] Figure 4 A schematic diagram illustrating the relationship between information in the configuration file and hardware programming information of another electronic device provided in this application embodiment;
[0051] Figure 5 A timing diagram illustrating a method for setting camera module parameters according to an embodiment of this application;
[0052] Figure 6 This is a flowchart illustrating a method for setting camera module parameters according to an embodiment of this application. Detailed Implementation
[0053] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details.
[0054] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0055] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more; "and / or" describes the relationship between the associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0056] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0057] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0058] This application provides a method for setting camera module parameters. This method can be applied to electronic devices, such as tablets, mobile phones, wearable devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application does not limit the specific type of electronic device.
[0059] Figure 1A schematic diagram of an electronic device is shown. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0060] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0061] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0062] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0063] Internal memory 121 can be used to store computer executable program code, including instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function (such as image playback). Touch sensor 180K, also called a "touch panel," can be disposed on display screen 194. Touch sensor 180K and display screen 194 together form a touch screen, also called a "touch screen." Touch sensor 180K is used to detect touch operations applied to or near it. Touch sensor can transmit the detected touch operation to application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be disposed on the surface of electronic device 100, in a different location than display screen 194.
[0064] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0065] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a minimized display, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0066] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1. The camera 193 may be a camera module as described in subsequent embodiments.
[0067] This application does not specifically limit the structure of the execution subject of the camera module parameter setting method. As long as the code recording the camera module parameter setting method of this application is executed, communication can be performed according to the camera module parameter setting method provided in this application. For example, the execution subject of the camera module parameter setting method provided in this application can be a functional module in an electronic device capable of calling and executing programs, or a communication device applied in an electronic device, such as a chip.
[0068] With technological advancements, electronic devices are performing increasingly diverse functions, leading to a proliferation of sensor modules, such as camera modules, ambient light sensor modules, and infrared distance sensor modules. These sensor modules enable various functionalities.
[0069] When mass-producing a certain model of electronic equipment, equipment manufacturers may use the same module from different manufacturers due to factors such as inventory levels, price differences, and module upgrades. For example, an equipment manufacturer may purchase camera module a from manufacturer A, camera module b from manufacturer B, and camera module c from manufacturer C.
[0070] In practical applications, although camera modules a, b, and c from different manufacturers can all achieve the same function, some initialization parameters (or setting parameters) may differ during application. This necessitates selecting different initialization parameters (or setting parameters) for each camera module from different manufacturers. Therefore, in practical applications, it is necessary to distinguish between camera modules from different manufacturers. For example, electronic devices using camera modules from the same manufacturer can be configured to use a single set of parameters. However, even if electronic devices using camera modules from the same manufacturer are configured to use a single set of parameters, some problems may still exist in practical applications.
[0071] Reference Figure 2 As shown, among a batch of electronic devices, although they all use the same model of front-facing camera module from the same manufacturer, some electronic devices (e.g., electronic device b) exhibit black stripes in the preview image during front-facing shooting scenarios. Other electronic devices (e.g., electronic device a) do not exhibit this phenomenon in the preview image.
[0072] Analysis revealed that although the front-facing camera modules of these electronic devices came from the same manufacturer and were of the same model, they were different versions. This means that while the front-facing camera module of the same model had hardware or software improvements, and although they remained the same model and corresponded to the same functions, internal differences existed, resulting in different versions of the same model of front-facing camera module. The parameters of some versions (e.g., version 1) of the front-facing camera module were stored in registers 1 to 10 (for example only), while the parameters of other versions (e.g., version 2) were stored in registers 1 to 12 (for example only). This caused different versions of the front-facing camera module to be set to the parameters of one version (e.g., version 1). Subsequently, electronic devices set to version 2 front-facing camera module used incorrect parameters when using the front-facing camera module. Therefore, some functions of the electronic devices set to version 2 front-facing camera module malfunctioned; that is, some electronic devices in the above example showed black stripes when previewing the image through the front-facing camera module.
[0073] Based on the above description, it can be understood that the malfunction of the front-facing camera module in some electronic devices is related to certain parameters of the front-facing camera module, and these parameters are related to the location of registers. Therefore, in practical applications, the malfunction of the front-facing camera module in electronic devices is not completely fixed; the specific malfunction is related to the specific incorrect parameters. For example, it is also possible that the low-power mode of the front-facing camera module cannot be activated. Since the specific malfunction is related to the specific incorrect parameters, other possible malfunctions will not be listed one by one.
[0074] This application provides a method for setting camera module parameters. When different manufacturers' or different versions of the same manufacturer's camera modules are set in the same model of electronic device, the manufacturer's identifier, version number and other information of the camera module used by the electronic device can be burned into the memory of the electronic device before the electronic device leaves the factory. It is also necessary to store in the electronic device the burning address of the manufacturer's identifier and version number of the camera module of the electronic device, as well as the setting parameters corresponding to different manufacturers and different versions.
[0075] When setting the parameters of the camera module during the power-on of an electronic device, the burning address of the manufacturer's identifier and the burning address of the version number are obtained from the camera module's configuration file; the manufacturer's identifier of the camera module is obtained from the burning address of the manufacturer's identifier, and the version number of the camera module is obtained from the burning address of the version number. Finally, the parameters to be set for this electronic device are determined based on the manufacturer's identifier and version number obtained from the burning address.
[0076] Of course, in practical applications, for a batch of camera modules from different manufacturers and versions, the following correspondence may exist.
[0077] Table 1 shows the relationship between the settings parameters, manufacturer identification, version number, device address, and storage address of the front camera module.
[0078]
[0079]
[0080] As can be seen from Table 1, regardless of the type of front-facing camera module, the manufacturer identifier is burned to the same address (burning address 1) and the version number is burned to the same address (burning address 2). That is, the manufacturer identifier burned into each electronic device with a front-facing camera module is the manufacturer identifier of the front-facing camera module used by this electronic device, and the version number burned into each electronic device with a front-facing camera module is the version number of the front-facing camera module used by this electronic device. Therefore, the setting parameters used by this electronic device can be determined based on the burned manufacturer identifier and version number.
[0081] This application embodiment uses the example of different burning addresses for the manufacturer's identifier and the version number. In practical applications, the manufacturer's identifier and the version number can also be burned in the same storage address, and this application embodiment does not impose any restrictions on this.
[0082] In addition, for one of the electronic devices in the batch of electronic devices shown in Table 1, the configuration file, setting parameters, and burning information may have the following relationship.
[0083] Reference Figure 3 As shown, the hardware components of the electronic device are as follows: the manufacturer's identifier for the front camera module is programmed into the electrically erasable programmable read-only memory (EEPROM): 0x06; and the version number of the front camera module is programmed into the one-time programmable memory (OTP): 0x00.
[0084] EEPROM is a type of memory chip that retains data even after power loss, and it is typically used to store hardware settings data. Once data is burned into an OTP (Optical Processing Unit), the data in that memory cannot be changed or erased.
[0085] The software portion of the electronic device stores configuration file 1 and configuration file 2.
[0086] Configuration file 1 records the burning address of the manufacturer's identifier for the front-facing camera module of this electronic device. The burning address includes a device address and a storage address; the device address points to the memory where the manufacturer's identifier is burned: EEPROM or OTP; the storage address points to the specific address within the memory where the manufacturer's identifier is burned. Similarly, configuration file 1 also records the burning address of the version number of the front-facing camera module of this electronic device.
[0087] Configuration file 2 records the setting parameters corresponding to each combination of manufacturer identifier and version number of the front-facing camera module used in this model of electronic device. For example, setting parameter 1 corresponds to the front-facing camera module with manufacturer identifier 0x06 and version number 0x00; setting parameter 2 corresponds to the front-facing camera module with manufacturer identifier 0x09 and version number 0x00; and setting parameter 3 corresponds to the front-facing camera module with manufacturer identifier 0x09 and version number 0x10.
[0088] When the electronic device is powered on, it reads the device address and storage address of the manufacturer identifier according to configuration file 1; it then reads the manufacturer identifier 0x06 from the EEPROM based on the device address and storage address; it reads the device address and storage address of the version number according to configuration file 1; and it reads the version number 0x00 from the OTP based on the device address and storage address. Finally, based on the read and burned manufacturer identifier 0x06 and version number 0x00, it determines setting parameter 1 from configuration file 2; thus setting parameter 1 for the front-facing camera module of this electronic device. This parameter 1 provides the basic data for the front-facing camera module of this electronic device to implement various functions.
[0089] Of course, such as Figure 3 As shown, configuration file 1 also records the manufacturer identifier 0x06 and version number 0x00 of the front camera module. To improve data security, before obtaining the setting parameters from configuration file 2, it is necessary to compare the manufacturer identifier in the configuration file with the manufacturer identifier read from the memory and burned. The version number in the configuration file is compared with the version number read from the memory and burned. If they are consistent, the setting parameters corresponding to the manufacturer identifier and version number in the configuration file (which can also be understood as the manufacturer identifier and version number read from the memory and burned) are obtained from configuration file 2.
[0090] Understandable, adopt Figure 3 The method shown requires that only some information about the front camera module of this electronic device be set in the configuration file.
[0091] Furthermore, configuration files 1 and 2 in this embodiment are for illustrative purposes only. In practical applications, the above information can be set in the same configuration file or in multiple configuration files.
[0092] Reference Figure 4 The diagram shown illustrates the relationship between the configuration file, setting parameters, and burning information of one of the electronic devices in a batch of electronic devices shown in Table 1, as provided in this embodiment of the application.
[0093] Hardware components of the electronic device: The manufacturer's identifier for the front camera module is burned into the EEPROM: 0x09; the version number of the front camera module is burned into the OTP: 0x00.
[0094] The software portion of the electronic device: stores configuration file 1.
[0095] Configuration file 1 records the following information for each type of front-facing camera module used in this electronic device:
[0096] Bin1 contains the manufacturer identifier (0x06) and the burning address of the manufacturer identifier for the front camera module a: device address (0xa2) and storage address (0x0007), the version number (0x00) and the burning address of the version number: device address (0x6c) and storage address (0x0018), and the setting parameter 1 for the front camera module a.
[0097] Bin2 contains the manufacturer identifier (0x09) and the manufacturer identifier burning address: device address (0xa2) and storage address (0x0007) of the front camera module b, the version number (0x00) and the version number burning address: device address (0x6c) and storage address (0x0018), and the setting parameters 2 of the front camera module b.
[0098] Bin3 contains the manufacturer identifier (0x09) and the manufacturer identifier burning address: device address (0xa2) and storage address (0x0007) of the front camera module c, the version number (0x10) and the version number burning address: device address (0x6c) and storage address (0x0018), and the setting parameters 3 of the front camera module c.
[0099] When the electronic device is powered on, the device address and storage address of the manufacturer identifier are read from bin1 in configuration file 1; the manufacturer identifier 0x09 is read from the EEPROM based on the device address and storage address; the device address and storage address of the version number are read from bin1 in configuration file 1; the version number 0x00 is read from the OTP based on the device address and storage address; if the manufacturer identifier (0x06) in bin1 is inconsistent with the burned manufacturer identifier (0x09), it can be determined that the parameters of the front camera module corresponding to bin1 are not the parameters of this electronic device; the device address and storage address of the manufacturer identifier are then read from bin2 in configuration file 1. The device address and storage address of the manufacturer identifier are used to read the manufacturer identifier 0x09 from the EEPROM. The device address and storage address of the version number are read from bin2 in configuration file 1, and the version number 0x00 is read from the OTP based on these addresses. The manufacturer identifier (0x09) in bin2 is compared to the programmed manufacturer identifier (0x09), and then the version number (0x00) in bin2 is compared to the programmed version number (0x00). If both match, the parameter of the front-facing camera module of the current electronic device is determined to be setting parameter 2 in bin2. This parameter 2 provides the basic data for the various functions of the front-facing camera module in this electronic device. Of course, after determining that parameter 2 is the parameter of the front-facing camera module of this electronic device, it is no longer necessary to determine whether parameter 3 is the parameter of the front-facing camera module of this electronic device based on bin3 in configuration file 1.
[0100] As can be understood from the above description. Figure 4As shown, the manufacturer's identifier and version number of the front-facing camera module of this electronic device are burned into its memory, but the manufacturer's identifier and version number of the front-facing camera module used by other electronic devices of the same model are not burned into it. Electronic devices of the same model use the same configuration file regardless of the front-facing camera module used, so there is no need to distinguish between different front-facing camera modules when setting the configuration file.
[0101] Furthermore, in the specific implementation, there is no limitation on whether to compare the manufacturer identifier or the version number first. Whether to obtain the manufacturer identifier and version number first and then compare them, or to obtain one piece of information (e.g., manufacturer identifier) and compare it with another piece of information (manufacturer identifier), and only after the current information matches, obtain the next piece of information (e.g., version number) and compare it with the next piece of information (e.g., version number); the embodiments of this application also do not impose limitations.
[0102] In practical applications, the following situations may also exist: Front-facing camera modules from the same manufacturer and of the same version may use different components (e.g., different motors). However, the setting parameters of the front-facing camera modules corresponding to different components may also be different. In this case, it is also necessary to burn component identifiers into the memory of the electronic device, and the corresponding configuration file also includes component identifiers. When determining the setting parameters, it is also necessary to add a comparison of component identifiers. This burning information can be burned into different storage addresses of one memory, or into different memories, or part of the burning information can be burned into different storage addresses of the same memory, and part of the burning information can be burned into different memories. The embodiments in this application do not impose any limitations.
[0103] As an example of including a motor identifier, the configuration file needs to include the device address (e.g., 0xa2 of the EEPROM) and storage address (e.g., 0x002a) for burning the motor identifier (e.g., 0x08).
[0104] Based on the above principle, multiple pieces of information can be burned into the memory according to the differences between front camera modules; the corresponding configuration file also contains multiple pieces of information; by comparing each piece of information in the configuration file with each piece of information burned, the setting parameters that match the current front camera module can be determined.
[0105] This application uses a front-facing camera module as an example. In practical applications, it may also be applied to other modules, such as a rear-facing camera module, a gyroscope, or other modules.
[0106] Reference Figure 5 This is a timing diagram of the method for setting camera module parameters provided in the embodiments of this application.
[0107] In this embodiment, the manufacturer's identifier and version number of the front-facing camera module can be programmed into the memory of the electronic device (e.g., EEPROM and OTP shown in the figure). Alternatively, the manufacturer's identifier and the programming address for programming the manufacturer's identifier, as well as the version number of the front-facing camera module and the programming address for programming the version number, can be set in the configuration file of the electronic device.
[0108] S101, the camera provider process received the start command.
[0109] In this embodiment of the application, multiple processes are started when the electronic device is powered on. Different processes are executed when different processes are started, thereby providing conditions for the various functions subsequently provided by the electronic device.
[0110] As an example, when an electronic device is powered on, many processes need to be started, such as processes that perform the following functions: power supply, self-test power-on, loading BIOS settings, selecting boot device, bootloader, loading operating system, operating system initialization, etc.
[0111] The embodiments of this application can be applied to the parameter setting process of a camera module. This process is located during the startup process of the camera provider process. Therefore, the embodiments of this application focus on describing the camera module parameter setting process implemented during the startup process of the camera provider process.
[0112] S102, the camera provider process starts.
[0113] S103, the camera provider process reads the configuration file of the front camera module, and obtains the manufacturer identifier and manufacturer identifier burning address of the front camera module, as well as the version number and version number burning address of the front camera module.
[0114] Referring to Table 1, three different front-facing camera modules are used in the same model of electronic device: front-facing camera module a, front-facing camera module b, and front-facing camera module c. A corresponding configuration file can be set for each front-facing camera module.
[0115] Taking the front camera module a as an example, the configuration file of the front camera module a sets the manufacturer identifier of the front camera module a and the burning address of the manufacturer identifier of the front camera module a; it also sets the version number of the front camera module a and the burning address of the version number of the front camera module a.
[0116] In practical implementation, it can be done according to Figure 3 As shown, the manufacturer's identifier and its burning address, version number and its burning address for the front camera module of this electronic device are obtained.
[0117] You can also follow Figure 4 As shown, the manufacturer's identifier and its burning address, version number and its burning address are obtained for each front camera module.
[0118] The embodiments of this application are as follows: Figure 3 The following example illustrates the interaction process between different modules in an electronic device.
[0119] S104, the camera provider process generates a front camera module detection command 1 based on the manufacturer identifier and manufacturer identifier burning address of the front camera module. Accordingly, the detection command 1 carries the manufacturer identifier and manufacturer identifier burning address of the front camera module.
[0120] S105, the camera provider process generates a front camera module detection command 2 based on the front camera module's version number and version number burning address. Accordingly, this detection command 2 carries the front camera module's version number and version number burning address.
[0121] In this embodiment, the camera provider process can generate two probe commands: probe command 2 and probe command 1, or it can generate one probe command. The generated probe command carries the manufacturer identifier and manufacturer identifier burning address of the front camera module, as well as the version number and version number burning address. This embodiment does not limit this.
[0122] S106, the camera provider process sends probe command 1 and probe command 2 to the kernel.
[0123] S107 After receiving probe command 1 and probe command 2, the kernel sends probe command 1 and probe command 2 to the camera driver.
[0124] S108, after receiving probe command 1 and probe command 2, the camera driver reads the burning version number of the front camera module from the OTP according to the burning address of the version number carried in probe command 2.
[0125] As another embodiment of this application, the configuration file of the front camera module may include the following contents for the burning address of the version number: device address, storage address, length of storage address, etc.
[0126] The camera driver can locate the memory with the programmed version number on the I2C bus via device address 0x6c, for example, OTP.
[0127] After locating the memory OTP, the camera driver looks up the version number in the EEPROM based on the memory address (e.g., 0x0018) and the length of the memory address (e.g., 2 bytes).
[0128] Similarly, in the configuration file of the front camera module, when setting the version number of the front camera module (e.g., 0x00), the length of the version number (e.g., 1 byte) can also be set.
[0129] Of course, all this information in the configuration file can be carried in the probe command.
[0130] S109, the version number in the camera driver comparison detection instruction 2 and the burning version number read from OTP are confirmed to be consistent.
[0131] In this embodiment, even if the same batch of electronic devices has three different front-facing camera modules, if the memory of each electronic device records the manufacturer's identifier and version number of the front-facing camera module used by that electronic device, and does not record the manufacturer's identifier and version number of other front-facing camera modules; and if the configuration file of the front-facing camera module used by that electronic device is set, and the configuration files of other front-facing camera modules are not set; then, after reading the burned version number of the front-facing camera module from the OTP according to the version number burning address carried in the detection instruction 2, the version number of the front-facing camera module of this electronic device can be determined, and the comparison in S109 is no longer required. Correspondingly, the version number of the front-facing camera module can also be omitted from the detection instruction. Of course, comparison in S109 can further improve the accuracy of the data.
[0132] S110, after receiving probe command 1 and probe command 2, the camera driver reads the manufacturer identifier of the front camera module from the EEPROM according to the manufacturer identifier burning address carried in probe command 1.
[0133] In this embodiment, the programming version number can be read first according to probe command 2, and then the programming manufacturer identifier can be read according to probe command 1; alternatively, the programming manufacturer identifier can be read first according to probe command 1, and then the programming version number can be read according to probe command 2. This embodiment does not impose any restrictions on this approach.
[0134] As another embodiment of this application, the configuration file of the front camera module may also include the following contents for the burning address of the manufacturer identifier: device address, storage address, length of storage address, etc.
[0135] The camera driver can locate the memory identified by the programming manufacturer, such as EEPROM, via the device address (e.g., 0xa2) on the I2C bus.
[0136] After locating the EEPROM memory, the camera driver looks up the manufacturer identifier on the EEPROM based on the memory address (e.g., 0x0007) and the length of the memory address (e.g., 2 bytes).
[0137] Similarly, in the configuration file of the front camera module, when setting the manufacturer identifier of the front camera module (e.g., 0x06), the length of the manufacturer identifier (e.g., 1 byte) can also be set.
[0138] Of course, all this information in the configuration file can be carried in the probe command.
[0139] S111, the manufacturer identifier in the camera driver comparison detection instruction 1 and the burning manufacturer identifier read from the EEPROM are confirmed to be consistent.
[0140] In this embodiment of the application, the description in S109 can be referred to, or S111 can be executed or not executed.
[0141] S112, after determining the manufacturer's identifier and version number of the front camera module, set the parameters of the front camera module based on the manufacturer's identifier and version number of the front camera module.
[0142] In this embodiment, parameters matching the manufacturer's identifier and version number of the front camera module can be written into a register. When the user uses the front camera module to implement various functions, the parameters written in the register can be used as basic data to achieve the corresponding functions.
[0143] S113, after setting the parameters of the front camera module, the camera driver sends a message indicating successful setup to the camera provider process.
[0144] In practical applications, the camera driver can send a message indicating successful setup to the camera provider process via the kernel.
[0145] If an electronic device has a camera module, the setup for that camera module is complete. As mentioned earlier, an electronic device may have multiple camera modules. For example, in addition to a front camera module, there may also be a rear camera module. After S113, it is necessary to continue setting the parameters of the rear camera module. The process of setting the parameters of the rear camera module is similar to that of setting the parameters of the front camera module. That is, during the startup of the camera provider process, S103 to S113 are executed, except that the contents of this process are for the rear camera module.
[0146] S114, read the configuration file of the rear camera module, and obtain the manufacturer's identifier and manufacturer's identifier burning address of the rear camera module, as well as the version number and version number burning address of the rear camera module.
[0147] The process of setting the parameters for the rear camera module can be referred to the process of setting the parameters for the front camera module, and will not be repeated here.
[0148] In addition, when the rear camera module of the same electronic device includes multiple camera modules (e.g., a wide-angle camera, a 20-megapixel camera, and an 8-megapixel camera), it is necessary to repeatedly execute the process of setting parameters for each rear camera module.
[0149] As can be understood from the above embodiments, the manufacturer identifier of the front-facing camera module a of electronic device a is 0x06, and the version number is 0x00. Therefore, the manufacturer identifier 0x06 and the version number 0x00 of the front-facing camera module a are burned into the memory of electronic device a. Simultaneously, the configuration file of electronic device a can record the manufacturer identifier (0x06), the byte length of the manufacturer identifier (1 byte), the device address for burning the manufacturer identifier (0xa2), the storage address of the manufacturer identifier (0x0007), and the storage address length of the manufacturer identifier (2 bytes), as well as the version number (0x00), the byte length of the version number (1 byte), the device address for burning the version number (0x6c), the storage address of the version number (0x00018), and the storage address length of the version number (2 bytes).
[0150] If the front camera module of the same model of electronic device also contains front camera module b and front camera module c, the manufacturer identifier of front camera module b is 0x09; version number is 0x00; the manufacturer identifier of front camera module c is 0x09; version number is 0x10; the memory of electronic device a will no longer record the relevant information of front camera module b and front camera module c, and the configuration file of the electronic device will not include the manufacturer identifier, version number, etc. of front camera module b, nor will it include the manufacturer identifier, version number, etc. of front camera module c.
[0151] As another embodiment of this application, in practical applications, when setting the configuration file for each electronic device, it is not necessary to distinguish between electronic devices with different front-facing camera modules. Instead, the same configuration file can be set in electronic devices of the same model, which contains relevant information about each type of front-facing camera module of the same model.
[0152] and Figure 4 Correspondingly, the manufacturer identifier (0x09) and version number (0x00) of the front-facing camera module b are burned into the memory of electronic device b. Electronic device b also stores information such as the manufacturer identifier, version number, and burning address for each type of front-facing camera module. Multiple bins can be set according to the types of front-facing camera modules in the same batch of electronic devices, with each bin corresponding to the manufacturer identifier, version number, burning address, and setting parameters of a type of front-facing camera module.
[0153] Reference Figure 6 As shown, for the same as Figure 4A schematic diagram illustrating the setting process for the corresponding camera module parameters.
[0154] A1, the electronic device generates detection command 1 and detection command 2 for each bin at the i-th position according to the configuration file of the camera module at the i-th position.
[0155] Taking the embodiment of this application, which sets camera modules in two locations as an example, namely a front camera module and a rear camera module.
[0156] Taking the front-facing camera module as an example, assume there are three different types of camera modules: front-facing camera module a, front-facing camera module b, and front-facing camera module c. Correspondingly, there are three bins. For each bin of the first position (front-facing camera module) (the configuration information of front-facing camera module a, front-facing camera module b, and front-facing camera module c each correspond to one bin), generate one probe command 1 and one probe command 2. Then, the probe commands shown in Table 1 can be obtained.
[0157] Table 1 shows the detection commands 1 and 2 for the j-th (j=1, 2, 3) camera module at the 1st (i=1) position.
[0158] Camera module in position 1 Camera module Detection Command 1 Detection Command 2 The first bin Front camera module a Detection command 1a Detection command 2a The second bin Front camera module b Detection command 1b Detection command 2b The third bin Front camera module c Detection command 1c Detection command 2c
[0159] Taking the rear camera module as an example, assuming there is one type of camera module (same manufacturer, same version number), designated as rear camera module d, there is corresponding bin. For each bin of the second position (rear camera module) (the configuration information of camera module d corresponds to one bin), a probe command 1 and a probe command 2 are generated respectively, resulting in the probe commands shown in Table 2.
[0160] Table 2 shows the detection commands 1 and 2 for the j-th (j=1) type of camera module at the 2nd (i=2) position.
[0161] The camera module in the second position Camera module Detection Command 1 Detection Command 2 The first bin Rear camera module d Detection command 1a Detection command 2a
[0162] In this embodiment of the application, i can be initialized to 1, and j can also be initialized to 1.
[0163] A2, the electronic device obtains the burning version number based on the burning address in the probe instruction 2 of the j-th bin at the i-th position.
[0164] Taking the first bin of the first position as an example, it corresponds to the relevant information of the front camera module a. Detection command 2 is detection command 2a. The process of obtaining the burning version number based on the burning address in detection command 2a can be referred to... Figure 5 The timing diagram shown.
[0165] In practical applications, the maximum value m of i represents the number of camera module positions. For example, if an electronic device has one front-facing camera module and one rear-facing camera module, then i has a maximum value of 2; if the electronic device has one front-facing camera module and three rear-facing camera modules, then i has a maximum value of 4. The maximum value n of j for the camera module at the i-th position represents the number of types of the camera module at the i-th position. This number of types is the number of bins. Different manufacturers and different version numbers do not belong to the same type of camera module. Of course, if camera modules from the same manufacturer but with different version numbers can share the same set of settings parameters, then a bin can be set up for each version number of the camera module, and these bins have the same settings parameters. Alternatively, camera modules with different version numbers can be considered as the same type of camera module, and this type of camera module corresponds to a bin. This bin carries multiple version numbers, so the maximum value n of j represents the number of bins.
[0166] A3, the electronic device determines whether the version number in the probe instruction 2 of the i-th position j-th bin is consistent with the burned version number.
[0167] In this embodiment of the application, if camera modules with different version numbers but the same setting parameters are regarded as the same type of camera module, and this type of camera module is configured with a bin, which carries multiple version numbers; then the version number in the detection instruction 2 of the i-th position j-th bin is consistent with the burned version number, which means that the version number in the detection instruction 2 of the i-th position j-th bin includes the burned version number.
[0168] As an example, if the version number in the configuration file includes 0x00, 0x03, 0x04, 0x05 and 0x06, then the version number in probe instruction 2 includes 0x00, 0x03, 0x04, 0x05 and 0x06, and the burning version number obtained from memory is 0x00. In this case, it means that the version number in probe instruction 2 is consistent with the burning version number.
[0169] A4, if the version number in the probe instruction 2 of the j-th bin at the i-th position is consistent with the burning version number, the electronic device obtains the burning manufacturer identifier based on the probe instruction 1 of the j-th bin at the i-th position.
[0170] A5, the electronic device determines whether the manufacturer identifier in the probe instruction 1 of the j-th bin at the i-th position is consistent with the burned manufacturer identifier.
[0171] Similarly, if camera modules from different manufacturers have the same settings parameters, the bin settings can be configured in the same way as those for camera modules with different version numbers but the same parameters. Likewise, the process for determining whether the manufacturer identifiers are consistent can be the same as the process for determining whether the version numbers are consistent.
[0172] A6, if the manufacturer identifier in the probe instruction 1 of the j-th bin at the i-th position is consistent with the burned manufacturer identifier, the electronic device sets the parameters of the camera module at the i-th position based on the consistent manufacturer identifier and version number.
[0173] A7, the electronic device determines whether i is greater than or equal to m (the number of camera module positions).
[0174] If i is greater than or equal to m, it means that the parameters of the last camera module are being set. After setting the parameters of the last camera module, it means that the camera module parameter setting is finished.
[0175] If i is less than m, it means that there are still camera modules that have not been set with parameters (for example, the rear camera module has not been set yet). Therefore, after the value of i is increased by 1, execution continues from A1 to set the parameters of the camera module at the next position. The setting process is the same.
[0176] In practical applications, since the manufacturer identifier and version number burned into the memory of electronic devices are the actual manufacturer identifier and version number of the camera module of the electronic devices, and the configuration file set by the electronic devices is the configuration file of each type of camera module that may be used in the same batch of electronic devices, if the information in the first bin is consistent with the burned information, it means that some parameters of the camera module defined in the first bin match the camera module of this electronic device, and the parameters in the first bin can be set as the parameters of the current camera module.
[0177] In practical applications, the information in the first bin may not match the information burned in, which means that the parameters defined in the current first bin do not match the camera module of this electronic device. Therefore, it is necessary to continue to determine whether the information in the second bin is consistent with the information burned in.
[0178] In A3, if the version number of detection command 2 is inconsistent with the burning version number, and in A5, if the manufacturer identifier in detection command 1 is inconsistent with the burning manufacturer identifier, the following steps shall be performed:
[0179] A8, the electronic device determines whether j is greater than or equal to n (the number of bins in the camera module at position i).
[0180] If j is greater than or equal to n, it means that the current position is the last bin. If it does not match, there is a problem with the configuration file or burning information of the camera module at the current position, and the parameters of the camera module at the current position will no longer be set. Therefore, execute A7 to determine whether the current position is the last camera module.
[0181] If j is less than n, it means that the currently mismatched bin is not the last bin. Therefore, after incrementing the value of j by 1, execution continues from A2 to check whether the information in the next bin is consistent with the burning information.
[0182] In practical applications, the programmed information usually cannot be changed arbitrarily. Therefore, the manufacturer identifier and version number programmed in the information represent the actual manufacturer and version of the camera module of this electronic device. This matching method can be used to determine which bin corresponds to the setting parameters that match the camera module of this electronic device, thereby setting the current camera module's parameters to the matching settings.
[0183] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0184] This application also provides a computer-readable storage medium storing a computer program that, when run on an electronic device, can implement the steps in the above-described method embodiments.
[0185] This application also provides a computer program product that, when run on an electronic device or a wireless router, enables the electronic device to perform the steps described in the various method embodiments above.
[0186] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0187] This application also provides a chip, which includes a processor coupled to a memory. The processor calls a computer program stored in the memory to implement the steps of any method embodiment of this application. The chip can be a single chip or a chip module composed of multiple chips.
[0188] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0189] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0190] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for setting camera module parameters, characterized in that, Applied to electronic devices, the method includes: Read the first configuration file of the first camera module to obtain the first burning address and the first identification information of the first camera module. The first burning address stores the burning identification information of the first camera module. The first burning address includes the device address and storage address of the hardware. The hardware is a read-only memory and / or a one-time programmable memory in an electronic device. The first identification information includes the first manufacturer identifier and the first version number. Read the first programming identifier information of the first camera module from the first programming address of the first camera module. The first programming identifier information includes the first programming manufacturer identifier and the first programming version number. Compare the first identifier information with the first programming identifier information. If the first identification information and the first burning identification information are consistent, obtain the first parameter corresponding to the first identification information from the first configuration file where the first identification information is located; set the first parameter for the first camera module; If the first identification information and the first burning identification information are inconsistent, the second configuration file of the first camera module is read to obtain the second identification information of the first camera module. The second identification information and the first burning identification information are compared until the identification information in each configuration file of the first camera module is inconsistent with the first burning identification information, or until the identification information in one configuration file of the first camera module is consistent with the first burning identification information. Then, the parameter corresponding to the identification information consistent with the first burning identification information is set for the first camera module. The burning address is the same in multiple configuration files of the first camera module.
2. The method as described in claim 1, characterized in that, The method further includes: If the second identification information and the first burning identification information are consistent, the second parameter corresponding to the second identification information is obtained from the second configuration file where the second identification information is located.
3. The method as described in claim 2, characterized in that, After comparing the second identification information and the first programming identification information, the method further includes: If the second identification information and the first burning identification information are inconsistent, continue to compare the identification information in other configuration files of the first camera module with the first burning identification information; The first camera module is set with parameters corresponding to the identification information consistent with the first burning identification information until the identification information in each configuration file of the first camera module is inconsistent with the first burning identification information, or until the identification information in one configuration file of the first camera module is consistent with the first burning identification information.
4. The method according to any one of claims 1 to 3, characterized in that, The electronic device further includes a second camera module. If the identification information in each configuration file of the first camera module is inconsistent with the first burned-in identification information, or if the first camera module is set with parameters corresponding to identification information consistent with the first burned-in identification information, the device further includes: The third configuration file of the second camera module is read to obtain the second burning address of the second camera module, and the burning identification information of the second camera module is stored in the second burning address; Read the second programming identifier information of the second camera module from the second programming address of the second camera module. The second programming identifier information includes the second programming manufacturer identifier and the second programming version number. Set parameters for the second camera module that correspond to the second burning identifier information.
5. The method according to any one of claims 1 to 3, characterized in that, When the first identification information and the first programming identification information are consistent, obtaining the first parameter corresponding to the first identification information from the first configuration file where the first identification information is located includes: If the first manufacturer identifier in the first identification information is consistent with the first programming manufacturer identifier, and the first version number in the first identification information is consistent with the first programming version number, then the first parameter corresponding to the first identification information is obtained from the first configuration file where the first identification information is located.
6. The method as described in claim 5, characterized in that, The step of comparing the second identification information and the first programming identification information when the first identification information and the first programming identification information are inconsistent includes: If the first manufacturer identifier in the first identification information is inconsistent with the first programming manufacturer identifier, and / or the first version number in the first identification information is inconsistent with the first programming version number, then the second identification information and the first programming identification information shall be compared.
7. The method as described in claim 6, characterized in that, The first version number in the first identification information is multiple version numbers, and the first burning version number is 1 version number; The first version number in the first identification information and the first burning version number are the same, meaning that the first version number in the first identification information includes the first burning version number; The discrepancy between the first version number in the first identification information and the first burning version number is as follows: the first version number in the first identification information does not include the first burning version number.
8. The method as described in claim 1, characterized in that, The burning identification information further includes: the first burning component identifier of the first camera module, and the first identification information further includes: the first component identifier of the first camera module.
9. An electronic device, characterized in that, It includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store a computer program, which, when executed by the one or more processors, causes the electronic device to perform the method as described in any one of claims 1-8.
10. A chip system applied to an electronic device, the chip system comprising one or more processors, characterized in that, The processor is used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1-8.
11. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-8.