CN113497927B - White balance adjustment method, device, terminal and storage medium - Google Patents

White balance adjustment method, device, terminal and storage medium Download PDF

Info

Publication number
CN113497927B
CN113497927B CN202010192160.6A CN202010192160A CN113497927B CN 113497927 B CN113497927 B CN 113497927B CN 202010192160 A CN202010192160 A CN 202010192160A CN 113497927 B CN113497927 B CN 113497927B
Authority
CN
China
Prior art keywords
gain value
value
image block
color temperature
target image
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
Application number
CN202010192160.6A
Other languages
Chinese (zh)
Other versions
CN113497927A (en
Inventor
张钧凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010192160.6A priority Critical patent/CN113497927B/en
Publication of CN113497927A publication Critical patent/CN113497927A/en
Application granted granted Critical
Publication of CN113497927B publication Critical patent/CN113497927B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • 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

Abstract

The embodiment of the application discloses a white balance adjustment method, a white balance adjustment device, a white balance adjustment terminal and a white balance storage medium, wherein the white balance adjustment method comprises the following steps: acquiring an original image of a shooting scene aiming at a target and color temperature information acquired by a color temperature sensor; calculating three channel responses of a target image block in an original image based on a white balance algorithm to obtain a first gain value of the target image block; determining a second gain value corresponding to the color temperature information based on the corresponding relation between the color temperature calibrated in advance in the color temperature curve and the gain value; and adjusting the first gain value by using the second gain value to obtain a final gain value of the target image block. Therefore, the color temperature sensor can be used for rapidly detecting the color temperature information, the first gain value is obtained by the white balance algorithm according to the second gain value corresponding to the color temperature information, the accuracy of the image gain value is improved, and the white balance adjusting effect is further improved.

Description

White balance adjustment method, device, terminal and storage medium
Technical Field
The present application relates to image processing technologies, and in particular, to a white balance adjustment method, device, terminal, and 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, the mixed light source is weighed in a weight taking mode, the result is too subjective, and the inconsistent result before and after white balance is easy to occur.
Disclosure of Invention
In order to solve the above technical problems, an embodiment of the present application is expected to provide a white balance adjustment method, a device, a terminal and a storage medium.
The technical scheme of the application is realized as follows:
in a first aspect, a white balance adjustment method is provided, the method including:
acquiring an original image aiming at a target shooting scene acquired by an image acquisition unit and color temperature information aiming at the target shooting scene acquired by a color temperature sensor;
calculating three channel responses of a target image block in the original image based on a white balance algorithm to obtain a first gain value of the target image block;
determining a second gain value corresponding to the color temperature information based on the corresponding relation between the color temperature and the gain value calibrated in advance in the color temperature curve;
and adjusting the first gain value by using the second gain value to obtain a final gain value of the target image block.
In a second aspect, there is provided a white balance adjustment apparatus comprising:
the acquisition unit is used for acquiring the original image aiming at the target shooting scene acquired by the image acquisition unit and the color temperature information aiming at the target shooting scene acquired by the color temperature sensor;
the computing unit is used for computing three-channel response of a target image block in the original image based on a white balance algorithm to obtain a first gain value of the target image block;
the determining unit is used for determining a second gain value corresponding to the color temperature information based on the corresponding relation between the color temperature calibrated in advance in the color temperature curve and the gain value;
and the adjusting unit is used for adjusting the first gain value by using the second gain value to obtain a final gain value of the target image block.
In a third aspect, a terminal is provided, the terminal comprising: an image acquisition unit, a color temperature sensor, a processor and a memory configured to store a computer program capable of running on the processor,
wherein the processor is configured to execute the steps of the aforementioned method when the computer program is run.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored, wherein the computer program, when being executed by a processor, carries out the steps of the aforementioned method.
The embodiment of the application provides a white balance adjustment method, a white balance adjustment device, a white balance adjustment terminal and a storage medium, wherein the white balance adjustment method comprises the following steps: acquiring an original image of a shooting scene aiming at a target and color temperature information acquired by a color temperature sensor; calculating three channel responses of a target image block in the original image based on a white balance algorithm to obtain a first gain value of the target image block; determining a second gain value corresponding to the color temperature information based on the corresponding relation between the color temperature and the gain value calibrated in advance in the color temperature curve; and adjusting the first gain value by using the second gain value to obtain a final gain value of the target image block. Therefore, the color temperature sensor can be used for rapidly detecting the color temperature information, the first gain value is obtained by the white balance algorithm according to the second gain value corresponding to the color temperature information, the accuracy of the image gain value is improved, and the white balance adjusting effect is further improved.
Drawings
FIG. 1 is a schematic flow chart of a white balance adjustment method according to an embodiment of the application;
FIG. 2 is a schematic diagram of a second process of the white balance adjustment method according to an embodiment of the application;
FIG. 3 is a schematic diagram of a two-dimensional coordinate system according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a mapping relationship between distance and weight according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a white balance adjustment device according to an embodiment of the present application;
fig. 6 is a schematic diagram of a composition structure of a terminal according to an embodiment of the present application.
Detailed Description
For a more complete understanding of the nature and the technical content of the embodiments of the present application, reference should be made to the following detailed description of embodiments of the application, taken in conjunction with the accompanying drawings, which are meant to be illustrative only and not limiting of the embodiments of the application.
An embodiment of the present application provides a white balance adjustment method, and fig. 1 is a first flow chart of the white balance adjustment method in the embodiment of the present application, as shown in fig. 1, where the method specifically may include:
step 101: acquiring an original image aiming at a target shooting scene acquired by an image acquisition unit and color temperature information aiming at the target shooting scene 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 cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, 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 device with a white balance adjustment function, the device acquires the original image acquired by the image acquisition unit on the terminal and the color temperature information acquired by the color temperature sensor, and the white balance processing is carried out on the original image by utilizing the color temperature information.
Step 102: calculating three channel responses of a target image block in the original image based on a white balance algorithm to obtain a first gain value of the target image block;
in practical application, before the white balance algorithm calculates the three-channel response of the target image block in the original image, the method further includes: dividing the original image into m×n image blocks; wherein M and N are positive integers; and taking any image block in the M multiplied by N image blocks as the target image block.
That is, the image is divided into m×n image blocks, and the number of image blocks is related to the actual white balance adjustment device. When M and N take 1, the three-channel response of the original image is directly calculated based on a white balance algorithm without dividing the original image; when M and N are not all 1, the original image needs to be segmented according to a certain segmentation strategy, for example, the segmentation strategy is to segment the original image into rectangular image blocks of M rows and N columns, or segment the original image into a foreground or a background according to a shooting object in the original image.
The acquisition process of the target image block is as follows: and selecting a target image block by taking the (i, j) th pixel point of the original image as a target vertex according to the preset length w and the preset width h, wherein i is an integer smaller than P, j is an integer smaller than Q, (P, Q) is the coordinate of the pixel point with the maximum row index and the maximum column index in the original image, and the target vertex is the vertex at the upper left end of the target image block.
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 will be much higher than the R response and the B response, in terms of representation, it will be reduced to the average of R/G and B/G for all pixels in the target image block, resulting in a first gain value for the target image block.
Step 103: determining a second gain value corresponding to the color temperature information based on the corresponding relation between the color temperature and the gain value calibrated in advance in the color temperature curve;
the color temperature curve can be a planckian curve, the color temperature value is obtained through the color temperature sensor, and according to the position corresponding to the planckian curve calibrated on the R/G and B/G coordinate system in advance, because the planckian curve has color temperature information, a corresponding relation table of the color temperature and the R/G and B/G coordinates can be established according to the planckian curve, after the color temperature is detected through the color temperature sensor, the corresponding relation table can be established according to the corresponding relation between the color temperature calibrated in advance in the planckian curve and the correction parameter, and the R/G and B/G values corresponding to the color temperature transmitted by the color temperature sensor, namely the second gain value, can be calculated directly through searching the corresponding relation table.
Step 104: and adjusting the first gain value by using the second gain value to obtain a final gain value of the target image block.
In some embodiments, the step specifically includes: calculating the credibility of the first gain value based on the second gain value; and adjusting the first gain value based on the credibility of the first gain value to obtain a final gain value of the target image block.
Illustratively, adjusting the first gain value based on the reliability of the first gain value to obtain a final gain value of the target image block includes: when the reliability is greater than or equal to the reliability threshold, the first gain value is used as a final gain value; and when the credibility is smaller than the credibility threshold, the credibility is utilized to adjust the first gain value, and a final gain value is obtained.
That is, the reliability of the first gain value calculated by the white balance algorithm is determined according to the second gain value determined by the color temperature information, if the reliability is higher, the first gain value is directly used for white balance adjustment, so that a better white balance adjustment effect can be obtained, if the reliability is lower, the first gain value needs to be adjusted according to the reliability to obtain a final gain value, and then the final gain value is used for white balance adjustment, so that the white balance adjustment effect is improved.
By adopting the technical scheme, the color temperature information can be detected quickly by the color temperature sensor, the first gain value is obtained by the white balance algorithm according to the second gain value adjustment corresponding to the color temperature information, the accuracy of the image gain value is improved, and the white balance adjustment effect is further improved.
On the basis of the above embodiment, the present application provides a more specific white balance adjustment method, and fig. 2 is a schematic second flow chart of the white balance adjustment method in the embodiment of the present application, where the method specifically includes:
step 201: acquiring an original image aiming at a target shooting scene acquired by an image acquisition unit and color temperature information aiming at the target shooting scene acquired by a color temperature sensor;
in some embodiments, the method further comprises: dividing the original image into m×n image blocks; wherein M and N are positive integers; and taking any image block in the M multiplied by N image blocks as the target image block.
Step 202: calculating three channel responses of a target image block in the original image based on a gray world algorithm to obtain a first gain value of the target image block;
the gray world algorithm (Gray World Algorithm, GWA) is based on gray world assumptions, which assume that: for an image with a large number of color variations, the average of the saturation of the three components Red (Red, R), green (G) and Blue (Blue, B) tends to be the same gray value. That is, the gray world algorithm assumes that the average of the average reflection of a natural scene to light is generally a constant value, and the saturation of the three components R, G, B in the constant value tends to be consistent. When rich colors exist in the image, the image is processed through the gray world algorithm, so that the influence of ambient light can be eliminated better.
Specifically, calculating R response, G response and B response of each pixel point in the target image block based on a gray world algorithm; converting the R response, the G response and the B response of each pixel point into a two-dimensional coordinate system to obtain two-dimensional coordinate values R/G and G/B of each pixel point; calculating the average value of R/G and G/B of all pixel points in the target image block to obtain the average value of R/G and the average value of G/B of the target image block; and taking the R/G average value and the G/B average value of the target image block as a first gain value of the target image block.
Here, the first gain value includes a first R/G and a first B/G.
Step 203: determining a second gain value corresponding to the color temperature information based on the corresponding relation between the color temperature and the gain value calibrated in advance in the color temperature curve;
the color temperature curve can be a planckian curve, the color temperature value is obtained through the color temperature sensor, and according to the position corresponding to the planckian curve calibrated on the R/G and B/G coordinate system in advance, because the planckian curve has color temperature information, a corresponding relation table of the color temperature and the R/G and B/G coordinates can be established according to the planckian curve, after the color temperature is detected through the color temperature sensor, the corresponding relation table can be established according to the corresponding relation between the color temperature calibrated in advance in the planckian curve and the correction parameter, and the R/G and B/G values corresponding to the color temperature transmitted by the color temperature sensor, namely the second gain value, can be calculated directly through searching the corresponding relation table.
Here, the second gain value includes a second R/G and a second B/G.
Step 204: calculating the Euclidean distance between the first gain value and the second gain value;
here, when the first gain value and the second gain value are represented in a two-dimensional coordinate system formed by R/G and B/G, the distance between the two points is far and near to represent the degree of reliability, and the distance is far and near to represent the degree of reliability.
In the embodiment of the application, when the first gain value and the second gain value are expressed in the form of two-dimensional coordinate points in the sensor space, the reliability of the first gain value is expressed by calculating the Euclidean distance between the first gain value and the second gain value.
Fig. 3 is a schematic diagram of a two-dimensional coordinate system of a sensor space in an embodiment of the present application, an abscissa of the coordinate system in fig. 3 is R/G, a total coordinate is B/G, ts is a coordinate point corresponding to a first gain value, os is a coordinate point corresponding to a second gain value, and a distance D between the two-dimensional coordinate points is calculated by using an euclidean distance calculation formula.
Specifically, the Euclidean distance calculation formula is that
Wherein x1 is a first R/G, y1 is a first B/G, x2 is a second R/G, and y2 is a second B/G.
Step 205: determining a weight value of the first gain value based on a mapping relation between a distance and the weight value and the Euclidean distance;
when the first gain value is adjusted by the second gain value, the Euclidean distance between the first gain value and the second gain value is quantized into a weight value, and when the distance is closer, the greater weight is given; the smaller the distance, the less weight is given.
That is, the reliability may be quantized into a weight value, and the magnitude of the weight value is used to represent the reliability, and the reliability is involved in the adjustment operation of the first gain value. Here, the higher the reliability, the larger the corresponding weight value, and the lower the reliability, the lower the corresponding weight value, for example, the weight value ranges from 0 to 1, and the closer the weight value is to 1, the higher the reliability is, and the closer the weight value is to 0, the lower the reliability is.
Illustratively, the mapping relationship between the distance and the weight value includes: when the distance is smaller than or equal to the first distance value, the weight value is equal to the first weight value; when the distance is larger than the first distance value and smaller than or equal to the second distance value, the weight value and the distance are in a linear relation; and when the distance is greater than the second distance value, the weight value is equal to the second weight value.
The expression formula of the mapping relation between the distance and the weight value is as follows:
wherein D1 is a first distance threshold and D2 is a second distance threshold.
Fig. 4 is a schematic diagram of a mapping relationship between a distance and a weight in the embodiment of the present application, as shown in fig. 4, an abscissa is a distance D, an ordinate is a weight W, and when the distance is smaller than D1, the weight is a constant value W1; when the distance is greater than D1 and less than D2, w=ad+b, a=w1/(D1-D2), b= - (d2w1)/(D1-D2).
Step 206: and multiplying the first gain value by a weight value of the first gain value to obtain a final gain value of the target image block.
Wherein R/G is the ordinate value corresponding to the first gain value, B/G is the ordinate value corresponding to the first gain value, W is the weight value, (R/G) Final is the abscissa value corresponding to the Final gain value, and (B/G) Final is the ordinate value corresponding to the Final gain value.
In practical application, after determining the final gain value, the method further includes: and performing white balance adjustment on the target image block by utilizing the final gain value of the target image block.
Specifically, determining a final gain value of each image block in the original image, and performing white balance adjustment on each image block by using the determined final gain value to obtain an image after white balance adjustment.
Because the calculated response information for each image block depends on the gray world algorithm, if the color distribution of the image block is not uniform or there is shadow coverage, the response information may deviate, resulting in incorrect final white balance results. However, by the weight discrimination, the weight of the image block deviation information or the outlier is effectively reduced, and the white balance result can be accurately predicted.
The embodiment of the application also provides a white balance adjusting device, as shown in fig. 5, which comprises:
an acquiring unit 501, configured to acquire an original image for a target shooting scene acquired by an image acquiring unit, and color temperature information for the target shooting scene acquired by a color temperature sensor;
a calculating unit 502, configured to calculate a three-channel response of a target image block in the original image based on a white balance algorithm, so as to obtain a first gain value of the target image block;
a determining unit 503, configured to determine a second gain value corresponding to the color temperature information based on a correspondence between a color temperature calibrated in advance in a color temperature curve and the gain value;
and an adjusting unit 504, configured to adjust the first gain value by using the second gain value, so as to obtain a final gain value of the target image block.
In some embodiments, the adjusting unit 504 is configured to calculate the reliability of the first gain value based on the second gain value; and adjusting the first gain value based on the credibility of the first gain value to obtain a final gain value of the target image block.
In some embodiments, the reliability is a weight value, and the adjusting unit 504 is configured to specifically calculate the euclidean distance between the first gain value and the second gain value; determining a weight value of the first gain value based on a mapping relation between a distance and the weight value and the Euclidean distance; and multiplying the first gain value by a weight value of the first gain value to obtain a final gain value of the target image block.
In some embodiments, the mapping relationship between the distance and the weight value includes: when the distance is smaller than or equal to the first distance value, the weight value is equal to the first weight value; when the distance is larger than the first distance value and smaller than the second distance value, the weight value and the distance are in a linear relation; and when the distance is greater than or equal to the second distance value, the weight value is equal to the second weight value.
In some embodiments, the computing unit 502 is further configured to divide the original image into m×n image blocks; wherein M and N are positive integers; and taking any image block in the M multiplied by N image blocks as the target image block.
In some embodiments, the calculating unit 502 is specifically configured to calculate an R response, a G response, and a B response of each pixel point in the target image block based on a gray world algorithm; converting the R response, the G response and the B response of each pixel point into a two-dimensional coordinate system to obtain two-dimensional coordinate values R/G and G/B of each pixel point; calculating the average value of R/G and G/B of all pixel points in the target image block to obtain the average value of R/G and the average value of G/B of the target image block; and taking the R/G average value and the G/B average value of the target image block as a first gain value of the target image block.
In some embodiments, the adjusting unit 504 is further configured to perform white balance adjustment on the target image block by using a final gain value of the target image block.
In practical application, the white balance adjustment device can be applied to a terminal with a shooting function, so that the terminal can utilize a color temperature sensor to rapidly detect color temperature information when shooting operation is performed, and the white balance adjustment device adjusts and utilizes a white balance algorithm to obtain a first gain value according to a second gain value corresponding to the color temperature information, so that the accuracy of an image gain value is improved, and further the white balance adjustment effect is improved.
The embodiment of the application also provides a terminal, as shown in fig. 6, which comprises: a processor 601 and a memory 602 configured to store a computer program capable of running on the processor, as well as an image acquisition unit 603 and a color temperature sensor 604; the steps of the method in the embodiments of the present application are implemented by the processor 601 when running a computer program in the memory 602.
Of course, in actual practice, the various components in the terminal are coupled together by a bus system 605, as shown in FIG. 6. It is understood that the bus system 605 is used to enable connected communications between these components. The bus system 605 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various buses are labeled as bus system 605 in fig. 6.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of any of the above embodiments.
In practical applications, the processor may be at least one of an application specific integrated circuit (ASIC, application Specific Integrated Circuit), a digital signal processing device (DSPD, digital Signal Processing Device), a programmable logic device (PLD, programmable Logic Device), a Field-programmable gate array (Field-Programmable Gate Array, FPGA), a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronic device for implementing the above-mentioned processor function may be other for different apparatuses, and embodiments of the present application are not specifically limited.
The Memory may be a volatile Memory (RAM) such as Random-Access Memory; or a nonvolatile Memory (non-volatile Memory), such as a Read-Only Memory (ROM), a flash Memory (flash Memory), a Hard Disk (HDD) or a Solid State Drive (SSD); or a combination of the above types of memories and provide instructions and data to the processor.
It should be noted that: "first," "second," etc. are used to distinguish similar objects and not necessarily to describe a particular order or sequence.
The methods disclosed in the method embodiments provided by the application can be arbitrarily combined under the condition of no conflict to obtain a new method embodiment.
The features disclosed in the several product embodiments provided by the application can be combined arbitrarily under the condition of no conflict to obtain new product embodiments.
The features disclosed in the embodiments of the method or the apparatus provided by the application can be arbitrarily combined without conflict to obtain new embodiments of the method or the apparatus.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. A white balance adjustment method, the method comprising:
acquiring an original image aiming at a target shooting scene acquired by an image acquisition unit and color temperature information aiming at the target shooting scene acquired by a color temperature sensor;
calculating three channel responses of a target image block in the original image based on a white balance algorithm to obtain a first gain value of the target image block;
determining a second gain value corresponding to the color temperature information based on the corresponding relation between the color temperature and the gain value calibrated in advance in the color temperature curve;
adjusting the first gain value by using the second gain value to obtain a final gain value of the target image block;
wherein the adjusting the first gain value by using the second gain value to obtain a final gain value of the target image block includes:
calculating the credibility of the first gain value based on the second gain value;
when the credibility is larger than or equal to a credibility threshold value, the first gain value is used as the final gain value;
and when the credibility is smaller than the credibility threshold, adjusting the first gain value by utilizing the credibility to obtain the final gain value.
2. The method of claim 1, wherein the confidence level is a weight value, wherein the adjusting the first gain value with the second gain value results in a final gain value for the target image block, comprising:
calculating the Euclidean distance between the first gain value and the second gain value;
determining a weight value of the first gain value based on a mapping relation between a distance and the weight value and the Euclidean distance;
and multiplying the first gain value by a weight value of the first gain value to obtain a final gain value of the target image block.
3. The method of claim 2, wherein the mapping of the distance and the weight value comprises:
when the distance is smaller than or equal to the first distance value, the weight value is equal to the first weight value;
when the distance is larger than the first distance value and smaller than the second distance value, the weight value and the distance are in a linear relation;
and when the distance is greater than or equal to the second distance value, the weight value is equal to the second weight value.
4. The method of claim 1, wherein prior to the computing the three channel response for the target image block in the original image based on the white balance algorithm, the method further comprises:
dividing the original image into m×n image blocks; wherein M and N are positive integers;
and taking any image block in the M multiplied by N image blocks as the target image block.
5. The method according to claim 1, wherein the calculating the three channel response of the target image block in the original image based on the white balance algorithm to obtain the first gain value of the target image block includes:
calculating R response, G response and B response of each pixel point in the target image block based on a gray world algorithm;
converting the R response, the G response and the B response of each pixel point into a two-dimensional coordinate system to obtain two-dimensional coordinate values R/G and G/B of each pixel point;
calculating the average value of R/G and G/B of all pixel points in the target image block to obtain the average value of R/G and the average value of G/B of the target image block;
and taking the R/G average value and the G/B average value of the target image block as a first gain value of the target image block.
6. The method according to claim 1, wherein the method further comprises:
and performing white balance adjustment on the target image block by utilizing the final gain value of the target image block.
7. A white balance adjustment device, the device comprising:
the acquisition unit is used for acquiring the original image aiming at the target shooting scene acquired by the image acquisition unit and the color temperature information aiming at the target shooting scene acquired by the color temperature sensor;
the computing unit is used for computing three-channel response of a target image block in the original image based on a white balance algorithm to obtain a first gain value of the target image block;
the determining unit is used for determining a second gain value corresponding to the color temperature information based on the corresponding relation between the color temperature calibrated in advance in the color temperature curve and the gain value;
an adjusting unit, configured to adjust the first gain value by using the second gain value, so as to obtain a final gain value of the target image block;
the adjusting unit is specifically configured to calculate the reliability of the first gain value based on the second gain value; when the credibility is larger than or equal to a credibility threshold value, the first gain value is used as the final gain value; and when the credibility is smaller than the credibility threshold, adjusting the first gain value by utilizing the credibility to obtain the final gain value.
8. A terminal, the terminal comprising: an image acquisition unit, a color temperature sensor, a processor and a memory configured to store a computer program capable of running on the processor,
wherein the processor is configured to perform the steps of the method of any of claims 1 to 6 when the computer program is run.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
CN202010192160.6A 2020-03-18 2020-03-18 White balance adjustment method, device, terminal and storage medium Active CN113497927B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010192160.6A CN113497927B (en) 2020-03-18 2020-03-18 White balance adjustment method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010192160.6A CN113497927B (en) 2020-03-18 2020-03-18 White balance adjustment method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113497927A CN113497927A (en) 2021-10-12
CN113497927B true CN113497927B (en) 2023-08-29

Family

ID=77994471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010192160.6A Active CN113497927B (en) 2020-03-18 2020-03-18 White balance adjustment method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN113497927B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117678234A (en) * 2021-10-27 2024-03-08 深圳市大疆创新科技有限公司 Imaging method and imaging device of wading scene

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106709887A (en) * 2017-01-06 2017-05-24 凌云光技术集团有限责任公司 Image gray-world white balance adjustment method and device based on color temperature curve
CN107454345A (en) * 2017-07-12 2017-12-08 广东欧珀移动通信有限公司 White balancing treatment method, device and the terminal device of image
CN110602473A (en) * 2019-10-24 2019-12-20 维沃移动通信有限公司 White balance calibration method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200908696A (en) * 2007-08-07 2009-02-16 Mitac Int Corp Auto white balance control system, white balance module and method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106709887A (en) * 2017-01-06 2017-05-24 凌云光技术集团有限责任公司 Image gray-world white balance adjustment method and device based on color temperature curve
CN107454345A (en) * 2017-07-12 2017-12-08 广东欧珀移动通信有限公司 White balancing treatment method, device and the terminal device of image
CN110602473A (en) * 2019-10-24 2019-12-20 维沃移动通信有限公司 White balance calibration method and device

Also Published As

Publication number Publication date
CN113497927A (en) 2021-10-12

Similar Documents

Publication Publication Date Title
CN109166559B (en) Gamma value debugging method and device for display panel
US9838614B1 (en) Multi-camera image data generation
US20180012341A1 (en) Distortion rectification method and terminal
JP2017520050A (en) Local adaptive histogram flattening
US10013747B2 (en) Image processing method, image processing apparatus and display apparatus
CN106030664A (en) Transparency determination for overlaying images on an electronic display
CN113676713A (en) Image processing method, apparatus, device and medium
CN113497927B (en) White balance adjustment method, device, terminal and storage medium
CN107071282B (en) Photo processing method and mobile terminal
CN111369478B (en) Face image enhancement method and device, computer equipment and storage medium
KR20190001466A (en) Display apparatus and method for processing image
US20150187051A1 (en) Method and apparatus for estimating image noise
KR20190114057A (en) Image processing device, display device having the same, and image processing method of the same
CN110111341B (en) Image foreground obtaining method, device and equipment
CN108932703B (en) Picture processing method, picture processing device and terminal equipment
US20150381876A1 (en) Image processing system with blur measurement and method of operation thereof
CN107274857B (en) Method for adjusting output image of display and display system
CN103685854A (en) Image processing apparatus, image processing method, and program
CN116708756A (en) Sensor accuracy detection method, detection device, electronic device, and storage medium
CN108763491B (en) Picture processing method and device and terminal equipment
CN109308690B (en) Image brightness balancing method and terminal
CN113766206A (en) White balance adjusting method, device and storage medium
US20160093109A1 (en) Image processing device, image processing method, and program
CN111510622B (en) Image processing method, device, terminal and storage medium
KR20160039091A (en) Method of processing image data and display system for display power reduction

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