JP3944804B2 - Motion vector detection method and apparatus - Google Patents
Motion vector detection method and apparatus Download PDFInfo
- Publication number
- JP3944804B2 JP3944804B2 JP08907098A JP8907098A JP3944804B2 JP 3944804 B2 JP3944804 B2 JP 3944804B2 JP 08907098 A JP08907098 A JP 08907098A JP 8907098 A JP8907098 A JP 8907098A JP 3944804 B2 JP3944804 B2 JP 3944804B2
- Authority
- JP
- Japan
- Prior art keywords
- motion vector
- frame
- image
- data
- layer
- 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
Description
【0001】
【目次】
以下の順序で本発明を説明する。
【0002】
発明の属する技術分野
従来の技術(図8)
発明が解決しようとする課題(図9〜図14)
課題を解決するための手段(図1〜図7)
発明の実施の形態
(1)本実施の形態による符号化装置の構成(図1及び図2)
(2)動きベクトルの検出処理(図3〜図7)
(3)本実施の形態の動作及び効果(図1〜図7)
(4)他の実施の形態(図1〜図7)
発明の効果
【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】
ここで図8に示すように、例えば映像データの時間的に連続するフレーム単位のデータ(以下、これをフレームデータと呼ぶ)Tn 〜Tn+2 にIピクチヤ、Bピクチヤ、Pピクチヤを割り当てたとすると、当該Iピクチヤを割り当てたフレームデータTn はそのデータのみを用いて符号化し、Bピクチヤを割り当てたフレームデータTn+1 は時間的に過去のIピクチヤを割り当てたフレームデータTn と時間的に未来のPピクチヤを割り当てたフレームデータTn+2 とを用いてマクロブロツクMB単位で双方向の動き補償フレーム間予測により符号化し、さらにPピクチヤを割り当てたフレームデータTn+2 は時間的に過去のIピクチヤを割り当てたフレームデータTn を用いてマクロブロツク単位MBで前方向の動き補償フレーム間予測により符号化するようになされている。
【0008】
【発明が解決しようとする課題】
ところで図9は、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を介して例えば所定の記録媒体に符号化データD3を記録する記録装置(図示せず)に送出する。
【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に対して時間的に例えば過去の所定のフレームデータを参照データ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では、図10に示すように、動きベクトル検出対象の第2のマクロブロツクデータD4の動きベクトルを検出する場合、この第2のマクロブロツクデータD4に基づく画像(以下、これをマクロブロツク画像と呼ぶ)MG1の位置する1フレーム分の画像(以下、これを原画像と呼ぶ)FG1よりも時間的に過去又は未来(この場合は時間的に2フレーム過去)の参照データD5(第1又は第2のフレームデータ)に基づく画像(以下、これを参照原画像と呼ぶ)FG2上でマクロブロツク画像MG1に対する所定の第1の探索領域TR1を決定する。
【0031】
そして動きベクトル検出器14では、第1の探索領域TR1内をマクロブロツク画像MG1でサーチしながら順次ブロツクマツチングすることにより当該第1の探索領域TR1内において、マクロブロツク画像MG1と最も一致する第1のブロツク画像BG1を検出し、当該検出して得られた第1のブロツク画像BG1とマクロブロツク画像MG1との間の動き量に基づいて動きベクトルMVを検出する。
【0032】
実際上動きベクトル検出器14では、マクロブロツク画像MG1と、これに第1の探索領域TR1内で対応させた第1のブロツク画像BG1とにおいて、当該マクロブロツク画像MG1のトツプフイールドtfに対する予測誤差BDt(m,n) を次式
【0033】
【数1】
【0034】
で表されるように、マクロブロツク画像MG1のトツプフイールドtfの各画素位置(i,j)の輝度レベルdと、第1のブロツク画像BG1のそれぞれ対応させた画素位置(m,n)の輝度レベルDとの差分の絶対値の総和を算出するようにして求める。
【0035】
またこのマクロブロツク画像MG1のボトムフイールドbfに対する予測誤差BDb(m,n) を次式
【0036】
【数2】
【0037】
で表されるように、このマクロブロツク画像MG1のボトムフイールドbfの各画素位置(i,j)の輝度レベルdと、第1のブロツク画像BG1のそれぞれ対応させた画素位置(m,n)の輝度レベルDとの差分の絶対値の総和を算出するようにして求める。
【0038】
そしてマクロブロツク画像MG1と第1のブロツク画像BG1とのフレーム間における予測誤差BDf(m,n) を次式
【0039】
【数3】
【0040】
で表されるように、対応する予測誤差BDt(m,n) 及び予測誤差BDb(m,n) 同士を順次加算して求め、この予測誤差BDf(m,n) の値が最も最小となるときの第1のブロツク画像BG1をマクロブロツク画像MG1と最も一致するものとして検出することにより、これら第1のブロツク画像BG1とマクロブロツク画像MG1との間の動き量に基づいて動きベクトルMVを検出する。
【0041】
ところでマクロブロツク画像MG1の例えば2フレーム間の動きベクトルを検出する場合には、当該マクロブロツク画像MG1がその2フレーム間に亘つて動くことを考慮して第1の探索領域TR1をマクロブロツク画像MG1の1フレーム間の動きベクトルを検出するときの探索領域に比べて広くする(例えば4倍程度に広くする)必要がある。
【0042】
このためこの場合には、予測誤差を算出するための演算量が増大することから、動きベクトル検出器14の回路規模を比較的増大させる必要がある。
【0043】
従つて、最近では、動きベクトルの検出精度をある程度犠牲にしたり、探索領域の大きさを小さくする等して演算量を削減することにより、動きベクトル検出器14の回路規模を減少させるための種々の方法が考えられている。
【0044】
ここで演算量を削減し得る動きベクトル検出方法の1つとして、マクロブロツク画像MG1及び参照原画像FG2の第1の探索領域TR1からそれぞれ画素を減らすように縮小してなる(例えば1/4 程度に縮小)階層画像を生成し、当該生成した階層画像と、マクロブロツク画像MG1及び参照原画像FG2とを階層的に用いて動きベクトルを検出する方法(以下、これを階層サーチ法と呼ぶ)がある。
【0045】
実際上この階層サーチ法では、図11(A)及び(B)に示すように、マクロブロツク画像MG1上でトツプフイールドtf及びボトムフイールドbfの第1の特徴量でなる低域成分lf(q,r) を次式
【0046】
【数4】
【0047】
で表されるように、フイールド毎に水平方向に2画素おき及び垂直方向に2ラインおきの各位置(q,r)でそれぞれ水平方向に2画素及び垂直方向に2ラインでなる対応するブロツク内の4画素の輝度レベルdの平均値を算出するようにして求めることにより、トツプフイールドtf及びボトムフイールドbfの低域成分でなる階層画像(以下、これを第1の基本階層画像と呼ぶ)KG1を生成する。
【0048】
またこの階層サーチ法では、図12(A)及び(B)に示すように、参照原画像FG2の第1の探索領域TR1内のトツプフイールドtf及びボトムフイールドbfの低域成分Lf(q,r) を次式
【0049】
【数5】
【0050】
で表されるように、フイールド毎に水平方向に2画素おき及び垂直方向に2ラインおきの各位置(q,r)でそれぞれ水平方向に2画素及び垂直方向に2ラインでなる対応するブロツク内の4画素の輝度レベルDの平均値を算出するようにして求めることにより、トツプフイールドtf及びボトムフイールドbfの低域成分でなる階層画像(以下、これを第1の参照階層画像と呼ぶ)SG1を生成する。
【0051】
因みに上述した(4)式及び(5)式では、変数fiに「0」を代入することによりトツプフイールドtfの低域成分を求めることができると共に、当該変数fiに「1」を代入することによりボトムフイールドbfの低域成分を求めることができる。
【0052】
次いで階層サーチ法では、図13に示すように、まず動きベクトル検出処理の第1段階において、第1の参照階層画像SG1内を第1の基本階層画像KG1によつてサーチしながら順次ブロツクマツチングすることにより当該第1の基本階層画像KG1のトツプフイールドtfに対する予測誤差bdt(q,r) を次式
【0053】
【数6】
【0054】
で表されるように、この第1の基本階層画像KG1のトツプフイールドtfの各低域成分と、第1の参照階層画像SG1内の(第1の基本階層画像KG1と対応させた)第1のブロツク階層画像BK1のそれぞれ対応させた低域成分との差分の絶対値の総和を算出するようにして求める。
【0055】
またこの第1の基本階層画像KG1のボトムフイールドbfに対する予測誤差bdb(q,r) を次式
【0056】
【数7】
【0057】
で表されるように、この第1の基本階層画像KG1のボトムフイールドbfの各低域成分と、第1のブロツク階層画像BK1のそれぞれ対応させた低域成分との差分の絶対値の総和を算出するようにして求める。
【0058】
そして第1の基本階層画像KG1と第1のブロツク階層画像BK1とのフレーム間の予測誤差bdf(q,r) を次式
【0059】
【数8】
【0060】
で表されるように、対応する予測誤差bdt(q,r) 及び予測誤差bdb(q,r) 同士を順次加算して求め、当該求めた予測誤差bdf(q,r) の値が最も最小となるときの第1のブロツク階層画像BK1を第1の基本階層画像KG1と最も一致するものとして検出することにより、当該検出した第1のブロツク階層画像BK1と第1の基本階層画像KG1との間の動き量に基づいて最下層における2フレーム間の動きベクトルを第1段階の動きベクトルMVa1として検出する。
【0061】
続いてこの階層サーチ法では、図14に示すように、動きベクトル検出処理の第2段階において、参照原画像FG2上で第2の探索領域TR2を決定し、当該第2の探索領域TR2内をマクロブロツク画像MG1でサーチしながら順次ブロツクマツチングすることにより、上述した(1)式〜(3)式を用いて予測誤差を求めるようにして、かくして原画像レベルで第1段階の動きベクトルMVa1を補正するような第2段階の動きベクトルMVa2を検出する。
【0062】
そしてこの階層サーチ法では、次式
【0063】
【数9】
【0064】
で表されるように、階層画像を生成する際に欠落した画素数を補うように第1段階の動きベクトルMVa1を2倍にし、これに第2段階の動きベクトルMVa2を加算することによりマクロブロツク画像MG1の最終的な2フレーム間の動きベクトルMVa3を検出する。
【0065】
ところでこのような階層サーチ法では、マクロブロツク画像MG1の2フレーム間の動きベクトルを検出した場合、低域成分のみを用いて第1段階の動きベクトルMVa1を検出するようにして検出精度を犠牲にしたり、探索領域を大幅に小さくする分、予測誤差の演算量を削減できる利点がある。
【0066】
しかしながらこの階層サーチ法では、動きベクトルの検出と共にリアルタイムで参照原画像FG2から第1の参照階層画像SG1を生成するための新たな演算が必要となり、このため動きベクトルの検出時の全体の演算量を大幅には削減し難く、この結果として回路規模の低減も実現し難い問題があつた。
【0067】
本発明は以上の点を考慮してなされたもので、回路規模を大幅に低減し得る動きベクトル検出方法及び装置を提案しようとするものである。
【0068】
【課題を解決するための手段】
かかる課題を解決するため本発明においては、符号化対象の映像データから分割された所定の単位ブロツクの第1の階層における第1のフレームから少なくとも2フレーム以上離れた第2のフレームまでの動きベクトルを検出する動きベクトル検出方法において、第1のフレームから、第2のフレームより1フレーム前の第3のフレームまでの間、複数画素毎の平均値を示す第1の特徴量に基づき、又は各画素毎と、対応する第1の特徴量とのばらつき度合いを示す第2の特徴量に基づき、隣接するフレーム間で第1の階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1のステツプと、当該第1のステツプにおいて検出したフイールド間の動きベクトルに基づいて、第1の階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する第2のステツプと、各第1の特徴量及び各第2の特徴量並びに当該探索領域に基づき、第1の階層における第3及び第2のフレーム間の動きベクトルを検出する第3のステツプと、第1のステツプにおいて検出した第1の階層よりも下層における全てのフイールド間の動きベクトルと、第3のステツプにおいて検出した第1の階層における第3及び第2のフレーム間の動きベクトルとを合成して、単位ブロツクの第1の階層における第1のフレームから第2のフレームまでの動きベクトルを検出する第4のステツプとを設けるようにした。
【0069】
この結果、第1の階層よりも下層では隣接するフレーム間でフイールド間の動きベクトルを検出することにより予測誤差の演算量を大幅に低減させることができ、第1の階層における第3及び第2のフレーム間の動きベクトルの検出時には探索領域の大きさを従来に比べて大幅に小さくして予測誤差の演算量を大幅に低減させることができる。
【0070】
また本発明においては、符号化対象の映像データから分割された所定の単位ブロツクの第1の階層における第1のフレームから少なくとも2フレーム以上離れた第2のフレームまでの動きベクトルを検出する動きベクトル検出装置において、第1のフレームから、第2のフレームより1フレーム前の第3のフレームまでの間、複数画素毎の平均値を示す第1の特徴量に基づき、又は各画素毎と、対応する第1の特徴量とのばらつき度合いを示す第2の特徴量に基づき、隣接するフレーム間で第1の階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1の動きベクトル検出手段と、当該第1の動きベクトル検出手段により検出されたフイールド間の動きベクトルに基づいて、第1の階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する決定手段と、各第1の特徴量及び各第2の特徴量並びに当該探索領域に基づき、第1の階層における第3及び第2のフレーム間の動きベクトルを検出する第2の動きベクトル検出手段と、第1の動きベクトル検出手段により検出された第1の階層よりも下層における全てのフイールド間の動きベクトルと、第2の動きベクトル検出手段により検出された第1の階層における第3及び第2のフレーム間の動きベクトルとを合成して、単位ブロツクの第1の階層における第1のフレームから第2のフレームまでの動きベクトルを検出する第3の動きベクトル検出手段とを設けるようにした。
【0071】
この結果、第1の階層よりも下層では隣接するフレーム間でフイールド間の動きベクトルを検出することにより予測誤差の演算量を大幅に低減させることができ、第1の階層における第3及び第2のフレーム間の動きベクトルの検出時には探索領域の大きさを従来に比べて大幅に小さくして予測誤差の演算量を大幅に低減させることができる。
【0072】
【発明の実施の形態】
以下図面について、本発明の一実施の形態を詳述する。
【0073】
(1)本実施の形態による符号化装置の構成
図9との対応部分に同一符号を付して示す図1において、20は全体として本実施の形態による符号化装置を示し、動きベクトル検出器21の構成を除いて従来の符号化装置1と同様に構成されている。
【0074】
この符号化装置20において動きベクトル検出器21は、入力処理部2から与えられる第1及び第2のマクロブロツクデータD1及びD4を参照データとして用いて階層的な動きベクトル検出処理を順次実行し、これにより動きベクトル検出対象の第2のマクロブロツクデータD4の2フレーム間の動きベクトルを検出するようになされている。
【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に基づいてそのトツプフイールド及びボトムフイールドの低域成分及び第2の特徴量でなる高域成分でなる参照階層ブロツクデータ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に送出する。
【0091】
次いで動きベクトル検出器21では、第1段階の動きベクトルを検出すると、第1の動きベクトル検出処理モードから第2の動きベクトル検出処理モードに移り、第2段階の動きベクトル検出処理を開始する。
【0092】
このとき第2のアドレス生成器29は、階層画像予測誤差演算器31から与えられる第1の動きベクトルデータD13に基づいて、第2の参照階層画像よりもさらに時間的に例えば1フレーム過去の1フレーム分の各参照階層ブロツクデータD10に基づく画像(以下、これを第3の参照階層画像と呼ぶ)上で第4の探索領域の大きさ及び位置を決定し、当該第4の探索領域内に位置する参照階層ブロツクデータD10を選定する。そしてこの選定した参照ブロツクデータD10に対するアドレス情報を生成し、これを階層画像メモリ28に送出する。
【0093】
これにより階層画像メモリ28は、第2のアドレス生成器29から与えられるアドレス情報に基づいて指定されたアドレス位置に書き込まれている参照階層ブロツクデータD10を第2の参照ブロツクデータD14として読み出して階層画像予測誤差演算器31に送出する。
【0094】
そして階層画像予測誤差演算器31は、階層画像生成器26から与えられた基本階層ブロツクデータD11と、階層画像メモリ28から与えられた第2の参照ブロツクデータD14とに基づいてブロツクマツチングすることにより最下層よりも上層における隣接するフレーム間の動きベクトルを第2段階の動きベクトルとして検出し、これを第2の動きベクトルデータD15として第1のアドレス生成器27及び原画像予測誤差演算器30に送出する。
【0095】
続いて動きベクトル検出器21では、第2段階の動きベクトルを検出すると、第2の動きベクトル検出処理モードから第3の動きベクトル検出処理モードに移つて第3段階の動きベクトル検出処理を開始する。
【0096】
このとき第1のアドレス生成器27は、階層画像予測誤差演算器31から与えられる第2の動きベクトルデータD15に基づいて、第2の参照階層画像に対応する(動きベクトル検出対象の第2のマクロブロツクデータD4よりも時間的に2フレーム分離れている)参照原画像上で第5の探索領域の大きさ及び位置を決定し、当該第5の探索領域内に位置する第1又は第2のマクロブロツクデータD1又はD4を選定する。そしてこの選定した第1又は第2のマクロブロツクデータD1又はD4に対するアドレス情報を生成し、これを原画像メモリ25に送出する。
【0097】
これにより原画像メモリ25は、第1のアドレス生成器27から与えられるアドレス情報に基づいて指定されたアドレス位置に書き込まれている第1又は第2のマクロブロツクデータD1又はD4を第3の参照ブロツクデータD16として読み出して原画像予測誤差演算器30に送出する。
【0098】
原画像予測誤差演算器30は、原画像メモリ25から与えられた第2のマクロブロツクデータD4と、第3の参照ブロツクデータD16とに基づいてブロツクマツチングすることにより原画像レベルで第2段階の動きベクトルを補正するような動きベクトルを第3段階の動きベクトルとして検出する。
【0099】
そして原画像予測誤差演算器30は、階層画像予測誤差演算器31から与えられた第1段階及び第2段階の動きベクトルと、第3段階の動きベクトルとに基づいて第2のマクロブロツクデータD4の2フレーム間の最終的な動きベクトルを検出し、これを動きベクトルデータD17として動き補償器16及び可変長符号化器8に送出する。
【0100】
かくしてこの動きベクトル検出器21においては、第3段階の動きベクトル検出処理により最終的な動きベクトルを検出すると、再び第2の符号化処理モードに移つて第3及び第4の切換え器23及び24のスイツチをそれぞれ第1の接点Aに接続し、この状態において入力処理部2から1つの第2のマクロブロツクデータD4が与えられる。
【0101】
そしてこの動きベクトル検出器21では、この後入力処理部2から1つの第2のマクロブロツクデータD4が与えられる毎に上述したように第2の符号化処理モードから第3の動きベクトル検出処理モードまでの動きベクトル検出処理を順次繰り返し、かくして第2のマクロブロツクデータD4の動きベクトルを検出する。
【0102】
(2)動きベクトル検出処理
実際上この動きベクトル検出器21では、第1の動きベクトル検出処理モード時、階層画像生成器26によつて動きベクトル検出対象の第2のマクロブロツクデータD4のトツプフイールド及びボトムフイールドのデータからそれぞれ低域成分と高域成分とを取り出すようにして基本階層ブロツクデータD11を生成する。
【0103】
すなわち階層画像生成器26は、図3(A)〜(C)に示すように、動きベクトル検出対象の第2のマクロブロツクデータD4に基づくマクロブロツク画像MG2上でトツプフイールドtf及びボトムフイールドbfの低域成分lf’(q,r) を次式
【0104】
【数10】
【0105】
で表されるように、フイールド毎に水平方向に4画素おき及び垂直方向に4ラインおきの各位置でそれぞれ水平方向に4画素及び垂直方向に4ラインでなる対応するブロツク内の16画素の輝度レベルdの平均値を算出するようにして求めると共に、当該トツプフイールドtf及びボトムフイールドbfの高域成分af’(q,r) を次式
【0106】
【数11】
【0107】
で表されるように、フイールド毎に水平方向に4画素おき及び垂直方向に4ラインおきの各位置でそれぞれ水平方向に4画素及び垂直方向に4ラインでなる対応するブロツク内の16画素の輝度レベルdの平均値(すなわち低域成分)を算出し、この平均値と当該ブロツク内の各画素の輝度レベルdとの差分の絶対値の平均値(各輝度レベルdの低域成分に対するばらつきの度合い)を算出するようにして求めることにより、水平方向に4画素及び垂直方向に4ラインの低域成分(図3(B))と、水平方向に4画素及び垂直方向に4ラインの高域成分(図3(C))とからなる基本階層ブロツクデータD11を生成する。
【0108】
因みにこの階層画像生成器26では、第1及び第2の符号化処理モード時、参照用の第1又は第2のマクロブロツクデータD1又はD4のトツプフイールド及びボトムフイールドのデータからもそれぞれ低域成分と高域成分とを取り出すようにして参照階層ブロツクデータD10を生成する。
【0109】
すなわち階層画像生成器26は、図4(A)〜(C)に示すように、参照用の第1又は第2のマクロブロツクデータD1又はD4に基づくマクロブロツク画像MG3上でトツプフイールドtf及びボトムフイールドbfの低域成分Lf’(q,r) を次式
【0110】
【数12】
【0111】
で表されるように、フイールド毎に水平方向に2画素おき及び垂直方向に2ラインおきの各位置でそれぞれ水平方向に4画素及び垂直方向に4ラインでなる対応するブロツク内の16画素の輝度レベルDの平均値を算出するようにして求めると共に、トツプフイールドtf及びボトムフイールドbfの高域成分Af’(q,r) を次式
【0112】
【数13】
【0113】
で表されるように、フイールド毎に水平方向に2画素おき及び垂直方向に2ラインおきの各位置でそれぞれ水平方向に4画素及び垂直方向に4ラインでなる対応するブロツク内の16画素の輝度レベルDの平均値を算出し、その平均値と当該ブロツク内の各画素の輝度レベルDとの差分の絶対値の平均値を算出するようにして求めることにより、水平方向に8画素及び垂直方向に8ラインの低域成分(図4(B))と、水平方向に8画素及び垂直方向に8ラインの高域成分(図4(C))とからなる参照階層ブロツクデータD10を生成する。
【0114】
因みに上述した(10)式及び(12)式では、変数fiに「0」を代入することにより、トツプフイールドtfの低域成分を求めることができると共に、当該変数fiに「1」を代入することによりボトムフイールドbfの低域成分を求めることができる。また上述した(11)式及び(13)式では、変数fiに「0」を代入することにより、トツプフイールドtfの高域成分を求めることができると共に、当該変数fiに「1」を代入することによりボトムフイールドbfの高域成分を求めることができる。
【0115】
そしてこの動きベクトル検出器21では、図5に示すように、第1の動きベクトル検出処理モード時、第2のアドレス生成器29により位置情報及び予測方向情報に基づいて、第2の参照階層画像SG2上で、基本階層ブロツクデータD11のトツプフイールドtfの低域成分に基づく画像(以下、これを第2の基本階層画像と呼ぶ)KG2の所定の1つの角w1と対応する位置を中心にした例えば水平方向Sxに±8画素及び垂直方向Syに±8ラインでなる第3の探索領域TR3を決定する。
【0116】
これにより階層画像予測誤差演算器31は、第3の探索領域TR3内を第2の基本階層画像KG2によつてサーチしながら順次ブロツクマツチングすることにより、当該第2の基本階層画像KG2とこれに第3の探索領域TR3内で対応させた第2のブロツク階層画像BK2とにおいて、この第2の基本階層画像KG2のトツプフイールドtfに対する予測誤差bdt’(q,r) を次式
【0117】
【数14】
【0118】
で表されるように、第2の基本階層画像KG2内のトツプフイールドtfの低域成分と、第2のブロツク階層画像BK2内のそれぞれ対応させた低域成分との差分の絶対値の総和を算出するようにして求める。
【0119】
そして順次求めた予測誤差bdt’(q,r) が最小となるときの第2のブロツク階層画像BK2を検出し、当該検出した第2のブロツク階層画像BK2と第2の基本階層画像KG2との間の動き量に基づいて、隣接するフレーム間におけるフイールド間の第1段階の動きベクトルMVb1を比較的粗く検出する。
【0120】
次いで動きベクトル検出器21において第2の動きベクトル検出処理モード時、図6に示すように、第2のアドレス生成器29は、低域成分及び高域成分でなる第3の参照階層画像SG3上で、第1段階の動きベクトルMVb1の終点w2と対応する位置を中心にした例えば水平方向Sxに±8画素及び垂直方向Syに±8ラインでなる第4の探索領域TR4を決定する。
【0121】
これにより階層画像予測誤差演算器31は、第4の探索領域TR4内を基本階層ブロツクデータD11に基づく画像(以下、これを第3の基本階層画像と呼ぶ)KG3によつてサーチしながら順次ブロツクマツチングすることにより、当該第3の基本階層画像KG3とこれに第4の探索領域TR4内で対応させた第3のブロツク階層画像BK3とにおいて、この第3の基本階層画像KG3のトツプフイールドtfに対する予測誤差bdt”(q,r) を次式
【0122】
【数15】
【0123】
で表されるように、第3の基本階層画像KG3のトツプフイールドtfの各低域成分と、第3のブロツク階層画像BK3のそれぞれ対応させた低域成分との差分の絶対値の総和と、当該第3の基本階層画像KG3のトツプフイールドtfの各高域成分と、第3のブロツク階層画像BK3のそれぞれ対応させた低域成分との差分の絶対値の総和とを加算するようにして求める。
【0124】
また階層画像予測誤差演算器31は、第3の基本階層画像KG3のボトムフイールドbfに対する予測誤差bdb”(q,r) を次式
【0125】
【数16】
【0126】
で表されるように、第3の基本階層画像KG3のボトムフイールドbfの各低域成分と、第3のブロツク階層画像BK3のそれぞれ対応させた低域成分との差分の絶対値の総和と、当該第3の基本階層画像KG3のボトムフイールドbfの各高域成分と、第3のブロツク階層画像BK3のそれぞれ対応させた低域成分との差分の絶対値の総和とを加算するようにして求める。
【0127】
そして第3の基本階層画像KG3と第3のブロツク階層画像BK3とのフレーム間の予測誤差bdf”(q,r) を次式
【0128】
【数17】
【0129】
で表されるように、対応する予測誤差bdt”(q,r) 及び予測誤差bdb”(q,r) 同士を順次加算して求め、順次求めた予測誤差bdf”(q,r) のうち、その値が最小となるときの第3のブロツク階層画像BK3と第3の基本階層画像KG3との間の動き量に基づいて、最下層よりも上層における隣接するフレーム間の(第2及び第3の参照階層画像SG3間で第1段階の動きベクトルMVb1につながる)第2段階の動きベクトルMVb2を第1段階の動きベクトルMVb1よりも検出精度を上げて検出する。
【0130】
続いてこの動きベクトル検出器21において第3の動きベクトル検出処理モード時、図7に示すように、第1のアドレス生成器27は、マクロブロツク画像MG2に対応する原画像FG3よりも時間的に例えば2フレーム過去の参照原画像FG4上で、第2段階の動きベクトルMVb2の終点w3と対応する位置を中心にして、参照階層ブロツクデータD10を生成する際に欠落した画素を補うように例えば水平方向に±1画素及び垂直方向に±1ラインでなる第5の探索領域TR5を決定する。
【0131】
これにより原画像予測誤差演算器30は、第5の探索領域TR5内をマクロブロツク画像MG2によつてサーチしながら順次ブロツクマツチングすることにより、上述した(1)式〜(3)式を用いて当該マクロブロツク画像MG2とこれに第5の探索領域TR5内で対応させた第2のブロツク画像BG2とのフレーム間の予測誤差を求め、順次求めた予測誤差のうち、その値が最も小さいときの第2のブロツク画像BG2とマクロブロツク画像MG2との間の動き量に基づいて原画像レベルで第2段階の動きベクトルMVb2を補正するような第3段階の動きベクトルMVb3を検出する。
【0132】
そして原画像予測誤差演算器30は、次式
【0133】
【数18】
【0134】
で表されるように、階層画像を生成する際に欠落した画素を補うように第1段階の動きベクトルMVb1と第2段階の動きベクトルMVb2との加算結果を2倍にし、これに第3段階の動きベクトルMVb3を加算することによりマクロブロツク画像MG2の最終的な2フレーム間の動きベクトルMVBを検出する。
【0135】
なおこの実施の形態の場合、動きベクトル検出器21では、Bピクチヤが割り当てられた第2のマクロブロツクデータD4を参照用として用いる際に、第1段階の動きベクトル検出処理でのみ用いることから、このBピクチヤが割り当てられた第2のマクロブロツクデータD4からは低域成分でなる参照階層ブロツクデータのみを生成し、これを階層画像メモリ18に格納することにより、この階層画像メモリ28の記憶容量を低減化し得るようになされている。
【0136】
(3)本実施の形態の動作及び効果
以上の構成において、この符号化装置20の動きベクトル検出器21では、第1の動きベクトル検出処理モード時に第2の参照階層画像SG2上で第3の探索領域TR3の大きさ及び位置を決定し、当該第3の探索領域TR3内を第2の基本階層画像KG2によつてサーチしながら順次ブロツクマツチングすることにより最下層において隣接するフレーム間におけるフイールド間の第1段階の動きベクトルMVb1を検出する。
【0137】
次いで動きベクトル検出器21では、第2の動きベクトル検出処理モード時に第1段階の動きベクトルMVb1に基づいて第3の参照階層画像SG3上で第4の探索領域TR4の大きさ及び位置を決定し、当該第4の探索領域TR4内を第3の基本階層画像KG3によつてサーチしながら順次ブロツクマツチングすることにより最下層よりも上層における隣接するフレーム間の第2段階の動きベクトルMVb2を検出する。
【0138】
続いて動きベクトル検出器21では、第3の動きベクトル検出処理モード時に第2段階の動きベクトルMVb2に基づいて、参照原画像FG4上で第5の探索領域TR5の大きさ及び位置を決定し、当該第5の探索領域TR5内をマクロブロツク画像MG2によつてサーチしながら順次ブロツクマツチングすることにより、原画像レベルで第2段階の動きベクトルMVb2の欠落している画素を補うような第3段階の動きベクトルMVb3を検出する。
【0139】
そして動きベクトル検出器21では、第1段階及び第2段階並びに第3段階の動きベクトルMVb1及びMVb2並びにMVb3を合成するようにして、動きベクトル検出対象の第2のマクロブロツクデータD4の最終的な2フレーム間の動きベクトルMVBを検出する。
【0140】
この場合動きベクトル検出器21では、第1の動きベクトル検出処理モード時に動きベクトル検出対象の第2のマクロブロツクデータD4の2フレーム間の最終的な動きベクトルを検出するわけではなく、第4の探索領域TR4の大きさ及び位置を決定するために用いる第1段階の動きベクトルMVb1を検出することから、第1段階の動きベクトルMVb1の検出精度を大幅に低減させることができる。
【0141】
従つてこの動きベクトル検出器21では、従来の階層サーチ法に比べて大幅にデータ量を減らした基本階層ブロツクデータD11のトツプフイールドtfの低域成分及び参照階層ブロツクデータD10の低域成分のみを用いて第1段階の動きベクトルMVb1を検出することができる。またこのとき隣り合うフレーム間においてこの第1段階の動きベクトルMVb1を検出することから、従来の階層サーチ法の第1の探索領域TR1(図10)の大きさに比べて第3の探索領域TR3の大きさを1/4 程度まで縮小させることができ、かくして従来の階層サーチ法における第1段階の動きベクトル検出処理よりも予測誤差の演算量を大幅に低減させることができる。
【0142】
さらにこの動きベクトル検出器21では、第2段階の動きベクトルMVb2を検出する場合、最終的に求める動きベクトルMVBの検出精度を上げるために、従来の階層サーチ法において第1段階の動きベクトルMVa1(図13)を検出するときに用いる第1の基本階層画像KG1及び第1の参照階層画像SG1よりもわずかにデータ量の多い第3の基本階層画像KG3及び第3の参照階層画像SG3を用いてこの第2段階の動きベクトルMVb2を比較的高精度に検出する必要がある。
【0143】
しかしながらこの第2段階の動きベクトル検出処理では、隣り合うフレーム間において当該第2段階の動きベクトルMVb2を検出することから、従来の階層サーチ法の第1の探索領域TR1(図10)の大きさに比べて第4の探索領域TR4の大きさを1/4 程度まで縮小させることができ、その分従来の階層サーチ法における第1段階の動きベクトル検出処理よりも予測誤差の演算量を大幅に低減させることができる。
【0144】
この結果としてこの動きベクトル検出器21では、上述した第1段階の動きベクトル検出処理における予測誤差の演算量と、第2段階の動きベクトル検出処理における予測誤差の演算量とを合わせてもこの合わせた演算量を従来の階層サーチ法の第1段階の動きベクトル検出処理における予測誤差の演算量よりも大幅に低減させることができる。
【0145】
さらにこの動きベクトル検出器21では、第2段階の動きベクトルMVb2を基本階層ブロツクデータD11及び参照階層ブロツクデータD10のそれぞれトツプフイールドtf及びボトムフイールドbfの低域成分及び高域成分を用いて比較的高精度に検出することから、予測誤差の演算量を格段的に低減させているにもかかわらずに、最終的な動きベクトルの検出精度の低下を極力抑えることができる。
【0146】
さらにこの動きベクトル検出器21では、参照階層ブロツクデータD10をこれが参照データとして用いられる動きベクトル検出処理に先立つて生成して階層画像メモリ28に格納しておくことから、動きベクトルの検出処理と共にリアルタイムで階層画像を生成するための演算量を、従来の階層サーチ法に比べて大幅に低減させることができる。
【0147】
すなわち動きベクトル検出器21では、動きベクトル検出処理時に基本階層ブロツクデータD11のみを生成し、参照階層ブロツクデータD10を階層画像メモリ28から読み出すだけで良く、これにより動きベクトル検出処理時の消費電力を大幅に低減させることができる。
【0148】
以上の構成によれば、低域成分でなる第2の参照階層画像SG2の第3の探索領域TR3内をトツプフイールドtfの低域成分でなる第2の基本階層画像KG2によつてサーチしながらブロツクマツチングすることにより最下層において隣接するフレーム間におけるフイールド間の第1段階の動きベクトルMVb1を比較的粗く検出し、当該検出して得られた第1段階の動きベクトルMVb1に基づいて低域成分及び高域成分でなる第3の参照階層画像SG3上で第4の探索領域TR4の大きさ及び位置を決定し、この第4の探索領域TR4内を低域成分及び高域成分でなる第3の基本階層画像KG3によつてサーチしながらブロツクマツチングすることにより最下層よりも上層における隣接するフレーム間の第2段階の動きベクトルMVb2を比較的高精度に検出するようにしたことにより、動きベクトルの検出精度の低下を極力抑えて当該動きベクトルの検出のための演算量を大幅に低減させることができ、かくして回路規模を大幅に低減させることができる動きベクトル検出方法及び動きベクトル検出装置を実現することができる。
【0149】
(4)他の実施の形態
なお上述の実施の形態においては、動きベクトル検出器21において、動きベクトル検出対象の第2のマクロブロツクデータD4の2フレーム間の動きベクトルを検出するようにした場合について述べたが、本発明はこれに限らず、動きベクトル検出対象の第2のマクロブロツクデータD4の1フレーム間の動きベクトルを検出する場合には、動きベクトル検出処理の第1段階の処理を実行せずに第2段階及び第3段階のみの処理により検出し、動きベクトル検出対象の第2のマクロブロツクデータD4の3フレーム間以上の動きベクトルを検出する場合には、動きベクトル検出処理の第1段階において求めるフレームよりも1フレーム前のフレームに到達するまでの間、最下層における隣接するフレーム間で第1段階の動きベクトルを順次検出し、求めるフレームとこれよりも1フレーム前のフレーム間に対して動きベクトル検出処理の第2段階及び第3段階をそれぞれ1回実行するようにして第2段階及び第3段階の動きベクトルを検出するようにしても良い。
【0150】
また上述の実施の形態においては、動きベクトル検出処理の第1段階において、トツプフイールドtfの低域成分でなる第2の基本階層画像KG2を用いて第1段階の動きベクトルMVb1を検出するようにした場合について述べたが、本発明はこれに限らず、ボトムフイールドbfの低域成分、トツプフイールドtfの高域成分又はボトムフイールドbfの高域成分でなる画像を用いて第1段階の動きベクトルMVb1を検出するようにしても良い。
【0151】
さらに上述の実施の形態においては、本発明をMPEG2が適用された符号化装置20に適用するようにした場合について述べたが、本発明はこれに限らず、MPEG1のフレーム構造が適用された符号化装置や動きベクトル検出装置に適用するようにしても良い。
【0152】
さらに上述の実施の形態においては、第1の特徴量として、複数の輝度レベルd毎の平均値を示す低域成分を適用するようにした場合について述べたが、本発明はこれに限らず、各画素毎の色差レベル、明度レベル、色レベル、及び赤緑青レベル等のように、この他種々の所定レベルの平均値を示す低域成分を適用するようにしても良い。
【0153】
さらに上述の実施の形態においては、第2の特徴量として、複数の輝度レベルd毎の平均値とこれら対応する各輝度レベルdとのばらつきの度合いを示す高域成分を適用するようにした場合について述べたが、本発明はこれに限らず、各画素毎の色差レベル、明度レベル、色レベル、及び赤緑青レベル等のように、この他種々の所定レベルの平均値とこれら対応する各所定レベルとのばらつきでなる高域成分を適用するようにしても良い。
【0154】
さらに上述の実施の形態においては、動きベクトル検出器21において第3の動きベクトル検出処理モードから第2の符号化処理モードに移つたときに第3及び第4の切換え器23及び24のスイツチを接点Bから接点Aに接続するようにした場合について述べたが、本発明はこれに限らず、第2の動きベクトル検出処理モードから第3の動きベクトル検出処理モードに移つたときに第3及び第4の切換え器23及び24のスイツチを接点Bから接点Aに接続するようにしても良く、これにより第3の動きベクトル検出処理モードにおける処理を実行しながら第2の符号化処理モードにおける処理を実行することができる。
【0155】
さらに上述の実施の形態においては、第1のフレームから第2のフレームの1フレーム前の第3のフレームまでの間、第1の階層よりも下層において隣接するフレーム間におけるフイールド間の動きベクトルを複数画素毎の第1の特徴量に基づいて順次検出する第1の動きベクトル検出手段として、階層画像予測誤差演算器31、階層画像生成器26を適用するようにした場合について述べたが、本発明はこれに限らず、第1のフレームから第2のフレームの1フレーム前の第3のフレームまでの間、第1の階層よりも下層において隣接するフレーム間におけるフイールド間の動きベクトルを各第1の特徴量に基づいて順次検出することができれば、この他種々の第1の動きベクトル検出手段を適用するようにしても良い。
【0156】
さらに上述の実施の形態においては、第1の動きベクトル検出手段によつて検出された動きベクトルに基づいて、第1の階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する決定手段として、第2のアドレス生成器29を適用するようにした場合について述べたが、本発明はこれに限らず、第1の動きベクトル検出手段によつて検出された各動きベクトルに基づいて、第1の階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定することができれば、この他種々の決定手段を適用するようにしても良い。
【0157】
さらに上述の実施の形態においては、決定手段の決定に基づいて第1の階層における第3及び第2のフレーム間の動きベクトルを各第1の特徴量及び当該第1の特徴量に対応する各画素毎の第2の特徴量に基づいて検出する第2の動きベクトル検出手段として、階層画像予測誤差演算器31を適用するようにした場合について述べたが、本発明はこれに限らず、決定手段の決定に基づいて第1の階層における第3及び第2のフレーム間の動きベクトルを各第1の特徴量及び各第2の特徴量に基づいて検出することができれば、この他種々の第2の動きベクトル検出手段を適用するようにしても良い。
【0158】
【発明の効果】
上述のように本発明によれば、符号化対象の映像データから分割された所定の単位ブロツクの第1の階層における第1のフレームから少なくとも2フレーム以上離れた第2のフレームまでの動きベクトルを検出する動きベクトル検出方法において、第1のフレームから、第2のフレームより1フレーム前の第3のフレームまでの間、複数画素毎の平均値を示す第1の特徴量に基づき、又は各画素毎と、対応する第1の特徴量とのばらつき度合いを示す第2の特徴量に基づき、隣接するフレーム間で第1の階層よりも下層におけるフイールド間の動きベクトルを順次検出し、当該検出したフイールド間の動きベクトルに基づいて、第1の階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定し、各第1の特徴量及び各第2の特徴量並びに当該探索領域に基づき、第1の階層における第3及び第2のフレーム間の動きベクトルを検出し、このように検出した第1の階層よりも下層における全てのフイールド間の動きベクトルと、第1の階層における第3及び第2のフレーム間の動きベクトルとを合成して、単位ブロツクの第1の階層における第1のフレームから第2のフレームまでの動きベクトルを検出するようにしたことにより、第1の階層よりも下層ではフイールド間の動きベクトルを検出することにより予測誤差の演算量を大幅に低減し得ると共に、第1の階層における第3及び第2のフレーム間の動きベクトルの検出時には探索領域の大きさを従来に比べて大幅に小さくして予測誤差の演算量を大幅に低減させることができ、かくして動きベクトル検出処理時に用いる回路の回路規模を大幅に低減し得る動きベクトル検出方法を実現することができる。
【0159】
また符号化対象の映像データから分割された所定の単位ブロツクの第1の階層における第1のフレームから少なくとも2フレーム以上離れた第2のフレームまでの動きベクトルを検出する動きベクトル検出装置において、第1のフレームから、第2のフレームより1フレーム前の第3のフレームまでの間、複数画素毎の平均値を示す第1の特徴量に基づき、又は各画素毎と、対応する第1の特徴量とのばらつき度合いを示す第2の特徴量に基づき、隣接するフレーム間で第1の階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1の動きベクトル検出手段と、当該第1の動きベクトル検出手段により検出されたフイールド間の動きベクトルに基づいて、第1の階層における第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する決定手段と、各第1の特徴量及び各第2の特徴量並びに当該探索領域に基づき、第1の階層における第3及び第2のフレーム間の動きベクトルを検出する第2の動きベクトル検出手段と、第1の動きベクトル検出手段により検出された第1の階層よりも下層における全てのフイールド間の動きベクトルと、第2の動きベクトル検出手段により検出された第1の階層における第3及び第2のフレーム間の動きベクトルとを合成して、単位ブロツクの第1の階層における第1のフレームから第2のフレームまでの動きベクトルを検出する第3の動きベクトル検出手段とを設けるようにしたことにより、第1の階層よりも下層ではフイールド間の動きベクトルを検出することにより予測誤差の演算量を大幅に低減し得ると共に、第1の階層における第3及び第2のフレーム間の動きベクトルの検出時には探索領域の大きさを従来に比べて大幅に小さくして予測誤差の演算量を大幅に低減させることができ、かくして回路規模を大幅に低減し得る動きベクトル検出装置を実現することができる。
【図面の簡単な説明】
【図1】本発明による符号化装置の回路構成の一実施の形態を示すブロツク図である。
【図2】本発明による動きベクトル検出器の回路構成の一実施の形態を示すブロツク図である。
【図3】基本階層ブロツクデータの生成の説明に供する略線的概略図である。
【図4】参照階層ブロツクデータの生成の説明に供する略線的概略図である。
【図5】第1段階の動きベクトル検出処理の説明に供する略線的概略図である。
【図6】第2段階の動きベクトル検出処理の説明に供する略線的概略図である。
【図7】第3段階の動きベクトル検出処理の説明に供する略線的概略図である。
【図8】MPEG2方式による一般的な符号化方式の説明に供する略線的概略図である。
【図9】従来の符号化装置の回路構成を示すブロツク図である。
【図10】一般的な動きベクトル検出処理の説明に供する略線的概略図である。
【図11】従来の第1の基本階層画像の生成の説明に供する略線的概略図である。
【図12】従来の第1の参照階層画像の生成の説明に供する略線的概略図である。
【図13】従来の第1段階の動きベクトル検出処理の説明に供する略線的概略図である。
【図14】従来の第2段階の動きベクトル検出処理の説明に供する略線的概略図である。
【符号の説明】
20……符号化装置、21……動きベクトル検出器、22……CPU、25……原画像メモリ、26……階層画像生成器、27……第1のアドレス生成器、28……階層画像メモリ、29……第2のアドレス生成器、30……原画像予測誤差演算器、31……階層画像予測誤差演算器、D1……第1のマクロブロツクデータ、D4……第2のマクロブロツクデータ、D10……参照階層ブロツクデータ、D11……基本階層ブロツクデータ、D12……第1の参照ブロツクデータ、D13……第1の動きベクトルデータ、D14……第2の参照ブロツクデータ、D15……第2の動きベクトルデータ、D16……第3の参照ブロツクデータ、D17……動きベクトルデータ、MVb1……第1段階の動きベクトル、MVb2……第2段階の動きベクトル、MVb3……第3段階の動きベクトル、MG2……マクロブロツク画像、FG3……原画像、FG4……参照原画像、SG2……第2の参照階層画像、SG3……第3の参照階層画像、KG2……第2の基本階層画像、KG3……第3の基本階層画像、KG4……第4の基本階層画像、BK2……第2のブロツク階層画像、BK3……第3のブロツク階層画像、BG2……第2のブロツク画像、TR3……第3の探索領域、TR4……第4の探索領域、TR5……第5の探索領域。[0001]
【table of contents】
The present invention will be described in the following order.
[0002]
TECHNICAL FIELD OF THE INVENTION
Conventional technology (Fig. 8)
Problems to be Solved by the Invention (FIGS. 9 to 14)
Means for solving the problems (FIGS. 1 to 7)
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 7)
(3) Operation and effect of the present embodiment (FIGS. 1 to 7)
(4) Other embodiments (FIGS. 1 to 7)
The invention's effect
[0003]
BACKGROUND OF THE INVENTION
The present invention relates to a motion vector detection method and apparatus, and is suitable for application to a motion vector detection method and apparatus for detecting a motion vector when encoding video data, for example.
[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. 8, for example, video data in units of frames that are temporally continuous (hereinafter referred to as frame data) T n ~ T n + 2 If I picture, B picture, and P picture are 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. 9 shows an
[0009]
The
[0010]
Here, first, in the
[0011]
In this state, the
[0012]
The discrete cosine transformer 5 performs a discrete cosine transform process on the first macroblock data D1 given through the
[0013]
The
[0014]
The
[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]
By the way, in the
[0031]
Then, the
[0032]
Actually, the
[0033]
[Expression 1]
[0034]
As shown, the luminance level d of each pixel position (i, j) of the top field tf of the macro block image MG1 and the luminance of the pixel position (m, n) corresponding to each of the first block image BG1. The sum of absolute values of differences from level D is calculated.
[0035]
Also, the prediction error BDb for the bottom field bf of the macroblock image MG1. (m, n) The following formula
[0036]
[Expression 2]
[0037]
As shown, the luminance level 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 level D is calculated.
[0038]
Then, a prediction error BDf between frames of the macro block image MG1 and the first block image BG1. (m, n) The following formula
[0039]
[Equation 3]
[0040]
And the corresponding prediction error BDt (m, n) And prediction error BDb (m, n) The prediction error BDf is obtained by sequentially adding each other. (m, n) By detecting the first block image BG1 when the value of is the smallest as the macroblock image MG1, the motion amount between the first block image BG1 and the macroblock image MG1 is detected. Based on this, a motion vector MV is detected.
[0041]
By the way, when detecting a motion vector between, for example, two frames of the macro block image MG1, the macro block image MG1 is searched for the first search region TR1 in consideration of the movement of the macro block image MG1 between the two frames. It is necessary to make it wider (for example, about 4 times wider) than the search area when detecting a motion vector between one frame.
[0042]
For this reason, in this case, since the amount of calculation for calculating the prediction error increases, it is necessary to relatively increase the circuit scale of the
[0043]
Therefore, recently, various methods for reducing the circuit scale of the
[0044]
Here, as one of the motion vector detection methods that can reduce the amount of calculation, the pixel is reduced from the first search region TR1 of the macroblock image MG1 and the reference original image FG2 so as to reduce pixels (for example, about 1/4). A method of generating a hierarchical image and detecting a motion vector using the generated hierarchical image, the macroblock image MG1 and the reference original image FG2 in a hierarchical manner (hereinafter referred to as a hierarchical search method). is there.
[0045]
Actually, in this hierarchical search method, as shown in FIGS. 11A and 11B, a low-frequency component lf comprising the first feature quantity of the top field tf and the bottom field bf on the macroblock image MG1. (q, r) The following formula
[0046]
[Expression 4]
[0047]
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 levels d of the four pixels, a hierarchical image composed of 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.
[0048]
Further, in this hierarchical search method, as shown in FIGS. 12A and 12B, the low frequency component Lf of the top field tf and the bottom field bf in the first search region TR1 of the reference original image FG2. (q, r) The following formula
[0049]
[Equation 5]
[0050]
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 obtaining the average value of the luminance levels 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 reference hierarchical image) SG1 Is generated.
[0051]
Incidentally, in the expressions (4) and (5) 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.
[0052]
Next, in the hierarchical search method, as shown in FIG. 13, first, in the first stage of the motion vector detection process, the first reference hierarchical image SG1 is searched by the first basic hierarchical image KG1 and sequentially blocked. Thus, the prediction error bdt for the top field tf of the first basic layer image KG1 (q, r) The following formula
[0053]
[Formula 6]
[0054]
As shown, each low-frequency component of the top field tf of the first basic layer image KG1 and the first reference layer image SG1 (corresponding to the first basic layer image KG1). The sum of absolute values of differences from the corresponding low-frequency components of the block hierarchy image BK1 is calculated.
[0055]
Also, the prediction error bdb for the bottom field bf of the first basic layer image KG1. (q, r) The following formula
[0056]
[Expression 7]
[0057]
As shown, the sum of absolute values of differences between the low frequency components of the bottom field bf of the first basic layer image KG1 and the low frequency components corresponding to the first block layer image BK1 is Calculate to calculate.
[0058]
And the prediction error bdf between the frames of the first basic layer image KG1 and the first block layer image BK1. (q, r) The following formula
[0059]
[Equation 8]
[0060]
And the corresponding prediction error bdt (q, r) And prediction error bdb (q, r) Are obtained by sequentially adding each other, and the obtained prediction error bdf (q, r) By detecting the first block layer image BK1 when the value of is the smallest as the first block layer image KG1 that most closely matches the detected first block layer image BK1 and the first block layer image BK1. A motion vector between two frames in the lowest layer is detected as a first-stage motion vector MVa1 based on the amount of motion between the hierarchical image KG1.
[0061]
Subsequently, in this hierarchical search method, as shown in FIG. 14, in the second stage of the motion vector detection process, a second search region TR2 is determined on the reference original image FG2, and the inside of the second search region TR2 is determined. By sequentially blocking while searching in the macroblock image MG1, the prediction error is obtained using the above-described equations (1) to (3), and thus the first-stage motion vector MVa1 at the original image level. The second-stage motion vector MVa2 that corrects the above is detected.
[0062]
And in this hierarchical search method,
[0063]
[Equation 9]
[0064]
As shown in the above, the macro block is obtained by doubling the first-stage motion vector MVa1 so as to compensate for the number of missing pixels when generating the hierarchical image, and adding the second-stage motion vector MVa2 thereto. A motion vector MVa3 between the final two frames of the image MG1 is detected.
[0065]
By the way, in such a hierarchical search method, when a motion vector between two frames of the macroblock image MG1 is detected, the detection accuracy is sacrificed by detecting the first-stage motion vector MVa1 using only the low-frequency component. In addition, there is an advantage that the calculation amount of the prediction error can be reduced as much as the search area is greatly reduced.
[0066]
However, this hierarchical search method requires a new calculation for generating the first reference hierarchical image SG1 from the reference original image FG2 in real time together with the detection of the motion vector. For this reason, the total calculation amount when detecting the motion vector is required. As a result, it is difficult to reduce the circuit scale.
[0067]
The present invention has been made in consideration of the above points, and an object of the present invention is to propose a motion vector detection method and apparatus capable of greatly reducing the circuit scale.
[0068]
[Means for Solving the Problems]
In order to solve this problem, in the present invention, A motion vector is detected from a first frame in a first layer of a predetermined unit block divided from video data to be encoded to a second frame separated by at least two frames. In the motion vector detection method, from the first frame , Second frame Than Until the third frame one frame before, Based on the first feature value indicating the average value for each of the plurality of pixels, or based on the second feature value indicating the degree of variation between each pixel and the corresponding first feature value, between adjacent frames. Below the first level In layers Motion vector between fields In order First step to be detected next, and detected in the first step Between fields A second step of determining a size and position of a search region for detecting a motion vector between the third and second frames in the first layer based on the motion vector; Based on each first feature amount and each second feature amount and the search area, Motion vector between the third and second frames in the first layer Inspect With the third step , The motion vectors between all the fields below the first layer detected in the first step, and the motion vectors between the third and second frames in the first layer detected in the third step. A fourth step of combining and detecting a motion vector from the first frame to the second frame in the first layer of the unit block; It was made to provide.
[0069]
As a result, By detecting a motion vector between fields between adjacent frames below the first layer, the amount of prediction error can be greatly reduced. When detecting a motion vector between the third and second frames in the first layer, the size of the search area is significantly smaller than in the prior art. do it The amount of calculation of the prediction error can be greatly reduced.
[0070]
In the present invention, A motion vector is detected from a first frame in a first layer of a predetermined unit block divided from video data to be encoded to a second frame separated by at least two frames. In the motion vector detection device, from the first frame , Second frame Than Until the third frame one frame before, Based on the first feature value indicating the average value for each of the plurality of pixels, or based on the second feature value indicating the degree of variation between each pixel and the corresponding first feature value, between adjacent frames. Below the first level In layers Motion vector between fields In order First motion vector detecting means for detecting next and the first motion vector detecting means R was detected Between fields Determining means for determining a size and position of a search region for detecting a motion vector between the third and second frames in the first layer based on the motion vector; Based on each first feature amount and each second feature amount and the search area, Motion vector between the third and second frames in the first layer Inspect Second motion vector detecting means to be output; , The motion vectors between all fields below the first layer detected by the first motion vector detecting means, and the third and second motion vectors in the first hierarchy detected by the second motion vector detecting means. A third motion vector detecting means for detecting a motion vector from the first frame to the second frame in the first layer of the unit block by combining the motion vectors between the frames. It was made to provide.
[0071]
As a result, the calculation amount of the prediction error can be greatly reduced by detecting a motion vector between fields between adjacent frames below the first layer, and the third and second in the first layer can be reduced. When detecting motion vectors between frames, the size of the search area is much smaller than before do it The amount of calculation of the prediction error can be greatly reduced.
[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, except for the configuration of 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 original image memory 25 is given the address information from the
[0078]
Further, the
[0079]
At this time, the hierarchical image memory 28 is supplied with address information from the
[0080]
Further, in the
[0081]
The original image memory 25 writes the second macro block data D4 given from the
[0082]
Similarly to the generation of the reference hierarchical block data D10 described above, the
[0083]
Thus, the hierarchical image memory 28 writes the reference hierarchical block data D10 given from the
[0084]
In this
[0085]
In this state, the original image memory 25 reads out the second macroblock data D4 stored in the second encoding processing mode based on the address information given from the
[0086]
The
[0087]
At this time, the
[0088]
As a result, the
[0089]
Thereby, the hierarchical image memory 28 converts the low frequency component of the reference hierarchical block data D10 written at the designated address position based on the address information given from the
[0090]
Then, the hierarchical image
[0091]
Next, when detecting the first stage motion vector, the
[0092]
At this time, the
[0093]
As a result, the hierarchical image memory 28 reads out the reference hierarchical block data D10 written at the address position designated based on the address information given from the
[0094]
Then, the hierarchical image
[0095]
Subsequently, when the
[0096]
At this time, the
[0097]
As a result, the original image memory 25 makes the third reference to the first or second macroblock data D1 or D4 written at the address position designated based on the address information given from the
[0098]
The original image
[0099]
Then, the original image
[0100]
Thus, in the
[0101]
Then, in this
[0102]
(2) Motion vector detection processing
In practice, in the
[0103]
That is, as shown in FIGS. 3A to 3C, the
[0104]
[Expression 10]
[0105]
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 level d is obtained, and the high frequency component af ′ of the top field tf and the bottom field bf is obtained. (q, r) The following formula
[0106]
[Expression 11]
[0107]
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. An average value of level d (that is, a low frequency component) is calculated, and an absolute value of a difference between the average value and the luminance level d of each pixel in the block (the variation of each luminance level d with respect to the low frequency component) Degree) is calculated to obtain a low frequency component (FIG. 3B) of 4 pixels in the horizontal direction and 4 lines in the vertical direction, and a high frequency region of 4 pixels in the horizontal direction and 4 lines in the vertical direction. Base layer block data D11 including the components (FIG. 3C) is generated.
[0108]
Incidentally, in the
[0109]
That is, as shown in FIGS. 4A to 4C, the
[0110]
[Expression 12]
[0111]
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 level D is calculated, and the high frequency component Af ′ of the top field tf and the bottom field bf is obtained. (q, r) The following formula
[0112]
[Formula 13]
[0113]
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 level D and calculating the average value of the absolute value of the difference between the average value and the luminance level 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).
[0114]
Incidentally, in the expressions (10) and (12) described above, the top field tf is obtained by substituting “0” into the variable fi. of A low frequency component can be obtained, and a low frequency component of the bottom field bf can be obtained by substituting “1” into the variable fi. Further, in the above-described equations (11) and (13), the top field tf is obtained by substituting “0” into the variable fi. of A high frequency component can be obtained, and a high frequency component of the bottom field bf can be obtained by substituting “1” into the variable fi.
[0115]
In the
[0116]
As a result, the hierarchical image
[0117]
[Expression 14]
[0118]
As shown, the sum of absolute values of differences between the low frequency components of the top field tf in the second basic layer image KG2 and the corresponding low frequency components in the second block layer image BK2 Calculate to calculate.
[0119]
Then, the sequentially obtained prediction error bdt ′ (q, r) Is detected between the adjacent frames based on the amount of motion between the detected second block layer image BK2 and the second basic layer image KG2. The first stage motion vector MVb1 between the fields is detected relatively coarsely.
[0120]
Next, when the
[0121]
As a result, the hierarchical image
[0122]
[Expression 15]
[0123]
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 absolute values of differences between the high 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. .
[0124]
The hierarchical image
[0125]
[Expression 16]
[0126]
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, Obtained by adding the sum of absolute values of differences between the high frequency components of the bottom field bf of the third basic layer image KG3 and the corresponding low frequency components of the third block layer image BK3. .
[0127]
Then, a prediction error bdf "between frames of the third basic layer image KG3 and the third block layer image BK3. (q, r) The following formula
[0128]
[Expression 17]
[0129]
The corresponding prediction error bdt " (q, r) And prediction error bdb " (q, r) Are obtained by sequentially adding each other, and the prediction error bdf "obtained sequentially. (q, r) Of the adjacent frames in the upper layer above the lowermost layer based on the amount of motion between the third block layer image BK3 and the third basic layer image KG3 when the value is the smallest (second The second-stage motion vector MVb2 (which is connected to the first-stage motion vector MVb1 between the third reference layer images SG3) is detected with higher detection accuracy than the first-stage motion vector MVb1.
[0130]
Subsequently, when the
[0131]
As a result, the original image
[0132]
The original image
[0133]
[Formula 18]
[0134]
As shown in the above, the addition result of the first-stage motion vector MVb1 and the second-stage motion vector MVb2 is doubled to compensate for the missing pixels when generating the hierarchical image, and the third-stage Motion vector MVb3 is added to detect the final motion vector MVB between two frames of the macroblock image MG2.
[0135]
In the case of this embodiment, the
[0136]
(3) Operation and effect of the present embodiment
In the above configuration, the
[0137]
Next, the
[0138]
Subsequently, the
[0139]
Then, the
[0140]
In this case, the
[0141]
Therefore, in this
[0142]
Further, in the case of detecting the second-stage motion vector MVb2, the
[0143]
However, since the second-stage motion vector detection process detects the second-stage motion vector MVb2 between adjacent frames, the size of the first search region TR1 (FIG. 10) of the conventional hierarchical search method is detected. The size of the fourth search region TR4 can be reduced to about 1/4, and the amount of calculation of the prediction error is much larger than that of the first-stage motion vector detection process in the conventional hierarchical search method. Can be reduced.
[0144]
As a result, in this
[0145]
Further, the
[0146]
Further, the
[0147]
That is, the
[0148]
According to the above configuration, while searching in the third search region TR3 of the second reference hierarchical image SG2 composed of low-frequency components by the second basic hierarchical image KG2 composed of the low-frequency components of the top field tf. By block blotting, the first-stage motion vector MVb1 between the adjacent frames in the lowermost layer is detected relatively coarsely, and the low-frequency band is based on the first-stage motion vector MVb1 obtained by the detection. The size and position of the fourth search region TR4 are determined on the third reference hierarchical image SG3 composed of the components and the high-frequency components, and the fourth search region TR4 is composed of the low-frequency components and the high-frequency components. The second stage motion vector MVb between adjacent frames in the upper layer than the lowermost layer by performing blotching while searching with the basic layer image KG3 of the third layer Can be detected with relatively high accuracy, and the amount of computation for detecting the motion vector can be greatly reduced by suppressing the decrease in the detection accuracy of the motion vector as much as possible, thus greatly increasing the circuit scale. It is possible to realize a motion vector detection method and a motion vector detection device that can be reduced.
[0149]
(4) Other embodiments
In the above-described embodiment, the case where the
[0150]
In the above-described embodiment, in the first stage of the motion vector detection process, the first-stage motion vector MVb1 is detected using the second basic layer image KG2 that is the low-frequency component of the top field tf. However, the present invention is not limited to this, and the first-stage motion vector is obtained using an image composed of a low-frequency component of the bottom field bf, a high-frequency component of the top field tf, or a high-frequency component of the bottom field bf. MVb1 may be detected.
[0151]
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.
[0152]
Furthermore, in the above-described embodiment, the case where the low-frequency component indicating the average value for each of the plurality of luminance levels d is applied as the first feature amount has been described, but the present invention is not limited thereto, Other low-frequency components indicating average values of various predetermined levels such as a color difference level, a lightness level, a color level, and a red / green / blue level for each pixel may be applied.
[0153]
Furthermore, in the above-described embodiment, when the high frequency component indicating the degree of variation between the average value for each of the plurality of luminance levels d and the corresponding luminance levels d is applied as the second feature amount. Although the present invention is not limited to this, the average value of various other predetermined levels such as a color difference level, a lightness level, a color level, and a red / green / blue level for each pixel, and the corresponding predetermined values. You may make it apply the high frequency component which consists of the dispersion | variation with a level.
[0154]
Further, in the above-described embodiment, when the
[0155]
Furthermore, in the above-described embodiment, the motion vector between fields between the adjacent frames in the lower layer than the first layer is obtained from the first frame to the third frame one frame before the second frame. Although the case where the hierarchical image
[0156]
Further, in the above-described embodiment, a search for detecting a motion vector between the third and second frames in the first layer based on the motion vector detected by the first motion vector detecting means. Although the case where the
[0157]
Furthermore, in the above-described embodiment, the motion vectors between the third and second frames in the first layer are converted to the first feature amounts and the first feature amounts corresponding to the first feature amounts based on the determination by the determination unit. Although the case where the hierarchical image
[0158]
【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 first 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, Based on the first feature value indicating the average value for each of the plurality of pixels, or based on the second feature value indicating the degree of variation between each pixel and the corresponding first feature value, between adjacent frames. Below the first level In layers Motion vector between fields In order Next detected and detected Between fields Determining a size and position of a search region for detecting a motion vector between the third and second frames in the first layer based on the motion vector; Based on each first feature amount and each second feature amount and the search area, Motion vector between the third and second frames in the first layer Inspect Out Then, the motion vectors between all the fields in the lower layer than the first layer detected in this way and the motion vectors between the third and second frames in the first layer are synthesized, and the unit block first Detects motion vectors from the first frame to the second frame in one layer By doing so, it is possible to significantly reduce the amount of calculation of the prediction error by detecting the motion vector between the fields below the first layer, and the third and second frames in the first layer. The size of the search area is greatly reduced compared to the conventional method when detecting motion vectors between do it It is possible to realize a motion vector detection method that can significantly reduce the amount of calculation of the prediction error and thus can significantly reduce the circuit scale of the circuit used in the motion vector detection process.
[0159]
Also In a motion vector detection device for detecting a motion vector from a first frame in a first 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, Based on the first feature value indicating the average value for each of the plurality of pixels, or based on the second feature value indicating the degree of variation between each pixel and the corresponding first feature value, between adjacent frames. Below the first level In layers Motion vector between fields In order First motion vector detecting means for detecting next and the first motion vector detecting means R was detected Between fields Determining means for determining a size and position of a search region for detecting a motion vector between the third and second frames in the first layer based on the motion vector; Based on each first feature amount and each second feature amount and the search area, Motion vector between the third and second frames in the first layer Inspect Second motion vector detecting means to be output; , The motion vectors between all fields below the first layer detected by the first motion vector detecting means, and the third and second motion vectors in the first hierarchy detected by the second motion vector detecting means. A third motion vector detecting means for detecting a motion vector from the first frame to the second frame in the first layer of the unit block by combining the motion vectors between the frames. Thus, the amount of calculation of the prediction error can be greatly reduced by detecting a motion vector between fields below the first layer, and the third and second in the first layer can be reduced. When detecting motion vectors between frames, the size of the search area is much smaller than before. do it It is possible to realize a motion vector detection device that can greatly reduce the amount of calculation of the prediction error and thus can greatly reduce the circuit scale.
[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.
FIG. 7 is a schematic diagram schematically illustrating a third-stage motion vector detection process.
FIG. 8 is a schematic diagram schematically illustrating a general encoding method according to the MPEG2 method.
FIG. 9 is a block diagram showing a circuit configuration of a conventional encoding device.
FIG. 10 is a schematic diagram illustrating a general motion vector detection process.
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, 22 ... CPU, 25 ... Original image memory, 26 ... Hierarchical image generator, 27 ... First address generator, 28 ...
Claims (2)
上記第1のフレームから、上記第2のフレームより1フレーム前の第3のフレームまでの間、複数画素毎の平均値を示す第1の特徴量に基づき、又は上記各画素毎と、対応する上記第1の特徴量とのばらつき度合いを示す第2の特徴量に基づき、隣接するフレーム間で上記第1の階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1のステツプと、
上記第1のステツプにおいて検出した上記フイールド間の動きベクトルに基づいて、上記第1の階層における上記第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する第2のステツプと、
各上記第1の特徴量及び各上記第2の特徴量並びに上記探索領域に基づき、上記第1の階層における上記第3及び第2のフレーム間の動きベクトルを検出する第3のステツプと、
上記第1のステツプにおいて検出した上記第1の階層よりも下層における全ての上記フイールド間の動きベクトルと、上記第3のステツプにおいて検出した上記第1の階層における上記第3及び第2のフレーム間の動きベクトルとを合成して、上記単位ブロツクの上記第1の階層における上記第1のフレームから上記第2のフレームまでの上記動きベクトルを検出する第4のステツプと
を具えることを特徴とする動きベクトル検出方法。In a motion vector detection method for detecting a motion vector from a first frame in a first 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, based on the first feature amount indicating a mean value for each of the plurality of pixels, or the each of the one pixel, the corresponding based on the second feature amount indicating the degree of dispersion of the above first feature amount, between adjacent frames the first of a motion vector between full yield that put in a lower layer than the first level to sequential detection Steps,
Based on the motion vector between the field detected in the first step, the size and position of the search area to detect the motion-out vector between the third and second frame in the first hierarchy A second step to determine;
Based on the above first feature amount and each said second feature quantity and the search area, and a third step that detect the motion-out vector between the third and second frame in the first hierarchy ,
All the motion vectors between the fields below the first layer detected in the first step, and between the third and second frames in the first 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 first layer of the unit block. Motion vector detection method.
上記第1のフレームから、上記第2のフレームより1フレーム前の第3のフレームまでの間、複数画素毎の平均値を示す第1の特徴量に基づき、又は上記各画素毎と、対応する上記第1の特徴量とのばらつき度合いを示す第2の特徴量に基づき、隣接するフレーム間で上記第1の階層よりも下層におけるフイールド間の動きベクトルを順次検出する第1の動きベクトル検出手段と、
上記第1の動きベクトル検出手段により検出された上記フイールド間の動きベクトルに基づいて、上記第1の階層における上記第3及び第2のフレーム間の動きベクトルを検出するための探索領域の大きさ及び位置を決定する決定手段と、
各上記第1の特徴量及び各上記第2の特徴量並びに上記探索領域に基づき、上記第1の階層における上記第3及び第2のフレーム間の動きベクトルを検出する第2の動きベクトル検出手段と、
上記第1の動きベクトル検出手段により検出された上記第1の階層よりも下層における全ての上記フイールド間の動きベクトルと、上記第2の動きベクトル検出手段により検出された上記第1の階層における上記第3及び第2のフレーム間の動きベクトルとを合成して、上記単位ブロツクの上記第1の階層における上記第1のフレームから上記第2のフレームまでの上記動きベクトルを検出する第3の動きベクトル検出手段と
を具えることを特徴とする動きベクトル検出装置。In a motion vector detection device for detecting a motion vector from a first frame in a first 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, based on the first feature amount indicating a mean value for each of the plurality of pixels, or the each of the one pixel, the corresponding the basis of the second feature amount indicating the degree of dispersion of the first feature quantity, a first movement of the motion vector to sequential detection between fields which definitive under layer than the first layer between the adjacent frames Vector detection means;
Search area for based on the motion vector between the detected the field Ri by the above-described first motion vector detection means detects the motion-out vector between the third and second frame in the first hierarchy Determining means for determining the size and position of
Based on the above first feature amounts and the above second feature and the search area, the second motion vector detect the motion-out vector between the third and second frame in the first hierarchy Detection means ;
All the motion vectors between the fields below the first hierarchy detected by the first motion vector detection means, and the first hierarchy detected by the second motion vector detection means. A third motion for detecting the motion vector from the first frame to the second frame in the first hierarchy of the unit block by combining the motion vectors between the third and second frames. A motion vector detection apparatus comprising: vector detection means .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP08907098A JP3944804B2 (en) | 1998-04-01 | 1998-04-01 | Motion vector detection method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP08907098A JP3944804B2 (en) | 1998-04-01 | 1998-04-01 | Motion vector detection method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH11289543A JPH11289543A (en) | 1999-10-19 |
JP3944804B2 true JP3944804B2 (en) | 2007-07-18 |
Family
ID=13960602
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP08907098A Expired - Fee Related JP3944804B2 (en) | 1998-04-01 | 1998-04-01 | Motion vector detection method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3944804B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101569201B (en) | 2006-11-07 | 2011-10-05 | 三星电子株式会社 | Method and apparatus for encoding and decoding based on intra prediction |
US8570393B2 (en) * | 2007-11-30 | 2013-10-29 | Cognex Corporation | System and method for processing image data relative to a focus of attention within the overall image |
JP6066583B2 (en) * | 2012-05-01 | 2017-01-25 | キヤノン株式会社 | Moving picture coding apparatus and moving picture coding method |
-
1998
- 1998-04-01 JP JP08907098A patent/JP3944804B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH11289543A (en) | 1999-10-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3263960B2 (en) | Motion vector encoder and decoder | |
JP4662636B2 (en) | Improvement of motion estimation and block matching pattern | |
JP3072035B2 (en) | Two-stage video film compression method and system | |
US7483625B2 (en) | Picture recording apparatus and method thereof | |
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 | |
JP3895431B2 (en) | Video information encoding method using object boundary block merge / division | |
JP4198206B2 (en) | Video information compression method and apparatus using motion dependent prediction | |
JP3189258B2 (en) | Image signal encoding method and image signal encoding device, image signal decoding method and image signal decoding device | |
JP2007067731A (en) | Coding method | |
JP2010504010A (en) | Data compression method in video sequence | |
JP2006279573A (en) | Encoder and encoding method, and decoder and decoding method | |
JPH07193822A (en) | Motion prediction processor and device therefor | |
US6438254B1 (en) | Motion vector detection method, motion vector detection apparatus, and data storage media | |
JPH10322705A (en) | Motion detection and motion compensation prediction circuit | |
JP3532709B2 (en) | Moving picture coding method and apparatus | |
JP3944804B2 (en) | Motion vector detection method and apparatus | |
JPH07143494A (en) | Coding method for moving image | |
JP3944806B2 (en) | Motion vector detection method and apparatus | |
JP3944805B2 (en) | Motion vector detection method and apparatus | |
JPH11308618A (en) | Image signal processor and method therefor, and image signal reproducing device | |
JPH11346368A (en) | Image processing method, image processing unit and data storage medium | |
JP2020058075A (en) | Moving image prediction encoding device, moving image prediction decoding device, moving image prediction encoding method, moving image prediction decoding method, and recording medium | |
JPH10191347A (en) | Motion detector, motion detecting method and storage medium | |
JPH11298902A (en) | Image coder and image coding method therefor | |
JP2007124614A (en) | Method of coding |
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 |