WO2018196658A1 - 虚拟现实媒体文件生成方法和装置、存储介质及电子装置 - Google Patents

虚拟现实媒体文件生成方法和装置、存储介质及电子装置 Download PDF

Info

Publication number
WO2018196658A1
WO2018196658A1 PCT/CN2018/083401 CN2018083401W WO2018196658A1 WO 2018196658 A1 WO2018196658 A1 WO 2018196658A1 CN 2018083401 W CN2018083401 W CN 2018083401W WO 2018196658 A1 WO2018196658 A1 WO 2018196658A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
virtual reality
media file
reality media
group
Prior art date
Application number
PCT/CN2018/083401
Other languages
English (en)
French (fr)
Inventor
詹庆丰
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018196658A1 publication Critical patent/WO2018196658A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/97Determining parameters from multiple pictures

Definitions

  • the present application relates to the field of computers, and in particular to a method and device for generating a virtual reality media file, a storage medium, and an electronic device.
  • the media files generated for playing in the related art are often media files obtained by collecting real worlds using physical hardware devices.
  • the media files obtained in this way not only increase the collection cost, but also the generated media files can only view the two-dimensional picture, and the content of the media file is too single.
  • the embodiment of the present application provides a method and device for generating a virtual reality media file, a storage medium, and an electronic device, so as to at least solve the technical problem that the content caused by the failure to generate the virtual reality media file in the related art is too single.
  • a virtual reality media file generation method based on a virtual reality scenario including: acquiring a generation request, wherein the generation request is used to request to generate a virtual reality media file, where the generation request is carried a location reference identifier matching the virtual reality media file; the image group is acquired according to the predetermined policy in response to the generating request, wherein the group of the image groups is used to indicate a reference location indicated by the location reference identifier at a predetermined time in the three-dimensional scene And a plurality of pictures acquired from a plurality of perspectives, each image being at least used to indicate a picture acquired by one view; and generating the virtual reality media file according to the image group.
  • a virtual reality media file generating apparatus based on a virtual reality scenario, including: a first acquiring unit, configured to acquire a generating request, wherein the generating request is used to request to generate a virtual a real-time media file, where the generating request carries a location reference identifier that matches the virtual reality media file, and the second acquiring unit is configured to acquire an image group according to the predetermined policy in response to the generating request, where a group of the image groups is used to indicate a plurality of pictures acquired from the plurality of viewing angles at a predetermined time in the three-dimensional scene at a predetermined time in the reference position indicated by the position reference identifier, each image being at least used to indicate a picture acquired by one viewing angle; and a generating unit configured to The above image group generates the virtual reality media file.
  • a storage medium having a computer program stored therein, wherein the computer program is configured to execute the virtual reality media file generation method described above at runtime.
  • an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the virtual computer by using a computer program Realistic media file generation method.
  • the generation request carries a location reference identifier that matches the virtual reality media file, and acquires a three-dimensional image for presenting the reference location in the three-dimensional scene according to a predetermined policy.
  • a group of images wherein a group of image groups includes a plurality of images acquired from a plurality of viewing angles at a predetermined time to generate a virtual reality media file that can present a three-dimensional effect in the three-dimensional scene, thereby enriching the played media files.
  • the purpose of playing the content is to enable the party playing the virtual reality media file to view the three-dimensional image at the reference position from multiple perspectives, thereby realizing the effect of expanding the content of the played content, thereby solving the problem that the virtual reality media file cannot be generated in the related art.
  • the resulting content is too single a technical issue.
  • FIG. 1 is a schematic diagram of an application environment of an optional virtual reality scene-based virtual reality media file generation method according to an embodiment of the present application
  • FIG. 2 is a flowchart of an optional virtual reality scene-based virtual reality media file generation method according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of an effect of an optional virtual reality scene-based virtual reality media file generating method according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of another optional virtual reality scene-based virtual reality media file generation method according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of still another optional virtual reality scene based virtual reality media file generating method according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of an effect of an optional virtual reality scene-based virtual reality media file generating method according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of still another optional virtual reality scene-based virtual reality media file generating method according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an optional virtual reality scene based virtual reality media file generating apparatus according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an optional virtual reality scene based virtual reality media file generation server according to an embodiment of the present application.
  • an embodiment of a virtual reality media file generation method based on a virtual reality scenario is provided.
  • the virtual reality media file generation method based on the virtual reality scenario may be
  • the application is not limited to the application scenario shown in FIG. 1.
  • the smart device (such as the virtual reality glasses 102 shown in FIG. 1) is installed in the first virtual client, and the server 106 obtains the first client through the network 104.
  • a generating request sent by the terminal wherein the generating request is used to request to generate a virtual reality media file, and the generating request carries a location reference identifier that matches the virtual reality media file;
  • the server 106 acquires the image group according to the predetermined policy in response to the generating request.
  • a set of image groups for indicating a plurality of pictures acquired from the plurality of views at a reference position indicated by the position reference mark at a predetermined time in the three-dimensional scene, wherein each image is used to indicate at least one view Acquiring a picture; then, generating a virtual reality field according to the acquired image group Virtual reality media files under the scene.
  • the generation request carries a location reference identifier that matches the virtual reality media file, and acquires an image group for generating a virtual reality media file according to a predetermined policy, where the group The image group is used to indicate a plurality of pictures acquired from a plurality of viewing angles at a reference position indicated by the position reference identifier at a predetermined time in the three-dimensional scene, each image being at least used to indicate a picture acquired by one viewing angle; A corresponding virtual reality media file is generated using the above image group.
  • acquiring a group of images for presenting a three-dimensional picture at a reference position in the three-dimensional scene wherein the group of image groups includes a plurality of pictures acquired from the plurality of angles at a predetermined time in the three-dimensional scene to generate a rendering
  • the virtual reality media file of the three-dimensional effect in the three-dimensional scene thereby enriching the playing content of the played virtual reality media file, so that the party playing the virtual reality media file can see the three-dimensional image at the reference position from multiple perspectives, and further Achieve the effect of content expansion on virtual reality media files.
  • the foregoing apparatus for applying the virtual reality media file-based virtual reality media file generating method may include, but is not limited to, virtual reality (VR) glasses, and other functions for implementing virtual reality.
  • VR virtual reality
  • a hardware device that interacts with the scene The above is only an example, and the embodiment does not limit this.
  • a virtual reality media file generation method based on a virtual reality scenario is provided. As shown in FIG. 2, the method includes:
  • S204 Acquire a group of images according to a predetermined policy in response to the generation request, where the group of image groups is used to indicate a plurality of images acquired from the plurality of perspectives at the reference position indicated by the location reference identifier at the predetermined time in the three-dimensional scene. Each image is used at least to indicate a picture acquired by one angle of view;
  • the foregoing virtual reality media file generating method may be, but is not limited to, being applied to different applications having virtual reality scenes, and the application may provide three-dimensional picture material.
  • the above applications may include, but are not limited to, a game application, a shopping application, and the like.
  • the virtual reality media file generation method based on the virtual reality scene may be, but is not limited to, being applied to a game application having a virtual reality scene, and collecting a three-dimensional picture material (such as an image group) at a reference position in the three-dimensional scene of the game application, In the process of generating a virtual reality media file that presents a three-dimensional effect, that is, a game video that presents a three-dimensional effect in a three-dimensional scene can be recorded.
  • a game video that presents a three-dimensional effect in a three-dimensional scene can be recorded.
  • the generation request carries a location reference identifier that matches the virtual reality media file, and acquires an image group for generating a virtual reality media file according to a predetermined policy, where
  • the image group is used to indicate a plurality of pictures acquired from a plurality of viewing angles at a reference position indicated by the position reference identifier at a predetermined time in the three-dimensional scene, each image being at least used to indicate a picture acquired by one viewing angle;
  • the above image group generates a corresponding virtual reality media file.
  • acquiring a group of images for presenting a three-dimensional picture at a reference position in the three-dimensional scene wherein the group of image groups includes a plurality of pictures acquired from the plurality of angles at a predetermined time in the three-dimensional scene to generate a rendering
  • the virtual reality media file of the three-dimensional effect in the three-dimensional scene thereby enriching the playing content of the played virtual reality media file, so that the party playing the virtual reality media file can see the three-dimensional image at the reference position from multiple perspectives, and further Achieve the effect of content expansion on virtual reality media files.
  • the generating request may be, but is not limited to, a generating request sent by the first client that uses the first account
  • the requested virtual reality media file may be, but is not limited to, associated with the first account.
  • the location indicated by the location reference identifier matching the virtual reality media file may include, but is not limited to, a location of the virtual character used by the first account in the three-dimensional scene, and a fixed preset location in the three-dimensional scene. The above is only an example, and is not limited in this embodiment.
  • the virtual reality media file may be pushed to the second account, so that the second account plays the virtual reality media file, where
  • the second account and the first account are associated accounts.
  • the second account and the first account are the friend accounts that are in contact with each other, or the authorized account accounts are not limited in this embodiment.
  • the second account may be, but not limited to, a friend account associated with the first account in the application where the first account is located, and the second account is a virtual reality media file that is pushed by playing the first account, where the virtual reality media The file includes different pictures acquired from different perspectives based on the reference position to view the three-dimensional picture in the three-dimensional scene where the first account is located.
  • the application of the first account and the second account may be a game application, so as to realize sharing the virtual reality media file in the application; in addition, in this embodiment, the second account may be, but not limited to, the first The account in which the account is applied is an account in a different application, and the two applications have an association relationship.
  • the application where the first account is located authorizes the application of the second account to play the virtual reality media file.
  • the application where the first account is located may be a game application
  • the application where the second account is located may be a play application, wherein the game application authorizes the play application, allowing the play application to play the generated virtual reality media file, thereby implementing cross-platform shared media. data.
  • the above is only an example, and is not limited in this embodiment.
  • the second client that uses the second account may, but is not limited to, obtain a picture that matches the perspective of the second client from the virtual reality media file for playing. That is to say, the second account is limited by the playback angle, and the screen matching the angle of view will be played. It should be noted that as the viewing angle of the second account is changed, the played picture will change accordingly, and different pictures acquired from different perspectives in the virtual reality media file can be traversed.
  • acquiring the image group according to the predetermined policy by the response generation request includes:
  • the generation request indicates that the generated virtual reality media file is a media stream
  • the image group is acquired in real time according to a predetermined policy.
  • the virtual reality media file may be, but is not limited to, a media data packet.
  • the virtual reality media file may be a pre-generated complete video resource. By acquiring a plurality of sets of image groups in a predetermined time period, the complete video resource is generated by using the plurality of groups of image groups, so that the video resource is acquired by the play request on the playing end to play the generated virtual reality media file.
  • the virtual reality media file may be, but is not limited to, a media stream.
  • the virtual reality media file may be stream data. The media group corresponding to the time is acquired in real time to generate a media stream, so that the generated virtual reality media file is broadcasted in the live broadcast process.
  • the foregoing predetermined policy may include, but is not limited to, at least one of the following:
  • a monocular strategy with the reference position indicated by the reference position identifier as a reference center, constructing a cube relative to the reference center; a picture to be acquired on each surface of the cube as an image in the image group, wherein one of the cubes The surface corresponds to a viewing angle.
  • a reference position is used as a reference center, and the pictures on the six surfaces of the cube constructed with the reference position as the center are used as six images in the image group, thereby realizing based on the above-mentioned image group generation based on the three-dimensional scene Monocular virtual reality media files.
  • each of the plurality of collection points acquires a picture within a predetermined field of view angle as an image in the image group, wherein one of the collection points corresponds to at least one view.
  • the left eye is respectively obtained at each collection point within the predetermined field of view angle range
  • the right eye is respectively in each a picture within a predetermined range of viewing angles acquired at the collection point, and a top image located above the reference circle and a bottom image located below the reference circle as an image in the image group, thereby implementing a based on the image group generated in the three-dimensional scene Binocular virtual reality media files.
  • respectively acquiring, in each of the plurality of collection points, the picture within the predetermined field of view angle range comprises: rotating in a clockwise direction, and the reservation acquired at each collection point a picture within a range of viewing angles, as an image in the first image set; and rotating in a counterclockwise direction, the image within a predetermined range of viewing angles acquired at each of the acquisition points is used as an image in the second image set; An image set and a second image set acquire an image group.
  • the plurality of collection points may be, but not limited to, four collection points uniformly distributed on the reference circle, and the predetermined field of view angle range of each disabled point may be, but not limited to, greater than or equal to 90 degrees. The above is only an example, and the embodiment does not limit this.
  • the following steps are repeatedly performed to obtain all the images in a group of image groups;
  • the angle of view is adjusted to acquire the screen in the next perspective as the next image in the image group.
  • the viewing angle can be automatically switched, to obtain images in different viewing angles as images in the image group, and after all images in a group of image groups are acquired, the image can be pushed to the playing end. Play it.
  • the following steps are repeatedly performed to generate a VR virtual reality media file that can render a three-dimensional effect in a three-dimensional scene:
  • the corresponding input source is a window message, a directx input, or the like. Since the 2D to 3D mapping on the screen is changed when the viewing angle is changed, unexpected behavior occurs in response to mouse and keyboard events generated by mouse and/or keyboard operations. Therefore, in this embodiment, the blocking mask is blocked. A message operated by the user, or a message that does not actively acquire the user's operation during the current period.
  • a single-eye based virtual reality media file will be separately adjusted to obtain a specified location ( For example, the front, right, back, left, up, and down of the reference position, the view screen corresponding to the six angles of view, the angle of view of each view may be, but is not limited to, 90 degrees; or, the virtual reality media file based on both eyes will Adjust to obtain the specified position (such as the reference position), the front direction to the left, the front to the right, the right to the left, the right to the right, the rear to the left, the right to the right, the left to the left, the left to the right, Up and down, the viewing angle of each viewing angle can be, but is not limited to, 100 degrees.
  • the acquired image group will be able to cover the entire 3D world based on the reference position.
  • the set view angle may be, but is not limited to, actively modifying through an interface of directx such as D3DXMatrixLookAtLH, D3DXMatrixPerspectiveFovLH, SetTransform, etc., or the game provides an interface to help modify.
  • 2D content may include: prompt information, chat information, and the like. In this embodiment, it may be, but is not limited to, being masked by the entry of the 2D rendering, or the 2D element is not rendered in the current cycle.
  • a virtual reality media file by using two strategies, wherein the monocular strategy generates a set of six image groups based on a cube to generate a virtual reality media file, binocular
  • the strategy will generate a set of 10 image groups.
  • the squares of the middle portion may be intercepted, and all the figures are combined into one large image. This can also match various resolution issues.
  • a group of 10 image groups can also be converted into two panoramic images for the left eye and the right eye respectively.
  • Virtual reality files can be, but are not limited to, the open source solution ffmpeg.
  • a group of images for presenting a three-dimensional picture at a reference position in a three-dimensional scene is acquired, wherein a group of image groups includes a plurality of pictures acquired from a plurality of viewing angles at a predetermined time, to Generating a virtual reality media file capable of rendering a three-dimensional effect in a three-dimensional scene, thereby enriching the content of the played virtual reality media file, so that the party playing the virtual reality media file can see the three-dimensional position at the reference position from multiple perspectives.
  • the screen in turn, achieves the effect of expanding the content of the virtual reality media file.
  • the acquiring the image group according to the predetermined policy in response to the generation request includes:
  • the reference position is taken as an example of the center position of the cube shown in FIG. 3 , and after constructing the cube with respect to the reference center, the image obtained on each surface of the cube may be, but is not limited to, such as Six images on six surfaces, as six images in a group of images, where one surface of the cube corresponds to one perspective. That is to say, a picture on one surface is used as a picture of one view as an image in the acquired image group.
  • a picture to be acquired on each surface of the cube is realized as an image in the image group to generate a reference position based on
  • the virtual reality media files thus achieve the effect of enriching the file content of the media files.
  • the acquiring the image group according to the predetermined policy in response to the generation request includes:
  • the reference position takes O as the reference center
  • the predetermined distance r is the reference radius
  • obtains the reference circle and uniformly acquires four collection points on the reference circle, as shown in FIG. Point A, collection point B, collection point C, and collection point D, wherein the field of view of each collection point may be, but is not limited to, 90 degrees or more, taking 90 degrees as an example.
  • a picture within a 90 degree field of view is acquired at each of a plurality of collection points. That is to say, the picture acquired by one collection point is taken as the picture of one angle of view as one image in the acquired image group.
  • a 90-degree field of view imaging P1 is obtained. Then move the left eye to point B with O as the center point and look at B' to obtain a 90-degree field of view imaging P2.
  • P1 and P2 to get P P will be the image seen in the process of moving the left eye from point A to point B, then move to point C to see C ⁇ , move to point D and look to D ⁇ , you can get A panoramic image that the left eye rotates 360 degrees.
  • a panoramic image of 360 degrees seen by the right eye can be obtained.
  • the left eye looks at the E' point at point A
  • the right eye looks at the E' point at point B
  • double-eye superimposition three-dimensional imaging of the two eyes in the three-dimensional scene can be obtained. effect.
  • the reference position is taken as the reference center, the predetermined distance is the reference radius, and the reference circle is obtained, thereby realizing the picture acquired by the plurality of collection points on the reference circle as the image in the image group, Achieve more accurate virtual reality media files based on multiple collection points, thereby achieving the effect of enriching the file content of the media files.
  • acquiring a picture within a predetermined range of viewing angles at each of the plurality of collection points includes:
  • acquiring the image group according to the first image set and the second image set includes: performing image fusion processing on two adjacent images of the first image set, and focusing on the second image set Two adjacent two images perform image fusion processing in which the predetermined viewing angle range is 90 degrees or more.
  • the range of the viewing angle can be adjusted from 90 degrees to 100 degrees, and the excessive area can be made smoother based on the image fusion algorithm.
  • acquiring the image group according to the first image set and the second image set includes: combining the images in the first image set into the first panoramic image, and merging the images in the second image set into the first a panoramic image, wherein the image group includes a first panoramic image and a second panoramic image.
  • the first image set is an image acquired based on the left eye
  • the second image set is an image acquired based on the right eye.
  • the present image may be, but is not limited to, be in a server.
  • the images in the first image set are combined to obtain a first panoramic image, as shown in the panoramic image shown in FIG. 6, and the images in the second image set are combined to obtain a second panoramic image, such as the panoramic image shown in FIG.
  • the first panoramic image and the second panoramic image are used as partial images in the image group to generate a virtual reality media file including the three-dimensional image.
  • the left eye views the first panoramic image
  • the right eye views the second panoramic image to achieve more virtual reality media file content that can be acquired in the process of playing the virtual reality media file in the three-dimensional scene.
  • the image group further includes: a top image located above the reference circle and a bottom image located below the reference circle.
  • the four acquisition points on the reference circle are still taken as an example, and the two eyes respectively acquire images on the four collection points as images in the image group, for example, clockwise rotation at four collection points.
  • the view screen as shown on the right side of Figure 7, has a front view, a left view, a rear view, and a right view of the right eye.
  • the top image located above the reference circle and the bottom image located below the reference circle are acquired, thereby obtaining ten images based on both eyes as a group of images.
  • the first image set and the second image set corresponding to the left and right eyes are separately acquired to generate a virtual reality media file based on both eyes, and further by using the first image and the second image set
  • the merge process is merged to make the generated virtual reality media file more accurate and true.
  • the obtaining the generating request includes: acquiring a generating request sent by the first client that uses the first account; after generating the virtual reality media file according to the image group, the method further includes: pushing the virtual reality media file to The second account is used to enable the second account to play the virtual reality media file, wherein the second account and the first account are associated accounts.
  • the method further includes: acquiring, by the second client of the second account, the virtual reality media file; and acquiring, by the second client, the second client from the virtual reality media file The picture with the matching angle of view is played.
  • the second account may be, but not limited to, a friend account associated with the first account in the application where the first account is located, and the second account is a virtual reality media file that is pushed by playing the first account, where the virtual reality media The file includes different pictures acquired from different perspectives based on the reference position to view the three-dimensional picture in the three-dimensional scene where the first account is located.
  • the application of the first account and the second account may be a game application, so as to realize sharing the virtual reality media file in the application; in addition, in this embodiment, the second account may be, but not limited to, the first The account in which the account is applied is an account in a different application, and the two applications have an association relationship.
  • the application where the first account is located authorizes the application of the second account to play the virtual reality media file.
  • the application where the first account is located may be a game application
  • the application where the second account is located may be a play application, wherein the game application authorizes the play application, allowing the play application to play the generated virtual reality media file, thereby implementing cross-platform shared media. data.
  • the above is only an example, and is not limited in this embodiment.
  • the second client that uses the second account may, but is not limited to, obtain a picture that matches the perspective of the second client from the virtual reality media file for playing. That is to say, the second account is limited by the playback angle, and the screen matching the angle of view will be played. It should be noted that as the viewing angle of the second account is changed, the played picture will change accordingly, and different pictures acquired from different perspectives in the virtual reality media file can be traversed.
  • the second account can obtain the virtual reality media file pushed by the first account by using the second client, so as to share the media data, and the second account can view the first through the second client.
  • the virtual reality media files of the account in the 3D scene will attract more users to participate and improve the attention of the application.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present application which is essential or contributes to the related art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM).
  • the instructions include a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present application.
  • a virtual reality scene-based virtual reality media file generating apparatus for implementing the virtual reality scene-based virtual reality media file generating method described above is further provided, as shown in FIG.
  • the device includes:
  • the first obtaining unit 802 is configured to acquire a generating request, where the generating request is used to request to generate a virtual reality media file, where the generating request carries a location reference identifier that matches the virtual reality media file;
  • the second obtaining unit 804 is configured to acquire an image group according to a predetermined policy in response to the generation request, wherein the group of image groups is used to indicate that the reference position indicated by the location reference identifier is at a predetermined time in the three-dimensional scene, from the plurality of a plurality of images acquired by the viewing angle, each image being at least used to indicate a picture acquired by one viewing angle;
  • a generating unit 806 configured to generate a virtual reality media file from the group of images.
  • the virtual reality media file generating apparatus may be, but is not limited to, applied to different applications having virtual reality scenes, and the application may provide three-dimensional picture material.
  • the above applications may include, but are not limited to, a game application, a shopping application, and the like.
  • the virtual reality media file generation method based on the virtual reality scene may be, but is not limited to, being applied to a game application having a virtual reality scene, and collecting a three-dimensional picture material (such as an image group) at a reference position in the three-dimensional scene of the game application, In the process of generating a virtual reality media file that presents a three-dimensional effect, that is, a game video that presents a three-dimensional effect in a three-dimensional scene can be recorded.
  • a game video that presents a three-dimensional effect in a three-dimensional scene can be recorded.
  • the generation request carries a location reference identifier that matches the virtual reality media file, and acquires an image group for generating a virtual reality media file according to a predetermined policy, where
  • the image group is used to indicate a plurality of pictures acquired from a plurality of viewing angles at a reference position indicated by the position reference identifier at a predetermined time in the three-dimensional scene, each image being at least used to indicate a picture acquired by one viewing angle;
  • the above image group generates a corresponding virtual reality media file.
  • acquiring a group of images for presenting a three-dimensional picture at a reference position in the three-dimensional scene wherein the group of image groups includes a plurality of pictures acquired from the plurality of angles at a predetermined time in the three-dimensional scene to generate a rendering
  • the virtual reality media file of the three-dimensional effect in the three-dimensional scene thereby enriching the playing content of the played virtual reality media file, so that the party playing the virtual reality media file can see the three-dimensional image at the reference position from multiple perspectives, and further Achieve the effect of content expansion on virtual reality media files.
  • the generating request may be, but is not limited to, a generating request sent by the first client that uses the first account
  • the requested virtual reality media file may be, but is not limited to, associated with the first account.
  • the location indicated by the location reference identifier matching the virtual reality media file may include, but is not limited to, a location of the virtual character used by the first account in the three-dimensional scene, and a fixed preset location in the three-dimensional scene. The above is only an example, and is not limited in this embodiment.
  • the method further includes: a pushing unit, configured to: after generating the virtual reality media file according to the image group, pushing the virtual reality media file to the second account, so that the second account plays the virtual reality media file
  • a pushing unit configured to: after generating the virtual reality media file according to the image group, pushing the virtual reality media file to the second account, so that the second account plays the virtual reality media file
  • the second account and the first account are associated accounts.
  • the second account and the first account are the friend accounts that are in contact with each other, or the authorized account accounts are not limited in this embodiment.
  • the second account may be, but not limited to, a friend account associated with the first account in the application where the first account is located, and the second account is a virtual reality media file that is pushed by playing the first account, where the virtual reality media The file includes different pictures acquired from different perspectives based on the reference position to view the three-dimensional picture in the three-dimensional scene where the first account is located.
  • the application of the first account and the second account may be a game application, so as to realize sharing the virtual reality media file in the application; in addition, in this embodiment, the second account may be, but not limited to, the first The account in which the account is applied is an account in a different application, and the two applications have an association relationship.
  • the application where the first account is located authorizes the application of the second account to play the virtual reality media file.
  • the application where the first account is located may be a game application
  • the application where the second account is located may be a play application, wherein the game application authorizes the play application, allowing the play application to play the generated virtual reality media file, thereby implementing cross-platform shared media. data.
  • the above is only an example, and is not limited in this embodiment.
  • the second client that uses the second account may, but is not limited to, obtain a picture that matches the perspective of the second client from the virtual reality media file for playing. That is to say, the second account is limited by the playback angle, and the screen matching the angle of view will be played. It should be noted that as the viewing angle of the second account is changed, the played picture will change accordingly, and different pictures acquired from different perspectives in the virtual reality media file can be traversed.
  • acquiring the image group according to the predetermined policy by the response generation request includes:
  • the generation request indicates that the generated virtual reality media file is a media stream
  • the image group is acquired in real time according to a predetermined policy.
  • the virtual reality media file may be, but is not limited to, a media data packet.
  • the virtual reality media file may be a pre-generated complete video resource. By acquiring a plurality of sets of image groups in a predetermined time period, the complete video resource is generated by using the plurality of groups of image groups, so that the video resource is acquired by the play request on the playing end to play the generated virtual reality media file.
  • the virtual reality media file may be, but is not limited to, a media stream.
  • the virtual reality media file may be stream data. The media group corresponding to the time is acquired in real time to generate a media stream, so that the generated virtual reality media file is broadcasted in the live broadcast process.
  • the foregoing predetermined policy may include, but is not limited to, at least one of the following:
  • a monocular strategy with the reference position indicated by the reference position identifier as a reference center, constructing a cube relative to the reference center; a picture to be acquired on each surface of the cube as an image in the image group, wherein one of the cubes The surface corresponds to a viewing angle.
  • a reference position is used as a reference center, and the pictures on the six surfaces of the cube constructed with the reference position as the center are used as six images in the image group, thereby realizing based on the above-mentioned image group generation based on the three-dimensional scene Monocular virtual reality media files.
  • each of the plurality of collection points acquires a picture within a predetermined field of view angle as an image in the image group, wherein one of the collection points corresponds to at least one view.
  • the left eye is respectively obtained at each collection point within the predetermined field of view angle range
  • the right eye is respectively in each a picture within a predetermined range of viewing angles acquired at the collection point, and a top image located above the reference circle and a bottom image located below the reference circle as an image in the image group, thereby implementing a based on the image group generated in the three-dimensional scene Binocular virtual reality media files.
  • respectively acquiring, in each of the plurality of collection points, the picture within the predetermined field of view angle range comprises: rotating in a clockwise direction, and the reservation acquired at each collection point a picture within a range of viewing angles, as an image in the first image set; and rotating in a counterclockwise direction, the image within a predetermined range of viewing angles acquired at each of the acquisition points is used as an image in the second image set; An image set and a second image set acquire an image group.
  • the plurality of collection points may be, but not limited to, four collection points uniformly distributed on the reference circle, and the predetermined field of view angle range of each disabled point may be, but not limited to, greater than or equal to 90 degrees. The above is only an example, and the embodiment does not limit this.
  • the second obtaining unit 804 includes: a processing module, configured to obtain all the images in a group of image groups by repeatedly performing the following steps;
  • the angle of view is adjusted to acquire the screen in the next perspective as the next image in the image group.
  • the viewing angle can be automatically switched, to obtain images in different viewing angles as images in the image group, and after all images in a group of image groups are acquired, the image can be pushed to the playing end. Play it.
  • the following steps are repeatedly performed to generate a VR virtual reality media file that can render a three-dimensional effect in a three-dimensional scene:
  • the corresponding input source is a window message, a directx input, or the like. Since the 2D to 3D mapping on the screen is changed when the viewing angle is changed, unexpected behavior occurs in response to mouse and keyboard events generated by mouse and/or keyboard operations. Therefore, in this embodiment, the blocking mask is blocked. A message operated by the user, or a message that does not actively acquire the user's operation during the current period.
  • a single-eye based virtual reality media file will be separately adjusted to obtain a specified location ( For example, the front, right, back, left, up, and down of the reference position, the view screen corresponding to the six angles of view, the angle of view of each view may be, but is not limited to, 90 degrees; or, the virtual reality media file based on both eyes will Adjust to obtain the specified position (such as the reference position), the front direction to the left, the front to the right, the right to the left, the right to the right, the rear to the left, the rear to the right, the left to the left, the left to the right, Up and down, the viewing angle of each viewing angle can be, but is not limited to, 100 degrees.
  • the acquired image group will be able to cover the entire 3D world based on the reference position.
  • the set view angle may be, but is not limited to, actively modifying through a directx interface such as D3DXMatrixLookAtLH, D3DXMatrixPerspectiveFovLH, SetTransform, etc., or the game provides an interface to help modify.
  • 2D content may include: prompt information, chat information, and the like. In this embodiment, it may be, but is not limited to, being masked by the entry of the 2D rendering, or the 2D element is not rendered in the current cycle.
  • a virtual reality media file by using two strategies, wherein the monocular strategy generates a set of six image groups based on a cube to generate a virtual reality media file, binocular
  • the strategy will generate a set of 10 image groups.
  • the squares of the middle portion may be intercepted, and all the figures are combined into one large image. This can also match various resolution issues.
  • a group of 10 image groups can also be converted into two panoramic images for the left eye and the right eye respectively.
  • Virtual reality files can be, but are not limited to, the open source solution ffmpeg.
  • a group of images for presenting a three-dimensional picture at a reference position in a three-dimensional scene is acquired, wherein a group of image groups includes a plurality of pictures acquired from a plurality of viewing angles at a predetermined time, to Generating a virtual reality media file capable of rendering a three-dimensional effect in a three-dimensional scene, thereby enriching the content of the played virtual reality media file, so that the party playing the virtual reality media file can see the three-dimensional position at the reference position from multiple perspectives.
  • the screen in turn, achieves the effect of expanding the content of the virtual reality media file.
  • the second obtaining unit 804 includes:
  • a first obtaining module configured to acquire a plurality of groups of image groups within a predetermined time period according to a predetermined policy, in a case where the generated request indicates that the generated virtual reality media file is a media data packet, wherein the predetermined time period is The duration is the duration of playback of the virtual reality media file;
  • the second obtaining module is configured to acquire the image group in real time according to a predetermined policy if the generated virtual reality media file generated by the request indication is a media stream.
  • the reference position is taken as an example of the center position of the cube shown in FIG. 3 , and after constructing the cube with respect to the reference center, the image obtained on each surface of the cube may be, but is not limited to, such as Six images on six surfaces, as six images in a group of images, where one surface of the cube corresponds to one perspective. That is to say, a picture on one surface is used as a picture of one view as an image in the acquired image group.
  • a picture to be acquired on each surface of the cube is realized as an image in the image group to generate a reference position based on
  • the virtual reality media files thus achieve the effect of enriching the file content of the media files.
  • the second obtaining unit 804 includes:
  • the third acquisition module is set to take the image acquired on each surface of the cube as an image in the image group, wherein one surface of the cube corresponds to one perspective.
  • the reference position takes O as the reference center
  • the predetermined distance r is the reference radius
  • obtains the reference circle and uniformly acquires four collection points on the reference circle, as shown in FIG. Point A, collection point B, collection point C, and collection point D, wherein the field of view of each collection point may be, but is not limited to, 90 degrees or more, taking 90 degrees as an example.
  • a picture within a 90 degree field of view is acquired at each of a plurality of acquisition points. That is to say, the picture acquired by one collection point is taken as the picture of one angle of view as one image in the acquired image group.
  • a 90-degree field of view imaging P1 is obtained. Then move the left eye to point B with O as the center point and look at B' to obtain a 90-degree field of view imaging P2.
  • P1 and P2 to get P P will be the image seen in the process of moving the left eye from point A to point B, then move to point C to see C ⁇ , move to point D and look to D ⁇ , you can get A panoramic image that the left eye rotates 360 degrees.
  • a panoramic image of 360 degrees seen by the right eye can be obtained.
  • the left eye looks at the E' point at point A
  • the right eye looks at the E' point at point B
  • double-eye superimposition three-dimensional imaging of the two eyes in the three-dimensional scene can be obtained. effect.
  • the reference position is taken as the reference center, the predetermined distance is the reference radius, and the reference circle is obtained, thereby realizing the picture acquired by the plurality of collection points on the reference circle as the image in the image group, Achieve more accurate virtual reality media files based on multiple collection points, thereby achieving the effect of enriching the file content of the media files.
  • the second obtaining unit 804 includes:
  • the fourth obtaining module is set to take the reference position as the reference center, and the predetermined distance is the reference radius to obtain the reference circle;
  • the fifth obtaining module is configured to uniformly acquire a plurality of collecting points on the reference circle, wherein the field of view of the plurality of collecting points covers the 360 degree panoramic view;
  • the sixth obtaining module is configured to respectively acquire a picture within a predetermined field of view angle range at each of the plurality of collection points as an image in the image group, wherein one of the collection points corresponds to at least one viewing angle.
  • the sixth obtaining module includes:
  • the first acquisition sub-module is configured to rotate in a clockwise direction, and the image within the predetermined field of view angle range acquired at each collection point is taken as an image in the first image set; and rotated in a counterclockwise direction, a picture within a predetermined range of viewing angles acquired at each collection point as an image in the second image set;
  • the second acquisition submodule is configured to acquire the image group according to the first image set and the second image set.
  • the second obtaining submodule implements acquiring image groups according to the first image set and the second image set by performing image fusion processing on two adjacent images in the first image set. And performing image fusion processing on two images adjacent to each other in the second image set, wherein the predetermined viewing angle range is greater than or equal to 90 degrees.
  • the range of the viewing angle can be adjusted from 90 degrees to 100 degrees, and the excessive area can be made smoother based on the image fusion algorithm.
  • the second obtaining submodule realizes acquiring the image group according to the first image set and the second image set by combining the images in the first image set into the first panoramic image, and The images in the two image sets are merged into a second panoramic image, wherein the image group includes a first panoramic image and a second panoramic image.
  • the first image set is an image acquired based on the left eye
  • the second image set is an image acquired based on the right eye.
  • the present image may be, but is not limited to, be in a server.
  • the images in the first image set are combined to obtain a first panoramic image, as shown in the panoramic image shown in FIG. 6, and the images in the second image set are combined to obtain a second panoramic image, such as the panoramic image shown in FIG.
  • the first panoramic image and the second panoramic image are used as partial images in the image group to generate a virtual reality media file including the three-dimensional image.
  • the left eye views the first panoramic image
  • the right eye views the second panoramic image to achieve more virtual reality media file content that can be acquired in the process of playing the virtual reality media file in the three-dimensional scene.
  • the image group further includes: a top image located above the reference circle and a bottom image located below the reference circle.
  • the four acquisition points on the reference circle are still taken as an example, and the two eyes respectively acquire images on the four collection points as images in the image group, for example, clockwise rotation at four collection points.
  • the view screen as shown on the right side of Figure 7, has a front view, a left view, a rear view, and a right view of the right eye.
  • the top image located above the reference circle and the bottom image located below the reference circle are acquired, thereby obtaining ten images based on both eyes as a group of images.
  • the first image set and the second image set corresponding to the left and right eyes are separately acquired to generate a virtual reality media file based on both eyes, and further by using the first image and the second image set
  • the merge process is merged to make the generated virtual reality media file more accurate and true.
  • the first obtaining unit includes: a seventh acquiring module, configured to acquire a generating request sent by the first client using the first account; and a pushing unit configured to generate a virtual reality media file according to the image group Thereafter, the virtual reality media file is pushed to the second account to enable the second account to play the virtual reality media file. .
  • the method further includes: acquiring, by the second client of the second account, the virtual reality media file; and acquiring, by the second client, the second client from the virtual reality media file The picture with the matching angle of view is played.
  • the second account may be, but not limited to, a friend account associated with the first account in the application where the first account is located, and the second account is a virtual reality media file that is pushed by playing the first account, where the virtual reality media The file includes different pictures acquired from different perspectives based on the reference position to view the three-dimensional picture in the three-dimensional scene where the first account is located.
  • the application of the first account and the second account may be a game application, so as to realize sharing the virtual reality media file in the application; in addition, in this embodiment, the second account may be, but not limited to, the first The account in which the account is applied is an account in a different application, and the two applications have an association relationship.
  • the application where the first account is located authorizes the application of the second account to play the virtual reality media file.
  • the application where the first account is located may be a game application
  • the application where the second account is located may be a play application, wherein the game application authorizes the play application, allowing the play application to play the generated virtual reality media file, thereby implementing cross-platform shared media. data.
  • the above is only an example, and is not limited in this embodiment.
  • the second client that uses the second account may, but is not limited to, obtain a picture that matches the perspective of the second client from the virtual reality media file for playing. That is to say, the second account is limited by the playback angle, and the screen matching the angle of view will be played. It should be noted that as the viewing angle of the second account is changed, the played picture will change accordingly, and different pictures acquired from different perspectives in the virtual reality media file can be traversed.
  • the second account can obtain the virtual reality media file pushed by the first account by using the second client, so as to share the media data, and the second account can view the first through the second client.
  • the virtual reality media files of the account in the 3D scene will attract more users to participate and improve the attention of the application.
  • an electronic device is further provided, where the electronic device includes: a memory and a processor, the memory stores a computer program, and the processor is configured to execute the virtual reality media file by using the computer program The generation method.
  • the electronic device may be a server for the user to implement the foregoing virtual reality media file generating method.
  • the server includes
  • the communication interface 902 is configured to obtain a generation request, where the generation request is used to request to generate a virtual reality media file, and the generation request carries a location reference identifier that matches the virtual reality media file;
  • the processor 904 is connected to the communication interface 902, and is configured to acquire an image group according to a predetermined policy in response to the generation request, wherein the group of image groups is used to indicate the reference position indicated by the location reference identifier at the predetermined time in the three-dimensional scene. a plurality of pictures acquired from a plurality of perspectives, each image being at least used to indicate a picture acquired by one view; and being further configured to generate a virtual reality media file according to the image group.
  • the memory 906 is connected to the communication interface 902 and the processor 904, and is configured to store an image group and a virtual reality media file.
  • FIG. 9 is only schematic, and the electronic device can also be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, and a mobile Internet device (Mobile). Terminal devices such as Internet Devices, MID) and PAD.
  • FIG. 9 does not limit the structure of the above electronic device.
  • the electronic device may also include more or fewer components (such as a network interface, display device, etc.) than shown in FIG. 9, or have a different configuration than that shown in FIG.
  • the memory 906 can be used to store the software program and the module, such as the virtual reality media file generating method and the program instruction/module corresponding to the device in the embodiment of the present invention, and the processor 904 runs the software program and the module stored in the memory 906. Thereby, various functional applications and data processing are performed, that is, the above-described virtual reality media file generating method is implemented.
  • Memory 906 can include high speed random access memory, and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 906 can further include memory remotely located relative to processor 904, which can be connected to the terminal over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the communication interface 902 described above is for receiving or transmitting data via a network.
  • Specific examples of the above network may include a wired network and a wireless network.
  • communication interface 902 includes a Network Interface Controller (NIC) that can be connected to other network devices and routers via a network cable to communicate with the Internet or a local area network.
  • NIC Network Interface Controller
  • the communication interface 902 is a Radio Frequency (RF) module for communicating with the Internet wirelessly.
  • RF Radio Frequency
  • the memory 906 is configured to store content such as a virtual reality media file and an acquired image group.
  • a storage medium is also provided.
  • the foregoing storage medium may be located in at least one of the plurality of network devices in the network.
  • the storage medium is arranged to store program code for performing the following steps:
  • S1 Acquire a generation request, where the generation request is used to request to generate a virtual reality media file, where the generation request carries a location reference identifier that matches the virtual reality media file;
  • the image generation group is acquired according to a predetermined policy in response to the generation request, wherein the group of image groups is used to indicate a plurality of images acquired from the plurality of perspectives at the reference position indicated by the location reference identifier at the predetermined time in the three-dimensional scene. Each image is used at least to indicate a picture acquired by one angle of view;
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the integrated unit in the above embodiment if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in the above-described computer readable storage medium.
  • the technical solution of the present application may be embodied in the form of a software product, or the whole or part of the technical solution, which is stored in the storage medium, including
  • the instructions are used to cause one or more computer devices (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
  • the disclosed client may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, unit or module, and may be electrical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the generation request carries a location reference identifier that matches the virtual reality media file, and acquires a three-dimensional image for presenting the reference location in the three-dimensional scene according to a predetermined policy.
  • a group of images wherein a group of image groups includes a plurality of images acquired from a plurality of viewing angles at a predetermined time to generate a virtual reality media file that can present a three-dimensional effect in the three-dimensional scene, thereby enriching the played media files.
  • the purpose of playing the content is to enable the party playing the virtual reality media file to view the three-dimensional image at the reference position from multiple perspectives, thereby realizing the effect of expanding the content of the played content, thereby solving the problem that the virtual reality media file cannot be generated in the related art.
  • the resulting content is too single a technical issue.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本申请公开了一种虚拟现实媒体文件生成方法和装置、存储介质及电子装置。其中,该方法包括:获取生成请求,其中,生成请求用于请求生成虚拟现实媒体文件,生成请求中携带有与虚拟现实媒体文件匹配的位置参考标识;响应生成请求按照预定策略获取图像组,其中,一组图像组用于指示三维场景中在预定时刻在位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;根据图像组生成虚拟现实媒体文件。本申请解决了相关技术中无法生成虚拟现实媒体文件所导致的内容过于单一的技术问题。

Description

虚拟现实媒体文件生成方法和装置、存储介质及电子装置
本申请要求于2017年4月27日提交中国专利局、优先权号为2017102889235、申请名称为“虚拟现实媒体文件生成方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机领域,具体而言,涉及一种虚拟现实媒体文件生成方法和装置、存储介质及电子装置。
背景技术
目前,相关技术中所生成的用于播放的媒体文件,往往是使用物理硬件设备采集真实世界而得到的媒体文件。
然而,通过这种方式得到的媒体文件,不仅使得采集成本增加,而且所生成的媒体文件仍然只能观看到二维画面,媒体文件的内容过于单一。
针对上述的问题,目前尚未提出有效的解决方案。
发明内容
本申请实施例提供了一种虚拟现实媒体文件生成方法和装置、存储介质及电子装置,以至少解决相关技术中无法生成虚拟现实媒体文件所导致的内容过于单一的技术问题。
根据本申请实施例的一个方面,提供了一种基于虚拟现实场景的虚拟现实媒体文件生成方法,包括:获取生成请求,其中,上述生成请求用于请求生成虚拟现实媒体文件,上述生成请求中携带有与上述虚拟现实媒体文件匹配的位置参考标识;响应上述生成请求按照预定策略获取图像组,其中,一组上述图像组用于指示三维场景中在预定时刻在上述位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用 于指示一个视角获取到的一个画面;根据上述图像组生成上述虚拟现实媒体文件。
根据本申请实施例的另一方面,还提供了一种基于虚拟现实场景的虚拟现实媒体文件生成装置,包括:第一获取单元,设置为获取生成请求,其中,上述生成请求用于请求生成虚拟现实媒体文件,上述生成请求中携带有与上述虚拟现实媒体文件匹配的位置参考标识;第二获取单元,设置为响应上述生成请求按照预定策略获取图像组,其中,一组上述图像组用于指示三维场景中在预定时刻在上述位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;生成单元,设置为根据上述图像组生成上述虚拟现实媒体文件。
根据本申请的实施例的又一方面,还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述虚拟现实媒体文件生成方法。
根据本申请实施例的又一方面,还提供了一种电子装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,上述处理器通过计算机程序执行上述虚拟现实媒体文件生成方法。
在本申请实施例中,在获取到生成请求后,其中,生成请求中携带有与虚拟现实媒体文件匹配的位置参考标识,按照预定策略获取用于呈现三维场景中在参考位置上的三维画面的图像组,其中,一组图像组中包括在预定时刻从多个视角获取到的多个画面,以生成可以呈现三维场景中三维效果的虚拟现实媒体文件,从而达到丰富所播放的媒体文件的播放内容的目的,使得播放虚拟现实媒体文件的一方可以从多个视角看到参考位置上的三维画面,实现对播放内容进行内容扩展的效果,进而解决了相关技术中无法生成虚拟现实媒体文件所导致的内容过于单一的技术问题。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一 部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是根据本申请实施例的一种可选的基于虚拟现实场景的虚拟现实媒体文件生成方法的应用环境示意图;
图2是根据本申请实施例的一种可选的基于虚拟现实场景的虚拟现实媒体文件生成方法的流程图;
图3是根据本申请实施例的一种可选的基于虚拟现实场景的虚拟现实媒体文件生成方法的效果示意图;
图4是根据本申请实施例的另一种可选的基于虚拟现实场景的虚拟现实媒体文件生成方法的示意图;
图5是根据本申请实施例的又一种可选的基于虚拟现实场景的虚拟现实媒体文件生成方法的示意图;
图6是根据本申请实施例的一种可选的基于虚拟现实场景的虚拟现实媒体文件生成方法的效果示意图;
图7是根据本申请实施例的又一种可选的基于虚拟现实场景的虚拟现实媒体文件生成方法的示意图;
图8是根据本申请实施例的一种可选的基于虚拟现实场景的虚拟现实媒体文件生成装置的示意图;
图9是根据本申请实施例的一种可选的基于虚拟现实场景的虚拟现实媒体文件生成服务器的示意图。
具体实施方式
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动 前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
根据本申请实施例的一个方面,提供了一种基于虚拟现实场景的虚拟现实媒体文件生成方法的实施例,作为一种可选的实施方式,该基于虚拟现实场景的虚拟现实媒体文件生成方法可以但不限于应用于如图1所示的应用场景,应用于虚拟现实场景的智能设备(如图1所示虚拟现实眼镜102)中安装有第一客户端,服务器106通过网络104获取第一客户端发送的生成请求,其中,该生成请求用于请求生成虚拟现实媒体文件,且该生成请求中携带有与虚拟现实媒体文件匹配的位置参考标识;服务器106响应上述生成请求按照预定策略获取图像组,其中,一组图像组用于指示三维场景中在预定时刻在位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,其中,每张图像至少用于指示一个视角获取到的一个画面;然后,根据获取到上述图像组生成虚拟现实场景下的虚拟现实媒体文件。
在本实施例中,在获取到生成请求后,其中,生成请求中携带有与虚拟现实媒体文件匹配的位置参考标识,按照预定策略获取用于生成虚拟现实媒体文件的图像组,其中,一组该图像组用于指示三维场景中在预定时刻在位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;从而利用上述图像组生成对应的虚拟现实媒体文件。也就是说,获取三维场景中的参考位置上用于呈现三维画面的图像组,其中,一组图像组中包括三维场景中在预定 时刻从多个视角获取到的多个画面,以生成呈现三维场景中三维效果的虚拟现实媒体文件,从而达到丰富所播放的虚拟现实媒体文件的播放内容的目的,使得播放虚拟现实媒体文件的一方可以从多个视角看到参考位置上的三维画面,进而实现对虚拟现实媒体文件进行内容扩展的效果。
可选地,在本实施例中,上述应用于基于虚拟现实场景的虚拟现实媒体文件生成方法的设备可以包括但不限于:虚拟现实(Virtual Reality,简称VR)眼镜,及其他用于实现虚拟现实场景交互的硬件设备。上述只是一种示例,本实施例对此不做任何限定。
根据本申请实施例,提供了一种基于虚拟现实场景的虚拟现实媒体文件生成方法,如图2所示,该方法包括:
S202,获取生成请求,其中,生成请求用于请求生成虚拟现实媒体文件,生成请求中携带有与虚拟现实媒体文件匹配的位置参考标识;
S204,响应生成请求按照预定策略获取图像组,其中,一组图像组用于指示三维场景中在预定时刻在位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;
S206,根据图像组生成虚拟现实媒体文件。
可选地,在本实施例中,上述虚拟现实媒体文件生成方法可以但不限于应用于不同具备虚拟现实场景的应用中,且该应用可以提供三维画面素材。例如,上述应用可以包括但不限于:游戏应用、购物应用等。例如,上述基于虚拟现实场景的虚拟现实媒体文件生成方法可以但不限于应用于具有虚拟现实场景的游戏应用中,采集游戏应用的三维场景中参考位置上的三维画面素材(如图像组),以生成呈现三维效果的虚拟现实媒体文件的过程中,也就是说,可以录制三维场景中呈现三维效果的游戏视频)。上述仅是一种示例,本实施例中对此不做任何限定。
需要说明的是,在获取到生成请求后,其中,生成请求中携带有与虚 拟现实媒体文件匹配的位置参考标识,按照预定策略获取用于生成虚拟现实媒体文件的图像组,其中,一组该图像组用于指示三维场景中在预定时刻在位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;从而利用上述图像组生成对应的虚拟现实媒体文件。也就是说,获取三维场景中的参考位置上用于呈现三维画面的图像组,其中,一组图像组中包括三维场景中在预定时刻从多个视角获取到的多个画面,以生成呈现三维场景中三维效果的虚拟现实媒体文件,从而达到丰富所播放的虚拟现实媒体文件的播放内容的目的,使得播放虚拟现实媒体文件的一方可以从多个视角看到参考位置上的三维画面,进而实现对虚拟现实媒体文件进行内容扩展的效果。
可选地,在本实施例中,上述生成请求可以但不限于为使用第一账号的第一客户端发送的生成请求,所请求的虚拟现实媒体文件可以但不限于与第一账号具有关联关系,例如,上述与虚拟现实媒体文件匹配的位置参考标识所指示的位置可以包括但不限于:三维场景中第一账号所使用的虚拟人物角色所在的位置、三维场景中的固定预设位置。上述仅是一种示例,本实施例中对此不做任何限定。
可选地,在本实施例中,在根据图像组生成虚拟现实媒体文件之后,可以但不限于将虚拟现实媒体文件推送给第二账号,以使第二账号播放虚拟现实媒体文件,其中,第二账号与第一账号为关联账号。例如,第二账号与第一账号为互相关注的好友账号,或者具有授权的关联账号,本实施例中对此不做任何限定。
需要说明的是,上述第二账号可以但不限于为第一账号所在应用中与第一账号关联的好友账号,第二账号通过播放第一账号推送的虚拟现实媒体文件,其中,该虚拟现实媒体文件中包括基于参考位置上,从不同视角获取到的不同画面,以观看第一账号所在三维场景中的三维画面。举例来说,第一账号与第二账号所在应用可以为游戏应用,从而实现在应用内共享虚拟现实媒体文件;此外,在本实施例中,上述第二账号也可以但不限 于为与第一账号所在应用不同的应用中的账号,两种应用具有关联关系,例如,第一账号所在应用授权第二账号所在应用播放上述虚拟现实媒体文件。举例来说,第一账号所在应用可以为游戏应用,第二账号所在应用可以为播放应用,其中,游戏应用授权播放应用,允许播放应用播放所生成的虚拟现实媒体文件,从而实现跨平台共享媒体数据。上述仅是一种示例,本实施例中对此不做任何限定。
可选地,在本实施例中,使用第二账号的第二客户端可以但不限于从虚拟现实媒体文件中获取与第二客户端的视角相匹配的画面进行播放。也就是说,第二账号受播放视角所限,将播放与视角相匹配的画面。需要说明的是,随着第二账号播放视角的改变,所播放的画面会随之变化,可以实现遍历虚拟现实媒体文件中从不同视角获取到的不同画面。
可选地,在本实施例中,响应生成请求按照预定策略获取图像组包括:
1)在生成请求指示所生成的虚拟现实媒体文件为媒体数据包的情况下,按照预定策略获取在预定时间段内的多组图像组,其中,预定时间段的时长为虚拟现实媒体文件的播放时长;和/或
2)在生成请求指示所生成的虚拟现实媒体文件为媒体流的情况下,按照预定策略实时获取图像组。
需要说明的是,在本实施例中,上述虚拟现实媒体文件可以但不限于为媒体数据包,例如,上述虚拟现实媒体文件可以为预先生成的完整的视频资源。通过获取预定时间段内的多组图像组,以利用上述多组图像组生成完整的视频资源,从而实现在播放端通过播放请求获取该视频资源,以播放上述所生成的虚拟现实媒体文件;此外,在本实施例中,上述虚拟现实媒体文件也可以但不限于为媒体流,例如,上述虚拟现实媒体文件可以为流数据。通过实时获取对应时刻的图像组,以生成媒体流,从而实现在直播过程中直播上述所生成的虚拟现实媒体文件。
可选地,在本实施例中,上述预定策略可以包括但不限于以下至少之 一:
1)单眼策略,以上述参考位置标识所指示的参考位置为参考中心,相对参考中心构建立方体;将在立方体的每个表面上获取到的画面,作为图像组中的图像,其中,立方体的一个表面对应一个视角。
也就是说,将一个参考位置作为参考中心,将以该参考位置为中心构建的立方体的六个表面上的画面,作为图像组中的六张图像,从而实现基于上述图像组生成三维场景中基于单眼的虚拟现实媒体文件。
2)双眼策略,以上述参考位置标识所指示的参考位置为参考圆心,预定距离为参考半径,获取参考圆;在参考圆上均匀获取多个采集点,其中,多个采集点的视野范围覆盖360度全景;在多个采集点中的每个采集点上分别获取预定视野角度范围内的画面,作为图像组中的图像,其中,一个采集点至少对应一个视角。
也就是说,以参考圆上的采集点作为左眼和右眼两个眼睛的参考,将左眼分别在每个采集点上获取到的预定视野角度范围内的画面,与右眼分别在每个采集点上获取到的预定视野角度范围内的画面,以及位于参考圆上方的顶图像及位于参考圆下方的底图像,作为图像组中的图像,从而实现基于上述图像组生成三维场景中基于双眼的虚拟现实媒体文件。
可选地,在本实施例中,在多个采集点中的每个采集点上分别获取预定视野角度范围内的画面包括:按顺时针方向旋转,将在每个采集点上获取到的预定视野角度范围内的画面,作为第一图像集中的图像;并按逆时针方向旋转,将在每个采集点上获取到的预定视野角度范围内的画面,作为第二图像集中的图像;根据第一图像集和第二图像集获取图像组。其中,上述多个采集点可以但不限于为参考圆上均匀分布的四个采集点,每个残疾点的预定视野角度范围可以但不限于大于等于90度。上述仅是一种示例,本实施例对此不做任何限定。
可选地,在本实施例中,通过重复执行以下步骤,以获取一组图像组 中的全部图像;
S12,获取当前视角中的画面作为图像组中的一张图像;
S14,判断是否获取到图像组中的全部图像;
S16,在未获取到图像组中的全部图像的情况下,调整视角,以获取下一个视角中的画面作为图像组中的下一张图像。
需要说明的是,在本实施例中可以但不限于自动切换视角,以获取不同视角上的画面作为图像组中的图像,在获取一组图像组中的全部图像后,可以推送至播放端进行播放。
具体结合以下示例进行说明,重复执行以下步骤,以生成可以呈现三维场景中三维效果的VR虚拟现实媒体文件:
(1)获取鼠标和/或键盘操作,屏蔽鼠标和/或键盘操作所生成的鼠标键盘事件。例如,对应输入源为窗口消息、directx input等。由于视角改变时,屏幕上2D到3D的映射被改变了,这个时候响应鼠标和/或键盘操作所生成的鼠标键盘事件,会发生非预期的行为,因而,在本实施例中,将拦截屏蔽用户操作的消息、或者在当前周期里主动不获取用户操作的消息。
(2)修改调整视角。根据当前策略是需要生成基于单眼的虚拟现实媒体文件,还是基于双眼的虚拟现实媒体文件,在当前周期里必须不断的修改当前视角,例如,基于单眼的虚拟现实媒体文件将分别调整获取指定位置(如参考位置)的前、右、后、左、上、下,六个视角对应的视图画面,每个视角的视野角度分别可以但不限于为90度;或者,基于双眼的虚拟现实媒体文件将分别调整获取指定位置(如参考位置)前方向左看、前方向右看、右方向左看、右方向右看、后方向左看、后方向右看、左方向左看、左方向右看、上、下,每个视角的视野角度可以但不限于为100度。这样,获取到的图像组将可以覆盖基于参考位置的整个3D世界的画面。找到设置视角的地方,在本实施例中,可以但不限于主动通过directx 的接口如D3DXMatrixLookAtLH、D3DXMatrixPerspectiveFovLH、SetTransform等进行修改,或者游戏提供接口帮助修改。
(3)屏蔽2D内容的绘制。其中,2D内容可能会包括:提示信息、聊天信息等等。在本实施例中,可以但不限于通过2D渲染的入口进行屏蔽,或者在当前周期里不渲染2D元素。
(4)获取游戏3D部分对应投影成的2D图像,不渲染到屏幕。在调用类似directx EndScene接口之后就可以生成对应的2D图像,通过类似lock接口就可以把图像数据取出来。但这些画面不显示到屏幕上,通过屏蔽Present等方法可以做到。
(5)在本实施例中可以但不限于采用两种策略获取用于生成虚拟现实媒体文件,其中,单眼策略将生成基于立方体的一组六张的图像组,以生成虚拟现实媒体文件,双眼策略将生成一组10张的图像组。在本实施例中,可以但不限于截取中间部分的正方形,再将所有的图拼成一张大图。以此也可以匹配各种分辨率问题。其中,一组10张的图像组还可以但不限于转换融合成2张分别用于左眼和右眼观看的全景图像。
(6)将图像组发送到视频编码器里,生成对应的视频帧,进而得到最终所要播放的虚拟现实文件。虚拟现实文件可以但不限于采用开源解决方案ffmpeg。
通过本申请提供的实施例,获取用于呈现三维场景中在参考位置上的三维画面的图像组,其中,一组图像组中包括在预定时刻从多个视角获取到的多个画面,以生成三维场景中可以呈现三维效果的虚拟现实媒体文件,从而达到丰富所播放的虚拟现实媒体文件的播放内容的目的,使得播放虚拟现实媒体文件的一方可以从多个视角看到参考位置上的三维画面,进而实现对虚拟现实媒体文件进行内容扩展的效果。
作为一种可选的方案,响应生成请求按照预定策略获取图像组包括:
S1,以参考位置为参考中心,相对参考中心构建立方体;
S2,将在立方体的每个表面上获取到的画面,作为图像组中的图像,其中,立方体的一个表面对应一个视角。
具体结合图3所示进行说明,例如,参考位置以图3所示立方体中心位置为例,相对该参考中心构建立方体之后,可以但不限于将在立方体的每个表面上获取到的画面,如六个表面上的六个画面,作为图像组中的六张图像,其中,立方体的一个表面对应一个视角。也就是说,将一个表面上的画面作为一个视角的画面,作为获取到的图像组中的一张图像。
通过本申请提供的实施例,通过以参考位置为参考中心,相对参考中心构建立方体,从而实现将在立方体的每个表面上获取到的画面,作为图像组中的图像,以生成基于一个参考位置的虚拟现实媒体文件,从而达到丰富媒体文件的文件内容的效果。
作为一种可选的方案,响应生成请求按照预定策略获取图像组包括:
S1,以参考位置为参考圆心,预定距离为参考半径,获取参考圆;
S2,在参考圆上均匀获取多个采集点,其中,多个采集点的视野范围覆盖360度全景;
S3,在多个采集点中的每个采集点上分别获取预定视野角度范围内的画面,作为图像组中的图像,其中,一个采集点至少对应一个视角。
具体结合图4所示进行说明,假设参考位置以O为参考圆心,预定距离r为参考半径,获取参考圆,并在参考圆上均匀获取四个采集点,如图4所示,分别为采集点A、采集点B、采集点C及采集点D,其中每个采集点的视野范围可以但不限于为大于等于90度,以90度为例。在多个采集点中的每个采集点上分别获取90度视野范围内的画面。也就是说,将一个采集点采集的画面作为一个视角的画面,作为获取到的图像组中的一张图像。
例如,假定左眼在A点上,看向A’,得到一个90度的视野成像P1。然后以O为中心点移动左眼到B点上,看向B’,得到一个90度的视野 成像P2。合并P1和P2得到P,P将作为左眼从A点移动到B点这个过程中看到的图像,然后,移动至C点看向C`,移动至D点看向D`,就可以得到一张左眼旋转360度看到的全景图像。进一步,以A、B、C、D逆时针方向取图,可以得到右眼的360度看到的全景图像。
例如,以图5所示为例,左眼在A点上看向E’点,右眼在B点上看向E’点,通过双眼叠加观看,则可以得到双眼在三维场景中的三维成像效果。
通过本申请提供的实施例,通以参考位置为参考圆心,预定距离为参考半径,获取参考圆,从而实现将在参考圆上多个采集点获取到的画面,作为图像组中的图像,以实现基于多个采集点生成更加准确的虚拟现实媒体文件,从而达到丰富媒体文件的文件内容的效果。
作为一种可选的方案,在多个采集点中的每个采集点上分别获取预定视野角度范围内的画面包括:
S1,按顺时针方向旋转,将在每个采集点上获取到的预定视野角度范围内的画面,作为第一图像集中的图像;并按逆时针方向旋转,将在每个采集点上获取到的预定视野角度范围内的画面,作为第二图像集中的图像;
S2,根据第一图像集和第二图像集获取图像组。
可选地,在本实施例中,根据第一图像集和第二图像集获取图像组包括:对第一图像集中两两相邻的两张图像执行图像融合处理,并对第二图像集中两两相邻的两张图像执行图像融合处理,其中,预定视野角度范围为大于等于90度。
需要说明的是,在A看向A’,B看向B’的图像时,因为是在不同位置看的成像,实际贴合的时候,两两相邻的两张图像将会存在一点的误差。为了减小误差,在本实施例中,可以但不限于将视野角度范围从90度调整到100度,并基于图像融合算法可以把过度区域做的更平滑。
可选地,在本实施例中,根据第一图像集和第二图像集获取图像组包 括:将第一图像集中的图像合并为第一全景图像,并将第二图像集中的图像合并为第二全景图像,其中,图像组包括第一全景图像及第二全景图像。
具体结合图6所示进行说明,假设第一图像集为基于左眼采集到的图像,第二图像集为基于右眼采集到的图像,在本实施例中,可以但不限于在服务器中将第一图像集中的图像合并得到第一全景图像,如图6上方所示全景图像,将第二图像集中的图像合并得到第二全景图像,如图6下方所示全景图像。将上述第一全景图像及第二全景图像作为图像组中的部分图像,以生成包含三维画面的虚拟现实媒体文件。从而实现在成像过程中,左眼观看第一全景图像,右眼观看第二全景图像,以达到在三维场景中播放虚拟现实媒体文件的过程中,可以获取的更多虚拟现实媒体文件内容。
可选地,在本实施例中,图像组还包括:位于参考圆上方的顶图像及位于参考圆下方的底图像。
具体结合图7所示进行说明,假设仍以在参考圆上的四个采集点为例,双眼分别在四个采集点获取画面作为图像组中的图像,例如,在四个采集点顺时针旋转,以获取左眼的四个视图画面,如图7左侧所示,左眼的前视图、左视图、后视图及右视图;在四个采集点逆时针旋转,以获取右眼的四个视图画面,如图7右侧所示,右眼的前视图、左视图、后视图及右视图。进一步,再获取位于参考圆上方的顶图像及位于参考圆下方的底图像,从而实现获取基于双眼的十张图像作为一组图像组。
通过本申请提供的实施例,通过分别获取与左右眼对应的第一图像集和第二图像集,以生成基于双眼的虚拟现实媒体文件,并通过对第一图像和第二图像集进行进一步的融合合并处理,以使得所生成的虚拟现实媒体文件更加准确真实。
作为一种可选的方案,上述获取生成请求包括:获取使用第一账号的第一客户端发送的生成请求;在根据图像组生成虚拟现实媒体文件之后,还包括:将虚拟现实媒体文件推送给第二账号,以使第二账号播放虚拟现实媒体文件,其中,第二账号与第一账号为关联账号。
可选地,在将虚拟现实媒体文件推送给第二账号之后,还包括:使用第二账号的第二客户端获取虚拟现实媒体文件;第二客户端从虚拟现实媒体文件中获取与第二客户端的视角相匹配的画面进行播放。
需要说明的是,上述第二账号可以但不限于为第一账号所在应用中与第一账号关联的好友账号,第二账号通过播放第一账号推送的虚拟现实媒体文件,其中,该虚拟现实媒体文件中包括基于参考位置上,从不同视角获取到的不同画面,以观看第一账号所在三维场景中的三维画面。举例来说,第一账号与第二账号所在应用可以为游戏应用,从而实现在应用内共享虚拟现实媒体文件;此外,在本实施例中,上述第二账号也可以但不限于为与第一账号所在应用不同的应用中的账号,两种应用具有关联关系,例如,第一账号所在应用授权第二账号所在应用播放上述虚拟现实媒体文件。举例来说,第一账号所在应用可以为游戏应用,第二账号所在应用可以为播放应用,其中,游戏应用授权播放应用,允许播放应用播放所生成的虚拟现实媒体文件,从而实现跨平台共享媒体数据。上述仅是一种示例,本实施例中对此不做任何限定。
可选地,在本实施例中,使用第二账号的第二客户端可以但不限于从虚拟现实媒体文件中获取与第二客户端的视角相匹配的画面进行播放。也就是说,第二账号受播放视角所限,将播放与视角相匹配的画面。需要说明的是,随着第二账号播放视角的改变,所播放的画面会随之变化,可以实现遍历虚拟现实媒体文件中从不同视角获取到的不同画面。
通过本申请提供的实施例,第二账号可以通过第二客户端获取第一账号推送的虚拟现实媒体文件,从而实现媒体数据的共享,此外,第二账号通过第二客户端可以观看到第一账号在三维场景中的虚拟现实媒体文件,将吸引更多的用户参与,提高了应用的关注度。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序 或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
根据本申请实施例的另一方面,还提供了一种用于实施上述的基于虚拟现实场景的虚拟现实媒体文件生成方法的基于虚拟现实场景的虚拟现实媒体文件生成装置,如图8所示,该装置包括:
1)第一获取单元802,设置为获取生成请求,其中,生成请求用于请求生成虚拟现实媒体文件,生成请求中携带有与虚拟现实媒体文件匹配的位置参考标识;
2)第二获取单元804,设置为响应生成请求按照预定策略获取图像组,其中,一组图像组用于指示三维场景中在预定时刻在位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;
3)生成单元806,设置为根据图像组生成虚拟现实媒体文件。
可选地,在本实施例中,上述虚拟现实媒体文件生成装置可以但不限于应用于不同具备虚拟现实场景的应用中,且该应用可以提供三维画面素材。例如,上述应用可以包括但不限于:游戏应用、购物应用等。例如,上述基于虚拟现实场景的虚拟现实媒体文件生成方法可以但不限于应用 于具有虚拟现实场景的游戏应用中,采集游戏应用的三维场景中参考位置上的三维画面素材(如图像组),以生成呈现三维效果的虚拟现实媒体文件的过程中,也就是说,可以录制三维场景中呈现三维效果的游戏视频)。上述仅是一种示例,本实施例中对此不做任何限定。
需要说明的是,在获取到生成请求后,其中,生成请求中携带有与虚拟现实媒体文件匹配的位置参考标识,按照预定策略获取用于生成虚拟现实媒体文件的图像组,其中,一组该图像组用于指示三维场景中在预定时刻在位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;从而利用上述图像组生成对应的虚拟现实媒体文件。也就是说,获取三维场景中的参考位置上用于呈现三维画面的图像组,其中,一组图像组中包括三维场景中在预定时刻从多个视角获取到的多个画面,以生成呈现三维场景中三维效果的虚拟现实媒体文件,从而达到丰富所播放的虚拟现实媒体文件的播放内容的目的,使得播放虚拟现实媒体文件的一方可以从多个视角看到参考位置上的三维画面,进而实现对虚拟现实媒体文件进行内容扩展的效果。
可选地,在本实施例中,上述生成请求可以但不限于为使用第一账号的第一客户端发送的生成请求,所请求的虚拟现实媒体文件可以但不限于与第一账号具有关联关系,例如,上述与虚拟现实媒体文件匹配的位置参考标识所指示的位置可以包括但不限于:三维场景中第一账号所使用的虚拟人物角色所在的位置、三维场景中的固定预设位置。上述仅是一种示例,本实施例中对此不做任何限定。
可选地,在本实施例中,还包括:推送单元,设置为在根据图像组生成虚拟现实媒体文件之后,将虚拟现实媒体文件推送给第二账号,以使第二账号播放虚拟现实媒体文件,其中,第二账号与第一账号为关联账号。例如,第二账号与第一账号为互相关注的好友账号,或者具有授权的关联账号,本实施例中对此不做任何限定。
需要说明的是,上述第二账号可以但不限于为第一账号所在应用中与 第一账号关联的好友账号,第二账号通过播放第一账号推送的虚拟现实媒体文件,其中,该虚拟现实媒体文件中包括基于参考位置上,从不同视角获取到的不同画面,以观看第一账号所在三维场景中的三维画面。举例来说,第一账号与第二账号所在应用可以为游戏应用,从而实现在应用内共享虚拟现实媒体文件;此外,在本实施例中,上述第二账号也可以但不限于为与第一账号所在应用不同的应用中的账号,两种应用具有关联关系,例如,第一账号所在应用授权第二账号所在应用播放上述虚拟现实媒体文件。举例来说,第一账号所在应用可以为游戏应用,第二账号所在应用可以为播放应用,其中,游戏应用授权播放应用,允许播放应用播放所生成的虚拟现实媒体文件,从而实现跨平台共享媒体数据。上述仅是一种示例,本实施例中对此不做任何限定。
可选地,在本实施例中,使用第二账号的第二客户端可以但不限于从虚拟现实媒体文件中获取与第二客户端的视角相匹配的画面进行播放。也就是说,第二账号受播放视角所限,将播放与视角相匹配的画面。需要说明的是,随着第二账号播放视角的改变,所播放的画面会随之变化,可以实现遍历虚拟现实媒体文件中从不同视角获取到的不同画面。
可选地,在本实施例中,响应生成请求按照预定策略获取图像组包括:
1)在生成请求指示所生成的虚拟现实媒体文件为媒体数据包的情况下,按照预定策略获取在预定时间段内的多组图像组,其中,预定时间段的时长为虚拟现实媒体文件的播放时长;和/或
2)在生成请求指示所生成的虚拟现实媒体文件为媒体流的情况下,按照预定策略实时获取图像组。
需要说明的是,在本实施例中,上述虚拟现实媒体文件可以但不限于为媒体数据包,例如,上述虚拟现实媒体文件可以为预先生成的完整的视频资源。通过获取预定时间段内的多组图像组,以利用上述多组图像组生成完整的视频资源,从而实现在播放端通过播放请求获取该视频资源,以播放上述所生成的虚拟现实媒体文件;此外,在本实施例中,上述虚拟现 实媒体文件也可以但不限于为媒体流,例如,上述虚拟现实媒体文件可以为流数据。通过实时获取对应时刻的图像组,以生成媒体流,从而实现在直播过程中直播上述所生成的虚拟现实媒体文件。
可选地,在本实施例中,上述预定策略可以包括但不限于以下至少之一:
1)单眼策略,以上述参考位置标识所指示的参考位置为参考中心,相对参考中心构建立方体;将在立方体的每个表面上获取到的画面,作为图像组中的图像,其中,立方体的一个表面对应一个视角。
也就是说,将一个参考位置作为参考中心,将以该参考位置为中心构建的立方体的六个表面上的画面,作为图像组中的六张图像,从而实现基于上述图像组生成三维场景中基于单眼的虚拟现实媒体文件。
2)双眼策略,以上述参考位置标识所指示的参考位置为参考圆心,预定距离为参考半径,获取参考圆;在参考圆上均匀获取多个采集点,其中,多个采集点的视野范围覆盖360度全景;在多个采集点中的每个采集点上分别获取预定视野角度范围内的画面,作为图像组中的图像,其中,一个采集点至少对应一个视角。
也就是说,以参考圆上的采集点作为左眼和右眼两个眼睛的参考,将左眼分别在每个采集点上获取到的预定视野角度范围内的画面,与右眼分别在每个采集点上获取到的预定视野角度范围内的画面,以及位于参考圆上方的顶图像及位于参考圆下方的底图像,作为图像组中的图像,从而实现基于上述图像组生成三维场景中基于双眼的虚拟现实媒体文件。
可选地,在本实施例中,在多个采集点中的每个采集点上分别获取预定视野角度范围内的画面包括:按顺时针方向旋转,将在每个采集点上获取到的预定视野角度范围内的画面,作为第一图像集中的图像;并按逆时针方向旋转,将在每个采集点上获取到的预定视野角度范围内的画面,作为第二图像集中的图像;根据第一图像集和第二图像集获取图像组。其中, 上述多个采集点可以但不限于为参考圆上均匀分布的四个采集点,每个残疾点的预定视野角度范围可以但不限于大于等于90度。上述仅是一种示例,本实施例对此不做任何限定。
可选地,在本实施例中,第二获取单元804包括:处理模块,设置为通过重复执行以下步骤,以获取一组图像组中的全部图像;
S1,获取当前视角中的画面作为图像组中的一张图像;
S2,判断是否获取到图像组中的全部图像;
S3,在未获取到图像组中的全部图像的情况下,调整视角,以获取下一个视角中的画面作为图像组中的下一张图像。
需要说明的是,在本实施例中可以但不限于自动切换视角,以获取不同视角上的画面作为图像组中的图像,在获取一组图像组中的全部图像后,可以推送至播放端进行播放。
具体结合以下示例进行说明,重复执行以下步骤,以生成可以呈现三维场景中三维效果的VR虚拟现实媒体文件:
(1)获取鼠标和/或键盘操作,屏蔽鼠标和/或键盘操作所生成的鼠标键盘事件。例如,对应输入源为窗口消息、directx input等。由于视角改变时,屏幕上2D到3D的映射被改变了,这个时候响应鼠标和/或键盘操作所生成的鼠标键盘事件,会发生非预期的行为,因而,在本实施例中,将拦截屏蔽用户操作的消息、或者在当前周期里主动不获取用户操作的消息。
(2)修改调整视角。根据当前策略是需要生成基于单眼的虚拟现实媒体文件,还是基于双眼的虚拟现实媒体文件,在当前周期里必须不断的修改当前视角,例如,基于单眼的虚拟现实媒体文件将分别调整获取指定位置(如参考位置)的前、右、后、左、上、下,六个视角对应的视图画面,每个视角的视野角度分别可以但不限于为90度;或者,基于双眼的虚拟现实媒体文件将分别调整获取指定位置(如参考位置)前方向左看、 前方向右看、右方向左看、右方向右看、后方向左看、后方向右看、左方向左看、左方向右看、上、下,每个视角的视野角度可以但不限于为100度。这样,获取到的图像组将可以覆盖基于参考位置的整个3D世界的画面。找到设置视角的地方,在本实施例中,可以但不限于主动通过directx的接口如D3DXMatrixLookAtLH、D3DXMatrixPerspectiveFovLH、SetTransform等进行修改,或者游戏提供接口帮助修改。
(3)屏蔽2D内容的绘制。其中,2D内容可能会包括:提示信息、聊天信息等等。在本实施例中,可以但不限于通过2D渲染的入口进行屏蔽,或者在当前周期里不渲染2D元素。
(4)获取游戏3D部分对应投影成的2D图像,不渲染到屏幕。在调用类似directx EndScene接口之后就可以生成对应的2D图像,通过类似lock接口就可以把图像数据取出来。但这些画面不显示到屏幕上,通过屏蔽Present等方法可以做到。
(5)在本实施例中可以但不限于采用两种策略获取用于生成虚拟现实媒体文件,其中,单眼策略将生成基于立方体的一组六张的图像组,以生成虚拟现实媒体文件,双眼策略将生成一组10张的图像组。在本实施例中,可以但不限于截取中间部分的正方形,再将所有的图拼成一张大图。以此也可以匹配各种分辨率问题。其中,一组10张的图像组还可以但不限于转换融合成2张分别用于左眼和右眼观看的全景图像。
(6)将图像组发送到视频编码器里,生成对应的视频帧,进而得到最终所要播放的虚拟现实文件。虚拟现实文件可以但不限于采用开源解决方案ffmpeg。
通过本申请提供的实施例,获取用于呈现三维场景中在参考位置上的三维画面的图像组,其中,一组图像组中包括在预定时刻从多个视角获取到的多个画面,以生成三维场景中可以呈现三维效果的虚拟现实媒体文件,从而达到丰富所播放的虚拟现实媒体文件的播放内容的目的,使得播放虚拟现实媒体文件的一方可以从多个视角看到参考位置上的三维画面,进而 实现对虚拟现实媒体文件进行内容扩展的效果。
作为一种可选的方案,第二获取单元804包括:
1)第一获取模块,设置为在生成请求指示所生成的虚拟现实媒体文件为媒体数据包的情况下,按照预定策略获取在预定时间段内的多组图像组,其中,预定时间段的时长为虚拟现实媒体文件的播放时长;和/或
2)第二获取模块,设置为在生成请求指示所生成的虚拟现实媒体文件为媒体流的情况下,按照预定策略实时获取图像组。
具体结合图3所示进行说明,例如,参考位置以图3所示立方体中心位置为例,相对该参考中心构建立方体之后,可以但不限于将在立方体的每个表面上获取到的画面,如六个表面上的六个画面,作为图像组中的六张图像,其中,立方体的一个表面对应一个视角。也就是说,将一个表面上的画面作为一个视角的画面,作为获取到的图像组中的一张图像。
通过本申请提供的实施例,通过以参考位置为参考中心,相对参考中心构建立方体,从而实现将在立方体的每个表面上获取到的画面,作为图像组中的图像,以生成基于一个参考位置的虚拟现实媒体文件,从而达到丰富媒体文件的文件内容的效果。
作为一种可选的方案,第二获取单元804包括:
1)构建模块,设置为以参考位置为参考中心,相对参考中心构建立方体;
2)第三获取模块,设置为将在立方体的每个表面上获取到的画面,作为图像组中的图像,其中,立方体的一个表面对应一个视角。
具体结合图4所示进行说明,假设参考位置以O为参考圆心,预定距离r为参考半径,获取参考圆,并在参考圆上均匀获取四个采集点,如图4所示,分别为采集点A、采集点B、采集点C及采集点D,其中每个采集点的视野范围可以但不限于为大于等于90度,以90度为例。在多个采 集点中的每个采集点上分别获取90度视野范围内的画面。也就是说,将一个采集点采集的画面作为一个视角的画面,作为获取到的图像组中的一张图像。
例如,假定左眼在A点上,看向A’,得到一个90度的视野成像P1。然后以O为中心点移动左眼到B点上,看向B’,得到一个90度的视野成像P2。合并P1和P2得到P,P将作为左眼从A点移动到B点这个过程中看到的图像,然后,移动至C点看向C`,移动至D点看向D`,就可以得到一张左眼旋转360度看到的全景图像。进一步,以A、B、C、D逆时针方向取图,可以得到右眼的360度看到的全景图像。
例如,以图5所示为例,左眼在A点上看向E’点,右眼在B点上看向E’点,通过双眼叠加观看,则可以得到双眼在三维场景中的三维成像效果。
通过本申请提供的实施例,通以参考位置为参考圆心,预定距离为参考半径,获取参考圆,从而实现将在参考圆上多个采集点获取到的画面,作为图像组中的图像,以实现基于多个采集点生成更加准确的虚拟现实媒体文件,从而达到丰富媒体文件的文件内容的效果。
作为一种可选的方案,第二获取单元804包括:
1)第四获取模块,设置为以参考位置为参考圆心,预定距离为参考半径,获取参考圆;
2)第五获取模块,设置为在参考圆上均匀获取多个采集点,其中,多个采集点的视野范围覆盖360度全景;
3)第六获取模块,设置为在多个采集点中的每个采集点上分别获取预定视野角度范围内的画面,作为图像组中的图像,其中,一个采集点至少对应一个视角。
可选地,在本实施例中,第六获取模块包括:
(1)第一获取子模块,设置为按顺时针方向旋转,将在每个采集点上获取到的预定视野角度范围内的画面,作为第一图像集中的图像;并按逆时针方向旋转,将在每个采集点上获取到的预定视野角度范围内的画面,作为第二图像集中的图像;
(2)第二获取子模块,设置为根据第一图像集和第二图像集获取图像组。
可选地,在本实施例中,第二获取子模块通过以下步骤实现根据第一图像集和第二图像集获取图像组:对第一图像集中两两相邻的两张图像执行图像融合处理,并对第二图像集中两两相邻的两张图像执行图像融合处理,其中,预定视野角度范围为大于等于90度。
需要说明的是,在A看向A’,B看向B’的图像时,因为是在不同位置看的成像,实际贴合的时候,两两相邻的两张图像将会存在一点的误差。为了减小误差,在本实施例中,可以但不限于将视野角度范围从90度调整到100度,并基于图像融合算法可以把过度区域做的更平滑。
可选地,在本实施例中,第二获取子模块通过以下步骤实现根据第一图像集和第二图像集获取图像组:将第一图像集中的图像合并为第一全景图像,并将第二图像集中的图像合并为第二全景图像,其中,图像组包括第一全景图像及第二全景图像。
具体结合图6所示进行说明,假设第一图像集为基于左眼采集到的图像,第二图像集为基于右眼采集到的图像,在本实施例中,可以但不限于在服务器中将第一图像集中的图像合并得到第一全景图像,如图6上方所示全景图像,将第二图像集中的图像合并得到第二全景图像,如图6下方所示全景图像。将上述第一全景图像及第二全景图像作为图像组中的部分图像,以生成包含三维画面的虚拟现实媒体文件。从而实现在成像过程中,左眼观看第一全景图像,右眼观看第二全景图像,以达到在三维场景中播放虚拟现实媒体文件的过程中,可以获取的更多虚拟现实媒体文件内容。
可选地,在本实施例中,图像组还包括:位于参考圆上方的顶图像及位于参考圆下方的底图像。
具体结合图7所示进行说明,假设仍以在参考圆上的四个采集点为例,双眼分别在四个采集点获取画面作为图像组中的图像,例如,在四个采集点顺时针旋转,以获取左眼的四个视图画面,如图7左侧所示,左眼的前视图、左视图、后视图及右视图;在四个采集点逆时针旋转,以获取右眼的四个视图画面,如图7右侧所示,右眼的前视图、左视图、后视图及右视图。进一步,再获取位于参考圆上方的顶图像及位于参考圆下方的底图像,从而实现获取基于双眼的十张图像作为一组图像组。
通过本申请提供的实施例,通过分别获取与左右眼对应的第一图像集和第二图像集,以生成基于双眼的虚拟现实媒体文件,并通过对第一图像和第二图像集进行进一步的融合合并处理,以使得所生成的虚拟现实媒体文件更加准确真实。
作为一种可选的方案,第一获取单元包括:第七获取模块,设置为获取使用第一账号的第一客户端发送的生成请求;推送单元,设置为在根据图像组生成虚拟现实媒体文件之后,将虚拟现实媒体文件推送给第二账号,以使第二账号播放虚拟现实媒体文件。。
可选地,在将虚拟现实媒体文件推送给第二账号之后,还包括:使用第二账号的第二客户端获取虚拟现实媒体文件;第二客户端从虚拟现实媒体文件中获取与第二客户端的视角相匹配的画面进行播放。
需要说明的是,上述第二账号可以但不限于为第一账号所在应用中与第一账号关联的好友账号,第二账号通过播放第一账号推送的虚拟现实媒体文件,其中,该虚拟现实媒体文件中包括基于参考位置上,从不同视角获取到的不同画面,以观看第一账号所在三维场景中的三维画面。举例来说,第一账号与第二账号所在应用可以为游戏应用,从而实现在应用内共享虚拟现实媒体文件;此外,在本实施例中,上述第二账号也可以但不限于为与第一账号所在应用不同的应用中的账号,两种应用具有关联关系, 例如,第一账号所在应用授权第二账号所在应用播放上述虚拟现实媒体文件。举例来说,第一账号所在应用可以为游戏应用,第二账号所在应用可以为播放应用,其中,游戏应用授权播放应用,允许播放应用播放所生成的虚拟现实媒体文件,从而实现跨平台共享媒体数据。上述仅是一种示例,本实施例中对此不做任何限定。
可选地,在本实施例中,使用第二账号的第二客户端可以但不限于从虚拟现实媒体文件中获取与第二客户端的视角相匹配的画面进行播放。也就是说,第二账号受播放视角所限,将播放与视角相匹配的画面。需要说明的是,随着第二账号播放视角的改变,所播放的画面会随之变化,可以实现遍历虚拟现实媒体文件中从不同视角获取到的不同画面。
通过本申请提供的实施例,第二账号可以通过第二客户端获取第一账号推送的虚拟现实媒体文件,从而实现媒体数据的共享,此外,第二账号通过第二客户端可以观看到第一账号在三维场景中的虚拟现实媒体文件,将吸引更多的用户参与,提高了应用的关注度。
根据本申请实施例的又一方面,还提供了一种电子装置,其中该电子装置包括:存储器和处理器,存储器存储有计算机程序,处理器被设置为通过计算机程序执行上述的虚拟现实媒体文件生成方法。例如,电子装置可以为用户实现上述虚拟现实媒体文件生成方法的服务器,作为一种可选的实施方式,如图9所示,该服务器包括
1)通讯接口902,设置为获取生成请求,其中,生成请求用于请求生成虚拟现实媒体文件,生成请求中携带有与虚拟现实媒体文件匹配的位置参考标识;
2)处理器904,与通讯接口902连接,设置为响应生成请求按照预定策略获取图像组,其中,一组图像组用于指示三维场景中在预定时刻在位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图 像至少用于指示一个视角获取到的一个画面;还设置为根据图像组生成虚拟现实媒体文件。
3)存储器906,与通讯接口902、处理器904连接,设置为存储图像组及虚拟现实媒体文件。
可选地,本领域普通技术人员可以理解,图9所示的结构仅为示意,电子装置也可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile Internet Devices,MID)、PAD等终端设备。图9其并不对上述电子装置的结构造成限定。例如,电子装置还可包括比图9中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图9所示不同的配置。
其中,存储器906可用于存储软件程序以及模块,如本发明实施例中的虚拟现实媒体文件生成方法与装置对应的程序指令/模块,处理器904通过运行存储在存储器906内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的虚拟现实媒体文件生成方法。存储器906可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器906可进一步包括相对于处理器904远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
上述的通讯接口902用于经由一个网络接收或者发送数据。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,通讯接口902包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,通讯接口902为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
其中,具体地,存储器906用于存储虚拟现实媒体文件与获取的图像组等内容。
根据本申请的实施例的又一方面,还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以位于网络中的多个网络设备中的至少一个网络设备。
可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:
S1,获取生成请求,其中,生成请求用于请求生成虚拟现实媒体文件,生成请求中携带有与虚拟现实媒体文件匹配的位置参考标识;
S2,响应生成请求按照预定策略获取图像组,其中,一组图像组用于指示三维场景中在预定时刻在位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;
S3,根据图像组生成虚拟现实媒体文件。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,本实施例中的具体示例可以参考上述实施例1和实施例2中所描述的示例,本实施例在此不再赘述。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算 机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。
在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
以上所述仅是本申请的可选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。
工业实用性
在本申请实施例中,在获取到生成请求后,其中,生成请求中携带有 与虚拟现实媒体文件匹配的位置参考标识,按照预定策略获取用于呈现三维场景中在参考位置上的三维画面的图像组,其中,一组图像组中包括在预定时刻从多个视角获取到的多个画面,以生成可以呈现三维场景中三维效果的虚拟现实媒体文件,从而达到丰富所播放的媒体文件的播放内容的目的,使得播放虚拟现实媒体文件的一方可以从多个视角看到参考位置上的三维画面,实现对播放内容进行内容扩展的效果,进而解决了相关技术中无法生成虚拟现实媒体文件所导致的内容过于单一的技术问题。

Claims (21)

  1. 一种虚拟现实媒体文件生成方法,包括:
    获取生成请求,其中,所述生成请求用于请求生成虚拟现实媒体文件,所述生成请求中携带有与所述虚拟现实媒体文件匹配的位置参考标识;
    响应所述生成请求按照预定策略获取图像组,其中,一组所述图像组用于指示三维场景中在预定时刻在所述位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;
    根据所述图像组生成所述虚拟现实媒体文件。
  2. 根据权利要求1所述的方法,其中,所述响应所述生成请求按照预定策略获取图像组包括:
    在所述生成请求指示所生成的所述虚拟现实媒体文件为媒体数据包的情况下,按照所述预定策略获取在预定时间段内的多组所述图像组,其中,所述预定时间段的时长为所述虚拟现实媒体文件的播放时长;和/或
    在所述生成请求指示所生成的所述虚拟现实媒体文件为媒体流的情况下,按照所述预定策略实时获取所述图像组。
  3. 根据权利要求1所述的方法,其中,所述响应所述生成请求按照预定策略获取图像组包括:
    以所述参考位置为参考中心,相对所述参考中心构建立方体;
    将在所述立方体的每个表面上获取到的画面,作为所述图像组中的图像,其中,所述立方体的一个表面对应一个视角。
  4. 根据权利要求1所述的方法,其中,所述响应所述生成请求按照预定策略获取图像组包括:
    以所述参考位置为参考圆心,预定距离为参考半径,获取参考圆;
    在所述参考圆上均匀获取多个采集点,其中,所述多个采集点的视野范围覆盖360度全景;
    在所述多个采集点中的每个采集点上分别获取预定视野角度范围内的画面,作为所述图像组中的图像,其中,一个采集点至少对应一个视角。
  5. 根据权利要求4所述的方法,其中,所述在所述多个采集点中的每个采集点上分别获取预定视野角度范围内的画面包括:
    按顺时针方向旋转,将在每个所述采集点上获取到的预定视野角度范围内的画面,作为第一图像集中的图像;并按逆时针方向旋转,将在每个所述采集点上获取到的所述预定视野角度范围内的画面,作为第二图像集中的图像;
    根据所述第一图像集和所述第二图像集获取所述图像组。
  6. 根据权利要求5所述的方法,其中,所述根据所述第一图像集和所述第二图像集获取所述图像组包括:
    对所述第一图像集中两两相邻的两张图像执行图像融合处理,并对所述第二图像集中两两相邻的两张图像执行图像融合处理,其中,所述预定视野角度范围为大于等于90度。
  7. 根据权利要求5所述的方法,其中,所述根据所述第一图像集和所述第二图像集获取所述图像组包括:
    将所述第一图像集中的图像合并为第一全景图像,并将所述第二图像集中的图像合并为第二全景图像,其中,所述图像组包括所述第一全景图像及所述第二全景图像。
  8. 根据权利要求4至7中任一项所述的方法,其中,所述图像组还包括:位于所述参考圆上方的顶图像及位于所述参考圆下方的底图像。
  9. 根据权利要求1所述的方法,其中,所述响应所述生成请求按照预定策略获取图像组包括:
    通过重复执行以下步骤,以获取一组所述图像组中的全部图像;
    获取当前视角中的画面作为所述图像组中的一张图像;
    判断是否获取到所述图像组中的全部图像;
    在未获取到所述图像组中的全部图像的情况下,调整视角,以获取下一个视角中的画面作为所述图像组中的下一张图像。
  10. 根据权利要求1所述的方法,其中,
    所述获取生成请求包括:获取使用第一账号的第一客户端发送的所述生成请求;
    在所述根据所述图像组生成所述虚拟现实媒体文件之后,还包括:将所述虚拟现实媒体文件推送给第二账号,以使所述第二账号播放所述虚拟现实媒体文件。
  11. 一种虚拟现实媒体文件生成装置,包括:
    第一获取单元,设置为获取生成请求,其中,所述生成请求用于请求生成虚拟现实媒体文件,所述生成请求中携带有与所述虚拟现实媒体文件匹配的位置参考标识;
    第二获取单元,设置为响应所述生成请求按照预定策略获取图像组,其中,一组所述图像组用于指示三维场景中在预定时刻在所述位置参考标识所指示的参考位置上,从多个视角获取到的多个画面,每张图像至少用于指示一个视角获取到的一个画面;
    生成单元,设置为根据所述图像组生成所述虚拟现实媒体文件。
  12. 根据权利要求11所述的装置,其中,所述第二获取单元包括:
    第一获取模块,设置为在所述生成请求指示所生成的所述虚拟现实媒体文件为媒体数据包的情况下,按照所述预定策略获取在预定时间段内的多组所述图像组,其中,所述预定时间段的时长为所述虚拟现实媒体文件的播放时长;和/或
    第二获取模块,设置为在所述生成请求指示所生成的所述虚拟现实媒体文件为媒体流的情况下,按照所述预定策略实时获取所述图像 组。
  13. 根据权利要求11所述的装置,其中,所述第二获取单元包括:
    构建模块,设置为以所述参考位置为参考中心,相对所述参考中心构建立方体;
    第三获取模块,设置为将在所述立方体的每个表面上获取到的画面,作为所述图像组中的图像,其中,所述立方体的一个表面对应一个视角。
  14. 根据权利要求11所述的装置,其中,所述第二获取单元包括:
    第四获取模块,设置为以所述参考位置为参考圆心,预定距离为参考半径,获取参考圆;
    第五获取模块,设置为在所述参考圆上均匀获取多个采集点,其中,所述多个采集点的视野范围覆盖360度全景;
    第六获取模块,设置为在所述多个采集点中的每个采集点上分别获取预定视野角度范围内的画面,作为所述图像组中的图像,其中,一个采集点至少对应一个视角。
  15. 根据权利要求14所述的装置,其中,所述第六获取模块包括:
    第一获取子模块,设置为按顺时针方向旋转,将在每个所述采集点上获取到的预定视野角度范围内的画面,作为第一图像集中的图像;并按逆时针方向旋转,将在每个所述采集点上获取到的所述预定视野角度范围内的画面,作为第二图像集中的图像;
    第二获取子模块,设置为根据所述第一图像集和所述第二图像集获取所述图像组。
  16. 根据权利要求15所述的装置,其中,所述第二获取子模块通过以下步骤实现根据所述第一图像集和所述第二图像集获取所述图像组:
    对所述第一图像集中两两相邻的两张图像执行图像融合处理,并对所述第二图像集中两两相邻的两张图像执行图像融合处理,其中, 所述预定视野角度范围为大于等于90度。
  17. 根据权利要求15所述的装置,其中,所述第二获取子模块通过以下步骤实现根据所述第一图像集和所述第二图像集获取所述图像组:
    将所述第一图像集中的图像合并为第一全景图像,并将所述第二图像集中的图像合并为第二全景图像,其中,所述图像组包括所述第一全景图像及所述第二全景图像。
  18. 根据权利要求11所述的装置,其中,所述第二获取单元包括:
    处理模块,设置为通过重复执行以下步骤,以获取一组所述图像组中的全部图像;
    获取当前视角中的画面作为所述图像组中的一张图像;
    判断是否获取到所述图像组中的全部图像;
    在未获取到所述图像组中的全部图像的情况下,调整视角,以获取下一个视角中的画面作为所述图像组中的下一张图像。
  19. 根据权利要求11所述的装置,其中,还包括:
    所述第一获取单元包括:第七获取模块,设置为获取使用第一账号的第一客户端发送的所述生成请求;
    推送单元,设置为在所述根据所述图像组生成所述虚拟现实媒体文件之后,将所述虚拟现实媒体文件推送给第二账号,以使所述第二账号播放所述虚拟现实媒体文件。
  20. 一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至10任一项中所述的方法。
  21. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至10任一项中所述的方法。
PCT/CN2018/083401 2017-04-27 2018-04-17 虚拟现实媒体文件生成方法和装置、存储介质及电子装置 WO2018196658A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710288923.5A CN107103645B (zh) 2017-04-27 2017-04-27 虚拟现实媒体文件生成方法及装置
CN201710288923.5 2017-04-27

Publications (1)

Publication Number Publication Date
WO2018196658A1 true WO2018196658A1 (zh) 2018-11-01

Family

ID=59656694

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/083401 WO2018196658A1 (zh) 2017-04-27 2018-04-17 虚拟现实媒体文件生成方法和装置、存储介质及电子装置

Country Status (2)

Country Link
CN (1) CN107103645B (zh)
WO (1) WO2018196658A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654737A (zh) * 2020-06-24 2020-09-11 西安诺瓦星云科技股份有限公司 节目同步管理方法和装置

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103645B (zh) * 2017-04-27 2018-07-20 腾讯科技(深圳)有限公司 虚拟现实媒体文件生成方法及装置
CN109587203A (zh) 2017-09-29 2019-04-05 索尼公司 信息处理设备和方法、电子装置以及计算机可读介质
CN108419090A (zh) * 2017-12-27 2018-08-17 广东鸿威国际会展集团有限公司 三维直播流展示系统和方法
CN108364353A (zh) * 2017-12-27 2018-08-03 广东鸿威国际会展集团有限公司 引导观看者观看场景的三维直播流的系统和方法
WO2020181065A1 (en) 2019-03-07 2020-09-10 Alibaba Group Holding Limited Method, apparatus, medium, terminal, and device for processing multi-angle free-perspective data
CN111669569A (zh) * 2019-03-07 2020-09-15 阿里巴巴集团控股有限公司 一种视频生成方法及装置、介质、终端
CN111080759B (zh) * 2019-12-03 2022-12-27 深圳市商汤科技有限公司 一种分镜效果的实现方法、装置及相关产品

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102884490A (zh) * 2010-03-05 2013-01-16 索尼电脑娱乐美国公司 在共享的稳定虚拟空间上维持多视图
CN104935829A (zh) * 2015-06-02 2015-09-23 无锡天脉聚源传媒科技有限公司 一种图像处理方法及装置
CN205622734U (zh) * 2016-04-27 2016-10-05 深圳看到科技有限公司 摄像头组合及相应的全景图像采集装置
US20160344999A1 (en) * 2013-12-13 2016-11-24 8702209 Canada Inc. SYSTEMS AND METHODs FOR PRODUCING PANORAMIC AND STEREOSCOPIC VIDEOS
CN106412555A (zh) * 2016-10-18 2017-02-15 网易(杭州)网络有限公司 游戏录制方法、装置及虚拟现实设备
CN107103645A (zh) * 2017-04-27 2017-08-29 腾讯科技(深圳)有限公司 虚拟现实媒体文件生成方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150312561A1 (en) * 2011-12-06 2015-10-29 Microsoft Technology Licensing, Llc Virtual 3d monitor
CN105487660A (zh) * 2015-11-25 2016-04-13 北京理工大学 基于虚拟现实技术的沉浸式舞台表演交互方法及系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102884490A (zh) * 2010-03-05 2013-01-16 索尼电脑娱乐美国公司 在共享的稳定虚拟空间上维持多视图
US20160344999A1 (en) * 2013-12-13 2016-11-24 8702209 Canada Inc. SYSTEMS AND METHODs FOR PRODUCING PANORAMIC AND STEREOSCOPIC VIDEOS
CN104935829A (zh) * 2015-06-02 2015-09-23 无锡天脉聚源传媒科技有限公司 一种图像处理方法及装置
CN205622734U (zh) * 2016-04-27 2016-10-05 深圳看到科技有限公司 摄像头组合及相应的全景图像采集装置
CN106412555A (zh) * 2016-10-18 2017-02-15 网易(杭州)网络有限公司 游戏录制方法、装置及虚拟现实设备
CN107103645A (zh) * 2017-04-27 2017-08-29 腾讯科技(深圳)有限公司 虚拟现实媒体文件生成方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654737A (zh) * 2020-06-24 2020-09-11 西安诺瓦星云科技股份有限公司 节目同步管理方法和装置

Also Published As

Publication number Publication date
CN107103645A (zh) 2017-08-29
CN107103645B (zh) 2018-07-20

Similar Documents

Publication Publication Date Title
WO2018196658A1 (zh) 虚拟现实媒体文件生成方法和装置、存储介质及电子装置
US11108972B2 (en) Virtual three dimensional video creation and management system and method
CN109874021B (zh) 直播互动方法、装置及系统
Lin et al. Seamless video stitching from hand‐held camera inputs
EP3206398B1 (en) Stereoscopic camera device
US10430558B2 (en) Methods and systems for controlling access to virtual reality media content
US8867886B2 (en) Surround video playback
CN108479060B (zh) 一种显示控制方法及电子设备
US9998664B1 (en) Methods and systems for non-concentric spherical projection for multi-resolution view
US20130129304A1 (en) Variable 3-d surround video playback with virtual panning and smooth transition
JP2022177053A (ja) 情報処理システム、情報処理方法、および情報処理プログラム
CN107205122A (zh) 多分辨率全景视频直播拍照系统与方法
JP2016537903A (ja) バーチャルリアリティコンテンツのつなぎ合わせおよび認識
WO2022199260A1 (zh) 静态对象的立体显示方法、装置、介质及电子设备
KR101739220B1 (ko) 게임 플레이 상황에 대한 특수 영상 생성 시스템
EP3631602A1 (en) Methods and systems for customizing virtual reality data
WO2019080792A1 (zh) 全景视频图像的播放方法、装置、存储介质及电子装置
KR20130039522A (ko) 입체 파노라마 영상을 생성하는 장치 및 방법
US20150326847A1 (en) Method and system for capturing a 3d image using single camera
JP7423974B2 (ja) 情報処理システム、情報処理方法及びプログラム
WO2020093862A1 (zh) 一种vr视频处理的方法及相关装置
KR102105510B1 (ko) 타임 슬라이스 영상을 제공하는 서버, 방법 및 사용자 단말
WO2020019201A1 (zh) 拍摄图像的方法及移动平台
CN114143460A (zh) 视频显示方法、装置及电子设备
TW201125358A (en) Multi-viewpoints interactive television system and method.

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18791579

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18791579

Country of ref document: EP

Kind code of ref document: A1