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

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

Info

Publication number
CN107920242A
CN107920242A CN201711455864.2A CN201711455864A CN107920242A CN 107920242 A CN107920242 A CN 107920242A CN 201711455864 A CN201711455864 A CN 201711455864A CN 107920242 A CN107920242 A CN 107920242A
Authority
CN
China
Prior art keywords
mentioned
parameter
luminance
awb values
awb
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711455864.2A
Other languages
Chinese (zh)
Other versions
CN107920242B (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 recording medium, the optimization method of automatic white balance includes:Obtain and the statistics corresponding color parameter of point and luminance parameter are preset 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 default amount threshold, optimization processing is judged whether to;If it is determined that optimizing processing, then the first automatic white balance awb values are determined according to color parameter and luminance parameter;According to the first awb values and the luminance weights table that prestores, the awb values after optimization are determined.The optimization method of automatic white balance provided in an embodiment of the present invention, can effectively improve accuracy of the awb values under special screne.

Description

A kind of optimization method of automatic white balance, terminal and computer-readable recording medium
Technical field
The present invention relates to terminal technology, more particularly to a kind of optimization method of automatic white balance, terminal and computer-readable Storage medium.
Background technology
The purpose for carrying out automatic white balance (automatic white balance, awb) processing is by varying terminal The gain of color channel, to the deviation of the misalignment caused by colour temperature environment and terminal intrinsic color channel gains in itself Unified compensation is carried out, so as to allow the image of acquisition correctly to reflect the realistic colour of object.In the prior art, carry out automatic white During the calculating of balance, the corresponding statistics point of current scene, including collection point and light source point are typically counted, 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 shows for common awb value calculating methods 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 square 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 with reference to light source point weight and collection point weight calculation The awb values of acquisition.
However, for some special scenes, such as pure color scene, high brightness scene, counted according to existing method Calculation can not accurately determine awb values distribution situation in R/G, B/G coordinate system, that is to say, that existing for some special screnes Have method obtain awb value accuracys it is low.
The content of the invention
In view of this, an embodiment of the present invention provides a kind of optimization method of automatic white balance, terminal and computer-readable Storage medium, can effectively improve accuracy of the awb values under special screne.
What the technical solution of the embodiment of the present invention was realized in:
An embodiment of the present invention provides a kind of optimization method of automatic white balance, including:
Obtain and the statistics corresponding color parameter of point and luminance parameter are preset 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 default amount threshold, 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 values;
According to the first awb values and the luminance weights table that prestores, the awb values after optimization are determined.
In such scheme, preset in the acquisition current scene statistics corresponding color parameter of point and luminance parameter it Afterwards, the method further includes:
The corresponding 2nd awb values of the current scene are calculated according to the color parameter.
It is described according to the first awb values and the luminance weights table that prestores in such scheme, the awb values after definite optimization, Including:
According to the luminance parameter from the luminance weights table that prestores, corresponding first power of the first awb values is determined Weight values, and corresponding second weighted value of the 2nd awb values;
According to the first awb values, first weighted value, the 2nd awb values and second weighted value, determine Awb values after the optimization.
It is described to be according to the luminance parameter, predetermined luminance threshold value and default amount threshold, judgement in such scheme It is no to optimize processing, including:
By 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 default amount threshold, judge to carry out at the optimization Reason;
When the default statistics point number is less than the default amount threshold, judge without the optimization processing.
It is described that first automatic white balance awb is determined according to the color parameter and the luminance parameter in such scheme Value, including:
Determine that the luminance parameter is more than or equal at least one default statistics point of the predetermined luminance threshold value;
According to the corresponding at least one color parameter of at least one default statistics point, determine described at least one default The corresponding at least one 3rd awb values of statistics point;
The first awb values are determined according at least one 3rd awb values.
It is described according to the first awb values and the luminance weights table that prestores in such scheme, determine the awb values after optimization Afterwards, the method further includes:
Color adjustment is carried out to the current scene according to the awb values after the optimization.
It is described to be according to the luminance parameter, predetermined luminance threshold value and default amount threshold, judgement in such scheme It is no optimize processing after, the method further includes:
If it is determined that without the optimization processing, then color tune is carried out to the current scene according to the 2nd awb values Section.
In such scheme, preset in the acquisition current scene statistics corresponding color parameter of point and luminance parameter it Before, the method further includes:
Determine the default statistics point in the current scene.
An embodiment of the present invention provides a kind of terminal, the terminal includes:Processor, memory and communication bus;Institute State the connection communication that communication bus is used for realization between the processor and the memory;The processor is used to perform described The data sending program stored in memory, to realize the optimization method of automatic white balance as described above.
An embodiment of the present invention provides a kind of computer-readable recording medium, the computer-readable recording medium storage has One or more program, one or more of programs can be performed by one or more processor, to realize as above institute The optimization method for the automatic white balance stated.
It can be seen from the above that in the technical solution of the embodiment of the present invention, obtain and the corresponding color of statistics point is preset 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 default amount threshold, judge whether to optimization processing;If it is determined that optimize processing, then root The first automatic white balance awb values are determined according to color parameter and luminance parameter;According to the first awb values and the luminance weights table that prestores, really Awb values after fixed optimization.It can be seen from the above 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 that statistics point is preset in current scene, If it is determined that optimizing processing, then further according to the calculating of color parameter the first awb values of progress of default statistics point, and with The 2nd awb values that conventional method obtains are combined, and calculate the awb values after being optimized.It is some special so as to solve It can not determine that awb values the problem of distribution situation, effectively improve awb values in special screne in R/G, B/G coordinate system under scene Under accuracy.
Brief description of the drawings
Fig. 1 is common awb value calculating method schematic diagrames;
Fig. 2 is a kind of hardware architecture diagram for the optional mobile terminal for realizing each embodiment of the present invention;
Fig. 3 is a kind of communications network system Organization Chart 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 distributions 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;
The optimization method for the automatic white balance that Fig. 7 proposes for the embodiment of the present invention realizes flow diagram one;
The optimization method for the automatic white balance that Fig. 8 proposes for the embodiment of the present invention realizes flow diagram two;
The optimization method for the automatic white balance that Fig. 9 proposes for the embodiment of the present invention realizes flow diagram three;
The optimization method for the automatic white balance that Figure 10 proposes for the embodiment of the present invention realizes flow diagram four;
The optimization method for the automatic white balance that Figure 11 proposes for the embodiment of the present invention realizes flow diagram five;
The optimization method for the automatic white balance that Figure 12 proposes for the embodiment of the present invention realizes flow diagram six;
The optimization method for the automatic white balance that Figure 13 proposes for the embodiment of the present invention realizes flow diagram seven;
The optimization method for the automatic white balance that Figure 14 proposes for the embodiment of the present invention realizes flow diagram eight;
Figure 15 is the composition structure diagram for the terminal that the embodiment of the present invention proposes.
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 follow-up description, the suffix using such as " module ", " component " or " unit " for representing element is only Be conducive to the explanation of the present 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 can include such as mobile phone, tablet Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. move Dynamic terminal, and the fixed terminal such as numeral TV, desktop computer.
It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated by those skilled in the art that except special Outside element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 2, its hardware configuration signal for a kind of optional mobile terminal of each embodiment of the realization present invention Figure, the mobile terminal 100 can 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 form the restriction to mobile terminal, it is mobile whole End can be included than illustrating more or fewer components, either combine some components or different components arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 2:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station Downlink information receive after, handled to processor 110;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, penetrate Frequency unit 101 can also be communicated by wireless communication with network and other equipment.Above-mentioned wireless communication can use any communication Standard or agreement, include 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 division it is 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, browse webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 2 Show Wi-Fi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can basis Need to omit in the essential scope for do not change invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 Formula, speech recognition mode, broadcast reception mode when under isotype, by radio frequency unit 101 or Wi-Fi module 102 it is receiving or It is sound that the voice data that person stores in memory 109, which is converted into audio signal and exports,.Moreover, audio output unit 103 can also provide with mobile terminal 100 perform the relevant audio output of specific function (for example, call signal receive sound, Message sink sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input units 104 are used to receive audio or video signal.A/V input units 104 can include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) carry out Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited Storage is transmitted 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 (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound The noise produced 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 one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification 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 ray sensor, details are not described herein.
Display unit 106 is used for the information for showing by information input by user or being supplied to 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) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is related.Specifically, user input unit 107 may include contact panel 1071 with And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect user on it or neighbouring touch operation (for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071 Neighbouring operation), and corresponding attachment device is driven according to formula set in advance.Contact 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 Contact coordinate is converted into, then gives processor 110, and the order that processor 110 is sent can be received and performed.In addition, can To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, operation lever etc. One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, when contact 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, contact panel 1071 and display panel 1061 be the component independent as two to realize the function that outputs and inputs of mobile terminal, but in certain embodiments, can The function that outputs and inputs of mobile terminal is realized so that contact panel 1071 and display panel 1061 is integrated, is not done herein specifically Limit.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.For example, External device (ED) can include wired or wireless head-band earphone 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 storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, 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 whole mobile terminal of connection A part, by running or performing the software program and/or module that are stored in memory 109, and calls and is stored in storage Data in device 109, perform the various functions and processing data of mobile terminal, so as to carry out integral monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle 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) to all parts power supply, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put The function 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.
For the ease of understanding the embodiment of the present invention, below to the communications network system that is based on of mobile terminal of the present invention into Row description.
Referring to Fig. 3, Fig. 3 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system Unite includes communicating the user equipment (User of connection successively for the LTE system of universal mobile communications technology, the LTE system 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 business.
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 connected with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 can 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 between EPC203, there is provided carrying and connection management.HSS2032 is all to manage for providing some registers Such as the function of attaching position register (not shown) etc, and preserve some and used in relation to service features, data rate etc. The dedicated information in family.All customer data can be transmitted by SGW2034, and PGW2035 can provide the IP of UE 201 Address is distributed and other functions, and PCRF2036 is strategy and the charging control strategic decision-making of business data flow and IP bearing resources Point, it selects and provides available strategy and charging control decision-making with charge execution function unit (not shown) for strategy.
IP operation 204 can 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 it is to be understood that the present invention not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And following new network system etc., do not limit herein.
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 pattern is a kind of color standard of industrial quarters, is by red (R), green (G), the change of blue (B) three Color Channels and their mutual superpositions obtain miscellaneous color, and RGB is It is the color for representing three passages of red, green, blue, this standard almost includes all colours that human eyesight can perceive, is At present with one of most wide color system.
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 is also different, wherein, R values, G values, the numerical value of B values maximum are 255, and minimum numerical value is 0.
Fig. 5 is the corresponding RGB numeric distributions 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 to be mixed 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.
The optimization method for the automatic white balance that Fig. 7 proposes for the embodiment of the present invention realizes flow diagram one, such as Fig. 7 institutes Show, in an embodiment of the present invention, the method for terminal optimized awb values may comprise steps of:
Step 101, obtain and the statistics corresponding color parameter of point and luminance parameter preset 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 Number and luminance parameter.Wherein, above-mentioned color parameter can be above-mentioned default statistics point corresponding rgb value, i.e. red R value, green G Value and blueness B values, 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 can 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 State current scene and be acquired the 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 to be configured with the camera terminal of camera, For example, above-mentioned terminal can be to be configured with mobile phone, smart camera, tablet computer of camera etc..
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 corresponds to a color parameter and a luminance parameter respectively.
Step 102, according to luminance parameter, predetermined luminance threshold value and default amount threshold, judge whether at optimization Reason.
In an embodiment of the present invention, above-mentioned terminal above-mentioned default statistics in above-mentioned current scene is obtained is put on corresponding , can be according to above-mentioned luminance parameter, predetermined luminance threshold value and default 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 pre-set a predetermined luminance threshold value, together When can pre-set a default amount threshold, so as to according to above-mentioned predetermined luminance threshold value and above-mentioned default amount threshold 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 default amount threshold, judge whether above-mentioned current scene is some special screnes that can not obtain accurate awb values, So as 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 values.
In an embodiment of the present invention, above-mentioned terminal according to above-mentioned luminance parameter, above-mentioned predetermined luminance threshold value and on Default amount threshold is stated, after judging whether to optimization processing, if it is decided that carry out above-mentioned optimization processing, then above-mentioned terminal First automatic white balance awb values 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 the judgement of optimization processing is made whether, 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 The high statistics point of brightness is determined in default statistics point, and is calculated according to above-mentioned color parameter and obtained the high statistics point of the brightness Awb values, and then determine above-mentioned first automatic white balance awb values.
Step 104, according to the first awb values and the luminance weights table that prestores, determine the awb values after optimization.
In an embodiment of the present invention, if it is decided that carry out above-mentioned optimization processing, 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 values Luminance weights table is deposited, determines the awb values after 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 values is set.Specifically, in an embodiment of the present invention, brightness value is higher indexes smaller, brightness Value is lower, and index is bigger.
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 of definite above-mentioned current scene, then further obtained according to above-mentioned luminance parameter corresponding with above-mentioned luminance parameter Above-mentioned predetermined luminance weighted value table, according to above-mentioned predetermined luminance weighted value table and above-mentioned first awb values, to determine above-mentioned optimization Awb values afterwards.
The optimization method for the automatic white balance that Fig. 8 proposes for the embodiment of the present invention realizes flow diagram two, such as Fig. 8 institutes Show, in an embodiment of the present invention, above-mentioned terminal determines above-mentioned according to above-mentioned first awb values and the above-mentioned luminance weights table that prestores After awb values after optimization, i.e., after step 104, the method for terminal optimized awb values can also comprise the following steps:
Step 105, according to the awb values after optimization to current scene carry out color adjustment.
In an embodiment of the present invention, above-mentioned terminal is according to above-mentioned first awb values and the above-mentioned luminance weights table that prestores, really After awb values after fixed above-mentioned optimization, color tune can be carried out to above-mentioned current scene according to the awb values after above-mentioned optimization Section.
Specifically, in an embodiment of the present invention, the awb values after above-mentioned optimization can be used 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 values determine the above-mentioned default statistics corresponding R offsets of point and B offsets respectively, then further according to above-mentioned R offsets and Above-mentioned B offsets, are respectively adjusted the R values and B values of above-mentioned default statistics point.
The optimization method for the automatic white balance that Fig. 9 proposes for the embodiment of the present invention realizes flow diagram three, such as Fig. 9 institutes Show, in an embodiment of the present invention, above-mentioned terminal, which obtains, presets the statistics corresponding color parameter of point and brightness ginseng in current scene Before number, i.e., before step 101, the method for terminal optimized awb values can also comprise the following steps:
Step 106, determine default statistics point in current scene.
In an embodiment of the present invention, above-mentioned terminal preset in current scene is obtained 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 can 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 State current scene and be acquired the 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, the camera that above-mentioned collection point can be for above-mentioned terminal by configuring Division acquisition is carried out to above-mentioned current scene.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, the camera that above-mentioned light source point can be for above-mentioned terminal by configuring Acquisition is detected to above-mentioned current scene.Specifically, in an embodiment of the present invention, above-mentioned terminal can be to above-mentioned current Scene carries out determining for gray value, so that the ambient light source point in above-mentioned current scene can be determined according to gray value.
The optimization method for the automatic white balance that the embodiment of the present invention proposes, it is corresponding to obtain default statistics point in current scene 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 default amount threshold, judge whether to optimization processing;If it is determined that processing is optimized, then First automatic white balance awb values are determined according to color parameter and luminance parameter;According to the first awb values and the luminance weights table that prestores, Determine the awb values after optimization.It can be seen from the above 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 that statistics point is preset in current scene, if it is decided that optimizes processing, then The calculating of the first awb values, and the 2nd awb values obtained with conventional method are further carried out according to the color parameter of default statistics point It is combined, calculates the awb values after being optimized.So as to solve under some special scenes awb values can not be determined in R/ G, in B/G coordinate systems the problem of distribution situation, accuracy of the awb values under special screne is effectively improved.
Embodiment two
Based on above-described embodiment one, Figure 10 is the realization stream of the optimization method for the automatic white balance that the embodiment of the present invention proposes 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 values can also comprise the following steps:
Step 107, calculate the corresponding 2nd awb values of current scene according to color parameter.
In an embodiment of the present invention, above-mentioned terminal above-mentioned default statistics point in terminal obtains above-mentioned current scene 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 above-mentioned color parameter is obtained The awb values obtained in above-mentioned current scene, i.e., above-mentioned 2nd awb values 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 with light source point in R/G, B/G coordinate system, then can distributes 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 values.
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 values of above-mentioned terminal, and B is the blue channel B values of above-mentioned terminal, and G is above-mentioned terminal Green channel G values.
It should be noted that in an embodiment of the present invention, D1 can be used for embodying warm colour colour temperature, correspondingly, D2) 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 Method realizes flow diagram five, and 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 default amount threshold, after judging whether to optimization processing, i.e., after step 102, terminal optimized awb The method of value can also comprise the following steps:
Step 108, if it is determined that without optimization processing, then color adjustment is carried out to current scene according to the 2nd awb values.
In an embodiment of the present invention, above-mentioned terminal according to above-mentioned luminance parameter, above-mentioned predetermined luminance threshold value and on Default amount threshold 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 according to above-mentioned 2nd awb values to above-mentioned current scene.
Specifically, in an embodiment of the present invention, above-mentioned 2nd awb values 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 values Determine above-mentioned default statistics point corresponding R offsets and B offsets, then further compensated according to above-mentioned R offsets and above-mentioned B Value, is respectively adjusted the R values and B values of above-mentioned default statistics point.
The optimization method for the automatic white balance that the embodiment of the present invention proposes, it is corresponding to obtain default statistics point in current scene 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 default amount threshold, judge whether to optimization processing;If it is determined that processing is optimized, then First automatic white balance awb values are determined according to color parameter and luminance parameter;According to the first awb values and the luminance weights table that prestores, Determine the awb values after optimization.It can be seen from the above 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 that statistics point is preset in current scene, if it is decided that optimizes processing, then The calculating of the first awb values, and the 2nd awb values obtained with conventional method are further carried out according to the color parameter of default statistics point It is combined, calculates the awb values after being optimized.So as to solve under some special scenes awb values can not be determined in R/ G, in B/G coordinate systems the problem of distribution situation, accuracy of the awb values under special screne is effectively improved.
Embodiment three
Based on above-described embodiment two, Figure 12 is the realization stream of the optimization method for the automatic white balance that the embodiment of the present invention proposes 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 values and above-mentioned prestores Luminance weights table, determines that the method for the awb values after above-mentioned optimization may comprise steps of:
Step 104a, according to luminance parameter from the luminance weights table that prestores, corresponding first weight of the first awb values is determined Value, and corresponding second weighted value of the 2nd awb values.
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 values, while after calculating the corresponding 2nd awb values of above-mentioned current scene according to above-mentioned color parameter, From the above-mentioned luminance weights table that prestores, to determine corresponding first weighted value of above-mentioned first awb values according to above-mentioned luminance parameter, and Corresponding second weighted value of above-mentioned 2nd awb values.
Specifically, in an embodiment of the present invention, it is also different for different luminance parameters, corresponding weighted value.Specifically Ground, in an embodiment of the present invention, above-mentioned terminal can prestore the above-mentioned luminance weights value table that prestores, then according to above-mentioned One awb values and above-mentioned 2nd awb values, determine above-mentioned first weighted value and above-mentioned from the above-mentioned luminance weights value table that prestores respectively 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 values , correspondingly, above-mentioned second weighted value is corresponding with above-mentioned 2nd awb values.
Step 104b, according to the first awb values, the first weighted value, the 2nd awb values and the second weighted value, determine after optimizing Awb values.
In an embodiment of the present invention, above-mentioned terminal according to above-mentioned luminance parameter from the above-mentioned luminance weights table that prestores, After determining corresponding first weighted value of above-mentioned first awb values, and corresponding second weighted value of above-mentioned 2nd awb values, Ke Yigen According to above-mentioned first awb values, above-mentioned first weighted value, above-mentioned 2nd awb values and above-mentioned second weighted value, after determining above-mentioned optimization Awb values.
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 average computation, so that after can obtaining above-mentioned optimization to above-mentioned first awb values and above-mentioned 2nd awb values Awb values.
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, by above-mentioned step 104a~104b, above-mentioned terminal is according to luminance parameter from pre- Deposit in luminance weights table, determine corresponding first weighted value of the first awb values, and corresponding second weighted value of the 2nd awb values;According to First awb values, the first weighted value, the 2nd awb values and the second weighted value, determine the awb values after optimization.It can be seen from the above that this hair A kind of optimization method for automatic white balance that bright embodiment proposes, can be according to the luminance parameter that statistics point is preset 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 values of row, and the 2nd awb values obtained with conventional method are combined, and calculate the awb values after being optimized. So as to solve the problems, such as not determining awb values distribution situation in R/G, B/G coordinate system under some special scenes, effectively Improve accuracy of the awb values under special screne in ground.
Example IV
Based on above-described embodiment one, Figure 13 is the realization stream of the optimization method for the automatic white balance that the embodiment of the present invention proposes Journey schematic diagram seven, as shown in figure 13, in an embodiment of the present invention, above-mentioned terminal is according to above-mentioned luminance parameter, above-mentioned default bright Degree threshold value and above-mentioned default amount threshold, the method for judging whether to optimization processing may comprise steps of:
Step 102a, by comparison brightness 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 in above-mentioned current scene is obtained is put on corresponding 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 default amount threshold, judgement optimizes processing.
In an embodiment of the present invention, above-mentioned terminal is by more 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, can again will be above-mentioned Default statistics point number is compared with above-mentioned default amount threshold, so as to judge whether to above-mentioned optimization processing.
Further, in an embodiment of the present invention, above-mentioned default statistics is put number and above-mentioned present count by above-mentioned terminal After amount threshold value is compared, if above-mentioned default statistics point number is more than or equal to above-mentioned default amount threshold, then Above-mentioned terminal can judge to carry out above-mentioned optimization processing.
Step 102c, when default statistics point number is less than default amount threshold, judge without optimization processing.
In an embodiment of the present invention, above-mentioned terminal is by more 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, can again will be above-mentioned Default statistics point number is compared with above-mentioned default amount threshold, so as to judge whether to above-mentioned optimization processing.
Further, in an embodiment of the present invention, above-mentioned default statistics is put number and above-mentioned present count by above-mentioned terminal After amount threshold value is compared, if above-mentioned default statistics point number is less than above-mentioned default amount threshold, then above-mentioned terminal It can judge without above-mentioned optimization processing.
According to the description above, by above-mentioned step 102a~102c, above-mentioned terminal passes through comparison brightness 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 default amount threshold, judgement optimizes processing;Preset when default statistics point number is less than During amount threshold, judge without optimization processing.A kind of it can be seen from the above that optimization for automatic white balance that the embodiment of the present invention proposes Method, can judge whether to optimization processing, if it is decided that carry out according to the luminance parameter that statistics point is preset in current scene Optimization processing, then further carry out the calculating of the first awb values according to the color parameter of default statistics point, and is obtained with conventional method The 2nd awb values be combined, calculate optimized after awb values.So as to which solve can not be true under some special scenes Determine awb values and the problem of distribution situation, effectively improve accuracy of the awb values under special screne in R/G, B/G coordinate system.
Embodiment five
Based on above-described embodiment one, Figure 14 is the realization stream of the optimization method for the automatic white balance that the embodiment of the present invention proposes 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 Number determines that the method for above-mentioned first automatic white balance awb values may comprise steps of:
Step 201, determine 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 Default amount threshold 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 judging 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 first can determine that the higher statistics point of brightness is further handled from above-mentioned default statistics point.
Step 202, according to the corresponding at least one color parameter of at least one default statistics point, determine at least one default The corresponding at least one 3rd awb values of statistics point.
In an embodiment of the present invention, above-mentioned terminal is more than or equal to above-mentioned predetermined luminance in definite above-mentioned luminance parameter , can be according to the corresponding at least one color of above-mentioned at least one default statistics point after at least one default statistics point of threshold value Parameter, determines the corresponding at least one 3rd awb values of above-mentioned at least one default statistics point.
Further, in an embodiment of the present invention, above-mentioned terminal can be selected from above-mentioned color parameter with it is above-mentioned The corresponding at least one color parameter of at least one default statistics point, then carries out awb according to above-mentioned at least one color parameter The calculating of value, so that at least one awb values can be obtained, that is, obtains above-mentioned at least one default statistics point corresponding at least one A 3rd awb values.
Step 203, according at least one 3rd awb values determine the first awb values.
In an embodiment of the present invention, above-mentioned terminal is corresponding at least one according to above-mentioned at least one default statistics point Color parameter, can be according to above-mentioned after determining the corresponding at least one 3rd awb values of above-mentioned at least one default statistics point At least one 3rd awb values determine above-mentioned first awb values.
Further, in an embodiment of the present invention, above-mentioned terminal calculate obtain above-mentioned at least one 3rd awb values it Afterwards, it can further be calculated according to above-mentioned at least one 3rd awb values and obtain above-mentioned first awb values.Specifically, the present invention's In embodiment, above-mentioned terminal can carry out above-mentioned at least one 3rd awb values average computation, and by the above-mentioned at least one 3rd The average value of awb values is as above-mentioned first awb values.
The optimization method for the automatic white balance that the embodiment of the present invention proposes, it is corresponding to obtain default statistics point in current scene 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 default amount threshold, judge whether to optimization processing;If it is determined that processing is optimized, then First automatic white balance awb values are determined according to color parameter and luminance parameter;According to the first awb values and the luminance weights table that prestores, Determine the awb values after optimization.It can be seen from the above 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 that statistics point is preset in current scene, if it is decided that optimizes processing, then The calculating of the first awb values, and the 2nd awb values obtained with conventional method are further carried out according to the color parameter of default statistics point It is combined, calculates the awb values after being optimized.So as to solve under some special scenes awb values can not be determined in R/ G, in B/G coordinate systems the problem of distribution situation, accuracy of the awb values under special screne is effectively improved.
Embodiment six
Based on above-described embodiment one to embodiment five, Figure 15 is the composition structural representation 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 correspond to processor 110 and memory 109 in above-mentioned figure one respectively.Specific During embodiment, above-mentioned processor 31 can be application-specific IC (Application Specific Integrated Circuit, ASIC), digital signal processor (Digital Signal Processor, DSP), numeral 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 being used for realization 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 used for realization the connection between processor 31 and memory 32 Communication;Above-mentioned processor 31 is used for the optimization program for performing the automatic white balance stored in memory 32, to realize following steps:
Obtain and the statistics corresponding color parameter of point and luminance parameter are preset 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 default amount threshold, judge 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 values;According to the first awb values and the luminance weights table that prestores, the awb values after optimization are determined.
In an embodiment of the present invention, further, above-mentioned processor 31, is additionally operable to obtain and statistics is preset in current scene After the corresponding color parameter of point and luminance parameter, the corresponding 2nd awb values of current scene are 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 Spend in weight table, determine corresponding first weighted value of the first awb values, and corresponding second weighted value of the 2nd awb values;And according to First awb values, the first weighted value, the 2nd awb values and the second weighted value, determine the awb values after optimization.
In an embodiment of the present invention, further, above-mentioned processor 31, also particularly useful for by comparison brightness 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 default amount threshold, judgement optimizes processing;And when default statistics point number is small When default amount threshold, judge without optimization processing.
In an embodiment of the present invention, further, above-mentioned processor 31, be more than also particularly useful for definite luminance parameter 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 the corresponding at least one 3rd awb values of at least one default statistics point;And according at least one 3rd Awb values determine the first awb values.
In an embodiment of the present invention, further, above-mentioned processor 31, is additionally operable to according to the first awb values and prestores bright Weight table is spent, after determining the awb values after optimization, color adjustment is carried out to current scene according to the awb values after optimization.
In an embodiment of the present invention, further, above-mentioned processor 31, is additionally operable to according to luminance parameter, predetermined luminance Threshold value and default amount threshold, after judging whether to optimization processing, if it is determined that without optimization processing, then according to second Awb values carry out color adjustment to current scene.
In an embodiment of the present invention, further, above-mentioned processor 31, is additionally operable to obtain and statistics is preset 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 the statistics corresponding color parameter of point and brightness ginseng is preset 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 default amount threshold, 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 values;According to the first awb values and the luminance weights table that prestores, the awb after optimization is determined Value.It can be seen from the above that the terminal that the embodiment of the present invention proposes, can judge according to the luminance parameter that statistics point is preset 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 values, and the 2nd awb values obtained with conventional method are combined, and calculate the awb values after being optimized.So as to It can solve the problems, such as determine awb values distribution situation in R/G, B/G coordinate system under some special scenes, effectively carry Accuracy of the high awb values under special screne.
The embodiment of the present invention provides a kind of computer-readable recording medium, and above computer readable storage medium storing program for executing is stored with one A either multiple program said ones or multiple programs can be performed by one or more processor, applied in terminal, be somebody's turn to do The method such as embodiment one to embodiment five is realized when program is executed by processor.
Specifically, a kind of corresponding programmed instruction of optimization method of automatic white balance in the present embodiment can be stored On the storage mediums such as CD, hard disk, USB flash disk, when 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:
Obtain and the statistics corresponding color parameter of point and luminance parameter are preset 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 default amount threshold, optimization processing is judged whether to;
If it is determined that optimizing processing, then the first automatic white balance awb values are determined according to color parameter and luminance parameter;
According to the first awb values and the luminance weights table that prestores, the awb values after optimization are determined.
In an embodiment of the present invention, further, obtain in current scene preset the statistics corresponding color parameter of point and After luminance parameter, either multiple programs can also be performed said one by said one or multiple processors, following to realize Step:
The corresponding 2nd awb values of current scene are calculated according to color parameter.
In an embodiment of the present invention, further, according to the first awb values and the luminance weights table that prestores, determine after optimizing Awb values when, either multiple programs are performed said one by said one or multiple processors, implement following steps:
According to luminance parameter from the luminance weights table that prestores, corresponding first weighted value of the first awb values, and second are determined Corresponding second weighted value of awb values;
According to the first awb values, the first weighted value, the 2nd awb values and the second weighted value, the awb values after optimization are determined.
In an embodiment of the present invention, further, according to luminance parameter, predetermined luminance threshold value and default quantity threshold Value, when judging whether to optimization processing, either multiple programs are performed said one by said one or multiple processors, tool Body realizes following steps:
By comparison brightness 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 default amount threshold, judgement optimizes processing;
When default statistics point number is less than default amount threshold, judge 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 During awb values, either multiple programs are performed said one 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;
According to the corresponding at least one color parameter of at least one default statistics point, at least one default statistics point pair is determined At least one 3rd awb values answered;
First awb values are determined according at least one 3rd awb values.
In an embodiment of the present invention, further, according to the first awb values and the luminance weights table that prestores, determine after optimizing Awb values after, to realize following steps:
Color adjustment is carried out to current scene according to the awb values after optimization.
In an embodiment of the present invention, further, according to luminance parameter, predetermined luminance threshold value and default quantity threshold Value, after judging whether to optimization processing, to realize following steps:
If it is determined that without optimization processing, then color adjustment is carried out to current scene according to the 2nd awb values.
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 realize following steps:
Determine the default statistics point in current scene.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And other elements that are not explicitly listed are further included, or further include as this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Also there are other identical element in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme substantially in other words does the prior art Going out the part of contribution can be embodied in the form of software product, which is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal (can be mobile phone, computer, services Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The embodiment of the present invention is described above in conjunction with attached drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned embodiment is only schematical, rather than restricted, those of ordinary skill in the art Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make very much Form, these are belonged within the protection of the present invention.

Claims (10)

  1. A kind of 1. optimization method of automatic white balance, it is characterised in that the described method includes:
    Obtain and the statistics corresponding color parameter of point and luminance parameter are preset 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 default amount threshold, optimization processing is judged whether to;
    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 values;
    According to the first awb values and the luminance weights table that prestores, the awb values after optimization are determined.
  2. 2. according to the method described in claim 1, it is characterized in that, the corresponding color of statistics point is preset in the acquisition current scene After colour parameter and luminance parameter, the method further includes:
    The corresponding 2nd awb values of the current scene are calculated according to the color parameter.
  3. It is 3. according to the method described in claim 2, it is characterized in that, described according to the first awb values and the luminance weights that prestore Table, determines the awb values after optimization, including:
    According to the luminance parameter from the luminance weights table that prestores, corresponding first weighted value of the first awb values is determined, Corresponding second weighted value with the 2nd awb values;
    According to the first awb values, first weighted value, the 2nd awb values and second weighted value, determine described Awb values after optimization.
  4. 4. according to the method described in claim 1, it is characterized in that, it is described according to the luminance parameter, predetermined luminance threshold value with And default amount threshold, optimization processing is judged whether to, including:
    By 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 default amount threshold, judge to carry out the optimization processing;
    When the default statistics point number is less than the default amount threshold, judge without the optimization processing.
  5. It is 5. according to the method described in claim 1, it is characterized in that, described true according to the color parameter and the luminance parameter Fixed first automatic white balance awb values, including:
    Determine that the luminance parameter is more than or equal at least one default statistics point of the predetermined luminance threshold value;
    According to the corresponding at least one color parameter of at least one default statistics point, at least one default statistics is determined The corresponding at least one 3rd awb values of point;
    The first awb values are determined according at least one 3rd awb values.
  6. It is 6. according to the method described in claim 1, it is characterized in that, described according to the first awb values and the luminance weights that prestore Table, after determining the awb values after optimization, the method further includes:
    Color adjustment is carried out to the current scene according to the awb values after the optimization.
  7. 7. 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 default amount threshold, after judging whether to optimization processing, the method further includes:
    If it is determined that without the optimization processing, then color adjustment is carried out to the current scene according to the 2nd awb values.
  8. 8. according to the method described in claim 1, it is characterized in that, the corresponding color of statistics point is preset in the acquisition current scene Before colour parameter and luminance parameter, the method further includes:
    Determine the default statistics point in the current scene.
  9. 9. a kind of terminal, it is characterised in that the terminal includes:Processor, memory and communication bus;The communication bus The connection communication being used for realization between the processor and the memory;The processor is used to perform to deposit in the memory The data sending program of storage, to realize such as claim 1-8 any one of them methods.
  10. A kind of 10. computer-readable recording medium, it is characterised in that the computer-readable recording medium storage have one or Multiple programs, one or more of programs can be performed by one or more processor, to realize that claim 1-8 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 true CN107920242A (en) 2018-04-17
CN107920242B 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)

Cited By (2)

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

Citations (4)

* 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
US20160364848A1 (en) * 2015-06-12 2016-12-15 Gopro, Inc. Global tone mapping
CN106797453A (en) * 2014-07-08 2017-05-31 富士胶片株式会社 Image processing apparatus, camera head, image processing method and image processing program

Patent Citations (4)

* 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
US20160364848A1 (en) * 2015-06-12 2016-12-15 Gopro, Inc. Global tone mapping
CN105227944A (en) * 2015-09-25 2016-01-06 联想(北京)有限公司 A kind of information processing method and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110505459A (en) * 2019-08-16 2019-11-26 域鑫科技(惠州)有限公司 Suitable for the image color correction method of endoscope, device and storage medium
WO2021031458A1 (en) * 2019-08-16 2021-02-25 域鑫科技(惠州)有限公司 Method and device for image color correction applicable in endoscope, and storage medium
CN112788324A (en) * 2021-02-26 2021-05-11 广东以诺通讯有限公司 White balance method, system and terminal for pure color scene

Also Published As

Publication number Publication date
CN107920242B (en) 2019-08-16

Similar Documents

Publication Publication Date Title
CN107438163A (en) A kind of photographic method, terminal and computer-readable recording medium
CN107463481A (en) Data interactive method, mobile terminal and storage medium
CN107479781A (en) A kind of update method and terminal of application icon color
CN107566635A (en) Screen intensity method to set up, mobile terminal and computer-readable recording medium
CN107613489A (en) A kind of wireless charging method, hotspot equipment, terminal and storage medium
CN107315515A (en) Color change method, terminal and the computer-readable recording medium of status bar icon
CN109377531A (en) Image color cast method of adjustment, device, mobile terminal and readable storage medium storing program for executing
CN108230270A (en) A kind of noise-reduction method, terminal and computer readable storage medium
CN107104886A (en) A kind of information indicating method, equipment and computer-readable recording 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
CN107995060A (en) Audio frequency of mobile terminal test method, device and computer-readable recording medium
CN107464515A (en) Screen brightness regulation method, mobile terminal and storage medium
CN108307483A (en) wireless network connecting method and mobile terminal
CN107608613A (en) A kind of method and terminal for preventing maloperation
CN108040240A (en) The method, apparatus and mobile terminal of a kind of blank level adjustment
CN107423065A (en) Method, mobile terminal and the computer-readable recording medium that a kind of application is attended to anything else
CN107580120A (en) The recording method of running route and mobile terminal
CN107920242B (en) A kind of optimization method of automatic white balance, terminal and computer readable storage medium
CN107734318A (en) A kind of color conditioning method, terminal and computer-readable recording medium
CN109817130A (en) A kind of colour temperature regulation method, equipment and computer readable storage medium
CN108053383A (en) A kind of noise-reduction method, equipment and computer readable storage medium
CN107911620A (en) Definite method, terminal and the computer-readable recording medium of a kind of white balance
CN107833190A (en) A kind of parameter determination method, terminal and computer-readable recording medium
CN108093233A (en) A kind of image processing method, terminal and computer readable storage medium

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