Playback method for six-degree-of-freedom video, and electronic device
By playing six-degree-of-freedom videos in virtual three-dimensional space and calculating the corresponding viewing angle streams using viewpoint positions and line-of-sight directions, the problem of video viewing in the prior art is not immersive enough, and a higher sense of immersion and freedom are achieved.
Patent Information
- Application Number
- PCT/CN2024/082294
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-24
- Filing Date
- 2024-03-18
- Publication Date
- 2025-05-22
AI Technical Summary
The prior art can only watch videos through pre-configured viewpoint positions, and cannot freely switch viewpoint positions, resulting in insufficient immersion in the video viewing experience.
Using six-degree-of-freedom video technology, video is played in virtual three-dimensional space. By obtaining the user's viewpoint position and the target object's position, calculating the line of sight direction, and obtaining the corresponding viewing angle stream, video viewing that can freely switch viewpoint positions in virtual three-dimensional space is realized.
It greatly improves the immersion of video viewing, and users can watch video content from any viewpoint, enhancing the immersion experience of video.
Smart Images

Figure CN2024082294_22052025_PF_FP_ABST
Abstract
Description
Six-degree-of-freedom video playback method and electronic device
[0001] This application claims priority to the Chinese invention patent application entitled “A method and electronic device for playing six-degree-of-freedom video” and filed on April 24, 2023, with application number 2023104570817. The entire contents of that application are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of immersive video technology, and in particular to a six-degree-of-freedom video playback method and electronic device. Background Art
[0003] With the continuous development of display technology, users' requirements for video viewing experience are becoming increasingly higher. Relevant technologies have proposed highly immersive videos such as 3D videos and virtual reality (VR) videos. However, these videos are often three-degree-of-freedom (DOF) videos that only support switching between pitch, roll, and yaw angles. Video viewing can only be performed from pre-configured viewpoints, and the user cannot freely switch viewpoints to view video content from different viewpoints.
[0004] To address the issue of limited viewing options, six-degree-of-freedom (SDOF) technology has been proposed. Six-degree-of-freedom (SDOF) technology improves the freedom of video viewing. Users can interactively adjust their viewing point, allowing them to watch from any desired viewpoint, significantly enhancing the immersive experience. In theory, playing SDOF videos in a virtual 3D space can improve both the viewing scene and the degree of freedom, further enhancing the immersive experience.
[0005] Summary of the Invention
[0006] In view of this, an embodiment of the present application provides a six-degree-of-freedom video playback method and an electronic device for playing six-degree-of-freedom video in a virtual three-dimensional space.
[0007] In order to achieve the above objectives, the embodiments of the present application provide the following technical solutions:
[0008] In a first aspect, an embodiment of the present application provides a method for playing a six-degree-of-freedom video, comprising:
[0009] Acquire a first position and a second position, wherein the first position is a position of a target object in a six-degree-of-freedom video in a virtual three-dimensional space at a certain moment, and the second position is a viewpoint position of a user in the virtual three-dimensional space at the certain moment;
[0010] Acquire a sight line direction of the target object from the viewpoint position according to the first position and the second position;
[0011] Acquire a target perspective stream corresponding to the sight direction from a plurality of perspective streams of the six-degree-of-freedom video;
[0012] The six-degree-of-freedom video is played in the virtual three-dimensional space based on the target perspective stream.
[0013] As an optional implementation of the embodiment of the present application, playing the six-degree-of-freedom video in the virtual three-dimensional space based on the target perspective stream includes:
[0014] Setting a virtual screen in the virtual three-dimensional space;
[0015] The video content corresponding to the target perspective stream is played through the virtual screen to play the six-degree-of-freedom video in the virtual three-dimensional space.
[0016] As an optional implementation of the embodiment of the present application, setting a virtual screen in the virtual three-dimensional space includes:
[0017] Determining a position of the virtual screen according to the sight line direction and the first position;
[0018] The virtual screen is set in the virtual three-dimensional space according to the posture of the virtual screen.
[0019] As an optional implementation of the embodiment of the present application, determining the position and posture of the virtual screen according to the sight line direction and the first position includes:
[0020] It is determined that the virtual screen is located at the first position, and it is determined that the plane where the virtual screen is located is perpendicular to the line of sight direction.
[0021] As an optional implementation of the embodiment of the present application, the method further includes:
[0022] Acquire a target distance, where the target distance is the distance between the first position and the second position;
[0023] Setting the size of the virtual screen according to the target distance;
[0024] The size of the virtual screen is negatively correlated with the target distance.
[0025] As an optional implementation of the embodiment of the present application, obtaining a target perspective stream corresponding to the sight direction from the multiple perspective streams of the six-degree-of-freedom video includes:
[0026] Acquire a target viewing angle flow identifier according to the viewing direction;
[0027] Sending a view stream request carrying the target view stream identifier to the server;
[0028] Receive a view stream response carrying the target view stream sent by the server.
[0029] As an optional implementation of the embodiment of the present application, obtaining the target view flow identifier according to the sight direction includes:
[0030] Acquire the target viewing angle stream identifier according to the viewing direction and a preset mapping relationship;
[0031] The preset mapping relationship includes each viewing angle stream of the six-degree-of-freedom video and a direction corresponding to each viewing angle stream of the six-degree-of-freedom video.
[0032] In a second aspect, an embodiment of the present application provides an electronic device, including:
[0033] an acquiring unit, configured to acquire a first position and a second position, wherein the first position is a position of a target object in a 6-DOF video in a virtual 3D space at a certain moment, and the second position is a viewpoint position of a user in the virtual 3D space at the certain moment;
[0034] a processing unit, configured to obtain a sight line direction according to the first position and the second position, and obtain a target perspective stream corresponding to the sight line direction from among the multiple perspective streams of the six-degree-of-freedom video;
[0035] A playback unit is configured to play the six-degree-of-freedom video in the virtual three-dimensional space based on the target perspective stream.
[0036] As an optional implementation of an embodiment of the present application, the playback unit is specifically used to set a virtual screen in the virtual three-dimensional space; play the video content corresponding to the target perspective stream through the virtual screen to play the six-degree-of-freedom video in the virtual three-dimensional space.
[0037] As an optional implementation of the embodiment of the present application, the playback unit is specifically used to determine the posture of the virtual screen according to the line of sight direction and the first position; and set the virtual screen in the virtual three-dimensional space according to the posture of the virtual screen.
[0038] As an optional implementation of the embodiment of the present application, the playback unit is specifically configured to determine that the virtual screen is located at the first position, and determine that the plane where the virtual screen is located is perpendicular to the line of sight direction.
[0039] As an optional implementation of the embodiment of the present application, the playback unit is further configured to obtain a target distance, where the target distance is the distance between the first position and the second position; and set the size of the virtual screen according to the target distance;
[0040] The size of the virtual screen is negatively correlated with the target distance.
[0041] As an optional implementation of an embodiment of the present application, the processing unit is specifically used to obtain a target perspective stream identifier based on the line of sight direction; send a perspective stream request carrying the target perspective stream identifier to a server; and receive a perspective stream response carrying the target perspective stream sent by the server.
[0042] As an optional implementation of the embodiment of the present application, the processing unit is specifically configured to obtain the target view flow identifier according to the sight direction and a preset mapping relationship;
[0043] The preset mapping relationship includes each viewing angle stream of the six-degree-of-freedom video and a direction corresponding to each viewing angle stream of the six-degree-of-freedom video.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program and the processor is used to enable the electronic device to implement the six-degree-of-freedom video playback method described in any of the above embodiments when executing the computer program.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which, when the computer program is executed by a computing device, enables the computing device to implement the six-degree-of-freedom video playback method described in any of the above embodiments.
[0046] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to implement the method for playing a six-degree-of-freedom video as described in any one of the above-mentioned embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0049] FIG1 is a scene architecture diagram of a six-degree-of-freedom video playback method provided in an embodiment of the present application;
[0050] FIG2 is a flowchart of one of the steps of a method for playing a six-degree-of-freedom video provided in an embodiment of the present application;
[0051] FIG3 is a schematic diagram of a six-degree-of-freedom video generation method provided in an embodiment of the present application;
[0052] FIG4 is a schematic diagram of the sight line direction provided in an embodiment of the present application;
[0053] FIG5 is a schematic diagram of a perspective flow corresponding to a sight line direction according to an embodiment of the present application;
[0054] FIG6 is a second schematic diagram of a viewing angle flow corresponding to a sight line direction provided in an embodiment of the present application;
[0055] FIG7 is a third schematic diagram of a viewing angle flow corresponding to a sight line direction provided in an embodiment of the present application;
[0056] FIG8 is a fourth schematic diagram of a viewing angle flow corresponding to a sight line direction provided in an embodiment of the present application;
[0057] FIG9 is a second flowchart of the method for playing a six-degree-of-freedom video according to an embodiment of the present application;
[0058] FIG10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
[0059] FIG11 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.
[0061] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein. Obviously, the embodiments in the specification are only part of the embodiments of the present application, not all of the embodiments.
[0062] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete way. In addition, in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0063] The following first describes the scenario architecture of the six-degree-of-freedom video playback method provided in the embodiment of the present application.
[0064] As shown in Figure 1, the scene architecture of the six-degree-of-freedom video playback method provided in the embodiment of the present application includes: a server 11 and an electronic device 12. The server 11 is used to generate a six-degree-of-freedom video including multiple perspective streams, receive a perspective stream request sent by the electronic device 12, and send the corresponding perspective stream to the electronic device 12. The electronic device 12 is used to construct a virtual three-dimensional space including a virtual screen for playing the six-degree-of-freedom video, and before each frame of the six-degree-of-freedom video is played, obtain the first position of the user's viewpoint in the virtual three-dimensional space and the second position of the target object in the six-degree-of-freedom video, obtain the line of sight direction based on the first position and the second position, send a request to the server 11 for the target perspective stream corresponding to the line of sight direction, and play the video content corresponding to the target perspective stream on the virtual screen.
[0065] Among them, the implementation method of the server 11 generating a six-degree-of-freedom video including multiple perspective streams may include: performing motion capture on a real object (for example, a person or an object), generating driving data for driving a virtual model based on the action of the real object, driving the virtual model through the driving data, and shooting the driving virtual model from different shooting perspectives through multiple virtual cameras to obtain a six-degree-of-freedom video including multiple perspective streams.
[0066] The electronic device in the embodiment of the present application can be an immersive video viewing device such as a VR device, an augmented reality (AR) device, etc.
[0067] It should be noted that the six-degree-of-freedom video in the embodiment of the present application refers to a video that can be viewed by switching the viewpoint position arbitrarily in the six directions of front, back, left, right, up and down in three-dimensional space.
[0068] An embodiment of the present application provides a method for playing a six-degree-of-freedom video. The method is applied to an electronic device. As shown in FIG2 , the method for playing a six-degree-of-freedom video includes the following steps S21 to S24:
[0069] S21. Acquire the first position and the second position.
[0070] The first position is the position of the target object in the six-degree-of-freedom video in the virtual three-dimensional space at a moment, and the second position is the viewpoint position of the user in the virtual three-dimensional space at the moment.
[0071] The six-degree-of-freedom video in the embodiment of the present application includes multiple perspective streams obtained by shooting the target object at different perspectives. Exemplarily, as shown in Figure 3, when generating the six-degree-of-freedom video, multiple cameras 301 can be set on a spherical surface with the position of the target object 300 as the center of the sphere, and the target object 300 is shot from different perspectives by the multiple cameras 301 set on the spherical surface to obtain multiple perspective streams, and finally a six-degree-of-freedom video is generated based on the multiple perspective streams. It should be noted that the relative positions of the multiple cameras 301 set on the spherical surface and the target object 300 are fixed. When the target object 300 moves, the multiple cameras 301 will follow the target object 300 and keep the relative positions of each camera 301 set on the spherical surface and the target object 300 unchanged.
[0072] In some embodiments, the implementation method of obtaining the first position may include: first, converting the six-degree-of-freedom video and the virtual three-dimensional space into the same coordinate system according to the camera parameters of the six-degree-of-freedom video, and then calculating the position of the target object in the virtual three-dimensional space according to the displacement information of the target object in the coordinate system of the six-degree-of-freedom video and the initial position of the target object in the virtual three-dimensional space.
[0073] In some embodiments, the implementation method of obtaining the second position may include: obtaining data collected by an acceleration sensor, gyroscope, etc. integrated in the electronic device, and calculating the second position based on the data collected by the acceleration sensor, gyroscope, etc.
[0074] S22: Acquire a sight line direction of the target object from the viewpoint position according to the first position and the second position.
[0075] In the embodiments of the present application, the sight line direction is the direction extending from the second position to the first position. For example, referring to FIG4 , the position of the target object 300 in the 6DOF video in the virtual 3D space is P1, and the user's viewpoint in the virtual 3D space is P2. The sight line direction obtained based on the first position P1 and the second position P2 can be the direction shown by the arrow in FIG4 .
[0076] S23. Obtain a target perspective stream corresponding to the sight direction from among the multiple perspective streams of the six-degree-of-freedom video.
[0077] In the embodiment of the present application, the target perspective flow corresponding to the line of sight direction refers to the perspective flow obtained by shooting a video of the target object by a camera located in the line of sight direction.
[0078] For example, as shown in FIG5 , step S23 is described using the example of a case where the position of a target object in a 6DOF video in a virtual 3D space remains unchanged, while the user's viewpoint in the virtual 3D space changes. The position (first position) of the target object 300 in the 6DOF video in the virtual 3D space is 50. When the user's viewpoint in the virtual 3D space is 51 (second position), the viewing direction is D1, and the camera located in view direction D1 is camera a. Therefore, the view stream captured by camera a is used as the target view stream corresponding to view direction D1. When the user's viewpoint in the virtual 3D space is 52 (second position), the viewing direction is D2, and the camera located in view direction D2 is camera b. Therefore, the view stream captured by camera b is used as the target view stream corresponding to view direction D2. If the position of the target object in the virtual 3D space remains unchanged, after the user moves from position 51 to position 52, the viewpoint of the target object switches from direction D1 to direction D2, and the corresponding target view stream switches from the view stream captured by camera a to the view stream captured by camera b.
[0079] For example, as shown in FIG6 , FIG6 illustrates step S23 using the example of a case where the position of the target object 300 in the six-degree-of-freedom video in the virtual three-dimensional space changes, while the user's viewpoint position in the virtual three-dimensional space remains unchanged. The user's viewpoint position (second position) in the virtual three-dimensional space is 60. When the position (first position) of the target object 300 in the six-degree-of-freedom video in the virtual three-dimensional space is 61, the line of sight direction is D3, and the camera located in line of sight direction D3 is camera c. Therefore, the perspective stream captured by camera c is used as the target perspective stream corresponding to line of sight direction D3. When the position (first position) of the target object 300 in the six-degree-of-freedom video in the virtual three-dimensional space is 62, the line of sight direction is D4, and the camera located in line of sight direction D4 is camera d. Therefore, the perspective stream captured by camera d is used as the target perspective stream corresponding to line of sight direction D4. When the user's viewpoint position in the virtual three-dimensional space does not change, after the virtual object moves from position 61 to position 62 in the virtual three-dimensional space, the viewing angle of the target object can be switched from direction D3 to direction D4, and the corresponding target perspective stream is switched from the perspective stream captured by camera c to the perspective stream captured by camera d.
[0080] For example, referring to FIG7 , FIG7 illustrates step S23 using the example of a case where both the position of the target object 300 in the six-degree-of-freedom video in the virtual three-dimensional space and the user's viewpoint position in the virtual three-dimensional space have changed. When the position of the target object 300 in the six-degree-of-freedom video in the virtual three-dimensional space is 71 and the user's viewpoint position (second position) in the virtual three-dimensional space is 72, the viewing direction is D5, and the camera located in viewing direction D5 is camera e. Therefore, the perspective stream captured by camera e is used as the target perspective stream corresponding to viewing direction D5. When the position of the target object 300 in the six-degree-of-freedom video in the virtual three-dimensional space is 73 and the user's viewpoint position (second position) in the virtual three-dimensional space is 74, the viewing direction is D6, and the camera located in viewing direction D6 is camera f. Therefore, the perspective stream captured by camera f is used as the target perspective stream corresponding to the viewing direction. The user's viewpoint position in the virtual three-dimensional space moves from position 71 to position 73, and the virtual object moves from position 72 to position 74 in the virtual three-dimensional space, so the viewing angle of the target object can be switched from direction D5 to direction D6, and the corresponding target perspective stream is switched from the perspective stream obtained by camera e to the perspective stream obtained by camera f.
[0081] For example, referring to FIG8 , FIG8 illustrates step S23 using the example of a case where both the position of the target object 300 in the 6DOF video in the virtual 3D space and the user's viewpoint position in the virtual 3D space have changed. When the position of the target object 300 in the 6DOF video in the virtual 3D space is 81 and the user's viewpoint position (second position) in the virtual 3D space is 82, the sight direction is D7 and the camera located in sight direction D7 is camera g. Therefore, the perspective stream captured by camera g is used as the target perspective stream corresponding to sight direction D7. When the position of the target object 300 in the 6DOF video in the virtual 3D space is 83 and the user's viewpoint position (second position) in the virtual 3D space is 84, the sight direction remains D7 and the camera located in sight direction D7 is still camera g. Therefore, the perspective stream captured by camera g is used as the target perspective stream corresponding to sight direction D7. The user's viewpoint position in the virtual three-dimensional space moves from position 81 to position 83, and the virtual object moves from position 82 to position 84 in the virtual three-dimensional space, so the viewing angle for viewing the target object remains in direction D7, and the corresponding target perspective flow remains the perspective flow obtained by shooting with camera g.
[0082] S24. Play the six-degree-of-freedom video in the virtual three-dimensional space based on the target perspective stream.
[0083] The six-degree-of-freedom video playback method provided in an embodiment of the present application, when playing a six-degree-of-freedom video in a virtual three-dimensional space, obtains a first position of a target object in the six-degree-of-freedom video in the virtual three-dimensional space at a certain moment and a second position of a user's viewpoint in the virtual three-dimensional space at that moment, then obtains a line of sight direction from the viewpoint position when viewing the target object based on the first position and the second position, then obtains a target view stream corresponding to the line of sight direction from multiple view streams of the six-degree-of-freedom video, and plays the six-degree-of-freedom video in the virtual three-dimensional space based on the target view stream. Since the line of sight direction determined based on the first position and the second position is the line of sight direction of the user viewing the target object in the six-degree-of-freedom video in the virtual three-dimensional space, obtaining the target view stream corresponding to the line of sight direction from multiple view streams of the six-degree-of-freedom video and playing the six-degree-of-freedom video in the virtual three-dimensional space based on the target view stream can achieve switching of the corresponding view stream as the user's line of sight changes when viewing the target object, achieving the effect of being able to view the corresponding view stream at any viewpoint position, thereby achieving playback of the six-degree-of-freedom video in the virtual three-dimensional space.
[0084] As an extension and refinement of the above embodiment, the present application provides another method for playing a six-degree-of-freedom video. As shown in FIG9 , the method for playing a six-degree-of-freedom video includes the following steps:
[0085] S901: Acquire a first position and a second position.
[0086] The first position is the position of the target object in the six-degree-of-freedom video in the virtual three-dimensional space at a moment, and the second position is the viewpoint position of the user in the virtual three-dimensional space at the moment.
[0087] S902: Acquire a sight line direction of the target object from the viewpoint position according to the first position and the second position.
[0088] The implementation of the above steps S901 and S902 is the same as the implementation of steps S21 and S22 in the embodiment shown in FIG2 , and will not be repeated here.
[0089] S903: Acquire a target viewing angle flow identifier according to the viewing direction.
[0090] In some embodiments, the above step S903 (obtaining the target perspective stream identifier according to the sight line direction) includes: obtaining the target perspective stream identifier according to the sight line direction and a preset mapping relationship.
[0091] The preset mapping relationship includes each viewing angle stream of the six-degree-of-freedom video and a direction corresponding to each viewing angle stream of the six-degree-of-freedom video.
[0092] For example, the preset mapping relationship may be as shown in Table 1 below:
[0093] Table 1
[0094] When the preset mapping relationship is as shown in Table 1 above, and the sight line direction is direction 3, the identifier of the view stream c is determined as the target view stream identifier.
[0095] S904: Send a view stream request carrying the target view stream identifier to the server.
[0096] S905: Receive a view stream response carrying the target view stream sent by the server.
[0097] S906: Setting a virtual screen in the virtual three-dimensional space.
[0098] In some embodiments, setting a virtual screen in the virtual three-dimensional space includes: determining a posture of the virtual screen according to the sight direction and the first position, and setting the virtual screen in the virtual three-dimensional space according to the posture of the virtual screen.
[0099] It should be noted that, since the virtual screen always exists in the virtual three-dimensional space during the process of playing the six-degree-of-freedom video in the virtual three-dimensional space, setting a virtual screen in the virtual three-dimensional space and determining the posture of the virtual screen according to the line of sight direction and the first position can also be described as: only setting a virtual screen in the virtual three-dimensional space when the six-degree-of-freedom video starts to be played, and adjusting the posture of the virtual screen according to the obtained line of sight direction and the first position during the subsequent playback of the six-degree-of-freedom video.
[0100] In some implementations, determining the position of the virtual screen according to the sight line direction and the first position includes:
[0101] It is determined that the virtual screen is located at the first position, and it is determined that the plane where the virtual screen is located is perpendicular to the line of sight direction.
[0102] Since the embodiment of the present application determines that the virtual screen is located at the first position and determines that the plane where the virtual screen is located is perpendicular to the line of sight direction, the embodiment of the present application can make the target object located at the first position of the virtual scene when the perspective stream of the six-degree-of-freedom video is played through the virtual screen, and enable the user to normally view the display content of the target perspective stream.
[0103] S907: Obtain target distance.
[0104] The target distance is the distance between the first position and the second position.
[0105] S908: Setting the size of the virtual screen according to the target distance.
[0106] The size of the virtual screen is negatively correlated with the target distance.
[0107] Since the above embodiment further obtains the distance between the first position and the second position, and sets the size of the virtual screen according to the distance between the first position and the second position, and the size of the virtual screen is negatively correlated with the target distance, the above embodiment can make the target object smaller when the user is far away from the target object, and make the target object larger when the user is close to the target object, thereby satisfying the visual law that things are larger when they are near and smaller when they are far, and further enhancing the realism of the target object.
[0108] S909: Play the video content corresponding to the target perspective stream through the virtual screen to play the six-degree-of-freedom video in the virtual three-dimensional space.
[0109] In some embodiments, the transparency of the virtual screen and the background of the 6-DOF video may be 100%.
[0110] Setting the transparency of the virtual screen and the background of the six-degree-of-freedom video to 100% can display only the target object when the video content corresponding to the target perspective stream is played through the virtual screen, while other areas outside the target object are the content of the virtual three-dimensional space, thereby enhancing the immersiveness of the six-degree-of-freedom video.
[0111] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application also provides an electronic device, which corresponds to the above method embodiment. For ease of reading, this embodiment will no longer repeat the details of the above method embodiment one by one, but it should be clear that the electronic device in this embodiment can correspond to and implement all the contents of the above method embodiment.
[0112] An embodiment of the present application provides an electronic device. FIG10 is a schematic structural diagram of the electronic device. As shown in FIG10 , the electronic device 100 includes:
[0113] An acquiring unit 101 is configured to acquire a first position and a second position, wherein the first position is a position of a target object in a 6-DOF video in a virtual 3D space at a certain moment, and the second position is a viewpoint position of a user in the virtual 3D space at the certain moment;
[0114] The processing unit 102 is configured to obtain a sight line direction of the target object from the viewpoint position according to the first position and the second position, and obtain a target perspective stream corresponding to the sight line direction from the multiple perspective streams of the six-degree-of-freedom video;
[0115] The playback unit 103 is configured to play the six-degree-of-freedom video in the virtual three-dimensional space based on the target perspective stream.
[0116] As an optional implementation of an embodiment of the present application, the playback unit is specifically used to set a virtual screen in the virtual three-dimensional space; play the video content corresponding to the target perspective stream through the virtual screen to play the six-degree-of-freedom video in the virtual three-dimensional space.
[0117] As an optional implementation of the embodiment of the present application, the playback unit 103 is specifically configured to determine the posture of the virtual screen according to the sight line direction and the first position.
[0118] As an optional implementation of the embodiment of the present application, the playback unit 103 is specifically configured to determine that the virtual screen is located at the first position, and determine that the plane where the virtual screen is located is perpendicular to the line of sight direction.
[0119] As an optional implementation of the embodiment of the present application, the playback unit 103 is further configured to obtain a target distance, where the target distance is the distance between the first position and the second position; and set the size of the virtual screen according to the target distance;
[0120] The size of the virtual screen is negatively correlated with the target distance.
[0121] As an optional implementation of an embodiment of the present application, the processing unit 102 is specifically used to obtain a target perspective stream identifier based on the line of sight direction; send a perspective stream request carrying the target perspective stream identifier to the server; and receive a perspective stream response carrying the target perspective stream sent by the server.
[0122] As an optional implementation of the embodiment of the present application, the processing unit 102 is specifically configured to obtain the target view flow identifier according to the sight direction and a preset mapping relationship;
[0123] The preset mapping relationship includes each viewing angle stream of the six-degree-of-freedom video and a direction corresponding to each viewing angle stream of the six-degree-of-freedom video.
[0124] The electronic device provided in this embodiment can execute the six-degree-of-freedom video playback method provided in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here.
[0125] Based on the same inventive concept, an embodiment of the present application further provides an electronic device. FIG11 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in FIG11 , the electronic device provided in this embodiment includes: a memory 111 and a processor 112. The memory 111 is used to store a computer program, and the processor 112 is used to execute the six-degree-of-freedom video playback method provided in the above embodiment when executing the computer program.
[0126] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the computing device implements the six-degree-of-freedom video playback method provided in the above embodiment.
[0127] Based on the same inventive concept, an embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computing device implements the six-degree-of-freedom video playback method provided in the above embodiment.
[0128] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0129] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0130] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0131] Computer-readable media includes both permanent and non-permanent, removable and non-removable storage media. Storage media can implement any method or technology for storing information, which can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some or all of the technical features therein, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for playing a six-degree-of-freedom video, characterized in that: include: Acquire a first position and a second position, wherein the first position is a position of a target object in a six-degree-of-freedom video in a virtual three-dimensional space at a moment, and the second position is a viewpoint position of a user in the virtual three-dimensional space at the moment; Acquire a sight line direction of the target object viewed from the viewpoint position according to the first position and the second position; Acquire a target perspective stream corresponding to the sight direction from among multiple perspective streams of the six-degree-of-freedom video; The six-degree-of-freedom video is played in the virtual three-dimensional space based on the target perspective stream.
2. The method according to claim 1, characterized in that The playing of the six-degree-of-freedom video in the virtual three-dimensional space based on the target perspective stream includes: Setting a virtual screen in the virtual three-dimensional space; The video content corresponding to the target perspective stream is played through the virtual screen to play the six-degree-of-freedom video in the virtual three-dimensional space.
3. The method according to claim 2, characterized in that Setting a virtual screen in the virtual three-dimensional space includes: Determining the position and posture of the virtual screen according to the sight line direction and the first position; The virtual screen is set in the virtual three-dimensional space according to the position and posture of the virtual screen.
4. The method according to claim 3, characterized in that The determining the position and posture of the virtual screen according to the sight line direction and the first position includes: It is determined that the virtual screen is located at the first position, and it is determined that the plane where the virtual screen is located is perpendicular to the line of sight direction.
5. The method according to claim 2, characterized in that: The method further comprises: Get the target distance, the target distance is the distance between the first position and the second position The distance between Setting the size of the virtual screen according to the target distance; Wherein, the size of the virtual screen is negatively correlated with the target distance.
6. The method according to claim 1, characterized in that The step of obtaining a target perspective stream corresponding to the sight direction from among the multiple perspective streams of the six-degree-of-freedom video comprises: Acquire a target viewing angle flow identifier according to the viewing direction; Sending a view stream request carrying the target view stream identifier to a server; Receive a view stream response carrying the target view stream sent by the server.
7. The method according to claim 6, characterized in that The step of acquiring a target viewing angle flow identifier according to the viewing direction includes: Acquire the target viewing angle stream identifier according to the viewing direction and a preset mapping relationship; The preset mapping relationship includes each viewing angle stream of the six-degree-of-freedom video and a direction corresponding to each viewing angle stream of the six-degree-of-freedom video.
8. An electronic device, characterized in that: include: An acquisition unit, configured to acquire a first position and a second position, wherein the first position is a position of a target object in a six-degree-of-freedom video in a virtual three-dimensional space at a moment, and the second position is a viewpoint position of a user in the virtual three-dimensional space at the moment; a processing unit, configured to obtain a sight line direction of the target object viewed from the viewpoint position according to the first position and the second position, and obtain a target perspective stream corresponding to the sight line direction from among multiple perspective streams of the six-degree-of-freedom video; A playback unit is used to play the six-degree-of-freedom video in the virtual three-dimensional space based on the target perspective stream.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program and the processor is used to enable the electronic device to implement the six-degree-of-freedom video playback method described in any one of claims 1-7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the method for playing a six-degree-of-freedom video as described in any one of claims 1-7.