Summary of the invention
In order to overcome the weak point of the prior art of above-mentioned indication, the invention provides a kind of page display control method and mobile terminal of recognition of face, with the horizontal screen display that realizes display page, show and the automatic switchover of erecting screen display and showing, avoid the user to use the impact of the factors such as posture, improve the accuracy of judgement degree.
The present invention is achieved by the following technical solutions:
A kind of page display control method of recognition of face, be applied to have the mobile terminal of display screen, and its step comprises:
S1, the enterprising pedestrian's face of image gathered at the camera head of mobile terminal detect and extract the position coordinates of human face region, and in the enterprising pedestrian's eye of human face region location, recorder's eye shadow is as data;
S2, extract two centre coordinates, calculate the angle of two lines of centres and page datum line, this page datum line is the virtual line of reference along the current page horizontal direction;
S3, judge whether described angle is more than or equal to default angle threshold, if switch current page display way, be that horizontal screen display is shown or erects screen display and show, otherwise maintain the current page display mode.
The Geometric center coordinates that two centre coordinates of described human face region are two profiles or the centre coordinate of two eye pupil benevolence.
Further, described step S2 comprises:
S21, the human eye image data of two is analyzed, judged whether to detect the pupil, if, execution step S22, otherwise finish the current page operation task, control mobile terminal and enter power down mode;
S22, extract two centre coordinates, calculate the angle of two lines of centres and page datum line.
Wherein, described step S21 judgement does not detect the pupil and refers to that the inferior image gathered of judgement N continuous does not extract the position coordinates in two eye pupil benevolence zones, and N is more than or equal to 1 natural number.
Described step S21 controls mobile terminal and enters power down mode and comprise and extinguish display screen.
Further, described step S3 judges whether described angle is more than or equal to default angle threshold, if switching current page display way and be horizontal screen display shows or erects screen display and show and comprise: when the described angle of judgement is more than or equal to default angle threshold, current horizontal screen display is shown to mode switches to perpendicular screen display and shows mode; When the described angle of judgement is more than or equal to default angle threshold, current perpendicular screen display is shown to mode switches to horizontal screen display and shows mode.
In the present invention, the scope that arranges of described default angle threshold is 30 °~60 °.
The present invention also provides a kind of mobile terminal, has display screen and camera head, comprising:
Face recognition module, detect and extract the position coordinates of human face region for the enterprising pedestrian's face of the image gathered at camera head, in the enterprising pedestrian's eye of human face region location, recorder's eye shadow is as data;
The human eye analysis module, be used to extracting two centre coordinates, calculate the angle of two lines of centres and page datum line, and this page datum line is the virtual line of reference along the current page horizontal direction;
Whether the judgement execution module, be more than or equal to default angle threshold be used to judging described angle, if switch current page display way, is that horizontal screen display is shown or erects screen display and show, otherwise maintains the current page display mode.
Preferably, two centre coordinates of the human face region that extracts of described human eye analysis module Geometric center coordinates that is two profiles or the centre coordinate of two eye pupil benevolence.
Further, described human eye analysis module comprises:
Pupil detecting unit, analyze for the human eye image data to two, judges whether to detect the pupil, if, start angle calculation unit, otherwise finish the current page operation task, control mobile terminal and enter power down mode;
Angle calculation unit, be used to extracting two centre coordinates, calculate the angle of two lines of centres and page datum line.
Compared with prior art, the present invention is according to the camera head of mobile terminal, especially front-facing camera is identified in people's face the central point of two, and the angle of calculating two lines of centres and page datum line judges the angle that the active user watches, and realizes that the switching anyhow of current page shows; Be different from existing gyroscope sensing control method, because criterion is the relative angle between user's eyes and mobile terminal, thereby can avoid the user to use the impact of the factors such as posture, improve the accuracy of judgement degree.On the other hand, when the user watches for a long time, eyes are tired and while closing one's eyes rest, camera is by user's eyes closure being detected, and automatically close or suspend the tasks such as video playback, Image Display of current page operation, reach the effect of putting out the screen power saving, solve that at present a lot of mobile terminals exist because of can not auto sleep or sleep waste the defect of energy consumption, to the user, bring better experience.
Embodiment
For the ease of those skilled in the art's understanding, the invention will be further described below in conjunction with drawings and Examples.
A kind of page display control method of recognition of face, be applied to have the mobile terminal of display screen and camera head, preferably, camera head is front-facing camera, described mobile terminal comprises the intelligent terminals such as smart mobile phone, panel computer, and the step of described method comprises:
S1, the enterprising pedestrian's face of image gathered at the camera head of mobile terminal detect and extract the position coordinates of human face region, and in the enterprising pedestrian's eye of human face region location, recorder's eye shadow is as data;
S2, extract two centre coordinates, calculate the angle of two lines of centres and page datum line, this page datum line is the virtual line of reference along the current page horizontal direction;
S3, judge whether described angle is more than or equal to default angle threshold, if switch current page display way, be that horizontal screen display is shown or erects screen display and show, otherwise maintain the current page display mode.
In step S1, when the user opens the video playback of the page presentation control function of this recognition of face or opening device or picture browsing application, the front-facing camera of equipment is with a time interval timing extraction facial image of setting, after the camera recognition detection arrives people's face, to knowing others face, carry out the human eye location, and record the position coordinates of human eye area, the human eye image datas such as position coordinates in pupil zone.Front-facing camera extracts the eye information of user face according to the interval of the time of setting, until the page presentation control function that equipment finally exits the operation task of current page or exits this recognition of face is for finishing.Existing face recognition technology not only can be identified the shape of people's face, and also can reach and realize precision of the presently claimed invention for the face organs' such as eyes, nose identification.
In step S2, from the human eye image data recorded step S1, extracting two centre coordinates, the Geometric center coordinates that two centre coordinates of described human face region are two profiles or the Geometric center coordinates of two eye pupil benevolence.Calculate the angle of two lines of centres and page datum line, this page datum line is the line of a virtual conduct reference, and its direction is the horizontal direction shown along the shown current page of mobile terminal.Choose in the facial image of camera collection two the even directions of being aligneds, compare with the page datum line of the current page shown in display screen.
Further, described step S2 comprises:
S21, the human eye image data of two is analyzed, judged whether to detect the pupil, if, execution step S22, otherwise finish the current page operation task, control mobile terminal and enter power down mode;
S22, extract two centre coordinates, calculate the angle of two lines of centres and page datum line.
Wherein, described step S21 judgement does not detect the pupil and refers to that the inferior image gathered of judgement N continuous does not extract two eye pupil benevolence data, the i.e. position coordinates in two eye pupil benevolence zones, by this position coordinates, can reflect the pupil shape of two and calculate the centre coordinate of the pupil, wherein N is more than or equal to 1 natural number.While such as the human eye image data gathered when double camera head, all not extracting the position coordinates in two eye pupil benevolence zones, judgement can not be identified the pupil.By analysis, judge whether to extract two eye pupil benevolence data, can identify in user's certain hour and whether be in closed-eye state (as user's rest of sleeping), when system knowledge judgement user is in closed-eye state, judgement current page operation task finishes, thereby exits the current page operation task, plays application such as closing current video, and the control mobile terminal enters power down mode, comprise and extinguish display screen, thereby avoid unnecessary energy consumption, be the equipment power saving.Only, after two eye pupil benevolence data being detected, just carry out the angle calculation of two lines of centres.
In step S3, judge whether described angle is more than or equal to default angle threshold, if switching current page display way and be horizontal screen display shows or erects screen display and show and comprise: when the described angle of judgement is more than or equal to default angle threshold, current horizontal screen display is shown to mode switches to perpendicular screen display and shows mode; When the described angle of judgement is more than or equal to default angle threshold, current perpendicular screen display is shown to mode switches to horizontal screen display and shows mode.Described angle threshold can be user preset or adopts system default value, and it arranges scope is 30 °~60 °.Take 45 ° be example, when the angle of two lines of centres and page datum line surpasses 45 °, user's visual angle and current page demonstration are in a kind of inharmonic state, in order to adapt to user's visual angle, to current page, show or erect screen display and show such as video playback or picture-browsing window switch to horizontal screen display; When two lines of centres and page datum line angle for being less than 45 while spending, user's visual angle shows with current page the state that is in a kind of relative coordination, the current page shows that can adapt to the user uses, thereby maintains current page display way and do not change.Be applied in reality, the user can be by the display screen of terminal in rotary moving, changes the angle of user's two lines of centres and page datum line, thereby switches fast and accurately page display way.
Particularly, as shown in Figure 1, the smart mobile phone of take is example, and the present invention also provides the realization flow of page display control method of the recognition of face of a kind of embodiment, and its step comprises:
The page presentation control function of S101, unlatching recognition of face;
The camera head of S102, smart mobile phone regularly carries out the image acquisition of recognition of face;
S103, the position coordinates that extracts human face region pedestrian's eye location of going forward side by side;
S104, recorder's eye shadow is as data and analyze;
S105, judge whether to extract the position coordinates in two eye pupil benevolence zones, if, execution step S107, otherwise execution step S106;
S106, end current page operation task, extinguish display screen;
S107, two centre coordinates of extraction;
The angle of S108, two lines of centres of calculating and page datum line, this page datum line is the virtual line of reference along the current page horizontal direction;
S109, judge whether described angle is more than or equal to default angle threshold, if execution step S110, otherwise execution step S111;
S110, the current page display way of switching are that horizontal screen display is shown or erects screen display and show, and return to step S102;
S111, maintain the current page display mode, and return to step S102.
The present invention also provides a kind of mobile terminal, has display screen and camera head, as shown in Figure 2, comprising:
Face recognition module, detect and extract the position coordinates of human face region for the enterprising pedestrian's face of the image gathered at camera head, in the enterprising pedestrian's eye of human face region location, recorder's eye shadow is as data;
The human eye analysis module, be used to extracting two centre coordinates, calculate the angle of two lines of centres and page datum line, and this page datum line is the virtual line of reference along the current page horizontal direction;
Whether the judgement execution module, be more than or equal to default angle threshold be used to judging described angle, if switch current page display way, is that horizontal screen display is shown or erects screen display and show, otherwise maintains the current page display mode.
Preferably, two centre coordinates of the human face region that extracts of described human eye analysis module Geometric center coordinates that is two profiles or the centre coordinate of two eye pupil benevolence.
Further, described human eye analysis module comprises:
Pupil detecting unit, analyze for the human eye image data to two, judges whether to detect the pupil, if, start angle calculation unit, otherwise finish the current page operation task, control mobile terminal and enter power down mode;
Angle calculation unit, be used to extracting two centre coordinates, calculate the angle of two lines of centres and page datum line.
Wherein, described pupil detecting unit judgement does not detect pupil data and refers to that the inferior image gathered of judgement N continuous does not extract the position coordinates in two eye pupil benevolence zones, and N is more than or equal to 1 natural number.
Described pupil detecting unit is controlled mobile terminal and is entered power down mode and comprise and extinguish display screen.
Further, describedly judge that execution module is for judging whether described angle is more than or equal to default angle threshold, if switching current page display way and be horizontal screen display shows or erects screen display and show and comprise: for when the described angle of judgement is more than or equal to default angle threshold, current horizontal screen display is shown to mode switches to perpendicular screen display and shows mode; For when the described angle of judgement is more than or equal to default angle threshold, current perpendicular screen display is shown to mode switches to horizontal screen display and shows mode.
In mobile terminal of the present invention, the scope that arranges of described default angle threshold is 30 °~60 °, preferably, can be set to 45 °.
Above content is in conjunction with concrete optimal way further description made for the present invention, should not assert that specific embodiment of the invention is confined to above explanation.For those skilled in the art, without departing from the inventive concept of the premise, can also make some simple deduction or replace, within all should being considered as the definite protection domain of the claim of being submitted to by the present invention.