CN100377599C - A Fast Subpixel Motion Estimation Method - Google Patents
A Fast Subpixel Motion Estimation Method Download PDFInfo
- Publication number
- CN100377599C CN100377599C CNB2004100738375A CN200410073837A CN100377599C CN 100377599 C CN100377599 C CN 100377599C CN B2004100738375 A CNB2004100738375 A CN B2004100738375A CN 200410073837 A CN200410073837 A CN 200410073837A CN 100377599 C CN100377599 C CN 100377599C
- Authority
- CN
- China
- Prior art keywords
- pixel
- sub
- block
- optimal
- motion estimation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明涉及一种快速亚像素运动估计方法,属于图像处理领域。本发明在整像素运动估计的基础上,直接计算出最优亚像素的位置,从而可将亚像素运动估计的搜索点数减少到2个以下,避免了传统方法的逐点搜索比较,不仅大幅度提高了搜索速度,而且插值亚像素点所需的存储开销趋近于零。实验结果表明该方法以极小的搜索代价取得了与全搜索相当的效果。
The invention relates to a fast sub-pixel motion estimation method, which belongs to the field of image processing. The present invention directly calculates the optimal sub-pixel position on the basis of integer-pixel motion estimation, thereby reducing the number of search points for sub-pixel motion estimation to less than 2, avoiding the point-by-point search and comparison of traditional methods, and not only greatly Search speed is improved, and the storage overhead required to interpolate sub-pixel points approaches zero. Experimental results show that this method achieves the same effect as full search with a very small search cost.
Description
技术领域technical field
本发明涉及一种提高亚像素运动估计速度、减少亚像素运动估计过程中存储开销的方法,属于图像处理技术领域。The invention relates to a method for increasing the speed of sub-pixel motion estimation and reducing storage overhead in the process of sub-pixel motion estimation, belonging to the technical field of image processing.
背景技术Background technique
近10年来,基于离散余弦变换和运动补偿的编码方案在视频压缩中得到了广泛应用,并纳入到一系列国际标准,如H.263、MPEG-4和JVT等。在该方案中,运动估计是消除视频帧间冗余的有效方法,但由于其采用帧间逐块搜索比较,计算量巨大,成为影响视频压缩性能的关键技术障碍。运动估计由整像素运动估计和亚像素运动估计两部分组成。整像素运动估计直接以已编码帧为参考帧,搜索整像素级的最优匹配块;亚像素运动估计则通过插值估算参考帧中非直接采样点(亚像素点)的值,以此为参考,在整像素运动估计的基础上进一步搜索亚像素级的最优匹配块。实验表明,在整像素运动估计的基础上进行亚像素运动估计,能够明显提高运动补偿效果,因此亚像素运动估计已成为提高图像压缩比的有效方法。In the past 10 years, coding schemes based on discrete cosine transform and motion compensation have been widely used in video compression and incorporated into a series of international standards, such as H.263, MPEG-4 and JVT. In this scheme, motion estimation is an effective method to eliminate redundancy between video frames, but because it uses block-by-block search and comparison between frames, the computational complexity is huge, and it becomes a key technical obstacle affecting video compression performance. Motion estimation consists of two parts: integer pixel motion estimation and subpixel motion estimation. Integer-pixel motion estimation directly uses the coded frame as the reference frame to search for the optimal matching block at the integer-pixel level; sub-pixel motion estimation uses interpolation to estimate the value of non-direct sampling points (sub-pixel points) in the reference frame as a reference , on the basis of integer pixel motion estimation to further search for the optimal matching block at the sub-pixel level. Experiments show that sub-pixel motion estimation based on integer-pixel motion estimation can significantly improve the effect of motion compensation, so sub-pixel motion estimation has become an effective method to improve image compression ratio.
目前视频压缩标准中普遍采用的亚像素运动估计是全搜索方法,即先对整幅图像进行插值,在此基础上,搜索整像素运动估计最优点周围的8个1/2像素点,得到1/2像素级的最优点,如此类推,每一级亚像素搜索都以上一级搜索的最优点为中心搜索其周围的8个下一级亚像素点。对于K级(或称1/2K)亚像素运动估计,则每个当前块需进行8×K个块的搜索,同时插值后的图像增大为输入图像的22K倍,编码过程中需增加22K-1倍的插值存储空间。这种全搜索方法不仅运算复杂度极高而且随亚像素精度的增加插值存储开销也呈指数级增长。The sub-pixel motion estimation commonly used in current video compression standards is a full search method, that is, the entire image is interpolated first, and on this basis, eight 1/2 pixel points around the optimal point of integer pixel motion estimation are searched to obtain 1 The optimal point of /2 pixel level, and so on, each level of sub-pixel search will search the 8 next-level sub-pixel points around it centered on the optimal point of the previous level of search. For K-level (or 1/2 K ) sub-pixel motion estimation, each current block needs to search 8×K blocks, and the image after interpolation is increased to 22K times of the input image, and the encoding process needs Increase the interpolation storage space by 2 2K -1 times. This full search method not only has extremely high computational complexity, but also increases the interpolation storage cost exponentially with the increase of sub-pixel precision.
为解决亚像素全搜索方法中存在的问题,产生了许多快速算法。当前的这些方法一般从搜索策略、终止条件等方面缩小搜索范围以减少搜索点数。总的来说其搜索精度与全搜索仍存在较大差距,搜索速度也需要进一步提高;此外,大量的插值存储开销也是一个难以解决的问题。实际应用中,尤其针对存储资源有限的应用环境,一种好的亚像素运动估计方法必须同时考虑搜索精度、运行效率及存储开销。In order to solve the problems existing in the sub-pixel full search method, many fast algorithms have been produced. These current methods generally narrow the search scope from the aspects of search strategy and termination conditions to reduce the number of search points. Generally speaking, there is still a large gap between its search accuracy and full search, and the search speed needs to be further improved; in addition, a large amount of interpolation storage overhead is also a difficult problem to solve. In practical applications, especially for applications with limited storage resources, a good sub-pixel motion estimation method must simultaneously consider search accuracy, operating efficiency and storage overhead.
发明内容Contents of the invention
本发明的目的在于提供一种快速亚像素运动估计方法。该方法根据邻近整像素值直接推导任意精度下的最优亚像素位置,从而避免了传统逐点搜索比较的方法所带来的存储开销。The purpose of the present invention is to provide a fast sub-pixel motion estimation method. This method directly derives the optimal sub-pixel position under arbitrary precision according to the adjacent integer pixel values, thus avoiding the storage overhead brought by the traditional point-by-point search and comparison method.
为实现上述的发明目的,本发明采用下述的技术方案:For realizing above-mentioned purpose of the invention, the present invention adopts following technical scheme:
一种快速亚像素运动估计方法,包括根据整像素运动估计得到整像素最优匹配块,其特征在于进一步包括以下步骤:A fast sub-pixel motion estimation method, including obtaining the optimal matching block of the integer pixel according to the integer pixel motion estimation, is characterized in that it further includes the following steps:
步骤:用当前块、整像素最优匹配块及其邻近的整像素块表示当前块与整像素最优匹配块周围的亚像素块的最小均方差及其相应的最优亚像素块的位置,并根据当前块、整像素最优匹配块及其邻近的整像素块之间的关系分别计算任意精度下的水平、垂直最优亚像素块的位置;Steps: use the current block, the optimal integer matching block and its adjacent integer pixel blocks to indicate the minimum mean square difference between the current block and the sub-pixel blocks around the integer-pixel optimal matching block and the corresponding optimal sub-pixel blocks, And according to the relationship between the current block, the optimal integer pixel matching block and its adjacent integer pixel blocks, the positions of the horizontal and vertical optimal sub-pixel blocks under arbitrary precision are respectively calculated;
步骤二:根据具体应用中采用的亚像素精度,对步骤一中得到的最优亚像素位置进行近似处理,得到指定精度下的近似最优位置;Step 2: According to the sub-pixel precision used in the specific application, the optimal sub-pixel position obtained in
步骤三:将步骤二中分别获得的水平和垂直方向上近似最优位置进行合成,得到二维近似最优位置;Step 3: Combining the approximate optimal positions in the horizontal and vertical directions respectively obtained in step 2 to obtain a two-dimensional approximate optimal position;
所述二维近似最优位置若处于亚像素位置,将其对应块作为一候选块;并从步骤二中得到水平方向上和垂直方向上的近似最优亚像素位置中选取残差最小者,其处于亚像素位置则将其对应块作为另一候选块;If the two-dimensional approximate optimal position is in a sub-pixel position, use its corresponding block as a candidate block; and select the one with the smallest residual error from the approximate optimal sub-pixel positions obtained in step 2 in the horizontal direction and in the vertical direction, If it is in a sub-pixel position, its corresponding block is used as another candidate block;
对所述候选块进行搜索匹配,并与所述整像素运动估计结果相比较,取最优块作为最终结果。The candidate block is searched and matched, and compared with the integer pixel motion estimation result, and the optimal block is taken as the final result.
所述步骤一包括步骤:Described step one comprises the steps:
(11)分别计算当前块与整像素运动估计最优匹配块左、右两侧的亚像素块之间的最小匹配误差,并取两者中的最小值作为水平最小残差;(11) Calculate the minimum matching error between the current block and the sub-pixel blocks on the left and right sides of the optimal matching block for integer pixel motion estimation, and take the minimum value of the two as the horizontal minimum residual error;
(12)分别计算当前块与整像素运动估计最优匹配块上、下两侧的亚像素块之间的最小匹配误差,并取两者中的最小值作为垂直最小残差。(12) Calculate the minimum matching error between the current block and the sub-pixel blocks on the upper and lower sides of the optimal matching block for integer pixel motion estimation, and take the minimum value of the two as the vertical minimum residual error.
所述步骤一进一步包括以下步骤:Described step one further comprises the following steps:
(13)根据步骤(11)和(12)中得到的水平和垂直方向上的最小匹配误差,分别计算其对应的任意精度下最优亚像素位置。(13) According to the minimum matching errors in the horizontal and vertical directions obtained in steps (11) and (12), respectively calculate their corresponding optimal sub-pixel positions under arbitrary precision.
所述最小匹配误差为最小均方差和最小绝对差和中的一种。The minimum matching error is one of the minimum mean square error and the minimum sum of absolute differences.
所述当前块与亚像素块的最小均方差和所述当前块、整像素最优匹配块及其邻近整像素块之间的关系为:The relationship between the minimum mean square error between the current block and the sub-pixel block and the current block, the optimal integer pixel matching block and its adjacent integer pixel blocks is:
所述最优亚像素块的位置与当前块、整像素最优匹配块及其邻近整像素块之间的关系为:
其中形如Ddx,yd′x,y的符号表示图像中左上位置点为dx,y、d′x,y的两个块的绝对差和,ci,j为当前块上的点,ri,j为整像素最优匹配块上的点,Min(Dci,jsi,j)表示亚像素块与当前块之间的最小均方差,mh表示最优位置。Among them, the symbol of the form D dx, yd'x, y represents the absolute difference sum of the two blocks whose upper left position point in the image is dx , y, d' x, y , ci , j is the point on the current block, r i, j is the point on the optimal matching block of an integer pixel, Min(D ci, jsi, j ) represents the minimum mean square error between the sub-pixel block and the current block, and m h represents the optimal position.
所述步骤二中的对步骤一中得到的最优亚像素位置进行近似处理,包括:当指定搜索精度为1/2K时,一维近似最优位置m′与步骤一中得到的最优位置mh间关系为:m′=roumd(mb×2K)/2k,其中,roumd()表四舍五入,由此得到近似最优位置。Approximate processing of the optimal sub-pixel position obtained in
所述步骤三中从二维近似最优位置及水平和垂直方向上近似最优亚像素位置中选取处于亚像素位置的候选块,包括:In the third step, the candidate block at the sub-pixel position is selected from the two-dimensional approximate optimal position and the approximate optimal sub-pixel position in the horizontal and vertical directions, including:
1)若二维近似最优位置对应块处于亚像素位置,则将其作为一个候选块。1) If the block corresponding to the two-dimensional approximate optimal position is in the sub-pixel position, it is taken as a candidate block.
2)判断水平方向近似最优位置和垂直方向近似最优位置对应的最小绝对差和,如果水平方向近似最优位置对应的最小绝对差和较小,则进一步判断水平方向近似最优位置是否在亚像素位置,如果是,则选定水平方向近似最优位置对应块为候选块;如果垂直方向近似最优位置对应的最小绝对差和较小,则进一步判断垂直方向近似最优位置是否在亚像素位置,如果是,则选定垂直方向近似最优位置对应块为候选块。2) Judging the minimum absolute difference sum corresponding to the approximate optimal position in the horizontal direction and the approximate optimal position in the vertical direction, if the minimum absolute difference sum corresponding to the approximate optimal position in the horizontal direction is small, then further judge whether the approximate optimal position in the horizontal direction is in Sub-pixel position, if it is, select the block corresponding to the approximate optimal position in the horizontal direction as the candidate block; if the minimum absolute difference sum corresponding to the approximate optimal position in the vertical direction is small, then further judge whether the approximate optimal position in the vertical direction is in the sub-pixel position If yes, the block corresponding to the approximate optimal position in the vertical direction is selected as the candidate block.
步骤三还包括:通过插值计算候选块中各亚像素点的值,并计算该块与当前块的最小绝对差和,并与整像素运动估计得到的最小绝对差和进行比较,将两者中较小值的对应位置作为最终搜索到的运动矢量。Step 3 also includes: calculating the value of each sub-pixel point in the candidate block by interpolation, and calculating the minimum absolute difference sum of the block and the current block, and comparing it with the minimum absolute difference sum obtained by integer pixel motion estimation, and comparing the two The corresponding position of the smaller value is used as the final searched motion vector.
本发明利用整像素运动估计的中间结果,通过计算直接确定0-2个最优亚像素候选块,并在此候选块基础上进行搜索。理论分析表明,对于搜索精度为1/2K的亚像素运动估计,与亚像素全搜索方法相比,搜索块数下降率高达(8×K-2)/8×K以上。实验结果显示,1/4亚像素运动估计时,搜索块数下降率在90%以上,而图像质量和压缩码率都没有明显变化。同时,本发明搜索过程中的插值存储开销趋近于零,这对于在专用芯片、DSP上实现的视频编码器十分重要。The present invention uses the intermediate result of the whole pixel motion estimation to directly determine 0-2 optimal sub-pixel candidate blocks through calculation, and searches on the basis of the candidate blocks. Theoretical analysis shows that for sub-pixel motion estimation with a search accuracy of 1/2 K , compared with the sub-pixel full search method, the reduction rate of search blocks is as high as (8×K-2)/8×K or more. Experimental results show that when 1/4 sub-pixel motion estimation is performed, the number of search blocks decreases by more than 90%, while the image quality and compression rate do not change significantly. At the same time, the interpolation storage overhead in the search process of the present invention is close to zero, which is very important for video encoders implemented on special chips and DSP.
附图说明Description of drawings
图1是本发明所述的亚像素运动估计方法的流程图;Fig. 1 is a flow chart of the sub-pixel motion estimation method of the present invention;
图2是二维亚像素运动的像素分布示意图;Fig. 2 is a schematic diagram of pixel distribution of two-dimensional sub-pixel motion;
图3是对二维运动分解为一维运动进行运动估计的示意图;Fig. 3 is a schematic diagram of decomposing two-dimensional motion into one-dimensional motion for motion estimation;
图4是一维最优近似位置的示意图。Fig. 4 is a schematic diagram of a one-dimensional optimal approximation position.
具体实施方式Detailed ways
本发明在整像素运动估计的基础上,根据邻近整像素值直接推导任意精度下的最优亚像素位置,从而提出了一种基于最优位置计算的快速亚像素运动估计方法。On the basis of integer pixel motion estimation, the present invention directly deduces the optimal sub-pixel position under arbitrary precision according to adjacent integer pixel values, thereby proposing a fast sub-pixel motion estimation method based on optimal position calculation.
由于亚像素位置点并非直接采样,而是由邻近整像素采样点插值而来,因此与当前块具有最优匹配的亚像素块的位置完全可由其周围的整像素值直接导出,以避免当前方法中的逐点搜索比较。Since the sub-pixel position points are not directly sampled, but are interpolated from adjacent integer pixel sampling points, the position of the sub-pixel block that has the best match with the current block can be directly derived from its surrounding integer pixel values to avoid the current method A point-by-point search comparison in .
下面结合附图说明本发明的实现方式。图1中明确表示了本发明所述方法的整体流程,即:先分别计算水平和垂直方向上的一维最优亚像素位置;再根据设定的精度,对一维最优亚像素位置进行近似处理,分别得到水平和垂直方向上的近似最优位置;最后再根据水平和垂直方向上的近似最优位置选择侯选块,完成搜索。下面详细说明如下:The implementation of the present invention will be described below in conjunction with the accompanying drawings. Figure 1 clearly shows the overall flow of the method of the present invention, that is: first calculate the one-dimensional optimal sub-pixel position in the horizontal and vertical directions respectively; Approximate processing to obtain the approximate optimal positions in the horizontal and vertical directions respectively; finally, select candidate blocks according to the approximate optimal positions in the horizontal and vertical directions to complete the search. The details are as follows:
步骤一:根据当前块与整像素最优匹配块及其邻块间的关系,分别计算任意精度下的水平、垂直最优亚像素块的位置。Step 1: According to the relationship between the current block and the optimal matching block of the whole pixel and its adjacent blocks, respectively calculate the positions of the horizontal and vertical optimal sub-pixel blocks with arbitrary precision.
下面结合图2、图3具体说明如何计算水平或垂直最优亚像素位置。在图2和图3中,用“●”表示整像素点;“X”表示亚像素点。图3中各点为其所在块的左上点,Ri,j为整像素运动估计(IME)最优匹配块,Ri+1,j、Ri-1,j为其水平两侧距离为1个像素的邻块,Ri,j+1、Ri,j+1为其垂直两侧距离为1个像素的邻块。How to calculate the horizontal or vertical optimal sub-pixel position will be described in detail below with reference to FIG. 2 and FIG. 3 . In Figure 2 and Figure 3, "●" represents an integer pixel point; "X" represents a sub-pixel point. In Fig. 3, each point is the upper left point of the block where it is located, R i, j is the optimal matching block of Integer Pixel Motion Estimation (IME), R i+1, j and R i-1, j are the horizontal distances on both sides of For a neighboring block of 1 pixel, R i,j+1 and R i,j+1 are neighboring blocks whose vertical distance on both sides is 1 pixel.
在本发明所述方法中,设编码帧中当前待搜索块上的点为ci,j(i∈(0,M),j ∈(0,N)),其中M,N分别表示搜索块包含的水平、垂直方向像素数;整像素运动估计后得到的参考帧中最优匹配块上各点为ri,j(i∈(0,M),j∈(0,N));最优匹配块上各点ri,j之间插值得到的亚像素块为si,j,且Si,j满足公式:si,j=mri,j+(1+m)ri+1,j其中,m是位置参数。In the method of the present invention, it is assumed that the point on the current block to be searched in the coding frame is c i, j (i ∈ (0, M), j ∈ (0, N)), where M and N represent the search block respectively The number of pixels in the horizontal and vertical directions included; each point on the optimal matching block in the reference frame obtained after integer pixel motion estimation is r i, j (i∈(0,M), j∈(0,N)); The sub-pixel block obtained by interpolation between each point r i, j on the optimal matching block is s i, j , and S i, j satisfies the formula: s i, j = mr i, j + (1+m)r i+ 1, j where m is a positional parameter.
通过数学上的推导,IME最优匹配块水平或垂直方向上一侧的亚像素块与当前块之间的均方差经过化简可最终表示为:Through mathematical derivation, the mean square error between the sub-pixel block on one side of the IME optimal matching block in the horizontal or vertical direction and the current block can be finally expressed as:
对(2)式求导,并根据二次函数的性质,可知亚像素块与当前块的最小均方差为:Deriving formula (2), and according to the nature of the quadratic function, it can be known that the minimum mean square error between the sub-pixel block and the current block is:
其对应的任意精度下的最优亚像素位置为:The optimal sub-pixel position corresponding to any precision is:
其中形如Ddx,d′x,y的符号表示图像中左上位置点为dx,y、d′x,y的两个块的绝对差和,ci,j为当前块的上点,ri,j为整像素最优匹配块上的点,Min(Dci,jsi,j)表示亚像素块与当前块之间的最小均方差,mh表示最优位置。Among them, the symbol of the form D dx, d′x, y represents the absolute difference sum of the two blocks whose upper left position in the image is dx , y , d′ x, y, and ci , j is the upper point of the current block, r i, j is the point on the optimal matching block of an integer pixel, Min(D ci, jsi, j ) represents the minimum mean square error between the sub-pixel block and the current block, and m h represents the optimal position.
需要指出的是:运动估计通常以均方差(MSE)或其简化形式绝对差之和(SAD)作为匹配准则,在上述的数学分析中,取MSE匹配准则进行分析。实际运动估计过程中为减少运算量通常以绝对差和SAD值取代均方差MSE。因此可以理解,本发明所述的方法也可以类似地采用SAD匹配准则。在这种情况下,式(2)、(3)中MSE值以相应的SAD值取代。It should be pointed out that motion estimation usually uses mean square error (MSE) or its simplified form sum of absolute difference (SAD) as a matching criterion. In the above mathematical analysis, the MSE matching criterion is used for analysis. In the actual motion estimation process, the mean square error MSE is usually replaced by absolute difference and SAD value in order to reduce the amount of computation. Therefore, it can be understood that the method described in the present invention can similarly adopt the SAD matching criterion. In this case, the MSE values in formulas (2) and (3) are replaced by the corresponding SAD values.
根据上述数学推导所获得的数学公式,在步骤一中需要进行的具体实施步骤如下:According to the mathematical formula obtained by the above mathematical derivation, the specific implementation steps that need to be carried out in
(1)由式(2)分别计算当前块与Ri,j的左、右两侧的亚像素块最小绝对差和,并取两者中的最小值作为水平最小残差,记作Sh;(1) Calculate the minimum absolute difference sum of the sub-pixel blocks on the left and right sides of the current block and R i, j by formula (2), and take the minimum value of the two as the horizontal minimum residual, denoted as S h ;
(2)由式(2)分别计算当前块与Ri,j的上、下两侧的亚像素块最小绝对差和,并取两者中的最小值作为垂直最小残差,记作Sv;(2) Calculate the minimum absolute difference sum of the sub-pixel blocks on the upper and lower sides of the current block and R i, j by formula (2), and take the minimum value of the two as the vertical minimum residual, denoted as S v ;
(3)由式(3)分别计算Sh、Sv对应的任意精度下最优亚像素位置h、v。(3) Calculate the optimal sub-pixel positions h and v corresponding to Sh and S v respectively under arbitrary precision according to formula (3).
步骤二:根据具体应用中采用的亚像素精度,对步骤一中得到的最优亚像素位置进行近似处理,得到指定精度下的近似最优位置。Step 2: According to the sub-pixel precision used in the specific application, the optimal sub-pixel position obtained in
步骤一得到任意精度下的最优位置。但实际应用中,在运动估计(ME)达到一定精度后,残差系数的减少量很小,而运动矢量却占用较多比特数,从而导致最终编码比特数不再显著下降。因此,实际应用中一般采用1/2,1/4或1/8精度,如MPEG-4的ME采用1/2像素,JVT则可精确到1/8像素。为与国际标准相吻合,在实际应用中的mh取值应该与标准中所用的搜索精度(1/2,1/4或1/8)保持一致。
由式(1),当前块与整像素最优匹配块周围的亚像素块的绝对差和Dci,jsi,j为亚像素位置m的二次抛物线函数,由抛物线的对称单调性可知:当指定搜索精度为1/2K时,距离计算最优位置最近的亚像素位置为最优近似,据此得到指定精度下的一维近似最优位置m′的计算公式:From formula (1), the absolute difference sum D ci,jsi,j of the sub-pixel blocks around the current block and the optimal matching block of the whole pixel is the quadratic parabolic function of the sub-pixel position m, and it can be known from the symmetric monotonicity of the parabola: when When the search accuracy is specified as 1/2 K , the sub-pixel position closest to the optimal position for calculation is the optimal approximation. Based on this, the calculation formula for the one-dimensional approximate optimal position m′ under the specified accuracy is obtained:
m′=round(mb×2K)/2K (4)m'=round(m b ×2 K )/2 K (4)
其中round表示四舍五入,mh为步骤一中得到的最优位置。如图2所示,当采用1/4像素精度、亚像素位置为9/16时取得最小绝对差和,此时与9/16最近的1/4亚像素位置是1/2,因此1/2为最优近似位置。Among them, round means rounding, and m h is the optimal position obtained in
根据步骤一中得到的最优位置h、v及指定的搜索精度,按照式(4)计算得到该搜索精度下的近似最优位置h’和v’。According to the optimal positions h and v obtained in
步骤三:将步骤二中的水平和垂直方向上近似最优位置合成得到二维近似最优位置。从合成得到的二维近似最优位置及前述步骤中水平和垂直方向上近似最优亚像素位置中选取处于亚像素位置的候选块,并对候选块进行搜索,获得运动估计结果。Step 3: Combine the approximate optimal positions in the horizontal and vertical directions in step 2 to obtain a two-dimensional approximate optimal position. Select a candidate block at a sub-pixel position from the two-dimensional approximate optimal position obtained by synthesis and the approximate optimal sub-pixel position in the horizontal and vertical directions in the preceding steps, and search the candidate block to obtain a motion estimation result.
步骤二中分别计算出水平、垂直两个一维方向上的近似最优位置,考虑到二维运动可看作水平、垂直两个一维方向上的分运动的合成,本发明中将该水平、垂直位置合成对应的二维位置块作为一个候选块。此外,考虑到该候选块的位置是一种近似结果,为提高ME的精度又将水平最优位置块Sh、垂直最优位置块中残差Sv中较小者的对应块作为另一候选块。对两个候选块中处于亚像素位置的块进行搜索匹配,并与整像素搜索结果相比较,取最优块作为最终结果。可见,本发明将侯选块减少至两个或更少,因此显著降低了开销,但是搜索速度却很快。步骤三的具体步骤如下:In step 2, the approximate optimal positions on two one-dimensional directions, horizontal and vertical, are calculated respectively. Considering that two-dimensional motion can be regarded as the synthesis of sub-motions on two one-dimensional directions, horizontal and vertical, in the present invention, the horizontal , and the two-dimensional position block corresponding to the vertical position synthesis as a candidate block. In addition, considering that the position of the candidate block is an approximate result, in order to improve the accuracy of ME, the corresponding block of the smaller one of the horizontal optimal position block Sh and the vertical optimal position block S v is taken as another candidate blocks. Search and match the block at the sub-pixel position among the two candidate blocks, and compare it with the integer-pixel search result, and take the optimal block as the final result. It can be seen that the present invention reduces the candidate blocks to two or less, thus significantly reducing the overhead, but the search speed is very fast. The specific steps of step three are as follows:
(1)置候选块集合为空,若点(h’,v’)处于亚像素位置,将其对应块加入候选块集合;(1) Set the candidate block set to be empty, if the point (h', v') is in the sub-pixel position, add its corresponding block to the candidate block set;
(2)若Sh≤Sv且点(h’,0)处于亚像素位置,则将(h’,0)对应块加入候选块集合;转(4);(2) If S h ≤ S v and the point (h', 0) is at the sub-pixel position, add the block corresponding to (h', 0) to the candidate block set; go to (4);
(3)若Sh>Sv且点(0,v’)处于亚像素位置,则将(v’,0)对应块加入候选块集合;(3) If S h > S v and the point (0, v') is at the sub-pixel position, then add the block corresponding to (v', 0) to the candidate block set;
(4)对候选块集合中各块进行插值、搜索等运算,确定最终结果。即:通过插值计算候选块中各亚像素点的值,并计算其与当前块的绝对差和,比较其与整像素运动估计的最小绝对差和,将两者中最小值的对应位置作为最终搜索到的运动矢量。(4) Perform operations such as interpolation and search on each block in the candidate block set to determine the final result. That is: calculate the value of each sub-pixel point in the candidate block by interpolation, and calculate its absolute difference sum with the current block, compare it with the minimum absolute difference sum of the whole pixel motion estimation, and take the corresponding position of the minimum value of the two as the final The searched motion vector.
以上公开的仅为本发明的具体实施例,根据本发明提供的思想,本领域的技术人员能思及的变化,都应落入本发明的保护范围内。The above disclosures are only specific embodiments of the present invention. According to the ideas provided by the present invention, changes conceivable by those skilled in the art should fall within the protection scope of the present invention.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100738375A CN100377599C (en) | 2004-09-03 | 2004-09-03 | A Fast Subpixel Motion Estimation Method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2004100738375A CN100377599C (en) | 2004-09-03 | 2004-09-03 | A Fast Subpixel Motion Estimation Method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1741618A CN1741618A (en) | 2006-03-01 |
CN100377599C true CN100377599C (en) | 2008-03-26 |
Family
ID=36093815
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2004100738375A Expired - Fee Related CN100377599C (en) | 2004-09-03 | 2004-09-03 | A Fast Subpixel Motion Estimation Method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100377599C (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101459838B (en) * | 2007-12-14 | 2010-11-03 | 安凯(广州)微电子技术有限公司 | Inter-frame prediction system, method and multimedia processor |
CN102272796B (en) * | 2009-01-09 | 2014-03-12 | 柯尼卡美能达控股株式会社 | Motion vector generation apparatus and motion vector generation method |
CN102607510B (en) * | 2012-01-12 | 2014-01-29 | 浙江大学 | A Stereo Ranging Method Based on Sparse Representation |
US9325991B2 (en) * | 2012-04-11 | 2016-04-26 | Qualcomm Incorporated | Motion vector rounding |
CN103384324A (en) * | 2013-01-19 | 2013-11-06 | 张新安 | Quick sub pixel motion estimation method for AVS-M video coding |
CN104837027B (en) * | 2015-04-20 | 2018-04-27 | 北京奇艺世纪科技有限公司 | The method for estimating and device of a kind of point of pixel |
CN109889851B (en) * | 2019-03-11 | 2021-02-02 | 珠海市杰理科技股份有限公司 | Block matching method and device for video coding, computer equipment and storage medium |
CN114040208B (en) * | 2021-10-21 | 2025-03-28 | 百果园技术(新加坡)有限公司 | Motion estimation method, device, electronic device and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002071741A2 (en) * | 2001-03-08 | 2002-09-12 | Avt Audio Visual Telecommunications Corporation | A device and method for performing half-pixel accuracy fast search in video coding |
WO2003026296A1 (en) * | 2001-09-17 | 2003-03-27 | Nokia Corporation | Method for sub-pixel value interpolation |
CN1452409A (en) * | 2002-04-18 | 2003-10-29 | 华为技术有限公司 | Picture motion estimating method |
EP1418763A1 (en) * | 2002-07-15 | 2004-05-12 | Mitsubishi Denki Kabushiki Kaisha | Image encoding device, image encoding method, image decoding device, image decoding method, and communication device |
-
2004
- 2004-09-03 CN CNB2004100738375A patent/CN100377599C/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002071741A2 (en) * | 2001-03-08 | 2002-09-12 | Avt Audio Visual Telecommunications Corporation | A device and method for performing half-pixel accuracy fast search in video coding |
WO2003026296A1 (en) * | 2001-09-17 | 2003-03-27 | Nokia Corporation | Method for sub-pixel value interpolation |
CN1452409A (en) * | 2002-04-18 | 2003-10-29 | 华为技术有限公司 | Picture motion estimating method |
EP1418763A1 (en) * | 2002-07-15 | 2004-05-12 | Mitsubishi Denki Kabushiki Kaisha | Image encoding device, image encoding method, image decoding device, image decoding method, and communication device |
Also Published As
Publication number | Publication date |
---|---|
CN1741618A (en) | 2006-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11070834B2 (en) | Low-complexity method for generating synthetic reference frames in video coding | |
CN102316317B (en) | Method and device for generating predicted value of picture | |
CN101699865B (en) | A Block Motion Adaptive Sub-pixel Fast Search Method | |
CN112970262A (en) | Rounding in trigonometric prediction mode | |
CN108134939B (en) | Motion estimation method and device | |
EP2026582A2 (en) | Methods for motion estimation with adaptive motion accuracy | |
TW201739252A (en) | Method and apparatus of video coding with affine motion compensation | |
CN102710934B (en) | Motion predicting or compensating method | |
WO2019072246A1 (en) | Motion estimation method and device in video coding, electronic apparatus and storage medium | |
PT104083A (en) | METHOD FOR TRANSCODING H.264 / AVC VIDEO IMAGES IN MPEG-2 | |
CN102752588B (en) | Video encoding and decoding method using space zoom prediction | |
CN112292861B (en) | Sub-pixel accurate correction method based on error surface for decoding end motion vector correction | |
CN101299818B (en) | N-level sub-pixel search method based on integer pixel search results | |
CN101247523B (en) | Semi-pixel motion estimating method for H.264 encoder | |
TW202007154A (en) | Improvement on inter-layer prediction | |
CN100377599C (en) | A Fast Subpixel Motion Estimation Method | |
CN110062243B (en) | Light field video motion estimation method based on neighbor optimization | |
CN117561714A (en) | Method, apparatus and medium for video processing | |
CN117616754A (en) | Method, apparatus and medium for video processing | |
KR100254667B1 (en) | Method and apparatus for detecting occulusion | |
KR20070033345A (en) | How to retrieve global motion vector | |
CN118612460A (en) | A method and system for fractional precision motion estimation based on error surface calculation | |
CN117376581A (en) | Method and system for calculating fractional motion estimation based on error curved surface | |
CN113938680B (en) | Image decoding method and device of video sequence and terminal equipment | |
CN117501688A (en) | Method, apparatus and medium for video processing |
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: 20080326 Termination date: 20190903 |