CN111372028A - Picture rotation control method, device, terminal and storage medium - Google Patents

Picture rotation control method, device, terminal and storage medium Download PDF

Info

Publication number
CN111372028A
CN111372028A CN202010091755.2A CN202010091755A CN111372028A CN 111372028 A CN111372028 A CN 111372028A CN 202010091755 A CN202010091755 A CN 202010091755A CN 111372028 A CN111372028 A CN 111372028A
Authority
CN
China
Prior art keywords
rotation
terminal
parameter
rotation direction
angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010091755.2A
Other languages
Chinese (zh)
Other versions
CN111372028B (en
Inventor
王家宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN202010091755.2A priority Critical patent/CN111372028B/en
Publication of CN111372028A publication Critical patent/CN111372028A/en
Application granted granted Critical
Publication of CN111372028B publication Critical patent/CN111372028B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation

Abstract

The application belongs to the technical field of terminals, and particularly relates to a picture rotation control method, a picture rotation control device, a terminal and a storage medium. The picture rotation control method comprises the following steps: when a terminal rotates along a first rotation direction, judging whether the terminal deviates along a second rotation direction, wherein the second rotation direction is the reverse direction of the first rotation direction; if so, acquiring a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle; determining a second rotation parameter of a display screen of the terminal based on the first rotation parameter, wherein the second rotation parameter comprises a fourth rotation direction and a second rotation angle, and the fourth rotation direction is the reverse direction of the third rotation direction; and rotating the display screen based on the second rotation parameter. The technical scheme of the embodiment of the application can improve the display effect of the display picture.

Description

Picture rotation control method, device, terminal and storage medium
Technical Field
The application belongs to the technical field of terminals, and particularly relates to a picture rotation control method, a picture rotation control device, a terminal and a storage medium.
Background
With the development of science and technology, more and more functions can be supported by the terminal. For example, a user may use the terminal to watch television or use the terminal to make a video call with another person. When a user watches videos by using the terminal, the user can rotate the terminal, and a display picture of the terminal can rotate in the reverse direction, so that the display picture of the terminal can be kept vertically downward, and the user can watch televisions more comfortably.
At present, a terminal may calculate a rotation angle of the terminal based on a six-axis sensor, and acquire the rotation angle of a display screen based on the rotation angle of the terminal, so that the display screen may be rotated. However, in the terminal rotation process, the terminal may shake, the calculation method based on the six-axis sensor only considers the gravity borne by the terminal, and does not relate to the terminal shaking, so that the rotation angle of the terminal is not accurately calculated, the rotation of the terminal display screen is affected, and the display effect of the display screen is affected.
Disclosure of Invention
The embodiment of the application provides a picture rotation control method, a picture rotation control device, a terminal and a storage medium, which can improve the display effect of a display picture.
In a first aspect, an embodiment of the present application provides a method for controlling screen rotation, including:
when a terminal rotates along a first rotation direction, judging whether the terminal deviates along a second rotation direction, wherein the second rotation direction is the reverse direction of the first rotation direction;
if so, acquiring a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle;
determining a second rotation parameter of a display screen of the terminal based on the first rotation parameter, wherein the second rotation parameter comprises a fourth rotation direction and a second rotation angle, and the fourth rotation direction is the reverse direction of the third rotation direction;
and rotating the display screen based on the second rotation parameter.
According to some embodiments, if so, obtaining a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and the obtaining includes:
if so, acquiring the offset of the terminal in the second rotation direction;
if the offset is smaller than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is the first rotation direction;
if the offset is greater than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is a second rotation direction.
According to some embodiments, if so, acquiring a first rotation parameter of the terminal includes:
if so, acquiring the last rotation angle of the terminal rotating along the first rotation direction under the external thrust, and acquiring the current rotation angle of the terminal rotating along the first rotation direction;
and calculating a first rotation parameter of the terminal based on a preset first weight, a preset second weight, the last rotation angle and the current rotation angle, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle.
According to some embodiments, the determining whether the terminal is shifted in a second rotation direction when the terminal rotates in a first rotation direction, the second rotation direction being a reverse direction of the first rotation direction, includes:
when the terminal is in a static state, judging whether the terminal generates offset;
if so, acquiring a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and the method includes:
if so, acquiring the offset of the terminal;
if the offset is smaller than the rotation starting angle, determining the first rotation angle as 0 degree;
if the offset is larger than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises an offset direction and a first rotation angle.
According to some embodiments, said rotating said display based on said second rotation parameter comprises:
and rotating the display picture by the second rotation angle along the fourth rotation direction.
In a second aspect, an embodiment of the present application provides a screen rotation control apparatus, including:
the terminal comprises a deviation judging unit, a judging unit and a judging unit, wherein the deviation judging unit is used for judging whether the terminal deviates along a second rotating direction when the terminal rotates along a first rotating direction, and the second rotating direction is the reverse direction of the first rotating direction;
a parameter obtaining unit, configured to obtain a first rotation parameter of the terminal if the first rotation parameter is positive, where the first rotation parameter includes a third rotation direction and a first rotation angle;
a parameter determining unit, configured to determine a second rotation parameter of a display screen of the terminal based on the first rotation parameter, where the second rotation parameter includes a fourth rotation direction and a second rotation angle, and the fourth rotation direction is an inverse direction of the third rotation direction;
and the picture rotating unit is used for rotating the display picture based on the second rotating parameter.
According to some embodiments, the parameter obtaining unit is configured to, if yes, obtain a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and specifically configured to:
if so, acquiring the offset of the terminal in the second rotation direction;
if the offset is smaller than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is the first rotation direction;
if the offset is greater than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is a second rotation direction.
According to some embodiments, the parameter obtaining unit is configured to, if yes, obtain a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and specifically configured to:
if so, acquiring the last rotation angle of the terminal rotating along the first rotation direction under the external thrust, and acquiring the current rotation angle of the terminal rotating along the first rotation direction;
and calculating a first rotation parameter of the terminal based on a preset first weight, a preset second weight, the last rotation angle and the current rotation angle, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle.
In a third aspect, an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method described in any one of the above when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program is used for implementing any one of the methods described above when executed by a processor.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application provides a picture rotation control method, which can judge whether a terminal deviates along a second rotation direction when the terminal rotates along the first rotation direction, wherein the second rotation direction is the reverse direction of the first rotation direction, if so, a first rotation parameter of the terminal is obtained, the first rotation parameter comprises a third rotation direction and a first rotation angle, a second rotation parameter of a display picture of the terminal can be determined based on the first rotation parameter, the second rotation parameter comprises a fourth rotation direction and a second rotation angle, the fourth rotation direction is the reverse direction of the third rotation direction, and the display picture is rotated based on the second rotation parameter. The second rotation parameter of the display picture can be calculated by calculating the first rotation parameter when the terminal is deviated along the second rotation direction, so that under the condition that the terminal shakes, the technical scheme can improve the accuracy of obtaining the second rotation parameter, reduce the influence of the shaking of the terminal on the display picture and further improve the display effect of the terminal picture.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic view illustrating an application scenario of a picture rotation control method applied to an embodiment of the present application;
fig. 2 is a flowchart illustrating a screen rotation control method according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating an application scenario of a picture rotation control method applied to an embodiment of the present application;
fig. 4 shows an interface diagram of a terminal according to an embodiment of the present application;
FIG. 5 shows an interface diagram of a terminal of an embodiment of the application;
fig. 6 is a flowchart illustrating a screen rotation control method according to an embodiment of the present application;
fig. 7 is a flowchart illustrating a screen rotation control method according to an embodiment of the present application;
fig. 8 shows an interface diagram of a terminal according to an embodiment of the present application;
fig. 9 is a schematic view showing an application scenario of a picture rotation control method applied to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a screen rotation control apparatus according to an embodiment of the present application;
fig. 11 shows a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With the development of science and technology, more and more functions can be supported by the terminal. For example, a user may use the terminal to watch television or use the terminal to make a video call with another person. When a user watches videos by using the terminal, the user can rotate the terminal, and a display picture of the terminal can rotate in the reverse direction, so that the display picture of the terminal can be kept vertically downward, and the user can watch televisions more comfortably.
Now, fig. 1 illustrates an application scenario diagram of a picture rotation control method applied to an embodiment of the present application. As shown in fig. 1, when the terminal is at rest, the resultant force applied to the terminal may be only gravity. The terminal can calculate the rotation angle of the terminal by using the formula (1) and the formula (2) based on the six-axis sensor.
Figure BDA0002383319280000051
Figure BDA0002383319280000052
Wherein, gxIs the component of acceleration in the x-axis; gyIs the component of acceleration in the y-axis; gzComponent of acceleration in the z-axis αxComponent of angular velocity in the x-axis αyComponent of angular velocity in the y-axis αzIs the component of angular velocity in the z-axis.
For example, the gravity borne by the terminal of 125g when the terminal is at rest is 1.25N, and the rotation angle of the terminal along the clockwise direction is 35 degrees as calculated by the terminal according to the formula (1) and the formula (2). The terminal may acquire that the rotation angle of the display screen is 35 degrees in the counterclockwise direction based on the rotation angle of the terminal of 35 degrees. The terminal may rotate the display based on the calculated rotation angle of the display so that the display of the terminal may be maintained vertically downward while the terminal is rotated.
According to some embodiments, the terminal may be shaken due to other external forces applied to the terminal during the rotation of the terminal. Other external forces include, but are not limited to, thrust, pressure, friction, and the like. Because the calculation method based on the six-axis sensor only considers the gravity borne by the terminal and does not relate to the condition that the terminal has jitter, the calculation of the rotation angle of the terminal is inaccurate by the terminal rotation angle calculation method based on the six-axis sensor, the jitter still exists in the terminal to influence the rotation angle of a display picture of the terminal, and further the display effect of the display picture is influenced.
Fig. 2 is a flowchart illustrating a screen rotation control method according to an embodiment of the present application.
As shown in fig. 2, the screen rotation control method includes:
s101, when the terminal rotates along the first rotation direction, whether the terminal deviates along a second rotation direction is judged, and the second rotation direction is the reverse direction of the first rotation direction.
According to some embodiments, the first rotation direction refers to a rotation direction of the terminal, wherein the first rotation direction refers to only one of the rotation directions, and does not refer to a specific rotation direction. The second rotation direction is the reverse direction of the first rotation direction, wherein the second rotation direction refers to only one of the rotation directions, and does not refer to a specific rotation direction. As shown in fig. 3, the first rotation direction of the terminal may be, for example, a clockwise rotation direction V1 centering on the center of the terminal display screen, and the second rotation direction of the terminal may be, for example, a counterclockwise rotation direction V2 centering on the center of the terminal display screen. The center of the display screen of the terminal may be, for example, an intersection of diagonal lines of the display screen, or a center point preset by the terminal.
It is easily understood that the terminal may determine whether the terminal is shifted in the second rotation direction when the terminal is rotated in the first rotation direction. For example, when the terminal rotates in the clockwise rotation direction V1 around the center of the terminal display screen, the terminal can determine whether the terminal is shifted in the counterclockwise rotation direction V2.
Optionally, when the terminal rotates in the first rotation direction, a flag of the check valve may be set, so that the terminal may mark the rotation direction of the terminal. The terminal can judge whether the terminal deviates along the second rotation direction through the zone bit of the one-way valve. When the terminal judges that the terminal does not deviate along the second rotation direction through the zone bit of the one-way valve, the terminal can continue to rotate along the first rotation direction.
And S102, if yes, acquiring a first rotation parameter of the terminal.
According to some embodiments, the first rotation parameter comprises a third rotation direction and a first rotation angle. The third rotation direction refers to a rotation direction of the terminal, but is not particularly limited to a specific rotation direction. The first rotation angle refers to a rotation angle of the terminal in the third rotation direction. The third direction of rotation may be the same direction as the second direction of rotation, and the third direction of rotation may also be the same as the first direction of rotation, for example. The terminal may acquire a third rotation direction of the terminal based on an offset amount of the terminal in the second rotation direction and the rotation start angle. For example, when the terminal rotates in the first rotation direction, and the offset of the terminal in the second rotation direction is smaller than the rotation start angle, the third rotation direction acquired by the terminal is the same as the first rotation direction, and when the first rotation direction is clockwise, the third rotation direction is also clockwise.
It is easily understood that when the terminal is rotated in the first rotation direction, the offset amount of the terminal in the second rotation direction is greater than the rotation start angle, the terminal acquires the third rotation direction as the same as the second rotation direction, and when the second rotation direction is the counterclockwise direction, the third rotation direction is also the counterclockwise direction.
Optionally, when the terminal rotates in the first rotation direction, the terminal may determine whether the terminal is offset in the second rotation direction. The second rotation direction is the reverse direction of the first rotation direction. When the terminal judges that the terminal deviates along the second rotation direction, the terminal determines that the terminal shakes, and at the moment, the terminal can acquire the first rotation parameter of the terminal. For example, the terminal may acquire the third rotation direction of the terminal based on the offset amount and the rotation start angle of the terminal in the second rotation direction. The rotation start angle set by the terminal may be, for example, 2 degrees. When the terminal rotates in the clockwise direction, the terminal detects that the terminal is shifted in the counterclockwise direction by 5 degrees. The terminal determines that the offset amount is 5 degrees greater than the rotation start angle by 2 degrees, so that the terminal determines that the terminal has offset in the counterclockwise direction, and the terminal acquires a first rotation parameter of the terminal, where the first rotation parameter may be, for example, that the third rotation direction is the counterclockwise direction, and the first rotation angle is 5 degrees.
S103, determining a second rotation parameter of the display screen of the terminal based on the first rotation parameter.
According to some embodiments, the second rotation parameter comprises a fourth rotation direction and the second rotation angle, wherein the fourth rotation direction is the reverse direction of the third rotation direction. The second rotation angle is a rotation angle of the display screen determined by the terminal along the fourth rotation direction. The third direction of rotation may be the same direction as the second direction of rotation, and the third direction of rotation may also be the same as the first direction of rotation, for example. For example, the terminal may acquire the third rotation direction of the terminal based on the offset amount and the rotation start angle of the terminal in the second rotation direction. When the terminal rotates along the first rotation direction, and the offset of the terminal along the second rotation direction is smaller than the rotation start angle, the third rotation direction acquired by the terminal is the same as the first rotation direction, and when the first rotation direction is a clockwise direction, the third rotation direction is also a clockwise direction, and then the fourth rotation direction of the display picture of the terminal is an anticlockwise rotation direction.
It is easy to understand that when the terminal determines that the terminal is shifted in the second rotation direction, the terminal may obtain the first rotation parameter of the terminal. Based on the first rotation parameter, the terminal may determine a second rotation parameter of a display of the terminal. The rotation start angle set by the terminal may be, for example, 2 degrees. When the terminal rotates in the clockwise direction, the terminal detects that the terminal is shifted in the counterclockwise direction by 5 degrees. The terminal determines that the offset amount is 5 degrees greater than the rotation start angle by 2 degrees, so that the terminal determines that the terminal has offset in the counterclockwise direction, and the terminal acquires a first rotation parameter of the terminal, where the first rotation parameter may be, for example, that the third rotation direction is the counterclockwise direction, and the first rotation angle is 5 degrees. The terminal determines the second rotation parameter of the display screen of the terminal based on the first rotation parameter, for example, the fourth rotation direction of the display screen of the terminal is clockwise, and the second rotation angle is 5 degrees.
And S104, rotating the display picture based on the second rotation parameter.
According to some embodiments, when the terminal determines that the terminal is shifted in the second rotation direction, the terminal may acquire the first rotation parameter of the terminal. Based on the first rotation parameter, the terminal may determine a second rotation parameter of a display of the terminal. When the terminal determines the second rotation parameter of the display of the terminal, the terminal may rotate the display of the terminal based on the second rotation parameter.
It is easily understood that when the terminal determines that the terminal is shifted in the second rotation direction, the display interface of the terminal may be as shown in fig. 4. The rotation start angle set by the terminal may be, for example, 2 degrees. When the terminal rotates in the clockwise direction, the terminal detects that the terminal is shifted in the counterclockwise direction by 5 degrees. The terminal determines that the offset is 5 degrees and greater than the rotation start angle by 2 degrees, the terminal may determine that the terminal has offset in the counterclockwise direction, and the terminal acquires a first rotation parameter of the terminal, where the first rotation parameter may be, for example, that the third rotation direction is the counterclockwise direction, and the first rotation angle is 5 degrees. The terminal determines, based on the first rotation parameter, that the second rotation parameter of the display screen of the terminal is that the fourth rotation direction of the display screen of the terminal is clockwise, and when the second rotation angle is 5 degrees, the terminal may rotate the display screen of the terminal by 5 degrees in the clockwise direction. The display interface of the terminal after rotating the display screen of the terminal can be as shown in fig. 5.
The embodiment of the application provides a picture rotation control method, which can judge whether a terminal deviates along a second rotation direction when the terminal rotates along the first rotation direction, wherein the second rotation direction is the reverse direction of the first rotation direction, if so, a first rotation parameter of the terminal is obtained, the first rotation parameter comprises a third rotation direction and a first rotation angle, a second rotation parameter of a display picture of the terminal can be determined based on the first rotation parameter, the second rotation parameter comprises a fourth rotation direction and a second rotation angle, the fourth rotation direction is the reverse direction of the third rotation direction, and the display picture is rotated based on the second rotation parameter. Therefore, when the terminal rotates along the first rotation direction and deviates along the second rotation direction, the terminal can shake, the terminal acquires the second rotation parameter of the terminal display picture based on the first rotation parameter, the influence of the terminal shake on the second rotation parameter can be reduced, the accuracy of rotation parameter calculation can be improved, the influence of the terminal shake on the rotation picture can be reduced, and the display effect of the terminal picture can be improved.
Fig. 6 is a flowchart illustrating a screen rotation control method according to an embodiment of the present application.
As shown in fig. 6, the screen rotation control method includes:
s201, when the terminal is in a static state, judging whether the terminal generates offset.
According to some embodiments, when the terminal is in a stationary state, the terminal is affected by the surrounding environment, and jitter of a smaller amplitude occurs. The terminal can be judged to rotate by mistake due to the small-amplitude jitter of the terminal, and then the terminal can rotate the display picture. However, at this time, the user does not input a terminal rotation instruction, so that the terminal rotates the display screen of the terminal due to the small amplitude jitter occurring when the terminal is in a static state. Therefore, when the terminal is in a static state, the terminal can judge whether the terminal is deviated or not.
It is easily understood that the terminal can set a preset position of the terminal. When the terminal is in a static state, the terminal can judge whether the position of the terminal is a preset position. And when the terminal judges that the position of the terminal is consistent with the preset position, the terminal does not deviate. When the terminal detects that the position of the terminal is inconsistent with the preset position, the terminal deviates.
And S202, if yes, acquiring the offset of the terminal.
According to some embodiments, when the terminal is in a static state, and the terminal determines that the terminal has an offset, the terminal may obtain the offset of the terminal. The offset may include, for example, an offset angle and an offset direction of the terminal. As shown in fig. 7, for example, the terminal may set a preset position of the terminal to an a position. The terminal can set the position of the terminal display picture as the preset position of the terminal when the terminal display picture is not rotated. When the terminal is in a stationary state, the terminal may determine whether the location of the terminal is the a location. When the terminal judges that the position of the terminal is inconsistent with the position of the preset position A, the terminal is judged to be deviated, and the terminal can acquire the deviation of the terminal. The offset amount of the terminal acquired by the terminal may be, for example, 3 degrees offset in the clockwise direction.
S203, if the offset amount is smaller than the rotation start angle, the first rotation angle is determined to be 0 °.
According to some embodiments, the first rotation angle is a rotation angle of the terminal. The first rotation angle is not specifically referred to a certain fixed rotation angle of the terminal, and the first rotation angle may be, for example, 5 degrees, and the first rotation angle may also be, for example, 3 degrees.
It is easy to understand that when the terminal acquires the offset amount of the terminal, the terminal may determine whether the offset amount of the terminal is smaller than the rotation start angle. And when the terminal judges that the offset of the terminal is smaller than the rotation starting angle, determining the first rotation angle as 0 degree. At this time, the display screen of the terminal is not rotated. For example, the terminal is set to have a rotation start angle of 2 degrees. The offset of the terminal acquired by the terminal may be, for example, 1.5 degrees. When the terminal judges that the offset is 1.5 degrees and is smaller than the rotation starting angle of 2 degrees, the terminal determines the first rotation angle as 0 degree, so that misoperation of the terminal during terminal shaking can be avoided, and the influence of the terminal shaking on a terminal display picture is reduced.
And S204, if the offset is larger than the rotation starting angle, marking a first rotation parameter of the terminal.
According to some embodiments, the first rotation parameter comprises an offset direction and a first rotation angle. The first rotation parameter is not specific to a fixed parameter, and the first rotation angle is not specific to a fixed rotation angle. The first rotation parameter may be, for example, that the offset direction is clockwise and the first rotation angle is 3 degrees, and the first rotation parameter may be, for example, that the offset direction is counterclockwise and the first rotation angle is 5 degrees.
It is easy to understand that when the terminal acquires the offset amount of the terminal, the terminal may determine whether the offset amount of the terminal is smaller than the rotation start angle. When the terminal judges that the offset of the terminal is larger than the rotation starting angle, the terminal starts to rotate according to the first rotation parameter, and at the moment, the terminal marks the first rotation parameter of the terminal, namely the rotation direction of the terminal marking terminal and the rotation parameter of the terminal. For example, the terminal is set to have a rotation start angle of 2 degrees. The offset of the terminal acquired by the terminal may be, for example, 2.5 degrees. When the terminal determines that the offset amount is 2.5 degrees and greater than the rotation start angle by 2 degrees, the first rotation parameter acquired by the terminal may be, for example, that the offset direction is clockwise and the first rotation angle is 90 degrees. The terminal may rotate based on the first rotation parameter, and the terminal may mark the rotation direction of the terminal as a clockwise direction and the rotation angle as a 90 degrees first rotation angle.
Optionally, when the terminal acquires the first rotation parameter of the terminal, the rotation parameter of the terminal display screen may be acquired based on the rotation parameter. The terminal may rotate the display screen based on the acquired rotation parameter of the display screen. When the first rotation parameter acquired by the terminal is that the offset direction is clockwise and the first rotation angle is 90 degrees, the rotation parameter of the terminal display screen acquired by the terminal may be rotated by 90 degrees in a counterclockwise square, for example, so that the display screen of the terminal may be kept vertically downward.
The embodiment of the application provides a picture rotation control method, which is characterized in that whether a terminal deviates or not is judged when the terminal is in a static state, if so, the deviation amount of the terminal is obtained, if the deviation amount is larger than a rotation starting angle, a first rotation parameter of the terminal is marked, and if the deviation amount is smaller than the rotation starting angle, the first rotation angle is determined to be 0 degree. When the terminal is static, judging whether the terminal deviates, if so, acquiring the deviation of the terminal; if the offset is smaller than the rotation starting angle, the first rotation angle is determined to be 0 degree, so that the influence of terminal shaking on the terminal when the terminal does not rotate can be avoided, the misoperation of a terminal display picture when the terminal shakes can be avoided, and the influence of the terminal shaking on the terminal display picture is reduced.
Fig. 7 is a flowchart illustrating a screen rotation control method according to an embodiment of the present application.
As shown in fig. 7, the screen rotation control method includes:
s301, when the terminal rotates along the first rotation direction, whether the terminal shifts along the second rotation direction is judged.
According to some embodiments, when the terminal is rotated in the first rotation direction, the terminal may determine whether the terminal is shifted in the second rotation direction. The second rotation direction is the reverse direction of the first rotation direction. And when the terminal judges that the terminal does not deviate along the second rotation direction, the terminal continues to rotate according to the first rotation parameter.
It is easy to understand that the first rotation parameter acquired by the terminal may be, for example, that the offset direction is clockwise and the first rotation angle is 90 degrees. When the terminal is rotated in the clockwise direction, the terminal may determine whether the terminal is shifted in the counterclockwise direction. When the terminal determines that the terminal is not shifted in the second rotation direction, the terminal may continue to rotate the terminal in the clockwise direction.
And S302, if yes, acquiring the offset of the terminal in the second rotation direction.
According to some embodiments, when the terminal rotates in the first rotation direction and the terminal determines that the terminal is shifted in the second rotation direction, the terminal may obtain the shift amount of the terminal in the second rotation direction. For example, when the terminal is rotated in a clockwise direction, the terminal may determine whether the terminal is shifted in a counterclockwise direction. When the terminal determines that the terminal is shifted in the counterclockwise direction, the terminal may obtain an offset of the terminal in the counterclockwise direction, which may be, for example, 1.5 degrees.
S303, if the offset is smaller than the rotation start angle, marking a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and the third rotation direction is the first rotation direction.
According to some embodiments, when the terminal acquires the offset amount of the terminal in the second rotation direction, the terminal may determine whether the offset is smaller than the rotation start angle. When the terminal judges that the offset is smaller than the rotation starting angle, the terminal marks a first rotation parameter of the terminal. The first rotation parameter includes a third rotation direction and a first rotation angle, and the third rotation direction is the first rotation direction.
It is easy to understand that when the terminal rotates based on the acquired first rotation parameter and the terminal determines that the terminal deviates in the second rotation direction, the terminal may acquire that the deviation amount of the terminal in the second rotation direction is 1.5 degrees. The first rotation parameter of the terminal may be, for example, that the offset direction is clockwise and the first rotation angle is 90 degrees. The offset direction is the third rotation direction. The rotation start angle set by the terminal may be, for example, 2 degrees. And when the terminal judges that the acquired offset is 1.5 degrees and is less than the rotation starting angle of 2 degrees, marking a first rotation parameter of the terminal by the terminal, wherein the first rotation parameter of the terminal is that the third rotation direction is clockwise and the first rotation angle is 90 degrees.
304, if the offset is greater than the rotation start angle, a first rotation parameter of the terminal is marked, the first rotation parameter includes a third rotation direction and a first rotation angle, and the third rotation direction is a second rotation direction.
According to some embodiments, when the terminal acquires the offset amount of the terminal in the second rotation direction, the terminal may determine whether the offset is smaller than the rotation start angle. When the terminal judges that the offset is larger than the rotation starting angle, the terminal marks a first rotation parameter of the terminal. The first rotation parameter includes a third rotation direction and a first rotation angle, and the third rotation direction is a second rotation direction.
It is easy to understand that when the terminal rotates based on the acquired first rotation parameter and the terminal determines that the terminal deviates in the second rotation direction, the terminal may acquire that the deviation amount of the terminal in the second rotation direction is 2.5 degrees. The first rotation parameter of the terminal may be, for example, that the offset direction is clockwise and the first rotation angle is 90 degrees. The offset direction is the third rotation direction. The rotation start angle set by the terminal may be, for example, 2 degrees. When the terminal judges that the acquired offset is 2.5 degrees and is greater than the rotation starting angle by 2 degrees, the terminal marks a first rotation parameter of the terminal, wherein the first rotation parameter of the terminal is that the third rotation direction is a counterclockwise direction and the first rotation angle is 90 degrees.
According to some embodiments, when the terminal is rotated in the first rotation direction and when the terminal is subjected to an external thrust different from the first rotation direction, the terminal may generate a terminal shake under the external thrust, and the terminal may determine whether the terminal is shifted in the second rotation direction. The second rotation direction is the reverse direction of the first rotation direction. When the terminal judges that the terminal deviates along the second rotating direction, the terminal can acquire the last rotating angle of the terminal rotating along the first rotating direction under the external thrust and acquire the current rotating angle of the terminal rotating along the first rotating direction. When the terminal acquires the last rotation angle and the current rotation angle, the terminal may calculate a first rotation parameter of the terminal through formula (3) based on a preset first weight, a preset second weight, the last rotation angle, and the current rotation angle, where the first rotation parameter includes a third rotation direction and a first rotation angle.
The first rotation angle is the last rotation angle, the first weight and the current rotation angle are preset, and the second weight formula (3)
It will be readily appreciated that when the terminal is subjected to an applied thrust in the positive X-direction, for example, as shown in fig. 9, as the terminal is rotated in the Z-axis instantaneous pin direction, the terminal can determine whether the terminal is deflected in the counterclockwise Z-axis direction. When the terminal judges that the terminal deviates along the counterclockwise direction of the Z axis, the terminal can acquire the rotation angle of the terminal along the clockwise direction of the Z axis at preset time intervals under the action of the external thrust. When the terminal acquires that the last rotation angle is 35 degrees when the terminal rotates, and acquires that the current rotation angle is 37 degrees when the terminal rotates in the first rotation direction. When the terminal acquires the last rotation angle of 35 degrees and the current rotation angle of 37 degrees, the terminal may calculate a first rotation parameter of the terminal based on a preset first weight, a preset second weight, the last rotation angle, and the current rotation angle, where the first rotation parameter may be, for example, that the third rotation direction is a clockwise direction and the first rotation angle is 36 degrees.
S305, determining a second rotation parameter of the display screen of the terminal based on the first rotation parameter.
According to some embodiments, when the terminal acquires the first rotation parameter, the terminal may determine a second rotation parameter of a display screen of the terminal based on the first rotation parameter. The second rotation parameter includes a fourth rotation direction and a second rotation angle, and the fourth rotation direction is a reverse direction of the third rotation direction.
The specific process is as described above, and is not described herein again.
And S306, rotating the display screen by the second rotation angle along a fourth rotation direction, wherein the fourth rotation direction is the reverse direction of the third rotation direction.
According to some embodiments, when the terminal acquires the second rotation parameter of the terminal display screen, the terminal may rotate the terminal screen based on the second rotation parameter. The second rotation parameter includes a fourth rotation direction and a second rotation angle, so the terminal can rotate the display screen by the second rotation angle in the fourth rotation direction. For example, the second rotation parameter acquired by the terminal is the clockwise direction and the second rotation angle is 90 degrees, and the terminal may rotate the display screen by 90 degrees in the clockwise direction.
The embodiment of the application provides a picture rotation control method, when a terminal rotates along a first rotation direction, the terminal can judge whether the terminal deviates along a second rotation direction, if so, the deviation of the terminal in the second rotation direction is obtained, if the deviation is smaller than a rotation starting angle, a first rotation parameter of the terminal is marked, as the terminal rotates along the first rotation direction, terminal jitter can cause the terminal to have the deviation along the second rotation direction, and by calculating the deviation of the terminal in the second rotation direction, the influence of the terminal jitter on the rotation of the terminal along the first rotation direction can be avoided. If the offset is greater than the rotation starting angle, the terminal marks a first rotation parameter of the terminal, the first rotation parameter includes a third rotation direction and a first rotation angle, and the third rotation direction is a second rotation direction. Based on the first rotation parameter, the terminal can determine a second rotation parameter of a display picture of the terminal, and rotate the display picture by a second rotation angle along a fourth rotation direction, so that the calculation accuracy of the first rotation parameter and the second rotation parameter can be improved, the rotation accuracy of the display picture of the terminal is improved under the condition that the terminal shakes, and the display effect of the display picture of the terminal can be improved.
Fig. 10 is a schematic structural diagram of a screen rotation control device according to an embodiment of the present application.
As shown in fig. 10, the screen rotation control apparatus 900 includes: an offset determination unit 901, a parameter acquisition unit 902, a parameter determination unit 903, and a screen rotation unit 904, wherein:
an offset determining unit 901, configured to determine whether the terminal is offset in a second rotation direction when the terminal rotates in the first rotation direction, where the second rotation direction is the reverse direction of the first rotation direction;
a parameter obtaining unit 902, configured to, if yes, obtain a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle;
a parameter determining unit 903, configured to determine a second rotation parameter of the display screen of the terminal based on the first rotation parameter, where the second rotation parameter includes a fourth rotation direction and a second rotation angle, and the fourth rotation direction is an inverse direction of the third rotation direction;
a picture rotating unit 904 for rotating the display picture based on the second rotation parameter.
According to some embodiments, the parameter obtaining unit 902 is configured to, if yes, obtain a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and specifically configured to:
if so, acquiring the offset of the terminal in the second rotation direction;
if the offset is smaller than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is the first rotation direction;
if the offset is greater than the rotation starting angle, a first rotation parameter of the terminal is marked, the first rotation parameter includes a third rotation direction and a first rotation angle, and the third rotation direction is a second rotation direction.
According to some embodiments, the parameter obtaining unit 902, when obtaining the first rotation parameter of the terminal if yes, is specifically configured to:
if so, acquiring the last rotation angle of the terminal when the terminal rotates along the first rotation direction under the external thrust, and acquiring the current rotation angle of the terminal when the terminal rotates along the first rotation direction;
and calculating a first rotation parameter of the terminal based on the preset first weight, the preset second weight, the last rotation angle and the current rotation angle, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle.
According to some embodiments, the parameter determining unit 903 is configured to, when the terminal rotates in the first rotation direction, determine whether the terminal is offset in a second rotation direction, where the second rotation direction is a reverse direction of the first rotation direction, specifically:
when the terminal is in a static state, judging whether the terminal deviates or not;
if yes, a first rotation parameter of the terminal is obtained, wherein the first rotation parameter includes a third rotation direction and a first rotation angle, and the method includes:
if so, acquiring the offset of the terminal;
if the offset is smaller than the rotation starting angle, determining the first rotation angle as 0 degree;
if the offset is greater than the rotation starting angle, a first rotation parameter of the terminal is marked, wherein the first rotation parameter comprises an offset direction and a first rotation angle.
According to some embodiments, the picture rotating unit 904, when rotating the display picture based on the second rotation parameter, is specifically configured to:
and rotating the display picture by a second rotation angle along a fourth rotation direction.
The embodiment of the application provides a picture rotation control device, which judges whether a terminal is deviated along a second rotation direction when the terminal rotates along a first rotation direction through a deviation judging unit, wherein the second rotation direction is the reverse direction of the first rotation direction; the screen rotation unit may rotate the display screen based on the second rotation parameter. Therefore, when the picture rotation control device rotates along the first rotation direction and the picture rotation control device is shifted along the second rotation direction, the picture rotation control device of the embodiment of the application can acquire the first rotation parameter of the terminal under the condition that the terminal has jitter, and determine the second rotation parameter of the display picture of the terminal based on the first rotation parameter, so that the accuracy of acquiring the first rotation parameter and the second rotation parameter can be improved, and in addition. The picture rotation control device can also rotate the display picture based on the second rotation parameter, so that the influence of the shaking of the picture rotation control device on the display picture can be reduced, the display effect of the display picture is improved, and the use experience of a user can be improved.
Please refer to fig. 11, which is a schematic structural diagram of a terminal according to an embodiment of the present disclosure. As shown in fig. 11, the terminal 1000 can include: at least one processor 1001, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002.
Wherein a communication bus 1002 is used to enable connective communication between these components.
The user interface 1003 may include a Display screen (Display) and a GPS, and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 1001 may include one or more processing cores, among other things. Processor 1001 interfaces various components throughout terminal 1000 using various interfaces and lines to perform various functions and process data of terminal 1000 by executing or executing instructions, programs, code sets, or instruction sets stored in memory 1005 and invoking data stored in memory 1005. Alternatively, the processor 1001 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable gate array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1001, but may be implemented by a single chip.
The Memory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 905 includes a non-transitory computer-readable medium. The memory 1005 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 11, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an application program for screen rotation control.
In the terminal 1000 shown in fig. 11, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and the processor 1001 may be configured to call an application program of the screen rotation control method stored in the memory 1005, and specifically perform the following operations:
when the terminal rotates along the first rotation direction, judging whether the terminal deviates along a second rotation direction, wherein the second rotation direction is the reverse direction of the first rotation direction;
if so, acquiring a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle;
determining a second rotation parameter of a display picture of the terminal based on the first rotation parameter, wherein the second rotation parameter comprises a fourth rotation direction and a second rotation angle, and the fourth rotation direction is the reverse direction of the third rotation direction;
and rotating the display picture based on the second rotation parameter.
According to some embodiments, if the processor performs the operation, the processor acquires a first rotation parameter of the terminal, and when the first rotation parameter includes a third rotation direction and a first rotation angle, the processor specifically performs the following steps:
if so, acquiring the offset of the terminal in the second rotation direction;
if the offset is smaller than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is the first rotation direction;
if the offset is greater than the rotation starting angle, a first rotation parameter of the terminal is marked, the first rotation parameter includes a third rotation direction and a first rotation angle, and the third rotation direction is a second rotation direction.
According to some embodiments, if the processor performs the operation, when the processor acquires the first rotation parameter of the terminal, the following steps are specifically performed:
if so, acquiring the last rotation angle of the terminal when the terminal rotates along the first rotation direction under the external thrust, and acquiring the current rotation angle of the terminal when the terminal rotates along the first rotation direction;
and calculating a first rotation parameter of the terminal based on the preset first weight, the preset second weight, the last rotation angle and the current rotation angle, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle.
According to some embodiments, the processor, when executing the step of determining whether the terminal is shifted in a second rotation direction when the terminal is rotated in the first rotation direction, and the second rotation direction is the reverse direction of the first rotation direction, specifically executes the following steps:
when the terminal is in a static state, judging whether the terminal deviates or not;
if yes, a first rotation parameter of the terminal is obtained, wherein the first rotation parameter includes a third rotation direction and a first rotation angle, and the method includes:
if so, acquiring the offset of the terminal;
if the offset is smaller than the rotation starting angle, determining the first rotation angle as 0 degree;
if the offset is greater than the rotation starting angle, a first rotation parameter of the terminal is marked, wherein the first rotation parameter comprises an offset direction and a first rotation angle.
According to some embodiments, the processor, when executing the rotation of the display screen based on the second rotation parameter, specifically executes the following steps:
and rotating the display picture by a second rotation angle along a fourth rotation direction.
The embodiment of the application provides a terminal, when the terminal rotates along a first rotation direction, whether the terminal shifts along a second rotation direction can be judged, the second rotation direction is the reverse direction of the first rotation direction, if so, a first rotation parameter of the terminal is obtained, the first rotation parameter comprises a third rotation direction and a first rotation angle, a second rotation parameter of a display picture of the terminal can be determined based on the first rotation parameter, the second rotation parameter comprises a fourth rotation direction and a second rotation angle, the fourth rotation direction is the reverse direction of the third rotation direction, and the display picture is rotated based on the second rotation parameter. Therefore, when the terminal rotates along the first rotating direction and the terminal shifts along the second rotating direction, the terminal can acquire the first rotating parameter of the terminal and the second rotating parameter of the display picture of the terminal, so that the accuracy of acquiring the first rotating parameter and the second rotating parameter can be improved.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
Embodiments of the present application also provide a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to execute some or all of the steps of any one of the screen rotation control methods as described in the above method embodiments.
It is clear to a person skilled in the art that the solution of the present application can be implemented by means of software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, a Field-ProgrammaBLE gate array (FPGA), an Integrated Circuit (IC), or the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some service interfaces, devices or units, and may be an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program, which is stored in a computer-readable memory, and the memory may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above description is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure should not be limited thereby. That is, all equivalent changes and modifications made in accordance with the teachings of the present disclosure are intended to be included within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A picture rotation control method, comprising:
when a terminal rotates along a first rotation direction, judging whether the terminal deviates along a second rotation direction, wherein the second rotation direction is the reverse direction of the first rotation direction;
if so, acquiring a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle;
determining a second rotation parameter of a display screen of the terminal based on the first rotation parameter, wherein the second rotation parameter comprises a fourth rotation direction and a second rotation angle, and the fourth rotation direction is the reverse direction of the third rotation direction;
and rotating the display screen based on the second rotation parameter.
2. The method according to claim 1, wherein if so, obtaining a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and the method includes:
if so, acquiring the offset of the terminal in the second rotation direction;
if the offset is smaller than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is the first rotation direction;
if the offset is greater than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is a second rotation direction.
3. The method of claim 1, wherein if so, obtaining first rotation parameters of the terminal comprises:
if so, acquiring the last rotation angle of the terminal rotating along the first rotation direction under the external thrust, and acquiring the current rotation angle of the terminal rotating along the first rotation direction;
and calculating a first rotation parameter of the terminal based on a preset first weight, a preset second weight, the last rotation angle and the current rotation angle, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle.
4. The method of claim 1, wherein determining whether the terminal is shifted in a second rotation direction when the terminal is rotated in a first rotation direction, the second rotation direction being opposite to the first rotation direction, comprises:
when the terminal is in a static state, judging whether the terminal generates offset;
if so, acquiring a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and the method includes:
if so, acquiring the offset of the terminal;
if the offset is smaller than the rotation starting angle, determining the first rotation angle as 0 degree;
if the offset is larger than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises an offset direction and a first rotation angle.
5. The method of claim 1, wherein rotating the display based on the second rotation parameter comprises:
and rotating the display picture by the second rotation angle along the fourth rotation direction.
6. A screen rotation control device, comprising:
the terminal comprises a deviation judging unit, a judging unit and a judging unit, wherein the deviation judging unit is used for judging whether the terminal deviates along a second rotating direction when the terminal rotates along a first rotating direction, and the second rotating direction is the reverse direction of the first rotating direction;
a parameter obtaining unit, configured to obtain a first rotation parameter of the terminal if the first rotation parameter is positive, where the first rotation parameter includes a third rotation direction and a first rotation angle;
a parameter determining unit, configured to determine a second rotation parameter of a display screen of the terminal based on the first rotation parameter, where the second rotation parameter includes a fourth rotation direction and a second rotation angle, and the fourth rotation direction is an inverse direction of the third rotation direction;
and the picture rotating unit is used for rotating the display picture based on the second rotating parameter.
7. The apparatus of claim 6, wherein the parameter obtaining unit is configured to, if yes, obtain a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and is specifically configured to:
if so, acquiring the offset of the terminal in the second rotation direction;
if the offset is smaller than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is the first rotation direction;
if the offset is greater than the rotation starting angle, marking a first rotation parameter of the terminal, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle, and the third rotation direction is a second rotation direction.
8. The apparatus of claim 6, wherein the parameter obtaining unit is configured to, if yes, obtain a first rotation parameter of the terminal, where the first rotation parameter includes a third rotation direction and a first rotation angle, and is specifically configured to:
if so, acquiring the last rotation angle of the terminal rotating along the first rotation direction under the external thrust, and acquiring the current rotation angle of the terminal rotating along the first rotation direction;
and calculating a first rotation parameter of the terminal based on a preset first weight, a preset second weight, the last rotation angle and the current rotation angle, wherein the first rotation parameter comprises a third rotation direction and a first rotation angle.
9. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of the preceding claims 1 to 5.
CN202010091755.2A 2020-02-13 2020-02-13 Picture rotation control method, device, picture rotation control terminal and storage medium Active CN111372028B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010091755.2A CN111372028B (en) 2020-02-13 2020-02-13 Picture rotation control method, device, picture rotation control terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010091755.2A CN111372028B (en) 2020-02-13 2020-02-13 Picture rotation control method, device, picture rotation control terminal and storage medium

Publications (2)

Publication Number Publication Date
CN111372028A true CN111372028A (en) 2020-07-03
CN111372028B CN111372028B (en) 2021-08-20

Family

ID=71207984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010091755.2A Active CN111372028B (en) 2020-02-13 2020-02-13 Picture rotation control method, device, picture rotation control terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111372028B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070254719A1 (en) * 2001-06-22 2007-11-01 Impactra Co., Ltd. Mobile terminal for changing position of display unit in horizontal or vertical direction
CN101813982A (en) * 2010-03-10 2010-08-25 鸿富锦精密工业(深圳)有限公司 Electronic device with motion response function and method for excusing input operation using same
US20140009415A1 (en) * 2012-07-04 2014-01-09 Canon Kabushiki Kaisha Display device and control method therefor
CN103677589A (en) * 2013-12-30 2014-03-26 腾讯科技(深圳)有限公司 Terminal screen picture rotation control method and device
CN105988140A (en) * 2015-03-18 2016-10-05 阿尔卑斯电气株式会社 Electronic device having geomagnetic sensor and acceleration sensor
CN107483709A (en) * 2016-09-29 2017-12-15 维沃移动通信有限公司 A kind of horizontal/vertical screen switching method and mobile terminal
CN109000612A (en) * 2018-06-19 2018-12-14 深圳市道通智能航空技术有限公司 Angle evaluation method, device, camera assembly and the aircraft of equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070254719A1 (en) * 2001-06-22 2007-11-01 Impactra Co., Ltd. Mobile terminal for changing position of display unit in horizontal or vertical direction
CN101813982A (en) * 2010-03-10 2010-08-25 鸿富锦精密工业(深圳)有限公司 Electronic device with motion response function and method for excusing input operation using same
US20140009415A1 (en) * 2012-07-04 2014-01-09 Canon Kabushiki Kaisha Display device and control method therefor
CN103677589A (en) * 2013-12-30 2014-03-26 腾讯科技(深圳)有限公司 Terminal screen picture rotation control method and device
CN105988140A (en) * 2015-03-18 2016-10-05 阿尔卑斯电气株式会社 Electronic device having geomagnetic sensor and acceleration sensor
CN107483709A (en) * 2016-09-29 2017-12-15 维沃移动通信有限公司 A kind of horizontal/vertical screen switching method and mobile terminal
CN109000612A (en) * 2018-06-19 2018-12-14 深圳市道通智能航空技术有限公司 Angle evaluation method, device, camera assembly and the aircraft of equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李继军 等: "平板显示技术比较及研究进展", 《中国光学》 *

Also Published As

Publication number Publication date
CN111372028B (en) 2021-08-20

Similar Documents

Publication Publication Date Title
KR101855552B1 (en) Global composition system
CN108880921B (en) Webpage monitoring method and device, storage medium and server
KR102183651B1 (en) Displaying applications on a fixed orientation display
US20170243327A1 (en) Determining whether to rotate content based on identification of angular velocity and/or acceleration of device
US20200376375A1 (en) Method and apparatus for performing client side latency enhancement with aid of cloud game server side image orientation control
WO2023130937A1 (en) Interaction method and apparatus, electronic device, storage medium, and computer program product
WO2018063163A1 (en) Selective simulation of virtualized hardware inputs
CN111355888A (en) Video shooting method and device, storage medium and terminal
WO2016040212A1 (en) Automatic sensor selection based on requested sensor characteristics
CN110178111B (en) Image processing method and device for terminal
CN104572771B (en) Processing state display method and device
CN111372028B (en) Picture rotation control method, device, picture rotation control terminal and storage medium
US10646776B2 (en) Server apparatus, method, and non-transitory computer-readable medium
CN112887777B (en) Interactive prompting method and device for interactive video, electronic equipment and storage medium
CN113906381A (en) Electronic device for displaying messages and method of operating the same
CN109753262B (en) Frame display processing method and device, terminal equipment and storage medium
CN112740143A (en) Screen display content control method and device, electronic equipment and storage medium
CN107102792B (en) Image processing apparatus, control method thereof, and computer-readable storage medium
CN111290812B (en) Display method, device, terminal and storage medium of application control
CN110035231B (en) Shooting method, device, equipment and medium
CN111417007B (en) Image transmission method, device, terminal and storage medium
CN110278479B (en) Picture display method and television
CN112541141A (en) Control display callback method, device, terminal and storage medium
US20150113387A1 (en) Method for document correction and electronic device thereof
CN112007357A (en) Client-side delay improvement method, main processor, processing circuit and cloud game server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant