CN101957988B - Method and device for obtaining probability distribution of image grey spots and white balance method and device - Google Patents

Method and device for obtaining probability distribution of image grey spots and white balance method and device Download PDF

Info

Publication number
CN101957988B
CN101957988B CN 200910088816 CN200910088816A CN101957988B CN 101957988 B CN101957988 B CN 101957988B CN 200910088816 CN200910088816 CN 200910088816 CN 200910088816 A CN200910088816 A CN 200910088816A CN 101957988 B CN101957988 B CN 101957988B
Authority
CN
China
Prior art keywords
gray scale
pixel
histogram
scale point
value
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.)
Expired - Fee Related
Application number
CN 200910088816
Other languages
Chinese (zh)
Other versions
CN101957988A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 200910088816 priority Critical patent/CN101957988B/en
Publication of CN101957988A publication Critical patent/CN101957988A/en
Application granted granted Critical
Publication of CN101957988B publication Critical patent/CN101957988B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The embodiment of the invention provides method and device for obtaining the probability distribution of image grey spots and white balance method and device. The method for obtaining the probability distribution of image grey spots comprises the steps of: taking a reference image with colorful blocks and grey blocks; building a colorful spot column diagram according to the color value of each pixel point corresponding to the colorful blocks in the reference image, and building a spay spot column diagram according to the color value of each pixel point corresponding to the grey blocks in the reference image; equally dividing the colorful spot column diagram and the spay spot column diagram into a plurality of sections respectively; and obtaining a probability distribution image of grey spots of each pixel point in the reference image according to the amount of the pixel points in the corresponding sections in the colorful spot column diagram and the spay spot column diagram. By obtaining the probability distribution image of grey spots in the reference image, the spay spot of the taken image can be judged more accurately, and the accuracy of white balance gain of the taken image is improved.

Description

Obtain method, device and white balance method, the device of gradation of image point probability distribution
Technical field
The present invention relates to technical field of image processing, relate in particular to a kind of method, device and white balance method, device that obtains gradation of image point probability distribution.
Background technology
In photographic process, the light that sends from light source is reflected by object, and the image sensor of photographic goods obtains the picture of object by measuring these reflected light.
As seen, the object imaging of photography is relevant with object itself to light conditions.As, when when the light source of a yellow, light being invested on the wall of white, because the object of white can reflect all incident lights, reflection ray also can present yellow for image sensor.Like this, the object imaging of photography is just viewed inconsistent with our human eye, and namely white balance is inaccurate, and the image that the adjusting that need to carry out white balance obtains photography is consistent with the image of eye-observation.
At present, white balance method commonly used is as determining gray scale point in image by setting fixing threshold value.Should be known in that the gray scale point refers in the situation that the pixel that correct each Color Channel numerical value of white balance equates, as red, green, blue look (R, G, B) three primary colours passage R=G=B.Like this, the Color Channel value by the gray scale point that will determine is adjusted into R=G=B, obtain each Color Channel yield value of image, and then the adjustment image reaches white balance.
In realizing process of the present invention, the inventor finds that in prior art, there are the following problems at least:
Inaccurate due to white balance causes the gray scale point to certain color deviation, but the degree that departs from determines by light conditions, can't be fixed in certain scope, so, determine the poor accuracy of gray scale point with fixing threshold value, white balance effect is poor.
Summary of the invention
Embodiments of the invention provide a kind of method, device and white balance method, device that obtains gradation of image point probability distribution, the accuracy of judgement of its gray scale point, and white balance effect is good.
A kind of method that obtains gradation of image point probability distribution comprises:
Shooting has the reference picture of colored color lump and gray scale color lump;
Each color value of corresponding according to colored color lump in described reference picture each pixel is set up colored some histogram, and according to the color value of each pixel that in described reference picture, the gray scale color lump is corresponding, sets up gray scale point histogram;
With described colored some histogram and described gray scale point histogram, be equal to respectively and be divided into a plurality of intervals, according to the pixel number in the corresponding interval in described colored some histogram and described gray scale point histogram, obtain the gray scale point probability distribution graph of each pixel in described reference picture.
A kind of device that obtains gradation of image point probability distribution comprises:
Image acquisition unit is used for taking the reference picture with colored color lump and gray scale color lump;
Histogram is set up the unit, is used for each color value of each pixel corresponding to color lump colored according to described reference picture, sets up colored some histogram, and according to the color value of each pixel that in described reference picture, the gray scale color lump is corresponding, sets up gray scale point histogram;
The histogram analysis unit is used for described colored some histogram and described gray scale point histogram, is equal to respectively to be divided into a plurality of intervals, obtains the pixel number in the corresponding interval in described colored some histogram and described gray scale point histogram;
Gray scale point probability calculation unit is used for obtaining the gray scale point probability distribution graph of described reference picture according to the pixel number in the corresponding interval of described colored some histogram and described gray scale point histogram.
A kind of white balance method comprises:
According to each color value of each pixel in photographic images, and the gray scale point probability distribution graph of reference picture, obtain the gray scale point probable value of each pixel in described photographic images;
According to the gray scale point probable value of each pixel in described photographic images, obtain the illumination estimation of described photographic images;
According to the illumination estimation of described photographic images, the yield value that obtains each Color Channel of described photographic images is realized white balance to adjust described photographic images.
A kind of white balancing apparatus comprises:
Gray scale point probable value acquiring unit is used for each color value according to each pixel of photographic images, and in the gray scale point probability distribution graph of reference picture, obtains the gray scale point probable value of each pixel in described photographic images;
The illumination estimation unit is used for the gray scale point probable value according to described each pixel of photographic images, obtains the illumination estimation of described photographic images;
The yield value acquiring unit is used for the illumination estimation according to described photographic images, and the yield value that obtains each Color Channel of described photographic images is realized white balance to adjust image.
Can be found out by the technical scheme that the embodiment of the invention described above provides, the invention provides a kind of statistical method of gray scale point probability distribution, be used for adding up the gray scale point probability distribution of the image that is taken, and intensity-based point probability distribution, confirm to take the gray scale point probable value of each pixel in the image that obtains according to the gray scale point probability distribution graph of reference picture, carry out the method for white balance.Put probability distribution by gray scale, make the judgement of gray scale point more accurate, improved the accuracy that white balance gains is calculated.
Description of drawings
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, during the below will describe embodiment, the accompanying drawing of required use is done to introduce simply, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the method flow schematic diagram that the embodiment of the present invention obtains gradation of image point probability distribution;
Fig. 2 is method that the embodiment of the present invention the obtains gradation of image point probability distribution color dot histogram schematic diagram of prizing;
Fig. 3 is that the embodiment of the present invention obtains Grey Point histogram schematic diagram in the method for gradation of image point probability distribution;
Fig. 4 is method that the embodiment of the present invention the obtains gradation of image point probability distribution interval division schematic diagram in color dot histogram, Grey Point histogram of prizing;
Fig. 5 is that the embodiment of the present invention obtains gray scale point probability distribution graph schematic diagram in the method for gradation of image point probability distribution;
Fig. 6 is the device formation schematic diagram that the embodiment of the present invention obtains gradation of image point probability distribution;
Fig. 7 is embodiment of the present invention white balance method schematic flow sheet one;
Fig. 8 is embodiment of the present invention white balance method schematic flow sheet two;
Fig. 9 is that embodiment of the present invention white balancing apparatus consists of schematic diagram one;
Figure 10 is that embodiment of the present invention white balancing apparatus consists of schematic diagram two;
Figure 11 is embodiment of the present invention white balance method application scenarios schematic flow sheet.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Based on the white balance method of prior art, determine the poor accuracy of gray scale point with fixing threshold value, white balance effect is poor.Embodiments of the invention provide a kind of method, device and white balance method, device that obtains gradation of image point probability distribution.
Under known light conditions, take and obtain reference picture, confirm the probability distribution situation of reference picture gray scale point, the probability distribution graph of the gray scale point that obtains.Then, for the present image that shooting obtains, can obtain the gray scale point probable value of each pixel from the probability distribution graph of gray scale point, to estimate the light conditions of current shooting image, the illumination estimation situation can reflect by the value of Color Channel.Select again the yield value of suitable Color Channel according to the illumination estimation situation, adjust the current shooting image, realize that white balance is correct.
Be appreciated that the gray scale point refers in the situation that the pixel that correct each Color Channel value of white balance equates.
Illumination can comprise that outdoor optical shines or indoor illumination, outdoor optical is according to comprising: fine day daylight, cloudy daylight or shade (as, taking the image that obtains under shade is exactly the shade situation), etc., indoor illumination comprises: tungsten light, daylight light or fluorescent light, etc.
The white balance method that embodiments of the invention provide and device, the adjusting of white balance can be completed by automated procedure process, belong to Automatic white balance.
Embodiment one
As shown in Figure 1, embodiments of the invention provide a kind of method that obtains gradation of image point probability distribution, comprising:
Step 11, shooting have colored color lump and gray scale color lump reference picture.
Step 12, according to each color value of each pixel that in reference picture, colored color lump is corresponding, set up colored some histogram, and according to the color value of each pixel that in reference picture, the gray scale color lump is corresponding, set up gray scale point histogram.
Step 13, colour is put histogram and gray scale point histogram, be equal to respectively and be divided into a plurality of intervals, according to the pixel number in the corresponding interval in colour point histogram and gray scale point histogram, obtain the gray scale point probability distribution graph of each pixel in reference picture.
Can know, each color value of each pixel can be R, G, the B of RGB chrominance space in image, the perhaps Cb of Ycbcr chrominance space, Cr, etc.The color value of the pixel of normal conditions hypograph is known, and the Color Channel value of image is also known.
Particularly, optional in step 11, the Standard colour board of reference picture colored color lump and gray scale color lump for shooting has obtains, and Standard colour board can be standard 24 colour tables, perhaps other Standard colour boards that not only comprised the gray scale color lump but also comprised colored color lump.
As shown in Fig. 2,3, optional in step 12, colored some histogram and histogrammic two dimensions of gray scale point can comprise:
Each pixel is at the R of RGB chrominance space ÷ G and B ÷ G, perhaps (R-G) ÷ G and (B-G) ÷ G.
Perhaps, each pixel is at Cb and the Cr of YCbCr chrominance space.
As shown in Figure 4, step 13 namely can be according to the same criteria for classifying, colour is put histogram and gray scale point histogram is divided into respectively a plurality of intervals, each interval corresponding number that falls into this interval pixel, the number of this pixel is exactly interval value.
Number as pixel interval in gray scale point histogram is a, value that namely should the interval is a, in colored some histogram, the number of corresponding interval pixel is b, and value that namely should the interval is b, and the pixel in should the interval is that the probable value of gray scale point is p=a ÷ (a+b).Like this, can obtain the gray scale point probability distribution graph (gray scale point probability distribution graph as shown in Figure 4) of each pixel in reference picture.
When (a+b)=0, p=0.In addition, when the value of pixel is outside histogram expression scope, also get p=0.
Optionally, take and to have the reference picture step 11 of colored color lump and gray scale color lump, can for, under default illumination, take the Standard colour board with colored color lump and grey color lump, obtain reference picture.
Default illumination can comprise that outdoor optical shines or indoor illumination.Outdoor optical is according to comprising: fine day daylight, cloudy daylight or shade (as, taking the image that obtains under shade is exactly the shade situation), etc., indoor illumination comprises: tungsten light, daylight light or fluorescent light, etc.
Like this, the probability distribution graph of the reference picture that outside the locker room, illumination or indoor illumination obtain respectively, when carrying out shooting operation, the user can select the scene mode of current photography to be default illumination, shines as indoor illumination or outdoor optical.Gray scale point probability distribution graph according to the default illumination of selected scene mode can realize the image Automatic white balance.Specifically can be referring to hereinafter narration.
In like manner, can store respectively fine day daylight, cloudy daylight or shade, tungsten light, daylight light or fluorescent light, etc. the probability distribution graph of reference picture, when carrying out shooting operation, the scene mode that the user can select current photography is default illumination, and the gray scale point probability distribution graph according to the default illumination of selected scene mode can realize the image Automatic white balance.
Embodiments of the invention provide a kind of method that obtains gradation of image point probability distribution, can also carry out filtering to the probability distribution graph that step 14 obtains, and make probability distribution graph more level and smooth.
Can be found out by the technical scheme that the embodiment of the invention described above provides, by obtaining the gray scale point probability distribution graph of reference picture, make the judgement of gray scale point more accurate.Confirm the gray scale point probability of the each point of photographic images by the gray scale point probability distribution situation of reference picture, and carry out accordingly illumination estimation and white balance, therefore can not produce the gray scale point and depart from, produce white balance effect preferably.
Embodiment two
As shown in Figure 6, corresponding to the method for the acquisition gradation of image point probability distribution of embodiment one, embodiments of the invention provide a kind of device that obtains gradation of image point probability distribution, comprising:
Image acquisition unit 61 is used for shooting and has colored color lump and gray scale color lump reference picture.
Histogram is set up unit 62, is used for each color value of each pixel corresponding to color lump colored according to reference picture, sets up colored some histogram, and according to the color value of each pixel that in reference picture, the gray scale color lump is corresponding, sets up gray scale point histogram.
Histogram analysis unit 63 is used for colour is put histogram and gray scale point histogram, is equal to respectively to be divided into a plurality of intervals, obtains the pixel number in the corresponding interval in colored some histogram and gray scale point histogram.
Gray scale point probability calculation unit 64 is used for the pixel number according to colour point histogram and gray scale point histogram correspondence interval, obtains the gray scale point probability distribution graph of reference picture.
Optionally, image acquisition unit 61 can be taken the Standard colour board with colored color lump and gray scale color lump, and Standard colour board can be standard 24 colour tables, perhaps other Standard colour boards that not only comprised the gray scale color lump but also comprised colored color lump.
Optionally, histogram is set up colour point histogram and histogrammic two dimensions of gray scale point set up unit 62 and can be comprised:
Each pixel is at the R of RGB chrominance space ÷ G and B ÷ G, perhaps (R-G) ÷ G and (B-G) ÷ G.
Perhaps, each pixel is at Cb and the Cr of YCbCr chrominance space.
Gray scale point probability calculation unit 64, being used for value interval in gray scale point histogram is a, and in colored some histogram, the value in corresponding interval is b, and the probable value that calculates pixel in this interval and be gray scale point is p=a ÷ (a+b).When (a+b)=0, p=0.When the value of pixel is outside histogram expression scope, also get p=0.
Optionally, image acquisition unit 61 also is used for taking the Standard colour board with colored color lump and gray scale color lump under default illumination, obtains reference picture.Default illumination comprises: outdoor optical shines or indoor illumination, and outdoor optical is according to comprising: fine day daylight, cloudy daylight or shade, indoor illumination comprises: tungsten light, daylight light or fluorescent light.
Inventive embodiment provides a kind of device that obtains gradation of image point probability distribution graph, can also comprise: wave filter (not showing in Fig. 6), be used for the probability distribution graph that gray scale point probability calculation unit 64 obtains is carried out filtering, and make probability distribution graph more level and smooth.
Image acquisition unit 61 can be CCD(Charge Couple Device, charge-coupled image sensor) or CMOS(Complementary Metal-Oxide Semiconductor, complementary matal-oxide semiconductor) sensor devices.Image acquisition unit 61 output digital image information are to histogram analysis unit 63.
Can be found out by the technical scheme that the embodiment of the invention described above provides, by obtaining the gray scale point probability distribution graph of reference picture, make the judgement of gray scale point more accurate.Confirm the gray scale point probability of the each point of photographic images by the gray scale point probability distribution situation of reference picture, and carry out accordingly illumination estimation and white balance, therefore can not produce the gray scale point and depart from, produce white balance effect preferably.
Embodiment three
As shown in Figure 7, based on the method for the acquisition gradation of image point probability distribution of above-described embodiment, embodiments of the invention provide a kind of white balance method, comprising:
Step 71, according to each color value of each pixel in photographic images, and the gray scale point probability distribution graph of reference picture obtains the gray scale point probable value of each pixel in photographic images.
Step 72, according to the gray scale point probable value of each pixel in photographic images, obtain the illumination estimation of photographic images.
Step 73, according to the illumination estimation of photographic images, the yield value that obtains each Color Channel of photographic images is realized white balance to adjust photographic images.
In step 71, the photography scene mode that obtains photographic images is consistent with the default photography scene mode of the gray scale point probability distribution graph that obtains reference picture, is outdoor optical as illumination and shines or indoor illumination, does not do and gives unnecessary details.
As shown in Figure 8, optional, according to each color value of each pixel in photographic images, obtain the step 71 of the gray scale point probable value of each pixel in photographic images from the gray scale point probability distribution graph of reference picture, can comprise:
Step 711, according to each color value of each pixel in photographic images, determine each pixel corresponding position in the gray scale point probability distribution graph of reference picture;
Step 712, according to each pixel corresponding position in the gray scale point probability distribution graph of reference picture, obtain gray scale point probable value corresponding to each pixel.
Particularly, if at the RGB chrominance space,
Step 711 can for: according to R, G, the B color value of each pixel in photographic images at the RGB chrominance space, obtain R ÷ G and the B ÷ G of each pixel, perhaps, obtain (R-G) ÷ G of each pixel and (B-G) ÷ G, namely obtained the position of each pixel transverse and longitudinal axle in the gray scale point probability distribution graph of reference picture, then, can determine the particular location of each pixel in the gray scale point probability distribution graph of reference picture.
Step 712 can for: according to each pixel corresponding position in the gray scale point probability distribution graph of reference picture, can obtain gray scale point probable value corresponding to this position.
Perhaps, if at the YCbCr chrominance space,
Step 711 can for: according to Cb, the Cr color value of each pixel in photographic images at the YCbCr chrominance space, obtained the position of each pixel transverse and longitudinal axle in the gray scale point probability distribution graph of reference picture, then, can determine the particular location of each pixel in the gray scale point probability distribution graph of reference picture.
Step 712 can for: according to each pixel corresponding position in the gray scale point probability distribution graph of reference picture, can obtain gray scale point probable value corresponding to this position.
Optionally, according to the gray scale point probable value of each pixel in photographic images, obtain the step 72 of the illumination estimation of photographic images, can comprise:
The gray scale point probable value of each pixel as weight, is calculated the weighted mean value of all each color values of pixel in the photographic images, and the mean value that obtains each Color Channel of photographic images is the illumination estimation of photographic images.
Particularly, in step 72, the illumination estimation computing formula of photographic images is
Figure GDA00002154073600101
P Gray(C i) be the gray scale point probable value of pixel, C i,kBe each color value of pixel, k is R or G or B, and i is pixel number numbering.
As, L R = Σ i P gray ( C i ) * C i , R Σ i 1 ;
L G = Σ i P gray ( C i ) * C i , G Σ i 1 ;
L B = Σ i P gray ( C i ) * C i , B Σ i 1 .
At the RGB chrominance space, can pass through formula
Figure GDA00002154073600111
Obtain photographic images R, G, B passage mean value L R, L G, L B, namely obtain the illumination estimation result of photographic images.
Perhaps, at the YCbCr chrominance space, can convert YCbCr to RGB, pass through formula Obtain photographic images R, G, B passage mean value L R, L G, L B, namely obtain the illumination estimation result of photographic images.
Optionally, according to the illumination estimation of photographic images, the yield value that obtains each Color Channel of photographic images is realized the step 73 of white balance to adjust photographic images, can comprise:
Step 731, each Color Channel mean value of photographic images is got inverse, obtain the yield value of each Color Channel.
Step 732, realize the blank level adjustment of photographic images by the yield value of each Color Channel.
Particularly, in step 73, with R passage mean value L RGet inverse, the yield value of the R passage of accomplished white balance, i.e. R Gain=1/L R
With G passage mean value L GGet inverse, the yield value of the G passage of accomplished white balance, i.e. G Gain=1/L G
With the B of institute passage mean value L BGet inverse, the yield value of the B passage of accomplished white balance, i.e. B Gain=1/L B
Like this, each Color Channel is on duty with each Color Channel yield value, can realize the blank level adjustment of image.
Can be found out by the white balance method that the embodiment of the invention described above provides, due to can be according to the gray scale point probability distribution graph of reference picture, obtain the gray scale point probable value of each pixel in image, make the judgement of gray scale point more accurate, thereby improved the accuracy that white balance gains is calculated.
And the white balance method that embodiments of the invention provide is obtaining under the probability distribution graph prerequisite of reference picture, the illumination estimation of photographic images is calculated, each channel gain of photographic images calculates very easy, fast, can satisfy real-time calculating, to adjust the needs of photographic images white balance.
Embodiment four
As shown in Figure 9, corresponding to the white balance method of above-described embodiment, embodiments of the invention provide a kind of white balancing apparatus, comprising:
Gray scale point probable value acquiring unit 91 is used for each color value according to each pixel of photographic images, obtains the gray scale point probable value of each pixel in photographic images from the gray scale point probability distribution graph of reference picture.
Illumination estimation unit 92 is used for the gray scale point probable value according to each pixel of photographic images, obtains the illumination estimation of photographic images.
Yield value acquiring unit 93 is used for the illumination estimation according to photographic images, and the yield value that obtains each Color Channel of photographic images is realized white balance to adjust photographic images.
Optionally, the gray scale point probability distribution graph of reference picture can be obtained by the described device of embodiment two.
And in gray scale point probable value acquiring unit 91, the photography scene mode that obtains photographic images is consistent with the default photography scene mode of the gray scale point probability distribution graph that obtains reference picture, is outdoor optical as illumination and shines or indoor illumination, does not do and gives unnecessary details.
Optionally, as shown in figure 10, in the white balancing apparatus of the embodiment of the present invention, gray scale point probable value acquiring unit 91 can comprise:
First obtains subelement 911, is used for according to each color value of each pixel of photographic images, determines the position of each pixel correspondence in the gray scale point probability distribution graph of reference picture.
Second obtains subelement 912, is used for obtaining gray scale point probable value corresponding to each pixel according to the position of each pixel in the gray scale point probability distribution graph correspondence of reference picture.
Further, illumination estimation unit 92, concrete be used for gray scale point probable value take each pixel of photographic images as weight, calculate the weighted mean value of all each color values of pixel, the mean value of each Color Channel of acquisition photographic images is the illumination estimation of photographic images.
Optionally, yield value acquiring unit 93 can comprise:
Yield value obtains subelement 931, is used for each Color Channel mean value of photographic images is got inverse, obtains the yield value of each Color Channel.
Gain control system unit 932 is used for controlling by the yield value that yield value obtains each Color Channel that subelement 931 obtains and adjusts photographic images and realize white balance.
The white balancing apparatus of the embodiment of the present invention can also comprise:
Gray scale point probability distribution graph storage unit 94 is for the gray scale point probability distribution graph of stored reference image.
Image output unit 95, after photographic images was realized white balance, output image was supplied with next step processing.
The white balancing apparatus of the embodiment of the present invention can also comprise:
Image acquisition unit 96 can be CCD(Charge Couple Device, charge-coupled image sensor) or CMOS(Complementary Metal-Oxide Semiconductor, complementary matal-oxide semiconductor) sensor devices.Image acquisition unit output digital image information is obtained subelement 911 to first of gray scale point probable value acquiring unit 91.
Can know, if the device of the acquisition gradation of image point probability distribution of the white balancing apparatus of the embodiment of the present invention and embodiment two is used in conjunction with jointly, the image acquisition unit 96 of the white balancing apparatus of the embodiment of the present invention can be same functional unit with the image acquisition unit 61 of the device that obtains gradation of image point probability distribution, does not do and gives unnecessary details.
Particularly, the white balancing apparatus that provides of embodiments of the invention:
Image acquisition unit 96 obtains digital image information (hereinafter to be referred as photographic images), and the transmission image obtains subelement 911 to first of gray scale point probable value acquiring unit 91;
First obtains subelement 911 according to each color value of each pixel in photographic images, and the gray scale point probability distribution graph of the reference picture in gray scale point probability distribution graph storage unit 94, determine the position of each pixel correspondence in the gray scale point probability distribution graph of reference picture, and the transmission positional information is obtained subelement 912 to first;
First obtains subelement 912, and the position according to each pixel correspondence in the gray scale point probability distribution graph of reference picture obtains gray scale point probable value corresponding to each pixel, and sends gray scale point probable value to Color Channel value acquiring unit 92;
Illumination estimation unit 92, take the gray scale point probable value of each pixel as weight, calculate the weighted mean value of all each color values of pixel, obtain each Color Channel mean value of photographic images, and send each Color Channel mean value of photographic images and obtain subelement 931 to the yield value of yield value acquiring unit 93;
Yield value obtains subelement 931, and each Color Channel mean value is got inverse, obtains the yield value of each Color Channel, and the yield value that sends each Color Channel is to gain control system unit 932;
Gain control system unit 932 is controlled the adjustment photographic images according to the yield value of each Color Channel and is realized white balance, and the photographic images of white balance is sent to image output unit 95;
After photographic images is realized white balance, can carry out subsequent step, not do at this and give unnecessary details.
Can be found out by the white balancing apparatus that the embodiment of the invention described above provides, due to can be according to the gray scale point probability distribution graph of reference picture, obtain the gray scale point probable value of each pixel in image, make the judgement of gray scale point more accurate, thereby improved the accuracy that white balance gains is calculated.
And the white balancing apparatus that embodiments of the invention provide is obtaining under the probability distribution graph prerequisite of reference picture, and each Color Channel gain of image is calculated very easy, fast, can satisfy the needs of real-time calculating.
Embodiment five
Referring to Fig. 1-5, Fig. 7, shown in Figure 8, R, the G take illumination estimation as the RGB chrominance space, B channel value illustrate as example the white balance method that embodiments of the invention provide.
As shown in figure 11, at first, the method that obtains reference picture gray scale point probability distribution graph is described:
Step 001, shooting standard 24 colour tables obtain a width reference picture.
It will be appreciated that, in the situation that consider the adjustment effect of pursuing different brackets, perhaps for easy to operate, reference picture also can obtain by other objects or the image that shooting has colored color lump and a gray scale color lump, and other have other objects that are easy to carry or are convenient to take of colored color lump and gray scale color lump such as being in the fixing object of reference of taking the place etc.
Step 002, the gray scale color lump that obtains respectively RGB chrominance space reference picture and colored piece histogram.
Gray scale color lump and colored piece for the reference picture of standard 24 colour tables are carried out respectively following operation: to each pixel in color lump, calculate R ÷ G, two values of B ÷ G, and, take R ÷ G as the first dimension, B ÷ G is the second dimension, calculates the two-dimensional histogram to middle pixel in all this color lumps, shown in Fig. 2,3.
Step 003, obtain the number of colored point and histogrammic each the interval interior pixel of gray scale point.
Shown in Fig. 2,3, in histogram, the span of each coordinate axis is [0-2.5], and each interval is Delta=0.005, and histogram has 501 * 501 intervals (each coordinate axis maximal value of histogram is 500).
Represent that referring to the value in the A interval in Fig. 4 histogram all drop into (2*delta)<R ÷ G<(3*delta), the number of the pixel of delta<B ÷ G<(2*delta).
Can also carry out normalization to each histogram, make have a few in histogram and be 1, reduce calculated amount, namely certain 1 x is calculated
Figure GDA00002154073600151
Step 004, obtain the gray scale point probability distribution graph of each pixel of reference picture.
The value of getting gray scale point histogram this position is a, and the value of colored some histogram this position is b, and this position is that the probable value of gray scale point is p=a ÷ (a+b).
When the situation of (a+b)=0 occurring, think p=0.Pixel outside histogram expression scope when namely surpassing the scope of [0,2.5] defined, is also got p=0.
Finally obtain the gray scale point probability distribution graph of reference picture.
All right, reference gray level point probability distribution graph is carried out filtering, make with reference to probability distribution graph more level and smooth.Also can, store with reference to gray scale point probability distribution graph, wait until when carrying out blank level adjustment, call reference gray level point probability distribution graph.
Then, make the method for balance clear:
Step 005, obtain the gray scale point probable value of each pixel of input picture from the gray scale point probability distribution graph of reference picture.
Input picture is the image of pending blank level adjustment, and input picture can be a width photographic images, below take photographic images as example.Calculate the pixel R ÷ G value of photographic images, and B ÷ G value, according to R ÷ G value, and B ÷ G value, find corresponding gray scale point probable value p from reference gray level point probability distribution graph.
Step 006, obtain the illumination estimation result of photographic images.
The illumination estimation computing formula of photographic images is
Figure GDA00002154073600161
P Gray(C i) be the gray scale point probable value of pixel, C i,kBe each color value of pixel, k is R or G or B, and i is pixel number numbering.The illumination estimation of photographic images is: L R = Σ i P gray ( C i ) * C i , R Σ i 1 , L G = Σ i P gray ( C i ) * C i , G Σ i 1 , L B = Σ i P gray ( C i ) * C i , B Σ i 1 .
The yield value of step 007, the R that obtains photographic images, G, B passage.
As, the yield value of R passage, R Gain=1/L R
As, the yield value G of G passage Gain=1/L G
As, the yield value B of B passage Gain=1/L B
By photographic images is adjusted according to the yield value of R, G, B passage, can obtain the image of accurate white balance.
Can know, obtain under the probability distribution graph prerequisite of reference picture, each Color Channel gain of photographic images is calculated very easy, fast, can satisfy the needs of real-time calculating.
Photographic images after step 008, output blank level adjustment.
One of ordinary skill in the art will appreciate that, the histogram of setting up in above-mentioned steps can adopt different color coordinates systems, as (R-G) ÷ G of RGB chrominance space, and (B-G) ÷ G coordinate, the person is at the Cb in Ycbcr space, and the Cr coordinate is not done and is given unnecessary details.
Embodiment six
The difference of the present embodiment and embodiment five is, the present embodiment obtains in the method for gradation of image point probability distribution graph, under the outdoor optical photograph or indoor illumination condition that can obtain respectively, the reference picture probability distribution graph of standard 24 colour tables, and can distinguish the reference picture probability distribution graph of standard 24 colour tables of illumination outside the locker room or indoor illumination.
When carrying out shooting operation, it is that outdoor optical shines or indoor illumination that the user can select the scene mode of current photography, and like this, the gray scale point probability distribution graph according to selected scene mode realizes the image Automatic white balance.
Embodiment seven
The difference of the present embodiment and embodiment five, embodiment six is, the present embodiment obtains in the method for gradation of image point probability distribution graph, can obtain respectively fine day daylight, cloudy daylight or shade, tungsten light, daylight light or fluorescent light, etc. under condition, the reference picture probability distribution graph of standard 24 colour tables, and the probability distribution graph that can store respectively each reference picture.
Like this, the scene mode refinement more of the current photography that can select of user, clear and definite.
When carrying out shooting operation, it is fine day daylight, cloudy daylight or shade that the user can select the scene mode of current photography, tungsten light, daylight light or fluorescent light, etc., like this, the gray scale point probability distribution graph according to selected scene mode realizes the image Automatic white balance.
In sum, the technical scheme that embodiments of the invention provide can be found out, due to the reference picture gray scale point probability distribution graph that has obtained Standard colour board, like this, in the image that shooting obtains, the gray scale point probable value of each pixel can obtain according to the gray scale point probability distribution graph of reference picture, make the judgement of gray scale point more accurate, improved the accuracy that white balance gains is calculated.
Understandable is that described various histogram and distribution plan, comprise the multiple form of expression that can be used for representing numeric distribution in the zone such as chart, drawing, ordered series of numbers in embodiments of the present invention.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the relevant hardware of instruction to complete by computer program, described program can be stored in a computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The above; only for the better embodiment of the present invention, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement are within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (15)

1. a method that obtains gradation of image point probability distribution, is characterized in that, comprising:
Shooting has the reference picture of colored color lump and gray scale color lump;
Each color value according to each pixel that in described reference picture, colored color lump is corresponding, in two dimensions of RGB chrominance space or set up colored some histograms in two dimensions of YCbCr chrominance space, and according to the color value of each pixel that in described reference picture, the gray scale color lump is corresponding, in two dimensions of RGB chrominance space or set up gray scale point histogram in two dimensions of YCbCr chrominance space;
With described colored some histogram and described gray scale point histogram, be equal to respectively and be divided into a plurality of intervals, according to the pixel number in the corresponding interval in described colored some histogram and described gray scale point histogram, obtaining interior each pixel of described reference picture is the probable value of gray scale point, comprising:
The number of interval pixel is a in described gray scale point histogram, and in described colored some histogram, the number of corresponding interval pixel is b, and the pixel in should the interval is that the probable value of gray scale point is p=a ÷ (a+b).
2. the method for acquisition gradation of image point probability distribution according to claim 1, is characterized in that, described colored some histogram and histogrammic two dimensions of described gray scale point comprise:
Described each pixel is at the R of RGB chrominance space ÷ G and B ÷ G, perhaps (R-G) ÷ G and (B-G) ÷ G;
Perhaps, described each pixel is at Cb and the Cr of YCbCr chrominance space.
3. the method for acquisition gradation of image point probability distribution according to claim 1 and 2, is characterized in that, the Standard colour board of described reference picture colored color lump and gray scale color lump for shooting has obtains.
4. the method for acquisition gradation of image point probability distribution according to claim 1, it is characterized in that, described shooting has the reference picture of colored color lump and gray scale color lump, comprise: under default illumination, shooting has the Standard colour board of colored color lump and gray scale color lump, obtains reference picture, and described default illumination comprises: outdoor optical shines or indoor illumination, described outdoor optical is according to comprising: fine day daylight, cloudy daylight or shade, described indoor illumination comprises: tungsten light, daylight light or fluorescent light.
5. a white balance method, is characterized in that, comprising:
According to each color value of each pixel in photographic images, determine the position of described each pixel correspondence in the gray scale point probability distribution graph of reference picture;
Position according to described each pixel correspondence in the gray scale point probability distribution graph of described reference picture obtains gray scale point probable value corresponding to described each pixel;
According to the gray scale point probable value of each pixel in described photographic images, obtain the illumination estimation of described photographic images;
According to the illumination estimation of described photographic images, the yield value that obtains each Color Channel of described photographic images is realized white balance to adjust described photographic images;
Described position according to described each pixel correspondence in the gray scale point probability distribution graph of described reference picture obtains gray scale point probable value corresponding to described each pixel, comprising:
Each color value according to each pixel that in described reference picture, colored color lump is corresponding, in two dimensions of RGB chrominance space or set up colored some histograms in two dimensions of YCbCr chrominance space, and according to the color value of each pixel that in described reference picture, the gray scale color lump is corresponding, in two dimensions of RGB chrominance space or set up gray scale point histogram in two dimensions of YCbCr chrominance space;
With described colored some histogram and described gray scale point histogram, be equal to respectively and be divided into a plurality of intervals, according to the pixel number in the corresponding interval in described colored some histogram and described gray scale point histogram, obtaining interior each pixel of described reference picture is the probable value of gray scale point, comprising:
The number of interval pixel is a in described gray scale point histogram, and in described colored some histogram, the number of corresponding interval pixel is b, and the pixel in should the interval is that the probable value of gray scale point is p=a ÷ (a+b).
6. white balance method according to claim 5, is characterized in that, according to the gray scale point probable value of each pixel in described photographic images, obtains the illumination estimation of described photographic images, comprising:
The gray scale point probable value of each pixel as weight, is calculated the weighted mean value of all each color values of pixel in the described photographic images, and the mean value that obtains described each Color Channel of photographic images is the illumination estimation of photographic images.
7. white balance method according to claim 5, is characterized in that, according to the illumination estimation of described photographic images, the yield value that obtains each Color Channel of described photographic images is realized white balance to adjust described photographic images, comprising:
Each Color Channel mean value of described photographic images is got inverse, obtain the yield value of each Color Channel;
Control described photographic images by the yield value adjustment of described each Color Channel and realize white balance.
8. arbitrary described white balance method according to claim 5-7, is characterized in that, the Color Channel of described image comprises R passage, G passage and the B passage of RGB chrominance space, perhaps, and the Cb passage of YCbCr chrominance space and Cr passage.
9. a white balancing apparatus, is characterized in that, comprising:
Gray scale point probable value acquiring unit is used for each color value according to each pixel of photographic images, and the gray scale point probability distribution graph of reference picture, obtains the gray scale point probable value of each pixel in described photographic images;
The illumination estimation unit is used for the gray scale point probable value according to described each pixel of photographic images, obtains the illumination estimation of described photographic images;
The yield value acquiring unit is used for the illumination estimation according to described photographic images, and the yield value that obtains each Color Channel of described photographic images is realized white balance to adjust image;
Gray scale point probable value acquiring unit comprises that image acquisition unit, histogram set up unit, histogram analysis unit and gray scale point probability calculation unit:
Image acquisition unit is used for taking the reference picture with colored color lump and gray scale color lump;
Histogram is set up the unit, is used for each color value of each pixel corresponding to color lump colored according to described reference picture, sets up colored some histogram, and according to the color value of each pixel that in described reference picture, the gray scale color lump is corresponding, sets up gray scale point histogram;
The histogram analysis unit is used for described colored some histogram and described gray scale point histogram, is equal to respectively to be divided into a plurality of intervals, with the number of pixel in the described interval value as the interval;
Gray scale point probability calculation unit is used for obtaining the gray scale point probability distribution graph of described reference picture according to described colored some histogram and the corresponding interval value of described gray scale point histogram;
Described gray scale point probability calculation unit, the number that is used for pixel interval in described gray scale point histogram is a, in described colored some histogram, the number of corresponding interval pixel is b, and the probable value that calculates pixel in this interval and be gray scale point is p=a ÷ (a+b).
10. white balancing apparatus according to claim 9, it is characterized in that, the illumination estimation unit, concrete be used for gray scale point probable value take each pixel of photographic images as weight, calculate the weighted mean value of all each color values of pixel, the mean value that obtains each Color Channel of photographic images is the illumination estimation of image.
11. white balancing apparatus according to claim 9 is characterized in that, the yield value acquiring unit comprises:
Yield value obtains subelement, is used for each Color Channel mean value of described photographic images is got inverse, obtains the yield value of each Color Channel;
Gain control system unit is used for controlling described photographic images by the yield value adjustment that yield value obtains described each Color Channel that subelement obtains and realizes white balance.
12. according to claim 9-11, arbitrary described white balancing apparatus, is characterized in that, the Color Channel of described image comprises R passage, G passage and the B passage of RGB chrominance space, perhaps, and the Cb passage of YCbCr chrominance space and Cr passage.
13. white balancing apparatus according to claim 9 is characterized in that, described histogram is set up colour point histogram and histogrammic two dimensions of described gray scale point set up the unit and is comprised:
Described each pixel is at the R of RGB chrominance space ÷ G and B ÷ G, perhaps (R-G) ÷ G and (B-G) ÷ G;
Perhaps, described each pixel is at Cb and the Cr of YCbCr chrominance space.
14. a device that obtains gradation of image point probability distribution is characterized in that, comprising:
Image acquisition unit is used for taking the reference picture with colored color lump and gray scale color lump;
Histogram is set up the unit, each color value that is used for each pixel corresponding to color lump colored according to described reference picture, in two dimensions of RGB chrominance space or set up colored some histograms in two dimensions of YCbCr chrominance space, and according to the color value of each pixel that in described reference picture, the gray scale color lump is corresponding, in two dimensions of RGB chrominance space or set up gray scale point histogram in two dimensions of YCbCr chrominance space;
The histogram analysis unit is used for described colored some histogram and described gray scale point histogram, is equal to respectively to be divided into a plurality of intervals, obtains the pixel number in the corresponding interval in described colored some histogram and described gray scale point histogram;
Gray scale point probability calculation unit is used for according to the pixel number in the corresponding interval of described colored some histogram and described gray scale point histogram, and obtaining interior each pixel of described reference picture is the probable value of gray scale point, comprising:
The number of interval pixel is a in described gray scale point histogram, and in described colored some histogram, the number of corresponding interval pixel is b, and the pixel in should the interval is that the probable value of gray scale point is p=a ÷ (a+b).
15. the device of acquisition gradation of image point probability distribution according to claim 14 is characterized in that, described histogram is set up colour point histogram and histogrammic two dimensions of described gray scale point set up the unit and is comprised:
Described each pixel is at the R of RGB chrominance space ÷ G and B ÷ G, perhaps (R-G) ÷ G and (B-G) ÷ G;
Perhaps, described each pixel is at Cb and the Cr of YCbCr chrominance space.
CN 200910088816 2009-07-20 2009-07-20 Method and device for obtaining probability distribution of image grey spots and white balance method and device Expired - Fee Related CN101957988B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910088816 CN101957988B (en) 2009-07-20 2009-07-20 Method and device for obtaining probability distribution of image grey spots and white balance method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910088816 CN101957988B (en) 2009-07-20 2009-07-20 Method and device for obtaining probability distribution of image grey spots and white balance method and device

Publications (2)

Publication Number Publication Date
CN101957988A CN101957988A (en) 2011-01-26
CN101957988B true CN101957988B (en) 2013-11-06

Family

ID=43485305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910088816 Expired - Fee Related CN101957988B (en) 2009-07-20 2009-07-20 Method and device for obtaining probability distribution of image grey spots and white balance method and device

Country Status (1)

Country Link
CN (1) CN101957988B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102209246B (en) * 2011-05-23 2013-01-09 北京工业大学 Real-time video white balance processing system
US9036047B2 (en) * 2013-03-12 2015-05-19 Intel Corporation Apparatus and techniques for image processing
CN103974053B (en) * 2014-05-12 2016-04-13 华中科技大学 A kind of Automatic white balance antidote extracted based on ash point
CN108718405B (en) * 2014-09-17 2019-11-26 深圳市大疆创新科技有限公司 Auto white balance system and method
CN104683780B (en) * 2015-03-24 2017-01-04 广东本致科技有限公司 The auto white balance method of a kind of video monitoring camera and device
CN105828058B (en) * 2015-05-29 2019-02-15 维沃移动通信有限公司 A kind of method of adjustment and device of white balance
WO2021051382A1 (en) * 2019-09-20 2021-03-25 深圳市大疆创新科技有限公司 White balance processing method and device, and mobile platform and camera
CN110694942B (en) * 2019-10-21 2021-05-14 武汉纺织大学 Color difference sorting method for solar cells
CN115131349B (en) * 2022-08-30 2022-11-18 新泰市中医医院 White balance adjusting method and system based on endocrine test paper color histogram

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1193399A (en) * 1996-06-20 1998-09-16 三星电子株式会社 A histogram equalization apparatus for contrast enhancement of moving image and method therefor
CN1741068A (en) * 2005-09-22 2006-03-01 上海广电(集团)有限公司中央研究院 Histogram equalizing method based on boundary
US20080101690A1 (en) * 2006-10-26 2008-05-01 De Dzwo Hsu Automatic White Balance Statistics Collection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1193399A (en) * 1996-06-20 1998-09-16 三星电子株式会社 A histogram equalization apparatus for contrast enhancement of moving image and method therefor
CN1741068A (en) * 2005-09-22 2006-03-01 上海广电(集团)有限公司中央研究院 Histogram equalizing method based on boundary
US20080101690A1 (en) * 2006-10-26 2008-05-01 De Dzwo Hsu Automatic White Balance Statistics Collection

Also Published As

Publication number Publication date
CN101957988A (en) 2011-01-26

Similar Documents

Publication Publication Date Title
CN101957988B (en) Method and device for obtaining probability distribution of image grey spots and white balance method and device
CN101621705B (en) Method and apparatus for automatic white balance
US7542077B2 (en) White balance adjustment device and color identification device
EP3542347B1 (en) Fast fourier color constancy
TWI389559B (en) Foreground image separation method
CN101527860B (en) White balance control apparatus, control method therefor, and image sensing apparatus
CN101365070B (en) Imaging apparatus
US6594384B1 (en) Apparatus and method for estimating and converting illuminant chromaticity using perceived illumination and highlight
US8013907B2 (en) System and method for adaptive local white balance adjustment
CN109068025B (en) Lens shadow correction method and system and electronic equipment
CN112752023B (en) Image adjusting method and device, electronic equipment and storage medium
CN104052979B (en) For device and the technology of image processing
CN105306916A (en) Image pickup apparatus that performs white balance control and method of controlling the same
CN110248112A (en) A kind of exposal control method of imaging sensor
US8111301B2 (en) Method of performing auto white balance in YCbCr color space
JP2006324840A (en) Image processing apparatus and white balance adjusting device
CN101770646A (en) Edge detection method based on Bayer RGB images
CN102426828B (en) Screen edge color adjusting method and device
CN101444083B (en) Method of processing a relative illumination phenomenon on a digital image and associated processing system
US8482630B2 (en) Apparatus and method for adjusting automatic white balance by detecting effective area
CN100481962C (en) White balance method
JP2008011289A (en) Digital camera
CN107231549A (en) AWB detecting system
CN110486761B (en) Smoke control method of range hood and range hood
CN112788322A (en) Adaptive white balance processing method, device, medium, and electronic apparatus

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20131106

Termination date: 20200720

CF01 Termination of patent right due to non-payment of annual fee