Summary of the invention
The technical problem to be solved in the present invention is, for the above-mentioned defect of prior art, a kind of screen state control method based on mobile phone and mobile phone are provided, can ensure that mobile phone screen can not surprisingly be opened, effectively save cell-phone battery electric-charge quantity, provided users with the convenient.
The technical scheme that technical solution problem of the present invention adopts is as follows:
Based on a screen state control method for mobile phone, wherein, comprise step:
A, when mobile phone be in standby and screen is in closed condition time, detect whether receive the operational order lighting screen;
B, when receiving the operational order lighting screen under screen closed condition, described mobile phone obtains the brightness value of screen forward image, and judges whether the brightness value of described image is less than a predetermined threshold;
C, when the brightness value of described image is less than described predetermined threshold, then the operational order controlling not execution point bright screen curtain continues to keep screen closed condition; When described brightness value is more than or equal to described predetermined threshold, then the operational order controlling execution point bright screen curtain lights described screen.
The described screen state control method based on mobile phone, wherein, described steps A also comprises: when not receiving the operational order lighting screen, and mobile phone then continues control and is in standby and screen is in closed condition.
The described screen state control method based on mobile phone, wherein, concrete the comprising of described step B:
B1, when receiving the operational order lighting screen under screen closed condition, described mobile phone controls to open its front-facing camera;
B2, by front-facing camera picked-up screen front one two field picture, and analyze this image, obtain the brightness value of this image, and judge whether the brightness value of described image is less than a predetermined threshold.
The described screen state control method based on mobile phone, wherein, the brightness value of this image of acquisition in described step B2 specifically comprises: by analyze and the mean value calculating the brightness value of each pixel of this image obtains this image brightness values.
The described screen state control method based on mobile phone, wherein, the brightness value of each pixel of this image described is obtained by the monochrome information of the Y frame pixel in YUV image, wherein YUV is a kind of colour coding method in television system, Y represents luminance signal, U and V respectively represents a kind of color difference components.
The described screen state control method based on mobile phone, wherein, described predetermined threshold is set to: mean value × 95% of the brightness value of the image absorbed in the backlight closedown situation of the mean value × 5%+ screen at night of the brightness value of the image of outdoor picked-up on daytime.
Adopt a mobile phone for screen state control method described above, wherein, comprising:
Receive and detection module, for be in when mobile phone standby and screen is in closed condition time, detection whether receive the operational order lighting screen;
Obtain and judge module, for when receiving the operational order lighting screen under screen closed condition, described mobile phone obtains the brightness value of screen forward image, and judges whether the brightness value of described image is less than a predetermined threshold;
Control module, is less than described predetermined threshold for the brightness value when described image, then the operational order controlling not execution point bright screen curtain continues to keep screen closed condition; When described brightness value is more than or equal to described predetermined threshold, then the operational order controlling execution point bright screen curtain lights described screen.
Described mobile phone, wherein, described acquisition and judge module comprise further:
Camera starts control unit, and for when receiving the operational order lighting screen under screen closed condition, described mobile phone controls to open its front-facing camera;
Image acquisition unit, for controlling by front-facing camera picked-up screen front one two field picture;
Image analyzing unit, for by analyze and the mean value calculating the brightness value of each pixel of this image obtains this image brightness values;
Judging unit, for judging whether the brightness value of described image is less than a predetermined threshold.
Described mobile phone, wherein, described control module comprises further:
First control unit, is less than described predetermined threshold for the brightness value when described image, then the operational order controlling not execution point bright screen curtain continues to keep screen closed condition;
Second control unit, for when described brightness value is more than or equal to described predetermined threshold, then the operational order controlling execution point bright screen curtain lights described screen
Described mobile phone, wherein, described predetermined threshold is set to: mean value × 95% of the brightness value of the image absorbed in the backlight closedown situation of the mean value × 5%+ screen at night of the brightness value of the image of outdoor picked-up on daytime.
Screen state control method based on mobile phone provided by the present invention and mobile phone, owing to have employed when receiving the operational order lighting screen under screen closed condition, described mobile phone obtains the brightness value of screen forward image, and judges whether the brightness value of described image is less than a predetermined threshold; When the brightness value of described image is less than described predetermined threshold, then the operational order controlling not execution point bright screen curtain continues to keep screen closed condition; When described brightness value is more than or equal to described predetermined threshold, then the operational order controlling execution point bright screen curtain lights described screen.The present invention is directed to the mobile phone with front-facing camera, proposing a kind of camera that uses and realize the judgement of mobile phone laying state, and then the method whether control screen state will be lighted, avoid the unnecessary action of lighting screen occurs, save mobile phone electricity.It makes mobile phone add New function: can ensure that mobile phone screen can not surprisingly be opened, effectively save cell-phone battery electric-charge quantity, provided users with the convenient.
Embodiment
For making object of the present invention, technical scheme and advantage clearly, clearly, developing simultaneously referring to accompanying drawing, the present invention is described in more detail for embodiment.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Screen state control method based on mobile phone provided by the present invention, described mobile phone is the mobile phone with front-facing camera, the mobile phone hardware block diagram with front-facing camera as shown in Figure 1, comprises baseband processor, and the front-facing camera, the display screen that are connected with described baseband processor respectively.
Refer to Fig. 2, Fig. 2 is the flow chart of the preferred embodiment of the screen state control method that the present invention is based on mobile phone.The described screen state control method based on mobile phone, comprises the following steps:
Step S110, when mobile phone be in standby and screen is in closed condition time, detect whether receive the operational order lighting screen.
Step S120, when receiving the operational order lighting screen under screen closed condition, described mobile phone obtains the brightness value of screen forward image, and judges whether the brightness value of described image is less than a predetermined threshold.
Step S130, when the brightness value of described image is less than described predetermined threshold, then the operational order controlling not execution point bright screen curtain continues to keep screen closed condition; When described brightness value is more than or equal to described predetermined threshold, then the operational order controlling execution point bright screen curtain lights described screen.
In the embodiment of the present invention, when specifically implementing, shown in figure 3.
S10, when mobile phone be in standby screen locking and screen be in closedown do not light situation time;
Whether S11, periodic detection have user's operating handset, to detect the operational order of whether acceptance point bright screen curtain, entering step S12, entering step S13 when being when no.
S12, hold mode, return step S10; Namely when not receiving the operational order lighting screen, mobile phone then continues control and is in standby and screen is in closed condition.
S13, by camera, judge whether mobile phone screen front has shelter, when no, enter step S14, light screen, returning step S10 when being.
Namely, when receiving the operational order lighting screen under screen closed condition, described mobile phone controls to open its front-facing camera; By front-facing camera picked-up screen front one two field picture, and analyze this image, obtain the brightness value of this image, according to brightness degree change judge mobile phone screen front whether have shelter (namely user mobile phone is placed in pocket or in handbag time then judge whether mobile phone screen front has shelter).If it is determined that there is shelter in screen front, keep screen closed condition.If it is determined that screen front have no occluder, lights screen.
In order to solve user, mobile phone being placed in pocket or in handbag in the present invention, lighting screen because the reasons such as collision can cause touching solution locking key, causing the problem of unnecessary electricity waste.In the specific implementation, employing judges whether the brightness value of mobile phone acquisition screen forward image is less than a predetermined threshold, judges whether mobile phone screen front has shelter.Namely when there is shelter in mobile phone screen front, the image brightness of acquisition can be relatively darker, and brightness value can be less than a predetermined threshold.
In the present embodiment, adopting when specifically having judged whether shelter: when mobile phone is in screen closed condition, light screen command if received, starting front-facing camera, first absorbing a two field picture.
Analyze this two field picture by mobile phone baseband processor, obtain ambient brightness information, if there is shelter (such as mobile phone is in pocket or bag) in screen front, the brightness value that pickup image comprises can lower than certain value.
Obtain image brightness values, this image brightness values reflects current environment monochrome information indirectly, the brightness value of described acquisition screen forward image specifically: by analyze and the mean value calculating the brightness value of each pixel of this image obtains this image brightness values.Such as, the brightness value of each pixel of this image described is obtained by the monochrome information of the Y frame pixel in YUV image, and wherein YUV is a kind of colour coding method in television system, and Y represents luminance signal, U and V respectively represents a kind of color difference components.
Then, then judge whether brightness value is less than predetermined threshold, wherein, described predetermined threshold is set to: mean value × 95% of the brightness value of the image absorbed in the backlight closedown situation of the mean value × 5%+ screen at night of the brightness value of the image of outdoor picked-up on daytime.Namely first calculate: the value of mean value × 5% of the brightness value of the image of outdoor picked-up on daytime, night screen backlight closedown situation under the value of mean value × 95% of the brightness value of image absorbed, then both summations are drawn described predetermined threshold.Below such brightness value, it is a situation can thinking dark.Wherein this predetermined threshold is set in advance in the configuration file of mobile terminal, also can by user's optionally self-defined setting.
If brightness value is less than described predetermined threshold, then the not bright screen command of response point, continues to keep screen closed condition.Namely when the brightness value of described image is less than described predetermined threshold, then the operational order controlling not execution point bright screen curtain continues to keep screen closed condition; When described brightness value is more than or equal to described predetermined threshold, then the operational order controlling execution point bright screen curtain lights described screen.
Therefore the screen state control method based on mobile phone of the embodiment of the present invention, it can ensure that mobile phone screen can not surprisingly be opened, and has effectively saved cell-phone battery electric-charge quantity, has provided users with the convenient.
Based on above-described embodiment, the embodiment of the present invention additionally provides a kind of mobile phone adopting screen state control method described above, and as shown in Figure 4, described mobile phone comprises:
Receive with detection module 410, for be in when mobile phone standby and screen is in closed condition time, detection whether receive the operational order lighting screen; As detailed above.
Obtain and judge module 420, for when receiving the operational order lighting screen under screen closed condition, described mobile phone obtains the brightness value of screen forward image, and judges whether the brightness value of described image is less than a predetermined threshold, as detailed above.
Control module 430, is less than described predetermined threshold for the brightness value when described image, then the operational order controlling not execution point bright screen curtain continues to keep screen closed condition; When described brightness value is more than or equal to described predetermined threshold, then the operational order controlling execution point bright screen curtain lights described screen; As detailed above.
Described mobile phone, as shown in Figure 5, described acquisition and judge module 420 comprise further:
Camera starts control unit 421, and for when receiving the operational order lighting screen under screen closed condition, described mobile phone controls to open its front-facing camera; As detailed above.
Image acquisition unit 422, for controlling by front-facing camera picked-up screen front one two field picture; As detailed above.
Image analyzing unit 423, for by analyze and the mean value calculating the brightness value of each pixel of this image obtains this image brightness values; As detailed above.
Judging unit 424, for judging whether the brightness value of described image is less than a predetermined threshold.
Wherein, as shown in Figure 6, described control module 430 comprises further:
First control unit 431, is less than described predetermined threshold for the brightness value when described image, then the operational order controlling not execution point bright screen curtain continues to keep screen closed condition;
Second control unit 432, for when described brightness value is more than or equal to described predetermined threshold, then the operational order controlling execution point bright screen curtain lights described screen;
Wherein, described predetermined threshold is set to: mean value × 95% of the brightness value of the image absorbed in the backlight closedown situation of the mean value × 5%+ screen at night of the brightness value of the image of outdoor picked-up on daytime.
In sum, screen state control method based on mobile phone provided by the present invention and mobile phone, owing to have employed when receiving the operational order lighting screen under screen closed condition, described mobile phone obtains the brightness value of screen forward image, and judges whether the brightness value of described image is less than a predetermined threshold; When the brightness value of described image is less than described predetermined threshold, then the operational order controlling not execution point bright screen curtain continues to keep screen closed condition; When described brightness value is more than or equal to described predetermined threshold, then the operational order controlling execution point bright screen curtain lights described screen.The present invention is directed to the mobile phone with front-facing camera, proposing a kind of camera that uses and realize the judgement of mobile phone laying state, and then the method whether control screen state will be lighted, avoid the unnecessary action of lighting screen occurs, save mobile telephone power consumption.It makes mobile phone add New function: can ensure that mobile phone screen can not surprisingly be opened, effectively save cell-phone battery electric-charge quantity, provided users with the convenient.
Should be understood that, application of the present invention is not limited to above-mentioned citing, for those of ordinary skills, can be improved according to the above description or convert, and all these improve and convert the protection range that all should belong to claims of the present invention.