Summary of the invention
The technical problem to be solved in the present invention is to utilize the small mirror of carrying to check this mode of dressing of oneself in order to overcome people in prior art, the defect of bringing certain potential safety hazard and carrying inconvenience, provide a kind of and have simple, convenient user and arrange at any time mobile terminal and the recognition methods thereof of the dressing of oneself.
The present invention solves above-mentioned technical problem by following technical proposals:
The invention provides a kind of recognition methods of mobile terminal, its characteristics are, it comprises the following steps:
S
1, detect distance between the barrier in screen the place ahead of this mobile terminal and this mobile terminal as the first distance, the front-facing camera of this mobile terminal gathers the image of this barrier, judge whether whether this first distance comprise people's face less than a first threshold, this image, if enter step S
2, if not, repeated execution of steps S
1
S
2, wake the screen of this mobile terminal up and enter the preview mode of this front-facing camera.
The unmatched rear order of the collection of the detection that this programme is adjusted the distance and the image of barrier, as long as can realize above-mentioned function, and meet Rule of judgment and just can use the preview function of front-facing camera judging measured distance and the image that gathers, make the user can be facing to the dressing of the screen arrangement oneself of mobile terminal.Need to carry a small mirror when this programme has been avoided existing arrangement dressing, use the shortcoming such as trouble, have advantages of simple to operate, flexibility is high, the dressing that facilitates the user to arrange at any time oneself reaches provides better experience for the user.
Preferably, step S
1Comprise:
S
11, detect this first distance, and judge this first the distance whether less than this first threshold, if enter step S
12, if not, repeated execution of steps S
11
S
12, this front-facing camera gathers the image of this barrier, and judges whether this image comprises people's face, if enter step S
2, if not, repeated execution of steps S
11
The detection that this programme was adjusted the distance before this and when judging measured distance and meet Rule of judgment, just enable front-facing camera, utilize the collection of front-facing camera realization to the image of barrier, and just open the preview function of front-facing camera when the image that gathers meets Rule of judgment, make the user can arrange facing to the screen of mobile terminal the dressing of oneself.When this programme does not meet less than this first threshold in detected this first distance, just need not to enable again this front-facing camera and carried out work, reduced the CPU(central processing unit of this mobile terminal running background) workload, have advantages of and detect accurately, the saving program, reduce and take resource.
Preferably, step S
1Comprise:
S
11, do not gather the image of this barrier in the situation that wake this front-facing camera of this screen up, and judge whether this image comprises people's face, if enter step S
12, if not, repeated execution of steps S
11
S
12, detect this first distance, and judge this first the distance whether less than this first threshold, if enter step S
2, if not, repeated execution of steps S
11
This programme utilized the collection of front-facing camera realization to the image of barrier before this, and start to adjust the distance when the image that gathers meets Rule of judgment and detect, judge when measured distance meets Rule of judgment the preview function of just opening front-facing camera, making the user can arrange facing to the screen of mobile terminal the dressing of oneself.When this programme does not comprise people's face at detected this image, just need not to have implemented again the detection of adjusting the distance, reduced the workload of the CPU of this mobile terminal running background, have advantages of and detect accurately, the saving program, reduce and take resource.
Preferably, this mobile terminal stores has a face database that comprises a plurality of facial contour templates, judges whether this image comprises that the step of people's face is:
S
J, this barrier in this image is carried out Threshold segmentation to extract the profile of this barrier;
S
K, judge this profile whether with this face database in the facial contour template be complementary.
Preferably, this Threshold segmentation adopts Image binarizing algorithm.
The present embodiment detects this image by Image binarizing algorithm and whether comprises people's face, uses this Image binarizing algorithm to have fast response time, the processing time is short and simplifies the advantage such as treatment step compared to other people's face detection algorithm.
Preferably, step S
1In, the temperature of detection and the contacted shelter of this mobile terminal, judge whether whether this first distance comprise that less than this first threshold, this image whether people's face and this temperature are greater than a Second Threshold, if enter step S
2, if not, repeated execution of steps S
1
This programme has increased Rule of judgment on the basis of technique scheme, make the recognition methods of this programme more accurate, prevent that in fact the user from not wanting to utilize this mobile terminal to arrange the dressing of oneself, but this mobile terminal has still entered the situation of the preview mode of this front-facing camera, is unfavorable for intellectuality and the flexibility of this mobile terminal.
Preferably, at step S
1Comprise before:
S
0, detect this mobile terminal and whether receive a triggering signal, if enter step S
1, if not, repeated execution of steps S
0
This programme passes through at step S
1Increase the step whether the detection mobile terminal receives triggering signal before, make mobile terminal maintain on original function basis, also have the function of the user misoperation of preventing.When as hand-held in the user, the user oriented mobile terminal of display screen and user implement any operation or are using this mobile terminal this mobile terminal, at this moment the user arranges the dressing of oneself with regard to need not at all with the recognition function of mobile terminal, when but this mobile terminal meets Rule of judgment at the image of the distance that detects and collection, still entered the preview mode of front-facing camera, this is not obviously the result that the user wants, therefore for fear of this drawback, the present embodiment is provided with this step.
Preferably, after detecting this first distance, calculate this first distance duration of keeping, judge this first distance whether less than a first threshold, this duration whether reach one the 3rd threshold value, whether this image comprises people's face, if enter step S
2, if not, repeated execution of steps S
1
The present invention also provides a kind of mobile terminal, and its characteristics are, it comprises a controller, a range sensor and a front-facing camera, and this range sensor and the coplanar setting of this front-facing camera;
This range sensor for detection of the distance between the barrier in screen the place ahead of this mobile terminal and this mobile terminal as the first distance;
This front-facing camera is used for gathering the image of this barrier;
This controller is used for the preview mode that wakes the screen of this mobile terminal while comprising people's face up and enter this front-facing camera less than a first threshold, this image in this first distance.
Preferably, this first distance that this controller is used for detecting at this range sensor is enabled this front-facing camera during less than this first threshold, and wakes this screen up and enter the preview mode of this front-facing camera when this image that this front-facing camera collects comprises people's face.
Preferably, this controller is used for enabling this range sensor when this image that this front-facing camera collects comprises people's face, and this first distance that detects at this range sensor preview mode of waking this screen up and enter this front-facing camera during less than this first threshold.
Preferably, this mobile terminal stores has a face database that comprises a plurality of facial contour templates, this controller is used for this barrier of this image is carried out Threshold segmentation to extract the profile of this barrier, and the facial contour template in this profile and this face database is complementary, and this first distance preview mode of waking this screen up and enter this front-facing camera during less than this first threshold.
Preferably, this Threshold segmentation adopts Image binarizing algorithm.
Preferably, this mobile terminal also comprises a temperature sensor, this temperature sensor is for detection of the temperature with the contacted shelter of this mobile terminal, and this controller is used for the preview mode that wakes this screen up and enter this front-facing camera when this first distance comprises people's face and this temperature greater than a Second Threshold less than this first threshold, this image.
Preferably, this mobile terminal also comprises a detecting unit, and whether this detecting unit receives a triggering signal for detection of this mobile terminal, when receiving this triggering signal, calls this range sensor and this front-facing camera.
Preferably, this mobile terminal also comprises a timer, this timer is used for calculating the duration that this first distance is kept, and this controller is used for reaching less than a first threshold, this duration one the 3rd threshold value, this image wake the screen of this mobile terminal up and enter this front-facing camera while comprising people's face preview mode in this first distance.
On the basis that meets this area general knowledge, above-mentioned each optimum condition, but combination in any obtains the preferred embodiments of the invention.
Positive progressive effect of the present invention is:
The present invention is used in conjunction with according to range sensor and front-facing camera, make controller wake the screen of this mobile terminal while comprising people's face up less than first threshold, this image and enter the preview mode of this front-facing camera judging the first distance, need to carry a small mirror while having avoided existing arrangement dressing, use the shortcoming such as trouble, have advantages of simple to operate, flexibility is high, the dressing that facilitates the user to arrange at any time oneself reaches provides better experience for the user.
Embodiment
Mode below by embodiment further illustrates the present invention, but does not therefore limit the present invention among described scope of embodiments.
Embodiment 1
As shown in Figure 1, the present embodiment provides a kind of recognition methods of mobile terminal, and this recognition methods comprises the following steps:
Step 101, detect distance between the barrier in screen the place ahead of this mobile terminal and this mobile terminal as the first distance, the front-facing camera of this mobile terminal gathers the image of this barrier, judge whether whether this first distance comprise people's face less than a first threshold (for example 20cm), this image, if, enter step 102, if not, repeated execution of steps 101;
Step 102, wake the screen of this mobile terminal up and enter the preview mode of this front-facing camera.
As shown in Figure 2, the present embodiment also provides a kind of mobile terminal, and it comprises a range sensor 1, a front-facing camera 2 and a controller 3, and this range sensor 1 and the coplanar setting of this front-facing camera 2;
This range sensor 1 for detection of the distance between the barrier in screen the place ahead of this mobile terminal and this mobile terminal as the first distance;
This front-facing camera 2 is used for gathering the image of this barrier;
This controller 3 is used for the preview mode that wakes the screen of this mobile terminal while comprising people's face up and enter this front-facing camera less than a first threshold, this image in this first distance.
Wherein, this first threshold is self-defining, and the user can adjust the concrete numerical value of this first threshold neatly according to the actual conditions of oneself.
The enable out-of-order of the present embodiment to this range sensor 1 and this front-facing camera 2, as long as the function that this range sensor 1 and this front-facing camera 2 are realized separately.The recognition methods flow process of the mobile terminal of the present embodiment is simple, the structure of mobile terminal is also simple, has very high flexibility, need not the user and carry a small mirror, the user can convenient by this mobile terminal, momentarily arrange the dressing of oneself, improves the experience of user to this mobile terminal.
Embodiment 2
The recognition methods of the mobile terminal of the present embodiment has increased the order of enabling of this range sensor 1 and this front-facing camera 2 on the basis of embodiment 1, as shown in Figure 3, the present embodiment provides a kind of recognition methods of mobile terminal, and this recognition methods comprises the following steps:
Step 201, detect this first distance, and whether judge this first distance less than this first threshold, if, enter step 202, if not, repeated execution of steps 201;
Step 202, this front-facing camera gather the image of this barrier, and judge whether this image comprises people's face, if, enter step 203, if not, repeated execution of steps 201;
Step 203, wake the screen of this mobile terminal up and enter the preview mode of this front-facing camera.
The mobile terminal of the present embodiment comprises all parts of embodiment 1, this range sensor in this range sensor of the present embodiment and the function of this front-facing camera and embodiment 1 is identical with the function of this front-facing camera, and difference is the function that this controller is realized:
This first distance that this controller 3 is used for detecting at this range sensor 1 is enabled this front-facing camera 2 during less than this first threshold, and wakes this screen up and enter the preview mode of this front-facing camera when this image that this front-facing camera 2 collects comprises people's face.
The first distance that the present embodiment detects at this range sensor 1 is during less than this first threshold, this controller 3 is just controlled and is enabled this front-facing camera 2, as when detected this first distance of this range sensor 1 does not meet less than this first threshold, just need not to enable again this front-facing camera 2 and carried out work, have advantages of and detect accurately, save program.
Embodiment 3
The recognition methods of the mobile terminal of the present embodiment has increased the order of enabling of this range sensor 1 and this front-facing camera 2 on the basis of embodiment 1, but the present embodiment is sequentially just in time opposite, specific as follows with embodiment 2 to enabling of this range sensor 1 and this front-facing camera 2:
The present embodiment provides a kind of recognition methods of mobile terminal, and this recognition methods comprises the following steps:
Step 301, in the situation that wake this front-facing camera of this screen up, do not gather the image of this barrier, and judge whether this image comprises people's face, if, enter step 302, if not, repeated execution of steps 301;
Step 302, detect this first distance, and whether judge this first distance less than this first threshold, if, enter step 303, if not, repeated execution of steps 301.
Step 303, wake the screen of this mobile terminal up and enter the preview mode of this front-facing camera.
The flow chart of this recognition methods of the present embodiment just no longer provides, and those skilled in the art can imagine the flow chart of the recognition methods that the present embodiment according to the flow chart of the recognition methods of embodiment 2.
The mobile terminal of the present embodiment comprises all parts of embodiment 1, this range sensor in this range sensor of the present embodiment and the function of this front-facing camera and embodiment 1 is identical with the function of this front-facing camera, and difference is the function that this controller is realized:
This controller 3 is used for enabling this range sensor 1 when this image that this front-facing camera 2 collects comprises people's face, and this first distance that detects at this range sensor 1 preview mode of waking this screen up and enter this front-facing camera during less than this first threshold.
When this image that the present embodiment collects at this front-facing camera 2 comprises people's face, this controller 3 is just controlled and is enabled this range sensor 1, while as this image that collects at this front-facing camera 2, not comprising people's face, just need not to enable again this range sensor 1 and carried out work, have advantages of and detect accurately, save program.
Embodiment 4
Now comparatively ripe to the research of human face detection tech, whether comprise people's face so the above embodiments 1-3 can select existing any detection method to detect this image that this front-facing camera 2 collects, and the present embodiment is selected a kind of suitable the present invention and is had the method for detecting human face of better technique effect than other method for detecting human face from numerous method for detecting human face.
In the present embodiment, this mobile terminal stores has a face database that comprises a plurality of facial contour templates, and as shown in Figure 4, the recognition methods of the present embodiment comprises the following steps:
step 401, detect distance between the barrier in screen the place ahead of this mobile terminal and this mobile terminal as the first distance, the front-facing camera of this mobile terminal gathers the image of this barrier, the controller of this mobile terminal carries out Threshold segmentation to extract the profile of this barrier to this barrier in this image, judge that whether this first distance is less than a first threshold (for example 20cm), this profile whether with this face database in the facial contour template be complementary, if, enter step 402, if not, repeated execution of steps 401, wherein, this Threshold segmentation adopts Image binarizing algorithm,
Step 402, wake the screen of this mobile terminal up and enter the preview mode of this front-facing camera.
the present embodiment also provides a kind of mobile terminal, the mobile terminal of the present embodiment comprises all parts of embodiment 1, this range sensor in this range sensor of the present embodiment and the function of this front-facing camera and embodiment 1 is identical with the function of this front-facing camera, difference is the function that this controller is realized: this controller 3 is used for this barrier of this image is carried out Threshold segmentation to extract the profile of this barrier, and the facial contour template in this profile and this face database is complementary, and the preview mode that this first distance is waken this screen up and entered this front-facing camera during less than this first threshold.
The present embodiment detects this image by Image binarizing algorithm and whether comprises people's face, uses this Image binarizing algorithm to have fast response time, the processing time is short and simplifies the advantage such as treatment step compared to other people's face detection algorithm.
Embodiment 5
The present embodiment increases a Rule of judgment on the basis of embodiment 1, make the recognition methods of the present embodiment more accurate, prevent that the user is placed on mobile terminal such as mobile phone on desk, and this mobile terminal faces the user, at this moment the user does not want to utilize the dressing of this mobile terminal arrangement oneself, but this mobile terminal has still entered the preview mode of the front-facing camera of this mobile terminal.
we know, the user is generally that hand is held small mirror while using small mirror to arrange oneself dressing, and the user also generally can hand-held this mobile terminal while using the recognition function of mobile terminal, so, as shown in Figure 5, the mobile terminal of the present embodiment is set up a temperature sensor 4 on the basis of embodiment 1, this temperature sensor 4 is for detection of the temperature with the contacted shelter of this mobile terminal (for example user's of this mobile terminal hand), this controller 3 is used in this first distance less than this first threshold, this image wakes this screen up and enters the preview mode of this front-facing camera while comprising people's face and this temperature greater than a Second Threshold.
Wherein, this Second Threshold is self-defining, and the user can adjust the concrete numerical value of this Second Threshold neatly according to the actual conditions of oneself.
The recognition methods of the present embodiment replaces with 101 ' of the present embodiment, step 101 with the step 101 in the recognition methods of embodiment 1 ' comprise the following steps:
Detect distance between the barrier in screen the place ahead of this mobile terminal and this mobile terminal as the first distance, the front-facing camera of this mobile terminal gathers the image of this barrier, this temperature sensor detects the temperature with the contacted shelter of this mobile terminal, judge whether whether this first distance comprise that less than a first threshold, this image whether people's face and this temperature are greater than a Second Threshold, if, enter step 102, if not, repeated execution of steps 101 '.
Embodiment 6
Increase by a step before the step 101 of the recognition methods of the present embodiment in the recognition methods of embodiment 1, this step is: detect this mobile terminal and whether receive a triggering signal, if, enter step 101, if not, repeat this step.
As shown in Figure 6, the present embodiment also provides a kind of mobile terminal, this mobile terminal also comprises a detecting unit 5 on the basis of embodiment 1, whether this detecting unit 5 receives this triggering signal for detection of this mobile terminal, when receiving this triggering signal, call this range sensor 1 and this front-facing camera 2.
Wherein, this triggering signal is the signal that the signal that sends or touch-control touch-screen send that pushes button.Certainly, this button of pressing can use power button, and the button that can also the user often use, as volume key.
the present embodiment is by increasing this step, make mobile terminal not only have the function of embodiment 1, the function that also has the misoperation that has prevented the user, as hand-held in the user, when the user oriented mobile terminal of display screen and user do not implement any operation or are using this mobile terminal this mobile terminal, at this moment the user arranges the dressing of oneself with regard to need not at all with the recognition function of mobile terminal, but the distance that this range sensor detects and the image of this front-facing camera collection meet Rule of judgment, cause this mobile terminal to enter the preview mode of this front-facing camera, this is not obviously the result that the user wants, therefore for fear of this drawback, the present embodiment is provided with this step.
Embodiment 7
The present embodiment increases a Rule of judgment on the basis of embodiment 1, make the recognition methods of the present embodiment more accurate.
The mobile terminal of the present embodiment is set up a timer on the basis of embodiment 1, this timer is used for calculating the duration that this first distance is kept, and this controller is used for reaching less than this first threshold, this duration one the 3rd threshold value, this image wake the screen of this mobile terminal up and enter this front-facing camera while comprising people's face preview mode in this first distance.
Wherein, the 3rd threshold value is self-defining, and the user can adjust the concrete numerical value of the 3rd threshold value neatly according to the actual conditions of oneself.
The recognition methods of the present embodiment replaces with 101 ' of the present embodiment, step 101 with the step 101 in the recognition methods of embodiment 1 ' comprise the following steps:
Detect distance between the barrier in screen the place ahead of this mobile terminal and this mobile terminal as the first distance, the front-facing camera of this mobile terminal gathers the image of this barrier, calculate the duration that this first distance is kept, judge this first distance whether less than a first threshold, this duration whether reach one the 3rd threshold value, whether this image comprises people's face, if, enter step 102, if not, repeated execution of steps 101 '.
Although more than described the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is limited by appended claims.Those skilled in the art under the prerequisite that does not deviate from principle of the present invention and essence, can make various changes or modifications to these execution modes, but these changes and modification all fall into protection scope of the present invention.