Summary of the invention
For defect present in prior art, present invention solves the technical problem that into: on internet video live broadcasting platform
The panoramic video of 3D effect is provided;When the user using the present invention watches panoramic video, viewing scene is abundanter, Consumer's Experience
Preferably.
For reaching object above, the method watching 3D panoramic video on internet video live broadcasting platform that the present invention provides,
Comprise the following steps:
Step A, in the panorama player of terminal unit create 3D model, the video data of yuv format is uploaded to 3D
In model, form the texture of panoramic video;Three dimensional coordinate space is created, at three-dimensional coordinate in the panorama player of terminal unit
Space creates the 3D visual angle ball of 2 textures being mapped with panoramic video, after being overlapped by 2 3D visual angle balls, keeps 1 3D visual angle
The angle of ball is constant, rotates the angle of another 1 3D visual angle ball;Forward step B to;
Step B, in three dimensional coordinate space add 3D photographic head, the taking lens of 3D photographic head is placed in step B weight
The middle part of the 3D visual angle ball after conjunction, forwards step C to;
Step C, by 3D visual angle balls different in step B 2 visual angles, render to 2 pieces of display window of panorama player
Deng subregion, the corresponding 1 piece of region of each 3D visual angle ball.
What the present invention provided realizes the system watching 3D panoramic video on internet video live broadcasting platform of said method, bag
Include 3D visual angle ball creation module, 3D photographic head creation module and the display window rendering module being positioned in terminal unit;
3D visual angle ball creation module is used for: creates 3D model in panorama player, is uploaded by the video data of yuv format
To 3D model, form the texture of panoramic video;Three dimensional coordinate space is created, in three-dimensional in the panorama player of terminal unit
Coordinate space creates the 3D visual angle ball of 2 textures being mapped with panoramic video, after being overlapped by 2 3D visual angle balls, keeps 1 3D
The angle of visual angle ball is constant, rotates the angle of another 1 3D visual angle ball;
3D photographic head creation module is used for: add 3D photographic head in three dimensional coordinate space, by the shooting mirror of 3D photographic head
Head is placed in the middle part of the 3D visual angle ball after coincidence;
Display window rendering module is used for: by 3D visual angle balls different for 2 visual angles, render to the display window of panorama player
The subregions such as 2 pieces of mouth, the corresponding 1 piece of region of each 3D visual angle ball.
Compared with prior art, it is an advantage of the current invention that:
The video data of yuv format is formed the texture of panoramic video and is divided by the texture of panoramic video by the present invention in advance
Not mapping to 2 3D visual angle balls, the panorama that 3D visual angle balls different to 2 coincidences and visual angle finally renders to terminal unit is play
The display window of device, user watches 2 different 3D visual angle clubs in visual angle and forms 3D effect;Further, user is set by terminal
The standby visual angle controlling display window, gets final product the panoramic video of the 3D effect of 360 degree (the most upper and lower) viewing display window.
In view of this, compared with the net cast picture single with viewing scene in prior art, the user of the present invention is used
Can control visual angle by terminal unit and watch the panoramic video of 3D effect, not only viewing scene is abundanter, and user
Experience preferably.
Detailed description of the invention
Below in conjunction with drawings and Examples, the present invention is described in further detail.
The method watching 3D panoramic video on internet video live broadcasting platform shown in Figure 1, in the embodiment of the present invention,
Comprise the following steps:
S1: encoded by the panoramic video that panorama camera shoots, is transmitted through the network to coded data watch user
The terminal unit used;Panorama camera includes that former and later two fish eye lenses form, 360 degree of fields upper and lower before and after can gathering camera
Scape.At present panorama camera has been enter into the consumer market of main flow, in addition to domestic substantial amounts of fixed point production firm, Samsung, LG,
The brand manufacturers such as Nokia, Ricoh has issued up-to-date product the most accordingly, forwards S2 to.
Coded data is decoded as the video data of yuv format in units of frame by S2: terminal unit by decoder, turns
To S3.
S3: create 3D model in the panorama player of terminal unit, by underlying graphics storehouse instrument regarding yuv format
Frequency, according to being uploaded in 3D model, forms the texture (i.e. 3D picture) of panoramic video;The panorama player of terminal unit is created
Build three dimensional coordinate space, three dimensional coordinate space creates the 3D visual angle ball of 2 textures being mapped with panoramic video, forwards S4 to.
The flow process of the 3D visual angle ball creating the single texture being mapped with panoramic video in S3 is: pre-establish 3D visual angle ball
Apex coordinate, the texture coordinate of panoramic video and the index on summit;Texture coordinate map panoramic video according to panoramic video
After texture, draw 3D visual angle ball according to the index on apex coordinate, the texture coordinate of panoramic video and summit.
S4: after being overlapped by 2 3D visual angle balls, the angle keeping 1 3D visual angle ball is constant, rotates another 1 3D visual angle ball
Angle, in order to the later stage passes through 2 different 3D visual angle balls in visual angle and forms 3D effect;The present embodiment rotates another 1 3D visual angle ball
The flow process of angle be: 3D visual angle ball is rotated 0.1~2.3 ° along its vertical centrage, forwards S5 to.
S5: adding 3D photographic head in three dimensional coordinate space, the 3D after the taking lens of 3D photographic head is placed in coincidence regards
In the middle part of corner-kick;Its reason is: after creating the 3D visual angle ball of the texture being mapped with panoramic video, if three-dimensional viewport is arranged
The most right, then cannot watch panoramic video;In view of this, needing, viewing matrix is set the taking lens of 3D photographic head is placed in 3D
The middle part of visual angle ball.As a example by OpenGL, can be by the taking lens of gluLookAt function setup 3D photographic head at three-dimensional coordinate
Position in space;For angle with viewing user, can be the eyes of user as 3D photographic head, the shooting mirror of 3D photographic head
The position of head is exactly the position of eyes of user, and the object of taking lens alignment i.e. user's glasses object to be seen (i.e. map
Veined 3D visual angle ball), taking lens upwardly direction be exactly the user crown towards direction, forward S6 to.
S6: the display window (i.e. broadcasting pictures) of panorama player is divided into 2 pieces of regions by underlying graphics storehouse instrument
(left and right or upper and lower), respectively renders to 3D visual angle balls different for 2 visual angles in S4 in 1 piece of region.Now viewing user is led to
Cross terminal unit and can watch 2 different 3D visual angle balls in visual angle simultaneously, form 3D effect with this;Further, viewing user passes through
Terminal unit controls the visual angle of display window, gets final product the panoramic video of 3D effect of 360 degree (the most upper and lower) viewing display window:
(1), when terminal unit is PC end, keyboard, mouse or VR (Virtual Reality, virtual reality technology) can be passed through
Wearable device controls the visual angle of display window;
(2), when terminal unit is mobile terminal, gesture, gyroscope or VR wearable device can be passed through and control regarding of display window
Angle.
In the present embodiment, the underlying graphics storehouse instrument of S3 can use any one in following 2 kinds:
(1) OpenGL ES:OpenGL 3-D graphic API (Application Programming Interface, application
Program Interfaces) subset, OpenGL (Open Graphics Library) is to define one across programming language, across flat
The graphic package interface of the specialty of the DLL specification of platform;OpenGL, for 3-D graphic (two dimensional image also can), be one
Powerful, call convenient underlying graphics storehouse.
(2) the Multimedia Programming interface that DirectX: Microsoft creates.It is mainly used in windows platform, can be used for three-dimensional
Figure (two dimensional image also can), be one powerful, call convenient underlying graphics storehouse.
In S3, the formulating method of the index on the apex coordinate of 3D visual angle ball, the texture coordinate of panoramic video and summit is permissible
For:
What the embodiment of the present invention provided realize said method on internet video live broadcasting platform, watch 3D panoramic video
System, the video encoding module including the video encoding module coordinated with panorama camera and being positioned in terminal unit, 3D visual angle
Ball creation module, 3D photographic head creation module and display window rendering module.
Video encoding module is used for: encoded by the panoramic video that panorama camera shoots, by coded data transmission to seeing
See the Video decoding module of the terminal unit that user uses.
Video decoding module is used for: coded data is decoded as the video data of yuv format in units of frame.
3D visual angle ball creation module is used for: creates 3D model in panorama player, is uploaded by the video data of yuv format
To 3D model, form the texture of panoramic video;Three dimensional coordinate space is created, in three-dimensional in the panorama player of terminal unit
Coordinate space creates the 3D visual angle ball of 2 textures being mapped with panoramic video, after being overlapped by 2 3D visual angle balls, keeps 1 3D
The angle of visual angle ball is constant, rotate another 1 3D visual angle ball angle (by 3D visual angle ball along its vertical centrage rotate 0.1~
2.3°)。
3D visual angle ball creation module creates the specific works flow process of the 3D visual angle ball of the single texture being mapped with panoramic video
For: pre-establish apex coordinate and the texture coordinate of panoramic video of 3D visual angle ball;Texture coordinate map according to panoramic video
After the texture of panoramic video, draw 3D visual angle ball according to the texture coordinate of apex coordinate and panoramic video.
3D photographic head creation module is used for: add 3D photographic head in three dimensional coordinate space, by the shooting mirror of 3D photographic head
Head is placed in the middle part of the 3D visual angle ball after coincidence;
Display window rendering module is used for: by 3D visual angle balls different for 2 visual angles, render to the display window of panorama player
The subregions such as 2 pieces of mouth, the corresponding 1 piece of region of each 3D visual angle ball.
The present invention is not limited to above-mentioned embodiment, for those skilled in the art, without departing from
On the premise of the principle of the invention, it is also possible to make some improvements and modifications, these improvements and modifications are also considered as the protection of the present invention
Within the scope of.The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.