JP3944806B2 - Motion vector detection method and apparatus - Google Patents
Motion vector detection method and apparatus Download PDFInfo
- Publication number
- JP3944806B2 JP3944806B2 JP08907298A JP8907298A JP3944806B2 JP 3944806 B2 JP3944806 B2 JP 3944806B2 JP 08907298 A JP08907298 A JP 08907298A JP 8907298 A JP8907298 A JP 8907298A JP 3944806 B2 JP3944806 B2 JP 3944806B2
- Authority
- JP
- Japan
- Prior art keywords
- motion vector
- frame
- detected
- image
- motion
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
- G06T9/004—Predictors, e.g. intraframe, interframe coding
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Description
【0001】
【目次】
以下の順序で本発明を説明する。
【0002】
発明の属する技術分野
従来の技術(図9)
発明が解決しようとする課題(図10〜図14)
課題を解決するための手段(図1〜図8)
発明の実施の形態
(1)本実施の形態による符号化装置の構成(図1及び図2)
(2)動きベクトルの検出処理(図3〜図8)
(3)本実施の形態の動作及び効果(図1〜図8)
(4)他の実施の形態(図1〜図8)
発明の効果
【0003】
【発明の属する技術分野】
本発明は動きベクトル検出方法及び装置に関し、例えば映像データを符号化する際に動きベクトルを検出する動きベクトル検出方法及び装置に適用して好適なものである。
【0004】
【従来の技術】
近年、映像データの符号化方式としてMPEG2(Moving Picture Experts Group Phase 2)と呼ばれる方式がある。
【0005】
このMPEG2方式は、ITU−T(International Telecommunication Union-Telecommunication Standardization Secter:国際電気通信連合電気通信標準化部門)等の機関によつて標準化され、映像データを符号化し、これを多重化して蓄積及び伝送する目的で規格化されている。
【0006】
実際にこのMPEG2方式では、映像データをフレーム毎にマクロブロツクと呼ばれる単位で符号化するように規定されており、当該映像データを高能率符号化するための符号化方式として、I(Intra )ピクチヤと呼ばれる方式と、前方向と後方向との双方向の動き補償フレーム間予測を用いるB(Bidirectionally predictive)ピクチヤと呼ばれる方式と、前方向の動き補償フレーム間予測を用いるP(Predictive)ピクチヤと呼ばれる方式とが規定されている。
【0007】
ここで図9に示すように、例えば映像データの時間的に連続するフレーム単位のデータ(以下、これをフレームデータと呼ぶ)Tn 〜Tn+2 にIピクチヤ、Bピクチヤ又はPピクチヤを割り当てたとすると、当該Iピクチヤを割り当てたフレームデータTn はそのデータのみを用いて符号化し、Bピクチヤを割り当てたフレームデータTn+1 は時間的に過去のIピクチヤを割り当てたフレームデータTn と時間的に未来のPピクチヤを割り当てたフレームデータTn+2 とを用いてマクロブロツクMB単位で双方向の動き補償フレーム間予測により符号化し、さらにPピクチヤを割り当てたフレームデータTn+2 は時間的に過去のIピクチヤを割り当てたフレームデータTn を用いてマクロブロツク単位MBで前方向の動き補償フレーム間予測により符号化するようになされている。
【0008】
【発明が解決しようとする課題】
ところで図10は、MPEG2方式が適用された符号化装置1を示し、外部からアナログでなる映像信号S1が入力処理部2に供給される。
【0009】
入力処理部2は、外部から供給される映像信号S1をアナログデイジタル変換し、順次得られるフレームデータにIピクチヤ、Bピクチヤ又はPピクチヤのいずれかを割り当てた後、このフレームデータをマクロブロツク単位に分割して出力する。
【0010】
ここでまず符号化装置1においては、第1の符号化処理モード時に第1及び第2の切換え器3及び4のスイツチをそれぞれ第1の接点Aに接続する。
【0011】
この状態において入力処理部2は、Iピクチヤを割り当てたフレームデータ(以下、これを第1のフレームデータと呼ぶ)をマクロブロツク単位に分割し、得られた第1のマクロブロツクデータD1を順次第1の切換え器3を介して離散コサイン変換(DCT:Discrete Cosine Transform )器5に送出する。
【0012】
離散コサイン変換器5は、第1の切換え器3を介して与えられる第1のマクロブロツクデータD1を離散コサイン変換処理して離散コサイン変換係数に変換し、これを量子化器6に送出する。
【0013】
量子化器6は、離散コサイン変換器5から与えられる離散コサイン変換係数を、情報量制御器7から与えられる対応する量子化係数に基づいて量子化し、得られた量子化データD2を可変長符号化器8に送出すると共に、逆量子化器9に送出する。
【0014】
可変長符号化器8は、量子化器6から与えられる量子化データD2を所定方式で可変長符号化し、得られた符号化データD3をバツフアメモリ10を介して例えば所定の記録媒体を有する記録装置(図示せず)に送出する。
【0015】
因みに可変長符号化器8から出力される符号化データD3は、バツフアメモリ10を介して情報量制御器7にも与えられ、これにより情報量制御器7は符号化データD3のデータ量を検出し、その検出結果に基づいて量子化係数を生成してこれを量子化器6及び逆量子化器9に送出する。
【0016】
逆量子化器9は、量子化器6から与えられる量子化データD2を、情報量制御器7から与えられる対応する量子化係数に基づいて逆量子化し、得られる離散コサイン係数を逆離散コサイン変換器11に送出する。
【0017】
逆離散コサイン変換器11は、逆量子化器9から与えられる離散コサイン係数を逆離散コサイン変換処理することにより第1のマクロブロツクデータD1に変換してこれを加算器12に送出する。
【0018】
このとき加算器12は、逆離散コサイン変換器11から与えられる第1のマクロブロツクデータD1をそのままフレームメモリ構成でなる画像メモリ13に送出し、かくして画像メモリ13内に第1のマクロブロツクデータD1を順次格納し、第1のフレームデータを再構成する。
【0019】
この後この符号化装置1では、入力処理部2から1フレーム分の第1のマクロブロツクデータD1が全て出力されると、第2の符号化処理モードに移り、第1及び第2の切換え器3及び4のスイツチを第2の接点Bに接続する。
【0020】
この状態において入力処理部2は、Bピクチヤ又はPピクチヤを割り当てたフレームデータ(以下、これを第2のフレームデータと呼ぶ)をマクロブロツク単位に分割し、得られた第2のマクロブロツクデータD4を動きベクトル検出器14に送出すると共に、減算器15に送出する。
【0021】
動きベクトル検出器14は、入力処理部2から第2のマクロブロツクデータD4が与えられると、画像メモリ13からこれに格納されている、当該第2のマクロブロツクデータD4に対して時間的に過去又は未来の所定の第1又は第2のフレームデータを参照データD5として読み出す。そして動きベクトル検出器14は、画像メモリ13から読み出した参照データD5と第2のマクロブロツクデータD4とに基づいて当該第2のマクロブロツクデータD4の動きベクトルを求め、これを動きベクトルデータD6として動き補償器16に送出する。
【0022】
動き補償器16は、動きベクトル検出器14から動きベクトルデータD6が与えられると、このとき画像メモリ13から参照データD5を読み出し、当該読み出した参照データD5から動きベクトルデータD6に基づいて、第2のマクロブロツクデータD4と最も一致するブロツクデータを取り出し、これを動き補償データD7として減算器15に送出する。
【0023】
これにより減算器15は、入力処理部2から与えられる第2のマクロブロツクデータD4から、動き補償器16から与えられる動き補償データD7を減算し、得られる差分データD8を第1の切換え器3を介して離散コサイン変換器5に送出する。
【0024】
そしてこの後符号化装置1では、上述した第1の符号化処理モード時と同様にして差分データD8を離散コサイン変換器5及び量子化器6を順次介して量子化データD9を生成し、これを可変長符号化器8に送出する。
【0025】
このとき可変長符号化器8においては、動きベクトル検出器14から動きベクトルデータD6が与えられており、量子化器6から与えられる量子化データD9と共にこれに対応する動きベクトルデータD6も可変長符号化し、これら可変長符号化した量子化データD9及び動きベクトルデータD6を符号化データD10としてバツフアメモリ10を介して出力する。
【0026】
また量子化器6から出力される量子化データD9は、逆量子化器9及び逆離散コサイン変換器11を順次介して復号されることにより差分データD8に変換されて加算器12に与えられる。
【0027】
このとき加算器12には、動き補償器16から第2の切換え器4を介して対応する動き補償データD7が与えられており、これにより加算器12は差分データD8と、動き補償データD7とを加算して第2のマクロブロツクデータD4を生成し、これを画像メモリ13に送出する。
【0028】
画像メモリ13内には、加算器12から出力される第2のマクロブロツクデータD4が順次格納され、これにより第2のフレームデータを再構成することができる。ただしこのとき画像メモリ13には、Pピクチヤが割り当てられた第2のマクロブロツクデータD4のみが格納され、Bピクチヤが割り当てられた第2のマクロブロツクデータD4は動き補償フレーム間予測に参照データとして用いられないことから格納されないようになされている。
【0029】
このようにして符号化装置1では、入力処理部2から1フレーム分の第2のマクロブロツクデータD4が全て出力されると、この第2のマクロブロツクデータD4に続いて入力処理部2から出力される第1又は第2のマクロブロツクデータD1又はD4に応じて第1の符号化処理モードに移り、又は第2の符号化処理モードを継続し、この後上述した処理を実行することにより映像信号S1を符号化処理することができる。
【0030】
ところで動きベクトル検出器14では、動きベクトル検出対象の第2のマクロブロツクデータD4に基づく画像(以下、これをマクロブロツク画像と呼ぶ)と、当該マクロブロツク画像が位置する1フレーム分の画像(以下、これを原画像と呼ぶ)よりも時間的に例えば2フレーム過去の参照データD5(第1又は第2のフレームデータ)に基づく画像(以下、これを参照原画像と呼ぶ)とからそれぞれ画素数を減らすように縮小してなる階層画像を生成し、これら階層画像と、マクロブロツク画像及び参照原画像とを階層的に用いて動きベクトルを検出する。
【0031】
実際上この動きベクトル検出器14は、図11(A)及び(B)に示すように、例えば水平方向に16画素及び垂直方向に16ラインでなるマクロブロツク画像MG1上で各画素位置を(i,j)と表し、このマクロブロツク画像MG1上でトツプフイールドtf及びボトムフイールドbfの低域成分lf(q,r) を次式
【0032】
【数1】
【0033】
で表されるように、フイールド毎に水平方向に2画素おき及び垂直方向に2ラインおきの各位置(q,r)でそれぞれ水平方向に2画素及び垂直方向に2ラインでなる対応するブロツク内の4画素の輝度データdの平均値を算出するようにして求めることにより、これらトツプフイールドtf及びボトムフイールドbfの低域成分でなる階層画像(以下、これを第1の基本階層画像と呼ぶ)KG1を生成する。
【0034】
またこの動きベクトル検出器14は、図12(A)及び(B)に示すように、参照原画像上で第1の基本階層画像KG1に対する第1の探索領域TR1の位置を決定し、この第1の探索領域TR1のトツプフイールドtf及びボトムフイールドbfの低域成分Lf(q,r) を次式
【0035】
【数2】
【0036】
で表されるように、フイールド毎に水平方向に2画素おき及び垂直方向に2ラインおきの各位置(q,r)でそれぞれ水平方向に2画素及び垂直方向に2ラインでなる対応するブロツク内の4画素の輝度データDの平均値を算出するようにして求めることにより、これらトツプフイールドtf及びボトムフイールドbfの低域成分でなる階層画像(以下、これを第1の参照階層画像と呼ぶ)SG1を生成する。
【0037】
因みに上述した(1)式及び(2)式では、変数fiに「0」を代入することによりトツプフイールドtfの低域成分を求めることができると共に、当該変数fiに「1」を代入することによりボトムフイールドbfの低域成分を求めることができる。
【0038】
次いで動きベクトル検出器14では、図13に示すように、第1段階の動きベクトル検出処理において、第1の参照階層画像SG1内を第1の基本階層画像KG1によつてサーチしながら順次ブロツクマツチングする。
【0039】
このとき動きベクトル検出器14は、第1の基本階層画像KG1と、これに第1の参照階層画像SG1内で対応させた第1のブロツク階層画像BK1とにおいて、この第1の基本階層画像KG1のトツプフイールドtfに対する予測誤差bdt1(q,r) を次式
【0040】
【数3】
【0041】
で表されるように、当該第1の基本階層画像KG1のトツプフイールドtfの各低域成分と、第1のブロツク階層画像BK1のそれぞれ対応させた低域成分との差分の絶対値の総和を算出するようにして求める。
【0042】
また第1の基本階層画像KG1のボトムフイールドbfに対する予測誤差bdb1(q,r) を次式
【0043】
【数4】
【0044】
で表されるように、当該第1の基本階層画像KG1のボトムフイールドbfの各低域成分と、第1のブロツク階層画像BK1のそれぞれ対応させた低域成分との差分の絶対値の総和を算出するようにして求める。
【0045】
そして第1の基本階層画像KG1と第1のブロツク階層画像BK1とのフレーム間の予測誤差bdf1(q,r) を次式
【0046】
【数5】
【0047】
で表されるように、対応する予測誤差bdt1(q,r) 及び予測誤差bdb1(q,r) 同士を順次加算するようにして求め、当該求めた予測誤差bdf1(q,r) の値が最も最小となるときの第1のブロツク階層画像BK1を検出する。これによりこの動きベクトル検出器14は、この検出した第1のブロツク階層画像BK1を第1の基本階層画像KG1と最も一致するものと判断し、これら第1のブロツク階層画像BK1と第1の基本階層画像KG1との間の動き量に基づいて2フレーム間の動きベクトルMVa1を階層画像レベルで検出する。
【0048】
続いてこの動きベクトル検出器14は、図14に示すように、第2段階の動きベクトル検出処理において、上述した第1段階の動きベクトル検出処理において検出した動きベクトル(以下、これを第1段階の動きベクトルと呼ぶ)MVa1に基づいて、参照原画像FG1上で第2の探索領域TR2の位置を決定する。
【0049】
そしてこの動きベクトル検出器14は、第2の探索領域TR2内をマクロブロツク画像MG1でサーチしながら順次ブロツクマツチングすることにより、当該マクロブロツク画像MG1とこれに第2の探索領域TR2内で対応させた第1のブロツク画像BG1とにおいて、このマクロブロツク画像MG1のトツプフイールドtfに対する予測誤差BDt(m,n) を次式
【0050】
【数6】
【0051】
で表されるように、当該マクロブロツク画像MG1のトツプフイールドtfの各画素位置(i,j)の輝度データdと、第1のブロツク画像BG1のそれぞれ対応させた画素位置(m,n)の輝度データDとの差分の絶対値の総和を算出するようにして求める。
【0052】
またこのマクロブロツク画像MG1のボトムフイールドbfに対する予測誤差BDb(m,n) を次式
【0053】
【数7】
【0054】
で表されるように、当該マクロブロツク画像MG1のボトムフイールドbfの各画素位置(i,j)の輝度データdと、第1のブロツク画像BG1のそれぞれ対応させた画素位置(m,n)の輝度データDとの差分の絶対値の総和を算出するようにして求める。
【0055】
そしてマクロブロツク画像MGと第1のブロツク画像BG1とのフレーム間の予測誤差BDf(m,n) を次式
【0056】
【数8】
【0057】
で表されるように、対応する予測誤差BDt(m,n) 及び予測誤差BDb(m,n) 同士を順次加算するようにして求め、当該求めた予測誤差BDf(m,n) の値が最も最小となるときの第1のブロツク画像BG1を検出する。これによりこの動きベクトル検出器14は、検出した第1のブロツク画像BG1をマクロブロツク画像MG1と最も一致するものと判断し、これら第1のブロツク画像BG1とマクロブロツク画像MG1との間の動き量に基づいて原画像レベルで第1段階の動きベクトルMVa1を補正するような動きベクトルMVa2を検出する。
【0058】
かくしてこの動きベクトル検出器14は、次式
【0059】
【数9】
【0060】
で表されるように、階層画像を生成する際に欠落した画素を補うように第1段階の動きベクトルMVa1を2倍にし、これに第2段階の動きベクトル検出処理において検出した動きベクトル(以下、これを第2段階の動きベクトルと呼ぶ)MVa2を加算することによりマクロブロツク画像MG1の最終的な2フレーム間の動きベクトルMVa3を検出する。
【0061】
ところで、一般的に動きベクトルを検出するためには予測誤差の演算量が膨大になるにもかかわらずに、上述したような動きベクトル検出処理では、階層的に動きベクトルを検出することから、第1の探索領域TR1の大きさを比較的小さくすることができると共に、第2の探索領域TR2の大きさも第1段階の動きベクトルMVa1に基づいて決定することにより比較的小さくすることができ、これにより予測誤差の演算量を大幅に削減できる利点がある。
【0062】
ところがこの動きベクトル検出処理では、動きベクトル検出対象のマクロブロツク画像MG1の動き量が比較的大きいと、当該マクロブロツク画像MG1から生成した第1の基本階層画像KG1と最も一致するブロツク階層画像BK1がその第1の探索領域TR1を越えて位置してしまい、第1段階の動きベクトルMVa1を的確に検出し難くなる問題があつた。すなわちこの動きベクトル検出器14では、マクロブロツク画像MG1の動き量が比較的大きいと最終的な動きベクトルMVa3の検出精度が大幅に低下する問題があつた。
【0063】
本発明は以上の点を考慮してなされたもので、単位ブロツクの動き量に係わらずに動きベクトルを的確に検出し得る動きベクトル検出方法及び装置を提案しようとするものである。
【0064】
【課題を解決するための手段】
かかる課題を解決するため本発明においては、符号化対象の映像データから分割された所定の単位ブロツクの所望階層における第1のフレームから少なくとも2フレーム以上離れた第2のフレームまでの動きベクトルを検出する動きベクトル検出方法において、第1のフレームから、第2のフレームより1フレーム前の第3のフレームまでの間、隣接するフレーム間で、所望階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1のステツプと、当該第1のステツプにおいて検出したフイールド間の動きベクトルの大きさに応じて所望階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する第2のステツプと、当該第2のステツプにおいて決定した探索領域に基づいて所望階層における第3及び第2のフレーム間の動きベクトルを検出する第3のステツプと、第1のステツプにおいて検出した所望階層よりも下層における全てのフイールド間の動きベクトルと、第3のステツプにおいて検出した所望階層における第3及び第2のフレーム間の動きベクトルとを合成して、単位ブロツクの所望階層における第1のフレームから第2のフレームまでの動きベクトルを検出する第4のステツプとを設けるようにした。
【0065】
この結果、第1のステツプにおいて検出した所望階層よりも下層におけるフイールド間の動きベクトルの大きさに応じて所望階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定することから、単位ブロツクの動き量が比較的大きい場合でも所望階層における第3及び第2のフレーム間の動きベクトルを的確に検出することができる。
【0066】
また本発明においては、符号化対象の映像データから分割された所定の単位ブロツクの所望階層における第1のフレームから少なくとも2フレーム以上離れた第2のフレームまでの動きベクトルを検出する動きベクトル検出装置において、第1のフレームから、第2のフレームより1フレーム前の第3のフレームまでの間、隣接するフレーム間で、所望階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1の動きベクトル検出手段と、当該第1の動きベクトル検出手段により検出されたフイールド間の動きベクトルの大きさに応じて所望階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する決定手段と、当該決定手段により決定された探索領域に基づいて所望階層における第3及び第2のフレーム間の動きベクトルを検出する第2の動きベクトル検出手段と、第1の動きベクトル検出手段により検出された所望階層よりも下層における全てのフイールド間の動きベクトルと、第2の動きベクトル検出手段により検出された所望階層における第3及び第2のフレーム間の動きベクトルとを合成して、単位ブロツクの所望階層における第1のフレームから第2のフレームまでの動きベクトルを検出する第3の動きベクトル検出手段とを設けるようにした。
【0067】
この結果、第1の動きベクトル検出手段によつて検出した所望階層よりも下層におけるフイールド間の動きベクトルの大きさに応じて所望階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定することから、単位ブロツクの動き量が比較的大きい場合でも所望階層における第3及び第2のフレーム間の動きベクトルを的確に検出することができる。
【0072】
【発明の実施の形態】
以下図面について、本発明の一実施の形態を詳述する。
【0073】
(1)本実施の形態による符号化装置の構成
図9との対応部分に同一符号を付して示す図1において、20は全体として本実施の形態による符号化装置を示し、動きベクトル検出器21の構成を除いて従来の符号化装置1と同様に構成されている。
【0074】
この符号化装置20において動きベクトル検出器21は、入力処理部2から与えられる第1及び第2のマクロブロツクデータD1及びD4を参照データとして用い、動きベクトル検出対象の第2のマクロブロツクデータD4の動き量に応じた階層的な動きベクトル検出処理を実行することにより、当該第2のマクロブロツクデータD4の動き量が比較的大きい場合でも動きベクトルを的確に検出し得るようになされている。
【0075】
この場合図2に示すように、動きベクトル検出回路21においては、全体がCPU22によつて制御されており、まず第1の符号化処理モード時、第3及び第4の切換え器23及び24のスイツチをそれぞれ第1の接点Aに接続する。
【0076】
この状態において入力処理部2から順次出力される第1のマクロブロツクデータD1は、フレームメモリ構成でなる原画像メモリ25に供給されると共に、第3の切換え器23を介して階層画像生成器26に供給される。
【0077】
このとき原画像メモリ25は、第1のアドレス生成器27からアドレス情報が与えられており、これにより入力処理部2から順次与えられる第1のマクロブロツクデータD1をアドレス情報によつて指定されたアドレス位置に書き込み、第1のフレームデータを再構成する。
【0078】
また階層画像生成器26は、入力処理部2から与えられる第1のマクロブロツクデータD1に基づいてその低域成分及び高域成分でなる参照階層ブロツクデータD10を生成してこれを第4の切換え器24を介してフレームメモリ構成でなる階層画像メモリ28に送出する。
【0079】
階層画像メモリ28は、このとき第2のアドレス生成器29からアドレス情報が与えられており、これにより階層画像生成器26から順次与えられる参照階層ブロツクデータD10をアドレス情報によつて指定されたアドレス位置に書き込む。
【0080】
またこの動きベクトル検出器21では、第2の符号化処理モード時、第3及び第4の切換え器23及び24のスイツチを第1の接点Aに接続したままの状態において、入力処理部2から第2のマクロブロツクデータD4が原画像メモリ25に供給されると共に、第3の切換え器23を介して階層画像生成器26に供給される。
【0081】
原画像メモリ25は、入力処理部2から与えられる第2のマクロブロツクデータD4を、第1のアドレス生成器27から与えられるアドレス情報によつて指定されたアドレス位置に書き込む。
【0082】
階層画像生成器26は、上述した参照階層ブロツクデータD10の生成時と同様にして、入力処理部2から与えられる第2のマクロブロツクデータD4に基づいてその低域成分及び高域成分でなる参照階層ブロツクデータD10を生成し、これを第4の切換え器24を介して階層画像メモリ28に送出する。
【0083】
これにより階層画像メモリ28は、階層画像生成器26から与えられる参照階層ブロツクデータD10を第2のアドレス生成器29から与えられるアドレス情報によつて指定されたアドレス位置に書き込む。
【0084】
そしてこの動きベクトル検出器21では、入力処理部2から与えられる1つの第2のマクロブロツクデータD4に対して上述した処理が終了すると、第2の符号化処理モードから第1の動きベクトル検出処理モードに移つて第1段階の動きベクトル検出処理を開始し、第3及び第4の切換え器23及び24のスイツチを第2の接点Bに接続する。
【0085】
この状態において原画像メモリ25は、第2の符号化処理モード時に格納した第2のマクロブロツクデータD4を第1のアドレス生成器27から与えられるアドレス情報に基づいて読み出し、当該読み出した第2のマクロブロツクデータD4を動きベクトル検出対象として原画像予測誤差演算器30に送出すると共に第3の切換え器23を介して階層画像生成器26に送出する。
【0086】
階層画像生成器26は、原画像メモリ25から与えられる第2のマクロブロツクデータD4に基づいてその低域成分及び高域成分でなる基本階層ブロツクデータD11を生成してこれを第4の切換え器24を介して階層画像予測誤差演算器31に送出する。
【0087】
このとき第2のアドレス生成器29には、CPU22から第2のマクロブロツクデータD4に基づくマクロブロツク画像の原画像上での位置情報が与えられると共に、前方向又は後方向のいずれの動き補償フレーム間予測を実行するのかを表す予測方向情報が与えられる。
【0088】
これにより第2のアドレス生成器29は、この位置情報及び予測方向情報に基づいて、動きベクトル検出対象の第2のマクロブロツクデータD4よりも時間的に例えば1フレーム過去の1フレーム分の各参照階層ブロツクデータD10に基づく画像(以下、これを第2の参照階層画像と呼ぶ)上で第3の探索領域の大きさ及び位置を決定し、当該第3の探索領域内に位置する参照階層ブロツクデータD10を選定する。そしてその選定した参照階層ブロツクデータD10に対するアドレス情報を生成してこれを階層画像メモリ28に送出する。
【0089】
これにより階層画像メモリ28は、第2のアドレス生成器29から与えられるアドレス情報に基づいて、指定されたアドレス位置に書き込まれている参照階層ブロツクデータD10を第1の参照ブロツクデータD12として読み出して階層画像予測誤差演算器31に送出する。
【0090】
そして階層画像予測誤差演算器31は、階層画像生成器26から与えられた基本階層ブロツクデータD11からその低域成分のみを取り出し、当該取り出した低域成分と、階層画像メモリ28から与えられた第1の参照ブロツクデータD12とに基づいてブロツクマツチングすることにより最下層における隣接するフレーム間の対応するフイールド間の動きベクトルを第1段階の動きベクトルとして検出し、これを第1の動きベクトルデータD13として第2のアドレス生成器29及び原画像予測誤差演算器30並びに選定処理器32に送出する。
【0091】
このようにして動きベクトル検出器21では、第1段階の動きベクトルを検出すると、第1の動きベクトル検出処理モードから第2の動きベクトル検出処理モードに移り、第2段階の動きベクトル検出処理を開始する。
【0092】
このとき選定処理器32は、階層画像予測誤差演算器31から与えられた第1の動きベクトルデータD13に基づいて得られる第1段階の動きベクトルの大きさが予め設定された所定の比較値よりも大きいか否かを判断し、この判断結果に応じて、第1段階の動きベクトルの大きさに応じて予め設定された2種類の第2段階の動きベクトル検出処理内容のうち対応する処理内容を指定する選定結果情報を第2のアドレス生成器29及び階層画像予測誤差演算器31に送出する。
【0093】
この場合第2のアドレス生成器29は、選定処理器32から与えられる選定結果情報に基づいて第1段階の動きベクトルが比較的小さい場合に応じた動きベクトル検出処理内容が指定されたときには、階層画像予測誤差演算器31から与えられる第1の動きベクトルデータD13に基づいて、第2の参照階層画像よりも時間的にさらに例えば1フレーム過去の1フレーム分の各参照階層ブロツクデータD10に基づく画像(以下、これを第3の参照階層画像と呼ぶ)上で予め設定された領域の比較的狭い第4の探索領域の位置を決定する。
【0094】
これに対して第2のアドレス生成器29は、選定結果情報に基づいて第1段階の動きベクトルが比較的大きい場合に応じた動きベクトル検出処理内容が指定されたときには、当該第1の動きベクトルデータD13に基づいて第3の参照階層画像の低域成分でなる画像(以下、これを第4の参照階層画像と呼ぶ)上で予め設定された領域の比較的広い第5の探索領域の位置を決定する。
【0095】
そして第2のアドレス生成器29は、決定した第4又は第5の探索領域内に位置する参照階層ブロツクデータD10を選定し、この選定した参照階層ブロツクデータD10に対するアドレス情報を生成してこれを階層画像メモリ28に送出する。
【0096】
これにより階層画像メモリ28は、第2のアドレス生成器29から与えられるアドレス情報に基づいて指定されたアドレス位置に書き込まれている参照階層ブロツクデータD10を第2の参照ブロツクデータD14として読み出して階層画像予測誤差演算器31に送出する。
【0097】
階層画像予測誤差演算器31は、基本階層ブロツクデータD11と、階層画像メモリ28から与えられた第2の参照ブロツクデータD14とに基づいてブロツクマツチングすることにより最下層よりも上層における隣接するフレーム間の動きベクトルを第2段階の動きベクトルとして検出し、これを第2の動きベクトルデータD15として第1のアドレス生成器27及び原画像予測誤差演算器30に送出する。
【0098】
続いてこの動きベクトル検出器21では、第2段階の動きベクトルを検出すると、第2の動きベクトル検出処理モードから第3の動きベクトル検出処理モードに移つて第3段階の動きベクトル検出処理を開始する。
【0099】
このとき第1のアドレス生成器27は、階層画像予測誤差演算器31から与えられる第2の動きベクトルデータD15に基づいて、第3の参照階層画像に対応する(動きベクトル検出対象の第2のマクロブロツクデータD4よりも時間的に2フレーム分離れている)参照原画像上で第6の探索領域の大きさ及び位置を決定し、当該第6の探索領域内に位置する第1又は第2のマクロブロツクデータD1又はD4を選定する。そしてこの選定した第1又は第2のマクロブロツクデータD1又はD4に対するアドレス情報を生成してこれを原画像メモリ25に送出する。
【0100】
これにより原画像メモリ25は、第1のアドレス生成器27から与えられるアドレス情報に基づいて指定されたアドレス位置に書き込まれている第1又は第2のマクロブロツクデータD1又はD4を第3の参照ブロツクデータD16として読み出して原画像予測誤差演算器30に送出する。
【0101】
原画像予測誤差演算器30は、第2のマクロブロツクデータD4と、第3の参照ブロツクデータD16とに基づいてブロツクマツチングすることにより原画像レベルにおける第2段階の動きベクトルを補正するような第3段階の動きベクトルを検出する。
【0102】
そして原画像予測誤差演算器30は、階層画像予測誤差演算器31から与えられた第1段階及び第2段階の動きベクトルと、第3段階の動きベクトルとに基づいて第2のマクロブロツクデータD4の最終的な2フレーム間の動きベクトルを検出し、これを動きベクトルデータD17として動き補償器16及び可変長符号化器8に送出する。
【0103】
かくしてこの動きベクトル検出器21においては、動きベクトル検出対象の第2のマクロブロツクデータD4の最終的な2フレーム間の動きベクトルを検出すると、第3の動きベクトル検出処理モードから再び第2の符号化処理モードに移つて第3及び第4の切換え器23及び24のスイツチをそれぞれ第1の接点Aに接続し、この状態において入力処理部2から1つの第2のマクロブロツクデータD4が与えられる。
【0104】
そしてこの動きベクトル検出器21では、この後入力処理部2から1つの第2のマクロブロツクデータD4が与えられる毎に上述した第2の符号化処理モードから第3の動きベクトル検出処理モードまでの動きベクトル検出処理を順次繰り返し、かくして第2のマクロブロツクデータD4の動き量に応じて動きベクトルを検出する。
【0105】
(2)動きベクトル検出処理
実際上この動きベクトル検出器21では、第1の動きベクトル検出処理モード時に、階層画像生成器26により動きベクトル検出対象の第2のマクロブロツクデータD4のトツプフイールド及びボトムフイールドのデータからそれぞれ低域成分と高域成分とを取り出すようにして基本階層ブロツクデータD11を生成する。
【0106】
すなわち階層画像生成器26は、図3(A)〜(C)に示すように、第2のマクロブロツクデータD4に基づくマクロブロツク画像MG2上でトツプフイールドtf及びボトムフイールドbfの低域成分lf’(q,r) を次式
【0107】
【数10】
【0108】
で表されるように、フイールド毎に水平方向に4画素おき及び垂直方向に4ラインおきの各位置でそれぞれ水平方向に4画素及び垂直方向に4ラインでなる対応するブロツク内の16画素の輝度データdの平均値を算出するようにして求めると共に、マクロブロツク画像MG2上でトツプフイールドtf及びボトムフイールドbfの高域成分af’(q,r) を次式
【0109】
【数11】
【0110】
で表されるように、フイールド毎に水平方向に4画素おき及び垂直方向に4ラインおきの各位置でそれぞれ水平方向に4画素及び垂直方向に4ラインでなる対応するブロツク内の16画素の輝度データdの平均値を算出し、その平均値と当該ブロツク内の各画素の輝度データdとの差分の絶対値の平均値を算出するようにして求めることにより、水平方向に4画素及び垂直方向に4ラインの低域成分(図3(B))と、水平方向に4画素及び垂直方向に4ラインの高域成分(図3(C))とからなる基本階層ブロツクデータD11を生成する。
【0111】
因みにこの階層画像生成器26は、第1及び第2の符号化処理モード時に参照用の第1又は第2のマクロブロツクデータD1又はD4のトツプフイールド及びボトムフイールドのデータからもそれぞれ低域成分と高域成分とを取り出すようにして参照階層ブロツクデータD10を生成する。
【0112】
すなわち階層画像生成器26は、図4(A)〜(C)に示すように、参照用の第1又は第2のマクロブロツクデータD1又はD4に基づくマクロブロツク画像MG3上でトツプフイールドtf及びボトムフイールドbfの低域成分Lf’(q,r) を次式
【0113】
【数12】
【0114】
で表されるように、フイールド毎に水平方向に2画素おき及び垂直方向に2ラインおきの各位置でそれぞれ水平方向に4画素及び垂直方向に4ラインでなる対応するブロツク内の16画素の輝度データDの平均値を算出するようにして求めると共に、マクロブロツク画像MG3上でトツプフイールドtf及びボトムフイールドbfの高域成分Af’(q,r) を次式
【0115】
【数13】
【0116】
で表されるように、フイールド毎に水平方向に2画素おき及び垂直方向に2ラインおきの各位置でそれぞれ水平方向に4画素及び垂直方向に4ラインでなる対応するブロツク内の16画素の輝度データDの平均値を算出し、その平均値と当該ブロツク内の各画素の輝度データDとの差分の絶対値の平均値を算出するようにして求めることにより、水平方向に8画素及び垂直方向に8ラインの低域成分(図4(B))と、水平方向に8画素及び垂直方向に8ラインの高域成分(図4(C))とからなる参照階層ブロツクデータD10を生成する。
【0117】
因みに上述した(10)式及び(12)式では、変数fiに「0」を代入することによりトツプフイールドtfの低域成分を求めることができると共に、当該変数fiに「1」を代入することによりボトムフイールドbfの低域成分を求めることができる。また上述した(11)式及び(13)式では、変数fiに「0」を代入することによりトツプフイールドtfの高域成分を求めることができると共に、当該変数fiに「1」を代入することによりボトムフイールドbfの高域成分を求めることができる。
【0118】
そしてこの動きベクトル検出器21において第1の動きベクトル検出処理モード時、図5に示すように、第2のアドレス生成器29は、位置情報及び予測方向情報に基づいて、第2の参照階層画像SG2上で、基本階層ブロツクデータD11のトツプフイールドtfの低域成分に基づく画像(以下、これを第2の基本階層画像と呼ぶ)KG2の所定の1つの角w1と対応する位置を中心とした例えば水平方向Sxに±8画素及び垂直方向Syに±8ラインでなる第3の探索領域TR3を決定する。
【0119】
これにより階層画像予測誤差演算器31は、第3の探索領域TR3内を第2の基本階層画像KG2によつてサーチしながら順次ブロツクマツチングすることにより、当該第2の基本階層画像KG2と、これに第3の探索領域TR3内で対応させた第2のブロツク階層画像BK2との(トツプフイールドtfに対する)予測誤差bdt2(q,r) を次式
【0120】
【数14】
【0121】
で表されるように、この第2の基本階層画像KG2内の各低域成分と、ブロツク階層画像BK2内のそれぞれ対応させた低域成分との差分の絶対値の総和を算出するようにして求める。
【0122】
これにより階層画像予測誤差演算器31は、順次求めた予測誤差bdt2(q,r) が最小となるときの第2のブロツク階層画像BK2を検出し、当該検出した第2のブロツク階層画像BK2と、第2の基本階層画像KG2との間の動き量に基づいて、最下層における隣接するフレーム間の対応するフイールド間の第1段階の動きベクトルMVb1を比較的粗く検出する。
【0123】
次いで動きベクトル検出器21において第2の動きベクトル検出処理モード時、選定処理器32は、例えば第3の探索領域TR3の水平方向の画素数(例えば±8画素)を所定の比較値とするように予め設定されており、当該比較値と第1段階の動きベクトルMVb1のx成分の絶対値とを比較する。
【0124】
すなわちこの選定処理器32は、次式
【0125】
【数15】
【0126】
で表されるように、第1段階の動きベクトルMVb1のx成分mxの絶対値と、比較値Sxtとを比較した結果、当該第1段階の動きベクトルMVb1のx成分mxの絶対値が比較値Sxtよりも小さいときには、マクロブロツク画像MG2の動き量が比較的小さいと判断し、この判断結果に応じて、予め設定された領域の大きさの異なる第4の探索領域(領域が狭い)と第5の探索領域(領域が広い)とのうち領域の狭い第4の探索領域を選定すると共に、当該判断結果に応じた動きベクトルの検出処理内容を選定する。
【0127】
これに対してこの選定処理器32は、次式
【0128】
【数16】
【0129】
で表されるように、第1段階の動きベクトルMVb1のx成分mxの絶対値と、比較値Sxtとを比較した結果、当該第1段階の動きベクトルMVb1のx成分mxの絶対値が比較値Sxt以上のときには、マクロブロツク画像MG2の動き量が比較的大きいと判断し、この判断結果に応じて第4の探索領域と第5の探索領域とのうち領域の広い第5の探索領域を選定すると共に、当該判断結果に応じた動きベクトル検出処理内容を選定する。
【0130】
ここでまず選定処理器32が第4の探索領域を選定した場合、図6に示すように、第2のアドレス生成器29は、選定結果情報に基づいて、第3の参照階層画像SG3上で第1段階の動きベクトルMVb1の終点w2と対応する位置に例えば水平方向Sxに±8画素及び垂直方向Syに±8ラインでなる(第3の探索領域TR3と同じ大きさでなる)第4の探索領域TR4の中心位置を重ねるようにして当該第4の探索領域TR4の位置を決定する。
【0131】
これにより階層画像予測誤差演算器31は、選定された処理内容に応じて、第4の探索領域TR4内を基本階層ブロツクデータD11に基づく画像(以下、これを第3の基本階層画像と呼ぶ)KG3によつてサーチしながら順次ブロツクマツチングすることにより、当該第3の基本階層画像KG3と、これに第4の探索領域TR4内で対応させた第3のブロツク階層画像BK3とにおいて、この第3の基本階層画像KG3のトツプフイールドtfに対する予測誤差bdt3(q,r) を次式
【0132】
【数17】
【0133】
で表されるように、第3の基本階層画像KG3のトツプフイールドtfの各低域成分と、第3のブロツク階層画像BK3のそれぞれ対応させた低域成分との差分の絶対値の総和と、当該第3の基本階層画像KG3のトツプフイールドtfの各高域成分と、第3のブロツク階層画像BK3のそれぞれ対応させた高域成分との差分の絶対値の総和とを加算するようにして求める。
【0134】
また第3の基本階層画像KG3のボトムフイールドbfに対する予測誤差bdb3(q,r) を次式
【0135】
【数18】
【0136】
で表されるように、この第3の基本階層画像KG3のボトムフイールドbfの各低域成分と、第3のブロツク階層画像BK3のそれぞれ対応させた低域成分との差分の絶対値の総和と、当該第3の基本階層画像KG3のボトムフイールドbfの各高域成分と、第3のブロツク階層画像BK3のそれぞれ対応させた高域成分との差分の絶対値の総和とを加算するようにして求める。
【0137】
そして第1の基本階層画像KG3とこれに対応させた第3のブロツク階層画像BK3とのフレーム間の予測誤差bdf3(q,r) を次式
【0138】
【数19】
【0139】
で表されるように、対応する予測誤差bdt3(q,r) 及び予測誤差bdb3(q,r) 同士を順次加算するようにして求め、当該求めた予測誤差bdf3(q,r) が最小となるときの第3のブロツク階層画像BK3を検出する。
【0140】
これによりこの階層画像予測誤差演算器31は、検出した第3のブロツク階層画像BK3と第3の基本階層画像KG3との間の動き量に基づいて、最下層よりも上層における隣接するフレーム間(第2及び第3の参照階層画像SG2及びSG3間)の第2段階の動きベクトルMVb21を第1段階の動きベクトルMVb1よりも検出精度を向上させて検出する。
【0141】
これに対して選定処理器32が第5の探索領域を選定した場合、図7に示すように、第2のアドレス生成器29は、選定結果情報に基づいて、第3の参照階層画像SG3の低域成分のみでなる第4の参照階層画像SG4上で第1段階の動きベクトルMVb1の終点w2に対応する位置に例えば水平方向2Sxに±16画素及び垂直方向Syに±8ラインでなる(第3の探索領域TR3の水平方向Sxを2倍にした大きさでなる)第5の探索領域TR5の中心位置を重ねるようにして当該第5の探索領域TR5の位置を決定する。
【0142】
この場合階層画像予測誤差演算器31は、選定された処理内容に応じて第5の探索領域TR5内を、第3の基本階層画像KG3の低域成分のみでなる画像(以下、これを第4の基本階層画像と呼ぶ)KG4によつてサーチしながら順次ブロツクマツチングする。
【0143】
これにより階層画像予測誤差演算器31は、このとき第4の基本階層画像KG4と、これに第5の探索領域TR5内で対応させた第4のブロツク階層画像BK4とにおいて、当該第4の基本階層画像KG4のトツプフイールドtfに対する予測誤差bdt4(q,r) を次式
【0144】
【数20】
【0145】
で表されるように、第4の基本階層画像KG4のトツプフイールドtfの各低域成分と、第4のブロツク階層画像BK4のそれぞれ対応させた低域成分との差分の絶対値の総和を算出するようにして求める。
【0146】
また第4の基本階層画像KG4のボトムフイールドbfに対する予測誤差bdb4(q,r) を次式
【0147】
【数21】
【0148】
で表されるように、第4の基本階層画像KG4のボトムフイールドbfの各低域成分と、第4のブロツク階層画像BK4のそれぞれ対応させた低域成分との差分の絶対値の総和を算出するようにして求める。
【0149】
そして第4の基本階層画像KG4と第4のブロツク階層画像BK4とのフレーム間の予測誤差bdf4(q,r) を次式
【0150】
【数22】
【0151】
で表されるように、対応する予測誤差bdt4(q,r) 及び予測誤差bdb4(q,r) 同士を順次加算するようにして求め、当該求めた予測誤差bdf4(q,r) が最小となるときの第4のブロツク階層画像BK4を検出し、当該検出した第4のブロツク階層画像BK4と第4の基本階層画像KG4との間の動き量に基づいて最下層よりも上層における隣接するフレーム間の第2段階の動きベクトルMVb22を第1段階の動きベクトルMVb1よりも検出精度を向上させ、かつ第2段階の動きベクトルMVb21よりも検出精度をわずかに下げて検出する。
【0152】
このようにして第1段階の動きベクトルMVb1の大きさが比較値Sxtよりも小さいときには、領域の比較的狭い第4の探索領域TR4内を低域成分及び高域成分でなる第3の基本階層画像KG3によつてサーチしながら順次ブロツクマツチングするようにして第2段階の動きベクトルMVb21を比較的高精度に検出し、また第1段階の動きベクトルMVb1の大きさが比較値Sxt以上のときには、領域の比較的広い第5の探索領域TR5内を低域成分のみでなる第4の基本階層画像KG4によつてサーチしながら順次ブロツクマツチングするようにして第2段階の動きベクトルMVb22をある程度精度を低下させて検出する。
【0153】
このようにしてこの動きベクトル検出器21は、第1段階の動きベクトルMVb1の大きさに応じて処理内容が変わつても、予測誤差の演算量をほぼ同等にして第2段階の動きベクトルMVb21又はMVb22を検出し得るようになされている。
【0154】
続いてこの動きベクトル検出器21において第3の動きベクトル検出処理モード時、図8に示すように、第1のアドレス生成器27は、動きベクトル検出対象の第2のマクロブロツクデータD4に対応する原画像FG2よりも時間的に例えば2フレーム過去の参照原画像FG3上で、先に検出した第2段階の動きベクトルMVb21又はMVb22のいずれか一方の終点w3と対応する位置を中心として、参照階層ブロツクデータD10を生成する際に欠落した画素を補うように例えば水平方向に±1画素及び垂直方向に±1ラインでなる第6の探索領域TR6を決定する。
【0155】
これにより原画像予測誤差演算器30は、第6の探索領域TR6内を動きベクトル検出対象の第2のマクロブロツクデータD4に基づくマクロブロツク画像MG2によつてサーチしながら順次ブロツクマツチングすることにより、上述した(6)式、(7)式及び(8)式を用いて当該マクロブロツク画像MG2に第6の探索領域TR6内で順次対応させた第2のブロツク画像BG2のうち、このマクロブロツク画像MG2と最も一致する第2のブロツク画像BG2を検出し、当該検出した第2のブロツク画像BG2とマクロブロツク画像MG2との間の動き量に基づいて原画像レベルで第2段階の動きベクトルMVb21又はMVb22を補正するような第3段階の動きベクトルMVb3を検出する。
【0156】
そして原画像予測誤差演算器30は、マクロブロツク画像MG2の動き量が比較的小さいために上述した第2段階の動きベクトル検出処理において、第2段階の動きベクトルMVb21を検出している場合、次式
【0157】
【数23】
【0158】
で表されるように、階層画像を生成する際に欠落した画素を補うように、第1段階の動きベクトルMVb1と第2段階の動きベクトルMVb21との加算結果を2倍にし、これに第3段階の動きベクトルMVb3を加算することにより当該マクロブロツク画像MG2の最終的な2フレーム間の動きベクトルMVB1を検出する。
【0159】
またマクロブロツク画像MG2の動き量が比較的大きいために上述した第2段階の動きベクトル検出処理において、第2段階の動きベクトルMVb22を検出している場合には、次式
【0160】
【数24】
【0161】
で表されるように、階層画像を生成する際に欠落した画素を補うように、第1段階の動きベクトルMVb1と第2段階の動きベクトルMVb22との加算結果を2倍にし、これに第3段階の動きベクトルMVb3を加算することにより当該マクロブロツク画像MG2の最終的な2フレーム間の動きベクトルMVB2を検出する。
【0162】
かくしてこの動きベクトル検出器21では、マクロブロツク画像MG2の動き量の大きさに応じて第2の動きベクトル検出処理モードの処理内容を換えることにより、当該マクロブロツク画像MG2の動き量が比較的大きい場合でも最終的な動きベクトルを的確に検出し得るようになされている。
【0163】
なおこの実施の形態の場合、動きベクトル検出器21では、Bピクチヤが割り当てられた第2のマクロブロツクデータD4の動きベクトルを検出するとき、前方向又は後方向のいずれか一方の動きベクトル検出処理によつて検出した第1段階の動きベクトルに基づいて第4又は第5の探索領域TR4又はTR5のいずれか一方を選定するようになされており、これによりBピクチヤが割り当てられた第2のマクロブロツクデータD4の動きベクトルを検出するときの予測誤差の演算量が増大することを防止し得るようになされている。
【0164】
またこの実施の形態の場合、動きベクトル検出器21では、Bピクチヤが割り当てられた第2のマクロブロツクデータD4を参照用として用いる際に、動きベクトル検出処理の第1段階でのみ用いることから、当該Bピクチヤが割り当てられた第2のマクロブロツクデータD4からはトツプフイールドtfのデータの低域成分のみでなる参照階層ブロツクデータを生成するようになされており、これにより参照階層ブロツクデータを格納する階層画像メモリ28の記憶容量を低減化している。
【0165】
(3)本実施の形態の動作及び効果
以上の構成において、この符号化装置20の動きベクトル検出器21では、第1の動きベクトル検出処理モード時に第2の参照階層画像SG2上で第3の探索領域TR3の大きさ及び位置を決定し、当該第3の探索領域TR3内を第2の基本階層画像KG2によつてサーチしながら順次ブロツクマツチングすることにより最下層の隣接するフレーム間におけるフイールド間の第1段階の動きベクトルMVb1を比較的粗く検出する。
【0166】
次いで動きベクトル検出器21では、第2の動きベクトル検出処理モード時に第1段階の動きベクトルMVb1の大きさに応じて第4の探索領域TR4又は第5の探索領域TR5のいずれか一方と処理内容とを選定する。
【0167】
そして第1段階の動きベクトルMVb1の大きさが比較値Sxtよりも小さい場合には、マクロブロツク画像MG2の動き量が比較的小さいと判断し、第3の参照階層画像SG3上で第4の探索領域TR4の位置を決定し、当該第4の探索領域TR4内を第3の基本階層画像KG3によつてサーチしながら順次ブロツクマツチングすることにより最下層よりも上層における隣接するフレーム間の第2段階の動きベクトルMVb21を検出する。
【0168】
これに対して第1段階の動きベクトルMVb1の大きさが比較値Sxt以上の場合には、マクロブロツク画像MG2の動き量が比較的大きいと判断し、第4の参照階層画像SG4上で第5の探索領域TR5の位置を決定し、当該第4の探索領域TR42内を第4の基本階層画像KG4によつてサーチしながら順次ブロツクマツチングすることにより最下層よりも上層における隣接するフレーム間の第2段階の動きベクトルMVb22を検出する。
【0169】
続いて動きベクトル検出器21では、第3の動きベクトル検出処理モード時に第2段階の動きベクトルMVb21又はMVb22に基づいて、参照原画像FG3上で第6の探索領域TR6の大きさ及び位置を決定し、当該第6の探索領域TR6内をマクロブロツク画像MG2によつてサーチしながら順次ブロツクマツチングすることにより、第2段階の動きベクトルMVb21又はMVb22を補正するような第3段階の動きベクトルMVb3を検出する。
【0170】
そして動きベクトル検出器21では、第1段階及び第2段階並びに第3段階の動きベクトルMVb1及びMVb21並びにMVb3、又は第1段階及び第2段階並びに第3段階の動きベクトルMVb1及びMVb22並びにMVb3に基づいてマクロブロツク画像MG2の最終的な2フレーム間の動きベクトルを検出する。
【0171】
従つてこの動きベクトル検出器21では、第2段階の動きベクトル検出処理において、第1段階の動きベクトルMVb1の大きさに応じて第4の探索領域TR4又は第5の探索領域TR5のいずれか一方を選定して用いることから、マクロブロツク画像MG2の動き量の大きさに応じて第2段階の動きベクトルMVb21又はMVb22を的確に検出することができる。
【0172】
またこの動きベクトル検出器21では、第1段階の動きベクトルMVb1の大きさが比較値Sxtよりも小さいときには低域成分及び高域成分を用いて第2段階の動きベクトルMVb21を検出し、これに対して第1段階の動きベクトルMVb1の大きさが比較値Sxt以上のときには、低域成分のみを用いて第2段階の動きベクトルMVb22を検出することから、これら2種類の第2段階の動きベクトルMVb21及びMVb22を検出するための予測誤差の演算量をほぼ同等にすることができる。
【0173】
さらにこの動きベクトル検出器21では、2種類の第2段階の動きベクトルMVb21及びMVb22をそれぞれ同じ回路で検出することから、マクロブロツク画像MG2の動き量に応じて動きベクトルを検出し分けるために回路規模が増大することを防止することができる。
【0174】
さらにこの動きベクトル検出器21では、動きベクトルをマクロブロツク単位で検出するようにしたことにより、原画像FG2上で動きのある部分のみの動きベクトルを的確に検出することができる。
【0175】
以上の構成によれは、最下層における第3の探索領域TR3内を第2の基本階層画像KG2によつてサーチしながらブロツクマツチングすることにより隣接する2フレーム間におけるフイールド間の第1段階の動きベクトルMVb1を検出し、当該検出した第1段階の動きベクトルMVb1の大きさに応じて最下層よりも上層において第4の探索領域TR4又は第5の探索領域TR5のいずれか一方と処理内容とを選定して第2段階の動きベクトルMVb21又はMVb22のいずれか一方を検出するようにしたことにより、マクロブロツク画像MG2の動き量が比較的大きい場合でも第2段階の動きベクトルMVb22を的確に検出し、この結果として最終的な動きベクトルMVB2も的確に検出することができ、かくしてマクロブロツク画像MG2の動き量に係わらず動きベクトルを的確に検出し得る動きベクトル検出方法及び動きベクトル検出装置を実現することができる。
【0176】
(4)他の実施の形態
なお上述の実施の形態においては、動きベクトル検出器21により動きベクトル検出対象の第2のマクロブロツクデータD4の2フレーム間の動きベクトルを検出するようにした場合について述べたが、本発明はこれに限らず、動きベクトル検出対象の第2のマクロブロツクデータD4の少なくとも2フレーム間の動きベクトルを検出するようにしても良い。
【0177】
この場合動きベクトル検出器21では、求めるフレームの1フレーム前までは第1段階の動きベクトル検出処理により隣接するフレーム間におけるフイールド間の第1段階の動きベクトルを順次検出し、求めるフレーム及びその1フレーム前のフレーム間の第2段階の動きベクトルを第2段階の動きベクトル検出処理により最下層よりも上層において検出する。このようにした場合でも上述した実施の形態と同様の効果を得ることができる。
【0178】
また上述の実施の形態においては、動きベクトル検出対象の第2のマクロブロツクデータD4の2フレーム間の動きベクトルを階層画像を用いて検出するようにした場合について述べたが、本発明はこれに限らず、動きベクトル検出対象の第2のマクロブロツクデータD4の少なくとも2フレーム間の動きベクトルを源画像レベルで検出するようにしても良い。
【0179】
すなわちこの場合には、求めるフレームの1フレーム前までは隣接するフレーム間又は当該フレーム間におけるフイールド間の動きベクトルを順次検出し、当該検出した動きベクトルの大きさに応じて求めるフレーム及びその1フレーム前のフレーム間における探索領域の広さを決定してこの求めるフレーム及びその1フレーム前のフレーム間の動きベクトル検出し、このようにして求めた各動きベクトルを合成するようにして最終的な少なくとも2フレーム間の動きベクトルを検出するようにしても良く、この場合にも、動きベクトル検出対象の第2のマクロブロツクデータD4の動き量に応じて動きベクトルを適確に検出することができる。
【0180】
さらに上述の実施の形態においては、第1の動きベクトル検出処理モード時にトツプフイールドtfの低域成分でなる第2の基本階層画像KG2を用いるようにした場合について述べたが、本発明はこれに限らず、第2の基本階層画像KG2に代えてボトムフイールドbfの低域成分のみ、トツプフイールドtfの高域成分のみ、又はボトムフイールドbfの高域成分のみでなる画像を用いて第1段階の動きベクトルMVb1を検出するようにしても良い。
【0181】
さらに上述の実施の形態においては、第1段階の動きベクトルMVb1の大きさが比較値Sxt以上のときに低域成分のみを用いて第2段階の動きベクトルMVb22を検出するようにした場合について述べたが、本発明はこれに限らず、このときに高域成分のみを用いて第2段階の動きベクトルを検出するようにしても良い。
【0182】
さらに上述の実施の形態においては、本発明をMPEG2が適用された符号化装置20に適用するようにした場合について述べたが、本発明はこれに限らず、MPEG1のフレーム構造が適用された符号化装置や動きベクトル検出装置に適用するようにしても良い。
【0183】
さらに上述の実施の形態においては、動きベクトル検出器21において第3の動きベクトル検出処理モードから第2の符号化処理モードに移つたときに第3及び第4の切換え器23及び24のスイツチをそれぞれ第1の接点Aに接続するようにした場合について述べたが、本発明はこれに限らず、第2の動きベクトル検出処理モードから第3の動きベクトル検出処理モードに移つたときに第3及び第4の切換え器23及び24のスイツチをそれぞれ第1の接点Aに接続するようにしても良く、これにより第3段階の動きベクトル検出処理を実行しながら、第2の符号化処理モード時の第2のマクロブロツクデータD4に対する処理を実行することができる。
【0184】
さらに上述の実施の形態においては、第1段階の動きベクトルMVb1の水平方向の画素数を所定の比較値Sxtとするようにした場合について述べたが、本発明はこれに限らず、第1段階の動きベクトルMVb1の垂直方向の画素数や、所定のしきい値等のように、この他種々の値を比較値とすることができる。
【0185】
さらに上述の実施の形態においては、第1段階の動きベクトルMVb1の大きさと比較値Sxtとの比較結果に基づいて予め設定された第4の探索領域TR4又は第5の探索領域TR5のいずれか一方を選定するようにした場合について述べたが、本発明はこれに限らず、第1段階の動きベクトルMVb1の大きさに応じて探索領域の広さを決定するようにしても良い。
【0186】
さらに上述の実施の形態においては、第1のフレームから第2のフレームの1フレーム前の第3のフレームまでの間、所望階層よりも下層において隣接するフレーム間におけるフイールド間の動きベクトルを順次検出する第1の動きベクトル検出手段として、階層画像予測誤差演算器31及び階層画像生成器26を適用するようにした場合について述べたが、本発明はこれに限らず、第1のフレームから第2のフレームの1フレーム前の第3のフレームまでの間、所望階層よりも下層において隣接するフレーム間におけるフイールド間の動きベクトルを順次検出することができれば、この他種々の第1の動きベクトル検出手段を適用するようにしても良い。
【0187】
さらに上述の実施の形態においては、第1の動きベクトル検出手段によつて検出された動きベクトルMVb1の大きさに応じて所望階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する決定手段として選定処理器32及び第2のアドレス生成器29を適用するようにした場合について述べたが、本発明はこれに限らず、第1の動きベクトル検出手段によつて検出された動きベクトルMVb1の大きさに応じて所望階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定することができれば、この他種々の決定手段を適用するようにしても良い。
【0188】
さらに上述の実施の形態においては、決定手段の決定に基づいて第3及び第2のフレーム間の動きベクトルを検出する第2の動きベクトル検出手段として階層画像予測誤差演算器31を適用するようにした場合について述べたが、本発明はこれに限らず、決定手段の決定に基づいて第3及び第2のフレーム間の動きベクトルを検出することができれば、この他種々の第2の動きベクトル検出手段を適用するようにしても良い。
【0189】
【発明の効果】
上述のように本発明によれば、符号化対象の映像データから分割された所定の単位ブロツクの所望階層における第1のフレームから少なくとも2フレーム以上離れた第2のフレームまでの動きベクトルを検出する動きベクトル検出方法において、第1のフレームから、第2のフレームより1フレーム前の第3のフレームまでの間、隣接するフレーム間で、所望階層よりも下層におけるフイールド間の動きベクトルを順次検出し、当該検出したフイールド間の動きベクトルの大きさに応じて所望階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定し、当該決定した探索領域に基づいて所望階層における第3及び第2のフレーム間の動きベクトルを検出し、このように検出した所望階層よりも下層における全てのフイールド間の動きベクトルと、所望階層における第3及び第2のフレーム間の動きベクトルとを合成して、単位ブロツクの所望階層における第1のフレームから第2のフレームまでの動きベクトルを検出するようにしたことにより、単位ブロツクの動き量が比較的大きい場合でも所望階層における第3及び第2のフレーム間の動きベクトルを的確に検出することができ、かくして単位ブロツクの動き量に係わらずに動きベクトルを的確に検出し得る動きベクトル検出方法を実現することができる。
【0190】
また符号化対象の映像データから分割された所定の単位ブロツクの所望階層における第1のフレームから少なくとも2フレーム以上離れた第2のフレームまでの動きベクトルを検出する動きベクトル検出装置において、第1のフレームから、第2のフレームより1フレーム前の第3のフレームまでの間、隣接するフレーム間で、所望階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1の動きベクトル検出手段と、当該第1の動きベクトル検出手段により検出されたフイールド間の動きベクトルの大きさに応じて所望階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する決定手段と、当該決定手段により決定された探索領域に基づいて所望階層における第3及び第2のフレーム間の動きベクトルを検出する第2の動きベクトル検出手段と、第1の動きベクトル検出手段により検出された所望階層よりも下層における全てのフイールド間の動きベクトルと、第2の動きベクトル検出手段により検出された所望階層における第3及び第2のフレーム間の動きベクトルとを合成して、単位ブロツクの所望階層における第1のフレームから第2のフレームまでの動きベクトルを検出する第3の動きベクトル検出手段とを設けるようにしたことにより、単位ブロツクの動き量が比較的大きい場合でも所望階層における第3及び第2のフレーム間の動きベクトルを的確に検出することができ、かくして単位ブロツクの動き量に係わらずに動きベクトルを的確に検出し得る動きベクトル検出装置を実現することができる。
【図面の簡単な説明】
【図1】本発明による符号化装置の回路構成の一実施の形態を示すブロツク図である。
【図2】本発明による動きベクトル検出器の回路構成の一実施の形態を示すブロツク図である。
【図3】基本階層ブロツクデータの生成の説明に供する略線的概略図である。
【図4】参照階層ブロツクデータの生成の説明に供する略線的概略図である。
【図5】第1段階の動きベクトル検出処理の説明に供する略線的概略図である。
【図6】第1段階の動きベクトルが小さいときの第2段階の動きベクトル検出処理の説明に供する略線的概略図である。
【図7】第1段階の動きベクトルが大きいときの第2段階の動きベクトル検出処理の説明に供する略線的概略図である。
【図8】第3段階の動きベクトル検出処理の説明に供する略線的概略図である。
【図9】MPEG2方式による一般的な符号化方式の説明に供する略線的概略図である。
【図10】従来の符号化装置の回路構成を示すブロツク図である。
【図11】従来の第1の基本階層画像の生成の説明に供する略線的概略図である。
【図12】従来の第1の参照階層画像の生成の説明に供する略線的概略図である。
【図13】従来の第1段階の動きベクトル検出処理の説明に供する略線的概略図である。
【図14】従来の第2段階の動きベクトル検出処理の説明に供する略線的概略図である。
【符号の説明】
20……符号化装置、21……動きベクトル検出器、26……階層画像生成器、28……階層画像メモリ、29……第2のアドレス生成器、31……階層画像予測誤差演算器、32……選定処理器、D1……第1のマクロブロツクデータ、D4……第2のマクロブロツクデータ、D10……参照階層ブロツクデータ、D11……基本階層ブロツクデータ、D12……第1の参照ブロツクデータ、D13……第1の動きベクトルデータ、D14……第2の参照ブロツクデータ、D15……第2の動きベクトルデータ、D16……第3の参照ブロツクデータ、D17……動きベクトルデータ、MVb1……第1段階の動きベクトル、MVb21、MVb22……第2段階の動きベクトル、MVb3……第3段階の動きベクトル、MG2……マクロブロツク画像、FG2……原画像、FG3……参照原画像、SG2……第2の参照階層画像、SG3……第3の参照階層画像、SG4……第4の参照階層画像、KG2……第2の基本階層画像、KG3……第3の基本階層画像、KG4……第4の基本階層画像、BK2……第2のブロツク階層画像、BK3……第3のブロツク階層画像、BK4……第4のブロツク階層画像、BG2……第2のブロツク画像、TR3……第3の探索領域、TR4……第4の探索領域、TR5……第5の探索領域、TR6……第6の探索領域。[0001]
【table of contents】
The present invention will be described in the following order.
[0002]
TECHNICAL FIELD OF THE INVENTION
Conventional technology (Fig. 9)
Problems to be Solved by the Invention (FIGS. 10 to 14)
Means for Solving the Problems (FIGS. 1 to 8)
BEST MODE FOR CARRYING OUT THE INVENTION
(1) Configuration of encoding apparatus according to this embodiment (FIGS. 1 and 2)
(2) Motion vector detection processing (FIGS. 3 to 8)
(3) Operation and effect of the present embodiment (FIGS. 1 to 8)
(4) Other embodiments (FIGS. 1 to 8)
The invention's effect
[0003]
BACKGROUND OF THE INVENTION
The present invention relates to a motion vector detection method and apparatus, and is suitably applied to, for example, a motion vector detection method and apparatus for detecting a motion vector when encoding video data.
[0004]
[Prior art]
In recent years, there is a system called MPEG2 (Moving Picture Experts Group Phase 2) as a video data encoding system.
[0005]
This MPEG2 system is standardized by organizations such as ITU-T (International Telecommunication Union-Telecommunication Standardization Secter), encodes video data, multiplexes it, and stores and transmits it. It is standardized for the purpose.
[0006]
Actually, in this MPEG2 system, it is defined that video data is encoded in units called macroblocks for each frame, and I (Intra) picture is used as an encoding system for high-efficiency encoding of the video data. A method called B (Bidirectionally predictive) using a bi-directional motion-compensated inter-frame prediction in the forward and backward directions, and a P (Predictive) picture using a motion-compensated inter-frame prediction in the forward direction. The method is specified.
[0007]
Here, as shown in FIG. 9, for example, data in units of frames that are temporally continuous in video data (hereinafter referred to as frame data) T n ~ T n + 2 If the I picture, B picture or P picture is assigned to the frame data T, the frame data T to which the I picture is assigned. n Is encoded using only that data, and frame data T to which a B picture is assigned. n + 1 Is the frame data T to which the past I-picture is assigned in time. n And frame data T to which the future P picture is assigned in time n + 2 And frame data T encoded by bidirectional motion compensation inter-frame prediction in units of macroblocks MB and further assigned P-picture. n + 2 Is the frame data T to which the past I-picture is assigned in time. n Is used for encoding in the macroblock unit MB by forward motion compensation interframe prediction.
[0008]
[Problems to be solved by the invention]
FIG. 10 shows an
[0009]
The
[0010]
Here, first, in the
[0011]
In this state, the
[0012]
The
[0013]
The
[0014]
The variable-
[0015]
Incidentally, the encoded data D3 output from the variable-
[0016]
The
[0017]
The inverse
[0018]
At this time, the
[0019]
Thereafter, in the
[0020]
In this state, the
[0021]
When the second macroblock data D4 is given from the
[0022]
When the motion vector data D6 is given from the
[0023]
As a result, the
[0024]
Thereafter, the
[0025]
At this time, the motion vector data D6 is supplied from the
[0026]
Also, the quantized data D9 output from the
[0027]
At this time, the motion compensation data D7 corresponding to the
[0028]
In the
[0029]
In this way, in the
[0030]
In the
[0031]
Actually, as shown in FIGS. 11A and 11B, the
[0032]
[Expression 1]
[0033]
As shown by the following, in each block, each position (q, r) in every two pixels in the horizontal direction and every two lines in the vertical direction has a corresponding block consisting of two pixels in the horizontal direction and two lines in the vertical direction. By calculating the average value of the luminance data d of the four pixels, a hierarchical image composed of the low frequency components of the top field tf and the bottom field bf (hereinafter referred to as the first basic hierarchical image) KG1 is generated.
[0034]
Further, as shown in FIGS. 12A and 12B, the
[0035]
[Expression 2]
[0036]
As shown by the following, in each block, each position (q, r) in every two pixels in the horizontal direction and every two lines in the vertical direction has a corresponding block consisting of two pixels in the horizontal direction and two lines in the vertical direction. By calculating the average value of the luminance data D of the four pixels, a hierarchical image composed of the low frequency components of the top field tf and the bottom field bf (hereinafter referred to as a first reference hierarchical image) SG1 is generated.
[0037]
Incidentally, in the expressions (1) and (2) described above, the low frequency component of the top field tf can be obtained by substituting “0” into the variable fi, and “1” is substituted into the variable fi. Thus, the low frequency component of the bottom field bf can be obtained.
[0038]
Next, as shown in FIG. 13, in the motion vector detection process in the first stage, the
[0039]
At this time, the
[0040]
[Equation 3]
[0041]
As shown in the above, the sum of absolute values of the differences between the low frequency components of the top field tf of the first basic hierarchical image KG1 and the low frequency components corresponding to the first block hierarchical image BK1 is expressed as Calculate to calculate.
[0042]
Also, the prediction error bdb1 for the bottom field bf of the first basic layer image KG1. (q, r) The following formula
[0043]
[Expression 4]
[0044]
As shown, the sum of the absolute values of the differences between the low frequency components of the bottom field bf of the first basic layer image KG1 and the low frequency components respectively associated with the first block layer image BK1 is Calculate to calculate.
[0045]
And the prediction error bdf1 between the frames of the first basic layer image KG1 and the first block layer image BK1. (q, r) The following formula
[0046]
[Equation 5]
[0047]
As shown, the corresponding prediction error bdt1 (q, r) And prediction error bdb1 (q, r) Are obtained by sequentially adding each other, and the obtained prediction error bdf1 (q, r) The first block hierarchical image BK1 when the value of is the smallest is detected. Accordingly, the
[0048]
Subsequently, as shown in FIG. 14, the
[0049]
The
[0050]
[Formula 6]
[0051]
As shown, the luminance data d of each pixel position (i, j) of the top field tf of the macro block image MG1 and the pixel position (m, n) corresponding to each of the first block image BG1. The sum of absolute values of differences from the luminance data D is calculated.
[0052]
Also, the prediction error BDb for the bottom field bf of the macroblock image MG1. (m, n) The following formula
[0053]
[Expression 7]
[0054]
As shown, the luminance data d of each pixel position (i, j) of the bottom field bf of the macro block image MG1 and the pixel position (m, n) corresponding to each of the first block image BG1. The sum of absolute values of differences from the luminance data D is calculated.
[0055]
Then, a prediction error BDf between frames of the macroblock image MG and the first block image BG1. (m, n) The following formula
[0056]
[Equation 8]
[0057]
And the corresponding prediction error BDt (m, n) And prediction error BDb (m, n) Are obtained by sequentially adding each other, and the obtained prediction error BDf (m, n) The first block image BG1 when the value of is the smallest is detected. As a result, the
[0058]
Thus, the
[0059]
[Equation 9]
[0060]
As shown, the first-stage motion vector MVa1 is doubled so as to compensate for the missing pixels when generating the hierarchical image, and the motion vector detected in the second-stage motion vector detection process (hereinafter referred to as the motion vector detection process) This is referred to as the second-stage motion vector). By adding MVa2, the final motion vector MVa3 between the two frames of the macroblock image MG1 is detected.
[0061]
By the way, in general, in order to detect a motion vector, although the amount of calculation of a prediction error becomes enormous, in the motion vector detection process as described above, a motion vector is detected hierarchically. The size of one search region TR1 can be made relatively small, and the size of the second search region TR2 can also be made relatively small by determining it based on the first-stage motion vector MVa1, As a result, there is an advantage that the calculation amount of the prediction error can be greatly reduced.
[0062]
However, in this motion vector detection process, if the amount of motion of the macro block image MG1 that is the target of motion vector detection is relatively large, the block layer image BK1 that most closely matches the first basic layer image KG1 generated from the macro block image MG1 is obtained. There is a problem that it is located beyond the first search region TR1 and it is difficult to accurately detect the first-stage motion vector MVa1. That is, the
[0063]
The present invention has been made in view of the above points, and an object of the present invention is to propose a motion vector detection method and apparatus capable of accurately detecting a motion vector regardless of the amount of motion of a unit block.
[0064]
[Means for Solving the Problems]
In order to solve this problem, in the present invention, A motion vector from a first frame in a desired layer of a predetermined unit block divided from video data to be encoded to a second frame separated by at least two frames is detected. In the motion vector detection method, from the first frame , Second frame Than Between adjacent frames, up to the third frame one frame before In the lower hierarchy than the desired hierarchy A first step for sequentially detecting motion vectors between fields, and detection in the first step Between fields Depending on the magnitude of the motion vector In the desired hierarchy A second step for determining the size and position of the search region for detecting a motion vector between the third and second frames; Concerned Second step In Decision Search area On the basis of the In the desired hierarchy A third step for detecting a motion vector between the third and second frames; Combining the motion vectors between all the fields below the desired layer detected in the first step and the motion vectors between the third and second frames in the desired layer detected in the third step; A fourth step of detecting a motion vector from the first frame to the second frame in the desired hierarchy of the unit block; It was made to provide.
[0065]
As a result, it was detected in the first step. Between fields below the desired level Depending on the magnitude of the motion vector In the desired hierarchy Since the size and position of the search area for detecting the motion vector between the third and second frames are determined, even when the amount of motion of the unit block is relatively large In the desired hierarchy Between the third and second frames of The motion vector can be accurately detected.
[0066]
In the present invention, A motion vector is detected from a first frame in a desired layer of a predetermined unit block divided from video data to be encoded to a second frame separated by at least two frames. Motion vector detection apparatus In the first frame , Second frame Than Until the third frame one frame before, Between adjacent frames, Below the desired level In layers Sequentially detect motion vectors between fields First motion vector detecting means And the relevant First motion vector detecting means In Than detection Is The Between fields The size and position of the search area for detecting the motion vector between the third and second frames in the desired hierarchy are determined according to the size of the motion vector. Decision means And the relevant By decision means Decision Search area On the basis of the In the desired hierarchy Detect a motion vector between the third and second frames Second motion vector detection means When The motion vectors between all the fields below the desired layer detected by the first motion vector detection means and the third and second frames in the desired layer detected by the second motion vector detection means Third motion vector detecting means for combining the motion vectors and detecting motion vectors from the first frame to the second frame in a desired hierarchy of the unit block; It was made to provide.
[0067]
As a result, By the first motion vector detection means Detected Between fields below the desired level When the amount of motion of the unit block is relatively large because the size and position of the search area for detecting the motion vector between the third and second frames in the desired hierarchy are determined according to the size of the motion vector But In the desired hierarchy Between the third and second frames of The motion vector can be accurately detected.
[0072]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
[0073]
(1) Configuration of encoding apparatus according to this embodiment
In FIG. 1, in which the same reference numerals are assigned to the parts corresponding to those in FIG. 9, reference numeral 20 denotes the overall coding apparatus according to the present embodiment, and the
[0074]
In this encoding device 20, the
[0075]
In this case, as shown in FIG. 2, the motion
[0076]
In this state, the first macroblock data D1 sequentially output from the
[0077]
At this time, the
[0078]
Further, the
[0079]
At this time, the
[0080]
Further, in the
[0081]
The
[0082]
The
[0083]
Thus, the
[0084]
In this
[0085]
In this state, the
[0086]
The
[0087]
At this time, the
[0088]
As a result, the
[0089]
As a result, the
[0090]
Then, the hierarchical image prediction error calculator 31 extracts only the low frequency component from the basic hierarchical block data D11 provided from the
[0091]
In this way, when the
[0092]
At this time, the
[0093]
In this case, the
[0094]
On the other hand, when the motion vector detection processing content corresponding to the case where the first stage motion vector is relatively large is designated based on the selection result information, the
[0095]
Then, the
[0096]
As a result, the
[0097]
The hierarchical image prediction error calculator 31 performs adjacent block based on the basic hierarchical block data D11 and the second reference block data D14 given from the
[0098]
Subsequently, when the second-stage motion vector is detected, the
[0099]
At this time, the
[0100]
As a result, the
[0101]
The original image
[0102]
Then, the original image
[0103]
Thus, in the
[0104]
Then, in this
[0105]
(2) Motion vector detection processing
In practice, in this
[0106]
That is, as shown in FIGS. 3A to 3C, the
[0107]
[Expression 10]
[0108]
As shown, the luminance of 16 pixels in the corresponding block consisting of 4 pixels in the horizontal direction and 4 lines in the vertical direction at every 4 pixels in the horizontal direction and every 4 lines in the vertical direction for each field. The average value of the data d is obtained, and the high frequency component af ′ of the top field tf and the bottom field bf on the macro block image MG2. (q, r) The following formula
[0109]
[Expression 11]
[0110]
As shown, the luminance of 16 pixels in the corresponding block consisting of 4 pixels in the horizontal direction and 4 lines in the vertical direction at every 4 pixels in the horizontal direction and every 4 lines in the vertical direction for each field. By calculating the average value of the data d and calculating the average value of the absolute value of the difference between the average value and the luminance data d of each pixel in the block, four pixels in the horizontal direction and the vertical direction In addition, basic layer block data D11 including four lines of low frequency components (FIG. 3B) and four pixels in the horizontal direction and four lines of high frequency components in the vertical direction (FIG. 3C) is generated.
[0111]
Incidentally, the
[0112]
That is, as shown in FIGS. 4A to 4C, the
[0113]
[Expression 12]
[0114]
As shown, the luminance of 16 pixels in the corresponding block consisting of 4 pixels in the horizontal direction and 4 lines in the vertical direction at each position of every 2 pixels in the horizontal direction and every 2 lines in the vertical direction for each field. The average value of the data D is calculated, and the high frequency component Af ′ of the top field tf and the bottom field bf on the macro block image MG3. (q, r) The following formula
[0115]
[Formula 13]
[0116]
As shown, the luminance of 16 pixels in the corresponding block consisting of 4 pixels in the horizontal direction and 4 lines in the vertical direction at each position of every 2 pixels in the horizontal direction and every 2 lines in the vertical direction for each field. By calculating the average value of the data D and calculating the average value of the absolute value of the difference between the average value and the luminance data D of each pixel in the block, 8 pixels in the horizontal direction and the vertical direction In addition, reference hierarchical block data D10 is generated, which includes 8 lines of low frequency components (FIG. 4B), 8 pixels in the horizontal direction, and 8 lines of high frequency components in the vertical direction (FIG. 4C).
[0117]
Incidentally, in the above-described equations (10) and (12), the low frequency component of the top field tf can be obtained by substituting “0” into the variable fi, and “1” is substituted into the variable fi. Thus, the low frequency component of the bottom field bf can be obtained. Further, in the above equations (11) and (13), the high frequency component of the top field tf can be obtained by substituting “0” into the variable fi, and “1” is substituted into the variable fi. Thus, the high frequency component of the bottom field bf can be obtained.
[0118]
When the
[0119]
As a result, the hierarchical image prediction error calculator 31 sequentially blots the third search region TR3 while searching for the second basic hierarchical image KG2, so that the second basic hierarchical image KG2 and Prediction error bdt2 (with respect to the top field tf) with the second block layer image BK2 corresponding to this in the third search region TR3 (q, r) The following formula
[0120]
[Expression 14]
[0121]
As shown, the sum of the absolute values of the differences between the low frequency components in the second basic layer image KG2 and the corresponding low frequency components in the block hierarchical image BK2 is calculated. Ask.
[0122]
As a result, the hierarchical image prediction error calculator 31 sequentially calculates the prediction error bdt2 obtained. (q, r) The second block layer image BK2 at the time when the second block layer image BK2 is minimized, and the adjacent in the lowest layer is detected based on the motion amount between the detected second block layer image BK2 and the second basic layer image KG2. The first-stage motion vector MVb1 between corresponding fields between frames to be detected is detected relatively coarsely.
[0123]
Next, when the
[0124]
In other words, the
[0125]
[Expression 15]
[0126]
As a result of comparing the absolute value of the x component mx of the first-stage motion vector MVb1 with the comparison value Sxt, the absolute value of the x-component mx of the first-stage motion vector MVb1 is the comparison value. When it is smaller than Sxt, it is determined that the amount of motion of the macroblock image MG2 is relatively small, and in accordance with the determination result, a fourth search area (area is narrow) and a first search area having different preset sizes. A narrow fourth search region is selected from among the five search regions (the region is wide), and motion vector detection processing content corresponding to the determination result is selected.
[0127]
On the other hand, the
[0128]
[Expression 16]
[0129]
As a result of comparing the absolute value of the x component mx of the first-stage motion vector MVb1 with the comparison value Sxt, the absolute value of the x-component mx of the first-stage motion vector MVb1 is the comparison value. When it is equal to or greater than Sxt, it is determined that the amount of motion of the macroblock image MG2 is relatively large, and a fifth search region having a wide region is selected from the fourth search region and the fifth search region according to the determination result. At the same time, the motion vector detection processing content corresponding to the determination result is selected.
[0130]
Here, when the
[0131]
Accordingly, the hierarchical image prediction error calculator 31 is an image based on the basic hierarchical block data D11 in the fourth search region TR4 in accordance with the selected processing content (hereinafter referred to as a third basic hierarchical image). The third basic layer image KG3 and the third block layer image BK3 corresponding to the third basic layer image KG3 and corresponding to this in the fourth search region TR4 by sequentially blocking while searching with the KG3. Prediction error bdt3 for the top field tf of the third basic layer image KG3 (q, r) The following formula
[0132]
[Expression 17]
[0133]
As expressed by the sum of absolute values of differences between the low-frequency components of the top field tf of the third basic hierarchical image KG3 and the low-frequency components corresponding to the third block hierarchical image BK3, respectively, Obtained by adding the sum of the absolute values of the differences between the high frequency components of the top field tf of the third basic hierarchical image KG3 and the corresponding high frequency components of the third block hierarchical image BK3. .
[0134]
Also, the prediction error bdb3 for the bottom field bf of the third basic layer image KG3. (q, r) The following formula
[0135]
[Formula 18]
[0136]
As expressed by the sum of absolute values of differences between the low-frequency components of the bottom field bf of the third basic layer image KG3 and the low-frequency components corresponding to the third block layer image BK3, respectively. The sum of the absolute values of the differences between the high frequency components of the bottom field bf of the third basic hierarchical image KG3 and the high frequency components respectively corresponding to the third block hierarchical image BK3 is added. Ask.
[0137]
The inter-frame prediction error bdf3 between the first basic layer image KG3 and the third block layer image BK3 corresponding thereto. (q, r) The following formula
[0138]
[Equation 19]
[0139]
The corresponding prediction error bdt3 (q, r) And prediction error bdb3 (q, r) Are obtained by sequentially adding each other, and the obtained prediction error bdf3 (q, r) The third block hierarchy image BK3 when is minimum is detected.
[0140]
As a result, the hierarchical image prediction error calculator 31 determines whether the adjacent frame in the upper layer is lower than the lowermost layer based on the amount of motion between the detected third block hierarchical image BK3 and the third basic hierarchical image KG3. The second-stage motion vector MVb21 (between the second and third reference layer images SG2 and SG3) is detected with improved detection accuracy than the first-stage motion vector MVb1.
[0141]
On the other hand, when the
[0142]
In this case, the hierarchical image prediction error calculator 31 is an image (hereinafter referred to as a fourth image) composed of only the low frequency component of the third basic hierarchical image KG3 in the fifth search region TR5 according to the selected processing content. (Referred to as “basic layer image”) BK4 sequentially performs blockching while searching.
[0143]
Accordingly, the hierarchical image prediction error calculator 31 at this time uses the fourth basic hierarchical image KG4 and the fourth basic hierarchical image BK4 associated with the fourth basic hierarchical image KG4 in the fifth basic search region TR5. Prediction error bdt4 for the top field tf of the hierarchical image KG4 (q, r) The following formula
[0144]
[Expression 20]
[0145]
As shown, the sum of absolute values of the differences between the low frequency components of the top field tf of the fourth basic layer image KG4 and the low frequency components corresponding to the fourth block layer image BK4 is calculated. To ask.
[0146]
Also, the prediction error bdb4 for the bottom field bf of the fourth basic layer image KG4. (q, r) The following formula
[0147]
[Expression 21]
[0148]
As shown, the sum of the absolute values of the differences between the low frequency components of the bottom field bf of the fourth basic layer image KG4 and the low frequency components corresponding to the fourth block layer image BK4 is calculated. To ask.
[0149]
The inter-frame prediction error bdf4 between the fourth basic layer image KG4 and the fourth block layer image BK4. (q, r) The following formula
[0150]
[Expression 22]
[0151]
The corresponding prediction error bdt4 (q, r) And prediction error bdb4 (q, r) Are obtained by sequentially adding each other, and the obtained prediction error bdf4 (q, r) The fourth block layer image BK4 at the time when the value of the fourth block layer image BK4 becomes the minimum is detected, and the upper layer than the lowermost layer is detected based on the amount of motion between the detected fourth block layer image BK4 and the fourth basic layer image KG4. The second stage motion vector MVb22 between adjacent frames is detected with improved detection accuracy than the first stage motion vector MVb1, and with detection accuracy slightly lower than the second stage motion vector MVb21.
[0152]
In this way, when the magnitude of the first-stage motion vector MVb1 is smaller than the comparison value Sxt, the third basic hierarchy consisting of the low-frequency component and the high-frequency component in the fourth search region TR4 having a relatively narrow region. The second stage motion vector MVb21 is detected with relatively high precision by sequentially blotting while searching with the image KG3, and when the magnitude of the first stage motion vector MVb1 is greater than or equal to the comparison value Sxt. The second-stage motion vector MVb22 is determined to some extent by sequentially blocking the fifth search area TR5 having a relatively wide area while searching with the fourth basic layer image KG4 including only low-frequency components. Detect with reduced accuracy.
[0153]
In this way, the
[0154]
Subsequently, when the
[0155]
As a result, the original image
[0156]
When the original image
[0157]
[Expression 23]
[0158]
In order to compensate for missing pixels when generating a hierarchical image, the addition result of the first-stage motion vector MVb1 and the second-stage motion vector MVb21 is doubled, The motion vector MVB1 between the final two frames of the macroblock image MG2 is detected by adding the stage motion vectors MVb3.
[0159]
Further, since the motion amount of the macroblock image MG2 is relatively large, in the case where the second-stage motion vector MVb22 is detected in the second-stage motion vector detection process described above,
[0160]
[Expression 24]
[0161]
In order to compensate for missing pixels when generating a hierarchical image, the addition result of the first-stage motion vector MVb1 and the second-stage motion vector MVb22 is doubled, The motion vector MVB2 between the final two frames of the macroblock image MG2 is detected by adding the stage motion vectors MVb3.
[0162]
Thus, in this
[0163]
In this embodiment, when the
[0164]
In the case of this embodiment, the
[0165]
(3) Operation and effect of the present embodiment
In the above configuration, the
[0166]
Next, in the second motion vector detection processing mode, the
[0167]
If the magnitude of the first-stage motion vector MVb1 is smaller than the comparison value Sxt, it is determined that the amount of motion of the macroblock image MG2 is relatively small, and the fourth search is performed on the third reference layer image SG3. By determining the position of the region TR4 and sequentially blocking in the fourth search region TR4 while searching with the third basic layer image KG3, the second region between adjacent frames in the upper layer than the lowermost layer is searched. A stage motion vector MVb21 is detected.
[0168]
On the other hand, if the magnitude of the first-stage motion vector MVb1 is equal to or greater than the comparison value Sxt, it is determined that the amount of motion of the macroblock image MG2 is relatively large, and the fifth reference layer image SG4 has a fifth value. The position of the search region TR5 is determined, and by sequentially blocking while searching the fourth search region TR42 with the fourth basic layer image KG4, the adjacent regions in the upper layer than the lowermost layer are adjacent to each other. A second-stage motion vector MVb22 is detected.
[0169]
Subsequently, the
[0170]
Then, the
[0171]
Therefore, in the
[0172]
The
[0173]
Furthermore, since the
[0174]
Further, the
[0175]
According to the above configuration, the first step between the fields between two adjacent frames is performed by performing blockching while searching the second basic layer image KG2 in the third search region TR3 in the lowest layer. The motion vector MVb1 is detected, and either the fourth search region TR4 or the fifth search region TR5 and the processing content in the upper layer than the lowermost layer according to the magnitude of the detected first-stage motion vector MVb1 Is selected to detect either the second-stage motion vector MVb21 or MVb22, so that the second-stage motion vector MVb22 can be accurately detected even when the amount of motion of the macroblock image MG2 is relatively large. As a result, the final motion vector MVB2 can also be accurately detected, and the macroblock is thus detected. It is possible to realize a motion vector detecting method and a motion vector detecting device capable of accurately detecting a motion vector regardless of the movement amount of the image MG2.
[0176]
(4) Other embodiments
In the above-described embodiment, the case where the
[0177]
In this case, the
[0178]
In the above-described embodiment, the case where the motion vector between the two frames of the second macroblock data D4 to be detected by the motion vector is detected using the hierarchical image has been described. Not limited to this, a motion vector between at least two frames of the second macroblock data D4 subject to motion vector detection may be detected at the source image level.
[0179]
That is, in this case, until one frame before the frame to be obtained, motion vectors between adjacent frames or fields between the frames are sequentially detected, and the frame to be obtained according to the magnitude of the detected motion vector and the one frame thereof The size of the search area between the previous frames is determined to detect the motion vector between the obtained frame and the previous frame, and the motion vectors obtained in this way are combined so that the final at least A motion vector between two frames may be detected. In this case as well, a motion vector can be accurately detected according to the amount of motion of the second macroblock data D4 to be detected as a motion vector.
[0180]
Furthermore, in the above-described embodiment, the case where the second basic layer image KG2 including the low-frequency component of the top field tf is used in the first motion vector detection processing mode has been described. Not limited to the second basic layer image KG2, the first step is performed by using an image including only the low-frequency component of the bottom field bf, only the high-frequency component of the top field tf, or only the high-frequency component of the bottom field bf. The motion vector MVb1 may be detected.
[0181]
Furthermore, in the above-described embodiment, a case is described in which the second-stage motion vector MVb22 is detected using only the low-frequency component when the magnitude of the first-stage motion vector MVb1 is equal to or greater than the comparison value Sxt. However, the present invention is not limited to this, and the second-stage motion vector may be detected using only the high-frequency component at this time.
[0182]
Further, in the above-described embodiment, the case where the present invention is applied to the encoding apparatus 20 to which MPEG2 is applied has been described. However, the present invention is not limited to this, and the code to which the MPEG1 frame structure is applied is described. The present invention may be applied to a digitizing device or a motion vector detecting device.
[0183]
Further, in the above-described embodiment, when the
[0184]
Furthermore, in the above-described embodiment, the case where the number of pixels in the horizontal direction of the first-stage motion vector MVb1 is set to the predetermined comparison value Sxt has been described. However, the present invention is not limited to this, and the first stage Various other values such as the number of pixels in the vertical direction of the motion vector MVb1 and a predetermined threshold value can be used as comparison values.
[0185]
Furthermore, in the above-described embodiment, one of the fourth search region TR4 and the fifth search region TR5 set in advance based on the comparison result between the magnitude of the first-stage motion vector MVb1 and the comparison value Sxt. However, the present invention is not limited to this, and the size of the search area may be determined according to the magnitude of the first-stage motion vector MVb1.
[0186]
Furthermore, in the above-described embodiment, motion vectors between fields are sequentially detected from the first frame to the third frame one frame before the second frame, and between adjacent frames below the desired layer. The case where the hierarchical image prediction error calculator 31 and the
[0187]
Furthermore, in the above-described embodiment, the motion vector between the third and second frames in the desired hierarchy is detected according to the magnitude of the motion vector MVb1 detected by the first motion vector detection means. Although the case where the
[0188]
Furthermore, in the above-described embodiment, the hierarchical image prediction error calculator 31 is applied as the second motion vector detection unit that detects the motion vector between the third and second frames based on the determination by the determination unit. However, the present invention is not limited to this, and various other second motion vector detection can be performed as long as the motion vector between the third and second frames can be detected based on the determination by the determination means. You may make it apply a means.
[0189]
【The invention's effect】
As described above, according to the present invention, In a motion vector detection method for detecting a motion vector from a first frame in a desired layer of a predetermined unit block divided from video data to be encoded to a second frame separated by at least two frames, From the first frame , One frame before the second frame Between adjacent frames, up to the third frame In the lower hierarchy than the desired hierarchy The motion vectors between the fields are detected sequentially, and the detected Between fields Depending on the magnitude of the motion vector In the desired hierarchy Determining the size and position of the search region for detecting a motion vector between the third and second frames; Concerned Decision Search area On the basis of the In the desired hierarchy Detect motion vector between 3rd and 2nd frame Then, the motion vectors between all the fields in the lower layer than the desired layer detected in this way and the motion vectors between the third and second frames in the desired layer are synthesized to obtain the first in the desired layer of the unit block. Motion vector from the first frame to the second frame is detected By doing so, even if the amount of movement of the unit block is relatively large In the desired hierarchy A motion vector detection method that can accurately detect the motion vector between the third and second frames and can accurately detect the motion vector regardless of the amount of motion of the unit block can be realized.
[0190]
Also In a motion vector detection device for detecting a motion vector from a first frame in a desired layer of a predetermined unit block divided from video data to be encoded to a second frame separated by at least two frames, From the first frame , One frame before the second frame Until the third frame, Between adjacent frames, Below the desired level In layers Sequentially detect motion vectors between fields First motion vector detecting means for The concerned By the first motion vector detection means detection Is The Between fields Determine the size and position of the search area for detecting the motion vector between the third and second frames in the desired hierarchy according to the size of the motion vector With the decision means to , By the decision means Decision Search area On the basis of the In the desired hierarchy Detect a motion vector between the third and second frames The second motion vector detection means, the motion vectors between all the fields below the desired hierarchy detected by the first motion vector detection means, and the first motion vector in the desired hierarchy detected by the second motion vector detection means. And a third motion vector detecting means for detecting a motion vector from the first frame to the second frame in a desired hierarchy of the unit block by combining the motion vectors between the third frame and the second frame. By doing so, even when the amount of movement of the unit block is relatively large In the desired hierarchy Motion vector detection that can accurately detect the motion vector between the third and second frames, and thus can accurately detect the motion vector regardless of the motion amount of the unit block. apparatus Can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of a circuit configuration of an encoding apparatus according to the present invention.
FIG. 2 is a block diagram showing an embodiment of a circuit configuration of a motion vector detector according to the present invention.
FIG. 3 is a schematic diagram for explaining the generation of base layer block data.
FIG. 4 is a schematic diagram for explaining the generation of reference hierarchy block data.
FIG. 5 is a schematic diagram schematically illustrating a first-stage motion vector detection process.
FIG. 6 is a schematic diagram schematically illustrating a second-stage motion vector detection process when the first-stage motion vector is small.
FIG. 7 is a schematic diagram schematically illustrating a second-stage motion vector detection process when the first-stage motion vector is large.
FIG. 8 is a schematic diagram schematically illustrating a third-stage motion vector detection process.
FIG. 9 is a schematic diagram schematically illustrating a general encoding method based on the MPEG2 method.
FIG. 10 is a block diagram showing a circuit configuration of a conventional encoding device.
FIG. 11 is a schematic diagram schematically illustrating a conventional generation of a first basic layer image.
FIG. 12 is a schematic diagram schematically illustrating a conventional first reference layer image generation.
FIG. 13 is a schematic diagram schematically illustrating a conventional first-stage motion vector detection process.
FIG. 14 is a schematic diagram schematically illustrating a second-stage motion vector detection process in the related art.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 20 ... Encoding device, 21 ... Motion vector detector, 26 ... Hierarchical image generator, 28 ... Hierarchical image memory, 29 ... Second address generator, 31 ... Hierarchical image prediction error calculator, 32... Selection processor, D1... First macroblock data, D4... Second macroblock data, D10... Reference layer block data, D11... Base layer block data, D12. Block data, D13 ... first motion vector data, D14 ... second reference block data, D15 ... second motion vector data, D16 ... third reference block data, D17 ... motion vector data, MVb1... First stage motion vector, MVb21, MVb22... Second stage motion vector, MVb3... Third stage motion vector, MG2. Lock image, FG2 ... original image, FG3 ... reference original image, SG2 ... second reference layer image, SG3 ... third reference layer image, SG4 ... fourth reference layer image, KG2 ... first 2 basic layer images, KG3 ... third basic layer image, KG4 ... fourth basic layer image, BK2 ... second block layer image, BK3 ... third block layer image, BK4 ... first 4 block hierarchy images, BG2... Second block image, TR3... Third search region, TR4... Fourth search region, TR5... Fifth search region, TR6. .
Claims (8)
上記第1のフレームから、上記第2のフレームより1フレーム前の第3のフレームまでの間、隣接するフレーム間で、上記所望階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1のステツプと、
上記第1のステツプにおいて検出した上記フイールド間の動きベクトルの大きさに応じて上記所望階層における上記第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する第2のステツプと、
上記第2のステツプにおいて決定した上記探索領域に基づいて上記所望階層における上記第3及び第2のフレーム間の上記動きベクトルを検出する第3のステツプと、
上記第1のステツプにおいて検出した上記所望階層よりも下層における全ての上記フイールド間の動きベクトルと、上記第3のステツプにおいて検出した上記所望階層における上記第3及び第2のフレーム間の動きベクトルとを合成して、上記単位ブロツクの上記所望階層における上記第1のフレームから上記第2のフレームまでの上記動きベクトルを検出する第4のステツプと
を具えることを特徴とする動きベクトル検出方法。In a motion vector detection method for detecting a motion vector from a first frame in a desired layer of a predetermined unit block divided from video data to be encoded to a second frame separated by at least two frames,
From the first frame until the third frame of one frame before the second frame, between adjacent frames, the sequentially detects motion vectors between fields for definitive under layer than the desired hierarchy 1 step,
The size and position of the search area for detecting the motion vector between the third and second frames in the desired hierarchy are determined according to the magnitude of the motion vector between the fields detected in the first step. A second step to
A third step for detecting the motion vector between the third and second frame in the desired hierarchy based on the search area determined in the second step,
All the motion vectors between the fields below the desired layer detected in the first step, and the motion vectors between the third and second frames in the desired layer detected in the third step; And a fourth step of detecting the motion vector from the first frame to the second frame in the desired hierarchy of the unit block .
上記第1のステツプにおいて検出した上記フイールド間の動きベクトルの大きさを所定の比較値と比較して得られる比較結果に基づいて上記探索領域の大きさ及び位置を決定する
ことを特徴とする請求項1に記載の動きベクトル検出方法。In the second step,
The size and position of the search area are determined based on a comparison result obtained by comparing the magnitude of a motion vector between the fields detected in the first step with a predetermined comparison value. Item 2. The motion vector detection method according to Item 1 .
上記単位ブロツクに双方向の動き補償フレーム間予測を用いる符号化方式が割り当てられている場合、上記第1のステツプにおいて検出した前方向の上記フイールド間の動きベクトル又は後方向の上記フイールド間の動きベクトルのいずれか一方の大きさに応じて上記探索領域の大きさ及び位置を決定する
ことを特徴とする請求項1に記載の動きベクトル検出方法。In the second step,
When a coding method using bi-directional motion compensated inter-frame prediction is assigned to the unit block, the motion vector between the forward fields detected in the first step or the motion between the backward fields. The motion vector detection method according to claim 1 , wherein the size and position of the search area are determined according to the size of one of the vectors.
上記第1のステツプにおいて検出した上記フイールド間の動きベクトルの大きさが上記比較値よりも大きい場合には、上記探索領域を当該第1のステツプにおいて検出した上記フイールド間の動きベクトルの大きさが上記比較値よりも小さい場合の上記探索領域よりも広くし、かつ上記所望階層における上記第3及び第2のフレーム間の動きベクトルを検出するために用いる階層画像のデータ量を、上記第1のステツプにおいて検出した上記フイールド間の動きベクトルの大きさが上記比較値よりも小さい場合に上記所望階層における上記第3及び第2のフレーム間の動きベクトルを検出するために用いる階層画像のデータ量よりも低減させる
ことを特徴とする請求項2に記載の動きベクトル検出方法。In the second step,
Above for the magnitude of the motion vector between the detected above field is larger than the comparison value for the first step, the search area size of the motion vector between the field detected in the first step the data amount of the layer image used to detect a motion vector between said comparison values wider than said search area smaller than, and the desired hierarchy definitive the third and second frame, the first data size of the motion vector between the fields detected in step of the hierarchical image used for detecting a motion vector between definitive the third and second frame in the desired hierarchy is smaller than the comparison value The motion vector detection method according to claim 2 , wherein the motion vector detection method is less than the amount.
上記第1のフレームから、上記第2のフレームより1フレーム前の第3のフレームまでの間、隣接するフレーム間で、上記所望階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1の動きベクトル検出手段と、
上記第1の動きベクトル検出手段により検出された上記フイールド間の動きベクトルの大きさに応じて上記所望階層における上記第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する決定手段と、
上記決定手段により上記決定された上記探索領域に基づいて上記所望階層における上記第3及び第2のフレーム間の動きベクトルを検出する第2の動きベクトル検出手段と、
上記第1の動きベクトル検出手段により検出された上記所望階層よりも下層における全ての上記フイールド間の動きベクトルと、上記第2の動きベクトル検出手段により検出された上記所望階層における上記第3及び第2のフレーム間の動きベクトルとを合成して、上記単位ブロツクの上記所望階層における上記第1のフレームから上記第2のフレームまでの上記動きベクトルを検出する第3の動きベクトル検出手段と
を具えることを特徴とする動きベクトル検出装置。In a motion vector detection device for detecting a motion vector from a first frame in a desired layer of a predetermined unit block divided from video data to be encoded to a second frame separated by at least two frames,
From the first frame until the third frame of one frame before the second frame, between adjacent frames, the sequentially detects motion vectors between fields for definitive under layer than the desired hierarchy 1 motion vector detection means;
The between the first motion vector is by Ri detected in the detection means the above field of motion vectors magnitude depending on the search area to detect the motion vector between the third and second frame in the desired hierarchy Determining means for determining size and position;
A second motion vector detecting means for detecting a motion-out vector between the third and second frame in the desired hierarchy based on the search area determined above by the determining means,
All the motion vectors between the fields below the desired hierarchy detected by the first motion vector detection means, and the third and third motion vectors in the desired hierarchy detected by the second motion vector detection means. And a third motion vector detecting means for detecting the motion vector from the first frame to the second frame in the desired hierarchy of the unit block by combining the motion vectors between the two frames. A motion vector detecting device characterized by that.
上記第1の動きベクトル検出手段により検出された上記フイールド間の動きベクトルの大きさを所定の比較値と比較して得られる比較結果に基づいて上記探索領域の大きさ及び位置を決定する
ことを特徴とする請求項5に記載の動きベクトル検出装置。The determination means is
Determining the size and position of the search area on the basis of a comparison result obtained is compared with a predetermined comparison value the magnitude of the motion vectors between the detected the field Ri by the above-described first motion vector detection means The motion vector detection apparatus according to claim 5 , wherein:
上記単位ブロツクに双方向の動き補償フレーム間予測を用いる符号化方式が割り当てられている場合、上記第1の動きベクトル検出手段により検出された前方向の上記フイールド間の動きベクトル又は後方向の上記フイールド間の動きベクトルのいずれか一方の大きさに応じて上記探索領域の大きさ及び位置を決定する
ことを特徴とする請求項5に記載の動きベクトル検出装置。The determination means is
If the encoded system using prediction between bidirectional motion compensated frame to the unit block is assigned, the motion vector or backward between the first motion vector detection means by Ri detected forward in the field The motion vector detection device according to claim 5 , wherein the size and position of the search region are determined according to the size of any one of the motion vectors between the fields .
上記第1の動きベクトル検出手段により検出された上記フイールド間の動きベクトルの大きさが上記比較値よりも大きい場合には、上記探索領域を当該第1の動きベクトル検出手段により検出された上記フイールド間の動きベクトルの大きさが上記比較値よりも小さい場合の上記探索領域よりも広くし、かつ上記所望階層における上記第3及び第2のフレーム間の動きベクトルを検出するために用いる階層画像のデータ量を、上記第1の動きベクトル検出手段により検出された上記フイールド間の動きベクトルの大きさが上記比較値よりも小さい場合に上記所望階層における上記第3及び第2のフレーム間の動きベクトルを検出するために用いる階層画像のデータ量よりも低減させる
ことを特徴とする請求項6に記載の動きベクトル検出装置。The determination means is
Above for the magnitude of the motion vector between the first motion vector detected Ri by the detection means the above Symbol field is greater than the comparison value, more detect the search area on the first motion vector detecting means because magnitude of the motion vector between said field is wider than the search area of smaller than the comparison value, and detects a motion vector between said desired hierarchy definitive said third and second frame the data amount of the layer image to be used for, the first motion vector detecting means the desired hierarchy definitive said third and if more the magnitude of the motion vectors between the detected said field is less than the comparison value to the The motion vector detection device according to claim 6 , wherein the motion vector detection device reduces the data amount of the hierarchical image used for detecting a motion vector between two frames. .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP08907298A JP3944806B2 (en) | 1998-04-01 | 1998-04-01 | Motion vector detection method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP08907298A JP3944806B2 (en) | 1998-04-01 | 1998-04-01 | Motion vector detection method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH11289538A JPH11289538A (en) | 1999-10-19 |
JP3944806B2 true JP3944806B2 (en) | 2007-07-18 |
Family
ID=13960658
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP08907298A Expired - Fee Related JP3944806B2 (en) | 1998-04-01 | 1998-04-01 | Motion vector detection method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3944806B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4752631B2 (en) | 2006-06-08 | 2011-08-17 | 株式会社日立製作所 | Image coding apparatus and image coding method |
-
1998
- 1998-04-01 JP JP08907298A patent/JP3944806B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH11289538A (en) | 1999-10-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4261630B2 (en) | Image encoding apparatus and method, and computer-readable recording medium on which an image encoding program is recorded | |
JP4662636B2 (en) | Improvement of motion estimation and block matching pattern | |
JP4373702B2 (en) | Moving picture encoding apparatus, moving picture decoding apparatus, moving picture encoding method, moving picture decoding method, moving picture encoding program, and moving picture decoding program | |
JP2007067731A (en) | Coding method | |
JPH05115061A (en) | Motion vector coder and decoder | |
JPH07193823A (en) | Image data block conversion system | |
JP2010504010A (en) | Data compression method in video sequence | |
JPH07193822A (en) | Motion prediction processor and device therefor | |
WO2006006489A1 (en) | Motion detection device | |
JPH1175195A (en) | Motion vector detection method and device | |
JPH10322705A (en) | Motion detection and motion compensation prediction circuit | |
JP2755851B2 (en) | Moving picture coding apparatus and moving picture coding method | |
JP3944806B2 (en) | Motion vector detection method and apparatus | |
JPH0678298A (en) | Motion compensation prediction device for interlace animation | |
JP3944804B2 (en) | Motion vector detection method and apparatus | |
JP3674535B2 (en) | Video coding method and apparatus | |
JPH0937269A (en) | Image compressor | |
KR20050012706A (en) | Image decoding device and image decoding method | |
JP3944805B2 (en) | Motion vector detection method and apparatus | |
JP3677165B2 (en) | Moving picture coding apparatus and moving picture coding method | |
JPH10327416A (en) | Dynamic image coder | |
JP2004236023A (en) | Motion vector detecting apparatus and method therefor | |
CN1694538A (en) | Method for searching active image series motion vector | |
JP2883585B2 (en) | Moving picture coding apparatus and moving picture coding method | |
JPH11298902A (en) | Image coder and image coding method therefor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041215 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20061226 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070105 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070219 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070316 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070329 |
|
LAPS | Cancellation because of no payment of annual fees |