明 細 書 動きべク トル検出装置及び方法 技術分野 Description Motion vector detection device and method
本発明は動きべクトル検出装置及び方法、 特に動画像データを予測符号化する 際に用いられる動きべクトルを検出するための装置及び方法に関する。 背景技術 The present invention relates to a motion vector detection apparatus and method, and more particularly to a motion vector detection apparatus and method for use in predictive coding of moving image data. Background art
従来より、 動画像を圧縮符号化する方法として動き補償予測符号化がある。 こ の方法は、 動きベクトル検出器により複数の画素で構成されるブロック単位 ( 1 6画素 X 1 6画素) で動きべクトルを検出し、 画像間の相関を用いて画像データ の符号量を削減する方法である。 2. Description of the Related Art Conventionally, there has been motion compensation prediction coding as a method for compressing and coding a moving image. This method uses a motion vector detector to detect motion vectors in blocks (16 pixels x 16 pixels) consisting of multiple pixels, and reduces the code amount of image data using correlation between images. How to
一般に、 動きべクトルとしては時間的に隣接するフレーム間のフレーム動きべ クトルが用いられるが、 一般のビデオ信号のように 1つのフレームが 2つのフィ ールドから構成されるィン夕一レース信号が対象となる場合、 フレーム動きべク トルの他に、 フィールド単位で動きベク トル (フィールド動きベクトル) を検出 し、 フレーム動きべク トルとフィールド動きべク トルの両者を適応的に切り替え て動き補償を行っている。 Generally, a frame motion vector between temporally adjacent frames is used as a motion vector. However, an in-line race signal in which one frame is composed of two fields, such as a general video signal, is used. If so, the motion vector (field motion vector) is detected for each field in addition to the frame motion vector, and both the frame motion vector and the field motion vector are adaptively switched to compensate for motion. It is carried out.
フレーム動きべクトルやフィ一ルド動きべク トルを検出する際には、 上述した ように 1 6画素 X 1 6画素の合計 2 5 6画素を 1つの単位 (マクロプロック) と して動きべクトルを検出するが、 画像内の全ての範囲にわたって動きべクトルを 探索するのはハ一ドウエア上の制約からも困難であり、 また処理に長時間を要す ることになる。 そこで、 従来より、 原画像を縮小し、 縮小画像内で動きベク トル を検出するいわゆる階層型動きべクトル検出法が提案されている。 この階層型動 きべクトル検出方法では、 原画像を例えば 1 Z 2に縮小して画像データを少なく し、 この縮小画像内で動きベクトルを検出する。 この動きベク トルは、 真の動き べクトルを検出する際の目安となるもので、 ここでは仮動きべクトルと称する。 その後、 検出した仮動きベク トルをスケーリング (縮小率が 1 / 2の場合には検
出された仮動きベクトルの x座標値及び y座標値を 2倍する) 、 このスケ一リン グされた仮動きべクトルで示される位置を中心としてその近傍 (土 1画素程度) を探索し、 真の動きベクトルを検出するものである。 As described above, when detecting a frame motion vector or a field motion vector, a motion vector is defined as a unit (macroblock) of a total of 256 pixels of 16 pixels × 16 pixels. However, it is difficult to search for the motion vector over the entire range in the image due to hardware limitations, and the processing takes a long time. Therefore, a so-called hierarchical motion vector detection method that reduces the original image and detects a motion vector in the reduced image has been proposed. In this hierarchical motion vector detection method, an original image is reduced to, for example, 1Z2 to reduce image data, and a motion vector is detected in the reduced image. This motion vector is a guide when detecting a true motion vector, and is referred to as a temporary motion vector here. After that, the detected tentative motion vector is scaled (when the reduction ratio is 1/2, The x-coordinate value and y-coordinate value of the generated temporary motion vector are doubled), and the vicinity (about one pixel of soil) is searched around the position indicated by the scaled temporary motion vector, and This is to detect a true motion vector.
なお、 このような階層型動きベクトル検出については、 例えば特開平 7— 1 0 7 4 8 6号公報ゃ特開平 8— 9 8 1 8 6号公報に開示されている。 Note that such a hierarchical motion vector detection is disclosed in, for example, Japanese Patent Application Laid-Open Nos. 7-107486 and 8-98186.
しかしながら、 縮小画像内で仮動きベク トルを検出し (以下これを便宜上第 1 ステップと称する) 、 検出された仮動きべク トルをスケーリングして原画像内で 真の動きベクトルを検出する (以下これを第 2ステップと称する) 場合、 第 2ス テップにおける探索範囲の中心位置は第 1ステツプにて検出された仮動きべクト ルを縮小率だけ拡大した (つまり、 縮小率が 1 / 2の場合には 2倍に拡大) もの であるため、 たとえ原画像内でその位置を中心として土 1画素程度を探索したと しても、 精度よく真の動きベクトルを検出できない問題があった。 すなわち、 第 1ステップで検出された仮動きべク トルを例えば 2倍した場合には、 第 2ステツ プにおける探索の中心位置を示すべク トルは偶数べクトル (偶数を成分とするベ クトル) しか存在しないこととなり、 これは単に原画像内で 2画素ずつマクロブ 口ックをずらして動きべク トルを検出する処理に等価であり、 真の動きべクトル を高精度に検出することができない問題があった。 However, a temporary motion vector is detected in the reduced image (hereinafter referred to as a first step for convenience), and the detected temporary motion vector is scaled to detect a true motion vector in the original image (hereinafter, referred to as a first step). In this case, the center position of the search range in the second step is obtained by enlarging the provisional motion vector detected in the first step by a reduction ratio (that is, a reduction ratio of 1/2). In this case, it is difficult to detect a true motion vector with high accuracy even if a search is made for about one pixel of soil around that position in the original image. That is, if the provisional motion vector detected in the first step is doubled, for example, the vector indicating the center position of the search in the second step is an even vector (a vector having even components). This is equivalent to simply detecting the motion vector by shifting the macroblock by two pixels in the original image, and the true motion vector cannot be detected with high accuracy. There was a problem.
特に、 第 1ステップにおいて仮動きベク トルを検出する際に、 隣接する 2つの 仮動きベクトル A、 Bの評価値、 すなわち予測誤差の差異がわずかである場合、 評価値では Aの方が良い (予測誤差が少ない) ため仮動きベクトルとして採用し ても、 真の動きベクトルは実際には B近傍に存在する場合も多い。 ところが、 従 来技術では第 2ステップにおいて仮動きべク トル Aの近傍 (仮動きべクトルで示 される位置を中心とする ± 1画素あるいは数画素) しか探索しないため、 Bの近 傍にある真の動きベクトルを検出することができない問題があった。 発明の開示 In particular, when the temporary motion vector is detected in the first step, if the evaluation value of the two adjacent temporary motion vectors A and B, that is, the difference between the prediction errors is small, the evaluation value A is better ( Even if it is adopted as a temporary motion vector, the true motion vector actually exists in the vicinity of B in many cases. However, in the conventional technique, only the vicinity of the temporary motion vector A (± 1 pixel or several pixels centered on the position indicated by the temporary motion vector) is searched in the second step, so that it is close to B. There was a problem that a true motion vector could not be detected. Disclosure of the invention
本発明は、 上記従来技術の有する課題に鑑みなされたものであり、 その目的は、 徒に演算量を増大させることなく、 高精度に動きべク トルを検出することが可能 であり、 これにより高精度の動き補償を実行できる動きべクトル検出装置及び方
法を提供することにある。 SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems of the related art, and has as its object to detect a motion vector with high accuracy without increasing the amount of computation. Motion vector detection device and method capable of performing high-precision motion compensation Is to provide a law.
上記目的を達成するために、 本発明は、 原画像から動きベク トルを検出する動 きべクトル検出装置であって、 前記原画像より少ない画像データを有する画像か ら仮動きべクトルを検出する第 1検出手段と、 前記第 1検出手段で検出された前 記仮動きべクトルで決定される位置を中心とし、 前記仮動きべクトルを検出する 際に探索した範囲を含む範囲を前記原画像内で探索することにより前記動きべク トルを検出する第 2検出手段とを有することを特徴とする。 探索範囲を重複 (ォ —バラヅプ) させることで、 確実に動きベクトルを検出することができる。 In order to achieve the above object, the present invention provides a motion vector detection device that detects a motion vector from an original image, and detects a temporary motion vector from an image having less image data than the original image. A first detection unit, and a range including a range searched for when the temporary motion vector is detected, centered on a position determined by the temporary motion vector detected by the first detection unit; And a second detecting means for detecting the motion vector by searching within the device. By overlapping (overlapping) the search ranges, motion vectors can be reliably detected.
ここで、 原画像より少ない画像デー夕を有する画像は縮小画像であることが好 ましい。 また、 縮小画像の縮小比率を 1 /Nとした場合、 前記原画像内で探索す る範囲は、 前記仮動きべク トルで決定される位置を中心とする少なくとも土 N画 素であることが好ましい。 少なくとも土 N画素とすることで、 重複して探索する ことができる。 なお、 士 N画素以上の探索範囲とする技術も当然本発明に含まれ また、 本発明は、 原画像からフレーム動きベクトル及びフィールド動きべクト ルを検出する動きべクトル検出装置であって、 前記原画像からフレーム動きべク トルを検出する検出手段と、 前記検出手段で検出した前記フレーム動きべクトル を用いて前記フィールド動きべクトルを算出する演算手段とを有することを特徴 とする。 フィールド動きベク トルを実際に検出するのではなく、 検出したフレー ム動きべクトルから演算により算出することで、 実際に検出する場合に比べて演 算量を削減することができる。 Here, the image having less image data than the original image is preferably a reduced image. When the reduction ratio of the reduced image is set to 1 / N, the range searched in the original image may be at least a soil N pixel centered on the position determined by the provisional motion vector. preferable. By using at least N pixels, it is possible to search multiple times. It should be noted that the present invention also includes a technique for setting a search range of at least N pixels or more.The present invention is a motion vector detecting apparatus that detects a frame motion vector and a field motion vector from an original image, It has a detecting means for detecting a frame motion vector from an original image, and a calculating means for calculating the field motion vector using the frame motion vector detected by the detecting means. By calculating the field motion vector from the detected frame motion vector instead of actually detecting it, the amount of calculation can be reduced compared to the case of actually detecting the field motion vector.
ここで、 前記演算手段は、 前記フィールド動きベク トル内の偶パリティべクト ルを前記フレーム動きべクトルに対して平行であるとして算出するとともに、 前 記フィールド内動きべクトル内の奇パリティべクトルを前記フレーム動きべクト ル及びフィ一ルド間距離に基づいて算出することが好ましい。 Here, the calculating means calculates an even parity vector in the field motion vector as being parallel to the frame motion vector, and calculates an odd parity vector in the above-mentioned intra-field motion vector. Is preferably calculated based on the frame motion vector and the distance between the fields.
また、 本発明は、 原画像からフレーム動きベク トル及びフィールド動きべクト ルを検出する動きべクトル検出装置であって、 前記原画像からフィ一ルド動きべ ク トルを検出する検出手段と、 前記検出手段で検出した前記フィールド動きべク トルを用いて前記フレーム動きべク トルを算出する演算手段とを有することを特
徴とする。 フレーム動きベク トルを実際に検出するのではなく、 検出したフィ一 ルド動きべク トルから演算により算出することで、 実際に検出する場合に比べて 演算量を削減することができる。 Further, the present invention is a motion vector detecting device for detecting a frame motion vector and a field motion vector from an original image, and a detecting means for detecting a field motion vector from the original image; Computing means for calculating the frame motion vector using the field motion vector detected by the detecting means. Sign. Rather than actually detecting the frame motion vector, by calculating from the detected field motion vector by calculation, the amount of calculation can be reduced as compared with the case of actually detecting the frame motion vector.
また、 本発明は、 原画像からフレーム動きベクトル及びフィールド動きべクト ルを検出する動きべク トル検出装置であって、 前記原画像より少ない画像データ を有する画像から仮動きべク トルとして仮フレーム動きべクトルを検出する第 1 検出手段と、 前記仮動きベク トルで決定される位置を中心とし、 前記仮動きべク トルを検出する際に探索した範囲を含む範囲を前記原画像内で探索することによ り前記フレーム動きべク トルを検出する第 2検出手段と、 前記仮動きべクトルを 用いて前記フィールド動きべクトルを算出する演算手段とを有することを特徴と する。 探索範囲を重複させることでフレーム動きべク トル及びフィールド動きべ ク トルを確実に検出することができるとともに、 フィ一ルド動きべク トルを仮フ レーム動きべク トルから算出することで演算量の低減を図ることができる。 Also, the present invention is a motion vector detecting device for detecting a frame motion vector and a field motion vector from an original image, wherein the image having less image data than the original image has a temporary frame as a temporary motion vector. First detecting means for detecting a motion vector, and searching in the original image for a range around a position determined by the temporary motion vector and including a range searched when detecting the temporary motion vector. Thus, a second detecting means for detecting the frame motion vector and a calculating means for calculating the field motion vector using the temporary motion vector are provided. By overlapping the search range, the frame motion vector and the field motion vector can be reliably detected, and the amount of computation can be calculated by calculating the field motion vector from the temporary frame motion vector. Can be reduced.
ここで、 前記原画像より少ない画像データを有する画像は縮小画像であること が好ましく、 前記縮小の比率を 1 /Nとした場合、 前記原画像内で探索する範囲 は、 前記仮動きべクトルで決定される位置を中心とする少なくとも士 N画素であ ることが好ましい。 Here, it is preferable that the image having less image data than the original image is a reduced image, and when the reduction ratio is 1 / N, the range searched in the original image is the temporary motion vector. It is preferable that the number of pixels is at least N pixels centered on the determined position.
また、 本発明は、 原画像から動きベク トルを検出する方法であって、 原画像よ り少ない画像データを有する画像から仮動きべク トルを検出する第 1ステップと、 前記第 1ステップで検出された仮動きべク トルに基づいて原画像から動きべク ト ルを検出する第 2ステップとを有し、 前記第 2ステップでは、 前記仮動きべクト ルで決定される位置を中心とし、 前記第 1ステップで探索した範囲を含む範囲を 探索範囲として前記動きべク トルを検出することを特徴とする。 Further, the present invention is a method for detecting a motion vector from an original image, comprising: a first step of detecting a temporary motion vector from an image having less image data than the original image; And a second step of detecting a motion vector from the original image based on the provisional motion vector thus obtained.In the second step, a position determined by the temporary motion vector is set as a center, The motion vector is detected using a range including the range searched in the first step as a search range.
ここで、 前記第 1ステップにおける前記原画像より少ない画像データを有する 画像は縮小画像であることが好ましく、 前記縮小の比率を 1 /Nとした場合、 前 記第 2ステップでは前記仮動きベク トルで決定される位置を中心とする少なくと も ± N画素の範囲を探索することが好ましい。 Here, the image having less image data than the original image in the first step is preferably a reduced image. When the reduction ratio is 1 / N, in the second step, the provisional motion vector is used. It is preferable to search a range of at least ± N pixels centering on the position determined by.
また、 本発明は、 原画像からフレーム動きベク トル及びフィールド動きべクト ルを検出する動きべク トル検出方法であって、 前記原画像から前記フレーム動き
べクトルを検出する検出ステップと、 検出された前記フレーム動きべク トルを用 いて前記フィールド動きべク トルを算出する算出ステップとを有することを特徴 とする。 ここで、 前記算出ステップでは、 前記フィールド動きベク トル内の偶パ リティべク トルを前記フレーム動きべク トルに対して平行であるとして算出し、 前記フィ一ルド動きべク トル内の奇パリティべク トルを前記フレーム動きべクト ル及びフィ一ルド間距離に基づいて算出することが好ましい。 The present invention also relates to a motion vector detecting method for detecting a frame motion vector and a field motion vector from an original image, wherein the frame motion vector and the field motion vector are detected from the original image. A detecting step of detecting a vector; and a calculating step of calculating the field motion vector using the detected frame motion vector. Here, in the calculating step, an even parity vector in the field motion vector is calculated as being parallel to the frame motion vector, and an odd parity in the field motion vector is calculated. It is preferable to calculate the vector based on the frame motion vector and the distance between the fields.
また、 本発明は、 原画像からフレーム動きベク トル及びフィールド動きべクト ルを検出する動きべク トル検出方法であって、 前記原画像から前記フィールド動 きべクトルを検出する検出ステップと、 検出された前記フィ一ルド動きべクトル を用いて前記フレーム動きべクトルを算出する算出ステップとを有することを特 徴とする。 Further, the present invention is a motion vector detection method for detecting a frame motion vector and a field motion vector from an original image, comprising: a detection step of detecting the field motion vector from the original image; A calculating step of calculating the frame motion vector by using the obtained field motion vector.
また、 本発明は、 原画像からフレーム動きべク トルとフィールド動きべクトル を検出する動きべクトル検出方法であって、 原画像より少ない画像デ一夕を有す る画像から仮動きべクトルを検出する第 1ステップと、 検出された仮動きべクト ルに基づいて前記フレーム動きべク トルと前記フィールド動きべク トルを検出す る第 2ステップとを有し、 前記第 1ステップでは、 前記仮動きベク トルとして仮 フレーム動きベクトルを検出し、 前記第 2ステップでは、 前記仮動きベクトルで 決定される位置を中心とし、 前記第 1ステップで探索した範囲を含む範囲を探索 することにより前記フレーム動きべクトルを検出するとともに、 前記仮動きべク トルを用いて前記フィールド動きべク トルを算出することを特徴とする。 Further, the present invention is a motion vector detection method for detecting a frame motion vector and a field motion vector from an original image, wherein a temporary motion vector is detected from an image having less image data than the original image. A first step of detecting, and a second step of detecting the frame motion vector and the field motion vector based on the detected temporary motion vector, wherein the first step includes: A temporary frame motion vector is detected as a temporary motion vector, and in the second step, the frame is searched by searching a range including the range searched in the first step with the position determined by the temporary motion vector as a center. A motion vector is detected, and the field motion vector is calculated using the temporary motion vector.
ここで、 前記原画像より少ない画像デ一夕を有する画像を比率 1 /Nの縮小画 像とした場合、 前記第 2ステップにおける探索範囲を前記仮動きべク トルで決定 される位置を中心とする少なくとも土 N画素とすることが好ましい。 また、 前記 第 2ステップでは、 前記フィ一ルド動きべクトル内の偶パリティべクトルを前記 フレーム動きべクトルに対して平行であるとして算出し、 前記フィ一ルド動きべ クトル内の奇パリティべク トルを前記フレーム動きべク トル及びフィールド間距 離に基づいて算出することが好ましい。 図面の簡単な説明
図 1は、 本発明の実施形態の回路の構成図である。 Here, when an image having a smaller number of images than the original image is a reduced image having a ratio of 1 / N, the search range in the second step is centered on a position determined by the provisional motion vector. It is preferable to use at least N pixels. In the second step, an even parity vector in the field motion vector is calculated as being parallel to the frame motion vector, and an odd parity vector in the field motion vector is calculated. Preferably, the torque is calculated based on the frame motion vector and the distance between fields. BRIEF DESCRIPTION OF THE FIGURES FIG. 1 is a configuration diagram of a circuit according to an embodiment of the present invention.
図 2は、 本発明の実施形態における第 1ステップと第 2ステップの探索範囲を 示す説明図である。 FIG. 2 is an explanatory diagram showing a search range of the first step and the second step in the embodiment of the present invention.
図 3は、 本発明の実施形態におけるフレーム動きべク トルからフィールド動き べクトルを作成する処理を示す説明図である。 発明を実施するための最良の形態 FIG. 3 is an explanatory diagram showing processing for creating a field motion vector from a frame motion vector in the embodiment of the present invention. BEST MODE FOR CARRYING OUT THE INVENTION
以下、 図面に基づき本発明の実施の形態について説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図 1には、 本実施形態の構成ブロック図が示されている。 なお、 この構成プロ 'ソク図は、 従来の階層型動きベクトル検出に対応するものであり、 階層構造を用 いてフレーム動きべクトルとフィ一ルド動きべク トルを検出し、 両者を適応的に 切り替えて動き補償を行うフレーム/フィールド適応型動き補償検出器である。 サブサンプルフィル夕 1 0は、 入力画像を 1 / 4の縮小画像に変換するもので、 入力画像の X方向及び y方向それぞれを 1 / 4に縮小する。 サブサンプルフィル 夕 1 0で縮小された画像データは、 フレームメモリ 1 2に供給されるとともに、 べクトル検出器 1 4に供給される。 FIG. 1 shows a configuration block diagram of the present embodiment. Note that this configuration program diagram corresponds to conventional hierarchical motion vector detection, in which a frame motion vector and a field motion vector are detected using a hierarchical structure, and both are adaptively detected. This is a frame / field adaptive motion compensation detector that performs motion compensation by switching. The subsample filter 10 converts the input image into a 1/4 reduced image, and reduces the input image in each of the X and y directions to 1/4. The image data reduced in the sub-sample filter 10 is supplied to the frame memory 12 and also to the vector detector 14.
フレームメモリ 1 2は、 縮小画像を参照画像として格納する。 格納された縮小 画像デ一夕は、 適宜なタイミングで順次べクトル検出器 1 4に供給される。 The frame memory 12 stores the reduced image as a reference image. The stored reduced image data is sequentially supplied to the vector detector 14 at an appropriate timing.
べクトル検出器 1 4は、 第 1ステップにおける仮動きべクトルを検出する回路 で、 本実施形態では仮フレーム動きベクトルを検出する。 具体的には、 参照マク ロブ口ヅク読み出し回路 1 4 aでフレームメモリ 1 2に格納されている参照画像 (縮小画像) を 4画素 X 4画素の縮小マクロブロック単位で読み出し、 また処理 マクロプロック生成回路 1 4 dでサブサンプルフィル夕 1 0から出力された処理 画像から縮小マクロプロックを取り出し、 両マクロブロヅクを A E計算器 1 4 c に供給する。 なお、 仮動きベクトルを検出する際の単位であるマクロブロックを 1 6画素 X 1 6画素ではなく 4画素 X 4画素としたのは、 原画像を 1 / 4に縮小 しているため、 マクロプロヅクもこれに対応させて 1 / 4に縮小したものである。 また、 参照マクロブロックを読み出す際には、 ベク トル生成器 1 4 bで (0 , 0 ) を中心とするサーチ範囲を設定して順次べクトルを生成し、 そのべクトルで指定
されるマクロプロヅクを読み出していく。 The vector detector 14 is a circuit for detecting a temporary motion vector in the first step, and detects a temporary frame motion vector in the present embodiment. More specifically, the reference macroblock readout circuit 14a reads out the reference image (reduced image) stored in the frame memory 12 in units of reduced macroblocks of 4 pixels × 4 pixels, and generates a macroblock. The circuit 14d extracts the reduced macroblock from the processed image output from the subsample filter 10 and supplies both macroblocks to the AE calculator 14c. In addition, the reason why the macroblock, which is the unit for detecting the temporary motion vector, is set to 4 pixels x 4 pixels instead of 16 pixels x 16 pixels is that the original image is reduced to 1/4, so the macroblock It is reduced to 1/4 to correspond to this. When reading a reference macroblock, the vector generator 14b generates a vector by setting a search range centered on (0, 0) and sequentially specifying the vector. The macro program to be read is read.
A E計算器 1 4 cでは、 参照マクロブロックと処理マクロブロック (符号化対 象マクロブロック) の誤差を算出する。 具体的には、 参照マクロブロックの各画 素を A i j、 処理マクロブロックの各画素を X i jとすると、 評価値 (予測誤差) =∑ I X i j - A i j Iで算出される。 算出された評価値 (予測誤差) は、 最小 値比較器 1 4 eに供給される。 The AE calculator 14c calculates the error between the reference macroblock and the processing macroblock (the macroblock to be coded). Specifically, assuming that each pixel of the reference macroblock is Aij and each pixel of the processing macroblock is Xij, the evaluation value (prediction error) = ∑IXij-AijI. The calculated evaluation value (prediction error) is supplied to the minimum value comparator 14e.
最小値比較器 1 4 eは、 べクトル生成器 1 4 bで生成されたべクトル毎に算出 された評価値を互いに比較し、 最も小さい評価値を選択する。 また、 このときの べク トルが仮動きべク トル (仮フレーム動きべク トル MV) として検出される。 検出された仮動きべク トルは、 べクトル拡大器 2 8に供給される。 The minimum value comparator 14e compares the evaluation values calculated for each vector generated by the vector generator 14b with each other, and selects the smallest evaluation value. In addition, the vector at this time is detected as a temporary motion vector (temporary frame motion vector MV). The detected temporary motion vector is supplied to a vector expander 28.
べクトル拡大器 2 8は、 入力された仮動きべク トルをスケ一リングするもので、 具体的には X成分及び y成分をともに縮小率だけ拡大する。 本実施形態では、 サ ブサンプルフィルタ 1 0で原画像を 1 / 4に縮小しているので、 ここでは仮動き べクトルを 4倍に拡大する。 The vector expander 28 scales the input temporary motion vector, and specifically expands both the X component and the y component by the reduction rate. In the present embodiment, since the original image is reduced to 1/4 by the sub-sample filter 10, the provisional motion vector is enlarged four times here.
一方、 フレームメモリ 1 6、 フィールドメモリ 1 8、 フィールドメモリ 2 0が 設けられ、 それぞれ入力画像 (原画像) をフレーム単位及びフィールド単位で格 納する。 なお、 フィールドメモリ 1 8には奇数フィールドデ一夕が格納され、 フ ィールドメモリ 2 0には偶数フィ一ルドデ一夕が格納される。 これらのメモリは、 第 2ステップにおける真のフレーム動きべクトル及び真のフィールド動きべクト ルを検出するための参照フレーム、 あるいは参照フィ一ルドとして用いられる。 すなわち、 フレームメモリ 1 6に格納されたフレーム画像デ一夕はべクトル検出 器 3 0に供給されて参照フレームとして用いられ、 フィールドメモリ 1 8に格納 された奇数フィールド画像データはべク トル検出器 3 2に供給されて参照フィー ルドとして用いられ、 フィールドメモリ 2 0に格納された偶数フィールド画像デ —夕はべクトル検出器 3 4に供給されて参照フィールドとして用いられる。 On the other hand, a frame memory 16, a field memory 18, and a field memory 20 are provided, and store an input image (original image) in frame units and field units, respectively. The field memory 18 stores the odd field data and the field memory 20 stores the even field data. These memories are used as a reference frame or a reference field for detecting a true frame motion vector and a true field motion vector in the second step. That is, the frame image data stored in the frame memory 16 is supplied to the vector detector 30 and used as a reference frame, and the odd field image data stored in the field memory 18 is used as the vector detector. The even field image data stored in the field memory 20 is supplied to the vector detector 32 and used as a reference field in the evening.
べクトル検出器 3 0は、 真のフレーム動きべク トルを検出するためのもので、 フレームメモリ 1 6からの参照フレーム、 遅延器 2 2で遅延された入力画像 (処 理対象原画像) 、 及びべク トル拡大器 2 8で 4倍に拡大された仮動きべクトル The vector detector 30 detects a true frame motion vector. The reference frame from the frame memory 16, the input image delayed by the delay unit 22 (the original image to be processed), And a temporary motion vector quadrupled by the vector magnifier 28
(仮フレーム動きベクトル) を入力してフレーム動きベクトルを検出する。 なお、
フレーム動きべクトルを検出する際の処理単位は通常のマクロプロヅク単位 ( 1 6画素 X 1 6画素) であり、 また遅延器 2 2で遅延させるのは第 1ステップの後 に第 2ステップを実行するため、 つまりべクトル検出器 1 4で仮動きべクトルを 検出した後にべクトル検出器 3 0でフレーム動きべク トルを検出するためである。 フレーム動きべクトルを検出する際の探索範囲については後述する。 (Temporary frame motion vector) is input to detect a frame motion vector. In addition, The processing unit for detecting the frame motion vector is a normal macro-project unit (16 pixels x 16 pixels), and the delay by the delay unit 22 is to execute the second step after the first step That is to say, after detecting the provisional motion vector with the vector detector 14, the vector detector 30 detects the frame motion vector. The search range for detecting the frame motion vector will be described later.
べクトル検出器 3 2は、 真のフィ一ルド動きべク トル (4個のフィールド動き ベクトルの内の偶パリティベクトル) を検出するためのもので、 フィールドメモ リ 1 8からの参照奇数フィールド、 遅延器 2 4で遅延された入力奇数フィールド (原画像奇数フィールド) 、 及びベク トル拡大器 2 8で拡大された仮動きべクト ルを入力してフィールド動きベク トルを検出する。 なお、 処理するブロックは、 フィ一ルド単位であるため 1 6画素 X 8画素である。 The vector detector 32 detects the true field motion vector (even parity vector among the four field motion vectors), and refers to the reference odd field from the field memory 18, The input odd field (original image odd field) delayed by the delay unit 24 and the provisional motion vector expanded by the vector expander 28 are input to detect the field motion vector. The block to be processed is 16 pixels × 8 pixels because it is a field unit.
べクトル検出器 3 4は、 真のフィ一ルド動きべク トル ( 4個のフィ一ルド動き ベクトルの内の奇パリティベクトル) を検出するためのもので、 フィールドメモ リ 2 0からの参照偶数フィールド、 遅延器 2 4で遅延された入力奇数フィールド、 及びべク トル拡大器 2 8で拡大され、 かつ 1 / 2倍された仮動きべク トルを入力 してフィ一ルド動きべクトルを検出する。 仮動きべクトルを 1 / 2倍するのは、 参照偶数フィ一ルドと入力 (処理対象) 奇数フィールドとのフィールド間距離を 考慮したものであり、 詳細については後述する。 The vector detector 34 is for detecting a true field motion vector (an odd parity vector among the four field motion vectors), and is a reference even number from the field memory 20. Detect the field motion vector by inputting the field, the input odd field delayed by the delay unit 24, and the tentative motion vector enlarged and halved by the vector expander 28. I do. The tentative motion vector is multiplied by 1/2 in consideration of the inter-field distance between the reference even field and the input (processing target) odd field. The details will be described later.
べクトル検出器 3 6は、 真のフィールド動きべクトル (4個のフィールド動き ベクトルの内の他の奇パリティベク トル) を検出するためのもので、 フィールド メモリ 2 0からの参照奇フィ一ルド、 遅延器 2 6で遅延された入力偶数フィ一ル ド、 及びベクトル拡大器 2 8で拡大され、 かつ 3 / 2倍された仮動きベクトルを 入力してフィールド動きべク トルを検出する。 仮動きべク トルを 3 / 2倍するの は、 参照奇数フィールドと入力 (処理対象) 偶数フィールドとのフィールド間距 離を考慮したものである。 The vector detector 36 detects the true field motion vector (the other odd parity vector among the four field motion vectors), and refers to the reference odd field from the field memory 20; The input even field delayed by the delay unit 26 and the tentative motion vector expanded by the vector expander 28 and multiplied by 3/2 are input to detect a field motion vector. The reason why the tentative motion vector is multiplied by 3/2 is that the distance between the reference odd field and the input (processed) even field is taken into consideration.
ぺクトル検出器 3 8は、 真のフィールド動きべクトル (4個のフィールド動き ベクトルの内の他の偶パリティベクトル) を検出するためのもので、 フィールド メモリ 2 0からの参照偶数フィールド、 遅延器 2 6で遅延された入力偶数フィー ルド、 及びべクトル拡大器 2 8で拡大された仮動きべク トルを入力してフィ一ル
ド動きべク トルを検出する。 The vector detector 38 detects the true field motion vector (the other even parity vector among the four field motion vectors), and refers to the even field referenced from the field memory 20 and the delay unit. Input the input even field delayed in 26 and the tentative motion vector expanded in 28 The motion vector is detected.
なお、 図中符号 5 0で示される回路構成が第 1ステップを実行する回路であり、 符号 6 0で示される回路構成が第 2ステップを実行する回路である。 Note that the circuit configuration denoted by reference numeral 50 in the figure is a circuit that executes the first step, and the circuit configuration denoted by reference numeral 60 is a circuit that executes the second step.
本実施形態の動きべク トル検出装置はこのような構成を有しており、 従来にお いては原画像を例えば 1 / 2に縮小し、 この縮小画像内でフレーム動きべクトル (仮フレーム動きベクトル) とフィールド動きベクトル (仮フィールド動きべク トル) を検出し、 これらの仮動きベク トルをスケーリングして原画像内で ± 1画 素程度の範囲を探索範囲として真のフレーム動きべク トルと真のフィ一ルド動き ベクトルを検出していたが、 本実施形態においては、 以下の 2つの処理を用いて 真のフレーム動きべクトルと真のフィ一ルド動きべクトルを検出している。 すな わち、 The motion vector detection device according to the present embodiment has such a configuration. Conventionally, an original image is reduced to, for example, 1/2, and a frame motion vector (temporary frame motion) is reduced in the reduced image. Vector motion vector) and the field motion vector (temporary field motion vector), and scale these temporary motion vectors to find a true frame motion vector within a range of about ± 1 pixel in the original image. In the present embodiment, the true frame motion vector and the true field motion vector are detected using the following two processes. That is,
( 1 ) 第 1ステップにおいて原画像を従来以上に縮小 (例えば 1 / 4に縮小) し、 第 2ステップにおいて探索範囲を従来以上に拡大して土 1 6画素として第 1ステ ップにて既に探索済みの範囲をも含む範囲を探索することで動きべクトルを検出 する。 (1) In the first step, the original image is reduced more than before (for example, reduced to 1/4), and in the second step, the search range is expanded more than before to obtain 16 pixels of soil and already in the first step. The motion vector is detected by searching the range including the searched range.
( 2 ) 第 1ステップにおいて従来のように縮小画像から仮フレーム動きべクトル 及び仮フィ一ルド動きべク トルを検出するのではなく、 第 1ステップにおいては 仮フレーム動きベクトルのみを検出し (仮フィールド動きベクトルは検出しない) 、 第 2ステップにおいて検出した仮フレーム動きべクトルから真のフレーム動きべ クトル及び真のフィールド動きべクトルを検出する。 (2) Instead of detecting the temporary frame motion vector and the temporary field motion vector from the reduced image in the first step as in the past, in the first step, only the temporary frame motion vector is detected (temporary A field motion vector is not detected), but a true frame motion vector and a true field motion vector are detected from the temporary frame motion vector detected in the second step.
このように、 本実施形態では第 2ステツプの探索範囲を拡大して第 1ステップ にて仮動きベクトルを検出した時の範囲をも再度探索する (すなわち、 第 1ステ ヅプと第 2ステップの探索範囲をオーバラップさせる) ことで、 真の動きべクト ル検出精度を向上させることができる。 また、 第 1ステップにて仮フレーム動き べクトルのみを検出し、 この仮フレーム動きべクトルから真のフレーム動きべク トル及び真のフィ一ルド動きべク トルを検出することで、 第 1ステップにて仮フ レーム動きべク トルと仮フィ一ルド動きべクトルをともに検出する場合に比べ演 算量を削減することができ、 かつ、 単にフレーム動きベクトルのみから動き補償 を行う場合に比べ高精度の動き補償を行うことが可能となる。
以下、 本実施形態における特徴であるこれら 2つの処理について、 詳細に説明 する。 As described above, in the present embodiment, the search range of the second step is expanded, and the range when the temporary motion vector is detected in the first step is searched again (that is, the range of the first step and the second step). By overlapping the search ranges), the accuracy of true motion vector detection can be improved. In the first step, only the tentative frame motion vector is detected, and the true frame motion vector and the true field motion vector are detected from the tentative frame motion vector. Can reduce the amount of computation as compared with the case where both the temporary frame motion vector and the temporary field motion vector are detected, and are higher than when motion compensation is performed only from the frame motion vector. Accurate motion compensation can be performed. Hereinafter, these two processes, which are features of the present embodiment, will be described in detail.
図 2には、 第 1ステップにおける動きべクトル探索範囲と第 2ステップにおけ る動きベク トル探索範囲の関係が示されている。 図において、 X印は画素を示し ており、 原画像における画素である。 また、 A、 B、 C、 · · ·、 0は、 原画像 を 1 /4に縮小した場合に第 1ステップで探索される画素 (つまり、 4つおきの 画素) である。 1 / 4の縮小画像で仮動きベク トルを検出した結果、 図中 Aが仮 動きベク トルの示す位置であるとする。 このとき、 第 2ステップでは、 原画像に おいて A位置を中心として真の動きべクトルを探索するが、 従来技術においては 上述したように Aの位置を中心として土 1画素あるいはせいぜい ± 2、 ± 3画素 を探索しているに過ぎない。 Aの位置を中心として ± 3画素を探索範囲とした場 合が図中破線で示され、 符号 1 0 0で示されている。 この探索範囲 1 0 0は、 第 1ステップの探索範囲とォ一バラヅプしない範囲であり、 仮に B位置と C位置の 間に真の動きべク トルが存在しても、 このような探索範囲を設定していたのでは 真の動きべクトルを検出することは不可能である。 FIG. 2 shows the relationship between the motion vector search range in the first step and the motion vector search range in the second step. In the figure, X marks indicate pixels, which are pixels in the original image. A, B, C,..., 0 are pixels searched in the first step when the original image is reduced to 1/4 (that is, every fourth pixel). As a result of detecting the temporary motion vector in the 1/4 reduced image, assume that A in the figure is the position indicated by the temporary motion vector. At this time, in the second step, a true motion vector is searched around the position A in the original image, but in the prior art, as described above, one pixel or at most ± 2, It is just searching for ± 3 pixels. The case where the search range is ± 3 pixels around the position of A is indicated by a broken line in the figure, and is indicated by reference numeral 100. This search range 100 is a range that does not overlap with the search range of the first step. Even if a true motion vector exists between the B position and the C position, such a search range is With this setting, it is impossible to detect the true motion vector.
そこで、 本実施形態では、 第 1ステップで探索した範囲も含む範囲を第 2ステ ップで探索すベく、 Aの位置を中心として少なくとも ± 4画素を探索範囲に設定 する。 本実施形態における最小の探索範囲が図中一点鎖線で示され、 符号 1 0 2 で示されている。 このような探索範囲 1 0 2を設定することで、 第 1ステップで は予測誤差が大きいとして仮動きベク トルから除外された B点近傍あるいは C点 近傍も第 2ステップで再度探索することができ、 例えば真の動きべクトルが B点 と C点の間に存在する場合でも確実にこれを検出することができる。 Therefore, in the present embodiment, a range including the range searched in the first step should be searched in the second step, and at least ± 4 pixels centering on the position A are set as the search range. The minimum search range in the present embodiment is indicated by a chain line in the figure, and is indicated by reference numeral 102. By setting such a search range 102, it is possible to search again in the second step also near the point B or the point C excluded from the tentative motion vector because the prediction error is large in the first step. For example, even if a true motion vector exists between the point B and the point C, it can be reliably detected.
なお、 第 1ステップと第 2ステップの探索範囲を重複 (オーバラップ) させる ために必要な画素数は上述したように ± 4画素であるが (もちろん、 縮小率が 1 /Nの場合には土 N画素が最小の画素数となる) 、 これ以上の範囲を探索範囲と することも可能である。 Note that the number of pixels required to overlap (overlap) the search ranges of the first step and the second step is ± 4 pixels as described above (of course, when the reduction ratio is 1 / N, N pixels have the minimum number of pixels), but a range larger than this can be used as the search range.
例えば、 第 1ステップで仮動きベク トルを検出する際に、 図中 A点と B点にお ける評価値 (予測誤差) に大きな差がなく、 わずかに A < Bであった場合には第 1ステップでは仮動きべクトルとして Aが採用されることになるが、 評価値の差
がこのようにわずかである場合には、 真の動きべク トルは Aの位置近傍ではなく Bの位置近傍に存在する場合も十分考えられる。 したがって、 このような場合に は、 Bの位置近傍をも再度第 2ステップで探索すべく、 探索範囲を Aの位置を中 心として ± 7画素とするのが好適である。 図においては、 ± 7画素とした場合の 探索範囲が実線で示され、 符号 1 0 4で示されている。 このような探索範囲 1 0 4を設定することで、 例えば真の動きべク トルが図中 bで示される位置にあった としても、 これを確実に検出することが可能となる。 なお、 探索範囲の上限は、 ハードウエア構成から決定されるが、 本実施形態では上述したように Aの位置を 中心として土 1 6画素を探索範囲としているため、 演算量を徒に増大させること なく第 2ステツプにおいて bの位置も確実に検出できる。 For example, when a temporary motion vector is detected in the first step, the evaluation value (prediction error) at points A and B in the figure does not differ greatly, and if A <B, In one step, A is adopted as the provisional motion vector, but the difference in the evaluation values In this case, it is quite possible that the true motion vector is not near the position of A but near the position of B. Therefore, in such a case, it is preferable to set the search range to ± 7 pixels centering on the position of A so that the vicinity of the position of B can be searched again in the second step. In the figure, the search range in the case of ± 7 pixels is indicated by a solid line, and is indicated by reference numeral 104. By setting such a search range 104, even if the true motion vector is at the position shown by b in the figure, for example, it is possible to reliably detect this. Note that the upper limit of the search range is determined from the hardware configuration. However, in the present embodiment, the search range is set to 16 pixels from the center of the position A as described above. In the second step, the position of b can be reliably detected.
一方、 図 3には、 第 1ステップにて検出された仮フレーム動きベクトルから真 のフィールド動きベク トルを検出 (算出) する処理が模式的に示されている。 図 において、 参照フレーム及び符号化対象フレームとも奇数フィールド (o d d ) 及び偶数フィールド ( e v e n ) から構成されており、 各フィールドの画素は便 宜上白丸で示されている。 また、 参照フレーム及び符号化対象フレームとも o d dと e V e nとの間に仮想的にフレームが示されている。 この仮想フレーム上の 画素は、 o d dにおける画素と e V e nにおける画素を足し合わせて構成される c このようなィン夕一レース構成において、 第 1ステップにて仮フレーム動きべ クトルを検出した結果、 仮フレーム動きベクトル MVの y成分 (図中上下方向成 分) が y = 1 0であったとする。 本実施形態においては、 この仮フレーム動きべ クトル MV ( y = 1 0 ) から第 2ステップにおいて真のフレーム動きベクトル M V及び真のフィ一ルド動きべクトルを検出する。 真のフレーム動きべクトルは、 既に述べたように第 1ステップにて検出された仮フレーム動きべクトル MV ( y = 1 0 ) をスケ一リングし、 もとの画像内で士 1 6画素を探索範囲として探索す ることで検出することができる。 On the other hand, FIG. 3 schematically shows a process of detecting (calculating) a true field motion vector from the temporary frame motion vector detected in the first step. In the figure, both the reference frame and the encoding target frame are composed of an odd field (odd) and an even field (even), and the pixels in each field are indicated by white circles for convenience. Further, a frame is virtually shown between odd and eVen in both the reference frame and the encoding target frame. Results The pixels on the virtual frame, which in configured c such fin evening one race configured for adding pixels in the pixel and e V en in odd, was detected tentative frame motion base vector in the first step Assume that the y component (vertical component in the figure) of the temporary frame motion vector MV is y = 10. In the present embodiment, a true frame motion vector MV and a true field motion vector are detected in the second step from the temporary frame motion vector MV (y = 10). As described above, the true frame motion vector scales the temporary frame motion vector MV (y = 10) detected in the first step, and removes 16 pixels from the original image. It can be detected by searching as a search range.
一方、 真のフィールド動きベク トルは、 次のようにしてフレーム動きベクトル から作成する。 すなわち、 真のフィールド動きベクトルには、 参照フレームの 0 d d (奇数フィールド) と符号化対象フレームの o d dから検出されるフィール ド動きべクトル M V o 0 (偶パリティべク トル) 、 参照フレームの e V e nと符
号化対象フレームの o d dから検出されるフィールド動きべク トル MVo e (奇 パリティべク トル)、 参照フレームの oddと符号化対象フレームの evenか ら検出されるフィ一ルド動きべク トル MVe 0 (奇パリティべクトル) 、 参照フ レームの e V e nと符号化対象フレームの e V e nから検出されるフィ一ルド動 きベクトル MVe e (偶パリティベクトル) の 4個が存在するが、 それぞれ次の ようにして仮フレーム動きべクトル MVから作成される。 On the other hand, the true field motion vector is created from the frame motion vector as follows. In other words, the true field motion vector includes 0 dd (odd field) of the reference frame, the field motion vector MV o 0 (even parity vector) detected from the odd of the encoding target frame, and the e V en and the mark The field motion vector MVoe (odd parity vector) detected from the odd of the encoding target frame, the field motion vector MVe 0 detected from the odd of the reference frame and the even of the encoding target frame. (Even parity vector), and a field motion vector MVe e (even parity vector) detected from the reference frame eVen and the encoding target frame eVen. It is created from the temporary frame motion vector MV as follows.
<偶パリティべクトルのフィ一ルド動きべクトル MV o 0 > <Field motion vector of even parity vector MV o 0>
図 3に示すように、 仮フレーム動きべク トル MVを平行移動して作成すること ができる。 As shown in FIG. 3, the temporary frame motion vector MV can be created by translation.
フィールド動きベク トル (MVoo) y=仮フレーム動きベクトル (MV) y /2 … (1) Field motion vector (MVoo) y = Temporary frame motion vector (MV) y / 2… (1)
なお、 1/2は、 フィールド動きベク トルの y方向への 1画素分のずらしは、 フ レーム動きべク トルの y方向への 2画素分のずらしに相当することを考慮したも のである。 また、 フィ一ルド動きべク トル MVo oの X成分 (MVo o ) Xは (MV) Xに等しい。 In addition, 1/2 considers that a shift of one pixel in the y direction of the field motion vector is equivalent to a shift of two pixels in the y direction of the frame motion vector. The X component (MVo o) X of the field motion vector MVo o is equal to (MV) X.
<偶パリティべクトルのフィ一ルド動きべク トル MVe e > <Field motion vector of even parity vector MVe e>
フィールド動きべク トル MVo oと同様に仮フレーム動きべク トル MVを平行 移動することで作成することができる。 Similar to the field motion vector MVoo, it can be created by translating the temporary frame motion vector MV in parallel.
フィールド動きべク トル (MV e e ) y=仮フレーム動きべクトル (MV) y /2=フィ一ルド動きべク トル (MVo o) y · · · (2) Field motion vector (MV e e) y = Temporary frame motion vector (MV) y / 2 = Field motion vector (MVo o) y · · · (2)
なお、 フィ一ルド動きべク トル MVe eの X成分 (MVe e) xは (MV) x に等しい。 Note that the X component (MVe e) x of the field motion vector MVe e is equal to (MV) x.
<奇パリティべクトルのフィールド動きべク トル MVo e > <Field motion vector of odd parity vector MVo e>
仮フレーム動きべク トル MVをフィ一ルド間距離に従って伸縮することで算出 することができる。 具体的には、 図 3に示すように、 真のフィールド動きべクト ル MVo oと参照フレームの e V e nとの交点を終端とする動きべクトルとして 作成することができる。 This can be calculated by expanding and contracting the temporary frame motion vector MV according to the distance between the fields. More specifically, as shown in FIG. 3, the motion vector can be created as a motion vector ending at the intersection of the true field motion vector MVoo and the reference frame eVen.
フィールド動きベクトル (MVoe) y = 1/2 (MVoo) y +フィールド ノ リティオフセッ ト = 1 /2 (MVoo) y- 0. 5 · · · (3)
なお、 フィールド動きベクトル MV o eの x成分 (MV o e ) xは、 1/2 (MV) xに等しい。 また、 フィールドパリティオフセッ トは MPEG2特有の 量であり、 (MVoo) y=0に平行な奇パリティフィールド動きベクトル (M Vo e) yがー 0. 5 (図中下向きが正) になることを考慮したものである。 Field motion vector (MVoe) y = 1/2 (MVoo) y + field noise offset = 1/2 (MVoo) y-0.5 (3) Note that the x component (MV oe) x of the field motion vector MV oe is equal to 1/2 (MV) x. In addition, the field parity offset is a quantity peculiar to MPEG2, and the odd parity field motion vector (M Voe) y parallel to (MVoo) y = 0 becomes -0.5 (downward in the figure is positive) This is taken into account.
<奇パリティべクトルのフィ一ルド動きべク トル MV e 0 > <Odd parity vector field motion vector MV e 0>
仮フレーム動きべクトル MVをフィールド間距離に従って伸縮することで算出 することができる。 具体的には、 図 3に示すように、 フィールド動きベクトル M V e eを延長して参照フレームの o d dとの交点を終端とするべク トルとして作 成することができる。 This can be calculated by expanding and contracting the temporary frame motion vector MV according to the inter-field distance. Specifically, as shown in FIG. 3, the field motion vector M V e e can be extended to create a vector ending at the intersection with o d d of the reference frame.
フィールド動きベクトル (MVeo) y = 3/2 (MVoo) y +フィールド パリティオフセット = 3/2 (MVoo) y + 0. 5 · · · (4) なお、 フィ一ルド動きべクトル MVe oの X成分 (MVeo) xは 3/2 (M V) Xに等しい。 また、 フィールドパリティオフセッ トは、 (MVoo) y = 0 に平行な奇パリティフィールド動きベク トル (MVeo) yが 0. 5になること を考慮したものである。 Field motion vector (MVeo) y = 3/2 (MVoo) y + field parity offset = 3/2 (MVoo) y + 0.5 · · · (4) The X component of the field motion vector MVe o (MVeo) x is equal to 3/2 (MV) X. The field parity offset takes into account that the odd parity field motion vector (MVeo) y parallel to (MVoo) y = 0 is 0.5.
このように、 仮フレーム動きべクトルから 4つのフィールド動きベクトルを作 成することで、 従来のように実際に所定の探索範囲を探索してフレーム動きべク トルとフィールド動きべクトルを検出する場合に比べ、 演算量を削減することが 可能となる。 In this way, by creating four field motion vectors from the temporary frame motion vector, it is possible to detect a frame motion vector and a field motion vector by actually searching a predetermined search range as in the past. It is possible to reduce the amount of computation as compared with.
以上、 本発明の実施形態について、 フレーム動きベク トルとフィールド動きべ クトルをともに用いて両者を適応的に切り替えて動き補償を行うフレーム/フィ ールド適応型動き補償の場合について説明したが、 本発明はフィ一ルド動きべク トルを検出することなく単にフレーム動きべクトルのみを検出して動き補償を行 う場合にも適用することができる。 具体的には、 第 1ステップにて仮フレーム動 きべクトルのみを検出し、 第 2ステップで検出した仮フレーム動きべクトルに基 づいて真のフレーム動きべクトルのみを検出し、 このフレーム動きべクトルに基 づいて動き補償を行い符号化することもできる。 但し、 フレーム動きべクトルの みに基づいて符号化した場合には、 フレーム動きべク トルとフィールド動きべク トルを共に用いて符号化した場合に比べて、 予測精度が低下することに注意すベ
きである。 As described above, the embodiment of the present invention has been described in the case of the frame / field adaptive motion compensation in which both the frame motion vector and the field motion vector are used to adaptively switch between them to perform motion compensation. Can be applied to the case where only the frame motion vector is detected without detecting the field motion vector and motion compensation is performed. Specifically, only the temporary frame motion vector is detected in the first step, and only the true frame motion vector is detected based on the temporary frame motion vector detected in the second step. Encoding can be performed by performing motion compensation based on the vector. However, it should be noted that the prediction accuracy is lower when coding is performed based on only the frame motion vector than when coding is performed using both the frame motion vector and the field motion vector. Be It is.
一般に、 階層構造を用いて動きべク トルを検出して動画像を符号化する場合、 その精度の高低は、 フレーム動きべクトル単独 <フレーム動きべク トル +フレー ム動きベク トルから算出したフィールド動きベク トル (本実施形態の場合) くフ レーム動きベクトル +フィールド動きベクトル (実際に探索して検出) となり、 (フレーム動きべクトル +フレーム動きべクトルから算出したフィ一ルド動きべ クトル (本実施形態の場合) ) と (フレーム動きベク トル +フィールド動きべク トル (実際に探索して検出) ) ではその精度にほとんど差はなく、 演算量が少な い分、 本実施形態の予測符号化が優れている。 In general, when encoding a moving image by detecting a motion vector using a hierarchical structure, the degree of accuracy is determined by the frame motion vector alone <the frame motion vector + the field calculated from the frame motion vector. The motion vector (in the case of the present embodiment) is a frame motion vector + a field motion vector (actually searched and detected), and (frame motion vector + field motion vector calculated from the frame motion vector (book In the case of the embodiment)) and (frame motion vector + field motion vector (actually searched and detected)), there is almost no difference in accuracy, and the amount of computation is small, so that the prediction encoding of this embodiment is small. Is better.
また、 本実施形態においては階層型動きベクトル検出について説明したが、 本 実施形態におけるフレーム動きべクトルからフィ一ルド動きべクトルを作成する 処理は非階層型動きベク トル検出にも応用することが可能である。 すなわち、 原 画像を縮小することなく所定の探索範囲を探索してフレーム動きべク トルのみを 検出し、 このフレーム動きべクトルからフィールド動きべクトルを作成してフレ ーム /フィールド適応型動き補償を行うことも可能である。 Although the present embodiment has described the hierarchical motion vector detection, the process of creating a field motion vector from a frame motion vector in the present embodiment can also be applied to non-hierarchical motion vector detection. It is possible. In other words, a predetermined search range is searched without reducing the original image, only the frame motion vector is detected, and a field motion vector is created from this frame motion vector to perform frame / field adaptive motion compensation. It is also possible to do.
さらに、 本実施形態においては第 1ステップにて仮フレーム動きべクトルを検 出し、 この仮フレーム動きべク トルに基づいて第 2ステップにて真のフレーム動 きべクトル及び真のフィ一ルド動きべクトルを検出したが、 第 1ステップにて仮 フィ一ルド動きべクトルを検出し、 この仮フィールド動きべク トルに基づいて第 2ステツプにて真のフレーム動きべクトル及び真のフィ一ルド動きべクトルを検 出することも可能である。 例えば、 第 1ステップにて 4個のフィールド動きべク トルの内、 仮フィールド動きベク トル MV o oのみを検出し、 この仮フィールド 動きべクトル MV o oをスケ一リングして第 2ステップで原画像からフレーム動 きべクトルを作成するとともに、 仮フィールド動きベクトル MV o oから 4つの 真のフィールド動きベク トル MV o o、 MV o e、 MV e o、 MV e eを作成す ることも可能である。 4つのフィールドベクトルは、 Further, in the present embodiment, the provisional frame motion vector is detected in the first step, and the true frame motion vector and the true field motion are detected in the second step based on the provisional frame motion vector. Although the vector was detected, the tentative field motion vector was detected in the first step, and the true frame motion vector and the true field were detected in the second step based on this tentative field motion vector. It is also possible to detect motion vectors. For example, in the first step, only the tentative field motion vector MV oo is detected from the four field motion vectors, and the tentative field motion vector MV oo is scaled. It is possible to create a frame motion vector from, and to create four true field motion vectors MVoo, MVoe, MVeo, and MVee from the temporary field motion vector MVoo. The four field vectors are
フィールド動きベクトル (MV o o ) y =仮フィールド動きベクトル (MV o o ) y … (5 ) Field motion vector (MVoo) y = provisional field motion vector (MVoo) y ... (5)
フィールド動きベク トル (MV e o ) y = 3 / 2仮フィールド動きベク トル
(MVo o) y+0. 5 · · · ( 6) Field motion vector (MV eo) y = 3/2 Provisional field motion vector (MVo o) y + 0.5 (6)
フィールド動きベク トル (MVoe) y= 1/2仮フィールド動きベクトル (MVo o) y-0. 5 · · · (7) Field motion vector (MVoe) y = 1/2 Temporary field motion vector (MVo o) y-0. 5
フィールド動きベクトル (MVee) y=仮フィールド動きベクトル (MVe e) y … (8) Field motion vector (MVee) y = temporary field motion vector (MVe e) y… (8)
とすればよい。 但し、 フィールド動きベク トルは画像内の動きの方向に大きく依 存するため (特に上下方向に移動した場合) 、 仮フィールド動きベクトルからフ レーム動きべク トルを作成した場合にはその精度が低下するおそれがある。 した がって、 一般的には第 1ステップにて仮フレーム動きベクトルを検出し、 その後 フィールド動きべクトルをこの仮フレーム動きべク トルから算出するのが望まし い。 And it is sufficient. However, since the field motion vector greatly depends on the direction of motion in the image (particularly when moving in the vertical direction), the accuracy decreases when the frame motion vector is created from the temporary field motion vector. There is a risk. Therefore, in general, it is desirable to detect the tentative frame motion vector in the first step, and then calculate the field motion vector from this tentative frame motion vector.
なお、 本実施形態では、 原画像より画像データの少ない画像として原画像を 1 / 4に縮小した画像について説明したが、 原画像から数画素毎に単に間引くこと で画像デ一夕の少ない画像を得ることも可能である。 In the present embodiment, an image in which the original image is reduced to 1/4 as an image having less image data than the original image has been described. It is also possible to get.
以上説明したように、 本発明によれば少ない演算量で高精度に動きべクトルを 検出することができ、 これにより効率的に動画像を予測符号化することができる,
As described above, according to the present invention, it is possible to detect a motion vector with high accuracy with a small amount of computation, and thereby to efficiently predict and encode a moving image.