CN101039439A - Method and apparatus for realizing correction of white balance - Google Patents
Method and apparatus for realizing correction of white balance Download PDFInfo
- Publication number
- CN101039439A CN101039439A CN 200710098634 CN200710098634A CN101039439A CN 101039439 A CN101039439 A CN 101039439A CN 200710098634 CN200710098634 CN 200710098634 CN 200710098634 A CN200710098634 A CN 200710098634A CN 101039439 A CN101039439 A CN 101039439A
- Authority
- CN
- China
- Prior art keywords
- light source
- chromatic value
- picture element
- value
- distributed areas
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000012937 correction Methods 0.000 title claims description 55
- 239000000463 material Substances 0.000 claims abstract description 33
- 238000004364 calculation method Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 abstract description 2
- 230000001678 irradiating effect Effects 0.000 abstract 1
- 238000005070 sampling Methods 0.000 abstract 1
- 238000012549 training Methods 0.000 description 11
- 239000003086 colorant Substances 0.000 description 4
- 230000001915 proofreading effect Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 244000145841 kine Species 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 239000004744 fabric Substances 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 241001062009 Indigofera Species 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000008676 import Effects 0.000 description 1
- 239000000049 pigment Substances 0.000 description 1
Images
Landscapes
- Processing Of Color Television Signals (AREA)
- Color Image Communication Systems (AREA)
Abstract
The present invention discloses a method for realizing white balance emendation, which comprises: sampling color images generated by each light source when irradiating on each color material, determining the chroma value distributing area of a pels point based on the chroma value of the pels in the color image; determining the chroma value of a pels in the image to be processed; determining the number of pels points of the image to be processed with accordance to the chroma value in the same chroma value distributing area, determining the light source according to the determined pels points; and performing the white balance emendation with basis of the parameters of the current light source. With this invention, the auto white balance error caused by ignoring the light source effect on emendation parameters can be avoided, and this invention has little image distortion, high quality and comfortable feeling for a user. The present invention also discloses a device for realizing white balance emendation.
Description
Technical field
The present invention relates to image processing techniques, relate in particular to a kind of method and device of realizing white balance correction.
Background technology
Video camera apparatus such as Digital Video and digital camera generally comprises optical lens, imageing sensor, picture processing chip, image transmission module and image display.In fact, a kind of color can present different colors under the irradiation of Different Light, and for example, grey can present yellow under the incandescent lamp irradiation, and can present cyan under the cold light irradiation.Human eye has self-regulating function, even under different light sources, also can distinguish grey and color body, but, color relation that this grey object is exported after through optical lens and imageing sensor is grey not necessarily, experiment shows that the original image of exporting presents significantly orange after grey object under the A rayed is by imageing sensor.Therefore, must handle the color of original image of input, make it to present normal grey under different light source irradiation, at present, more general bearing calibration is a white balance correction.
In the method for existing realization white balance correction, the influence of parameter when not considering light source to white balance correction.When the image of catching when camera is the less monochromatic object of saturation, as the broca scale picture, during then by white balance algorithm, this class color can be considered as grey, be about to the colour of skin and be considered as grey, make Automatic white balance proofread and correct and make mistakes the image fault that the user views at last, picture quality is relatively poor, and user experience is relatively poor.
Summary of the invention
The invention provides a kind of method and device of realizing white balance correction, to solve in the prior art owing to the influence of not considering light source exists image fault, the relatively poor problem of picture quality.
The invention provides a kind of method that realizes white balance correction, this method comprises:
Gather the color image that each light source irradiation produces when each color material, determine the chromatic value distributed areas of described picture element according to the chromatic value of picture element in the described color image;
Determine the chromatic value of picture element in the pending image;
Determine picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of same light source, determine current light source according to described number;
Parameter according to described current light source is carried out white balance correction.
Described chromatic value according to picture element in the described color image determines that the chromatic value distributed areas of described picture element comprise:
Statistics is determined the histogram of the chromatic value of picture element in the described color image;
As described chromatic value distributed areas, the scope that maybe will comprise picture element chromatic value mean value in this histogram is as described chromatic value distributed areas with picture element chromatic value distribution in this histogram.
Described picture element chromatic value distribution in this histogram is comprised as described chromatic value distributed areas:
To comprise picture element chromatic value in the described color image, and the rectangular area of area minimum is as described chromatic value distributed areas.
After the described collection color image, determine that according to the chromatic value of picture element in the described color image chromatic value distributed areas of described picture element comprise before:
Determine the chromatic value of picture element according to the color component of picture element in the described color image.
With the ratio of picture element color component in the described color image as described chromatic value, or, with the described chromatic value of logarithm of the ratio of picture element color component in the described color image.
The picture element number comprises in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of described definite same light source:
If the chromatic value of a picture element is arranged in described chromatic value distributed areas in the described pending image, then the light source irradiation value with this distributed areas correspondence adds 1, picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of the same light source of described light source irradiation value representation.
Describedly determine that according to described number current light source comprises:
Determine with described pending image in the ratio of number of picture element reach the light source irradiation value of threshold value, with one of light source of this light source irradiation value correspondence as described current light source.
Have two at least if reach the light source irradiation value of threshold value with the ratio of number of picture element in the described pending image, then select the light source of maximum light source irradiation value correspondence as described current light source.
If the light source irradiation value maximum of the first light source correspondence, the light source irradiation value of secondary light source correspondence is inferior big, whether the difference of then judging two described light source irradiation values reaches set point, if, then with described first light source as current light source, otherwise, with colour temperature in described first light source and the secondary light source higher as current light source.
Described parameter according to described current light source is carried out white balance correction and is comprised:
Determine picture element chromatic value mean value in the color image of described current light source correspondence, utilize this chromatic value mean value to determine the correction parameter of white balance of this light source correspondence, and carry out white balance correction according to this correction parameter of white balance.
Described picture element chromatic value mean value is according to formula
Realize.
The present invention also provides a kind of device of realizing white balance correction, and this device comprises:
Collecting unit is used to gather the color image that each light source irradiation produces when each color material;
The distributed areas determining unit is used for determining according to the chromatic value of described color image picture element the chromatic value distributed areas of described picture element;
The first chromatic value determining unit is used for determining the chromatic value of pending image picture element;
The number determining unit is used for determining picture element number in the described pending image of chromatic value correspondence of chromatic value distributed areas of same light source;
The light source determining unit is used for determining current light source according to described number;
Correcting unit is used for carrying out white balance correction according to the parameter of this current light source.
Described distributed areas determining unit comprises:
Statistic unit is used for adding up the histogram of the chromatic value of determining described color image picture element;
Performance element is used for this histogram picture element chromatic value distribution as described chromatic value distributed areas, and the scope that maybe will comprise picture element chromatic value mean value in this histogram is as described chromatic value distributed areas.
Described performance element comprises:
Search the unit, be used for finding out the chromatic value of described color image picture element;
The rectangular area determining unit is used for and will comprises described color image picture element chromatic value, and the rectangular area of area minimum is as described chromatic value distributed areas.
Described device also comprises:
The second chromatic value determining unit is used for determining according to the color component of described color image picture element the chromatic value of picture element.
The described second chromatic value determining unit comprises:
The color component determining unit is used for determining described color image picture element color component;
Operating unit is used for ratio with described color image picture element color component as described chromatic value, or, with the described chromatic value of logarithm of the ratio of picture element color component in the described color image.
Described number determining unit comprises judging unit and counting unit, wherein,
Described judging unit is used for judging whether the chromatic value of described pending image one picture element is arranged in described chromatic value distributed areas, and judged result is sent to described counting unit;
Described counting unit, be used for if described judged result is for being positioned at described chromatic value distributed areas, then the light source irradiation value with this distributed areas correspondence adds 1, picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of the same light source of described light source irradiation value representation.
Described light source determining unit comprises:
The threshold value determining unit is used for determining that the ratio with the number of described pending image picture element reaches the light source irradiation value of threshold value;
Realize the unit, be used for one of light source as described current light source with described light source irradiation value correspondence.
Described realization unit comprises:
Comparing unit is used for if the light source irradiation value that reaches threshold value with the ratio of the number of described pending image picture element has two at least, then the size of each light source irradiation value relatively;
Selected cell is used to select the light source of maximum light source irradiation value correspondence as described current light source.
Described correcting unit comprises:
Chromatic value mean value determining unit is used for determining the color image picture element chromatic value mean value of described current light source correspondence;
Parameter correction unit is used to utilize described chromatic value mean value to determine the correction parameter of white balance of this light source correspondence, and carries out white balance correction according to this correction parameter of white balance.
Described device also comprises:
Preserve the unit, be used to preserve picture element chromatic value mean value calculation formula:
The present invention is by picture element number in the pending image of the chromatic value correspondence in the chromatic value distributed areas of determining same light source, determine current light source according to described number, and utilize the parameter adjustment white balance parameter of this current light source, then realize the method for white balance correction, avoided in the Automatic white balance process owing to having ignored the distortion that current light source is made mistakes and caused the shadow of correction parameter, make picture quality better, it is better that the user experiences.
Description of drawings
Fig. 1 is an embodiment of the invention steps flow chart schematic diagram;
Fig. 2 is training light source and a white balance correction schematic flow sheet in the embodiment of the invention;
Fig. 3 is the histogram of picture element when gray image is by the A rayed in the embodiment of the invention;
Fig. 4 is the histogram after the rotation 45 of picture element when gray image is by the A rayed in the embodiment of the invention is spent;
The rectangle frame combination schematic diagram of Fig. 5 for obtaining during 5 kinds of light source irradiation gray images in the embodiment of the invention;
Fig. 6 (a) is in the embodiment of the invention, the coloured image before proofreading and correct during the A rayed;
Fig. 6 (b) is for after utilizing the embodiment of the invention, with the coloured image after Fig. 6 (a) correction;
Fig. 7 is apparatus of the present invention structural representation.
Embodiment
In the present invention, at first need to train the chromatic value distributed areas: gather the color image that each light source irradiation produces when each color material, determine the chromatic value distributed areas of described picture element according to the chromatic value of picture element in the described color image; Determine the chromatic value of picture element in the pending image then, and then picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of definite same light source; At last, determine current light source, and carry out white balance correction according to the parameter of this current light source according to described number.
With the grey is example, can present different colors after by imageing sensor under the irradiation of Different Light, and light source generally is to quantize performance with colour temperature.Colour temperature is defined as: the color of source emissioning light and black matrix be the radiant light form and aspect while under a certain temperature, and the temperature of black matrix is called the colour temperature of this light source.Because the light that most of light source sent can be referred to as white light, so the colour temperature of light source also can be in order to censure the degree of its photochromic phase dialogue.Photochromic inclined to one side more indigo plant, colour temperature is high more, and color is cold more; Red partially then colour temperature is low more, and color is warm more.Standard sources (D65) colour temperature is 6500K, and cold light (CW) then is 4000~5000K, and A light is about 3000K.Concerning imageing sensor, under the light source of certain colour temperature, grey all presents certain fixing color.If can identify the light source of current scene thus, then can determine the correction parameter of white balance by the color of this light source, input picture is proofreaied and correct.As after identifying current light and being A light, consider in the three primary colors RGB, orange feature be red, green component is higher, blue on the low side, we just can reduce red in the image, green component, improve blue component, with the orange grey that is adjusted to, reach the purpose of Automatic white balance.
Describe the inventive method in detail below in conjunction with specific embodiment.
As shown in Figure 1, be embodiment of the invention method step schematic flow sheet, this method comprises:
Step 101: gather the color image that each light source irradiation produces when each color material, determine the chromatic value distributed areas of described picture element according to the chromatic value of picture element in the described color image.
In embodiments of the present invention, can utilize training method to determine that each light source is radiated at the chromatic value distributed areas of each color image respectively, concrete implementation step as shown in Figure 2, this training step comprises:
At first, determine light source and color material.
Obtain the chromatic value distributed areas of the color image that produces when multiple light source is radiated at multiple color material respectively, then at first will determine the multiple light source and the color material that participate in training.Here, so-called multiple light source can be to divide according to different colour temperatures, for example, can be according to colour temperature mark off 5 kinds of light sources from high to low, they are respectively: D65, indoor fluorescent lamp (Indoor), CW, TL84 and A, and multiple color material also can comprise: grey material, green material and colour of skin material etc.With D65 is example, can obtain the chromatic value distributed areas of the color image that produces when D65 is radiated at grey material, green material and colour of skin material respectively.More accurate for light source is determined, can train the chromatic value distributed areas that obtain the color image that produces when more kinds of light sources are radiated at multiple color material respectively.
Secondly, gather the color image that a light source irradiation produces when a material.
With three kinds of color materials determining in the steps A: grey material, green material and colour of skin material are placed on respectively under 5 kinds of light sources, by the color image data that imageing sensor and computer acquisition produce, can gather 15 width of cloth color images altogether.Certainly, gather the method that also can utilize other in the color card process, for example, provide two samples, collect methods such as 30 width of cloth training images every kind of picture material.
Moreover, utilize the color image training picture element chromatic value distributed areas that collect.
Present embodiment is example on gray image with the A rayed, in the color image that the A rayed that collects can be produced when the grey material logarithm of the ratio of picture element color component or this ratio as color image in the chromatic value of picture element.Adopt the logarithm of the ratio of color component to be in the present embodiment: because colour brightness does not comprise chromatic value information, so utilize the ratio of the color component (RGB) of image pixel point to weigh chromatic value information as the reason of picture element chromatic value.These three color components are divided by can obtain two chromatic value: r/b and g/b, has promptly obtained the chromatic value information of this picture element, certainly, also can be r/g and b/g, or b/r and g/r.In the white balance hardware operation of reality, division is more unmanageable, in order to realize the realization fast algorithm of tabling look-up, then r/b and g/b are converted into log (r/b) and log (g/b), these two expression formulas can be reduced to log (r)-log (b) and log (g)-log (b).Because the integer of size between 0 to 255 of R, G and three color component value of B, therefore can set the corresponding relation of the value that each integer and this integer are taken the logarithm between 0 to 255, for the chromatic value of arbitrary pixel point, utilize this corresponding relation can obtain easily to chromatic value log (r/b) and log (g/b).By the method, can obtain two chromatic values of each picture element in this gray image.
Statistics is determined the histogram of two chromatic values of picture element in this color image, with above-mentioned log (r)-log (b) and log (g)-log (b) respectively as the x coordinate and the y coordinate of picture element chromatic value in the described histogram, as shown in Figure 3, because the not equal factor of imageing sensor noise jamming, brightness, the chromatic value of each point is not in full accord after the imaging, but be distributed in one narrow rectangular in, promptly the white brightness zone is the distributed areas of picture element chromatic value among the figure.As can be seen from Figure 3, roughly there is miter angle in the distribution arrangement of picture element chromatic value with trunnion axis in the described gray image, in order to make hardware effort easier, distribution arrangement rotation 45 degree with the picture element chromatic value among Fig. 3, after the rotation as shown in Figure 4, the x coordinate of then postrotational picture element chromatic value and y coordinate become log (r)+log (g)-2log (b) and log (r)-log (g), then with picture element chromatic value distribution in this histogram as described chromatic value distributed areas.
Certainly, also can utilize alternate manner to determine the distributed areas of colourity, for example, utilize following formula (1) to determine picture element colourity mean value among Fig. 4, then, will comprise the scope of picture element chromatic value mean value in this histogram as described chromatic value distributed areas.
Chromatic value information can be analyzed the picture element chromatic value distribution histogram of Fig. 4 in order to obtain reflecting that the A light source irradiation is on gray image, finds suitable expression formula statement.For example, can utilize two-dimentional Gaussian Profile that chromatic value among Fig. 4 is analyzed, but, the calculating more complicated of Gaussian Profile, difficult in the hardware realization, to this, can use the method for relatively simplifying, when describing as rectangle of direct usefulness that the A light source irradiation is on gray image among Fig. 4, the chromatic value of picture element distributes.If the coordinate on these four summits of rectangle is (L
Xleft, L
Ytop, L
Xright, L
Ybottom), the setting principle of 4 values in this coordinate is: comprise picture element chromatic value among described Fig. 4, and this rectangular area minimum.For example, utilize above-mentioned formula (1) to calculate the average of chromatic value in the color image that the A rayed produces: L when the grey material
xAnd L
y, the then length of rectangle and wide H and W, the then L of being fixed as respectively
Xleft=L
x-W/2, L
Ytop=L
y-H/2, L
Xright=L
x+ W/2, L
Ybttom=L
y+ H/2, wherein, the value of H and W can be determined according to priori.
Can determine the chromatic value distributed areas of the color image that each light source produces when being radiated at each color material respectively by said method, certainly, also can adopt alternate manner to embody chromatic value information, or the chromatic value that utilizes other shape to describe picture element in the color image that the A light source irradiation produces among Fig. 4 when the grey material distribute.The chromatic value distributed areas that obtain are plotted in the histogram, obtain a colour temperature curve.For example, the chromatic value distribution of the color image that can produce when being radiated at the grey material respectively according to the order of D65, Indoor, CW, TL84 and A couples together, obtain the curve that several broken lines are formed, this curve approximation described current sensor acquisition to color image in picture element chromatic value distribution curve, i.e. transducer logarithm colour temperature curve.After having determined the colour temperature curve, will select suitable rectangle for every kind of light source, the main principle of this selection is: make the common factor of rectangle can cover points all on the colour temperature curve, and rectangle is less, certainly, can be that rectangle is minimum as much as possible among the more excellent embodiment, as shown in Figure 5.
In addition, also can utilize method training green or colour of skin sample calculation chromatic value in the present embodiment, and then determine the chromatic value distributed areas of green or grey respectively.
At last, preserve above-mentioned chromatic value distributed areas.
When by after the above-mentioned steps, determined the colour temperature curve of each light source, and then determined the chromatic value distributed areas of same light source that then the chromatic value distributed areas of this each light source are preserved, at this moment, the training of chromatic value distributed areas finishes.
Step 102: the chromatic value of determining picture element in the pending image.
If the training of the chromatic value distributed areas of various light source correspondences finishes, then can carry out follow-up correction.As shown in Figure 2, at first import pending image, as utilize imageing sensor to capture current pending image.Calculate the chromatic value of picture element in the pending image then.Promptly utilize the method in the step 101, obtain two chromatic value: log (the r)-log (b) and log (the g)-log (b) of picture element in the pending image, certainly, if in the step 101 with postrotational Fig. 4 histogram as a reference, then in this step in the pending image two of picture element chromatic values also can be log (r)-log (g) and log (r)+log (g)-2log (b).
Step 103: determine picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of same light source, determine current light source according to described number.
In the present embodiment, preserved in above-mentioned 5 kinds of light sources, the reference histograms of the color image that each light source produces when being radiated at grey, green and colour of skin material respectively, and utilize rectangle to describe the chromatic value distributed areas of same light source, can determine an average (L when each color image for each light source irradiation
x, L
y), a point in this average corresponding diagram 4 in the xy coordinate.
By having determined the chromatic value of picture element in the pending image in the step 102, i.e. log (r)+log (g)-2log (b) and log (r)-log (g), then with these two chromatic values respectively as x coordinate and y coordinate.If judge the chromatic value distributed areas that the chromatic value of a picture element in the pending image is arranged in the training gained, then the light source irradiation value with this distributed areas correspondence adds 1, picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of the same light source of described light source irradiation value representation.Certainly, also can work as judge the chromatic value that 10 picture elements are arranged in the pending image be positioned at the training gained the chromatic value distributed areas time, the light source irradiation value with this distributed areas correspondence adds 10 again.
All picture elements in will working as pending image are all searched and are finished, count picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of same light source then, determine with described pending image in the ratio of number of picture element reach the light source irradiation value of threshold value, with one of light source of this light source irradiation value correspondence as described current light source.For example, if counting the ratio of Indoor light source irradiation value and the picture element number of pending image is 50%, D65 light source irradiation value is 45% with the ratio of the picture element number of pending image, and this threshold setting is 40%, then can select one as current light source from D65 or Indoor.In order to reach best effect, then select the light source of maximum light source irradiation value correspondence as described current light source.But, if the light source irradiation value maximum of Indoor correspondence, the light source irradiation value of D65 correspondence is inferior big, then further, can judge whether the difference of two described light source irradiation values reaches set point, if, then with D65 as current light source, otherwise, with colour temperature among Indoor and the D65 higher as current light source, be about to D65 as current light source.
The process whether concrete chromatic value of judging picture element in the pending image is arranged in the chromatic value distributed areas can comprise: establishing the rectangular coordinates that the A rayed preserves in the color image chromatic value distributed areas that grey pigment produces just the time is (L
Xleft1, L
Ytop1, L
Xright1, L
Ybottom1), the rectangular coordinates that preserve the chromatic value distributed areas in the color image that produces when colour of skin material of A rayed is (L
Xleft2, L
Ytop2, L
Xright2, L
Ybottom2), if exist two chromatic values of picture element a in the pending image to satisfy: L
Ybottom1≤y≤L
Ytop1, and L
Xleft1≤x≤L
Xright1, think that then the chromatic value of this picture element a drops in the grey rectangle of A light, then the picture element number adds 1 in the pending image of the chromatic value correspondence in the chromatic value distributed areas of A light, and promptly the light source irradiation value of A light adds 1; If exist two chromatic values of picture element b in the pending image to satisfy: L
Ybottom2≤y≤L
Ytop2, and L
Xleft2≤x≤L
Xright2, think that then the chromatic value of this picture element b drops in the colour of skin rectangle of A light, same, the light source irradiation value of A light is added 1 once more.
Step 104: the parameter according to described current light source is carried out white balance correction.
By aforesaid description, can be easily determine the colourity mean value of the color image that each light source irradiation produces when each color material: L according to formula (1)
xAnd L
y, and go out the correction parameter of white balance of this light source correspondence according to this colourity mean value calculation, and be respectively: gr_gain and gb_gain, and utilize these two gr_gain and gb_gain that pending image is carried out white balance correction.Gr_gain and gb_gain determine according to formula (2):
Gr_gain and gb_gain can regulate the chromatic value of each picture element in the image, concrete control method is to keep the G of R, G and three components of B constant, according to gr_gain parameter regulation R component,, obtain distortionless correcting image according to gb_gain parameter regulation B component, if the color component of certain picture element is R1, G1 and B1 before proofreading and correct, the color component that changes picture element after then proofreading and correct is: R2=R1 * gr_gain, G2=G1, B2=B1 * gb_gain, so far, white balance correction finishes.
Experiment shows, if judging current light source is Indoor light, pending image is a gray image, then proofread and correct according to the inventive method, and figure kine bias cyan before correction, the obvious grey partially of image after correction, the image fault after utilizing the present invention to proofread and correct is less; If to judge current light source is A light, pending image is a green image, then proofread and correct according to the inventive method, and figure kine bias khaki before correction, the figure kine bias green after utilizing the present invention to proofread and correct, the image fault after the correction is less.And if current light source is an A light, present image is the coloured image of many colors, and shown in Fig. 6 (a) and Fig. 6 (b), shades of colour is all yellow partially before then proofreading and correct, and whiter after the correction, distortion is less.
By above-mentioned description to the inventive method, the present invention also provides a kind of device of realizing white balance correction, as shown in Figure 7, this device comprises collecting unit 11, distributed areas determining unit 12, the first chromatic value determining unit 13, number determining unit 14, light source determining unit 15 and correcting unit 16, wherein, collecting unit 11 is used to gather the color image that each light source irradiation produces when each color material; Distributed areas determining unit 12 is used for determining according to the chromatic value of described color image picture element the chromatic value distributed areas of described picture element; The first chromatic value determining unit 13 is used for determining the chromatic value of pending image picture element; Number determining unit 14 is used for determining picture element number in the described pending image of chromatic value correspondence of chromatic value distributed areas of same light source; Light source determining unit 15 is used for determining current light source according to described number; Correcting unit 16 is used for carrying out white balance correction according to the parameter of this current light source.
Described distributed areas determining unit 12 comprises statistic unit 20 and performance element 21, and wherein, statistic unit 20 is used for adding up the histogram of the chromatic value of determining described color image picture element; Performance element 21 is used for this histogram picture element chromatic value distribution as described chromatic value distributed areas, and the scope that maybe will comprise picture element chromatic value mean value in this histogram is as described chromatic value distributed areas.
Described performance element 21 comprises searches unit 31 and rectangular area determining unit 32, wherein, searches the chromatic value that unit 31 is used for finding out described color image picture element; Rectangular area determining unit 32 is used for and will comprises described color image picture element chromatic value, and the rectangular area of area minimum is as described chromatic value distributed areas.
Described device also comprises the second chromatic value determining unit 17, is used for determining according to the color component of described color image picture element the chromatic value of picture element.
The described second chromatic value determining unit 17 comprises color component determining unit 22 and operating unit 23, and wherein, color component determining unit 22 is used for determining described color image picture element color component; Operating unit 23 is used for ratio with described color image picture element color component as described chromatic value, or, with the described chromatic value of logarithm of the ratio of picture element color component in the described color image.
Described number determining unit 14 comprises judging unit 24 and counting unit 25, wherein, judging unit 24 is used for judging whether the chromatic value of described pending image one picture element is arranged in described chromatic value distributed areas, and judged result is sent to described counting unit 25; Counting unit 25 is used for if described judged result is for being positioned at described chromatic value distributed areas, then the light source irradiation value with this distributed areas correspondence adds 1, picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of the same light source of described light source irradiation value representation.
Described light source determining unit 15 comprises threshold value determining unit 26 and realizes unit 27, and wherein, threshold value determining unit 26 is used for determining that the ratio with the number of described pending image picture element reaches the light source irradiation value of threshold value; Realize that unit 27 is used for one of light source with described light source irradiation value correspondence as described current light source.
Described realization unit 27 comprises comparing unit 33 and selected cell 34, and wherein, comparing unit 33 is used for if the light source irradiation value that reaches threshold value with the ratio of the number of described pending image picture element has two at least, then the size of each light source irradiation value relatively; Selected cell 34 is used to select the light source of maximum light source irradiation value correspondence as described current light source.
Described correcting unit 16 comprises chromatic value mean value determining unit 28 and parameter correction unit 29, and wherein, chromatic value mean value determining unit 28 is used for determining the color image picture element chromatic value mean value of described current light source correspondence; Parameter correction unit 29 is used to utilize described chromatic value mean value to determine the correction parameter of white balance of this light source correspondence, and carries out white balance correction according to this correction parameter of white balance.
Described device also comprises preserves unit 18, is used to preserve picture element chromatic value mean value calculation formula:
By the inventive method and device, avoided Automatic white balance owing to ignoring the distortion that the influence of light source to correction parameter makes mistakes and cause, make picture quality better, it is better that the user experiences.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.
Claims (21)
1, a kind of method that realizes white balance correction is characterized in that, this method comprises:
Gather the color image that each light source irradiation produces when each color material, determine the chromatic value distributed areas of described picture element according to the chromatic value of picture element in the described color image;
Determine the chromatic value of picture element in the pending image;
Determine picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of same light source, determine current light source according to described number;
Parameter according to described current light source is carried out white balance correction.
2, the method for claim 1 is characterized in that, described chromatic value according to picture element in the described color image determines that the chromatic value distributed areas of described picture element comprise:
Statistics is determined the histogram of the chromatic value of picture element in the described color image;
As described chromatic value distributed areas, the scope that maybe will comprise picture element chromatic value mean value in this histogram is as described chromatic value distributed areas with picture element chromatic value distribution in this histogram.
3, method as claimed in claim 2 is characterized in that, described picture element chromatic value distribution in this histogram is comprised as described chromatic value distributed areas:
To comprise picture element chromatic value in the described color image, and the rectangular area of area minimum is as described chromatic value distributed areas.
4, the method for claim 1 is characterized in that, after the described collection color image, determines that according to the chromatic value of picture element in the described color image chromatic value distributed areas of described picture element comprise before:
Determine the chromatic value of picture element according to the color component of picture element in the described color image.
5, method as claimed in claim 4 is characterized in that,
With the ratio of picture element color component in the described color image as described chromatic value, or, with the described chromatic value of logarithm of the ratio of picture element color component in the described color image.
6, the method for claim 1 is characterized in that, the picture element number comprises in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of described definite same light source:
If the chromatic value of a picture element is arranged in described chromatic value distributed areas in the described pending image, then the light source irradiation value with this distributed areas correspondence adds 1, picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of the same light source of described light source irradiation value representation.
7, method as claimed in claim 6 is characterized in that, describedly determines that according to described number current light source comprises:
Determine with described pending image in the ratio of number of picture element reach the light source irradiation value of threshold value, with one of light source of this light source irradiation value correspondence as described current light source.
8, method as claimed in claim 7 is characterized in that, if with described pending image in the ratio of number of the picture element light source irradiation value that reaches threshold value have two at least, then select the light source of maximum light source irradiation value correspondence as described current light source.
9, method as claimed in claim 8, it is characterized in that, if the light source irradiation value maximum of the first light source correspondence, the light source irradiation value of secondary light source correspondence is inferior big, whether the difference of then judging two described light source irradiation values reaches set point, if, then with described first light source as current light source, otherwise, with colour temperature in described first light source and the secondary light source higher as current light source.
10, the method for claim 1 is characterized in that, described parameter according to described current light source is carried out white balance correction and comprised:
Determine picture element chromatic value mean value in the color image of described current light source correspondence, utilize this chromatic value mean value to determine the correction parameter of white balance of this light source correspondence, and carry out white balance correction according to this correction parameter of white balance.
12, a kind of device of realizing white balance correction is characterized in that, this device comprises:
Collecting unit is used to gather the color image that each light source irradiation produces when each color material;
The distributed areas determining unit is used for determining according to the chromatic value of described color image picture element the chromatic value distributed areas of described picture element;
The first chromatic value determining unit is used for determining the chromatic value of pending image picture element;
The number determining unit is used for determining picture element number in the described pending image of chromatic value correspondence of chromatic value distributed areas of same light source;
The light source determining unit is used for determining current light source according to described number;
Correcting unit is used for carrying out white balance correction according to the parameter of this current light source.
13, as device as described in the claim 12, it is characterized in that described distributed areas determining unit comprises:
Statistic unit is used for adding up the histogram of the chromatic value of determining described color image picture element;
Performance element is used for this histogram picture element chromatic value distribution as described chromatic value distributed areas, and the scope that maybe will comprise picture element chromatic value mean value in this histogram is as described chromatic value distributed areas.
14, as device as described in the claim 13, it is characterized in that described performance element comprises:
Search the unit, be used for finding out the chromatic value of described color image picture element;
The rectangular area determining unit is used for and will comprises described color image picture element chromatic value, and the rectangular area of area minimum is as described chromatic value distributed areas.
15, as device as described in the claim 12, it is characterized in that described device also comprises:
The second chromatic value determining unit is used for determining according to the color component of described color image picture element the chromatic value of picture element.
16, as device as described in the claim 15, it is characterized in that the described second chromatic value determining unit comprises:
The color component determining unit is used for determining described color image picture element color component;
Operating unit is used for ratio with described color image picture element color component as described chromatic value, or, with the described chromatic value of logarithm of the ratio of picture element color component in the described color image.
17, as device as described in the claim 12, it is characterized in that described number determining unit comprises judging unit and counting unit, wherein,
Described judging unit is used for judging whether the chromatic value of described pending image one picture element is arranged in described chromatic value distributed areas, and judged result is sent to described counting unit;
Described counting unit, be used for if described judged result is for being positioned at described chromatic value distributed areas, then the light source irradiation value with this distributed areas correspondence adds 1, picture element number in the described pending image of the chromatic value correspondence in the chromatic value distributed areas of the same light source of described light source irradiation value representation.
18, as device as described in the claim 17, it is characterized in that described light source determining unit comprises:
The threshold value determining unit is used for determining that the ratio with the number of described pending image picture element reaches the light source irradiation value of threshold value;
Realize the unit, be used for one of light source as described current light source with described light source irradiation value correspondence.
19, as device as described in the claim 18, it is characterized in that described realization unit comprises:
Comparing unit is used for if the light source irradiation value that reaches threshold value with the ratio of the number of described pending image picture element has two at least, then the size of each light source irradiation value relatively;
Selected cell is used to select the light source of maximum light source irradiation value correspondence as described current light source.
20, as device as described in the claim 12, it is characterized in that described correcting unit comprises:
Chromatic value mean value determining unit is used for determining the color image picture element chromatic value mean value of described current light source correspondence;
Parameter correction unit is used to utilize described chromatic value mean value to determine the correction parameter of white balance of this light source correspondence, and carries out white balance correction according to this correction parameter of white balance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100986345A CN100551081C (en) | 2007-04-23 | 2007-04-23 | A kind of method and device of realizing white balance correction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100986345A CN100551081C (en) | 2007-04-23 | 2007-04-23 | A kind of method and device of realizing white balance correction |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101039439A true CN101039439A (en) | 2007-09-19 |
CN100551081C CN100551081C (en) | 2009-10-14 |
Family
ID=38890029
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2007100986345A Active CN100551081C (en) | 2007-04-23 | 2007-04-23 | A kind of method and device of realizing white balance correction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100551081C (en) |
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101448085A (en) * | 2008-12-26 | 2009-06-03 | 北京中星微电子有限公司 | Videography processing method and system supporting face detection |
CN101577831A (en) * | 2009-03-10 | 2009-11-11 | 北京中星微电子有限公司 | Control method and control device for starting white balance adjustment |
CN102244790A (en) * | 2011-06-27 | 2011-11-16 | 展讯通信(上海)有限公司 | Device and method for adaptively adjusting supporting parameters of image signal processor |
CN103177694A (en) * | 2013-04-18 | 2013-06-26 | 广州市观泰数字显示设备有限公司 | White balance adjusting method of LED (Light Emitting Diode) display screen |
CN103297789A (en) * | 2013-05-20 | 2013-09-11 | 周宇 | White balance correcting method and white balance correcting device |
CN103826113A (en) * | 2014-03-12 | 2014-05-28 | 中国科学院上海高等研究院 | Color reducing method and device |
CN104780353A (en) * | 2015-03-26 | 2015-07-15 | 广东欧珀移动通信有限公司 | Image processing method and device |
CN104936334A (en) * | 2014-03-20 | 2015-09-23 | 联想(北京)有限公司 | Light control method and device |
CN105959662A (en) * | 2016-05-24 | 2016-09-21 | 深圳英飞拓科技股份有限公司 | Self-adaptive white balance adjusting method and device |
CN106231193A (en) * | 2016-08-05 | 2016-12-14 | 深圳市金立通信设备有限公司 | A kind of image processing method and terminal |
WO2017008351A1 (en) * | 2015-07-10 | 2017-01-19 | 宇龙计算机通信科技(深圳)有限公司 | White balance adjusting method and photographing terminal |
CN106357988A (en) * | 2016-11-09 | 2017-01-25 | 广东欧珀移动通信有限公司 | White balance adjustment method, device and terminal equipment |
CN106791757A (en) * | 2015-11-23 | 2017-05-31 | 创意电子股份有限公司 | Image correction system and method thereof |
CN107005685A (en) * | 2014-09-24 | 2017-08-01 | (株)奈克斯其布斯 | Utilize camera video correction/control device and method of color/illuminance transducer |
CN107197225A (en) * | 2017-06-13 | 2017-09-22 | 浙江大学 | Color digital camera white balance correcting based on chromatic adaptation model |
CN107959843A (en) * | 2017-12-25 | 2018-04-24 | 广东欧珀移动通信有限公司 | Image processing method and device, computer-readable recording medium and computer equipment |
CN108111831A (en) * | 2017-12-25 | 2018-06-01 | 广东欧珀移动通信有限公司 | Image pickup method, imaging device, computer readable storage medium and computer equipment |
CN108156379A (en) * | 2017-12-28 | 2018-06-12 | 努比亚技术有限公司 | A kind of optimization method of automatic white balance, terminal and computer readable storage medium |
CN108616691A (en) * | 2018-04-28 | 2018-10-02 | 北京小米移动软件有限公司 | Photographic method, device, server based on automatic white balance and storage medium |
CN109118549A (en) * | 2018-07-20 | 2019-01-01 | 上海电力学院 | A method of making object of reference with white printing paper and restores object color |
CN109714582A (en) * | 2019-01-04 | 2019-05-03 | Oppo广东移动通信有限公司 | White balance adjustment method, device, storage medium and terminal |
CN110392245A (en) * | 2018-04-20 | 2019-10-29 | 瑞昱半导体股份有限公司 | White balance correcting and its image processing apparatus based on Skin Color Information |
CN111587573A (en) * | 2018-05-30 | 2020-08-25 | 华为技术有限公司 | Image processing method and device |
CN111787299A (en) * | 2019-10-18 | 2020-10-16 | 西安宇视信息科技有限公司 | Method, device, medium and electronic equipment for determining special light source |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104469334B (en) * | 2014-12-10 | 2016-08-17 | 深圳市理邦精密仪器股份有限公司 | A kind of Medical Devices obtain the processing method and processing device of view data |
-
2007
- 2007-04-23 CN CNB2007100986345A patent/CN100551081C/en active Active
Cited By (37)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101448085B (en) * | 2008-12-26 | 2013-08-21 | 北京中星微电子有限公司 | Videography processing method and system supporting face detection |
CN101448085A (en) * | 2008-12-26 | 2009-06-03 | 北京中星微电子有限公司 | Videography processing method and system supporting face detection |
CN101577831A (en) * | 2009-03-10 | 2009-11-11 | 北京中星微电子有限公司 | Control method and control device for starting white balance adjustment |
CN101577831B (en) * | 2009-03-10 | 2013-08-21 | 北京中星微电子有限公司 | Control method and control device for starting white balance adjustment |
CN102244790A (en) * | 2011-06-27 | 2011-11-16 | 展讯通信(上海)有限公司 | Device and method for adaptively adjusting supporting parameters of image signal processor |
CN103177694A (en) * | 2013-04-18 | 2013-06-26 | 广州市观泰数字显示设备有限公司 | White balance adjusting method of LED (Light Emitting Diode) display screen |
CN103177694B (en) * | 2013-04-18 | 2015-03-04 | 广州市观泰数字显示设备有限公司 | White balance adjusting method of LED (Light Emitting Diode) display screen |
CN103297789A (en) * | 2013-05-20 | 2013-09-11 | 周宇 | White balance correcting method and white balance correcting device |
CN103297789B (en) * | 2013-05-20 | 2015-04-29 | 周宇 | White balance correcting method and white balance correcting device |
CN103826113B (en) * | 2014-03-12 | 2016-02-17 | 中国科学院上海高等研究院 | A kind of color rendition method and device |
CN103826113A (en) * | 2014-03-12 | 2014-05-28 | 中国科学院上海高等研究院 | Color reducing method and device |
CN104936334A (en) * | 2014-03-20 | 2015-09-23 | 联想(北京)有限公司 | Light control method and device |
CN107005685A (en) * | 2014-09-24 | 2017-08-01 | (株)奈克斯其布斯 | Utilize camera video correction/control device and method of color/illuminance transducer |
CN104780353A (en) * | 2015-03-26 | 2015-07-15 | 广东欧珀移动通信有限公司 | Image processing method and device |
WO2017008351A1 (en) * | 2015-07-10 | 2017-01-19 | 宇龙计算机通信科技(深圳)有限公司 | White balance adjusting method and photographing terminal |
CN106791757B (en) * | 2015-11-23 | 2018-11-30 | 创意电子股份有限公司 | Image correction system and method thereof |
CN106791757A (en) * | 2015-11-23 | 2017-05-31 | 创意电子股份有限公司 | Image correction system and method thereof |
CN105959662A (en) * | 2016-05-24 | 2016-09-21 | 深圳英飞拓科技股份有限公司 | Self-adaptive white balance adjusting method and device |
CN106231193A (en) * | 2016-08-05 | 2016-12-14 | 深圳市金立通信设备有限公司 | A kind of image processing method and terminal |
CN106357988A (en) * | 2016-11-09 | 2017-01-25 | 广东欧珀移动通信有限公司 | White balance adjustment method, device and terminal equipment |
CN106357988B (en) * | 2016-11-09 | 2020-03-06 | Oppo广东移动通信有限公司 | White balance adjusting method and device and terminal equipment |
CN107197225A (en) * | 2017-06-13 | 2017-09-22 | 浙江大学 | Color digital camera white balance correcting based on chromatic adaptation model |
CN108111831A (en) * | 2017-12-25 | 2018-06-01 | 广东欧珀移动通信有限公司 | Image pickup method, imaging device, computer readable storage medium and computer equipment |
CN107959843B (en) * | 2017-12-25 | 2019-07-05 | Oppo广东移动通信有限公司 | Image processing method and device, computer readable storage medium and computer equipment |
CN107959843A (en) * | 2017-12-25 | 2018-04-24 | 广东欧珀移动通信有限公司 | Image processing method and device, computer-readable recording medium and computer equipment |
CN108156379A (en) * | 2017-12-28 | 2018-06-12 | 努比亚技术有限公司 | A kind of optimization method of automatic white balance, terminal and computer readable storage medium |
CN110392245B (en) * | 2018-04-20 | 2021-07-16 | 瑞昱半导体股份有限公司 | White balance correction method based on skin color information and image processing device thereof |
CN110392245A (en) * | 2018-04-20 | 2019-10-29 | 瑞昱半导体股份有限公司 | White balance correcting and its image processing apparatus based on Skin Color Information |
CN108616691A (en) * | 2018-04-28 | 2018-10-02 | 北京小米移动软件有限公司 | Photographic method, device, server based on automatic white balance and storage medium |
CN108616691B (en) * | 2018-04-28 | 2020-07-10 | 北京小米移动软件有限公司 | Photographing method and device based on automatic white balance, server and storage medium |
CN111587573A (en) * | 2018-05-30 | 2020-08-25 | 华为技术有限公司 | Image processing method and device |
CN111587573B (en) * | 2018-05-30 | 2021-06-15 | 华为技术有限公司 | Image processing method and device and computer storage medium |
CN109118549A (en) * | 2018-07-20 | 2019-01-01 | 上海电力学院 | A method of making object of reference with white printing paper and restores object color |
CN109714582A (en) * | 2019-01-04 | 2019-05-03 | Oppo广东移动通信有限公司 | White balance adjustment method, device, storage medium and terminal |
CN109714582B (en) * | 2019-01-04 | 2021-08-06 | Oppo广东移动通信有限公司 | White balance adjusting method, device, storage medium and terminal |
CN111787299A (en) * | 2019-10-18 | 2020-10-16 | 西安宇视信息科技有限公司 | Method, device, medium and electronic equipment for determining special light source |
CN111787299B (en) * | 2019-10-18 | 2022-06-14 | 西安宇视信息科技有限公司 | Method, device, medium and electronic equipment for determining special light source |
Also Published As
Publication number | Publication date |
---|---|
CN100551081C (en) | 2009-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101039439A (en) | Method and apparatus for realizing correction of white balance | |
CN101079954A (en) | Method and device for realizing white balance correction | |
CN1245033C (en) | Equipment and method for regulating colour image colour saturation | |
CN2692734Y (en) | Image display system and projector | |
CN1153444C (en) | Image processing apparatus and method | |
CN1708137A (en) | Saturation-adaptive image enhancement apparatus and method | |
CN101076087A (en) | Image correction circuit, image correction method and image display | |
US7684096B2 (en) | Automatic color correction for sequences of images | |
US7783127B1 (en) | Determining parameters for adjusting images | |
CN1951101A (en) | Method for processing color image data | |
CN101075420A (en) | Image display apparatus and image display method | |
CN1832583A (en) | Equipment, medium and method possessing white balance control | |
CN1620150A (en) | Apparatus and method for controlling the colors of a color image | |
CN1615029A (en) | Method and apparatus for enhancing local luminance of image, and recording medium | |
CN1525763A (en) | Method and apparatus for generating user preference data regarding color characteristic of image and method and apparatus for converting image color preference using the method and apparatus | |
CN1454011A (en) | Colour editing apparatus and colour editing method | |
CN1642220A (en) | Image processing device, image display device, image processing method, and image processing program | |
CN1956551A (en) | Image processing method, image processing program, image processing apparatus, imaging apparatus, imaging method, and imaging program | |
CN1224276C (en) | Colour saturation control method for RGB colour system | |
CN1714372A (en) | Image signal processing | |
CN1925562A (en) | Apparatus, method for taking an image and apparatus, method for processing an image and program thereof | |
CN1945627A (en) | Method for correcting digital tongue picture colour cast | |
CN101035190A (en) | Apparatus, method, and program product for color correction | |
CN101076088A (en) | Image correction circuit, image correction method and image display | |
CN1756374A (en) | Have color temperature conversion method and device based on the color correction functions of pixel brightness |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20180410 Address after: 100191 Xueyuan Road, Haidian District, Haidian District, Beijing, No. 607, No. six Patentee after: Beijing Vimicro AI Chip Technology Co Ltd Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 35, Nanjing Ning building, 15 Floor Patentee before: Beijing Vimicro Corporation |