CN107920242B - A kind of optimization method of automatic white balance, terminal and computer readable storage medium - Google Patents

A kind of optimization method of automatic white balance, terminal and computer readable storage medium Download PDF

Info

Publication number
CN107920242B
CN107920242B CN201711455864.2A CN201711455864A CN107920242B CN 107920242 B CN107920242 B CN 107920242B CN 201711455864 A CN201711455864 A CN 201711455864A CN 107920242 B CN107920242 B CN 107920242B
Authority
CN
China
Prior art keywords
value
mentioned
awb
parameter
luminance
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.)
Active
Application number
CN201711455864.2A
Other languages
Chinese (zh)
Other versions
CN107920242A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201711455864.2A priority Critical patent/CN107920242B/en
Publication of CN107920242A publication Critical patent/CN107920242A/en
Application granted granted Critical
Publication of CN107920242B publication Critical patent/CN107920242B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The embodiment of the invention discloses a kind of optimization method of automatic white balance, terminal and computer readable storage medium, the optimization method of automatic white balance includes: to obtain to preset the corresponding color parameter of statistics point and luminance parameter in current scene;Wherein, a default statistics corresponding color parameter of point and a luminance parameter;According to luminance parameter, predetermined luminance threshold value and preset quantity threshold value, optimization processing is judged whether to;If it is determined that optimizing processing, then the first automatic white balance awb value is determined according to color parameter and luminance parameter;According to the first awb value and luminance weights table is prestored, the awb value after determining optimization.The optimization method of automatic white balance provided in an embodiment of the present invention can effectively improve accuracy of the awb value under special screne.

Description

A kind of optimization method of automatic white balance, terminal and computer readable storage medium
Technical field
The present invention relates to terminal technology more particularly to a kind of optimization methods of automatic white balance, terminal and computer-readable Storage medium.
Background technique
The purpose for carrying out automatic white balance (automatic white balance, awb) processing is by changing terminal The gain of color channel, the deviation of the color channel gains intrinsic to misalignment and terminal caused by colour temperature environment itself Unified compensation is carried out, to allow the image of acquisition that can correctly reflect the realistic colour of object.In the prior art, it carries out automatic white When the calculating of balance, the usually corresponding statistics point of statistics current scene, including collection point and light source point, then according to statistics point Position distribution and corresponding weighted value, which calculate, in the coordinate system of R/G, B/G obtains.Fig. 1 is that common awb value calculating method shows It is intended to, as shown in Figure 1, circular indicia is distribution of the light source point in R/G, B/G coordinate system, it is rectangular to be identified as when preceding camera is adopted Distribution of the collection point collected in R/G, B/G coordinate system, star are identified as in conjunction with light source point weight and collection point weight calculation The awb value of acquisition.
However, for certain special scenes, such as pure color scene, high brightness scene, it is counted according to existing method Calculation can not accurately determine awb value distribution situation in R/G, B/G coordinate system, that is to say, that existing for certain special screnes The awb value accuracy for having method to obtain is low.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of optimization methods of automatic white balance, terminal and computer-readable Storage medium can effectively improve accuracy of the awb value under special screne.
The technical solution of the embodiment of the present invention is achieved in that
The embodiment of the invention provides a kind of optimization methods of automatic white balance, comprising:
It obtains and presets the corresponding color parameter of statistics point and luminance parameter in current scene;Wherein, a default statistics point A corresponding color parameter and a luminance parameter;
According to the luminance parameter, predetermined luminance threshold value and preset quantity threshold value, optimization processing is judged whether to;
If it is determined that carrying out the optimization processing, then determine that first is automatic white according to the color parameter and the luminance parameter Balance awb value;
According to the first awb value and luminance weights table is prestored, the awb value after determining optimization.
In the above scheme, preset in the acquisition current scene statistics corresponding color parameter of point and luminance parameter it Afterwards, the method also includes:
The corresponding 2nd awb value of the current scene is calculated according to the color parameter.
In the above scheme, described according to the first awb value and to prestore luminance weights table, the awb value after determining optimization, Include:
It is prestored in luminance weights table according to the luminance parameter from described, determines corresponding first power of the first awb value Weight values and corresponding second weighted value of the 2nd awb value;
According to the first awb value, first weighted value, the 2nd awb value and second weighted value, determine Awb value after the optimization.
In the above scheme, described to be according to the luminance parameter, predetermined luminance threshold value and preset quantity threshold value, judgement It is no to optimize processing, comprising:
By comparing the luminance parameter and the predetermined luminance threshold value, determine that the luminance parameter is more than or equal to institute State the default statistics point number of predetermined luminance threshold value;
When the default statistics point number is more than or equal to the preset quantity threshold value, determine to carry out at the optimization Reason;
When the default statistics point number is less than the preset quantity threshold value, determine without the optimization processing.
In the above scheme, described that first automatic white balance awb is determined according to the color parameter and the luminance parameter Value, comprising:
Determine that the luminance parameter is more than or equal at least one default statistics point of the predetermined luminance threshold value;
According at least one corresponding color parameter of at least one described default statistics point, determine that described at least one is default At least one corresponding the 3rd awb value of statistics point;
The first awb value is determined according at least one described the 3rd awb value.
In the above scheme, described according to the first awb value and to prestore luminance weights table, the awb value after determining optimization Later, the method also includes:
Color adjustment is carried out to the current scene according to the awb value after the optimization.
In the above scheme, described to be according to the luminance parameter, predetermined luminance threshold value and preset quantity threshold value, judgement It is no optimize processing after, the method also includes:
If it is determined that then carrying out color tune to the current scene according to the 2nd awb value without the optimization processing Section.
In the above scheme, preset in the acquisition current scene statistics corresponding color parameter of point and luminance parameter it Before, the method also includes:
Determine the default statistics point in the current scene.
The embodiment of the invention provides a kind of terminal, the terminal includes: processor, memory and communication bus;Institute Communication bus is stated for realizing the connection communication between the processor and the memory;The processor is described for executing The data transmission program stored in memory, to realize the optimization method of automatic white balance as described above.
The embodiment of the invention provides a kind of computer readable storage medium, the computer-readable recording medium storage has One or more program, one or more of programs can be executed by one or more processor, to realize institute as above The optimization method for the automatic white balance stated.
It can be seen that obtaining in the technical solution of the embodiment of the present invention and presetting the corresponding color of statistics point in current scene Parameter and luminance parameter;Wherein, a default statistics corresponding color parameter of point and a luminance parameter;Joined according to brightness Number, predetermined luminance threshold value and preset quantity threshold value, judge whether to optimization processing;If it is determined that optimize processing, then root The first automatic white balance awb value is determined according to color parameter and luminance parameter;According to the first awb value and luminance weights table is prestored, really Awb value after fixed optimization.It can be seen that optimization method, terminal and the meter of a kind of automatic white balance that the embodiment of the present invention proposes Calculation machine readable storage medium storing program for executing can judge whether to optimization processing according to the luminance parameter for presetting statistics point in current scene, If it is determined that optimizing processing, then further according to the calculating of color parameter the first awb value of progress of default statistics point, and with The 2nd awb value that conventional method obtains is combined, and calculates the awb value after being optimized.It is certain special so as to solve It can not determine that awb value the problem of distribution situation, effectively improves awb value in special screne in R/G, B/G coordinate system under scene Under accuracy.
Detailed description of the invention
Fig. 1 is common awb value calculating method schematic diagram;
A kind of hardware structural diagram of Fig. 2 optional mobile terminal of each embodiment to realize the present invention;
Fig. 3 is a kind of communications network system architecture diagram provided in an embodiment of the present invention;
Fig. 4 is the corresponding RGB numerical value schematic diagram of different colours in the embodiment of the present invention;
Fig. 5 is the corresponding RGB numeric distribution schematic diagram of different colours in the embodiment of the present invention;
Fig. 6 is the multicolour schematic diagram based on three primary colours in the embodiment of the present invention;
Fig. 7 is the implementation process schematic diagram one of the optimization method for the automatic white balance that the embodiment of the present invention proposes;
Fig. 8 is the implementation process schematic diagram two of the optimization method for the automatic white balance that the embodiment of the present invention proposes;
Fig. 9 is the implementation process schematic diagram three of the optimization method for the automatic white balance that the embodiment of the present invention proposes;
Figure 10 is the implementation process schematic diagram four of the optimization method for the automatic white balance that the embodiment of the present invention proposes;
Figure 11 is the implementation process schematic diagram five of the optimization method for the automatic white balance that the embodiment of the present invention proposes;
Figure 12 is the implementation process schematic diagram six of the optimization method for the automatic white balance that the embodiment of the present invention proposes;
Figure 13 is the implementation process schematic diagram seven of the optimization method for the automatic white balance that the embodiment of the present invention proposes;
Figure 14 is the implementation process schematic diagram eight of the optimization method for the automatic white balance that the embodiment of the present invention proposes;
Figure 15 is the composed structure schematic diagram for the terminal that the embodiment of the present invention proposes.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, plate Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer etc. move The fixed terminals such as dynamic terminal, and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special Except element for moving purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
Referring to Fig. 2, its to realize the present invention a kind of optional mobile terminal of each embodiment hardware configuration signal Figure, which may include: radio frequency (Radio Frequency, RF) unit 101, Wireless Fidelity (WIreless- Fidelity, Wi-Fi) it is module 102, audio output unit 103, audio/video (A/V) input unit 104, sensor 105, aobvious Show the components such as unit 106, user input unit 107, interface unit 108, memory 109, processor 110 and power supply 111. It will be understood by those skilled in the art that mobile terminal structure shown in Figure 2 does not constitute the restriction to mobile terminal, it is mobile whole End may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
It is specifically introduced below with reference to all parts of the Fig. 2 to mobile terminal:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station Downlink information receive after, to processor 110 handle;In addition, by the color adjustment of uplink to base station.In general, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating Frequency unit 101 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication Standard or agreement, including but not limited to global system for mobile communications (Global System of Mobile Communication, GSM), general packet radio service (General Packet Radio Service, GPRS), code it is point more Location 2000 (Code Division Multiple Access 2000, CDMA2000), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), TD SDMA (Time Division- Synchronous Code Division Multiple Access, TD-SCDMA), frequency division duplex long term evolution (Frequency Division Duplexing-Long Term Evolution, FDD-LTE) and time division duplex long term evolution (Time Division Duplexing-Long Term Evolution, TDD-LTE) etc..
Wi-Fi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch by Wi-Fi module 102 Email, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 2 Wi-Fi module 102 is shown, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it completely can basis It needs to omit within the scope of not changing the essence of the invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or Wi-Fi module 102 it is received or The audio data that person stores in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 can also provide executed to mobile terminal 100 the relevant audio output of specific function (for example, call signal receive sound, Message sink sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or Wi-Fi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model. Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition) The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal Family setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071 Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. It is one or more, specifically herein without limitation.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 2, touch panel 1071 and display panel 1061 be the function that outputs and inputs of realizing mobile terminal as two independent components, but in certain embodiments, it can The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage Data in device 109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place Managing device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
Although Fig. 2 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Embodiment to facilitate the understanding of the present invention, the communications network system that mobile terminal of the invention is based below into Row description.
Referring to Fig. 3, Fig. 3 is a kind of communications network system architecture diagram provided in an embodiment of the present invention, the communication network system System is the LTE system of universal mobile communications technology, which includes the user equipment (User of successively communication connection Equipment, UE) 201, evolved UMTS Terrestrial radio access network (Evolved UMTS Terrestrial Radio Access Network, E-UTRAN) 202, evolved packet-based core networks (Evolved Packet Core, EPC) 203 and operation The IP operation 204 of quotient.
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 may include mobility management entity (Mobility Management Entity, MME) 2031, ownership Client server (Home Subscriber Server, HSS) 2032, other MME2033, gateway (Serving Gate Way, SGW) 2034, grouped data network gateway (PDN Gate Way, PGW) 2035 and policy and rate functional entity (Policy and Charging Rules Function, PCRF) 2036 etc..Wherein, MME2031 be processing UE201 and The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers Such as the function of home location register (not shown) etc, and preserves some related service features, data rates etc. and use The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201 Address distribution and other functions, PCRF2036 are strategy and the charging control strategic decision-making of business data flow and IP bearing resource Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 may include internet, Intranet, IP multimedia subsystem (IP Multimedia Subsystem, IMS) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art should know the present invention is not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And the following new network system etc., herein without limitation.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the method for the present invention is proposed.
Embodiment one
In an embodiment of the present invention, rgb color mode is a kind of color standard of industry, is by red (R), green (G), to obtain miscellaneous color, RGB is for the variation of blue (B) three Color Channels and their mutual superpositions It is the color for representing three channels of red, green, blue, this standard almost includes all colours that human eyesight can perceive, and is Most wide one of color system is used at present.
Fig. 4 is the corresponding RGB numerical value schematic diagram of different colours in the embodiment of the present invention, as shown in figure 4, for different face Color, corresponding RGB numerical value are also different, wherein R value, G value, the maximum numerical value of B value are 255, and the smallest numerical value is 0.
Fig. 5 is the corresponding RGB numeric distribution schematic diagram of different colours in the embodiment of the present invention, as shown in figure 5, different colours The distribution of corresponding RGB numerical value is different.
Fig. 6 is the multicolour schematic diagram based on three primary colours in the embodiment of the present invention, as shown in fig. 6, the institute in nature There is color that can mix by the three primary colours of red, green, blue according to different ratios, for example, according to a certain percentage will be red Color is mixed with green, can obtain yellow.
Fig. 7 is the implementation process schematic diagram one of the optimization method for the automatic white balance that the embodiment of the present invention proposes, such as Fig. 7 institute Show, in an embodiment of the present invention, the method for terminal optimized awb value may comprise steps of:
Step 101 obtains and presets the corresponding color parameter of statistics point and luminance parameter in current scene;Wherein, one it is pre- If the statistics corresponding color parameter of point and a luminance parameter.
In an embodiment of the present invention, above-mentioned terminal, which can be obtained first, presets the corresponding color ginseng of statistics point in current scene Several and luminance parameter.Wherein, above-mentioned color parameter can be the corresponding rgb value of above-mentioned default statistics point, i.e. red R value, green G Value and blue B value, above-mentioned luminance parameter can be the corresponding brightness value of above-mentioned default statistics point.
It should be noted that in an embodiment of the present invention, above-mentioned default statistics point may include in above-mentioned current scene Collection point and light source point.Specifically, in an embodiment of the present invention, above-mentioned collection point can be above-mentioned terminal camera to upper It states current scene and is acquired multiple datum marks obtained;Above-mentioned light source point can be the environment light source in above-mentioned current scene Point.
It should be noted that in an embodiment of the present invention, above-mentioned terminal can be the camera terminal configured with camera, For example, above-mentioned terminal can be mobile phone, smart camera, tablet computer etc. configured with camera.
Further, in an embodiment of the present invention, the above-mentioned color parameter and above-mentioned luminance parameter that above-mentioned terminal obtains In, a default statistics point respectively corresponds a color parameter and a luminance parameter.
Step 102, according to luminance parameter, predetermined luminance threshold value and preset quantity threshold value, judge whether at optimization Reason.
In an embodiment of the present invention, above-mentioned terminal above-mentioned default statistics point in obtaining above-mentioned current scene it is corresponding on It, can be according to above-mentioned luminance parameter, predetermined luminance threshold value and preset quantity threshold after stating color parameter and above-mentioned luminance parameter Value, judges whether to optimization processing.
Further, in an embodiment of the present invention, above-mentioned terminal can first preset a predetermined luminance threshold value, together When can preset a preset quantity threshold value, so as to according to above-mentioned predetermined luminance threshold value and above-mentioned preset quantity threshold value to being It is no to optimize processing and judged.
Specifically, in an embodiment of the present invention, above-mentioned terminal can pass through above-mentioned luminance parameter, above-mentioned predetermined luminance threshold Value and above-mentioned preset quantity threshold value, judge whether above-mentioned current scene is certain special screnes that can not obtain accurate awb value, To further determine whether to optimize processing.
Step 103, if it is determined that optimizing processing, then the first automatic white balance is determined according to color parameter and luminance parameter Awb value.
In an embodiment of the present invention, above-mentioned terminal according to above-mentioned luminance parameter, above-mentioned predetermined luminance threshold value and on Preset quantity threshold value is stated, after judging whether to optimization processing, if it is decided that above-mentioned optimization processing is carried out, then above-mentioned terminal The first automatic white balance awb value can be determined according to above-mentioned color parameter and above-mentioned luminance parameter.
Specifically, in an embodiment of the present invention, above-mentioned terminal is after being made whether the judgement of optimization processing, if sentenced Surely above-mentioned optimization processing is carried out, then above-mentioned terminal can be according to above-mentioned luminance parameter and above-mentioned predetermined luminance threshold value, from above-mentioned Statistics point of high brightness is determined in default statistics point, and is calculated according to above-mentioned color parameter and obtained the statistics point of high brightness Awb value, and then determine above-mentioned first automatic white balance awb value.
Step 104 according to the first awb value and prestores luminance weights table, the awb value after determining optimization.
In an embodiment of the present invention, if it is decided that above-mentioned optimization processing is carried out, then above-mentioned terminal is according to above-mentioned color Parameter and above-mentioned luminance parameter can be according to above-mentioned first awb values and above-mentioned pre- after determining the first automatic white balance awb value Luminance weights table is deposited, the awb value after determining optimization.
Further, in an embodiment of the present invention, above-mentioned terminal can be first according to the index of different default exposure values The different corresponding weighted values of awb value is set.Specifically, in an embodiment of the present invention, smaller, the brightness of the higher index of brightness value It is bigger to be worth lower index.
Specifically, in an embodiment of the present invention, above-mentioned terminal can be according to the rope in above-mentioned default exposure value concordance list Draw the luminance parameter for determining above-mentioned current scene, is then further obtained according to above-mentioned luminance parameter corresponding with above-mentioned luminance parameter Above-mentioned predetermined luminance weighted value table, to determine above-mentioned optimization according to above-mentioned predetermined luminance weighted value table and above-mentioned first awb value Awb value afterwards.
Fig. 8 is the implementation process schematic diagram two of the optimization method for the automatic white balance that the embodiment of the present invention proposes, such as Fig. 8 institute Show, in an embodiment of the present invention, above-mentioned terminal according to above-mentioned first awb value and it is above-mentioned prestore luminance weights table, determine above-mentioned After awb value after optimization, i.e., after step 104, the method for terminal optimized awb value can with the following steps are included:
Step 105 carries out color adjustment to current scene according to the awb value after optimization.
In an embodiment of the present invention, above-mentioned terminal according to above-mentioned first awb value and it is above-mentioned prestore luminance weights table, really After awb value after fixed above-mentioned optimization, color tune can be carried out to above-mentioned current scene according to the awb value after above-mentioned optimization Section.
Specifically, in an embodiment of the present invention, the awb value after above-mentioned optimization can be used for in above-mentioned current scene Above-mentioned color parameter is adjusted.Specifically, in an embodiment of the present invention, after above-mentioned terminal can be according to above-mentioned optimization Awb value determines the corresponding R offset of above-mentioned default statistics point and B offset respectively, then further according to above-mentioned R offset and Above-mentioned B offset is respectively adjusted the R value and B value of above-mentioned default statistics point.
Fig. 9 is the implementation process schematic diagram three of the optimization method for the automatic white balance that the embodiment of the present invention proposes, such as Fig. 9 institute Show, in an embodiment of the present invention, above-mentioned terminal, which obtains, presets the corresponding color parameter of statistics point and brightness ginseng in current scene Before number, i.e., before step 101, the method for terminal optimized awb value can with the following steps are included:
Step 106 determines default statistics point in current scene.
In an embodiment of the present invention, above-mentioned terminal preset in obtaining current scene the statistics corresponding color parameter of point and Before luminance parameter, first the above-mentioned default statistics point in above-mentioned current scene can be determined.
It should be noted that in an embodiment of the present invention, above-mentioned default statistics point may include in above-mentioned current scene Collection point and light source point.Specifically, in an embodiment of the present invention, above-mentioned collection point can be above-mentioned terminal camera to upper It states current scene and is acquired multiple datum marks obtained;Above-mentioned light source point can be the environment light source in above-mentioned current scene Point.
Further, in an embodiment of the present invention, above-mentioned collection point can pass through the camera configured for above-mentioned terminal Above-mentioned current scene is carried out to divide acquisition.Specifically, in an embodiment of the present invention, above-mentioned terminal can will be above-mentioned current Scene partitioning is the identical region of 64*64 size, so that 64*64 collection point can be obtained.
Further, in an embodiment of the present invention, above-mentioned light source point can pass through the camera configured for above-mentioned terminal Above-mentioned current scene is carried out detected.Specifically, in an embodiment of the present invention, above-mentioned terminal can be to above-mentioned current Scene carries out the determination of gray value, so that the environment light source point in above-mentioned current scene can be determined according to gray value.
It is corresponding to obtain default statistics point in current scene for the optimization method for the automatic white balance that the embodiment of the present invention proposes Color parameter and luminance parameter;Wherein, a default statistics corresponding color parameter of point and a luminance parameter;According to brightness Parameter, predetermined luminance threshold value and preset quantity threshold value, judge whether to optimization processing;If it is determined that optimizing processing, then The first automatic white balance awb value is determined according to color parameter and luminance parameter;According to the first awb value and luminance weights table is prestored, Awb value after determining optimization.It can be seen that a kind of optimization method for automatic white balance that the embodiment of the present invention proposes, Ke Yigen Optimization processing is judged whether to according to the luminance parameter for presetting statistics point in current scene, if it is decided that optimizes processing, then The calculating of the first awb value, and the 2nd awb value obtained with conventional method are further carried out according to the color parameter of default statistics point It is combined, calculates the awb value after being optimized.So as to solve awb value can not be determined in R/ under certain special scenes G, in B/G coordinate system the problem of distribution situation, accuracy of the awb value under special screne is effectively improved.
Embodiment two
One, Figure 10 is the realization stream of the optimization method for the automatic white balance that the embodiment of the present invention proposes based on the above embodiment Journey schematic diagram four, as shown in Figure 10, in an embodiment of the present invention, above-mentioned terminal, which obtains, presets statistics point correspondence in current scene Color parameter and luminance parameter after, i.e., after step 101, the method for terminal optimized awb value can with the following steps are included:
Step 107 calculates the corresponding 2nd awb value of current scene according to color parameter.
In an embodiment of the present invention, above-mentioned terminal obtains above-mentioned default statistics point in above-mentioned current scene in terminal and corresponds to Above-mentioned color parameter and above-mentioned luminance parameter after, above-mentioned current scene corresponding the can be calculated according to above-mentioned color parameter Two awb values.
It should be noted that in an embodiment of the present invention, above-mentioned terminal, can after obtaining above-mentioned color parameter The awb value obtained in above-mentioned current scene, i.e., above-mentioned 2nd awb value are calculated according to conventional method.
Specifically, in an embodiment of the present invention, above-mentioned terminal can determine collection point in above-mentioned default statistics point respectively It is distributed in R/G, B/G coordinate system with light source point, then can distribute collection point and light source point different weighted values, and according to The weighted value, collection point and the light source point distribution situation in R/G, B/G coordinate system finally determine above-mentioned 2nd awb value.
Specifically, in an embodiment of the present invention, above-mentioned terminal can calculate one in advance according to formula (1) and formula (2) If position (D1, D2) of the statistics point in R/G, B/G coordinate system,
D1=R/G (1)
D2=B/G (2)
Wherein, R is the red channel R value of above-mentioned terminal, and B is the blue channel B value of above-mentioned terminal, and G is above-mentioned terminal Green channel G value.
It should be noted that in an embodiment of the present invention, D1 can be used for embodying warm colour colour temperature, correspondingly, D2) it can be with For embodying cool colour colour temperature.
Further, in an embodiment of the present invention, Figure 11 is the optimization for the automatic white balance that the embodiment of the present invention proposes The implementation process schematic diagram five of method, as shown in figure 11, in an embodiment of the present invention, above-mentioned terminal is according to luminance parameter, pre- If luminance threshold and preset quantity threshold value, after judging whether to optimization processing, i.e., after step 102, terminal optimized awb The method of value can with the following steps are included:
Step 108, if it is determined that without optimization processing, then color adjustment is carried out to current scene according to the 2nd awb value.
In an embodiment of the present invention, above-mentioned terminal according to above-mentioned luminance parameter, above-mentioned predetermined luminance threshold value and on Preset quantity threshold value is stated, after judging whether to optimization processing, if it is decided that without above-mentioned optimization processing, then above-mentioned end End directly can carry out color adjustment to above-mentioned current scene according to above-mentioned 2nd awb value.
Specifically, in an embodiment of the present invention, above-mentioned 2nd awb value can be used for above-mentioned in above-mentioned current scene Color parameter is adjusted.Specifically, in an embodiment of the present invention, above-mentioned terminal can be distinguished according to above-mentioned 2nd awb value It determines the corresponding R offset of above-mentioned default statistics point and B offset, is then further compensated according to above-mentioned R offset and above-mentioned B Value is respectively adjusted the R value and B value of above-mentioned default statistics point.
It is corresponding to obtain default statistics point in current scene for the optimization method for the automatic white balance that the embodiment of the present invention proposes Color parameter and luminance parameter;Wherein, a default statistics corresponding color parameter of point and a luminance parameter;According to brightness Parameter, predetermined luminance threshold value and preset quantity threshold value, judge whether to optimization processing;If it is determined that optimizing processing, then The first automatic white balance awb value is determined according to color parameter and luminance parameter;According to the first awb value and luminance weights table is prestored, Awb value after determining optimization.It can be seen that a kind of optimization method for automatic white balance that the embodiment of the present invention proposes, Ke Yigen Optimization processing is judged whether to according to the luminance parameter for presetting statistics point in current scene, if it is decided that optimizes processing, then The calculating of the first awb value, and the 2nd awb value obtained with conventional method are further carried out according to the color parameter of default statistics point It is combined, calculates the awb value after being optimized.So as to solve awb value can not be determined in R/ under certain special scenes G, in B/G coordinate system the problem of distribution situation, accuracy of the awb value under special screne is effectively improved.
Embodiment three
Two, Figure 12 is the realization stream of the optimization method for the automatic white balance that the embodiment of the present invention proposes based on the above embodiment Journey schematic diagram six, as shown in figure 12, in an embodiment of the present invention, above-mentioned terminal is according to above-mentioned first awb value and above-mentioned prestores The method of luminance weights table, the awb value after determining above-mentioned optimization may comprise steps of:
Step 104a, according to luminance parameter from prestoring in luminance weights table, corresponding first weight of the first awb value is determined Value and corresponding second weighted value of the 2nd awb value.
In an embodiment of the present invention, above-mentioned terminal determines first according to above-mentioned color parameter and above-mentioned luminance parameter Automatic white balance awb value, while after calculating the corresponding 2nd awb value of above-mentioned current scene according to above-mentioned color parameter, To prestore in luminance weights table according to above-mentioned luminance parameter from above-mentioned, corresponding first weighted value of above-mentioned first awb value is determined, and Corresponding second weighted value of above-mentioned 2nd awb value.
Specifically, in an embodiment of the present invention, for different luminance parameters, corresponding weighted value is also different.Specifically Ground, in an embodiment of the present invention, above-mentioned terminal can be stored in advance it is above-mentioned prestore luminance weights value table, then according to above-mentioned One awb value and above-mentioned 2nd awb value determine above-mentioned first weighted value and above-mentioned from above-mentioned prestore respectively in luminance weights value table Second weighted value.
It should be noted that in an embodiment of the present invention, above-mentioned first weighted value is corresponding with above-mentioned first awb value , correspondingly, above-mentioned second weighted value is corresponding with above-mentioned 2nd awb value.
Step 104b, according to the first awb value, the first weighted value, the 2nd awb value and the second weighted value, after determining optimization Awb value.
In an embodiment of the present invention, above-mentioned terminal is prestoring in luminance weights table according to above-mentioned luminance parameter from above-mentioned, After determining corresponding first weighted value of above-mentioned first awb value and corresponding second weighted value of above-mentioned 2nd awb value, Ke Yigen According to above-mentioned first awb value, above-mentioned first weighted value, above-mentioned 2nd awb value and above-mentioned second weighted value, after determining above-mentioned optimization Awb value.
Further, in an embodiment of the present invention, above-mentioned terminal is according to above-mentioned first weighted value and above-mentioned second weight Value, is weighted and averaged calculating to above-mentioned first awb value and above-mentioned 2nd awb value, thus after can obtaining above-mentioned optimization Awb value.
It should be noted that in an embodiment of the present invention, above-mentioned first weighted value and above-mentioned second weighted value are big In the natural number equal to 0 and less than or equal to 1, meanwhile, the sum of above-mentioned first weighted value and above-mentioned second weighted value are less than or equal to 1.
According to the description above it is found that 104a~104b through the above steps, above-mentioned terminal is according to luminance parameter from pre- It deposits in luminance weights table, determines corresponding first weighted value of the first awb value and corresponding second weighted value of the 2nd awb value;According to First awb value, the first weighted value, the 2nd awb value and the second weighted value, the awb value after determining optimization.It can be seen that this hair A kind of optimization method for automatic white balance that bright embodiment proposes, can be according to the luminance parameter for presetting statistics point in current scene Judge whether to optimization processing, if it is decided that optimize processing, then further according to the color parameter of default statistics point into The calculating of the first awb value of row, and the 2nd awb value obtained with conventional method is combined, and calculates the awb value after being optimized. So as to solve the problems, such as not determining awb value distribution situation in R/G, B/G coordinate system under certain special scenes, effectively Improve accuracy of the awb value under special screne in ground.
Example IV
One, Figure 13 is the realization stream of the optimization method for the automatic white balance that the embodiment of the present invention proposes based on the above embodiment Journey schematic diagram seven, as shown in figure 13, in an embodiment of the present invention, above-mentioned terminal according to above-mentioned luminance parameter, it is above-mentioned preset it is bright Degree threshold value and above-mentioned preset quantity threshold value, the method for judging whether to optimization processing may comprise steps of:
Step 102a, by comparing luminance parameter and predetermined luminance threshold value, it is default to determine that luminance parameter is more than or equal to The default statistics point number of luminance threshold.
In an embodiment of the present invention, above-mentioned terminal above-mentioned default statistics point in obtaining above-mentioned current scene it is corresponding on After stating color parameter and above-mentioned luminance parameter, above-mentioned luminance parameter can be compared with predetermined luminance threshold value respectively, from And it can determine that luminance parameter is more than or equal to the default statistics of above-mentioned predetermined luminance threshold value from above-mentioned default statistics point Point number.
Step 102b, when default statistics point number is more than or equal to preset quantity threshold value, judgement optimizes processing.
In an embodiment of the present invention, above-mentioned terminal is by comparing above-mentioned luminance parameter and above-mentioned predetermined luminance threshold value, Determine that above-mentioned luminance parameter is more than or equal to after the default statistics point number of above-mentioned predetermined luminance threshold value, it can again will be above-mentioned Default statistics point number is compared with above-mentioned preset quantity threshold value, to judge whether to above-mentioned optimization processing.
Further, in an embodiment of the present invention, above-mentioned terminal is by above-mentioned default statistics point number and above-mentioned present count After amount threshold value is compared, if above-mentioned default statistics point number is more than or equal to above-mentioned preset quantity threshold value, Above-mentioned terminal can determine to carry out above-mentioned optimization processing.
Step 102c, when default statistics point number is less than preset quantity threshold value, determine without optimization processing.
In an embodiment of the present invention, above-mentioned terminal is by comparing above-mentioned luminance parameter and above-mentioned predetermined luminance threshold value, Determine that above-mentioned luminance parameter is more than or equal to after the default statistics point number of above-mentioned predetermined luminance threshold value, it can again will be above-mentioned Default statistics point number is compared with above-mentioned preset quantity threshold value, to judge whether to above-mentioned optimization processing.
Further, in an embodiment of the present invention, above-mentioned terminal is by above-mentioned default statistics point number and above-mentioned present count After amount threshold value is compared, if above-mentioned default statistics point number is less than above-mentioned preset quantity threshold value, above-mentioned terminal It can determine without above-mentioned optimization processing.
According to the description above it is found that 102a~102c through the above steps, above-mentioned terminal is by comparing luminance parameter With predetermined luminance threshold value, determine that luminance parameter is more than or equal to the default statistics point number of predetermined luminance threshold value;When default system When enumeration number is more than or equal to preset quantity threshold value, judgement optimizes processing;It is preset when default statistics point number is less than When amount threshold, determine without optimization processing.It can be seen that a kind of optimization for automatic white balance that the embodiment of the present invention proposes Method can judge whether to optimization processing according to the luminance parameter for presetting statistics point in current scene, if it is decided that carry out Optimization processing, then further carry out the calculating of the first awb value according to the color parameter of default statistics point, and obtains with conventional method The 2nd awb value be combined, calculate optimized after awb value.So as to which solve can not be true under certain special scenes Determine awb value and the problem of distribution situation, effectively improves accuracy of the awb value under special screne in R/G, B/G coordinate system.
Embodiment five
One, Figure 14 is the realization stream of the optimization method for the automatic white balance that the embodiment of the present invention proposes based on the above embodiment Journey schematic diagram eight, as shown in figure 14, in an embodiment of the present invention, above-mentioned terminal is joined according to above-mentioned color parameter and above-mentioned brightness The method that number determines above-mentioned first automatic white balance awb value may comprise steps of:
Step 201 determines that luminance parameter is more than or equal at least one default statistics point of predetermined luminance threshold value.
In an embodiment of the present invention, above-mentioned terminal according to above-mentioned luminance parameter, above-mentioned predetermined luminance threshold value and on Preset quantity threshold value is stated, after judging whether to optimization processing, if it is decided that carry out above-mentioned optimization processing, above-mentioned terminal can be with First determine that above-mentioned luminance parameter is more than or equal at least one default statistics point of above-mentioned predetermined luminance threshold value.
Further, in an embodiment of the present invention, above-mentioned terminal is after determining to carry out above-mentioned optimization processing, Ke Yicong Determine that luminance parameter is more than or equal at least one statistics point of above-mentioned predetermined luminance threshold value in above-mentioned default statistics point.? That is above-mentioned terminal can first determine that the higher statistics point of brightness is further handled from above-mentioned default statistics point.
Step 202 presets at least one corresponding color parameter of statistics point according at least one, determines that at least one is default At least one corresponding the 3rd awb value of statistics point.
In an embodiment of the present invention, above-mentioned terminal is determining above-mentioned luminance parameter more than or equal to above-mentioned predetermined luminance It, can be according at least one corresponding color of at least one above-mentioned default statistics point after the default statistics point of at least one of threshold value Parameter determines that at least one above-mentioned default statistics puts at least one corresponding the 3rd awb value.
Further, in an embodiment of the present invention, above-mentioned terminal can be selected from above-mentioned color parameter with it is above-mentioned At least one presets at least one corresponding color parameter of statistics point, then carries out awb according at least one above-mentioned color parameter The calculating of value obtains at least one above-mentioned default statistics point corresponding at least one so that at least one awb value can be obtained A 3rd awb value.
Step 203 determines the first awb value according at least one the 3rd awb value.
In an embodiment of the present invention, above-mentioned terminal according at least one above-mentioned default statistics point it is corresponding at least one Color parameter can be according to above-mentioned after determining that at least one above-mentioned default statistics puts at least one corresponding the 3rd awb value At least one the 3rd awb value determines above-mentioned first awb value.
Further, in an embodiment of the present invention, above-mentioned terminal calculate obtain above-mentioned at least one the 3rd awb value it Afterwards, it can further be calculated according at least one above-mentioned the 3rd awb value and obtain above-mentioned first awb value.Specifically, of the invention In embodiment, above-mentioned terminal can carry out average computation at least one above-mentioned the 3rd awb value, and by least one above-mentioned third The average value of awb value is as above-mentioned first awb value.
It is corresponding to obtain default statistics point in current scene for the optimization method for the automatic white balance that the embodiment of the present invention proposes Color parameter and luminance parameter;Wherein, a default statistics corresponding color parameter of point and a luminance parameter;According to brightness Parameter, predetermined luminance threshold value and preset quantity threshold value, judge whether to optimization processing;If it is determined that optimizing processing, then The first automatic white balance awb value is determined according to color parameter and luminance parameter;According to the first awb value and luminance weights table is prestored, Awb value after determining optimization.It can be seen that a kind of optimization method for automatic white balance that the embodiment of the present invention proposes, Ke Yigen Optimization processing is judged whether to according to the luminance parameter for presetting statistics point in current scene, if it is decided that optimizes processing, then The calculating of the first awb value, and the 2nd awb value obtained with conventional method are further carried out according to the color parameter of default statistics point It is combined, calculates the awb value after being optimized.So as to solve awb value can not be determined in R/ under certain special scenes G, in B/G coordinate system the problem of distribution situation, accuracy of the awb value under special screne is effectively improved.
Embodiment six
One to embodiment five based on the above embodiment, and Figure 15 is the composed structure signal for the terminal that the embodiment of the present invention proposes Figure, in practical applications, under the same inventive concept based on embodiment one to embodiment five, as shown in figure 15, the present invention is implemented The terminal 3 of example includes: processor 31, memory 32 and communication bus 33.It should be noted that in the embodiment of the present invention In, processor 31 and memory 32 in Figure 15 respectively correspond processor 110 and memory 109 in above-mentioned figure one.Specific During embodiment, above-mentioned processor 31 can be application-specific IC (Application Specific Integrated Circuit, ASIC), digital signal processor (Digital Signal Processor, DSP), number letter Number processing unit (Digital Signal Processing Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field Programmable Gate Array, FPGA), centre Manage at least one of device (Central Processing Unit, CPU), controller, microcontroller, microprocessor.It can manage Xie Di, for different equipment, the electronic device for realizing above-mentioned processor function can also be other, the embodiment of the present invention It is not especially limited.
In an embodiment of the present invention, above-mentioned communication bus 33 is for realizing the connection between processor 31 and memory 32 Communication;Above-mentioned processor 31 is used to execute the optimization program of the automatic white balance stored in memory 32, to perform the steps of
It obtains and presets the corresponding color parameter of statistics point and luminance parameter in current scene;Wherein, a default statistics point A corresponding color parameter and a luminance parameter;According to luminance parameter, predetermined luminance threshold value and preset quantity threshold value, judgement Whether processing is optimized;If it is determined that optimizing processing, then determine that first is automatic white flat according to color parameter and luminance parameter Weigh awb value;According to the first awb value and luminance weights table is prestored, the awb value after determining optimization.
In an embodiment of the present invention, further, above-mentioned processor 31 is also used to obtain and presets statistics in current scene After the corresponding color parameter of point and luminance parameter, the corresponding 2nd awb value of current scene is calculated according to color parameter.
In an embodiment of the present invention, further, above-mentioned processor 31, specifically for bright from prestoring according to luminance parameter It spends in weight table, determines corresponding first weighted value of the first awb value and corresponding second weighted value of the 2nd awb value;And according to First awb value, the first weighted value, the 2nd awb value and the second weighted value, the awb value after determining optimization.
In an embodiment of the present invention, further, above-mentioned processor 31, also particularly useful for by comparing luminance parameter and Predetermined luminance threshold value determines that luminance parameter is more than or equal to the default statistics point number of predetermined luminance threshold value;And when default When statistics point number is more than or equal to preset quantity threshold value, judgement optimizes processing;And when default statistics point number is small When preset quantity threshold value, determine without optimization processing.
In an embodiment of the present invention, further, above-mentioned processor 31, also particularly useful for determine luminance parameter be greater than or Person is equal at least one default statistics point of predetermined luminance threshold value;And according at least one default statistics point corresponding at least one A color parameter determines that at least one presets at least one corresponding the 3rd awb value of statistics point;And according at least one third Awb value determines the first awb value.
In an embodiment of the present invention, further, above-mentioned processor 31 is also used to according to the first awb value and prestores bright Weight table is spent, after the awb value after determining optimization, color adjustment is carried out to current scene according to the awb value after optimization.
In an embodiment of the present invention, further, above-mentioned processor 31, is also used to according to luminance parameter, predetermined luminance Threshold value and preset quantity threshold value, after judging whether to optimization processing, if it is determined that without optimization processing, then according to second Awb value carries out color adjustment to current scene.
In an embodiment of the present invention, further, above-mentioned processor 31 is also used to obtain and presets statistics in current scene Before the corresponding color parameter of point and luminance parameter, the default statistics point in current scene is determined.
The terminal that the embodiment of the present invention proposes obtains and presets the corresponding color parameter of statistics point and brightness ginseng in current scene Number;Wherein, a default statistics corresponding color parameter of point and a luminance parameter;According to luminance parameter, predetermined luminance threshold Value and preset quantity threshold value, judge whether to optimization processing;If it is determined that optimize processing, then according to color parameter and bright Degree parameter determines the first automatic white balance awb value;According to the first awb value and luminance weights table is prestored, the awb after determining optimization Value.It can be seen that the terminal that the embodiment of the present invention proposes, can judge according to the luminance parameter for presetting statistics point in current scene Whether processing is optimized, if it is decided that is optimized processing, is then further carried out the according to the color parameter of default statistics point The calculating of one awb value, and the 2nd awb value obtained with conventional method is combined, and calculates the awb value after being optimized.To Being able to solve under certain special scenes can not determine that awb value the problem of distribution situation, effectively mentions in R/G, B/G coordinate system Accuracy of the high awb value under special screne.
The embodiment of the present invention provides a kind of computer readable storage medium, and above-mentioned computer-readable recording medium storage has one A perhaps multiple program said ones or multiple programs can be executed by one or more processor, be applied in terminal, should The method such as embodiment one to embodiment five is realized when program is executed by processor.
Specifically, the corresponding program instruction of the optimization method of one of the present embodiment automatic white balance can be stored In CD, hard disk, on the storage mediums such as USB flash disk, when the journey corresponding with a kind of optimization method of automatic white balance in storage medium Sequence instruction is read or is performed by an electronic equipment, includes the following steps:
It obtains and presets the corresponding color parameter of statistics point and luminance parameter in current scene;Wherein, a default statistics point A corresponding color parameter and a luminance parameter;
According to luminance parameter, predetermined luminance threshold value and preset quantity threshold value, optimization processing is judged whether to;
If it is determined that optimizing processing, then the first automatic white balance awb value is determined according to color parameter and luminance parameter;
According to the first awb value and luminance weights table is prestored, the awb value after determining optimization.
In an embodiment of the present invention, further, obtain in current scene preset the statistics corresponding color parameter of point and After luminance parameter, said one or multiple programs can also be executed by said one or multiple processors, following to realize Step:
The corresponding 2nd awb value of current scene is calculated according to color parameter.
In an embodiment of the present invention, further, according to the first awb value and luminance weights table is prestored, after determining optimization Awb value when, said one or multiple programs are executed by said one or multiple processors, implement following steps:
According to luminance parameter from prestoring in luminance weights table, corresponding first weighted value of the first awb value and second are determined Corresponding second weighted value of awb value;
Awb value according to the first awb value, the first weighted value, the 2nd awb value and the second weighted value, after determining optimization.
In an embodiment of the present invention, further, according to luminance parameter, predetermined luminance threshold value and preset quantity threshold Value, when judging whether to optimization processing, said one or multiple programs are executed by said one or multiple processors, tool Body performs the steps of
By comparing luminance parameter and predetermined luminance threshold value, determine that luminance parameter is more than or equal to predetermined luminance threshold value Default statistics point number;
When default statistics point number is more than or equal to preset quantity threshold value, judgement optimizes processing;
When default statistics point number is less than preset quantity threshold value, determine without optimization processing.
In an embodiment of the present invention, further, the first automatic white balance is determined according to color parameter and luminance parameter When awb value, said one or multiple programs are executed by said one or multiple processors, implement following steps:
Determine that luminance parameter is more than or equal at least one default statistics point of predetermined luminance threshold value;
At least one corresponding color parameter of statistics point is preset according at least one, determines at least one default statistics pair The 3rd awb value of at least one answered;
The first awb value is determined according at least one the 3rd awb value.
In an embodiment of the present invention, further, according to the first awb value and luminance weights table is prestored, after determining optimization Awb value after, to perform the steps of
Color adjustment is carried out to current scene according to the awb value after optimization.
In an embodiment of the present invention, further, according to luminance parameter, predetermined luminance threshold value and preset quantity threshold Value, after judging whether to optimization processing, to perform the steps of
If it is determined that then carrying out color adjustment to current scene according to the 2nd awb value without optimization processing.
In an embodiment of the present invention, further, obtain in current scene preset the statistics corresponding color parameter of point and Before luminance parameter, to perform the steps of
Determine the default statistics point in current scene.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (8)

1. a kind of optimization method of automatic white balance, which is characterized in that the described method includes:
It obtains and presets the corresponding color parameter of statistics point and luminance parameter in current scene;Wherein, a default statistics point corresponds to One color parameter and a luminance parameter;
According to the luminance parameter, predetermined luminance threshold value and preset quantity threshold value, optimization processing is judged whether to;
It is described that optimization processing is judged whether to according to the luminance parameter, predetermined luminance threshold value and preset quantity threshold value, packet It includes:
By comparing the luminance parameter and the predetermined luminance threshold value, it is described pre- to determine that the luminance parameter is more than or equal to If the default statistics point number of luminance threshold;
When the default statistics point number is more than or equal to the preset quantity threshold value, determine to carry out the optimization processing;
When the default statistics point number is less than the preset quantity threshold value, determine without the optimization processing;
If it is determined that carrying out the optimization processing, then the first automatic white balance is determined according to the color parameter and the luminance parameter Awb value;
It is described that first automatic white balance awb value is determined according to the color parameter and the luminance parameter, comprising:
Determine that the luminance parameter is more than or equal at least one default statistics point of the predetermined luminance threshold value;
According at least one corresponding color parameter of at least one described default statistics point, at least one described default statistics is determined At least one corresponding the 3rd awb value of point;
The first awb value is determined according at least one described the 3rd awb value;
According to the first awb value and luminance weights table is prestored, the awb value after determining optimization.
2. the method according to claim 1, wherein presetting the corresponding color of statistics point in the acquisition current scene After colour parameter and luminance parameter, the method also includes:
The corresponding 2nd awb value of the current scene is calculated according to the color parameter.
3. according to the method described in claim 2, it is characterized in that, described according to the first awb value and prestoring luminance weights Table, the awb value after determining optimization, comprising:
It is prestored in luminance weights table according to the luminance parameter from described, determines corresponding first weighted value of the first awb value, Corresponding second weighted value with the 2nd awb value;
According to the first awb value, first weighted value, the 2nd awb value and second weighted value, determine described in Awb value after optimization.
4. the method according to claim 1, wherein described according to the first awb value and prestoring luminance weights Table, after determining the awb value after optimizing, the method also includes:
Color adjustment is carried out to the current scene according to the awb value after the optimization.
5. according to the method described in claim 2, it is characterized in that, it is described according to the luminance parameter, predetermined luminance threshold value with And preset quantity threshold value, after judging whether to optimization processing, the method also includes:
If it is determined that then carrying out color adjustment to the current scene according to the 2nd awb value without the optimization processing.
6. the method according to claim 1, wherein presetting the corresponding color of statistics point in the acquisition current scene Before colour parameter and luminance parameter, the method also includes:
Determine the default statistics point in the current scene.
7. a kind of terminal, which is characterized in that the terminal includes: processor, memory and communication bus;The communication bus For realizing the connection communication between the processor and the memory;The processor is deposited in the memory for executing The data transmission program of storage, to realize as the method according to claim 1 to 6.
8. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage have one or Multiple programs, one or more of programs can be executed by one or more processor, to realize that claim 1-6 such as appoints Method described in one.
CN201711455864.2A 2017-12-28 2017-12-28 A kind of optimization method of automatic white balance, terminal and computer readable storage medium Active CN107920242B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711455864.2A CN107920242B (en) 2017-12-28 2017-12-28 A kind of optimization method of automatic white balance, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711455864.2A CN107920242B (en) 2017-12-28 2017-12-28 A kind of optimization method of automatic white balance, terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107920242A CN107920242A (en) 2018-04-17
CN107920242B true CN107920242B (en) 2019-08-16

Family

ID=61894332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711455864.2A Active CN107920242B (en) 2017-12-28 2017-12-28 A kind of optimization method of automatic white balance, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107920242B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110505459B (en) * 2019-08-16 2020-12-11 域鑫科技(惠州)有限公司 Image color correction method, device and storage medium suitable for endoscope
CN112788324A (en) * 2021-02-26 2021-05-11 广东以诺通讯有限公司 White balance method, system and terminal for pure color scene

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103491357A (en) * 2013-10-14 2014-01-01 旗瀚科技有限公司 Auto white balance treatment method of image sensor
CN105227944A (en) * 2015-09-25 2016-01-06 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN106797453A (en) * 2014-07-08 2017-05-31 富士胶片株式会社 Image processing apparatus, camera head, image processing method and image processing program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9659349B2 (en) * 2015-06-12 2017-05-23 Gopro, Inc. Color filter array scaler

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103491357A (en) * 2013-10-14 2014-01-01 旗瀚科技有限公司 Auto white balance treatment method of image sensor
CN106797453A (en) * 2014-07-08 2017-05-31 富士胶片株式会社 Image processing apparatus, camera head, image processing method and image processing program
CN105227944A (en) * 2015-09-25 2016-01-06 联想(北京)有限公司 A kind of information processing method and electronic equipment

Also Published As

Publication number Publication date
CN107920242A (en) 2018-04-17

Similar Documents

Publication Publication Date Title
CN109189281A (en) Color adaptation method, terminal and the computer storage medium of wallpaper and icon
CN107908383A (en) A kind of screen color method of adjustment, device and mobile terminal
CN109377531A (en) Image color cast method of adjustment, device, mobile terminal and readable storage medium storing program for executing
CN109453523A (en) A kind of game picture display processing method, terminal and computer readable storage medium
CN108537021A (en) Unlocked by fingerprint method, terminal and computer readable storage medium based on double-sided screen
CN107315515A (en) Color change method, terminal and the computer-readable recording medium of status bar icon
CN109358831A (en) A kind of display control method, mobile terminal and computer readable storage medium
CN109005574A (en) Cell selecting method, mobile terminal and computer readable storage medium
CN107705247A (en) A kind of method of adjustment of image saturation, terminal and storage medium
CN107580350A (en) A kind of signal intensity switching method, equipment and computer-readable recording medium
CN109817130A (en) A kind of colour temperature regulation method, equipment and computer readable storage medium
CN110347306A (en) A kind of multi-screen display method, terminal and computer readable storage medium
CN110035270A (en) A kind of 3D rendering display methods, terminal and computer readable storage medium
CN109816619A (en) Image interfusion method, device, terminal and computer readable storage medium
CN108810264A (en) A kind of brightness adjusting method and terminal, computer readable storage medium
CN108900779A (en) Initial automatic exposure convergence method, mobile terminal and computer readable storage medium
CN107920242B (en) A kind of optimization method of automatic white balance, terminal and computer readable storage medium
CN108848321A (en) Expose optimization method, device and computer readable storage medium
CN108541046A (en) A kind of network selecting method, terminal and storage medium
CN107734318A (en) A kind of color conditioning method, terminal and computer-readable recording medium
CN108053383A (en) A kind of noise-reduction method, equipment and computer readable storage medium
CN108540697A (en) It is double before and after one kind to take the photograph circuit structure and its mobile terminal
CN107516289A (en) A kind of certificate image acquisition methods and equipment
CN107153549A (en) Icon decoration method, equipment and computer-readable recording medium
CN109508133A (en) Method, terminal and the computer readable storage medium of screen display control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant