WO2013013548A1 - 基于h.264运动估计算法的初始点获取方法及装置 - Google Patents

基于h.264运动估计算法的初始点获取方法及装置 Download PDF

Info

Publication number
WO2013013548A1
WO2013013548A1 PCT/CN2012/077466 CN2012077466W WO2013013548A1 WO 2013013548 A1 WO2013013548 A1 WO 2013013548A1 CN 2012077466 W CN2012077466 W CN 2012077466W WO 2013013548 A1 WO2013013548 A1 WO 2013013548A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
motion
vector
initial point
motion estimation
Prior art date
Application number
PCT/CN2012/077466
Other languages
English (en)
French (fr)
Inventor
朱凯迪
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2013013548A1 publication Critical patent/WO2013013548A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/144Movement detection
    • H04N5/145Movement estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/527Global motion vector estimation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/56Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search

Definitions

  • the present invention relates to the field of video coding, and in particular, to an initial point acquisition method and apparatus based on an H.264 motion estimation algorithm, and a terminal device. Background technique
  • the H.264 standard does not specify how an encoder should be implemented. Instead, it specifies the syntax of a coded video bitstream and the decoding method of the bitstream, which provides greater flexibility in implementation.
  • the H.264 standard generally uses a hybrid coding method of transform and prediction.
  • Motion estimation is to estimate the motion vector of the current macroblock by the motion vector of the adjacent frame or the adjacent block according to the spatial correlation and temporal correlation of the moving object, find the search center through the motion vector, and then use the motion search algorithm. Find the best matching block and then retain the motion vector and residual frame data.
  • Common fixed-mode motion estimation algorithms are: Three Step Search (TSS), Two Dimensional Logarithmic Search (TDLS), Conjugate Direction Search (Conjugate Direction Search).
  • UMHexagonS Unsymmetrical-Cross Muti-Hexa-gon Search
  • CDS Four Step Search
  • FSS Diamond Search
  • MVFAST Motion Vector Field Adaptive Search Technique
  • PMVFAST Undictive Motion Vector Field Adaptive Search Technique
  • UMHexagonS Unsymmetrical-Cross Muti-Hexa-gon Search
  • the traditional motion estimation algorithms usually refer to the video sequence in which the frame is located, and perform motion estimation on the temporal and spatial correlation of the preceding and succeeding frames. Most of the optimization work is also based on this, for example, initial point prediction optimization and search path optimization.
  • a fast hierarchical motion estimation algorithm based on vector weighted median filtering uses a weighted algorithm to process motion vectors of adjacent blocks, and the obtained motion vector can protect errors in upper motion estimation.
  • Vector improves the accuracy of motion estimation.
  • a method for adaptively determining a search range is also provided. The method dynamically calculates a search range by using a spatial domain of a motion vector field and a time domain correlation, thereby improving flexibility of motion estimation when a motion scene changes.
  • the above two algorithms are not accurate enough when the camera moves. During the acquisition of the video, the movement of the camera often occurs, and the movement of the camera causes the movement of the captured video scene.
  • a primary object of the present invention is to provide an initial point acquisition scheme based on the H.264 motion estimation algorithm to at least solve the above problem in the related art that motion estimation is not accurate when the camera moves.
  • an initial point acquisition method based on an H.264 motion estimation algorithm is provided.
  • the initial point acquisition method based on the H.264 motion estimation algorithm includes the following steps: when initial point prediction, acquiring a motion state of the camera, determining a motion vector of the video scene according to the motion state of the camera; and moving the motion of the video scene
  • the motion estimation vector synthesis of the vector and asymmetric cross-type multi-level hexagon lattice search algorithm obtains the final prediction vector, and obtains the coordinates of the initial point according to the final prediction vector and the coordinates of the block to be predicted.
  • obtaining the motion state of the camera comprises: acquiring six degrees of freedom data of the camera through a receiver of the magnetic tracker mounted on the camera, and obtaining a motion state of the camera according to the six degrees of freedom data of the camera.
  • the six degrees of freedom data of the camera includes the spatial coordinates of the camera and the spatial rotation angle of the camera.
  • determining the motion vector of the video scene according to the motion state of the camera comprises: determining whether the video scene moves according to the motion state of the camera; and determining the motion vector of the video scene in the case of moving the video scene.
  • the method before combining the motion vector of the video scene and the motion estimation vector, the method further includes: obtaining, by using motion estimation of the first two reference macroblocks, a motion estimation vector of the current macroblock.
  • the method further comprises: performing a motion search on the initial point by using a search path of the asymmetric cross-type multi-level hexagonal lattice search algorithm, Find the best matching block of the corresponding macroblock in the previous frame.
  • the motion vector of the video scene is the motion vector of the video sequence when the scene changes.
  • An initial point acquisition apparatus based on the H.264 motion estimation algorithm includes: an acquisition module configured to: acquire an animation state of a camera during initial point prediction, and determine a motion vector of the video scene according to a motion state of the camera; And configured to synthesize the motion vector of the video scene and the motion estimation vector of the asymmetric cross-type multi-level hexagon grid search algorithm to obtain a final prediction vector; and determine a module, which is set according to the final prediction vector and the coordinates of the block to be predicted The coordinates of the initial point.
  • the obtaining module is further configured to acquire the six-degree-of-freedom data of the camera through the receiver of the magnetic tracker mounted on the camera, and obtain the motion state of the camera according to the six-degree-of-freedom data of the camera.
  • a terminal device is also provided.
  • the terminal device according to the present invention includes the above-described initial point acquisition means based on the H.264 motion estimation algorithm.
  • the method of obtaining the motion state of the camera by the magnetic tracker is used to solve the problem that the motion estimation is not accurate enough when the camera moves in the related art, which saves the motion estimation time and improves the search efficiency.
  • FIG. 1 is a flowchart of an initial point acquisition method based on an H.264 motion estimation algorithm according to an embodiment of the present invention
  • FIG. 2 is a structural block of an initial point acquisition apparatus based on an H.264 motion estimation algorithm according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a comparison of scene movements according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of vector symmetry according to an embodiment of the present invention
  • FIG. 5 is a flowchart of an algorithm according to an embodiment of the present invention
  • Step S102 Acquire a motion state of a camera during initial point prediction, Determining a motion vector of the video scene according to the motion state of the camera;
  • Step S104 synthesizing the motion vector of the video scene and the motion estimation vector of the asymmetric cross-type multi-level hexagon grid search (UMHexagonS) algorithm to obtain a final prediction vector;
  • UHexagonS asymmetric cross-type multi-level hexagon grid search
  • the method of obtaining the motion state of the camera by the magnetic tracker is used to solve the problem that the motion estimation is not accurate enough when the camera moves in the related art, which saves the motion estimation time and improves the search efficiency.
  • the six degrees of freedom data of the camera can be obtained by the receiver of the magnetic tracker mounted on the camera, and the motion state of the camera is obtained according to the six degrees of freedom data of the camera.
  • This method can improve the accuracy of obtaining camera movement.
  • the six degrees of freedom data of the camera includes the spatial coordinates of the camera and the spatial rotation angle of the camera.
  • determining the motion vector of the video scene according to the motion state of the camera comprises: determining whether the video scene moves according to the motion state of the camera; and determining the motion vector of the video scene in the case of moving the video scene.
  • the motion estimation vector of the current macroblock may be obtained by motion estimation of the first two reference macroblocks.
  • the motion search may be performed using the search path of the asymmetric cross-type multi-level hexagon lattice search algorithm, Find the best match block. This method can improve the efficiency of the system.
  • the motion vector of the video scene is a motion vector of a video sequence when the scene changes.
  • the embodiment further provides an initial point acquisition device based on the H.264 motion estimation algorithm.
  • 2 is a structural block diagram of an initial point acquisition apparatus based on an H.264 motion estimation algorithm according to an embodiment of the present invention. As shown in FIG. 2, the apparatus 20 includes: an acquisition module 22 configured to acquire a camera during initial point prediction.
  • a motion state determining a motion vector of the video scene according to the motion state of the camera; the synthesizing module 24, coupled to the acquisition module 22, configured to move the motion vector of the video scene and the motion of the asymmetric cross-type multi-level hexagon grid search algorithm
  • the vector synthesis is estimated to obtain a final predicted vector;
  • a determination module 26 is coupled to the synthesis module 24, configured to obtain coordinates of the initial point based on the final predicted vector and the coordinates of the block to be predicted.
  • the acquisition module 22 is further configured to acquire the six degrees of freedom data of the camera through the receiver of the magnetic tracker mounted on the camera, and obtain the motion state of the camera according to the six degrees of freedom data of the camera.
  • the magnetic tracker can include a transmitter, a receiver, and a computing unit.
  • a terminal device comprising the above-mentioned initial point acquisition device based on the H.264 motion estimation algorithm. The implementation process of the above embodiment will be described in detail below in conjunction with the preferred embodiments and the accompanying drawings.
  • the motion of the scene and the motion vector have correlations.
  • the state of the camera motion is obtained by the magnetic tracker, and is provided to the motion estimation algorithm reference, which can accurately predict when the scene changes. Search for the starting point, saving motion estimation time and improving search efficiency.
  • the magnetic tracker can be composed of a transmitter, a receiver, and a calculation unit, which obtains a six-degree-of-freedom position data.
  • the receiving end of the magnetic tracker is mounted on the camera, and the motion vector generated by the motion of the camera can be obtained by processing the six-degree-of-freedom data.
  • 3 is a schematic diagram of comparison of scene movement according to the first embodiment of the present invention. As shown in FIG.
  • the left column is the adjacent three frames of the camera moving horizontally to the right while the camera is stationary, and the right column is the camera. In three frames, the adjacent three frames of the car (the speed factor is the same as the left column) are taken horizontally to the right.
  • Frame ( ⁇ , ⁇ ) as the frame of M rows and N columns in Figure 4, then the car block in Frame (3,2) is based on the reference frame Frame ( 1,2), Frame (2,2) The position should be the position in Frame (3,1).
  • MV. Amera MV2-MV4, then MV. Amera is the motion vector reflected on the image for the camera state change.
  • MV4 ⁇ 0, BP the car moves in the opposite direction of the actual motion direction in the video sequence due to the motion of the camera.
  • the motion vector obtained according to the UMhexagonS algorithm is still MV2, that is, the car in the video sequence is still considered to be running in the actual motion direction, thereby causing the Sum of Absolute Difference (SAD) local minimum probability. Increase.
  • SAD Sum of Absolute Difference
  • the motion vector generated by the motion of the magnetic tracker is MVa
  • the motion vector estimation algorithm obtains the motion vector of the current block Currentblock as MVb.
  • MV c ⁇ MV a 2 + MV b 2 + 2MV ⁇ V h cos 6»
  • FIG. 4 is a schematic diagram of vector symmetry according to the first embodiment of the present invention. As shown in FIG. 4, when motion vector prediction is performed by using a neighboring reference frame, the motion vector obtained by the magnetic tracker is used for motion estimation, and motion in motion is obtained.
  • Vector calculation as in formula (2):
  • MV d ⁇ F(MV m x , - MV camer )
  • is the relative position vector of the first two reference macroblocks
  • : is the motion vector of the camera
  • t and f are the times of the first two macroblocks, respectively.
  • the conversion relationship of the camera motion vector to the image is shown in Figure 4.
  • point 1 is the actual object position
  • point 2 point 3 is the corresponding position of point 1 on the image.
  • the trapezoid is the camera
  • h is the distance from the imaged object to the camera
  • f is the distance from the camera to the imaging surface.
  • Step 1 Obtain the camera state through the magnetic tracker. For example, use the queue to store the state of the camera, and set the N frame image every second, then remove the six degrees of freedom data jitter every 1/N second.
  • the six-degree-of-freedom data storage format may be: Data ⁇ x, y, z, a, b, c ⁇ , where x, y, z are the spatial coordinates of the camera, and a, b, and c are spatial rotation angles.
  • Step 2 When the UMHexagonS algorithm starts to predict, determine whether the scene moves. For example, determining whether the scene is moving can determine whether the Queue.getdataOQueue.getdataO is less than a specified threshold, wherein the threshold can be set according to the error of the magnetic tracker itself, and the embodiment can be set to 0.5.
  • Step 3 Obtain a scene motion vector by using a magnetic tracker.
  • Bay U MVcamera F (MV level, MV vertical).
  • Step 4 Vector Synthesis.
  • the -MVcamer and UMHexagonS motion estimation vectors obtained in step 3 are combined to obtain a vector MVlast.
  • FIG. 5 is a flowchart of an algorithm according to Embodiment 2 of the present invention. As shown in FIG. 5, the algorithm flow includes the following steps: Step S502: A magnetic tracker acquires a camera status. Step S504, determining whether the scene is moving.
  • Step S506 determine if Queue.getdataOQueue.getdataO is less than the specified threshold. If yes, go to step S506, otherwise, go to step S510.
  • Step S506 calculating a camera motion vector.
  • step S510 motion estimation is performed using the "UMHexagonS algorithm" until the end of the video sequence.
  • the experimental environment of this embodiment is JVT (reference code JM.17.0 version).
  • the video sequence foreman is selected, and two groups are selected: one group is a 166-186 frame with a smooth motion vector of the video sequence.
  • the other group is 100-120 frames without scene motion, and when the scene of the forman video sequence moves, the six-degree-of-freedom position data is added in advance to ensure the longitudinal comparability of the experimental performance, the multi-reference frame mode is set, and the quantization parameter QP setting is set.
  • the search algorithm uses UMhexagonS.
  • the experimentally measured six degrees of freedom data set by the 166-186 frame is as follows: ⁇ 1.0, 0.1, 0.1, 0.3, 0.1, 0.2 ⁇ ⁇ 2.0, 0.2, 0.1, 0.1, 0.2, 0.1 ⁇
  • FIG. 6 is a schematic diagram of an average estimated time per frame of a foreman sequence according to Embodiment 2 of the present invention. As shown in FIG. 6, it is a statistics of 300 frames compression time of the entire video. The peak signal-to-noise ratio (PSNR) variation, the coded acceleration is used as the experimental result, and the results of the standard code are compared. The simulation results are as follows: Table 3: Improvement effect table
  • the embodiment of the present invention is an improved H.264 motion estimation algorithm. Based on the in-depth study of the H.264 algorithm, a single video sequence is used as a prediction environment, and a magnetic tracker is introduced.
  • the magnetic tracker can reflect the motion state of the camera to the motion estimation algorithm, and the motion estimation algorithm can avoid the invalid motion estimation when the video scene changes through the magnetic tracker data, thereby improving the motion estimation. Precision.
  • the above modules or steps of the present invention can be implemented by a general-purpose computing device, which can be concentrated on a single computing device or distributed over a network composed of multiple computing devices.
  • the invention is not limited to any specific combination of hardware and software.
  • the above is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种基于H.264运动估计算法的初始点获取方法及装置,该方法包括以下步骤:在初始点预测时,通过磁力跟踪器获取摄像头的运动状态,根据摄像头的运动状态确定视频场景的运动矢量;将视频场景的运动矢量和非对称十字型多层次六边形格点搜索算法的运动估计矢量合成,得到最终预测矢量,并根据最终预测矢量和待预测块的坐标获得初始点的坐标。通过本发明节约了运动估计时间,提到搜索效率。

Description

基于 H.264运动估计算法的初始点获取方法及装置 技术领域 本发明涉及视频编码领域, 尤其涉及一种基于 H.264运动估计算法的初始点获取 方法及装置、 终端设备。 背景技术
H.264 标准并不明确规定一个编码器应该如何实现, 而是规定一个编了码的视频 比特流的句法和该比特流的解码方法, 在实现上具有较大的灵活性。 H.264 标准一般 采用变换和预测的混合编码法。 运动估计, 就是根据运动对象的空间相关性和时间相关性, 通过相邻帧或是相邻 块的运动矢量来估计当前宏块的运动矢量, 通过该运动矢量找到搜索中心, 再通过运 动搜索算法找出最佳匹配块, 然后保留运动矢量和残差帧数据。 常见的固定模式运动估计算法有: 三步搜索法(Three Step Search, 简称为 TSS)、 二维对数法 (Two Dimensional Logarithmic Search, 简称为 TDLS)、 共轭方向搜索法 (Conjugate Direction Search,简称为 CDS)、四步搜索法 (Four Step Search,简称为 FSS;)、 菱形搜索法(Diamond Search,简称为 DS)、运动矢量场自适应搜索(Motion Vector Field Adaptive Search Technique, 简称为 MVFAST)算法、 可预测运动矢量场自适应搜索技 术(Predictive Motion Vector Field Adaptive Search Technique, 简称为 PMVFAST)算法 和非对称十字型多层次六边形格点搜索 (Unsymmetrical-Cross Muti-Hexa-gon Search, 简称为 UMHexagonS) 算法。 其中, UMHexagonS算法采用了不同搜索模版混合的方 法, 能够很好地适用各种运动场景, 具有良好的性能和较少的运算量。 传统的运动估计算法通常都是以本帧所在的视频序列为参考, 通过对前后帧的时 间和空间相关性进行运动估计。 大多数的优化工作也建立在此基础上, 例如, 初始点 预测优化和搜索路径优化。 在相关技术中, 提供了一种基于矢量加权中值滤波的快速 分层运动估计算法, 该算法运用加权的算法来处理相邻的块的运动矢量, 所得运动矢 量可保护上层运动估算中出错的矢量, 提高了运动估计的精确性。 在相关技术中, 还 提供了一种自适应确定搜索范围的方法, 该方法利用运动矢量场的空域, 时域相关性 动态计算搜索范围, 提高了运动场景变化时的运动估计的灵活性。 但是, 以上二种算法在摄像头发生移动时, 运动估计不够准确。 在视频的采集过 程中, 经常发生摄像头移动的情况, 摄像头的移动致使采集到的视频场景的移动。 然 而, 已有的视频编码只能通过帧之间的智能分析辨别场景的变化, 这样会导致在运动 估计过程中搜索起始点不够精确。 发明内容 本发明的主要目的在于提供一种基于 H.264运动估计算法的初始点获取方案, 以 至少解决上述相关技术中在摄像头发生移动时运动估计不够精确的问题。 为了实现上述目的, 根据本发明的一种方面, 提供了一种基于 H.264运动估计算 法的初始点获取方法。 根据本发明的基于 H.264运动估计算法的初始点获取方法, 包括以下步骤: 在初 始点预测时, 获取摄像头的运动状态, 根据摄像头的运动状态确定视频场景的运动矢 量; 将视频场景的运动矢量和非对称十字型多层次六边形格点搜索算法的运动估计矢 量合成, 得到最终预测矢量, 并根据最终预测矢量和待预测块的坐标获得初始点的坐 标。 优选地, 获取摄像头的运动状态包括: 通过安装在摄像头上的磁力跟踪器的接收 器获取摄像头的六自由度数据,并依据摄像头的六自由度数据得到摄像头的运动状态。 优选地,摄像头的六自由度数据包括摄像头的空间坐标和摄像头的空间旋转角度。 优选地, 根据摄像头的运动状态确定视频场景的运动矢量包括: 根据摄像头的运 动状态判断视频场景是否移动; 在视频场景移动的情况下,确定视频场景的运动矢量。 优选地, 将视频场景的运动矢量和运动估计矢量合成之前, 还包括: 通过前两参 考宏块的运动估计得到当前宏块的运动估计矢量。 优选地, 根据最终预测矢量和待预测块的坐标获得初始点的坐标之后, 该方法还 包括: 使用非对称十字型多层次六边形格点搜索算法的搜索路径对初始点进行运动搜 索, 以找出前一帧对应宏块的最佳匹配块。 优选地, 视频场景的运动矢量为场景变化时的视频序列的运动矢量。 为了实现上述目的, 根据本发明的另一方面, 还提供了一种基于 H.264运动估计 算法的初始点获取装置。 根据本发明的基于 H.264运动估计算法的初始点获取装置, 包括: 获取模块, 设 置为在初始点预测时, 获取摄像头的运动状态, 根据摄像头的运动状态确定视频场景 的运动矢量; 合成模块, 设置为将视频场景的运动矢量和非对称十字型多层次六边形 格点搜索算法的运动估计矢量合成, 得到最终预测矢量; 确定模块, 设置为根据最终 预测矢量和待预测块的坐标获得初始点的坐标。 优选地, 获取模块还设置为通过安装在摄像头上的磁力跟踪器的接收器获取摄像 头的六自由度数据, 并依据摄像头的六自由度数据得到摄像头的运动状态。 为了实现上述目的, 根据本发明的再一方面, 还提供了一种终端设备。 根据本发明的终端设备,包括上述的基于 H.264运动估计算法的初始点获取装置。 通过本发明, 采用通过磁力跟踪器获取摄像头的运动状态的方式, 解决了相关技 术中在摄像头发生移动时运动估计不够精确的问题, 节约了运动估计时间, 提高了搜 索效率。 附图说明 此处所说明的附图用来提供对本发明的进一步理解, 构成本申请的一部分, 本发 明的示意性实施例及其说明用于解释本发明, 并不构成对本发明的不当限定。 在附图
图 1是根据本发明实施例的基于 H.264运动估计算法的初始点获取方法的流程图; 图 2是根据本发明实施例的基于 H.264运动估计算法的初始点获取装置的结构框
图 3是根据本发明实施例 的场景移动的对比示意图; 图 4是根据本发明实施例 的矢量对称示意图; 图 5是根据本发明实施例 的算法流程图; 图 6是根据本发明实施例 的 foreman序列每帧平均估计时间的示意图。 具体实施方式 下文中将参考附图并结合实施例来详细说明本发明。 需要说明的是, 在不冲突的 情况下, 本申请中的实施例及实施例中的特征可以相互组合。 根据本发明实施例, 提供了一种基于 H.264运动估计算法的初始点获取方法。 图 1是根据本发明实施例的基于 H.264运动估计算法的初始点获取方法的流程图,如图 1 所示, 包括以下步骤: 步骤 S102, 在初始点预测时, 获取摄像头的运动状态, 根据摄像头的运动状态确 定视频场景的运动矢量; 步骤 S104 , 将视频场景的运动矢量和非对称十字型多层次六边形格点搜索 (UMHexagonS) 算法的运动估计矢量合成, 得到最终预测矢量; 步骤 S106, 根据最终预测矢量和待预测块的坐标获得初始点的坐标。 通过上述步骤, 采用通过磁力跟踪器获取摄像头的运动状态的方式, 解决了相关 技术中在摄像头发生移动时运动估计不够精确的问题, 节约了运动估计时间, 提高了 搜索效率。 优选地,在步骤 S102中,可以通过安装在摄像头上的磁力跟踪器的接收器获取摄 像头的六自由度数据, 并依据摄像头的六自由度数据得到摄像头的运动状态。 该方法 可以提高获取摄像头移动的精度。 优选地,摄像头的六自由度数据包括摄像头的空间坐标和摄像头的空间旋转角度。 优选地, 在步骤 S102中, 根据摄像头的运动状态确定视频场景的运动矢量包括: 根据摄像头的运动状态判断视频场景是否移动; 在视频场景移动的情况下, 确定视频 场景的运动矢量。 该方法可以提高系统的有效性。 优选地,在步骤 S104之前,可以通过前两参考宏块的运动估计得到当前宏块的运 动估计矢量。 优选地, 在前两参考宏块预测得到当前宏块的运动估计矢量和摄像头移动造成场 景运动矢量之后, 可以使用非对称十字型多层次六边形格点搜索算法的搜索路径进行 运动搜索, 以找出最佳匹配块。 该方法可以提高系统的效率。 优选地, 上述视频场景的运动矢量为场景变化时的视频序列的运动矢量。 对应于上述方法, 本实施例还提供了一种基于 H.264运动估计算法的初始点获取 装置。 图 2是根据本发明实施例的基于 H.264运动估计算法的初始点获取装置的结构 框图, 如图 2所示, 该装置 20包括: 获取模块 22, 设置为在初始点预测时, 获取摄 像头的运动状态, 根据摄像头的运动状态确定视频场景的运动矢量; 合成模块 24, 耦 合至获取模块 22, 设置为将视频场景的运动矢量和非对称十字型多层次六边形格点搜 索算法的运动估计矢量合成, 得到最终预测矢量; 确定模块 26, 耦合至合成模块 24, 设置为根据最终预测矢量和待预测块的坐标获得初始点的坐标。 通过上述装置, 采用通过磁力跟踪器获取摄像头的运动状态的方式, 解决了相关 技术中在摄像头发生移动时运动估计不够精确的问题, 节约了运动估计时间, 提高了 搜索效率。 优选地,获取模块 22还设置为通过安装在摄像头上的磁力跟踪器的接收器获取摄 像头的六自由度数据, 并依据摄像头的六自由度数据得到摄像头的运动状态。 优选地, 磁力跟踪器可以包括发射器、 接收器和计算单元。 根据本发明实施例, 还提供了一种终端设备, 包括上述的基于 H.264运动估计算 法的初始点获取装置。 下面结合优选实施例和附图对上述实施例的实现过程进行详细说明。 实施例一 在运动估计中可知, 场景的移动和运动矢量具有相关性, 本实施例通过磁力跟踪 器获取摄像头运动的状态, 并提供给运动估计算法参考, 可在场景发生变化时, 精确 地预测搜索起始点, 从而节约运动估计时间, 提高搜索效率。 在实施过程中, 磁力跟踪器可以由发射器、 接收器、 计算单元构成, 由它获得一 个六自由度位置数据。 将磁力跟踪器的接收端安装在摄像头上, 通过对六自由度数据 的处理可获取摄像头的运动产生的运动矢量。 图 3是根据本发明实施例一的场景移动的对比示意图, 如图 3所示, 左侧一列为 摄像头静止状态下拍摄水平向右移动小汽车的相邻三帧, 右侧一列为摄像头在第三帧 时, 水平向右移动状态下拍摄小汽车 (速度因素同左侧一列) 的相邻三帧。 比较图 3 两列图片可知, MV1=MV2=MV3>MV4。 S卩, 当摄像头以小车相同方向移动时, 相同 速度的小车运动矢量反映在视频序列中变小了; 当摄像头速度大于小车速度时, 相同 速度的小车运动矢量反映在视频序列中甚至可以反方向。 定义 Frame (Μ,Ν) 为图 4中 M行 N列的帧, 则 Frame (3,2) 中小车块根据参考 帧 Frame ( 1,2)、 Frame (2,2) 所得的小车块所在的位置应为 Frame (3,1 ) 中的位置。 定义 MV。amera=MV2-MV4,则 MV。amera就为摄像头状态改变反映在图像上的运动矢量。 当 MV4<0, BP , 由于摄像头的运动,小车在视频序列中向实际运动方向的反方向运动。 此时, 根据 UMhexagonS算法所得运动矢量仍为 MV2, 即仍认为视频序列中的小车按 实际运动方向运行,从而导致运动搜索所得求和绝对误差(Sum of Absolute Difference, 简称为 SAD) 局部最小值概率增大。 假设通过磁力跟踪器获取的场景运动产生的矢量为 MVa, 而通过运动估计算法得 到当前块 Currentblock估计运动矢量为 MVb, 根据矢量的合成算法可得到运动矢量 MVc=F(MVa, MVb), 即公式 (1 ):
MVc = ^MVa 2 + MVb 2 + 2MV ^Vh cos 6»
(1) 其中, 为 MVc与 MVa的夹角。 图 4是根据本发明实施例一的矢量对称示意图, 如图 4所示, 当采用邻近参考帧 运动矢量预测时, 引入磁力跟踪器所获场景运动矢量进行运动估计, 可得运动状态下 的运动矢量计算式, 如公式 (2):
MV d ΛΗΡ = F(MVm x , - MVcamer)
- t - t (2) 其中, ^为前两个参考宏块的相对位置矢量, :为摄像头的运动矢量, t 和 f分别为前两宏块的时间。 摄像头移动矢量转换到图像上的转换关系如图 4所示。 其中, 点 1为实际物体位 置, 点 2点 3分别是点 1在图像上对应位置。 梯形为摄像头, h为成像物体到摄像头 的距离, f为摄像头到成像面的距离。 假设摄像头从位置 l(X,y,z,a,b,C)移动到位置 2(x+
Ax,y+Ay,z,a,b,c),则摄像头产生的运动矢量反映到图像上就为: S2 - Sl= (Ax'Awf (可 参见图 4)。 在实施过程中, 详细的算法实现可以包括如下步骤: 步骤 1, 通过磁力跟踪器获取摄像头状态。 例如, 使用队列来存储摄像头的状态, 设每秒采集 N帧图像, 则每 1/N秒去除六自由度数据抖动后将其存入队列 (Queue 六自由度数据存贮格式可以为: Data{x,y,z,a,b,c} ,其中, x、 y、 z为摄像头的空间坐标, a、 b、 c为空间旋转角度。 步骤 2, 在 UMHexagonS算法起始点预测时, 判断场景是否移动。 例如, 判断场 景是否移动可以判断 Queue.getdataOQueue.getdataO是否小于指定阈值, 其中, 阈值可 以根据磁力跟踪器的本身误差来设定, 本实施例可以设定为 0.5。 步骤 3, 通过磁力跟踪器获取场景运动矢量。 其中, 水平移动的运动矢量为: MV 水平 = Queue.getdata( ).x-Queue.getdata( ).x; 垂直移动的运动矢量为: MV 垂直 =Queue.getdata( ).y-Queue.getdata( ).y。 贝 U MVcamera=F(MV水平, MV垂直)。 步骤 4, 矢量合成。 将步骤 3获得的 -MVcamer和 UMHexagonS运动估计矢量进 行合成得到矢量 MVlast。则初始点为: X=currentX+MVlast.X, Y=currentY+MVlast.Y。 其中, (currentX, current Y)为待预测块的坐标。 步骤 5, 使用 UMHexagonS搜索路径进行运动搜索找出最佳匹配块保存残差帧和 MVlast。 步骤 6, 判断视频序列是否结束, 没有结束返回步骤 1。 在本实施例中, 对 H.264视频压缩算法运动估计进行了改进, 增加了摄像头状态 的参考因素, 通过磁力跟踪器来获取摄像头的状态, 增加了场景发生移动时运动估计 的智能性。 实施例二 图 5是根据本发明实施例二的算法流程图, 如图 5所示, 该算法流程包括以下步 骤: 步骤 S502, 磁力跟踪器获取摄像头状态。 步骤 S504, 判断场景是否移动。 例如, 判断 Queue.getdataOQueue.getdataO是否 小于指定阈值。 如果是, 进入步骤 S506, 否则, 进入步骤 S510。 步骤 S506, 计算摄像头运动矢量。 步骤 S508, 预测矢量合成。 需要说明的是, 在"计算摄像头运动矢量"、 "预测矢 量合成"的步骤中均运用公式 (2), 预测矢量合成后获得初始点, 进入步骤 S510。 步骤 S510, 运用" UMHexagonS算法"进行运动估计直到视频序列结束。 本实施例的实验环境为 JVT (参考代码 JM.17.0版本), 由于本实施例要求场景移 动, 所以选取视频序列 foreman, 在其中选取两组: 一组为视频序列运动矢量平缓的 166-186帧, 另一组为无场景运动的 100-120帧, 并在 forman视频序列发生场景移动 时, 预先加入六自由度位置数据, 以保证实验性能纵向可比性, 设置多参考帧模式, 量化参数 QP设置为 28, 搜索算法采用 UMhexagonS。 实验测得 166-186帧设置的六自由度数据如下: {1.0,0.1,0.1,0.3,0.1,0.2} {2.0,0.2,0.1,0.1,0.2,0.1}
{3.0,0.1,0.1,0.1,0.1,0.1} {4.0,0.2,0.3,0.6,0.1,0.1}
{5.0,0.10.2,0.7,0.4,0.3} {6.0,0.1,0.2,0.1,0.1,0.1}
{7.0,0.3,0.2,0.1,0.3,0.2} {8.0 ,0.3,0.4,0.2,0.1,0.5}
{9.0,0.3,0.4,0.2,0.1,0.1} {10.0,0.2,0.3,0.1,0.2,0.4}
{11.0,0.5,0.4,0.2,0.3,0.1} {12.0,0.1,0.2,0.4,0.2,0.3}
{13.0,0.5,0.2,0.1,0.1,0.1} {14.0,0.1,0.2,0.4,0.1,0.2}
{15.0,0.2,0.3,0.4,0.1,0.1}
表 1: (166-186) 对比结果 改进后 改进前
Frame Time(ms) MET(ms) Time(ms) MET(ms)
166 1502 5 1530 10
168 1421 0 1435 3
170 1498 10 1538 15
172 1702 3 1733 7 174 1697 8 1729 13
176 1732 10 1791 14
178 1812 19 1824 23
180 1856 22 1904 25
182 1895 11 1934 12
184 1847 6 1892 8
186 1862 8 1873 12
表 2: ( 100-120) 对比结果
Figure imgf000010_0001
图 6是根据本发明实施例二的 foreman序列每帧平均估计时间的示意图, 如图 6 所示, 是对整个视频 300帧压缩时间的统计。 采用峰值信噪比 (PSNR)的变化、 编码的 加速度作为实验的结果与标准代码的结果进行比较仿真实验结果如下: 表 3 : 改进效果表
序列 PSNR下降 (dB) 时间下降百分比
news 0.03 -0.02%
slient -0.01 -0.19%
foreman 0.02 4.19% 从表 1和表 2中可以得知, 在引入六自由度数据后, 虽然增加了计算六自由度的 时间, 但该时间小于提高运动估计精度后节约的时间, 平均节约原始算法时间的 5%。 表 3表明在在没有发生场景变换的视频序列 (news, slient) 中, 由于增加了场景 判断的过程所以压缩时间并没有减少, 而对有场景变换的序列 (foreman) 中, 较好地 节约了压缩时间。 图 6表明在 foreman序列中, 在 165帧之后场景序列发生变化时, 较好减少每帧的运动估计时间。 实验结果表明改进后算法在保持运动估计性能的同时, 提高了场景发生改变时运 动估计的精度, 对场景变化较频繁的视频率序列同样较好地提高了搜索精度。 可见, 本实施例提供的算法可以在保持比特率不变的情况下, 很好地降低对 foreman视频序列了运算时间, 而对 slient, news等没有发生场景变化的序列效果可能 不太明显。 即, 本实施例中提供的算法适合场景变化较频繁的视频序列, 适用于具有 预置点的交通监控视频压缩。 综上所述, 本发明实施例是一种改进的基于 H.264 运动估计算法, 在深入研究 H.264 算法的基础上, 跳出单一的以视频序列为预测环境的模式, 引入了磁力跟踪器 作为参考对象, 并和先进的 UMhexagonS算法相结合进行运动估计。 通过本发明实施 例, 磁力跟踪器可将摄像头的运动状态反映到运动估计算法中, 运动估计算法通过磁 力跟踪器数据, 可在视频场景发生变化时, 避免无效运动估计的, 提高了运动估计的 精度。 显然, 本领域的技术人员应该明白, 上述的本发明的各模块或各步骤可以用通用 的计算装置来实现, 它们可以集中在单个的计算装置上, 或者分布在多个计算装置所 组成的网络上, 可选地, 它们可以用计算装置可执行的程序代码来实现, 从而可以将 它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块, 或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。 这样, 本发明不限 制于任何特定的硬件和软件结合。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本领域的技 术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和原则之内, 所作的 任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权 利 要 求 书
1. 一种基于 H.264运动估计算法的初始点获取方法, 包括以下步骤: 在初始点预测时, 获取摄像头的运动状态, 根据所述摄像头的运动状态确 定视频场景的运动矢量;
将所述视频场景的运动矢量和非对称十字型多层次六边形格点搜索算法的 运动估计矢量合成, 得到最终预测矢量, 并根据所述最终预测矢量和待预测块 的坐标获得所述初始点的坐标。
2. 根据权利要求 1所述的方法, 其中, 获取所述摄像头的运动状态包括:
通过安装在所述摄像头上的所述磁力跟踪器的接收器获取所述摄像头的六 自由度数据, 并依据所述摄像头的六自由度数据得到所述摄像头的运动状态。
3. 根据权利要求 2所述的方法, 其中, 所述摄像头的六自由度数据包括所述摄像 头的空间坐标和所述摄像头的空间旋转角度。
4. 根据权利要求 1所述的方法, 其中, 根据所述摄像头的运动状态确定所述视频 场景的运动矢量包括:
根据所述摄像头的运动状态判断所述视频场景是否移动;
在所述视频场景移动的情况下, 确定所述视频场景的运动矢量。
5. 根据权利要求 1所述的方法, 其中, 将所述视频场景的运动矢量和所述运动估 计矢量合成之前, 还包括:
通过前两参考宏块的运动估计得到当前宏块的所述运动估计矢量。
6. 根据权利要求 1所述的方法, 其中, 根据所述最终预测矢量和待预测块的坐标 获得所述初始点的坐标之后, 还包括:
使用所述非对称十字型多层次六边形格点搜索算法的搜索路径对所述初始 点进行运动搜索, 以找出前一帧对应宏块的最佳匹配块。
7. 根据权利要求 1至 6中任一项所述的方法, 其中, 所述视频场景的运动矢量为 场景变化时的视频序列的运动矢量。
8. 一种基于 H.264运动估计算法的初始点获取装置, 包括: 获取模块, 设置为在初始点预测时, 获取摄像头的运动状态, 根据所述摄 像头的运动状态确定视频场景的运动矢量;
合成模块, 设置为将所述视频场景的运动矢量和非对称十字型多层次六边 形格点搜索算法的运动估计矢量合成, 得到最终预测矢量;
确定模块, 设置为根据所述最终预测矢量和待预测块的坐标获得所述初始 点的坐标。
9 根据权利要求 8所述的装置, 其中, 所述获取模块还设置为通过安装在所述摄 像头上的所述磁力跟踪器的接收器获取所述摄像头的六自由度数据, 并依据所 述摄像头的六自由度数据得到所述摄像头的运动状态。
10. 一种终端设备, 包括权利要求 8或 9所述的初始点获取装置。
PCT/CN2012/077466 2011-07-26 2012-06-25 基于h.264运动估计算法的初始点获取方法及装置 WO2013013548A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2011102108873A CN102263958A (zh) 2011-07-26 2011-07-26 基于h264运动估计算法的初始点获取方法及装置
CN201110210887.3 2011-07-26

Publications (1)

Publication Number Publication Date
WO2013013548A1 true WO2013013548A1 (zh) 2013-01-31

Family

ID=45010386

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/077466 WO2013013548A1 (zh) 2011-07-26 2012-06-25 基于h.264运动估计算法的初始点获取方法及装置

Country Status (2)

Country Link
CN (1) CN102263958A (zh)
WO (1) WO2013013548A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263958A (zh) * 2011-07-26 2011-11-30 中兴通讯股份有限公司 基于h264运动估计算法的初始点获取方法及装置
CN114727114B (zh) * 2018-09-21 2024-04-09 华为技术有限公司 运动矢量的确定方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101166276A (zh) * 2006-10-17 2008-04-23 哈曼贝克自动系统股份有限公司 由传感器辅助的视频压缩
WO2008082062A1 (en) * 2007-01-03 2008-07-10 Samsung Electronics Co., Ltd. Motion compensation method and apparatus that sequentially use global motion compensation and local motion compensation, decoding method, video encoder, and video decoder
CN101621694A (zh) * 2009-07-29 2010-01-06 深圳市九洲电器有限公司 一种运动估计方法、系统及显示终端
CN102263958A (zh) * 2011-07-26 2011-11-30 中兴通讯股份有限公司 基于h264运动估计算法的初始点获取方法及装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI109633B (fi) * 2001-01-24 2002-09-13 Gamecluster Ltd Oy Menetelmä videokuvan pakkauksen nopeuttamiseksi ja/tai sen laadun parantamiseksi
JP2003274410A (ja) * 2002-03-13 2003-09-26 Hitachi Ltd 監視映像の符号化装置及び復号装置並びに符号化方法
US6925123B2 (en) * 2002-08-06 2005-08-02 Motorola, Inc. Method and apparatus for performing high quality fast predictive motion search
CN1245028C (zh) * 2003-03-03 2006-03-08 清华大学 非均匀多层次六边形格点整象素运动搜索方法
EP1592248B1 (en) * 2004-04-30 2006-09-20 Matsushita Electric Industrial Co., Ltd. Motion vector estimation employing adaptive temporal prediction
JP2006215657A (ja) * 2005-02-01 2006-08-17 Sharp Corp 動きベクトル検出方法、動きベクトル検出装置、動きベクトル検出プログラム及びプログラム記録媒体
EP1841232A1 (en) * 2006-03-31 2007-10-03 Sony Deutschland Gmbh Method and apparatus to improve the convergence speed of a recursive motion estimator
CN100579228C (zh) * 2008-04-15 2010-01-06 北京航空航天大学 航拍交通视频快速帧间预测方法
US8094714B2 (en) * 2008-07-16 2012-01-10 Sony Corporation Speculative start point selection for motion estimation iterative search
US8144766B2 (en) * 2008-07-16 2012-03-27 Sony Corporation Simple next search position selection for motion estimation iterative search
CN101835047A (zh) * 2010-04-30 2010-09-15 中山大学 一种基于残差下降率的快速UMHexagonS运动估计算法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101166276A (zh) * 2006-10-17 2008-04-23 哈曼贝克自动系统股份有限公司 由传感器辅助的视频压缩
WO2008082062A1 (en) * 2007-01-03 2008-07-10 Samsung Electronics Co., Ltd. Motion compensation method and apparatus that sequentially use global motion compensation and local motion compensation, decoding method, video encoder, and video decoder
CN101621694A (zh) * 2009-07-29 2010-01-06 深圳市九洲电器有限公司 一种运动估计方法、系统及显示终端
CN102263958A (zh) * 2011-07-26 2011-11-30 中兴通讯股份有限公司 基于h264运动估计算法的初始点获取方法及装置

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DUAN QINGQING ET AL.: "Fast Motion Estimation Algorithm in H.264/AVC.", COMPUTER ENGINEERING., vol. 34, no. 16, August 2008 (2008-08-01), pages 244 - 246 *
FILIPPO VELLA ET AL.: "Digital Image Stabilization by Adaptive Block Motion Vectors Filtering.", IEEE TRANSACTIONS ON CONSUMER ELECTRONICS, vol. 48, no. 3, August 2002 (2002-08-01), pages 796 - 800 *

Also Published As

Publication number Publication date
CN102263958A (zh) 2011-11-30

Similar Documents

Publication Publication Date Title
CN111385569B (zh) 一种编解码方法及其设备
TWI587689B (zh) 用以於視訊解碼器基於經重建參考圖框來估算移動之方法與系統(二)
JP5234587B2 (ja) 映像符号化方法及び復号方法、それらの装置、及びそれらのプログラム並びにプログラムを記録した記憶媒体
CN108134939B (zh) 一种运动估计方法及装置
WO2015010317A1 (zh) 一种基于p帧的多假设运动补偿方法
CN108419082B (zh) 一种运动估计方法及装置
KR101396365B1 (ko) 영상의 시공간적 움직임 추정/보상 방법 및 장치
CN1675848A (zh) 用于执行高质量快速预测运动搜索的方法和设备
WO2008067734A1 (en) An encoding/decoding method and device, a fractional pixel interpolation processing method and device
WO2015035769A1 (zh) 运动矢量的获取方法、获取装置、视频编解码器及其方法
WO2015010319A1 (zh) 一种基于p帧的多假设运动补偿编码方法
JP2006313950A (ja) 画像符号化装置、及び画像符号化方法
KR100723861B1 (ko) 고속 움직임 예측을 위한 고속 모드 검색 장치 및 방법
JP2008219141A (ja) 動きベクトル検出装置、それを用いた画像符号化装置および撮像装置
WO2013013548A1 (zh) 基于h.264运动估计算法的初始点获取方法及装置
WO2021031225A1 (zh) 一种运动矢量导出方法、装置及电子设备
CN114727114B (zh) 运动矢量的确定方法和装置
KR20070000702A (ko) 탐색영역 재설정을 이용한 고속 움직임 예측 장치 및 방법
US10448047B2 (en) Encoder circuit and encoding method
KR101078525B1 (ko) 다중시점 영상의 부호화 방법
CN106162196B (zh) 一种面向智能分析的视频编码系统及方法
KR100859073B1 (ko) 움직임 추정 방법
Ashwin et al. Study of the contemporary motion estimation techniques for video coding
Shaker et al. A new efficient adaptive rood pattern search motion estimation algorithm
CN103402084A (zh) 基于avs的运动估计快速算法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12818158

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12818158

Country of ref document: EP

Kind code of ref document: A1