CN101957988A - 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 PDFInfo
- Publication number
- CN101957988A CN101957988A CN2009100888163A CN200910088816A CN101957988A CN 101957988 A CN101957988 A CN 101957988A CN 2009100888163 A CN2009100888163 A CN 2009100888163A CN 200910088816 A CN200910088816 A CN 200910088816A CN 101957988 A CN101957988 A CN 101957988A
- Authority
- CN
- China
- Prior art keywords
- gray scale
- pixel
- histogram
- photographic images
- scale point
- 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
Images
Landscapes
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
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
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 is by measuring the picture that these reflected light obtain object.
As seen, the object image-forming of photography is relevant with object itself with light conditions.As, when the light source of a yellow was invested light on the white wall, because the object of white can reflect all incident lights, then reflection ray also can present yellow for image sensor.Like this, the object image-forming of photography is just viewed inconsistent with our human eye, and just white balance is inaccurate, and the image that the adjusting that need 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 the image by setting fixing threshold value.Should be known in that the gray scale point is meant the pixel that each Color Channel numerical value equates under the correct situation of white balance, 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 there are the following problems at least in the prior art:
Because white balance inaccurate causes the gray scale point to certain color deviation, but the degree that departs from can't be fixed in certain scope by the light conditions decision, so, determine the poor accuracy of gray scale point, white balance weak effect with fixing threshold value.
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 is effective.
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;
According to colored color lump correspondence in the described reference picture each color value of each pixel, set up colored some histogram, and, set up gray scale point histogram according to the color value of each pixel of gray scale color lump correspondence in the described reference picture;
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 the described gray scale point histogram, obtain the gray scale point probability distribution graph of each pixel in the described reference picture.
A kind of device that obtains gradation of image point probability distribution comprises:
Image acquisition unit is used to take the reference picture with colored color lump and gray scale color lump;
Histogram is set up the unit, is used for each color value according to each pixel of the colored color lump correspondence of described reference picture, sets up colored some histogram, and according to the color value of each pixel of gray scale color lump correspondence in the described reference picture, 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 the 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 the photographic images, and the gray scale point probability distribution graph of reference picture, obtain the gray scale point probable value of each pixel in the described photographic images;
According to the gray scale point probable value of each pixel in the 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 the 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.
The technical scheme that is provided by the embodiment of the invention described above as can be seen, 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 image of being taken, and based on gray scale point probability distribution, according to the gray scale point probable value that the gray scale point probability distribution graph of reference picture confirms to take each pixel in the image that obtains, carry out the method for white balance.By gray scale point probability distribution, 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 invention, the accompanying drawing of required use is done to introduce simply in will describing embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 obtains the method flow synoptic diagram of gradation of image point probability distribution for the embodiment of the invention;
The method that Fig. 2 obtains gradation of image point probability distribution for the embodiment of the invention color dot histogram synoptic diagram of prizing;
Fig. 3 is grey color dot histogram synoptic diagram in the method for embodiment of the invention acquisition gradation of image point probability distribution;
The method that Fig. 4 obtains gradation of image point probability distribution for the embodiment of the invention interval division synoptic diagram in color dot histogram, the grey color dot histogram of prizing;
Fig. 5 is gray scale point probability distribution graph synoptic diagram in the method for embodiment of the invention acquisition gradation of image point probability distribution;
Fig. 6 constitutes synoptic diagram for the device that the embodiment of the invention obtains gradation of image point probability distribution;
Fig. 7 is an embodiment of the invention white balance method schematic flow sheet one;
Fig. 8 is an embodiment of the invention white balance method schematic flow sheet two;
Fig. 9 constitutes synoptic diagram one for embodiment of the invention white balancing apparatus;
Figure 10 constitutes synoptic diagram two for embodiment of the invention white balancing apparatus;
Figure 11 is an embodiment of the invention white balance method application scenarios schematic flow sheet.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Based on the white balance method of prior art, use fixing threshold value to determine the poor accuracy of gray scale point, white balance weak effect.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 the yield value of suitable Color Channel again according to the illumination estimation situation, adjust the current shooting image, realize that white balance is correct.
Be appreciated that the gray scale point is meant the pixel that each Color Channel value equates under the correct situation of white balance.
Illumination can comprise that outdoor illumination or room light shine, outdoor illumination comprises: fine daylight, cloudy daylight or shade (as, it is exactly the shade situation that shade is taken the image that obtains down), or the like, room light is according to comprising: tungsten light, daylight light or fluorescent light, or the like.
White balance method that embodiments of the invention provide and device, the adjusting of white balance can be finished process by automated procedure, 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:
Can know that each color value of each pixel can be R, G, the B of RGB chrominance space in the image, the perhaps Cb of Ycbcr chrominance space, Cr, or the like.The color value of the pixel of normal conditions hypograph is known, and the Color Channel value of image also is known.
Particularly, in the step 11, optionally, 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.
Shown in Fig. 2,3, in the step 12, optionally, colored some histogram and gray scale are put histogrammic two dimensions 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 the Cb and the Cr of YCbCr chrominance space.
As shown in Figure 4, step 13 just can be according to the same criteria for classifying, colour is put histogram and gray scale point histogram is divided into a plurality of intervals respectively, each interval corresponding number that falls into this interval pixel, the number of this pixel is exactly interval value.
Number as pixel interval in the gray scale point histogram is a, value that promptly should the interval is a, the number of the pixel in corresponding interval is b in the colored some histogram, value that promptly should the interval is b, pixel in then should the interval is that the probable value of gray scale point is p=a ÷ (a+b), just is meant that this interval pairing color combination (as RGB) may be the probability of gray scale point.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 the reference picture.
When (a+b)=0, p=0 then.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 Standard colour board with colored color lump and grey color lump, obtain reference picture.
Default illumination can comprise that outdoor illumination or room light shine.Outdoor illumination comprises: fine daylight, cloudy daylight or shade (as, it is exactly the shade situation that shade is taken the image that obtains down), or the like, room light is according to comprising: tungsten light, daylight light or fluorescent light, or the like.
Like this, illumination or room light are according to the probability distribution graph of the reference picture that obtains outside the locker room respectively, and when carrying out shooting operation, the user can select the scene mode of current photography for default illumination, shines or outdoor illumination as room light.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 fine daylight, cloudy daylight or shade respectively, tungsten light, daylight light or fluorescent light, or the like 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.
The technical scheme that is provided by the embodiment of the invention described above by obtaining the gray scale point probability distribution graph of reference picture, makes the judgement of gray scale point more accurate as can be seen.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 illumination estimation and white balance in view of the above, 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 according to each pixel of the colored color lump correspondence of reference picture, sets up colored some histogram, and according to the color value of each pixel of gray scale color lump correspondence in the reference picture, 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 the gray scale point histogram.
Gray scale point probability calculation unit 64 is used for the pixel number according to colour point histogram and the corresponding interval of gray scale point histogram, 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 the colour point histogram set up unit 62 and gray scale and is put histogrammic two dimensions and 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 the Cb and the Cr of YCbCr chrominance space.
Gray scale point probability calculation unit 64, being used for value interval in the gray scale point histogram is a, and corresponding interval value is b in the colored some histogram, 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 then.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 illumination or room light photograph, outdoor illumination comprises: fine daylight, cloudy daylight or shade, room light is according to comprising: 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 among 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 given histogram analysis unit 63.
The technical scheme that is provided by the embodiment of the invention described above by obtaining the gray scale point probability distribution graph of reference picture, makes the judgement of gray scale point more accurate as can be seen.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 illumination estimation and white balance in view of the above, 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 the foregoing description, embodiments of the invention provide a kind of white balance method, comprising:
In the 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 illumination or room light photograph as illumination, does not do and gives unnecessary details.
As shown in Figure 8, optionally,, from the gray scale point probability distribution graph of reference picture, obtain the step 71 of the gray scale point probable value of each pixel in the photographic images, can comprise according to each color value of each pixel in the photographic images:
Particularly, if at the RGB chrominance space,
Step 711 can for: according to R, G, the B color value of each pixel in the photographic images at the RGB chrominance space, obtain the R ÷ G and the B ÷ G of each pixel, perhaps, obtain (R-G) ÷ G of each pixel and (B-G) ÷ G, promptly obtained the position of each pixel horizontal longitudinal axis 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 the gray scale point probable value of this position correspondence.
Perhaps, if at the YCbCr chrominance space,
Step 711 can for: according to Cb, the Cr color value of each pixel in the photographic images at the YCbCr chrominance space, obtained the position of each pixel horizontal longitudinal axis 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 the gray scale point probable value of this position correspondence.
Optionally,, obtain the step 72 of the illumination estimation of photographic images, can comprise according to the gray scale point probable value of each pixel in the photographic images:
Gray scale point probable value with each pixel in the photographic images is a weight, calculates the weighted mean value of all each color values of pixel, and the mean value that obtains each Color Channel of photographic images is the illumination estimation of photographic images.
Particularly, in the step 72, the illumination estimation computing formula of photographic images is
Pgray (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,
At the RGB chrominance space, can pass through formula
Obtain photographic images R, G, B passage mean value L
R, L
G, L
B, promptly obtain the illumination estimation result of photographic images.
Perhaps,, can convert YCbCr to RGB, pass through formula at the YCbCr chrominance space
Obtain photographic images R, G, B passage mean value L
R, L
G, L
B, promptly 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.
Particularly, in the 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 white balance adjustment of image.
The white balance method that is provided by the embodiment of the invention described above as can be seen, because 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 the 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 the foregoing description, 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 the photographic images from the gray scale point probability distribution graph of reference picture.
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 embodiment two described devices.
And in the 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 illumination or room light photograph as illumination, does not do and gives unnecessary details.
Optionally, as shown in figure 10, in the white balancing apparatus of the embodiment of the 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 the gray scale point probable value of each pixel correspondence according to the position of each pixel in the gray scale point probability distribution graph correspondence of reference picture.
Further, illumination estimation unit 92, the gray scale point probable value that specifically is used for each pixel of photographic images is a weight, calculates the weighted mean value of all each color values of pixel, and the mean value that obtains each Color Channel of 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.
The white balancing apparatus of the embodiment of the invention can also comprise:
Gray scale point probability distribution graph storage unit 94 is used for the gray scale point probability distribution graph of stored reference image.
The white balancing apparatus of the embodiment of the invention can also comprise:
Can know, if the device of the acquisition gradation of image point probability distribution of the white balancing apparatus of the embodiment of the invention and embodiment two is used jointly, then the image acquisition unit 96 of the white balancing apparatus of the embodiment of the 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:
First obtains subelement 911 according to each color value of each pixel in the photographic images, and the gray scale point probability distribution graph of the reference picture in the 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, according to the position of each pixel correspondence in the gray scale point probability distribution graph of reference picture, obtains the gray scale point probable value of each pixel correspondence, and sends gray scale point probable value to Color Channel value acquiring unit 92;
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 subelement 932;
Photographic images can carry out subsequent step after realizing white balance, does not do at this and gives unnecessary details.
The white balancing apparatus that is provided by the embodiment of the invention described above as can be seen, because 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 the 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 calculating of image is very easy, fast, can satisfy the needs of real-time calculating.
Embodiment five
Referring to Fig. 1-5, Fig. 7, shown in Figure 8, be that R, G, the B channel value of RGB chrominance space is example with the illumination estimation, the white balance method that embodiments of the invention provide is described.
As shown in figure 11, at first, the method that obtains reference picture gray scale point probability distribution graph is described:
It will be appreciated that, under the situation of considering 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.
Gray scale color lump and colored piece for the reference picture of standard 24 colour tables are carried out following operation respectively: to each pixel in the color lump, calculate R ÷ G, two values of B ÷ G, and, with R ÷ G is first dimension, B ÷ G is second dimension, calculates the two-dimensional histogram to middle pixel in all this color lumps, shown in Fig. 2,3.
Shown in Fig. 2,3, the span of each coordinate axis is [0-2.5] in the histogram, and each interval is Delta=0.005, and then histogram has 501 * 501 intervals (each coordinate axis maximal value of histogram is 500).
Represent all to drop into (2*delta)<R ÷ G<(3*delta) referring to the value in the A interval in Fig. 4 histogram, the number of the pixel of delta<B ÷ G<(2*delta).
Can also carry out normalization to each histogram, make in the histogram to be had a few and be 1, reduce calculated amount, promptly certain 1 x is calculated
The value of getting this position of gray scale point histogram is a, and the value of this position of colored some histogram is b, and then 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 promptly 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, reference gray level is put probability distribution graph stores, wait until and carry out white balance when adjusting, call reference gray level point probability distribution graph.
Then, make the method for balance clear:
Input picture is the image that pending white balance is adjusted, and input picture can be a width of cloth photographic images, below is example with the photographic images.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.
The illumination estimation computing formula of photographic images is
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:
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, then can obtain the image of accurate white balance.
Can know that obtaining under the probability distribution graph prerequisite of reference picture, each Color Channel gain calculating of photographic images is very easy, fast, can satisfy the needs of real-time calculating.
One of ordinary skill in the art will appreciate that the histogram of setting up in the above-mentioned steps can adopt different color coordinates systems, as (R-G) ÷ G of RGB chrominance space, (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 present embodiment and embodiment five is, present embodiment obtains in the method for gradation of image point probability distribution graph, under the outdoor illumination 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 room light photograph.
When carrying out shooting operation, it is outdoor illumination or room light photograph 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 present embodiment and embodiment five, embodiment six is, present embodiment obtains in the method for gradation of image point probability distribution graph, can obtain fine daylight, cloudy daylight or shade respectively, tungsten light, daylight light or fluorescent light, or the like under the condition, the reference picture probability distribution graph of standard 24 colour tables, and the probability distribution graph that can store each reference picture respectively.
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 daylight, cloudy daylight or shade that the user can select the scene mode of current photography, tungsten light, daylight light or fluorescent light, or the like, 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 as can be seen, owing to obtained the reference picture gray scale point probability distribution graph of Standard colour board, like this, the gray scale point probable value of each pixel can obtain according to the gray scale point probability distribution graph of reference picture in the image that shooting obtains, make the judgement of gray scale point more accurate, improved the accuracy that white balance gains is calculated.
Understandable is that described in embodiments of the present invention various histograms 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.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the 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 storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and 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 all should be encompassed within 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 (21)
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;
According to each color value of each pixel of colored color lump correspondence in the described reference picture, set up colored some histogram, and, set up gray scale point histogram according to the color value of each pixel of gray scale color lump correspondence in the described reference picture;
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 the described gray scale point histogram, obtain the gray scale point probability distribution graph of each pixel in the described reference picture.
2. the method for acquisition gradation of image point probability distribution according to claim 1 is characterized in that, described colored some histogram and described gray scale are put histogrammic two dimensions and 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 the 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, it is characterized in that, according to the pixel number in the corresponding interval in described colored some histogram and the described gray scale point histogram, obtain the gray scale point probability distribution graph of described reference picture, comprising:
The number of interval pixel is a in the described gray scale point histogram, and the number of corresponding interval pixel is b in the described colored some histogram, and the pixel in then should the interval is that the probable value of gray scale point is p=a ÷ (a+b).
4. 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.
5. the method for acquisition gradation of image point probability distribution according to claim 4, 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 that colored look is determined and the Standard colour board of gray scale color lump, obtains reference picture, and described default illumination comprises: outdoor illumination or room light photograph, described outdoor illumination comprises: fine daylight, cloudy daylight or shade, described room light is according to comprising: tungsten light, daylight light or fluorescent light.
6. a white balance method is characterized in that, comprising:
According to each color value of each pixel in the photographic images, and the gray scale point probability distribution graph of reference picture, obtain the gray scale point probable value of each pixel in the described photographic images;
According to the gray scale point probable value of each pixel in the 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.
7. white balance method according to claim 6 is characterized in that, according to each color value of each pixel in the photographic images, and the gray scale point probability distribution graph of reference picture, obtains the gray scale point probable value of each pixel in the described photographic images, comprising:
According to each color value of each pixel in the photographic images, determine the position of described each pixel correspondence in the gray scale point probability distribution graph of described reference picture;
According to the position of described each pixel correspondence in the gray scale point probability distribution graph of described reference picture, obtain the gray scale point probable value of described each pixel correspondence.
8. white balance method according to claim 6 is characterized in that, according to the gray scale point probable value of each pixel in the described photographic images, obtains the illumination estimation of described photographic images, comprising:
Gray scale point probable value with each pixel in the described photographic images is a weight, calculates the weighted mean value of all each color values of pixel, and the mean value that obtains described each Color Channel of photographic images is the illumination estimation of photographic images.
9. white balance method according to claim 6 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.
10. according to arbitrary described white balance method among the claim 6-9, it is characterized in that the Color Channel of described image comprises R passage, G passage and the B passage of RGB chrominance space, perhaps, the Cb passage of YCbCr chrominance space and Cr passage.
11. 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 the 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.
12. white balancing apparatus according to claim 11 is characterized in that, gray scale point probable value acquiring unit comprises:
First obtains subelement, is used for according to each color value of each pixel of photographic images, determines the position of described each pixel correspondence in the gray scale point probability distribution graph of described reference picture;
Second obtains subelement, is used for obtaining the gray scale point probable value of described each pixel correspondence according to the position of described each pixel in the gray scale point probability distribution graph correspondence of described reference picture.
13. white balancing apparatus according to claim 11, it is characterized in that, the illumination estimation unit, the gray scale point probable value that specifically is used for each pixel of photographic images is a 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.
14. white balancing apparatus according to claim 11 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;
The gain control subelement 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.
15., it is characterized in that the Color Channel of described image comprises R passage, G passage and the B passage of RGB chrominance space according to arbitrary described white balancing apparatus among the claim 11-14, perhaps, the Cb passage of YCbCr chrominance space and Cr passage.
16. the device of acquisition gradation of image point probability distribution according to claim 11 is characterized in that, described gray scale point probable value acquiring unit comprises image acquisition unit, is used to take the reference picture with colored color lump and gray scale color lump; Histogram is set up the unit, is used for each color value according to each pixel of the colored color lump correspondence of described reference picture, sets up colored some histogram, and according to the color value of each pixel of gray scale color lump correspondence in the described reference picture, 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 the described interval interior pixel point 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.
17. the device of acquisition gradation of image point probability distribution according to claim 16 is characterized in that, described histogram is set up the colour point histogram set up the unit and described gray scale and is put histogrammic two dimensions and 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 the Cb and the Cr of YCbCr chrominance space.
18. the device of acquisition gradation of image point probability distribution according to claim 16, it is characterized in that, described gray scale point probability calculation unit, the number that is used for pixel interval in the described gray scale point histogram is a, the number of corresponding interval pixel is b in the described colored some histogram, and the probable value that calculates pixel in this interval and be gray scale point is p=a ÷ (a+b).
19. a device that obtains gradation of image point probability distribution is characterized in that, comprising:
Image acquisition unit is used to take the reference picture with colored color lump and gray scale color lump;
Histogram is set up the unit, is used for each color value according to each pixel of the colored color lump correspondence of described reference picture, sets up colored some histogram, and according to the color value of each pixel of gray scale color lump correspondence in the described reference picture, 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 the 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.
20. the device of acquisition gradation of image point probability distribution according to claim 19 is characterized in that, described histogram is set up the colour point histogram set up the unit and described gray scale and is put histogrammic two dimensions and 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 the Cb and the Cr of YCbCr chrominance space.
21. the device of acquisition gradation of image point probability distribution according to claim 19, it is characterized in that, described gray scale point probability calculation unit, the number that is used for pixel interval in the described gray scale point histogram is a, the number of corresponding interval pixel is b in the described colored some histogram, and the probable value that calculates pixel in this interval and be gray scale point is p=a ÷ (a+b).
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 true CN101957988A (en) | 2011-01-26 |
CN101957988B 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) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102209246A (en) * | 2011-05-23 | 2011-10-05 | 北京工业大学 | Real-time video white balance processing system |
CN103686112A (en) * | 2012-09-19 | 2014-03-26 | 鸿富锦精密工业(深圳)有限公司 | Image white balance method and camera device |
CN103974053A (en) * | 2014-05-12 | 2014-08-06 | 华中科技大学 | Automatic white balance correction method based on grey dot extraction |
CN104052979A (en) * | 2013-03-12 | 2014-09-17 | 英特尔公司 | Apparatus and techniques for image processing |
CN104683780A (en) * | 2015-03-24 | 2015-06-03 | 广东本致科技有限公司 | Automatic white balance method and device of video surveillance camera |
CN105828058A (en) * | 2015-05-29 | 2016-08-03 | 维沃移动通信有限公司 | Adjustment method and device of white balance |
CN103686112B (en) * | 2012-09-19 | 2016-11-30 | 鸿富锦精密工业(深圳)有限公司 | Image white balance method and camera head |
CN108718405A (en) * | 2014-09-17 | 2018-10-30 | 深圳市大疆创新科技有限公司 | Auto white balance system and method |
CN110694942A (en) * | 2019-10-21 | 2020-01-17 | 武汉纺织大学 | Color difference sorting method for solar cells |
CN112204957A (en) * | 2019-09-20 | 2021-01-08 | 深圳市大疆创新科技有限公司 | White balance processing method and device, movable platform and camera |
CN115131349A (en) * | 2022-08-30 | 2022-09-30 | 新泰市中医医院 | White balance adjusting method and system based on endocrine test paper color histogram |
Citations (3)
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 |
-
2009
- 2009-07-20 CN CN 200910088816 patent/CN101957988B/en not_active Expired - Fee Related
Patent Citations (3)
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 |
Cited By (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102209246A (en) * | 2011-05-23 | 2011-10-05 | 北京工业大学 | Real-time video white balance processing system |
CN102209246B (en) * | 2011-05-23 | 2013-01-09 | 北京工业大学 | Real-time video white balance processing system |
CN103686112A (en) * | 2012-09-19 | 2014-03-26 | 鸿富锦精密工业(深圳)有限公司 | Image white balance method and camera device |
CN103686112B (en) * | 2012-09-19 | 2016-11-30 | 鸿富锦精密工业(深圳)有限公司 | Image white balance method and camera head |
CN104052979A (en) * | 2013-03-12 | 2014-09-17 | 英特尔公司 | 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 |
CN103974053A (en) * | 2014-05-12 | 2014-08-06 | 华中科技大学 | Automatic white balance correction method based on grey dot extraction |
CN108718405B (en) * | 2014-09-17 | 2019-11-26 | 深圳市大疆创新科技有限公司 | Auto white balance system and method |
CN108718405A (en) * | 2014-09-17 | 2018-10-30 | 深圳市大疆创新科技有限公司 | Auto white balance system and method |
CN104683780A (en) * | 2015-03-24 | 2015-06-03 | 广东本致科技有限公司 | Automatic white balance method and device of video surveillance camera |
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 |
CN105828058A (en) * | 2015-05-29 | 2016-08-03 | 维沃移动通信有限公司 | Adjustment method and device of white balance |
CN112204957A (en) * | 2019-09-20 | 2021-01-08 | 深圳市大疆创新科技有限公司 | White balance processing method and device, movable platform and camera |
WO2021051382A1 (en) * | 2019-09-20 | 2021-03-25 | 深圳市大疆创新科技有限公司 | White balance processing method and device, and mobile platform and camera |
CN110694942A (en) * | 2019-10-21 | 2020-01-17 | 武汉纺织大学 | Color difference sorting method for solar cells |
CN115131349A (en) * | 2022-08-30 | 2022-09-30 | 新泰市中医医院 | White balance adjusting method and system based on endocrine test paper color histogram |
CN115131349B (en) * | 2022-08-30 | 2022-11-18 | 新泰市中医医院 | White balance adjusting method and system based on endocrine test paper color histogram |
Also Published As
Publication number | Publication date |
---|---|
CN101957988B (en) | 2013-11-06 |
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 | |
US7872672B2 (en) | Method and apparatus for automatic white balance | |
US7542077B2 (en) | White balance adjustment device and color identification device | |
US6594384B1 (en) | Apparatus and method for estimating and converting illuminant chromaticity using perceived illumination and highlight | |
TWI389559B (en) | Foreground image separation method | |
CN101882034B (en) | Device and method for discriminating color of touch pen of touch device | |
KR100983037B1 (en) | Method for controlling auto white balance | |
US8013907B2 (en) | System and method for adaptive local white balance adjustment | |
CN108551576B (en) | White balance method and device | |
CN105306916A (en) | Image pickup apparatus that performs white balance control and method of controlling the same | |
JP2006324840A (en) | Image processing apparatus and white balance adjusting device | |
CN101770646A (en) | Edge detection method based on Bayer RGB images | |
CN109495731B (en) | Method for automatic white balance executed by image signal processor | |
US9307213B2 (en) | Robust selection and weighting for gray patch automatic white balancing | |
GB2430829A (en) | Identifying a scene illuminant by comparison of chromaticity values with stored possible illuminants | |
CN114866754A (en) | Automatic white balance method and device, computer readable storage medium and electronic equipment | |
JP2008011289A (en) | Digital camera | |
CN110486761B (en) | Smoke control method of range hood and range hood | |
CN107231549A (en) | AWB detecting system | |
EP1615451B1 (en) | Digital video camera with automatic white balance and a method thereof | |
JPH11308634A (en) | White balance controller | |
CN104780322B (en) | Photographic device, image capture method, image processing apparatus | |
JP4218936B2 (en) | White balance adjusting device and white balance adjusting method | |
JP2000102030A (en) | White balance controller | |
CN114866755B (en) | Automatic white balance method and device, computer storage medium and electronic equipment |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20131106 Termination date: 20200720 |