WO2021159414A1 - White balance control method and apparatus, electronic device and computer-readable storage medium - Google Patents

White balance control method and apparatus, electronic device and computer-readable storage medium Download PDF

Info

Publication number
WO2021159414A1
WO2021159414A1 PCT/CN2020/075142 CN2020075142W WO2021159414A1 WO 2021159414 A1 WO2021159414 A1 WO 2021159414A1 CN 2020075142 W CN2020075142 W CN 2020075142W WO 2021159414 A1 WO2021159414 A1 WO 2021159414A1
Authority
WO
WIPO (PCT)
Prior art keywords
gain
image
parameter
gain parameter
image sensor
Prior art date
Application number
PCT/CN2020/075142
Other languages
French (fr)
Chinese (zh)
Inventor
杨超
Original Assignee
深圳元戎启行科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳元戎启行科技有限公司 filed Critical 深圳元戎启行科技有限公司
Priority to CN202080003125.3A priority Critical patent/CN113545033A/en
Priority to PCT/CN2020/075142 priority patent/WO2021159414A1/en
Publication of WO2021159414A1 publication Critical patent/WO2021159414A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control

Definitions

  • This application relates to the field of image processing, and in particular to a white balance control method, device, electronic equipment, and computer-readable storage medium.
  • White balance is a calculation method of digital image color processing that restores the color of the white subject to accurately restore the color of other objects. That is, when shooting a white object, a white image is obtained, and the camera outputs red, green, and blue signals that are equal to white balance.
  • image sensors often use multi-frame or multi-pixel synthesis.
  • the white balance processing will cause the RGB imbalance of the image, and the image is prone to color cast.
  • a white balance control method is applied to an electronic device, the electronic device includes an image sensor, and the method includes:
  • a second gain parameter is obtained according to the first gain parameter and the image gain parameter, and the second gain parameter is used to be built in the image sensor so that the image sensor obtains a second image, the second image And the first image are two images continuously collected by the image sensor.
  • a white balance control device is applied to an electronic device, the electronic device includes an image sensor, and the device includes:
  • An acquisition module configured to acquire a first image by using the image sensor, and the image sensor has a built-in first gain parameter
  • the first acquiring module is configured to acquire the image gain parameter corresponding to the first image
  • the second acquisition module is configured to acquire a second gain parameter according to the first gain parameter and the image gain parameter, and the second gain parameter is used to be built in the image sensor so that the image sensor acquires the second gain parameter. Images, the second image and the first image are two images continuously collected by the image sensor.
  • An electronic device includes a memory and a processor, and a computer program is stored in the memory.
  • the processor executes the steps of the white balance control method.
  • a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method when the computer program is executed by a processor.
  • the above-mentioned white balance control method, device, electronic equipment, and computer-readable storage medium are applied to electronic equipment.
  • the electronic equipment includes an image sensor.
  • the method includes: using the image sensor to collect a first image, and the image sensor is There is a first gain parameter; the image gain parameter corresponding to the first image is obtained; the second gain parameter is obtained according to the first gain parameter and the image gain parameter, and the second gain parameter is used to be built into the image
  • the image sensor acquires a second image, and the second image and the first image are two images continuously collected by the image sensor.
  • a first gain parameter is built in the image sensor, and then a first image of the current scene is acquired based on the first gain parameter, and the first image is analyzed to obtain the image gain parameter, and the first gain parameter and the image gain parameter are used To the second gain parameter, and update the first gain parameter in the image sensor to the second gain parameter to collect the next image.
  • This application obtains the second gain parameter through the first gain parameter built in the image sensor and the image gain parameter of the current scene.
  • the second gain parameter is updated in the image sensor, and the number of pixel bits is limited to ensure that each The actual maximum value of the R, G, and B pixels are all less than the maximum value of the full scale of the pixel, and can make the R pixel, G pixel and B pixel after the white balance processing of the electronic device are all within the full scale, alleviating the deviation of the highlight part of the image Color problem.
  • FIG. 1 is a schematic diagram of an application environment of a white balance control method in an embodiment
  • Figure 2 is a flowchart of a white balance control method in an embodiment
  • FIG. 3 is a flowchart of obtaining a second gain parameter according to the first gain parameter and the image gain parameter in one embodiment
  • FIG. 4 is a flowchart of obtaining a second gain parameter according to the first gain parameter and the image gain parameter in another embodiment
  • FIG. 5 is a flowchart of steps in an embodiment of obtaining the image gain parameter corresponding to the first image
  • Fig. 6 is a structural block diagram of a white balance control device in an embodiment
  • Fig. 7 is a schematic diagram of the internal structure of an electronic device in an embodiment.
  • first, second, etc. used in this application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
  • the first image may be referred to as the second image, and similarly, the second image may be referred to as the first image. Both the first image and the second image are images, but they are not the same image.
  • Fig. 1 is a schematic diagram of an application environment of a white balance control method in an embodiment.
  • the application environment includes an electronic device 10, and the electronic device 10 includes an image sensor 110.
  • the electronic device 10 acquires the first image by using the image sensor 110, the image sensor 110 has a built-in first gain parameter; acquires the image gain parameter corresponding to the first image; acquires the second gain parameter according to the first gain parameter and the image gain parameter, and the second gain parameter
  • the gain parameter is used to be built into the image sensor 110 so that the image sensor 110 obtains a second image, and the second image and the first image are two images continuously collected by the image sensor.
  • This application obtains the second gain parameter through the first gain parameter built in the image sensor and the image gain parameter of the current scene.
  • the second gain parameter is updated in the image sensor, and the number of pixel bits is limited to ensure that each The actual maximum value of the R, G, and B pixels are all less than the maximum value of the full scale of the pixel, and can make the R pixel, G pixel and B pixel after the white balance processing of the electronic device are all within the full scale, alleviating the deviation of the highlight part of the image Color problem.
  • the full scale of one pixel of the image sensor is 20bit, but the actual maximum output is less than 20bit, such as 19.5bit.
  • the R pixel and the B pixel are each multiplied by a gain to increase the R pixel and the B pixel, which may cause the R pixel and the B pixel to exceed 19.5 bits.
  • the R pixel and B pixel exceeding the full scale will cause RGB imbalance, and the R pixel and B pixel have higher brightness, which makes the highlight part appear color cast.
  • Fig. 2 is a flowchart of a white balance control method in an embodiment.
  • the white balance control method in this embodiment is described by taking the electronic device in FIG. 1 as an example.
  • the electronic device includes an image sensor.
  • the white balance control method includes step 202 to step 206.
  • step 202 using an image sensor to collect a first image, the image sensor has a built-in first gain parameter;
  • step 204 acquiring an image gain parameter corresponding to the first image;
  • step 206 acquiring a second image according to the first gain parameter and the image gain parameter
  • the gain parameter, the second gain parameter is used to be built into the image sensor to enable the image sensor to obtain a second image, and the second image and the first image are two images continuously collected by the image sensor.
  • the first gain parameter before using the image sensor to collect the first image, the first gain parameter may be set first, and the first gain parameter may include: the first R gain, the first G gain, and the first B gain.
  • the first R gain, the first G gain, and the first B gain in the image sensor are all configured to be 1.
  • the first image of the current scene is collected by using the image sensor set with the first gain parameter, and the first image may be a grayscale image or a visible light image.
  • Use the white balance gain algorithm to analyze the gray information of the R channel, the G channel and the B channel and the second gain parameter in the first image.
  • the second gain parameter includes: the second R gain, the second G gain, and the second B gain.
  • Obtaining the second gain parameter according to the first gain parameter and the image gain parameter refers to obtaining the second R gain according to the first R gain in the first gain parameter and the image R gain in the image gain parameter; Obtain the second G gain according to the first G gain in the first gain parameter and the image G gain in the image gain parameter; obtain the second B gain according to the first B gain in the first gain parameter and the image B gain in the image gain parameter.
  • the acquired second gain parameter to the image sensor so that the image sensor acquires the second image acquired by the current scene, the second image and the first image are two images continuously collected by the image sensor, and the second image is the white balance gain
  • the color cast in the highlight part of the second image has been corrected to alleviate the color cast in the highlight part of the image.
  • the first gain parameter is built in the image sensor, and then the first image of the current scene is acquired based on the first gain parameter, and the first image is analyzed to obtain the image gain parameter, and the first gain parameter and the image gain are used.
  • the second gain parameter of the parameter is reached, and the first gain parameter in the image sensor is updated to the second gain parameter to acquire the next image.
  • This application obtains the second gain parameter through the first gain parameter built in the image sensor and the image gain parameter of the current scene.
  • the second gain parameter is updated in the image sensor, and the number of pixel bits is limited to ensure that each The actual maximum value of the R, G, and B pixels are all less than the maximum value of the full scale of the pixel, and can make the R pixel, G pixel and B pixel after the white balance processing of the electronic device are all within the full scale, alleviating the deviation of the highlight part of the image Color problem.
  • the step of obtaining the image gain parameter corresponding to the first image includes: obtaining the image gain parameter according to the gray information of the first image, where the image gain parameter includes: image R gain and image B gain.
  • the white balance gain algorithm is used to analyze the gray information of the R channel and the B channel in the first image and the second gain parameter
  • the second gain parameter includes: the image R gain and the image B gain.
  • the image G gain is set to a constant value such as 0.9, 1, 1.1, etc. In this embodiment, there is no need to obtain the image G gain in the image gain parameter, which reduces the computational complexity of the white balance gain algorithm for analyzing the first image, and improves Obtain the efficiency of the image gain parameter corresponding to the first image.
  • the step of obtaining the second gain parameter according to the first gain parameter and the image gain parameter includes: step 302 to step 306.
  • step 302 the second R gain is set to the product of the first R gain and the image R gain
  • step 304 the second G gain is set to be equal to the first G gain
  • step 306 the second B gain is set to The product of the first B gain and the image B gain.
  • the second R gain is obtained according to the first R gain in the first gain parameter and the image R gain in the image gain parameter, and the second R gain may be set as the product of the first R gain and the image R gain;
  • the first G gain in the first gain parameter and the image G gain in the image gain parameter obtain the second G gain, and the second G gain can be set to be equal to the first G gain; according to the first B gain in the first gain parameter And the image B gain in the image gain parameter to obtain the second B gain, which may be the product of the first B gain and the image B gain.
  • the second gain corresponding to the R channel and the B channel is set as the product of the corresponding first gain and the corresponding image gain.
  • the algorithm is simple and can efficiently perform white balance processing, so that the R pixels, G pixels, and B pixels are all full. Within the range, alleviate the color cast problem of the highlight part of the image.
  • the step of setting the second G gain to be equal to the first G gain includes: setting both the second G gain and the first G gain to 1. Since the sensitivity of the G pixel is relatively high, it generally does not need to be increased. Setting the second G gain and the first G gain to a constant value of 1, not only reduces the computational complexity of the algorithm, but also ensures the imaging effect of the image sensor.
  • the step of obtaining the image gain parameter corresponding to the first image includes: obtaining the image gain parameter according to the gray information of the first image, and the image gain parameter includes: image R gain, image G gain, and image B gain.
  • the white balance gain algorithm is used to analyze the gray information of the R channel, the G channel, and the B channel and the second gain parameter in the first image.
  • the second gain parameter includes: image R gain, image G gain, and image B gain. Calculating the image R gain, image G gain, and image B gain separately can make the obtained second gain parameter more accurate, better white balance performance, and better imaging effect of the image acquired by the image sensor.
  • the second gain parameter includes: a second R gain, a second G gain, and a second B gain
  • the first gain parameter includes: a first R gain, a first G gain, and a first B gain
  • Obtaining the second gain parameter according to the first gain parameter and the image gain parameter includes: step 402 to step 406.
  • step 402 the second R gain is set to the product of the first R gain and the image R gain
  • step 404 the second G gain is set to the product of the first G gain and the image G gain
  • step 406 the second The B gain is set as the product of the first B gain and the image B gain.
  • the second R gain is obtained according to the first R gain in the first gain parameter and the image R gain in the image gain parameter, and the second R gain may be set as the product of the first R gain and the image R gain;
  • the first G gain in a gain parameter and the image G gain in the image gain parameter obtain the second G gain.
  • the second G gain can be set as the product of the first G gain and the image G gain;
  • the image B gain in the first B gain and image gain parameters obtains the second B gain, which may be the product of the first B gain and the image B gain.
  • the second gain corresponding to the R channel, the G channel, and the B channel is set as the product of the corresponding first gain and the corresponding image gain.
  • the algorithm is simple, can efficiently and accurately perform white balance processing, and can make R pixels and G pixels And B pixels are within the full scale, alleviating the color cast problem of the highlight part of the image.
  • the step of obtaining the image gain parameter corresponding to the first image includes: step 502 and step 504. Among them, step 502, obtain the gray information of the first image by using the gray world algorithm; step 504, obtain the image gain parameter according to the gray information of the first image.
  • the gray world algorithm assumes that for a picture with rich colors, the average value of the three channels of R, G, and B on the image should be equal to a value K called "gray". Half of the maximum value of each channel can be used as the "gray" value K, and the average value of the average values of the three channels of the picture to be processed can be used as the "gray" value K.
  • the gray world algorithm can be used to obtain the image gain parameters simply and quickly, and then the image gain parameters are combined with the built-in first gain parameter of the image sensor to obtain the second gain parameter, and the second gain parameter is built into the image sensor, which can realize the image gain parameter.
  • White balance processing can make R pixels, G pixels and B pixels all within the full range, alleviating the color cast problem in the highlight part of the image.
  • Fig. 6 is a structural block diagram of a white balance control device according to an embodiment.
  • the white balance control device shown in FIG. 6 is applied to electronic equipment.
  • the electronic equipment includes an image sensor.
  • the white balance control device includes: an acquisition module 602, a first acquisition module 604, and a second acquisition module 606.
  • the acquisition module 602 is used to acquire a first image using an image sensor, and the image sensor has a built-in first gain parameter; the first acquisition module 604 is used to acquire image gain parameters corresponding to the first image; and the second acquisition module 606 uses In order to obtain the second gain parameter according to the first gain parameter and the image gain parameter, the second gain parameter is used to be built into the image sensor so that the image sensor obtains the second image, and the second image and the first image are two consecutively collected images by the image sensor. Images.
  • the acquisition module 602 acquires a first image of the current scene by using an image sensor set with a first gain parameter, and the first image may be a grayscale image or a visible light image.
  • the first acquisition module 604 uses the white balance gain algorithm to analyze the gray information of the R channel, the G channel and the B channel and the second gain parameter in the first image.
  • the second gain parameter includes: the second R gain, the second G gain, and the second gain parameter.
  • the second B gain may also include only any two of the second R gain, the second G gain, and the second B gain.
  • the second acquiring module 606 acquiring the second gain parameter according to the first gain parameter and the image gain parameter refers to acquiring the second R gain according to the first R gain in the first gain parameter and the image R gain in the image gain parameter;
  • the first G gain in the first gain parameter and the image G gain in the image gain parameter obtain the second G gain;
  • the second B gain is obtained according to the first B gain in the first gain parameter and the image B gain in the image gain parameter .
  • the first gain parameter Before acquiring the first image by using the image sensor, the first gain parameter may be set first, and the first gain parameter may include: the first R gain, the first G gain, and the first B gain. In one of the embodiments, before the first image is captured by the image sensor, the first R gain, the first G gain, and the first B gain in the image sensor are all configured to be 1.
  • the above white balance control device acquires the first image of the current scene based on the first gain parameter built in the image sensor, analyzes the first image to obtain the image gain parameter, and uses the first gain parameter and the image gain The second gain parameter of the parameter is reached, and the first gain parameter in the image sensor is updated to the second gain parameter to acquire the next image.
  • This application obtains the second gain parameter through the first gain parameter built in the image sensor and the image gain parameter of the current scene.
  • the second gain parameter is updated in the image sensor, and the number of pixel bits is limited to ensure that each The actual maximum value of the R, G, and B pixels are all less than the maximum value of the full scale of the pixel, and can make the R pixel, G pixel and B pixel after the white balance processing of the electronic device are all within the full scale, alleviating the deviation of the highlight part of the image Color problem.
  • the first obtaining module is further configured to obtain image gain parameters according to the gray information of the first image, and the image gain parameters include: image R gain and image B gain.
  • the second acquisition module includes: a first setting unit for setting the second R gain as the product of the first R gain and the image R gain; and the second setting unit for setting the second G gain It is set equal to the first G gain; the third setting unit is used to set the second B gain as the product of the first B gain and the image B gain.
  • the second setting unit is further configured to set both the second G gain and the first G gain to 1.
  • the first acquisition module is further configured to acquire image gain parameters according to the gray information of the first image, and the image gain parameters include: image R gain, image G gain, and image B gain.
  • the second acquisition module includes: a first setting unit for setting the second R gain as the product of the first R gain and the image R gain; and the second setting unit for setting the second G gain It is set as the product of the first G gain and the image G gain; the third setting unit is used to set the second B gain as the product of the first B gain and the image B gain.
  • the first obtaining module is further configured to obtain the gray information of the first image by using the gray world algorithm; and obtain the image gain parameter according to the gray information of the first image.
  • the first gain parameter includes: a first R gain, a first G gain, and a first B gain
  • the device further includes a configuration module for setting the first R gain, the first G gain in the image sensor And the first B gain is configured to 1.
  • the white balance control device can be divided into different modules as needed to complete all or part of the functions of the white balance control device.
  • Each module in the above white balance control device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • Fig. 7 is a schematic diagram of the internal structure of an electronic device in an embodiment.
  • the electronic device includes a processor and a memory connected through a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the memory may include a non-volatile storage medium and internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the computer program can be executed by the processor to implement a white balance control method provided in the following embodiments.
  • the internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium.
  • the electronic device can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and a wearable device.
  • each module in the white balance control device provided in the embodiments of the present application may be in the form of a computer program.
  • the computer program can be run on a terminal or a server.
  • the program module constituted by the computer program can be stored in the memory of the electronic device.
  • the computer program is executed by the processor, it realizes the steps of the method described in the embodiments of the present application.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • One or more non-volatile computer-readable storage media containing computer-executable instructions when the computer-executable instructions are executed by one or more processors, cause the processors to execute the steps of the white balance control method.
  • a computer program product containing instructions that, when running on a computer, causes the computer to execute the following white balance control method:
  • the second gain parameter is obtained according to the first gain parameter and the image gain parameter.
  • the second gain parameter is used to be built into the image sensor to enable the image sensor to obtain a second image.
  • the second image and the first image are two consecutively collected images by the image sensor. image.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM), which acts as external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous Link (Synchlink) DRAM
  • Rambus direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The present application relates to a white balance control method and apparatus, an electronic device, and a computer-readable storage medium, and is applied to an electronic device. The electronic device comprises an image sensor. The method comprises: (step 202) using the image sensor to collect a first image, the image sensor having a built-in first gain parameter; (step 204) acquiring an image gain parameter corresponding to the first image; and (step 206) acquiring a second gain parameter according to the first gain parameter and the image gain parameter, wherein the second gain parameter is used for being built into the image sensor so that the image sensor acquires a second image, and the second image and the first image are two images consecutively collected by the image sensor.

Description

白平衡控制方法、装置、电子设备和计算机可读存储介质White balance control method, device, electronic equipment and computer readable storage medium 技术领域Technical field
本申请涉及图像处理领域,特别是涉及一种白平衡控制方法、装置、电子设备和计算机可读存储介质。This application relates to the field of image processing, and in particular to a white balance control method, device, electronic equipment, and computer-readable storage medium.
背景技术Background technique
随着摄像技术的发展,摄像设备的白平衡设置是确保获得理想的画面色彩的重要保证。白平衡是通过对白色被摄物的颜色还原,进而达到其他物体色彩准确还原的一种数字图像色彩处理的计算方法。也即当拍摄白色对象时得到白色图像,摄像机输出红、绿、蓝信号相等叫白平衡。With the development of camera technology, the white balance setting of the camera equipment is an important guarantee to ensure the ideal picture color. White balance is a calculation method of digital image color processing that restores the color of the white subject to accurately restore the color of other objects. That is, when shooting a white object, a white image is obtained, and the camera outputs red, green, and blue signals that are equal to white balance.
目前,图像传感器往往使用多帧或者多像素合成,当其中一个像素的实际值超过量程值时,进行白平衡处理会导致图像的RGB不平衡,成像容易出现偏色。At present, image sensors often use multi-frame or multi-pixel synthesis. When the actual value of one of the pixels exceeds the range value, the white balance processing will cause the RGB imbalance of the image, and the image is prone to color cast.
发明内容Summary of the invention
基于此,有必要提供一种能够可以缓解成像偏色问题的白平衡控制方法、装置、电子设备、计算机可读存储介质。Based on this, it is necessary to provide a white balance control method, device, electronic device, and computer-readable storage medium that can alleviate the problem of color cast in imaging.
一种白平衡控制方法,应用于电子设备,所述电子设备包括图像传感器,所述方法包括:A white balance control method is applied to an electronic device, the electronic device includes an image sensor, and the method includes:
利用所述图像传感器采集第一图像,所述图像传感器内置有第一增益参数;Acquiring a first image by using the image sensor, and the image sensor has a built-in first gain parameter;
获取所述第一图像对应的图像增益参数;Acquiring an image gain parameter corresponding to the first image;
根据所述第一增益参数和所述图像增益参数获取第二增益参数,所述第二增益参数用于内置于所述图像传感器中以使所述图像传感器获取第二图 像,所述第二图像和所述第一图像为所述图像传感器连续采集的两张图像。A second gain parameter is obtained according to the first gain parameter and the image gain parameter, and the second gain parameter is used to be built in the image sensor so that the image sensor obtains a second image, the second image And the first image are two images continuously collected by the image sensor.
一种白平衡控制装置,应用于电子设备,所述电子设备包括图像传感器,所述装置包括:A white balance control device is applied to an electronic device, the electronic device includes an image sensor, and the device includes:
采集模块,用于利用所述图像传感器采集第一图像,所述图像传感器内置有第一增益参数;An acquisition module, configured to acquire a first image by using the image sensor, and the image sensor has a built-in first gain parameter;
第一获取模块,用于获取所述第一图像对应的图像增益参数;The first acquiring module is configured to acquire the image gain parameter corresponding to the first image;
第二获取模块,用于根据所述第一增益参数和所述图像增益参数获取第二增益参数,所述第二增益参数用于内置于所述图像传感器中以使所述图像传感器获取第二图像,所述第二图像和所述第一图像为所述图像传感器连续采集的两张图像。The second acquisition module is configured to acquire a second gain parameter according to the first gain parameter and the image gain parameter, and the second gain parameter is used to be built in the image sensor so that the image sensor acquires the second gain parameter. Images, the second image and the first image are two images continuously collected by the image sensor.
一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如所述的白平衡控制方法的步骤。An electronic device includes a memory and a processor, and a computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the white balance control method.
一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如所述的方法的步骤。A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method when the computer program is executed by a processor.
上述白平衡控制方法、装置、电子设备、计算机可读存储介质,应用于电子设备,所述电子设备包括图像传感器,所述方法包括:利用所述图像传感器采集第一图像,所述图像传感器内置有第一增益参数;获取所述第一图像对应的图像增益参数;根据所述第一增益参数和所述图像增益参数获取第二增益参数,所述第二增益参数用于内置于所述图像传感器中以使所述图像传感器获取第二图像,所述第二图像和所述第一图像为所述图像传感器连续采集的两张图像。本申请中在图像传感器中内置有第一增益参数,再基于第一增益参数获取当前场景的第一图像,对所述第一图像进行分析得到图像增益参数,利用第一增益参数和图像增益参数的到第二增益参数,且将图像传感器中的第一增益参数更新为第二增益参数以采集下一张图像。本申请通过图像传感器中内置的第一增益参数和当前场景的图像增益参数得到第二增益参数,将第二增益参数更新图像传感器中,会对像素bit位数进行限位,确保 图像传感器中各个R、G、B像素的实际最大值均小于像素满量程的最大值,且能够使电子设备进行白平衡处理后的R像素、G像素和B像素均在满量程内,缓解图像高亮部分偏色问题。The above-mentioned white balance control method, device, electronic equipment, and computer-readable storage medium are applied to electronic equipment. The electronic equipment includes an image sensor. The method includes: using the image sensor to collect a first image, and the image sensor is There is a first gain parameter; the image gain parameter corresponding to the first image is obtained; the second gain parameter is obtained according to the first gain parameter and the image gain parameter, and the second gain parameter is used to be built into the image In the sensor, the image sensor acquires a second image, and the second image and the first image are two images continuously collected by the image sensor. In this application, a first gain parameter is built in the image sensor, and then a first image of the current scene is acquired based on the first gain parameter, and the first image is analyzed to obtain the image gain parameter, and the first gain parameter and the image gain parameter are used To the second gain parameter, and update the first gain parameter in the image sensor to the second gain parameter to collect the next image. This application obtains the second gain parameter through the first gain parameter built in the image sensor and the image gain parameter of the current scene. The second gain parameter is updated in the image sensor, and the number of pixel bits is limited to ensure that each The actual maximum value of the R, G, and B pixels are all less than the maximum value of the full scale of the pixel, and can make the R pixel, G pixel and B pixel after the white balance processing of the electronic device are all within the full scale, alleviating the deviation of the highlight part of the image Color problem.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他实施例的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, without creative work, the drawings of other embodiments can also be obtained based on these drawings.
图1为一个实施例中白平衡控制方法的应用环境示意图;FIG. 1 is a schematic diagram of an application environment of a white balance control method in an embodiment;
图2为一个实施例中白平衡控制方法的流程图;Figure 2 is a flowchart of a white balance control method in an embodiment;
图3为一个实施例中步骤根据第一增益参数和图像增益参数获取第二增益参数的流程图;FIG. 3 is a flowchart of obtaining a second gain parameter according to the first gain parameter and the image gain parameter in one embodiment;
图4为又一个实施例中步骤根据第一增益参数和图像增益参数获取第二增益参数的流程图;4 is a flowchart of obtaining a second gain parameter according to the first gain parameter and the image gain parameter in another embodiment;
图5为一个实施例中步骤获取第一图像对应的图像增益参数的流程图;FIG. 5 is a flowchart of steps in an embodiment of obtaining the image gain parameter corresponding to the first image;
图6为一个实施例中白平衡控制装置的结构框图;Fig. 6 is a structural block diagram of a white balance control device in an embodiment;
图7为一个实施例中电子设备的内部结构示意图。Fig. 7 is a schematic diagram of the internal structure of an electronic device in an embodiment.
具体实施方式Detailed ways
为了便于理解本发明,下面将参照相关附图对本发明进行更全面的描述。附图中给出了本发明的较佳实施例。但是,本发明可以以许多不同的形式来实现,并不限于本文所描述的实施例。相反地,提供这些实施例的目的是使对本发明的公开内容的理解更加透彻全面。In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元 件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一图像称为第二图像,且类似地,可将第二图像称为第一图像。第一图像和第二图像两者都是图像,但其不是同一图像。It can be understood that the terms "first", "second", etc. used in this application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first image may be referred to as the second image, and similarly, the second image may be referred to as the first image. Both the first image and the second image are images, but they are not the same image.
图1为一个实施例中白平衡控制方法的应用环境示意图。如图1所示,该应用环境包括电子设备10,电子设备10包括图像传感器110。电子设备10通过利用图像传感器110采集第一图像,图像传感器110内置有第一增益参数;获取第一图像对应的图像增益参数;根据第一增益参数和图像增益参数获取第二增益参数,第二增益参数用于内置于图像传感器110中以使图像传感器110获取第二图像,第二图像和第一图像为图像传感器连续采集的两张图像。本申请通过图像传感器中内置的第一增益参数和当前场景的图像增益参数得到第二增益参数,将第二增益参数更新图像传感器中,会对像素bit位数进行限位,确保图像传感器中各个R、G、B像素的实际最大值均小于像素满量程的最大值,且能够使电子设备进行白平衡处理后的R像素、G像素和B像素均在满量程内,缓解图像高亮部分偏色问题。举例来说,图像传感器其中一个像素的满量程是20bit,但是实际最高输出不足20bit,比如为19.5bit。白平衡处理过程中将R像素和B像素各乘以一个增益,使得R像素和B像素提升,可能会导致R像素和B像素超出19.5bit。R像素和B像素超出满量程会导致RGB不平衡,R像素和B像素亮度较大,使得高亮部分出现偏色。Fig. 1 is a schematic diagram of an application environment of a white balance control method in an embodiment. As shown in FIG. 1, the application environment includes an electronic device 10, and the electronic device 10 includes an image sensor 110. The electronic device 10 acquires the first image by using the image sensor 110, the image sensor 110 has a built-in first gain parameter; acquires the image gain parameter corresponding to the first image; acquires the second gain parameter according to the first gain parameter and the image gain parameter, and the second gain parameter The gain parameter is used to be built into the image sensor 110 so that the image sensor 110 obtains a second image, and the second image and the first image are two images continuously collected by the image sensor. This application obtains the second gain parameter through the first gain parameter built in the image sensor and the image gain parameter of the current scene. The second gain parameter is updated in the image sensor, and the number of pixel bits is limited to ensure that each The actual maximum value of the R, G, and B pixels are all less than the maximum value of the full scale of the pixel, and can make the R pixel, G pixel and B pixel after the white balance processing of the electronic device are all within the full scale, alleviating the deviation of the highlight part of the image Color problem. For example, the full scale of one pixel of the image sensor is 20bit, but the actual maximum output is less than 20bit, such as 19.5bit. In the white balance process, the R pixel and the B pixel are each multiplied by a gain to increase the R pixel and the B pixel, which may cause the R pixel and the B pixel to exceed 19.5 bits. The R pixel and B pixel exceeding the full scale will cause RGB imbalance, and the R pixel and B pixel have higher brightness, which makes the highlight part appear color cast.
图2为一个实施例中白平衡控制方法的流程图。本实施例中的白平衡控制方法,以运行于图1中的电子设备上为例进行描述,电子设备包括图像传感器。如图2所示,白平衡控制方法包括步骤202至步骤206。其中,步骤202、利用图像传感器采集第一图像,图像传感器内置有第一增益参数;步骤204、获取第一图像对应的图像增益参数;步骤206、根据第一增益参数和图像增益参数获取第二增益参数,第二增益参数用于内置于图像传感器中以使图像传感器获取第二图像,第二图像和第一图像为图像传感器连续采集的两张图像。Fig. 2 is a flowchart of a white balance control method in an embodiment. The white balance control method in this embodiment is described by taking the electronic device in FIG. 1 as an example. The electronic device includes an image sensor. As shown in FIG. 2, the white balance control method includes step 202 to step 206. Among them, step 202, using an image sensor to collect a first image, the image sensor has a built-in first gain parameter; step 204, acquiring an image gain parameter corresponding to the first image; step 206, acquiring a second image according to the first gain parameter and the image gain parameter The gain parameter, the second gain parameter is used to be built into the image sensor to enable the image sensor to obtain a second image, and the second image and the first image are two images continuously collected by the image sensor.
具体的,在利用图像传感器采集第一图像之前,可以先设置第一增益参数,第一增益参数可以包括:第一R增益、第一G增益和第一B增益。在其中一个实施例中,利用图像传感器采集第一图像之前,将图像传感器中的第一R增益、第一G增益和第一B增益为均配置为1。然后,利用设置有第一增益参数的图像传感器采集当前场景的第一图像,第一图像可以是灰度图像或可见光图像。利用白平衡增益算法分析第一图像中R通道、G通道和B通道的灰度信息及第二增益参数,第二增益参数包括:第二R增益、第二G增益和第二B增益,还可以只包括第二R增益、第二G增益和第二B增益中的任意两种。根据第一增益参数和图像增益参数获取第二增益参数指的是,根据第一增益参数中的第一R增益和图像增益参数中的图像R增益获取第二R增益;根据第一增益参数中的第一G增益和图像增益参数中的图像G增益获取第二G增益;根据第一增益参数中的第一B增益和图像增益参数中的图像B增益获取第二B增益。将获取的第二增益参数更新至图像传感器中以使图像传感器获取当前场景获取的第二图像,第二图像和第一图像为图像传感器连续采集的两张图像,第二图像为经过白平衡增益校正后的图像,第二图像中的高亮部分偏色经过了校正,缓解图像高亮部分偏色问题。Specifically, before using the image sensor to collect the first image, the first gain parameter may be set first, and the first gain parameter may include: the first R gain, the first G gain, and the first B gain. In one of the embodiments, before the first image is captured by the image sensor, the first R gain, the first G gain, and the first B gain in the image sensor are all configured to be 1. Then, the first image of the current scene is collected by using the image sensor set with the first gain parameter, and the first image may be a grayscale image or a visible light image. Use the white balance gain algorithm to analyze the gray information of the R channel, the G channel and the B channel and the second gain parameter in the first image. The second gain parameter includes: the second R gain, the second G gain, and the second B gain. It may only include any two of the second R gain, the second G gain, and the second B gain. Obtaining the second gain parameter according to the first gain parameter and the image gain parameter refers to obtaining the second R gain according to the first R gain in the first gain parameter and the image R gain in the image gain parameter; Obtain the second G gain according to the first G gain in the first gain parameter and the image G gain in the image gain parameter; obtain the second B gain according to the first B gain in the first gain parameter and the image B gain in the image gain parameter. Update the acquired second gain parameter to the image sensor so that the image sensor acquires the second image acquired by the current scene, the second image and the first image are two images continuously collected by the image sensor, and the second image is the white balance gain In the corrected image, the color cast in the highlight part of the second image has been corrected to alleviate the color cast in the highlight part of the image.
上述白平衡控制方法通过在图像传感器中内置有第一增益参数,再基于第一增益参数获取当前场景的第一图像,对第一图像进行分析得到图像增益参数,利用第一增益参数和图像增益参数的到第二增益参数,且将图像传感器中的第一增益参数更新为第二增益参数以采集下一张图像。本申请通过图像传感器中内置的第一增益参数和当前场景的图像增益参数得到第二增益参数,将第二增益参数更新图像传感器中,会对像素bit位数进行限位,确保图像传感器中各个R、G、B像素的实际最大值均小于像素满量程的最大值,且能够使电子设备进行白平衡处理后的R像素、G像素和B像素均在满量程内,缓解图像高亮部分偏色问题。In the above white balance control method, the first gain parameter is built in the image sensor, and then the first image of the current scene is acquired based on the first gain parameter, and the first image is analyzed to obtain the image gain parameter, and the first gain parameter and the image gain are used. The second gain parameter of the parameter is reached, and the first gain parameter in the image sensor is updated to the second gain parameter to acquire the next image. This application obtains the second gain parameter through the first gain parameter built in the image sensor and the image gain parameter of the current scene. The second gain parameter is updated in the image sensor, and the number of pixel bits is limited to ensure that each The actual maximum value of the R, G, and B pixels are all less than the maximum value of the full scale of the pixel, and can make the R pixel, G pixel and B pixel after the white balance processing of the electronic device are all within the full scale, alleviating the deviation of the highlight part of the image Color problem.
在其中一个实施例中,步骤获取第一图像对应的图像增益参数,包括:根据第一图像的灰度信息获取图像增益参数,其中,图像增益参数包括:图 像R增益和图像B增益。In one of the embodiments, the step of obtaining the image gain parameter corresponding to the first image includes: obtaining the image gain parameter according to the gray information of the first image, where the image gain parameter includes: image R gain and image B gain.
具体的,利用白平衡增益算法分析第一图像中R通道和B通道的灰度信息及第二增益参数,第二增益参数包括:图像R增益和图像B增益。其中,将图像G增益设置为常数如0.9、1、1.1等数值,本实施例中无需获取图像增益参数中的图像G增益,降低白平衡增益算法对第一图像进行分析的计算复杂度,提高获取第一图像对应的图像增益参数的效率。Specifically, the white balance gain algorithm is used to analyze the gray information of the R channel and the B channel in the first image and the second gain parameter, and the second gain parameter includes: the image R gain and the image B gain. Among them, the image G gain is set to a constant value such as 0.9, 1, 1.1, etc. In this embodiment, there is no need to obtain the image G gain in the image gain parameter, which reduces the computational complexity of the white balance gain algorithm for analyzing the first image, and improves Obtain the efficiency of the image gain parameter corresponding to the first image.
在其中一个实施例中,步骤根据第一增益参数和图像增益参数获取第二增益参数,包括:步骤302至步骤306。其中,步骤302、将第二R增益设置为第一R增益与图像R增益的乘积;步骤304、将第二G增益设置为与第一G增益相等;步骤306、将第二B增益设置为第一B增益与图像B增益的乘积。In one of the embodiments, the step of obtaining the second gain parameter according to the first gain parameter and the image gain parameter includes: step 302 to step 306. Among them, step 302, the second R gain is set to the product of the first R gain and the image R gain; step 304, the second G gain is set to be equal to the first G gain; step 306, the second B gain is set to The product of the first B gain and the image B gain.
具体的,根据第一增益参数中的第一R增益和图像增益参数中的图像R增益获取第二R增益,可以将第二R增益设置为第一R增益与图像R增益的乘积;根据第一增益参数中的第一G增益和图像增益参数中的图像G增益获取第二G增益,可以将第二G增益设置为与第一G增益相等;根据第一增益参数中的第一B增益和图像增益参数中的图像B增益获取第二B增益,可以是将第二B增益设置为第一B增益与图像B增益的乘积。本实施例将R通道和B通道对应的第二增益设置为对应的第一增益和对应图像增益的乘积,算法简单、能够高效进行白平衡处理,使R像素、G像素和B像素均在满量程内,缓解图像高亮部分偏色问题。在其中一个实施例中,步骤设置第二G增益与第一G增益相等,包括:将第二G增益和第一G增益均设为1。由于G像素的感光度比较高,一般不需要提升,将第二G增益和第一G增益设为恒定的数值1,不仅能够降低算法的计算复杂度,也能够保证图像传感器的成像效果。Specifically, the second R gain is obtained according to the first R gain in the first gain parameter and the image R gain in the image gain parameter, and the second R gain may be set as the product of the first R gain and the image R gain; The first G gain in the first gain parameter and the image G gain in the image gain parameter obtain the second G gain, and the second G gain can be set to be equal to the first G gain; according to the first B gain in the first gain parameter And the image B gain in the image gain parameter to obtain the second B gain, which may be the product of the first B gain and the image B gain. In this embodiment, the second gain corresponding to the R channel and the B channel is set as the product of the corresponding first gain and the corresponding image gain. The algorithm is simple and can efficiently perform white balance processing, so that the R pixels, G pixels, and B pixels are all full. Within the range, alleviate the color cast problem of the highlight part of the image. In one of the embodiments, the step of setting the second G gain to be equal to the first G gain includes: setting both the second G gain and the first G gain to 1. Since the sensitivity of the G pixel is relatively high, it generally does not need to be increased. Setting the second G gain and the first G gain to a constant value of 1, not only reduces the computational complexity of the algorithm, but also ensures the imaging effect of the image sensor.
在其中一个实施例中,步骤获取第一图像对应的图像增益参数,包括:根据第一图像的灰度信息获取图像增益参数,图像增益参数包括:图像R增益、图像G增益和图像B增益。In one of the embodiments, the step of obtaining the image gain parameter corresponding to the first image includes: obtaining the image gain parameter according to the gray information of the first image, and the image gain parameter includes: image R gain, image G gain, and image B gain.
具体的,利用白平衡增益算法分析第一图像中R通道、G通道和B通道的灰度信息及第二增益参数,第二增益参数包括:图像R增益、图像G增益和图像B增益。分别计算图像R增益、图像G增益和图像B增益,能够使得到的第二增益参数更加准确,白平衡性能更佳,使图像传感器获取的图像的成像效果更好。Specifically, the white balance gain algorithm is used to analyze the gray information of the R channel, the G channel, and the B channel and the second gain parameter in the first image. The second gain parameter includes: image R gain, image G gain, and image B gain. Calculating the image R gain, image G gain, and image B gain separately can make the obtained second gain parameter more accurate, better white balance performance, and better imaging effect of the image acquired by the image sensor.
在其中一个实施例中,第二增益参数包括:第二R增益、第二G增益和第二B增益,第一增益参数包括:第一R增益、第一G增益和第一B增益,步骤根据第一增益参数和图像增益参数获取第二增益参数,包括:步骤402至步骤406。其中,步骤402、将第二R增益设置为第一R增益与图像R增益的乘积;步骤404、将第二G增益设置为第一G增益与图像G增益的乘积;步骤406、将第二B增益设置为第一B增益与图像B增益的乘积。In one of the embodiments, the second gain parameter includes: a second R gain, a second G gain, and a second B gain, and the first gain parameter includes: a first R gain, a first G gain, and a first B gain. Obtaining the second gain parameter according to the first gain parameter and the image gain parameter includes: step 402 to step 406. Among them, step 402, the second R gain is set to the product of the first R gain and the image R gain; step 404, the second G gain is set to the product of the first G gain and the image G gain; step 406, the second The B gain is set as the product of the first B gain and the image B gain.
具体的,根据第一增益参数中的第一R增益和图像增益参数中的图像R增益获取第二R增益,可以将第二R增益设置为第一R增益与图像R增益的乘积;根据第一增益参数中的第一G增益和图像增益参数中的图像G增益获取第二G增益,可以将第二G增益设置为第一G增益与图像G增益的乘积;根据第一增益参数中的第一B增益和图像增益参数中的图像B增益获取第二B增益,可以是将第二B增益设置为第一B增益与图像B增益的乘积。本实施例将R通道、G通道和B通道对应的第二增益设置为对应的第一增益和对应图像增益的乘积,算法简单、能够高效、准确进行白平衡处理,能够使R像素、G像素和B像素均在满量程内,缓解图像高亮部分偏色问题。Specifically, the second R gain is obtained according to the first R gain in the first gain parameter and the image R gain in the image gain parameter, and the second R gain may be set as the product of the first R gain and the image R gain; The first G gain in a gain parameter and the image G gain in the image gain parameter obtain the second G gain. The second G gain can be set as the product of the first G gain and the image G gain; The image B gain in the first B gain and image gain parameters obtains the second B gain, which may be the product of the first B gain and the image B gain. In this embodiment, the second gain corresponding to the R channel, the G channel, and the B channel is set as the product of the corresponding first gain and the corresponding image gain. The algorithm is simple, can efficiently and accurately perform white balance processing, and can make R pixels and G pixels And B pixels are within the full scale, alleviating the color cast problem of the highlight part of the image.
在其中一个实施例中,步骤获取第一图像对应的图像增益参数,包括:步骤502和步骤504。其中,步骤502、利用灰度世界算法获取第一图像的灰度信息;步骤504、根据第一图像的灰度信息获取图像增益参数。In one of the embodiments, the step of obtaining the image gain parameter corresponding to the first image includes: step 502 and step 504. Among them, step 502, obtain the gray information of the first image by using the gray world algorithm; step 504, obtain the image gain parameter according to the gray information of the first image.
具体的,灰度世界算法假设:对于一副有着丰富色彩的图片,图像上R、G、B三个通道的平均值应该等于一个被称为“灰色”的值K。可以将各通道最大值的一半作为“灰色”值K,还可以将待处理图片三个通道均值的均值作为“灰色”值K。根据第一图像的灰度信息获取图像增益参数指的是,当 确定了灰色值K之后,将待处理图片转换到经典光源下的各个校正系数分别为:kr=K/ Rmean,kg=K/G mean,kb=K/B mean,其中R mean,G mean和B mean分别为图像R、G、B通道的均值。利用灰度世界算法能够简单快速地获取图像增益参数,再利用图像增益参数结合图像传感器内置的第一增益参数得到第二增益参数,并将第二增益参数内置至图像传感器中,能够实现对图像进行白平衡处理,能够使R像素、G像素和B像素均在满量程内,缓解图像高亮部分偏色问题。 Specifically, the gray world algorithm assumes that for a picture with rich colors, the average value of the three channels of R, G, and B on the image should be equal to a value K called "gray". Half of the maximum value of each channel can be used as the "gray" value K, and the average value of the average values of the three channels of the picture to be processed can be used as the "gray" value K. Obtaining the image gain parameter according to the gray information of the first image means that after the gray value K is determined, the correction coefficients for converting the image to be processed to the classic light source are: kr=K/ Rmean , kg=K/ G mean , kb=K/B mean , where R mean , G mean and B mean are the mean values of the R, G, and B channels of the image, respectively. The gray world algorithm can be used to obtain the image gain parameters simply and quickly, and then the image gain parameters are combined with the built-in first gain parameter of the image sensor to obtain the second gain parameter, and the second gain parameter is built into the image sensor, which can realize the image gain parameter. White balance processing can make R pixels, G pixels and B pixels all within the full range, alleviating the color cast problem in the highlight part of the image.
应该理解的是,虽然图2-5的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-5中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowcharts of FIGS. 2-5 are displayed in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in Figures 2-5 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. These sub-steps or stages The execution order of is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
图6为一个实施例的白平衡控制装置的结构框图。如图6所示的白平衡控制装置,应用于电子设备,电子设备包括图像传感器,白平衡控制装置包括:采集模块602、第一获取模块604和第二获取模块606。其中,采集模块602,用于利用图像传感器采集第一图像,图像传感器内置有第一增益参数;第一获取模块604,用于获取第一图像对应的图像增益参数;第二获取模块606,用于根据第一增益参数和图像增益参数获取第二增益参数,第二增益参数用于内置于图像传感器中以使图像传感器获取第二图像,第二图像和第一图像为图像传感器连续采集的两张图像。Fig. 6 is a structural block diagram of a white balance control device according to an embodiment. The white balance control device shown in FIG. 6 is applied to electronic equipment. The electronic equipment includes an image sensor. The white balance control device includes: an acquisition module 602, a first acquisition module 604, and a second acquisition module 606. Among them, the acquisition module 602 is used to acquire a first image using an image sensor, and the image sensor has a built-in first gain parameter; the first acquisition module 604 is used to acquire image gain parameters corresponding to the first image; and the second acquisition module 606 uses In order to obtain the second gain parameter according to the first gain parameter and the image gain parameter, the second gain parameter is used to be built into the image sensor so that the image sensor obtains the second image, and the second image and the first image are two consecutively collected images by the image sensor. Images.
具体的,采集模块602利用设置有第一增益参数的图像传感器采集当前场景的第一图像,第一图像可以是灰度图像或可见光图像。第一获取模块604利用白平衡增益算法分析第一图像中R通道、G通道和B通道的灰度信息及第二增益参数,第二增益参数包括:第二R增益、第二G增益和第二B增益, 还可以只包括第二R增益、第二G增益和第二B增益中的任意两种。第二获取模块606根据第一增益参数和图像增益参数获取第二增益参数指的是,根据第一增益参数中的第一R增益和图像增益参数中的图像R增益获取第二R增益;根据第一增益参数中的第一G增益和图像增益参数中的图像G增益获取第二G增益;根据第一增益参数中的第一B增益和图像增益参数中的图像B增益获取第二B增益。将获取的第二增益参数更新至图像传感器中以使图像传感器获取当前场景获取的第二图像,第二图像和第一图像为图像传感器连续采集的两张图像,第二图像为经过白平衡增益校正后的图像,第二图像中的高亮部分偏色经过了校正,能够使R像素、G像素和B像素均在满量程内,缓解图像高亮部分偏色问题。在利用图像传感器采集第一图像之前,可以先设置第一增益参数,第一增益参数可以包括:第一R增益、第一G增益和第一B增益。在其中一个实施例中,利用图像传感器采集第一图像之前,将图像传感器中的第一R增益、第一G增益和第一B增益为均配置为1。Specifically, the acquisition module 602 acquires a first image of the current scene by using an image sensor set with a first gain parameter, and the first image may be a grayscale image or a visible light image. The first acquisition module 604 uses the white balance gain algorithm to analyze the gray information of the R channel, the G channel and the B channel and the second gain parameter in the first image. The second gain parameter includes: the second R gain, the second G gain, and the second gain parameter. The second B gain may also include only any two of the second R gain, the second G gain, and the second B gain. The second acquiring module 606 acquiring the second gain parameter according to the first gain parameter and the image gain parameter refers to acquiring the second R gain according to the first R gain in the first gain parameter and the image R gain in the image gain parameter; The first G gain in the first gain parameter and the image G gain in the image gain parameter obtain the second G gain; the second B gain is obtained according to the first B gain in the first gain parameter and the image B gain in the image gain parameter . Update the acquired second gain parameter to the image sensor so that the image sensor acquires the second image acquired by the current scene, the second image and the first image are two images continuously collected by the image sensor, and the second image is the white balance gain In the corrected image, the color cast in the highlight part of the second image has been corrected, so that the R pixel, G pixel and B pixel are all within the full scale, alleviating the color cast problem in the highlight part of the image. Before acquiring the first image by using the image sensor, the first gain parameter may be set first, and the first gain parameter may include: the first R gain, the first G gain, and the first B gain. In one of the embodiments, before the first image is captured by the image sensor, the first R gain, the first G gain, and the first B gain in the image sensor are all configured to be 1.
上述白平衡控制装置通过在图像传感器中内置有第一增益参数,再基于第一增益参数获取当前场景的第一图像,对第一图像进行分析得到图像增益参数,利用第一增益参数和图像增益参数的到第二增益参数,且将图像传感器中的第一增益参数更新为第二增益参数以采集下一张图像。本申请通过图像传感器中内置的第一增益参数和当前场景的图像增益参数得到第二增益参数,将第二增益参数更新图像传感器中,会对像素bit位数进行限位,确保图像传感器中各个R、G、B像素的实际最大值均小于像素满量程的最大值,且能够使电子设备进行白平衡处理后的R像素、G像素和B像素均在满量程内,缓解图像高亮部分偏色问题。The above white balance control device acquires the first image of the current scene based on the first gain parameter built in the image sensor, analyzes the first image to obtain the image gain parameter, and uses the first gain parameter and the image gain The second gain parameter of the parameter is reached, and the first gain parameter in the image sensor is updated to the second gain parameter to acquire the next image. This application obtains the second gain parameter through the first gain parameter built in the image sensor and the image gain parameter of the current scene. The second gain parameter is updated in the image sensor, and the number of pixel bits is limited to ensure that each The actual maximum value of the R, G, and B pixels are all less than the maximum value of the full scale of the pixel, and can make the R pixel, G pixel and B pixel after the white balance processing of the electronic device are all within the full scale, alleviating the deviation of the highlight part of the image Color problem.
在其中一个实施例中,第一获取模块还用于根据第一图像的灰度信息获取图像增益参数,图像增益参数包括:图像R增益和图像B增益。In one of the embodiments, the first obtaining module is further configured to obtain image gain parameters according to the gray information of the first image, and the image gain parameters include: image R gain and image B gain.
在其中一个实施例中,第二获取模块包括:第一设置单元,用于将第二R增益设置为第一R增益与图像R增益的乘积;第二设置单元,用于将第二G增益设置为与第一G增益相等;第三设置单元,用于将第二B增益设置为 第一B增益与图像B增益的乘积。In one of the embodiments, the second acquisition module includes: a first setting unit for setting the second R gain as the product of the first R gain and the image R gain; and the second setting unit for setting the second G gain It is set equal to the first G gain; the third setting unit is used to set the second B gain as the product of the first B gain and the image B gain.
在其中一个实施例中,第二设置单元还用于将第二G增益和第一G增益均设为1。In one of the embodiments, the second setting unit is further configured to set both the second G gain and the first G gain to 1.
在其中一个实施例中,第一获取模块还用于根据第一图像的灰度信息获取图像增益参数,图像增益参数包括:图像R增益、图像G增益和图像B增益。In one of the embodiments, the first acquisition module is further configured to acquire image gain parameters according to the gray information of the first image, and the image gain parameters include: image R gain, image G gain, and image B gain.
在其中一个实施例中,第二获取模块包括:第一设置单元,用于将第二R增益设置为第一R增益与图像R增益的乘积;第二设置单元,用于将第二G增益设置为第一G增益与图像G增益的乘积;第三设置单元,用于将第二B增益设置为第一B增益与图像B增益的乘积。In one of the embodiments, the second acquisition module includes: a first setting unit for setting the second R gain as the product of the first R gain and the image R gain; and the second setting unit for setting the second G gain It is set as the product of the first G gain and the image G gain; the third setting unit is used to set the second B gain as the product of the first B gain and the image B gain.
在其中一个实施例中,第一获取模块还用于利用灰度世界算法获取第一图像的灰度信息;根据第一图像的灰度信息获取图像增益参数。In one of the embodiments, the first obtaining module is further configured to obtain the gray information of the first image by using the gray world algorithm; and obtain the image gain parameter according to the gray information of the first image.
在其中一个实施例中,第一增益参数包括:第一R增益、第一G增益和第一B增益,装置还包括配置模块,用于将图像传感器中的第一R增益、第一G增益和第一B增益为均配置为1。In one of the embodiments, the first gain parameter includes: a first R gain, a first G gain, and a first B gain, and the device further includes a configuration module for setting the first R gain, the first G gain in the image sensor And the first B gain is configured to 1.
上述白平衡控制装置中各个模块的划分仅用于举例说明,在其他实施例中,可将白平衡控制装置按照需要划分为不同的模块,以完成上述白平衡控制装置的全部或部分功能。The division of the modules in the white balance control device described above is only for illustration. In other embodiments, the white balance control device can be divided into different modules as needed to complete all or part of the functions of the white balance control device.
关于白平衡控制装置的具体限定可以参见上文中对于白平衡控制方法的限定,在此不再赘述。上述白平衡控制装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific definition of the white balance control device, please refer to the above definition of the white balance control method, which will not be repeated here. Each module in the above white balance control device can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
图7为一个实施例中电子设备的内部结构示意图。如图7所示,该电子设备包括通过系统总线连接的处理器和存储器。其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序 可被处理器所执行,以用于实现以下各个实施例所提供的一种白平衡控制方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。该电子设备可以是手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑、穿戴式设备等任意终端设备。Fig. 7 is a schematic diagram of the internal structure of an electronic device in an embodiment. As shown in FIG. 7, the electronic device includes a processor and a memory connected through a system bus. Among them, the processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory may include a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a white balance control method provided in the following embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The electronic device can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and a wearable device.
本申请实施例中提供的白平衡控制装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在电子设备的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的步骤。The implementation of each module in the white balance control device provided in the embodiments of the present application may be in the form of a computer program. The computer program can be run on a terminal or a server. The program module constituted by the computer program can be stored in the memory of the electronic device. When the computer program is executed by the processor, it realizes the steps of the method described in the embodiments of the present application.
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行白平衡控制方法的步骤。The embodiment of the present application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, cause the processors to execute the steps of the white balance control method.
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如下的白平衡控制方法:A computer program product containing instructions that, when running on a computer, causes the computer to execute the following white balance control method:
利用图像传感器采集第一图像,图像传感器内置有第一增益参数;Use an image sensor to collect the first image, and the image sensor has a built-in first gain parameter;
获取第一图像对应的图像增益参数;Acquiring an image gain parameter corresponding to the first image;
根据第一增益参数和图像增益参数获取第二增益参数,第二增益参数用于内置于图像传感器中以使图像传感器获取第二图像,第二图像和第一图像为图像传感器连续采集的两张图像。The second gain parameter is obtained according to the first gain parameter and the image gain parameter. The second gain parameter is used to be built into the image sensor to enable the image sensor to obtain a second image. The second image and the first image are two consecutively collected images by the image sensor. image.
本申请所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDR SDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直 接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。Any reference to memory, storage, database, or other media used in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which acts as external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the various technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, All should be considered as the scope of this specification.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and their description is relatively specific and detailed, but they should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention should be subject to the appended claims.

Claims (18)

  1. 一种白平衡控制方法,应用于电子设备,所述电子设备包括图像传感器,包括:A white balance control method applied to an electronic device, the electronic device including an image sensor, including:
    利用所述图像传感器采集第一图像,所述图像传感器内置有第一增益参数;Acquiring a first image by using the image sensor, and the image sensor has a built-in first gain parameter;
    获取所述第一图像对应的图像增益参数;Acquiring an image gain parameter corresponding to the first image;
    根据所述第一增益参数和所述图像增益参数获取第二增益参数,所述第二增益参数用于内置于所述图像传感器中以使所述图像传感器获取第二图像,所述第二图像和所述第一图像为所述图像传感器连续采集的两张图像。A second gain parameter is obtained according to the first gain parameter and the image gain parameter, and the second gain parameter is used to be built in the image sensor so that the image sensor obtains a second image, the second image And the first image are two images continuously collected by the image sensor.
  2. 根据权利要求1所述的方法,其中,所述获取所述第一图像对应的图像增益参数,包括:The method according to claim 1, wherein said obtaining the image gain parameter corresponding to the first image comprises:
    根据所述第一图像的灰度信息获取所述图像增益参数,所述图像增益参数包括:图像R增益和图像B增益。The image gain parameter is acquired according to the gray information of the first image, and the image gain parameter includes: image R gain and image B gain.
  3. 根据权利要求2所述的方法,其中,所述第一增益参数包括:第一R增益、第一G增益和第一B增益,所述第二增益参数包括:第二R增益、第二G增益和第二B增益,所述根据所述第一增益参数和所述图像增益参数获取第二增益参数,包括:The method according to claim 2, wherein the first gain parameter includes: a first R gain, a first G gain, and a first B gain, and the second gain parameter includes: a second R gain, a second G gain Gain and second B gain, the acquiring the second gain parameter according to the first gain parameter and the image gain parameter includes:
    将所述第二R增益设置为所述第一R增益与图像R增益的乘积;Setting the second R gain as a product of the first R gain and the image R gain;
    将所述第二G增益设置为与所述第一G增益相等;Setting the second G gain to be equal to the first G gain;
    将所述第二B增益设置为所述第一B增益与图像B增益的乘积。The second B gain is set as the product of the first B gain and the image B gain.
  4. 根据权利要求3所述的方法,其中,所述设置所述第二G增益与所述第一G增益相等,包括:The method according to claim 3, wherein said setting said second G gain to be equal to said first G gain comprises:
    将所述第二G增益和所述第一G增益均设为1。Set both the second G gain and the first G gain to 1.
  5. 根据权利要求1所述的方法,其中,所述获取所述第一图像对应的图像增益参数,包括:The method according to claim 1, wherein said obtaining the image gain parameter corresponding to the first image comprises:
    根据所述第一图像的灰度信息获取所述图像增益参数,所述图像增益参数包括:图像R增益、图像G增益和图像B增益。The image gain parameter is acquired according to the gray information of the first image, and the image gain parameter includes: image R gain, image G gain, and image B gain.
  6. 根据权利要求5所述的方法,其中,所述第一增益参数包括:第一R增益、第一G增益和第一B增益,所述第二增益参数包括:第二R增益、第二G增益和第二B增益,所述根据所述第一增益参数和所述图像增益参数获取第二增益参数,包括:The method according to claim 5, wherein the first gain parameter includes: a first R gain, a first G gain, and a first B gain, and the second gain parameter includes: a second R gain, a second G gain Gain and second B gain, the acquiring the second gain parameter according to the first gain parameter and the image gain parameter includes:
    将所述第二R增益设置为所述第一R增益与图像R增益的乘积;Setting the second R gain as a product of the first R gain and the image R gain;
    将所述第二G增益设置为所述第一G增益与图像G增益的乘积;Setting the second G gain as a product of the first G gain and the image G gain;
    将所述第二B增益设置为所述第一B增益与图像B增益的乘积。The second B gain is set as the product of the first B gain and the image B gain.
  7. 根据权利要求1所述的方法,其中,所述获取所述第一图像对应的图像增益参数,包括:The method according to claim 1, wherein said obtaining the image gain parameter corresponding to the first image comprises:
    利用灰度世界算法获取所述第一图像的灰度信息;Acquiring the gray information of the first image by using a gray world algorithm;
    根据所述第一图像的灰度信息获取所述图像增益参数。Acquiring the image gain parameter according to the gray information of the first image.
  8. 根据权利要求1至6任一项所述的方法,其中,所述第一增益参数包括:第一R增益、第一G增益和第一B增益,所述所述利用所述图像传感器采集第一图像之前,所述方法还包括:The method according to any one of claims 1 to 6, wherein the first gain parameter includes: a first R gain, a first G gain, and a first B gain, and the image sensor is used to collect the first gain Before an image, the method further includes:
    将所述图像传感器中的所述第一R增益、所述第一G增益和所述第一B增益为均配置为1。The first R gain, the first G gain, and the first B gain in the image sensor are all configured to be 1.
  9. 一种白平衡控制装置,应用于电子设备,所述电子设备包括图像传感器,所述装置包括:A white balance control device is applied to an electronic device, the electronic device includes an image sensor, and the device includes:
    采集模块,用于利用所述图像传感器采集第一图像,所述图像传感器内置有第一增益参数;An acquisition module, configured to acquire a first image by using the image sensor, and the image sensor has a built-in first gain parameter;
    第一获取模块,用于获取所述第一图像对应的图像增益参数;The first acquiring module is configured to acquire the image gain parameter corresponding to the first image;
    第二获取模块,用于根据所述第一增益参数和所述图像增益参数获取第二增益参数,所述第二增益参数用于内置于所述图像传感器中以使所述图像传感器获取第二图像,所述第二图像和所述第一图像为所述图像传感器连续采集的两张图像。The second acquisition module is configured to acquire a second gain parameter according to the first gain parameter and the image gain parameter, and the second gain parameter is used to be built in the image sensor so that the image sensor acquires the second gain parameter. Images, the second image and the first image are two images continuously collected by the image sensor.
  10. 根据权利要求9所述的装置,其中,所述第一获取模块还用于根据所述第一图像的灰度信息获取所述图像增益参数,所述图像增益参数包括: 图像R增益和图像B增益。The device according to claim 9, wherein the first obtaining module is further configured to obtain the image gain parameter according to the gray information of the first image, and the image gain parameter comprises: image R gain and image B Gain.
  11. 根据权利要求10所述的装置,其中,所述第一增益参数包括:第一R增益、第一G增益和第一B增益,所述第二增益参数包括:第二R增益、第二G增益和第二B增益,所述第二获取模块包括:The apparatus according to claim 10, wherein the first gain parameter includes: a first R gain, a first G gain, and a first B gain, and the second gain parameter includes: a second R gain, a second G gain Gain and second B gain, the second acquisition module includes:
    第一设置单元,用于将所述第二R增益设置为所述第一R增益与图像R增益的乘积;A first setting unit, configured to set the second R gain as a product of the first R gain and the image R gain;
    第二设置单元,用于将所述第二G增益设置为与所述第一G增益相等;A second setting unit, configured to set the second G gain to be equal to the first G gain;
    第三设置单元,用于将所述第二B增益设置为所述第一B增益与图像B增益的乘积。The third setting unit is configured to set the second B gain as the product of the first B gain and the image B gain.
  12. 根据权利要求11所述的装置,其中,所述第二设置单元还用于将所述第二G增益和所述第一G增益均设为1。The device according to claim 11, wherein the second setting unit is further configured to set both the second G gain and the first G gain to 1.
  13. 根据权利要求9所述的装置,其中,所述第一获取模块还用于根据所述第一图像的灰度信息获取所述图像增益参数,所述图像增益参数包括:图像R增益、图像G增益和图像B增益。The device according to claim 9, wherein the first obtaining module is further configured to obtain the image gain parameter according to the gray information of the first image, and the image gain parameter includes: image R gain, image G Gain and image B gain.
  14. 根据权利要求13所述的装置,其中,所述第一增益参数包括:第一R增益、第一G增益和第一B增益,所述第二增益参数包括:第二R增益、第二G增益和第二B增益,所述第二获取模块包括:The apparatus according to claim 13, wherein the first gain parameter includes: a first R gain, a first G gain, and a first B gain, and the second gain parameter includes: a second R gain, a second G gain Gain and second B gain, the second acquisition module includes:
    第一设置单元,用于将所述第二R增益设置为所述第一R增益与图像R增益的乘积;A first setting unit, configured to set the second R gain as a product of the first R gain and the image R gain;
    第二设置单元,用于将所述第二G增益设置为所述第一G增益与图像G增益的乘积;A second setting unit, configured to set the second G gain as the product of the first G gain and the image G gain;
    第三设置单元,用于将所述第二B增益设置为所述第一B增益与图像B增益的乘积。The third setting unit is configured to set the second B gain as the product of the first B gain and the image B gain.
  15. 根据权利要求9所述的装置,其中,所述第一获取模块还用于利用灰度世界算法获取所述第一图像的灰度信息;根据所述第一图像的灰度信息获取所述图像增益参数。The device according to claim 9, wherein the first obtaining module is further configured to obtain the gray information of the first image by using a gray world algorithm; obtain the image according to the gray information of the first image Gain parameters.
  16. 根据权利要求9-15任一项所述的装置,其中,所述第一增益参数包 括:第一R增益、第一G增益和第一B增益,所述装置还包括:The device according to any one of claims 9-15, wherein the first gain parameter comprises: a first R gain, a first G gain, and a first B gain, and the device further comprises:
    配置模块,用于将所述图像传感器中的所述第一R增益、所述第一G增益和所述第一B增益为均配置为1。The configuration module is configured to configure the first R gain, the first G gain, and the first B gain in the image sensor to be 1.
  17. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至8中任一项所述的白平衡控制方法的步骤。An electronic device, comprising a memory and a processor, and a computer program is stored in the memory. When the computer program is executed by the processor, the processor executes any one of claims 1 to 8. The steps of the white balance control method.
  18. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至8中任一项所述的方法的步骤。A computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are realized.
PCT/CN2020/075142 2020-02-13 2020-02-13 White balance control method and apparatus, electronic device and computer-readable storage medium WO2021159414A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080003125.3A CN113545033A (en) 2020-02-13 2020-02-13 White balance control method, white balance control device, electronic equipment and computer-readable storage medium
PCT/CN2020/075142 WO2021159414A1 (en) 2020-02-13 2020-02-13 White balance control method and apparatus, electronic device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/075142 WO2021159414A1 (en) 2020-02-13 2020-02-13 White balance control method and apparatus, electronic device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2021159414A1 true WO2021159414A1 (en) 2021-08-19

Family

ID=77292021

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/075142 WO2021159414A1 (en) 2020-02-13 2020-02-13 White balance control method and apparatus, electronic device and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN113545033A (en)
WO (1) WO2021159414A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000078605A (en) * 1998-08-28 2000-03-14 Matsushita Electric Ind Co Ltd White balance controller
CN102685513A (en) * 2012-05-21 2012-09-19 信利光电(汕尾)有限公司 White balance processing method and device
CN104036467A (en) * 2014-06-18 2014-09-10 北京航空航天大学 Image color cast correction method based on channel gain coefficient weighting
CN104079928A (en) * 2014-07-07 2014-10-01 广东欧珀移动通信有限公司 Consistency calibration method and device of camera and mobile device
CN108055453A (en) * 2017-12-05 2018-05-18 深圳市金立通信设备有限公司 A kind of acquisition parameters update method and terminal

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7580061B2 (en) * 2004-01-26 2009-08-25 Olympus Corporation Image sensing apparatus which determines white balance correction information before photographing
KR100712809B1 (en) * 2005-04-29 2007-04-30 매그나칩 반도체 유한회사 Apparatus for auto white balance control and method for control of auto white balance
CN101179663A (en) * 2006-11-07 2008-05-14 明基电通股份有限公司 Picture-taking method and system and machine readable medium
US7800783B2 (en) * 2007-05-25 2010-09-21 Hong Kong Applied Science And Technology Research Institute Co. Ltd. Auto white balancing by modified grey world and geometric distortion measurement
CN105227944B (en) * 2015-09-25 2017-12-26 联想(北京)有限公司 A kind of information processing method and electronic equipment
JP2017118254A (en) * 2015-12-22 2017-06-29 オリンパス株式会社 Image processing device, image processing program, and image processing method
CN107341767B (en) * 2016-04-29 2020-07-03 杭州海康威视数字技术股份有限公司 Image correction method and device
CN109151426B (en) * 2017-06-28 2020-05-22 杭州海康威视数字技术股份有限公司 White balance adjusting method and device, camera and medium
CN107360410A (en) * 2017-07-10 2017-11-17 广东欧珀移动通信有限公司 Method for controlling white balance, device and terminal device
CN109672871B (en) * 2017-10-17 2020-08-14 华为技术有限公司 White balance information synchronization method, white balance information synchronization device and computer readable medium
CN107959839B (en) * 2017-11-27 2019-07-30 努比亚技术有限公司 A kind of method of blank level adjustment, terminal and computer readable storage medium
CN107948618A (en) * 2017-12-11 2018-04-20 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and computer equipment
CN107920236A (en) * 2017-12-18 2018-04-17 广东欧珀移动通信有限公司 Image white balancing treatment method and device, storage medium and electronic equipment
CN108184105B (en) * 2017-12-28 2021-03-26 努比亚技术有限公司 Method and device for adjusting brightness and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000078605A (en) * 1998-08-28 2000-03-14 Matsushita Electric Ind Co Ltd White balance controller
CN102685513A (en) * 2012-05-21 2012-09-19 信利光电(汕尾)有限公司 White balance processing method and device
CN104036467A (en) * 2014-06-18 2014-09-10 北京航空航天大学 Image color cast correction method based on channel gain coefficient weighting
CN104079928A (en) * 2014-07-07 2014-10-01 广东欧珀移动通信有限公司 Consistency calibration method and device of camera and mobile device
CN108055453A (en) * 2017-12-05 2018-05-18 深圳市金立通信设备有限公司 A kind of acquisition parameters update method and terminal

Also Published As

Publication number Publication date
CN113545033A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
US11373275B2 (en) Method for generating high-resolution picture, computer device, and storage medium
KR20200089410A (en) Low-light image correction method based on optimal gamma correction
CN113052768B (en) Method, terminal and computer readable storage medium for processing image
CN111312141A (en) Color gamut adjusting method and device
CN107220934B (en) Image reconstruction method and device
CN109934783B (en) Image processing method, image processing device, computer equipment and storage medium
CN115147304A (en) Image fusion method and device, electronic equipment, storage medium and product
CN115665565A (en) Online tobacco leaf image color correction method, system and device
CN114998122A (en) Low-illumination image enhancement method
CN113935934A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
US10079981B2 (en) Image dynamic range adjustment method, terminal, and storage medium
US20160241830A1 (en) Electronic system and image processing method
CN111724312A (en) Method and terminal for processing image
CN111932521B (en) Image quality testing method and device, server and computer readable storage medium
CN111539975B (en) Method, device, equipment and storage medium for detecting moving object
WO2021159414A1 (en) White balance control method and apparatus, electronic device and computer-readable storage medium
CN116744125A (en) Image color data processing method, device, equipment and storage medium
CN115205168A (en) Image processing method, device, electronic equipment, storage medium and product
US20180005352A1 (en) Image data conversion
CN113256487B (en) Image processing method, device, equipment and storage medium
CN111242087B (en) Object identification method and device
WO2022052820A1 (en) Data processing method, system, and apparatus
CN115375780A (en) Color difference calculation method and device, electronic equipment, storage medium and product
TWI471848B (en) Method for correcting colors and image processing device
CN111401477B (en) Image processing method, apparatus, electronic device, and computer-readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20918585

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19/01/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20918585

Country of ref document: EP

Kind code of ref document: A1