CN102790892A - Depth map coding method and device - Google Patents
Depth map coding method and device Download PDFInfo
- Publication number
- CN102790892A CN102790892A CN2012102322123A CN201210232212A CN102790892A CN 102790892 A CN102790892 A CN 102790892A CN 2012102322123 A CN2012102322123 A CN 2012102322123A CN 201210232212 A CN201210232212 A CN 201210232212A CN 102790892 A CN102790892 A CN 102790892A
- Authority
- CN
- China
- Prior art keywords
- depth
- coding
- distortion cost
- macroblock
- inter
- 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.)
- Granted
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明提出一种深度图编码方法及装置,该方法包括:建立多个划分线并组成划分集合,多个划分线用于对深度宏块进行楔形划分;以帧内编码模式对深度宏块进行编码得到第一率失真代价值;判断是否以帧间编码模式对深度宏块进行编码,如果是则以帧间编码模式进行编码得到第二率失真代价值;继续判断深度宏块是否包含不连续的运动向量场,如果是则以几何划分编码模式对深度宏块进行编码,包括:选择最优划分线对深度宏块进行划分得到第一和第二深度子区域,对两个子区域进行预测编码获取第三率失真代价值;比较不同编码模式下的率失真代价值以选择率失真代价最小的编码模式对进行编码。本发明的实施例提高深度图压缩效率、降低编码复杂度。
The present invention proposes a depth map encoding method and device, the method comprising: establishing a plurality of division lines and forming a division set, and the plurality of division lines are used for wedge-shaped division of depth macroblocks; performing intra-coding mode on depth macroblocks Encoding to obtain the first rate-distortion cost value; judge whether to encode the depth macroblock in inter-frame coding mode, and if so, encode in inter-frame coding mode to obtain the second rate-distortion cost value; continue to judge whether the depth macroblock contains discontinuity If yes, encode the depth macroblock in the geometric division coding mode, including: select the optimal division line to divide the depth macroblock to obtain the first and second depth sub-regions, and perform predictive coding on the two sub-regions Obtain a third rate-distortion cost value; compare the rate-distortion cost values in different coding modes to select a coding mode pair with the smallest rate-distortion cost for coding. The embodiments of the present invention improve the compression efficiency of the depth map and reduce the coding complexity.
Description
技术领域 technical field
本发明涉及视频编码技术领域,特别涉及一种深度图编码方法和装置。The present invention relates to the technical field of video coding, in particular to a depth map coding method and device.
背景技术 Background technique
在立体视频以及自由视点视频系统中,由多视点视频和多视点深度图构成的数据格式获得了广泛的应用。其中,深度是指视频帧中每个像素点对应到三维空间中的点到相机平面的距离。在立体视频中,为了通过虚拟视点绘制获得用户期望观看的视点所对应的视频信息,我们需要获得每一个视频帧所对应的深度图。因此,立体视频序列通常包含多路彩色视频信息以及每一路彩色视频所对应的深度图序列。由于深度图中每个像素点的深度信息为0-255之间的一个整数值,因此深度图可以被看作是一系列灰度图像所组成的视频序列。为了有效的存储和传输海量的立体视频数据,立体视频系统通常采用多视点视频编码方法对多视点视频和深度图序列分别进行压缩。通过视点内和视间预测编码,多视点视频编码方法能够有效地压缩多路深度图之间的冗余。In stereoscopic video and free-viewpoint video systems, the data format composed of multi-viewpoint video and multi-viewpoint depth map has been widely used. Wherein, the depth refers to the distance from each pixel in the video frame corresponding to a point in the three-dimensional space to the camera plane. In stereoscopic video, in order to obtain the video information corresponding to the viewpoint that the user expects to watch through virtual viewpoint rendering, we need to obtain the depth map corresponding to each video frame. Therefore, a stereoscopic video sequence usually includes multiple channels of color video information and a depth map sequence corresponding to each channel of color video. Since the depth information of each pixel in the depth map is an integer value between 0 and 255, the depth map can be regarded as a video sequence composed of a series of grayscale images. In order to effectively store and transmit massive stereoscopic video data, stereoscopic video systems usually use multi-view video coding methods to compress multi-view video and depth map sequences respectively. Through intra-view and inter-view predictive coding, multi-view video coding methods can effectively compress the redundancy between multiple depth maps.
传统的多视点视频编码方法是基于H.264/MPEG-4编码标准上的一种多视点视频编码拓展方案。在传统的多视点视频编码中,编码器以宏块为单元对每一帧图像进行编码。每一个16×16大小的宏块又可以被进一步被划分成16×8、8×16和8×8子块以及8×4、4×8和4×4的亚块。不同的子块和亚块被称为预测单元。在编码过程中,编码器对每一个预测单元进行运动估计,获得运动补偿预测的率失真代价。然后进行基于率失真优化的模式选择,获得每个块最优的编码模式和预测残差,并对残差进行变换编码。实验证明,传统的多视点视频编码能够在深度图上获得较好的压缩性能。The traditional multi-view video coding method is a multi-view video coding extension scheme based on the H.264/MPEG-4 coding standard. In traditional multi-view video coding, the encoder codes each frame of image in units of macroblocks. Each 16×16 macroblock can be further divided into 16×8, 8×16 and 8×8 sub-blocks and 8×4, 4×8 and 4×4 sub-blocks. The different sub-blocks and sub-blocks are called prediction units. During the encoding process, the encoder performs motion estimation on each prediction unit to obtain the rate-distortion cost of motion compensation prediction. Then, mode selection based on rate-distortion optimization is performed to obtain the optimal coding mode and prediction residual for each block, and transform coding is performed on the residual. Experiments show that traditional multi-view video coding can achieve better compression performance on depth maps.
区别于传统的彩色视频,深度图仅包含每个像素点的距离信息,不包含任何视频纹理信息。因此,深度图中处于物体内部的编码宏块仅包含均一的深度纹理,处在物体边缘的编码宏块则包含两个或多个不连续的深度区域。传统的宏块划分无法有效地表示物体边缘。尤其是在低编码码率的条件下,通过划分得到的子块和亚块模式较少被选用。然而,采用传统的多视点视频编码方法对深度图编码时,编码器仍然需要对所有的宏块模式进行运动估计和模式决策。该过程需要消耗大量的计算资源,增大了编码端的复杂度。Different from traditional color video, the depth map only contains the distance information of each pixel and does not contain any video texture information. Therefore, the coded macroblocks inside the object in the depth map only contain a uniform depth texture, and the coded macroblocks on the edge of the object contain two or more discontinuous depth regions. Traditional macroblock division cannot effectively represent object edges. Especially under the condition of low coding rate, sub-blocks and sub-block patterns obtained by division are rarely selected. However, when encoding depth maps using traditional multi-view video coding methods, the encoder still needs to perform motion estimation and mode decisions for all macroblock modes. This process consumes a large amount of computing resources, which increases the complexity of the encoding side.
为了获得较高的深度图压缩效率,需要针对深度图的特点设计更加高效的编码方法。为此,本发明针对深度图仅包含物体轮廓信息这一特征,提出一种基于几何划分的深度图编码方法。通过对包含不连续运动场的深度宏块进行自适应几何划分,获得了较好的预测结果。从而提高深度图编码的效率,同时降低深度图编码的复杂度。In order to obtain a higher depth image compression efficiency, it is necessary to design a more efficient encoding method according to the characteristics of the depth image. For this reason, the present invention proposes a depth map encoding method based on geometrical division, aiming at the feature that the depth map only contains object outline information. Better prediction results are obtained by adaptive geometric partitioning of depth macroblocks containing discontinuous motion fields. Thereby, the efficiency of depth map coding is improved, and the complexity of depth map coding is reduced at the same time.
目前可以查到的与本发明比较相关的专利有四项,分别公开了一种应用于3DTV与FTV系统的深度图编码压缩方法,一种立体电视系统中深度图像编码方法,一种立体电视系统中深度图像的编码方法和一种多视点深度视频的编码方法,申请号分别为200810063741.9,200810161597.2,200810120082.8和200910154138.6。尽管所提及的四个专利均涉及立体视频中深度图的编码方法,但是第一、第二以及第三项专利均分别仅提出了一种对不同区域的深度宏块采用不同的量化参数的编码方案。区别在于这三个方案设计了不同的深度宏块分类方法;第四项专利则对不同的区域的深度宏块的编码模式进行了限定,对于物体边缘区域的深度宏块设定较多的编码模式,而对非物体边缘区域的深度宏块设定较少的编码模式。然而该发明中所有的编码模式对应的预测单元仍然是基于传统的H.264/MPEG-4 AVC编码标准中所规定的划分方法获得。因此,所提及的四个专利均未涉及基于几何划分的深度图编码方法。At present, there are four patents related to the present invention that can be found, respectively disclosing a depth image encoding and compression method applied to 3DTV and FTV systems, a depth image encoding method in a stereoscopic television system, and a stereoscopic television system. A coding method for mid-depth images and a coding method for multi-view depth video, the application numbers are 200810063741.9, 200810161597.2, 200810120082.8 and 200910154138.6, respectively. Although the four mentioned patents are all related to the coding method of the depth map in stereoscopic video, the first, second and third patents only propose a method of using different quantization parameters for depth macroblocks in different regions. encoding scheme. The difference is that these three schemes design different depth macroblock classification methods; the fourth patent limits the coding modes of depth macroblocks in different areas, and sets more coding modes for depth macroblocks in object edge areas. mode, and fewer coding modes are set for depth macroblocks in non-object edge regions. However, the prediction units corresponding to all coding modes in this invention are still obtained based on the division method specified in the traditional H.264/MPEG-4 AVC coding standard. Therefore, none of the four mentioned patents deals with geometric partition-based coding methods for depth maps.
发明内容 Contents of the invention
本发明旨在至少解决上述技术问题之一。The present invention aims to solve at least one of the above-mentioned technical problems.
为此,本发明的一个目的在于提出一种能够提高深度图压缩效率且降低深度图的编码复杂度的深度图编码方法。Therefore, an object of the present invention is to propose a depth map encoding method that can improve the compression efficiency of the depth map and reduce the coding complexity of the depth map.
本发明的另一目的在于提出一种深度图编码装置。Another object of the present invention is to provide a depth map encoding device.
为了实现上述目的,本发明第一方面的实施例提出了一种深度图编码方法,包括以下步骤:建立多个划分线并组成划分集合,其中,多个划分线用于对深度宏块进行楔形划分;以帧内编码模式对深度宏块进行编码以获取对应的第一率失真代价值;判断是否以帧间编码模式对所述深度宏块进行编码,如果是则以帧间编码模式对所述深度宏块进行编码以获取对应的第二率失真代价值;继续判断所述深度宏块是否包含不连续的运动向量场,如果所述深度宏块进行帧间编码且包含不连续的运动向量场,则以几何划分编码模式对所述深度宏块进行编码,其中,所述几何划分编码模式进一步包括:根据所述深度宏块的所有像素点的亮度信息从所述划分集合中选择最优划分线对所述深度宏块进行划分以得到第一和第二深度子区域,且分别对所述第一和第二深度子区域进行运动估计和预测编码以获取对应的第三率失真代价值;以及比较不同编码模式下深度宏块的率失真代价值,以根据比较结果选择率失真代价最小的编码模式对所述深度宏块进行编码。In order to achieve the above object, the embodiment of the first aspect of the present invention proposes a depth map encoding method, including the following steps: establishing a plurality of division lines and forming a division set, wherein the plurality of division lines are used to wedge the depth macroblock Divide; encode the depth macroblock in intra-frame coding mode to obtain the corresponding first rate-distortion cost value; judge whether to code the depth macroblock in inter-frame coding mode, and if so, use inter-frame coding mode to encode all The depth macroblock is encoded to obtain the corresponding second rate-distortion cost value; continue to judge whether the depth macroblock contains a discontinuous motion vector field, if the depth macroblock is inter-coded and contains discontinuous motion vectors field, the depth macroblock is coded in a geometric partition coding mode, wherein the geometric partition coding mode further includes: selecting the optimal partition set from the partition set according to the brightness information of all pixels of the depth macroblock The division line divides the depth macroblock to obtain first and second depth sub-regions, and respectively performs motion estimation and predictive coding on the first and second depth sub-regions to obtain corresponding third rate-distortion cost values ; and comparing the rate-distortion cost values of the depth macroblocks in different coding modes, so as to select the coding mode with the smallest rate-distortion cost according to the comparison result to encode the depth macroblocks.
另外,根据本发明上述实施例的深度图编码方法还可以具有如下附加的技术特征:In addition, the depth map coding method according to the above-mentioned embodiments of the present invention may also have the following additional technical features:
在一些示例中,所述划分集合为:In some examples, the set of partitions is:
G={ξ(ρi,θi)|i=1,2,…,L},G={ξ(ρ i ,θ i )|i=1,2,…,L},
其中,ξ(ρi,θi)为所述划分线集合中的第i条划分线,ρi为深度宏块至该划分线的距离,θi为该划分线与第一方向的夹角,L为划分线的个数。Wherein, ξ(ρ i , θ i ) is the i-th dividing line in the set of dividing lines, ρ i is the distance from the depth macroblock to the dividing line, and θ i is the angle between the dividing line and the first direction , L is the number of dividing lines.
在一些示例中,所述深度宏块至多个划分线的距离均位于[0,8)之间,多个划分线与第一方向的夹角均位于[0,2π)之间。In some examples, the distances from the depth macroblock to the multiple division lines are all between [0, 8), and the angles between the multiple division lines and the first direction are all between [0, 2π).
在一些示例中,所述判断深度宏块是否包含不连续的运动向量场的步骤进一步包括:获取所述深度宏块中所有像素点的亮度值;计算所述深度宏块中所有像素点的亮度值的方差;以及比较所述方差和预设阈值的大小,如果所述方差大于所述预设阈值,则判断所述深度宏块包含不连续的运动向量场。In some examples, the step of judging whether the depth macroblock contains a discontinuous motion vector field further includes: acquiring brightness values of all pixels in the depth macroblock; calculating brightness values of all pixels in the depth macroblock and comparing the variance with a preset threshold, and if the variance is larger than the preset threshold, it is judged that the depth macroblock contains a discontinuous motion vector field.
在一些示例中,根据所述深度宏块的所有像素点的亮度信息从所述划分集合中选择最优划分线,对所述深度宏块进行划分以得到第一和第二深度子区域的步骤进一步包括:分别以所述划分集合中的每一条划分线对所述深度宏块进行划分,并分别计算划分所得的两部分中各自的所有像素点的平均亮度值以得到对应的第一部分和第二部分的平均亮度值;分别对每一条划分线对应的第一部分和第二部分的平均亮度值做差得到差值;以及获取使差值的绝对值最大的划分线作为所述最优划分线,以对所述深度宏块进行划分以得到第一和第二深度子区域。In some examples, a step of selecting an optimal division line from the division set according to the brightness information of all pixels of the depth macroblock, and dividing the depth macroblock to obtain the first and second depth sub-regions It further includes: dividing the depth macroblock with each division line in the division set, and calculating the average luminance values of all the pixels in the two divided parts to obtain the corresponding first part and the second part respectively. The average luminance value of the two parts; the difference is obtained by making a difference between the average luminance values of the first part and the second part corresponding to each dividing line; and obtaining the dividing line that maximizes the absolute value of the difference as the optimal dividing line , to divide the depth macroblock to obtain first and second depth sub-regions.
在一些示例中,所述以帧内编码模式对深度宏块进行编码以获取对应的第一率失真代价值的步骤包括:根据H.264/MPEG-4 AVC编码标准中的帧内编码模式对所述深度宏块进行帧内编码,并将对应的最优率失真代价作为所述第一率失真代价值;所述以帧间编码模式对深度宏块进行编码以获取对应的第二率失真代价值的步骤包括:根据H.264/MPEG-4AVC编码标准中的帧间编码模式对所述深度宏块进行帧间模式编码,并将对应的最优率失真代价作为所述第二率失真代价值。In some examples, the step of encoding the depth macroblock in the intra-frame encoding mode to obtain the corresponding first rate-distortion cost value includes: according to the intra-frame encoding mode in the H.264/MPEG-4 AVC encoding standard The depth macroblock is intra-frame coded, and the corresponding optimal rate-distortion cost is used as the first rate-distortion cost value; the depth macroblock is coded in an inter-frame coding mode to obtain a corresponding second rate-distortion cost The cost value step includes: performing inter-mode coding on the depth macroblock according to the inter-frame coding mode in the H.264/MPEG-4AVC coding standard, and using the corresponding optimal rate-distortion cost as the second rate-distortion cost cost value.
在一些示例中,所述比较不同编码模式下深度宏块的率失真代价值,以根据比较结果选择率失真代价最小的编码模式对所述深度宏块进行编码的步骤包括:如果判断不对所述深度宏块进行帧间编码,则仅对所述深度宏块进行帧内编码;如果判断所述深度宏块进行帧间编码且没有包含不连续的运动向量场,则根据第一和第二率失真代价值的比较结果选择较小的率失真代价值对应的帧间编码模式或者帧内编码模式对所述深度宏块进行编码;以及如果判断所述深度宏块进行帧间编码且包含不连续的运动向量场,则根据第一至第三率失真代价值的比较结果选择最小的率失真代价值对应的帧间编码模式、帧内编码模式或者几何划分编码模式对所述深度宏块进行编码。In some examples, the step of comparing the rate-distortion cost values of the depth macroblocks in different coding modes, and selecting the coding mode with the smallest rate-distortion cost according to the comparison result to encode the depth macroblocks includes: if it is judged that the If the depth macroblock is inter-coded, then only the depth macroblock is intra-coded; if it is judged that the depth macroblock is inter-coded and does not contain discontinuous motion vector fields, then according to the first and second rates The comparison result of the distortion cost value selects the inter-frame coding mode or the intra-frame coding mode corresponding to the smaller rate-distortion cost value to encode the depth macroblock; and if it is judged that the depth macroblock is inter-frame coding and contains discontinuity motion vector field, then select the inter-frame coding mode, intra-frame coding mode or geometric partition coding mode corresponding to the smallest rate-distortion cost value to encode the depth macroblock according to the comparison results of the first to third rate-distortion cost values .
本发明第二方面的实施例提出了一种深度图编码装置,包括:划分线建立模块,用于建立多个划分线并组成划分集合,其中,多个划分线用于对深度宏块进行楔形划分;帧内编码模块,用于以帧内编码模式对深度宏块进行编码以获取对应的第一率失真代价值;帧间编码判断模块,用于判断是否以帧间编码模式对所述深度宏块进行编码;帧间编码模块,用于在所述帧间编码判断模块判断以帧间编码模式对所述深度宏块进行编码时以帧间编码模式对深度宏块进行编码以获取对应的第二率失真代价值;几何划分判断模块,用于判断所述深度宏块是否包含不连续的运动向量场;几何划分编码模块,用于在所述几何划分判断模块判断所述深度宏块包含不连续的运动向量场时,以几何划分编码模式对所述深度宏块进行编码,其中,所述几何划分编码模式包括:根据所述深度宏块的所有像素点的亮度信息从所述划分集合中选择最优划分线对所述深度宏块进行划分以得到第一和第二深度子区域,且分别对所述第一和第二深度子区域进行运动估计和预测编码以获取对应的第三率失真代价值;以及编码模式选择模块,用于比较所述深度宏块在不同编码模式下的率失真代价值,以根据比较结果选择率失真代价最小的编码模式以便对所述深度宏块进行编码。The embodiment of the second aspect of the present invention proposes a depth map encoding device, including: a division line establishment module, configured to establish a plurality of division lines and form a division set, wherein the plurality of division lines are used to wedge a depth macroblock Division; an intra-frame coding module, used to code the depth macroblock in an intra-frame coding mode to obtain a corresponding first rate-distortion cost value; an inter-frame coding judging module, used to judge whether to use an inter-frame coding mode to code the depth The macroblock is coded; the inter-frame coding module is used to code the depth macroblock in the inter-frame coding mode to obtain the corresponding The second rate-distortion cost value; the geometric division judgment module is used to judge whether the depth macroblock contains a discontinuous motion vector field; the geometric division coding module is used to judge whether the depth macroblock contains in the geometric division judgment module In the case of a discontinuous motion vector field, the depth macroblock is coded in a geometric partition coding mode, wherein the geometric partition coding mode includes: according to the brightness information of all pixels of the depth macroblock, from the partition set Select the optimal dividing line to divide the depth macroblock to obtain the first and second depth sub-regions, and perform motion estimation and predictive coding on the first and second depth sub-regions respectively to obtain the corresponding third A rate-distortion cost value; and a coding mode selection module, used to compare the rate-distortion cost values of the depth macroblock in different coding modes, so as to select the coding mode with the smallest rate-distortion cost according to the comparison result so as to carry out the depth macroblock coding.
另外,根据本发明上述实施例的深度图编码装置还可以具有如下附加的技术特征:In addition, the depth map encoding device according to the above-mentioned embodiments of the present invention may also have the following additional technical features:
在一些示例中,所述划分集合为:In some examples, the set of partitions is:
G={ξ(ρi,θi)|i=1,2,…,L},G={ξ(ρ i ,θ i )|i=1,2,…,L},
其中,ξ(ρi,θi)为所述划分线集合中的第i条划分线,ρi为深度宏块至该划分线的距离,θi为该划分线与第一方向的夹角,L为划分线的个数。Wherein, ξ(ρ i , θ i ) is the i-th dividing line in the set of dividing lines, ρ i is the distance from the depth macroblock to the dividing line, and θ i is the angle between the dividing line and the first direction , L is the number of dividing lines.
在一些示例中,所述深度宏块至多个划分线的距离均位于[0,8)之间,多个划分线与第一方向的夹角均位于[0,2π)之间。In some examples, the distances from the depth macroblock to the multiple division lines are all between [0, 8), and the angles between the multiple division lines and the first direction are all between [0, 2π).
在一些示例中,所述几何划分判断模块用于获取所述深度宏块中所有像素点的亮度值,并计算所述深度宏块中所有像素点的亮度值的方差,并比较所述方差和预设阈值的大小,如果所述方差大于所述预设阈值,则判断所述深度宏块包含不连续的运动向量场。In some examples, the geometric division judging module is used to obtain the luminance values of all pixels in the depth macroblock, calculate the variance of the luminance values of all pixels in the depth macroblock, and compare the variance and If the variance is greater than the preset threshold, it is determined that the depth macroblock contains a discontinuous motion vector field.
在一些示例中,所述几何划分编码模块用于分别以所述划分集合中的每一条划分线对所述深度宏块进行划分,并分别计算划分所得的两部分中各自的所有像素点的平均亮度值以得到对应的第一部分和第二部分的平均亮度值,分别对每一条划分线对应的第一部分和第二部分的平均亮度值做差得到差值,并获取使差值的绝对值最大的划分线作为所述最优划分线,以对所述深度宏块进行划分以得到第一和第二深度子区域。In some examples, the geometric partition encoding module is configured to respectively divide the depth macroblock with each dividing line in the division set, and respectively calculate the average value of all pixels in the two divided parts respectively. Brightness value to obtain the corresponding average brightness value of the first part and the second part, respectively make a difference between the average brightness values of the first part and the second part corresponding to each dividing line to obtain the difference, and obtain the maximum absolute value of the difference The dividing line of is used as the optimal dividing line, so as to divide the depth macroblock to obtain the first and second depth sub-regions.
在一些示例中,所述帧内编码模块用于根据H.264/MPEG-4 AVC编码标准中的帧内编码模式对所述深度宏块进行帧内编码,并将对应的最优率失真代价作为所述第一率失真代价值;所述帧间编码模块用于根据H.264/MPEG-4 AVC编码标准中的帧间编码模式对所述深度宏块进行帧间模式编码,并将对应的最优率失真代价作为所述第二率失真代价值。在一些示例中,所述编码模式选择模块用于在不对所述深度宏块进行帧间编码时,仅选择帧内编码模式,在所述深度宏块进行帧间编码且没有包含不连续的运动向量场时,根据第一和第二率失真代价值的比较结果选择较小的率失真代价值对应的帧间编码模式或者帧内编码模式,在所述深度宏块进行帧间编码且包含不连续的运动向量场时,根据第一至第三率失真代价值的比较结果选择最小的率失真代价值对应的帧间编码模式、帧内编码模式或者几何划分编码模式。In some examples, the intra-frame coding module is configured to perform intra-frame coding on the depth macroblock according to the intra-frame coding mode in the H.264/MPEG-4 AVC coding standard, and use the corresponding optimal rate-distortion cost As the first rate-distortion cost value; the inter-frame coding module is used to perform inter-mode coding on the depth macroblock according to the inter-frame coding mode in the H.264/MPEG-4 AVC coding standard, and correspond to The optimal rate-distortion cost of is used as the second rate-distortion cost value. In some examples, the encoding mode selection module is configured to only select an intra encoding mode when the depth macroblock is not inter-encoded, and the depth macroblock is inter-encoded and does not contain discontinuous motion In the vector field, according to the comparison result of the first and second rate-distortion cost values, select the inter-frame coding mode or the intra-frame coding mode corresponding to the smaller rate-distortion cost value, and perform inter-frame coding on the depth macroblock and include not For continuous motion vector fields, the inter-frame coding mode, intra-frame coding mode or geometric partition coding mode corresponding to the smallest rate-distortion cost value is selected according to the comparison results of the first to third rate-distortion cost values.
根据本发明实施例的深度图编码方法及装置,通过设计基于几何划分的深度图编码方法,根据合理的方式从帧间编码模式、帧内编码模式或者几何划分编码模式选择最佳的编码模式对深度宏块进行编码,由此,不但提高了深度图压缩效率、减少压缩时间,也降低深度图编码的复杂度,实现对深度图的高效编码。According to the depth map coding method and device of the embodiments of the present invention, by designing a depth map coding method based on geometric partitioning, the best coding mode pair is selected from the inter-frame coding mode, intra-frame coding mode or geometric partition coding mode in a reasonable manner. The depth macroblocks are coded, thereby not only improving the compression efficiency of the depth map, reducing the compression time, but also reducing the complexity of coding the depth map, and realizing efficient coding of the depth map.
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
附图说明 Description of drawings
本发明的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and comprehensible from the description of the embodiments in conjunction with the following drawings, wherein:
图1为本发明实施例的深度图编码方法的流程图;FIG. 1 is a flowchart of a depth map encoding method according to an embodiment of the present invention;
图2为本发明一个实施例深度图编码方法的划分线对深度宏块进行划分的原理图;Fig. 2 is a principle diagram of dividing a depth macroblock by dividing lines of a depth map encoding method according to an embodiment of the present invention;
图3为本发明一个实施例的深度图编码方法的详细流程图;FIG. 3 is a detailed flowchart of a depth map encoding method according to an embodiment of the present invention;
图4为本发明一个实施例的深度图编码方法的采用的具有几何划分编码模式进行编码的编码器的工作原理图;Fig. 4 is a working principle diagram of an encoder with a geometric partition encoding mode used in a depth map encoding method according to an embodiment of the present invention;
图5为本发明一个实施例的深度图编码方法采用图4所示的编码器进行编码的对深度宏块预测编码模式的预测结构图;以及FIG. 5 is a prediction structure diagram of a depth macroblock prediction coding mode in which the coding method for a depth map according to an embodiment of the present invention uses the coder shown in FIG. 4 to code; and
图6为本发明实施例的深度图编码装置的结构图。Fig. 6 is a structural diagram of a depth map encoding device according to an embodiment of the present invention.
具体实施方式 Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.
在本发明的描述中,需要理解的是,术语“中心”、“纵向”、“横向”、“上”、“下”、“前”、“后”、“左”、“右”、“竖直”、“水平”、“顶”、“底”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性。In describing the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", " The orientations or positional relationships indicated by "vertical", "horizontal", "top", "bottom", "inner" and "outer" are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and Simplified descriptions, rather than indicating or implying that the device or element referred to must have a particular orientation, be constructed and operate in a particular orientation, and thus should not be construed as limiting the invention. In addition, the terms "first" and "second" are used for descriptive purposes only, and should not be understood as indicating or implying relative importance.
在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that unless otherwise specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection. Connected, or integrally connected; it may be mechanically connected or electrically connected; it may be directly connected or indirectly connected through an intermediary, and it may be the internal communication of two components. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention in specific situations.
为了对本发明实施例的编码方式进行验证,在本发明的下述示例中,立体视频编码的测试序列采用标清格式的名字为“Book Arrival”的标准测试序列,该标清格式视频序列的分辨率为1024×768,该测试序列包含16个视点的视频和对应的深度图。在本发明的以下示例中,均以该测试序列中的深度图进行测试,采用该序列的第8个视点的深度图序列作为测试序列。该序列包含100帧深度图。如图4所示,编解码器采用H.264/MPEG-4 MVC标准参考软件JMVC 6.0;编码器GOP(Group of Pictures,图像组)的帧数为8;编码的时域预测编码采用Hierarchical B Picture(层次化双向预测编码帧,简称层次化B帧)的预测结构,编码预测结构图如图5所示。每个编码的深度宏块的大小为16×16。运动估计的精度为四分之一像素精度。其他编码参数均采用与H.264/MPEG-4 AVC标准中主档次(MainProfile)中规定的参数设置。In order to verify the encoding method of the embodiment of the present invention, in the following examples of the present invention, the test sequence of stereoscopic video encoding adopts the standard test sequence of "Book Arrival" with the name of SD format, and the resolution of this SD format video sequence is 1024×768, the test sequence contains 16 viewpoint videos and corresponding depth maps. In the following examples of the present invention, the depth map in the test sequence is used for testing, and the depth map sequence of the eighth viewpoint of the sequence is used as the test sequence. The sequence contains 100 frames of depth maps. As shown in Figure 4, the codec adopts the H.264/MPEG-4 MVC standard reference software JMVC 6.0; the number of frames of the encoder GOP (Group of Pictures, Group of Pictures) is 8; the temporal domain predictive encoding of the encoding adopts Hierarchical B The prediction structure of Picture (hierarchical bidirectional predictive coding frame, referred to as hierarchical B frame), the coding prediction structure diagram is shown in Figure 5. Each coded depth macroblock has a size of 16x16. The precision of the motion estimation is quarter-pixel precision. Other encoding parameters are set with the parameters specified in the main profile (MainProfile) of the H.264/MPEG-4 AVC standard.
以下结合附图首先描述根据本发明实施例的深度图编码方法。A method for encoding a depth map according to an embodiment of the present invention will first be described below with reference to the accompanying drawings.
参考图1,根据本发明实施例的深度图编码方法,包括如下步骤:Referring to Fig. 1, the depth map encoding method according to the embodiment of the present invention includes the following steps:
步骤S101,建立多个划分线并组成划分集合,其中,多个划分线用于对深度宏块进行楔形划分。在本发明的一个实施例中,划分集合为:G={ξ(ρi,θi)|i=1,2,…,L},其中,ξ(ρi,θi)为划分线集合中的第i条划分线,ρi为深度宏块至该划分线的距离,θi为该划分线与第一方向的夹角,L为划分线的个数。Step S101 , establishing a plurality of division lines and forming a division set, wherein the plurality of division lines are used for wedge-shaped division of depth macroblocks. In one embodiment of the present invention, the division set is: G={ξ(ρ i ,θ i )|i=1,2,...,L}, where ξ(ρ i ,θ i ) is the division line set The i-th dividing line in , ρ i is the distance from the depth macroblock to the dividing line, θ i is the angle between the dividing line and the first direction, and L is the number of dividing lines.
如图2所示,定义楔形几何划分的多个划分线组成的划分集合。定义划分线为一条直线(如图2所示的划分线),该直线通过到深度宏块中心点的距离ρ和该直线与y轴,即第一方向的夹角θ来表示。在该实施例中,多个划分线的距离均位于[0,8)之间,多个划分线与第一方向的夹角均位于[0,2π)之间,即每个划分线的两个参数ρ和θ的取值范围为[0,8)和[0,2π),参数ρ的采样间隔为1,其取值集合为ρ={0,1,2,…,7},参数θ的采样间隔为π/16,其取值集合为因此,划分集合G={ξ(ρi,θi)|i=1,2,…,L}中共包含256条可选的划分线,即L=256。As shown in FIG. 2 , a division set composed of multiple division lines defining a wedge-shaped geometric division is defined. The dividing line is defined as a straight line (the dividing line shown in FIG. 2 ), which is represented by the distance ρ to the center point of the depth macroblock and the angle θ between the straight line and the y-axis, that is, the first direction. In this embodiment, the distances between the multiple dividing lines are all located between [0, 8), and the angles between the multiple dividing lines and the first direction are all located between [0, 2π), that is, the two points of each dividing line The value ranges of parameters ρ and θ are [0,8) and [0,2π), the sampling interval of parameter ρ is 1, and its value set is ρ={0,1,2,…,7}, the parameter The sampling interval of θ is π/16, and its value set is Therefore, the division set G={ξ(ρ i ,θ i )|i=1, 2, . . . , L} contains 256 optional division lines, ie L=256.
步骤S102,以帧内编码模式对深度宏块进行编码以获取对应的第一率失真代价值。Step S102, encode the depth macroblock in an intra-frame coding mode to obtain a corresponding first rate-distortion cost value.
具体地,根据H.264/MPEG-4 AVC编码标准中的帧内编码模式对深度宏块进行帧内编码,并将对应的最优率失真代价作为第一率失真代价值。更为具体地,编码采用与传统H.264/MPEG-4 AVC编码标准中定义的帧内编码模式相同的方法对该深度宏块,记为Bk进行帧内预测编码。在本实施例中,当前深度宏块在帧内预测编码模式下最优率失真代价为
步骤S103,判断是否以帧间编码模式对深度宏块进行编码,如果是则以帧间编码模式对深度宏块进行编码以获取对应的第二率失真代价值。Step S103, judging whether the depth macroblock is coded in the inter-frame coding mode, and if yes, the depth macroblock is coded in the inter-frame coding mode to obtain a corresponding second rate-distortion cost value.
具体地,根据H.264/MPEG-4 AVC编码标准中的帧间编码模式对所述深度宏块进行帧间模式编码,并将对应的最优率失真代价作为所述第二率失真代价值。在该实例中,上述帧间编码模式为传统的帧间编码模式。Specifically, perform inter-mode coding on the depth macroblock according to the inter-frame coding mode in the H.264/MPEG-4 AVC coding standard, and use the corresponding optimal rate-distortion cost as the second rate-distortion cost value . In this example, the above-mentioned inter-frame coding mode is a conventional inter-frame coding mode.
步骤S104,继续判断深度宏块是否包含不连续的运动向量场,如果深度宏块进行帧间编码且包含不连续的运动向量场,则以几何划分编码模式对深度宏块进行编码,其中,几何划分编码模式进一步包括:根据深度宏块的所有像素点的亮度信息从划分集合中选择最优划分线对深度宏块进行划分以得到第一和第二深度子区域,且分别对第一和第二深度子区域进行运动估计和预测编码以获取对应的第三率失真代价值。Step S104, continue to judge whether the depth macroblock contains a discontinuous motion vector field, if the depth macroblock is inter-coded and contains a discontinuous motion vector field, then encode the depth macroblock in the geometric partition coding mode, wherein, the geometric The division coding mode further includes: selecting an optimal division line from the division set according to the luminance information of all pixels of the depth macroblock to divide the depth macroblock to obtain the first and second depth sub-regions, and the first and second depth sub-regions respectively Motion estimation and predictive coding are performed on the two-depth sub-regions to obtain corresponding third rate-distortion cost values.
具体地,在一些示例中,判断是否以几何划分模式对深度宏块进行编码,即判断深度宏块是否包含不连续的运动向量场的步骤包括:Specifically, in some examples, the step of judging whether to encode the depth macroblock in a geometric division mode, that is, judging whether the depth macroblock contains a discontinuous motion vector field includes:
1、获取深度宏块中所有像素点的亮度值。例如当前编码的深度宏块Bk的全部像素点集合为其中N代表该深度宏块中像素点的个数,在本实施例中,N=256。假设该深度宏块Bk为当前帧的第529个深度宏块。设Bk的全部像素点的亮度值为
2、计算深度宏块中所有像素点的亮度值的方差。通过计算可以知道,该深度宏块Bk的所有像素点的亮度值的方差为838。2. Calculate the variance of the luminance values of all pixels in the depth macroblock. It can be known through calculation that the variance of the luminance values of all pixels in the depth macroblock Bk is 838.
3、比较方差和预设阈值的大小,如果方差大于预设阈值,则判断深度宏块包含不连续的运动向量场。例如,该预设阈值为TS=100,则Bk所有像素点的亮度值的方差大于TS,因此判断深度宏块包含不连续的运动向量场。3. Compare the magnitude of the variance with the preset threshold, and if the variance is greater than the preset threshold, it is determined that the depth macroblock contains a discontinuous motion vector field. For example, if the preset threshold is T S =100, then the variance of the luminance values of all pixels in B k is greater than T S , so it is determined that the depth macroblock contains a discontinuous motion vector field.
根据深度宏块的所有像素点的亮度信息从划分集合中选择最优划分线对所述深度宏块进行划分以得到第一和第二深度子区域的步骤进一步包括:Selecting an optimal dividing line from the dividing set according to the luminance information of all pixels of the depth macroblock to divide the depth macroblock to obtain the first and second depth sub-regions further includes:
1、分别以划分集合中的每一条划分线对深度宏块进行划分,并分别计算划分所得的两部分中各自的所有像素点的平均亮度值以得到对应的第一部分和第二部分平均亮度值。例如,编码器通过遍历集合G中的每一条划分线来搜索Bk所对应的最优划分线。在遍历过程中,对每一条划分线ξ(ρi,θi),将Bk划分成两部分。计算两个部分中各自所有像素点的平均亮度值,例如当参数ρ和参数θ的取值均为0时,此时划分线为位于宏块Bk中心的垂直线段。该划分线将宏块Bk分成左右大小相等的两部分,P1(ρ0,θ0)和P2(ρ0,θ0)。此时,区域P1(ρ0,θ0)中所有像素点的平均亮度值为40.2;区域P2(ρ0,θ0)中所有像素点的平均亮度值为68.1。1. Divide the depth macroblock with each division line in the division set, and calculate the average luminance values of all the pixels in the two divided parts respectively to obtain the corresponding average luminance values of the first part and the second part . For example, the encoder searches for the optimal dividing line corresponding to B k by traversing each dividing line in the set G. During the traversal process, for each dividing line ξ(ρ i ,θ i ), divide B k into two parts. Calculate the average luminance values of all pixels in the two parts, for example, when the values of the parameters ρ and θ are both 0, the division line is a vertical line segment at the center of the macroblock B k . The division line divides the macroblock B k into two parts, P 1 (ρ 0 ,θ 0 ) and P 2 (ρ 0 ,θ 0 ), which are equal in size on the left and right. At this time, the average luminance value of all pixels in the area P 1 (ρ 0 , θ 0 ) is 40.2; the average luminance value of all pixels in the area P 2 (ρ 0 , θ 0 ) is 68.1.
2、分别对每一条划分线对应的第一部分和第二部分的平均亮度值做差得到差值。根据步骤1中的示例,P1(ρ0,θ0)和P2(ρ0,θ0)之间的平均亮度值做差结果为:d=40.2-68.1=-27.92. The difference is obtained by making a difference between the average luminance values of the first part and the second part corresponding to each dividing line. According to the example in
3、获取使差值的绝对值最大的划分线作为所述最优划分线,以对所述深度宏块进行划分以得到第一和第二深度子区域。根据步骤2中的示例,差值的绝对值为:Δd=|40.2-68.1|=27.9。3. Obtain a dividing line that maximizes the absolute value of the difference as the optimal dividing line, so as to divide the depth macroblock to obtain the first and second depth sub-regions. According to the example in step 2, the absolute value of the difference is: Δd=|40.2-68.1|=27.9.
同理,对划分线集合G中的所有划分线均以步骤1-3的方式求取其划分后对应的深度划分差,将获得最大深度划分差的划分线作为所述当前宏块最优的划分线,最优划分线记为ξ(ρopt,θopt)。在本实施例中,对于深度宏块Bk的最大深度划分差为Δdmax=65.6。其对应的最优划分线ξ(ρopt,θopt)的参数取值分别为ρopt=4, In the same way, for all the division lines in the division line set G, the corresponding depth division difference after division is obtained in the manner of steps 1-3, and the division line with the largest depth division difference is taken as the optimal value of the current macroblock. The dividing line, the optimal dividing line is denoted as ξ(ρ opt ,θ opt ). In this embodiment, the maximum depth division difference for the depth macroblock B k is Δd max =65.6. The parameters of the corresponding optimal dividing line ξ(ρ opt ,θ opt ) are respectively ρ opt =4,
根据上述的示例,分别对第一和第二深度子区域进行运动估计以获取对应的第三率失真代价值,具体为:对Bk采用最优的划分线ξ(ρopt,θopt)划分成第一和第二深度子区域,记为P1(ρopt,θopt)和P2(ρopt,θopt)。然后对第一和第二深度子区域分别进行运动估计,并计算其对应的率失真代价,在该示例中,Bk在几何划分编码模式下的第三率失真代价为According to the above example, perform motion estimation on the first and second depth sub-regions to obtain the corresponding third rate-distortion cost value, specifically: use the optimal dividing line ξ(ρ opt ,θ opt ) to divide B k into first and second depth sub-regions, denoted as P 1 (ρ opt ,θ opt ) and P 2 (ρ opt ,θ opt ). Then perform motion estimation on the first and second depth sub-regions respectively, and calculate their corresponding rate-distortion costs. In this example, the third rate-distortion cost of B k in the geometric partition coding mode is
步骤S105,比较不同编码模式下深度宏块的率失真代价值,以根据比较结果选择率失真代价最小的编码模式对深度宏块进行编码。具体而言,包括如下步骤:Step S105 , comparing the rate-distortion cost values of the depth macroblocks in different coding modes, so as to encode the depth macroblocks in the coding mode with the smallest rate-distortion cost according to the comparison result. Specifically, it includes the following steps:
1、如果判断不对深度宏块进行帧间编码,则仅对深度宏块进行帧内编码。1. If it is determined that inter-coding is not performed on the depth macroblock, only intra-coding is performed on the depth macroblock.
2、如果判断深度宏块进行帧间编码且没有包含不连续的运动向量场,则根据第一和第二率失真代价值的比较结果选择较小的率失真代价值对应的帧间编码模式或者帧内编码模式对深度宏块进行编码。2. If it is judged that the depth macroblock is inter-frame coded and does not contain a discontinuous motion vector field, then select the inter-frame coding mode corresponding to the smaller rate-distortion cost value according to the comparison result of the first and second rate-distortion cost values or Intra coding mode codes depth macroblocks.
3、如果判断深度宏块进行帧间编码且包含不连续的运动向量场,则根据第一至第三率失真代价值的比较结果选择最小的率失真代价值对应的帧间编码模式、帧内编码模式或者几何划分编码模式对深度宏块进行编码。3. If it is judged that the depth macroblock is inter-coded and contains discontinuous motion vector fields, then select the inter-frame coding mode and intra-frame coding mode corresponding to the smallest rate-distortion cost value according to the comparison results of the first to third rate-distortion cost values. A coding mode or a geometric partition coding mode encodes depth macroblocks.
作为一个具体的示例,以上述的Bk为例:对Bk进行基于率失真优化的模式选择。在本实施例中,由于编码器对Bk进行了几何划分模式的预测,因此需要在几何划分编码模式,帧间编码模式、帧内编码模式这三种模式中选择率失真代价最小的模式作为Bk的最优编码模式。对于Bk,最小的率失真代价为:
因此,Bk的最优编码模式为几何划分编码模式。则该Bk采用几何划分编码模式进行编码。Therefore, the optimal coding mode of B k is the geometric partition coding mode. Then the B k is coded in the geometric partition coding mode.
参见图3,作为一个具体的例子,本发明实施例的深度图编码方法可按照如下步骤进行:Referring to FIG. 3, as a specific example, the depth map encoding method in the embodiment of the present invention can be performed according to the following steps:
步骤S110,设置几何划分模式中的划分线集合。Step S110, setting a set of dividing lines in the geometrical dividing mode.
步骤S120,开始编码当前宏块Bk。Step S120, start encoding the current macroblock B k .
步骤S130,判断Bk是否为帧内编码宏块,如果是则转至步骤S140,否则转至步骤S220。Step S130, judging whether B k is an intra-coded macroblock, if yes, go to step S140, otherwise go to step S220.
步骤S140,对Bk进行帧内预测编码并计算该模式下的率失真代价,并转入步骤S150。Step S140, perform intra-frame predictive coding on B k and calculate the rate-distortion cost in this mode, and turn to step S150.
步骤S150,判断Bk是否进行帧间模式编码,如果是则转至步骤S160,否则转至步骤S200。Step S150, judging whether B k is encoded in the inter-frame mode, if yes, go to step S160, otherwise go to step S200.
步骤S160,对Bk采用传统帧间预测模式进行编码并计算该模式下的率失真代价,并转入步骤S170。In step S160, encode B k in a conventional inter-frame prediction mode and calculate the rate-distortion cost in this mode, and proceed to step S170.
步骤S170,判断Bk是否包含不连续运动场。如果是则转至步骤S180,否则转至步骤S200。Step S170, judging whether B k contains a discontinuous motion field. If yes, go to step S180, otherwise go to step S200.
步骤S180,根据Bk中每个像素的亮度信息搜索对应的最优划分线。Step S180, searching for the corresponding optimal dividing line according to the brightness information of each pixel in Bk .
步骤S190,对最优划分线所划分成的两个部分进行运动估计和编码,并计算其对应的率失真代价。Step S190, perform motion estimation and encoding on the two parts divided by the optimal dividing line, and calculate the corresponding rate-distortion cost.
步骤S200,选取率失真代价最小的模式作为Bk的最优编码模式。Step S200, select the mode with the smallest rate-distortion cost as the optimal coding mode of B k .
步骤S210,采用最优模式编码Bk。Step S210, using the optimal mode to encode B k .
步骤S220,判断Bk是否为当前帧的最后一个宏块。如果是则编码结束,否则转至步骤S120中以便对下一个深度宏块进行编码。Step S220, judging whether B k is the last macroblock of the current frame. If yes, the encoding ends; otherwise, go to step S120 to encode the next depth macroblock.
参考图6,本发明进一步实施例提出了一种深度图编码装置600,包括划分线建立模块610、帧内编码模块620、帧间编码判断模块630、帧间编码模块640,几何划分判断模块650、几何划分编码模块660和编码模式选择模块670。其中:Referring to FIG. 6 , a further embodiment of the present invention proposes a depth map encoding device 600, including a division line establishment module 610, an
划分线建立模块610用于建立多个划分线并组成划分集合,其中,多个划分线用于对深度宏块进行楔形划分。帧内编码模块620用于以帧内编码模式对深度宏块进行编码以获取对应的第一率失真代价值。帧间编码判断模块630用于判断是否以帧间编码模式对所述深度宏块进行编码。帧间编码模块640用于在帧间编码判断模块630判断以帧间编码模式对深度宏块进行编码时以帧间编码模式对深度宏块进行编码以获取对应的第二率失真代价值。几何划分判断模块650用于判断深度宏块是否包含不连续的运动向量场。几何划分编码模块660用于在几何划分判断模块650判断深度宏块包含不连续的运动向量场时,以几何划分编码模式对深度宏块进行编码,其中,几何划分编码模式包括:根据深度宏块的所有像素点的亮度信息从所述划分集合中选择最优划分线对深度宏块进行划分以得到第一和第二深度子区域,且分别对第一和第二深度子区域进行运动估计和预测编码以获取对应的第三率失真代价值。编码模式选择模块670用于比较深度宏块在不同编码模式下的率失真代价值,以根据比较结果选择率失真代价最小的编码模式以便对所述深度宏块进行编码。The dividing line establishment module 610 is used to establish a plurality of dividing lines and form a division set, wherein the plurality of dividing lines are used for wedge-shaped division of depth macroblocks. The
在一些示例中,划分集合为:In some examples, the set is partitioned as:
G={ξ(ρi,θi)|i=1,2,…,L},G={ξ(ρ i ,θ i )|i=1,2,…,L},
其中,ξ(ρi,θi)为所述划分线集合中的第i条划分线,ρi为深度宏块至该划分线的距离,θi为该划分线与第一方向的夹角,L为划分线的个数。Wherein, ξ(ρ i , θ i ) is the i-th dividing line in the set of dividing lines, ρ i is the distance from the depth macroblock to the dividing line, and θ i is the angle between the dividing line and the first direction , L is the number of dividing lines.
在一些示例中,深度宏块至多个划分线的距离均位于[0,8)之间,多个划分线与第一方向的夹角均位于[0,2π)之间。In some examples, the distances from the depth macroblock to the multiple dividing lines are all between [0, 8), and the angles between the multiple dividing lines and the first direction are all between [0, 2π).
在一些示例中,几何划分判断模块650用于获取深度宏块中所有像素点的亮度值,并计算深度宏块中所有像素点的亮度值的方差,并比较方差和预设阈值的大小,如果方差大于所述预设阈值,则判断深度宏块包含不连续的运动向量场。In some examples, the geometric division judging module 650 is used to obtain the brightness values of all pixels in the depth macroblock, and calculate the variance of the brightness values of all pixels in the depth macroblock, and compare the size of the variance with the preset threshold, if If the variance is greater than the preset threshold, it is determined that the depth macroblock contains a discontinuous motion vector field.
进一步地,几何划分编码模块660用于分别以所述划分集合中的每一条划分线对所述深度宏块进行划分,并分别计算划分所得的两部分中各自的所有像素点的平均亮度值以得到对应的第一部分和第二部分的平均亮度值,分别对每一条划分线对应的第一部分和第二部分的平均亮度值做差得到差值,并获取使差值的绝对值最大的划分线作为所述最优划分线,以对所述深度宏块进行划分以得到第一和第二深度子区域。Further, the geometric partition encoding module 660 is used to divide the depth macroblock with each division line in the division set, and calculate the average luminance values of all the pixels in the two divided parts to obtain Get the corresponding average luminance values of the first part and the second part, respectively make a difference between the average luminance values of the first part and the second part corresponding to each dividing line, and obtain the dividing line that maximizes the absolute value of the difference As the optimal division line, the depth macroblock is divided to obtain the first and second depth sub-regions.
在一些示例中,帧内编码模块620用于根据H.264/MPEG-4 AVC编码标准中的帧内编码模式对所述深度宏块进行帧内编码,并将对应的最优率失真代价作为所述第一率失真代价值。In some examples, the
在一些示例中,帧间编码模块640用于根据H.264/MPEG-4 AVC编码标准中的帧间编码模式对所述深度宏块进行帧间编码,并将对应的最优率失真代价作为所述第二率失真代价值。In some examples, the inter-frame coding module 640 is configured to perform inter-frame coding on the depth macroblock according to the inter-frame coding mode in the H.264/MPEG-4 AVC coding standard, and use the corresponding optimal rate-distortion cost as the second rate-distortion cost value.
在一些示例中,编码模式选择模块670用于在不对所述深度宏块进行帧间编码时,仅选择帧内编码模式,在所述深度宏块进行帧间编码且没有包含不连续的运动向量场时,根据第一和第二率失真代价值的比较结果选择较小的率失真代价值对应的帧间编码模式或者帧内编码模式,在所述深度宏块进行帧间编码且包含不连续的运动向量场时,根据第一至第三率失真代价值的比较结果选择最小的率失真代价值对应的帧间编码模式、帧内编码模式或者几何划分编码模式以便对所述深度宏块进行编码。In some examples, the encoding mode selection module 670 is configured to only select an intra encoding mode when the depth macroblock is not inter-encoded, and the depth macroblock is inter-encoded and does not contain discontinuous motion vectors In the frame time, according to the comparison result of the first and second rate-distortion cost values, select the inter-frame coding mode or the intra-frame coding mode corresponding to the smaller rate-distortion cost value, and perform inter-frame coding on the depth macroblock and include discontinuity When the motion vector field is selected, according to the comparison results of the first to third rate-distortion cost values, select the inter-frame coding mode, intra-frame coding mode or geometric partition coding mode corresponding to the smallest rate-distortion cost value so as to carry out the depth macroblock coding.
根据本发明实施例的深度图编码方法及装置,通过设计基于几何划分的深度图编码方法,根据合理的方式从帧间编码模式、帧内编码模式或者几何划分编码模式选择最佳的编码模式对深度宏块进行编码,由此,不但提高了深度图压缩效率、减少压缩时间,也降低深度图编码的复杂度,实现对深度图的高效编码。According to the depth map coding method and device of the embodiments of the present invention, by designing a depth map coding method based on geometric partitioning, the best coding mode pair is selected from the inter-frame coding mode, intra-frame coding mode or geometric partition coding mode in a reasonable manner. The depth macroblocks are coded, thereby not only improving the compression efficiency of the depth map, reducing the compression time, but also reducing the complexity of coding the depth map, and realizing efficient coding of the depth map.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
尽管已经示出和描述了本发明的实施例,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同限定。Although the embodiments of the present invention have been shown and described, those skilled in the art can understand that various changes, modifications, substitutions and modifications can be made to these embodiments without departing from the principle and spirit of the present invention. The scope of the invention is defined by the claims and their equivalents.
Claims (14)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210232212.3A CN102790892B (en) | 2012-07-05 | 2012-07-05 | Depth map coding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210232212.3A CN102790892B (en) | 2012-07-05 | 2012-07-05 | Depth map coding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102790892A true CN102790892A (en) | 2012-11-21 |
CN102790892B CN102790892B (en) | 2014-06-11 |
Family
ID=47156180
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210232212.3A Expired - Fee Related CN102790892B (en) | 2012-07-05 | 2012-07-05 | Depth map coding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102790892B (en) |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103067715A (en) * | 2013-01-10 | 2013-04-24 | 华为技术有限公司 | Encoding and decoding methods and encoding and decoding device of range image |
CN103237216A (en) * | 2013-04-12 | 2013-08-07 | 华为技术有限公司 | Encoding and decoding method and encoding and decoding device for depth image |
CN103237214A (en) * | 2013-04-12 | 2013-08-07 | 华为技术有限公司 | Method and device for coding and decoding depth images |
CN103929650A (en) * | 2013-01-10 | 2014-07-16 | 乐金电子(中国)研究开发中心有限公司 | Depth coding unit coding method and decoding method, encoder and decoder |
WO2014114168A1 (en) * | 2013-01-28 | 2014-07-31 | Lg Electronics (China) R&D Center Co., Ltd. | Depth modeling mode coding and decoding method and video codec |
CN104104964A (en) * | 2013-04-09 | 2014-10-15 | 乐金电子(中国)研究开发中心有限公司 | Depth image interframe encoding and decoding method, encoder and decoder |
WO2014166426A1 (en) * | 2013-04-12 | 2014-10-16 | Mediatek Inc. | Method and apparatus of compatible depth dependent coding |
WO2014166423A1 (en) * | 2013-04-12 | 2014-10-16 | Mediatek Inc. | Method and apparatus for direct simplified depth coding |
WO2015003635A1 (en) * | 2013-07-12 | 2015-01-15 | Mediatek Singapore Pte. Ltd. | Method of sub-prediction unit inter-view motion predition in 3d video coding |
CN104904220A (en) * | 2013-01-04 | 2015-09-09 | 三星电子株式会社 | Encoding apparatus and decoding apparatus for depth image, and encoding method and decoding method |
WO2015139563A1 (en) * | 2014-03-21 | 2015-09-24 | 华为技术有限公司 | Depth image coding/decoding method and coding/decoding device |
CN104969556A (en) * | 2013-01-08 | 2015-10-07 | Lg电子株式会社 | Method and apparatus for processing video signal |
CN105007494A (en) * | 2015-07-20 | 2015-10-28 | 南京理工大学 | Intra-frame wedge-shaped segmentation mode selection method of 3D video depth image model mode |
CN105637865A (en) * | 2015-02-05 | 2016-06-01 | 华为技术有限公司 | Image prediction method and related equipment |
WO2016123801A1 (en) * | 2015-02-06 | 2016-08-11 | Mediatek Singapore Pte. Ltd. | Methods for partition mode coding |
WO2017020808A1 (en) * | 2015-07-31 | 2017-02-09 | Versitech Limited | A depth discontinuity-based method for efficient intra coding for depth videos |
US10034021B2 (en) | 2013-01-10 | 2018-07-24 | Huawei Technologies Co., Ltd. | Methods and apparatuses for coding and decoding depth map |
CN109600600A (en) * | 2018-10-31 | 2019-04-09 | 万维科研有限公司 | It is related to the storage method and format of encoder, coding method and three layers of expression formula that depth map is converted |
WO2021196235A1 (en) * | 2020-04-03 | 2021-10-07 | Oppo广东移动通信有限公司 | Inter-frame prediction method, encoder, decoder, and storage medium |
CN116233440A (en) * | 2021-12-03 | 2023-06-06 | 中国联合网络通信集团有限公司 | Video coding processing method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0631441A2 (en) * | 1993-06-22 | 1994-12-28 | Canon Kabushiki Kaisha | Image processing apparatus |
CN101198066A (en) * | 2006-12-04 | 2008-06-11 | 中兴通讯股份有限公司 | Frame and intraframe coding mode selection method |
CN101304529A (en) * | 2008-06-06 | 2008-11-12 | 浙江大学 | Method and device for selecting macroblock mode |
CN101640802A (en) * | 2009-08-28 | 2010-02-03 | 北京工业大学 | Video inter-frame compression coding method based on macroblock features and statistical properties |
US20100124277A1 (en) * | 2008-11-14 | 2010-05-20 | Vimicro Corporation | Video encoding with even bit stream |
-
2012
- 2012-07-05 CN CN201210232212.3A patent/CN102790892B/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0631441A2 (en) * | 1993-06-22 | 1994-12-28 | Canon Kabushiki Kaisha | Image processing apparatus |
CN101198066A (en) * | 2006-12-04 | 2008-06-11 | 中兴通讯股份有限公司 | Frame and intraframe coding mode selection method |
CN101304529A (en) * | 2008-06-06 | 2008-11-12 | 浙江大学 | Method and device for selecting macroblock mode |
US20100124277A1 (en) * | 2008-11-14 | 2010-05-20 | Vimicro Corporation | Video encoding with even bit stream |
CN101640802A (en) * | 2009-08-28 | 2010-02-03 | 北京工业大学 | Video inter-frame compression coding method based on macroblock features and statistical properties |
Non-Patent Citations (3)
Title |
---|
WANG QIFEI等: "Complexity-Reduced Geometry Partitioning Search and High Efficiency Prediction for Video Ciding", 《2012 IEEE INTERNATIONAL SYMPOSIUM ON CIRCUITS AND SYSTEMS》 * |
朱冬冬,戴琼海: "H.264快速帧间编码模式选择算法", 《有线电视技术》 * |
谭仕勇,戴琼海,陈慧蓉: "MPEG-4标准中的视频编码", 《广播与电视技术》 * |
Cited By (42)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104904220A (en) * | 2013-01-04 | 2015-09-09 | 三星电子株式会社 | Encoding apparatus and decoding apparatus for depth image, and encoding method and decoding method |
US10123007B2 (en) | 2013-01-08 | 2018-11-06 | Lg Electronics Inc. | Method and apparatus for processing video signal |
CN104969556A (en) * | 2013-01-08 | 2015-10-07 | Lg电子株式会社 | Method and apparatus for processing video signal |
CN103067715A (en) * | 2013-01-10 | 2013-04-24 | 华为技术有限公司 | Encoding and decoding methods and encoding and decoding device of range image |
US10034021B2 (en) | 2013-01-10 | 2018-07-24 | Huawei Technologies Co., Ltd. | Methods and apparatuses for coding and decoding depth map |
WO2014108093A1 (en) * | 2013-01-10 | 2014-07-17 | 华为技术有限公司 | Method for encoding/decoding depth image and apparatus thereof |
CN103929650B (en) * | 2013-01-10 | 2017-04-12 | 乐金电子(中国)研究开发中心有限公司 | Depth coding unit coding method and decoding method, encoder and decoder |
CN103929650A (en) * | 2013-01-10 | 2014-07-16 | 乐金电子(中国)研究开发中心有限公司 | Depth coding unit coding method and decoding method, encoder and decoder |
US10582217B2 (en) | 2013-01-10 | 2020-03-03 | Huawei Technologies Co., Ltd. | Methods and apparatuses for coding and decoding depth map |
US10063883B2 (en) | 2013-01-10 | 2018-08-28 | Huawei Technologies Co., Ltd. | Methods and apparatuses for coding and decoding depth map |
US10455251B2 (en) | 2013-01-10 | 2019-10-22 | Huawei Technologies Co., Ltd. | Methods and apparatuses for coding and decoding depth map |
WO2014114168A1 (en) * | 2013-01-28 | 2014-07-31 | Lg Electronics (China) R&D Center Co., Ltd. | Depth modeling mode coding and decoding method and video codec |
CN103974063A (en) * | 2013-01-28 | 2014-08-06 | 乐金电子(中国)研究开发中心有限公司 | Encoding and decoding method of depth model and video coder decoder |
CN104104964B (en) * | 2013-04-09 | 2019-03-12 | 乐金电子(中国)研究开发中心有限公司 | A kind of depth image interframe encode, coding/decoding method, encoder and decoder |
CN104104964A (en) * | 2013-04-09 | 2014-10-15 | 乐金电子(中国)研究开发中心有限公司 | Depth image interframe encoding and decoding method, encoder and decoder |
US10148935B2 (en) | 2013-04-09 | 2018-12-04 | Lg Electronics (China) R&D Center Co., Ltd. | Depth picture inter encoding and decoding method, encoder and decoder |
WO2014166423A1 (en) * | 2013-04-12 | 2014-10-16 | Mediatek Inc. | Method and apparatus for direct simplified depth coding |
CN103237214B (en) * | 2013-04-12 | 2016-06-08 | 华为技术有限公司 | The decoding method of depth image and coding and decoding device |
CN103237214A (en) * | 2013-04-12 | 2013-08-07 | 华为技术有限公司 | Method and device for coding and decoding depth images |
US10666977B2 (en) | 2013-04-12 | 2020-05-26 | Huawei Technologies Co., Ltd. | Methods and apparatuses for coding and decoding depth map |
US10142655B2 (en) | 2013-04-12 | 2018-11-27 | Mediatek Inc. | Method and apparatus for direct simplified depth coding |
WO2014166434A1 (en) * | 2013-04-12 | 2014-10-16 | 华为技术有限公司 | Method for coding/decoding depth image and coding/decoding device |
CN103237216A (en) * | 2013-04-12 | 2013-08-07 | 华为技术有限公司 | Encoding and decoding method and encoding and decoding device for depth image |
WO2014166426A1 (en) * | 2013-04-12 | 2014-10-16 | Mediatek Inc. | Method and apparatus of compatible depth dependent coding |
US10165252B2 (en) | 2013-07-12 | 2018-12-25 | Hfi Innovation Inc. | Method of sub-prediction unit inter-view motion prediction in 3D video coding |
WO2015003635A1 (en) * | 2013-07-12 | 2015-01-15 | Mediatek Singapore Pte. Ltd. | Method of sub-prediction unit inter-view motion predition in 3d video coding |
US10587859B2 (en) | 2013-07-12 | 2020-03-10 | Hfi Innovation Inc. | Method of sub-predication unit inter-view motion prediction in 3D video coding |
WO2015139563A1 (en) * | 2014-03-21 | 2015-09-24 | 华为技术有限公司 | Depth image coding/decoding method and coding/decoding device |
CN105637865A (en) * | 2015-02-05 | 2016-06-01 | 华为技术有限公司 | Image prediction method and related equipment |
CN105637865B (en) * | 2015-02-05 | 2019-11-19 | 华为技术有限公司 | Image prediction processing method and related equipment |
WO2016123783A1 (en) * | 2015-02-05 | 2016-08-11 | 华为技术有限公司 | Image prediction processing method and related device |
WO2016123801A1 (en) * | 2015-02-06 | 2016-08-11 | Mediatek Singapore Pte. Ltd. | Methods for partition mode coding |
CN105007494A (en) * | 2015-07-20 | 2015-10-28 | 南京理工大学 | Intra-frame wedge-shaped segmentation mode selection method of 3D video depth image model mode |
CN105007494B (en) * | 2015-07-20 | 2018-11-13 | 南京理工大学 | Wedge-shaped Fractionation regimen selection method in a kind of frame of 3D video depths image |
US20180218512A1 (en) * | 2015-07-31 | 2018-08-02 | Versitech Limited | A depth discontinuity-based method for efficient intra coding for depth videos |
WO2017020808A1 (en) * | 2015-07-31 | 2017-02-09 | Versitech Limited | A depth discontinuity-based method for efficient intra coding for depth videos |
CN108141593A (en) * | 2015-07-31 | 2018-06-08 | 港大科桥有限公司 | Depth discontinuity-based method for efficient intra coding for depth video |
US10713805B2 (en) * | 2015-07-31 | 2020-07-14 | Versitech Limited | Depth discontinuity-based method for efficient intra coding for depth videos |
CN108141593B (en) * | 2015-07-31 | 2022-05-03 | 港大科桥有限公司 | Depth discontinuity-based method for efficient intra coding for depth video |
CN109600600A (en) * | 2018-10-31 | 2019-04-09 | 万维科研有限公司 | It is related to the storage method and format of encoder, coding method and three layers of expression formula that depth map is converted |
WO2021196235A1 (en) * | 2020-04-03 | 2021-10-07 | Oppo广东移动通信有限公司 | Inter-frame prediction method, encoder, decoder, and storage medium |
CN116233440A (en) * | 2021-12-03 | 2023-06-06 | 中国联合网络通信集团有限公司 | Video coding processing method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN102790892B (en) | 2014-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102790892B (en) | Depth map coding method and device | |
US8902982B2 (en) | Depth map coding and decoding apparatus and method | |
KR20120080122A (en) | Apparatus and method for encoding and decoding multi-view video based competition | |
KR20090046826A (en) | Signal Processing Method and Device | |
CN101404766B (en) | A coding method for multi-viewpoint video signal | |
CN102801996B (en) | Rapid depth map coding mode selection method based on JNDD (Just Noticeable Depth Difference) model | |
CN108347605B (en) | Quick decision-making method for 3D video depth image quad-tree coding structure division | |
CN101729891A (en) | Method for encoding multi-view depth video | |
CN105791862B (en) | 3 d video encoding depth map internal schema selection method based on fringe complexity | |
CN103327327B (en) | For the inter prediction encoding unit selection method of high-performance video coding HEVC | |
KR20120084629A (en) | Apparatus and method for encoding and decoding motion information and disparity information | |
CN102387368B (en) | Fast selection method of inter-view prediction for multi-view video coding (MVC) | |
CN104469336A (en) | Coding method for multi-view depth video signal | |
CN101895749A (en) | Quick parallax estimation and motion estimation method | |
CN108449591A (en) | A method for simplification of deep video DMM mode | |
KR100947447B1 (en) | Method and apparatus for fast mode determination in multiview video coding | |
CN101888561B (en) | A rate-distortion optimization and dynamic adjustment method for multi-view video transmission error control | |
CN110557646A (en) | Intelligent inter-view coding method | |
CN103024395B (en) | Multiple view video coding mode selecting method and device | |
CN103220532B (en) | The associated prediction coded method of three-dimensional video-frequency and system | |
CN103188500B (en) | Encoding method for multi-view video signals | |
CN106210741A (en) | A kind of based on the deep video encryption algorithm of dependency between viewpoint | |
Li et al. | A fast inter frame prediction algorithm for multi-view video coding | |
CN101557519B (en) | Multi-view video coding method | |
KR20160004946A (en) | A method and an apparatus for processing a multi-view video signal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140611 |