Camera module parameter setting method, electronic equipment and chip system
By burning the manufacturer's ID and version number of the camera module into the electronic device and setting the corresponding parameters according to the configuration file, the problem of abnormal camera module function in the same model of electronic equipment is solved, and the stability and consistency of the camera module are improved.
Patent Information
- Application Number
- CN202411194458.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-08-28
AI Technical Summary
When camera modules from different manufacturers or versions are used in the same electronic device, abnormal camera functions may occur, such as black stripes in front-facing shooting scenes.
Burn the camera module's manufacturer ID and version number into the electronic device's memory, and obtain the corresponding setting parameters from the configuration file to ensure that the parameters match the module's manufacturer ID and version number.
It reduces parameter errors caused by different version numbers, improves the stability and consistency of camera functions, and reduces the occurrence of abnormal phenomena.
Smart Images

Figure CN120751236A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a method for setting camera module parameters, an electronic device, and a chip system. Background Art
[0002] With the development of technology, electronic devices have realized more and more functions. Correspondingly, more and more sensor modules are installed in electronic devices, such as camera modules, ambient light sensor modules, infrared distance sensor modules, etc.; some corresponding functions can be realized through these sensor modules.
[0003] When electronic device manufacturers produce electronic devices of the same model, they typically use camera modules from the same camera module manufacturer. This means that the camera modules of the same electronic device model can use the same setting parameters. In actual applications, due to various factors (for example, inventory levels, price differences, hardware upgrades, etc.), the same electronic device model may also be equipped with camera modules from multiple manufacturers. In this case, 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 use a single set of parameters, the camera function of the electronic device may still experience some anomalies, such as the appearance of black stripes in the preview image when shooting a front-facing scene. Summary of the Invention
[0004] The present 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 the electronic device.
[0005] To achieve the above objectives, the present application provides a method for setting camera module parameters in a first aspect, which adopts the following technical solutions:
[0006] Reading a first configuration file of a first camera module to obtain a first burning address of the first camera module, wherein the first burning address stores burning identification information of the first camera module;
[0007] Reading first burning identification information of the first camera module from the first burning address of the first camera module, where the first burning identification information includes a first burning manufacturer identifier and a first burning version number;
[0008] Parameters corresponding to the first burning identification information are set for the first camera module.
[0009] In the present application, the manufacturer identification and version number of the camera module used by the electronic device can be burned into the memory of the electronic device; the burning address of the burned manufacturer identification and version number can be set in the configuration file; when the electronic device is turned on, the burned manufacturer identification and burned version number of the camera module used by the electronic device can be obtained according to the burned address in the configuration file; thereby, the parameters corresponding to the burned manufacturer identification and burned version number are set for the camera module of the electronic device; since for the camera module of an electronic device, the parameters of the camera module are related to the manufacturer identification and version number of the camera module, the parameter errors caused by using the same set of setting parameters due to different version numbers are reduced, thereby reducing abnormal phenomena caused by camera module parameter errors.
[0010] As an implementation of the first aspect, the first configuration file further includes first identification information of the first camera module, where the first identification information includes a first manufacturer identifier and a first version number;
[0011] The step of setting parameters corresponding to the first burning identification information for the first camera module includes:
[0012] comparing the first identification information with the first burning identification information;
[0013] When the first identification information is consistent with the first burning identification information, obtaining a first parameter corresponding to the first identification information from the first configuration file where the first identification information is located;
[0014] The first parameter is set for the first camera module.
[0015] In this application, the manufacturer identification and version number of the camera module of the electronic device can also be added to the configuration file to determine parameters consistent with the burned manufacturer identification and burned version number to improve data security.
[0016] As another implementation of the first aspect, the first camera module has multiple configuration files, and the method further includes:
[0017] Reading a second configuration file of the first camera module to obtain second identification information of the first camera module;
[0018] After comparing the first identification information with the first burning identification information, the method further includes:
[0019] When the first identification information and the first burning identification information are inconsistent, comparing the second identification information with the first burning identification information;
[0020] When the second identification information is consistent with the first burning identification information, a second parameter corresponding to the second identification information is obtained from the second configuration file where the second identification information is located.
[0021] In the present application, when a model of electronic device uses multiple camera modules (camera modules with different setting parameters), each electronic device can burn the manufacturer identification and version number of the electronic device into the memory of the electronic device; the configuration file of the electronic device can store the setting parameters corresponding to the multiple camera modules (combination of manufacturer and version number); the setting parameters corresponding to the identification information consistent with the manufacturer identification and burned version number of the electronic device can be searched from multiple identification information (manufacturer identification and version number); in the specific implementation, the burned identification information and multiple identification information in the configuration file can be compared in turn to determine the setting parameters corresponding to the identification information consistent with the burned identification information of the electronic device.
[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 burning address of the manufacturer identification of the first camera module in the electronic device of this model can be set to be the same, and the burning address of the version number can be set to be the same, 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 with the first burning identification information, the method further includes:
[0025] When the second identification information is inconsistent with the first burning identification information, continue to compare identification information in other configuration files of the first camera module with the first burning identification information;
[0026] Until the identification information in each configuration file of the first camera module is inconsistent with the first burned identification information, or until the identification information in a configuration file of the first camera module is consistent with the first burned identification information, parameters corresponding to the identification information consistent with the first burned identification information are set for the first camera module.
[0027] In this application, taking the front camera module as an example, there may be multiple front camera modules set in the same model of electronic device, and the manufacturer identification and version number of the front camera module used in each electronic device are fixed, but the configuration file may contain identification information of multiple front camera modules of this model of electronic device; if identification information consistent with the burned identification information can be found, the setting parameters of the front camera module of this electronic device can be determined; if identification information consistent with the burned identification information cannot be found, there may be an error in the configuration file of this electronic device, and there is no need to configure the front 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. When identification information in each configuration file of the first camera module is inconsistent with the first burned-in identification information, or after setting parameters corresponding to identification information consistent with the first burned-in identification information for the first camera module, the electronic device further includes:
[0029] Reading a third configuration file of the second camera module to obtain a second burning address of the second camera module, wherein the second burning address stores burning identification information of the second camera module;
[0030] Reading second burning identification information of the second camera module from the second burning address of the second camera module, where the second burning identification information includes a second burning manufacturer identifier and a second burning version number;
[0031] Parameters corresponding to the second burning identification information are set for the second camera module.
[0032] In this application, the electronic device may have camera modules set in multiple positions, for example, a front camera module and a rear camera module. The parameter setting process of the camera modules is the same. After completing the parameter setting of one camera module, the parameter setting of the next camera module is performed.
[0033] As another implementation of the first aspect, when the first identification information is consistent with the first burning identification information, obtaining a first parameter corresponding to the first identification information from the first configuration file where the first identification information is located includes:
[0034] When the first manufacturer identifier in the first identification information is consistent with the first burning manufacturer identifier, and the first version number in the first identification information is consistent with the first burning version number, a 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, when the first identification information and the first burning identification information are inconsistent, comparing the second identification information with the first burning identification information includes:
[0036] When the first manufacturer identifier in the first identification information is inconsistent with the first burning manufacturer identifier, and / or the first version number in the first identification information is inconsistent with the first burning version number, the second identification information is compared with the first burning identification information.
[0037] As another implementation of the first aspect, the first version number in the first identification information is a plurality of version numbers, and the first burned version number is one version number;
[0038] The first version number in the first identification information and the first burning version number are consistent if: the first version number in the first identification information includes the first burning version number.
[0039] The first version number in the first identification information and the first burning version number are inconsistent when: 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: a first burning component identification of the first camera module, and the first identification information further includes: a first component identification of the first camera module.
[0041] In this application, the parameters of the camera module of the same model of electronic equipment may not only be related to the manufacturer and version, but may also be related to the components in the camera module, because the burned identification information can also include component identification, and the identification information in the configuration file also includes component identification. When judging whether the identification information in the configuration file and the burned identification information read from the burning address are consistent, it is necessary to judge whether each identification information is consistent, thereby reducing camera abnormalities caused by incorrect parameter settings.
[0042] In a second aspect, an electronic device is provided, comprising a processor, wherein the processor is configured to call a computer program stored in a memory to implement any one of the methods of the first aspect of the present application.
[0043] In a third aspect, a chip system is provided, comprising a processor coupled to a memory, wherein the processor executes a computer program stored in the memory so that the electronic device implements any one of the methods of the first aspect of the present application.
[0044] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer instructions are executed on an electronic device, the electronic device implements any one of the methods of the first aspect of the present application.
[0045] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a device, enables the electronic device to execute any one of the methods in the first aspect of the present application.
[0046] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0048] Figure 2 Schematic diagram of the front-facing preview interface of different electronic devices in a group of electronic devices provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of the relationship between information in a configuration file of an electronic device and hardware burning information provided in an embodiment of the present application;
[0050] Figure 4 A schematic diagram showing the relationship between information in a configuration file and hardware burning information of another electronic device provided in an embodiment of the present application;
[0051] Figure 5 A timing diagram of a method for setting camera module parameters provided in an embodiment of the present application;
[0052] Figure 6 A flowchart of a method for setting camera module parameters provided in an embodiment of the present application is provided. DETAILED DESCRIPTION
[0053] In the following description, specific details such as specific system structures and technologies are provided for illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details.
[0054] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0055] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more than two; "and / or" describes the relationship between associated objects, indicating that three relationships can exist; for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0056] In addition, in the description of this application specification and the appended claims, the terms "first", "second", "third", "fourth", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0057] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in 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 "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0058] The embodiments of the present application provide a method for setting camera module parameters. The method can be applied to electronic devices. The electronic devices in the embodiments of the present application can be tablet computers, mobile phones, wearable devices, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The embodiments of the present application do not limit the specific type of electronic devices.
[0059] Figure 1The 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, an antenna 1, an 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light 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 should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0061] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0062] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0063] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and an application required for at least one function (such as an image playback function, etc.). The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0064] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0065] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can 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 MiniLED, a MicroLED, a Micro-OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0066] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. 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, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1. Among them, the camera 193 can be a camera module in subsequent embodiments.
[0067] The embodiments of the present application do not particularly limit the specific structure of the execution subject of the method for setting camera module parameters. As long as the code recording the method for setting camera module parameters according to the embodiments of the present application can be executed to communicate according to the method for setting camera module parameters provided by the embodiments of the present application. For example, the execution subject of the method for setting camera module parameters provided by the embodiments of the present application can be a functional module in an electronic device that can call and execute a program, or a communication device used in an electronic device, such as a chip.
[0068] With the development of technology, electronic devices have realized more and more functions. Accordingly, more and more sensor modules are installed in electronic devices, such as camera modules, ambient light sensor modules, infrared distance sensor modules, etc. These sensor modules can realize some corresponding functions.
[0069] When mass-producing a certain model of electronic equipment, a device manufacturer may use the same module from different manufacturers due to factors such as inventory levels, price differences, and module upgrades. For example, a device manufacturer may purchase camera module a from manufacturer A, camera module b from manufacturer B, and camera module c from manufacturer C.
[0070] In actual applications, although camera modules a, b, and c from different manufacturers can all achieve the same functionality, some initialization parameters (or setup parameters) used by these camera modules may differ during use. This necessitates selecting different initialization parameters (or setup parameters) for each manufacturer's camera module. Therefore, in actual 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 arise in actual applications.
[0071] Reference Figure 2 As shown, among a group of electronic devices, although using the same model of front-facing camera module from the same manufacturer, some electronic devices (for example, electronic device b) experience black stripes when previewing images in front-facing shooting scenarios. However, other electronic devices (for example, electronic device a) do not experience this phenomenon when previewing images.
[0072] After analysis, it was found that although the front camera modules of this batch of electronic devices came from the same manufacturer and the same model, the versions of these front camera modules were different; that is, the front camera modules of this model had been improved in hardware or software. Although they were still the same model and corresponded to the same functions, there were some internal differences, so there were different versions of the same model of front camera modules. The parameters of some versions of the front camera modules (for example, version 1) were stored in registers 1 to 10 (for example only), and the parameters of other versions of the front camera modules (for example, version 2) were stored in registers 1 to 12 (for example only). This resulted in the front camera modules of different versions being set to the parameters of one version (for example, version 1); the electronic devices that subsequently set the front camera module of version 2 had errors in the parameters used when using the front camera module. Therefore, some functions of the electronic devices that set the front camera module of version 2 became abnormal, that is, some of the electronic devices in the above example had black stripes when previewing the picture through the front camera module.
[0073] Based on the above description, it can be understood that the cause of functional anomalies in the front camera modules of some electronic devices is related to certain parameters of the front camera modules, which are related to register positions. Therefore, in actual applications, the functional anomalies of the front camera modules of electronic devices are not completely fixed and are related to specific incorrect parameters. For example, it is possible that the low power mode of the front camera module cannot be activated. Because the specific abnormalities are related to the specific incorrect parameters, other possible abnormalities will not be listed one by one.
[0074] An embodiment of the present application provides a method for setting camera module parameters. When camera modules of different manufacturers or different versions of the same manufacturer are set in an electronic device of the same model, the manufacturer identification, 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 the burning address of the manufacturer identification and version number of the camera module of the electronic device, as well as the setting parameters corresponding to different manufacturers and different versions in the electronic device in advance.
[0075] When the parameters of the camera module are set when the electronic device is turned on, the burning address of the manufacturer identifier and the burning address of the version number are obtained through the configuration file of the camera module; the manufacturer identifier of the camera module is obtained through the burning address of the manufacturer identifier, and the version number of the camera module is obtained through the burning address of the version number. Finally, the parameters set for this electronic device are determined based on the manufacturer identifier and version number obtained from the burning address.
[0076] Of course, in actual applications, for a group of camera modules with different manufacturers and versions, the following corresponding relationships may exist.
[0077] Table 1 Relationship between the front camera module's setting parameters, manufacturer identification, version number, device address, and storage address
[0078]
[0079]
[0080] It can be understood from Table 1 that no matter which front camera module is used, the burning address of the manufacturer's identification is the same (all are burned address 1), and the burning address of the version number is the same (all are burned address 2), that is, the manufacturer's identification burned in each electronic device equipped with a front camera module is the manufacturer's identification of the front camera module used by this electronic device, and the version number burned in each electronic device equipped with a front camera module is the version number of the front camera module used by this electronic device. Therefore, the setting parameters used by this electronic device can be determined based on the burned manufacturer's identification and version number.
[0081] The embodiment of the present application takes the different burning addresses of the manufacturer identification and version number as an example. In actual applications, the manufacturer identification and version number can also be burned in the same storage address, and the embodiment of the present application does not limit this.
[0082] In addition, based on one electronic device in the group of electronic devices shown in Table 1, the configuration file, the setting parameters, and the burning information may have the following relationship.
[0083] Reference Figure 3 As shown, the hardware part of the electronic device: the manufacturer logo of the front camera module: 0x06 is burned into the electrically erasable programmable read only memory (EEPROM); the version number of the front camera module: 0x00 is burned into the one-time programmable memory (OTP).
[0084] EEPROM is a memory chip that does not lose data after power failure. It is usually used to store hardware configuration data. Once the data is burned into the OTP, it cannot be changed or cleared.
[0085] The software part of the electronic device: stores configuration file 1 and configuration file 2.
[0086] Configuration file 1 records the address where the manufacturer's logo is burned into the front camera module of this electronic device. The burned address includes a device address and a storage address. The device address points to the memory (EEPROM or OTP) where the manufacturer's logo is burned into. The storage address points to the specific address in the memory where the manufacturer's logo is burned into. Similarly, Configuration file 1 also records the address where the version number of the front camera module of this electronic device is burned into.
[0087] Configuration file 2 records the configuration parameters corresponding to each combination of the manufacturer ID and version number of the front camera module used in this model of electronic device. For example, the front camera module with manufacturer ID 0x06 and version number 0x00 corresponds to configuration parameter 1; the front camera module with manufacturer ID 0x09 and version number 0x00 corresponds to configuration parameter 2; and the front camera module with manufacturer ID 0x09 and version number 0x10 corresponds to configuration parameter 3.
[0088] When the electronic device is powered on, the device address and storage address of the manufacturer's identifier are read from configuration file 1; the manufacturer identifier 0x06 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 configuration file 1; the version number 0x00 is read from the OTP based on the device address and storage address; and, based on the read, burned-in manufacturer identifier 0x06 and version number 0x00, parameter 1 is determined from configuration file 2 to set parameter 1 for the front camera module of the electronic device. Parameter 1 is used to provide basic data for implementing various functions of the front camera module of the electronic device.
[0089] Of course, if Figure 3 As shown, configuration file 1 also records the manufacturer identifier 0x06 and version number 0x00 of the front camera module; in order 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 burned-in manufacturer identifier read from the memory; compare the version number in the configuration file with the burned-in version number read from the memory, and if they are consistent, obtain the setting parameters corresponding to the manufacturer identifier and version number in the configuration file (which can also be understood as the burned-in manufacturer identifier and burned-in version number obtained from the memory) from configuration file 2.
[0090] Understandably, using Figure 3 In the method shown, only some information of the front camera module of the electronic device needs to be set in the configuration file.
[0091] In addition, configuration file 1 and configuration file 2 in the embodiment of the present application are only used for examples. In actual applications, the above information can be set in the same configuration file or in multiple configuration files.
[0092] Reference Figure 4 , which is a schematic diagram of the relationship between the configuration file, setting parameters, and burning information of one electronic device in a batch of electronic devices shown in Table 1 according to an embodiment of the present application.
[0093] Hardware of the electronic device: Burn the manufacturer's ID of the front camera module into the EEPROM: 0x09; burn the version number of the front camera module into the OTP: 0x00.
[0094] The software portion of the electronic device stores a configuration file 1 .
[0095] Configuration file 1 records the following information about each front-facing camera module used in this model of electronic equipment:
[0096] Bin1, the manufacturer ID (0x06) of the front camera module a and the burning address of the manufacturer ID: 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 of the front camera module a.
[0097] Bin2, the manufacturer ID (0x09) of the front camera module b and the burning address of the manufacturer ID: 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 2 of the front camera module b.
[0098] Bin3, the manufacturer ID (0x09) of the front camera module c and the burning address of the manufacturer ID: device address (0xa2) and storage address (0x0007), the version number (0x10) and the burning address of the version number: device address (0x6c) and storage address (0x0018), and the setting parameter 3 of the front camera module c.
[0099] When the electronic device is turned on, the device address and storage address of the manufacturer's identification are read according to bin1 in configuration file 1; the manufacturer identification 0x09 is read from the EEPROM according to the device address and storage address; the device address and storage address of the version number are read according to bin1 in configuration file 1; the version number 0x00 is read from the OTP according to the device address and storage address; if the manufacturer identification (0x06) in bin1 is inconsistent with the burned manufacturer identification (0x09), it can be determined that the parameters of the front camera module corresponding to bin1 are not the parameters of this electronic device; continue to read the manufacturer identification according to bin2 in configuration file 1 The manufacturer identifier's device address and storage address are read from the EEPROM based on this device address and storage address. The version number's device address and storage address are read from the OTP based on bin2 in configuration file 1. The version number 0x00 is read from the OTP based on this device address and storage address. The manufacturer identifier (0x09) in bin2 is compared with the programmed manufacturer identifier (0x09). If they are consistent, the version number (0x00) in bin2 is compared with the programmed version number (0x00). If both are consistent, the parameters of the front camera module of the current electronic device are determined to be setting parameter 2 in bin2. This parameter 2 is used to provide basic data for the front camera module in this electronic device to implement various functions. Of course, after determining that parameter 2 is the parameter of the front camera module of this electronic device, it is no longer necessary to determine whether parameter 3 is the parameter of the front camera module of this electronic device based on bin3 in configuration file 1.
[0100] From the above description, we can understand that Figure 4In the method shown, the electronic device's memory is burned with the manufacturer's ID and version number of the front camera module of the electronic device itself, and the manufacturer's ID and version number of the front camera modules used by other electronic devices of the same model are not burned. Regardless of the front camera module used by electronic devices of the same model, the same configuration file is set. When setting the configuration file, there is no need to distinguish between different front camera modules.
[0101] In addition, in the specific implementation, whether to compare the manufacturer identifier or the version number first is not limited. This embodiment of the application does not limit whether to first obtain the manufacturer identifier and version number and then compare the two, or to obtain one information (for example, the manufacturer identifier) and compare it with the other information (for example, the manufacturer identifier), and after the current information is consistent, obtain the next information (for example, the version number) and compare it with the next information (for example, the version number).
[0102] In actual applications, the following situation may also exist: the same version of the front camera module of the same manufacturer may also use different components (for example, different motors). However, the setting parameters of the front camera module corresponding to different components may also be different. In this case, it is also necessary to burn the component identification in the memory of the electronic device, and the corresponding configuration file also includes the component identification. When determining the setting parameters, it is also necessary to increase the comparison of the component identification. These burning information can be burned in different storage addresses of a memory, or burned in different memories, or part of the burning information can be burned in different storage addresses of the same memory, and part of the burning information can be burned in different memories. The comparison of the embodiment of the present application is not limited.
[0103] As an example of including a motor identifier, the configuration file needs to include a device address (eg, 0xa2 of an EEPROM) and a storage address (eg, 0x002a) for burning the motor identifier (eg, 0x08).
[0104] Based on the above principle, multiple information can be burned into the memory according to the differences between the front camera modules; the corresponding configuration file also contains multiple information; by comparing each information in the configuration file with each burned information, the setting parameters that match the current front camera module can be determined.
[0105] The embodiment of the present application takes the front camera module as an example. In actual applications, it may also be applied to other modules, such as a rear camera module, a gyroscope and other modules.
[0106] Reference Figure 5 , which is a timing diagram of the camera module parameter setting method provided in an embodiment of the present application.
[0107] In an embodiment of the present application, the manufacturer's identification and version number of the front camera module can be burned into the memory of the electronic device (e.g., EEPROM and OTP in the figure). The manufacturer's identification of the front camera module and the burning address for burning the manufacturer's identification of the front camera module, as well as the version number of the front camera module and the burning address for burning the version number of the front camera module can also be set in the configuration file of the electronic device.
[0108] S101: The camera provider process receives a start instruction.
[0109] In the embodiment of the present application, when the electronic device is turned on, multiple processes are started. When different processes are started, different processes are executed, thereby providing conditions for various functions provided subsequently by the electronic device.
[0110] As an example, when an electronic device is turned on, many processes need to be started, for example, processes to implement the following functions: power supply, self-test power on, loading BIOS settings, selecting a startup device, boot loader, loading the operating system, initializing the operating system, etc.
[0111] The embodiment of the present application can be applied to the parameter setting process of the camera module. This process is located during the startup of the camera provider process, so the embodiment of the present application focuses on the camera module parameter setting process implemented during the startup 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, obtains the manufacturer identifier and the manufacturer identifier burning address of the front camera module, and the version number and the version number burning address of the front camera module.
[0114] As shown in Table 1, three different front camera modules are provided in the same model of electronic device, namely front camera module a, front camera module b, and front camera module c. A corresponding configuration file can be set for each front 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; the configuration file 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 the specific implementation, you can follow Figure 3 As shown, the manufacturer identification and the burning address of the manufacturer identification, the version number and the burning address of the version number of the front camera module of the electronic device are obtained.
[0117] You can also follow Figure 4 As shown, the manufacturer ID and the burning address of the manufacturer ID, the version number and the burning address of the version number of each front camera module are obtained.
[0118] The embodiments of this application are Figure 3 The figure is used as an example to describe the interaction process between different modules in the electronic device.
[0119] S104: The camera provider process generates a detection instruction 1 for the front camera module according to the manufacturer identifier and the manufacturer identifier burning address of the front camera module. Accordingly, the detection instruction 1 carries the manufacturer identifier and the manufacturer identifier burning address of the front camera module.
[0120] S105: The camera provider process generates a detection instruction 2 for the front camera module according to the version number and the version number burning address of the front camera module. Accordingly, the detection instruction 2 carries the version number and the version number burning address of the front camera module.
[0121] In an embodiment of the present application, the camera provider process can generate two detection instructions: detection instruction 2 and detection instruction 1, or it can generate one detection instruction, which carries the manufacturer's identifier and manufacturer's identifier burning address of the front camera module, as well as the version number and version number burning address. This embodiment of the present application does not impose any restrictions on this.
[0122] S106: The camera provider process sends detection instructions 1 and 2 to the kernel.
[0123] S107 , after receiving the detection instruction 1 and the detection instruction 2, the kernel sends the detection instruction 1 and the detection instruction 2 to the camera driver.
[0124] S108 , after receiving the detection instruction 1 and the detection instruction 2 , the camera driver reads the burned version number of the front camera module from the OTP according to the version number burning address carried in the detection instruction 2 .
[0125] As another embodiment of the present application, in the configuration file of the front camera module, the burning address of the version number may include the following contents: device address, storage address, length of the storage address, etc.
[0126] The camera driver can find the memory with the burned version number through the device address 0x6c on the I2C bus, for example, OTP.
[0127] After finding the memory OTP, the camera driver searches for the version number on the EEPROM according to the storage address (eg, 0x0018) and the length of the storage address (eg, 2 bytes).
[0128] Similarly, in the configuration file of the front camera module, when setting the version number of the front camera module (for example, 0x00), the length of the version number (for example, 1 byte) may also be set.
[0129] Of course, all this information in the configuration file can be carried in the detection instruction.
[0130] S109: The camera driver compares the version number in the detection instruction 2 with the burned version number read from the OTP and determines that they are consistent.
[0131] In an embodiment of the present application, even if the same batch of electronic devices has three different front camera modules, if the memory of each electronic device burns the manufacturer's identification and version number of the front camera module used by this electronic device, the manufacturer's identification and version number of other front camera modules will no longer be burned; at the same time, the configuration file of the front camera module used by this electronic device is set, and the configuration files of other front camera modules are no longer set; then after reading the burned version number of the front camera module from the OTP according to the version number burning address carried in the detection instruction 2, the version number of the front camera module of this electronic device can be determined, and S109 can no longer be executed for comparison. Correspondingly, the version number of the front camera module may not be carried in the detection instruction. Of course, the accuracy of the data can be further improved by comparing through S109.
[0132] S110 , after receiving the detection instruction 1 and the detection instruction 2 , the camera driver reads the burned-in manufacturer identifier of the front camera module from the EEPROM according to the manufacturer identifier burned-in address carried in the detection instruction 1 .
[0133] In the embodiment of the present application, the burning version number can be read according to the detection instruction 2 first, and then the burning manufacturer identifier can be read according to the detection instruction 1; or the burning manufacturer identifier can be read according to the detection instruction 1 first, and then the burning version number can be read according to the detection instruction 2. The embodiment of the present application does not limit this.
[0134] As another embodiment of the present application, in the configuration file of the front camera module, the burning address of the manufacturer's logo may also include the following content: device address, storage address, length of the storage address, etc.
[0135] The camera driver can find the memory with the manufacturer's logo burned in, such as EEPROM, through the device address (e.g., 0xa2) on the I2C bus;
[0136] After finding the memory EEPROM, the camera driver searches for the manufacturer ID on the EEPROM according to the storage address (eg, 0x0007) and the length of the storage address (eg, 2 bytes).
[0137] Similarly, in the configuration file of the front camera module, when setting the manufacturer identifier of the front camera module (for example, 0x06), the length of the manufacturer identifier (for example, 1 byte) may also be set.
[0138] Of course, all this information in the configuration file can be carried in the detection instruction.
[0139] S111, the camera driver compares the manufacturer ID in the detection instruction 1 with the burning manufacturer ID read from the EEPROM and determines that they are consistent.
[0140] In the embodiment of the present application, reference may be made to the description in S109 , and S111 may be executed or not executed.
[0141] S112 : After determining the manufacturer identification and version number of the front camera module, set parameters of the front camera module based on the manufacturer identification and version number of the front camera module.
[0142] In an embodiment of the present application, parameters matching the manufacturer identification and version number of the front camera module can be written into the register. When the user subsequently uses the front camera module to implement various functions, the parameters written into the register can be used as basic data to implement the corresponding functions.
[0143] S113, after setting the parameters of the front camera module, the camera driver sends a setting success message to the camera provider process.
[0144] In actual applications, the camera driver can send a setup success message to the camera provider process through the kernel.
[0145] If a camera module is set in the electronic device, the setting of the camera module is completed; as mentioned above, multiple camera modules may be set in the electronic device. For example, in addition to the front camera module, a rear camera module is also set. Then, after S113, it is necessary to continue to set the parameters of the rear camera module. The process of setting the parameters of the rear camera module is similar to the process of setting the parameters of the front camera module; that is, during the startup of the camera provider process, S103 to S113 are continued to be executed, except that the contents of the process are the contents of the rear camera module.
[0146] S114 , reading the configuration file of the rear camera module to obtain the manufacturer identifier and the address where the manufacturer identifier is burned, as well as the version number and the address where the version number is burned.
[0147] The subsequent process of setting the parameters of the rear camera module can refer to the process of setting the parameters of the front camera module, which will not be repeated here.
[0148] In addition, when the rear camera module of the same electronic device includes multiple camera modules (for example, a wide-angle camera, a 20-megapixel camera, and an 8-megapixel camera), the process of setting parameters for each rear camera module needs to be executed repeatedly.
[0149] According to the above embodiment, it can be understood that the manufacturer identification of the front camera module a of the electronic device a is 0x06 and the version number is 0x00. Then the manufacturer identification 0x06 of the front camera module a is burned into the memory of the electronic device a, and the version number 0x00 of the front camera module a is burned. At the same time, the configuration file of the electronic device a can record the manufacturer identification (0x06) of the front camera module a, the byte length of the manufacturer identification (1 byte), the device address (0xa2) for burning the manufacturer identification, the storage address (0x0007) of the manufacturer identification, and the storage address length (2 bytes) of the manufacturer identification. It also records the version number (0x00) of the front camera module a, the byte length (1 byte) of the version number, the device address (0x6c) for burning the version number, the storage address (0x00018) of the version number, and the storage address length (2 bytes) of the version number.
[0150] If the front camera module of the same model of electronic device also includes front camera module b and front camera module c, the manufacturer identifier of front camera module b is: 0x09; version number: 0x00; the manufacturer identifier of front camera module c is: 0x09; version number: 0x10; the relevant information of front camera module b and front camera module c is no longer burned into the memory of electronic device a, and the configuration file of the electronic device does not include the manufacturer identifier, version number and other information of front camera module b, nor does it include the manufacturer identifier, version number and other information of front camera module c.
[0151] As another embodiment of the present application, in actual applications, when setting the configuration file for each electronic device, in order to avoid distinguishing electronic devices with different front camera modules again, the same configuration file can be set in electronic devices of the same model, and the configuration file contains relevant information of each front camera module of the same model.
[0152] and Figure 4 Correspondingly, the manufacturer identification (0x09) and version number (0x00) of front camera module b are burned into the memory of electronic device b. Electronic device b also stores information such as the manufacturer identification, version number, and burning address for each front camera module. Multiple bins can be set based on the types of front camera modules in the same batch of electronic devices, with each bin corresponding to the manufacturer identification, version number, burning address, and setting parameters of a different front camera module.
[0153] Reference Figure 6 As shown, Figure 4Schematic diagram of the corresponding camera module parameter setting process.
[0154] A1, the electronic device generates detection instructions 1 and detection instructions 2 corresponding to 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 the present application as an example, camera modules are set at two positions, namely the front camera module and the rear camera module.
[0156] Taking the front-facing camera module as an example, assume there are three different camera modules: front-facing camera module a, front-facing camera module b, and front-facing camera module c. Accordingly, there are three bins. For each bin in the first position (front-facing camera module) (the configuration information for front-facing camera module a, front-facing camera module b, and front-facing camera module c corresponds to one bin each), a detection instruction 1 and a detection instruction 2 are generated, resulting in the detection instructions shown in Table 1.
[0157] Table 1 Detection instructions 1 and 2 for the jth (j=1, 2, 3) camera module at the 1st (i=1) position
[0158] The camera module in the first position Camera module Detection instruction 1 Detection instruction 2 Bin 1 Front camera module a Detection instruction 1a Detection Instruction 2a Bin 2 Front camera module b Detection instruction 1b Detection instruction 2b Bin 3 Front camera module c Detection instruction 1c Detection instruction 2c
[0159] Taking the rear camera module as an example, assuming there is only one camera module type (same manufacturer, same version number), rear camera module d, and correspondingly, one bin. For each bin (the configuration information of camera module d corresponds to one bin) in the second position (rear camera module), a detection instruction 1 and a detection instruction 2 are generated, respectively. The detection instructions shown in Table 2 are obtained.
[0160] Table 2 Detection instructions 1 and 2 for the jth (j=1) camera module at the 2nd (i=2) position
[0161] The second camera module Camera module Detection instruction 1 Detection instruction 2 Bin 1 Rear camera module d Detection instruction 1a Detection Instruction 2a
[0162] In the embodiment of the present 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 detection instruction 2 of the j-th bin at the i-th position.
[0164] Take the first bin at the first position as an example, which corresponds to the relevant information of the front camera module a. The detection instruction 2 is the detection instruction 2a. According to the burning address in the detection instruction 2a, the process of obtaining the burning version number can refer to Figure 5 The timing diagram shown.
[0165] In actual applications, the maximum value m of i is the number of camera module positions. For example, if the electronic device is equipped with 1 front camera module and 1 rear camera module, the maximum value of i is 2; if the electronic device is equipped with 1 front camera module and 3 rear camera modules, the maximum value of i is 4. The maximum value n of j in the camera module at the i-th position is the number of types of camera modules at the i-th position, which is the number of bins. Camera modules from different manufacturers are not of the same type, and camera modules with different version numbers are not of the same type. Of course, if camera modules from the same manufacturer but different version numbers can share the same set of setting parameters, then a bin can be set for each camera module with the same version number, and the setting parameters in these bins are the same. Alternatively, camera modules with different version numbers can be regarded as the same type of camera modules, and a bin corresponding to this type of camera module is set. This bin carries multiple version numbers, so the maximum value n of j is the number of bins.
[0166] A3, the electronic device determines whether the version number in the detection instruction 2 of the jth bin at the i-th position is consistent with the burned version number.
[0167] In an embodiment of the present application, if camera modules with different version numbers but the same setting parameters are regarded as the same type of camera modules, a bin is set corresponding to this type of camera modules, and this bin carries multiple version numbers; then the version number in the detection instruction 2 of the jth bin at the i-th position and the burned version number are consistent, including: the version number in the detection instruction 2 of the jth bin at the i-th position includes the burned version number.
[0168] As an example, if the version numbers in the configuration file include 0x00, 0x03, 0x04, 0x05, and 0x06, the version numbers in the detection instruction 2 include 0x00, 0x03, 0x04, 0x05, and 0x06, and the burned version number obtained from the memory is 0x00. In this case, it means that the version number in the detection instruction 2 is consistent with the burned version number.
[0169] A4: When the version number in the detection instruction 2 of the jth bin at the i-th position is consistent with the burning version number, the electronic device obtains the burning manufacturer identifier based on the detection instruction 1 of the jth bin at the i-th position.
[0170] A5, the electronic device determines whether the manufacturer identifier in the detection instruction 1 of the j-th bin at the i-th position is consistent with the burning manufacturer identifier.
[0171] Similarly, if the setting parameters of camera modules from different manufacturers are the same, the bins can also be set in the same manner as for camera modules with the same parameters but different version numbers. Similarly, the process for determining whether the manufacturer identifications are consistent also refers to the process for determining whether the version numbers are consistent.
[0172] A6, when the manufacturer identifier in the detection instruction 1 of the jth bin at the i-th position is consistent with the burned manufacturer identifier, the electronic device sets parameters for 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] When i is greater than or equal to m, it indicates that the parameters of the last camera module are currently being set. After the parameters of the last camera module are set, it indicates that the camera module parameter setting is completed.
[0175] When i is less than m, it means that there is a camera module whose parameters have not been set yet (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 actual applications, the manufacturer ID and version number burned into the memory of the electronic device are the actual manufacturer ID and version number of the camera module of the electronic device, and the configuration file set in the electronic device is the configuration file of each type of camera module that may be used in the same batch of electronic devices. Therefore, if the information in the first bin is consistent with the burned information, it means that some camera module parameters defined in the first bin match the camera module of the electronic device, and the parameters in the first bin can be set as the parameters of the current camera module;
[0177] In actual applications, the information in the first bin may be inconsistent with the burned information, 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 burned information.
[0178] That is, if the version number of the detection instruction 2 is inconsistent with the burning version number in A3, and if the manufacturer identification in the detection instruction 1 is inconsistent with the burning manufacturer identification in A5, the following steps are performed:
[0179] A8: The electronic device determines whether j is greater than or equal to n (the number of bins of the camera module at the i-th position).
[0180] When j is greater than or equal to n, it indicates that the current bin is the last bin. If they do not match, there is a problem with the configuration file or burning information of the camera module at the current location, and the parameters of the camera module at the current location are no longer set. Therefore, A7 is executed to determine whether the current location is the last camera module.
[0181] When j is less than n, it means that the current unmatched bin is not the last bin. Therefore, after the value of j is increased by 1, execution continues from A2 to check whether the information in the next bin is consistent with the programmed information.
[0182] In practical applications, the burned-in information is typically immutable. Therefore, the manufacturer identifier and version number burned into the burned-in information represent the actual manufacturer and version of the camera module of the electronic device. This matching method can be used to determine which bin corresponds to the setting parameters that match the camera module of the electronic device, thereby setting the current camera module parameters to the matching setting parameters.
[0183] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean 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] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is run on an electronic device, it can implement the steps in the above-mentioned various method embodiments.
[0185] The embodiments of the present application further provide a computer program product. When the computer program product is run on an electronic device or a wireless router, the electronic device can implement the steps in the above-mentioned various method embodiments.
[0186] If the integrated unit is implemented in the form of 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, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may 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 electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0187] The present application also provides a chip comprising a processor coupled to a memory, wherein the processor invokes a computer program stored in the memory to implement the steps of any method embodiment of the present application. The chip may be a single chip or a chip module composed of multiple chips.
[0188] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0189] Those skilled in the art will appreciate that the units and method steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel 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 the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for setting camera module parameters, characterized in that: Applied to electronic equipment, the method includes: Reading a first configuration file of a first camera module to obtain a first burning address of the first camera module, wherein the first burning address stores burning identification information of the first camera module; Reading first burning identification information of the first camera module from the first burning address of the first camera module, where the first burning identification information includes a first burning manufacturer identifier and a first burning version number; Parameters corresponding to the first burning identification information are set for the first camera module.
2. The method according to claim 1, wherein The first configuration file also includes first identification information of the first camera module, where the first identification information includes a first manufacturer identifier and a first version number; The step of setting parameters corresponding to the first burning identification information for the first camera module includes: comparing the first identification information with the first burning identification information; When the first identification information is consistent with the first burning identification information, obtaining a first parameter corresponding to the first identification information from the first configuration file where the first identification information is located; The first parameter is set for the first camera module.
3. The method according to claim 2, wherein The first camera module has a plurality of configuration files, and the method further includes: Reading a second configuration file of the first camera module to obtain second identification information of the first camera module; After comparing the first identification information with the first burning identification information, the method further includes: When the first identification information and the first burning identification information are inconsistent, comparing the second identification information with the first burning identification information; When the second identification information is consistent with the first burning identification information, a second parameter corresponding to the second identification information is obtained from the second configuration file where the second identification information is located.
4. The method according to claim 3, wherein The burning addresses in the multiple configuration files of the first camera module are the same.
5. The method according to claim 3, wherein After comparing the second identification information with the first burning identification information, the method further includes: When the second identification information is inconsistent with the first burning identification information, continue to compare identification information in other configuration files of the first camera module with the first burning identification information; Until the identification information in each configuration file of the first camera module is inconsistent with the first burned identification information, or until the identification information in a configuration file of the first camera module is consistent with the first burned identification information, parameters corresponding to the identification information consistent with the first burned identification information are set for the first camera module.
6. The method according to any one of claims 1 to 5, characterized in that The electronic device further includes a second camera module. When the identification information in each configuration file of the first camera module is not consistent with the first burned-in identification information, or after setting parameters corresponding to the identification information consistent with the first burned-in identification information for the first camera module, the electronic device further includes: Reading a third configuration file of the second camera module to obtain a second burning address of the second camera module, wherein the second burning address stores burning identification information of the second camera module; Reading second burning identification information of the second camera module from the second burning address of the second camera module, where the second burning identification information includes a second burning manufacturer identifier and a second burning version number; Parameters corresponding to the second burning identification information are set for the second camera module.
7. The method according to any one of claims 3 to 5, characterized in that When the first identification information is consistent with the first burning identification information, obtaining a first parameter corresponding to the first identification information from the first configuration file where the first identification information is located includes: When the first manufacturer identifier in the first identification information is consistent with the first burning manufacturer identifier, and the first version number in the first identification information is consistent with the first burning version number, a first parameter corresponding to the first identification information is obtained from the first configuration file where the first identification information is located.
8. The method according to claim 7, wherein When the first identification information and the first burning identification information are inconsistent, comparing the second identification information with the first burning identification information includes: When the first manufacturer identifier in the first identification information is inconsistent with the first burning manufacturer identifier, and / or the first version number in the first identification information is inconsistent with the first burning version number, the second identification information is compared with the first burning identification information.
9. The method according to claim 8, wherein The first version number in the first identification information is a plurality of 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 consistent if: the first version number in the first identification information includes the first burning version number; The first version number in the first identification information and the first burning version number are inconsistent when: the first version number in the first identification information does not include the first burning version number.
10. The method according to claim 2, wherein The burning identification information further includes: a first burning component identification of the first camera module, and the first identification information further includes: a first component identification of the first camera module.
11. An electronic device, characterized in that: The electronic device comprises 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, and when the one or more processors execute the computer program, the electronic device executes the method according to any one of claims 1 to 10.
12. A chip system, applied to electronic equipment, comprising one or more processors, characterized in that: The processor is configured to call computer instructions so that the electronic device executes the method according to any one of claims 1 to 10.
13. A computer-readable storage medium comprising a computer program, characterized in that When the computer program is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Compatible method and shooting terminal
CN111638915A
Industrial camera adaptation method and device, electronic equipment and storage medium
CN111736870A
Adaptive method and system of configuration file, electronic equipment and storage medium
CN114115979A
Self-adaptive chip manufacturer bit stream burning method, device, equipment and medium
CN116541026A
Chip identification method and electronic equipment
CN116743903A