CN107911620A - Definite method, terminal and the computer-readable recording medium of a kind of white balance - Google Patents
Definite method, terminal and the computer-readable recording medium of a kind of white balance Download PDFInfo
- Publication number
- CN107911620A CN107911620A CN201711461402.1A CN201711461402A CN107911620A CN 107911620 A CN107911620 A CN 107911620A CN 201711461402 A CN201711461402 A CN 201711461402A CN 107911620 A CN107911620 A CN 107911620A
- Authority
- CN
- China
- Prior art keywords
- threshold value
- value
- scene
- default
- rgb
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
- H04N23/84—Camera processing pipelines; Components thereof for processing colour signals
- H04N23/88—Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Color Television Image Signal Generators (AREA)
Abstract
The embodiment of the invention discloses a kind of definite method of white balance, this method applies a terminal, and this method includes:Obtain the image that the camera of terminal collects;Determine the corresponding luminance parameter of each pixel of image;Obtain the threshold value of predetermined luminance parameter;According to the threshold value of predetermined luminance parameter, the selected pixels point from each pixel;According to the rgb value of the pixel selected, calculated using default white balance algorithm, obtain the white balance of image.The embodiment of the present invention further simultaneously discloses a kind of terminal and computer-readable recording medium.The larger technical problem of aberration between the color of the image caused by the definite method of existing white balance and the color of reality is avoided, improves the visual effect of image.
Description
Technical field
The present invention relates to the definite technology of the white balance of image, more particularly to a kind of definite method of white balance, terminal and
Computer-readable recording medium.
Background technology
At present, in the terminal, camera, can shadow due to being influenced be subject to light in collection environment when collecting image
Ring the white balance of the image collected.
In practical applications, under dark scene or under bright scene, according to each pixel collected it is red (R,
Red) green (G, Green) indigo plant (B, Blue) value, is calculated using white balance algorithm, obtains the white balance of image, however, passing through
The above method, the rgb value of dark scene and the pixel of bright scene is taken into account so that the color and reality of obtained image
Aberration between the color on border is larger, have impact on the effect of image;It can thus be seen that the definite method meeting of existing white balance
Cause the aberration between the color of image and the color of reality larger, influence the visual effect of image.
The content of the invention
In view of this, it is a primary object of the present invention to propose that definite method, terminal and the computer of a kind of white balance can
Read storage medium, it is intended to avoid existing white balance definite method can cause image color and reality color between color
The larger technical problem of difference, improves the visual effect of image.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
In a first aspect, the embodiment of the present invention provides a kind of definite method of white balance, the method is applied to a terminal, wraps
Include:Obtain the image that the camera of the terminal collects;Determine the corresponding luminance parameter of each pixel of described image;Obtain
The threshold value of predetermined luminance parameter;According to the threshold value of the predetermined luminance parameter, the selected pixels point from each pixel;According to
The RGB rgb value of the pixel selected, is calculated using default white balance algorithm, obtains the white flat of described image
Weighing apparatus.
Alternatively, the luminance parameter is brightness value;Accordingly, the threshold value for obtaining predetermined luminance parameter, including:Obtain
The threshold value of the brightness value of default dark scene is taken, and/or, the threshold value of the brightness value of the default bright scene of acquisition.
Alternatively, the threshold value according to the predetermined luminance parameter, the selected pixels point from each pixel, bag
Include:The corresponding pixel of threshold value that brightness value is more than the brightness value of default dark scene is selected from each pixel;Or
Person, selects the corresponding pixel of threshold value that brightness value is less than the brightness value of default bright scene from each pixel;Or
Person, brightness value is selected from each pixel and is more than the threshold value for the brightness value for presetting dark scene and less than default bright field
The corresponding pixel of threshold value of the brightness value of scape.
Alternatively, the luminance parameter is rgb value;Accordingly, the threshold value for obtaining predetermined luminance parameter, including:Obtain
The threshold value of the rgb value of default dark scene is taken, and/or, the threshold value of the rgb value of the default bright scene of acquisition.
Alternatively, the threshold value according to the predetermined luminance parameter, the selected pixels point from each pixel, bag
Include:The corresponding pixel of threshold value that rgb value is all higher than the rgb value of default dark scene is selected from each pixel;Or
Person, selects the corresponding pixel of threshold value that rgb value is respectively less than the rgb value of default bright scene from each pixel;Or
Person, rgb value is selected from each pixel and is all higher than presetting the threshold value of the rgb value of dark scene and is respectively less than default bright
The corresponding pixel of threshold value of the rgb value of scene.
Alternatively, the threshold value of the brightness value for obtaining default dark scene, including:The model of the camera is obtained,
The threshold value of the brightness value of the corresponding dark scene of the model of the camera is determined as to the brightness value of the default dark scene
Threshold value;The threshold value of the brightness value for obtaining default bright scene, including:The model of the camera is obtained, is taken the photograph described
As the threshold value of the brightness value of the corresponding bright scene of the model of head is determined as the threshold value of the brightness value of the default bright scene;Institute
The threshold value for the rgb value for obtaining default dark scene is stated, including:The model of the camera is obtained, by the model of the camera
The threshold value of the rgb value of corresponding dark scene is determined as the threshold value of the rgb value of the default dark scene;The acquisition is default bright
The threshold value of the rgb value of bright field scape, including:The model of the camera is obtained, by the corresponding bright field of the model of the camera
The threshold value of the rgb value of scape is determined as the threshold value of the rgb value of the default bright scene.
Alternatively, the threshold value of the brightness value for obtaining default dark scene, including:The colour temperature of described image is obtained, will
The threshold value of the brightness value of the corresponding dark scene of colour temperature of described image is determined as the threshold of the brightness value of the default dark scene
Value;The threshold value of the brightness value for obtaining default bright scene, including:The colour temperature of described image is obtained, by the color of described image
The threshold value of the brightness value of the corresponding bright scene of temperature is determined as the threshold value of the brightness value of the default bright scene;It is described to obtain in advance
If the threshold value of the rgb value of dark scene, including:The colour temperature of described image is obtained, by the corresponding dark field of the colour temperature of described image
The threshold value of the rgb value of scape is determined as the threshold value of the rgb value of the default dark scene;The RGB for obtaining default bright scene
The threshold value of value, including:The colour temperature of described image is obtained, by the threshold value of the rgb value of the corresponding bright scene of the colour temperature of described image
It is determined as the threshold value of the rgb value of the default bright scene.
Alternatively, the threshold value of the brightness value for obtaining default dark scene, including:Receive the threshold of scene set brightness value
The threshold value of the brightness value of the dark scene carried in described instruction, is determined as the brightness of the default dark scene by the instruction of value
The threshold value of value;The threshold value of the brightness value for obtaining default bright scene, including:Receive the finger of the threshold value of scene set brightness value
The threshold value of the brightness value of the bright scene carried in described instruction, is determined as the threshold of the brightness value of the default bright scene by order
Value;The threshold value of the rgb value for obtaining default dark scene, including:The instruction of the threshold value of scene set rgb value is received, by institute
State the rgb value of dark scene carried in instruction threshold value be determined as the default dark scene rgb value threshold value;It is described to obtain
The threshold value of the rgb value of default bright scene is taken, including:The instruction of the threshold value of scene set rgb value is received, will be taken in described instruction
The threshold value of the rgb value of the bright scene of band is determined as the threshold value of the rgb value of the default bright scene.
Second aspect, the embodiment of the present invention provide a kind of terminal, and it is total that the terminal includes processor, memory and communication
Line;The communication bus is used for realization the connection communication between processor and memory;The processor is used to perform memory
The definite program of the white balance of middle storage, to realize following steps:
Obtain the image that the camera of the terminal collects;Determine the corresponding brightness ginseng of each pixel of described image
Number;Obtain the threshold value of predetermined luminance parameter;According to the threshold value of the predetermined luminance parameter, the selected pixels from each pixel
Point;According to the RGB rgb value of the pixel selected, calculated using default white balance algorithm, obtain described image
White balance.
Alternatively, the luminance parameter is brightness value, and in the threshold value for obtaining predetermined luminance parameter, the processor is also
For performing the definite program of the white balance, to realize following steps:The threshold value of the brightness value of default dark scene is obtained,
And/or obtain the threshold value of the brightness value of default bright scene.
Alternatively, the threshold value according to the predetermined luminance parameter, from each pixel in selected pixels point, institute
The definite program that processor is additionally operable to perform the white balance is stated, to realize following steps:Selected from each pixel
Brightness value is more than the corresponding pixel of threshold value of the brightness value of default dark scene;Alternatively, selected from each pixel
Brightness value is less than the corresponding pixel of threshold value of the brightness value of default bright scene;Alternatively, selected from each pixel
Brightness value is more than the corresponding picture of threshold value of the threshold value of the brightness value of default dark scene and the brightness value less than default bright scene
Vegetarian refreshments.
Alternatively, the luminance parameter is rgb value, and in the threshold value for obtaining predetermined luminance parameter, the processor is also
For performing the definite program of the white balance, to realize following steps:
The threshold value of the rgb value of default dark scene is obtained, and/or, the threshold value of the rgb value of the default bright scene of acquisition.
Alternatively, the threshold value according to the predetermined luminance parameter, from each pixel in selected pixels point, institute
The definite program that processor is additionally operable to perform the white balance is stated, to realize following steps:
The corresponding pixel of threshold value that rgb value is all higher than the rgb value of default dark scene is selected from each pixel
Point;Alternatively, the corresponding pixel of threshold value that rgb value is respectively less than the rgb value of default bright scene is selected from each pixel
Point;It is all higher than presetting the threshold value of the rgb value of dark scene alternatively, selecting rgb value from each pixel and is respectively less than pre-
If the corresponding pixel of the threshold value of the rgb value of bright scene.
Alternatively, in the threshold value of the brightness value for obtaining default dark scene, the processor is additionally operable to described in execution
The definite program of white balance, to realize following steps:The model of the camera is obtained, the model of the camera is corresponding
The threshold value of the brightness value of dark scene is determined as the threshold value of the brightness value of the default dark scene.
Alternatively, in the threshold value of the brightness value for obtaining default bright scene, the processor is additionally operable to described in execution
The definite program of white balance, to realize following steps:The model of the camera is obtained, the model of the camera is corresponding
The threshold value of the brightness value of bright scene is determined as the threshold value of the brightness value of the default bright scene.
Alternatively, in the threshold value of the rgb value for obtaining default dark scene, the processor is additionally operable to perform described white
The definite program of balance, to realize following steps:The model of the camera is obtained, the model of the camera is corresponding black
The threshold value of the rgb value of dark scene is determined as the threshold value of the rgb value of the default dark scene.
Alternatively, in the threshold value of the rgb value for obtaining default bright scene, the processor is additionally operable to perform described white
The definite program of balance, to realize following steps:The model of the camera is obtained, the model of the camera is corresponding bright
The threshold value of the rgb value of bright field scape is determined as the threshold value of the rgb value of the default bright scene.
Alternatively, in the threshold value of the brightness value for obtaining default dark scene, the processor is additionally operable to described in execution
The definite program of white balance, to realize following steps:The colour temperature of described image is obtained, by the corresponding dark of the colour temperature of described image
The threshold value of the brightness value of scene is determined as the threshold value of the brightness value of the default dark scene.
Alternatively, in the threshold value of the brightness value for obtaining default bright scene, the processor is additionally operable to described in execution
The definite program of white balance, to realize following steps:The colour temperature of described image is obtained, the colour temperature of described image is corresponding bright
The threshold value of the brightness value of scene is determined as the threshold value of the brightness value of the default bright scene.
Alternatively, in the threshold value of the rgb value for obtaining default dark scene, the processor is additionally operable to perform described white
The definite program of balance, to realize following steps:The colour temperature of described image is obtained, by the corresponding dark field of the colour temperature of described image
The threshold value of the rgb value of scape is determined as the threshold value of the rgb value of the default dark scene.
Alternatively, in the threshold value of the rgb value for obtaining default bright scene, the processor is additionally operable to perform described white
The definite program of balance, to realize following steps:The colour temperature of described image is obtained, by the corresponding bright field of the colour temperature of described image
The threshold value of the rgb value of scape is determined as the threshold value of the rgb value of the default bright scene.
Alternatively, in the threshold value of the brightness value for obtaining default dark scene, the processor is additionally operable to described in execution
The definite program of white balance, to realize following steps:The instruction of the threshold value of scene set brightness value is received, will be taken in described instruction
The threshold value of the brightness value of the dark scene of band is determined as the threshold value of the brightness value of the default dark scene.
Alternatively, in the threshold value of the brightness value for obtaining default bright scene, the processor is additionally operable to described in execution
The definite program of white balance, to realize following steps:The instruction of the threshold value of scene set brightness value is received, will be taken in described instruction
The threshold value of the brightness value of the bright scene of band is determined as the threshold value of the brightness value of the default bright scene.
Alternatively, in the threshold value of the rgb value for obtaining default dark scene, the processor is additionally operable to perform described white
The definite program of balance, to realize following steps:The instruction of the threshold value of scene set rgb value is received, will be carried in described instruction
Dark scene rgb value threshold value be determined as the default dark scene rgb value threshold value.
Alternatively, in the threshold value of the rgb value for obtaining default bright scene, the processor is additionally operable to perform described white
The definite program of balance, to realize following steps:The instruction of the threshold value of scene set rgb value is received, will be carried in described instruction
Bright scene rgb value threshold value be determined as the default bright scene rgb value threshold value.
The third aspect, the embodiment of the present invention provide a kind of computer-readable recording medium, and the computer-readable medium is deposited
The definite program of white balance is contained, is realized when the definite program of the white balance is executed by processor as above-mentioned one or more real
The step of applying the definite method of white balance described in example.
Definite method, terminal and the computer-readable recording medium for a kind of white balance that the embodiment of the present invention is provided, it is first
First, the image that the camera of terminal collects is obtained, the corresponding luminance parameter of each pixel of image is determined, based on what is determined
The corresponding luminance parameter of each pixel of image, could be aware that the dark area and bright areas of image, then, obtain default bright
The threshold value of parameter is spent, further according to the threshold value of predetermined luminance parameter, the selected pixels point from each pixel so that the pixel selected
Point is to be obtained by the luminance parameter of each pixel to image by screening, finally, according to the pixel obtained by screening
The rgb value of point, is calculated using default white balance algorithm, obtains the white balance of image;That is, implement in the present invention
In example, by obtaining the threshold value of predetermined luminance parameter, each pixel of image is screened, it is suitable to select luminance parameter
Pixel, then, the rgb value of the pixel for only considering to select determines the white balance of image, does not consider not select
Pixel, in this way, avoid the image caused by the definite method of existing white balance color and reality color between
The larger technical problem of aberration, the true colors in image are reduced, so as to improve the visual effect of image.
Brief description of the drawings
Fig. 1 is a kind of hardware architecture diagram for the mobile terminal for realizing each embodiment of the present invention;
Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of the definite method of the white balance in the embodiment of the present invention one;
Fig. 4-1 is in the display schematic diagram of dark scene for the image section in the embodiment of the present invention two;
Fig. 4-2 is the display schematic diagram redefined to Fig. 4-1 after white balance in the embodiment of the present invention two;
Fig. 5-1 is in the display schematic diagram of bright scene for the image section in the embodiment of the present invention two;
Fig. 5-2 is the display schematic diagram redefined to Fig. 5-1 after white balance in the embodiment of the present invention two;
Fig. 6-1 is that the image section in the embodiment of the present invention two is in dark scene and is partially in the display of bright scene
Schematic diagram;
Fig. 6-2 is the display schematic diagram redefined to Fig. 6-1 after white balance in the embodiment of the present invention two;
Fig. 7 is the structure diagram of the terminal in the embodiment of the present invention three;
Fig. 8 is the structure diagram of the computer-readable recording medium in the embodiment of the present invention four.
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 (PDA, Personal Digital Assistant), portable
Media player (PMP, Portable Media Player), 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. 1, its hardware architecture diagram for a kind of mobile terminal of each embodiment of the realization present invention, the shifting
Dynamic terminal 100 can include:Radio frequency (RF, Radio Frequency) unit 101, Wireless Fidelity (WiFi, Wireless-
Fidelity) module 102, audio output unit 103, A/V (audio/video) input unit 104, sensor 105, display unit
106th, the component such as user input unit 107, interface unit 108, memory 109, processor 110 and power supply 111.This area
Technical staff is appreciated that the mobile terminal structure shown in Fig. 1 does not form the restriction to mobile terminal, and mobile terminal can be with
Including than illustrating more or fewer components, either combining some components or different components arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
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 data sending 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 (GSM, Global System of Mobile
Communication), general packet radio service (GPRS, General Packet Radio Service), CDMA
2000 (CDMA2000, Code Division Multiple Access 2000), wideband code division multiple access (WCDMA, Wideband
Code Division Multiple Access), TD SDMA (TD-SCDMA, Time Division-
Synchronous Code Division Multiple Access), frequency division duplex Long Term Evolution (FDD-LTE, Frequency
Division Duplexing-Long Term Evolution) and time division duplex Long Term Evolution (TDD-LTE, Time
Division Duplexing-Long Term Evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102
Sub- mail, browse webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 1 shows
Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need
To be omitted 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 WiFi module 102 it is receiving or
It is sound that the voice data stored in memory 109, which is converted into audio signal and exports,.Moreover, audio output unit 103
The relevant audio output of specific function performed with mobile terminal 100 can also be provided (for example, call signal receives sound, disappears
Breath receives 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
(GPU, Graphics Processing Unit) 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 WiFi 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 (LCD, Liquid Crystal Display), Organic Light Emitting Diode can be used
Forms such as (OLED, Organic Light-Emitting Diode) 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. 1, 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. 1 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. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system
Unite includes communicating user equipment (UE, the User of connection successively for the LTE system of universal mobile communications technology, the LTE system
Equipment) 201, evolved UMTS Terrestrial radio access network (E-UTRAN, Evolved UMTS Terrestrial Radio
Access Network) 202, the IP industry of evolved packet-based core networks (EPC, Evolved Packet Core) 203 and operator
Business 204.
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 (MME, Mobility Management Entity) 2031, ownership
Client server (HSS, Home Subscriber Server) 2032, other MME2033, gateway (SGW, Serving
Gate Way) 2034, grouped data network gateway (PGW, PDN Gate Way) 2035 and policy and rate functional entity
(PCRF, Policy and Charging Rules Function) 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 some are preserved in relation to service features, data rate etc.
The dedicated information of user.All customer data can be transmitted by SGW2034, and PGW2035 can provide UE's 201
IP address is distributed and other functions, and PCRF2036 is that business data flow and the tactful of IP bearing resources are determined with charging control strategy
Plan point, it selects and provide available strategy with charge execution function unit (not shown) for strategy and charging control is determined
Plan.
IP operation 204 can include internet, Intranet, IP multimedia subsystem (IMS, IP Multimedia
) or other IP operations etc. Subsystem.
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
Based on foregoing embodiment, the embodiment of the present invention provides a kind of definite method of white balance, and this method can be applied
In terminal, the function that the definite method of the white balance is realized can be by the processor caller code in terminal come real
Existing, certain program code can be stored in computer-readable storage medium, it is seen then that the terminal includes at least processor and storage is situated between
Matter.
The present embodiment provides a kind of definite method of white balance, Fig. 3 is determining for the white balance in the embodiment of the present invention one
The flow diagram of method, refering to what is shown in Fig. 3, the definite method of above-mentioned white balance can include:
S301:Obtain the image that the camera of terminal collects;
When user by the camera collection head in terminal as when, if running into the feelings that light is darker or light is brighter
Condition, can cause the color in the image that camera collected to differ larger with actual color, influence the visual effect of image.
In order to eliminate this species diversity, in embodiments of the present invention, first, user sends photographing instruction or shooting to terminal
Instruction, after terminal receives photographing instruction or shooting instruction, the camera collection image of terminal, then, terminal are obtained and taken the photograph
The image collected as head.
S302:Determine the corresponding luminance parameter of each pixel of image;
Terminal first determines the corresponding brightness ginseng of each pixel of image after the image that camera collects is got
Number, wherein, above-mentioned luminance parameter can include:In image in the brightness value and image of each pixel each pixel in color mode
For RGB when rgb value.
Above by the corresponding luminance parameter of each pixel for the image determined, the Luminance Distribution of image can be known,
Which region is darker, which region is relatively bright, here, it is necessary to which explanation, terminal can pass through the brightness value of each pixel
To determine which region is darker, which region is relatively bright, which area is terminal can also determine by the rgb value of each pixel
Domain is darker, which region is relatively bright, and the embodiment of the present invention is not especially limited this.
S303:Obtain the threshold value of predetermined luminance parameter;
After the corresponding luminance parameter of each pixel that image is determined in S303, in order to select suitable pixel,
Need first to obtain the threshold value of predetermined luminance parameter.
The threshold value of above-mentioned predetermined luminance parameter is divided according to light scene, can be included:The brightness ginseng of default dark scene
Several threshold values and the threshold value of the luminance parameter of default bright scene.
It should be noted that when above-mentioned luminance parameter includes brightness value, the threshold value of above-mentioned predetermined luminance parameter can include:
Threshold value, the threshold value for the brightness value for presetting bright scene for presetting the brightness value of dark scene, above-mentioned luminance parameter include rgb value
When, the threshold value of above-mentioned predetermined luminance parameter can include:The threshold value of the rgb value of default dark scene and default bright scene
The threshold value of rgb value.
So, the threshold value in the brightness value for determining default dark scene, default bright scene brightness value threshold value, in advance
If after the threshold value of the rgb value of the threshold value of the rgb value of dark scene and default bright scene, can be deleted by these threshold values
Belong to the corresponding image-region of dark scene and belong to the corresponding image-region of bright scene with deleting.
S304:According to the threshold value of predetermined luminance parameter, the selected pixels point from each pixel;
In order to deleted by the threshold value of predetermined luminance parameter belong to the corresponding image-region of dark scene pixel and
The pixel for belonging to the corresponding image-region of bright scene is deleted, so that the selected pixels point from each pixel, can pass through
Any one mode is realized below:
When the threshold value of predetermined luminance parameter includes the threshold value of the brightness value of default dark scene, according to default bright in S304
The threshold value of parameter is spent, selected pixels point can include from each pixel:It is black more than default that brightness value is chosen from each pixel
The pixel of the threshold value of the brightness value of dark scene.
When the threshold value of predetermined luminance parameter includes the threshold value of the brightness value of default bright scene, according to default bright in S304
The threshold value of parameter is spent, selected pixels point can include from each pixel:It is bright less than default that brightness value is chosen from each pixel
The pixel of the threshold value of the brightness value of bright field scape.
When the threshold value of predetermined luminance parameter include the brightness value of default dark scene threshold value and default bright scene it is bright
During the threshold value of angle value, according to the threshold value of predetermined luminance parameter in S304, selected pixels point can include from each pixel:From each
Brightness value is chosen in pixel and is more than the threshold value for the brightness value for presetting dark scene and less than the brightness value for presetting bright scene
The pixel of threshold value.
When the threshold value of predetermined luminance parameter includes the threshold value of the rgb value of default dark scene, according to default bright in S304
The threshold value of parameter is spent, selected pixels point can include from each pixel:Rgb value is chosen from each pixel and is more than default dark
The pixel of the threshold value of the rgb value of scene.
When the threshold value of predetermined luminance parameter includes the threshold value of the brightness value of default bright scene, according to default bright in S304
The threshold value of parameter is spent, selected pixels point can include from each pixel:Rgb value is chosen from each pixel and is less than default become clear
The pixel of the threshold value of the rgb value of scene.
When the threshold value of predetermined luminance parameter includes the threshold value of rgb value and the RGB of default bright scene of default dark scene
During the threshold value of value, according to the threshold value of predetermined luminance parameter in S304, selected pixels point can include from each pixel:From each picture
The threshold value of rgb value and the threshold of the rgb value of respectively less than default bright scene that rgb value is all higher than default dark scene are chosen in vegetarian refreshments
The pixel of value.
S305:According to the rgb value of the pixel selected, calculated using default white balance algorithm, obtain image
White balance.
After selecting pixel in S305, the pixel and bright areas of dark area in image have been deleted
Pixel, then, determine image white balance when, consider only the pixel selected, do not consider dark area
Pixel and bright areas pixel, i.e. according to the rgb value of the pixel selected, using default white balance algorithm
Calculated, so as to obtain the white balance of image, in this way, can reduce aberration between the color of image and the color of reality compared with
Big technical problem, improves the visual effect of image.
Wherein, above-mentioned white balance algorithm can include:Grey world, the automatic white balance method based on dynamic threshold, mirror
Face method, scale reflection method, color correlation method and neural network etc., here, the embodiment of the present invention is not especially limited this.
A kind of definite method for white balance that the embodiment of the present invention is provided, first, the camera for obtaining terminal collects
Image, determine the corresponding luminance parameter of each pixel of image, the corresponding brightness of each pixel based on the image determined
Parameter, could be aware that the dark area and bright areas of image, then, the threshold value of predetermined luminance parameter be obtained, further according to default
The threshold value of luminance parameter, the selected pixels point from each pixel so that the pixel selected is by each pixel to image
What the luminance parameter of point was obtained by screening, finally, according to the rgb value of the pixel obtained by screening, using default white
Balanced algorithm is calculated, and obtains the white balance of image;That is, in embodiments of the present invention, by obtaining predetermined luminance
The threshold value of parameter, screens each pixel of image, selects the suitable pixel of luminance parameter, then, only consider
The rgb value of the pixel selected determines the white balance of image, does not consider the pixel not selected, in this way, avoiding
The larger technical problem of aberration between the color of the color of image caused by the definite method of existing white balance and reality,
The true colors in image are reduced, so as to improve the visual effect of image.
Embodiment two
Based on foregoing embodiment, the present embodiment provides a kind of definite method of white balance, this method can be applied to end
In end, the function that the definite method of the white balance is realized can be realized by the processor caller code in terminal,
Certain program code can be stored in computer-readable storage medium, it is seen then that the terminal includes at least pocessor and storage media.
On the basis of above-described embodiment one, above-mentioned luminance parameter can include brightness value and rgb value, accordingly, in order to
The threshold value of predetermined luminance parameter is got, can be realized by any one following mode:
When above-mentioned luminance parameter is brightness value, in a kind of optional embodiment, predetermined luminance parameter is obtained in S303
Threshold value, can include:
The threshold value of the brightness value of default dark scene is obtained, and/or, the threshold value of the brightness value of the default bright scene of acquisition.
Wherein, the threshold value of above-mentioned predetermined luminance parameter can be the threshold value of the brightness value of default dark scene, or
The threshold value of the brightness value of default bright scene, can also be the threshold value of the brightness value of default dark scene and default bright scene
The threshold value of brightness value, here, the embodiment of the present invention is not especially limited.
When above-mentioned luminance parameter is brightness value, in a kind of optional embodiment, according to predetermined luminance parameter in S303
Threshold value, the selected pixels point from each pixel, can include:
The corresponding pixel of threshold value that brightness value is more than the brightness value of default dark scene is selected from each pixel;
Alternatively, the corresponding pixel of threshold value that brightness value is less than the brightness value of default bright scene is selected from each pixel
Point;
Alternatively, brightness value is selected from each pixel is more than the threshold value for the brightness value for presetting dark scene and less than default
The corresponding pixel of threshold value of the brightness value of bright scene.
Specifically, when the threshold value for the brightness value that the threshold value of predetermined luminance parameter is default dark scene, then, brightness
Value belongs to the pixel of dark area less than or equal to the corresponding pixel of threshold value of the brightness value of default dark scene, so, from
The corresponding pixel of threshold value that brightness value is more than the brightness value of default dark scene is selected in each pixel.
When the threshold value for the brightness value that the threshold value of predetermined luminance parameter is default bright scene, then, brightness value is more than etc.
Belong to the pixel of bright areas in the corresponding pixel of threshold value of the brightness value of default bright scene, so, from each pixel
In select the corresponding pixel of threshold value that brightness value is less than the brightness value of default bright scene.
When the brightness of the threshold value and default bright scene of the brightness value that the threshold value of predetermined luminance parameter is default dark scene
During the threshold value of value, then, the corresponding pixel of threshold value that brightness value is less than or equal to the brightness value of default dark scene belongs to dark
The pixel in region, the corresponding pixel of threshold value that brightness value is more than or equal to the brightness value of default bright scene belong to bright areas
Pixel, so, selected from each pixel brightness value be more than default dark scene brightness value threshold value and less than pre-
If the corresponding pixel of the threshold value of the brightness value of bright scene.
Above-mentioned luminance parameter is rgb value, in a kind of optional embodiment, obtains the threshold value of predetermined luminance parameter, can be with
Including:
The threshold value of the rgb value of default dark scene is obtained, and/or, the threshold value of the rgb value of the default bright scene of acquisition.
Wherein, the threshold value of above-mentioned predetermined luminance parameter can be the threshold value of the rgb value of default dark scene, or pre-
Can also be the threshold value of rgb value and the RGB of default bright scene of default dark scene if the threshold value of the rgb value of bright scene
The threshold value of value, here, the embodiment of the present invention is not especially limited.
Above-mentioned luminance parameter is rgb value, in a kind of optional embodiment, according to the threshold of predetermined luminance parameter in S304
Value, the selected pixels point from each pixel, can include:
The corresponding pixel of threshold value that rgb value is all higher than the rgb value of default dark scene is selected from each pixel;
Alternatively, the corresponding pixel of threshold value that rgb value is respectively less than the rgb value of default bright scene is selected from each pixel
Point;
It is all higher than presetting the threshold value of the rgb value of dark scene alternatively, selecting rgb value from each pixel and is respectively less than pre-
If the corresponding pixel of the threshold value of the rgb value of bright scene.
Specifically, when the threshold value for the rgb value that the threshold value of predetermined luminance parameter is default dark scene, then, rgb value
The corresponding pixel of threshold value less than or equal to the rgb value of default dark scene belongs to the pixel of dark area, so, from each picture
The corresponding pixel of threshold value that rgb value is more than the rgb value of default dark scene is selected in vegetarian refreshments.
When the threshold value for the rgb value that the threshold value of predetermined luminance parameter is default bright scene, then, rgb value is more than or equal to
The corresponding pixel of threshold value of the rgb value of default bright scene belongs to the pixel of bright areas, so, selected from each pixel
Take out the corresponding pixel of threshold value that rgb value is less than the rgb value of default bright scene.
When the threshold value of rgb value and the rgb value of default bright scene that the threshold value of predetermined luminance parameter is default dark scene
Threshold value when, then, the corresponding pixel of threshold value that rgb value is less than or equal to the rgb value of default dark scene belongs to dark area
Pixel, the corresponding pixel of threshold value that rgb value is more than or equal to the rgb value of default bright scene belongs to the pixel of bright areas
Point, so, rgb value is selected from each pixel and is more than the threshold value for the rgb value for presetting dark scene and less than default bright field
The corresponding pixel of threshold value of the rgb value of scape.
In order to get the threshold value of predetermined luminance parameter, can be realized by any one following mode:
In a kind of optional embodiment, the threshold value of the brightness value of default dark scene is obtained, including:
The model of camera is obtained, the threshold value of the brightness value of the corresponding dark scene of the model of camera is determined as presetting
The threshold value of the brightness value of dark scene;
The threshold value of the brightness value of default bright scene is obtained, including:
The model of camera is obtained, the threshold value of the brightness value of the corresponding bright scene of the model of camera is determined as presetting
The threshold value of the brightness value of bright scene;
The threshold value of the rgb value of default dark scene is obtained, including:
The model of camera is obtained, the threshold value of the rgb value of the corresponding dark scene of the model of camera is determined as presetting
The threshold value of the rgb value of dark scene;
The threshold value of the rgb value of default bright scene is obtained, including:
The model of camera is obtained, the threshold value of the rgb value of the corresponding bright scene of the model of camera is determined as presetting
The threshold value of the rgb value of bright scene.
Specifically, since the photonasty of the camera of different model is different, different cameras can be caused to color
Difference is perceived, so, the threshold value of different predetermined luminance parameters is corresponding with for the camera of different model, so so that no
With the image that the camera of model collects in selected pixels point, the pixel for belonging to dark area can be accurately deleted
With the pixel of bright areas, suitable pixel is selected to determine the white balance of image.
In a kind of optional embodiment, the threshold value of the brightness value of default dark scene is obtained, including:
The colour temperature of image is obtained, the threshold value of the brightness value of the corresponding dark scene of the colour temperature of image is determined as default dark
The threshold value of the brightness value of scene;
The threshold value of the brightness value of default bright scene is obtained, including:
The colour temperature of image is obtained, the threshold value of the brightness value of the corresponding bright scene of the colour temperature of image is determined as default bright
The threshold value of the brightness value of scene;
The threshold value of the rgb value of default dark scene is obtained, including:
The colour temperature of image is obtained, the threshold value of the rgb value of the corresponding dark scene of the colour temperature of image is determined as default dark
The threshold value of the rgb value of scene;
The threshold value of the rgb value of default bright scene is obtained, including:
The colour temperature of image is obtained, the threshold value of the rgb value of the corresponding bright scene of the colour temperature of image is determined as default bright
The threshold value of the rgb value of scene.
Specifically, since the colour temperature of image is different so that the aberration between the color and actual color of image is not
Together, so, the threshold value of different predetermined luminance parameters is corresponding with for the colour temperature of different images, so so that for different figures
The colour temperature of picture, according to the division of range of color temperature, in selected pixels point, can accurately delete the pixel for belonging to dark area
The pixel of point and bright areas, selects suitable pixel to determine the white balance of image.
In a kind of optional embodiment, the threshold value of the brightness value of default dark scene is obtained, including:
The instruction of the threshold value of scene set brightness value is received, the threshold value of the brightness value of the dark scene carried in instruction is true
It is set to the threshold value of the brightness value of default dark scene;
The threshold value of the brightness value of default bright scene is obtained, including:
The instruction of the threshold value of scene set brightness value is received, the threshold value of the brightness value of the bright scene carried in instruction is true
It is set to the threshold value of the brightness value of default bright scene;
Specifically, in the embodiment of the present invention, a kind of threshold value for the brightness value that default dark scene is set in real time is also provided
With the embodiment of the threshold value of the brightness value of default bright scene, the instruction of the threshold value by receiving scene set brightness value, determines
The threshold value of the threshold value of the brightness value of default dark scene and the brightness value of default bright scene.
The threshold value of the rgb value of default dark scene is obtained, including:
The instruction of the threshold value of scene set rgb value is received, the threshold value of the rgb value of the dark scene carried in instruction is determined
To preset the threshold value of the rgb value of dark scene;
The threshold value of the rgb value of default bright scene is obtained, including:
The instruction of the threshold value of scene set rgb value is received, the threshold value of the rgb value of the bright scene carried in instruction is determined
To preset the threshold value of the rgb value of bright scene.
Specifically, in the embodiment of the present invention, also provide a kind of rgb value that default dark scene is set in real time threshold value and
The embodiment of the threshold value of the rgb value of default bright scene, the instruction of the threshold value by receiving scene set rgb value, determines default
The threshold value of the rgb value of the threshold value of the rgb value of dark scene and default bright scene.
For example, Fig. 4-1 is in the display schematic diagram of dark scene for the image section in the embodiment of the present invention two, such as
Shown in Fig. 4-1, in the image of Fig. 4-1, lower right field belongs to dark area, in order to eliminate the region to the white balance of image
Influence, first after image is got, determine the luminance parameter of each pixel of image, by taking luminance parameter is rgb value as an example
For, then, the threshold value of the rgb value of default dark scene is obtained, specifically, first obtain the model of camera, then, obtaining should
The threshold value (5,5,5) of the rgb value of the corresponding default dark scene of model, and obtain the corresponding default bright scene of the model
The threshold value (250,250,250) of rgb value, then select rgb value and be all higher than (5,5,5) and be respectively less than the picture of (250,250,250)
Vegetarian refreshments, according to the pixel selected, determines image white balance, so as to obtain Fig. 4's -2 using default white balance algorithm
Image, Fig. 4-2 are the display schematic diagram redefined to Fig. 4-1 after white balance in the embodiment of the present invention two.
Fig. 5-1 is in the display schematic diagram of bright scene for the image section in the embodiment of the present invention two, such as Fig. 5-1 institutes
Show, in the image of Fig. 5-1, upper left corner area belongs to bright areas, first in order to eliminate influence of the region to the white balance of image
First after image is got, determine the luminance parameter of each pixel of image, by luminance parameter be rgb value exemplified by for, so
Afterwards, the threshold value of the rgb value of default bright scene is obtained, specifically, the colour temperature of image is first obtained, determines the colour temperature institute of the image
The range of color temperature of category is height, or in, or it is low, then, obtain the rgb value of the corresponding default dark scene of range of color temperature belonging to this
Threshold value (10,10,10), and obtain the threshold value (240,240,240) of the rgb value of the corresponding default bright scene of the model, then
Rgb value is selected to be all higher than (10,10,10) and be respectively less than the pixel of (240,240,240), according to the pixel selected,
Image white balance is determined using default white balance algorithm, so as to obtain the image of Fig. 5-2, Fig. 5-2 is the embodiment of the present invention
The display schematic diagram redefined to Fig. 5-1 after white balance in two.
Fig. 6-1 is that the image section in the embodiment of the present invention two is in dark scene and is partially in the display of bright scene
Schematic diagram, as in Figure 6-1, in the image of Fig. 6-1, upper left corner area belongs to bright areas, and lower right field belongs to dark region
Domain, in order to eliminate influence of the two regions to the white balance of image, first after image is got, determines each picture of image
The luminance parameter of vegetarian refreshments, by taking luminance parameter is rgb value as an example for, then, obtain the rgb value of default dark scene threshold value and
The threshold value of the rgb value of default bright scene, here, receives the instruction of the threshold value of scene set rgb value, obtains scene set
The threshold value (8,8,8) of the rgb value of the dark scene carried in the instruction of the threshold value of rgb value, and obtain the threshold of scene set rgb value
The threshold value (245,245,245) of the rgb value of the bright scene carried in the instruction of value, then select rgb value and be all higher than (8,8,8)
And the pixel of (245,245,245) is respectively less than, according to the pixel selected, figure is determined using default white balance algorithm
As white balance, so as to obtain the image of Fig. 6-2, Fig. 6-2 be in the embodiment of the present invention two white balance is redefined to Fig. 6-1 after
Display schematic diagram.
Embodiment three
Based on foregoing embodiment of the method, the present embodiment provides a kind of terminal, Fig. 7 is the terminal in the embodiment of the present invention three
Structure diagram, refering to what is shown in Fig. 7, the terminal includes processor 71, memory 72 and communication bus 73;Above-mentioned communication bus
73 are used for realization the connection communication between processor 71 and memory 72;Above-mentioned processor 71 is used to perform to store in memory 72
White balance definite program, to realize following steps:
Obtain the image that the camera of terminal collects;Determine the corresponding luminance parameter of each pixel of image;Obtain pre-
If the threshold value of luminance parameter;According to the threshold value of predetermined luminance parameter, the selected pixels point from each pixel;According to the picture selected
The rgb value of vegetarian refreshments, is calculated using default white balance algorithm, obtains the white balance of image.
In a kind of optional embodiment, luminance parameter is brightness value;Accordingly, the threshold value of predetermined luminance parameter is obtained
In, the processor 71 is additionally operable to perform the definite program of the white balance, to realize following steps:
The threshold value of the brightness value of default dark scene is obtained, and/or, the threshold value of the brightness value of the default bright scene of acquisition.
In a kind of optional embodiment, according to the threshold value of predetermined luminance parameter, from each pixel in selected pixels point,
The processor 71 is additionally operable to perform the definite program of the white balance, to realize following steps:
The corresponding pixel of threshold value that brightness value is more than the brightness value of default dark scene is selected from each pixel;Or
Person, selects the corresponding pixel of threshold value that brightness value is less than the brightness value of default bright scene from each pixel;Alternatively, from
Brightness value is selected in each pixel and is more than the threshold value for the brightness value for presetting dark scene and less than the brightness of default bright scene
The corresponding pixel of threshold value of value.
In a kind of optional embodiment, luminance parameter is rgb value;In the threshold value for obtaining predetermined luminance parameter, the place
Reason device 71 is additionally operable to perform the definite program of the white balance, to realize following steps:
The threshold value of the rgb value of default dark scene is obtained, and/or, the threshold value of the rgb value of the default bright scene of acquisition.
In a kind of optional embodiment, according to the threshold value of predetermined luminance parameter, from each pixel in selected pixels point,
The processor 71 is additionally operable to perform the definite program of the white balance, to realize following steps:
The corresponding pixel of threshold value that rgb value is all higher than the rgb value of default dark scene is selected from each pixel;Or
Person, selects the corresponding pixel of threshold value that rgb value is respectively less than the rgb value of default bright scene from each pixel;Alternatively, from
The threshold value of rgb value and the RGB of respectively less than default bright scene that rgb value is all higher than default dark scene are selected in each pixel
The corresponding pixel of threshold value of value.
In a kind of optional embodiment, in the threshold value for the brightness value for obtaining default dark scene, the processor 71 is also
For performing the definite program of the white balance, to realize following steps:
The model of camera is obtained, the threshold value of the brightness value of the corresponding dark scene of the model of camera is determined as presetting
The threshold value of the brightness value of dark scene.
In a kind of optional embodiment, in the threshold value for the brightness value for obtaining default bright scene, the processor 71 is also
For performing the definite program of the white balance, to realize following steps:
The model of camera is obtained, the threshold value of the brightness value of the corresponding bright scene of the model of camera is determined as presetting
The threshold value of the brightness value of bright scene.
In a kind of optional embodiment, in the threshold value for the rgb value for obtaining default dark scene, the processor 71 is also used
In the definite program for performing the white balance, to realize following steps:
The model of camera is obtained, the threshold value of the rgb value of the corresponding dark scene of the model of camera is determined as presetting
The threshold value of the rgb value of dark scene.
In a kind of optional embodiment, in the threshold value for the rgb value for obtaining default bright scene, the processor 71 is also used
In the definite program for performing the white balance, to realize following steps:
The model of camera is obtained, the threshold value of the rgb value of the corresponding bright scene of the model of camera is determined as presetting
The threshold value of the rgb value of bright scene.
In a kind of optional embodiment, in the threshold value for the brightness value for obtaining default dark scene, the processor 71 is also
For performing the definite program of the white balance, to realize following steps:
The colour temperature of image is obtained, the threshold value of the brightness value of the corresponding dark scene of the colour temperature of image is determined as default dark
The threshold value of the brightness value of scene.
In a kind of optional embodiment, in the threshold value for the brightness value for obtaining default bright scene, the processor 71 is also
For performing the definite program of the white balance, to realize following steps:
The colour temperature of image is obtained, the threshold value of the brightness value of the corresponding bright scene of the colour temperature of image is determined as default bright
The threshold value of the brightness value of scene.
In a kind of optional embodiment, in the threshold value for the rgb value for obtaining default dark scene, the processor 71 is also used
In the definite program for performing the white balance, to realize following steps:
The colour temperature of image is obtained, the threshold value of the rgb value of the corresponding dark scene of the colour temperature of image is determined as default dark
The threshold value of the rgb value of scene.
In a kind of optional embodiment, in the threshold value for the rgb value for obtaining default bright scene, the processor 71 is also used
In the definite program for performing the white balance, to realize following steps:
The colour temperature of image is obtained, the threshold value of the rgb value of the corresponding bright scene of the colour temperature of image is determined as default bright
The threshold value of the rgb value of scene.
In a kind of optional embodiment, in the threshold value for the brightness value for obtaining default dark scene, the processor 71 is also
For performing the definite program of the white balance, to realize following steps:
The instruction of the threshold value of scene set brightness value is received, the threshold value of the brightness value of the dark scene carried in instruction is true
It is set to the threshold value of the brightness value of default dark scene.
In a kind of optional embodiment, in the threshold value for the brightness value for obtaining default bright scene, the processor 71 is also
For performing the definite program of the white balance, to realize following steps:
The instruction of the threshold value of scene set brightness value is received, the threshold value of the brightness value of the bright scene carried in instruction is true
It is set to the threshold value of the brightness value of default bright scene.
In a kind of optional embodiment, in the threshold value for the rgb value for obtaining default dark scene, the processor 71 is also used
In the definite program for performing the white balance, to realize following steps:
The instruction of the threshold value of scene set rgb value is received, the threshold value of the rgb value of the dark scene carried in instruction is determined
To preset the threshold value of the rgb value of dark scene.
In a kind of optional embodiment, in the threshold value for the rgb value for obtaining default bright scene, the processor 71 is also used
In the definite program for performing the white balance, to realize following steps:
The instruction of the threshold value of scene set rgb value is received, the threshold value of the brightness value of the bright scene carried in instruction is true
It is set to the threshold value of the rgb value of default bright scene.
Example IV
Based on foregoing embodiment of the method, the present embodiment provides a kind of computer-readable recording medium, Fig. 8 are real for the present invention
The structure diagram of the computer-readable recording medium in example four is applied, as shown in figure 8, the computer-readable recording medium 800 is deposited
The definite program of white balance is contained, is realized when the definite program of above-mentioned white balance is executed by processor as above-mentioned one or more real
The step of applying the definite method of the white balance described in example.
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 definite method of white balance, it is characterised in that the method is applied to a terminal, the described method includes:
Obtain the image that the camera of the terminal collects;
Determine the corresponding luminance parameter of each pixel of described image;
Obtain the threshold value of predetermined luminance parameter;
According to the threshold value of the predetermined luminance parameter, the selected pixels point from each pixel;
According to the RGB rgb value of the pixel selected, calculated using default white balance algorithm, obtain described image
White balance.
2. according to the method described in claim 1, it is characterized in that, the luminance parameter is brightness value;
Accordingly, the threshold value for obtaining predetermined luminance parameter, including:
The threshold value of the brightness value of default dark scene is obtained, and/or, the threshold value of the brightness value of the default bright scene of acquisition.
3. according to the method described in claim 2, it is characterized in that, the threshold value according to the predetermined luminance parameter, from institute
Selected pixels point in each pixel is stated, including:
The corresponding pixel of threshold value that brightness value is more than the brightness value of default dark scene is selected from each pixel;
Alternatively, the corresponding pixel of threshold value that brightness value is less than the brightness value of default bright scene is selected from each pixel
Point;
Alternatively, brightness value is selected from each pixel is more than the threshold value for the brightness value for presetting dark scene and less than default
The corresponding pixel of threshold value of the brightness value of bright scene.
4. according to the method described in claim 1, it is characterized in that, the luminance parameter is rgb value;
Accordingly, the threshold value for obtaining predetermined luminance parameter, including:
The threshold value of the rgb value of default dark scene is obtained, and/or, the threshold value of the rgb value of the default bright scene of acquisition.
5. according to the method described in claim 4, it is characterized in that, the threshold value according to the predetermined luminance parameter, from institute
Selected pixels point in each pixel is stated, including:
The corresponding pixel of threshold value that rgb value is all higher than the rgb value of default dark scene is selected from each pixel;
Alternatively, the corresponding pixel of threshold value that rgb value is respectively less than the rgb value of default bright scene is selected from each pixel
Point;
It is all higher than presetting the threshold value of the rgb value of dark scene alternatively, selecting rgb value from each pixel and is respectively less than pre-
If the corresponding pixel of the threshold value of the rgb value of bright scene.
6. according to 2 or 4 any one of them method of claim, it is characterised in that the brightness for obtaining default dark scene
The threshold value of value, including:
The model of the camera is obtained, the threshold value of the brightness value of the corresponding dark scene of the model of the camera is determined as
The threshold value of the brightness value of the default dark scene;
The threshold value of the brightness value for obtaining default bright scene, including:
The model of the camera is obtained, the threshold value of the brightness value of the corresponding bright scene of the model of the camera is determined as
The threshold value of the brightness value of the default bright scene;
The threshold value of the rgb value for obtaining default dark scene, including:
The model of the camera is obtained, the threshold value of the rgb value of the corresponding dark scene of the model of the camera is determined as
The threshold value of the rgb value of the default dark scene;
The threshold value of the rgb value for obtaining default bright scene, including:
The model of the camera is obtained, the threshold value of the rgb value of the corresponding bright scene of the model of the camera is determined as
The threshold value of the rgb value of the default bright scene.
7. according to 2 or 4 any one of them method of claim, it is characterised in that the brightness for obtaining default dark scene
The threshold value of value, including:
The colour temperature of described image is obtained, the threshold value of the brightness value of the corresponding dark scene of the colour temperature of described image is determined as described
The threshold value of the brightness value of default dark scene;
The threshold value of the brightness value for obtaining default bright scene, including:
The colour temperature of described image is obtained, the threshold value of the brightness value of the corresponding bright scene of the colour temperature of described image is determined as described
The threshold value of the brightness value of default bright scene;
The threshold value of the rgb value for obtaining default dark scene, including:
The colour temperature of described image is obtained, the threshold value of the rgb value of the corresponding dark scene of the colour temperature of described image is determined as described
The threshold value of the rgb value of default dark scene;
The threshold value of the rgb value for obtaining default bright scene, including:
The colour temperature of described image is obtained, the threshold value of the rgb value of the corresponding bright scene of the colour temperature of described image is determined as described
The threshold value of the rgb value of default bright scene.
8. according to 2 or 4 any one of them method of claim, it is characterised in that the brightness for obtaining default dark scene
The threshold value of value, including:
The instruction of the threshold value of scene set brightness value is received, the threshold value of the brightness value of the dark scene carried in described instruction is true
It is set to the threshold value of the brightness value of the default dark scene;
The threshold value of the brightness value for obtaining default bright scene, including:
The instruction of the threshold value of scene set brightness value is received, the threshold value of the brightness value of the bright scene carried in described instruction is true
It is set to the threshold value of the brightness value of the default bright scene;
The threshold value of the rgb value for obtaining default dark scene, including:
The instruction of the threshold value of scene set rgb value is received, the threshold value of the rgb value of the dark scene carried in described instruction is determined
For the threshold value of the rgb value of the default dark scene;
The threshold value of the rgb value for obtaining default bright scene, including:
The instruction of the threshold value of scene set rgb value is received, the threshold value of the rgb value of the bright scene carried in described instruction is determined
For the threshold value of the rgb value of the default bright scene.
9. a kind of terminal, it is characterised in that the terminal includes processor, memory and communication bus;
The communication bus is used for realization the connection communication between processor and memory;
The processor is used for the definite program for performing the white balance stored in memory, to realize following steps:
Obtain the image that the camera of the terminal collects;
Determine the corresponding luminance parameter of each pixel of described image;
Obtain the threshold value of predetermined luminance parameter;
According to the threshold value of the predetermined luminance parameter, the selected pixels point from each pixel;
According to the RGB rgb value of the pixel selected, calculated using default white balance algorithm, obtain described image
White balance.
10. a kind of computer-readable recording medium, it is characterised in that the computer-readable medium storage has determining for white balance
Program, realizes such as white balance described in any item of the claim 1 to 8 when the definite program of the white balance is executed by processor
Definite method the step of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711461402.1A CN107911620A (en) | 2017-12-28 | 2017-12-28 | Definite method, terminal and the computer-readable recording medium of a kind of white balance |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711461402.1A CN107911620A (en) | 2017-12-28 | 2017-12-28 | Definite method, terminal and the computer-readable recording medium of a kind of white balance |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107911620A true CN107911620A (en) | 2018-04-13 |
Family
ID=61871831
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711461402.1A Pending CN107911620A (en) | 2017-12-28 | 2017-12-28 | Definite method, terminal and the computer-readable recording medium of a kind of white balance |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107911620A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112055191A (en) * | 2020-08-25 | 2020-12-08 | 浙江大华技术股份有限公司 | White balance adjustment method, image acquisition device and storage medium |
CN112073704A (en) * | 2020-09-04 | 2020-12-11 | 深圳创维-Rgb电子有限公司 | White balance debugging method, device and system and computer readable storage medium |
CN113709438A (en) * | 2020-05-22 | 2021-11-26 | 浙江宇视科技有限公司 | Image white balance correction method and device, storage medium and equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242476A (en) * | 2008-03-13 | 2008-08-13 | 北京中星微电子有限公司 | Automatic correction method of image color and digital camera system |
CN102164290A (en) * | 2011-04-22 | 2011-08-24 | 格科微电子(上海)有限公司 | Method and device for automatically compensating white balance dark area |
CN103037224A (en) * | 2012-12-07 | 2013-04-10 | 珠海全志科技股份有限公司 | Image white balance processing method and device |
CN103974053A (en) * | 2014-05-12 | 2014-08-06 | 华中科技大学 | Automatic white balance correction method based on grey dot extraction |
WO2015150622A1 (en) * | 2014-03-31 | 2015-10-08 | Nokia Corporation | Method and apparatus for controlling image capture |
CN107341767A (en) * | 2016-04-29 | 2017-11-10 | 杭州海康威视数字技术股份有限公司 | A kind of method for correcting image and device |
-
2017
- 2017-12-28 CN CN201711461402.1A patent/CN107911620A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101242476A (en) * | 2008-03-13 | 2008-08-13 | 北京中星微电子有限公司 | Automatic correction method of image color and digital camera system |
CN102164290A (en) * | 2011-04-22 | 2011-08-24 | 格科微电子(上海)有限公司 | Method and device for automatically compensating white balance dark area |
CN103037224A (en) * | 2012-12-07 | 2013-04-10 | 珠海全志科技股份有限公司 | Image white balance processing method and device |
WO2015150622A1 (en) * | 2014-03-31 | 2015-10-08 | Nokia Corporation | Method and apparatus for controlling image capture |
CN103974053A (en) * | 2014-05-12 | 2014-08-06 | 华中科技大学 | Automatic white balance correction method based on grey dot extraction |
CN107341767A (en) * | 2016-04-29 | 2017-11-10 | 杭州海康威视数字技术股份有限公司 | A kind of method for correcting image and device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113709438A (en) * | 2020-05-22 | 2021-11-26 | 浙江宇视科技有限公司 | Image white balance correction method and device, storage medium and equipment |
CN113709438B (en) * | 2020-05-22 | 2024-02-27 | 浙江宇视科技有限公司 | White balance correction method, device, storage medium and equipment for image |
CN112055191A (en) * | 2020-08-25 | 2020-12-08 | 浙江大华技术股份有限公司 | White balance adjustment method, image acquisition device and storage medium |
CN112055191B (en) * | 2020-08-25 | 2022-08-09 | 浙江大华技术股份有限公司 | White balance adjustment method, image acquisition device and storage medium |
CN112073704A (en) * | 2020-09-04 | 2020-12-11 | 深圳创维-Rgb电子有限公司 | White balance debugging method, device and system and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107302663A (en) | A kind of brightness of image method of adjustment, terminal and computer-readable recording medium | |
CN107920270A (en) | Video separated screen control method for playing back, terminal and computer-readable recording medium | |
CN107820016A (en) | Shooting display methods, double screen terminal and the computer-readable storage medium of double screen terminal | |
CN107566753A (en) | Method, photo taking and mobile terminal | |
CN108038827A (en) | Image processing method, mobile terminal and computer-readable recording medium | |
CN107959795A (en) | A kind of information collecting method, equipment and computer-readable recording medium | |
CN108900780A (en) | A kind of screen light compensation method, mobile terminal and storage medium | |
CN107315515A (en) | Color change method, terminal and the computer-readable recording medium of status bar icon | |
CN107886321A (en) | A kind of method of payment and mobile terminal | |
CN107239205A (en) | A kind of photographic method, mobile terminal and storage medium | |
CN107295270A (en) | Determination method, device, terminal and the computer-readable recording medium of a kind of image brightness values | |
CN107203383A (en) | A kind of user interface method of adjustment and mobile terminal | |
CN107067842A (en) | Colour method of adjustment, mobile terminal and storage medium | |
CN107404618A (en) | A kind of image pickup method and terminal | |
CN107705247A (en) | A kind of method of adjustment of image saturation, terminal and storage medium | |
CN107040723A (en) | A kind of imaging method based on dual camera, mobile terminal and storage medium | |
CN107909540A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN109377531A (en) | Image color cast method of adjustment, device, mobile terminal and readable storage medium storing program for executing | |
CN109672822A (en) | A kind of method for processing video frequency of mobile terminal, mobile terminal and storage medium | |
CN107911620A (en) | Definite method, terminal and the computer-readable recording medium of a kind of white balance | |
CN108182664A (en) | A kind of image processing method, mobile terminal and computer readable storage medium | |
CN107241504A (en) | A kind of image processing method, mobile terminal and computer-readable recording medium | |
CN107450796A (en) | A kind of image processing method, mobile terminal and computer-readable recording medium | |
CN110086993A (en) | Image processing method, device, mobile terminal and computer readable storage medium | |
CN109379489A (en) | A kind of screen control method of mobile terminal, mobile terminal and 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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180413 |