CN110737336B - Video display direction adjusting method and device and computer readable storage medium - Google Patents

Video display direction adjusting method and device and computer readable storage medium Download PDF

Info

Publication number
CN110737336B
CN110737336B CN201910967460.4A CN201910967460A CN110737336B CN 110737336 B CN110737336 B CN 110737336B CN 201910967460 A CN201910967460 A CN 201910967460A CN 110737336 B CN110737336 B CN 110737336B
Authority
CN
China
Prior art keywords
video
display screen
display
displayed
rotation 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.)
Active
Application number
CN201910967460.4A
Other languages
Chinese (zh)
Other versions
CN110737336A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910967460.4A priority Critical patent/CN110737336B/en
Publication of CN110737336A publication Critical patent/CN110737336A/en
Application granted granted Critical
Publication of CN110737336B publication Critical patent/CN110737336B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • G06F3/013Eye tracking input arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality

Abstract

The application provides a method and a device for adjusting video display direction and a computer readable storage medium, which are used for determining the original video display direction of a video to be displayed on a plane where a display screen is located and the display screen direction of the display screen in the current use posture of a terminal; judging whether the display direction of the original video is matched with the direction of the display screen; when the matching of the original video display direction and the display screen direction fails, calculating a target rotation angle of the video to be displayed based on the original video display direction and the display screen direction; and adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle. Through the implementation of the scheme, the terminal automatically adjusts the video to be displayed to the target video display direction according with the visual direction of the user according to the original video display direction and the current display screen direction, then the video is displayed and output, the video watching convenience is effectively improved, and the video watching experience of the user is guaranteed.

Description

Video display direction adjusting method and device and computer readable storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method and an apparatus for adjusting a video display direction, and a computer-readable storage medium.
Background
The video playing function is used as a main function of the terminal, and is widely applied to the work and life of the user, so that the user has higher requirements on the playing effect of the video. When the terminal plays videos, according to the difference of video sources, the terminal can not display the received videos on the display screen in a mode of being matched with the visual direction of the user under all conditions, so that the situation that the video images are transversely displayed on the display screen exists when the user erects the terminal in practical application, and under the situation, the user needs to manually adjust the posture of the terminal or adjust the visual direction of the user to passively adapt to the video display direction, so that the video watching convenience of the user is low, and the video watching experience is poor.
Disclosure of Invention
The embodiment of the application provides a method and a device for adjusting a video display direction and a computer readable storage medium, which can at least solve the problems of low video viewing convenience and poor video viewing experience caused by the fact that a user needs to passively adapt to the video display direction to ensure normal video viewing when the display direction of a video on a display screen is not matched with the visual direction of the user in the related art.
A first aspect of an embodiment of the present application provides a method for adjusting a video display direction, including:
determining the original video display direction of a video to be displayed on a plane where a display screen is located, and determining the display screen direction of the display screen in the current use posture of the terminal; the display screen direction represents the current visual direction when the display screen is normally watched by the outside;
judging whether the display direction of the original video is matched with the direction of the display screen;
when the original video display direction is failed to be matched with the display screen direction, calculating a target rotation angle of the video to be displayed based on the original video display direction and the display screen direction;
and adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle.
A second aspect of the embodiments of the present application provides a video display direction adjustment apparatus, including:
the determining module is used for determining the original video display direction of a video to be displayed on a plane where a display screen is located and determining the display screen direction of the display screen in the current using posture of the terminal; the display screen direction represents the current visual direction when the display screen is normally watched by the outside;
the judging module is used for judging whether the display direction of the original video is matched with the direction of the display screen;
the calculation module is used for calculating a target rotation angle of the video to be displayed based on the original video display direction and the display screen direction when the original video display direction and the display screen direction are failed to be matched;
and the adjusting module is used for adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle.
A third aspect of embodiments of the present application provides an electronic apparatus, including: the present invention provides a method for adjusting a video display direction, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for adjusting a video display direction provided in the first aspect of the embodiments of the present application when executing the computer program.
A fourth aspect of the present embodiment provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the video display direction adjustment method provided in the first aspect of the present embodiment.
In view of the above, according to the method, the device and the computer-readable storage medium for adjusting the video display direction provided by the scheme of the application, the original video display direction of the video to be displayed on the plane where the display screen is located and the display screen direction of the display screen in the current use posture of the terminal are determined; judging whether the display direction of the original video is matched with the direction of the display screen; when the matching of the original video display direction and the display screen direction fails, calculating a target rotation angle of the video to be displayed based on the original video display direction and the display screen direction; and adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle. Through the implementation of the scheme, the terminal automatically adjusts the video to be displayed to the target video display direction according with the visual direction of the user according to the original video display direction and the current display screen direction, then the video is displayed and output, the video watching convenience is effectively improved, and the video watching experience of the user is guaranteed.
Drawings
Fig. 1 is a schematic basic flowchart of a video display direction adjustment method according to a first embodiment of the present application;
fig. 2 is a flowchart illustrating a method for determining an original video display direction according to a first embodiment of the present application;
FIG. 3 is a diagram illustrating an original video display direction according to a first embodiment of the present application;
fig. 4 is a schematic view of the display screen orientation of the terminal in the vertical use posture according to the first embodiment of the present application;
fig. 5 is a schematic view illustrating a display screen orientation of the terminal in a landscape use posture according to the first embodiment of the present application;
fig. 6 is a schematic flowchart illustrating a detailed process of a video display direction adjustment method according to a second embodiment of the present application;
fig. 7 is a schematic diagram illustrating program modules of an apparatus for adjusting a video display direction according to a third embodiment of the present application;
FIG. 8 is a block diagram of another exemplary video display direction adjustment apparatus according to a third embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
In order to make the objects, features and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments of the present application. 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.
In order to solve the defects that in the related art, when the display direction of a video on a display screen is not matched with the visual direction of a user, the user needs to passively adapt to the video display direction to ensure normal video viewing, which results in low video viewing convenience and poor video viewing experience, a first embodiment of the present application provides a video display direction adjustment method, for example, fig. 1 is a basic flow chart of the video display direction adjustment method provided by the present embodiment, and the video display direction adjustment method includes the following steps:
step 101, determining the original video display direction of a video to be displayed on a plane where a display screen is located, and determining the display screen direction of the display screen in the current use posture of the terminal.
Specifically, the video to be displayed in this embodiment may be a video received in real time when the terminal user performs a video call with the opposite terminal user, or may be an offline video or an online network video. It should be understood that the display direction of the original video in this embodiment represents the display direction when the video to be displayed is directly displayed on the display screen of the terminal, and the display screen is taken as a reference plane; and the display screen direction represents the visual direction when the display content on the display screen is normally watched by the outside at present, namely the visual direction is kept consistent with the visual direction when the terminal user normally watches the display content on the display screen in the current terminal use posture. It should be noted that the use posture of the terminal includes a holding posture or a placing posture, which corresponds to a scene in which the use terminal is held externally or placed on the carrier for use, respectively.
In addition, it should be noted that the above steps of this embodiment may be performed at the system bottom layer after video decoding, that is, before video data is transmitted to the application layer for playing and displaying. Of course, in other embodiments, the video may be played and displayed on the display screen, which is not limited herein.
And 102, judging whether the display direction of the original video is matched with the direction of the display screen.
It should be understood that the display screen direction of the present embodiment represents the current visual direction of the user, so that whether the video conforms to the visual direction of the user is further determined by determining whether the directions of the video and the display screen are matched, and when the directions of the video and the display screen are matched, the original video display direction can meet the normal viewing requirement of the user.
And 103, when the original video display direction and the display screen direction are unsuccessfully matched, calculating the target rotation angle of the video to be displayed based on the original video display direction and the display screen direction.
Specifically, in this embodiment, when the directions of the video and the display screen are not matched, it is described that the original display direction of the video to be displayed is not consistent with the current visual direction of the user, and if the video to be displayed is directly output, the user cannot normally view the video without any adjustment.
And step 104, adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle.
Specifically, in this embodiment, the display direction of the original video is corrected based on the calculated video rotation angle, and the display direction of the video to be displayed after adjustment is consistent with the display screen direction, so as to conform to the current visual direction of the user, and then the adjusted video to be displayed can be displayed on the display screen. The whole adjusting process is automatically executed by the terminal, the non-perception degree of the user is high, the video watching convenience is effectively improved, and the video watching experience of the user is guaranteed.
As shown in fig. 2, which is a schematic flow chart of a method for determining an original video display direction provided in this embodiment, in an optional implementation manner of this embodiment, when determining an original video display direction of a video to be displayed on a plane where a display screen is located, the method specifically includes the following steps:
step 201, identifying a display main body on a preset image frame in a video to be displayed;
step 202, extracting two preset target feature points on a display main body;
step 203, connecting a directed line between the two target characteristic points on the plane where the display screen is located based on a preset connection rule;
and 204, determining the direction of the component of the directional line on a preset coordinate axis in the rectangular plane coordinate system as the original video display direction of the video to be displayed on the plane where the display screen is located.
Specifically, the image frame in this embodiment may be a first frame image of a video, and the display subject is also a main display object in the video to be displayed, for example, when the terminal user performs a video call, the display subject in the video is also an opposite-end user. In addition, the feature point in the present embodiment is a point on a portion of the video to be displayed on the display main body that satisfies a preset feature (for example, a shape feature, a color feature, or the like).
Fig. 3 is a schematic diagram of the original video display direction provided by this embodiment, in which two feature points of this embodiment are respectively center points of a mouth and eyes of a video image main body, and a connection rule of the feature points on the main body is that the feature points from the upper part to the lower part of the main body are connected, and as shown in fig. 3, a directed line is formed by connecting the feature points on the eyes to the feature points of the mouth. It should be noted that, in this embodiment, the original video display direction is associated with the direction of the X-axis component or the Y-axis component of the directional line, the rectangular plane coordinate system is shown in the lower left corner of the display screen in fig. 3, as shown in fig. 3, when the terminal is held by the user in the vertical direction, the video display direction should be aligned with the direction of the X-axis component (shown by the arrow with the broken line) of the coordinate axis, and in other embodiments, when the terminal is held in the horizontal direction, the video display direction should be aligned with the direction of the Y-axis component of the coordinate axis under the same coordinate axis.
It should be noted that, in other embodiments of this embodiment, when determining the display direction of the original video of the video to be displayed on the plane where the display screen is located, the display main body on the preset image frame in the video to be displayed may also be identified first; then extracting the external contour line of the display main body, and analyzing the linear characteristic of the external contour line; and determining the display direction of the original video based on the linear characteristic analysis result.
In an optional implementation manner of this embodiment, determining the display screen direction of the display screen in the current usage posture of the terminal includes: acquiring the current use posture of the terminal based on the gravity acceleration data of the terminal; determining a corresponding display screen reference edge based on the use gesture and a preset mapping relation between the use gesture and the display screen reference edge, wherein the display screen reference edge comprises a long edge or a short edge of the display screen; and giving directions to the determined reference sides of the display screen according to the gravity acceleration data, and determining the directions of the obtained reference sides as the directions of the display screen.
Specifically, in this embodiment, the selection of the display screen direction is different in different use postures, that is, when the space state of the terminal is different, wherein when the use posture is the vertical use posture, a direction is given to the long side of the display screen based on the gravity acceleration data, and the obtained long side direction is determined as the display screen direction; when the use posture is a landscape use posture, a direction is given to the short side of the display screen based on the gravity acceleration data, and the obtained direction of the short side is determined as the display screen direction. Fig. 4 is a schematic diagram showing a display screen direction of the terminal in the vertical use posture provided in this embodiment, and fig. 5 is a schematic diagram showing a display screen direction of the terminal in the horizontal use posture provided in this embodiment, where an arrow direction in the diagram is the display screen direction. When the direction is given to the reference side of the display screen, the direction is given based on the gravity acceleration of the terminal. It should be noted that the display reference side of the present embodiment is a non-directional side, and the display reference side is a directional side by giving a direction, that is, giving a direction to the display reference side, and the direction of the directional side is determined as the display direction.
Continuing with the foregoing example, by referring to the video display direction determined in fig. 3 and combining with the display screen direction in fig. 4, it can be known that the angle formed between the two is 90 °, so that the video display direction does not conform to the current visual direction of the user, and therefore, the video to be displayed should be displayed after being rotated by 90 ° counterclockwise or by 270 ° clockwise based on the original video display direction.
In an optional implementation manner of this embodiment, after adjusting the video to be displayed to the target video display direction matched with the display screen direction based on the target rotation angle, the method further includes: acquiring the aspect ratio of a video image of a video to be displayed and the interface aspect ratio of a display interface of a display screen; and performing size scaling operation on the video picture of the video to be displayed based on the aspect ratio of the video picture and the aspect ratio of the interface.
Specifically, in practical applications, the size of the original video data before the adjustment of the video display direction may not be adapted to the size of the current interface, and based on this, the embodiment further performs scaling on the video picture after the rotation of the video to be displayed, so that the video picture is adapted to the display interface, and the video display effect is ensured.
In an optional implementation manner of this embodiment, before determining an original video display direction of a video to be displayed on a plane where a display screen is located, the method further includes: judging whether the terminal is in a video manual rotation adjusting state currently, wherein in the video manual rotation adjusting state, the terminal adjusts the video display direction according to a manual adjusting instruction corresponding to the terminal rotation direction and input by an external manual rotation terminal; and when the terminal is not in the video manual rotation adjustment state, executing the step of determining the original video display direction of the video to be displayed on the plane where the display screen is located.
Specifically, in practical application, in order to ensure the diversity and multi-scene adaptability of video display direction adjustment, a function of manually rotating the terminal to trigger the video display direction adjustment is further provided, that is, a corresponding manual adjustment instruction is generated according to the rotation data of the terminal manually rotated by the user, for example, the user rotates the terminal 90 ° to the left, the corresponding generated manual adjustment instruction represents that the video display direction rotates 90 ° to the left, it should be understood that, in this embodiment, the terminal should return after completing the rotation to the target angle, so that the terminal remains in the original state, but does not remain in the state after the rotation. In this embodiment, when the terminal is not in the video manual rotation adjustment state, the requirement of automatic adjustment of the video display direction is described, so that the video display direction adjustment process of this embodiment is triggered.
In an optional implementation manner of this embodiment, after calculating the target rotation angle of the video to be displayed based on the original video display direction and the display screen direction, the method further includes: and establishing a corresponding relation between the video identification information and the calculated target rotation angle, and storing the corresponding relation to a rotation angle index table.
Specifically, in this embodiment, after the rotation angle corresponding to the video is determined for the current video to be displayed, in order to save the processing performance of the terminal and improve the processing efficiency of the terminal when the video is subsequently received again, the rotation angle calculated according to the video to be displayed for the first time is associated with the identification information of the video, so that when the video with the same identification information (which may be the same video or the same type of video) is subsequently received again, the corresponding rotation angle can be directly called without recalculation.
In an optional implementation manner of this embodiment, before determining an original video display direction of a video to be displayed on a plane where a display screen is located, the method further includes: acquiring video identification information of a video to be displayed; inquiring a preset rotation angle index table through the video identification information, and judging whether the inquiry is successful; the rotation angle index table is a corresponding relation table between preset video identification information and a rotation angle; and when the query is successful, directly adjusting the video to be displayed to the display direction of the target video through the target rotation angle obtained by the query.
Specifically, the rotation angle index table in this embodiment may be generated by associating the calculated rotation angle with the video identification information of the video to be displayed based on the foregoing embodiments, while in other embodiments, the rotation angle may be generated by manually editing the rotation angle by the end user and then associating the rotation angle with the corresponding video identification information, or may be obtained from a backend server, which is not limited herein.
In this embodiment, when a video display direction adjustment requirement is detected, it is first determined whether a result of the video to be displayed can be queried in the rotation angle suggestive table, and when the query is successful, the video display direction adjustment can be directly performed based on the queried rotation angle without calculating the rotation angle after acquiring the original video display direction and the display screen direction, so that the processing efficiency of the terminal can be effectively improved; and when the query is not successful, the step of determining the original video display direction of the video to be displayed on the plane where the display screen is located is executed so as to meet the requirement of adjusting the video display direction.
Based on the technical scheme of the embodiment of the application, the original video display direction of the video to be displayed on the plane where the display screen is located and the display screen direction of the display screen in the current use posture of the terminal are determined; judging whether the display direction of the original video is matched with the direction of the display screen; when the matching of the original video display direction and the display screen direction fails, calculating a target rotation angle of the video to be displayed based on the original video display direction and the display screen direction; and adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle. Through the implementation of the scheme, the terminal automatically adjusts the video to be displayed to the target video display direction according with the visual direction of the user according to the original video display direction and the current display screen direction, then the video is displayed and output, the video watching convenience is effectively improved, and the video watching experience of the user is guaranteed.
The method in fig. 6 is a refined video display direction adjustment method provided in the second embodiment of the present application, where the method includes:
step 601, identifying a display main body on a preset image frame in a video to be displayed, and extracting two preset target feature points on the display main body.
Specifically, the image frame in this embodiment may be a first frame image of a video, the display subject is also a main display object in the video to be displayed, and the feature point is a point on a portion of the video to be displayed, where the portion meets a preset feature (for example, a shape feature, a color feature, or the like) on the display subject.
And step 602, connecting a directed line between the two target feature points on the plane where the display screen is located based on a preset connection rule.
Step 603, determining the direction of the component of the directional line on a preset coordinate axis in the rectangular plane coordinate system as the original video display direction of the video to be displayed on the plane where the display screen is located.
Specifically, the original video display direction in this embodiment represents a display direction when the video to be displayed is directly displayed on the terminal display screen, and the display direction when the display screen is taken as a reference plane is associated with a direction of an X-axis component or a Y-axis component of a directional line between feature points on the main body of the video to be displayed.
And step 604, acquiring the current use posture of the terminal based on the gravity acceleration data of the terminal, and determining the corresponding display screen reference edge according to the use posture.
Specifically, the reference edge of the display screen in this embodiment is also the long edge or the short edge of the display screen, and the usage posture may be two normal terminal usage states, i.e. a horizontal usage posture or a vertical usage posture.
Step 605, assigning a direction to the determined display screen reference edge according to the gravity acceleration data, and determining the obtained reference edge direction as the display screen direction.
The display screen direction of the embodiment represents the visual direction when the terminal user normally watches the display content on the mobile phone display screen in the current terminal use posture. When the use posture is the vertical use posture, the direction is given to the long edge of the display screen based on the gravity acceleration data, and the obtained long edge direction is determined as the display screen direction; when the use posture is a landscape use posture, a direction is given to the short side of the display screen based on the gravity acceleration data, and the obtained direction of the short side is determined as the display screen direction.
And 606, comparing the display direction of the original video with the display screen direction.
The present embodiment further determines whether the video display direction corresponds to the user's visual direction by determining whether the directions of the video and the display screen match.
And step 607, when the display direction of the original video is not consistent with the display direction of the display screen, calculating the target rotation angle of the video to be displayed based on the display direction of the original video and the display direction of the display screen.
In this embodiment, when the directions of the video and the display screen are not matched, it is described that the original display direction of the video to be displayed is not consistent with the current visual direction of the user. In the embodiment, the direction of the display screen is taken as the reference direction, so that the angle of the video which needs to be rotated and adjusted from the original display direction is calculated and obtained if the direction of the video needs to be matched with the direction of the display screen.
And 608, adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle, and outputting the adjusted video to be displayed to the display screen for displaying.
In the embodiment, the display direction of the original video is corrected based on the calculated video rotation angle, and the display direction of the target video to be displayed after adjustment is consistent with the display screen direction, so that the current visual direction of the user is met.
It should be understood that, the size of the serial number of each step in this embodiment does not mean the execution sequence of the step, and the execution sequence of each step should be determined by its function and inherent logic, and should not be limited uniquely to the implementation process of the embodiment of the present application.
The embodiment of the application discloses a video display direction adjusting method, which comprises the steps of determining the original video display direction of a video to be displayed on a plane where a display screen is located and the display screen direction of the display screen in the current use posture of a terminal; judging whether the display direction of the original video is matched with the direction of the display screen; when the matching of the original video display direction and the display screen direction fails, calculating a target rotation angle of the video to be displayed based on the original video display direction and the display screen direction; and adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle. Through the implementation of the scheme, the terminal automatically adjusts the video to be displayed to the target video display direction according with the visual direction of the user according to the original video display direction and the current display screen direction, then the video is displayed and output, the video watching convenience is effectively improved, and the video watching experience of the user is guaranteed.
Fig. 7 is a video display direction adjusting apparatus according to a third embodiment of the present application. The video display direction adjusting device can be used for realizing the video display direction adjusting method in the foregoing embodiment. As shown in fig. 7, the video display direction adjustment apparatus mainly includes:
the determining module 701 is configured to determine an original video display direction of a video to be displayed on a plane where a display screen is located, and determine a display screen direction of the display screen in a current use posture of the terminal; the display screen direction represents the current visual direction when the display screen is normally watched by the outside;
a judging module 702, configured to judge whether a display direction of an original video matches a display screen direction;
the calculating module 703 is configured to calculate a target rotation angle of the video to be displayed based on the display direction of the original video and the display screen direction when the matching between the display direction of the original video and the display screen direction fails;
and an adjusting module 704, configured to adjust the video to be displayed to a target video display direction matching the display screen direction based on the target rotation angle.
In an optional implementation manner of this embodiment, when determining the original video display direction of the video to be displayed on the plane where the display screen is located, the determining module 701 is specifically configured to: identifying a display main body on a preset image frame in a video to be displayed; extracting two target feature points preset on a display main body; connecting a directed line between the two target characteristic points on the plane where the display screen is located based on a preset connection rule; and determining the direction of the component of the directional line on a preset coordinate axis in the rectangular plane coordinate system as the original video display direction of the video to be displayed on the plane where the display screen is located.
In an optional implementation manner of this embodiment, when determining the display screen direction of the display screen in the current use posture of the terminal, the determining module 701 is specifically configured to: acquiring the current use posture of the terminal based on the gravity acceleration data of the terminal; determining a corresponding display screen reference edge based on the use gesture and a preset mapping relation between the use gesture and the display screen reference edge, wherein the display screen reference edge comprises a long edge or a short edge of the display screen; and giving directions to the determined reference sides of the display screen according to the gravity acceleration data, and determining the directions of the obtained reference sides as the directions of the display screen.
As shown in fig. 8, another video display direction adjusting apparatus provided in this embodiment is an alternative implementation manner of this embodiment, where the video display direction adjusting apparatus further includes: the scaling module 705 is configured to, after the video to be displayed is adjusted to the target video display direction matched with the display screen direction based on the target rotation angle, obtain an aspect ratio of a video image of the video to be displayed and obtain an interface aspect ratio of a display interface of the display screen; and performing size scaling operation on the video picture of the video to be displayed based on the aspect ratio of the video picture and the aspect ratio of the interface.
In an optional implementation manner of this embodiment, the determining module 702 is further configured to: before determining the original video display direction of a video to be displayed on a plane where a display screen is located, determining whether a terminal is currently in a video manual rotation adjustment state; and the terminal adjusts the video display direction according to a manual adjustment instruction corresponding to the terminal rotation direction and input by an external manual rotation terminal in the video manual rotation adjustment state. Correspondingly, when the terminal is not in the video manual rotation adjustment state, the determining module 701 performs a function of determining the original video display direction of the video to be displayed on the plane where the display screen is located.
In an optional implementation manner of this embodiment, the determining module 702 is further configured to: before determining the original video display direction of a video to be displayed on a plane where a display screen is located, acquiring video identification information of the video to be displayed; inquiring a preset rotation angle index table through the video identification information, and judging whether the inquiry is successful; the rotation angle index table is a corresponding relation table between preset video identification information and a rotation angle. Correspondingly, when the query is successful, the adjusting module 704 is further configured to adjust the video to be displayed to the target video display direction directly through the target rotation angle obtained through the query; when the query is not successful, the determining module 701 is configured to perform a function of determining an original video display direction of the video to be displayed on the plane where the display screen is located.
Further, in an optional implementation manner of this embodiment, the video display direction adjusting apparatus further includes: the saving module 706 is configured to, after calculating a target rotation angle of a video to be displayed based on an original video display direction and a display screen direction, establish a corresponding relationship between video identification information and the calculated target rotation angle, and save the corresponding relationship to a rotation angle index table.
It should be noted that, the video display direction adjusting methods in the first and second embodiments can be implemented based on the video display direction adjusting device provided in this embodiment, and it can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process of the video display direction adjusting device described in this embodiment may refer to the corresponding process in the foregoing method embodiment, and details are not described here.
According to the video display direction adjusting device provided by the embodiment, the original video display direction of a video to be displayed on a plane where a display screen is located and the display screen direction of the display screen in the current use posture of the terminal are determined; judging whether the display direction of the original video is matched with the direction of the display screen; when the matching of the original video display direction and the display screen direction fails, calculating a target rotation angle of the video to be displayed based on the original video display direction and the display screen direction; and adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle. Through the implementation of the scheme, the terminal automatically adjusts the video to be displayed to the target video display direction according with the visual direction of the user according to the original video display direction and the current display screen direction, then the video is displayed and output, the video watching convenience is effectively improved, and the video watching experience of the user is guaranteed.
Referring to fig. 9, fig. 9 is an electronic device according to a fourth embodiment of the present disclosure. The electronic device can be used for realizing the video display direction adjusting method in the embodiment. As shown in fig. 9, the electronic device mainly includes:
memory 901, processor 902, bus 903, and computer programs stored on memory 901 and executable on processor 902, memory 901 and processor 902 connected by bus 903. The processor 902, when executing the computer program, implements the video display direction adjustment method in the foregoing embodiments. Wherein the number of processors may be one or more.
The Memory 901 may be a high-speed Random Access Memory (RAM) Memory or a non-volatile Memory (non-volatile Memory), such as a magnetic disk Memory. The memory 901 is used for storing executable program code, and the processor 902 is coupled to the memory 901.
Further, an embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium may be provided in an electronic device in the foregoing embodiments, and the computer-readable storage medium may be the memory in the foregoing embodiment shown in fig. 9.
The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the video display direction adjustment method in the foregoing embodiments. Further, the computer-readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules is merely a division of logical functions, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a readable storage medium and includes 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 of the embodiments of the present application. And the aforementioned readable storage medium comprises: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present 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 above 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 view of the above description of the video display direction adjustment method, the electronic device and the computer-readable storage medium provided by the present application, those skilled in the art will recognize that changes may be made in the embodiments and applications of the method according to the present application.

Claims (9)

1. A method for adjusting a video display direction, comprising:
identifying a display main body on a preset image frame in a video to be displayed; extracting two target feature points preset on the display main body; connecting a directed line between the two target characteristic points on the plane where the display screen is located based on a preset connection rule; determining the direction of the component of the directional line on a preset coordinate axis in a rectangular plane coordinate system as the original video display direction of a video to be displayed on the plane where the display screen is located, and determining the display screen direction of the display screen in the current use posture of the terminal based on the reference edge of the display screen; the display screen direction represents the current visual direction when the display screen is normally watched by the outside; the display screen reference edge comprises a long edge or a short edge of the display screen;
judging whether the display direction of the original video is matched with the direction of the display screen;
when the original video display direction is failed to be matched with the display screen direction, calculating a target rotation angle of the video to be displayed based on the original video display direction and the display screen direction;
and adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle.
2. The method for adjusting the video display direction according to claim 1, wherein the determining the display screen direction of the display screen in the current use posture of the terminal comprises:
acquiring the current use posture of the terminal based on the gravity acceleration data of the terminal;
determining a corresponding display screen reference edge based on the using gesture and a mapping relation between a preset using gesture and the display screen reference edge;
and giving directions to the determined reference edges of the display screen according to the gravity acceleration data, and determining the directions of the obtained reference edges as the directions of the display screen.
3. The method according to claim 1, wherein the adjusting the video to be displayed to a target video display direction matching the display screen direction based on the target rotation angle further comprises:
acquiring the aspect ratio of a video image of the video to be displayed and the interface aspect ratio of a display interface of the display screen;
and performing size scaling operation on the video picture of the video to be displayed based on the video picture aspect ratio and the interface aspect ratio.
4. The method according to any one of claims 1 to 3, wherein before determining the original video display direction of the video to be displayed on the plane of the display screen, the method further comprises:
judging whether the terminal is currently in a video manual rotation adjustment state; in the video manual rotation adjusting state, the terminal adjusts the video display direction according to a manual adjusting instruction corresponding to the terminal rotation direction and input by an external manual rotation terminal;
and when the terminal is not in the video manual rotation adjustment state, executing the step of determining the original video display direction of the video to be displayed on the plane where the display screen is located.
5. The method according to any one of claims 1 to 3, wherein before determining the original video display direction of the video to be displayed on the plane of the display screen, the method further comprises:
acquiring video identification information of the video to be displayed;
inquiring a preset rotation angle index table through the video identification information, and judging whether the inquiry is successful; the rotation angle index table is a corresponding relation table between preset video identification information and a rotation angle;
when the query is successful, directly adjusting the video to be displayed to the display direction of the target video through the target rotation angle obtained by the query;
and when the query is not successful, executing the step of determining the original video display direction of the video to be displayed on the plane where the display screen is located.
6. The method according to claim 5, further comprising, after calculating the target rotation angle of the video to be displayed based on the original video display direction and the display screen direction:
and establishing a corresponding relation between the video identification information and the calculated target rotation angle, and storing the corresponding relation to the rotation angle index table.
7. A video display direction adjustment apparatus, comprising:
the device comprises a determining module, a display module and a display module, wherein the determining module is used for identifying a display main body on a preset image frame in a video to be displayed; extracting two target feature points preset on the display main body; connecting a directed line between the two target characteristic points on the plane where the display screen is located based on a preset connection rule; determining the direction of the component of the directional line on a preset coordinate axis in a rectangular plane coordinate system as the original video display direction of a video to be displayed on the plane where the display screen is located, and determining the display screen direction of the display screen in the current use posture of the terminal based on the reference edge of the display screen; the display screen direction represents the current visual direction when the display screen is normally watched by the outside; the display screen reference edge comprises a long edge or a short edge of the display screen;
the judging module is used for judging whether the display direction of the original video is matched with the direction of the display screen;
the calculation module is used for calculating a target rotation angle of the video to be displayed based on the original video display direction and the display screen direction when the original video display direction and the display screen direction are failed to be matched;
and the adjusting module is used for adjusting the video to be displayed to a target video display direction matched with the display screen direction based on the target rotation angle.
8. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910967460.4A 2019-10-12 2019-10-12 Video display direction adjusting method and device and computer readable storage medium Active CN110737336B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910967460.4A CN110737336B (en) 2019-10-12 2019-10-12 Video display direction adjusting method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910967460.4A CN110737336B (en) 2019-10-12 2019-10-12 Video display direction adjusting method and device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110737336A CN110737336A (en) 2020-01-31
CN110737336B true CN110737336B (en) 2022-05-13

Family

ID=69268806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910967460.4A Active CN110737336B (en) 2019-10-12 2019-10-12 Video display direction adjusting method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110737336B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021180224A1 (en) * 2020-03-13 2021-09-16 海信视像科技股份有限公司 Display device
CN113923460A (en) * 2020-07-09 2022-01-11 腾讯科技(深圳)有限公司 Video picture display method, device, equipment and storage medium
CN111885314B (en) * 2020-08-26 2024-04-02 深圳市雷鸟网络传媒有限公司 Screen adjustment method, device, terminal and computer readable storage medium
CN112235620A (en) * 2020-10-09 2021-01-15 深圳创维-Rgb电子有限公司 Display device rotating method, device, electronic equipment, system and storage medium
CN115379246A (en) * 2021-05-21 2022-11-22 北京字节跳动网络技术有限公司 Live video stream playing method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105979242A (en) * 2015-11-23 2016-09-28 乐视网信息技术(北京)股份有限公司 Video playing method and device
CN109547650A (en) * 2019-02-02 2019-03-29 京东方科技集团股份有限公司 A kind of method and device and electronic equipment controlling image rotation

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5075330B2 (en) * 2005-09-12 2012-11-21 任天堂株式会社 Information processing program
US20120176413A1 (en) * 2011-01-11 2012-07-12 Qualcomm Incorporated Methods and apparatuses for mobile device display mode selection based on motion direction
CN102843496B (en) * 2011-06-21 2016-04-27 联想(北京)有限公司 A kind of video acquisition processing method and portable electric appts
CN104732486B (en) * 2015-03-23 2017-10-03 海信集团有限公司 The display methods and device of a kind of picture
CN105100396A (en) * 2015-05-21 2015-11-25 努比亚技术有限公司 Mobile terminal and rotating display method and device thereof
CN105227963B (en) * 2015-08-31 2018-05-01 暴风集团股份有限公司 Streaming Media collection automatic identification direction and the method and system adjusted are carried out to terminal
CN106814989A (en) * 2017-03-10 2017-06-09 腾讯科技(深圳)有限公司 A kind of method and terminal of the page displayed on the terminals

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105979242A (en) * 2015-11-23 2016-09-28 乐视网信息技术(北京)股份有限公司 Video playing method and device
CN109547650A (en) * 2019-02-02 2019-03-29 京东方科技集团股份有限公司 A kind of method and device and electronic equipment controlling image rotation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于区域关系图的图像显示适配技术;任桐炜等;《软件学报》;20100915(第09期);2237-2249 *

Also Published As

Publication number Publication date
CN110737336A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN110737336B (en) Video display direction adjusting method and device and computer readable storage medium
US11842438B2 (en) Method and terminal device for determining occluded area of virtual object
US10630956B2 (en) Image processing method and apparatus
CN110310326B (en) Visual positioning data processing method and device, terminal and computer readable storage medium
CN110300264B (en) Image processing method, image processing device, mobile terminal and storage medium
US9756261B2 (en) Method for synthesizing images and electronic device thereof
CN111640181A (en) Interactive video projection method, device, equipment and storage medium
WO2020098530A1 (en) Picture rendering method and apparatus, and storage medium and electronic apparatus
US9661298B2 (en) Depth image enhancement for hardware generated depth images
CN104618803A (en) Information push method, information push device, terminal and server
JP2022524683A (en) Systems and methods for rendering real-world objects using depth information
US9613404B2 (en) Image processing method, image processing apparatus and electronic device
US10769811B2 (en) Space coordinate converting server and method thereof
CN109992111B (en) Augmented reality extension method and electronic device
CN110266926B (en) Image processing method, image processing device, mobile terminal and storage medium
CN111080665B (en) Image frame recognition method, device, equipment and computer storage medium
CN112634366B (en) Method for generating position information, related device and computer program product
US10360943B2 (en) Method, device and system for editing video
CN110177216B (en) Image processing method, image processing device, mobile terminal and storage medium
WO2018175217A1 (en) System and method for relighting of real-time 3d captured content
CN109842791B (en) Image processing method and device
CN111489433A (en) Vehicle damage positioning method and device, electronic equipment and readable storage medium
CN111898489B (en) Method and device for marking palm pose, electronic equipment and storage medium
CN108540726B (en) Method and device for processing continuous shooting image, storage medium and terminal
CN104301520A (en) Information inputting method, device and terminal

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