CN106657972B - A kind of control method and device of video playing - Google Patents
A kind of control method and device of video playing Download PDFInfo
- Publication number
- CN106657972B CN106657972B CN201611262140.1A CN201611262140A CN106657972B CN 106657972 B CN106657972 B CN 106657972B CN 201611262140 A CN201611262140 A CN 201611262140A CN 106657972 B CN106657972 B CN 106657972B
- Authority
- CN
- China
- Prior art keywords
- image
- discarded
- range
- area
- boundary value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000013507 mapping Methods 0.000 claims abstract description 260
- 230000000007 visual effect Effects 0.000 claims abstract description 56
- 102220029346 rs34541442 Human genes 0.000 claims description 24
- 102220023217 rs387907538 Human genes 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 12
- 102220037846 rs34312177 Human genes 0.000 claims description 12
- 238000009877 rendering Methods 0.000 claims description 11
- 238000010586 diagram Methods 0.000 description 18
- 230000005540 biological transmission Effects 0.000 description 13
- 238000004422 calculation algorithm Methods 0.000 description 6
- 230000008014 freezing Effects 0.000 description 2
- 238000007710 freezing Methods 0.000 description 2
- 208000003028 Stuttering Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/94—Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/10—Geometric effects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N13/20—Image signal generators
- H04N13/275—Image signal generators from 3D object models, e.g. computer-generated stereoscopic image signals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N13/30—Image reproducers
- H04N13/366—Image reproducers using viewer tracking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/45—Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
- H04N21/454—Content or additional data filtering, e.g. blocking advertisements
- H04N21/4542—Blocking scenes or portions of the received content, e.g. censoring scenes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47205—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/485—End-user interface for client configuration
- H04N21/4854—End-user interface for client configuration for modifying image parameters, e.g. image brightness, contrast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/81—Monomedia components thereof
- H04N21/8146—Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Computer Graphics (AREA)
- Human Computer Interaction (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Geometry (AREA)
- Processing Or Creating Images (AREA)
Abstract
本发明提供了一种视频播放的控制方法及装置,其中应用于服务器端的控制方法包括:接收用户的视角方向数据;根据视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与用户的可视角不相关的区域的坐标范围;根据三维映射模型中确定的坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域;将待输出的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端。本发明实施例解决了现有技术中在进行全景视频播放时存在的要么消耗较大以及要么视频卡顿较为严重的问题。
The present invention provides a video playback control method and device, wherein the control method applied on the server side includes: receiving the user's viewing angle direction data; according to the viewing angle direction data, using a predetermined three-dimensional mapping model, to obtain the three-dimensional mapping model and The coordinate range of the region irrelevant to the user's visual angle; according to the coordinate range determined in the three-dimensional mapping model, determine the discarded image area corresponding to the coordinate range in the panoramic video image to be output; remove the discarded image from the panoramic video image to be output The image data of the remaining area outside the area is transmitted to the video image output terminal. The embodiments of the present invention solve the problems in the prior art that there is either a large consumption or a serious video freeze when playing a panoramic video.
Description
技术领域technical field
本发明涉及多媒体技术领域,尤其涉及一种视频播放的控制方法及装置。The present invention relates to the field of multimedia technology, in particular to a method and device for controlling video playback.
背景技术Background technique
在进行虚拟现实(VR,Virtual Reality)或者360度全景视频直播时,直播画面是可以根据用户的视角相应改变的。但是,通常情况下,用户在一个时刻观看的画面只有一定角度,该角度一般位于水平视场角和垂直视场角在80至110度的范围内,也就是说,用户在一个时刻观看的画面只占360度全景图像中很少一部分,所占部分大概为360度全景图像的1/8至1/6,而360度图像中其他部分图像在同一时刻则是不可见的。When performing virtual reality (VR, Virtual Reality) or 360-degree panoramic video live broadcast, the live broadcast picture can be changed correspondingly according to the user's perspective. However, usually, the picture viewed by the user at one moment has only a certain angle, and the angle is generally within the range of 80 to 110 degrees between the horizontal field of view and the vertical field of view, that is to say, the picture viewed by the user at one moment Only a small part of the 360-degree panoramic image is occupied, and the occupied part is about 1/8 to 1/6 of the 360-degree panoramic image, while other parts of the 360-degree image are invisible at the same time.
目前,现有技术中通常采用如下两种方式进行VR或360度全景直播:At present, the following two methods are usually used in the prior art for VR or 360-degree panoramic live broadcast:
其一,服务器将场景根据算法拼接出360度全景视频图像,通过视频编码将视频数据传输到客户端,客户端解码后将360度图像进行球面映射,将图像贴图到球上,然后根据陀螺仪数据(用户的视角方向数据)来控制显示视频图像,即控制显示视场角范围内的图像。但是,该种方式消耗较大,存在360度全景视频图像的分辨率大、编码功耗大、渲染摄像机个数多、拼接算法计算量大以及传输码率大等问题。First, the server splices the scene into a 360-degree panoramic video image according to the algorithm, and transmits the video data to the client through video encoding. After decoding, the client performs spherical mapping on the 360-degree image, maps the image to the ball, and then Data (user's viewing angle direction data) to control the display of video images, that is, to control the display of images within the range of viewing angles. However, this method consumes a lot of energy, and there are problems such as high resolution of 360-degree panoramic video images, high encoding power consumption, large number of rendering cameras, large amount of calculation for splicing algorithms, and high transmission bit rate.
其二,客户端将陀螺仪数据发送到服务器,服务器根据陀螺仪数据只渲染视场角内的图像,并将图像编码发送至客户端,由客户端直接显示视场角内的图像。但是,该种方式由于陀螺仪数据从客户端到服务器,以及图像编码后从服务器到客户端的时间较长,从而容易导致视场角发生变化时,客户端得到的视频卡顿严重的问题。Second, the client sends the gyroscope data to the server, and the server only renders the image within the field of view according to the gyroscope data, and sends the image code to the client, and the client directly displays the image within the field of view. However, in this method, it takes a long time for the gyroscope data to go from the client to the server, and after the image is encoded, from the server to the client, so it is easy to cause serious video freezes when the field of view changes.
综上所述,现有技术中在播放全景视频图像时,存在着要么消耗较大,要么视频卡顿较为严重的问题。To sum up, in the prior art, when playing a panoramic video image, there are problems of high consumption or serious video freeze.
发明内容Contents of the invention
本发明的目的是提供一种视频播放的控制方法及装置,以解决现有技术中在进行全景视频播放时存在的要么消耗较大以及要么视频卡顿较为严重的问题。The purpose of the present invention is to provide a method and device for controlling video playback, so as to solve the problems of large consumption and serious video freeze in the prior art when performing panoramic video playback.
第一方面,本发明实施例提供一种视频播放的控制方法,应用于服务器端,包括:In the first aspect, the embodiment of the present invention provides a control method for video playback, which is applied to the server side, including:
接收用户的视角方向数据;Receive the user's view direction data;
根据所述视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与所述用户的可视角不相关的区域的坐标范围;According to the viewing angle direction data, using a predetermined three-dimensional mapping model, acquiring a coordinate range of an area in the three-dimensional mapping model that is not related to the viewing angle of the user;
根据三维映射模型中确定的所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域;According to the coordinate range determined in the three-dimensional mapping model, determine a discarded image area corresponding to the coordinate range in the panoramic video image to be output;
将待输出的全景视频图像中除所述丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端。The image data of the remaining area in the panoramic video image to be output except the discarded image area is transmitted to the video image output terminal.
可选地,所述根据所述视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与所述用户的可视角不相关的区域的坐标范围的步骤,包括:根据所述视角方向数据,确定用户的当前视点在所述三维映射模型上的位置坐标;根据所述当前视点在所述三维映射模型上的位置坐标,确定在所述三维映射模型上的图像最低相关点的位置坐标,其中,所述图像最低相关点为所述当前视点与所述三维映射模型的中心点的连线的延长线与所述三维映射模型的交点;根据所述图像最低相关点的位置坐标,获取在三维映射模型中与所述用户的可视角不相关的区域的坐标范围。Optionally, the step of obtaining the coordinate range of an area in the three-dimensional mapping model that is not related to the user's viewing angle by using a predetermined three-dimensional mapping model according to the viewing angle direction data includes: according to the viewing angle Direction data, determining the position coordinates of the user's current viewpoint on the three-dimensional mapping model; according to the position coordinates of the current viewpoint on the three-dimensional mapping model, determining the position of the lowest relevant point of the image on the three-dimensional mapping model Coordinates, wherein the least relevant point of the image is the intersection of the extension line of the line connecting the current viewpoint and the central point of the three-dimensional mapping model with the three-dimensional mapping model; according to the position coordinates of the lowest relevant point of the image, Acquire the coordinate range of an area in the three-dimensional mapping model that is not related to the viewing angle of the user.
可选地,所述根据所述图像最低相关点的位置坐标,获取在三维映射模型中与所述用户的可视角不相关的区域的坐标范围的步骤,包括:根据用户在所述三维映射模型上的可视角和所述图像最低相关点的位置坐标,确定三维映射模型中与所述用户的可视角不相关的区域的坐标范围;或者,根据所述图像最低相关点的位置坐标和预先设定的偏移范围,确定三维映射模型中与所述用户的可视角不相关的区域的坐标范围。Optionally, the step of obtaining the coordinate range of an area in the 3D mapping model that is not related to the user's viewing angle according to the position coordinates of the lowest correlation point of the image includes: The visible angle of view above and the position coordinates of the lowest correlation point of the image, determine the coordinate range of the area in the three-dimensional mapping model that is not related to the user's visual angle; or, according to the position coordinates of the lowest correlation point of the image and the preset The specified offset range is used to determine the coordinate range of an area in the three-dimensional mapping model that is not related to the viewing angle of the user.
可选地,所述三维映射模型包括三维球体模型;所述根据三维映射模型中确定的所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的步骤,包括:根据所述全景视频图像与所述三维球体模型的映射关系和所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域。Optionally, the three-dimensional mapping model includes a three-dimensional sphere model; the step of determining the discarded image area corresponding to the coordinate range in the panoramic video image to be output according to the coordinate range determined in the three-dimensional mapping model includes : According to the mapping relationship between the panoramic video image and the three-dimensional spherical model and the coordinate range, determine a discarded image area corresponding to the coordinate range in the panoramic video image to be output.
可选地,所述图像最低相关点的位置坐标包括图像最低相关点的纬度和经度;所述坐标范围包括:以所述图像最低相关点为中心的纬度坐标范围和经度坐标范围;所述根据所述全景视频图像与所述三维球体模型的映射关系和所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的步骤,包括:根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的纬度以及所述纬度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的高度范围;根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的经度以及所述经度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的宽度范围。Optionally, the position coordinates of the lowest correlation point of the image include the latitude and longitude of the lowest correlation point of the image; the coordinate range includes: a range of latitude coordinates and a range of longitude coordinates centered on the lowest correlation point of the image; The mapping relationship between the panoramic video image and the three-dimensional spherical model and the coordinate range, the step of determining the discarded image area corresponding to the coordinate range in the panoramic video image to be output includes: according to the panoramic video image and The mapping relationship of the three-dimensional sphere model, the latitude of the lowest correlation point of the image, and the latitude coordinate range are obtained to obtain the height range of the discarded image area corresponding to the coordinate range in the panoramic video image to be output; according to the The mapping relationship between the panoramic video image and the three-dimensional spherical model, the longitude of the least relevant point of the image, and the longitude coordinate range to obtain the discarded image area corresponding to the coordinate range in the panoramic video image to be output width range.
可选地,所述全景视频图像为矩形图像或椭圆形图像;若所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的高度映射为所述三维球体模型的直径,则:所述根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的纬度以及所述纬度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的高度范围的步骤,包括:Optionally, the panoramic video image is a rectangular image or an elliptical image; if the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the height of the panoramic video image is mapped to the diameter of the three-dimensional spherical model , then: according to the mapping relationship between the panoramic video image and the three-dimensional spherical model, the latitude of the lowest correlation point of the image, and the latitude coordinate range, the coordinates in the panoramic video image to be output are obtained The step of discarding the height range of the image area corresponding to the range includes:
当α+β/2<=π/2并且α-β/2>=-π/2时:When α+β/2<=π/2 and α-β/2>=-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α+β/2>π/2时:When α+β/2>π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
T11=0;T11=0;
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α-β/2<-π/2时:When α-β/2<-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
B12=HB12=H
和/或,and / or,
若所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的高度映射为所述三维球体模型的经度圆周的半周长,则:If the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the height of the panoramic video image is mapped to the half circumference of the longitude circle of the three-dimensional spherical model, then:
所述根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的纬度以及所述纬度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的高度范围的步骤,包括:According to the mapping relationship between the panoramic video image and the three-dimensional sphere model, the latitude of the lowest correlation point of the image, and the latitude coordinate range, the panoramic video image to be output corresponding to the coordinate range is obtained. Steps for discarding height ranges of image regions, including:
当α+β/2<=π/2并且α-β/2>=-π/2时:When α+β/2<=π/2 and α-β/2>=-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α+β/2>π/2时:When α+β/2>π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
T11=0;T11=0;
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α-β/2<-π/2时:When α-β/2<-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
B12=HB12=H
其中,α表示所述图像最低相关点的纬度,β表示所述纬度坐标范围对应的角度值,H表示所述全景视频图像的高度,T1表示所述丢弃图像区域的高度范围的上边界值,B1表示所述丢弃图像区域的高度范围的下边界值,T11表示所述丢弃图像区域中第一区域的高度范围的上边界值,B11表示所述丢弃图像区域中第一区域的高度范围的下边界值,T12表示所述丢弃图像区域中第二区域的高度范围的上边界值,B12表示所述丢弃图像区域中第二区域的高度范围的下边界值。Wherein, α represents the latitude of the lowest correlation point of the image, β represents the angle value corresponding to the latitude coordinate range, H represents the height of the panoramic video image, T1 represents the upper boundary value of the height range of the discarded image area, B1 represents the lower boundary value of the height range of the discarded image region, T11 represents the upper boundary value of the height range of the first region in the discarded image region, and B11 represents the lower boundary value of the height range of the first region in the discarded image region Boundary value, T12 represents the upper boundary value of the height range of the second area in the discarded image area, and B12 represents the lower boundary value of the height range of the second area in the discarded image area.
可选地,所述全景视频图像为矩形图像;所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的宽度映射为所述三维球体模型的赤道周长,则:所述根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的经度以及所述经度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的宽度范围的步骤,包括:Optionally, the panoramic video image is a rectangular image; the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: mapping the width of the panoramic video image to the equatorial perimeter of the three-dimensional spherical model, then: According to the mapping relationship between the panoramic video image and the three-dimensional sphere model, the longitude of the lowest correlation point of the image, and the longitude coordinate range, the panoramic video image to be output corresponding to the coordinate range is obtained. Steps for discarding width ranges of image regions, including:
当δ-γ/2>=0并且δ+γ/2<=2π时:When δ-γ/2>=0 and δ+γ/2<=2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
当δ-γ/2<0时:When δ-γ/2<0:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=0L11=0
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=WR12=W
当δ+γ/2>2π时:When δ+γ/2>2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=0L11=0
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=WR12=W
其中,δ表示所述图像最低相关点的经度,γ表示所述经度坐标范围对应的角度值,W表示全景视频图像的宽度,L1表示所述丢弃图像区域的宽度范围的左边界值,R1表示所述丢弃图像区域的宽度范围的右边界值,L11表示所述丢弃图像区域中第一区域的宽度范围的左边界值,R11表示所述丢弃图像区域中第一区域的宽度范围的右边界值,L12表示所述丢弃图像区域中第二区域的宽度范围的左边界值,R12表示所述丢弃图像区域中第二区域的宽度范围的右边界值。Among them, δ represents the longitude of the lowest correlation point of the image, γ represents the angle value corresponding to the longitude coordinate range, W represents the width of the panoramic video image, L1 represents the left boundary value of the width range of the discarded image area, and R1 represents The right boundary value of the width range of the discarded image area, L11 represents the left boundary value of the width range of the first area in the discarded image area, and R11 represents the right boundary value of the width range of the first area in the discarded image area , L12 represents the left boundary value of the width range of the second area in the discarded image area, and R12 represents the right boundary value of the width range of the second area in the discarded image area.
可选地,所述全景视频图像为椭圆形图像;所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的宽度映射为所述三维球体模型的赤道周长,则:所述根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的经度以及所述经度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的宽度范围的步骤,包括:Optionally, the panoramic video image is an elliptical image; the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the width of the panoramic video image is mapped to the equatorial perimeter of the three-dimensional spherical model, then : According to the mapping relationship between the panoramic video image and the three-dimensional spherical model, the longitude of the lowest correlation point of the image, and the longitude coordinate range, obtain the corresponding coordinate range in the panoramic video image to be output The step of discarding the width range of the image region includes:
当δ-γ/2>=0并且δ+γ/2<=2π时:When δ-γ/2>=0 and δ+γ/2<=2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
当δ-γ/2<0时:When δ-γ/2<0:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=sL11=s
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=s+wR12=s+w
当δ+γ/2>2π时:When δ+γ/2>2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=sL11=s
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=s+wR12=s+w
其中,δ表示所述图像最低相关点的经度,γ表示所述经度坐标范围对应的角度值,s表示全景视频图像中每行图像的起点横坐标,w表示全景视频图像中每行图像的宽度,L1表示所述丢弃图像区域的宽度范围的左边界值,R1表示所述丢弃图像区域的宽度范围的右边界值,L11表示所述丢弃图像区域中第一区域的宽度范围的左边界值,R11表示所述丢弃图像区域中第一区域的宽度范围的右边界值,L12表示所述丢弃图像区域中第二区域的宽度范围的左边界值,R12表示所述丢弃图像区域中第二区域的宽度范围的右边界值。Among them, δ represents the longitude of the lowest correlation point of the image, γ represents the angle value corresponding to the longitude coordinate range, s represents the starting point abscissa of each row of images in the panoramic video image, and w represents the width of each row of images in the panoramic video image , L1 represents the left boundary value of the width range of the discarded image region, R1 represents the right boundary value of the width range of the discarded image region, L11 represents the left boundary value of the width range of the first region in the discarded image region, R11 represents the right boundary value of the width range of the first area in the discarded image area, L12 represents the left boundary value of the width range of the second area in the discarded image area, and R12 represents the width of the second area in the discarded image area The right boundary value of the width range.
可选地,所述将待输出的全景视频图像中除所述丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端的步骤,包括:根据所述丢弃图像区域,获取所述全景视频图像中除所述丢弃图像区域之外的剩余区域,并对所述剩余区域进行渲染;将渲染后得到的图像数据传输至视频图像输出终端;或者,对所述全景视频图像进行渲染;将所述渲染后得到的图像数据中与所述丢弃图像区域对应的数据设置为特定值,并对设置后的图像数据进行编码;将编码后的图像数据传输至视频图像输出终端。Optionally, the step of transmitting the image data of the remaining area in the panoramic video image to be output except the discarded image area to the video image output terminal includes: obtaining the Render the remaining area in the panoramic video image except the discarded image area; transmit the rendered image data to a video image output terminal; or render the panoramic video image; Setting the data corresponding to the discarded image area in the rendered image data to a specific value, and encoding the set image data; transmitting the encoded image data to a video image output terminal.
可选地,所述将待输出的全景视频图像中除所述丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端的步骤,包括:将所述剩余区域的图像数据以及所述视角方向数据,传输给视频图像输出终端,以使所述视频图像输出终端根据所述视角方向数据,确定所述全景视频图像的丢弃图像区域。Optionally, the step of transmitting the image data of the remaining area in the panoramic video image to be output except the discarded image area to the video image output terminal includes: transmitting the image data of the remaining area and the The viewing angle direction data is transmitted to the video image output terminal, so that the video image output terminal determines the discarded image area of the panoramic video image according to the viewing angle direction data.
第二方面,本发明实施例提供一种视频播放的控制方法,应用于视频图像输出终端,包括:In a second aspect, an embodiment of the present invention provides a method for controlling video playback, which is applied to a video image output terminal, including:
实时获取用户的视角方向数据,并将所述视角方向数据发送给服务器端;Obtaining the viewing direction data of the user in real time, and sending the viewing direction data to the server;
接收所述服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据;Receive the image data of the remaining area except the discarded image area in the panoramic video image transmitted by the server;
将所述剩余区域的图像数据映射到预先确定的三维映射模型中;mapping the image data of the remaining area into a predetermined three-dimensional mapping model;
从映射后的三维映射模型中获取与所述用户的可视角对应的图像部分,并播放与所述用户的可视角对应的所述图像部分。The image part corresponding to the user's viewing angle is acquired from the mapped three-dimensional mapping model, and the image part corresponding to the user's viewing angle is played.
可选地,所述接收所述服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据的步骤,包括:接收所述服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据以及所述剩余区域的图像数据对应的视角方向数据;在播放所述图像部分后,所述控制方法还包括:根据所述视角方向数据,确定映射后的三维映射模型中所述丢弃图像区域的坐标范围;实时获取用户的当前视角方向数据,根据实时获取的当前视角方向数据,确定映射后的三维映射模型中与所述用户的可视角对应的图像部分是否落入所述丢弃图像区域的坐标范围;其中,若映射后的三维映射模型中与所述用户的可视角对应的图像部分落入所述丢弃图像区域的坐标范围,则从之前映射后的、最近一次包含有与丢弃图像区域对应的图像部分的三维映射模型中,获取与所述用户的可视角对应的丢弃图像区域的图像部分,并利用获取的丢弃图像区域的图像部分进行显示;或者,从映射后的三维映射模型中,获取与所述用户的当前可视角相关的、所述丢弃图像区域的相邻区域的图像部分,并将丢弃图像区域的相邻区域的图像部分作为与所述用户的当前可视角对应的图像部分进行显示。Optionally, the step of receiving the image data of the remaining area of the panoramic video image transmitted from the server side except the discarded image area includes: receiving the image data of the panoramic video image transmitted from the server side except the discarded image area The image data of the remaining areas outside and the viewing angle direction data corresponding to the image data of the remaining areas; after playing the image part, the control method further includes: determining the mapped three-dimensional mapping model according to the viewing angle direction data Discard the coordinate range of the image area as described in the above; obtain the user's current viewing angle direction data in real time, and determine whether the image part corresponding to the user's viewing angle in the mapped three-dimensional mapping model falls into the The coordinate range of the discarded image area; wherein, if the image part corresponding to the user's viewing angle in the mapped three-dimensional mapping model falls within the coordinate range of the discarded image area, then from the previous mapped, the latest In the three-dimensional mapping model including the image part corresponding to the discarded image area, the image part of the discarded image area corresponding to the viewing angle of the user is obtained, and the acquired image part of the discarded image area is used for display; or, from the mapping In the following three-dimensional mapping model, the image part of the adjacent area of the discarded image area related to the user's current viewing angle is obtained, and the image part of the adjacent area of the discarded image area is used as the image part of the adjacent area of the discarded image area as the The part of the image corresponding to the current viewing angle is displayed.
第三方面,本发明实施例提供一种视频播放的控制装置,应用于服务器端,包括:In the third aspect, the embodiment of the present invention provides a video playback control device, which is applied to the server end, including:
第一接收模块,用于接收用户的视角方向数据;The first receiving module is used to receive the viewing direction data of the user;
获取模块,用于根据所述视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与所述用户的可视角不相关的区域的坐标范围;An acquisition module, configured to acquire a coordinate range of an area in the three-dimensional mapping model that is not related to the user's viewing angle by using a predetermined three-dimensional mapping model according to the viewing angle direction data;
确定模块,用于根据三维映射模型中确定的所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域;A determining module, configured to determine a discarded image area corresponding to the coordinate range in the panoramic video image to be output according to the coordinate range determined in the three-dimensional mapping model;
输出模块,用于将待输出的全景视频图像中除所述丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端。The output module is used to transmit the image data of the remaining area in the panoramic video image to be output except the discarded image area to the video image output terminal.
可选地,所述获取模块包括:第一确定单元,用于根据所述视角方向数据,确定用户的当前视点在所述三维映射模型上的位置坐标;第二确定单元,用于根据所述当前视点在所述三维映射模型上的位置坐标,确定在所述三维映射模型上的图像最低相关点的位置坐标,其中,所述图像最低相关点为所述当前视点与所述三维映射模型的中心点的连线的延长线与所述三维映射模型的交点;获取单元,用于根据所述图像最低相关点的位置坐标,获取在三维映射模型中与所述用户的当可视角不相关的区域的坐标范围。Optionally, the acquiring module includes: a first determining unit, configured to determine the position coordinates of the user's current viewpoint on the three-dimensional mapping model according to the viewing angle direction data; The position coordinates of the current viewpoint on the three-dimensional mapping model, determining the position coordinates of the lowest correlation point of the image on the three-dimensional mapping model, wherein the lowest correlation point of the image is the distance between the current viewpoint and the three-dimensional mapping model The intersection point of the extension line of the connecting line of the central point and the three-dimensional mapping model; the acquisition unit is used to acquire the position coordinates of the lowest relevant point of the image in the three-dimensional mapping model that is not related to the current viewing angle of the user The coordinate extent of the region.
可选地,所述获取单元用于,根据用户在所述三维映射模型上的可视角和所述图像最低相关点的位置坐标,确定三维映射模型中与所述用户的可视角不相关的区域的坐标范围;或者,根据所述图像最低相关点的位置坐标和预先设定的偏移范围,确定三维映射模型中与所述用户的可视角不相关的区域的坐标范围。Optionally, the acquiring unit is configured to, according to the user's viewing angle on the 3D mapping model and the position coordinates of the lowest correlation point of the image, determine an area in the 3D mapping model that is not related to the user's viewing angle or, according to the position coordinates of the lowest relevant point of the image and a preset offset range, determine the coordinate range of an area in the three-dimensional mapping model that is not related to the viewing angle of the user.
可选地,所述三维映射模型包括三维球体模型;所述确定模块用于,根据所述全景视频图像与所述三维球体模型的映射关系和所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域。Optionally, the three-dimensional mapping model includes a three-dimensional spherical model; the determining module is configured to, according to the mapping relationship between the panoramic video image and the three-dimensional spherical model and the coordinate range, determine The discarded image region corresponding to the coordinate range.
可选地,所述图像最低相关点的位置坐标包括图像最低相关点的纬度和经度;所述坐标范围包括:以所述图像最低相关点为中心的纬度坐标范围和经度坐标范围;所述确定模块包括:第三确定单元,用于根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的纬度以及所述纬度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的高度范围;第四确定单元,用于根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的经度以及所述经度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的宽度范围。Optionally, the position coordinates of the lowest correlation point of the image include the latitude and longitude of the lowest correlation point of the image; the coordinate range includes: a range of latitude coordinates and a range of longitude coordinates centered on the lowest correlation point of the image; the determining The module includes: a third determining unit, configured to obtain the panoramic video image to be output according to the mapping relationship between the panoramic video image and the three-dimensional spherical model, the latitude of the lowest correlation point of the image, and the latitude coordinate range The height range of the discarded image area corresponding to the coordinate range; the fourth determining unit is used for according to the mapping relationship between the panoramic video image and the three-dimensional spherical model, the longitude of the lowest correlation point of the image, and the longitude The coordinate range is used to obtain the width range of the discarded image area corresponding to the coordinate range in the to-be-output panoramic video image.
可选地,所述全景视频图像为矩形图像或椭圆形图像;若所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的高度映射为所述三维球体模型的直径,则所述第三确定单元用于:Optionally, the panoramic video image is a rectangular image or an elliptical image; if the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the height of the panoramic video image is mapped to the diameter of the three-dimensional spherical model , then the third determining unit is used for:
当α+β/2<=π/2并且α-β/2>=-π/2时:When α+β/2<=π/2 and α-β/2>=-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α+β/2>π/2时:When α+β/2>π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
T11=0;T11=0;
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α-β/2<-π/2时:When α-β/2<-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
B12=HB12=H
和/或,and / or,
若所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的高度映射为所述三维球体模型的经度圆周的半周长,则所述第三确定单元用于:If the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the height of the panoramic video image is mapped to the half circumference of the longitude circle of the three-dimensional spherical model, then the third determination unit is used for:
当α+β/2<=π/2并且α-β/2>=-π/2时:When α+β/2<=π/2 and α-β/2>=-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α+β/2>π/2时:When α+β/2>π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
T11=0;T11=0;
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α-β/2<-π/2时:When α-β/2<-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
B12=HB12=H
其中,α表示所述图像最低相关点的纬度,β表示所述纬度坐标范围对应的角度值,H表示所述全景视频图像的高度,T1表示所述丢弃图像区域的高度范围的上边界值,B1表示所述丢弃图像区域的高度范围的下边界值,T11表示所述丢弃图像区域中第一区域的高度范围的上边界值,B11表示所述丢弃图像区域中第一区域的高度范围的下边界值,T12表示所述丢弃图像区域中第二区域的高度范围的上边界值,B12表示所述丢弃图像区域中第二区域的高度范围的下边界值。Wherein, α represents the latitude of the lowest correlation point of the image, β represents the angle value corresponding to the latitude coordinate range, H represents the height of the panoramic video image, T1 represents the upper boundary value of the height range of the discarded image area, B1 represents the lower boundary value of the height range of the discarded image region, T11 represents the upper boundary value of the height range of the first region in the discarded image region, and B11 represents the lower boundary value of the height range of the first region in the discarded image region Boundary value, T12 represents the upper boundary value of the height range of the second area in the discarded image area, and B12 represents the lower boundary value of the height range of the second area in the discarded image area.
可选地,所述全景视频图像为矩形图像;所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的宽度映射为所述三维球体模型的赤道周长,则所述第四确定单元用于:Optionally, the panoramic video image is a rectangular image; the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the width of the panoramic video image is mapped to the equatorial perimeter of the three-dimensional spherical model, then the The fourth determining unit is used for:
当δ-γ/2>=0并且δ+γ/2<=2π时:When δ-γ/2>=0 and δ+γ/2<=2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
当δ-γ/2<0时:When δ-γ/2<0:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=0L11=0
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=WR12=W
当δ+γ/2>2π时:When δ+γ/2>2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=0L11=0
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=WR12=W
其中,δ表示所述图像最低相关点的经度,γ表示所述经度坐标范围对应的角度值,W表示所述全景视频图像的宽度,L1表示所述丢弃图像区域的宽度范围的左边界值,R1表示所述丢弃图像区域的宽度范围的右边界值,L11表示所述丢弃图像区域中第一区域的宽度范围的左边界值,R11表示所述丢弃图像区域中第一区域的宽度范围的右边界值,L12表示所述丢弃图像区域中第二区域的宽度范围的左边界值,R12表示所述丢弃图像区域中第二区域的宽度范围的右边界值。Wherein, δ represents the longitude of the lowest correlation point of the image, γ represents the angle value corresponding to the longitude coordinate range, W represents the width of the panoramic video image, L1 represents the left boundary value of the width range of the discarded image region, R1 represents the right boundary value of the width range of the discarded image region, L11 represents the left boundary value of the width range of the first region in the discarded image region, and R11 represents the right boundary value of the width range of the first region in the discarded image region Boundary value, L12 represents the left boundary value of the width range of the second area in the discarded image area, and R12 represents the right boundary value of the width range of the second area in the discarded image area.
可选地,所述全景视频图像为椭圆形图像;所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的宽度映射为所述三维球体模型的赤道周长,则所述第四确定单元用于:Optionally, the panoramic video image is an elliptical image; the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the width of the panoramic video image is mapped to the equatorial perimeter of the three-dimensional spherical model, then The fourth determining unit is used for:
当δ-γ/2>=0并且δ+γ/2<=2π时:When δ-γ/2>=0 and δ+γ/2<=2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
当δ-γ/2<0时:When δ-γ/2<0:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=sL11=s
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=s+wR12=s+w
当δ+γ/2>2π时:When δ+γ/2>2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=sL11=s
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=s+wR12=s+w
其中,δ表示所述图像最低相关点的经度,γ表示所述经度坐标范围对应的角度值,s表示全景视频图像中每行图像的起点横坐标,w表示全景视频图像中每行图像的宽度,L1表示所述丢弃图像区域的宽度范围的左边界值,R1表示所述丢弃图像区域的宽度范围的右边界值,L11表示所述丢弃图像区域中第一区域的宽度范围的左边界值,R11表示所述丢弃图像区域中第一区域的宽度范围的右边界值,L12表示所述丢弃图像区域中第二区域的宽度范围的左边界值,R12表示所述丢弃图像区域中第二区域的宽度范围的右边界值。Among them, δ represents the longitude of the lowest correlation point of the image, γ represents the angle value corresponding to the longitude coordinate range, s represents the starting point abscissa of each row of images in the panoramic video image, and w represents the width of each row of images in the panoramic video image , L1 represents the left boundary value of the width range of the discarded image region, R1 represents the right boundary value of the width range of the discarded image region, L11 represents the left boundary value of the width range of the first region in the discarded image region, R11 represents the right boundary value of the width range of the first area in the discarded image area, L12 represents the left boundary value of the width range of the second area in the discarded image area, and R12 represents the width of the second area in the discarded image area The right boundary value of the width range.
可选地,所述输出模块包括:第一输出单元,用于根据所述丢弃图像区域,获取所述全景视频图像中除所述丢弃图像区域之外的剩余区域,并对所述剩余区域进行渲染;将渲染后得到的图像数据传输至视频图像输出终端;或者,第二输出单元,用于对所述全景视频图像进行渲染;将所述渲染后得到的图像数据中与所述丢弃图像区域对应的数据设置为特定值,并对设置后的图像数据进行编码;将编码后的图像数据传输至视频图像输出终端。Optionally, the output module includes: a first output unit, configured to obtain, according to the discarded image region, remaining regions in the panoramic video image other than the discarded image region, and perform processing on the remaining regions rendering; transmitting the image data obtained after rendering to the video image output terminal; or, a second output unit for rendering the panoramic video image; combining the image data obtained after rendering with the discarded image area The corresponding data is set to a specific value, and the set image data is encoded; the encoded image data is transmitted to the video image output terminal.
可选地,所述输出模块用于,将所述剩余区域的图像数据以及所述视角方向数据,传输给视频图像输出终端,以使所述视频图像输出终端根据所述视角方向数据,确定所述全景视频图像的丢弃图像区域。Optionally, the output module is configured to transmit the image data of the remaining area and the viewing angle direction data to a video image output terminal, so that the video image output terminal determines the viewing angle direction data according to the viewing angle direction data. The discarded image area of the panoramic video image.
第四方面,本发明实施例提供一种视频播放的控制装置,应用于视频图像输出终端,包括:In a fourth aspect, an embodiment of the present invention provides a video playback control device, which is applied to a video image output terminal, including:
发送模块,用于实时获取用户的视角方向数据,并将所述视角方向数据发送给服务器端;A sending module, configured to acquire the user's viewing angle direction data in real time, and send the viewing angle direction data to the server;
第二接收模块,用于接收所述服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据;The second receiving module is used to receive the image data of the remaining area except the discarded image area in the panoramic video image transmitted by the server;
映射模块,用于将所述剩余区域的图像数据映射到预先确定的三维映射模型中;a mapping module, configured to map the image data of the remaining area into a predetermined three-dimensional mapping model;
播放模块,用于从映射后的三维映射模型中获取与所述用户的可视角对应的图像部分,并播放与所述用户的可视角对应的所述图像部分。A playing module, configured to acquire the image part corresponding to the user's viewing angle from the mapped three-dimensional mapping model, and play the image part corresponding to the user's viewing angle.
可选地,所述第二接收模块用于,接收所述服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据以及所述剩余区域的图像数据对应的视角方向数据;所述控制装置还包括:坐标范围确定模块,用于在播放模块播放所述图像部分之后,根据所述视角方向数据,确定映射后的三维映射模型中所述丢弃图像区域的坐标范围;判断模块,用于实时获取用户的当前视角方向数据,根据实时获取的当前视角方向数据,确定映射后的三维映射模型中与所述用户的可视角对应的图像部分是否落入所述丢弃图像区域的坐标范围;其中,若映射后的三维映射模型中与所述用户的可视角对应的图像部分落入所述丢弃图像区域的坐标范围,则从之前映射后的、最近一次包含有与丢弃图像区域对应的图像部分的三维映射模型中,获取与所述用户的可视角对应的丢弃图像区域的图像部分,并利用获取的丢弃图像区域的图像部分进行显示;或者,从映射后的三维映射模型中,获取与所述用户的当前可视角相关的、所述丢弃图像区域的相邻区域的图像部分,并将丢弃图像区域的相邻区域的图像部分作为与所述用户的当前可视角对应的图像部分进行显示。Optionally, the second receiving module is configured to receive image data of remaining areas in the panoramic video image transmitted from the server except the discarded image area and viewing angle direction data corresponding to the image data of the remaining areas; The control device further includes: a coordinate range determining module, configured to determine the coordinate range of the discarded image area in the mapped three-dimensional mapping model according to the viewing angle direction data after the playing module plays the image part; a judging module , used to obtain the user's current viewing angle direction data in real time, and determine whether the image part corresponding to the user's viewing angle in the mapped three-dimensional mapping model falls into the coordinates of the discarded image area according to the current viewing angle direction data obtained in real time Range; Wherein, if the image part corresponding to the user's visual angle in the mapped three-dimensional mapping model falls within the coordinate range of the discarded image area, then from the previous mapping, the most recent one contains the image corresponding to the discarded image area In the three-dimensional mapping model of the image part of the user, the image part of the discarded image area corresponding to the user's viewing angle is obtained, and the image part of the discarded image area obtained is displayed; or, from the mapped three-dimensional mapping model, Acquire the image part of the adjacent area of the discarded image area related to the user's current viewing angle, and use the image part of the adjacent area of the discarded image area as the image part corresponding to the user's current viewing angle to display.
第五方面,本发明实施例还提供一种计算机可读存储介质,用于存储进行视频播放的计算机程序,所述计算机程序可被处理器执行如第一方面中任一项所述的应用于服务器端的视频播放的控制方法。In the fifth aspect, the embodiment of the present invention also provides a computer-readable storage medium for storing a computer program for video playback, and the computer program can be executed by a processor as described in any one of the first aspect. A method for controlling video playback on the server side.
第六方面,本发明实施例还提供一种计算机可读存储介质,用于存储进行视频播放的计算机程序,所述计算机程序可被处理器执行如第二方面中任一项所述的应用于视频图像输出终端的视频播放的控制方法。In the sixth aspect, the embodiment of the present invention also provides a computer-readable storage medium for storing a computer program for video playback, and the computer program can be executed by a processor as described in any one of the second aspect. A method for controlling video playback of a video image output terminal.
第七方面,本发明实施例提供一种电子设备,所述电子设备包括一个或多个处理器,所述处理器被配置为执行如下控制方法:In a seventh aspect, an embodiment of the present invention provides an electronic device, the electronic device includes one or more processors, and the processors are configured to execute the following control method:
接收用户的视角方向数据;Receive the user's view direction data;
根据所述视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与所述用户的可视角不相关的区域的坐标范围;According to the viewing angle direction data, using a predetermined three-dimensional mapping model, acquiring a coordinate range of an area in the three-dimensional mapping model that is not related to the viewing angle of the user;
根据三维映射模型中确定的所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域;According to the coordinate range determined in the three-dimensional mapping model, determine a discarded image area corresponding to the coordinate range in the panoramic video image to be output;
将待输出的全景视频图像中除所述丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端。The image data of the remaining area in the panoramic video image to be output except the discarded image area is transmitted to the video image output terminal.
第八方面,本发明实施例还提供一种电子设备,所述电子设备包括一个或多个处理器,所述处理器被配置为执行如下控制方法:In an eighth aspect, an embodiment of the present invention further provides an electronic device, the electronic device includes one or more processors, and the processors are configured to execute the following control method:
实时获取用户的视角方向数据,并将所述视角方向数据发送给服务器端;Obtaining the viewing direction data of the user in real time, and sending the viewing direction data to the server;
接收所述服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据;Receive the image data of the remaining area except the discarded image area in the panoramic video image transmitted by the server;
将所述剩余区域的图像数据映射到预先确定的三维映射模型中;mapping the image data of the remaining area into a predetermined three-dimensional mapping model;
从所述映射后的三维映射模型中获取与所述用户的可视角对应的图像部分,并播放与所述用户的可视角对应的所述图像部分。The image part corresponding to the user's viewing angle is acquired from the mapped three-dimensional mapping model, and the image part corresponding to the user's viewing angle is played.
本发明的有益效果是:The beneficial effects of the present invention are:
本发明实施例,通过接收用户的视角方向数据,并根据该视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与用户的可视角不相关的区域的坐标范围,并根据三维映射模型中确定的坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域,最后将待输出的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端。这样,本发明实施例只是将待输出的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据传输至视频图像输出终端,这相对于传输360度全景视频图像的全部图像数据,降低了拼接360度全景视频图像摄像机的个数,减少了拼接算法处理的次数,降低了视频图像编码的处理时间,并且在相同的参数下降低了码率,从而降低了视频传输的消耗;此外,由于将全景视频图像中除丢弃图像区域之外的剩余区域的图像数据传输至视频图像输出终端,因此相对于只传输用户可视角范围内的图像数据的方式,减少了由于图像数据传输延迟造成的卡顿的问题,从而解决了现有技术中在进行全景视频播放时存在的要么消耗较大以及要么视频卡顿较为严重的问题。In the embodiment of the present invention, by receiving the viewing direction data of the user, and according to the viewing direction data, using a predetermined three-dimensional mapping model, the coordinate range of the area unrelated to the user's viewing angle in the three-dimensional mapping model is obtained, and according to the three-dimensional Map the coordinate range determined in the model, determine the discarded image area corresponding to the coordinate range in the panoramic video image to be output, and finally transmit the image data of the remaining area in the panoramic video image to be output except the discarded image area to the video Image output terminal. In this way, the embodiment of the present invention only transmits the image data of the remaining area in the panoramic video image to be output except the discarded image area to the video image output terminal, which reduces the overall image data compared to the transmission of all the image data of the 360-degree panoramic video image. The number of splicing 360-degree panoramic video image cameras reduces the number of splicing algorithm processing, reduces the processing time of video image encoding, and reduces the bit rate under the same parameters, thereby reducing the consumption of video transmission; in addition, due to The image data of the remaining area in the panoramic video image except the discarded image area is transmitted to the video image output terminal, so compared with the method of only transmitting the image data within the user's visual angle range, it reduces the jam caused by the image data transmission delay This solves the problems of large consumption and serious video freeze in the prior art when playing panoramic video.
附图说明Description of drawings
图1表示本发明的第一实施例中视频播放的控制方法的步骤流程图;Fig. 1 represents the flow chart of the steps of the control method of video playback in the first embodiment of the present invention;
图2表示本发明的第二实施例中视频播放的控制方法的步骤流程图;Fig. 2 represents the flow chart of the steps of the control method of video playback in the second embodiment of the present invention;
图3表示三维球体模型中当前视点与图像最低相关点之间的位置示意图;Fig. 3 shows the schematic diagram of the position between the current viewpoint and the lowest correlation point of the image in the three-dimensional spherical model;
图4表示三维球体模型的纬度切面示意图;Fig. 4 shows the schematic diagram of the latitude section of the three-dimensional spherical model;
图5表示矩形图像中丢弃图像区域的高度范围的显示图;Fig. 5 represents the display diagram of the height range of the discarded image area in the rectangular image;
图6表示椭圆形图像中丢弃图像区域的高度范围的显示图;Fig. 6 represents the display diagram of the height range of the discarded image area in the oval image;
图7表示椭圆形图像中丢弃图像区域的第一区域和第二区域的高度范围的显示图;Fig. 7 represents the display diagram of the height range of the first area and the second area of the discarded image area in the oval image;
图8表示三维球体模型的经度切面示意图;Fig. 8 shows the schematic diagram of the longitude section of the three-dimensional spherical model;
图9表示矩形图像中丢弃图像区域的第一区域和第二区域的宽度范围的显示图;Fig. 9 represents the display diagram of the width range of the first region and the second region of the discarded image region in the rectangular image;
图10表示椭圆形图像中丢弃图像区域的第一区域和第二区域的宽度范围的显示图;Fig. 10 represents the display diagram of the width range of the first region and the second region of the discarded image region in the oval image;
图11表示本发明的第三实施例中视频播放的控制方法的步骤流程图;Fig. 11 shows the flow chart of the steps of the control method of video playback in the third embodiment of the present invention;
图12表示本发明的第四实施例中视频播放的控制装置的结构框图;Fig. 12 shows the structural block diagram of the control device of video playback in the fourth embodiment of the present invention;
图13表示本发明的第五实施例中视频播放的控制装置的结构框图。FIG. 13 shows a structural block diagram of a device for controlling video playback in a fifth embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
第一实施例:First embodiment:
如图1所示,为本发明的第一实施例中视频播放的控制方法的步骤流程图,该控制方法应用于服务器端,包括:As shown in Figure 1, it is a flow chart of the steps of the control method for video playback in the first embodiment of the present invention, the control method is applied to the server side, including:
步骤101,接收用户的视角方向数据。Step 101, receiving viewing direction data of a user.
在本步骤中,服务器端可以接收视频图像输出终端实时传输的视角方向数据。具体的,该视角方向数据可以为陀螺仪数据,该陀螺仪数据可以用于指示用户的观看姿态,即用于指示用户的视角方向。这样,服务器端在接收到视频图像输出终端实时传输的陀螺仪数据时,可以实时获取用户的视角方向数据。In this step, the server end may receive viewing angle direction data transmitted in real time by the video image output terminal. Specifically, the view direction data may be gyroscope data, and the gyroscope data may be used to indicate the user's viewing posture, that is, to indicate the user's view direction. In this way, when the server receives the gyroscope data transmitted by the video image output terminal in real time, it can obtain the user's view direction data in real time.
步骤102,根据视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与用户的可视角不相关的区域的坐标范围。Step 102 , according to the view direction data, using a predetermined 3D mapping model, to obtain a coordinate range of an area in the 3D mapping model that is not related to the user's viewing angle.
在本步骤中,具体的,服务器端在接收到用户的视角方向数据之后,可以利用预先确定的三维映射模型,获取在三维映射模型中与用户的可视角不相关的区域的坐标范围。具体的,该三维映射模型可以包括三维球体模型、三维立体模型等。此外,具体的,由于视角方向数据可以用于指示用户的观看姿态,即指示用户的当前视点,因此也可以根据该视角方向数据获取用户的可视角。具体的,该可视角以当前视点为中心。In this step, specifically, after receiving the viewing direction data of the user, the server may use a predetermined 3D mapping model to obtain the coordinate range of an area not related to the user's viewing angle in the 3D mapping model. Specifically, the three-dimensional mapping model may include a three-dimensional sphere model, a three-dimensional solid model, and the like. In addition, specifically, since the viewing angle direction data can be used to indicate the user's viewing posture, that is, indicate the user's current viewpoint, the viewing angle of the user can also be obtained according to the viewing angle direction data. Specifically, the viewing angle is centered on the current viewpoint.
步骤103,根据三维映射模型中确定的坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域。Step 103, according to the coordinate range determined in the three-dimensional mapping model, determine the discarded image area corresponding to the coordinate range in the panoramic video image to be output.
在本步骤中,具体的,在获取到三维映射模型中与用户的可视角不相关的区域的坐标范围之后,可以根据三维映射模型中确定的坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域。In this step, specifically, after obtaining the coordinate range of an area not related to the user's viewing angle in the 3D mapping model, the coordinate range in the panoramic video image to be output can be determined according to the coordinate range determined in the 3D mapping model. The range corresponds to the discarded image area.
步骤104,将待输出的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端。Step 104, transmit the image data of the remaining area except the discarded image area in the panoramic video image to be output to the video image output terminal.
在本步骤中,具体的,在确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域之后,可以获取全景视频图像中除丢弃图像区域之外的剩余区域的图像数据,并将剩余区域的图像数据传输至视频图像输出终端。In this step, specifically, after determining the discarded image area corresponding to the coordinate range in the panoramic video image to be output, the image data of the remaining area in the panoramic video image except the discarded image area can be obtained, and the remaining area The image data is transmitted to the video image output terminal.
这样,本实施例根据用户的视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与用户的可视角不相关的区域的坐标范围,并根据三维映射模型中确定的坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域,最后将待输出的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端。这相对于现有技术中传输360度全景视频图像的全部数据的方式,使得可以在不影响用户正常观看可视角范围内的视频图像的前提下,减少了视频图像的传输数据量,从而降低拼接360度全景视频图像摄像机的个数,减少拼接算法处理的次数,降低视频图像编码的处理时间,并且在相同的参数下降低了码率,从而降低了视频传输的消耗;此外,由于将全景视频图像中除丢弃图像区域之外的剩余区域的图像数据传输至视频图像输出终端,因此相对于只传输用户可视角范围内的图像数据的方式,减少了由于图像数据传输延迟造成的卡顿的问题。In this way, this embodiment uses the predetermined 3D mapping model to obtain the coordinate range of an area not related to the user's viewing angle in the 3D mapping model according to the user's viewing angle direction data, and according to the coordinate range determined in the 3D mapping model, Determine the discarded image area corresponding to the coordinate range in the panoramic video image to be output, and finally transmit the image data of the remaining area except the discarded image area in the panoramic video image to be output to the video image output terminal. Compared with the way of transmitting all the data of the 360-degree panoramic video image in the prior art, this can reduce the amount of video image transmission data without affecting the user's normal viewing of the video image within the viewing angle range, thereby reducing splicing. The number of 360-degree panoramic video image cameras reduces the number of splicing algorithm processing, reduces the processing time of video image encoding, and reduces the bit rate under the same parameters, thereby reducing the consumption of video transmission; in addition, because the panoramic video The image data of the remaining area in the image except the discarded image area is transmitted to the video image output terminal, so compared with the method of only transmitting image data within the user's visual angle range, the problem of stuttering caused by image data transmission delay is reduced .
第二实施例:Second embodiment:
如图2所示,为本发明的第二实施例中视频播放的控制方法的步骤流程图,该控制方法应用于服务器端,包括:As shown in Figure 2, it is a flow chart of the steps of the control method for video playback in the second embodiment of the present invention, the control method is applied to the server side, including:
步骤201,接收用户的视角方向数据。Step 201, receiving viewing direction data of a user.
在本步骤中,服务器端可以接收视频图像输出终端实时传输的视角方向数据。具体的,该视角方向数据可以为陀螺仪数据,该陀螺仪数据可以用于指示用户的观看姿态,即用于指示用户的视角方向。这样,服务器端在接收到视频图像输出终端实时传输的陀螺仪数据时,可以实时获取用户的视角方向数据。In this step, the server end may receive viewing angle direction data transmitted in real time by the video image output terminal. Specifically, the view direction data may be gyroscope data, and the gyroscope data may be used to indicate the user's viewing posture, that is, to indicate the user's view direction. In this way, when the server receives the gyroscope data transmitted by the video image output terminal in real time, it can obtain the user's view direction data in real time.
步骤202,根据视角方向数据,确定用户的当前视点在三维映射模型上的位置坐标。Step 202: Determine the position coordinates of the user's current viewpoint on the three-dimensional mapping model according to the view direction data.
在本步骤中,具体的,用户的视角方向数据为指示用户当前视点的数据。服务器在接收用户的视角方向数据之后,可以利用预先确定的三维映射模型,将当前视点映射到三维映射模型上,从而确定用户的当前视点在三维映射模型上的位置坐标。具体的,当前视点在三维映射模型上的位置坐标包括经纬度坐标。In this step, specifically, the user's view direction data is data indicating the user's current view point. After receiving the viewing direction data of the user, the server may utilize a predetermined 3D mapping model to map the current viewpoint onto the 3D mapping model, thereby determining the position coordinates of the user's current viewing point on the 3D mapping model. Specifically, the position coordinates of the current viewpoint on the three-dimensional mapping model include latitude and longitude coordinates.
步骤203,根据当前视点在三维映射模型上的位置坐标,确定在三维映射模型上的图像最低相关点的位置坐标。Step 203, according to the position coordinates of the current viewpoint on the 3D mapping model, determine the position coordinates of the lowest relevant point of the image on the 3D mapping model.
在本步骤中,具体的,图像最低相关点为当前视点与三维映射模型的中心点的连线的延长线与三维映射模型的交点。这样,在确定当前视点的位置坐标之后,可以根据当前视点的位置坐标,确定三维映射模型上的图像最低相关点的位置坐标。具体的,图像最低相关点的位置坐标包括图像最低相关点的经度坐标和纬度坐标。In this step, specifically, the lowest relevant point of the image is the intersection of the extension line of the line connecting the current viewpoint and the center point of the three-dimensional mapping model and the three-dimensional mapping model. In this way, after the position coordinates of the current viewpoint are determined, the position coordinates of the lowest relevant point of the image on the three-dimensional mapping model can be determined according to the position coordinates of the current viewpoint. Specifically, the position coordinates of the lowest relevant point of the image include longitude coordinates and latitude coordinates of the lowest relevant point of the image.
具体的,在此可以以三维映射模型为三维球体模型进行具体说明。如图3所示,为三维球体模型中当前视点与图像最低相关点之间的位置示意图。在图3中,A点为当前视点,B点为当前视点与三维映射模型的中心点的连线的延长线与三维映射模型的交点,即图像最低相关点。Specifically, the three-dimensional mapping model may be used as a three-dimensional sphere model for specific description herein. As shown in FIG. 3 , it is a schematic diagram of the position between the current viewpoint and the lowest correlation point of the image in the three-dimensional spherical model. In Fig. 3, point A is the current viewpoint, and point B is the intersection point of the extension line connecting the current viewpoint and the center point of the three-dimensional mapping model with the three-dimensional mapping model, that is, the lowest correlation point of the image.
步骤204,根据图像最低相关点的位置坐标,获取在三维映射模型中与用户的可视角不相关的区域的坐标范围。Step 204, according to the position coordinates of the lowest relevant point of the image, obtain the coordinate range of the area not related to the user's visual angle in the 3D mapping model.
在本步骤中,具体的,在确定当前视点在三维映射模型上的位置坐标之后,可以根据当前视点在三维映射模型上的位置坐标,获取用户的可视角范围,其中,该可视角范围以当前视点为中心。In this step, specifically, after determining the position coordinates of the current viewpoint on the three-dimensional mapping model, the user's viewing angle range can be obtained according to the position coordinates of the current viewpoint on the three-dimensional mapping model, wherein the viewing angle range is represented by the current Viewpoint is the center.
具体的,在根据图像最低相关点的位置坐标,获取在三维映射模型中与用户的可视角不相关的区域的坐标范围时,可以根据用户在三维映射模型上的可视角和图像最低相关点的位置坐标,确定三维映射模型中与用户的可视角不相关的区域的坐标范围。具体的,该与用户的可视角不相关的区域的坐标范围可以为以图像最低相关点为中心,以可视角的角度范围对应的区域的坐标范围。具体参见图3,假设a为可视角,则b为与用户的可视角不相关的区域的坐标范围。Specifically, when obtaining the coordinate range of an area not related to the user's viewing angle in the 3D mapping model according to the position coordinates of the lowest correlation point of the image, the user's viewing angle on the 3D mapping model and the minimum correlation point of the image can be Position coordinates, which determine the coordinate range of an area in the 3D mapping model that is not related to the user's viewing angle. Specifically, the coordinate range of the area not related to the user's viewing angle may be the coordinate range of the area corresponding to the angle range of the viewing angle with the lowest relevant point of the image as the center. Specifically referring to FIG. 3 , assuming that a is a viewing angle, b is a coordinate range of an area not related to the user's viewing angle.
此外,在根据图像最低相关点的位置坐标,获取在三维映射模型中与用户的可视角不相关的区域的坐标范围时,还可以根据图像最低相关点的位置坐标和预先设定的偏移范围,确定三维映射模型中与用户的可视角不相关的区域的坐标范围。具体的,预先设定好偏移范围之后,可以以图像最低相关点为中心进行偏移,从而得到与用户的可视角不相关的区域的坐标范围。此外,具体的,该偏移范围可以根据人头部的运动规律来确定。例如,人头部水平转动,视频图像输出终端会实时向服务器端发送陀螺仪数据(视角方向数据),此时只要保证头部以最大速度转动时,在服务器端返回当前时刻的视角方向数据对应的图像数据之前,头部还没有转动到前一时刻的视角方向数据对应的丢弃图像区域内即可。例如,由于VR体验时,人头部从正前方到水平转动90度时大概需要150ms,这时视频图像返回时间控制在100ms以内,则可以使得头部还没有转动到前一时刻的视角方向数据对应的丢弃图像区域内时,当前时刻的视角方向数据对应的图像数据已经传输至视频图像输出终端。In addition, when obtaining the coordinate range of an area not related to the user's viewing angle in the 3D mapping model according to the position coordinates of the lowest relevant point of the image, it can also be based on the position coordinates of the lowest relevant point of the image and the preset offset range , to determine the coordinate range of the area in the 3D mapping model that is not related to the viewing angle of the user. Specifically, after the offset range is set in advance, the offset can be performed centering on the lowest relevant point of the image, so as to obtain the coordinate range of an area that is not related to the user's viewing angle. In addition, specifically, the offset range may be determined according to the movement law of the human head. For example, when a person's head turns horizontally, the video image output terminal will send gyroscope data (viewing direction data) to the server in real time. At this time, as long as the head is turned at the maximum speed, the server will return the corresponding viewing angle data at the current moment. Before the image data of the previous moment, the head has not turned to the discarded image area corresponding to the angle of view direction data at the previous moment. For example, in VR experience, it takes about 150ms for the human head to turn from the front to the horizontal rotation of 90 degrees. At this time, the return time of the video image is controlled within 100ms, so that the head has not turned to the angle of view direction data at the previous moment. When within the corresponding discarded image area, the image data corresponding to the viewing angle direction data at the current moment has been transmitted to the video image output terminal.
步骤205,根据全景视频图像与三维球体模型的映射关系和坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域。Step 205, according to the mapping relationship between the panoramic video image and the three-dimensional spherical model and the coordinate range, determine the discarded image area corresponding to the coordinate range in the panoramic video image to be output.
在本步骤中,具体的,三维映射模型包括三维球体模型,此时在根据三维映射模型中确定的坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域时,可以先根据全景视频图像与三维球体模型的映射关系和坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域。In this step, specifically, the three-dimensional mapping model includes a three-dimensional sphere model. At this time, according to the coordinate range determined in the three-dimensional mapping model, when determining the discarded image area corresponding to the coordinate range in the panoramic video image to be output, it can be based on The mapping relationship between the panoramic video image and the three-dimensional spherical model and the coordinate range determine the discarded image area corresponding to the coordinate range in the panoramic video image to be output.
其中,具体的,全景视频图像与三维球体模型的映射关系可以包括全景视频图像的高度映射为三维球体模型的直径、全景视频图像的高度映射为三维球体模型的经度圆周的半周长、全景视频图像的宽度映射为三维球体模型的赤道周长。此外,在映射时,全景视频图像的左上方可以作为全景视频图像的高度和宽度的起点。Wherein, specifically, the mapping relationship between the panoramic video image and the three-dimensional spherical model may include that the height of the panoramic video image is mapped to the diameter of the three-dimensional spherical model, the height of the panoramic video image is mapped to the half circumference of the longitude circle of the three-dimensional spherical model, and the panoramic video image The width of is mapped to the equatorial perimeter of the 3D sphere model. In addition, during mapping, the upper left of the panoramic video image can be used as a starting point for the height and width of the panoramic video image.
此外,图像最低相关点的位置坐标包括图像最低相关点的纬度和经度;坐标范围包括:以图像最低相关点为中心的纬度坐标范围和经度坐标范围;这样在根据全景视频图像与三维球体模型的映射关系和坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域时,可以根据全景视频图像与三维球体模型的映射关系、图像最低相关点的纬度以及纬度坐标范围,得到待输出的全景视频图像中与坐标范围对应的丢弃图像区域的高度范围;并根据全景视频图像与三维球体模型的映射关系、图像最低相关点的经度以及经度坐标范围,得到待输出的全景视频图像中与坐标范围对应的丢弃图像区域的宽度范围。In addition, the position coordinates of the lowest correlation point of the image include the latitude and longitude of the lowest correlation point of the image; the coordinate range includes: the range of latitude coordinates and the range of longitude coordinates centered on the lowest correlation point of the image; When determining the discarded image area corresponding to the coordinate range in the panoramic video image to be output, the mapping relationship and the coordinate range can be obtained according to the mapping relationship between the panoramic video image and the three-dimensional spherical model, the latitude of the lowest correlation point of the image, and the latitude coordinate range. In the output panoramic video image, the height range of the discarded image area corresponding to the coordinate range; The width range of the discarded image region corresponding to the coordinate range.
下面分别对得到待输出的全景视频图像中与坐标范围对应的丢弃图像区域的高度范围和宽度范围进行具体说明。The following describes in detail the obtained height range and width range of the discarded image region corresponding to the coordinate range in the panoramic video image to be output.
其一,当全景视频图像为矩形图像或椭圆形图像,且全景视频图像与三维球体模型的映射关系包括:全景视频图像的高度映射为三维球体模型的直径时,根据全景视频图像与三维球体模型的映射关系、图像最低相关点的纬度以及纬度坐标范围,得到待输出的全景视频图像中与坐标范围对应的丢弃图像区域的高度范围可以包括如下几种情况:One, when the panoramic video image is a rectangular image or an elliptical image, and the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: when the height of the panoramic video image is mapped to the diameter of the three-dimensional spherical model, according to the panoramic video image and the three-dimensional spherical model The mapping relationship, the latitude and the latitude coordinate range of the lowest correlation point of the image, the height range of the discarded image area corresponding to the coordinate range in the panoramic video image to be output can include the following situations:
当α+β/2<=π/2并且α-β/2>=-π/2时,此时丢弃图像区域不包括三维球体模型的南极点和北极点,则:When α+β/2<=π/2 and α-β/2>=-π/2, discarding the image area at this time does not include the south pole and the north pole of the three-dimensional spherical model, then:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α+β/2>π/2时,此时丢弃图像区域包括三维球体模型的北极点,此时丢弃图像区域包括第一区域和第二区域两个区域,而且,当全景视频图像为矩形图像时,第一区域的宽度为矩形图像的宽度,当全景视频图像为椭圆形图像时,第一区域的宽度为全景视频图像中每行图像的宽度,则:When α+β/2>π/2, the discarded image area includes the North Pole of the three-dimensional sphere model, and the discarded image area includes the first area and the second area, and when the panoramic video image is a rectangle During image, the width of the first area is the width of rectangular image, and when panoramic video image is oval image, the width of first area is the width of every line image in panoramic video image, then:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
T11=0;T11=0;
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α-β/2<-π/2时,此时丢弃图像区域包括三维球体模型的南极点,此时丢弃图像区域包括第一区域和第二区域两个区域,而且,当全景视频图像为矩形图像时,第二区域的宽度为矩形图像的宽度,当全景视频图像为椭圆图像时,第二区域的宽度为全景视频图像中每行图像的宽度,则:When α-β/2<-π/2, discarding the image area now includes the south pole of the three-dimensional spherical model, and discarding the image area now includes the first area and the second area, and when the panoramic video image is During the rectangular image, the width of the second area is the width of the rectangular image, and when the panoramic video image is an ellipse image, the width of the second area is the width of every row of images in the panoramic video image, then:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
B12=HB12=H
和/或,and / or,
若全景视频图像与三维球体模型的映射关系包括:全景视频图像的高度映射为三维球体模型的经度圆周的半周长,则:根据全景视频图像与三维球体模型的映射关系、图像最低相关点的纬度以及纬度坐标范围,得到待输出的全景视频图像中与坐标范围对应的丢弃图像区域的高度范围时,可以包括如下几种情况:If the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the height of the panoramic video image is mapped to the semicircumference of the longitude circle of the three-dimensional spherical model, then: according to the mapping relationship between the panoramic video image and the three-dimensional spherical model, the latitude of the lowest correlation point of the image And the latitude coordinate range, when obtaining the height range of the discarded image area corresponding to the coordinate range in the panoramic video image to be output, can include the following several situations:
当α+β/2<=π/2并且α-β/2>=-π/2时,此时丢弃图像区域不包括三维球体模型的南极点和北极点,则:When α+β/2<=π/2 and α-β/2>=-π/2, discarding the image area at this time does not include the south pole and the north pole of the three-dimensional spherical model, then:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α+β/2>π/2时,此时丢弃图像区域包括三维球体模型的北极点,此时丢弃图像区域包括第一区域和第二区域两个区域,而且,当全景视频图像为矩形图像时,第一区域的宽度为矩形图像的宽度,当全景视频图像为椭圆图像时,第一区域的宽度为全景视频图像中每行图像的宽度,则:When α+β/2>π/2, the discarded image area includes the North Pole of the three-dimensional sphere model, and the discarded image area includes the first area and the second area, and when the panoramic video image is a rectangle During the image, the width of the first area is the width of the rectangular image, and when the panoramic video image is an ellipse image, the width of the first area is the width of every row of images in the panoramic video image, then:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
T11=0;T11=0;
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α-β/2<-π/2时,此时丢弃图像区域包括三维球体模型的南极点,此时丢弃图像区域包括第一区域和第二区域两个区域,而且,当全景视频图像为矩形图像时,第二区域的宽度为矩形图像的宽度,当全景视频图像为椭圆图像时,第二区域的宽度为全景视频图像中每行图像的宽度,则:When α-β/2<-π/2, discarding the image area now includes the south pole of the three-dimensional spherical model, and discarding the image area now includes the first area and the second area, and when the panoramic video image is In the case of a rectangular image, the width of the second area is the width of the rectangular image, and when the panoramic video image is an elliptical image, the width of the second area is the width of each row of images in the panoramic video image, then:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
B12=HB12=H
其中,α表示图像最低相关点的纬度,β表示纬度坐标范围对应的角度值,H表示全景视频图像的高度,T1表示丢弃图像区域的高度范围的上边界值,B1表示丢弃图像区域的高度范围的下边界值,T11表示丢弃图像区域中第一区域的高度范围的上边界值,B11表示丢弃图像区域中第一区域的高度范围的下边界值,T12表示丢弃图像区域中第二区域的高度范围的上边界值,B12表示丢弃图像区域中第二区域的高度范围的下边界值。Among them, α represents the latitude of the lowest correlation point of the image, β represents the angle value corresponding to the latitude coordinate range, H represents the height of the panoramic video image, T1 represents the upper boundary value of the height range of the discarded image region, and B1 represents the height range of the discarded image region T11 indicates the upper boundary value of the height range of the first area in the discarded image area, B11 indicates the lower boundary value of the height range of the first area in the discarded image area, and T12 indicates the height of the second area in the discarded image area The upper boundary value of the range, B12 indicates the lower boundary value of the height range of the second area in the discarded image area.
具体的,如图4所示,在图4中B点表示图像最低相关点,α表示图像最低相关点的纬度,β表示纬度坐标范围对应的角度值。此外,在得到丢弃图像区域的高度范围的上边界值和下边界值之后,若全景视频图像为矩形图像,则可以得到如图5中所示的丢弃图像区域的高度范围的显示图,具体的,在图5中,T1至B1之间的垂直区域表示丢弃图像区域的高度范围;若全景视频图像为椭圆形图像,则可以得到如图6中所示的丢弃图像区域的高度范围的显示图,具体的,在图6中,T1至B1之间的垂直区域表示丢弃图像区域的高度范围。另外,若丢弃图像区域包括第一区域和第二区域,则可以在分别得到丢弃图像区域中第一区域的高度范围的上边界值和下边界值以及第二区域的高度范围的上边界值和下边界值之后,若全景视频图像为椭圆形图像,则可以得到如图7中所示的丢弃图像区域的第一区域和第二区域的高度范围的显示图,具体的,在图7中,B11至上边界线(即W轴线)之间的垂直区域表示第一区域的高度范围,T12至B12之间的垂直区域表示第二区域的高度范围。Specifically, as shown in FIG. 4, point B in FIG. 4 represents the lowest correlation point of the image, α represents the latitude of the lowest correlation point of the image, and β represents the angle value corresponding to the latitude coordinate range. In addition, after obtaining the upper boundary value and the lower boundary value of the height range of the discarded image area, if the panoramic video image is a rectangular image, the display diagram of the height range of the discarded image area as shown in Figure 5 can be obtained, specifically , in Fig. 5, the vertical region between T1 to B1 represents the height range of the discarded image region; if the panoramic video image is an elliptical image, then the display diagram of the height range of the discarded image region as shown in Fig. 6 can be obtained Specifically, in FIG. 6 , the vertical area between T1 and B1 represents the height range of the discarded image area. In addition, if the discarded image area includes the first area and the second area, the upper boundary value and the lower boundary value of the height range of the first area in the discarded image area and the upper boundary value and the height range of the second area can be obtained respectively. After the lower boundary value, if the panoramic video image is an elliptical image, you can obtain the display diagram of the height range of the first area and the second area of the discarded image area as shown in Figure 7, specifically, in Figure 7, The vertical area between B11 and the upper boundary line (ie, the W axis) indicates the height range of the first area, and the vertical area between T12 and B12 indicates the height range of the second area.
其二,当全景视频图像为矩形图像,且全景视频图像与三维球体模型的映射关系包括:全景视频图像的宽度映射为三维球体模型的赤道周长时,根据全景视频图像与三维球体模型的映射关系、图像最低相关点的经度以及经度坐标范围,得到待输出的全景视频图像中与坐标范围对应的丢弃图像区域的宽度范围,可以包括如下几种方式:Second, when the panoramic video image is a rectangular image, and the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: when the width of the panoramic video image is mapped to the equatorial perimeter of the three-dimensional spherical model, according to the mapping relationship between the panoramic video image and the three-dimensional spherical model, The longitude and longitude coordinate range of the lowest correlation point of the image are obtained to obtain the width range of the discarded image area corresponding to the coordinate range in the panoramic video image to be output, which may include the following methods:
当δ-γ/2>=0并且δ+γ/2<=2π时:When δ-γ/2>=0 and δ+γ/2<=2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
当δ-γ/2<0时:When δ-γ/2<0:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=0L11=0
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=WR12=W
当δ+γ/2>2π时:When δ+γ/2>2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=0L11=0
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=WR12=W
其中,δ表示图像最低相关点的经度,γ表示经度坐标范围对应的角度值,W表示全景视频图像的宽度,L1表示丢弃图像区域的宽度范围的左边界值,R1表示丢弃图像区域的宽度范围的右边界值,L11表示丢弃图像区域中第一区域的宽度范围的左边界值,R11表示丢弃图像区域中第一区域的宽度范围的右边界值,L12表示丢弃图像区域中第二区域的宽度范围的左边界值,R12表示丢弃图像区域中第二区域的宽度范围的右边界值。Among them, δ represents the longitude of the lowest correlation point of the image, γ represents the angle value corresponding to the longitude coordinate range, W represents the width of the panoramic video image, L1 represents the left boundary value of the width range of the discarded image area, and R1 represents the width range of the discarded image area L11 represents the left boundary value of the width range of the first region in the discarded image region, R11 represents the right border value of the width range of the first region in the discarded image region, L12 represents the width of the second region in the discarded image region The left boundary value of the range, R12 indicates the right boundary value of the width range of the second area in the discarded image area.
具体的,如图8所示,在图8中B点表示图像最低相关点,δ表示图像最低相关点的经度,γ表示经度坐标范围对应的角度值。此外,若丢弃图像区域包括第一区域和第二区域,则可以在分别得到丢弃图像区域中第一区域的宽度范围的左边界值和右边界值以及第二区域的宽度范围的左边界值和右边界值之后,若全景视频图像为矩形图像,则可以得到如图9中所示的丢弃图像区域的第一区域和第二区域的宽度范围的显示图,具体的,在图9中,H轴线至R11之间的水平区域表示第一区域的宽度范围,L12至整个区域的右边界之间的水平区域表示第二区域的宽度范围。Specifically, as shown in FIG. 8, point B in FIG. 8 represents the lowest correlation point of the image, δ represents the longitude of the lowest correlation point of the image, and γ represents the angle value corresponding to the longitude coordinate range. In addition, if the discarded image area includes the first area and the second area, then the left boundary value and the right boundary value of the width range of the first area in the discarded image area and the left boundary value and the right boundary value of the width range of the second area can be obtained respectively. After the right boundary value, if the panoramic video image is a rectangular image, then the display diagram of the width range of the first area and the second area of the discarded image area as shown in Figure 9 can be obtained, specifically, in Figure 9, H The horizontal area between the axis and R11 indicates the width range of the first area, and the horizontal area between L12 and the right border of the entire area indicates the width range of the second area.
其三,当全景视频图像为椭圆形图像,且全景视频图像与三维球体模型的映射关系包括:全景视频图像的宽度映射为三维球体模型的赤道周长时,根据全景视频图像与三维球体模型的映射关系、图像最低相关点的经度以及经度坐标范围,得到待输出的全景视频图像中与坐标范围对应的丢弃图像区域的宽度范围,可以包括如下几种方式:Third, when the panoramic video image is an elliptical image, and the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: when the width of the panoramic video image is mapped to the equatorial perimeter of the three-dimensional spherical model, according to the mapping relationship between the panoramic video image and the three-dimensional spherical model , the longitude of the lowest correlation point of the image and the longitude coordinate range to obtain the width range of the discarded image area corresponding to the coordinate range in the panoramic video image to be output, which may include the following methods:
当δ-γ/2>=0并且δ+γ/2<=2π时:When δ-γ/2>=0 and δ+γ/2<=2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
当δ-γ/2<0时:When δ-γ/2<0:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=sL11=s
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=s+wR12=s+w
当δ+γ/2>2π时:When δ+γ/2>2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=sL11=s
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=s+wR12=s+w
其中,δ表示图像最低相关点的经度,γ表示经度坐标范围对应的角度值,s表示全景视频图像中每行图像的起点横坐标,w表示全景视频图像中每行图像的宽度,L1表示丢弃图像区域的宽度范围的左边界值,R1表示丢弃图像区域的宽度范围的右边界值,L11表示丢弃图像区域中第一区域的宽度范围的左边界值,R11表示丢弃图像区域中第一区域的宽度范围的右边界值,L12表示丢弃图像区域中第二区域的宽度范围的左边界值,R12表示丢弃图像区域中第二区域的宽度范围的右边界值。Among them, δ represents the longitude of the lowest correlation point of the image, γ represents the angle value corresponding to the longitude coordinate range, s represents the abscissa of the starting point of each row of images in the panoramic video image, w represents the width of each row of images in the panoramic video image, and L1 represents discarding The left boundary value of the width range of the image region, R1 represents the right boundary value of the width range of the discarded image region, L11 represents the left boundary value of the width range of the first region in the discarded image region, R11 represents the value of the first region in the discarded image region The right boundary value of the width range, L12 represents the left boundary value of the width range of the second area in the discarded image area, and R12 represents the right boundary value of the width range of the second area in the discarded image area.
具体的,如图10所示,若丢弃图像区域包括第一区域和第二区域,则可以在分别得到丢弃图像区域中第一区域的宽度范围的左边界值和右边界值以及第二区域的宽度范围的左边界值和右边界值之后,若全景视频图像为椭圆形图像,则可以得到如图10中所示的丢弃图像区域的第一区域和第二区域的宽度范围的显示图,具体的,在图10中,H轴线至R11之间的水平区域表示第一区域的宽度范围,L12至整个区域的右边界之间的水平区域表示第二区域的宽度范围。Specifically, as shown in FIG. 10, if the discarded image area includes the first area and the second area, then the left boundary value and right boundary value of the width range of the first area in the discarded image area and the right boundary value of the second area can be respectively obtained. After the left boundary value and the right boundary value of the width range, if the panoramic video image is an elliptical image, the display diagram of the width range of the first area and the second area of the discarded image area as shown in Figure 10 can be obtained, specifically Yes, in FIG. 10 , the horizontal area between the H axis and R11 represents the width range of the first region, and the horizontal region between L12 and the right border of the entire region represents the width range of the second region.
步骤206,将剩余区域的图像数据以及视角方向数据,传输给视频图像输出终端。Step 206, transmit the image data of the remaining area and the viewing angle direction data to the video image output terminal.
在本步骤中,具体的,在将待输出的全景视频图像中除丢弃图像数据之外的剩余区域的图像数据,传输至视频图像输出终端时,可以将剩余区域的图像数据以及视角方向数据,传输给视频图像输出终端,以使视频图像输出终端在接收到视角方向数据之后,能够根据视角方向数据,确定全景视频图像的丢弃图像区域。In this step, specifically, when transmitting the image data of the remaining area except the discarded image data in the panoramic video image to be output to the video image output terminal, the image data of the remaining area and the viewing direction data may be The video image output terminal is transmitted to the video image output terminal, so that the video image output terminal can determine the discarded image area of the panoramic video image according to the viewing angle direction data after receiving the viewing angle direction data.
此外,具体的,在将待输出的全景视频图像中除丢弃图像数据之外的剩余区域的图像数据,传输至视频图像输出终端时,可以根据丢弃图像区域,获取全景视频图像中除丢弃图像区域之外的剩余区域,并对剩余区域进行渲染,然后将渲染后得到的图像数据传输至视频图像输出终端;或者可以对全景视频图像进行渲染,然后将渲染后得到的图像数据中与丢弃图像区域对应的数据设置为特定值,并对设置后的图像数据进行编码,最后将编码后的图像数据传输至视频图像输出终端。In addition, specifically, when the image data of the remaining area in the panoramic video image to be output except for the discarded image data is transmitted to the video image output terminal, the discarded image area in the panoramic video image can be obtained according to the discarded image area. and render the remaining area, and then transmit the rendered image data to the video image output terminal; or render the panoramic video image, and then combine the rendered image data with the discarded image area The corresponding data is set to a specific value, and the set image data is encoded, and finally the encoded image data is transmitted to the video image output terminal.
这样,本发明实施例通过全景视频图像与三维球体模型的映射关系和坐标范围,确定待输出的全景视频图像中与坐标范围对应的丢弃图像区域,并将待输出的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端,相对于传输360度全景视频图像的全部图像数据,降低了拼接360度全景视频图像摄像机的个数,减少了拼接算法处理的次数,降低了视频图像编码的处理时间,并且在相同的参数下降低了码率,从而降低了视频传输的消耗;此外相对于只传输用户可视角范围内的图像数据的方式,减少了由于图像数据传输延迟造成的卡顿的问题,解决了现有技术中在进行全景视频播放时存在的要么消耗较大以及要么视频卡顿较为严重的问题。In this way, the embodiment of the present invention determines the discarded image area corresponding to the coordinate range in the panoramic video image to be output through the mapping relationship between the panoramic video image and the three-dimensional spherical model and the coordinate range, and removes the discarded image area from the panoramic video image to be output. The image data of the remaining area outside the area is transmitted to the video image output terminal. Compared with the transmission of all image data of the 360-degree panoramic video image, the number of splicing 360-degree panoramic video image cameras is reduced, and the number of splicing algorithm processing is reduced. , which reduces the processing time of video image encoding, and reduces the bit rate under the same parameters, thereby reducing the consumption of video transmission; in addition, compared with the method of only transmitting image data within the viewing angle range of the user, it reduces due to image data The problem of freezing caused by transmission delay solves the problems of large consumption and serious video freezing in the prior art when performing panoramic video playback.
第三实施例:Third embodiment:
如图11所示,为本发明的第三实施例中视频播放的控制方法的步骤流程图,该控制方法应用于视频图像输出终端,包括:As shown in FIG. 11 , it is a flow chart of the steps of the video playback control method in the third embodiment of the present invention. The control method is applied to a video image output terminal, including:
步骤1101,实时获取用户的视角方向数据,并将视角方向数据发送给服务器端。Step 1101, acquire the viewing angle direction data of the user in real time, and send the viewing angle direction data to the server.
在本步骤中,具体的,用户的视角方向数据可以为陀螺仪数据,且该视角方向数据可以用于指示用户的观看姿态,即用于指示用户的视角方向。因此视频图像输出终端可以通过陀螺仪获取用户的视角方向数据,且视频图像输出终端实时获取到该用户的视角方向数据之后,可以将该视角方向数据发送给服务器。In this step, specifically, the viewing direction data of the user may be gyroscope data, and the viewing direction data may be used to indicate the viewing posture of the user, that is, to indicate the viewing direction of the user. Therefore, the video image output terminal can obtain the user's viewing angle direction data through the gyroscope, and after the video image output terminal obtains the user's viewing angle direction data in real time, it can send the viewing angle direction data to the server.
步骤1102,接收服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据。Step 1102, receiving the image data of the remaining area except the discarded image area in the panoramic video image transmitted from the server.
在本步骤中,具体的,服务器端在接收到用户的视角方向数据之后,可以根据视角方向数据确定在将全景视频图像映射到三维映射模型中时,与用户的可视角不相关的区域的坐标范围对应的丢弃图像区域,并将全景视频图像中除丢弃图像区域之外的剩余区域的图像数据传输至视频图像输出终端。此时,视频图像输出终端接收服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据。In this step, specifically, after receiving the viewing direction data of the user, the server side can determine the coordinates of the area not related to the user's viewing angle when mapping the panoramic video image into the 3D mapping model according to the viewing direction data The discarded image area corresponding to the range, and the image data of the remaining area in the panoramic video image except the discarded image area is transmitted to the video image output terminal. At this time, the video image output terminal receives the image data of the remaining area in the panoramic video image transmitted from the server end except the discarded image area.
步骤1103,将剩余区域的图像数据映射到预先确定的三维映射模型中。Step 1103, map the image data of the remaining area into a predetermined three-dimensional mapping model.
在本步骤中,具体的,视频图像输出终端在接收到剩余区域的图像数据之后,可以将剩余区域的图像数据映射到预先确定的三维映射模型中,以方便播放与用户的可视角相对应的图像部分。In this step, specifically, after receiving the image data of the remaining area, the video image output terminal can map the image data of the remaining area into a predetermined three-dimensional mapping model, so as to facilitate playing the video corresponding to the viewing angle of the user. Image section.
步骤1104,从映射后的三维映射模型中获取与用户的可视角对应的图像部分,并播放与用户的可视角对应的图像部分。Step 1104, acquire the image part corresponding to the user's viewing angle from the mapped three-dimensional mapping model, and play the image part corresponding to the user's viewing angle.
在本步骤中,具体的,在将剩余区域的图像数据映射到预先确定的三维映射模型中之后,可以根据用户的视角方向数据,从映射后的三维映射模型中获取与用户的可视角对应的图像部分,并播放该与用户的可视角对应的图像部分。In this step, specifically, after mapping the image data of the remaining regions into a predetermined three-dimensional mapping model, the user's viewing angle direction data can be obtained from the mapped three-dimensional mapping model corresponding to the user's viewing angle. image part, and play the image part corresponding to the user's viewing angle.
这样,本实施例通过将实时获取的视角方向数据发送给服务器端,并接收服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据,然后将剩余区域的图像数据映射到预先确定的三维映射模型中,最后从映射后的三维映射模型中获取与用户的可视角对应的图像部分,并播放该图像部分。这样,由于映射到三维映射模型中的图像数据为剩余区域的图像数据,相对于只接收可视角对应的图像数据,使得用户在观看全景视频图像并改变可视角时,能够观看到较为流畅的全景视频图像,解决了现有技术中在进行全景视频播放时存在的视频卡顿较为严重的为题,提高了用户体验。In this way, this embodiment sends the viewing angle direction data acquired in real time to the server end, and receives the image data of the remaining areas in the panoramic video image transmitted by the server end except the discarded image area, and then maps the image data of the remaining areas to In the predetermined three-dimensional mapping model, finally, the image part corresponding to the user's viewing angle is obtained from the mapped three-dimensional mapping model, and the image part is played. In this way, since the image data mapped into the three-dimensional mapping model is the image data of the remaining area, compared with only receiving the image data corresponding to the viewing angle, the user can watch a relatively smooth panorama when watching the panoramic video image and changing the viewing angle. The video image solves the problem of serious video freeze in the prior art when playing panoramic video, and improves user experience.
此外,具体的,在接收服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据时,可以同时接收服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据以及剩余区域的图像数据对应的视角方向数据。这样,在播放与用户的可视角对应的图像部分之后,可以根据接收到的视角方向数据,确定映射后的三维映射模型中丢弃图像区域的坐标范围,从而使得视频图像输出终端能够在获取到剩余区域的图像数据的同时,确定与视角方向数据对应的丢弃图像区域的坐标范围。In addition, specifically, when receiving the image data of the remaining area in the panoramic video image transmitted from the server side except the discarded image area, the data of the remaining area in the panoramic video image transmitted from the server side except the discarded image area can be received at the same time. The image data and the view direction data corresponding to the image data of the remaining area. In this way, after playing the image part corresponding to the user's viewing angle, the coordinate range of the discarded image area in the mapped 3D mapping model can be determined according to the received viewing angle direction data, so that the video image output terminal can obtain the remaining At the same time as the image data of the region, the coordinate range of the discarded image region corresponding to the view direction data is determined.
此外,由于全景视频图像中丢弃图像区域内的数据被丢弃,因此会造成全景视频图像不完整,此时特殊情况下,当用户观看视角发生较大变化时,为了避免用户直接看到丢弃图像区域,在播放与用户的可视角对应的图像部分之后,可以实时获取用户的当前视角方向数据,根据实时获取的当前视角方向数据,确定映射后的三维映射模型中与用户的可视角对应的图像部分是否落入丢弃图像区域的坐标范围。In addition, because the data in the discarded image area in the panoramic video image is discarded, it will cause the panoramic video image to be incomplete. , after playing the image part corresponding to the user's viewing angle, the user's current viewing angle direction data can be obtained in real time, and the image part corresponding to the user's viewing angle in the mapped 3D mapping model can be determined according to the current viewing angle direction data acquired in real time Whether to fall within the coordinate range of the discarded image region.
具体的,若映射后的三维映射模型中与用户的可视角对应的图像部分落入丢弃图像区域的坐标范围,则可以从之前映射后的、最近一次包含有与丢弃图像区域对应的图像部分的三维映射模型中,获取与用户的可视角对应的丢弃图像区域的图像部分,并利用获取的丢弃图像区域的图像部分进行显示;或者,从映射后的三维映射模型中,获取与用户的当前可视角相关的、丢弃图像区域的相邻区域的图像部分,并将丢弃图像区域的相邻区域的图像部分作为与用户的当前可视角对应的图像部分进行显示。这样,即使用户的视角发生较大变化,用户也不会看到全景视频图像中丢弃图像区域内的图像。Specifically, if the image part corresponding to the user's visual angle in the mapped three-dimensional mapping model falls within the coordinate range of the discarded image area, then the image part corresponding to the discarded image area can be obtained from the last mapped image part that contains the image part corresponding to the discarded image area. In the three-dimensional mapping model, the image part of the discarded image area corresponding to the user's viewing angle is acquired, and the acquired image part of the discarded image area is used for display; or, from the mapped three-dimensional mapping model, the user's current visible Regarding the viewing angle, the image part of the adjacent area of the discarded image area is discarded, and the image part of the adjacent area of the discarded image area is displayed as the image part corresponding to the user's current viewing angle. In this way, even if the user's viewing angle changes greatly, the user will not see the images in the discarded image area in the panoramic video image.
这样,本实施例通过将实时获取的视角方向数据发送给服务器端,并接收服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据以及视角方向数据,然后将剩余区域的图像数据映射到预先确定的三维映射模型中,最后从映射后的三维映射模型中获取与用户的可视角对应的图像部分,并播放该图像部分。这样,由于映射到三维映射模型中的图像数据为剩余区域的图像数据,相对于只接收可视角对应的图像数据,使得用户在观看全景视频图像并改变可视角时,能够观看到较为流畅的全景视频图像,解决了现有技术中在进行全景视频播放时存在的视频卡顿较为严重的为题,提高了用户体验。In this way, this embodiment sends the viewing angle direction data acquired in real time to the server end, and receives the image data and viewing angle direction data of the remaining areas in the panoramic video image transmitted by the server end except the discarded image area, and then sends the viewing angle direction data of the remaining areas The image data is mapped to a predetermined three-dimensional mapping model, and finally the image part corresponding to the user's viewing angle is obtained from the mapped three-dimensional mapping model, and the image part is played. In this way, since the image data mapped into the three-dimensional mapping model is the image data of the remaining area, compared with only receiving the image data corresponding to the viewing angle, the user can watch a relatively smooth panorama when watching the panoramic video image and changing the viewing angle. The video image solves the problem of serious video freeze in the prior art when playing panoramic video, and improves user experience.
第四实施例:Fourth embodiment:
如图12所示,为本发明的第四实施例中视频播放的控制装置的结构框图,该控制装置应用于服务器端,包括:As shown in FIG. 12, it is a structural block diagram of a control device for video playback in the fourth embodiment of the present invention. The control device is applied to the server side and includes:
第一接收模块1201,用于接收用户的视角方向数据;The first receiving module 1201 is configured to receive the viewing direction data of the user;
获取模块1202,用于根据所述视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与所述用户的可视角不相关的区域的坐标范围;An acquisition module 1202, configured to acquire the coordinate range of an area in the three-dimensional mapping model that is not related to the viewing angle of the user by using a predetermined three-dimensional mapping model according to the viewing angle direction data;
确定模块1203,用于根据三维映射模型中确定的所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域;A determining module 1203, configured to determine, according to the coordinate range determined in the three-dimensional mapping model, a discarded image area corresponding to the coordinate range in the panoramic video image to be output;
输出模块1204,用于将待输出的全景视频图像中除所述丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端。The output module 1204 is configured to transmit the image data of the remaining area in the panoramic video image to be output except the discarded image area to the video image output terminal.
可选地,所述获取模块1202包括:第一确定单元,用于根据所述视角方向数据,确定用户的当前视点在所述三维映射模型上的位置坐标;第二确定单元,用于根据所述当前视点在所述三维映射模型上的位置坐标,确定在所述三维映射模型上的图像最低相关点的位置坐标,其中,所述图像最低相关点为所述当前视点与所述三维映射模型的中心点的连线的延长线与所述三维映射模型的交点;获取单元,用于根据所述图像最低相关点的位置坐标,获取在三维映射模型中与所述用户的当可视角不相关的区域的坐标范围。Optionally, the obtaining module 1202 includes: a first determining unit, configured to determine the position coordinates of the user's current viewpoint on the three-dimensional mapping model according to the view direction data; The position coordinates of the current viewpoint on the three-dimensional mapping model, and determine the position coordinates of the lowest correlation point of the image on the three-dimensional mapping model, wherein the lowest correlation point of the image is the current viewpoint and the three-dimensional mapping model The intersection point of the extension line of the line connecting the center points of the center point and the three-dimensional mapping model; the acquisition unit is used to obtain the current visual angle of the three-dimensional mapping model that is not related to the user according to the position coordinates of the lowest correlation point of the image The coordinate range of the area.
可选地,所述获取单元用于,根据用户在所述三维映射模型上的可视角和所述图像最低相关点的位置坐标,确定三维映射模型中与所述用户的可视角不相关的区域的坐标范围;或者,根据所述图像最低相关点的位置坐标和预先设定的偏移范围,确定三维映射模型中与所述用户的可视角不相关的区域的坐标范围。Optionally, the acquiring unit is configured to, according to the user's viewing angle on the 3D mapping model and the position coordinates of the lowest correlation point of the image, determine an area in the 3D mapping model that is not related to the user's viewing angle or, according to the position coordinates of the lowest relevant point of the image and a preset offset range, determine the coordinate range of an area in the three-dimensional mapping model that is not related to the viewing angle of the user.
可选地,所述三维映射模型包括三维球体模型;所述确定模块1203用于,根据所述全景视频图像与所述三维球体模型的映射关系和所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域。Optionally, the three-dimensional mapping model includes a three-dimensional spherical model; the determining module 1203 is configured to determine the panoramic video image to be output according to the mapping relationship between the panoramic video image and the three-dimensional spherical model and the coordinate range The discarded image region corresponding to the coordinate range in .
可选地,所述图像最低相关点的位置坐标包括图像最低相关点的纬度和经度;所述坐标范围包括:以所述图像最低相关点为中心的纬度坐标范围和经度坐标范围;所述确定模块包括:第三确定单元,用于根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的纬度以及所述纬度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的高度范围;第四确定单元,用于根据所述全景视频图像与所述三维球体模型的映射关系、所述图像最低相关点的经度以及所述经度坐标范围,得到所述待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域的宽度范围。Optionally, the position coordinates of the lowest correlation point of the image include the latitude and longitude of the lowest correlation point of the image; the coordinate range includes: a range of latitude coordinates and a range of longitude coordinates centered on the lowest correlation point of the image; the determining The module includes: a third determining unit, configured to obtain the panoramic video image to be output according to the mapping relationship between the panoramic video image and the three-dimensional spherical model, the latitude of the lowest correlation point of the image, and the latitude coordinate range The height range of the discarded image area corresponding to the coordinate range; the fourth determining unit is used for according to the mapping relationship between the panoramic video image and the three-dimensional spherical model, the longitude of the lowest correlation point of the image, and the longitude The coordinate range is used to obtain the width range of the discarded image area corresponding to the coordinate range in the to-be-output panoramic video image.
可选地,所述全景视频图像为矩形图像或椭圆形图像;若所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的高度映射为所述三维球体模型的直径,则所述第三确定单元用于:Optionally, the panoramic video image is a rectangular image or an elliptical image; if the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the height of the panoramic video image is mapped to the diameter of the three-dimensional spherical model , then the third determining unit is used for:
当α+β/2<=π/2并且α-β/2>=-π/2时:When α+β/2<=π/2 and α-β/2>=-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α+β/2>π/2时:When α+β/2>π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
T11=0;T11=0;
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α-β/2<-π/2时:When α-β/2<-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
B12=HB12=H
和/或,and / or,
若所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的高度映射为所述三维球体模型的经度圆周的半周长,则所述第三确定单元用于:If the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the height of the panoramic video image is mapped to the half circumference of the longitude circle of the three-dimensional spherical model, then the third determination unit is used for:
当α+β/2<=π/2并且α-β/2>=-π/2时:When α+β/2<=π/2 and α-β/2>=-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α+β/2>π/2时:When α+β/2>π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
T11=0;T11=0;
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
当α-β/2<-π/2时:When α-β/2<-π/2:
通过如下公式得到所述丢弃图像区域的高度范围的上边界值:The upper boundary value of the height range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的高度范围的下边界值:The lower boundary value of the height range of the discarded image area is obtained by the following formula:
B12=HB12=H
其中,α表示所述图像最低相关点的纬度,β表示所述纬度坐标范围对应的角度值,H表示所述全景视频图像的高度,T1表示所述丢弃图像区域的高度范围的上边界值,B1表示所述丢弃图像区域的高度范围的下边界值,T11表示所述丢弃图像区域中第一区域的高度范围的上边界值,B11表示所述丢弃图像区域中第一区域的高度范围的下边界值,T12表示所述丢弃图像区域中第二区域的高度范围的上边界值,B12表示所述丢弃图像区域中第二区域的高度范围的下边界值。Wherein, α represents the latitude of the lowest correlation point of the image, β represents the angle value corresponding to the latitude coordinate range, H represents the height of the panoramic video image, T1 represents the upper boundary value of the height range of the discarded image area, B1 represents the lower boundary value of the height range of the discarded image region, T11 represents the upper boundary value of the height range of the first region in the discarded image region, and B11 represents the lower boundary value of the height range of the first region in the discarded image region Boundary value, T12 represents the upper boundary value of the height range of the second area in the discarded image area, and B12 represents the lower boundary value of the height range of the second area in the discarded image area.
可选地,所述全景视频图像为矩形图像;所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的宽度映射为所述三维球体模型的赤道周长,则所述第四确定单元用于:Optionally, the panoramic video image is a rectangular image; the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the width of the panoramic video image is mapped to the equatorial perimeter of the three-dimensional spherical model, then the The fourth determining unit is used for:
当δ-γ/2>=0并且δ+γ/2<=2π时:When δ-γ/2>=0 and δ+γ/2<=2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
当δ-γ/2<0时:When δ-γ/2<0:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=0L11=0
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=WR12=W
当δ+γ/2>2π时:When δ+γ/2>2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=0L11=0
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=WR12=W
其中,δ表示所述图像最低相关点的经度,γ表示所述经度坐标范围对应的角度值,W表示全景视频图像的宽度,L1表示所述丢弃图像区域的宽度范围的左边界值,R1表示所述丢弃图像区域的宽度范围的右边界值,L11表示所述丢弃图像区域中第一区域的宽度范围的左边界值,R11表示所述丢弃图像区域中第一区域的宽度范围的右边界值,L12表示所述丢弃图像区域中第二区域的宽度范围的左边界值,R12表示所述丢弃图像区域中第二区域的宽度范围的右边界值。Among them, δ represents the longitude of the lowest correlation point of the image, γ represents the angle value corresponding to the longitude coordinate range, W represents the width of the panoramic video image, L1 represents the left boundary value of the width range of the discarded image area, and R1 represents The right boundary value of the width range of the discarded image area, L11 represents the left boundary value of the width range of the first area in the discarded image area, and R11 represents the right boundary value of the width range of the first area in the discarded image area , L12 represents the left boundary value of the width range of the second area in the discarded image area, and R12 represents the right boundary value of the width range of the second area in the discarded image area.
可选地,所述全景视频图像为椭圆形图像;所述全景视频图像与所述三维球体模型的映射关系包括:所述全景视频图像的宽度映射为所述三维球体模型的赤道周长,则所述第四确定单元用于:Optionally, the panoramic video image is an elliptical image; the mapping relationship between the panoramic video image and the three-dimensional spherical model includes: the width of the panoramic video image is mapped to the equatorial perimeter of the three-dimensional spherical model, then The fourth determining unit is used for:
当δ-γ/2>=0并且δ+γ/2<=2π时:When δ-γ/2>=0 and δ+γ/2<=2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
当δ-γ/2<0时:When δ-γ/2<0:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=sL11=s
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=s+wR12=s+w
当δ+γ/2>2π时:When δ+γ/2>2π:
通过如下公式得到所述丢弃图像区域的宽度范围的左边界值:The left boundary value of the width range of the discarded image area is obtained by the following formula:
L11=sL11=s
通过如下公式得到所述丢弃图像区域的宽度范围的右边界值:The right boundary value of the width range of the discarded image area is obtained by the following formula:
R12=s+wR12=s+w
其中,δ表示所述图像最低相关点的经度,γ表示所述经度坐标范围对应的角度值,s表示全景视频图像中每行图像的起点横坐标,w表示全景视频图像中每行图像的宽度,L1表示所述丢弃图像区域的宽度范围的左边界值,R1表示所述丢弃图像区域的宽度范围的右边界值,L11表示所述丢弃图像区域中第一区域的宽度范围的左边界值,R11表示所述丢弃图像区域中第一区域的宽度范围的右边界值,L12表示所述丢弃图像区域中第二区域的宽度范围的左边界值,R12表示所述丢弃图像区域中第二区域的宽度范围的右边界值。Among them, δ represents the longitude of the lowest correlation point of the image, γ represents the angle value corresponding to the longitude coordinate range, s represents the starting point abscissa of each row of images in the panoramic video image, and w represents the width of each row of images in the panoramic video image , L1 represents the left boundary value of the width range of the discarded image region, R1 represents the right boundary value of the width range of the discarded image region, L11 represents the left boundary value of the width range of the first region in the discarded image region, R11 represents the right boundary value of the width range of the first area in the discarded image area, L12 represents the left boundary value of the width range of the second area in the discarded image area, and R12 represents the width of the second area in the discarded image area The right boundary value of the width range.
可选地,所述输出模块1204包括:第一输出单元,用于根据所述丢弃图像区域,获取所述全景视频图像中除所述丢弃图像区域之外的剩余区域,并对所述剩余区域进行渲染;将渲染后得到的图像数据传输至视频图像输出终端;或者,第二输出单元,用于对所述全景视频图像进行渲染;将所述渲染后得到的图像数据中与所述丢弃图像区域对应的数据设置为特定值,并对设置后的图像数据进行编码;将编码后的图像数据传输至视频图像输出终端。Optionally, the output module 1204 includes: a first output unit, configured to acquire, according to the discarded image region, remaining regions in the panoramic video image other than the discarded image region, and analyze the remaining regions Perform rendering; transmit the image data obtained after rendering to the video image output terminal; or, a second output unit for rendering the panoramic video image; combine the image data obtained after rendering with the discarded image The data corresponding to the area is set to a specific value, and the set image data is encoded; the encoded image data is transmitted to the video image output terminal.
可选地,所述输出模块1204用于,将所述剩余区域的图像数据以及所述视角方向数据,传输给视频图像输出终端,以使所述视频图像输出终端根据所述视角方向数据,确定所述全景视频图像的丢弃图像区域。Optionally, the output module 1204 is configured to transmit the image data of the remaining area and the viewing angle direction data to a video image output terminal, so that the video image output terminal determines according to the viewing angle direction data The discarded image area of the panoramic video image.
这样,本发明实施例只是将待输出的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据传输至视频图像输出终端,这相对于传输360度全景视频图像的全部图像数据,降低了拼接360度全景视频图像摄像机的个数,减少了拼接算法处理的次数,降低了视频图像编码的处理时间,并且在相同的参数下降低了码率,从而降低了视频传输的消耗;此外,由于将全景视频图像中除丢弃图像区域之外的剩余区域的图像数据传输至视频图像输出终端,因此相对于只传输用户可视角范围内的图像数据的方式,减少了由于图像数据传输延迟造成的卡顿的问题,从而解决了现有技术中在进行全景视频播放时存在的要么消耗较大以及要么视频卡顿较为严重的问题。In this way, the embodiment of the present invention only transmits the image data of the remaining area in the panoramic video image to be output except the discarded image area to the video image output terminal, which reduces the overall image data compared to the transmission of all the image data of the 360-degree panoramic video image. The number of splicing 360-degree panoramic video image cameras reduces the number of splicing algorithm processing, reduces the processing time of video image encoding, and reduces the bit rate under the same parameters, thereby reducing the consumption of video transmission; in addition, due to The image data of the remaining area in the panoramic video image except the discarded image area is transmitted to the video image output terminal, so compared with the method of only transmitting the image data within the user's visual angle range, it reduces the jam caused by the image data transmission delay This solves the problems of large consumption and serious video freeze in the prior art when playing panoramic video.
第五实施例:Fifth embodiment:
如图13所示,为本发明的第五实施例中视频播放的控制装置的结构框图,该控制装置应用于视频图像输出终端,包括:As shown in FIG. 13 , it is a structural block diagram of a video playback control device in a fifth embodiment of the present invention. The control device is applied to a video image output terminal, including:
发送模块1301,用于实时获取用户的视角方向数据,并将所述视角方向数据发送给服务器端;A sending module 1301, configured to acquire the viewing angle direction data of the user in real time, and send the viewing angle direction data to the server;
第二接收模块1302,用于接收所述服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据;The second receiving module 1302 is configured to receive the image data of the remaining area except the discarded image area in the panoramic video image transmitted by the server;
映射模块1303,用于将所述剩余区域的图像数据映射到预先确定的三维映射模型中;A mapping module 1303, configured to map the image data of the remaining area into a predetermined three-dimensional mapping model;
播放模块1304,用于从映射后的三维映射模型中获取与所述用户的可视角对应的图像部分,并播放与所述用户的可视角对应的所述图像部分。The playing module 1304 is configured to acquire the image part corresponding to the user's viewing angle from the mapped three-dimensional mapping model, and play the image part corresponding to the user's viewing angle.
可选地,所述第二接收模块1302用于,接收所述服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据以及所述剩余区域的图像数据对应的视角方向数据;所述控制装置还包括:坐标范围确定模块,用于在所述播放模块播放所述图像部分之后,根据所述视角方向数据,确定映射后的三维映射模型中所述丢弃图像区域的坐标范围;判断模块,用于实时获取用户的当前视角方向数据,根据实时获取的当前视角方向数据,确定映射后的三维映射模型中与所述用户的可视角对应的图像部分是否落入所述丢弃图像区域的坐标范围;其中,若映射后的三维映射模型中与所述用户的可视角对应的图像部分落入所述丢弃图像区域的坐标范围,则从之前映射后的、最近一次包含有与丢弃图像区域对应的图像部分的三维映射模型中,获取与所述用户的可视角对应的丢弃图像区域的图像部分,并利用获取的丢弃图像区域的图像部分进行显示;或者,从映射后的三维映射模型中,获取与所述用户的当前可视角相关的、所述丢弃图像区域的相邻区域的图像部分,并将丢弃图像区域的相邻区域的图像部分作为与所述用户的当前可视角对应的图像部分进行显示。Optionally, the second receiving module 1302 is configured to receive the image data of the remaining area except the discarded image area in the panoramic video image transmitted from the server and the viewing angle direction data corresponding to the image data of the remaining area The control device also includes: a coordinate range determination module, used to determine the coordinate range of the discarded image area in the mapped three-dimensional mapping model according to the viewing angle direction data after the playing module plays the image part The judging module is used to obtain the user's current viewing angle direction data in real time, and determine whether the image part corresponding to the user's viewing angle in the mapped three-dimensional mapping model falls into the discarded image according to the current viewing angle direction data obtained in real time The coordinate range of the area; wherein, if the image part corresponding to the user's viewing angle in the mapped three-dimensional mapping model falls within the coordinate range of the discarded image area, then from the previous mapped, the latest included and discarded In the three-dimensional mapping model of the image part corresponding to the image area, the image part of the discarded image area corresponding to the viewing angle of the user is obtained, and the acquired image part of the discarded image area is used for display; or, from the mapped three-dimensional mapping In the model, the image part of the adjacent area of the discarded image area related to the user's current viewing angle is acquired, and the image part of the adjacent area of the discarded image area is regarded as corresponding to the user's current viewing angle part of the image is displayed.
这样,本实施例通过将实时获取的视角方向数据发送给服务器端,并接收服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据以及视角方向数据,然后将剩余区域的图像数据映射到预先确定的三维映射模型中,最后从映射后的三维映射模型中获取与用户的可视角对应的图像部分,并播放该图像部分。这样,由于映射到三维映射模型中的图像数据为剩余区域的图像数据,相对于只接收可视角对应的图像数据,使得用户在观看全景视频图像并改变可视角时,能够观看到较为流畅的全景视频图像,解决了现有技术中在进行全景视频播放时存在的视频卡顿较为严重的为题,提高了用户体验。In this way, this embodiment sends the viewing angle direction data acquired in real time to the server end, and receives the image data and viewing angle direction data of the remaining areas in the panoramic video image transmitted by the server end except the discarded image area, and then sends the viewing angle direction data of the remaining areas The image data is mapped to a predetermined three-dimensional mapping model, and finally the image part corresponding to the user's viewing angle is obtained from the mapped three-dimensional mapping model, and the image part is played. In this way, since the image data mapped into the three-dimensional mapping model is the image data of the remaining area, compared with only receiving the image data corresponding to the viewing angle, the user can watch a relatively smooth panorama when watching the panoramic video image and changing the viewing angle. The video image solves the problem of serious video freeze in the prior art when playing panoramic video, and improves user experience.
第六实施例:Sixth embodiment:
本实施例还提供一种计算机可读存储介质,用于存储进行视频播放的计算机程序,所述计算机程序可被处理器执行前述实施例中应用于服务器端的视频播放的控制方法。This embodiment also provides a computer-readable storage medium for storing a computer program for video playback, and the computer program can be used by a processor to execute the video playback control method applied to the server in the foregoing embodiments.
第七实施例:Seventh embodiment:
本实施例还提供一种计算机可读存储介质,用于存储进行视频播放的计算机程序,所述计算机程序可被处理器执行前述实施例中应用于视频图像输出终端的视频播放的控制方法。This embodiment also provides a computer-readable storage medium for storing a computer program for video playback, and the computer program can be executed by a processor to control the video playback method applied to a video image output terminal in the foregoing embodiments.
第八实施例:Eighth embodiment:
本实施例提供一种电子设备,所述电子设备包括一个或多个处理器,所述处理器被配置为执行如下控制方法:This embodiment provides an electronic device, where the electronic device includes one or more processors, and the processors are configured to execute the following control method:
接收用户的视角方向数据;Receive the user's view direction data;
根据所述视角方向数据,利用预先确定的三维映射模型,获取在三维映射模型中与所述用户的可视角不相关的区域的坐标范围;According to the viewing angle direction data, using a predetermined three-dimensional mapping model, acquiring a coordinate range of an area in the three-dimensional mapping model that is not related to the viewing angle of the user;
根据三维映射模型中确定的所述坐标范围,确定待输出的全景视频图像中与所述坐标范围对应的丢弃图像区域;According to the coordinate range determined in the three-dimensional mapping model, determine a discarded image area corresponding to the coordinate range in the panoramic video image to be output;
将待输出的全景视频图像中除所述丢弃图像区域之外的剩余区域的图像数据,传输至视频图像输出终端。The image data of the remaining area in the panoramic video image to be output except the discarded image area is transmitted to the video image output terminal.
第九实施例:Ninth embodiment:
本实施例还提供一种电子设备,所述电子设备包括一个或多个处理器,所述处理器被配置为执行如下控制方法:This embodiment also provides an electronic device, where the electronic device includes one or more processors, and the processors are configured to execute the following control method:
实时获取用户的视角方向数据,并将所述视角方向数据发送给服务器端;Obtaining the viewing direction data of the user in real time, and sending the viewing direction data to the server;
接收所述服务器端传输的全景视频图像中除丢弃图像区域之外的剩余区域的图像数据;Receive the image data of the remaining area except the discarded image area in the panoramic video image transmitted by the server;
将所述剩余区域的图像数据映射到预先确定的三维映射模型中;mapping the image data of the remaining area into a predetermined three-dimensional mapping model;
从所述映射后的三维映射模型中获取与所述用户的可视角对应的图像部分,并播放与所述用户的可视角对应的所述图像部分。The image part corresponding to the user's viewing angle is acquired from the mapped three-dimensional mapping model, and the image part corresponding to the user's viewing angle is played.
以上所述的是本发明的优选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本发明所述的原理前提下还可以作出若干改进和润饰,这些改进和润饰也在本发明的保护范围内。What has been described above is a preferred embodiment of the present invention. It should be pointed out that for those skilled in the art, some improvements and modifications can also be made without departing from the principles described in the present invention. within the scope of protection of the invention.
Claims (28)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611262140.1A CN106657972B (en) | 2016-12-30 | 2016-12-30 | A kind of control method and device of video playing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611262140.1A CN106657972B (en) | 2016-12-30 | 2016-12-30 | A kind of control method and device of video playing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106657972A CN106657972A (en) | 2017-05-10 |
CN106657972B true CN106657972B (en) | 2018-06-15 |
Family
ID=58838834
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611262140.1A Expired - Fee Related CN106657972B (en) | 2016-12-30 | 2016-12-30 | A kind of control method and device of video playing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106657972B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019068745A1 (en) * | 2017-10-02 | 2019-04-11 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Efficient immersive streaming |
CN107945231A (en) * | 2017-11-21 | 2018-04-20 | 江西服装学院 | A kind of 3 D video playback method and device |
CN108153412A (en) * | 2017-12-11 | 2018-06-12 | 虚拟现实(深圳)智能科技有限公司 | LAN VR live broadcasting methods and system |
CN108319362B (en) * | 2018-01-02 | 2020-06-23 | 联想(北京)有限公司 | Panoramic information display method, electronic equipment and computer storage medium |
CN111225293B (en) * | 2018-11-23 | 2023-10-03 | 深圳市中兴微电子技术有限公司 | Video data processing method and device and computer storage medium |
CN111314739B (en) * | 2020-02-17 | 2022-05-17 | 聚好看科技股份有限公司 | Image processing method, server and display device |
CN111343478A (en) * | 2020-02-21 | 2020-06-26 | 深圳市酷开网络科技有限公司 | VR equipment data processing method and system, VR all-in-one machine and storage medium |
CN112584189A (en) * | 2020-12-08 | 2021-03-30 | 深圳创维新世界科技有限公司 | Live broadcast data processing method, device and system and computer readable storage medium |
CN113038117B (en) * | 2021-03-08 | 2022-09-09 | 烽火通信科技股份有限公司 | Panoramic playing method and device based on multiple visual angles |
-
2016
- 2016-12-30 CN CN201611262140.1A patent/CN106657972B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN106657972A (en) | 2017-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106657972B (en) | A kind of control method and device of video playing | |
US10693938B2 (en) | Method and system for interactive transmission of panoramic video | |
CN107396077B (en) | Virtual reality panoramic video stream projection method and equipment | |
US11025882B2 (en) | Live action volumetric video compression/decompression and playback | |
US9667873B2 (en) | Methods for facilitating computer vision application initialization | |
WO2018171487A1 (en) | Panoramic video playback method and client terminal | |
US20120293613A1 (en) | System and method for capturing and editing panoramic images | |
CN106934772B (en) | Horizontal calibration method and system for panoramic image or video and portable terminal | |
WO2013038923A1 (en) | Program, storage medium, gaming device and computer | |
JP2018139102A (en) | Method and apparatus for determining points of interest in immersive content | |
CN106534827B (en) | Method and system based on user perspective playing panoramic video | |
TWI653551B (en) | Method and program for transmitting and playing virtual reality image | |
JP5474899B2 (en) | PROGRAM, INFORMATION STORAGE MEDIUM, AND GAME DEVICE | |
JP6533761B2 (en) | INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING SYSTEM, AND INFORMATION PROCESSING METHOD | |
CN113038117B (en) | Panoramic playing method and device based on multiple visual angles | |
WO2022141781A1 (en) | Method and system for playing panoramic video, storage medium, and playback device | |
CN114040119A (en) | Panoramic video display method, device and computer equipment | |
KR20170031676A (en) | Method and program for transmitting and playing virtual reality image | |
CN113515193B (en) | Model data transmission method and device | |
JP2018033107A (en) | Video distribution device and distribution method | |
TWI850320B (en) | Image representation of a scene | |
US9807302B1 (en) | Offset rolling shutter camera model, and applications thereof | |
CN107492068B (en) | Video object transformation real-time processing method, device and computing device | |
JP7447266B2 (en) | View encoding and decoding for volumetric image data | |
CN106791888A (en) | The transmission method and device of the panoramic pictures based on user perspective |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180615 |
|
CF01 | Termination of patent right due to non-payment of annual fee |