CN113766206B - White balance adjustment method, device and storage medium - Google Patents
White balance adjustment method, device and storage medium Download PDFInfo
- Publication number
- CN113766206B CN113766206B CN202010486145.2A CN202010486145A CN113766206B CN 113766206 B CN113766206 B CN 113766206B CN 202010486145 A CN202010486145 A CN 202010486145A CN 113766206 B CN113766206 B CN 113766206B
- Authority
- CN
- China
- Prior art keywords
- color temperature
- temperature information
- determining
- weight value
- information
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000009826 distribution Methods 0.000 claims description 13
- 230000003595 spectral effect Effects 0.000 claims description 13
- 238000004891 communication Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 5
- 230000000875 corresponding effect Effects 0.000 description 45
- 238000004422 calculation algorithm Methods 0.000 description 10
- 230000004044 response Effects 0.000 description 10
- 230000000694 effects Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000005286 illumination Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000003384 imaging method Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 238000012937 correction Methods 0.000 description 2
- 230000002596 correlated effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/73—Colour balance circuits, e.g. white balance circuits or colour temperature control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
- H04N23/84—Camera processing pipelines; Components thereof for processing colour signals
- H04N23/88—Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
Abstract
The embodiment of the application provides a white balance adjustment method, a white balance adjustment device and a storage medium, which comprise the following steps: respectively determining first color temperature information acquired by a color temperature sensor, second color temperature information of a shot image and brightness information; determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor; determining target color temperature information according to a preset weight value, first color temperature information and second color temperature information; and the white balance of the photographed image is adjusted using the target color temperature information.
Description
Technical Field
The present application relates to the field of communications, and in particular, to a method and apparatus for adjusting white balance, and a storage medium.
Background
When a terminal with a shooting function is used for shooting, color values acquired by a color image and the true color of an object have deviation, a human visual system has color constancy, the invariable characteristic of the surface color of the object can be acquired from a changed illumination environment and imaging conditions, but the imaging equipment does not have such an adjusting function, different illumination environments can cause the acquired image color to deviate from the true color to a certain extent, and a proper color balance (correction) algorithm needs to be selected to eliminate the influence of the illumination environment on color appearance. Gray world algorithms are the most common balancing algorithms.
However, in some special scenes, gray world algorithms are easy to have obvious misjudgment. In a solid-color scene, since the solid-color structure is free from other colors for comparison, scattered points are displayed on a gray-scale world algorithm, and linear light source trend is difficult to predict, so that the possibility of misjudgment is quite high. In a mixed light source scene without a face reference, the correct light source in the environment cannot be known, only the effect adjustment can be relied on, and the mixed light source is weighed in a weight taking mode, so that the inconsistency before and after the white balance can be caused, and the problems of low accuracy and poor effect of the white balance adjustment are caused.
Disclosure of Invention
The embodiment of the application provides a white balance adjustment method, a white balance adjustment device and a storage medium, which can improve the accuracy and the adjustment effect of white balance adjustment.
The technical scheme of the application is realized as follows:
the embodiment of the application provides a white balance adjustment method, which comprises the following steps:
Respectively determining first color temperature information acquired by a color temperature sensor, second color temperature information of a shot image and brightness information;
determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor;
Determining target color temperature information according to the preset weight value, the first color temperature information and the second color temperature information; and adjusting the white balance of the photographed image by using the target color temperature information.
In the above method, the determining a preset weight value based on the first color temperature information and the brightness information includes:
Searching a first confidence value corresponding to the first color temperature information from a corresponding relation between a preset color temperature and a confidence coefficient, wherein the confidence coefficient in the corresponding relation between the preset color temperature and the confidence coefficient is preset according to the error rate between the preset color temperature information and the standard color temperature information acquired by the color temperature sensor;
and determining the first confidence value as the preset weight value.
In the above method, the determining a preset weight value based on the brightness information includes:
comparing the brightness information with a preset brightness threshold value to obtain a comparison result;
And determining a preset weight value corresponding to the brightness information from the corresponding relation between the preset brightness and the weight value according to the comparison result.
In the above method, the determining a preset weight value based on the first color temperature information and the brightness information includes:
Determining a spectral energy distribution based on the first color temperature information and the luminance information;
determining a current shooting light source according to the spectral energy distribution;
And determining the preset weight value according to the current shooting light source.
In the above method, the determining a preset weight value according to the field angle of the color temperature sensor includes:
And determining a preset weight value corresponding to the field angle from the corresponding relation between the preset field angle and the weight value.
In the above method, the determining the second color temperature information of the captured image includes:
R/G, B/G of the shot image and R/G, B/G of a color temperature sensor are respectively acquired;
And determining the second color temperature information according to R/G, B/G of the shot image and R/G, B/G of a color temperature sensor.
In the above method, the determining the second color temperature information according to R/G, B/G of the photographed image and R/G, B/G of the color temperature sensor includes:
Determining a first distance between R/G, B/G of the captured image and R/G, B/G of a color temperature sensor;
determining a weight value of the first distance according to the corresponding relation between the distance and the weight value;
Obtaining a target R/G, B/G according to the weight value of the first distance and the R/G, B/G of the shot image;
And converting the target R/G, B/G into the second color temperature information.
The embodiment of the application provides a white balance adjusting device, which comprises:
a determining unit for determining first color temperature information, second color temperature information and brightness information of the photographed image acquired by the color temperature sensor, respectively; determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor; determining target color temperature information according to the preset weight value, the first color temperature information and the second color temperature information;
And the white balance adjusting unit is used for adjusting the white balance of the shot image by utilizing the target color temperature information.
The embodiment of the application provides a white balance adjusting device, which comprises: a processor, a memory, and a communication bus; the processor implements the method described above when executing the running program stored in the memory.
An embodiment of the application provides a storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the above-mentioned method.
The embodiment of the application provides a white balance adjustment method, a white balance adjustment device and a storage medium, wherein the white balance adjustment method comprises the following steps: respectively determining first color temperature information acquired by a color temperature sensor, second color temperature information of a shot image and brightness information; determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor; determining target color temperature information according to a preset weight value, first color temperature information and second color temperature information; and the white balance of the photographed image is adjusted using the target color temperature information. By adopting the implementation scheme, the white balance adjusting device determines the preset weight value based on the first color temperature information acquired by the color temperature sensor, the brightness information of the shot image and/or the field angle of the color temperature sensor, and respectively adjusts the weights of the first color temperature information and the second color temperature information by using the preset weight value, so that the accuracy of the target color temperature information determined according to the first color temperature information and the second color temperature information is high, and therefore, the accuracy and the adjusting effect of white balance adjustment can be improved when the white balance of the shot image is adjusted by using the target color temperature information.
Drawings
Fig. 1 is a flowchart of a white balance adjustment method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an exemplary two-dimensional coordinate system according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of a white balance adjustment device according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of a white balance adjustment device according to an embodiment of the present application.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the application. And are not intended to limit the application.
Example 1
An embodiment of the present application provides a white balance adjustment method, as shown in fig. 1, the method may include:
S101, respectively determining first color temperature information, second color temperature information and brightness information of a shot image, which are acquired by a color temperature sensor.
The white balance adjustment method provided by the embodiment of the application can be applied to a terminal with an image acquisition function, wherein the terminal comprises an image acquisition unit and a color temperature sensor, and the terminal can be implemented in various forms. For example, the terminals described in the present application may include mobile terminals such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a Personal digital assistant (Personal DIGITAL ASSISTANT, PDA), a Portable media player (Portable MEDIA PLAYER, PMP), a navigation device, a wearable device, a smart bracelet, a pedometer, and the like, as well as fixed terminals such as a digital TV, a desktop computer, and the like. The terminal may include: shooting unit, audio input unit, audio output unit, display element, user input unit, memory, processor, power supply etc..
The white balance adjustment method provided by the embodiment of the application can also be applied to a white balance adjustment device with a white balance adjustment function.
In the embodiment of the application, a white balance adjusting device respectively acquires R/G, B/G of a shot image and R/G, B/G of a color temperature sensor; the second color temperature information is determined based on R/G, B/G of the photographed image and R/G, B/G of the color temperature sensor.
In the embodiment of the application, a white balance adjusting device divides a shot image into M multiplied by N image blocks, wherein the number of the image blocks is related to the number of the actual white balance adjusting device, when M and N take 1, the shot image is not required to be divided, and three-channel response of the shot image is directly calculated based on a white balance algorithm; when M and N are not all 1, the shot image needs to be segmented according to a certain segmentation strategy, for example, the segmentation strategy is to segment the shot image into rectangular image blocks of M rows and N columns, or segment the original image into foreground or background according to the shot object in the shot image, and the like, and the segmentation strategy is specifically selected according to the actual situation, and the embodiment of the application is not limited specifically. Thereafter, the white balance adjustment device determines a target image block from among the m×n image blocks.
In practical application, the human visual system has color constancy, can obtain the invariable characteristic of object surface color from the illumination environment and imaging condition that change, but imaging device does not have such color constancy function, and different illumination environments can lead to the acquired image color to have a certain degree of deviation with the true color, need to select suitable color balance (correction) algorithm, eliminate the influence of illumination environment to color appearance. Therefore, the imaging device needs to be capable of accurately conforming to the human eye viewing results under various light sources through the white balance. The gray world algorithm is the most commonly used white balance algorithm.
Illustratively, three channel responses for each pixel point in the target image block are calculated using a gray world algorithm, the three channel responses referring to Red (Red, R) channel responses, green (G) channel responses, and Blue (B) channel responses for the pixels in the target image block. Since the G response of the camera sensor is much higher than the R response and the B response, the G response is simplified to be expressed as R/G and B/G in terms of representation, and the R/G and B/G of all pixels in the target image block are averaged to obtain R/G, B/G of the captured image.
In the embodiment of the application, the white balance adjusting device determines the R/G, B/G of the color temperature sensor based on the color temperature curve, wherein the color temperature curve can be a Planckian curve, the color temperature information is obtained through the color temperature sensor, and the R/G value and the B/G value of the color temperature sensor can be calculated by directly searching the corresponding relation table according to the corresponding relation table because the Planckian curve has the color temperature information according to the position corresponding to the Planckian curve calibrated on the R/G coordinate system and the B/G coordinate system, so that the corresponding relation table of the color temperature and the R/G coordinate and the B/G coordinate can be established according to the Planckian curve after the color temperature sensor detects the color temperature.
In the embodiment of the application, the white balance adjusting device determines the second color temperature information according to R/G, B/G of the shot image and R/G, B/G of the color temperature sensor by: the white balance adjustment device determines a first distance between R/G, B/G of a shot image and R/G, B/G of a color temperature sensor; determining a weight value of the first distance according to the corresponding relation between the distance and the weight value; obtaining a target R/G, B/G according to the weight value of the first distance and R/G, B/G of the shot image; the target R/G, B/G is converted into second color temperature information.
Fig. 2 is a schematic diagram of two-dimensional coordinates of a sensor space in an embodiment of the present application, wherein an abscissa of a coordinate system in fig. 2 is R/G, an overall coordinate is B/G, ts is a coordinate point corresponding to R/G, B/G of a captured image, os is a coordinate point corresponding to R/G, B/G of a color temperature sensor, and a first distance D between the two-dimensional coordinate points is calculated by using an euclidean distance calculation formula.
Specifically, the first distance is calculated as formula (1)
Wherein x1 and y1 are R/G, B/G of a shot image, and x2 and y2 are R/G, B/G of a color temperature sensor.
In the embodiment of the application, the white balance adjusting device is internally provided with a corresponding relation between the distance and the weight value, and the white balance adjusting device determines the weight value of the first distance from the corresponding relation between the distance and the weight value; multiplying the weight value of the first distance by R/G, B/G of the shot image to obtain a target R/G, B/G; finally, the target R/G, B/G is converted into second color temperature information by using a color temperature conversion formula.
In the embodiment of the application, the white balance adjusting device acquires the brightness information of the shot image according to the automatic exposure.
S102, determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor.
After the white balance adjustment device determines the first color temperature information acquired by the color temperature sensor and the second color temperature information of the shot image respectively, the white balance adjustment device determines a preset weight value between the first color temperature information and the second color temperature information, and when the preset weight value is used for calculating target color temperature information, the duty ratio of the first color temperature information and the second color temperature information is adjusted, specifically, the white balance adjustment device determines the preset weight value based on the first color temperature information, the second color temperature information of the shot image and/or the field angle of the color temperature sensor.
In an alternative embodiment, the white balance adjustment device searches a first confidence value corresponding to the first color temperature information from a corresponding relation between a preset color temperature and a confidence, wherein the confidence in the corresponding relation between the preset color temperature and the confidence is preset according to an error rate between the preset color temperature information and the standard color temperature information acquired by the color temperature sensor; and then, the white balance adjustment device determines the first confidence value as a preset weight value.
In the embodiment of the application, a white balance adjusting device shoots an image in advance and acquires preset color temperature information by utilizing a color temperature sensor, then the white balance adjusting device determines standard color temperature information by utilizing an illuminometer, calculates error rate of the color temperature sensor according to the preset color temperature information and the standard color temperature information, designs different confidence degrees according to different error rates, at the moment, sets corresponding confidence degrees for the color temperature information under different shooting light sources respectively to obtain a corresponding relation between the preset color temperature and the confidence degrees, and after the white balance adjusting device determines the first color temperature information acquired by the color temperature sensor, the white balance adjusting device searches a first confidence coefficient value corresponding to the first color temperature information from the corresponding relation between the preset color temperature and the confidence degrees and determines the first confidence coefficient value as a preset weight value.
In an alternative embodiment, a brightness threshold is set in the white balance adjusting device, and the white balance adjusting device compares the brightness information with a preset brightness threshold to obtain a comparison result; and determining a preset weight value corresponding to the brightness information from the corresponding relation between the preset brightness and the weight value according to the comparison result.
In the embodiment of the application, when the white balance adjusting device determines that the brightness information is lower than the preset brightness threshold value, the white balance adjusting device is more dependent on the first color temperature sensor acquired by the color temperature sensor, and at the moment, the white balance adjusting device sets a larger weight value for the first color temperature information acquired by the color temperature sensor; on the contrary, when the white balance adjusting device determines that the brightness information is higher than the preset brightness threshold value, the white balance adjusting device sets a smaller weight value for the first color temperature information.
Further, after the white balance adjustment device obtains the first color temperature information and the luminance information, the white balance adjustment device may further determine a spectral energy distribution based on the first color temperature information and the luminance information, and since the spectral energy distributions of the different photographing light sources are different, the white balance may determine the current photographing light source according to the spectral energy distribution, and then determine the preset weight value according to the current photographing light source.
Specifically, the white balance adjustment device determines the spectral energy distribution of the light source on the determination block by using the correlated color temperature (Correlated Color Temperature, CCT) to determine the first color temperature information, and then by using the far infrared (INFRARED LIGHT, IR) information and the brightness information obtained from the automatic exposure, and the white balance adjustment device determines the current shooting light source according to the spectral energy distribution.
In the embodiment of the application, different shooting scenes, such as night scenes with low brightness information or mixed light source scenes, can be determined by the current shooting light source, and the color temperatures acquired by the color temperature sensors in different shooting scenes have error rates of different degrees, so that the white balance adjusting device sets corresponding weight values for different shooting light sources, and the white balance adjusting device determines preset weight values according to the current shooting light source, so that the accuracy of the preset weight values can be improved.
In an alternative embodiment, the white balance adjustment device determines a preset weight value corresponding to the angle of view from a corresponding relationship between the preset angle of view and the weight value.
In the embodiment of the application, the field angle and the distance of the color temperature sensor are in a two-dimensional relationship, namely, the larger the field angle of the color temperature sensor is, the closer the distance is, and at the moment, the white balance adjusting device sets a smaller weight value for the first color temperature information acquired by the color temperature sensor.
It should be noted that, the above-mentioned methods for determining the preset weight value are only several optional methods provided in the embodiments of the present application, and other ways of setting different preset weight values for different shooting scenes by using relevant parameters of the color temperature sensor are still protected, and the embodiments of the present application are not limited specifically, and specifically selected according to actual situations.
S103, determining target color temperature information according to a preset weight value, the first color temperature information and the second color temperature information; and the white balance of the photographed image is adjusted using the target color temperature information.
After the white balance adjusting device determines the preset weight value, the white balance adjusting device determines target color temperature information according to the preset weight value, the first color temperature information and the second color temperature information, and then the white balance adjusting device adjusts the white balance of the shot image by using the target color temperature information.
In the embodiment of the application, the white balance adjusting device calculates the target color temperature information by using the formula (2).
TFinal=(1-α)×STATST+α×SensorT (2)
Wherein T Final represents target color temperature information, STATS T is second color temperature information, sensor T is first color temperature information acquired by a color temperature Sensor, and α is a preset weight value.
By way of example, as shown in figure 3,
It can be understood that the white balance adjustment device determines a preset weight value based on the first color temperature information acquired by the color temperature sensor, the brightness information of the photographed image and/or the view angle of the color temperature sensor, and respectively adjusts the weights of the first color temperature information and the second color temperature information by using the preset weight value, so that the accuracy of the target color temperature information determined according to the first color temperature information and the second color temperature information is high, and therefore, when the white balance of the photographed image is adjusted by using the target color temperature information, the accuracy and the adjustment effect of the white balance adjustment can be improved.
Example two
An embodiment of the present application provides a white balance adjustment device 1, as shown in fig. 3, the white balance adjustment device 1 includes:
A determining unit 10 for determining first color temperature information, second color temperature information and brightness information of a photographed image acquired by the color temperature sensor, respectively; determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor; determining target color temperature information according to the preset weight value, the first color temperature information and the second color temperature information;
a white balance adjustment unit 11 for adjusting the white balance of the captured image using the target color temperature information.
Optionally, the apparatus 1 further comprises: a search unit;
the searching unit is used for searching a first confidence value corresponding to the first color temperature information from the corresponding relation between the preset color temperature and the confidence, and the confidence in the corresponding relation between the preset color temperature and the confidence is preset according to the error rate between the preset color temperature information and the standard color temperature information acquired by the color temperature sensor;
The determining unit 10 is further configured to determine the first confidence value as the preset weight value.
Optionally, the apparatus 1 further comprises: and a comparison unit:
the comparison unit is used for comparing the brightness information with a preset brightness threshold value to obtain a comparison result;
the determining unit 10 is further configured to determine, according to the comparison result, a preset weight value corresponding to the luminance information from a corresponding relationship between preset luminance and weight values.
Optionally, the determining unit 10 is further configured to determine a spectral energy distribution based on the first color temperature information and the brightness information; determining a current shooting light source according to the spectral energy distribution; and determining the preset weight value according to the current shooting light source.
Optionally, the determining unit 10 is further configured to determine a preset weight value corresponding to the angle of view from a corresponding relationship between the preset angle of view and the weight value.
Optionally, the apparatus 1 further comprises: an acquisition unit;
The acquisition unit is used for acquiring R/G, B/G of the shot image and R/G, B/G of the color temperature sensor respectively;
the determining unit 10 is further configured to determine the second color temperature information according to R/G, B/G of the captured image and R/G, B/G of the color temperature sensor.
Optionally, the apparatus 1 further comprises: a color temperature conversion unit;
The determining unit 10 is further configured to determine a first distance between R/G, B/G of the captured image and R/G, B/G of a color temperature sensor; determining a weight value of the first distance according to the corresponding relation between the distance and the weight value; obtaining a target R/G, B/G according to the weight value of the first distance and the R/G, B/G of the shot image;
The color temperature conversion unit is used for converting the target R/G, B/G into the second color temperature information.
The white balance adjusting device provided by the embodiment of the application respectively determines the first color temperature information acquired by the color temperature sensor, the second color temperature information of the shot image and the brightness information; determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor; determining target color temperature information according to a preset weight value, first color temperature information and second color temperature information; and the white balance of the photographed image is adjusted using the target color temperature information. Therefore, according to the white balance adjustment device provided by the embodiment, the white balance adjustment device determines the preset weight value based on the first color temperature information acquired by the color temperature sensor, the brightness information of the shot image and/or the view angle of the color temperature sensor, and respectively adjusts the weights of the first color temperature information and the second color temperature information by using the preset weight value, so that the accuracy of the target color temperature information determined according to the first color temperature information and the second color temperature information is high, and therefore, the accuracy and the adjustment effect of the white balance adjustment can be improved when the white balance of the shot image is adjusted by using the target color temperature information.
Fig. 4 is a schematic diagram of a second component structure of a white balance adjustment device 1 according to an embodiment of the present application, in practical application, based on the same disclosure concept of the above embodiment, as shown in fig. 4, the white balance adjustment device 1 of the present embodiment includes: a processor 12, a memory 13 and a communication bus 14.
In a specific embodiment, the determining unit 10, the white balance adjusting unit 11, the searching unit, the comparing unit, the obtaining unit and the color temperature converting unit may be implemented by a Processor 12 located on the white balance adjusting device 1, where the Processor 12 may be at least one of an ASIC (Application SPECIFIC INTEGRATED Circuit), a digital signal Processor (DSP, digital Signal Processor), a digital signal processing image processing device (DSPD, digital Signal Processing Device), a programmable logic image processing device (PLD, programmable Logic Device), a field programmable gate array (FPGA, field Programmable GATE ARRAY), a CPU, a controller, a microcontroller and a microprocessor. It will be appreciated that the electronics for implementing the above-described processor functions may be other for different devices, and the present embodiment is not particularly limited.
In the embodiment of the present application, the communication bus 14 is used to implement connection communication between the processor 12 and the memory 13; the processor 12 implements the following data scheduling method when executing the running program stored in the memory 13:
Respectively determining first color temperature information acquired by a color temperature sensor, second color temperature information of a shot image and brightness information; determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor; determining target color temperature information according to the preset weight value, the first color temperature information and the second color temperature information; and adjusting the white balance of the photographed image by using the target color temperature information.
In the above method, the processor 12 is further configured to search a first confidence value corresponding to the first color temperature information from a preset color temperature and confidence corresponding relationship, where the confidence in the preset color temperature and confidence corresponding relationship is preset according to an error rate between the preset color temperature information and the standard color temperature information acquired by the color temperature sensor; and determining the first confidence value as the preset weight value.
In the above method, the processor 12 is further configured to compare the brightness information with a preset brightness threshold value to obtain a comparison result; and determining a preset weight value corresponding to the brightness information from the corresponding relation between the preset brightness and the weight value according to the comparison result.
In the above method, the processor 12 is further configured to determine a spectral energy distribution based on the first color temperature information and the luminance information; determining a current shooting light source according to the spectral energy distribution; and determining the preset weight value according to the current shooting light source.
In the above method, the processor 12 is further configured to determine a preset weight value corresponding to the angle of view from a corresponding relationship between the preset angle of view and the weight value.
In the above method, the processor 12 is further configured to acquire R/G, B/G of the captured image and R/G, B/G of the color temperature sensor, respectively; and determining the second color temperature information according to R/G, B/G of the shot image and R/G, B/G of a color temperature sensor.
In the above method, the processor 12 is further configured to determine a first distance between R/G, B/G of the captured image and R/G, B/G of the color temperature sensor; determining a weight value of the first distance according to the corresponding relation between the distance and the weight value; obtaining a target R/G, B/G according to the weight value of the first distance and the R/G, B/G of the shot image; and converting the target R/G, B/G into the second color temperature information.
An embodiment of the present application provides a storage medium having stored thereon a computer program, where the computer readable storage medium stores one or more programs, where the one or more programs are executable by one or more processors and applied to a white balance adjustment device, where the computer program implements the white balance adjustment method according to the first embodiment.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present disclosure may be embodied essentially or in a part contributing to the related art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including several instructions for causing an image display device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present disclosure.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the present application.
Claims (9)
1. A white balance adjustment method, the method comprising:
Respectively determining first color temperature information acquired by a color temperature sensor, second color temperature information of a shot image and brightness information;
determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor;
Determining target color temperature information according to the preset weight value, the first color temperature information and the second color temperature information; the white balance of the shot image is adjusted by utilizing the target color temperature information;
wherein the determining the second color temperature information of the photographed image includes:
R/G, B/G of the shot image and R/G, B/G of a color temperature sensor are respectively acquired; and determining the second color temperature information according to R/G, B/G of the shot image and R/G, B/G of a color temperature sensor.
2. The method of claim 1, wherein the determining a preset weight value based on the first color temperature information and the brightness information comprises:
Searching a first confidence value corresponding to the first color temperature information from a corresponding relation between a preset color temperature and a confidence coefficient, wherein the confidence coefficient in the corresponding relation between the preset color temperature and the confidence coefficient is preset according to the error rate between the preset color temperature information and the standard color temperature information acquired by the color temperature sensor;
and determining the first confidence value as the preset weight value.
3. The method of claim 1, wherein determining a preset weight value based on the luminance information comprises:
comparing the brightness information with a preset brightness threshold value to obtain a comparison result;
And determining a preset weight value corresponding to the brightness information from the corresponding relation between the preset brightness and the weight value according to the comparison result.
4. The method of claim 1, wherein the determining a preset weight value based on the first color temperature information and the brightness information comprises:
Determining a spectral energy distribution based on the first color temperature information and the luminance information;
determining a current shooting light source according to the spectral energy distribution;
And determining the preset weight value according to the current shooting light source.
5. The method of claim 1, wherein determining the preset weight value based on the field angle of the color temperature sensor comprises:
And determining a preset weight value corresponding to the field angle from the corresponding relation between the preset field angle and the weight value.
6. The method of claim 1, wherein the determining the second color temperature information from R/G, B/G of the captured image and R/G, B/G of a color temperature sensor comprises:
Determining a first distance between R/G, B/G of the captured image and R/G, B/G of a color temperature sensor;
determining a weight value of the first distance according to the corresponding relation between the distance and the weight value;
Obtaining a target R/G, B/G according to the weight value of the first distance and the R/G, B/G of the shot image;
And converting the target R/G, B/G into the second color temperature information.
7. A white balance adjustment device, characterized in that the white balance adjustment device comprises:
a determining unit for determining first color temperature information, second color temperature information and brightness information of the photographed image acquired by the color temperature sensor, respectively; determining a preset weight value based on the first color temperature information, the brightness information and/or the field angle of the color temperature sensor; determining target color temperature information according to the preset weight value, the first color temperature information and the second color temperature information;
a white balance adjustment unit for adjusting the white balance of the captured image using the target color temperature information;
an acquisition unit for acquiring R/G, B/G of the photographed image and R/G, B/G of a color temperature sensor, respectively;
the determining unit is further configured to determine the second color temperature information according to R/G, B/G of the captured image and R/G, B/G of the color temperature sensor.
8. A white balance adjustment device, characterized in that the white balance adjustment device comprises: a processor, a memory, and a communication bus; the processor, when executing a memory-stored operating program, implements the method of any one of claims 1-6.
9. A storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010486145.2A CN113766206B (en) | 2020-06-01 | 2020-06-01 | White balance adjustment method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010486145.2A CN113766206B (en) | 2020-06-01 | 2020-06-01 | White balance adjustment method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113766206A CN113766206A (en) | 2021-12-07 |
CN113766206B true CN113766206B (en) | 2024-08-02 |
Family
ID=78782688
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010486145.2A Active CN113766206B (en) | 2020-06-01 | 2020-06-01 | White balance adjustment method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113766206B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114554170B (en) | 2022-03-08 | 2024-06-11 | 三星半导体(中国)研究开发有限公司 | Method for multi-sensor white balance synchronization and electronic device using same |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107343143A (en) * | 2017-06-30 | 2017-11-10 | 广东欧珀移动通信有限公司 | An image processing method, device, terminal and computer-readable storage medium |
CN110602473A (en) * | 2019-10-24 | 2019-12-20 | 维沃移动通信有限公司 | White balance calibration method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3607654B2 (en) * | 2001-09-14 | 2005-01-05 | 株式会社東芝 | Illumination light color estimation method and imaging device for obtaining white balance |
-
2020
- 2020-06-01 CN CN202010486145.2A patent/CN113766206B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107343143A (en) * | 2017-06-30 | 2017-11-10 | 广东欧珀移动通信有限公司 | An image processing method, device, terminal and computer-readable storage medium |
CN110602473A (en) * | 2019-10-24 | 2019-12-20 | 维沃移动通信有限公司 | White balance calibration method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113766206A (en) | 2021-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108174118B (en) | Image processing method and device and electronic equipment | |
KR102346522B1 (en) | Image processing device and auto white balancing metohd thereof | |
CN101527860B (en) | White balance control apparatus, control method therefor, and image sensing apparatus | |
CN113497927B (en) | White balance adjustment method, device, terminal and storage medium | |
US9307213B2 (en) | Robust selection and weighting for gray patch automatic white balancing | |
CN102446347B (en) | Image white balance method and device | |
CN112055190B (en) | Image processing method, device and storage medium | |
CN109040579B (en) | Shooting control method, terminal and computer readable medium | |
KR20200017271A (en) | An elelctronic device and method for processing an image in the same | |
WO2023016320A1 (en) | Image processing method and apparatus, and device and medium | |
WO2022067761A1 (en) | Image processing method and apparatus, capturing device, movable platform, and computer readable storage medium | |
CN113766206B (en) | White balance adjustment method, device and storage medium | |
CN112887630A (en) | Automatic exposure method, electronic device, and computer-readable storage medium | |
US8199217B2 (en) | Device and method for image processing, program, and imaging apparatus | |
CN107635124A (en) | White balance processing method, device and equipment for face shooting | |
US20230342977A1 (en) | Method for Determining Chromaticity Information and Related Electronic Device | |
CN111918047A (en) | Photographing control method and device, storage medium and electronic equipment | |
CN112995633B (en) | Image white balance processing method and device, electronic equipment and storage medium | |
CN115514948B (en) | Image adjusting method and electronic device | |
CN113793291A (en) | Image fusion method and device, electronic equipment and storage medium | |
CN114071108B (en) | Image processing method, apparatus, electronic device, and computer-readable storage medium | |
CN115514947B (en) | Algorithm and electronic equipment for AI automatic white balance | |
CN112995634B (en) | Image white balance processing method and device, electronic equipment and storage medium | |
TWI568270B (en) | Image calibration system and its method | |
CN114143447B (en) | Image processing method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |