CN101877790B - Panoramic video coding-oriented quick global motion estimation method - Google Patents
Panoramic video coding-oriented quick global motion estimation method Download PDFInfo
- Publication number
- CN101877790B CN101877790B CN 201010183380 CN201010183380A CN101877790B CN 101877790 B CN101877790 B CN 101877790B CN 201010183380 CN201010183380 CN 201010183380 CN 201010183380 A CN201010183380 A CN 201010183380A CN 101877790 B CN101877790 B CN 101877790B
- Authority
- CN
- China
- Prior art keywords
- motion
- piece
- global motion
- motion vector
- global
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 239000013598 vector Substances 0.000 claims abstract description 65
- 238000004364 calculation method Methods 0.000 claims abstract description 10
- 238000012804 iterative process Methods 0.000 claims abstract description 9
- 230000003247 decreasing effect Effects 0.000 claims description 8
- 238000006073 displacement reaction Methods 0.000 claims description 4
- 238000006467 substitution reaction Methods 0.000 claims 1
- 238000013507 mapping Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明公开了一种面向全景视频编码的快速全局运动估计方法。该方法分为两步:第一步,用一个基于统计特性与阈值均值相结合的亮度残差阈值模型来大致划分局部运动区域与全局运动区域,得到全局运动估计区域的近似集合;第二步,使用一种运动矢量残差分级阈值技术在能量残差函数最小化迭代过程中逐步细化全局运动像素点集合,最后分离出完整的全局运动区域,从而实现快速运动估计的目的。本发明的优点是:兼顾了全局运动估计的准确性和鲁棒性,在保证重构图象质量不下降,而且还有略微提升的前提下,大大节省运动估计计算开销。对全景视频序列的全局运动估计具有算法复杂度低,运动参数估计精确的效果。
The invention discloses a fast global motion estimation method for panoramic video coding. The method is divided into two steps: the first step is to roughly divide the local motion area and the global motion area with a luminance residual threshold model based on the combination of statistical characteristics and the threshold value, and obtain an approximate set of global motion estimation areas; the second step , using a motion vector residual grading threshold technique to gradually refine the global motion pixel set in the iterative process of energy residual function minimization, and finally separate the complete global motion region, so as to achieve the purpose of fast motion estimation. The advantages of the present invention are: the accuracy and robustness of the global motion estimation are taken into account, and the motion estimation calculation cost is greatly saved under the premise of ensuring that the quality of the reconstructed image is not lowered, but also slightly improved. The global motion estimation of panoramic video sequence has the effect of low algorithm complexity and accurate motion parameter estimation.
Description
技术领域 technical field
本发明涉及一种图象视频编码压缩技术,具体地说是一种面向全景视频编码的快速全局运动估计方法。The invention relates to an image video coding compression technology, in particular to a fast global motion estimation method for panoramic video coding.
背景技术 Background technique
全景视频广泛应用在体育节目、三维电影、多方视频会议等应用中。一幅全景图像是由一个六面或者八面的鱼眼摄像机绕着固定的轴做旋转或者缩放运动,对摄像机周围的场景同一时域拍摄不同方位的照片,把这些照片用一些“缝合”技术无缝拼接,再根据柱面或者球面映射算法映射成柱面图或者球面图而成。因此,全景图像的分辨率一般来说比较高,运动细节更丰富。而且,由于全景视频为了要让用户有现实场景体验,一般支持虚拟的摄像机运动重现,因此,全局运动和局部运动交错特征更明显。再者,柱面和球面映射算法会引起物体运动变形,使得运动估计的难度加大。但同时,我们从二维平面坐标映射柱面坐标和球面坐标的分析中可以发现,全景图像物体在柱面或者球面上的运动形变主要表现为摄像机旋转、缩放、错切运动的形变,因此,我们可以使用全局运动模型来对全景视频进行全局运动估计补偿。Panoramic video is widely used in sports programs, 3D movies, multi-party video conferencing and other applications. A panoramic image is a six-sided or eight-sided fisheye camera that rotates or zooms around a fixed axis, and takes pictures of different orientations of the scene around the camera in the same time domain, and uses some "stitching" techniques for these pictures Seamless splicing, and then mapped into a cylindrical or spherical map according to the cylindrical or spherical mapping algorithm. Therefore, the resolution of the panoramic image is generally higher, and the motion details are richer. Moreover, since the panoramic video generally supports virtual camera motion reproduction in order to allow users to have a real scene experience, the interlacing feature of global motion and local motion is more obvious. Furthermore, the cylindrical and spherical mapping algorithms will cause object motion deformation, making motion estimation more difficult. But at the same time, we can find from the analysis of two-dimensional plane coordinates mapping cylindrical coordinates and spherical coordinates that the motion deformation of the panoramic image object on the cylindrical or spherical surface is mainly manifested as the deformation of camera rotation, scaling, and staggered movement. Therefore, We can use the global motion model to perform global motion estimation compensation on the panoramic video.
但是,以往的研究表明,全局运动估计存在着计算量大的问题。全局运动估计关键是对全局运动模型参数的估计。理论上来说,对于一个确定的全局运动参数模型,如仿射六参数运动模型,只需3个背景像素点的运动矢量即可求得六个运动参数的值。但一般的运动矢量方法只能得到精度有限的运动矢量,如果仅用很少几个像素的运动矢量来估计全局运动模型参数,得到的结果精度非常低,因此需要更多像素的运动矢量参与全局运动模型参数估计来提高准确性。这样,参数估计就成了一个解矛盾方程组的问题,可用最小二乘法来求解,如高斯牛顿迭代法。通过数次迭代计算解方程组,直到最后全局运动模型参数值收敛于一个较为稳定的值。但这一迭代过程是全局运动估计中计算复杂度最高的部分,尤其当需处理的全局运动模型较为复杂,迭代次数较多的情况下。However, previous studies have shown that global motion estimation suffers from a computationally intensive problem. The key to global motion estimation is to estimate the parameters of the global motion model. Theoretically, for a definite global motion parameter model, such as an affine six-parameter motion model, only the motion vectors of three background pixels are needed to obtain the values of six motion parameters. However, the general motion vector method can only obtain motion vectors with limited precision. If only a few pixels of motion vectors are used to estimate the global motion model parameters, the accuracy of the obtained results is very low, so more pixel motion vectors are needed to participate in the global motion model. Motion model parameter estimation to improve accuracy. In this way, parameter estimation becomes a problem of solving contradictory equations, which can be solved by the least squares method, such as the Gauss-Newton iterative method. The solution equations are calculated through several iterations until the parameter values of the global motion model converge to a relatively stable value. However, this iterative process is the most computationally complex part of global motion estimation, especially when the global motion model to be processed is relatively complex and the number of iterations is large.
再者,大多数的视频场景都包含有全局运动和局部运动,如果让所有像素的运动矢量都参与全局运动估计,则作局部运动的像素点以及运动矢量估计误差较大的像素点会对全局运动估计产生很大的干扰,使得运动模型参数估计要被迭代很多次才能收敛于一个稳定值。不但降低了全局运动估计的精度,而且使得运算复杂度大大升高。Furthermore, most video scenes contain global motion and local motion. If the motion vectors of all pixels are involved in global motion estimation, the pixels with local motion and pixels with large motion vector estimation errors will affect the global motion. Motion estimation produces a lot of interference, so that motion model parameter estimation must be iterated many times before it can converge to a stable value. It not only reduces the precision of global motion estimation, but also greatly increases the computational complexity.
局部运动区域里的像素点,我们称为外点,全局运动像素点,我们称为内点。我们要研究的快速全局运动估计方法的重点,就是把局部运动区域从整幅图象中有效分割出来,使得全局运动区域包含尽可能多的内点和尽可能少的外点。区分外点和内点的关键和难点在于阈值T的确定。在有些文献中,T设置为一个固定的值(称之为固定阈值法),但是往往很难找到一个合适的固定阈值T胜任于整个迭代过程:如果T太小,迭代过程很可能一开始就收敛于需要局部运动区域的局部,尤其是局部运动区域占整个场景的比例较大的时候;而如果T太大则迭代结束的时候,全局运动像素点将有一部分被错判为局部运动点,从而大大影响参数估计的准确性。有些文献提到用百分比阈值r%代替阈值T(称之为固定百分比阈值法),即令外点集合为残差值较大的r%像素的集合。但是由于不同视频中全局运动区域占整个场景的比例大小都不相同,因此这种方法要么只能得到部分的全局运动区域,要么在内点集合中会包含很多外点。有学者提出了一种改进的方法:令阈值T为所有像素的残差的均值(称之为残差均值阈值法),但是残差均值法并不一定能很好地刻画全局运动区域和局部运动区域的差异,实验结果也表明在有些情况下这种方法可能使内点集合收敛于局部运动区域。The pixels in the local motion area are called outer points, and the global motion pixels are called inner points. The focus of the fast global motion estimation method we want to study is to effectively segment the local motion area from the whole image, so that the global motion area contains as many interior points and as few exterior points as possible. The key and difficulty in distinguishing outliers and inliers lies in the determination of the threshold T. In some literatures, T is set to a fixed value (called the fixed threshold method), but it is often difficult to find a suitable fixed threshold T that is competent for the entire iterative process: if T is too small, the iterative process is likely to start. Converge in the local area that requires local motion, especially when the local motion area accounts for a large proportion of the entire scene; and if T is too large, at the end of the iteration, some global motion pixels will be misjudged as local motion points, This greatly affects the accuracy of parameter estimation. Some literature mentions that the threshold T is replaced by a percentage threshold r% (called a fixed percentage threshold method), that is, the set of outliers is a set of r% pixels with a large residual value. However, since the proportion of the global motion area to the entire scene in different videos is different, this method can only obtain a part of the global motion area, or the set of inliers will contain many outliers. Some scholars have proposed an improved method: let the threshold T be the mean value of the residuals of all pixels (called the residual mean threshold method), but the residual mean method does not necessarily describe the global motion area and the local area well. The difference in the motion area, the experimental results also show that in some cases, this method may make the interior point set converge to the local motion area.
前面提到的这些内区域确定方法很难兼顾参数估计的准确性和鲁棒性,而且针对不同的视频场景往往需要事先选择一个理想的阈值,适应性较差。The above-mentioned inner region determination methods are difficult to balance the accuracy and robustness of parameter estimation, and often need to select an ideal threshold in advance for different video scenes, which has poor adaptability.
发明内容 Contents of the invention
本发明的目的是提供一种面向全景视频编码的快速分割全局运动区域和局部运动区域的全局运动估计方法。The purpose of the present invention is to provide a global motion estimation method for fast segmentation of global motion areas and local motion areas for panoramic video coding.
本发明解决上述技术问题的技术方案是:The technical scheme that the present invention solves the problems of the technologies described above is:
一种面向全景视频编码的快速全局运动估计方法,该方法分为两步进行:第一步,执行亮度残差阈值法;其进一步包括以下步骤:A fast global motion estimation method for panoramic video coding, the method is divided into two steps: the first step, the implementation of brightness residual threshold method; it further includes the following steps:
1-1,把整幅图像分成互不重叠的块,块大小是16×16,用块匹配算法对每一个块做运动估计,得到每一个块的运动矢量(Δx,Δy);1-1. Divide the entire image into non-overlapping blocks with a block size of 16×16. Use a block matching algorithm to perform motion estimation on each block to obtain the motion vector (Δx, Δy) of each block;
1-2,使用步骤1-1中得到的运动矢量(Δx,Δy)对当前帧每一个块做运动补偿,得到当前帧每一像素点的预测值Ik;1-2, use the motion vector (Δx, Δy) obtained in step 1-1 to perform motion compensation on each block of the current frame, and obtain the predicted value I k of each pixel in the current frame;
1-3,计算当前块内所有像素的梯度均值S,其中,以及在参考帧中的对应块内所有像素的梯度均值S′,比较S和S′残差绝对值的大小,也即|S-S′|计算方式为公式(1),即
1-4,计算阈值Cg,阈值Cg根据公式(2)来确定,即式中,N是图像被划分成互不重叠的块的个数,Gi是根据公式(1)计算的图像中第i个块的亮度残差,代表当前帧的亮度残差均值;如果当前块的亮度残差GB小于Cg,则当前块被判定为局部运动区域块,从全局运动宏块集合中剔除出去;1-4, calculate the threshold C g , the threshold C g is determined according to the formula (2), that is In the formula, N is the number of blocks that are divided into non-overlapping blocks in the image, G i is the brightness residual of the i-th block in the image calculated according to formula (1), Represents the mean value of the luminance residual of the current frame; if the luminance residual G B of the current block is smaller than C g , the current block is judged as a local motion area block and is removed from the global motion macroblock set;
第二步,执行运动矢量残差分级阈值法,具体包括:The second step is to implement the motion vector residual classification threshold method, which specifically includes:
2-1,使用块匹配算法估计当前帧每一块的局部运动位移,得到每一个块的局部运动矢量(Δx,Δy);2-1, use the block matching algorithm to estimate the local motion displacement of each block in the current frame, and obtain the local motion vector (Δx, Δy) of each block;
2-2,估计运动模型参数:选取图像左上角、右上角、左下角三个48×48图像区域的大小为16×16的中心块的运动矢量作为第一次高斯牛顿迭代估计模型参数过程的初始化输入值,通过高斯牛顿迭代计算,得出初始化的若干个运动模型参数值;2-2. Estimate motion model parameters: select the motion vectors of the center block with a size of 16×16 in three 48×48 image areas in the upper left corner, upper right corner, and lower left corner of the image as the first Gauss-Newton iterative model parameter estimation process Initialize the input value, through Gauss-Newton iterative calculation, to obtain the initialization of several motion model parameter values;
2-3,计算图像中每一个块的全局运动矢量(Δx′,Δy′):图像中,背景区域的块运动属于全局运动,而前景区域的块运动属于局部运动,通过把上一步骤中得到的运动模型参数值重新代入高斯牛顿迭代中,根据每一个块中心像素点的坐标(x,y)的值,分别计算出每一个块的全局运动矢量,对于局部运动块,该运动矢量是伪全局运动矢量;2-3. Calculate the global motion vector (Δx′, Δy′) of each block in the image: in the image, the block motion in the background area belongs to the global motion, while the block motion in the foreground area belongs to the local motion. The obtained motion model parameter values are resubstituted into the Gauss-Newton iteration, and the global motion vector of each block is calculated according to the coordinate (x, y) value of the central pixel point of each block. For the local motion block, the motion vector is Pseudo-global motion vector;
2-4,计算运动矢量残差:对于同一个块,把步骤2-1得出的该块的运动矢量(Δx,Δy)与步骤2-3中得出的该块的运动矢量(Δx′,Δy′)作方差;2-4. Calculating the motion vector residual: For the same block, combine the motion vector (Δx, Δy) of the block obtained in step 2-1 with the motion vector (Δx′) of the block obtained in step 2-3 , Δy′) as the variance;
2-5,设置百分比阈值排除局部运动块:采用分级递减的百分比阈值P来逐步精细全局运动区域,同时设置一个分级递减的运动矢量残差阈值T来判断本次迭代是否可以结束,在第一次迭代过程中,设置P的初始值为50,同时设置T为0.04,计算公式为
把满足上式条件的最多不超过图像块数目总和的P百分比的块标记为局部运动块,剩余的标记为全局运动块,作为下一次全局运动估计迭代计算的块集合;如果本次全局运动估计块集合里所有块的运动矢量残差都不满足上式条件,则结束本次迭代,生成最终的运动模型参数,同时可根据每次迭代所标记的局部运动块集合分割出局部运动区域;P和T的递减规则:每次进入新一轮的迭代计算前,将P更新为P的四分之一,将T更新为T=T-0.01;第一次高斯牛顿迭代结束以后,将得到新的一套运动模型参数值,把这套运动模型参数值作为下一轮高斯牛顿迭代的输入值;Mark the blocks that meet the above formula conditions and do not exceed the P percentage of the sum of the number of image blocks as local motion blocks, and the rest are marked as global motion blocks, which will be used as the block set for the next iteration of global motion estimation; if this global motion estimation If the motion vector residuals of all blocks in the block set do not meet the above conditions, this iteration ends, and the final motion model parameters are generated, and at the same time, the local motion area can be segmented according to the local motion block set marked in each iteration; P The decreasing rule of T and T: Before entering a new round of iterative calculation, update P to a quarter of P, and update T to T=T-0.01; after the first Gauss-Newton iteration, a new A set of motion model parameter values, and use this set of motion model parameter values as the input value of the next Gauss-Newton iteration;
2-6,重复步骤2-3至2-5,直到所有块的运动矢量残差都小于T或者迭代次数等于4,则结束迭代过程。2-6. Steps 2-3 to 2-5 are repeated until the motion vector residuals of all blocks are less than T or the number of iterations is equal to 4, then the iterative process ends.
附图说明 Description of drawings
图1是本发明面向全景视频编码的快速全局运动估计算法流程图。FIG. 1 is a flow chart of a fast global motion estimation algorithm for panoramic video coding in the present invention.
具体实施方式 Detailed ways
下面结合具体实施方式对本发明作进一步描述:The present invention will be further described below in conjunction with specific embodiment:
本发明具体实施分两步进行:The specific implementation of the present invention is carried out in two steps:
1.第一步,执行亮度残差阈值法。1. The first step is to perform the brightness residual threshold method.
在运用递归最小二乘法估计全局运动时,初始化输入值是图像中各宏块经过块匹配运动估计后得到的运动矢量。处于局部运动区域的宏块的运动矢量不属于全局运动内点的集合,是对全局运动参数估计造成干扰的外点,将会消耗大量的运算时间.因此,如果在使用块匹配算法进行运动估计时就能够对宏块运动估计的属性进行预判,提前发现可能会干扰全局运动估计的宏块并予以剔除,必然会大大降低全局运动估计的计算量。When using the recursive least square method to estimate the global motion, the initialization input value is the motion vector obtained after the block matching motion estimation of each macroblock in the image. The motion vector of a macroblock in the local motion area does not belong to the set of global motion internal points, and is an external point that interferes with the estimation of global motion parameters, which will consume a lot of computing time. Therefore, if the motion estimation is performed using the block matching algorithm When it is possible to predict the properties of the macroblock motion estimation, find and eliminate the macroblocks that may interfere with the global motion estimation in advance, which will inevitably greatly reduce the calculation amount of the global motion estimation.
对视频图像的分析可以发现,全局运动区域的纹理较为丰富;而局部运动一般位于纹理灰度一致或灰度极其平滑的区域。这是因为局部运动区域所包含的运动信息比较少,相对来说,原始帧与参考帧对应块之间的亮度残差也很少。因此,本发明通过宏块运动补偿后的亮度信息来对每个宏块进行预分析,以判断该宏块是否属于局部运动宏块,如果是,则把该宏块在进行全局运动估计之前从全局运动宏块集合中剔除出去,以节省全局运动估计的计算开销,提高全局运动估计的精度。The analysis of the video image shows that the texture of the global motion area is relatively rich; while the local motion is generally located in the area where the gray scale of the texture is consistent or the gray scale is extremely smooth. This is because the motion information contained in the local motion area is relatively small, and relatively speaking, the luminance residual between the original frame and the corresponding block of the reference frame is also very small. Therefore, the present invention pre-analyzes each macroblock through the luminance information after macroblock motion compensation to determine whether the macroblock belongs to a local motion macroblock, and if so, the macroblock is removed from the macroblock before global motion estimation. The global motion macroblock set is eliminated to save the calculation cost of the global motion estimation and improve the accuracy of the global motion estimation.
该算法分为以下四步:The algorithm is divided into the following four steps:
1)把整幅图像分成互不重叠的块,块大小是16×16,用块匹配算法对每一个块做运动估计,得到每一个块的运动矢量(Δx,Δy)。理论上来说,块大小越小,运动估计结果越精确,一个极端的情况,当块大小为一个像素点,则运动估计结果最准确。但这样一来,运动估计的复杂度将大大升高,需要编码传输的运动矢量比特数也更多。本算法采用16×16块,兼顾考虑计算复杂度与运动估计精确性。同时,对于块匹配运动估计,我们采用的是三步搜索快速运动估计,进一步降低运动估计的复杂度。通过块匹配算法得到的每一个块的运动矢量(Δx,Δy)需要保存下来,作为执行第二环节运动矢量残差分级阈值法的初始化输入。1) Divide the whole image into non-overlapping blocks, the block size is 16×16, use the block matching algorithm to perform motion estimation for each block, and obtain the motion vector (Δx, Δy) of each block. Theoretically, the smaller the block size, the more accurate the motion estimation result. In an extreme case, when the block size is one pixel, the motion estimation result is the most accurate. But in this way, the complexity of motion estimation will be greatly increased, and the number of motion vector bits that need to be coded and transmitted will also be more. This algorithm adopts 16×16 blocks, taking into account both the computational complexity and the accuracy of motion estimation. At the same time, for block matching motion estimation, we use three-step search fast motion estimation to further reduce the complexity of motion estimation. The motion vector (Δx, Δy) of each block obtained through the block matching algorithm needs to be saved as an initialization input for performing the second step motion vector residual classification threshold method.
2)使用上一步块匹配算法得到的运动矢量(Δx,Δy)对当前帧每一个块做运动补偿,得到当前帧每一像素点的预测值Ik。因为(Δx,Δy)代表的是由于物体本身运动所引起的帧间局部运动位移MV1,做帧间运动补偿以后,则可以通过阈值化当前帧像素(i,j)的亮度Ik与下一帧中((i,j)+MV1)位置处像素的亮度的差异来判断当前帧像素(i,j)是全局运动区域像素还是局部运动区域像素。2) Use the motion vector (Δx, Δy) obtained by the block matching algorithm in the previous step to perform motion compensation for each block in the current frame, and obtain the predicted value I k of each pixel in the current frame. Because (Δx, Δy) represents the inter-frame local motion displacement MV 1 caused by the motion of the object itself, after inter-frame motion compensation, the brightness I k of the current frame pixel (i, j) can be thresholded with the lower The brightness of the pixel at the position ((i, j)+MV 1 ) in a frame To determine whether the current frame pixel (i, j) is a pixel in the global motion region or a pixel in the local motion region.
3)计算当前块内所有像素的梯度均值S,其中,以及在参考帧中的对应块内所有像素的梯度均值S′,其中,比较S和S′残差绝对值的大小,也即|S-S′|。如下式所示:3) Calculate the gradient mean S of all pixels in the current block, where, And the gradient mean value S' of all pixels in the corresponding block in the reference frame, where, Compare the size of the absolute value of the residuals of S and S', that is, |SS'|. As shown in the following formula:
在式子里,m×n是块大小。In the formula, m×n is the block size.
4)计算阈值Cg。阈值Cg根据以下式子来确定:4) Calculate the threshold C g . The threshold C g is determined according to the following formula:
式中,N是图像被划分成互不重叠的块的个数,Gi是图像中第i个块的亮度残差(根据公式1计算),代表当前帧的亮度残差均值。如果当前块的亮度残差GB小于Cg,则当前块被判定为局部运动区域块,从全局运动宏块集合中剔除出去。考虑到阈值临界点Cg的取值过大将会导致全局运动参数估计失败,我们确定公式2中k的取值为:当低码率情况下,如编码CIF、QCIF格式的视频序列,k=1.1;当高码率情况下,如编码4CIF、高清、全景视频序列,k=1.2,也即如下式所示:In the formula, N is the number of blocks that are divided into non-overlapping blocks in the image, G i is the luminance residual of the i-th block in the image (calculated according to formula 1), Represents the mean value of the brightness residual of the current frame. If the luminance residual G B of the current block is smaller than C g , the current block is determined to be a local motion area block, and is excluded from the global motion macroblock set. Considering that the value of the threshold critical point C g is too large will lead to the failure of the global motion parameter estimation, we determine the value of k in formula 2: when the code rate is low, such as coding video sequences in CIF and QCIF formats, k = 1.1; when the bit rate is high, such as encoding 4CIF, high-definition, and panoramic video sequences, k=1.2, which is shown in the following formula:
Cg=1.1Gav,低码率情况下C g =1.1G av , in case of low bit rate
(3)(3)
Cg=1.2Gav,高码率情况下C g =1.2G av , in case of high bit rate
2.第二步,执行运动矢量残差分级阈值法。2. The second step is to implement the motion vector residual classification threshold method.
运动矢量残差法的原理主要是基于全局运动矢量与局部运动矢量的差异,对这一差异的度量是该方法的关键点。本发明采用一种分级阈值方法来实现该度量的准确划分。这个算法的主要思路是:在迭代的初始阶段,先用一个大的百分比阈值去除绝大部分的外点。因为在一开始的时候,与内点差异较大的外点在图像中占的比例是最大的(特别是局部运动区域,往往与全局运动区域有较为明显的运动性质差异),采用一个大的百分比阈值可迅速去除这些差异性大的外点,一旦先排除了差异性较大的外点的干扰,则整个迭代过程收敛得更快;第一次迭代后,已经得到了一个粗略的全局运动估计结果,这个时候图像中剩下的待处理的外点是与内点差异较小的像素点,在图像中占的比例不大,在接下来的几次迭代中,我们可以分级减少百分比阈值的值,逐渐排除这些差异性小的外点,精确细化内点的集合,直到把尽可能多的外点都排除出内点集合。具体算法步骤如下:The principle of the motion vector residual method is mainly based on the difference between the global motion vector and the local motion vector, and the measurement of this difference is the key point of the method. The present invention adopts a classification threshold method to realize the accurate division of the measure. The main idea of this algorithm is: in the initial stage of iteration, first use a large percentage threshold to remove most of the outliers. Because at the beginning, the proportion of outliers that are quite different from inliers in the image is the largest (especially in local motion areas, which often have obvious differences in motion properties from global motion areas), a large The percentage threshold can quickly remove these outliers with large differences. Once the interference of outliers with large differences is excluded first, the entire iterative process converges faster; after the first iteration, a rough global motion has been obtained As a result of the estimation, the remaining outliers in the image at this time are pixels with small differences from the inliers, which account for a small proportion in the image. In the next few iterations, we can reduce the percentage threshold in stages value, gradually exclude these outliers with small differences, and refine the set of inliers precisely until as many outliers as possible are excluded from the set of inliers. The specific algorithm steps are as follows:
1)使用块匹配算法估计当前帧每一块的局部运动位移。该步骤在上一环节-基于亮度残差的阈值法中已经执行。1) Estimate the local motion displacement of each block in the current frame using a block matching algorithm. This step has been performed in the previous link - threshold method based on luminance residual.
2)估计运动模型参数。考虑到全局运动区域一般集中在图像背景区域,也就是图像的边缘部分,我们选取图像左上角、右上角、左下角三个48×48图像区域的中心块(块大小为16×16)的运动矢量作为第一次高斯牛顿迭代估计模型参数过程的初始化输入值,通过高斯牛顿迭代计算,可得出初始化的若干个运动模型参数值。2) Estimate motion model parameters. Considering that the global motion area is generally concentrated in the image background area, that is, the edge part of the image, we select the three central blocks of the 48×48 image area (the block size is 16×16) in the upper left corner, upper right corner, and lower left corner of the image. The vector is used as the initialization input value of the first Gauss-Newton iterative estimation model parameter process, and several initial motion model parameter values can be obtained through Gauss-Newton iterative calculation.
3)计算图像中每一个块的全局运动矢量(Δx′,Δy′)。图像中,背景区域的块运动属于全局运动,而前景区域的块运动属于局部运动,但我们仍然可以通过把上一步骤中得到的运动模型参数值重新代入高斯牛顿迭代中,根据每一个块中心像素点的坐标(x,y)的值,分别计算出每一个块的“全局运动矢量”。对于局部运动块,该运动矢量是伪全局运动矢量。3) Calculate the global motion vector (Δx', Δy') of each block in the image. In the image, the block motion in the background area belongs to the global motion, while the block motion in the foreground area belongs to the local motion, but we can still resubstitute the motion model parameter values obtained in the previous step into the Gauss-Newton iteration, according to each block center The value of the coordinate (x, y) of the pixel point is used to calculate the "global motion vector" of each block. For local motion blocks, this motion vector is a pseudo-global motion vector.
4)计算运动矢量残差。对于同一个块,把步骤(1)得出的该块的运动矢量(Δx,Δy)与步骤(3)中得出的该块的运动矢量(Δx′,Δy′)作方差,如公式4所示。计算运动矢量残差的目的是为了判断该像素块的实际运动矢量与全局运动矢量的差异,如果运动矢量残差较大,说明该块很有可能是局部运动块,反之,该块很有可能是全局运动块。4) Calculate the motion vector residual. For the same block, take the motion vector (Δx, Δy) of the block obtained in step (1) and the motion vector (Δx′, Δy′) of the block obtained in step (3) as the variance, as shown in formula 4 shown. The purpose of calculating the motion vector residual is to judge the difference between the actual motion vector of the pixel block and the global motion vector. If the motion vector residual is large, it means that the block is likely to be a local motion block. Otherwise, the block is likely to be is the global motion block.
5)设置百分比阈值排除局部运动块。我们采用一个分级递减的百分比阈值P来逐步精细全局运动区域,同时设置一个分级递减的运动矢量残差阈值T来判断本次迭代是否可以结束。在第一次迭代过程中,我们设置P的初始值为50。同时设置T为0.04,即:5) Set a percentage threshold to exclude local motion blocks. We use a progressively decreasing percentage threshold P to gradually refine the global motion area, and set a hierarchically decreasing motion vector residual threshold T to judge whether this iteration can end. During the first iteration, we set the initial value of P to 50. At the same time set T to 0.04, namely:
把满足上式条件的最多不超过图像块数目总和的P百分比的块标记为局部运动块,剩余的标记为全局运动块,作为下一次全局运动估计迭代计算的块集合。如果本次全局运动估计块集合里所有块的运动矢量残差都不满足上式条件,则结束本次迭代,生成最终的运动模型参数,同时可根据每次迭代所标记的局部运动块集合分割出局部运动区域。P和T的递减规则:每次进入新一轮的迭代计算前,将P更新为P的四分之一(P=P/4),即第二次迭代过程中,P设为12.5,第三次迭代过程中,P设为3.125……这是因为随着迭代次数的增加,内点集合越来越趋于稳定,所包含的外点越来越少,所以P值需要线性递减,以免迭代收敛于内点集合的局部。同时将T更新为T=T-0.01,因为每次迭代结束以后,剩下的块的运动矢量残差更小,这其中有一部分是与全局运动属性差异更小的局部运动块,需要用一个更小的T来分辨它们。当迭代结果趋向稳定的时候,用递减的T能同时达到加快迭代收敛,减低计算复杂度和保证全局运动估计结果逐步精细的目的。第一次高斯牛顿迭代结束以后,将得到新的一套运动模型参数值。把这套运动模型参数值作为下一轮高斯牛顿迭代的输入值。Mark the blocks that meet the above formula conditions and do not exceed the P percentage of the sum of the number of image blocks as local motion blocks, and the rest are marked as global motion blocks, which are used as the set of blocks for the next iteration of global motion estimation. If the motion vector residuals of all blocks in the global motion estimation block set do not meet the above conditions, this iteration ends, and the final motion model parameters are generated, and at the same time, it can be divided according to the local motion block set marked in each iteration out of the local area of motion. The decreasing rule of P and T: Before entering a new round of iterative calculation, update P to a quarter of P (P=P/4), that is, during the second iteration, P is set to 12.5, and the first During the three iterations, P is set to 3.125... This is because as the number of iterations increases, the set of inliers tends to be more and more stable, and there are fewer and fewer outliers, so the P value needs to decrease linearly to avoid The iteration converges to a local set of interior points. At the same time, T is updated to T=T-0.01, because after the end of each iteration, the motion vector residuals of the remaining blocks are smaller, some of which are local motion blocks with smaller differences from the global motion attributes, and a Smaller T to tell them apart. When the iteration result tends to be stable, using decreasing T can simultaneously achieve the purpose of speeding up iteration convergence, reducing computational complexity and ensuring that the global motion estimation result is gradually refined. After the first Gauss-Newton iteration, a new set of motion model parameter values will be obtained. Use this set of motion model parameter values as the input values for the next Gauss-Newton iteration.
6)重复步骤3)、4)、5),直到所有块的运动矢量残差都小于T或者迭代次数等于4,则结束迭代过程。实验证明,当迭代次数超过4次,模型参数的解的精确性增加极其有限,也就是说,第4、第5、第6次迭代的结果非常近似,甚至无异,模型参数的解已经达到了该分级阈值迭代法精确性的一个极限。6) Steps 3), 4) and 5) are repeated until the motion vector residuals of all blocks are less than T or the number of iterations is equal to 4, then the iterative process ends. Experiments have proved that when the number of iterations exceeds 4, the accuracy of the solution of the model parameters increases extremely limited, that is to say, the results of the 4th, 5th, and 6th iterations are very similar, or even the same, and the solution of the model parameters has reached A limit of the accuracy of the classification threshold iterative method is set.
最后所应说明的是,以上实施例仅用以说明本发明的技术方案而非限制。尽管参照实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,对本发明的技术方案进行修改或者等同替换,都不脱离本发明技术方案的精神和范围,其均应涵盖在本发明的权利要求内。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than limit them. Although the present invention has been described in detail with reference to the embodiments, those skilled in the art should understand that modifications or equivalent replacements to the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and all of them should be included in the scope of the present invention. within the claims.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010183380 CN101877790B (en) | 2010-05-26 | 2010-05-26 | Panoramic video coding-oriented quick global motion estimation method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 201010183380 CN101877790B (en) | 2010-05-26 | 2010-05-26 | Panoramic video coding-oriented quick global motion estimation method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101877790A CN101877790A (en) | 2010-11-03 |
CN101877790B true CN101877790B (en) | 2012-01-25 |
Family
ID=43020239
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 201010183380 Active CN101877790B (en) | 2010-05-26 | 2010-05-26 | Panoramic video coding-oriented quick global motion estimation method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101877790B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102547264B (en) * | 2010-12-28 | 2014-09-03 | 深圳市云宙多媒体技术有限公司 | Motion prediction method and system of interframe coding |
CN105933709B (en) * | 2011-03-09 | 2020-04-28 | 株式会社东芝 | Moving image encoding method, moving image encoding device, moving image decoding method, and moving image decoding device |
PT2690870T (en) | 2011-03-21 | 2020-02-10 | Lg Electronics Inc | Method for selecting motion vector predictor and device using same |
CN103002225B (en) * | 2011-04-20 | 2017-04-12 | 高通科技公司 | Multiple exposure high dynamic range image capture |
CN105847804B (en) * | 2016-05-18 | 2017-12-15 | 信阳师范学院 | A kind of up-conversion method of video frame rate based on sparse redundant representation model |
CN110378930B (en) * | 2019-09-11 | 2020-01-31 | 湖南德雅坤创科技有限公司 | Moving object extraction method and device, electronic equipment and readable storage medium |
CN111816262B (en) * | 2020-06-01 | 2024-09-03 | 郑州轻工业大学 | Automatic modeling method of spectrometer |
CN115002360B (en) * | 2022-05-06 | 2024-12-27 | 北京师范大学 | A non-uniformity correction method for infrared video based on robust estimation |
CN118828207B (en) * | 2024-09-14 | 2024-11-29 | 四川国创新视超高清视频科技有限公司 | Image anti-shake method and anti-shake system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1212578A (en) * | 1998-09-18 | 1999-03-31 | 清华大学 | Global decision method for video frequency coding |
WO2007017840A1 (en) * | 2005-08-10 | 2007-02-15 | Nxp B.V. | Method and device for digital image stabilization |
CN101272450A (en) * | 2008-05-13 | 2008-09-24 | 浙江大学 | Global Motion Estimation Outlier Removal and Motion Parameter Refinement Method in Sprite Coding |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8050324B2 (en) * | 2006-11-29 | 2011-11-01 | General Instrument Corporation | Method and apparatus for selecting a reference frame for motion estimation in video encoding |
US20100013989A1 (en) * | 2008-07-18 | 2010-01-21 | Samsung Electronics Co. Ltd. | Method and system for controlling fallback in generating intermediate fields of a video signal |
-
2010
- 2010-05-26 CN CN 201010183380 patent/CN101877790B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1212578A (en) * | 1998-09-18 | 1999-03-31 | 清华大学 | Global decision method for video frequency coding |
WO2007017840A1 (en) * | 2005-08-10 | 2007-02-15 | Nxp B.V. | Method and device for digital image stabilization |
CN101272450A (en) * | 2008-05-13 | 2008-09-24 | 浙江大学 | Global Motion Estimation Outlier Removal and Motion Parameter Refinement Method in Sprite Coding |
Non-Patent Citations (3)
Title |
---|
Jiali Zheng et al.Fast global motion estimation using threshold method.《Proceedings of SPIE》.2007, * |
Zheng Jiali et al.Panoramic Video Coding Using Affine Motion Comprensated Prediction.《Springer-Verlag Berlin MCAM 2007 LNCS 》.2007, * |
陈韩锋,戚飞虎.全局运动估计的阈值可变双迭代法.《上海交通大学学报》.2004,第38卷(第1期), * |
Also Published As
Publication number | Publication date |
---|---|
CN101877790A (en) | 2010-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101877790B (en) | Panoramic video coding-oriented quick global motion estimation method | |
CN110782490B (en) | Video depth map estimation method and device with space-time consistency | |
CN107844779B (en) | A video key frame extraction method | |
WO2018006825A1 (en) | Video coding method and apparatus | |
US8781253B2 (en) | Method and apparatus for video object segmentation | |
CN106210449B (en) | A frame rate up-conversion motion estimation method and system for multi-information fusion | |
CN107968946B (en) | Video frame rate improving method and device | |
Seyid et al. | FPGA-based hardware implementation of real-time optical flow calculation | |
CN105931189B (en) | A video super-resolution method and device based on an improved super-resolution parametric model | |
Veselov et al. | Iterative hierarchical true motion estimation for temporal frame interpolation | |
Cho et al. | Extrapolation-based video retargeting with backward warping using an image-to-warping vector generation network | |
CN107330863B (en) | An Image Denoising Method Based on Noise Estimation | |
Huang et al. | Algorithm and architecture design of multirate frame rate up-conversion for ultra-HD LCD systems | |
CN101272450B (en) | Global motion estimation exterior point removing and kinematic parameter thinning method in Sprite code | |
Fu et al. | CBARF: cascaded bundle-adjusting neural radiance fields from imperfect camera poses | |
Zhang et al. | As-deformable-as-possible single-image-based view synthesis without depth prior | |
Kim et al. | Probabilistic global motion estimation based on Laplacian two-bit plane matching for fast digital image stabilization | |
Nayak et al. | Evaluation and comparison of motion estimation algorithms for video compression | |
Sabae et al. | NoPose-NeuS: Jointly optimizing camera poses with neural implicit surfaces for multi-view reconstruction | |
Santoro et al. | Motion estimation using block overlap minimization | |
He et al. | Multi-Scale Representation Learning for Image Restoration with State-Space Model | |
Tran et al. | Online Video Stabilization Based on Converting Deep Dense Optical Flow to Motion Mesh | |
Qian et al. | Global motion estimation under translation-zoom ambiguity | |
Santoro et al. | Joint framework for motion validity and estimation using block overlap | |
Shi et al. | Motion-compensated temporal frame interpolation algorithm based on global entirety unidirectional motion estimation and local fast bidirectional motion estimation |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20180927 Address after: 530007 Room 501, Building D7, Business Incubation Base Phase I, China-ASEAN Science and Technology Park, No. 1 Headquarters Road, Xixiangtang District, Nanning City, Guangxi Zhuang Autonomous Region Patentee after: RUNJIAN COMMUNICATION CO., LTD. Address before: 530004 100 East University Road, Nanning, the Guangxi Zhuang Autonomous Region Patentee before: Guangxi University |
|
TR01 | Transfer of patent right | ||
CP03 | Change of name, title or address |
Address after: Room 501, D7 Building, Phase I, China-ASEAN Science and Technology Business Incubation Base, No. 1 Headquarters Road, Xixiangtang District, Nanning City, Guangxi Zhuang Autonomous Region Patentee after: Runjian Co., Ltd. Address before: 530007 Room 501, Building D7, Business Incubation Base Phase I, China-ASEAN Science and Technology Park, No. 1 Headquarters Road, Xixiangtang District, Nanning City, Guangxi Zhuang Autonomous Region Patentee before: RUNJIAN COMMUNICATION CO., LTD. |
|
CP03 | Change of name, title or address |