The method of mobile terminal adjust automatically output
Technical field
The present invention relates to the method for electronic communication field, more particularly to the output of mobile terminal adjust automatically.
Background technology
With the development of electronic communication technology, the mobile terminal such as mobile phone, tablet personal computer is more and more widely consumed
Person uses.However, different user is slightly different to the use demand of these mobile terminal devices, such as old user, due to eyesight
The reasons such as decline are, it is necessary to which image or font that mobile terminal device is shown are larger;And for example, when teenager uses mobile terminal,
Need to watch the distance of screen to adjust the image or font size that mobile terminal is shown according to it.In the prior art, move mostly
Dynamic terminal all has to be set display image ratio, display font size is set manually and sets broadcast sound volume size manually manually
Function.But set cumbersome manually, ease for use is poor.Such as on the mobile phone of personal use, because user generally fixes not
Become, without being frequently configured, the problem of setting cumbersome manually does not protrude also, but if being tablet personal computer, kinsfolk or
Other crowds according to different user also using, it is necessary to be frequently configured, and the problem of setting cumbersome manually, which is just compared, to be highlighted.
If a kind of mobile terminal, can automatic identification active user state, the age of such as active user, active user's viewing display
Distance so that the automatic output to mobile terminal is adjusted, the ease for use of the mobile terminal will be greatly improved, user is improved
To the satisfaction of usage experience, brought great convenience to user.
The content of the invention
It is an object of the invention to provide a kind of method of mobile terminal adjust automatically output.
The method of mobile terminal adjust automatically output provided by the present invention includes:
S1 detects the currently used state of user, generation detection data using camera;
S2 mobile terminals microprocessor controller receives the detection data and generates corresponding adjust instruction;
S3 mobile terminals output module receives the adjust instruction and performs corresponding output according to the adjust instruction and grasps
Make.
The method of mobile terminal adjust automatically provided by the present invention output, can automatic identification active user state, such as
The age of active user, the distance of active user's viewing display, so that the automatic output to mobile terminal is adjusted, will be very big
The ease for use of the mobile terminal is improved, user is improved to the satisfaction of usage experience, is brought great convenience to user.
Brief description of the drawings
Fig. 1 is the method structural representation that mobile terminal adjust automatically of the present invention is exported;
Fig. 2 is detection data generation described in the method for the mobile terminal adjust automatically output described in the embodiment of the present invention one
Step schematic diagram;
Fig. 3 is that the method for the mobile terminal adjust automatically output described in the embodiment of the present invention one determines that active user face schemes
The step schematic diagram in the forehead region of picture;
Fig. 4 is to calculate the forehead described in the method for the mobile terminal adjust automatically output described in the embodiment of the present invention one
The step schematic diagram of longitudinal gray scale variation rate in region;
Fig. 5 is the corresponding adjustment of generation described in the method for the mobile terminal adjust automatically output described in the embodiment of the present invention one
The step schematic diagram of instruction;
Fig. 6 is generation detection data described in the method for the mobile terminal adjust automatically output described in the embodiment of the present invention two
Step schematic diagram;
Fig. 7 be the embodiment of the present invention two described in mobile terminal adjust automatically output method described in obtain user's eye with
The step schematic diagram of initial distance between display screen longitudinal center position;
Fig. 8 is the corresponding adjustment of generation described in the method for the mobile terminal adjust automatically output described in the embodiment of the present invention two
The step schematic diagram of instruction.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Embodiment one
As shown in figure 1, the present embodiment provides a kind of method of mobile terminal adjust automatically output, comprise the following steps:
S1 detects the currently used state of user, generation detection data using camera;
S2 mobile terminals microprocessor controller receives the detection data and generates corresponding adjust instruction;
S3 mobile terminals output module receives the adjust instruction and performs corresponding output according to the adjust instruction and grasps
Make.
As shown in Fig. 2 the camera described in the present embodiment one refers to the shooting consistent with mobile terminal display screen direction
Head, commonly referred to as front camera.Current state described in the present embodiment one refers to the use of the currently used mobile terminal
The age at family.The following is the age of user that the currently used mobile terminal is detected using front camera and generate detection data institute
Including the step of:
S11 determines the forehead region of active user's face image;
S12 carries out transverse edge detection to the forehead region, so as to calculate longitudinal GTG in the forehead region
Rate of change;Longitudinal gray scale variation rate is turned into current gray rate of change Z, the current gray rate of change Z in the present embodiment one
It is used as the detection data described in above-mentioned S1.
As shown in figure 3, the S11 determines the forehead region of active user's face image, comprise the following steps:
S111 is mobile whole when the user that mobile terminal receives user's input starts the external command of text application
End starts camera and shot, and obtains the face image data of active user;
S112 mobile terminals mark out position pixel coordinate M1, the M2 and two at corners of the mouth two ends in the face image data
Position pixel coordinate E1, E2 of pupil;Mouth center pixel seat is calculated according to position pixel coordinate M1, the M2 at corners of the mouth two ends
M is marked, two pupil center location pixel coordinate E are calculated according to position pixel coordinate E1, E2 of two pupils;Pass through mouth center
Pixel coordinate M and two pupil center location pixel coordinate E calculates the distance between two pupil center and mouth center L;Pass through
Position pixel coordinate E1, E2 of two pupils calculate the distance between two pupils N;
The position upward 0.2L of pixel coordinate E1, E2 line of two pupils is defined as forehead region lower boundary by S113;By two
The position upward L of pixel coordinate E1, E2 line of pupil is defined as forehead region coboundary;By mouth center pixel coordinate M with
N is defined as the left margin in forehead region to two pupil center location pixel coordinate E lines to the left;By mouth center pixel coordinate M
N is defined as the right margin in forehead region to the right with two pupil center location pixel coordinate E lines;So, by it is above-mentioned it is upper and lower, left,
The region in right margin besieged city is defined as forehead region;
As shown in figure 4, above-mentioned S12 carries out transverse edge detection to the forehead region, so as to calculate the forehead area
Longitudinal gray scale variation rate in domain, comprises the following steps:
S121 extracts forehead area image;
S122 carries out transverse edge detection to the forehead area image extracted, so as to calculate in the forehead region
Longitudinal gray scale variation rate is referred to as current gray rate of change in longitudinal gray scale variation rate Z, the present embodiment one.
Longitudinal gray scale variation rate in the forehead region, is calculated by the Sobel operators of a transverse direction.
Horizontal Sobel operators:
The rate of gray level at pixel P (i, j) place is calculated by Sobel operators:
Set up an office P (i, j) place gray scale be Gij, then rate of gray level Δ G hereinijFor
ΔGij=Sy*A
On the image after the processing of horizontal Sobel operators, the numerical value in corresponding points is to represent horizontal gray scale herein
Rate of change, the rate of change with higher absolute value represents that image herein is unsmooth, and it is exactly wrinkle to be reflected on face.
By setting a threshold value Y, cross directional variations rate absolute value can be higher than to the region of this threshold value, it is believed that be the presence of wrinkle
Line.The pixel for meeting this condition can be counted.
Work as | Δ Gij|>During Y, t is counted from increasing, so as to calculate longitudinal gray scale variation rate Z in the forehead region.
Refer to as shown in figure 5, the S2 mobile terminals microprocessor controller receives the corresponding adjustment of the detection data generation
Order, is specifically included:
S21 prestores gray scale variation rate threshold value Z0 in the terminal;
Current longitudinal gray scale variation rate Z is compared by S22 with gray scale variation rate threshold value Z0, when current longitudinal GTG
When rate of change Z is more than or equal to gray scale variation rate threshold value Z0, adjust instruction is generated.
It will be understood by those skilled in the art that the S3 mobile terminals output module receives the adjust instruction and according to institute
State font size that the corresponding output operation that adjust instruction performed described in corresponding output operation can be amplification display or
Improve the size of broadcast sound volume.This way it is possible to realize determining that its forehead wrinkles according to the gray scale variation rate in user's forehead region
The quantity of line, so that it is determined that the age of active user, and then font and volume are adjusted to what is be adapted with the user at the age
Degree.
Embodiment two
As shown in figure 1, the present embodiment provides a kind of method of mobile terminal adjust automatically output, comprise the following steps:
S1 detects the currently used state of user, generation detection data using camera;
S2 mobile terminals microprocessor controller receives the detection data and generates corresponding adjust instruction;
S3 mobile terminals output module receives the adjust instruction and performs corresponding output according to the adjust instruction and grasps
Make.
As shown in fig. 6, the camera described in the present embodiment one refers to the shooting consistent with mobile terminal display screen direction
Head, commonly referred to as front camera.Current state described in the present embodiment one refers to the use of the currently used mobile terminal
The distance between family eyes and front camera.The currently used state of user is detected using camera the following is the S1, it is raw
Into the specific steps of detection data, including:
S11 starts camera and shot after acquisition face picture, and user's eye and display screen are obtained according to face picture data
Initial distance D3 between longitudinal center position;
S12 compensates processing to the initial distance D3, so as to obtain compensation apart from D3 ', the compensation is apart from D3 ' works
Detection data are generated by the currently used state of the utilization camera detection user described in the S1 and are sent to microprocessor
Controller.
As shown in fig. 7, the S11 is specifically included:
S111 is mobile whole when the user that mobile terminal receives user's input starts the external command of text application
End starts camera and shot, and obtains the face image data of active user;
S112 determines the pixel coordinate E1 and E2 of eyes in the face image data, and calculates the spacing of eyes
(interpupillary distance) dE;It will be understood by those skilled in the art that spacing (interpupillary distance) dE of eyes can be calculated using equation below:
S113 according to the spacing dE of eyes average value and the diagonal angle of view θ of front camera, calculate human eye with
Vertical range D1 between front camera;It will be understood by those skilled in the art that the spacing dE of eyes average value is 61mm;
S114 according to eyes to the visual angle x of the camera and width pixel count X of front camera and height pixel count Y,
Calculate the distance between front camera and display screen longitudinal midline position D2;
D115 is according to the distance between above-mentioned front camera and display screen longitudinal midline position D2, and human eye is proactive
As location in head shooting picture, human eye is calculated to the distance between display screen center D3;People in the art
Member calculates human eye to screen center apart from D3 with the following method it is appreciated that can adopt:If user's eye is wired to proactive picture
The pixel distance of head center line is dH, such as calculating of vertical range, can obtain camera center line before user's eye is wired to apart from h
For:
Then eyes of user is calculated as follows to screen center apart from D3:
So as to obtain human eye to screen center apart from D3.
As shown in figure 8, S2 mobile terminals microprocessor controller, which receives the detection data, generates corresponding adjust instruction, tool
Body includes:
S21 prestores first threshold S1 and Second Threshold S2 in the terminal, and first threshold S1 is less than Second Threshold S2;
The current compensation for calculating acquisition is compared by S22 apart from D3 ' with the first threshold S1 and Second Threshold S2, when
Compensation apart from D3 ' be more than the Second Threshold S2 when or when compensation apart from D3 ' be less than first threshold S1 when, generate adjust instruction;
When compensation is more than or equal to first threshold S1 apart from D3 ' and is less than or equal to Second Threshold S2, without operation;This area skill
Art personnel are appreciated that instruction of the adjust instruction for control display font amplification, so when above-mentioned compensation is more than apart from D3 '
During the Second Threshold S2, it is determined as that now user's eyes amplify the font shown apart from display screen automatically farther out, now, are easy to
User checks;Or when above-mentioned compensation apart from D3 ' be less than first threshold S1 when, be determined as now user's eyes apart from display screen compared with
Closely, now think user's dysphotia, font amplification display need to be carried out, now amplify the font of display automatically to make user
Eyes keep suitable distance with display screen, protect eyesight not decline further;And when compensation apart from D3 ' more than or equal to first
Threshold value S1 and during less than or equal to Second Threshold S2, judge the eyes of user with it is appropriate with display screen distance, thus need not enter
Any operation of row.
It will be understood by those skilled in the art that the setting on threshold value, for the equipment that screen pixels density is 240dpi,
The height that the font of 24 pixels is shown on screen be 0.1 inch (2.54 millimeters), human eye checks font, need to ensure font regarding
It is more than 20 jiaos points in angle, more could easily reads, therefore formula can be obtained:
I.e. font height is greater than reading distance
If the picture element density of current device is Mdpi, the pixels tall of current display font is Hp, then first threshold S1 can set
It is set to:
Second Threshold S2 setting refers to human eyes structure, and human eye can be led after long-time to the object focus within 25cm
Visual fatigue is caused, therefore Second Threshold S2 can be set as 25cm.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used
To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic;
And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical scheme spirit and
Scope.