Summary of the invention
In view of this, the embodiment of the invention provides a kind of method and device of automatically switching portable terminal display mode, and to realize the automatic switchover of portable terminal display mode, technical scheme is as follows:
A kind of method of automatically switching portable terminal display mode comprises:
Obtain user's face-image;
Described user's face-image is handled, obtained user's face contour;
Described user's face contour and the index plane contouring that presets are compared, utilize comparative result to switch the display mode of described portable terminal, described index plane contouring comprises standard lateral face contour and standard longitudinal surface contouring;
Wherein, described user's face contour and the index plane contouring that presets are compared, comprising:
Determine the current display mode of described portable terminal; If current display mode is vertical display mode, then user's face contour and standard lateral face contour are compared; If current display mode is horizontal display mode, then user's face contour and standard longitudinal surface contouring are compared.
A kind of device of automatically switching portable terminal display mode comprises:
Graphics processing unit, the user's face-image that is used for described portable terminal is provided is handled, and obtains user's face contour;
Comparing unit is used for user's face contour that described graphics processing unit is obtained and compares with the index plane contouring that presets, and described index plane contouring comprises standard lateral face contour and standard longitudinal surface contouring;
Switch unit is used for the comparative result that obtains according to described comparing unit, switches display mode;
Wherein, described user's face contour and the index plane contouring that presets are compared, comprising:
Determine the current display mode of described portable terminal; If current display mode is vertical display mode, then user's face contour and standard lateral face contour are compared; If current display mode is horizontal display mode, then user's face contour and standard longitudinal surface contouring are compared.
A kind of portable terminal can be realized the display mode that automaticallyes switch, and comprising:
Image acquisition unit is used to obtain user's face-image;
Graphics processing unit, the user's face-image that is used for described image acquisition unit is obtained is handled, and obtains user's face contour;
Comparing unit is used for user's face contour that described graphics processing unit is obtained and compares with the index plane contouring that presets, and described index plane contouring comprises standard lateral face contour and standard longitudinal surface contouring;
Switch unit is used for the comparative result that obtains according to described comparing unit, switches display mode;
Wherein, described user's face contour and the index plane contouring that presets are compared, comprising:
Determine the current display mode of described portable terminal; If current display mode is vertical display mode, then user's face contour and standard lateral face contour are compared; If current display mode is horizontal display mode, then user's face contour and standard longitudinal surface contouring are compared.
In the technique scheme, by obtaining user's facial head portrait automatically, the application image treatment technology judges that terminal is in horizontal or perpendicular configuration state, last display mode according to the judged result switch mobile phone.Compared with prior art, all processes does not need the user to operate, and has realized the automatic switchover of terminal display mode.
Concrete Implementation Modes
At first the method to the automatically switching portable terminal display mode of the embodiment of the invention describes, and referring to shown in Figure 1, comprising:
Obtain user's face-image;
Described user's face-image handled obtain user's face contour;
Described user's face contour and the index plane contouring that presets are compared, switch display mode according to comparative result.
Wherein, can be triggered by assigned operation and obtain user's face-image, described assigned operation can comprise: the built-in function of application program or application program is switched, is started, withdraws from the interface; Also can monitor user images,, trigger and obtain user's face-image according to the variation of image by terminal.Described index plane contouring is stored in portable terminal.
Below with embodiments of the present invention is described in detail.
Embodiment one:
Figure 2 shows that the method flow synoptic diagram of a kind of automatically switching portable terminal display mode of the embodiment of the invention, the portable terminal among this embodiment is example with the mobile phone, specifically may further comprise the steps:
S201 when carrying out assigned operation, obtains user's face-image.Described assigned operation is: can trigger the operation of display mode automatic switching function, specifically can be: start or withdraw from application program, it also can be the built-in function of application program, " begin recreation " option in " page turning " option in the browser, the games for example, perhaps " broadcasts " in the video player operated or the like.Also can be provided with voluntarily according to use habit by the user, whether a certain operation triggers the display mode automatic switching function.When described assigned operation is carried out, open mobile phone cam, obtain cellphone subscriber's face-image.
Wherein, above-mentioned application program can be those programs that have the switching display mode to need, and for example which application program browser, recreation, video player etc. also can be provided with voluntarily by the user and need switch display mode.
S202 analyzes user's face-image and to obtain user's face contour.The application image Processing Algorithm is handled the user's face-image that obtains, and can obtain user's face contour by the color-values (RGB) of each point in the analysis image.Face-image to the user is analyzed, and the user's who obtains face contour synoptic diagram as shown in Figure 3.
S203, the application image matching algorithm compares user's face contour respectively with standard lateral face contour and standard longitudinal surface contouring.Standard lateral face contour (as shown in Figure 4) and standard longitudinal surface contouring (as shown in Figure 5) are stored in the mobile phone, can be to preset when mobile phone dispatches from the factory, and also can be stored voluntarily by the cellphone subscriber.Comparative result is generally used the form of percentage, numerical value is big more, the similarity degree of two width of cloth images that representative is compared is high more, for explaining conveniently, here the similarity with user's face contour and standard lateral face contour is called horizontal similarity, and the similarity of user's face contour and standard longitudinal surface contouring is called vertical similarity.If laterally similarity then enters S204, otherwise enters S205 greater than vertical similarity.
S204 is horizontal display mode with the handset displays mode switch.
S205 is vertical display mode with the handset displays mode switch.
If the user's face contour that obtains as shown in Figure 3, the result at S203 is so: vertical similarity is greater than horizontal similarity, so the handset displays pattern will switch to vertical display mode.
In the foregoing description, when carrying out assigned operation, trigger the display mode automatic switching function of mobile phone, the user can be when display mode be switched in hope, adjust the direction of mobile phone, for example: the current perpendicular mobile phone of putting of user, start video player and select a video file, this moment, the user became horizontal state with mobile phone, and carried out " broadcast " operation, if should " broadcast " be operating as foregoing assigned operation, then trigger the display mode automatic switching function, mobile phone is switched to horizontal display mode, and the user just can appreciate video under the mode of horizontal screen, and the realization of whole handoff procedure does not need the user to carry out any additional operations.
In the preferred embodiment of the present invention, can further increase fault processing mechanism, as shown in Figure 6 at S201 and S202.
S601 when carrying out assigned operation, obtains user's face-image, if obtain the image failure, enters S606, otherwise enters S602.Wherein, causing obtaining the image failure, can be reasons such as electricity shortage, camera can't start.
S602 analyzes user's face-image, obtains user's face contour, if can't obtain user's face contour, enters S606, otherwise enters S603.Wherein, causing obtaining user's face contour, can be reasons such as user's face-image is second-rate, angle is bad.
S603-S605 is described identical with S203-S205.
S606 carries out self-defining operation.Self-defining operation can be to switch to default display mode, or keeps current display mode constant.
Compare with embodiment one, the preferred embodiment mainly is to have increased self-defining operation S606, considers the mistake that may occur in the method flow of automatic switchover display mode, and fault processing mechanism is provided, and makes the entire method flow process more perfect.
Embodiment two:
Figure 7 shows that the method flow synoptic diagram of the another kind of automatically switching portable terminal display mode of the embodiment of the invention, the portable terminal among this embodiment is an example with the mobile phone still, specifically may further comprise the steps:
S701-S702 is described identical with S201-S202.
S703 judges the current display mode of mobile phone, if current be horizontal display mode, then enter S704; If current is vertical display mode, then enter S706.
S704, the application image matching algorithm compares user's face contour and vertical index plane contouring, if similarity greater than threshold value, then enters S705, otherwise enters S708.Described threshold value is stored in portable terminal, is used for determining whether two width of cloth digital pictures mate, if similarity, is then thought two width of cloth images match greater than this threshold value, generally can be rule of thumb with threshold setting 70%~80%.
S705 is horizontal display mode with the handset displays mode switch.
S706 compares user's face contour and horizontal index plane contouring, if similarity greater than threshold value, then enters S707, otherwise enters S708.
S707 is vertical display mode with the handset displays mode switch.
S708 keeps current display mode constant.
Among the said method embodiment, after obtaining user's face contour, at first judge the display mode that mobile phone is current, by comparing user's face contour and index plane contouring, whether decision switches to another kind with display mode then.Compare with embodiment one, the present embodiment method only needs to carry out an images match computing, has improved the processing speed of whole flow process.
Similar with the preferred embodiment of embodiment one, can further be that S701 and S702 increase fault processing mechanism equally, improve the entire method flow process.Corresponding contents is similar in the preferred embodiment of concrete grammar and embodiment one, repeats no more here.
Need to prove that above embodiment is to be example with the mobile phone, but the method that the embodiment of the invention provided not is only to limit the use of in mobile phone.In fact, any portable terminal with shooting, camera function can be used the method that the embodiment of the invention provides, and realizes the automatic switchover of screen display mode.In addition, above method can realize with software fully, therefore can be transplanted to easily in the various terminal softwares, can not increase the manufacturing cost of terminal because of extra interpolation hardware.
The embodiment of the invention provides a kind of device of automatically switching portable terminal display mode, and this device can be arranged in the portable terminal, can realize by software.Referring to shown in Figure 8, comprise graphics processing unit 801, comparing unit 802, switch unit 803;
Described graphics processing unit 801, the user's face-image that is used for described portable terminal is provided is handled, and obtains user's face contour;
Described comparing unit 802 is used for user's face contour that described graphics processing unit 801 is obtained and compares with the index plane contouring that presets;
Described switch unit 803 is used for the comparative result that obtains according to described comparing unit 803, switches display mode.
The device of above-mentioned automatically switching portable terminal display mode can be handled user's face-image, and compares with the index plane contouring that presets, according to the display mode of comparative result automatic switchover terminal.
The embodiment of the invention provides a kind of portable terminal, referring to shown in Figure 9, comprising: image acquisition unit 901, graphics processing unit 902, comparing unit 903 and switch unit 904;
Described image acquisition unit 901 is used to obtain user's face-image;
Described graphics processing unit 902 is used for user's face-image that described image acquisition unit 901 obtains is handled, and obtains user's face contour;
Described comparing unit 903 is used for user's face contour that described graphics processing unit 902 is obtained and compares with the index plane contouring that presets;
Described switch unit 904 is used for the comparative result that obtains according to described comparing unit 903, switches display mode.
Wherein, described image acquisition unit comprises: trigger subelement 1001 and shooting subelement 1002, referring to shown in Figure 10;
Described triggering subelement 1001 is used for when described portable terminal is carried out assigned operation, sends from the described image unit of trend and triggers;
Described shooting subelement 1002 is used for the triggering according to described trigger element 1001 transmissions, obtains user's face-image.
Above-mentioned portable terminal can be realized the automatic switchover of display mode, do not need to carry out any operation, thus convenient for users to use.
For device and system embodiment, because it is substantially corresponding to method embodiment, so describe fairly simplely, relevant part gets final product referring to the part explanation of method embodiment.Device described above and system embodiment only are schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, promptly can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of module to realize the purpose of present embodiment scheme according to the actual needs.Those of ordinary skills promptly can understand and implement under the situation of not paying performing creative labour.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, do not have the part that describes in detail among certain embodiment, can be referring to the associated description of other embodiment.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of programmed instruction, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
The above only is the specific embodiment of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.