[go: up one dir, main page]

CN107135397B - A kind of panorama video code method and apparatus - Google Patents

A kind of panorama video code method and apparatus Download PDF

Info

Publication number
CN107135397B
CN107135397B CN201710294859.1A CN201710294859A CN107135397B CN 107135397 B CN107135397 B CN 107135397B CN 201710294859 A CN201710294859 A CN 201710294859A CN 107135397 B CN107135397 B CN 107135397B
Authority
CN
China
Prior art keywords
prediction unit
coordinates
motion vector
current prediction
plane coordinates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710294859.1A
Other languages
Chinese (zh)
Other versions
CN107135397A (en
Inventor
刘�东
王叶斐
吴枫
李厚强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN201710294859.1A priority Critical patent/CN107135397B/en
Publication of CN107135397A publication Critical patent/CN107135397A/en
Application granted granted Critical
Publication of CN107135397B publication Critical patent/CN107135397B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/62Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding by frequency transforming in three dimensions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请公开了一种全景视频编码方法和装置。该方法将当前预测单元中的某个参考点在当前帧的当前预测单元、当前帧的最相邻预测单元、参考帧的当前预测单元以及参考帧的最相邻预测单元的平面坐标转换为球面坐标,从而根据参考点的球面坐标确定当前预测单元在三维空间内的三维运动矢量。进而,根据该三维运动矢量确定当前帧中当前预测单元的所有目标点在参考帧的对应目标参考点,并根据该目标参考点的像素对目标点像素进行补偿。与现有技术相比,本发明采用球面坐标系转换运动模型进行像素补偿,消除了视频中畸变带来的影响,从而提高视频编码效率。

The present application discloses a panoramic video encoding method and device. This method converts the plane coordinates of a reference point in the current prediction unit in the current prediction unit of the current frame, the nearest neighbor prediction unit of the current frame, the current prediction unit of the reference frame, and the nearest neighbor prediction unit of the reference frame into a spherical surface coordinates, so as to determine the three-dimensional motion vector of the current prediction unit in the three-dimensional space according to the spherical coordinates of the reference point. Furthermore, according to the three-dimensional motion vector, determine the corresponding target reference points of all the target points of the current prediction unit in the current frame in the reference frame, and compensate the target point pixels according to the pixels of the target reference points. Compared with the prior art, the present invention uses a spherical coordinate system to convert a motion model to perform pixel compensation, thereby eliminating the influence of distortion in video, thereby improving video coding efficiency.

Description

一种全景视频编码方法和装置A panoramic video encoding method and device

技术领域technical field

本申请涉及视频编码领域,更具体地说,涉及一种全景视频编码方法和装置。The present application relates to the field of video coding, and more specifically, to a panoramic video coding method and device.

背景技术Background technique

近年来虚拟现实(VR)在研究和应用领域成为了热点。而VR应用的一大核心便是全景视频,全景视频在实际播放的时候是在VR头显设备上,其空间结构是一个三维的球面,但在实际存储在计算机上时必须要映射到平面上,其中最广泛采用的是经纬图映射方式,这种方式把球面映射成一个长宽2:1的矩形,但是会造成严重的图像形状畸变,这会给编码时的运动估计带来麻烦。In recent years, virtual reality (VR) has become a hot spot in the field of research and application. The core of VR applications is the panoramic video. When the panoramic video is actually played, it is played on the VR head-mounted display device. Its spatial structure is a three-dimensional spherical surface, but it must be mapped to a plane when it is actually stored on the computer. , the most widely used is the longitude-latitude map mapping method, which maps the spherical surface into a rectangle with a length and width of 2:1, but it will cause serious image shape distortion, which will bring trouble to the motion estimation during encoding.

传统的通用视频编码标准如H.264(Advanced Video Coding)和HEVC(HighEfficiency Video Coding)都采用平动运动模型(translational motionmodel),这种运动模型只能刻画物体的平移,却无法刻画旋转,缩放和其他的一些复杂的运动。而全景视频映射到平面由于存在畸变,这导致平动运动模型存在编码效率低的问题。Traditional general-purpose video coding standards such as H.264 (Advanced Video Coding) and HEVC (High Efficiency Video Coding) both use a translational motion model. This motion model can only describe the translation of objects, but cannot describe rotation and scaling. and other complex movements. However, the panoramic video is mapped to the plane due to distortion, which leads to the problem of low coding efficiency in the translational motion model.

发明内容Contents of the invention

有鉴于此,本申请提供一种全景视频编码方法和装置,基于球面坐标系对全景视频进行运动估计和补偿,以消除视频中畸变带来的影响,从而提高视频编码效率。In view of this, the present application provides a panoramic video coding method and device, which perform motion estimation and compensation on a panoramic video based on a spherical coordinate system, so as to eliminate the influence of distortion in the video, thereby improving video coding efficiency.

为了实现上述目的,现提出的方案如下:In order to achieve the above purpose, the proposed scheme is as follows:

一种全景视频编码方法,包括:A panoramic video encoding method, comprising:

确定当前预测单元的最相邻预测单元;determining the most adjacent PU of the current PU;

获取参考点的第一平面坐标、第二平面坐标、第三平面坐标以及第四平面坐标;Acquiring the first plane coordinates, the second plane coordinates, the third plane coordinates and the fourth plane coordinates of the reference point;

其中,所述第一平面坐标为所述参考点在当前帧的当前预测单元中的坐标、所述第二平面坐标为所述参考点在当前帧的最相邻预测单元中的坐标,所述第三平面坐标为所述参考点在参考帧的当前预测单元中的坐标,所述第四平面坐标为所述参考点在参考帧的最相邻预测单元中的坐标;Wherein, the first plane coordinates are the coordinates of the reference point in the current prediction unit of the current frame, and the second plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the current frame, and the The third plane coordinates are the coordinates of the reference point in the current prediction unit of the reference frame, and the fourth plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the reference frame;

分别将所述第一平面坐标、所述第二平面坐标、所述第三平面坐标以及所述第四平面坐标转换为球面坐标,并根据所述球面坐标计算所述当前预测单元在三维空间内的三维运动矢量;converting the first plane coordinates, the second plane coordinates, the third plane coordinates, and the fourth plane coordinates into spherical coordinates, and calculating the current prediction unit in the three-dimensional space according to the spherical coordinates The three-dimensional motion vector;

对于当前帧的当前预测单元中所有目标点,根据所述三维运动矢量确定所述目标点在参考帧内对应的目标参考点;For all target points in the current prediction unit of the current frame, determine a target reference point corresponding to the target point in the reference frame according to the three-dimensional motion vector;

利用所述目标参考点的像素对所述目标点像素进行补偿,以实现对所述当前预测单元的球坐标变换运动模型补偿;Using the pixels of the target reference point to compensate the pixels of the target point, so as to realize the spherical coordinate transformation motion model compensation of the current prediction unit;

对所述当前预测单元进行编码。Encode the current prediction unit.

优选的,所述确定当前预测单元的最相邻预测单元,包括:Preferably, the determining the most adjacent prediction unit of the current prediction unit includes:

获取所述当前预测单元的二维运动矢量,以及多个相邻预测单元的二维运动矢量;Acquiring a two-dimensional motion vector of the current prediction unit and two-dimensional motion vectors of multiple adjacent prediction units;

比较所述当前预测单元的二维运动矢量和相邻预测单元的二维运动矢量;comparing the two-dimensional motion vector of the current prediction unit with the two-dimensional motion vector of the adjacent prediction unit;

将与所述当前预测单元二维运动矢量最近的相邻预测单元作为所述当前预测单元的最相邻预测单元。Taking the neighboring prediction unit closest to the two-dimensional motion vector of the current prediction unit as the nearest neighboring prediction unit of the current prediction unit.

优选的,所述获取参考点的第一平面坐标、第二平面坐标、第三平面坐标以及第四平面坐标,包括:Preferably, said obtaining the first plane coordinates, the second plane coordinates, the third plane coordinates and the fourth plane coordinates of the reference point includes:

获取所述参考点的所述第一平面坐标和所述第二平面坐标;acquiring the first plane coordinates and the second plane coordinates of the reference point;

计算所述当前预测单元与所述最相邻预测单元的二维运动矢量差值;calculating a two-dimensional motion vector difference between the current prediction unit and the nearest neighbor prediction unit;

根据所述二维运动矢量差值和所述第一平面坐标确定所述第三平面坐标,以及根据所述二维运动矢量差值和所述第二平面坐标确定所述第四平面坐标。The third plane coordinate is determined according to the two-dimensional motion vector difference and the first plane coordinate, and the fourth plane coordinate is determined according to the two-dimensional motion vector difference and the second plane coordinate.

优选的,所述分别将所述第一平面坐标、所述第二平面坐标、所述第三平面坐标以及所述第四平面坐标转换为球面坐标,包括:Preferably, converting the first plane coordinates, the second plane coordinates, the third plane coordinates and the fourth plane coordinates into spherical coordinates respectively includes:

基于公式z=Rcosθ计算所述球面坐标;formula based z=Rcosθ calculates the spherical coordinates;

其中,θ表示球面坐标的纬度,且 表示球面坐标的经度,且where θ represents the latitude in spherical coordinates, and denote the longitude in spherical coordinates, and

(u,v)表示所述参考点的平面坐标,H表示图像的高度,W表示图像的宽度,R表示所述参考点的深度。(u, v) represent the plane coordinates of the reference point, H represents the height of the image, W represents the width of the image, and R represents the depth of the reference point.

优选的,所述根据所述球面坐标计算所述当前预测单元在三维空间内的三维运动矢量,包括:Preferably, the calculating the three-dimensional motion vector of the current prediction unit in three-dimensional space according to the spherical coordinates includes:

根据所述第一平面坐标对应的第一球面坐标和所述第三平面坐标对应的第三球面坐标,计算第一三维运动矢量;calculating a first three-dimensional motion vector according to the first spherical coordinates corresponding to the first plane coordinates and the third spherical coordinates corresponding to the third plane coordinates;

根据所述第二平面坐标对应的第二球面坐标和所述第四平面坐标对应的第四球面坐标,计算第二三维运动矢量;calculating a second three-dimensional motion vector according to the second spherical coordinates corresponding to the second plane coordinates and the fourth spherical coordinates corresponding to the fourth plane coordinates;

利用所述第一三维运动矢量和所述第二三维运动矢量的相等性以及参考点在参考帧的当前预测单元中的预设深度分别确定参考点在当前帧的当前预测单元中的深度、在当前帧的最相邻预测单元中的深度以及在参考帧的最相邻预测单元中的深度;Using the equality of the first 3D motion vector and the second 3D motion vector and the preset depth of the reference point in the current prediction unit of the reference frame to respectively determine the depth of the reference point in the current prediction unit of the current frame, in the depth in the nearest PU of the current frame and the depth in the nearest PU of the reference frame;

根据参考点在参考帧的当前预测单元中的预设深度和参考点在当前帧的当前预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量;calculating a three-dimensional motion vector of the current prediction unit in three-dimensional space according to a preset depth of the reference point in the current prediction unit of the reference frame and a depth of the reference point in the current prediction unit of the current frame;

或根据参考点在参考帧的最相邻预测单元中的深度和参考点在当前帧的最相邻预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量。Or calculate the 3D motion vector of the current prediction unit in the 3D space according to the depth of the reference point in the most adjacent PU of the reference frame and the depth of the reference point in the most adjacent PU of the current frame.

优选的,所述对所述当前预测单元进行编码,包括;Preferably, said encoding said current prediction unit includes;

计算经过球坐标变换运动模型补偿后的所述当前预测单元的第一代价函数值;Calculating the first cost function value of the current prediction unit after spherical coordinate transformation motion model compensation;

计算经过平动模型补偿后的所述当前预测单元的第二代价函数值;Calculating the second cost function value of the current prediction unit after translation model compensation;

比较所述第一代价函数值和所述第二代价函数值,根据比较结果选取所述当前预测单元的补偿方式。Comparing the first cost function value and the second cost function value, and selecting a compensation mode for the current prediction unit according to the comparison result.

一种全景视频编码装置,包括:A panoramic video encoding device, comprising:

筛选单元,用于确定当前预测单元的最相邻预测单元;screening unit, used to determine the most adjacent prediction unit of the current prediction unit;

坐标采集单元,用于获取参考点的第一平面坐标、第二平面坐标、第三平面坐标以及第四平面坐标;a coordinate acquisition unit, configured to acquire the first plane coordinates, the second plane coordinates, the third plane coordinates and the fourth plane coordinates of the reference point;

其中,所述第一平面坐标为所述参考点在当前帧的当前预测单元中的坐标、所述第二平面坐标为所述参考点在当前帧的最相邻预测单元中的坐标,所述第三平面坐标为所述参考点在参考帧的当前预测单元中的坐标,所述第四平面坐标为所述参考点在参考帧的最相邻预测单元中的坐标;Wherein, the first plane coordinates are the coordinates of the reference point in the current prediction unit of the current frame, and the second plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the current frame, and the The third plane coordinates are the coordinates of the reference point in the current prediction unit of the reference frame, and the fourth plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the reference frame;

坐标转换单元,用于分别将所述第一平面坐标、所述第二平面坐标、所述第三平面坐标以及所述第四平面坐标转换为球面坐标;a coordinate conversion unit, configured to respectively convert the first plane coordinates, the second plane coordinates, the third plane coordinates, and the fourth plane coordinates into spherical coordinates;

三维运动矢量计算单元,用于根据所述球面坐标计算所述当前预测单元在三维空间内的三维运动矢量;A three-dimensional motion vector calculation unit, configured to calculate the three-dimensional motion vector of the current prediction unit in three-dimensional space according to the spherical coordinates;

目标参考点确定单元,用于对于当前帧的当前预测单元中所有目标点,根据所述三维运动矢量确定所述目标点在参考帧内对应的目标参考点;A target reference point determination unit, configured to, for all target points in the current prediction unit of the current frame, determine the target reference point corresponding to the target point in the reference frame according to the three-dimensional motion vector;

补偿单元,用于利用所述目标参考点的像素对所述目标点像素进行补偿,以实现对所述当前预测单元的球坐标变换运动模型补偿;A compensation unit, configured to use the pixels of the target reference point to compensate the pixels of the target point, so as to realize the compensation of the spherical coordinate transformation motion model of the current prediction unit;

编码单元,用于对所述当前预测单元进行编码。A coding unit, configured to code the current prediction unit.

优选的,所述筛选单元包括:Preferably, the screening unit includes:

二维运动矢量搜索模块,用于获取所述当前预测单元的二维运动矢量,以及多个相邻预测单元的二维运动矢量;A two-dimensional motion vector search module, configured to obtain the two-dimensional motion vector of the current prediction unit and the two-dimensional motion vectors of multiple adjacent prediction units;

比较模块,用于比较所述当前预测单元的二维运动矢量和相邻预测单元的二维运动矢量;A comparison module, configured to compare the two-dimensional motion vector of the current prediction unit with the two-dimensional motion vector of the adjacent prediction unit;

预测单元选取模块,用于将与所述当前预测单元二维运动矢量最近的相邻预测单元作为所述当前预测单元的最相邻预测单元。The prediction unit selection module is configured to use the adjacent prediction unit closest to the two-dimensional motion vector of the current prediction unit as the most adjacent prediction unit of the current prediction unit.

优选的,所述坐标采集单元包括:Preferably, the coordinate acquisition unit includes:

坐标采集模块,用于获取所述参考点的所述第一平面坐标和所述第二平面坐标;a coordinate acquisition module, configured to acquire the first plane coordinates and the second plane coordinates of the reference point;

第一计算模块,用于计算所述当前预测单元与所述最相邻预测单元的二维运动矢量差值;A first calculation module, configured to calculate a two-dimensional motion vector difference between the current prediction unit and the nearest neighbor prediction unit;

第二计算模块,用于根据所述二维运动矢量差值和所述第一平面坐标确定所述第三平面坐标,以及根据所述二维运动矢量差值和所述第二平面坐标确定所述第四平面坐标。A second calculation module, configured to determine the third plane coordinates according to the two-dimensional motion vector difference and the first plane coordinates, and determine the third plane coordinates according to the two-dimensional motion vector difference and the second plane coordinates Describe the fourth plane coordinates.

优选的,所述坐标转换单元具体用于:Preferably, the coordinate conversion unit is specifically used for:

基于公式z=Rcosθ计算所述球面坐标;formula based z=Rcosθ calculates the spherical coordinates;

其中,θ表示球面坐标的纬度,且 表示球面坐标的经度,且where θ represents the latitude in spherical coordinates, and denote the longitude in spherical coordinates, and

(u,v)表示所述参考点的平面坐标,H表示图像的高度,W表示图像的宽度,R表示所述参考点的深度。(u, v) represent the plane coordinates of the reference point, H represents the height of the image, W represents the width of the image, and R represents the depth of the reference point.

优选的,所述三维运动矢量计算单元,包括:Preferably, the three-dimensional motion vector calculation unit includes:

第三计算模块,用于根据所述第一平面坐标对应的第一球面坐标和所述第三平面坐标对应的第三球面坐标,计算第一三维运动矢量;A third calculation module, configured to calculate a first three-dimensional motion vector according to the first spherical coordinates corresponding to the first plane coordinates and the third spherical coordinates corresponding to the third plane coordinates;

第四计算模块,用于根据所述第二平面坐标对应的第二球面坐标和所述第四平面坐标对应的第四球面坐标,计算第二三维运动矢量;A fourth calculation module, configured to calculate a second three-dimensional motion vector according to the second spherical coordinates corresponding to the second plane coordinates and the fourth spherical coordinates corresponding to the fourth plane coordinates;

第五计算模块,用于利用所述第一三维运动矢量和所述第二三维运动矢量的相等性以及参考点在参考帧的当前预测单元中的预设深度分别确定参考点在当前帧的当前预测单元中的深度、在当前帧的最相邻预测单元中的深度以及在参考帧的最相邻预测单元中的深度;The fifth calculation module is used to respectively determine the current position of the reference point in the current prediction unit of the reference frame by using the equality of the first three-dimensional motion vector and the second three-dimensional motion vector and the preset depth of the reference point in the current prediction unit of the reference frame. the depth in the PU, the depth in the nearest PU of the current frame, and the depth in the nearest PU of the reference frame;

第六计算模块,用于根据参考点在参考帧的当前预测单元中的预设深度和参考点在当前帧的当前预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量;The sixth calculation module is used to calculate the three-dimensional motion vector of the current prediction unit in the three-dimensional space according to the preset depth of the reference point in the current prediction unit of the reference frame and the depth of the reference point in the current prediction unit of the current frame;

或根据参考点在参考帧的最相邻预测单元中的深度和参考点在当前帧的最相邻预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量。Or calculate the 3D motion vector of the current prediction unit in the 3D space according to the depth of the reference point in the most adjacent PU of the reference frame and the depth of the reference point in the most adjacent PU of the current frame.

优选的,所述编码单元包括;Preferably, the encoding unit includes;

第一代价函数计算模块,用于计算经过球坐标变换运动模型补偿后的所述当前预测单元的第一代价函数值;The first cost function calculation module is used to calculate the first cost function value of the current prediction unit after being compensated by the spherical coordinate transformation motion model;

第二代价函数计算模块,用于计算经过平动模型补偿后的所述当前预测单元的第二代价函数值;The second cost function calculation module is used to calculate the second cost function value of the current prediction unit after the compensation of the translation model;

比较模块,用于比较所述第一代价函数值和所述第二代价函数值,根据比较结果选取所述当前预测单元的补偿方式。A comparing module, configured to compare the first cost function value and the second cost function value, and select a compensation mode for the current prediction unit according to the comparison result.

经由上述技术方案可知,本申请公开了一种全景视频编码方法和装置。该方法将当前预测单元中的某个参考点在当前帧的当前预测单元、当前帧的最相邻预测单元、参考帧的当前预测单元以及参考帧的最相邻预测单元的平面坐标转换为球面坐标,从而根据参考点的球面坐标确定当前预测单元在三维空间内的三维运动矢量。进而,根据该三维运动矢量确定当前帧中当前预测单元的所有目标点在参考帧的对应目标参考点,并根据该目标参考点的像素对目标点像素进行补偿。与现有技术相比,本发明采用球面坐标系转换运动模型进行像素补偿,消除了视频中畸变带来的影响,从而提高视频编码效率。It can be known from the above technical solution that the present application discloses a panoramic video coding method and device. This method converts the plane coordinates of a reference point in the current prediction unit in the current prediction unit of the current frame, the nearest neighbor prediction unit of the current frame, the current prediction unit of the reference frame, and the nearest neighbor prediction unit of the reference frame into a spherical surface coordinates, so as to determine the three-dimensional motion vector of the current prediction unit in the three-dimensional space according to the spherical coordinates of the reference point. Furthermore, according to the three-dimensional motion vector, determine the corresponding target reference points of all the target points of the current prediction unit in the current frame in the reference frame, and compensate the target point pixels according to the pixels of the target reference points. Compared with the prior art, the present invention uses a spherical coordinate system to convert a motion model to perform pixel compensation, thereby eliminating the influence of distortion in video, thereby improving video coding efficiency.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.

图1示出了本发明一个实施例公开的一种全景视频编码方法的流程示意图;FIG. 1 shows a schematic flow diagram of a panoramic video encoding method disclosed in an embodiment of the present invention;

图2示出了本发明另一个实施例公开的一种最相邻预测单元位置图;Fig. 2 shows a position map of the nearest neighbor prediction unit disclosed by another embodiment of the present invention;

图3示出了一种球面模型示意图;Fig. 3 shows a schematic diagram of a spherical model;

图4示出了本发明另一个实施例公开的一种全景视频编码装置的结构示意图。Fig. 4 shows a schematic structural diagram of a panoramic video encoding device disclosed in another embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

参见图1示出了本发明一个实施例公开的一种全景视频编码方法的流程示意图。Referring to FIG. 1 , a schematic flowchart of a panoramic video encoding method disclosed by an embodiment of the present invention is shown.

在本实施例中,该方法包括:In this embodiment, the method includes:

由图1可知,该方法包括:As can be seen from Figure 1, the method includes:

S101:确定当前预测单元的最相邻预测单元。S101: Determine the most adjacent prediction unit of the current prediction unit.

对于一个预测单元,首先在它的领域进行搜索,搜索位置如图2所示的a0、a1、b0、b1和b2For a prediction unit, search is first performed in its domain, and the search positions are a 0 , a 1 , b 0 , b 1 and b 2 as shown in FIG. 2 .

首先比较当前预测单元的二维运动矢量与上述5个候选位置所在的预测单元的二维运动矢量。确定二维运动矢量距离最近的候选位置,将该候选位置所在的预测单元作为当前预测单元的最相邻预测单元。First, the two-dimensional motion vector of the current prediction unit is compared with the two-dimensional motion vectors of the prediction units where the above five candidate positions are located. Determine the candidate position with the closest distance to the two-dimensional motion vector, and use the prediction unit where the candidate position is located as the most adjacent prediction unit of the current prediction unit.

S102:获取参考点的第一平面坐标、第二平面坐标、第三平面坐标以及第四平面坐标。S102: Obtain first plane coordinates, second plane coordinates, third plane coordinates, and fourth plane coordinates of the reference point.

当前帧包含2个预测单元(当前预测单元以及最相邻预测单元),设参考点(通常选取预测单元中心点为参考点)在当前帧的当前预测单元中的坐标为第一平面坐标c1=(u1c,v1c),参考点在当前帧的最相邻单元中的坐标为第二平面坐标c2=(u2c,v2c),参考点在参考帧的当前预测单元中的坐标为第三平面坐标a1=(u1,v1),参考点在参考帧的最相邻预测单元中的坐标为第四平面坐标a1=(u1,v1)。The current frame contains 2 prediction units (the current prediction unit and the most adjacent prediction unit), and the coordinates of the reference point (usually the center point of the prediction unit is selected as the reference point) in the current prediction unit of the current frame is the first plane coordinate c 1 =(u 1c ,v 1c ), the coordinates of the reference point in the nearest neighbor unit of the current frame are the second plane coordinates c 2 =(u 2c ,v 2c ), the coordinates of the reference point in the current prediction unit of the reference frame is the third plane coordinate a 1 =(u 1 , v 1 ), and the coordinate of the reference point in the most adjacent prediction unit of the reference frame is the fourth plane coordinate a 1 =(u 1 , v 1 ).

S103:分别将所述第一平面坐标、所述第二平面坐标、所述第三平面坐标以及所述第四平面坐标转换为球面坐标。S103: Transform the first plane coordinates, the second plane coordinates, the third plane coordinates, and the fourth plane coordinates into spherical coordinates, respectively.

基于公式z=Rcosθ计算所述球面坐标。formula based z=Rcosθ calculates the spherical coordinates.

参见图3示出了一种球面模型示意图。其中,θ表示球面坐标的纬度,且 表示球面坐标的经度,且 Referring to Fig. 3, a schematic diagram of a spherical model is shown. where θ represents the latitude in spherical coordinates, and denote the longitude in spherical coordinates, and

(u,v)表示所述参考点的平面坐标,H表示图像的高度,W表示图像的宽度,R表示所述参考点的深度。(u, v) represent the plane coordinates of the reference point, H represents the height of the image, W represents the width of the image, and R represents the depth of the reference point.

我们可以很容易的用经纬图投影公式算出每一点的纬度θ和经度而4个点的深度未知,我们假设为ra1,ra2,rc1和rc2,那么就可以使用球坐标变换得到4个点在三维空间的坐标如下。We can easily calculate the latitude θ and longitude of each point by using the longitude-latitude map projection formula The depth of the four points is unknown, we assume r a1 , r a2 , r c1 and r c2 , then the coordinates of the four points in three-dimensional space can be obtained by using spherical coordinate transformation as follows.

S104:根据所述球面坐标计算所述当前预测单元在三维空间内的三维运动矢量。S104: Calculate a three-dimensional motion vector of the current prediction unit in three-dimensional space according to the spherical coordinates.

在本实施例中我们设定:a.一个预测单元中所有点共用一个深度。b.相邻预测单元的二维运动矢量如果相似,则它们应当对应于同一个物体。c.同一个物体上的点相对于相机的运动也是相同的。In this embodiment, we set: a. All points in one prediction unit share one depth. b. If the two-dimensional motion vectors of adjacent prediction units are similar, they should correspond to the same object. c. The movement of points on the same object relative to the camera is also the same.

基于上述三个设定,则可计算出由此可以计算出2个三维运动矢量且2个三维运动矢量是相等的:Based on the above three settings, it can be calculated that two three-dimensional motion vectors can be calculated and the two three-dimensional motion vectors are equal:

这样可以得到如下方程组In this way, the following equations can be obtained

ra1cosθa1-rc1cosθc1=ra2cosθa2-rc2cosθc2 r a1 cosθ a1 -r c1 cosθ c1 =r a2 cosθ a2 -r c2 cosθ c2

在这里我们规定ra1=1可以将上面的方程组写成矩阵形式:Here we stipulate r a1 = 1 to write the above equations in matrix form:

则:but:

r=Φ-1ar = Φ -1 a

可以看到,我们估计出的是当前PU的相对深度而不是绝对深度,但是相It can be seen that what we estimate is the relative depth of the current PU rather than the absolute depth, but the relative

对深度对于运动补偿已经足够了。当Φ不可逆时,令ra2=rc1=rc2=1。Depth is good enough for motion compensation. When Φ is irreversible, set r a2 =r c1 =r c2 =1.

估计出所有的深度后,可以计算出当前预测单元在三维空间的MVAfter estimating all the depths, the MV of the current prediction unit in the three-dimensional space can be calculated

value

Δz=rc1cosθc1-ra1cosθa1 Δz=r c1 cosθ c1 -r a1 cosθ a1

S105:对于当前帧的当前预测单元中所有目标点,根据所述三维运动矢量确定所述目标点在参考帧内对应的目标参考点。S105: For all target points in the current prediction unit of the current frame, determine target reference points corresponding to the target points in the reference frame according to the 3D motion vector.

对于当前帧的任一目标点p,使用球坐标变换得到三维空间的p3DFor any target point p in the current frame, use spherical coordinate transformation to obtain p 3D in three-dimensional space,

利用p3D加上就可以得到p点对于的目标参考点在参考帧上的坐标 Utilize p 3D Plus You can get the coordinates of the target reference point for point p on the reference frame

S106:利用所述目标参考点的像素对所述目标点像素进行补偿,以实现对所述当前预测单元的球坐标变换运动模型补偿。S106: Use the pixels of the target reference point to compensate the pixels of the target point, so as to realize the spherical coordinate transformation motion model compensation of the current prediction unit.

使用球坐标反变换,就可以得到参考帧中像素porg=(uorg,vorg):right Using the inverse transformation of spherical coordinates, we can get the pixel p org = (u org ,v org ) in the reference frame:

用得到的参考帧中的像素点porg的像素值对当前点p做补偿。这里,如果p(org)的坐标(u org,vorg)不是整数,则我们在参考帧上进行插值,得出p(org)的像素值。Compensate the current point p with the obtained pixel value of the pixel point p org in the reference frame. Here, if the coordinate (u org,vorg) of p(org) is not an integer, then we interpolate on the reference frame to get the pixel value of p(org).

S107:对所述当前预测单元进行编码。S107: Encode the current prediction unit.

具体的,计算经过球坐标变换运动模型补偿后的所述当前预测单元的第一代价函数值;Specifically, calculate the first cost function value of the current prediction unit after being compensated by the spherical coordinate transformation motion model;

计算经过平动模型补偿后的所述当前预测单元的第二代价函数值;Calculating the second cost function value of the current prediction unit after translation model compensation;

比较所述第一代价函数值和所述第二代价函数值,根据比较结果选取所述当前预测单元的补偿方式。Comparing the first cost function value and the second cost function value, and selecting a compensation mode for the current prediction unit according to the comparison result.

由以上实施例可知,本申请公开了一种全景视频编码方法。该方法将当前预测单元中的某个参考点在当前帧的当前预测单元、当前帧的最相邻预测单元、参考帧的当前预测单元以及参考帧的最相邻预测单元的平面坐标转换为球面坐标,从而根据参考点的球面坐标确定当前预测单元在三维空间内的三维运动矢量。进而,根据该三维运动矢量确定当前帧中当前预测单元的所有目标点在参考帧的对应目标参考点,并根据该目标参考点的像素对目标点像素进行补偿。与现有技术相比,本发明采用球面坐标系转换运动模型进行像素补偿,消除了视频中畸变带来的影响,从而提高视频编码效率。It can be known from the above embodiments that the present application discloses a panoramic video coding method. This method converts the plane coordinates of a reference point in the current prediction unit in the current prediction unit of the current frame, the nearest neighbor prediction unit of the current frame, the current prediction unit of the reference frame, and the nearest neighbor prediction unit of the reference frame into a spherical surface coordinates, so as to determine the three-dimensional motion vector of the current prediction unit in the three-dimensional space according to the spherical coordinates of the reference point. Furthermore, according to the three-dimensional motion vector, determine the corresponding target reference points of all the target points of the current prediction unit in the current frame in the reference frame, and compensate the target point pixels according to the pixels of the target reference points. Compared with the prior art, the present invention uses a spherical coordinate system to convert a motion model to perform pixel compensation, thereby eliminating the influence of distortion in video, thereby improving video coding efficiency.

需要说明的是,在上述实施例中,为了降低运算复杂度,在步骤S101确定当前预测单元和最相邻预测单元的二维运动矢量时,我们的二维运动矢量的搜索分为2次,第一次二维运动矢量搜索中使用平动模型来做运动补偿,第二次采用基于球坐标的模型,但是在第二次搜索时,我们以第一次搜索的运动矢量作为基础二维运动矢量,把第二次搜索的范围缩小到3×3像素大小的区域。另外如果第一次搜索的基础二维运动矢量满足如下条件:It should be noted that, in the above embodiment, in order to reduce the computational complexity, when determining the two-dimensional motion vectors of the current prediction unit and the most adjacent prediction unit in step S101, our two-dimensional motion vector search is divided into two times, The translation model is used for motion compensation in the first two-dimensional motion vector search, and the spherical coordinate-based model is used in the second time, but in the second search, we use the motion vector of the first search as the basic two-dimensional motion Vector, which narrows the scope of the second search to a 3×3 pixel area. In addition, if the basic two-dimensional motion vector of the first search satisfies the following conditions:

|Δu|+|Δv|≤4|Δu|+|Δv|≤4

就在第二次搜索时只做分数像素搜索。要说明的一点是我们采用的MV精度是1/4像素精度,不过我们做球坐标变换可以扩展为任意精度。Just do a fractional pixel search on the second search. One thing to note is that the MV precision we use is 1/4 pixel precision, but we can expand it to arbitrary precision when we do spherical coordinate transformation.

另外,在本发明公开的其他实施例中,一种特殊的模式称为合并模式(MergeMode),就是当前预测单元使用合并候选(Merge Candidate)位置的二维运动矢量,其中空域合并候选的位置也是图2中的5个位置,我们的模型中为了防止出现使用合并模式的预测单元选中的邻接预测单元始终为其合并候选,采用一种新的合并模式:In addition, in other embodiments disclosed in the present invention, a special mode is called merge mode (MergeMode), that is, the current prediction unit uses the two-dimensional motion vector of the position of the merge candidate (Merge Candidate), and the position of the merge candidate in the spatial domain is also In the five positions in Figure 2, in order to prevent the adjacent prediction unit selected by the prediction unit using the merge mode from always being a merge candidate in our model, a new merge mode is adopted:

如图2所示,如果当前预测单元用a1作为其最佳合并候选,意味着预测单元的二维运动矢量等于MV1。这就导致了a1所在的预测单元必然成为最相邻预测单元。As shown in Figure 2, if the current PU uses a 1 as its best merging candidate, it means that the 2D motion vector of the PU is equal to MV1. This leads to the fact that the prediction unit where a1 is located must become the most adjacent prediction unit.

为了避免这情况,我们不直接设置MV等于MV1,而是在其他的合并候选位置中搜索离MV1欧氏距离最近的MV,比如说是MV3,那么就用MV1,MV3来确定当前预测单元的的二维运动矢量,设为:In order to avoid this situation, we do not directly set MV equal to MV1, but search for the MV with the closest Euclidean distance to MV1 in other merging candidate positions, such as MV3, then use MV1 and MV3 to determine the current prediction unit. Two-dimensional motion vector, set to:

参见图4示出了本发明另一个实施例公开的一种全景视频编码装置的结构示意图。Referring to FIG. 4 , a schematic structural diagram of a panoramic video encoding device disclosed in another embodiment of the present invention is shown.

由图4可知,该装置包括:筛选单元1、坐标采集单元2、坐标转换单元3、三维运动矢量计算单元4、目标参考点确定单元5、补偿单元6以及编码单元7。As can be seen from FIG. 4 , the device includes: a screening unit 1 , a coordinate acquisition unit 2 , a coordinate conversion unit 3 , a three-dimensional motion vector calculation unit 4 , a target reference point determination unit 5 , a compensation unit 6 and an encoding unit 7 .

其中,筛选单元1用于确定当前预测单元的最相邻预测单元。Wherein, the screening unit 1 is used to determine the most adjacent prediction unit of the current prediction unit.

坐标采集单元2用于获取参考点的第一平面坐标、第二平面坐标、第三平面坐标以及第四平面坐标。The coordinate acquisition unit 2 is used to acquire the first plane coordinates, the second plane coordinates, the third plane coordinates and the fourth plane coordinates of the reference point.

其中,所述第一平面坐标为所述参考点在当前帧的当前预测单元中的坐标、所述第二平面坐标为所述参考点在当前帧的最相邻预测单元中的坐标,所述第三平面坐标为所述参考点在参考帧的当前预测单元中的坐标,所述第四平面坐标为所述参考点在参考帧的最相邻预测单元中的坐标;Wherein, the first plane coordinates are the coordinates of the reference point in the current prediction unit of the current frame, and the second plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the current frame, and the The third plane coordinates are the coordinates of the reference point in the current prediction unit of the reference frame, and the fourth plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the reference frame;

坐标转换单元3用于分别将所述第一平面坐标、所述第二平面坐标、所述第三平面坐标以及所述第四平面坐标转换为球面坐标。The coordinate conversion unit 3 is used to respectively convert the first plane coordinates, the second plane coordinates, the third plane coordinates and the fourth plane coordinates into spherical coordinates.

三维运动矢量计算单元4用于根据所述球面坐标计算所述当前预测单元在三维空间内的三维运动矢量。The 3D motion vector calculation unit 4 is configured to calculate a 3D motion vector of the current prediction unit in a 3D space according to the spherical coordinates.

目标参考点确定单元5用于对于当前帧的当前预测单元中所有目标点,根据所述三维运动矢量确定所述目标点在参考帧内对应的目标参考点。The target reference point determining unit 5 is used for determining, for all target points in the current prediction unit of the current frame, the target reference points corresponding to the target points in the reference frame according to the 3D motion vector.

补偿单元6用于利用所述目标参考点的像素对所述目标点像素进行补偿,以实现对所述当前预测单元的球坐标变换运动模型补偿.The compensation unit 6 is used to use the pixels of the target reference point to compensate the pixels of the target point, so as to realize the compensation of the spherical coordinate transformation motion model of the current prediction unit.

编码单元7用于对所述当前预测单元进行编码。The encoding unit 7 is configured to encode the current prediction unit.

具体的,所述筛选单元包括:Specifically, the screening unit includes:

二维运动矢量搜索模块,用于获取所述当前预测单元的二维运动矢量,以及多个相邻预测单元的二维运动矢量。A two-dimensional motion vector search module, configured to obtain the two-dimensional motion vector of the current prediction unit and the two-dimensional motion vectors of multiple adjacent prediction units.

比较模块,用于比较所述当前预测单元的二维运动矢量和相邻预测单元的二维运动矢量。A comparing module, configured to compare the two-dimensional motion vector of the current prediction unit with the two-dimensional motion vector of the adjacent prediction unit.

预测单元选取模块,用于将与所述当前预测单元二维运动矢量最近的相邻预测单元作为所述当前预测单元的最相邻预测单元。The prediction unit selection module is configured to use the adjacent prediction unit closest to the two-dimensional motion vector of the current prediction unit as the most adjacent prediction unit of the current prediction unit.

所述坐标采集单元包括:The coordinate acquisition unit includes:

坐标采集模块,用于获取所述参考点的所述第一平面坐标和所述第二平面坐标。A coordinate acquisition module, configured to acquire the first plane coordinates and the second plane coordinates of the reference point.

第一计算模块,用于计算所述当前预测单元与所述最相邻预测单元的二维运动矢量差值。A first calculation module, configured to calculate a two-dimensional motion vector difference between the current prediction unit and the nearest neighbor prediction unit.

第二计算模块,用于根据所述二维运动矢量差值和所述第一平面坐标确定所述第三平面坐标,以及根据所述二维运动矢量差值和所述第二平面坐标确定所述第四平面坐标。A second calculation module, configured to determine the third plane coordinates according to the two-dimensional motion vector difference and the first plane coordinates, and determine the third plane coordinates according to the two-dimensional motion vector difference and the second plane coordinates Describe the coordinates of the fourth plane.

所述坐标转换单元具体用于:The coordinate conversion unit is specifically used for:

基于公式z=Rcosθ计算所述球面坐标;formula based z=Rcosθ calculates the spherical coordinates;

其中,θ表示球面坐标的纬度,且 表示球面坐标的经度,且where θ represents the latitude in spherical coordinates, and denote the longitude in spherical coordinates, and

(u,v)表示所述参考点的平面坐标,H表示图像的高度,W表示图像的宽度,R表示所述参考点的深度。(u, v) represent the plane coordinates of the reference point, H represents the height of the image, W represents the width of the image, and R represents the depth of the reference point.

所述三维运动矢量计算单元,包括:The three-dimensional motion vector calculation unit includes:

第三计算模块,用于根据所述第一平面坐标对应的第一球面坐标和所述第三平面坐标对应的第三球面坐标,计算第一三维运动矢量。A third calculation module, configured to calculate a first three-dimensional motion vector according to the first spherical coordinates corresponding to the first plane coordinates and the third spherical coordinates corresponding to the third plane coordinates.

第四计算模块,用于根据所述第二平面坐标对应的第二球面坐标和所述第四平面坐标对应的第四球面坐标,计算第二三维运动矢量。A fourth calculation module, configured to calculate a second three-dimensional motion vector according to the second spherical coordinates corresponding to the second plane coordinates and the fourth spherical coordinates corresponding to the fourth plane coordinates.

第五计算模块,用于利用所述第一三维运动矢量和所述第二三维运动矢量的相等性以及参考点在参考帧的当前预测单元中的预设深度分别确定参考点在当前帧的当前预测单元中的深度、在当前帧的最相邻预测单元中的深度以及在参考帧的最相邻预测单元中的深度。The fifth calculation module is used to respectively determine the current position of the reference point in the current prediction unit of the reference frame by using the equality of the first three-dimensional motion vector and the second three-dimensional motion vector and the preset depth of the reference point in the current prediction unit of the reference frame. The depth in the PU, the depth in the nearest PU of the current frame, and the depth in the nearest PU of the reference frame.

第六计算模块,用于根据参考点在参考帧的当前预测单元中的预设深度和参考点在当前帧的当前预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量;或根据参考点在参考帧的最相邻预测单元中的深度和参考点在当前帧的最相邻预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量。The sixth calculation module is used to calculate the three-dimensional motion vector of the current prediction unit in the three-dimensional space according to the preset depth of the reference point in the current prediction unit of the reference frame and the depth of the reference point in the current prediction unit of the current frame; Or calculate the 3D motion vector of the current prediction unit in the 3D space according to the depth of the reference point in the most adjacent PU of the reference frame and the depth of the reference point in the most adjacent PU of the current frame.

所述编码单元包括;The encoding unit includes;

第一代价函数计算模块,用于计算经过球坐标变换运动模型补偿后的所述当前预测单元的第一代价函数值;The first cost function calculation module is used to calculate the first cost function value of the current prediction unit after being compensated by the spherical coordinate transformation motion model;

第二代价函数计算模块,用于计算经过平动模型补偿后的所述当前预测单元的第二代价函数值;The second cost function calculation module is used to calculate the second cost function value of the current prediction unit after the compensation of the translation model;

比较模块,用于比较所述第一代价函数值和所述第二代价函数值,根据比较结果选取所述当前预测单元的补偿方式。A comparing module, configured to compare the first cost function value and the second cost function value, and select a compensation mode for the current prediction unit according to the comparison result.

需要说明的是该装置实施例与方法实施例相对应,其执行过程和执行原理相同,在此不作赘述。It should be noted that the device embodiment corresponds to the method embodiment, and its execution process and execution principle are the same, so details are not repeated here.

最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first and second etc. are only used to distinguish one entity or operation from another, and do not necessarily require or imply that these entities or operations, any such actual relationship or order exists. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1.一种全景视频编码方法,其特征在于,包括:1. A panoramic video encoding method, comprising: 确定当前预测单元的最相邻预测单元;determining the most adjacent PU of the current PU; 获取参考点的第一平面坐标、第二平面坐标、第三平面坐标以及第四平面坐标;Acquiring the first plane coordinates, the second plane coordinates, the third plane coordinates and the fourth plane coordinates of the reference point; 其中,所述第一平面坐标为所述参考点在当前帧的当前预测单元中的坐标、所述第二平面坐标为所述参考点在当前帧的最相邻预测单元中的坐标,所述第三平面坐标为所述参考点在参考帧的当前预测单元中的坐标,所述第四平面坐标为所述参考点在参考帧的最相邻预测单元中的坐标;Wherein, the first plane coordinates are the coordinates of the reference point in the current prediction unit of the current frame, and the second plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the current frame, and the The third plane coordinates are the coordinates of the reference point in the current prediction unit of the reference frame, and the fourth plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the reference frame; 分别将所述第一平面坐标、所述第二平面坐标、所述第三平面坐标以及所述第四平面坐标转换为球面坐标,并根据所述球面坐标计算所述当前预测单元在三维空间内的三维运动矢量;converting the first plane coordinates, the second plane coordinates, the third plane coordinates, and the fourth plane coordinates into spherical coordinates, and calculating the current prediction unit in the three-dimensional space according to the spherical coordinates The three-dimensional motion vector; 对于当前帧的当前预测单元中所有目标点,根据所述三维运动矢量确定所述目标点在参考帧内对应的目标参考点;For all target points in the current prediction unit of the current frame, determine a target reference point corresponding to the target point in the reference frame according to the three-dimensional motion vector; 利用所述目标参考点的像素对所述目标点像素进行补偿,以实现对所述当前预测单元的球坐标变换运动模型补偿;Using the pixels of the target reference point to compensate the pixels of the target point, so as to realize the spherical coordinate transformation motion model compensation of the current prediction unit; 对所述当前预测单元进行编码;encoding the current prediction unit; 其中,所述确定当前预测单元的最相邻预测单元,包括:Wherein, the determining the most adjacent prediction unit of the current prediction unit includes: 获取所述当前预测单元的二维运动矢量,以及多个相邻预测单元的二维运动矢量;Acquiring a two-dimensional motion vector of the current prediction unit and two-dimensional motion vectors of multiple adjacent prediction units; 比较所述当前预测单元的二维运动矢量和相邻预测单元的二维运动矢量;comparing the two-dimensional motion vector of the current prediction unit with the two-dimensional motion vector of the adjacent prediction unit; 将与所述当前预测单元二维运动矢量最近的相邻预测单元作为所述当前预测单元的最相邻预测单元。Taking the neighboring prediction unit closest to the two-dimensional motion vector of the current prediction unit as the nearest neighboring prediction unit of the current prediction unit. 2.根据权利要求1所述的方法,其特征在于,所述获取参考点的第一平面坐标、第二平面坐标、第三平面坐标以及第四平面坐标,包括:2. The method according to claim 1, wherein said obtaining the first plane coordinates, the second plane coordinates, the third plane coordinates and the fourth plane coordinates of the reference point comprises: 获取所述参考点的所述第一平面坐标和所述第二平面坐标;acquiring the first plane coordinates and the second plane coordinates of the reference point; 计算所述当前预测单元与所述最相邻预测单元的二维运动矢量差值;calculating a two-dimensional motion vector difference between the current prediction unit and the nearest neighbor prediction unit; 根据所述二维运动矢量差值和所述第一平面坐标确定所述第三平面坐标,以及根据所述二维运动矢量差值和所述第二平面坐标确定所述第四平面坐标。The third plane coordinate is determined according to the two-dimensional motion vector difference and the first plane coordinate, and the fourth plane coordinate is determined according to the two-dimensional motion vector difference and the second plane coordinate. 3.根据权利要求1所述的方法,其特征在于,所述分别将所述第一平面坐标、所述第二平面坐标、所述第三平面坐标以及所述第四平面坐标转换为球面坐标,包括:3. The method according to claim 1, wherein said converting said first plane coordinates, said second plane coordinates, said third plane coordinates and said fourth plane coordinates into spherical coordinates respectively ,include: 基于公式z=Rcosθ计算所述球面坐标;formula based z=Rcosθ calculates the spherical coordinates; 其中,θ表示球面坐标的纬度,且 表示球面坐标的经度,且 where θ represents the latitude in spherical coordinates, and denote the longitude in spherical coordinates, and (u,v)表示所述参考点的平面坐标,H表示图像的高度,W表示图像的宽度,R表示所述参考点的深度。(u, v) represent the plane coordinates of the reference point, H represents the height of the image, W represents the width of the image, and R represents the depth of the reference point. 4.根据权利要求3所述的方法,其特征在于,所述根据所述球面坐标计算所述当前预测单元在三维空间内的三维运动矢量,包括:4. The method according to claim 3, wherein the calculating the three-dimensional motion vector of the current prediction unit in three-dimensional space according to the spherical coordinates comprises: 根据所述第一平面坐标对应的第一球面坐标和所述第三平面坐标对应的第三球面坐标,计算第一三维运动矢量;calculating a first three-dimensional motion vector according to the first spherical coordinates corresponding to the first plane coordinates and the third spherical coordinates corresponding to the third plane coordinates; 根据所述第二平面坐标对应的第二球面坐标和所述第四平面坐标对应的第四球面坐标,计算第二三维运动矢量;calculating a second three-dimensional motion vector according to the second spherical coordinates corresponding to the second plane coordinates and the fourth spherical coordinates corresponding to the fourth plane coordinates; 利用所述第一三维运动矢量和所述第二三维运动矢量的相等性以及参考点在参考帧的当前预测单元中的预设深度分别确定参考点在当前帧的当前预测单元中的深度、在当前帧的最相邻预测单元中的深度以及在参考帧的最相邻预测单元中的深度;Using the equality of the first 3D motion vector and the second 3D motion vector and the preset depth of the reference point in the current prediction unit of the reference frame to respectively determine the depth of the reference point in the current prediction unit of the current frame, in the depth in the nearest PU of the current frame and the depth in the nearest PU of the reference frame; 根据参考点在参考帧的当前预测单元中的预设深度和参考点在当前帧的当前预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量;calculating a three-dimensional motion vector of the current prediction unit in three-dimensional space according to a preset depth of the reference point in the current prediction unit of the reference frame and a depth of the reference point in the current prediction unit of the current frame; 或根据参考点在参考帧的最相邻预测单元中的深度和参考点在当前帧的最相邻预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量。Or calculate the 3D motion vector of the current prediction unit in the 3D space according to the depth of the reference point in the most adjacent PU of the reference frame and the depth of the reference point in the most adjacent PU of the current frame. 5.根据权利要求1所述的方法,其特征在于,所述对所述当前预测单元进行编码,包括;5. The method according to claim 1, wherein said encoding said current prediction unit comprises; 计算经过球坐标变换运动模型补偿后的所述当前预测单元的第一代价函数值;Calculating the first cost function value of the current prediction unit after spherical coordinate transformation motion model compensation; 计算经过平动模型补偿后的所述当前预测单元的第二代价函数值;Calculating the second cost function value of the current prediction unit after translation model compensation; 比较所述第一代价函数值和所述第二代价函数值,根据比较结果选取所述当前预测单元的补偿方式。Comparing the first cost function value and the second cost function value, and selecting a compensation mode for the current prediction unit according to the comparison result. 6.一种全景视频编码装置,其特征在于,包括:6. A panoramic video encoding device, comprising: 筛选单元,用于确定当前预测单元的最相邻预测单元;screening unit, used to determine the most adjacent prediction unit of the current prediction unit; 坐标采集单元,用于获取参考点的第一平面坐标、第二平面坐标、第三平面坐标以及第四平面坐标;a coordinate acquisition unit, configured to acquire the first plane coordinates, the second plane coordinates, the third plane coordinates and the fourth plane coordinates of the reference point; 其中,所述第一平面坐标为所述参考点在当前帧的当前预测单元中的坐标、所述第二平面坐标为所述参考点在当前帧的最相邻预测单元中的坐标,所述第三平面坐标为所述参考点在参考帧的当前预测单元中的坐标,所述第四平面坐标为所述参考点在参考帧的最相邻预测单元中的坐标;坐标转换单元,用于分别将所述第一平面坐标、所述第二平面坐标、所述第三平面坐标以及所述第四平面坐标转换为球面坐标;Wherein, the first plane coordinates are the coordinates of the reference point in the current prediction unit of the current frame, and the second plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the current frame, and the The third plane coordinates are the coordinates of the reference point in the current prediction unit of the reference frame, and the fourth plane coordinates are the coordinates of the reference point in the most adjacent prediction unit of the reference frame; the coordinate conversion unit is configured to respectively converting the first plane coordinates, the second plane coordinates, the third plane coordinates, and the fourth plane coordinates into spherical coordinates; 三维运动矢量计算单元,用于根据所述球面坐标计算所述当前预测单元在三维空间内的三维运动矢量;A three-dimensional motion vector calculation unit, configured to calculate the three-dimensional motion vector of the current prediction unit in three-dimensional space according to the spherical coordinates; 目标参考点确定单元,用于对于当前帧的当前预测单元中所有目标点,根据所述三维运动矢量确定所述目标点在参考帧内对应的目标参考点;A target reference point determination unit, configured to, for all target points in the current prediction unit of the current frame, determine the target reference point corresponding to the target point in the reference frame according to the three-dimensional motion vector; 补偿单元,用于利用所述目标参考点的像素对所述目标点像素进行补偿,以实现对所述当前预测单元的球坐标变换运动模型补偿;A compensation unit, configured to use the pixels of the target reference point to compensate the pixels of the target point, so as to realize the compensation of the spherical coordinate transformation motion model of the current prediction unit; 编码单元,用于对所述当前预测单元进行编码;a coding unit, configured to code the current prediction unit; 其中,所述筛选单元包括:Wherein, the screening unit includes: 二维运动矢量搜索模块,用于获取所述当前预测单元的二维运动矢量,以及多个相邻预测单元的二维运动矢量;A two-dimensional motion vector search module, configured to obtain the two-dimensional motion vector of the current prediction unit and the two-dimensional motion vectors of multiple adjacent prediction units; 比较模块,用于比较所述当前预测单元的二维运动矢量和相邻预测单元的二维运动矢量;A comparison module, configured to compare the two-dimensional motion vector of the current prediction unit with the two-dimensional motion vector of the adjacent prediction unit; 预测单元选取模块,用于将与所述当前预测单元二维运动矢量最近的相邻预测单元作为所述当前预测单元的最相邻预测单元。The prediction unit selection module is configured to use the adjacent prediction unit closest to the two-dimensional motion vector of the current prediction unit as the most adjacent prediction unit of the current prediction unit. 7.根据权利要求6所述的装置,其特征在于,所述坐标采集单元包括:7. The device according to claim 6, wherein the coordinate acquisition unit comprises: 坐标采集模块,用于获取所述参考点的所述第一平面坐标和所述第二平面坐标;a coordinate acquisition module, configured to acquire the first plane coordinates and the second plane coordinates of the reference point; 第一计算模块,用于计算所述当前预测单元与所述最相邻预测单元的二维运动矢量差值;A first calculation module, configured to calculate a two-dimensional motion vector difference between the current prediction unit and the nearest neighbor prediction unit; 第二计算模块,用于根据所述二维运动矢量差值和所述第一平面坐标确定所述第三平面坐标,以及根据所述二维运动矢量差值和所述第二平面坐标确定所述第四平面坐标。A second calculation module, configured to determine the third plane coordinates according to the two-dimensional motion vector difference and the first plane coordinates, and determine the third plane coordinates according to the two-dimensional motion vector difference and the second plane coordinates Describe the coordinates of the fourth plane. 8.根据权利要求6所述的装置,其特征在于,所述坐标转换单元具体用于:8. The device according to claim 6, wherein the coordinate conversion unit is specifically used for: 基于公式z=Rcosθ计算所述球面坐标;formula based z=Rcosθ calculates the spherical coordinates; 其中,θ表示球面坐标的纬度,且 表示球面坐标的经度,且 where θ represents the latitude in spherical coordinates, and denote the longitude in spherical coordinates, and (u,v)表示所述参考点的平面坐标,H表示图像的高度,W表示图像的宽度,R表示所述参考点的深度。(u, v) represent the plane coordinates of the reference point, H represents the height of the image, W represents the width of the image, and R represents the depth of the reference point. 9.根据权利要求6所述的装置,其特征在于,所述三维运动矢量计算单元,包括:9. The device according to claim 6, wherein the three-dimensional motion vector calculation unit comprises: 第三计算模块,用于根据所述第一平面坐标对应的第一球面坐标和所述第三平面坐标对应的第三球面坐标,计算第一三维运动矢量;A third calculation module, configured to calculate a first three-dimensional motion vector according to the first spherical coordinates corresponding to the first plane coordinates and the third spherical coordinates corresponding to the third plane coordinates; 第四计算模块,用于根据所述第二平面坐标对应的第二球面坐标和所述第四平面坐标对应的第四球面坐标,计算第二三维运动矢量;A fourth calculation module, configured to calculate a second three-dimensional motion vector according to the second spherical coordinates corresponding to the second plane coordinates and the fourth spherical coordinates corresponding to the fourth plane coordinates; 第五计算模块,用于利用所述第一三维运动矢量和所述第二三维运动矢量的相等性以及参考点在参考帧的当前预测单元中的预设深度分别确定参考点在当前帧的当前预测单元中的深度、在当前帧的最相邻预测单元中的深度以及在参考帧的最相邻预测单元中的深度;The fifth calculation module is used to respectively determine the current position of the reference point in the current prediction unit of the reference frame by using the equality of the first three-dimensional motion vector and the second three-dimensional motion vector and the preset depth of the reference point in the current prediction unit of the reference frame. the depth in the PU, the depth in the nearest PU of the current frame, and the depth in the nearest PU of the reference frame; 第六计算模块,用于根据参考点在参考帧的当前预测单元中的预设深度和参考点在当前帧的当前预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量;The sixth calculation module is used to calculate the three-dimensional motion vector of the current prediction unit in the three-dimensional space according to the preset depth of the reference point in the current prediction unit of the reference frame and the depth of the reference point in the current prediction unit of the current frame; 或根据参考点在参考帧的最相邻预测单元中的深度和参考点在当前帧的最相邻预测单元中的深度计算所述当前预测单元在三维空间内的三维运动矢量。Or calculate the 3D motion vector of the current prediction unit in the 3D space according to the depth of the reference point in the most adjacent PU of the reference frame and the depth of the reference point in the most adjacent PU of the current frame. 10.根据权利要求6所述的装置,其特征在于,所述编码单元包括;10. The device according to claim 6, wherein the encoding unit comprises; 第一代价函数计算模块,用于计算经过球坐标变换运动模型补偿后的所述当前预测单元的第一代价函数值;The first cost function calculation module is used to calculate the first cost function value of the current prediction unit after being compensated by the spherical coordinate transformation motion model; 第二代价函数计算模块,用于计算经过平动模型补偿后的所述当前预测单元的第二代价函数值;The second cost function calculation module is used to calculate the second cost function value of the current prediction unit after the compensation of the translation model; 比较模块,用于比较所述第一代价函数值和所述第二代价函数值,根据比较结果选取所述当前预测单元的补偿方式。A comparing module, configured to compare the first cost function value and the second cost function value, and select a compensation mode for the current prediction unit according to the comparison result.
CN201710294859.1A 2017-04-28 2017-04-28 A kind of panorama video code method and apparatus Active CN107135397B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710294859.1A CN107135397B (en) 2017-04-28 2017-04-28 A kind of panorama video code method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710294859.1A CN107135397B (en) 2017-04-28 2017-04-28 A kind of panorama video code method and apparatus

Publications (2)

Publication Number Publication Date
CN107135397A CN107135397A (en) 2017-09-05
CN107135397B true CN107135397B (en) 2018-07-06

Family

ID=59715417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710294859.1A Active CN107135397B (en) 2017-04-28 2017-04-28 A kind of panorama video code method and apparatus

Country Status (1)

Country Link
CN (1) CN107135397B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707899B (en) * 2017-10-19 2019-05-10 中科创达软件股份有限公司 Multi-view image processing method, device and electronic equipment comprising moving target
CN108886616A (en) * 2017-12-27 2018-11-23 深圳市大疆创新科技有限公司 The method, apparatus and computer system of Video coding
CN108347611B (en) * 2018-03-02 2021-02-02 电子科技大学 Optimization method of coding block-level Lagrange multiplier for theodolite
CN108492322B (en) * 2018-04-04 2022-04-22 南京大学 Method for predicting user view field based on deep learning
CN110675401B (en) * 2018-07-02 2023-07-11 浙江大学 A panoramic image pixel block filtering method and device
CN110771165A (en) * 2018-08-01 2020-02-07 深圳市大疆创新科技有限公司 Image processing method and apparatus
CN109874019A (en) * 2019-03-26 2019-06-11 深圳大学 A method for unequal error protection to assist wireless panoramic video in the area of interest

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105554506A (en) * 2016-01-19 2016-05-04 北京大学深圳研究生院 Panorama video coding, decoding method and device based on multimode boundary filling
CN105812759A (en) * 2016-04-15 2016-07-27 杭州当虹科技有限公司 Planar projection method and coding method of 360-degree panoramic video
CN106254874A (en) * 2016-09-19 2016-12-21 上海国茂数字技术有限公司 A kind of panorama video code method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101540902B (en) * 2008-03-20 2011-02-02 华为技术有限公司 Method and device for scaling motion vectors, and method and system for coding/decoding
KR101055411B1 (en) * 2010-03-12 2011-08-09 이상원 Stereoscopic image generation method and apparatus
CN104125463A (en) * 2013-04-26 2014-10-29 华为技术有限公司 Image predictive coding method and image encoder
US10750153B2 (en) * 2014-09-22 2020-08-18 Samsung Electronics Company, Ltd. Camera system for three-dimensional video
CN105100546A (en) * 2014-12-31 2015-11-25 天津航天中为数据系统科技有限公司 Motion estimation method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105554506A (en) * 2016-01-19 2016-05-04 北京大学深圳研究生院 Panorama video coding, decoding method and device based on multimode boundary filling
CN105812759A (en) * 2016-04-15 2016-07-27 杭州当虹科技有限公司 Planar projection method and coding method of 360-degree panoramic video
CN106254874A (en) * 2016-09-19 2016-12-21 上海国茂数字技术有限公司 A kind of panorama video code method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Motion estimation and compensation for fisheye warped video;GuoXin Jin,Ankur Saxena,Madhukar Budagavi;《2015 IEEE International Conference on Image Processing(ICIP)》;20150930;全文 *

Also Published As

Publication number Publication date
CN107135397A (en) 2017-09-05

Similar Documents

Publication Publication Date Title
CN107135397B (en) A kind of panorama video code method and apparatus
US10872432B2 (en) Disparity estimation device, disparity estimation method, and program
US8194184B2 (en) Method and apparatus for increasing the frame rate of a video signal
KR101131756B1 (en) Mesh-based video compression with domain transformation
CN103106688B (en) Based on the indoor method for reconstructing three-dimensional scene of double-deck method for registering
CN101483770B (en) Method and apparatus for encoding and decoding
CN105681805B (en) Video coding, coding/decoding method and its inter-frame prediction method and device
JP5238220B2 (en) Resolution conversion apparatus, method and program
TW201514867A (en) Optical flow tracking method and apparatus
US9214025B2 (en) Depth estimation using normalized displacement of image pairs
CN110310365B (en) Three-dimensional reconstruction method and device
CN108074250B (en) Matching cost calculation method and device
JP4323380B2 (en) Motion estimation for compression of calibrated multi-view image sequences
US20190110060A1 (en) A video encoding and decoding method, and its inter-frame prediction method, device and system thereof
JP4941565B2 (en) Corresponding point search apparatus and corresponding point searching method
WO2009089785A1 (en) Image processing method, encoding/decoding method and apparatus
CN113436269B (en) Image dense stereo matching method, device and computer equipment
Eichenseer et al. Motion estimation for fisheye video with an application to temporal resolution enhancement
CN105989590A (en) Stereoscopic matching method and device
Nagy et al. Development of an omnidirectional stereo vision system
CN109741389B (en) A Local Stereo Matching Method Based on Region-Based Matching
JP2019067169A (en) Moving vector calculation method, device, program, and moving vector calculation method including noise cancellation processing
CN106920213A (en) The acquisition methods and system of a kind of high-definition picture
JP4605716B2 (en) Multi-view image compression encoding method, apparatus, and program
JP2017224169A (en) Distance image resolution conversion device, distance image resolution conversion method, and computer program

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