Automatic white balance method and device, equipment and storage medium

By obtaining spectral information and environmental information in multi-camera scenarios, determining the automatic white balance parameters of different camera images, solving the accuracy and stability of the automatic white balance processing of multi-camera, realizing more efficient automatic white balance processing and reducing power consumption.

CN120201318APending Publication Date: 2025-06-24GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510279921.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In the prior art, the accuracy and stability of automatic white balance processing in multi-camera scenarios are not good enough, the processing performance is poor, the calculation complexity is high, and the power consumption is large.

Method used

By obtaining the spectral information of the current shooting scene and scene environment information, the automatic white balance parameters between images collected by different cameras are determined based on this information, ensuring the consistency, accuracy and stability of automatic white balance between images acquired by multiple cameras.

Benefits of technology

Improves the automatic white balance correction effect, reduces the calculation complexity and calculation amount, and reduces the power consumption of performing automatic white balance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120201318A_ABST
    Figure CN120201318A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic white balance method. The method comprises the following steps: acquiring spectral information corresponding to a current shooting scene and scene environment information corresponding to the current shooting scene; determining a first spectral response value corresponding to the first image and a second spectral response value corresponding to the second image based on the spectral information corresponding to the current shooting scene; wherein the first image is obtained by shooting in a current shooting scene through a first camera, and the second image is obtained by shooting in the current shooting scene through a second camera; determining color correction conversion data between the first camera and the second camera based on the scene environment information; and determining an automatic white balance parameter of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data and the automatic white balance parameter of the first image, and performing automatic white balance processing on the second image based on the automatic white balance parameter of the second image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular, to an automatic white balance method, apparatus, device, and storage medium. Background Art

[0002] With the continuous progress and development of terminal technologies, a terminal device can be configured with multiple cameras, such as a wide-angle camera, a main camera, a telephoto camera, etc., and perform zoom switching through the configured multiple cameras. Among them, there are differences in the field of view (FOV) between different cameras.

[0003] Due to the differences in FOV among multiple cameras, in order to ensure the color consistency when switching zoom cameras, the image correction effect of one of the cameras is often used as a reference, and the other camera aligns with the reference.

[0004] However, the current automatic white balance processing method among multiple cameras in the scene has poor accuracy and stability, poor processing performance, high computational complexity, and high power consumption. Summary of the Invention

[0005] Embodiments of the present application provide an automatic white balance method, apparatus, device, and storage medium, which can ensure the consistency, accuracy, and stability of automatic white balance among multiple images collected by multiple cameras, and finally improve the automatic white balance correction effect. At the same time, the computational complexity and the amount of calculation are greatly reduced, thereby reducing the power consumption of performing automatic white balance.

[0006] The technical solution of the embodiments of the present application is implemented as follows:

[0007] In a first aspect, embodiments of the present application provide an automatic white balance method, the method including:

[0008] Obtain spectral information corresponding to the current shooting scene and scene environment information corresponding to the current shooting scene;

[0009] Determine a first spectral response value corresponding to a first image and a second spectral response value corresponding to a second image based on the spectral information corresponding to the current shooting scene; wherein, the first image is obtained by shooting in the current shooting scene through a first camera, and the second image is obtained by shooting in the current shooting scene through a second camera;

[0010] Determine color correction conversion data between the first camera and the second camera based on the scene environment information;

[0011] Determine the automatic white balance parameters of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameters of the first image, and perform automatic white balance processing on the second image based on the automatic white balance parameters of the second image.

[0012] In a second aspect, an embodiment of the present application provides an automatic white balance device, which includes:

[0013] An acquisition unit configured to acquire spectral information corresponding to the current shooting scene and scene environment information corresponding to the current shooting scene;

[0014] A determination unit configured to determine a first spectral response value corresponding to a first image and a second spectral response value corresponding to a second image based on the spectral information corresponding to the current shooting scene; wherein, the first image is obtained by shooting in the current shooting scene through a first camera, and the second image is obtained by shooting in the current shooting scene through a second camera; determine color correction conversion data between the first camera and the second camera based on the scene environment information; determine the automatic white balance parameters of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameters of the first image;

[0015] A processing unit configured to perform automatic white balance processing on the second image based on the automatic white balance parameters of the second image.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory storing processor-executable instructions. When the instructions are executed by the processor, the method as in the first aspect is implemented.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, the method as in the first aspect above is implemented.

[0018] An embodiment of the present application provides an automatic white balance method, apparatus, device, and storage medium. The method includes: obtaining spectral information corresponding to a current shooting scene and scene environment information corresponding to the current shooting scene; determining a first spectral response value corresponding to a first image and a second spectral response value corresponding to a second image based on the spectral information corresponding to the current shooting scene, where the first image is obtained by shooting in the current shooting scene through a first camera, and the second image is obtained by shooting in the current shooting scene through a second camera; determining color correction conversion data between the first camera and the second camera based on the scene environment information; determining the automatic white balance parameter of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameter of the first image, and performing automatic white balance processing on the second image based on the automatic white balance parameter of the second image. That is to say, in the present application, the correlation between the automatic white balance parameters of different images collected by different cameras in the current shooting scene is determined through the spectral information and scene environment information of the current shooting scene, and the automatic white balance processing of different images is performed with reference to the above correlation, which can ensure the consistency, accuracy, and stability of the automatic white balance among multiple images collected by multiple cameras, and ultimately improve the automatic white balance correction effect. At the same time, the derivation and calculation process of the correlation between the automatic white balance parameters of different images collected by different cameras in the current shooting scene only need to collect and obtain the spectral information and scene environment information of the current shooting scene, greatly reducing the complexity and amount of calculation, thereby reducing the power consumption of performing automatic white balance. Description of the Drawings

[0019] Figure 1 Schematic diagram of the difference in the field of view area between different cameras;

[0020] Figure 2 Schematic diagram of the implementation process of the automatic white balance method proposed in the embodiment of the present application;

[0021] Figure 3 Schematic diagram of the implementation process of the automatic white balance method proposed in the embodiment of the present application;

[0022] Figure 4 Schematic diagram of the implementation process of the automatic white balance method proposed in the embodiment of the present application;

[0023] Figure 5 Schematic diagram of the implementation of the automatic white balance method proposed in the embodiment of the present application

[0024] Figure 6 Schematic diagram of the composition structure of the automatic white balance apparatus proposed in the embodiment of the present application;

[0025] Figure 7 Schematic diagram of the composition structure of the electronic device proposed in the embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It is understood that the specific embodiments described herein are only used to explain the difference application, rather than to limit the application. It should also be noted that, for the convenience of description, only the parts that are different from the related applications are shown in the drawings.

[0027] With the continuous advancement and development of terminal technology, terminal devices can be equipped with multiple cameras, such as a wide-angle camera, a main camera, a telephoto camera, etc., and zoom switching can be performed through the configured multiple cameras. Among them, the field of view (FOV) between different cameras is different.

[0028] Figure 1 is a schematic diagram of the difference in field of view between different cameras, such as Figure 1 As shown in the figure, there is a huge difference in FOV between the wide-angle camera, main camera, and telephoto camera. Among them, the FOV of the wide-angle camera is much larger than that of the telephoto camera.

[0029] Each camera uses the Advanced Gray World (AGW) algorithm to calculate the automatic white balance correction gain coefficient (awbGain) for color correction. Due to the different FOVs between multiple cameras, there will be color differences in the overlapping areas of the images after the automatic white balance (AWB) correction. At this time, the picture will have color jumps, and the experience is not smooth enough.

[0030] To solve this problem, based on the automatic white balance synchronization (AWB Sync) among multiple cameras, the AGW algorithm is used to calculate awbGain with one of the cameras as the benchmark, and the RB component of the benchmark camera image is used to perform color correction. The image colors collected by the remaining cameras are corrected based on the color of the overlapping area. There is no need to calculate awbGain separately, and the synchronized automatic white balance gain (sync awbGain) is directly executed to ensure color consistency when the zoom camera is switched.

[0031] For example, by matching the image coordinate points and image pixel values, taking the image correction effect of one camera as the benchmark, the average of the RGB three-channel pixel data of the other camera is aligned with the benchmark by the ratio of the R component to the G component (RpG) and the ratio of the B component to the G component (BpG), and multiplied by the difference coefficient, the effect is consistent with the benchmark effect. However, compared with the spectrum, the response accuracy of the RGB three-channel is very low, and it cannot accurately describe the light source. The accuracy and stability are not good enough, and the image pixel matching calculation is very large. If it is done for each frame, its time consumption and power consumption are unacceptable.

[0032] That is to say, for the common AWB processing method applied to multi-camera scenarios, the AWB correction effect is not ideal, the AWB processing performance is poor, and the computational complexity is high, resulting in high power consumption.

[0033] To solve the above problems, the embodiments of the present application provide an automatic white balance method, apparatus, device, and storage medium. The method includes obtaining spectral information corresponding to the current shooting scene and scene environment information corresponding to the current shooting scene; determining a first spectral response value corresponding to a first image and a second spectral response value corresponding to a second image based on the spectral information corresponding to the current shooting scene, where the first image is obtained by shooting in the current shooting scene through a first camera, and the second image is obtained by shooting in the current shooting scene through a second camera; determining color correction conversion data between the first camera and the second camera based on the scene environment information; determining the automatic white balance parameter of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameter of the first image, and performing automatic white balance processing on the second image based on the automatic white balance parameter of the second image. That is to say, in the present application, the correlation between the automatic white balance parameters of different images collected by different cameras in the current shooting scene is determined through the spectral information and scene environment information of the current shooting scene, and the automatic white balance processing is performed on different images with reference to the above correlation, which can ensure the consistency, accuracy, and stability of the automatic white balance among multiple images collected by multiple cameras, and ultimately improve the automatic white balance correction effect. At the same time, the derivation and calculation process of the correlation between the automatic white balance parameters of different images collected by different cameras in the current shooting scene only need to collect and obtain the spectral information and scene environment information of the current shooting scene, greatly reducing the computational complexity and amount of calculation, thereby reducing the power consumption of performing automatic white balance.

[0034] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application.

[0035] An embodiment of the present application provides an automatic white balance method. The automatic white balance method can be applied to an automatic white balance device or an electronic device, and can also be applied to any terminal including an automatic white balance device or an electronic device.

[0036] It can be understood that the automatic white balance method proposed in the embodiments of the present application can include an automatic white balance (AWB) method in a multi-camera scenario.

[0037] Further, in the embodiments of the present application, the automatic white balance method proposed by the embodiments of the present application can be applied to the scenario of multi-camera switching shooting, that is, the automatic white balance method of the present application can be used to perform automatic white balance processing on different images collected by different cameras when multiple cameras perform zoom switching.

[0038] Of course, the application scenario of the automatic white balance method proposed by the embodiments of the present application is not limited to the multi-camera scenario, and can also be applied to other scenarios such as multiple independent terminal devices respectively performing automatic white balance processing. The present application does not make specific limitations.

[0039] Next, taking the automatic white balance device as an example, an exemplary description of the automatic white balance method proposed by the embodiments of the present application will be given.

[0040] Further, in the embodiments of the present application, Figure 2 is a schematic flowchart of the implementation process of the automatic white balance method proposed by the embodiments of the present application. As Figure 2 shown, the automatic white balance method may include the following steps:

[0041] Step 101, obtain the spectral information corresponding to the current shooting scene and the scene environment information corresponding to the current shooting scene.

[0042] In the embodiments of the present application, the automatic white balance device first obtains the spectral information corresponding to the current shooting scene and the scene environment information corresponding to the current shooting scene.

[0043] In the embodiments of the present application, the current shooting scene may be the actual scene where shooting is currently being performed.

[0044] In the embodiments of the present application, the automatic white balance device shoots the current shooting scene through multiple different cameras, thereby obtaining different images corresponding to different cameras.

[0045] In the embodiments of the present application, the automatic white balance device shoots the current shooting scene through multiple different cameras configured, or may also shoot the current shooting scene through multiple different cameras configured by other devices or apparatuses. The embodiments of the present application do not make specific limitations.

[0046] Exemplarily, in one implementation scenario, the automatic white balance device is configured with multiple different cameras, where the number of cameras configured by the automatic white balance device may be greater than or equal to 2. That is to say, in the present application, the automatic white balance device is a multi-camera device.

[0047] In some embodiments, multiple different cameras generally have different functions and characteristics in design to meet the shooting requirements in different scenarios. The present application does not specifically limit the performance and types of multiple different cameras.

[0048] Exemplarily, in some embodiments, multiple different cameras may include, but are not limited to, at least two of the following cameras: main camera, wide-angle camera, telephoto camera, macro camera, depth-of-field camera, etc.

[0049] Among them, the main camera is the most basic camera, usually having a relatively high pixel count and good imaging quality. It is responsible for handling most of the daily shooting tasks, such as landscapes, portraits, etc. The parameters such as the sensor size, aperture size, and pixel count of the main camera are relatively high to ensure clear and delicate photos under various lighting conditions.

[0050] The wide-angle camera has a wider field of view than the main camera, can accommodate more scenery, and is suitable for shooting scenes such as landscapes and buildings. The wide-angle camera brings a stronger visual impact and can show a broader field of view. In addition, the wide-angle camera can also perform excellently when shooting in narrow spaces, making the photo more spatial and three-dimensional.

[0051] The telephoto camera is usually used to achieve optical zoom, can zoom in on distant scenery for shooting, and is suitable for shooting distant views, portrait close-ups, etc. The telephoto camera has a shallower depth of field, can highlight the subject, blur the background, and create a more professional shooting effect. The telephoto cameras of some high-end mobile phones also support high-power optical zoom, and can achieve a longer shooting distance while maintaining clarity.

[0052] The macro camera supports close focusing and can capture wonderful details of the microscopic world, such as flowers and insects. The macro camera usually has a relatively high magnification ratio and good focusing performance, and can present a delicate and clear microscopic world.

[0053] The depth-of-field camera is mainly used to enhance the blurring effect of the photo, making the subject more prominent and the background more blurred. Through algorithm processing, the depth-of-field camera can achieve a more natural and soft blurring effect, enhancing the artistic sense of the photo.

[0054] Of course, in addition to the above common camera types, multiple different cameras may also include some special cameras, such as Time of Flight (ToF) lenses, movie lenses, etc. Among them, the ToF lens is mainly used to achieve three-dimensional perception and depth measurement, and can be used for functions such as augmented reality and face recognition. The movie lens usually has a relatively high pixel count and excellent color reproduction ability, and is suitable for shooting high-quality videos.

[0055] In an embodiment of the present application, the spectral information corresponding to the current shooting scene may include the spectral curve (Spectrum, Sp) of the current shooting scene. Among them, the spectral curve is a graph describing the distribution of the radiation energy of the light source according to the wavelength. It shows the radiation intensity of the light source at different wavelengths. The shape and position of the spectral curve depend on the type and color temperature of the light source. For example, the spectral curve of an incandescent lamp shows a continuous distribution in the visible light range, while the spectral curve of a light emitting diode (LED) lamp may be more concentrated or have specific peaks.

[0056] In an embodiment of the present application, the present application does not specifically limit the acquisition method of the spectral information corresponding to the current shooting scene.

[0057] Exemplarily, in some embodiments, the automatic white balance device acquires the spectral information collected by other devices or terminals.

[0058] Exemplarily, in some embodiments, the automatic white balance device is configured with a collection module for spectral information, and thus can directly collect and obtain the spectral information corresponding to the current shooting scene through the configured collection module for spectral information.

[0059] In some embodiments, the collection module for spectral information may include, but is not limited to, a color sensor (ColorSensor).

[0060] Among them, ColorSensor is a sensor that can detect and identify colors, and determines the color by measuring the light reflected from the surface of an object. It usually includes one or more light sources (such as LEDs) and a photodetector (such as a photodiode or a phototransistor).

[0061] In one implementation scenario, the automatic white balance device is configured with ColorSensor and collects spectral information through ColorSensor.

[0062] In an embodiment of the present application, the scene environment information corresponding to the current shooting scene may include, but is not limited to, the illuminance () and / or color temperature corresponding to the current shooting scene.

[0063] Among them, illuminance (lux) refers to the luminous flux received per unit area, and its unit is lux. Illuminance is an important indicator for measuring the lighting level, which determines the brightness of the environment. The magnitude of illuminance is related to factors such as the brightness of the light source, distance, and reflectivity. In lighting design, it is necessary to determine the appropriate illuminance level according to different application scenarios and requirements.

[0064] Color temperature (Correlated Color Temperature, CCT) is a parameter that describes the color of a light source. It represents the temperature at which the light radiated by the light source is closest in color to the light radiated by a black body at a certain temperature. The unit of color temperature is Kelvin, denoted by the symbol K. The higher the color temperature, the more the color of the light source tends to blue and white; the lower the color temperature, the more the color of the light source tends to yellow and red. For example, the color temperature of an incandescent lamp is usually between 2700K and 3200K, while the color temperature of an LED lamp can be adjusted within a wider range.

[0065] In the embodiments of the present application, the manner of obtaining the scene environment information corresponding to the current shooting scene is not specifically limited in the present application.

[0066] Exemplarily, in some embodiments, the automatic white balance device obtains the scene environment information collected by other devices or terminals.

[0067] Exemplarily, in some embodiments, the automatic white balance device is configured with a spectral information acquisition module, and thus can directly collect and obtain the scene environment information corresponding to the current shooting scene through the configured spectral information acquisition module.

[0068] In some embodiments, the acquisition module of the scene environment information may include, but is not limited to, a color sensor (ColorSensor).

[0069] In some embodiments, the spectral information acquisition module, the acquisition module of the illuminance corresponding to the current shooting scene, and the acquisition module of the color temperature corresponding to the current shooting scene may be the same acquisition module or different acquisition modules, which is not specifically limited in the present application.

[0070] In one implementation scenario, the automatic white balance device is configured with a ColorSensor, and collects spectral information and scene environment information through the ColorSensor.

[0071] In one implementation scenario, the automatic white balance device is configured with multiple ColorSensors, and collects spectral information through one of the ColorSensors, and at the same time collects through another for scene environment information.

[0072] Step 102: Determine the first spectral response value corresponding to the first image and the second spectral response value corresponding to the second image based on the spectral information corresponding to the current shooting scene; wherein, the first image is obtained by shooting in the current shooting scene through the first camera, and the second image is obtained by shooting in the current shooting scene through the second camera.

[0073] In an embodiment of the present application, after obtaining the spectral information corresponding to the current shooting scene and the scene environment information corresponding to the current shooting scene, the automatic white balance device further determines a first spectral response value corresponding to the first image and a second spectral response value corresponding to the second image based on the spectral information corresponding to the current shooting scene.

[0074] In an embodiment of the present application, the first image is obtained by the automatic white balance device shooting in the current shooting scene through a first camera, and the second image is obtained by the automatic white balance device shooting in the current shooting scene through a second camera.

[0075] In some embodiments, the automatic white balance device shoots the current shooting scene through a plurality of different configured cameras to obtain the first image and the second image, or may also shoot the current shooting scene through a plurality of different cameras configured by other devices or apparatuses to obtain the first image and the second image. The embodiments of the present application do not make specific limitations.

[0076] Exemplarily, in some embodiments, the automatic white balance device configures a first camera and a second camera, wherein the first camera and the second camera are different. For example, the automatic white balance device is configured with a main camera, a wide-angle camera, and a telephoto camera. The first camera is the main camera, and the second camera may be a wide-angle camera and / or a telephoto camera. The automatic white balance device collects images in the current shooting scene through the first camera and the second camera, and obtains the first image and the second image in the current shooting scene respectively.

[0077] In some embodiments, the automatic white balance device collects the first image corresponding to the current shooting scene through the first camera, and may also collect the second image corresponding to the current shooting scene through the second camera. Among them, the automatic white balance device performs zoom switching between different cameras. During the process of taking a picture of the current shooting scene, the zoom switching time from the first camera to the second camera can be ignored, that is, it can be considered that the first image and the second image are collected synchronously through the first camera and the second camera.

[0078] Further, in an embodiment of the present application, when determining the first spectral response value corresponding to the first image and the second spectral response value corresponding to the second image based on the spectral information corresponding to the current shooting scene, the obtained spectral information of the current shooting scene may be combined, and the first spectral response value corresponding to the first image is determined based on the spectral response function (Spectral Response Function, SRF) of the first camera respectively, and the second spectral response value corresponding to the second image is determined based on the spectral response function of the second camera.

[0079] Among them, the spectral response function is a function that describes the response degree of a spectral sensor to light of different wavelengths. That is, different cameras correspond to different spectral response functions. The spectral response function is a function of the relationship between the intensity of the light responded by the spectral sensor and the wavelength of the light. It reflects the sensing ability of a spectral sensor at different wavelengths. This function is usually represented by a relative value and is a function of the wavelength, indicating the response of the optoelectronic device to light of different wavelengths. The spectral response function is non-linear, that is, the relationship between the wavelength and the response is not a simple linear relationship.

[0080] In the embodiments of the present application, the spectral response function includes three functions corresponding to the R, G, and B components of the image. That is, for different image components (color channels), corresponding spectral response functions can be selected.

[0081] In the embodiments of the present application, when determining the first spectral response value corresponding to the first image and the second spectral response value corresponding to the second image based on the spectral information corresponding to the current shooting scene, first obtain the spectral response function of the first camera and the spectral response function of the second camera; determine the first spectral response value based on the spectral response function of the first camera and the spectral information corresponding to the current shooting scene; determine the second spectral response value based on the spectral response function of the second camera and the spectral information corresponding to the current shooting scene.

[0082] In some embodiments, the automatic white balance device calculates the spectral response value for each image component based on the spectral response function of the first camera and the spectral information corresponding to the current shooting scene, so as to determine the first spectral response value corresponding to the first image.

[0083] In some embodiments, the automatic white balance device calculates the spectral response value for each image component based on the spectral response function of the second camera and the spectral information corresponding to the current shooting scene, so as to determine the second spectral response value corresponding to the second image.

[0084] Exemplarily, in some embodiments, assume that the first camera is the main camera and the second camera is a non-main camera, such as a wide-angle camera. The first spectral response values corresponding to the R, G, and B components of the first image collected by the first camera are expressed as The second spectral response values corresponding to the R, G, and B channels of the second image collected by the second camera are expressed as The spectral information corresponding to the current shooting scene is expressed as S(λ). Then, the first spectral response value corresponding to the first image and the second spectral response value corresponding to the second image can be further determined with reference to the following formula:

[0085]

[0086]

[0087] Wherein, λ is the wavelength, and S(λ) is the spectral curve of the current shooting scene (the spectral information of the current shooting scene). They are the spectral response functions corresponding to the R, G, and B image components of the first image respectively. They are the spectral response functions corresponding to the R, G, and B image components of the second image respectively.

[0088] Step 103: Determine the color correction conversion data between the first camera and the second camera based on the scene environment information.

[0089] In the embodiments of the present application, after obtaining the spectral information corresponding to the current shooting scene and the scene environment information corresponding to the current shooting scene, the color correction conversion data between the first camera and the second camera can be further determined based on the scene environment information.

[0090] In the embodiments of the present application, when determining the color correction conversion data between the first camera and the second camera based on the scene environment information, first determine the first color correction data of the first camera and the second color correction data of the second camera based on the scene environment information; then determine the color correction conversion data between the first camera and the second camera based on the first color correction data and the second color correction data.

[0091] In the embodiments of the present application, the color correction data can be used to perform color correction processing on the acquired images. Among them, the color correction data includes, but is not limited to, the Color Correction Matrix (CCM). Among them, CCM is a technology used to adjust the image color to match a specific light source or ambient color.

[0092] In some embodiments, considering that some environmental information such as the illuminance and / or color temperature of the environment where the current shooting scene is located will affect the color performance of the image, therefore, it is necessary to further determine the color correction data for color correction based on the scene environment information of the current shooting scene.

[0093] In some embodiments, considering that some environmental information such as the illuminance and / or color temperature of the environment where the current shooting scene is located will affect the color performance of the image, therefore, it is necessary to further determine the color correction data for color correction based on the scene environment information of the current shooting scene, and then the color correction data can be used to perform color correction processing on the acquired images. For example, determine the CCM corresponding to the image adapted to the current shooting scene, and then perform color correction on the image acquired under the current shooting scene according to the CCM.

[0094] In an embodiment of the present application, when determining the first color correction data of the first camera and the second color correction data of the second camera based on the scene environment information, the first color correction data and the second color correction data are determined from the pre - constructed mapping relationship between the environment information and the color correction data based on the scene environment information.

[0095] That is to say, in an embodiment of the present application, the mapping relationship between the environment information and the color correction data is constructed in advance, where for different environment information, there are corresponding different color correction data.

[0096] In some embodiments, the scene environment information includes but is not limited to the ambient light color temperature and / or the ambient illuminance. Correspondingly, the pre - constructed mapping relationship between the environment information and the color correction data includes at least one of the following: the mapping relationship between the color temperature and the color correction data; the mapping relationship between the illuminance and the color correction data; the mapping relationship between the color temperature, the illuminance, and the color correction data.

[0097] In an embodiment of the present application, for different cameras, the pre - constructed mapping relationship between the environment information and the color correction data is different, that is, the pre - constructed mapping relationship between the environment information and the color correction data includes different mapping relationships corresponding to different cameras. That is to say, in the case of the same scene environment information, the mapping relationship between the environment information and the color correction data corresponding to the camera is used to determine the corresponding color correction data.

[0098] Exemplarily, in some embodiments, the pre - constructed mapping relationship between the environment information and the color correction data includes a first mapping relationship corresponding to the first camera and a second mapping relationship corresponding to the second camera. Based on the scene environment information, the first color correction data corresponding to the first image is determined from the first mapping relationship, and at the same time, based on the scene environment information, the second color correction data corresponding to the second image is determined from the second mapping relationship.

[0099] Exemplarily, in some embodiments, the first mapping relationship corresponding to the first camera included in the pre - constructed mapping relationship between the environment information and the color correction data is shown in Table 1:

[0100] Table 1

[0101] Environmental information Color correction data Scene environmental information 1 <![CDATA[CCM m1 > Scene environmental information 2 <![CDATA[CCM m2 <!-- 8 -->]]> Scene environmental information 3 <![CDATA[CCM m3 > …… ……

[0102] For example, the color correction data is CCM, the first camera is the main camera, and the color correction data corresponding to the first camera can be expressed as CCM m , for the scene environment information 1, the corresponding color correction data determined based on the first mapping relationship is CCM m1 .

[0103] Exemplarily, in some embodiments, the first mapping relationship corresponding to the first camera included in the mapping relationship between the pre-constructed environmental information and the color correction data is shown in Table 2:

[0104] Table 2

[0105] Environmental information Color correction data Scene environmental information 1 <![CDATA[CCM t1 > Scene environmental information 2 <![CDATA[CCM t2 > Scene environmental information 3 <![CDATA[CCM t3 > …… ……

[0106] For example, if the color correction data is CCM and the second camera is a non-main camera, the color correction data corresponding to the second camera can be expressed as CCM t , for the scene environmental information 2, based on the first mapping relationship, the corresponding color correction data is determined to be CCM t2 .

[0107] In the embodiments of the present application, the color correction conversion data is used to ensure the consistency of color correction processing for different images, that is, in the process of color correction processing for different images, the color correction conversion data is used to ensure the consistency of different images after color correction.

[0108] In the embodiments of the present application, assuming that the color correction data corresponding to the camera is CCM, then the color correction conversion data between different cameras can be a conversion matrix determined based on the CCM corresponding to different cameras.

[0109] Exemplarily, in some embodiments, assume that the color correction data of the first camera is CCM m , where CCM m is expressed as the color correction data of the second camera is CCM t , where CCM t is expressed as Based on CCM m and CCM t , the color correction conversion data between the first camera and the second camera can be the following formula:

[0110]

[0111] where CCM f is expressed as then the following formula can be obtained:

[0112]

[0113] In an embodiment of the present application, the color correction conversion data is used to ensure the consistency of color correction processing for different images. Therefore, applying the color correction conversion data between the first camera and the second camera to the subsequent automatic white balance processing of the first image captured by the first camera and the second image captured by the second camera can further ensure that the color effects after the automatic white balance processing tend to be consistent.

[0114] Step 104: Determine the automatic white balance parameters of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameters of the first image, and perform automatic white balance processing on the second image based on the automatic white balance parameters of the second image.

[0115] After determining the first spectral response value corresponding to the first image and the second spectral response value corresponding to the second image based on the spectral information corresponding to the current shooting scene, and at the same time determining the color correction conversion data between the first camera and the second camera based on the scene environment information, the automatic white balance parameters of the second image can be further determined based on the first spectral response value, the second spectral response value, the first data, and the automatic white balance parameters of the first image.

[0116] In an embodiment of the present application, when determining the automatic white balance parameters of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameters of the first image, first determine the relationship coefficient between the first image and the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameters of the first image; then determine the automatic white balance parameters of the second image based on the second spectral response value and the relationship coefficient.

[0117] In an embodiment of the present application, the relationship coefficient can be used to ensure the consistency of automatic white balance processing for different images, that is, in the process of performing automatic white balance processing on different images, the consistency of different images after automatic white balance processing is ensured through the relationship coefficient between different images.

[0118] In an embodiment of the present application, the automatic white balance parameters may include the gains corresponding to three image components (color channels) respectively. Among them, in the process of automatic white balance processing, generally one color channel (image component) is kept unchanged, while the gains of the other two color channels are adjusted. For example, the G channel is kept unchanged, while the gains of the B channel and the R channel are adjusted to finally obtain the automatic white balance parameters. That is to say, by adjusting the gains of the B and R channels, the outputs of these two channels are balanced with the output of the G channel, so as to restore the true color of the image.

[0119] During the process of automatic white balance, considering that the human eye is most sensitive to green and the information of the G channel is crucial for the perception of the overall color, the G channel is often selected as the reference channel. Of course, in the embodiments of the present application, for the channels that remain unchanged, it is not limited to the G channel, and other channels can also be used as the reference benchmark to remain unchanged.

[0120] Exemplarily, in some embodiments, assuming that the G channel remains unchanged as the reference channel, the spectral response value corresponding to the G channel can be selected to further determine the relationship coefficient.

[0121] In the embodiments of the present application, when determining the relationship coefficient based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameters of the first image, first determine the spectral response reference value of the second image based on the first spectral response value, the color correction conversion data, and the automatic white balance parameters of the first image; then determine the relationship coefficient based on the second spectral response value and the spectral response reference value of the second image.

[0122] In the embodiments of the present application, the spectral response reference value of the second image can represent the expected spectral response value obtained after the second image undergoes color correction and automatic white balance.

[0123] Exemplarily, in some embodiments, assuming that the G channel remains unchanged as the reference channel, the spectral response reference value of the second image includes that of the G channel Then the first spectral response value of the first image can be used Color correction conversion data And the automatic white balance parameters of the first image To further determine the spectral response reference value of the G channel of the second image Refer to the following formula:

[0124]

[0125] In the embodiments of the present application, when determining the relationship coefficient, mathematical operations can be performed based on the second spectral response value and the spectral response reference value of the second image, and the relationship coefficient is determined with reference to the operation result. Among them, the mathematical operations in this determination process include but are not limited to division operations and / or subtraction operations, etc.

[0126] Exemplarily, in some embodiments, assuming that the G channel remains unchanged as the reference channel, the spectral response value corresponding to the G channel is selected to determine the relationship coefficient. Among them, the relationship coefficient P can be determined by the spectral response value of the G channel And the spectral response reference value of the G channel To determine, refer to the following formula:

[0127]

[0128] In an embodiment of the present application, after determining the relationship coefficient between the first image and the second image, this relationship coefficient can be used to further determine the correlation of the automatic white balance parameters between the first image and the second image. Finally, based on the automatic white balance parameters of the first image that have been determined, the automatic white balance parameters of the second image are determined.

[0129] In an embodiment of the present application, when determining the automatic white balance parameters of the second image based on the second spectral response value and the relationship coefficient, an operation can be performed by combining the relationship coefficient between the first image and the second image, the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameters of the first image to obtain the automatic white balance parameters of the second image.

[0130] Exemplarily, in some embodiments, assuming that the G channel remains unchanged as the reference channel, the automatic white balance parameter of the second image corresponding to the R channel is expressed as Combined with the first spectral response value The automatic white balance parameters of the first image Color correction conversion data The second spectral response value of the second image corresponding to the R channel And the relationship coefficient P, calculate to obtain the automatic white balance parameter of the second image corresponding to the R channel Refer to the following formula:

[0131]

[0132] Exemplarily, in some embodiments, assuming that the G channel remains unchanged as the reference channel, the automatic white balance parameter of the second image corresponding to the B channel is expressed as Combined with the first spectral response value The automatic white balance parameters of the first image Color correction conversion data The second spectral response value of the second image corresponding to the B channel And the relationship coefficient P, calculate to obtain the automatic white balance parameter of the second image corresponding to the B channel Refer to the following formula:

[0133]

[0134] It can be seen that in the embodiments of the present application, during the process of performing automatic white balance on different images captured by different cameras for the same shooting scene, the color correction conversion data between different cameras is used to ensure the color consistency between different images, and the color correction conversion data is related to the scene environment information of the shooting scene. At the same time, during the above-mentioned automatic white balance process, by combining the spectral response values of different images determined based on the spectral information of the shooting scene and the above-mentioned color correction conversion data, the correlation between the automatic white balance parameters of different images is further determined. Furthermore, based on the above-mentioned correlation, the automatic white balance parameters of other images can be deduced by referring to the automatic white balance parameters of the determined images, and finally the consistency of the automatic white balance processing of different images is achieved.

[0135] That is to say, in the embodiments of the present application, by using the spectral information and scene environment information of the current shooting scene to perform the correlation between the automatic white balance parameters of different images captured by different cameras in the current shooting scene, and referring to the above-mentioned correlation to perform automatic white balance processing on different images, it is possible to ensure the consistency, accuracy, and stability of the automatic white balance between multiple images captured by multiple cameras, and finally improve the automatic white balance correction effect.

[0136] Among them, in the embodiments of the present application, the derivation calculation process of the correlation between the automatic white balance parameters of different images captured by different cameras in the current shooting scene only needs to collect and obtain the spectral information and scene environment information of the current shooting scene, does not need to rely on the pixel content of the images, and does not need to perform image matching, which greatly reduces the calculation complexity and calculation amount, and thus reduces the power consumption of performing automatic white balance.

[0137] In the embodiments of the present application, after determining the automatic white balance parameters of the second image, the second image can be further processed for automatic white balance according to the automatic white balance parameters of the second image to obtain the processed image corresponding to the second image.

[0138] Exemplarily, in some embodiments, for the second image, assuming that the three image components (channels) of the corresponding processed image are (i.e., ), the G channel remains unchanged as the reference channel, and the corresponding automatic white balance parameters are and The corresponding second spectral response value Then the process of performing automatic white balance on the second image can refer to the following formula:

[0139]

[0140] In an embodiment of the present application, before determining the automatic white balance parameter of the second image in combination with the automatic white balance parameter of the first image, the automatic white balance parameter of the first image may be determined first. Among them, for the method of determining the automatic white balance parameter of the first image, the present application does not specifically define it. For example, the AGW algorithm or other algorithms are used to determine the automatic white balance parameter of the first image. Among them, the AGW algorithm is a method for calculating the AWB gain.

[0141] In an embodiment of the present application, Figure 3 is a schematic flowchart of the implementation process of the automatic white balance method proposed in the embodiment of the present application. As Figure 3 shown, the automatic white balance method may include the following steps:

[0142] Step 105: Determine the automatic white balance parameter of the first image based on the first spectral response value.

[0143] Step 106: Perform automatic white balance processing on the first image based on the automatic white balance parameter of the first image.

[0144] In an embodiment of the present application, after obtaining the first spectral response value corresponding to the first image, the automatic white balance parameter of the first image may be determined according to the first spectral response value. Then, the first image may be further subjected to automatic white balance processing according to the automatic white balance parameter of the first image to obtain the processed image corresponding to the first image. At the same time, the automatic white balance parameter of the second image may be further determined according to the automatic white balance parameter of the first image in combination with the relationship coefficient derived between the first image and the second image.

[0145] Exemplarily, in some embodiments, for the first image, assuming that the three image components (channels) of the corresponding processed image are respectively (that is, ), the G channel remains unchanged as the reference channel, and the corresponding automatic white balance parameters are respectively and The corresponding first spectral response value Then the process of performing automatic white balance on the first image may refer to the following formula:

[0146]

[0147] In an embodiment of the present application, Figure 4 is a schematic flowchart of the implementation process of the automatic white balance method proposed in the embodiment of the present application. As Figure 4 shown, the automatic white balance method may include the following steps:

[0148] Step 107: Calibrate the automatic white balance parameter of the first image based on the spectral information corresponding to the current shooting scene.

[0149] In an embodiment of the present application, the automatic white balance parameter of the first image can also be determined in combination with the spectral information corresponding to the current shooting scene. Among them, the spectral information corresponding to the current shooting scene is selected to calibrate the automatically white balance parameter of the initially determined first image, thereby improving the accuracy of the automatic white balance processing of the first image and the second image.

[0150] Exemplarily, in some embodiments, it is assumed that the first camera is the main camera, and the automatic white balance parameter awbGain of this main camera (such as ) calculation method can be combined with the spectral information of the currently captured shooting scene. For example, the spectral information is used to calibrate the awbGain of the main camera obtained by preliminary calculation, and finally the accuracy of the automatic white balance is improved.

[0151] In summary, the automatic white balance method proposed in the embodiments of the present application improves the consistency of the automatic white balance between multiple images collected by multiple cameras based on the spectral information and scene environment information of the current shooting scene, and can solve the problems of inconsistent automatic white balance effects, unstable performance, and inaccurate automatic white balance effects between multiple cameras; at the same time, it can also greatly reduce the computational complexity and amount of calculation in the automatic white balance process, improve the processing efficiency, and reduce the power consumption.

[0152] The automatic white balance method proposed in the embodiments of the present application can be applied to various scenarios, including but not limited to shooting a gray card scene, a light source scene, a non-gray card scene, etc.

[0153] An embodiment of the present application proposes an automatic white balance method, which obtains the spectral information corresponding to the current shooting scene and the scene environment information corresponding to the current shooting scene; determines the first spectral response value corresponding to the first image and the second spectral response value corresponding to the second image based on the spectral information corresponding to the current shooting scene; wherein, the first image is obtained by shooting in the current shooting scene through the first camera, and the second image is obtained by shooting in the current shooting scene through the second camera; determines the color correction conversion data between the first camera and the second camera based on the scene environment information; determines the automatic white balance parameter of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data and the automatic white balance parameter of the first image, and performs automatic white balance processing on the second image based on the automatic white balance parameter of the second image. That is to say, in the present application, the correlation between the automatic white balance parameters of different images collected by different cameras in the current shooting scene is carried out through the spectral information and the scene environment information of the current shooting scene, and the different images are subjected to automatic white balance processing with reference to the above correlation, which can ensure the consistency, accuracy and stability of the automatic white balance among multiple images collected by multiple cameras, and finally improve the automatic white balance correction effect. At the same time, the derivation and calculation process of the correlation between the automatic white balance parameters of different images collected by different cameras in the current shooting scene only need to collect and obtain the spectral information and the scene environment information of the current shooting scene, greatly reducing the complexity and amount of calculation, thereby reducing the power consumption of performing automatic white balance.

[0154] Based on the above embodiment, another embodiment of the present application proposes an automatic white balance method. In a multi-camera scenario, the light source spectral data of the shooting scene can be obtained through a separate spectral sensor (that is, the correction coefficient of automatic white balance only relates to the light source spectrum), and the spectral response functions SRF of multiple pre-calibrated image sensors, then the relationship coefficient of automatic white balance between the secondary camera and the main camera can be calculated. The relationship coefficient of automatic white balance between multiple cameras does not depend on the pixel values of the main and secondary camera images, only depends on the spectral information, does not require image matching, does not depend on the image pixel content, the corrected color effects tend to be consistent, and the calculation process is simple, improving the accuracy and stability of the automatic white balance correction of multiple cameras.

[0155] For the application scenarios of the automatic white balance method proposed in the embodiments of the present application, the present application does not make specific limitations. For example, it includes, but is not limited to, one or more scenarios such as shooting a gray card scene, a light source scene, a non-gray card scene, etc.

[0156] Next, an example of a non-gray card shooting scene is used to exemplarily illustrate the automatic white balance method proposed in the embodiments of the present application.

[0157] Assume that the main camera in a multi-camera scenario is represented by main, abbreviated as m, and the secondary cameras (telephoto, wide-angle, etc.) are represented by tele, abbreviated as t. The target value is represented by dst, abbreviated as d. Gain is the normalized value of gain. The spectral response function is represented by SRF. For example, represents the spectral response function of the R channel of the main camera main. The spectral curve is represented by S.

[0158] For the scenario of shooting a gray card or a light source scene, when determining the correlation between different cameras, the following assumptions can be made first:

[0159]

[0160]

[0161] where K is a preset coefficient, and R d , G d , B d are the target values after processing for the three image components (channels) respectively. R m , G m , B m are the initial values of the three image components (channels) of the image captured by the main camera respectively. The automatic white balance parameters corresponding to the image captured by the main camera are The automatic white balance parameters corresponding to the image captured by the secondary camera are

[0162] It can be seen from the above formula that:

[0163]

[0164] Derive through Fun(S) Then

[0165]

[0166] where Fun(S) can be determined by the spectral response function SRF. Refer to the following formula:

[0167]

[0168] Then:

[0169]

[0170] where is mainly related to the ambient light. For S, if the reflection spectrum is used, This coefficient is highly related to the reflector. The coefficients calculated for the same light source but different reflectors are different. Only when using the light source spectrum or the spectrum reflected by a gray card for S can the Gain coefficients for different reflectors be kept unchanged. Except for the gray card, the three target Ks (preset coefficients) after reflection by any reflector are not equal. After automatic white balance correction, except for gray, there is no hue, and the rest have colors. There are differences in the colors corrected by the two cameras. Therefore, this method can only use the reflected spectrum of the gray card or the light source spectrum to calibrate the relationship coefficients between different images collected by different cameras.

[0171] For non-gray card shooting scenarios, if the main camera and the secondary camera shoot the same scene, the spectrum reflected by the shooting object in this scene (non-gray card, such as other solid color boards) is used to correct the raw images taken by the two cameras (sensors) with the pre-calibrated automatic white balance parameters (awbGain). There will be differences in the corrected colors (brightness, hue, saturation).

[0172] In the embodiments of the present application, according to the chromaticity and color temperature of the current shooting environment, the pre-calibrated CCM is selected to perform color correction on the image. In this way, the values of the three image components after automatic white balance and color correction of the images collected by the two cameras are theoretically exactly the same. Based on such a consistency relationship, the relationship of awbGain between the two cameras can be deduced.

[0173] Figure 5 Schematic diagram for implementing the automatic white balance method proposed in the embodiments of the present application, as Figure 5 shown. For multi-camera scenarios, multiple light sources with known color temperatures and color cards can be used to calibrate the CCMs of the main camera and the secondary camera under different color temperatures (and / or chromaticities), m CCM t that is, pre-construct the mapping relationship between environmental information and color correction data. During the process of shooting the same scene to obtain different images, spectral information (step 501) can also be collected, such as the spectral curve S, and at the same time, the corresponding scene environment parameters (step 502) can be obtained, such as the ambient light color temperature and / or ambient illuminance; obtain the spectral response functions SRF of the main camera and the secondary camera (step 503), and based on the SRF of the main camera and the secondary camera obtained, determine the spectral response values of the main camera and the secondary camera based on the spectral curve S (step 504); based on the spectral response values of the main camera and the secondary camera, the awbGain of the image collected by the main camera can be calculated through the AGW algorithm or other methods (step 505), that is, and perform automatic white balance on the image collected by the main camera based on this awbGain (step 506); based on the obtained scene environment parameters, combined with the pre-constructed mapping relationship between environmental information and color correction data, further determine the color correction data (color correction matrix) of the main camera and the secondary camera (step 507), such as CCMm and CCM t , and in combination with CCM m and CCM t Determine color correction conversion data (color correction conversion matrix) (step 508), such as CCM f ; then, determine the relationship coefficient between the main camera image and the secondary camera image according to the above parameters (step 509), and finally determine the automatic white balance parameter of the secondary camera by combining the relationship coefficient and the automatic white balance parameter of the main camera (step 510), and perform automatic white balance processing on the image collected by the secondary camera (step 511).

[0174] Exemplarily, in some embodiments, a mapping relationship between environmental information and color correction data may be pre-constructed, including but not limited to the mapping relationship between color temperature and color correction data, the mapping relationship between illuminance and color correction data, the mapping relationship between color temperature, illuminance, and color correction data.

[0175] For example, CCM m is expressed as CCM t is expressed as

[0176] Exemplarily, in some embodiments, spectral information may be collected by a ColorSensor.

[0177] Exemplarily, in some embodiments, the current ambient light color temperature and illuminance lux are obtained by a ColorSensor, and then the CCMs of the main and secondary cameras are obtained by interpolation using the color temperature, lux, and the CCMs calibrated in advance for different color temperatures m 、CCM t .

[0178] Exemplarily, when performing automatic white balance on the image collected by the main camera based on the awbGain of the image collected by the main camera, the following formula may be referred to:

[0179]

[0180] Among them, the three image components (channels) of the corresponding processed image are respectively (i.e., ), the G channel remains unchanged as the reference channel, and the corresponding automatic white balance parameters are respectively and The corresponding first spectral response value

[0181] Exemplarily, the calculation method of the awbGain of the main camera may combine the spectral information collected by the ColorSensor, calibrate its result, and finally improve the accuracy of the awbGain of the secondary camera.

[0182] Exemplarily, in some embodiments, when determining the spectral response values of the main camera and the secondary camera based on the spectral curve S in the SRF combining the main camera and the secondary camera, the following formula can be referred to:

[0183]

[0184] Where λ is the wavelength, and S(λ) is the spectral curve (spectral information) of the current shooting scene. are the spectral response functions corresponding to the R, G, and B image components of the first image (the image captured by the main camera), respectively. are the spectral response functions corresponding to the R, G, and B image components of the second image (the image captured by the secondary camera), respectively. The first spectral response values corresponding to the R, G, and B components of the first image are expressed as The second spectral response values corresponding to the R, G, and B channels of the second image are expressed as

[0185] Exemplarily, in some embodiments, assume that:

[0186]

[0187] Where, based on the pre-constructed CCMs of the main and secondary cameras m and CCM t , it is expected that the RGB values after CCM correction of the main and secondary cameras are the same, that is:

[0188]

[0189]

[0190] Obtain the color correction conversion matrix CCM f , and let:

[0191]

[0192] Then:

[0193]

[0194] Assume that the post-processing process after automatic white balance is as follows:

[0195]

[0196] Actually and There are differences in the calculated results. Define the relationship coefficient (i.e., the proportionality coefficient) between the two as P, then:

[0197]

[0198] Furthermore, the automatic white balance parameters of the secondary camera can be determined. and

[0199]

[0200] Exemplarily, when performing automatic white balance on the image captured by the secondary camera based on the awbGain of the image captured by the secondary camera, the following formula can be referred to:

[0201]

[0202] Wherein, the three image components (channels) of the processed image are respectively (i.e., ), the G channel remains unchanged as the reference channel, and the corresponding automatic white balance parameters are respectively and The corresponding second spectral response value

[0203] Exemplarily, in some embodiments, the awbGain calculation method of the main camera can combine CS spectral information to calibrate its result, and finally improve the accuracy of the awbGain of the secondary camera.

[0204] In summary, the automatic white balance method proposed in the embodiments of the present application improves the consistency of automatic white balance among multiple images captured by multiple cameras based on the spectral information and scene environment information of the current shooting scene, and can solve the problems of inconsistent automatic white balance effects, unstable performance, and inaccurate automatic white balance effects among multiple cameras; at the same time, it can also greatly reduce the computational complexity and amount of calculation in the automatic white balance process, improve the processing efficiency, and reduce the power consumption.

[0205] An embodiment of the present application provides an automatic white balance method, which obtains spectral information corresponding to the current shooting scene and scene environment information corresponding to the current shooting scene; determines a first spectral response value corresponding to a first image and a second spectral response value corresponding to a second image based on the spectral information corresponding to the current shooting scene; wherein, the first image is obtained by shooting in the current shooting scene through a first camera, and the second image is obtained by shooting in the current shooting scene through a second camera; determines color correction conversion data between the first camera and the second camera based on the scene environment information; determines the automatic white balance parameter of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameter of the first image, and performs automatic white balance processing on the second image based on the automatic white balance parameter of the second image. That is to say, in the present application, the correlation between the automatic white balance parameters of different images collected by different cameras in the current shooting scene is obtained through the spectral information and scene environment information of the current shooting scene, and the automatic white balance processing of different images is performed with reference to the above correlation, which can ensure the consistency, accuracy, and stability of the automatic white balance among multiple images collected by multiple cameras, and finally improve the automatic white balance correction effect. At the same time, the derivation and calculation process of the correlation between the automatic white balance parameters of different images collected by different cameras in the current shooting scene only need to collect and obtain the spectral information and scene environment information of the current shooting scene, greatly reducing the complexity and calculation amount of the calculation, thereby reducing the power consumption of performing automatic white balance.

[0206] Based on the above embodiment, in another embodiment of the present application, Figure 6 is a schematic structural diagram of the composition of the automatic white balance device proposed in the embodiment of the present application, as Figure 6 shown, the automatic white balance device 110 proposed in the embodiment of the present application may include:

[0207] An acquisition unit 1101, configured to acquire spectral information corresponding to the current shooting scene and scene environment information corresponding to the current shooting scene;

[0208] A determination unit 1102, configured to determine a first spectral response value corresponding to a first image and a second spectral response value corresponding to a second image based on the spectral information corresponding to the current shooting scene; wherein, the first image is obtained by shooting in the current shooting scene through a first camera, and the second image is obtained by shooting in the current shooting scene through a second camera; determine color correction conversion data between the first camera and the second camera based on the scene environment information; determine the automatic white balance parameter of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameter of the first image;

[0209] A processing unit 1103, configured to perform automatic white balance processing on the second image based on the automatic white balance parameters of the second image.

[0210] In an embodiment of the present application, further, Figure 7 It is a schematic structural diagram of the composition of the electronic device proposed in the embodiment of the present application. As Figure 7 shown, the electronic device 120 proposed in the embodiment of the present application may include a processor 1201, a memory 1202, a communication interface 1203, and a bus 1204 for connecting the processor 1201, the memory 1202, and the communication interface 1203.

[0211] In an embodiment of the present application, the above-mentioned processor 1201 may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It can be understood that for different devices, the electronic devices for implementing the above-mentioned processor functions may be others, and the embodiments of the present application do not make specific limitations. The electronic device 120 may further include a memory 1202, and the memory 1202 may be connected to the processor 1201. Among them, the memory 1202 is used to store executable program codes, and the program codes include computer operation instructions. The memory 1202 may include a high-speed RAM memory and may also include non-volatile memory, for example, at least two disk memories.

[0212] In an embodiment of the present application, the bus 1204 is used to connect the communication interface 1203, the processor 1201, and the memory 1202 and for mutual communication between these devices.

[0213] In practical applications, the above-mentioned memory 1202 can be a volatile memory, such as a Random-Access Memory (RAM); or a non-volatile memory, such as a Read-Only Memory (ROM), a flash memory, a Hard Disk Drive (HDD), or a Solid-State Drive (SSD); or a combination of the above types of memories, and provide instructions and data to the processor 1201.

[0214] Further, in the embodiments of the present application, the processor 1201 is configured to:

[0215] Obtain the spectral information corresponding to the current shooting scene and the scene environment information corresponding to the current shooting scene;

[0216] Determine a first spectral response value corresponding to the first image and a second spectral response value corresponding to the second image based on the spectral information corresponding to the current shooting scene; wherein, the first image is obtained by shooting in the current shooting scene through the first camera, and the second image is obtained by shooting in the current shooting scene through the second camera;

[0217] Determine the color correction conversion data between the first camera and the second camera based on the scene environment information;

[0218] Determine the automatic white balance parameter of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameter of the first image, and perform automatic white balance processing on the second image based on the automatic white balance parameter of the second image.

[0219] In addition, each functional module in this embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional module.

[0220] When an integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.

[0221] An embodiment of this application provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, it implements the automatic white balance method as described above.

[0222] Specifically, the program instructions corresponding to an automatic white balance method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to an automatic white balance method in the storage medium are read or executed by an electronic device, the following steps are included:

[0223] Obtain the spectral information corresponding to the current shooting scene and the scene environment information corresponding to the current shooting scene;

[0224] Determine the first spectral response value corresponding to the first image and the second spectral response value corresponding to the second image based on the spectral information corresponding to the current shooting scene; wherein, the first image is obtained by shooting in the current shooting scene through a first camera, and the second image is obtained by shooting in the current shooting scene through a second camera;

[0225] Determine the color correction conversion data between the first camera and the second camera based on the scene environment information;

[0226] Determine the automatic white balance parameter of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameter of the first image, and perform automatic white balance processing on the second image based on the automatic white balance parameter of the second image.

[0227] An embodiment of this application also provides a computer program product.

[0228] In some embodiments, this computer program product may include a computer program or instructions.

[0229] In some embodiments, the computer program product can be applied to the computer device in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the computer device in the various methods of the embodiments of the present application. For the sake of brevity, they will not be elaborated here.

[0230] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0231] The present application is described with reference to the schematic flowcharts and / or block diagrams of the implementation processes of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the schematic flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the schematic flowchart and / or block diagram can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in one or more of the following Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0232] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the specified functions in one or more of the following Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0233] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate computer-implemented processing, and thus the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in one or more of the following Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0234] As described above, the above are only the preferred embodiments of the present application, and are not used to limit the protection scope of the present application.

Claims

1. An automatic white balance method, characterized in that: The method comprises: Acquire spectrum information corresponding to a current shooting scene and scene environment information corresponding to the current shooting scene; Determine a first spectral response value corresponding to the first image and a second spectral response value corresponding to the second image based on spectral information corresponding to the current shooting scene; wherein the first image is obtained by shooting with a first camera in the current shooting scene, and the second image is obtained by shooting with a second camera in the current shooting scene; Determining color correction conversion data between the first camera and the second camera based on the scene environment information; Based on the first spectral response value, the second spectral response value, the color correction conversion data and the automatic white balance parameters of the first image, the automatic white balance parameters of the second image are determined, and the automatic white balance processing is performed on the second image based on the automatic white balance parameters of the second image.

2. The method according to claim 1, characterized in that The determining, based on the scene environment information, color correction conversion data between the first camera and the second camera includes: Determine first color correction data of the first camera and second color correction data of the second camera based on the scene environment information; The color correction conversion data between the first camera and the second camera is determined based on the first color correction data and the second color correction data.

3. The method according to claim 2, characterized in that The scene environment information includes the ambient light color temperature and / or the ambient light illumination, and determining the first color correction data of the first camera and the second color correction data of the second camera based on the scene environment information includes: Based on the scene environment information, the first color correction data and the second color correction data are determined from a pre-constructed mapping relationship between the environment information and the color correction data; wherein, The mapping relationship between the pre-built environment information and the color correction data includes at least one of the following: The mapping relationship between color temperature and color correction data; The mapping relationship between illumination and color correction data; The mapping relationship between color temperature, illumination, and color correction data.

4. The method according to claim 1, characterized in that: The step of determining the automatic white balance parameter of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameter of the first image comprises: determining a relationship coefficient between the first image and the second image based on the first spectral response value, the second spectral response value, the color correction conversion data, and an automatic white balance parameter of the first image; Based on the second spectral response value and the relationship coefficient, an automatic white balance parameter of the second image is determined.

5. The method according to claim 4, characterized in that The determining, based on the first spectral response value, the second spectral response value, the color correction conversion data, and the automatic white balance parameter of the first image, a relationship coefficient between the first image and the second image comprises: determining a spectral response reference value of the second image based on the first spectral response value, the color correction conversion data, and an automatic white balance parameter of the first image; The relationship coefficient is determined based on the second spectral response value and a spectral response reference value of the second image.

6. The method according to any one of claims 1 to 5, characterized in that The determining, based on the spectral information corresponding to the current shooting scene, a first spectral response value corresponding to the first image and a second spectral response value corresponding to the second image includes: Obtaining a spectral response function of the first camera and a spectral response function of the second camera; Determining the first spectral response value based on the spectral response function of the first camera and spectral information corresponding to the current shooting scene; The second spectral response value is determined based on the spectral response function of the second camera and the spectral information corresponding to the current shooting scene.

7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: determining an automatic white balance parameter of the first image based on the first spectral response value; Automatic white balance processing is performed on the first image based on the automatic white balance parameters of the first image.

8. The method according to claim 7, characterized in that The method further comprises: The automatic white balance parameters of the first image are calibrated based on the spectral information corresponding to the current shooting scene.

9. An automatic white balance device, characterized in that: The automatic white balance device comprises: An acquisition unit, used to acquire spectrum information corresponding to a current shooting scene and scene environment information corresponding to the current shooting scene; A determination unit, configured to determine a first spectral response value corresponding to a first image and a second spectral response value corresponding to a second image based on spectral information corresponding to the current shooting scene; wherein the first image is obtained by shooting with a first camera in the current shooting scene, and the second image is obtained by shooting with a second camera in the current shooting scene; determine color correction conversion data between the first camera and the second camera based on the scene environment information; determine automatic white balance parameters of the second image based on the first spectral response value, the second spectral response value, the color correction conversion data and automatic white balance parameters of the first image; A processing unit is used to perform automatic white balance processing on the second image based on the automatic white balance parameters of the second image.

10. An electronic device, characterized in that: The electronic device includes a processor and a memory storing instructions executable by the processor. When the instructions are executed by the processor, the method according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 8 is implemented.