The content of the invention
The technical problem to be solved in the present invention be in order to overcome prior art in mobile terminal in tilt forward and back state or
During the state that tilts, the content inclination of the screen display of the mobile terminal that user sees, the defect of distortion, there is provided one kind is mobile
Terminal and display content deflection method so that user or so or when tilting forward and back mobile terminal, remain able to reach optimal viewing
Effect.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The present invention provides a kind of mobile terminal, and it includes a gravity sensor, and its feature is that the mobile terminal also includes
One opening module, a detection module, a judge module, a computing module, a deflection module, a Zoom module and four preposition take the photograph
As head, four front-facing cameras respectively positioned at the top of screen of the mobile terminal, lower section, left side, right side first before
Put camera, the second front-facing camera, the 3rd front-facing camera, the 4th front-facing camera;
The opening module is used to being opened when the acceleration that detects in the gravity sensor changes this four and preposition takes the photograph
As head;
The detection module is used to identify that the image that front-facing camera is captured includes human eye and difference by eye recognition
Detect first front-facing camera, second front-facing camera, the 3rd front-facing camera, the 4th front-facing camera and human eye
Distance as the first distance, second distance, the 3rd distance and the 4th distance;
The judge module is used to judge that the mobile terminal is to be in tilt forward and back state or tilt state;
The mobile terminal is in when tilting forward and back state and enters operation one:The computing module be used for by first distance and
The second distance calculates the first deflection angle between the screen place plane and human eye place plane;The deflection module is used for
The display content three-dimensional of the screen is deflected to by a virtual plane parallel with human eye place plane according to first deflection angle,
The virtual plane is first deflection angle with the angle of the screen place plane;The Zoom module is used for after three-dimensional deflection
Display content is zoomed in and out, so that the region of display content that eye-observation is arrived is rectangle;
The mobile terminal is in when tilting state and enters operation two:The computing module be used for by the 3rd distance and
4th distance calculates the second deflection angle between the screen place plane and human eye place plane;The deflection module is used for
The display content three-dimensional of the screen is deflected to by a virtual plane parallel with human eye place plane according to second deflection angle,
The virtual plane is second deflection angle with the angle of the screen place plane;The Zoom module is used for after three-dimensional deflection
Display content is zoomed in and out, so that the region of display content that eye-observation is arrived is rectangle.
In this programme, the mobile terminal in tilt forward and back state or tilt state when, and call the deflection
After module, the virtual plane that the display content after three-dimensional deflection is located is parallel with human eye place plane, but from the angle of human eye
From the point of view of, because the display content in the remote virtual plane of human eye it is relatively small, in the near virtual plane of human eye
Display content is relatively large, thus eye-observation to the virtual plane in the region that surrounds of display content be one trapezoidal,
Thus the present invention is also provided with the Zoom module, the Zoom module remote display content of human eye of adjusting the distance is amplified, while right
Reduced apart from the near display content of human eye so that from from the perspective of human eye, eye-observation to display content enclosed
Into region be rectangle, reach optimal viewing effect.
It is preferred that the judge module be used to judging the difference of first distance and the second distance whether more than the 3rd away from
Difference with a distance from the 4th, if then judging the mobile terminal in state is tilted forward and back, if otherwise judging the shifting
Dynamic terminal is in the state that tilts.
It is preferred that in the operation one, the computing module is used to pass through formula β=90 °-α, α=arcos [(L1 2+H2-L2 2)/
2L1H] calculate first deflection angle, wherein β is first deflection angle, L1For in first distance and the second distance compared with
Big value, L2For the smaller value in first distance and the second distance, H is first front-facing camera and the second preposition shooting
Distance between head;
In the operation two, the computing module is used to pass through formula β=90 °-α, α=arcos [(L3 2+W2-L4 2)/2L3W] calculate
Second deflection angle, wherein β be second deflection angle, L3For the higher value in the 3rd distance and the 4th distance, L4For
3rd distance and the 4th distance in smaller value, W be between the 3rd front-facing camera and the 4th front-facing camera away from
From.
It is preferred that in the operation one, the Zoom module is used for larger by numerical value in first distance and the second distance
The display content of the corresponding front-facing camera relative close of distance be amplified, while to by first distance and this second away from
From middle numerical value it is less with a distance from the display content of corresponding front-facing camera relative close reduced so that eye-observation is arrived
Display content region be rectangle;
In the operation two, the Zoom module is used for by the larger distance pair of numerical value in the 3rd distance and the 4th distance
The display content of the front-facing camera relative close answered is amplified, while to by numerical value in the 3rd distance and the 4th distance
The less display content apart from corresponding front-facing camera relative close is reduced, so that in the display arrived of eye-observation
The region of appearance is rectangle.
The present invention also provides a kind of display content deflection method, and its feature is that it utilizes above-mentioned mobile terminal to realize,
The display content deflection method is comprised the following steps:
S1, gravity sensor detection acceleration;
S2, the opening module four front-facing cameras are opened when the acceleration for detecting changes;
S3, the detection module identify that the image of each front-facing camera capture includes human eye by eye recognition;
S4, the detection module detect first front-facing camera, second front-facing camera, the 3rd preposition shooting respectively
Head, the 4th front-facing camera and human eye distance as first distance, the second distance, the 3rd apart from and the 4th away from
From;
S5, the judge module judge that the mobile terminal is in tilting forward and back state or tilt state, if should
Mobile terminal then enters step S in the state that tilts forward and back6If the mobile terminal then enters step in the state that tilts
S9;
S6, the computing module calculates the screen place plane and human eye and is located by first distance and the second distance
The first deflection angle between plane;
S7, the deflection module according to first deflection angle by the display content three-dimensional of the screen deflect to and human eye be located
The parallel virtual plane of plane;
S8, the Zoom module display content after three-dimensional deflection is zoomed in and out so that in the display arrived of eye-observation
The region of appearance is rectangle, terminates flow process;
S9, the computing module calculates the screen place plane and human eye and is located by the 3rd distance and the 4th distance
Second deflection angle between plane;
S10, the deflection module according to second deflection angle by the display content three-dimensional of the screen deflect to and human eye be located
The parallel virtual plane of plane;
S12, the Zoom module display content after three-dimensional deflection is zoomed in and out so that in the display arrived of eye-observation
The region of appearance is rectangle, terminates flow process.
It is preferred that in step S5In, the judge module judges whether first distance and the difference of the second distance are more than
The difference of the 3rd distance and the 4th distance, if then judging the mobile terminal in state is tilted forward and back, if otherwise sentencing
Break and the mobile terminal in the state that tilts.
It is preferred that in step S6In, the computing module passes through formula β=90 °-α, α=arcos [(L1 2+H2-L2 2)/2L1H]
Calculate first deflection angle, wherein β is first deflection angle, L1It is larger in for first distance and the second distance
Value, L2For the smaller value in first distance and the second distance, H is first front-facing camera and second front-facing camera
Between distance;
In step S9In, the computing module passes through formula β=90 °-α, α=arcos [(L3 2+W2-L4 2)/2L3W] calculate this
Two deflection angles, wherein β be second deflection angle, L3For the higher value in the 3rd distance and the 4th distance, L4For this
Smaller value in three distances and the 4th distance, W is the distance between the 3rd front-facing camera and the 4th front-facing camera.
It is preferred that in step S8In, the Zoom module to by numerical value in first distance and the second distance it is larger away from
Display content from corresponding front-facing camera relative close is amplified, while to by first distance and the second distance
The less display content apart from corresponding front-facing camera relative close of numerical value is reduced so that eye-observation arrive it is aobvious
The region for showing content is rectangle;
In step S11In, the Zoom module is to corresponding by the larger distance of numerical value in the 3rd distance and the 4th distance
The display content of front-facing camera relative close is amplified, while to less by numerical value in the 3rd distance and the 4th distance
The display content of the corresponding front-facing camera relative close of distance reduced so that the eye-observation display content that arrives
Region is rectangle.
On the basis of common sense in the field is met, above-mentioned each optimum condition can be combined, and obtain final product each preferable reality of the present invention
Example.
The present invention positive effect be:
The present invention mobile terminal and display content deflection method so that the mobile terminal in tilt forward and back state or
During the state that tilts, the virtual plane that the display content after three-dimensional deflection is located is parallel with human eye place plane, and people observes
The region of the display content for observing is rectangle, reaches optimal viewing effect.
Specific embodiment
The present invention is further illustrated below by the mode of embodiment, but does not therefore limit the present invention to described reality
Among applying a scope.
With reference to shown in Fig. 1, the present embodiment provides a kind of mobile terminal, it include a gravity sensor 1, an opening module 2,
One detection module 3, a judge module 4, a computing module 5, a deflection module 6, a Zoom module 7 and four front-facing cameras 8,
Four front-facing cameras 8 respectively first preposition are taken the photograph positioned at the top of the screen of the mobile terminal, lower section, left side, right side
As head, the second front-facing camera, the 3rd front-facing camera, the 4th front-facing camera.
The part that the mobile terminal includes is described above, lower mask body introduces the function that each part is realized:
The gravity sensor 1 is used to detect acceleration in real time;
The opening module 2 is used to open four front-facing cameras 8 when the acceleration for detecting changes;
The detection module 3 is used to identify that the image that front-facing camera 8 is captured includes human eye and divides by eye recognition
Do not detect first front-facing camera, second front-facing camera, the 3rd front-facing camera, the 4th front-facing camera and people
The distance of eye is used as the first distance, second distance, the 3rd distance and the 4th distance;
The judge module 4 is used to judge whether first distance and the difference of the second distance are more than the 3rd distance and are somebody's turn to do
The difference of the 4th distance, if then judging the mobile terminal in state is tilted forward and back, if otherwise judging the mobile terminal
In the state of tilting.
The judge module 4 judges that the mobile terminal is in when tilting forward and back state and enters operation one:
The computing module 5 is used to pass through formula β=90 °-α, α=arcos [(L1 2+H2-L2 2)/2L1H] calculate screen place
The first deflection angle between plane and human eye place plane, wherein β be first deflection angle, L1For first distance and should
Higher value in second distance, L2For the smaller value in first distance and the second distance, H be first front-facing camera with
Distance between second front-facing camera;
The deflection module 6 is used to be deflected to the display content three-dimensional of the screen and human eye institute according to first deflection angle
In the parallel virtual plane of plane, the virtual plane is first deflection angle with the angle of the screen place plane;
The Zoom module 7 is used to zoom in and out the display content after three-dimensional deflection, specially:The Zoom module 7 is used for
To by the display content of the larger corresponding front-facing camera relative close of distance of numerical value in first distance and the second distance
Be amplified, at the same to by numerical value in first distance and the second distance it is less apart from corresponding front-facing camera relatively
Near display content is reduced, so that the region of display content that eye-observation is arrived is rectangle.
The judge module 4 judges that the mobile terminal is in when tilting state and enters operation two:
The computing module 5 is used to pass through formula β=90 °-α, α=arcos [(L3 2+W2-L4 2)/2L3W] calculate screen place
The second deflection angle between plane and human eye place plane, wherein β be second deflection angle, L3For the 3rd distance and should
Higher value in 4th distance, L4For the 3rd distance and the 4th distance in smaller value, W be the 3rd front-facing camera with
Distance between the 4th front-facing camera;
The deflection module 6 is used to be deflected to the display content three-dimensional of the screen and human eye institute according to second deflection angle
In the parallel virtual plane of plane, the virtual plane is second deflection angle with the angle of the screen place plane;
The Zoom module 7 is used to zoom in and out the display content after three-dimensional deflection, specially:The Zoom module 7 is used for
To by the display content of the larger corresponding front-facing camera relative close of distance of numerical value in the 3rd distance and the 4th distance
Be amplified, at the same to by the 3rd distance and the 4th distance in numerical value it is less apart from corresponding front-facing camera relatively
Near display content is reduced, so that the region of display content that eye-observation is arrived is rectangle.
With reference to shown in Fig. 2, the present embodiment also provides a kind of display content deflection method, and it utilizes above-mentioned mobile terminal reality
Existing, the display content deflection method is comprised the following steps:
Step 101, the gravity sensor detection acceleration;
Step 102, the opening module open four front-facing cameras when the acceleration for detecting changes;
Step 103, the detection module identify that the image of each front-facing camera capture includes people by eye recognition
Eye;
Step 104, the detection module detect respectively first front-facing camera, second front-facing camera, before the 3rd
The distance of camera, the 4th front-facing camera and human eye is put as first distance, the second distance, the 3rd distance and is somebody's turn to do
4th distance;
Step 105, the judge module judge that the mobile terminal is to be in tilt forward and back state or tilt state, if
It is that the mobile terminal then enters step 106 in the state that tilts forward and back, if the mobile terminal then enters in the state that tilts
Enter step 109;Judge that the mobile terminal is in tilting forward and back state or the state that tilts is concretely comprised the following steps:The judgement
Whether module judges first distance and the difference of the second distance more than the 3rd distance and the difference of the 4th distance, if
The mobile terminal is then judged in state is tilted forward and back, if otherwise judging the mobile terminal in the state that tilts;
Step 106, the computing module pass through formula β=90 °-α, α=arcos [(L1 2+H2-L2 2)/2L1H] calculate the screen
The first deflection angle between place plane and human eye place plane, wherein β be first deflection angle, L1For first distance
With the higher value in the second distance, L2For the smaller value in first distance and the second distance, H is the first preposition shooting
Distance between head and second front-facing camera;
Step 107, the deflection module deflect to the display content three-dimensional of the screen and people according to first deflection angle
The parallel virtual plane of eye place plane;
Step 108, the Zoom module are zoomed in and out to the display content after three-dimensional deflection, specially:The Zoom module pair
Enter by the display content of the larger corresponding front-facing camera relative close of distance of numerical value in first distance and the second distance
Row amplifies, while to less apart from corresponding front-facing camera relative close by numerical value in first distance and the second distance
Display content reduced so that the region of display content that eye-observation is arrived is rectangle, terminate flow process;
Step 109, the computing module pass through formula β=90 °-α, α=arcos [(L3 2+W2-L4 2)/2L3W] calculate the screen
The second deflection angle between place plane and human eye place plane, wherein β be second deflection angle, L3For the 3rd distance
With the higher value in the 4th distance, L4For the smaller value in the 3rd distance and the 4th distance, W is the 3rd preposition shooting
Distance between head and the 4th front-facing camera;
Step 110, the deflection module deflect to the display content three-dimensional of the screen and people according to second deflection angle
The parallel virtual plane of eye place plane;
Step 111, the Zoom module are zoomed in and out to the display content after three-dimensional deflection, specially:The Zoom module pair
Enter by the display content of the larger corresponding front-facing camera relative close of distance of numerical value in the 3rd distance and the 4th distance
Row amplifies, while to less apart from corresponding front-facing camera relative close by numerical value in the 3rd distance and the 4th distance
Display content reduced so that the region of display content that eye-observation is arrived is rectangle, terminate flow process.
In this embodiment, the mobile terminal is in when tilting forward and back state, how according to first deflection angle by the screen
What the display content three-dimensional of curtain deflected to the virtual plane parallel with human eye place plane realizes flow process referring to Application No.
The patent reference of the 201310130456.5th, entitled " method and device at three-dimensional rotation interface is realized based on Android system "
Document, is specifically shown in the specific embodiment part of the patent references(That is page 8 to page 15 of specification).Substantially step bag
Include:
Step S1, destination object Three Dimensional Interface characteristic information to be achieved is extracted, according to the Three Dimensional Interface feature letter for extracting
Breath chooses three-dimensional system of coordinate, builds the Mathematical Modeling of mapping Three Dimensional Interface characteristic information, and the realization of the step is special entirely by reference to this
Concrete refinement content in the specific embodiment part of sharp bibliography under step 101;
Step S2, destination object is loaded into into Mathematical Modeling, carry out texture mapping process, the realization of the step entirely by reference to
Concrete refinement content in the specific embodiment part of the patent references under step 102;
Step S3, the Mathematical Modeling to carrying out texture mapping process carries out coordinate transform, obtains and three-dimensional boundary to be achieved
The inclination Mathematical Modeling that region feature matches, the specific embodiment portion of the realization of the step entirely by reference to the patent references
Concrete refinement content in point under step 103, and first deflection angle β that the present invention is calculated brings the patent into reference to text
Formula x ' in the specific embodiment part offered under step 1032cos2α+z’2=r2cos2In α in α;
Step S4, triggering inclines Mathematical Modeling rotation, obtains rotating mathematics model, to rotating mathematics model according to setting in advance
The viewpoint put carries out perspective projection, obtains the corresponding view plane coordinate information of rotating mathematics model, and the realization of the step is joined completely
According to the concrete refinement content under step 104 in the specific embodiment part of the patent references;
Step S5, view plane coordinate information is converted to into screen plane coordinate information, according to the screen plane coordinate of conversion
Information is presented three-dimensional rotation interface, and the realization of the step is walked entirely by reference in the specific embodiment part of the patent references
Concrete refinement content under rapid 105.
In this embodiment, the mobile terminal in tilt state when, how according to second deflection angle by the screen
What the display content three-dimensional of curtain deflected to the virtual plane parallel with human eye place plane realizes process with reference to above-mentioned how basis
The display content three-dimensional of the screen is deflected to first deflection angle realization of the virtual plane parallel with human eye place plane
Process, just repeats no more here.
Name a specific example to illustrate the present invention, so that those skilled in the art better understood when this
Invention:
The mobile terminal selects mobile phone in the present embodiment, as shown in figure 3, it illustrates the first front-facing camera of the mobile phone
81st, the second front-facing camera 82, the 3rd front-facing camera 83, the 4th front-facing camera 84.
The gravity sensor 1 detects in real time acceleration, and the acceleration for detecting is transmitted to the opening module 2, should
Opening module 2 opens the first front-facing camera 81, the second front-facing camera the 82, the 3rd when the acceleration for detecting changes
Front-facing camera 83, the 4th front-facing camera 84.
With reference to Fig. 4, the detection module 3 identifies first front-facing camera 81 by eye recognition, this second preposition takes the photograph
As an image for the 82, the 3rd front-facing camera 83, the 4th front-facing camera 84 capture includes human eye 9, and detect respectively
First front-facing camera 81, second front-facing camera 82, the 3rd front-facing camera 83, the 4th front-facing camera 84 with
The distance of human eye 9 is as first apart from D1, second distance D2, the 3rd apart from D3And the 4th apart from D4, D1For 23cm, D2For 18cm,
D3And D4It is 20cm, and the distance between first front-facing camera 81 and second front-facing camera 82 are H.
The judge module 4 judge this first apart from 23cm and second distance 18cm difference whether more than the 3rd distance
20cm and the 4th and judges that difference 5cm of first distance and the second distance is more than the 3rd apart from the difference of 20cm
Difference 0cm of distance and the 4th distance then shows that the mobile terminal is in and tilts forward and back state.
If this is first apart from D1And between first front-facing camera 81 and second front-facing camera 82 between H
Angle is α, then according to cosine formula D2 2=D1 2+H2-2D1H*cos α, and then draw α=arcos [(D1 2+H2-D2 2)/2D1H], and
Because this is first apart from D1It is perpendicular with the plane that human eye is located, so between the screen place plane and human eye place plane
First deflection angle β=90 °-α, therefore, the computing module 5 passes through formula β=90 °-α, α=arcos [(D1 2+H2-D2 2)/2D1H]
Calculate first deflection angle β.
The deflection module 6 is used to be deflected to the display content three-dimensional of the screen and human eye according to the first deflection angle β
The parallel virtual plane of place plane, the i.e. display content of the screen carry out the three-dimensional deflection of the first deflection angle β, and this is virtual
Display content area defined in plane is one trapezoidal(See the dash area that dotted line is surrounded in Fig. 5).
In order to reach optimal viewing effect, the Zoom module 7 pairs is by the display of the first front-facing camera relative close
Hold(That is the display content of the trapezoidal top half in Fig. 5)It is amplified, while to leaning on second front-facing camera relatively
Near display content(That is the display content of the trapezoidal the latter half in Fig. 5)Reduced, so that seeing from the angle of human eye
From the point of view of examining, the region of the display content that eye-observation is arrived is rectangle.
Although the foregoing describing the specific embodiment of the present invention, it will be appreciated by those of skill in the art that these
It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back
On the premise of the principle and essence of the present invention, various changes or modifications can be made to these embodiments, but these are changed
Protection scope of the present invention is each fallen within modification.