Embodiment
The method and the portable terminal of the automatic adjusting backlight illumination that the embodiment of the invention provides make that the scheme accuracy of regulating backlight illumination automatically is higher, and the electric weight of battery can better utilization.Below in conjunction with accompanying drawing embodiment is illustrated.
Fig. 1 regulates a kind of schematic flow sheet of the method for backlight illumination automatically for the embodiment of the invention.This method is applied to comprise the portable terminal of at least two cameras, and this method specifically comprises:
101, obtain ambient brightness data from first camera module and second camera module;
As previously mentioned, the portable terminal of using this method comprises two camera modules at least, first camera module of Xuan Zeing and second camera module should lay respectively at the terminal both sides herein, for example existing secondary camera and the main camera module that lays respectively at the mobile phone front and back.The scheme of obtaining the ambient brightness data by camera module can adopt prior art, repeats no more herein.
102, compare the difference of two ambient brightness data and the size of first threshold;
To subtract each other and take absolute value (defining the difference that this absolute value is two ambient brightness data) from the ambient brightness data that two camera modules obtain respectively, then that the absolute value and the first threshold that obtain is relatively big or small, obtain result relatively.Wherein, absolute value herein is big more, represents that two residing ambient brightnesss of camera module differ big more, and for example the one side at terminal camera module place is in face of high light, and the one side at another camera place is backlight; On the contrary,, represent that two residing ambient brightnesss of camera module differ more little, need further to judge the situation of environmental light intensity this moment if absolute value is more little.First threshold is used to be provided with such critical value, when herein absolute value during greater than this critical value, judges that the terminal surrounding environment is brighter, otherwise, then further judge.
103, regulate the backlight illumination of portable terminal automatically according to comparative result.
According to the comparative result of step 102, portable terminal improves or reduces backlight illumination automatically.
By present embodiment, portable terminal can be judged portable terminal brightness situation on every side more accurately according to the ambient brightness data from two camera modules, and corresponding automatic adjusting, realizes effectively saving battery electric quantity.
Fig. 2 regulates the another kind of schematic flow sheet of the method for backlight illumination automatically for the embodiment of the invention.This method is applied to comprise the portable terminal of at least two cameras.In the present embodiment, specifically regulate backlight illumination explanation automatically with a portable terminal that comprises main camera and secondary camera.This method comprises:
201, two cameras being set is low power sleep mode;
For the electric energy of conserve batteries, two cameras of two portable terminals all can be set to low power sleep mode, this is provided with step is optional step.
202, judged whether trigger event;
Trigger event herein is used for triggering mobile terminals and starts adjusting backlight illumination function automatically.This trigger event has multiple, can be the function key that the user presses setting, also can be that portable terminal is provided with battery electric quantity and is lower than certain value, can also be that the ambient brightness data satisfy specified conditions, or the time that portable terminal is provided with arrives set point etc.
203, main camera is set and enters operating state, gather the ambient image data, calculate brightness data A;
One that at first is provided with in two cameras enters operating state, obtains the ambient brightness data, i.e. brightness data.
204, main camera is set and returns low power sleep mode;
After a camera obtains brightness data, this camera setting can be returned low power sleep mode, to reduce the kwh loss of battery as much as possible.
205, secondary camera is set and enters operating state, gather the ambient image data, and calculate brightness data B;
Another camera is set enters operating state, obtain brightness data.
206, secondary camera is set and returns low-power consumption mode;
Back one camera that enters operating state also is provided with back low-power consumption mode, to reduce the kwh loss of battery.Be appreciated that, above-mentioned steps 203 to 206 all is preferred embodiment, two cameras also can be set in turn enter operating state, and, step 203 and 204 can be in advance before 205 and 206, and the order that camera enters operating state is not construed as limiting the invention.
207, judge | whether A-B| is more than or equal to first threshold; If more than or equal to first threshold, then change step 210, or less than, then continue step 208.
208, judge that whether A or B are greater than second threshold value;
Because A and B differ less than first threshold, can think that both are more or less the same, the environmental light intensity difference of front and back that is portable terminal is little, at this moment, judge among A or the B any and the magnitude relationship of second threshold value, as if any then changes step 209 greater than second threshold value among A or the B, if be less than or equal to, then change step 210.
209, reduce backlight illumination; Can recently reduce backlight illumination according to predefined brightness number or the brightness percentage of regulating each time when reducing backlight illumination.
210, improve backlight illumination.When improving backlight illumination, also can recently improve backlight illumination according to predefined brightness number or the brightness percentage of regulating each time.
Pass through present embodiment, portable terminal is provided with camera module in turn and enters operating state, obtains the ambient brightness data, and according to these two ambient brightness data, judges portable terminal brightness situation on every side more accurately, and corresponding automatic adjusting, realize effectively saving battery electric quantity.
The embodiment of the invention also provides a kind of portable terminal, as shown in Figure 3, this portable terminal comprises at least two camera modules, this portable terminal also comprises, acquisition module, be used to obtain the ambient brightness data from first camera module and second camera module, described first camera module lays respectively at the different side of portable terminal with second camera module; Processing module is used for the difference of two ambient brightness data of comparison and the size of first threshold, regulates the backlight illumination of portable terminal automatically according to comparative result.
When the function that has started automatic adjusting backlight illumination, send instructions under the acquisition module and initiatively obtain, or passive reception is from the ambient brightness data of first camera module and second camera module.Need to prove that two camera modules of Xuan Zeing should be the not ipsilaterals that lays respectively at portable terminal herein, otherwise self-regulating accuracy is not improved obviously compared with prior art.Afterwards, processing module is regulated the backlight illumination of portable terminal automatically according to a series of comparisons of two ambient brightness data and first threshold.
The portable terminal that this embodiment provides can be judged portable terminal brightness situation on every side more accurately according to the ambient brightness data from two camera modules, and corresponding automatic adjusting, realizes effectively saving battery electric quantity.
Preferably, as shown in Figure 4, processing module wherein comprises:
First judges submodule, is used for the difference of two ambient brightness data of comparison and the size of first threshold, regulates the backlight illumination that submodule improves portable terminal if the difference of described two ambient brightness data, then triggers first more than or equal to first threshold; If judged result be less than, then trigger second any and the size of judging in two ambient brightness data of submodule judgement of second threshold value;
Described first regulates submodule, is used for judging that according to first the triggering of submodule improves the backlight illumination of portable terminal;
Described second judges submodule, is used for the triggering of judging submodule according to first, judges any and the size of second threshold value in two ambient brightness data, and triggers the backlight illumination of the second adjusting submodule adjusting portable terminal according to comparative result;
Described second regulates submodule, is used for regulating automatically according to the triggering of the second judgement submodule backlight illumination of portable terminal.
Optionally, described second judges that submodule specifically is used for, triggering according to the first judgement submodule, judge any and the size of second threshold value in two ambient brightness data, if any in two ambient brightness data of judgement is greater than second threshold value, then trigger second and regulate the backlight illumination that submodule reduces portable terminal,, then trigger second and regulate the backlight illumination that submodule improves portable terminal if be less than or equal to.
Optionally, described portable terminal comprises that also pattern is provided with module, is used to be provided with described two sleep patterns that camera module is low-power consumption, when startup is regulated the backlight illumination function automatically, two camera modules is set in turn enters operating state.
Optionally, described camera module is used for after entering operating state, and acquisition of image data calculates brightness data, and low power sleep mode is returned in the instruction that module is set according to described pattern; Described pattern is provided with module and also is used for, and after described camera module calculates brightness data, instructs described camera module to return low power sleep mode.
The portable terminal that above preferred embodiment provides, camera module can be set in turn to be entered operating state, obtains the ambient brightness data, and according to these two ambient brightness data, judge portable terminal brightness situation on every side more accurately, and corresponding automatic adjusting, realize effectively saving battery electric quantity.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to finish by program, described program can be stored in the computer read/write memory medium, this program is when carrying out, the step of implementing is identical with method, described storage medium, as: ROM/RAM, magnetic disc, CD etc.
More than be explanation, in concrete implementation process, can carry out suitable improvement, to adapt to the concrete needs of concrete condition method of the present invention to the specific embodiment of the invention.Therefore be appreciated that according to the specific embodiment of the present invention just to play an exemplary role, not in order to restriction protection scope of the present invention.