Multi-module adaptation method and device and storage medium

By configuring identification information and module information for the camera sensor, the driver and hardware abstraction layer compatibility adaptation is solved, and the compatibility problem caused by module manufacturer differences is achieved, and the non-perception difference between multi-module devices is achieved, and compatibility is improved. sex.

CN119226199APending Publication Date: 2024-12-31ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310747870.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-21
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Due to the differences in the automatic white balance and vignetting effects of cameras made by different module manufacturers, the same sensor needs to be recalibrated and image signal processor retuned, resulting in low compatibility between multi-module devices and users can perceive the difference .

Method used

By configuring identification information for camera sensors with the same function, obtaining module information, registering target identification, and performing driver compatibility and hardware abstraction layer compatibility adaptation, controlling the differences in camera display between different terminals within the preset range, including One-time programmable calibration and image signal processor effect parameter adjustment.

Benefits of technology

The compatibility between sensors of multi-module manufacturers has been improved, and users have no sense of the differences between terminals, which has improved the compatibility effect of multi-module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226199A_ABST
    Figure CN119226199A_ABST
Patent Text Reader

Abstract

The invention provides a multi-module adaptation method and device and a storage medium, and the method and device are characterized in that since sensors with the same functions of a multi-module manufacturer are configured with identification information, registration is carried out in a driver according to the identification information and module factories and batch numbers of the sensors; the manufacturer and the batch number of each sensor can be accurately obtained according to the target identifier in the sensor list, so that driving compatibility adaptation and hardware abstraction layer compatibility adaptation can be performed through the module factory and the batch number, the camera display difference between different terminals selecting different sensors is controlled within a preset range, and the user experience is improved. The problem of sensing difference between different terminals applying multi-module manufacturer sensors can be solved, and a good multi-module compatible effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of module adaptation and compatibility technology, and more specifically, to a multi-module adaptation method, device and storage medium. Background Art

[0002] At present, with the continuous development of Internet of Things (IOT) smart devices (such as TVs, computers, mobile phones, PADs, speakers and other terminals), more and more business scenarios require camera support, including face recognition, nursing monitoring, video calls, etc. As an original design manufacturer (ODM), we will provide a variety of supplies for the whole machine parts to meet the requirements of preventing exclusive monopoly and controlling overall costs.

[0003] For smart devices, cameras may also have dual or multiple suppliers (select two or more suppliers to meet the same or similar products or services). Due to differences in manufacturing processes among different module manufacturers, there will be certain differences in automatic white balance (AWB) and vignetting effects. Even for the same sensor, the One Time Programmable (OTP) needs to be recalibrated and the Image Signal Processor (ISP) needs to be readjusted. Therefore, for dual or even multiple supply devices, a compatible interface method for multi-module adaptation is needed so that the differences between different terminals presented to users are imperceptible. Summary of the invention

[0004] The embodiments of the present application provide a multi-module adaptation method, device and storage medium to at least solve the problem in the related art of how to reduce the perception differences between different terminals using sensors of multiple module manufacturers.

[0005] According to an embodiment of the present application, a multi-module adaptation method is provided, including:

[0006] Configure identification information for sensors of cameras with the same function;

[0007] Obtaining module information corresponding to each of the sensors; wherein the module information at least includes the module factory and batch number corresponding to the sensor;

[0008] Registering in the driver according to the identification information and the module information, obtaining a target identification, and adding the target identification to the sensor list; wherein the target identification carries the identification information and the module information;

[0009] Performing driver compatibility adaptation on the sensor according to the sensor list;

[0010] If the driver compatibility adaptation is successful, the sensor is adapted for hardware abstraction layer compatibility, so that the camera display difference between different terminals using different sensors is within a preset range if the hardware abstraction layer compatibility adaptation is successful;

[0011] Optionally, the configuration identification information for sensors with the same function includes:

[0012] Determine sensors with the same functions as the ones to be configured;

[0013] Configuring the sensors respectively with the identification information that indicates the continuity;

[0014] Optionally, performing driver compatibility adaptation on the sensor according to the sensor list includes:

[0015] respectively configuring the target effect parameters after power-on for each of the sensors; wherein the target effect parameters corresponding to the sensors of the same module factory are the same;

[0016] If the actual effect parameter of the sensor after power-on is the same as the target effect parameter configured for the sensor, it is determined that the driver compatibility adaptation is successful;

[0017] If the actual effect parameter of the sensor after power-on is different from the target effect parameter configured for the sensor, it is determined that the driver compatibility adaptation fails;

[0018] Optionally, the hardware abstraction layer compatibility adaptation includes one-time programmable calibration and image signal processor effect parameter adjustment;

[0019] Optionally, the one-time programmable calibration comprises:

[0020] Determine a standard module in the sensor having the same module factory and the same batch number;

[0021] Determining a one-time programmable calibration method according to a calibration function of the standard module;

[0022] In the case where the one-time programmable calibration method is platform-side calibration, the calibration data of the standard module is read from the storage space, and the sensor corresponding to the standard module is calibrated according to the calibration data;

[0023] Optionally, after reading the calibration data of the standard module from the storage space and before calibrating the sensor corresponding to the standard module according to the calibration data, the method further includes:

[0024] Verify the legitimacy of the calibration data;

[0025] If the calibration data is legal, determining whether the verification data meets the preset requirements according to the log information, and if so, continuing to perform the step of calibrating the sensor corresponding to the standard module according to the calibration data;

[0026] If the calibration data is illegal, re-obtaining the verification data;

[0027] Optionally, the image signal processor effect parameter adjustment includes:

[0028] Determining a target module from all the standard modules, and obtaining image signal processor effect parameters of the target module as calibration effect parameters;

[0029] Performing color alignment on the image signal processor effect parameters of other sensors according to the calibration effect parameters, so that the display differences of all the sensors are within the preset range;

[0030] Optionally, the color alignment includes at least one of lens shading correction, automatic white balance correction, color correction matrix correction, color gamut noise reduction correction, and hue and saturation correction.

[0031] According to another embodiment of the present application, a multi-module adaptation device is provided, including:

[0032] A configuration module, used for configuring identification information for sensors of cameras with the same function;

[0033] An acquisition module, used to acquire module information corresponding to each of the sensors; wherein the module information at least includes a module factory and a batch number corresponding to the sensor;

[0034] A driver registration module, used to register in the driver according to the identification information and the module information, obtain a target identification, and add the target identification to a sensor list; wherein the target identification carries the identification information and the module information;

[0035] A driver adaptation module, used for performing driver compatibility adaptation on the sensor according to the sensor list;

[0036] The hardware abstraction layer adaptation module is used to perform hardware abstraction layer compatibility adaptation on the sensor when the driver compatibility adaptation is successful, so that the camera display difference between different terminals of different sensors selected when the hardware abstraction layer compatibility adaptation is successful is within a preset range.

[0037] According to another embodiment of the present application, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0038] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0039] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:

[0040] The method provided in the embodiment of the present application is to configure identification information for sensors of cameras with the same function; obtain module information corresponding to each of the sensors; wherein the module information at least includes the module factory and batch number corresponding to the sensor; register in the driver according to the identification information and the module information, obtain the target identification, and add the target identification to the sensor list; wherein the target identification carries the identification information and the module information; perform driver compatibility adaptation on the sensors according to the sensor list; if the driver compatibility adaptation is successful, perform hardware abstraction layer compatibility adaptation on the sensors, so that when the hardware abstraction layer compatibility adaptation is successful, the camera display difference between different terminals using different sensors is within a preset range.

[0041] Through the present application, since identification information is configured for sensors with the same functions from multiple module manufacturers, and they are registered in the driver according to the identification information and the module factory and batch number of the sensor, the manufacturer and batch number of each sensor can be accurately obtained according to the target identification in the sensor list. Therefore, driver compatibility adaptation and hardware abstraction layer compatibility adaptation can be performed through the module factory and batch number, so that the camera display differences between different terminals using different sensors are controlled within a preset range, which can solve the problem of perception differences between different terminals using sensors from multiple module manufacturers and achieve a good multi-module compatibility effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0043] Figure 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application;

[0044] Figure 2 It is a flowchart of a multi-module adaptation method provided by an embodiment of the present application;

[0045] Figure 3 is a flowchart of a multi-module adaptation method provided by another embodiment of the present application;

[0046] Figure 4 This is a flowchart of a driver compatibility adaptation provided by an embodiment of the present application;

[0047] Figure 5 This is a flowchart of hardware abstraction layer compatibility adaptation provided by an embodiment of the present application;

[0048] Figure 6 It is a schematic diagram of a flow chart of OTP calibration provided by an embodiment of the present application;

[0049] Figure 7 It is a flowchart of an ISP effect parameter adjustment provided by an embodiment of the present application;

[0050] Figure 8 It is a structural diagram of a multi-module adaptation device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0051] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0053] Example 1

[0054] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a multi-module adaptation method according to an embodiment of the present application. Figure 1 As shown, the mobile terminal 10 may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0055] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the multi-module adaptation method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0056] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0057] In this embodiment, a multi-module adaptation method running on the above mobile terminal is provided. Figure 2 is a flowchart of a multi-module adaptation method according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:

[0058] Step S202, configuring identification information for sensors of cameras with the same function;

[0059] Step S204, obtaining module information corresponding to each sensor; wherein the module information at least includes the module factory and batch number corresponding to the sensor;

[0060] Step S206, registering in the driver according to the identification information and the module information, obtaining the target identification, and adding the target identification to the sensor list; wherein the target identification carries the identification information and the module information;

[0061] Step S208, performing driver compatibility adaptation on the sensor according to the sensor list;

[0062] Step S210, when the driver compatibility adaptation is successful, the sensor is adapted for hardware abstraction layer compatibility, so that when the hardware abstraction layer compatibility adaptation is successful, the camera display difference between different terminals using different sensors is within a preset range.

[0063] Through the above steps, since the identification information is configured for sensors with the same functions from multiple module manufacturers, and they are registered in the driver according to the identification information and the module factory and batch number of the sensor, the manufacturer and batch number of each sensor can be accurately obtained according to the target identification in the sensor list. Therefore, the driver compatibility adaptation and hardware abstraction layer compatibility adaptation can be performed through the module factory and batch number, so that the camera display differences between different terminals using different sensors are controlled within a preset range, which can solve the problem of perception differences between different terminals using sensors from multiple module manufacturers and achieve a good multi-module compatibility effect.

[0064] With the development of smart devices, more and more business scenarios require cameras to support interaction, and the resolution of cameras must be higher. Especially when one supply is met, ensuring that two or more supplies can meet the requirements and make users unaware has become an urgent problem to be solved. However, although the sensors of multiple module factories have the same functional parameters, such as 2-megapixel cameras, the actual display effects are quite different. The current compatibility solution is to adapt different sensors through drivers in order to achieve similar capabilities. However, since the sensor models and names between different module factories are not consistent, each time a sensor model and name is changed during adaptation, the driver adaptation and ISP need to be re-adjusted, which has low compatibility efficiency. In addition, if you want to require high camera capability similarity, or if you have good platform consistency and must use the same sensor module from two different module factories, the existing method will cause users to be able to clearly perceive the difference.

[0065] In one embodiment, configuring identification information for sensors with the same function includes: determining sensors with the same function to be configured with identification, and configuring identification information with continuous identification for each of the sensors.

[0066] In this embodiment, in order to facilitate adaptation, identification information can be configured for sensors with the same function. The identification information can be the identification of the sensor, such as the Sensor ID, and can also include the module ID provided by the module factory. The Sensor ID can be continuous, and the module ID can also be continuous. The composition of the Sensor ID can include a series of letters, numbers or special characters to form a unique identifier for data tracing, device management in the driver, and providing overall Android system security. Then register the Sensor IDs of different modules in the driver and add them to the Sensor ID list.

[0067] The moduleID provided by the module manufacturer is used to distinguish the module manufacturer corresponding to the SensorID. The moduleID can include the manufacturer code, product series code, specification code, version code, and production batch, which is used to uniquely identify the camera module code.

[0068] For example, moduleID can be AAA-BBB-CCC-DDD-EEE, where AAA in the front represents the corresponding module manufacturer number, the product series is BBB, CCC represents the module pixel, DDD represents the version code, and EEE represents the batch number. After the smart device is powered on, the SensorID corresponding to the new module is increased by 1 through the manufacturer code of moduleID, and it can be regarded as a new Sensor. For example, the Sensor ID of a camera chip manufacturer is Hi846, and the sensor of this model produced by module factory A can be Hi846, the sensor of this model generated by module factory B can be Hi847, and the sensor of this model generated by module factory C can be Hi848. Hi846, Hi847 and Hi848 can be considered to be produced by the same module manufacturer during driver compatibility adaptation and ISP adaptation, which can significantly shorten the adaptation process and adaptation time and improve the efficiency of compatible adaptation.

[0069] In one embodiment, the driver compatibility adaptation of the sensor is performed according to the sensor list, including:

[0070] Configure the target effect parameters after power-on for each sensor respectively, wherein the target effect parameters corresponding to the sensors of the same module factory are the same. If the actual effect parameters after the sensor is powered on are the same as the target effect parameters configured for the sensor, it is determined that the driver compatibility adaptation is successful; if the actual effect parameters after the sensor is powered on are different from the target effect parameters configured for the sensor, it is determined that the driver compatibility adaptation has failed.

[0071] In this embodiment, the target effect parameters (such as isp effect parameters) corresponding to the Sensor ID of different module manufacturers can be modified. For example, the target effect parameters of module manufacturer A are modified to effect 1, and the target effect parameters of module manufacturer B are modified to effect 2. After the smart device is powered on, the camera function is turned on. If the actual effect parameters of module manufacturer A show effect 1 and the actual effect parameters of module manufacturer B show effect 2, it means that the driver compatibility of module manufacturers A and B are successfully adapted. If the actual effect parameters of module manufacturer A show effect 1 and the actual effect parameters of module manufacturer B also show effect 1, it means that the driver compatibility of module manufacturer A is successfully adapted, and the driver compatibility of module manufacturer B fails.

[0072] In this embodiment, whether the driver compatibility is successfully adapted can be judged based on whether the actual effect parameters after the sensor is powered on are consistent with the pre-configured target effect parameters. Since the effects of different module manufacturers are different, it is possible to intuitively and clearly make a quick and accurate judgment on whether the driver compatibility is successful, thereby improving the efficiency and accuracy of compatible adaptation.

[0073] Hardware abstraction layer compatible adaptation includes one-time programmable (OTP) calibration and image signal processor (ISP) effect parameter adjustment.

[0074] In one embodiment, the one-time programmable calibration includes: determining a standard module in the sensor with the same module factory and batch number, determining the one-time programmable calibration method according to the calibration function of the standard module, and when the one-time programmable calibration method is platform-side calibration, reading the calibration data of the standard module from the storage space, and calibrating the sensor corresponding to the standard module according to the calibration data.

[0075] Standard modules refer to the Golden modules in the same batch of modules of a module factory. Golden modules are a part of the modules selected by the module factory and are the most average modules in all aspects in a large batch of modules. The parameters of other modules before debugging need to be aligned with the Golden modules first, so that all modules can be covered by a set of ISP debugging parameters later.

[0076] OTP calibration methods include platform-side calibration and sensor-side calibration.

[0077] To confirm the calibration method of OTP, you can use the OTP calibration corresponding calibration function in the Hal layer (depending on the chip platform), usually LSC (Lens Shading Correction), AWB (Automatic whitebalance), AF (Automatic Focus), PDAF (Phase Detection Auto Focus) related calibration functions. If the calibration function is NULL, it can be considered as Sensor-side calibration, otherwise it is platform-side calibration.

[0078] If it is platform-side calibration, you can read data from the storage space (external eeprom or sensor internal storage space) according to the OTP burning guide provided by the module manufacturer. The platform will then perform compensation calculations based on the read OTP data and perform calibration operations.

[0079] In one embodiment, after reading the calibration data of the standard module from the storage space and before calibrating the sensor corresponding to the standard module according to the calibration data, the method also includes: verifying the legality of the calibration data; if the calibration data is legal, determining whether the verification data meets the preset requirements based on the log information; if so, continuing to execute the step of calibrating the sensor corresponding to the standard module according to the calibration data; if the calibration data is illegal, reacquiring the verification data.

[0080] In this embodiment, the validity of the calibration data can be verified by performing an MD5 check on the read data and the original factory data provided by the module factory. If it is illegal, the module OTP burning instruction manual needs to be checked and the data is read repeatedly until it is legal.

[0081] In one embodiment, the image signal processor effect parameter adjustment includes: determining a target module from all standard modules, obtaining the image signal processor effect parameters of the target module and using them as calibration effect parameters, and color aligning the image signal processor effect parameters of other sensors according to the calibration effect parameters so that the display differences of all sensors are within a preset range.

[0082] In this embodiment, in a sensor with dual or even multiple compatible supplies, the image signal processor effect parameter adjustment mainly includes adjusting the color-related modules. First, a target module is determined among all Golden modules, and then the other modules are color-aligned with the target module. Specifically, the ISP effect parameters of the target module are obtained as calibration effect parameters, and the ISP effect parameters of other sensors are color-aligned according to the calibration effect parameters.

[0083] Color alignment is aimed at color-related modules, mainly including Lens Shading Correction (LSC), Automatic White Balance (AWB), Color Correction Matrix (CCM), Noise Reduction Chroma (NR Chroma) and Hue & Saturation, etc., which can be corrections of one or more modules. Of course, it can also include fine-tuning the Chroma Processing module without restriction. Among them, the AF (Automatic Foucus) and AE (Automatic Exposure) modules do not need to be adjusted again. Before the adjustment, the newly added compatible and adapted Sensor and the screen of the first supply (or the screen of the target module) have obvious color inconsistencies. After the adjustment, they can be aligned with the color of the first supply screen. After the smart device is powered on, compare and check the screen of the first supply Camera to confirm whether the compatible adaptation is successful.

[0084] For ease of understanding, a specific embodiment is further described below.

[0085] In a specific embodiment, the sensor modules with the same functions but different batches from different module factories are compatible, such as Figure 3 The figure is a flowchart of a multi-module adaptation method, which goes through the Camera driver process, Camera Hal process, Camera Frameworks process and Camera App process.

[0086] The sensor end is generally fixed. For example, the sensor ID is Ss001. Ss001 can be a module produced by multiple module factories, corresponding to module factory A, module factory B, or even module factory N. Each module factory also has different batches, including batch 1, batch 2, and even batch N.

[0087] In the Camera driver process, modules from different batches of modules from different module factories need to be distinguished by SensorID and registered in the SensorID list. Ss001 corresponds to the first batch of module factory A, Ss002 corresponds to the second batch of module factory A, Ss011 corresponds to the first batch of module factory B, Ss012 corresponds to the second batch of module factory B, and the rest of the SensorIDs are similar.

[0088] In the Camera Hal process, OTP calibration and isp effect parameter adjustment will be performed on each SensorID in the SensorID list.

[0089] The Camera Frameworks process generally does not require special processing and remains unchanged from the existing framework layer process.

[0090] In the Camera App process, the above-mentioned Camera driver process, Camera Hal process and CameraFrameworks process are met. When the final user opens the App, no matter there is one supply, two supplies or multiple supplies, the user will not be aware of the picture presented by the Camera.

[0091] Next, some of the above processes will be explained in detail.

[0092] In the Camera driver process, the camera driver is compatible and adapted, such as Figure 4 During the driver compatibility adaptation process, continuous Sensor IDs are defined according to two or more suppliers to distinguish different modules, and sensors from different module manufacturers are treated as two or more sensors from the same manufacturer, including:

[0093] Step 402, define continuous Sensor IDs. For example, the Sensor ID of a camera chip manufacturer is Hi846. Sensors of different modules are all Hi846. Define the Sensor ID of a first-supply device as Hi846, and the Sensor ID of a second-supply device as Hi847, or even multiple-supply device Sensor IDs as Hixxx.

[0094] Step 404, register the corresponding Sensor IDs of different modules. Register the Sensor IDs of different modules in the driver and add them to the Sensor ID list. Considering that the global compilation script corresponding to the first Sensor ID has been registered, the second Sensor ID Hi847 also needs to be registered accordingly, and even the Sensor ID Hixxx of multiple devices also needs to be registered accordingly.

[0095] Step 406, distinguish the corresponding module manufacturer according to the module ID. The module ID provided by the module factory is used to distinguish the module manufacturer corresponding to the Sensor ID. For example, the two manufacturers A and manufacturer B corresponding to a certain Sensor ID have the corresponding module ID simplified as 0x01 and 0x02, corresponding to the two module manufacturers respectively. After the smart device is powered on, the Sensor ID corresponding to the new module is increased by 1 through the manufacturer code of the module ID, and it can be regarded as a new Sensor. Copy the corresponding number of driver directories according to the number of modules. The driver directory includes table and MIPI files, which are used to store and organize camera drivers and related files so that the operating system can correctly identify and use the camera hardware. Change the table and MIPI files in the corresponding copied driver directory to the function and variable names corresponding to the new Sensor ID. For example, copy the original driver directory hi846_mipi_raw, rename the driver directory to hi847_mipi_raw, and change the HI846 corresponding function and variable names in the directory file to HI847 corresponding.

[0096] Step 408, verify driver compatibility and adaptation. Manually modify the isp effect parameters corresponding to the Sensor ID of different module manufacturers, and modify the effects of manufacturer A and manufacturer B to effect 1 and effect 2 respectively. After the smart device is powered on, turn on the camera function. If the corresponding module manufacturer A shows effect 1 and the module manufacturer 2 shows effect 2, then the driver compatibility and adaptation are successful.

[0097] Figure 5 Compatible with Camera HAL (Hardware Abstraction Layer), mainly corresponding to OTP calibration and isp effect parameter adjustment, including:

[0098] Step 502, OTP calibration. The OTP calibration process may vary according to different platforms. The Golden module in this batch is selected first, so that the performance index differences between modules can be scientifically eliminated after the OTP calibration is completed. After selecting the Golden module, confirm the OTP calibration method.

[0099] Step 504, ISP effect parameter allocation, is also strongly related to the platform. By adjusting the ISP process effect parameters, the subjective and objective indicators required by the customer are finally met.

[0100] OTP calibration needs to be performed on the selected Golden module, verify the legitimacy of the data and read out the data and apply it to the corresponding modules of LSC, AWB, AF, and PDAF respectively.

[0101] Figure 6 A schematic diagram of an OTP calibration process provided in an embodiment of the present application includes:

[0102] Step 602, select Golden module process. Select a batch of Golden modules from a module factory as the modules for subsequent OTP calibration of this batch. The module factory will mark the Golden modules corresponding to AWB and LSC for each batch of modules, for example, select a Golden module of LSC.

[0103] Step 604, confirm the OTP calibration method and calibrate. Through the OTP calibration corresponding calibration function in the Hal layer (depending on different chip platforms), usually lens shading correction LSC (Lens Shading Correction), AWB (Automatic white balance), AF (Automatic Focus), PDAF (Phase Detection AutoFocus) related calibration functions. If the calibration function is NULL, it can be considered as the OTP calibration on the sensor side, otherwise it is the OTP calibration on the platform side. According to the OTP burning guide provided by the module factory, the corresponding LSC, AWB, AF, and PDAF data reading addresses need to be modified for dual or multiple supplies, and data is read out from the storage space (external eeprom or sensor internal storage space) accordingly. For example, R, B, GR, GB data are read out in the order of arrangement in the corresponding address of AWB, and the LSC table data is read out in the LSC address. The platform side will subsequently perform compensation calculations based on the read OTP data and perform calibration operations.

[0104] Step 606, verify the legality of the OTP data. Perform MD5 verification by reading the complete OTP data and the original factory data provided by the module factory. If it is illegal, verify the module OTP burning guide, and read the data repeatedly until it is legal.

[0105] Step 608, check and confirm the burned data. Confirm the LSC, AWB, AF, and PDAF data respectively, and judge the rationality of the data through the log information. If the data is abnormal, error or fatal related data will appear. Repeat the data reading to check if it meets the requirements and send the data to the platform for correction. If it is the sensor end calibration, no correction is required here.

[0106] Adjusting the ISP effect parameters mainly includes adjusting the color-related modules. Figure 7 A schematic diagram of a flow chart of ISP effect parameter adjustment provided in an embodiment of the present application.

[0107] Among them, DPC is the bad pixel correction process, and BLC is the black level correction process. Usually the sensor manufacturer will do the processing, so no adjustment is required here.

[0108] LSC is the lens shading correction process, including brightness uniformity and color uniformity. Before correction, there may be brightness and color shadows around the periphery. After correction, the brightness and uniformity of the center and periphery of the picture are basically the same.

[0109] AF is the automatic focus process, AE is the automatic brightness process, and the two or more supplies can maintain the same parameters as the one supply.

[0110] AWB is an automatic white balance process, which is mainly used to adjust the ISP algorithm under different color temperature (D65, A, TL84, CWF light source) environments to offset the color cast caused by color temperature.

[0111] DM is the process of converting from the bayer domain to the RGB domain, which is used for RGB interpolation. GMA is the gamma curve correction process. No adjustment is required for dual or multiple supplies.

[0112] CCM is a color correction matrix process that adjusts the 24 colors of the camera image to be close to the color checker 24 color palette standard.

[0113] NR Chroma is the color gamut noise reduction process, and Hue&Saturation is the color gamut hue and saturation optimization process. The two are the calibration process Chroma Processing process. NR Chroma is the fine-tuning for removing color noise, and Hue&Saturation is mainly the fine-tuning related to hue and saturation.

[0114] NR Luma is the bright area noise reduction process, EE is the outline detail optimization process, Contrast&Brightness is the bright area contrast and brightness optimization process. These three are collectively called the Luma Processing process, which is mainly used for subjective fine-tuning of the ISP. If there is no special requirement, you can choose to keep consistent with the effect parameters of an ISP.

[0115] DMA Writer is DMA storage, and Output Formatter is the output format of the camera. During the adjustment process, the LSC, AWB, CCM modules, Chroma Processing and other modules are mainly adjusted, the ISP is verified subjectively and objectively, and the parameters are adjusted multiple times to meet the user's perception.

[0116] In this embodiment, since continuous Sensor IDs are configured for sensors with the same functions from multiple module manufacturers, they are registered in the driver according to the Sensor ID and the module ID of the sensor and added to the SensorID list. The module manufacturer and batch number of each sensor can be accurately obtained according to the target identifier in the SensorID list. Therefore, driver compatibility adaptation and hardware abstraction layer compatibility adaptation can be performed through the module manufacturer and batch number, so that the camera display differences between different terminals using different sensors are controlled within a preset range, which can solve the problem of perception differences between different terminals using sensors from multiple module manufacturers and achieve a good multi-module compatibility effect.

[0117] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0118] Example 2

[0119] In this embodiment, a multi-module adaptation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0120] Figure 8 is a structural block diagram of a multi-module adaptation device according to an embodiment of the present application, such as Figure 8 As shown, the device comprises:

[0121] A configuration module 802, configured to configure identification information for sensors of cameras with the same function;

[0122] The acquisition module 804 is used to acquire the module information corresponding to each of the sensors; wherein the module information at least includes the module factory and batch number corresponding to the sensor;

[0123] A driver registration module 806 is used to register in the driver according to the identification information and the module information, obtain a target identification, and add the target identification to the sensor list; wherein the target identification carries the identification information and the module information;

[0124] A driver adaptation module 808, configured to perform driver compatibility adaptation on the sensor according to the sensor list;

[0125] The hardware abstraction layer adaptation module 810 is used to perform hardware abstraction layer compatibility adaptation on the sensor when the driver compatibility adaptation is successful, so that the camera display difference between different terminals using different sensors is within a preset range when the hardware abstraction layer compatibility adaptation is successful.

[0126] The device is configured with identification information for sensors with the same functions from multiple module manufacturers, and is registered in the driver according to the identification information and the module manufacturer and batch number of the sensor. The manufacturer and batch number of each sensor can be accurately obtained according to the target identification in the sensor list. Therefore, driver compatibility adaptation and hardware abstraction layer compatibility adaptation can be performed through the module manufacturer and batch number, so that the camera display differences between different terminals using different sensors are controlled within a preset range, which can solve the problem of perception differences between different terminals using sensors from multiple module manufacturers and achieve a good multi-module compatibility effect.

[0127] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0128] Example 3

[0129] An embodiment of the present application further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0130] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0131] Configure identification information for sensors of cameras with the same function;

[0132] Obtaining module information corresponding to each of the sensors; wherein the module information at least includes the module factory and batch number corresponding to the sensor;

[0133] Registering in the driver according to the identification information and the module information, obtaining a target identification, and adding the target identification to the sensor list; wherein the target identification carries the identification information and the module information;

[0134] Performing driver compatibility adaptation on the sensor according to the sensor list;

[0135] When the driver compatibility adaptation is successful, the sensor is adapted for hardware abstraction layer compatibility, so that when the hardware abstraction layer compatibility adaptation is successful, the camera display differences between different terminals using different sensors are within a preset range.

[0136] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0137] Example 4

[0138] The embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments. Figure 1 The memory 104 in is taken as an example of a memory in the electronic device.

[0139] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0140] Optionally, in this embodiment, the processor may be configured to execute the steps of the multi-module adaptation method in the method embodiment through a computer program.

[0141] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0142] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0143] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A multi-module adaptation method, characterized in that: include: Configure identification information for sensors of cameras with the same function; Obtaining module information corresponding to each of the sensors; wherein the module information at least includes the module factory and batch number corresponding to the sensor; Registering in the driver according to the identification information and the module information, obtaining a target identification, and adding the target identification to the sensor list; wherein the target identification carries the identification information and the module information; Performing driver compatibility adaptation on the sensor according to the sensor list; When the driver compatibility adaptation is successful, the sensor is adapted for hardware abstraction layer compatibility, so that when the hardware abstraction layer compatibility adaptation is successful, the camera display differences between different terminals using different sensors are within a preset range.

2. The method according to claim 1, characterized in that The configuration identification information for sensors with the same functions includes: Determine sensors with the same functions as the ones to be configured; The identification information that identifies the continuity is configured for each of the sensors.

3. The method according to claim 1, characterized in that: The step of performing driver compatibility adaptation on the sensor according to the sensor list includes: respectively configuring the target effect parameters after power-on for each of the sensors; wherein the target effect parameters corresponding to the sensors of the same module factory are the same; If the actual effect parameter of the sensor after power-on is the same as the target effect parameter configured for the sensor, it is determined that the driver compatibility adaptation is successful; If the actual effect parameter of the sensor after power-on is different from the target effect parameter configured for the sensor, it is determined that the driver compatibility adaptation fails.

4. The method according to claim 1, characterized in that: The hardware abstraction layer compatible adaptation includes one-time programmable calibration and image signal processor effect parameter adjustment.

5. The method according to claim 4, characterized in that The one-time programmable calibration includes: Determine a standard module in the sensor having the same module factory and the same batch number; Determining a one-time programmable calibration method according to a calibration function of the standard module; In the case where the one-time programmable calibration method is platform-side calibration, the calibration data of the standard module is read from the storage space, and the sensor corresponding to the standard module is calibrated according to the calibration data.

6. The method according to claim 5, characterized in that After reading the calibration data of the standard module from the storage space and before calibrating the sensor corresponding to the standard module according to the calibration data, the method further includes: Verify the legitimacy of the calibration data; If the calibration data is legal, determining whether the verification data meets the preset requirements according to the log information, and if so, continuing to perform the step of calibrating the sensor corresponding to the standard module according to the calibration data; If the calibration data is illegal, the verification data is re-acquired.

7. The method according to claim 5, characterized in that The image signal processor effect parameter adjustment includes: Determining a target module from all the standard modules, and obtaining image signal processor effect parameters of the target module as calibration effect parameters; Color alignment is performed on the image signal processor effect parameters of other sensors according to the calibration effect parameters, so that the display differences of all the sensors are within the preset range.

8. The method according to claim 7, characterized in that The color alignment includes at least one of lens shading correction, automatic white balance correction, color correction matrix correction, color gamut noise reduction correction, hue and saturation correction.

9. A multi-module adapter device, characterized in that: include: A configuration module, used for configuring identification information for sensors of cameras with the same function; An acquisition module, used to acquire module information corresponding to each of the sensors; wherein the module information at least includes a module factory and a batch number corresponding to the sensor; A driver registration module, used to register in the driver according to the identification information and the module information, obtain a target identification, and add the target identification to a sensor list; wherein the target identification carries the identification information and the module information; A driver adaptation module, used for performing driver compatibility adaptation on the sensor according to the sensor list; The hardware abstraction layer adaptation module is used to perform hardware abstraction layer compatibility adaptation on the sensor when the driver compatibility adaptation is successful, so that the camera display difference between different terminals of different sensors selected when the hardware abstraction layer compatibility adaptation is successful is within a preset range.

10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 8 when executed.

11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 8.