CN100571407C - Method for controlling white balance - Google Patents

Method for controlling white balance Download PDF

Info

Publication number
CN100571407C
CN100571407C CNB2005101305489A CN200510130548A CN100571407C CN 100571407 C CN100571407 C CN 100571407C CN B2005101305489 A CNB2005101305489 A CN B2005101305489A CN 200510130548 A CN200510130548 A CN 200510130548A CN 100571407 C CN100571407 C CN 100571407C
Authority
CN
China
Prior art keywords
white balance
status
group
acquisition value
bias voltage
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
CNB2005101305489A
Other languages
Chinese (zh)
Other versions
CN1984348A (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.)
Lianyang Semiconductor Co., Ltd.
Original Assignee
LIANYANG SEMICONDUCTOR 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 LIANYANG SEMICONDUCTOR CO Ltd filed Critical LIANYANG SEMICONDUCTOR CO Ltd
Priority to CNB2005101305489A priority Critical patent/CN100571407C/en
Publication of CN1984348A publication Critical patent/CN1984348A/en
Application granted granted Critical
Publication of CN100571407C publication Critical patent/CN100571407C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Of Color Television Signals (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

The invention discloses a kind of method for controlling white balance, the method is at first set an initial white balance and is set.Secondly, obtain an image, obtain both average RGB values of total image and white pixel according to this white balance setting.Use both average RGB values of total image and white pixel to calculate white balance information respectively.Secondly, use the white balance information of total image and both RGBs of white pixel to decide the light and shade situation of current white balance state around whether realistic.Need select a new white balance state if the result who is determined shows, then set a new white balance and set.At last, program is back to the step that obtains a new image and carries out step thereafter.The present invention can be applicable on image processor or the method.

Description

Method for controlling white balance
Technical field
The present invention relates to a kind of automatic white balance adjustment method, particularly a kind of light source according to different-colour is adjusted the automatic white balance adjustment method of white balance.The present invention can be applicable on image processor or the method.
Background technology
(human visual system HVS) for the adaptation of prismy color change, is that the mankind have a specific character to the human visual system, and this specific character is perception one white surface and it is used as pure white under the light source condition of different-colour.In order to imitate human visual system's adaptation, when all digitized video sense control assemblies will be obtained digitized video, must have method for controlling white balance and realize human digitized video at the similar image that really perceives at that moment.
Fig. 1 is the flow chart of steps of the method for controlling white balance of a traditional use total image, at first, sets an initial white balance and sets, shown in step S10.Secondly, shown in step S12, obtain an image according to this white balance setting.Shown in step S14, obtain the average RGB value of total image.Shown in step S16, use the average RGB value of total image to calculate white balance information.
Shown in step S18, use white balance information to decide the light and shade situation of current white balance state around whether realistic.Shown in step S20, set if need not change current white balance, then program is back to step S12 and obtains a new image, otherwise execution in step S22 then.Shown in step S22, if showing, the result who is determined need select a new white balance state, then set a new white balance and set.At last, program is back to the step that obtains a new image and carries out step thereafter.
Fig. 2 is the flow chart of steps of the method for controlling white balance of another traditional use white pixel, at first, sets an initial white balance and sets, shown in step S40.Secondly, shown in step S42, obtain an image according to this white balance setting.Shown in step S44, find out the white pixel in the image.Shown in step S46, obtain the average RGB value of white pixel.Shown in step S48, use the average RGB value of white pixel to calculate white balance information.
Shown in step S50, use white balance information to decide the light and shade situation of current white balance state around whether realistic.Shown in step S52, set if need not change current white balance, then program is back to step S42 and obtains a new image, otherwise execution in step S54 then.Shown in step S54, if showing, the result who is determined need select a new white balance state, then set a new white balance and set.At last, program is back to the step that obtains a new image and carries out step thereafter.
Though above-mentioned two method for controlling white balance of commonly using are widely used, they distinctly have some shortcomings.In first method, when obtained scenery, when for example being the scenery in the setting sun, forest or blue sky, in these scenery, has the color of some master controls, and when the white balance information of using the total image RGB decides current white balance state, can cause incorrect white balance to judge.The result can make image be corrected and have identical average RGB value and seem nature.In the second approach, when the white pixel number that is found does not surpass the certain ratio of overall number of pixels, and when the white balance information of using the white pixel RGB decides current white balance state, be difficult to obtain correct result.
Summary of the invention
The objective of the invention is provides a kind of method for controlling white balance for addressing the above problem, its integrate traditional control method in two and add the program that strengthens and form a kind of more perfect and more can accurately react around the method for controlling white balance of light and shade situation.
Method for controlling white balance provided by the invention is at first set an initial white balance and is set.Secondly, obtain an image, obtain both average RGB values of total image and white pixel according to this white balance setting.Use both average RGB values of total image and white pixel to calculate white balance information respectively.Again secondly, use the white balance information of total image and both RGBs of white pixel to decide the light and shade situation of current white balance state around whether realistic.Need select a new white balance state if the result who is determined shows, then set a new white balance and set.At last, program is back to step and the execution step thereafter that obtains a new image.
The present invention is described in detail below in conjunction with accompanying drawing.
Description of drawings
Fig. 1 is the flow chart of step of the method for controlling white balance of a traditional use total image;
Fig. 2 is the flow chart of step of the method for controlling white balance of another traditional use white pixel;
Fig. 3 is the flow chart of the step of method for controlling white balance of the present invention;
Fig. 4 A and Fig. 4 B are the flow charts of step of a preferred embodiment of method for controlling white balance of the present invention;
Fig. 5 system illustrates the skeleton diagram of the white balance state of a control of difference;
Fig. 6 A and Fig. 6 B are the flow charts of a preferred version of the thin portion of determination procedure content.
Embodiment
The present invention is a kind of method for controlling white balance, control method shown in its integration map 1 and Fig. 2 and the program that add to strengthen and form a kind of more perfect and more can accurately react around the novel method for controlling white balance of light and shade situation.
Fig. 3 is the flow chart of the step of method for controlling white balance of the present invention, at first, sets an initial white balance and sets, shown in step S110.
Secondly, shown in step S112, obtain an image according to this white balance setting.Shown in step S114, S144 and S146, obtain both average RGB values of total image and white pixel.Shown in step S116 and S148, use both average RGB values of total image and white pixel to calculate white balance information respectively.
Again secondly, shown in step S118, use the white balance information of total image and both RGBs of white pixel to decide the light and shade situation of current white balance state around whether realistic.Shown in step S120, set if need not change current white balance, then program is back to step S112, otherwise execution in step S122 then.Shown in step S122, if showing, the result who is determined need select a new white balance state, then set a new white balance and set.
At last, program is back to step and the execution step thereafter that obtains a new image.
Fig. 4 is the flow chart of step of a preferred embodiment of method for controlling white balance of the present invention, and its whole control program is divided into four key steps.
Shown in step Step I, the method for controlling white balance of this preferred embodiment is to set initial state for.In regular turn shown in step S200, S202, S204 and S206, these initial states comprise selects several white balance state of a controls n, select several white balance situation bias voltages for white balance state of a control Status 1 to Status n, select an initial white balance state of a control Status S, and load one group of white balance situation bias voltage for white balance state of a control Status S.The white balance situation bias voltage of these white balance state of a controls Status 1 to Status n is obtained according to empirical value.
Fig. 5 is the skeleton diagram that illustrates the white balance state of a control of difference.As shown in Figure 5, the number of selected white balance state of a control is n, and this is that expression has the white balance setting of n state with on every side the light and shade situation of reaction by the low paramount colour temperature of colour temperature.For the white balance state of a control Status (n-1) of difference to the situation bias voltage of the difference of Status n be to be expressed as T (n-1), n, and the situation bias voltage of the difference of Status n to Status (n-1) is to be expressed as T N, (n-1)
Shown in step Step II, obtain an image according to a current white balance state of a control, shown in step S208.Have two groups of white balance information in this as shown in the figure.Afterwards, obtain information, reach shown in the step as described below for decision white balance state of a control institute palpus.Shown in step S210, first group of white balance information obtained by total image, comprises average total image RGB value R 1, G 1And B 1Shown in step S212, first group of white balance acquisition value comprises the first red acquisition value Rg 1And the first blue acquisition value Bg 1Shown in step S214, average total image legibility Y.White balance acquisition value Rg 1And Bg 1Respectively by Rg 1=G 1/ R 1And Bg 1=G 1/ B 1Institute is given.And legibility Y is by Y=C 1XR 1+ C 2XG 1+ C 3XB 1Institute is given, wherein C 1+ C 2+ C 3=1.
Shown in step S220 and S222, second group of white balance information obtained by the white pixel in the image, comprises average white pixel RGB value R 2, G 2And B 2Shown in step S224, second group of white balance acquisition value comprises the second red acquisition value Rg 2And the second blue acquisition value Bg 2Shown in step S226, the number C of white pixel WBWhite balance acquisition value Rg 2And Bg 2Respectively by Rg 2=G 2/ R 2And Bg 2=G 2/ B 2Institute is given.
Shown in step Step III, the white balance information that is obtained by step Step II is with deciding current white balance state whether can react actual light and shade situation on every side, shown in step S250.Fig. 6 is the flow chart of a preferred version of the thin portion of the determination procedure among step S250 content, with the number C of white pixel WBWith a situation bias voltage Th cCompare, shown in step S300.If the number C of white pixel WBSurpass situation bias voltage Th c, then program execution in step S310 uses the white balance information of white pixel RGB to decide white balance to set.Otherwise, if the number C of white pixel WBDo not surpass situation bias voltage Th c, then program execution in step S400 uses the white balance information of total image RGB to decide white balance to set.Use this determination procedure can guarantee in an image, to have enough and can react light and shade situation on every side by detected white pixel number.
Shown in step S310, if do not have enough can detected white pixel number and present state Status S be not equal to n (not being to be positioned at high state), program execution in step S320 then is with second group of white balance acquisition value Rg 2And Bg 2With a situation bias voltage T2 S, (s+1)Compare.Shown in step S330, if this relatively determines program execution in step S510 then; Otherwise program execution in step S340 then.Shown in step S510, white balance state of a control Status S changes over S=S+1 and a flag signals Flag sets 1 for to indicate the white balance state of a control to change.If step S330's relatively is that undetermined or present state Status S equals n, then program execution in step S340.Shown in step S340, check whether Status S equals 1, if Status S is not equal to 1, program execution in step S350 then.Shown in step S350, with second group of white balance acquisition value Rg 2And Bg 2With a situation bias voltage T2 S, (s-1)Compare.Shown in step S360, relatively determine as if above-mentioned, then program execution in step S520; Otherwise program execution in step S530 then.Shown in step S520, white balance state of a control Status S changes over S=S-1 and flag signals Flag sets 1 for.If step S360's relatively is that undetermined or present state Status S equals 1, then program execution in step S530.Shown in step S530, current white balance is set and will do not changed, that is S=S and Flag=0.
White balance acquisition value Rg 2And Bg 2With situation bias voltage T2 S, (s+1)One real example of comparing is given Rg 2>=1.00 and Bg 2<=1.00, when around the light and shade situation demonstrate the situation of being reacted and have higher colour temperature than current white balance state of a control Status S, then above-mentionedly relatively determine.In addition, Rg 2And Bg 2With situation bias voltage T2 S, (s-1)One real example of comparing is given Rg 2<=1.00 and Bg 2>=1.00, when around the light and shade situation demonstrate the situation of being reacted and have lower colour temperature than current white balance state of a control Status S, then above-mentionedly relatively determine.In addition, second group of white balance acquisition value Rg 2And Bg 2And the comparison between the situation bias voltage is stated more than not bright for restriction, can also select different comparisons or other situation bias voltage for use.
In obtained image, do not have under the situation of enough white pixel numbers, use the white balance information of total image RGB to decide white balance to set, at first, shown in the step S400 of Fig. 6, with an average total image legibility Y and a situation bias voltage Th YCheck with verification legibility Y whether have effective color information enough greatly, if legibility Y is not more than situation bias voltage Th YProgram execution in step S530 then, white balance is set and will do not changed and Flag is set as 0; Otherwise program execution in step S410 then.Shown in step S410, if legibility Y is greater than situation bias voltage Th YAnd present white balance state of a control Status S is not equal to n, then program execution in step S420.Shown in step S420, with first group of white balance acquisition value Rg 1And Bg 1With a situation bias voltage T1 S, (s+1)Compare.Shown in step S430, if this relatively determines program execution in step S510 then; Otherwise program execution in step S440 then.Shown in step S510, white balance state of a control S=S+1 and flag signals Flag set 1 for.If step S430's relatively is that undetermined or present state Status S equals n, then program execution in step S440.Shown in step S440, check whether Status S equals 1, if Status S is not equal to 1, program execution in step S450 then.Shown in step S450, with first group of white balance acquisition value Rg 1And Bg 1With a situation bias voltage T1 S, (s-1)Compare.Shown in step S460, relatively determine as if above-mentioned, then program execution in step S520; Otherwise program execution in step S530 then.Shown in step S520, white balance state of a control Status S changes over S=S-1 and flag signals Flag sets 1 for.If step S460's relatively is that undetermined or present state Status S equals 1, then program execution in step S530.
White balance acquisition value Rg 1And Bg 1With situation bias voltage T2 S, (s+1)One real example of comparing is given [Rg 1<2.5 and Bg 1>0.5 and (Rg 1>=1.0 or Bg 1<1.0)].On the other hand, Rg 1And Bg 1With situation bias voltage T2 S, (s-1)One real example of comparing is given [Rg 1>0.5 and Bg 1<2.5 and (Rg 1<1.0 or Bg 1>=1.0)].Above-mentioned these relatively can be guaranteed to reduce the effect that the color of some master control causes in the image and have influence on status accuracy relatively.In addition, first group white balance acquisition value and the comparison between the situation bias voltage are stated more than not bright for restriction, can also select different comparisons or other situation bias voltage for use.
Shown in the step StepIV of Fig. 4, after the white balance state of a control, shown in step S260, set if need change current white balance, then program execution in step S270; Otherwise set if need not change current white balance, then program is back to step Step II.Shown in step S270, set a new white balance state.Shown in step S280, for new one group of white balance situation of white balance state load bias voltage, and program is back to step Step II.
In sum, can correctly determine the light and shade situation on every side of different-colour, so can accurately adjust white balance according to light and shade situation on every side according to the present invention.

Claims (7)

1. method for controlling white balance may further comprise the steps:
Select several white balance state of a controls Status 1 to Status n with on every side the light and shade situation of reaction by the low paramount colour temperature of colour temperature;
Select several white balance situation bias voltages for these white balance state of a controls Status 1 to Status n;
From several white balance state of a controls, select an initial white balance state of a control;
Load one group of white balance situation bias voltage for this initial white balance state of a control;
The current white balance state of a control of making Status S according to this an initial white balance state of a control or a note obtains an image;
Obtain one first white balance information by this image, comprise average total image RGB value, first group white balance acquisition value and legibility;
The white balance information that obtains second group by this image is obtained by the white pixel in the image, comprises average white pixel RGB value, the number of second group of white balance acquisition value and white pixel;
Decide current white balance state whether to meet above-mentioned reality light and shade situation on every side according to first and second group white balance information, and obtain a signals;
When above-mentioned signals demonstration need not change current white balance state of a control, then obtain another image; And
When above-mentioned signals shows need change current white balance state of a control the time, then set a new white balance state of a control, load the new white balance situation bias voltage of this new white balance state of a control and obtain a new image.
2. method for controlling white balance as claimed in claim 1, wherein, the step whether current white balance state of this decision meets the light and shade situation around the above-mentioned reality also comprises the following steps:
The number and the one first situation bias voltage of this white pixel are compared;
When white pixel outnumber this first situation bias voltage the time, then obtain this signals according to this second group of white balance information;
When this current white balance state of a control Status S is not equal to Status n, this second group of white balance acquisition value compared with the white balance situation bias voltage of corresponding white balance state of a control Status S and Status S+1;
When the white balance situation bias voltage of this second group of white balance acquisition value and corresponding white balance state of a control Status S and Status S+1 relatively be determine the time, then this white balance state of a control Status S is changed over Status S+1 and sets a flag signals Flag for 1;
When the white balance situation bias voltage of this second group of white balance acquisition value and corresponding white balance state of a control Status S and Status S+1 relatively be undetermined or Status S is when equaling n, check then whether Status S equals 1;
When Status S is not equal to 1, then this second group of white balance acquisition value compared with the white balance situation bias voltage of corresponding white balance state of a control Status S and Status S-1; And
When the white balance situation bias voltage of this second group of white balance acquisition value and corresponding white balance state of a control Status S and Status S-1 relatively be determine the time, then this white balance state of a control Status S is changed over StatusS-1 and sets this flag signals Flag for 1.
3. method for controlling white balance as claimed in claim 2, wherein, when between the white balance situation bias voltage of this white balance acquisition value of second group and corresponding white balance state of a control Status S and Status S+1, comparing, one red acquisition value of this white balance acquisition value of second group is not less than 1, and a blue acquisition value of this white balance acquisition value of second group is not more than 1.
4. method for controlling white balance as claimed in claim 2, wherein, when between the white balance situation bias voltage of this second group of white balance acquisition value and white balance state of a control Status S such as corresponding and Status S-1, comparing, the red acquisition value of this white balance acquisition value of second group is not more than 1, and a blue acquisition value of this white balance acquisition value of second group is not less than 1.
5. method for controlling white balance as claimed in claim 2, wherein, the step whether current white balance state of this decision meets the light and shade situation around the above-mentioned reality also comprises the following steps:
When the number of this white pixel does not surpass this first situation bias voltage, obtain this signals according to this first group of white balance information;
This legibility and the one second situation bias voltage of this first group of white balance information are checked to investigate this legibility whether have effective color information enough greatly;
When this legibility is not equal to n greater than the second situation bias voltage and this current white balance state of a control Status S, then relatively with the white balance situation bias voltage of this first group of white balance acquisition value and corresponding white balance state of a control Status S and StatusS+1;
When the white balance situation bias voltage of this white balance acquisition value of first group and corresponding white balance state of a control Status S and StatusS+1 relatively be determine the time, then this white balance state of a control Status S is changed over StatusS+1 and sets this flag signals Flag for 1;
When the white balance situation bias voltage of this white balance acquisition value of first group and corresponding white balance state of a control Status S and StatusS+1 relatively be undetermined or Status S is when equaling n, check then whether Status S equals 1;
When Status S is not equal to 1, then this white balance acquisition value of first group is compared with the white balance situation bias voltage of corresponding white balance state of a control Status S and Status S-1; And
When the white balance situation bias voltage of this first group of white balance acquisition value and corresponding white balance state of a control Status S-1 and Status S relatively be determine the time, then this white balance state of a control Status S is changed over StatusS-1 and sets this flag signals Flag for 1.
6. method for controlling white balance as claimed in claim 5, wherein, when between the white balance situation bias voltage of this first group of white balance acquisition value and corresponding white balance state of a control Status S and Status S+1, comparing, one red acquisition value of this first group of white balance acquisition value is less than 2.5 and be not less than 1, and a blue acquisition value of first group of white balance acquisition value is greater than 0.5 and less than 1.
7. method for controlling white balance as claimed in claim 5, wherein, when between the white balance situation bias voltage of this white balance acquisition value of first group and corresponding white balance state of a control Status S and Status S-1, comparing, the red acquisition value of this white balance acquisition value of first group is greater than 0.5 and less than 1, and a blue acquisition value of this white balance acquisition value of first group is less than 2.5 and be not less than 1.
CNB2005101305489A 2005-12-14 2005-12-14 Method for controlling white balance Expired - Fee Related CN100571407C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101305489A CN100571407C (en) 2005-12-14 2005-12-14 Method for controlling white balance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005101305489A CN100571407C (en) 2005-12-14 2005-12-14 Method for controlling white balance

Publications (2)

Publication Number Publication Date
CN1984348A CN1984348A (en) 2007-06-20
CN100571407C true CN100571407C (en) 2009-12-16

Family

ID=38166493

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101305489A Expired - Fee Related CN100571407C (en) 2005-12-14 2005-12-14 Method for controlling white balance

Country Status (1)

Country Link
CN (1) CN100571407C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI378723B (en) 2008-02-01 2012-12-01 Mstar Semiconductor Inc Multimedia system and remote controller thereof
CN104778938A (en) * 2014-01-09 2015-07-15 吴福吉 White balance unit of display

Also Published As

Publication number Publication date
CN1984348A (en) 2007-06-20

Similar Documents

Publication Publication Date Title
CN1901681B (en) Video display device
KR101977066B1 (en) Method for driving image and apparatus for driving image using the same
CN102693532B (en) The automatic local directed complete set of image shadow and highlight
CN108447449B (en) Signal processing method and display device
CN104981861B (en) Signal conversion device and method
CN101742340B (en) Method and device for optimizing and editing image
CN108962126A (en) Display panel driving method and system and display device comprising same
CN100521745C (en) Image correction circuit, image correction method and image display
CN107295248A (en) The image display and method for displaying image and storage medium of display image
TW200529149A (en) Method for displaying an image, image display apparatus, method for driving an image display apparatus and apparatus for driving an image display panel
CN101764913B (en) Color replacement method base on HSV space
KR20120057498A (en) Image display device and method of driving the same
CN104115490A (en) Video image display device and television receiving device
JP2008107507A (en) Video data converter and video display apparatus
KR20010113722A (en) Method of selective color control of digital video images
CN107481206A (en) MIcrosope image background equalization Processing Algorithm
US7671871B2 (en) Graphical user interface for color correction using curves
CN104094342A (en) Video display device and television receiver device
CN101042853B (en) Image processing apparatus
CN112598582A (en) Image correction and correction data generation method, device and system and display method
CN100571407C (en) Method for controlling white balance
WO2022120799A1 (en) Image processing method and apparatus, electronic device, and storage medium
CN100428783C (en) Image processing apparatus, liquid crystal display apparatus, and color correction method
CN107657924A (en) Applied to the backlight control and image compensation method of display and related control circuit
CN110379364A (en) Brightness adjusting method, device and chip based on display driving

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
ASS Succession or assignment of patent right

Owner name: LIAN YANG SEMICONDUCTOR CO., LTD.

Free format text: FORMER OWNER: HUIZHAN SCIENCE + TECHNOLOGY CO., LTD.

Effective date: 20090619

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20090619

Address after: China Taiwan Hsinchu Science Park industrial innovation 13, No. 3 Building

Applicant after: Lianyang Semiconductor Co., Ltd.

Address before: Taiwan, China

Applicant before: Huizhan Tech Co., Ltd.

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: 20091216

Termination date: 20151214

EXPY Termination of patent right or utility model