Camera module data burning method and white balance burning data using method

By obtaining the spectral sensitivity function of the camera module as the white balance burning data, and using the target conversion method to realize data conversion between different camera modules, the problem of singleness of the white balance burning data under a specific light source is solved, and the adaptability and consistency of the data are improved.

CN120378760APending Publication Date: 2025-07-25BEIJING X RING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411482716.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, white balance burned data can only characterize the characteristics of the camera module under certain specific light sources, and is relatively single and cannot adapt to multi-light source environments.

Method used

The spectral sensitivity function of the candidate camera module is obtained as the white balance recording data, and the white balance data between different camera modules is converted through the target conversion method, so as to improve the adaptability of the data by using the comprehensiveness of the spectral sensitivity function.

Benefits of technology

It improves the comprehensiveness of white balance burning data, so that it can characterize the characteristics of the camera module under all light sources, enhances the comprehensiveness and debugging efficiency of camera module data burning, and ensures the consistency of multiple camera modules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378760A_ABST
    Figure CN120378760A_ABST
Patent Text Reader

Abstract

The invention relates to a burning method of camera module data and a using method of white balance burning data, and belongs to the technical field of cameras. The method comprises the following steps: acquiring a spectral sensitivity function of a candidate camera module as white balance burning data of the candidate camera module; and burning the spectral sensitivity function of the candidate camera module. Therefore, compared with the prior art that the white balance burning data is obtained mostly according to the response parameters of the camera module under certain specific light sources, namely the white balance burning data can only represent the characteristics of the camera module under certain specific light sources, the spectral sensitivity function of the camera module can be used as the white balance burning data in the scheme; the white balance burning data can represent the spectral sensitivity characteristics of the camera module, the spectral sensitivity characteristics are not affected by the light source, the comprehensiveness of the white balance burning data can be improved, and then the comprehensiveness of data burning of the camera module is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of cameras, and in particular, to a method for burning camera module data, a method for using white balance burning data, a device, an electronic device, and a storage medium. Background Art

[0002] Currently, in order to ensure the normal use of a camera, some data of the camera are mostly burned. For example, in order to ensure the normal use of the AWB (Auto White Balance) function of the camera, the white balance burning data of the camera are burned. However, in the related art, the white balance burning data can only characterize the characteristics of the camera module under certain specific light sources, and the white balance burning data are relatively single. Summary of the Invention

[0003] The present disclosure provides a method for burning camera module data, a method for using white balance burning data, a device, an electronic device, a computer-readable storage medium, and a computer program product to at least solve the problem that the white balance burning data in the related art can only characterize the characteristics of the camera module under certain specific light sources, and the white balance burning data are relatively single. The technical solutions of the present disclosure are as follows:

[0004] According to a first aspect of an embodiment of the present disclosure, a method for burning camera module data is provided, including: obtaining a spectral sensitivity function of a candidate camera module as white balance burning data of the candidate camera module; burning the spectral sensitivity function of the candidate camera module.

[0005] According to a second aspect of an embodiment of the present disclosure, a method for using white balance burning data is provided, including: obtaining a spectral sensitivity function of a candidate camera module from a storage space of the candidate camera module; determining a target conversion method between a first camera module and a second camera module based on the spectral sensitivity functions of the first camera module and the second camera module; converting white balance data of the first camera module according to the target conversion method to obtain white balance data of the second camera module.

[0006] According to a third aspect of an embodiment of the present disclosure, a device for burning camera module data is provided, including: an obtaining module configured to execute obtaining a spectral sensitivity function of a candidate camera module as white balance burning data of the candidate camera module; a burning module configured to execute burning the spectral sensitivity function of the candidate camera module.

[0007] According to a fourth aspect of the embodiments of the present disclosure, there is provided a device for using white balance programming data, including: an acquisition module configured to acquire the spectral sensitivity function of the candidate camera module from the storage space of the candidate camera module; a determination module configured to determine a target conversion method between the first camera module and the second camera module based on the spectral sensitivity functions of the first camera module and the second camera module; and a conversion module configured to convert the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module.

[0008] According to a fifth aspect of the embodiments of the present disclosure, there is provided an electronic device, including a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to implement the steps of the methods described in the first aspect and the second aspect of the embodiments of the present disclosure.

[0009] According to a sixth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, and when the program instructions are executed by a processor, the steps of the methods described in the first aspect and the second aspect of the embodiments of the present disclosure are implemented.

[0010] According to a seventh aspect of the embodiments of the present disclosure, there is provided a computer program product, including a computer program, characterized in that when the computer program is executed by a processor of an electronic device, the steps of the methods described in the first aspect and the second aspect of the embodiments of the present disclosure are implemented.

[0011] According to an eighth aspect of the embodiments of the present disclosure, there is provided a chip, including an interface circuit and a processor coupled to each other, the interface circuit being used for inputting and outputting signals so that the processor implements the method described in the first aspect according to the input or output signals.

[0012] In the embodiments of the present disclosure, the chip may include an image processing chip.

[0013] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects: The spectral sensitivity function of the candidate camera module is acquired as the white balance programming data of the candidate camera module, and the spectral sensitivity function of the candidate camera module is programmed. Thus, compared with the related art in which the white balance programming data is mostly obtained based on the response parameters of the camera module under certain specific light sources, that is, the white balance programming data can only characterize the characteristics of the camera module under certain specific light sources, in this solution, the spectral sensitivity function of the camera module can be used as the white balance programming data, and the white balance programming data can characterize the spectral sensitivity characteristics of the camera module. The spectral sensitivity characteristics are not affected by the light source, that is, the white balance programming data can characterize the characteristics of the camera module under all light sources, which helps to improve the comprehensiveness of the white balance programming data, and further improves the comprehensiveness of the data programming of the camera module.

[0014] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit the present disclosure. Description of the Drawings

[0015] The drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure, and do not constitute an undue limitation on the present disclosure.

[0016] Figure 1 is a flowchart of a method for burning camera module data shown according to an exemplary embodiment.

[0017] Figure 2 is a flowchart of a method for using white balance burning data shown according to an exemplary embodiment.

[0018] Figure 3 is a flowchart of a method for using white balance burning data shown according to another exemplary embodiment.

[0019] Figure 4 is a flowchart of a method for using white balance burning data shown according to another exemplary embodiment.

[0020] Figure 5 is a block diagram of a device for burning camera module data shown according to an exemplary embodiment.

[0021] Figure 6 is a block diagram of a device for using white balance burning data shown according to an exemplary embodiment.

[0022] Figure 7 is a block diagram of an electronic device shown according to an exemplary embodiment. Detailed Embodiments

[0023] In order to enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that such used data may be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0025] In the technical solution of the present disclosure, the acquisition, storage, use, processing, etc. of data all comply with the provisions of relevant laws and regulations.

[0026] Figure 1 It is a flowchart of a method for burning camera module data shown according to an exemplary embodiment. As Figure 1 shown, the method for burning camera module data in the embodiment of the present disclosure includes the following steps.

[0027] S101, obtain the spectral sensitivity function of the candidate camera module as the white balance burning data of the candidate camera module.

[0028] It should be noted that the execution subject of the method for burning camera module data in the embodiment of the present disclosure is an electronic device. Among them, the electronic device includes a chip, a mobile phone, a notebook, a desktop computer, a vehicle-mounted terminal, a smart home appliance, a wearable device, etc. Among them, the wearable device may include a wrist-worn device (such as a smart watch, a smart bracelet), a head-mounted device, a foot-worn device, etc. The method for burning camera module data in the embodiment of the present disclosure can be executed by the device for burning camera module data in the embodiment of the present disclosure. The device for burning camera module data in the embodiment of the present disclosure can be configured in any electronic device to execute the method for burning camera module data in the embodiment of the present disclosure.

[0029] It should be noted that to obtain the SSF (Spectral Sensitivity Function) of the candidate camera module, any method for obtaining the spectral sensitivity function in the related art can be used, for example, it may include a direct measurement method, an indirect measurement method, etc., which will not be limited here. For example, the spectral range of the spectral sensitivity function is 380 nm (nanometers) to 780 nm, and the spectral interval is 5 nm, so as to retain the accuracy while not occupying too much storage space.

[0030] It can be understood that the spectral sensitivity functions of different candidate camera modules may be different.

[0031] In one implementation, the spectral sensitivity function of the candidate camera module includes the spectral sensitivity functions of the candidate camera module in multiple color channels.

[0032] For example, taking an RGB image as an example, the multiple color channels include a Red channel, a Green channel, and a Blue channel.

[0033] For example, the spectral sensitivity function of the candidate camera module includes S r (λ), S gr (λ), S gb (λ), S bS(λ), where S r S(λ) is the spectral sensitivity function of the candidate camera module in the red channel, and S gr S(λ) is the spectral sensitivity function of the candidate camera module in the first green channel, and S gb S(λ) is the spectral sensitivity function of the candidate camera module in the second green channel, and S b S(λ) is the spectral sensitivity function of the candidate camera module in the blue channel.

[0034] S102. Burn the spectral sensitivity function of the candidate camera module.

[0035] It should be noted that burning the spectral sensitivity function of the candidate camera module can be implemented by using any method for burning camera module data in related technologies. For example, it may include OTP (One Time Programmable), and no excessive limitation is made here.

[0036] In one implementation, burning the spectral sensitivity function of the candidate camera module includes storing the spectral sensitivity function of the candidate camera module in the storage space of the candidate camera module. Among them, the storage space of the candidate camera module includes the storage space inside the chip of the candidate camera module (such as an OTP memory), an externally attached EEPROM (Electrically Erasable Programmable read only memory), etc., and no excessive limitation is made here.

[0037] The method for burning camera module data provided by the embodiments of the present disclosure obtains the spectral sensitivity function of the candidate camera module as the white balance burning data of the candidate camera module, and burns the spectral sensitivity function of the candidate camera module. Thus, compared with most of the related technologies that obtain white balance burning data based on the response parameters of the camera module under certain specific light sources, that is, the white balance burning data can only characterize the characteristics of the camera module under certain specific light sources, in this solution, the spectral sensitivity function of the camera module can be used as the white balance burning data, and the white balance burning data can characterize the spectral sensitivity characteristics of the camera module. The spectral sensitivity characteristics are not affected by the light source, that is, the white balance burning data can characterize the characteristics of the camera module under all light sources, which helps to improve the comprehensiveness of the white balance burning data, and further improves the comprehensiveness of the camera module data burning.

[0038] Figure 2 is a flowchart of a method for using white balance burning data shown according to an exemplary embodiment. As Figure 2 shown, the method for using white balance burning data in the embodiments of the present disclosure includes the following steps.

[0039] S201. Obtain the spectral sensitivity function of the candidate camera module from the storage space of the candidate camera module.

[0040] It should be noted that the execution subject of the method for using the white balance programming data in the embodiments of the present disclosure is an electronic device, where the electronic device includes a chip, a mobile phone, a notebook, a desktop computer, a vehicle-mounted terminal, smart home appliances, wearable devices, etc. Among them, wearable devices may include wrist-worn devices (such as smart watches, smart bracelets), head-mounted devices, foot-worn devices, etc. The method for using the white balance programming data in the embodiments of the present disclosure can be executed by the device for using the white balance programming data in the embodiments of the present disclosure, and the device for using the white balance programming data in the embodiments of the present disclosure can be configured in any electronic device to execute the method for using the white balance programming data in the embodiments of the present disclosure.

[0041] For the relevant content of step S201, reference can be made to the above embodiments and will not be elaborated here.

[0042] It should be noted that the candidate camera module may include a first camera module and a second camera module. The first camera module and the second camera module are different candidate camera modules, and the categories, models, batches, etc. of the first camera module and the second camera module may be the same or different, and no excessive limitations are made here.

[0043] In one implementation, obtaining the spectral sensitivity function of the candidate camera module from the storage space of the candidate camera module includes obtaining the spectral sensitivity function of the first camera module from the storage space of the first camera module and obtaining the spectral sensitivity function of the second camera module from the storage space of the second camera module.

[0044] It should be noted that no excessive limitations are made on the storage space of the candidate camera module. For example, the storage space of the candidate camera module may include the storage space inside the chip of the candidate camera module (such as an OTP memory), an externally connected EEPROM, etc.

[0045] S202. Based on the spectral sensitivity function of the first camera module and the spectral sensitivity function of the second camera module, determine the target conversion method between the first camera module and the second camera module.

[0046] It should be noted that the target conversion method may include the conversion method of converting the white balance data of the first camera module to the white balance data of the second camera module, and / or the conversion method of converting the white balance data of the second camera module to the white balance data of the first camera module. No excessive limitations are made on the target conversion method. For example, it may include a target conversion matrix, a target conversion function, etc., where the target conversion function may include a linear function, a polynomial function, an exponential function, a power function, etc.

[0047] S203. Convert the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module.

[0048] It should be noted that the white balance data of the candidate camera module can adopt any white balance data in the related technology, and no excessive limitation is made here. The white balance data of the candidate camera module may be different under different light sources, and the white balance data of different candidate camera modules may be different under the same light source.

[0049] In one implementation, the white balance data of the candidate camera module under the target light source includes the third ratio between the pixel values of the first color channel and the second color channel of the candidate camera module under the target light source, and the fourth ratio between the pixel values of the third color channel and the second color channel of the candidate camera module under the target light source.

[0050] It should be noted that the pixel values of the color channels of the candidate camera module under the target light source refer to the pixel values of the color channels of the image captured by the candidate camera module under the target light source. The target light source can be any one of the K set light sources, or the remaining light sources other than the K set light sources. The set light source can adopt any light source in the related technology. For example, it can include natural light sources (such as the sun, the moon), lighting fixtures (such as incandescent lamps, fluorescent lamps), optoelectronic devices (such as photodiodes, optical fibers), etc., and no excessive limitation is made here. The multiple color channels include the first to third color channels, and the first to third color channels are different color channels.

[0051] For example, taking the multiple color channels including the red channel, the green channel, and the blue channel as an example, the first color channel is the red channel, the second color channel is the green channel, and the third color channel is the blue channel. Obtain the third ratio r o , the fourth ratio b o can be achieved through the following formula:

[0052] r o = R o / G o

[0053] b o = B o / G o

[0054] where, R o is the pixel value of the red channel of the candidate camera module under the target light source, G o is the pixel value of the green channel of the candidate camera module under the target light source, B o is the pixel value of the blue channel of the candidate camera module under the target light source.

[0055] In some examples, the method further includes obtaining pixel values of multiple color channels of the candidate camera module under the target light source based on an image captured by the candidate camera module under the target light source.

[0056] In one implementation, converting the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module includes, if the target conversion method is a first conversion function for converting the white balance data of the first camera module to the white balance data of the second camera module, substituting the white balance data of the first camera module as the independent variable into the first conversion function to obtain the dependent variable of the first conversion function as the white balance data of the second camera module.

[0057] In one implementation, converting the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module includes, if the target conversion method is a second conversion function for converting the white balance data of the second camera module to the white balance data of the first camera module, substituting the white balance data of the first camera module as the independent variable into the inverse function of the second conversion function to obtain the dependent variable of the inverse function of the second conversion function as the white balance data of the second camera module.

[0058] The method for using white balance programming data provided by the embodiments of the present disclosure obtains the spectral sensitivity function of the candidate camera module from the storage space of the candidate camera module, determines the target conversion method between the first camera module and the second camera module based on the spectral sensitivity functions of the first camera module and the second camera module, and converts the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module. Thus, the target conversion method between the two camera modules can be determined by comprehensively considering the spectral sensitivity functions of the two camera modules respectively. The spectral sensitivity characteristics are not affected by the light source, improving the accuracy of the target conversion method, and further improving the accuracy of the white balance data. Moreover, the white balance data of one of the camera modules can be converted based on the target conversion method to obtain the white balance data of the other camera module, that is, in this solution, only the white balance data of one camera module needs to be calibrated and converted to obtain the white balance data of the remaining camera modules, improving the debugging efficiency of the white balance data and helping to ensure the consistency of multiple camera modules.

[0059] Figure 3 is a flowchart of a method for using white balance programming data shown according to another exemplary embodiment. As Figure 3 shown, the method for using white balance programming data of the embodiments of the present disclosure includes the following steps.

[0060] S301, obtain the spectral sensitivity function of the candidate camera module from the storage space of the candidate camera module.

[0061] For the relevant content of step S301, reference can be made to the above embodiments and will not be elaborated here.

[0062] S302. Based on the spectral sensitivity function of the first camera module, obtain the pixel value groups of the first camera module under K set light sources. Among them, the pixel value group of the first camera module under the i-th set light source includes the pixel values of multiple color channels of the first camera module under the i-th set light source, where i is a positive integer not greater than K.

[0063] S303. Based on the spectral sensitivity function of the second camera module, obtain the pixel value groups of the second camera module under K set light sources. Among them, the pixel value group of the second camera module under the i-th set light source includes the pixel values of multiple color channels of the second camera module under the i-th set light source.

[0064] It should be noted that the pixel values of the color channels of the candidate camera module under the i-th set light source refer to the pixel values of the color channels of the image captured by the candidate camera module under the i-th set light source. The pixel values of different color channels of the candidate camera module under the same set light source may be different.

[0065] For example, taking multiple color channels including the red channel, the green channel, and the blue channel as an example, the pixel value group of the candidate camera module under the i-th set light source includes the pixel value of the red channel of the candidate camera module under the i-th set light source, the pixel value of the green channel of the candidate camera module under the i-th set light source, and the pixel value of the blue channel of the candidate camera module under the i-th set light source.

[0066] For example, taking multiple color channels including the red channel, the green channel, and the blue channel as an example, the pixel value group of the candidate camera module under the i-th set light source is (R i , G i , B i ), where R i is the pixel value of the red channel of the candidate camera module under the i-th set light source, G i is the pixel value of the green channel of the candidate camera module under the i-th set light source, and B i is the pixel value of the blue channel of the candidate camera module under the i-th set light source.

[0067] In one implementation, taking multiple color channels including the red channel, the green channel, and the blue channel as an example, to obtain the pixel values of multiple color channels of the candidate camera module under the set light source based on the spectral sensitivity function of the candidate camera module, the following formula can be used to achieve it:

[0068]

[0069] G = (Gr + Gb) / 2

[0070] Wherein, R is the pixel value of the red channel of the candidate camera module under the set light source, G is the pixel value of the green channel of the candidate camera module under the set light source, B is the pixel value of the blue channel of the candidate camera module under the set light source, Gr is the pixel value of the first green channel of the candidate camera module under the set light source, Gb is the pixel value of the second green channel of the candidate camera module under the set light source, I(λ) is the spectrum of the set light source, and S r (λ) is the spectral sensitivity function of the candidate camera module in the red channel, and S gr (λ) is the spectral sensitivity function of the candidate camera module in the first green channel, and S gb (λ) is the spectral sensitivity function of the candidate camera module in the second green channel, and S b (λ) is the spectral sensitivity function of the candidate camera module in the blue channel.

[0071] S304. Based on the pixel value groups of the first camera module under K set light sources and the pixel value groups of the second camera module under K set light sources, determine the target conversion method.

[0072] In one implementation, based on the pixel value groups of the first camera module under K set light sources and the pixel value groups of the second camera module under K set light sources, determining the target conversion method includes generating a first data set based on the pixel value groups of the first camera module under K set light sources, generating a second data set based on the pixel value groups of the second camera module under K set light sources, and obtaining the target conversion function between the first data set and the second data set as the target conversion method.

[0073] It should be noted that the target conversion function includes a first conversion function for converting the first data set to the second data set, and / or a second conversion function for converting the second data set to the first data set.

[0074] In some examples, generating a candidate data set based on the pixel value groups of the candidate camera module under K set light sources includes obtaining a first ratio between the pixel value of the first color channel and the pixel value of the second color channel of the candidate camera module under the i-th set light source, obtaining a second ratio between the pixel value of the third color channel and the pixel value of the second color channel of the candidate camera module under the i-th set light source, and obtaining the i-th data group of the candidate data set based on the first ratio and the second ratio.

[0075] It should be noted that the candidate data set is any one of the first data set and the second data set. For the relevant content of the first to third color channels, reference can be made to the above embodiments and will not be elaborated here.

[0076] For example, taking multiple color channels including a red channel, a green channel, and a blue channel as an example, the first color channel is the red channel, the second color channel is the green channel, and the third color channel is the blue channel, and the first ratio r is obtained i , and the second ratio b i can be achieved through the following formula:

[0077] r i = R i / G i

[0078] b i = B i / G i

[0079] In some examples, obtaining the target conversion function between the first data set and the second data set includes using the first data set or the second data set as the reference data set, using the data set other than the reference data set in the first data set and the second data set as the target data set, using the data in the reference data set as the independent variable, and using the data in the target data set as the dependent variable for curve fitting to obtain the target curve, and obtaining the function corresponding to the target curve as the target conversion function.

[0080] For example, using the i-th data group in the reference data set as the independent variable and using the i-th data group in the target data set as the dependent variable for curve fitting.

[0081] S305. According to the target conversion method, convert the white balance data of the first camera module to obtain the white balance data of the second camera module.

[0082] For the relevant content of step S305, reference can be made to the above embodiments and will not be elaborated here.

[0083] A method for using white balance programming data provided by an embodiment of the present disclosure obtains a pixel value group of a first camera module under K set light sources based on the spectral sensitivity function of the first camera module. Among them, the pixel value group of the first camera module under the i-th set light source includes pixel values of multiple color channels of the first camera module under the i-th set light source, where i is a positive integer not greater than K. A pixel value group of a second camera module under K set light sources is obtained based on the spectral sensitivity function of the second camera module. Among them, the pixel value group of the second camera module under the i-th set light source includes pixel values of multiple color channels of the second camera module under the i-th set light source. A target conversion method is determined based on the pixel value group of the first camera module under K set light sources and the pixel value group of the second camera module under K set light sources. Thus, the spectral sensitivity function of the camera module can be considered, the pixel value group of the camera module under multiple set light sources can be obtained, and the target conversion method between the two camera modules can be determined by comprehensively considering the pixel value groups of the two camera modules under multiple set light sources respectively.

[0084] Figure 4 is a flowchart of a method for using white balance programming data shown according to another exemplary embodiment, as Figure 4 shown, the method for using white balance programming data of the embodiment of the present disclosure includes the following steps.

[0085] S401, obtain the spectral sensitivity function of the candidate camera module from the storage space of the candidate camera module.

[0086] S402, obtain a pixel value group of the first camera module under K set light sources based on the spectral sensitivity function of the first camera module. Among them, the pixel value group of the first camera module under the i-th set light source includes pixel values of multiple color channels of the first camera module under the i-th set light source, where i is a positive integer not greater than K.

[0087] S403, obtain a pixel value group of the second camera module under K set light sources based on the spectral sensitivity function of the second camera module. Among them, the pixel value group of the second camera module under the i-th set light source includes pixel values of multiple color channels of the second camera module under the i-th set light source.

[0088] For the relevant content of steps S401 - S403, reference can be made to the above embodiments and will not be elaborated here.

[0089] S404, generate a first matrix based on the pixel value group of the first camera module under K set light sources.

[0090] S405, generate a second matrix based on the pixel value group of the second camera module under K set light sources.

[0091] In one embodiment, a candidate matrix is generated based on the pixel value groups of a candidate camera module under K set light sources, including obtaining a first ratio between the pixel values of the first color channel and the second color channel of the candidate camera module under the i-th set light source, obtaining a second ratio between the pixel values of the third color channel and the second color channel of the candidate camera module under the i-th set light source, and obtaining the i-th column data of the candidate matrix based on the first ratio and the second ratio. Thus, the ratio between the pixel values of two color channels of the camera module under the i-th set light source can be obtained, and the i-th column data of the candidate matrix can be obtained.

[0092] It should be noted that the candidate matrix is either the first matrix or the second matrix, the number of columns N of the candidate matrix is a positive integer not greater than K, and for the relevant content of the first ratio and the second ratio, reference can be made to the above embodiments and will not be elaborated here.

[0093] In some examples, obtaining the i-th column data of the candidate matrix based on the first ratio and the second ratio includes using the first ratio and the second ratio as the data of any two rows in the i-th column of the candidate matrix, and / or performing polynomial expansion on the first ratio and the second ratio to obtain the i-th column data of the candidate matrix. It can be understood that performing polynomial expansion on the first ratio and the second ratio can increase the number of terms of the i-th column data of the candidate matrix, thereby improving the accuracy of the target conversion matrix.

[0094] It should be noted that the polynomial expansion of the first ratio and the second ratio can be implemented by any polynomial expansion method in the related art. For example, it may include cubic polynomial expansion, and no further limitation is made here.

[0095] For example, the i-th column data of the candidate matrix includes r i 、b i , then the i-th column vector q i is as follows:

[0096] q i = [r i , b i T

[0097] For example, taking the cubic polynomial expansion as an example, performing cubic polynomial expansion on the first ratio r i and the second ratio b i , the i-th column data of the candidate matrix obtained includes 1, r i , b i , r i b i , r i 2 , b i 2 , ri 2 b i 、r i b i 2 、r i 3 、b i 3 If so, the i-th column vector q i of the candidate matrix is as follows:

[0098] q i = [1, r i , b i , r i b i , r i 2 , b i 2 , r i 2 b i , r i b i 2 , r i 3 , b i 3 T

[0099] S406. Obtain the target transformation matrix between the first matrix and the second matrix as the target transformation method.

[0100] It should be noted that the target transformation matrix includes the first transformation matrix for transforming the first matrix to the second matrix, and / or the second transformation matrix for transforming the second matrix to the first matrix.

[0101] It should be noted that the target transformation matrix can be obtained by using any method for obtaining a transformation matrix (also called a transformation matrix) in related technologies. For example, it can include the least squares method, and no further limitations are made here.

[0102] In one implementation, obtaining the target transformation matrix between the first matrix and the second matrix includes using the first matrix or the second matrix as the reference matrix, using the matrix other than the reference matrix in the first matrix and the second matrix as the target matrix, and obtaining the product of the target matrix and the pseudo-inverse matrix of the reference matrix as the target transformation matrix for transforming the reference matrix to the target matrix.

[0103] In some examples, the first matrix can be used as the reference matrix and the second matrix can be used as the target matrix, and the product of the second matrix and the pseudo-inverse matrix of the first matrix can be obtained as the first transformation matrix for transforming the first matrix to the second matrix.

[0104] ​In some examples, the second matrix can be used as the reference matrix, and the first matrix can be used as the target matrix. The product of the first matrix and the pseudo-inverse matrix of the second matrix is obtained as the second transformation matrix for transforming the second matrix to the first matrix.

[0105] For example, to obtain the target transformation matrix M, it can be achieved through the following formula:

[0106] A = MI

[0107] M = AI +

[0108] where I is the reference matrix, A is the target matrix, and I + is the pseudo-inverse matrix of the reference matrix.

[0109] For example, if the reference matrix I is a matrix with 10 rows and N columns, and the target matrix A is a matrix with 2 rows and N columns, then the target transformation matrix M is a matrix with 2 rows and 10 columns.

[0110] For example, if the reference matrix I is a matrix with 2 rows and N columns, and the target matrix A is a matrix with 2 rows and N columns, then the target transformation matrix M is a matrix with 2 rows and 2 columns.

[0111] In one implementation, to obtain the target transformation matrix between the first matrix and the second matrix, it includes using the first matrix or the second matrix as the reference matrix, using the matrix other than the reference matrix among the first matrix and the second matrix as the target matrix, performing singular value decomposition on the reference matrix with M rows and N columns to obtain a first unitary matrix with M rows and M columns, a second unitary matrix with N rows and N columns, and a diagonal matrix with M rows and N columns, obtaining the product of the minimum value and the unit matrix with N rows and N columns as the third matrix, obtaining the sum of the diagonal matrix and the third matrix as the fourth matrix, obtaining the product of the first unitary matrix, the fourth matrix, and the second unitary matrix as the fifth matrix, and obtaining the product of the target matrix and the pseudo-inverse matrix of the fifth matrix as the target transformation matrix for transforming the reference matrix to the target matrix. Where N is a positive integer not greater than K. Thus, singular value decomposition can be performed on the reference matrix, and the minimum value is introduced to obtain the fifth matrix, which can improve the solution of ill-conditioned problems. Using the fifth matrix instead of the reference matrix to calculate the target transformation matrix can avoid the problem that inaccurate data in the reference matrix affects the accuracy of the target transformation matrix, and improve the accuracy of the target transformation matrix.

[0112] For example, to obtain the target transformation matrix M, it can be achieved through the following formula:

[0113] A = MI

[0114] I = USV T

[0115] I rec = U(S + aE)V T

[0116] M = AI rec +

[0117] Wherein, I is a reference matrix of M rows and N columns, U is a first unitary matrix of M rows and M columns, V T is a second unitary matrix of N rows and N columns, S is a diagonal matrix of M rows and N columns, a is a minimum value, E is an identity matrix of N rows and N columns, I rec is a fifth matrix, I rec + is the pseudo-inverse matrix of the fifth matrix.

[0118] Wherein, aE is a third matrix, (S + aE) is a fourth matrix.

[0119] S407, generate a first column vector based on the white balance data of the first camera module under the target light source.

[0120] In one implementation, generating a first column vector based on the white balance data of the first camera module under the target light source includes obtaining a third ratio between the pixel values of the first color channel and the second color channel of the first camera module under the target light source as the third ratio corresponding to the first camera module, obtaining a fourth ratio between the pixel values of the third color channel and the second color channel of the first camera module under the target light source as the fourth ratio corresponding to the first camera module, using the third ratio corresponding to the first camera module and the fourth ratio corresponding to the first camera module as the data of any two rows of the first column vector, and / or performing polynomial expansion on the third ratio corresponding to the first camera module and the fourth ratio corresponding to the first camera module to obtain the data of the first column vector. It can be understood that performing polynomial expansion on the third ratio and the fourth ratio corresponding to the first camera module can increase the number of data of the first column vector, which helps to improve the conversion accuracy.

[0121] It should be noted that performing polynomial expansion on the third ratio corresponding to the first camera module and the fourth ratio corresponding to the first camera module can be implemented by using any polynomial expansion method in related technologies. For example, it may include cubic polynomial expansion, and no more limitations are made here.

[0122] For example, the third ratio corresponding to the first camera module is r o1 , and the fourth ratio corresponding to the first camera module is r o2 , then the first column vector P1 is as follows:

[0123] P1 = [r o1 , b o1 T

[0124] ​For example, taking the polynomial expansion as a cubic polynomial expansion as an example, the third ratio corresponding to the first camera module is r o1 , and the fourth ratio corresponding to the first camera module is r o2 undergoes a cubic polynomial expansion, then the first column vector P1 is as follows:

[0125] P1 = [1, r o1 , b o1 , r o1 b o1 , r o1 2 , b o1 2 , r o1 2 b o1 , r o1 b o1 2 , r o1 3 , b o1 3 T

[0126] S408. According to the target transformation matrix, transform the first column vector to obtain the second column vector.

[0127] In one implementation, according to the target transformation matrix, transforming the first column vector to obtain the second column vector includes, if the target transformation matrix is the first transformation matrix from the first matrix to the second matrix, obtaining the product of the first transformation matrix and the first column vector as the second column vector; if the target transformation matrix is the second transformation matrix from the second matrix to the first matrix, obtaining the product of the pseudo-inverse matrix of the second transformation matrix and the first column vector as the second column vector.

[0128] For example, if the target transformation matrix M is the first transformation matrix from the first matrix to the second matrix, obtaining the second column vector P2 can be achieved through the following formula:

[0129] P2 = MP1

[0130] P1 = [1, r o1 , b o1 , r o1 b o1 , r o1 2 , b o1 2 , r o1 2 b o1 , r o1 b o1 2 , r o1 3 ​, b o1 3 T

[0131] P2 = [r o2 , b o2 T

[0132] It can be understood that in this embodiment, the target transformation matrix M is a 2-row and 10-column matrix.

[0133] Among them, P1 is the first column vector, r o1 is the third ratio corresponding to the first camera module, b o1 is the fourth ratio corresponding to the first camera module, r o2 is the third ratio corresponding to the second camera module, b o2 is the fourth ratio corresponding to the second camera module.

[0134] For example, if the target transformation matrix M is the first transformation matrix from the first matrix to the second matrix, obtaining the second column vector P2 can be achieved through the following formula:

[0135] P2 = MP1

[0136] P1 = [r o1 , b o1 T

[0137] P2 = [r o2 , b o2 T

[0138] It can be understood that in this embodiment, the target transformation matrix M is a 2-row and 2-column matrix.

[0139] For example, if the target transformation matrix M is the second transformation matrix from the second matrix to the first matrix, obtaining the second column vector P2 can be achieved through the following formula:

[0140] P2 = M + P1

[0141] Among them, M + is the pseudo-inverse matrix of the target transformation matrix. In this embodiment, M + is the pseudo-inverse matrix of the second transformation matrix.

[0142] S409. Based on the data of the second column vector, obtain the white balance data of the second camera module under the target light source.

[0143] ​​​​In one embodiment, based on the data of the second column vector, the white balance data of the second camera module under the target light source is obtained, including extracting the white balance data of the second camera module under the target light source from the data of the second column vector.

[0144] For example, taking the second column vector P2 = [r o2 , b o2 T as an example, r o2 and b o2 can be extracted from the data of the second column vector as the white balance data of the second camera module under the target light source.

[0145] The method for using the white balance programming data provided by the embodiments of the present disclosure generates a first matrix based on the pixel value groups of the first camera module under K set light sources, generates a second matrix based on the pixel value groups of the second camera module under K set light sources, obtains the target conversion matrix between the first matrix and the second matrix as the target conversion method, generates a first column vector based on the white balance data of the first camera module under the target light source, converts the first column vector according to the target conversion matrix to obtain a second column vector, and obtains the white balance data of the second camera module under the target light source based on the data of the second column vector. Thus, the pixel value groups of the two camera modules under multiple set light sources can be comprehensively considered to obtain the first matrix and the second matrix to determine the target conversion matrix, generate a first column vector based on the white balance data of the first camera module under the target light source, and convert the first column vector to the second column vector according to the target conversion matrix to obtain the white balance data of the second camera module under the target light source.

[0146] Figure 5 is a block diagram of a programming device for camera module data shown according to an exemplary embodiment. Referring to Figure 5 , the programming device 100 for camera module data according to the embodiments of the present disclosure includes: an acquisition module 110 and a programming module 120.

[0147] The acquisition module 110 is configured to execute acquiring the spectral sensitivity function of the candidate camera module as the white balance programming data of the candidate camera module;

[0148] The programming module 120 is configured to execute programming the spectral sensitivity function of the candidate camera module.

[0149] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0150] The programming device for camera module data provided by an embodiment of the present disclosure obtains the spectral sensitivity function of a candidate camera module as the white balance programming data of the candidate camera module, and programs the spectral sensitivity function of the candidate camera module. Thus, compared with the related art in which the white balance programming data is mostly obtained based on the response parameters of the camera module under certain specific light sources, that is, the white balance programming data can only characterize the characteristics of the camera module under certain specific light sources. In this solution, the spectral sensitivity function of the camera module can be used as the white balance programming data, and the white balance programming data can characterize the spectral sensitivity characteristics of the camera module. The spectral sensitivity characteristics are not affected by the light source, that is, the white balance programming data can characterize the characteristics of the camera module under all light sources, which helps to improve the comprehensiveness of the white balance programming data, and further improves the comprehensiveness of the camera module data programming.

[0151] Figure 6 is a block diagram of a device for using white balance programming data shown according to an exemplary embodiment. Refer to Figure 6 , the device 200 for using white balance programming data according to an embodiment of the present disclosure includes: an acquisition module 210, a determination module 220, and a conversion module 230.

[0152] The acquisition module 210 is configured to execute obtaining the spectral sensitivity function of the candidate camera module from the storage space of the candidate camera module;

[0153] The determination module 220 is configured to execute determining a target conversion method between the first camera module and the second camera module based on the spectral sensitivity function of the first camera module and the spectral sensitivity function of the second camera module;

[0154] The conversion module 230 is configured to execute converting the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module.

[0155] In an embodiment of the present disclosure, the determination module 220 is further configured to execute: obtaining a pixel value group of the first camera module under K set light sources based on the spectral sensitivity function of the first camera module, where the pixel value group of the first camera module under the i-th set light source includes pixel values of multiple color channels of the first camera module under the i-th set light source, and i is a positive integer not greater than K; obtaining a pixel value group of the second camera module under K set light sources based on the spectral sensitivity function of the second camera module, where the pixel value group of the second camera module under the i-th set light source includes pixel values of multiple color channels of the second camera module under the i-th set light source; determining the target conversion method based on the pixel value group of the first camera module under K set light sources and the pixel value group of the second camera module under K set light sources.

[0156] In one embodiment of the present disclosure, the determining module 220 is further configured to perform: generating a first matrix based on the pixel value groups of the first camera module under K set light sources; generating a second matrix based on the pixel value groups of the second camera module under K set light sources; obtaining a target transformation matrix between the first matrix and the second matrix as the target transformation method.

[0157] In one embodiment of the present disclosure, the determining module 220 is further configured to perform: obtaining a first ratio between the pixel value of the first color channel and the pixel value of the second color channel of the candidate camera module under the i-th set light source; obtaining a second ratio between the pixel value of the third color channel and the pixel value of the second color channel of the candidate camera module under the i-th set light source; obtaining the i-th column data of the candidate matrix based on the first ratio and the second ratio.

[0158] In one embodiment of the present disclosure, the determining module 220 is further configured to perform: using the first ratio and the second ratio as the data of any two rows of the i-th column of the candidate matrix; and / or performing polynomial expansion on the first ratio and the second ratio to obtain the i-th column data of the candidate matrix.

[0159] In one embodiment of the present disclosure, the determining module 220 is further configured to perform: using the first matrix or the second matrix as a reference matrix, and using the matrix other than the reference matrix in the first matrix and the second matrix as a target matrix; obtaining the product of the target matrix and the pseudo-inverse matrix of the reference matrix as the target transformation matrix for converting the reference matrix to the target matrix.

[0160] In one embodiment of the present disclosure, the determining module 220 is further configured to perform: using the first matrix or the second matrix as a reference matrix, and using the matrix other than the reference matrix in the first matrix and the second matrix as a target matrix; performing singular value decomposition on the reference matrix of M rows and N columns to obtain a first unitary matrix of M rows and M columns, a second unitary matrix of N rows and N columns, and a diagonal matrix of M rows and N columns; obtaining the product of the minimum value and the unit matrix of N rows and N columns as a third matrix; obtaining the sum value of the diagonal matrix and the third matrix as a fourth matrix; obtaining the product of the first unitary matrix, the fourth matrix, and the second unitary matrix as a fifth matrix; obtaining the product of the target matrix and the pseudo-inverse matrix of the fifth matrix as the target transformation matrix for converting the reference matrix to the target matrix.

[0161] In one embodiment of the present disclosure, the conversion module 230 is further configured to perform: generating a first column vector based on the white balance data of the first camera module under a target light source; converting the first column vector according to the target conversion matrix to obtain a second column vector; and obtaining the white balance data of the second camera module under the target light source based on the data of the second column vector.

[0162] In one embodiment of the present disclosure, the conversion module 230 is further configured to perform: obtaining a third ratio between the pixel values of the first color channel and the second color channel of the first camera module under the target light source as the third ratio corresponding to the first camera module; obtaining a fourth ratio between the pixel values of the third color channel and the second color channel of the first camera module under the target light source as the fourth ratio corresponding to the first camera module; using the third ratio corresponding to the first camera module and the fourth ratio corresponding to the first camera module as the data of any two rows of the first column vector; and / or performing polynomial expansion on the third ratio corresponding to the first camera module and the fourth ratio corresponding to the first camera module to obtain the data of the first column vector.

[0163] In one embodiment of the present disclosure, the conversion module 230 is further configured to perform: if the target conversion matrix is the first conversion matrix for converting the first matrix to the second matrix, obtaining the product of the first conversion matrix and the first column vector as the second column vector; if the target conversion matrix is the second conversion matrix for converting the second matrix to the first matrix, obtaining the product of the pseudo-inverse matrix of the second conversion matrix and the first column vector as the second column vector.

[0164] In one embodiment of the present disclosure, the white balance data of the candidate camera module under the target light source includes a third ratio between the pixel values of the first color channel and the second color channel of the candidate camera module under the target light source, and a fourth ratio between the pixel values of the third color channel and the second color channel of the candidate camera module under the target light source.

[0165] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0166] The device for using white balance programming data provided by an embodiment of the present disclosure obtains the spectral sensitivity function of a candidate camera module from the storage space of the candidate camera module, determines a target conversion method between a first camera module and a second camera module based on the spectral sensitivity functions of the first camera module and the second camera module, and converts the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module. Thus, the target conversion method between the two camera modules can be determined by comprehensively considering the respective spectral sensitivity functions of the two camera modules. The spectral sensitivity characteristics are not affected by the light source, which improves the accuracy of the target conversion method, and further improves the accuracy of the white balance data. Moreover, the white balance data of one camera module can be converted based on the target conversion method to obtain the white balance data of the other camera module. That is, in this solution, only the white balance data of one camera module needs to be calibrated and converted to obtain the white balance data of the remaining camera modules, which improves the debugging efficiency of the white balance data and helps ensure the consistency of multiple camera modules.

[0167] Figure 7 is a block diagram of an electronic device shown according to an exemplary embodiment.

[0168] As Figure 7 shown, the above-mentioned electronic device 300 includes:

[0169] A memory 310, a processor 320, and a bus 330 connecting different components (including the memory 310 and the processor 320). The memory 310 stores a computer program, and when the processor 320 executes the program, it implements the camera module data programming method and the white balance programming data using method described in the embodiments of the present disclosure.

[0170] The bus 330 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the multiple bus structures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0171] The electronic device 300 typically includes a variety of electronic device-readable media. These media can be any available media accessible by the electronic device 300, including volatile and non-volatile media, removable and non-removable media.

[0172] The memory 310 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 340 and / or cache memory 350. The electronic device 300 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 360 may be used for reading and writing on non-removable, non-volatile magnetic media ( Figure 7 not shown, commonly referred to as a "hard disk drive"). Although Figure 7 not shown in the figure, a disk drive for reading and writing on a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing on a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical media) may be provided. In these cases, each drive may be connected to the bus 330 through one or more data media interfaces. The memory 310 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the embodiments of the present disclosure.

[0173] A program / utility 380 having a set (at least one) of program modules 370 may be stored, for example, in the memory 310. Such program modules 370 include - but are not limited to - an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The program modules 370 generally perform the functions and / or methods in the embodiments described in the present disclosure.

[0174] The electronic device 300 may also communicate with one or more external devices 390 (such as a keyboard, a pointing device, a display 391, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 300, and / or communicate with any device that enables the electronic device 300 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication may be carried out through the input / output (I / O) interface 392. Moreover, the electronic device 300 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 393. As Figure 7 shown, the network adapter 393 communicates with other modules of the electronic device 300 through the bus 330. It should be understood that although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0175] The processor 320 executes various functional applications and data processing by running programs stored in the memory 310.

[0176] It should be noted that for the implementation process and technical principle of the electronic device in this embodiment, refer to the foregoing explanations of the method for burning camera module data and the method for using white balance burning data in the embodiments of the present disclosure, which will not be elaborated here.

[0177] The electronic device provided in the embodiments of the present disclosure can execute the method for burning camera module data as described above, obtain the spectral sensitivity function of the candidate camera module as the white balance burning data of the candidate camera module, and burn the spectral sensitivity function of the candidate camera module. Thus, compared with the related art where the white balance burning data is mostly obtained based on the response parameters of the camera module under certain specific light sources, that is, the white balance burning data can only characterize the characteristics of the camera module under certain specific light sources. In this solution, the spectral sensitivity function of the camera module can be used as the white balance burning data, and the white balance burning data can characterize the spectral sensitivity characteristics of the camera module. The spectral sensitivity characteristics are not affected by the light source, that is, the white balance burning data can characterize the characteristics of the camera module under all light sources, which helps to improve the comprehensiveness of the white balance burning data, and further improves the comprehensiveness of the camera module data burning.

[0178] To implement the above embodiments, the present disclosure also proposes a computer-readable storage medium, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for burning camera module data and the method for using white balance burning data provided by the present disclosure are implemented.

[0179] Optionally, the computer-readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0180] To implement the above embodiments, the present disclosure also provides a computer program product, including a computer program, characterized in that when the computer program is executed by the processor of the electronic device, the method for burning camera module data and the method for using white balance burning data as described above are implemented.

[0181] To implement the above embodiments, the present disclosure also provides a chip, including an interface circuit and a processor that are coupled to each other. The interface circuit is used for inputting and outputting signals, so that the processor implements the method described in the first aspect according to the input or output signals.

[0182] In the embodiments of the present disclosure, the chip may include an image processing chip.

[0183] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0184] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A method for burning camera module data, characterized in that Including: Obtain the spectral sensitivity function of the candidate camera module as the white balance programming data of the candidate camera module; Program the spectral sensitivity function of the candidate camera module.

2. A method for using white balance burning data, characterized in that Including: Obtain the spectral sensitivity function of the candidate camera module from the storage space of the candidate camera module; Determine the target conversion method between the first camera module and the second camera module based on the spectral sensitivity function of the first camera module and the spectral sensitivity function of the second camera module; Convert the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module.

3. The method according to claim 2, wherein The determining the target conversion method between the first camera module and the second camera module based on the spectral sensitivity function of the first camera module and the spectral sensitivity function of the second camera module includes: Based on the spectral sensitivity function of the first camera module, obtain the pixel value groups of the first camera module under K set light sources, where the pixel value group of the first camera module under the i-th set light source includes the pixel values of multiple color channels of the first camera module under the i-th set light source, and i is a positive integer not greater than K; Based on the spectral sensitivity function of the second camera module, obtain the pixel value groups of the second camera module under K set light sources, where the pixel value group of the second camera module under the i-th set light source includes the pixel values of multiple color channels of the second camera module under the i-th set light source; Determine the target conversion method based on the pixel value groups of the first camera module under K set light sources and the pixel value groups of the second camera module under K set light sources.

4. The method according to claim 3, wherein The determining the target conversion method based on the pixel value groups of the first camera module under K set light sources and the pixel value groups of the second camera module under K set light sources includes: Generate a first matrix based on the pixel value groups of the first camera module under K set light sources; Generate a second matrix based on the pixel value groups of the second camera module under K set light sources; Obtain the target conversion matrix between the first matrix and the second matrix as the target conversion method.

5. The method according to claim 4, characterized in that Generating a candidate matrix based on the pixel value groups of the candidate camera module under K set light sources includes: Obtain the first ratio between the pixel value of the first color channel and the pixel value of the second color channel of the candidate camera module under the i-th set light source; Obtain the second ratio between the pixel value of the third color channel and the pixel value of the second color channel of the candidate camera module under the i-th set light source; Based on the first ratio and the second ratio, obtain the i-th column data of the candidate matrix.

6. The method according to claim 5, characterized in that The obtaining the i-th column data of the candidate matrix based on the first ratio and the second ratio includes: Taking the first ratio and the second ratio as the data of any two rows of the i-th column of the candidate matrix; and / or, Performing polynomial expansion on the first ratio and the second ratio to obtain the i-th column data of the candidate matrix.

7. The method according to claim 4, wherein The obtaining of the target transformation matrix between the first matrix and the second matrix includes: Taking either the first matrix or the second matrix as the reference matrix, and taking the matrix other than the reference matrix in the first matrix and the second matrix as the target matrix; Obtaining the product of the target matrix and the pseudo-inverse matrix of the reference matrix as the target transformation matrix for transforming the reference matrix to the target matrix.

8. The method according to claim 4, wherein The obtaining of the target transformation matrix between the first matrix and the second matrix includes: Taking either the first matrix or the second matrix as the reference matrix, and taking the matrix other than the reference matrix in the first matrix and the second matrix as the target matrix; Performing singular value decomposition on the reference matrix of M rows and N columns to obtain a first unitary matrix of M rows and M columns, a second unitary matrix of N rows and N columns, and a diagonal matrix of M rows and N columns; Obtaining the product of the minimum value and the unit matrix of N rows and N columns as the third matrix; Obtaining the sum value of the diagonal matrix and the third matrix as the fourth matrix; Obtaining the product of the first unitary matrix, the fourth matrix, and the second unitary matrix as the fifth matrix; Obtaining the product of the target matrix and the pseudo-inverse matrix of the fifth matrix as the target transformation matrix for transforming the reference matrix to the target matrix.

9. The method according to claim 4, characterized in that, The converting of the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module includes: Generating a first column vector based on the white balance data of the first camera module under the target light source; Converting the first column vector according to the target transformation matrix to obtain a second column vector; Obtaining the white balance data of the second camera module under the target light source based on the data of the second column vector.

10. The method according to claim 9, characterized in that, The generating of the first column vector based on the white balance data of the first camera module under the target light source includes: Obtaining a third ratio between the pixel value of the first color channel and the pixel value of the second color channel of the first camera module under the target light source as the third ratio corresponding to the first camera module; Obtaining a fourth ratio between the pixel value of the third color channel and the pixel value of the second color channel of the first camera module under the target light source as the fourth ratio corresponding to the first camera module; Taking the third ratio corresponding to the first camera module and the fourth ratio corresponding to the first camera module as the data of any two rows of the first column vector; and / or, Performing polynomial expansion on the third ratio corresponding to the first camera module and the fourth ratio corresponding to the first camera module to obtain the data of the first column vector.

11. The method according to claim 9, wherein The converting of the first column vector according to the target transformation matrix to obtain a second column vector includes: If the target transformation matrix is the first transformation matrix for transforming the first matrix to the second matrix, obtaining the product of the first transformation matrix and the first column vector as the second column vector; If the target conversion matrix is the second conversion matrix for converting the second matrix to the first matrix, obtain the product of the pseudo-inverse matrix of the second conversion matrix and the first column vector as the second column vector.

12. The method according to any one of claims 2-11, characterized in that, The white balance data of the candidate camera module under the target light source includes the third ratio between the pixel values of the first color channel and the second color channel of the candidate camera module under the target light source, and the fourth ratio between the pixel values of the third color channel and the second color channel of the candidate camera module under the target light source.

13. A device for burning camera module data, characterized in that, Comprising: An acquisition module configured to acquire the spectral sensitivity function of the candidate camera module as the white balance programming data of the candidate camera module; A programming module configured to perform programming on the spectral sensitivity function of the candidate camera module.

14. An apparatus for using white balance programming data, characterized in that Comprising: An acquisition module configured to acquire the spectral sensitivity function of the candidate camera module from the storage space of the candidate camera module; A determination module configured to determine the target conversion method between the first camera module and the second camera module based on the spectral sensitivity functions of the first camera module and the second camera module; A conversion module configured to convert the white balance data of the first camera module according to the target conversion method to obtain the white balance data of the second camera module.

15. An electronic device, characterized in that, Comprising: A processor; A memory for storing processor-executable instructions; Wherein, the processor is configured to: Implement the steps of the method according to any one of claims 1-12.

16. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the program instruction is executed by the processor, the steps of the method according to any one of claims 1-12 are implemented.

17. A chip, comprising an interface circuit and a processor coupled to each other, the interface circuit being used for inputting and outputting signals so that the processor implements the steps of the method according to any one of claims 1-12 according to the input or output signals.