CN113395503A - Method, apparatus, device and medium for correcting white balance of image - Google Patents

Method, apparatus, device and medium for correcting white balance of image Download PDF

Info

Publication number
CN113395503A
CN113395503A CN202010165488.9A CN202010165488A CN113395503A CN 113395503 A CN113395503 A CN 113395503A CN 202010165488 A CN202010165488 A CN 202010165488A CN 113395503 A CN113395503 A CN 113395503A
Authority
CN
China
Prior art keywords
image
channel
gray area
white balance
processed
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.)
Granted
Application number
CN202010165488.9A
Other languages
Chinese (zh)
Other versions
CN113395503B (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202010165488.9A priority Critical patent/CN113395503B/en
Publication of CN113395503A publication Critical patent/CN113395503A/en
Application granted granted Critical
Publication of CN113395503B publication Critical patent/CN113395503B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Abstract

The embodiment of the invention discloses a method, a device, equipment and a medium for correcting white balance of an image. The method comprises the steps of obtaining the pixel value of each channel of each pixel point in an image to be processed; wherein each channel comprises an R channel, a G channel and a B channel; determining light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value; identifying a gray area of the image to be processed according to the light transmittance; and calculating data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area. By adopting the technical means provided by the embodiment of the invention, the problem that the light source color estimation has serious deviation and the use scene is limited due to strict assumed conditions in the existing algorithm is solved, and the accuracy of white balance correction and the scene adaptability are further improved.

Description

Method, apparatus, device and medium for correcting white balance of image
Technical Field
Embodiments of the present invention relate to image processing technologies, and in particular, to a method, an apparatus, a device, and a medium for correcting white balance of an image.
Background
In nature, the color presented by an object changes with the light source of the environment, and for human beings, even if the light source changes, the perception of the color by eyes is not greatly influenced. This is because the brain has some a priori knowledge of the color of an object, and can perceive the inherent color of the object from some varying light source. However, the image sensor of the camera itself does not have such a special function of the human eye, and is affected by the color of the light source when the image is captured under different light sources, so that it is necessary to perform white balance correction processing on the image acquired by the camera.
The currently used white balance processing method is not suitable for large-area monochromatic scenes and low-light scenes.
Therefore, a method is needed for improving the accuracy and the scene adaptability of the white balance correction in large-area monochromatic scenes and low-light scenes.
Disclosure of Invention
The invention provides a white balance correction method, a white balance correction device, white balance correction equipment and a white balance correction medium for improving the white balance correction precision and scene adaptability.
In a first aspect, an embodiment of the present invention provides a method for correcting a white balance of an image, including:
acquiring a pixel value of each channel of each pixel point in an image to be processed; wherein each channel comprises an R channel, a G channel and a B channel;
determining light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value;
identifying a gray area of the image to be processed according to the light transmittance;
and calculating data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area.
In a second aspect, an embodiment of the present invention further provides an apparatus for correcting a white balance of an image, including:
the pixel value acquisition module of each channel is used for acquiring the pixel value of each channel of each pixel point in the image to be processed; wherein each channel comprises an R channel, a G channel and a B channel;
the light transmittance determining module is used for determining the light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value;
the gray area identification module is used for identifying a gray area of the image to be processed according to the light transmittance;
and the white balance correction module is used for calculating the data information of the gray area according to the gray area and carrying out white balance correction on the image to be processed according to the data information of the gray area.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the white balance correction method for an image according to any one of the embodiments of the present invention when executing the computer program.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the white balance correction method for an image according to any one of the embodiments of the present invention.
The method comprises the steps of obtaining the pixel value of each channel of each pixel point in an image to be processed; wherein each channel comprises an R channel, a G channel and a B channel; determining light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value; identifying a gray area of the image to be processed according to the light transmittance; and calculating data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area so as to solve the problem that the light source color estimation is seriously deviated and the used scene is limited due to strict assumed conditions in the existing algorithm, so as to further improve the accuracy of white balance correction and the scene adaptability.
Drawings
Fig. 1 is a schematic flowchart of a white balance correction method for an image according to a first embodiment of the present invention;
fig. 2 is a schematic flowchart of a white balance correction method for an image according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a white balance correction apparatus for an image according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus provided in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a white balance correction method for an image according to an embodiment of the present invention, where the present embodiment is applicable to white balance correction of a special scene such as low illuminance and mixed color temperature, and the method can be executed by a white balance correction apparatus for an image, the apparatus can be implemented in a software and/or hardware manner, and can be integrated in an electronic device, and the method specifically includes the following steps:
and step 110, obtaining the pixel value of each channel of each pixel point in the image to be processed.
In this embodiment, each of the channels includes an R channel, a G channel, and a B channel. The image to be processed is an unprocessed image obtained by the image sensor, and may be in an RGB format with an 8-bit precision. Among them, the RGB format is a color light and color mode, which is widely used in televisions, computer display screens, slides, and the like. The RGB format is an additive color model, and any color can be described by the amount of radiation R, G, B. When the color is defined by a computer, the value range of R, G, B is 0-255, 0 represents no stimulation, and 255 represents the maximum stimulation.
And step 120, determining the light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value.
In this embodiment, the sensor imaging model can be constructed by the pixel value of each channel, the pixel value of each pixel point of the original image, and the global illumination intensity value, and specifically, the sensor imaging model can be constructed by the following formula:
I(x,y)=J(x,y)t(x,y)+A(1-t(x,y));
wherein, I (x, y) is an image to be processed, J (x, y) is an original image, a represents a global illumination intensity value, and t (x, y) corresponds to the light transmittance of each pixel point. Wherein, A can be solved by the following formula:
Figure BDA0002407296940000051
wherein, R (x, y), G (x, y) and B (x, y) are pixel values of each channel in the image to be processed, and M and N are width and height of the image to be processed.
Specifically, the light transmittance is determined by the following formula:
from the prior knowledge of the dark channel, one can obtain:
Figure BDA0002407296940000052
in the formula, Ω (x, y) is a neighborhood corresponding to each pixel. Within the neighborhood, the light transmission t (x, y) is constant, from which it follows:
Figure BDA0002407296940000053
wherein min (I)c(x, y)) represents the minimum of RGB channels in the I (x, y) neighborhood, equivalently min (J)c(x,y))。
The formula from the sensor imaging model yields:
Figure BDA0002407296940000054
and step 130, identifying a gray area of the image to be processed according to the light transmittance.
In this embodiment, the gray area refers to an area where a pixel point in the image to be processed is a gray point, and since the light transmittance of the gray area is low, the gray area can be identified by the light transmittance. Specifically, by setting the predetermined light transmittance, the region lower than the predetermined light transmittance is a gray region.
Optionally, the identifying a gray area of the image to be processed according to the light transmittance includes:
and carrying out binarization processing on the light transmittance to obtain a binary image, wherein the binary image is a gray area of the image to be processed.
In this embodiment, the binarization processing is performed by setting a gray point threshold, where the area below the gray point threshold is 1 and the area above the gray point threshold is 0, and the gray point threshold is the average light transmittance. Specifically, it can be calculated by the following formula:
Figure BDA0002407296940000061
Figure BDA0002407296940000062
wherein M and N are the width and height of the image to be processed, T (x, y) is the gray area of the image to be processed, and T (x, y) corresponds to the light transmittance of each pixel point.
In this embodiment, optionally, the identifying a gray area of the image to be processed according to the light transmittance includes:
and calculating the probability weight of each pixel point in the image to be processed as a gray point according to the light transmittance to obtain a gray point weight image, wherein the gray point weight image is a gray area of the image to be processed.
In this embodiment, according to the light transmittance, the probability weight that each pixel point in the image to be processed is a gray point is calculated, and is specifically obtained by the following formula:
Figure BDA0002407296940000063
where f is a decreasing function with T (x, y) and T (x, y) is a gray area. By determining the gray area in this way, the gray area in the image to be processed can be prevented from being too few, the interference of a high-contrast area can be avoided, and the error of gray area statistics can be avoided.
And 140, calculating data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area.
In this embodiment, the data information refers to information that can represent the characteristics of the pixels in the gray area. White balance is an index describing the accuracy of white color generated by mixing three primary colors of red, green and blue in a display. White balance correction is a very important concept in the field of television photography, by which a series of problems of color restoration and tone processing can be solved. The white balance correction is generated along with the reproduction of true colors of electronic images, and is earlier applied to the white balance correction in the field of professional shooting. The method is widely used in household electronic products, household video cameras and digital cameras, and is a method for realizing that the color condition of a shot object can be accurately reflected by a video camera image, and the method comprises manual white balance correction, automatic white balance correction and the like.
Optionally, the calculating data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area includes:
determining a gray area image according to the gray area and the pixel value of each channel;
determining the average value of each channel of the gray area image according to the sum of the pixel values of each channel of the gray area image and the number of the pixel points of the gray area;
and performing white balance correction on the image to be processed according to the average value of each channel of the gray area image.
In this embodiment, a gray area image may be determined by performing a product operation on the pixel values of the channels and the gray area, and specifically, the gray area image may be calculated by the following formula:
Gray(x,y)=I(x,y)*T(x,y);
wherein, I (x, y) is an image to be processed, T (x, y) is a Gray area, and Gray (x, y) is a Gray area image. Further, the sum of the pixel values of the channels of the gray area image is:
Figure BDA0002407296940000071
and
Figure BDA0002407296940000081
specifically, the calculation formula for determining the average value of each channel of the gray area image is as follows:
Figure BDA0002407296940000082
wherein, M and N are the width and height of the image to be processed, T (x, y) is a Gray area, and Gray (x, y) is a Gray area image.
And white balance correction is carried out through the following formula to obtain the gain value of each channel:
Figure BDA0002407296940000083
wherein R isavg、GavgAnd BavgThe average of each channel in the gray area is shown.
The method comprises the steps of obtaining the pixel value of each channel of each pixel point in an image to be processed; wherein each channel comprises an R channel, a G channel and a B channel; determining light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value; identifying a gray area of the image to be processed according to the light transmittance; and calculating the data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area, so that the accuracy of white balance correction and the scene adaptability can be improved.
Example two
Fig. 2 is a flowchart illustrating a white balance correction method for an image according to a second embodiment of the present invention, which is applicable to white balance correction in special scenes such as low illumination and mixed color temperature. The method can be executed by a white balance correction device of an image, the device can be realized in a software and/or hardware mode, and can be integrated in an electronic device, and the method specifically comprises the following steps:
step 210, obtaining a pixel value of each channel of each pixel point in the image to be processed.
Wherein each channel comprises an R channel, a G channel and a B channel.
And step 220, performing preliminary white balance processing on the image to be processed according to the pixel values of the channels, and obtaining the pixel values of the channels after the preliminary white balance processing.
In this embodiment, the preliminary white balance processing is performed on the image to be processed, specifically, the preliminary white balance correction may be performed on the image by using a Shades of Gray (SoG) algorithm, and the SoG algorithm is expressed in a minkowski norm form, which summarizes the methods such as the Gray scale world and the perfect reflection. The specific formula is as follows:
Figure BDA0002407296940000091
where f (x) is the pixel value of the image to be processed at the coordinate x, p is the norm parameter,
Figure BDA0002407296940000092
is an estimated value of the light source color, k being a constant;when p takes 1, the above equation is a gray world method, and when p takes ∞, the above equation corresponds to a perfect reflection method.
Optionally, the performing preliminary white balance processing on the image to be processed according to the pixel value of each channel, and obtaining the pixel value of each channel after the preliminary white balance processing includes:
determining the pixel average value of each channel according to the number of the pixel points of the image to be processed and the pixel value of each channel;
determining the gain value of each channel in the image to be processed according to the pixel average value;
and obtaining the pixel value of each channel after the preliminary white balance processing according to the gain value of each channel and the pixel value of each channel.
In this embodiment, the average pixel value of each channel may be specifically calculated by the following formula:
Figure BDA0002407296940000101
wherein M and N are the width and height of the image to be processed, p is a norm parameter, and R isavg、GavgAnd BavgThe pixel average value of each channel, R (i), G (i) and B (i) are the pixel values of each channel.
Further, the gain value of each channel in the image to be processed can be obtained by the following formula:
Figure BDA0002407296940000102
in the present embodiment, the p value is preferably 6, Ravg、GavgAnd BavgThe pixel average value of each channel is respectively.
Specifically, the pixel value of each channel after the preliminary white balance processing may be obtained by multiplying the gain value of each channel by the pixel value of each channel in the image to be processed.
And step 230, determining the light transmittance according to the pixel value of each channel after the preliminary white balance processing, the pixel value of each pixel point of the original image and the global illumination intensity value.
And 240, identifying a gray area of the image to be processed according to the light transmittance.
And step 250, calculating data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area.
In this embodiment, the calculating data information of the gray area according to the gray area and performing white balance correction on the image to be processed according to the data information of the gray area includes:
determining the gain value of each channel of each pixel point in the gray area according to the gray area;
and performing white balance correction on the image to be processed according to the gain value of each channel of each pixel point in the gray area and the number of the pixel points of the image to be processed.
Specifically, the gain value of each channel of each pixel point in the gray area can be calculated by the following formula:
Figure BDA0002407296940000111
wherein R ist(i)、Gt(i) And Bt(i) RGain (i), GGain (i) and BGain (i) are gain values of each pixel in the gray area.
The white balance correction of the image to be processed is specifically performed by the following formula:
Figure BDA0002407296940000112
m and N are the width and height of the image to be processed, i is a positive integer larger than 0 and smaller than the number of pixel points of the image to be processed, and RGain, GGain and BGain are gain values for white balance correction of different channels respectively.
The embodiment of the invention carries out preliminary white balance processing on the image to be processed, carries out gray area identification on the image subjected to the preliminary white balance processing, and carries out final white balance processing on the gray area so as to solve the problem that the light source color estimation has serious deviation and further the use scene is limited due to strict assumed conditions in the existing algorithm, thereby further improving the accuracy of white balance correction and the scene adaptability.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a white balance correction apparatus for an image according to a third embodiment of the present invention. The image processing device provided by the embodiment of the invention can execute the image processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. As shown in fig. 3, the apparatus includes:
a pixel value obtaining module 301 of each channel, configured to obtain a pixel value of each channel of each pixel point in the image to be processed; wherein each channel comprises an R channel, a G channel and a B channel;
a light transmittance determining module 302, configured to determine a light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image, and the global illumination intensity value;
a gray area identification module 303, configured to identify a gray area of the image to be processed according to the light transmittance;
and a white balance correction module 304, configured to calculate data information of the gray area according to the gray area, and perform white balance correction on the image to be processed according to the data information of the gray area.
The gray area identification module 303 is specifically configured to perform binarization processing on the light transmittance to obtain a binary image, where the binary image is a gray area of the image to be processed.
The gray area identification module 303 is specifically configured to calculate, according to the light transmittance, a probability weight that each pixel point in the image to be processed is a gray point, to obtain a gray point weight image, where the gray point weight image is a gray area of the image to be processed.
A white balance correction module 304, configured to determine a gray area image according to the gray area and the pixel values of the channels;
determining the average value of each channel of the gray area image according to the sum of the pixel values of each channel of the gray area image and the number of the pixel points of the gray area;
and performing white balance correction on the image to be processed according to the average value of each channel of the gray area image.
A white balance correction module 304, configured to determine, according to the gray area, a gain value of each channel of each pixel point in the gray area;
and performing white balance correction on the image to be processed according to the gain value of each channel of each pixel point in the gray area and the number of the pixel points of the image to be processed.
The device, still include:
and a preliminary white balance processing module 305, configured to perform preliminary white balance processing on the image to be processed according to the pixel value of each channel, and obtain a pixel value of each channel after the preliminary white balance processing.
A preliminary white balance processing module 305, configured to determine a pixel average value of each channel according to the number of pixels of the image to be processed and the pixel value of each channel;
determining the gain value of each channel in the image to be processed according to the pixel average value;
and obtaining the pixel value of each channel after the preliminary white balance processing according to the gain value of each channel and the pixel value of each channel.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the above-described apparatus may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Example four
Fig. 4 is a schematic structural diagram of an apparatus according to a fourth embodiment of the present invention, and fig. 4 is a schematic structural diagram of an exemplary apparatus suitable for implementing the embodiment of the present invention. The device 12 shown in fig. 4 is only an example and should not bring any limitation to the function and scope of use of the embodiments of the present invention.
As shown in FIG. 4, device 12 is in the form of a general purpose computing device. The components of device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. Device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of embodiments described herein.
Device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with device 12, and/or with any devices (e.g., network card, modem, etc.) that enable device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown in FIG. 4, the network adapter 20 communicates with the other modules of the device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system memory 28, and implements, for example, a white balance correction method for an image according to an embodiment of the present invention, including:
acquiring a pixel value of each channel of each pixel point in an image to be processed; wherein each channel comprises an R channel, a G channel and a B channel;
determining light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value;
identifying a gray area of the image to be processed according to the light transmittance;
and calculating data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program (or referred to as a computer-executable instruction) is stored, where the computer program, when executed by a processor, can implement the white balance correction method for an image according to any of the above embodiments, including:
acquiring a pixel value of each channel of each pixel point in an image to be processed; wherein each channel comprises an R channel, a G channel and a B channel;
determining light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value;
identifying a gray area of the image to be processed according to the light transmittance;
and calculating data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of white balance correction of an image, comprising:
acquiring a pixel value of each channel of each pixel point in an image to be processed; wherein each channel comprises an R channel, a G channel and a B channel;
determining light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value;
identifying a gray area of the image to be processed according to the light transmittance;
and calculating data information of the gray area according to the gray area, and performing white balance correction on the image to be processed according to the data information of the gray area.
2. The method of claim 1, wherein identifying gray regions of the image to be processed according to the light transmittance comprises:
and carrying out binarization processing on the light transmittance to obtain a binary image, wherein the binary image is a gray area of the image to be processed.
3. The method of claim 1, wherein identifying gray regions of the image to be processed according to the light transmittance comprises:
and calculating the probability weight of each pixel point in the image to be processed as a gray point according to the light transmittance to obtain a gray point weight image, wherein the gray point weight image is a gray area of the image to be processed.
4. The method according to claim 1, wherein the calculating data information of the gray area according to the gray area and performing white balance correction on the image to be processed according to the data information of the gray area comprises:
determining a gray area image according to the gray area and the pixel value of each channel;
determining the average value of each channel of the gray area image according to the sum of the pixel values of each channel of the gray area image and the number of the pixel points of the gray area;
and performing white balance correction on the image to be processed according to the average value of each channel of the gray area image.
5. The method according to claim 1, wherein the calculating data information of the gray area according to the gray area and performing white balance correction on the image to be processed according to the data information of the gray area comprises:
determining the gain value of each channel of each pixel point in the gray area according to the gray area;
and performing white balance correction on the image to be processed according to the gain value of each channel of each pixel point in the gray area and the number of the pixel points of the image to be processed.
6. The method according to claim 1, wherein after obtaining the pixel value of each channel of each pixel point in the image to be processed, the method further comprises:
and performing preliminary white balance processing on the image to be processed according to the pixel values of the channels, and obtaining the pixel values of the channels after the preliminary white balance processing.
7. The method according to claim 6, wherein the performing preliminary white balance processing on the image to be processed according to the pixel value of each channel and obtaining the pixel value of each channel after the preliminary white balance processing comprises:
determining the pixel average value of each channel according to the number of the pixel points of the image to be processed and the pixel value of each channel;
determining the gain value of each channel in the image to be processed according to the pixel average value;
and obtaining the pixel value of each channel after the preliminary white balance processing according to the gain value of each channel and the pixel value of each channel.
8. An apparatus for correcting a white balance of an image, comprising:
the pixel value acquisition module of each channel is used for acquiring the pixel value of each channel of each pixel point in the image to be processed; wherein each channel comprises an R channel, a G channel and a B channel;
the light transmittance determining module is used for determining the light transmittance according to the pixel value of each channel, the pixel value of each pixel point of the original image and the global illumination intensity value;
the gray area identification module is used for identifying a gray area of the image to be processed according to the light transmittance;
and the white balance correction module is used for calculating the data information of the gray area according to the gray area and carrying out white balance correction on the image to be processed according to the data information of the gray area.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of white balance correction of an image according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a method of white balance correction of an image according to any one of claims 1 to 7.
CN202010165488.9A 2020-03-11 2020-03-11 Method, apparatus, device and medium for correcting white balance of image Active CN113395503B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010165488.9A CN113395503B (en) 2020-03-11 2020-03-11 Method, apparatus, device and medium for correcting white balance of image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010165488.9A CN113395503B (en) 2020-03-11 2020-03-11 Method, apparatus, device and medium for correcting white balance of image

Publications (2)

Publication Number Publication Date
CN113395503A true CN113395503A (en) 2021-09-14
CN113395503B CN113395503B (en) 2023-02-28

Family

ID=77615530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010165488.9A Active CN113395503B (en) 2020-03-11 2020-03-11 Method, apparatus, device and medium for correcting white balance of image

Country Status (1)

Country Link
CN (1) CN113395503B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101072365A (en) * 2006-05-11 2007-11-14 奥林巴斯映像株式会社 White balance control method, imaging apparatus and storage medium storing white balance control program
US20090146989A1 (en) * 2005-09-30 2009-06-11 Kazuma Hirao Chromaticity converting device, timing controller, liquid crystal display apparatus, and chromaticity converting method
US20090201309A1 (en) * 2008-02-13 2009-08-13 Gary Demos System for accurately and precisely representing image color information
JP2018106316A (en) * 2016-12-26 2018-07-05 キヤノン株式会社 Image correction processing method and image correction processing apparatus
CN109427041A (en) * 2017-08-25 2019-03-05 中国科学院上海高等研究院 A kind of image white balance method and system, storage medium and terminal device
US20190166292A1 (en) * 2019-01-30 2019-05-30 Intel Corporation Self-adaptive color based haze removal for video

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090146989A1 (en) * 2005-09-30 2009-06-11 Kazuma Hirao Chromaticity converting device, timing controller, liquid crystal display apparatus, and chromaticity converting method
CN101072365A (en) * 2006-05-11 2007-11-14 奥林巴斯映像株式会社 White balance control method, imaging apparatus and storage medium storing white balance control program
US20090201309A1 (en) * 2008-02-13 2009-08-13 Gary Demos System for accurately and precisely representing image color information
JP2018106316A (en) * 2016-12-26 2018-07-05 キヤノン株式会社 Image correction processing method and image correction processing apparatus
CN109427041A (en) * 2017-08-25 2019-03-05 中国科学院上海高等研究院 A kind of image white balance method and system, storage medium and terminal device
US20190166292A1 (en) * 2019-01-30 2019-05-30 Intel Corporation Self-adaptive color based haze removal for video

Also Published As

Publication number Publication date
CN113395503B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
US11948282B2 (en) Image processing apparatus, image processing method, and storage medium for lighting processing on image using model data
US9635332B2 (en) Saturated pixel recovery in light-field images
US9386288B2 (en) Compensating for sensor saturation and microlens modulation during light-field image processing
US10477128B2 (en) Neighborhood haze density estimation for single-image dehaze
CN107451969A (en) Image processing method, device, mobile terminal and computer-readable recording medium
JP2004312732A (en) Automatic color correction for image sequence
CN111353948A (en) Image noise reduction method, device and equipment
WO2021218603A1 (en) Image processing method and projection system
CN113034509A (en) Image processing method and device
WO2020119454A1 (en) Method and apparatus for color reproduction of image
CN110782400B (en) Self-adaptive illumination uniformity realization method and device
CN110807735A (en) Image processing method, image processing device, terminal equipment and computer readable storage medium
CN109348207B (en) Color temperature adjusting method, image processing method and device, medium and electronic equipment
CN117156289A (en) Color style correction method, system, electronic device, storage medium and chip
CN113395503B (en) Method, apparatus, device and medium for correcting white balance of image
CN107392870A (en) Image processing method, device, mobile terminal and computer-readable recording medium
CN112243118B (en) White balance correction method, device, equipment and storage medium
CN111669572A (en) Camera module detection method and device, medium and electronic equipment
CN113709438B (en) White balance correction method, device, storage medium and equipment for image
CN114266803A (en) Image processing method, image processing device, electronic equipment and storage medium
US11509797B2 (en) Image processing apparatus, image processing method, and storage medium
CN107277369A (en) Image processing method, device, computer-readable recording medium and computer equipment
CN113516636A (en) Method, device, equipment and medium for evaluating lens shadow and lens module
KR20150040559A (en) Apparatus for Improving Image Quality and Computer-Readable Recording Medium with Program Therefor
CN113012051A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium

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