JP3598526B2 - Motion vector detection method and image data encoding method - Google Patents

Motion vector detection method and image data encoding method Download PDF

Info

Publication number
JP3598526B2
JP3598526B2 JP35538493A JP35538493A JP3598526B2 JP 3598526 B2 JP3598526 B2 JP 3598526B2 JP 35538493 A JP35538493 A JP 35538493A JP 35538493 A JP35538493 A JP 35538493A JP 3598526 B2 JP3598526 B2 JP 3598526B2
Authority
JP
Japan
Prior art keywords
absolute value
evaluation function
block
detected
motion vector
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
Application number
JP35538493A
Other languages
Japanese (ja)
Other versions
JPH07203462A (en
Inventor
明宏 武藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP35538493A priority Critical patent/JP3598526B2/en
Publication of JPH07203462A publication Critical patent/JPH07203462A/en
Application granted granted Critical
Publication of JP3598526B2 publication Critical patent/JP3598526B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Color Television Systems (AREA)

Description

【0001】
【産業上の利用分野】
本発明は、画像の動きに応じて画像データの圧縮符号化処理を行う、例えば動画像圧縮処理装置(MPEG装置)等に用いて好適な動きベクトル検出方法及び画像データの符号化方法に関し、特に、最初は大きく、徐々に範囲を狭めながら画像の動きベクトルの検出を多段階に亘って行うマルチステップサーチにおける動きベクトルの検出精度の向上等を図った動きベクトル検出方法、及び、この動きベクトル検出方法を用いて画像データの圧縮符号化を行うことにより、圧縮符号化効率及び圧縮符号化精度の向上等を図った画像データの符号化方法に関する。
【0002】
【従来の技術】
今日において、動画の高能率圧縮符号化の国際標準方式としてMPEG(Moving Picture Coding Transform )方式が知られている。このMPEG方式は、画像データに直交変換処理を施す、例えばDCT(Discrete Cosine Transform )変換と、動き補償とを組み合わせた画像の高能率圧縮技術である。
【0003】
このMPEG方式は、例えば前フレームの画像と現在フレームの画像との相関性を利用して画像データを圧縮符号化する、図7に示すような画像データの符号化装置に適用することができる。
【0004】
上記図7に示す画像データの符号化装置は、入力端子201を介して現在フレームの画像データが供給される。この現在フレームの画像データは、動きベクトル検出回路202及び減算器203に供給される。
【0005】
上記動きベクトル検出回路202には、上記現在フレームの画像データの他、以下に説明するフレームメモリ205からの前フレームの画像データが供給されている。上記動きベクトル検出回路202は、上記現在フレームの画像データ及び前フレームの画像データに基づいて画像の動きを検出することにより動きベクトルを形成し、これを動き補償回路204に供給する。
【0006】
上記動き補償回路204には、フレームメモリ205から前フレームの画像データが供給されている。上記動き補償回路204は、上記動きベクトル検出回路202からの動きベクトルに基づいて、上記前フレームの画像データに動き補償処理を施し、これを上記減算器203及び加算器206に供給する。
【0007】
上記減算器203は、上記現在フレームの画像データと、上記動き補償処理の施された前フレームの画像データとを減算処理することにより、現在フレームの画像データと前フレームの画像データとの差分を示す差分データを形成し、これをDCT回路207に供給する。
【0008】
上記DCT回路207は、上記差分データを所定画素数のブロック毎に周波数軸上に変換してDCTブロックを形成し、これを量子化回路208に供給する。上記量子化回路208は、上記DCTブロックのレベルに応じて量子化ステップ可変し、この量子化ステップにより上記DCTブロックに量子化処理を施すことにより圧縮画像データを形成し、これを出力端子209を介して例えばディスク記録装置等の外部機器に供給するとともに、逆量子化回路210に供給する。
【0009】
上記逆量子化回路210は、上記量子化回路208で選択された量子化ステップで、上記圧縮画像データに逆量子化処理を施すことにより、量子化処理される前のDCTブロックを再生し、これを逆DCT回路211に供給する。上記逆DCT回路211は、上記再生されたDCTブロックに逆DCT処理を施すことにより、DCTブロック化される前の差分データを形成し、これを上記加算器206に供給する。
【0010】
上記加算器206には、上記動き補償回路204からの動き補償された前フレームの画像データが別に供給されている。上記加算器206は、上記動き補償された前フレームの画像データと、上記逆DCT回路211からの差分データとを加算処理することにより、現在フレームの画像データを再生し、これをフレームメモリ205に供給する。
【0011】
上記フレームメモリ205に供給された現在フレームの画像データは、1フレーム分の遅延が施され読み出される。これにより、上記現在フレームの画像データは、読み出しの段階で前フレームの画像データとされ、上記動き補償回路204及び動きベクトル検出回路202に供給される。
上述のように、上記動き補償回路204は、上記動きベクトル検出回路202からの動きベクトルに応じて上記前フレームの画像データに動き補償処理を施し、これを上記減算器203及び加算器206に供給する。以後、各回路において、上述の動作が繰り返される。
【0012】
このように、上記画像データの符号化装置は、動きベクトルに基づいて動きベクトル補償された前フレームの画像データと、現在フレームの画像データとの差分を符号化して出力する。これにより、画像データの高能率圧縮を行うことができる。
【0013】
ここで、上記動きベクトル検出回路202は、図8に示すように現在フレーム221に複数設定された複数画素(N画素×Mライン)から形成される基準ブロック223が、前フレーム222内を移動する複数画素(N画素×Mライン)から形成される検査ブロックのうち、どの検査ブロック224と一致するかを検出するブロックマッチングにより動きベクトルを検出している。
【0014】
すなわち、上記動きベクトル検出回路202は、前フレーム222の検査ブロック224を所定の移動範囲内において移動し、該移動する毎に検査ブロック224と上記現在フレーム221の基準ブロック223とを比較する。そして、上記基準ブロック223に最も合致する検査ブロック224をマッチングブロックとして検出し、このマッチングブロックに基づいて動きベクトルの検出を行う。
【0015】
このようなブロックマッチング法としては、フルサーチと呼ばれるブロックマッチング法と、マルチステップサーチと呼ばれるブロックマッチング法とが知られている。
【0016】
上記フルサーチのブロックマッチング法が適用された動きベクトル検出回路は、例えば図9に示すような構成を有している。
この図9において、現フレームメモリ231には入力端子233を介して現在フレームの画像データが供給され、前フレームメモリ232には入力端子234を介して前フレームの画像データが供給される。上記各フレームメモリ231,232に供給された各画像データは、それぞれコントローラ235の書き込み制御により、該各フレームメモリ231,232内に一旦書き込まれる。
【0017】
このように上記各フレームメモリ231,232内に各画像データが書き込まれると、上記コントローラ235は、上記図8に示した現在フレーム221の基準ブロックの画像データを読み出すように上記現フレームメモリ231を読み出し制御するとともに、前フレーム222の検査ブロック224の画像データを読み出すようにアドレス移動回路236を介して前フレームメモリ232を読み出し制御する。また、上記コントローラ235は、上記検査ブロック224が、図10に示すように1画素毎に所定の移動範囲SV内を移動するように、1画素ずつ上記前フレームメモリ232の読み出しアドレスをアドレス移動回路236を介して可変制御する。
【0018】
これにより、上記現フレームメモリ231から上記基準ブロック223の画像データが差分検出回路237に供給されるとともに、上記前フレームメモリ232から上記移動範囲SV内において1画素ずつ移動された検査位置の検査ブロック224の画像データが上記差分検出回路237に供給される。
【0019】
上記差分検出回路237は、上記基準ブロック223の画像データと、上記検査ブロック224の画像データとを1画素毎に減算処理して差分データを形成し、これを絶対値和検出回路238に供給する。
【0020】
上記絶対値和検出回路238は、1回のブロックの比較により形成された差分データの絶対値を検出し、この絶対値を全て加算処理することにより絶対値和データを形成し、これを判断回路239に供給する。
【0021】
上記判断回路239は、例えば上記移動範囲SV内を上記検査ブロック224を1画素ずつ移動してブロックマッチングを行う1回のブロックマッチング処理により形成される全ての絶対値和データを記憶できるメモリを有している。上記判断回路239は、上記絶対値和検出回路238から供給される絶対値和データを、その絶対値和データが形成された上記移動範囲SVの検査位置に対応するアドレスに一旦記憶する。そして、上記メモリの全てのアドレスに上記絶対値和データが記憶されると、この絶対値和データの中から値が最小のものが記憶されているアドレスを検出し、このアドレスに基づいて動きベクトルを検出する。そして、この動きベクトルを出力端子240を介して、上記図7に示した動き補償回路204に供給する。
【0022】
上記値が最小の絶対値和データは、前フレームの検査ブロック224の画像データと現在フレームの基準ブロック223の画像データとの差分が最小であること、すなわち、その検査ブロック224の画像データと基準ブロック223の画像データとの相関性が高いことを示している。また、上述のように上記絶対値和データは、ブロックマッチングを行った位置に対応した上記メモリ上のアドレスに記憶される。
【0023】
従って、上記値が最小の絶対値和データが記憶されている上記メモリ上のアドレスを検出することにより、上記値が最小の絶対値和データが形成された検査ブロック224に対する上記基準ブロック223の動き分(動きベクトル)を検出することができる。
【0024】
なお、このように1回のブロックマッチングで動きベクトルの検出がなされると、上記判断回路259は、コントローラ235に該動きベクトルの検出がなされたことを示すデータを供給する。上記コントローラ235は、上記動きベクトルの検出がなされたことを示すデータが供給されると、新たな現在フレームの画像データ及び前フレームの画像データが上記各フレームメモリ231,232に書き込まれるように該各フレームメモリ231,232を書き込み制御する。これにより、新たに上述のブロックマッチング処理が行われる。
【0025】
しかし、このようなフルサーチを行うと、上記検査ブロック224を、上記移動範囲SVにおいて1画素毎に移動させながら動きベクトルの検出を行う必要があるため、演算量が膨大なものとなり画像データの高速処理に支障をきたす。このため、現在では、最初は大きな移動範囲で動きベクトルの検出を行い、この検出結果に応じて徐々に移動範囲を小さくするように、多段階に亘ってブロックマッチング処理を行うことにより、演算量の軽減を図るマルチステップサーチが多く行われている。
【0026】
上記マルチステップサーチとしては、3段階に亘って動きベクトルの検出を行う3ステップサーチ、2段階に分けて動きベクトルの検出を行う2ステップサーチ等が知られている。
【0027】
まず、上記3ステップサーチが適用される動きベクトル検出回路は、例えば図11に示すような構成を有している。
この図11において、現フレームメモリ251には入力端子253を介して現在フレームの画像データが供給され、前フレームメモリ252には入力端子254を介して前フレームの画像データが供給される。上記各フレームメモリ251,252に供給された各画像データは、それぞれコントローラ255の書き込み制御により、該各フレームメモリ251,252内に一旦書き込まれる。
【0028】
このように上記各フレームメモリ251,252内に各画像データが書き込まれると、上記コントローラ255は、例えば上記現フレームメモリ251に設定された基準ブロックの画像データが読み出されるように上記現フレームメモリ251を読み出し制御する。この基準ブロックの画像データは、差分検出回路257に供給される。
【0029】
また、上記コントローラ255は、これとともに、まず、第1ステップとして図12に示すように上記前フレームメモリ252に記憶された画像データのうち、例えば上記基準ブロックの中心のアドレスに対応するアドレスの画像データを原点の画像データ270とし、この原点の画像データ270に対して左斜め上方向に4画素分ずれた画像データ271を中心とする上記基準ブロックの画像データと同数の画像データを有する検査ブロックの画像データが読み出されるようにi画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0030】
また、上記コントローラ255は、これに続いて、上記画像データ271から右方向に4画素分離れた画像データ272を中心とする検査ブロック,上記画像データ272から右方向に4画素分離れた画像データ273を中心とする検査ブロック,上記原点の画像データ270から左方向に4画素分離れた画像データ274を中心とする検査ブロック,上記原点の画像データ270を中心とする検査ブロック,上記原点の画像データ270から右方向に4画素分離れた画像データ275を中心とする検査ブロック,上記原点の画像データ270から左斜め下方向に4画素分離れた画像データ276を中心とする検査ブロック,上記画像データ276から右方向に4画素分離れた画像データ277を中心とする検査ブロック,上記画像データ277から右方向に4画素分離れた画像データ278を中心とする検査ブロックの各画像データが順に読み出されるように上記i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0031】
この前フレームメモリ252から読み出された各検査ブロックの画像データは、それぞれ上記差分検出回路257に供給される。
【0032】
すなわち、この第1ステップでは、上記図12に示す各画像データ271〜278をそれぞれ中心として4画素毎に検査ブロックを移動することにより、同図中太線で示す第1の移動範囲SV1でブロックマッチング処理が行われることとなる。
【0033】
上記差分検出回路257は、上記基準ブロックの画像データと、上記各検査ブロックの画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロック同士の比較により検出される差分データを全て加算して絶対値和データを形成する。これにより、上記検査ブロックの移動を行った分である計9個の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0034】
上記判断回路259は、例えば上記第1の移動範囲SV1内を上記検査ブロックを4画素ずつ移動してブロックマッチングを行う1回のブロックマッチング処理により形成される全ての絶対値和データを記憶できるメモリを有している。上記判断回路259は、上記絶対値和検出回路258から供給される絶対値和データを、その絶対値和データが形成された上記第1の移動範囲SV1の検査位置に対応するアドレスに一旦記憶する。そして、上記メモリの全てのアドレスに上記絶対値和データが記憶されると、この絶対値和データの中から値が最小のものを検出し、この値が最小の絶対値和データを上記コントローラ255に供給する。
【0035】
上記絶対値和データの値が最小であるということは、前フレームにおける検査ブロックと現在フレームにおける基準ブロックとの相関性が高いことを示している。このため、上記コントローラ255は、上記絶対値和データに基づいて、その絶対値和データが検出された検査ブロックの中心に位置する、上記前フレームメモリ252上のアドレスの画像データを検出する。そして、第2のステップとして、上記画像データを中心として移動範囲を狭めてブロックマッチング処理を行う。
【0036】
すなわち、上記値が最小の絶対値和データが検出された検査ブロックの中心の画像データが図12に×点で示す画像データ276であったとすると、上記コントローラ255は、第2ステップとして図13(a)に示すように、上記画像データ276から左斜め上に2画素分離れた画像データ281を中心とする検査ブロック,上記画像データ281から右方向に2画素分離れた画像データ282を中心とする検査ブロック,上記画像データ282から右方向に2画素分離れた画像データ283を中心とする検査ブロック,上記画像データ276から左方向に2画素分離れた画像データ284を中心とする検査ブロック,上記画像データ276を中心とする検査ブロック,上記画像データ276から右方向に2画素分離れた画像データ285を中心とする検査ブロック,上記画像データ276から左斜め下方向に2画素分離れた画像データ286を中心とする検査ブロック,上記画像データ286から右方向に2画素分離れた画像データ287を中心とする検査ブロック,上記画像データ287から2画素分離れた画像データ288を中心とする検査ブロックの各画像データが順に読み出されるように上記i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0037】
この前フレームメモリ252から読み出された各検査ブロックの画像データは、それぞれ上記差分検出回路257に供給される。
【0038】
すなわち、この第2ステップでは、上記図13(a)に示す各画像データ281〜288及び画像データ276をそれぞれ中心として2画素毎に検査ブロックを移動することにより、同図(a)中太線で示す第2の移動範囲SV2でブロックマッチング処理が行われることとなる。
【0039】
上記差分検出回路257は、上記基準ブロックの画像データと、上記各検査ブロックの画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロック同士の比較により検出される差分データを全て加算して絶対値和データを形成する。これにより、上記検査ブロックの移動を行った分である計9個の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0040】
上記判断回路259は、上記絶対値和検出回路258から供給される上記9つの絶対値和データを、その絶対値和データが形成された上記第2の移動範囲SV2の検査位置に対応するアドレスに一旦記憶する。そして、上記メモリの全てのアドレスに上記絶対値和データが記憶されると、この絶対値和データの中から値が最小のものを検出し、この値が最小の絶対値和データを上記コントローラ255に供給する。
【0041】
上述のように、上記絶対値和データの値が最小であるということは、前フレームにおける検査ブロックと現在フレームにおける基準ブロックとの相関性が高いことを示している。このため、上記コントローラ255は、上記絶対値和データに基づいて、その絶対値和データが検出された検査ブロックの中心に位置する、上記前フレームメモリ252上のアドレスの画像データを検出する。そして、第3のステップとして、上記画像データを中心として移動範囲をさらに狭めてブロックマッチング処理を行う。
【0042】
すなわち、上記値が最小の絶対値和データが検出された検査ブロックの中心の画像データが図13(a)に△点で示す画像データ283であったとすると、上記コントローラ255は、第3ステップとして図13(b)に示すように、上記画像データ283から左斜め上に1画素分離れた画像データ291を中心とする検査ブロック,上記画像データ291から右方向に1画素分離れた画像データ292を中心とする検査ブロック,上記画像データ292から右方向に1画素分離れた画像データ293を中心とする検査ブロック,上記画像データ283から左方向に1画素分離れた画像データ294を中心とする検査ブロック,上記画像データ283を中心とする検査ブロック,上記画像データ283から右方向に1画素分離れた画像データ295を中心とする検査ブロック,上記画像データ283から左斜め下方向に1画素分離れた画像データ296を中心とする検査ブロック,上記画像データ296から右方向に1画素分離れた画像データ297を中心とする検査ブロック,上記画像データ297から1画素分離れた画像データ298を中心とする検査ブロックの各画像データが順に読み出されるように1画素ステップアドレス移動回路256Bを介して上記前フレームメモリ252を読み出し制御する。
【0043】
この前フレームメモリ252から読み出された各検査ブロックの画像データは、それぞれ上記差分検出回路257に供給される。
【0044】
すなわち、この第3ステップでは、上記図13(b)に示す各画像データ291〜298及び画像データ283をそれぞれ中心として1画素毎に検査ブロックを移動することにより、同図(b)中太線で示す第3の移動範囲SV3でブロックマッチング処理が行われることとなる。
【0045】
上記差分検出回路257は、上記基準ブロックの画像データと、上記各検査ブロックの画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロックどおしの比較により検出される差分データを全て加算して絶対値和データを形成する。これにより、上記検査ブロックの移動を行った分である計9個の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0046】
上記判断回路259は、上記絶対値和検出回路258から供給される上記9つの絶対値和データを、その絶対値和データが形成された上記第3の移動範囲SV3の検査位置に対応するアドレスに一旦記憶する。そして、上記メモリの全てのアドレスに上記絶対値和データが記憶されると、この絶対値和データの中から値が最小のものを検出し、この値が最小の絶対値和データを上記コントローラ255に供給する。
【0047】
上記コントローラ255は、上記値が最小の絶対値和データが形成された検査ブロックを検出し、この検査ブロックの中心に位置する画像データを検出する。具体的には、例えば上記値が最小の絶対値和データが形成された検査ブロックの中心に位置する画像データが図13(b)に斜線で示す画像データ296であったとすると、上記コントローラ255は、上記画像データ296の前フレームメモリ252上のアドレスを検出する。そして、この検査ブロックの中心の画像データの前フレームメモリ252上のアドレスと、上記現在フレームメモリ251上の基準ブロックの中心の画像データのアドレスとの差分を検出することにより、上記値が最小の絶対値和データが形成された検査ブロックに対する上記基準ブロックの動き分(動きベクトル)を検出し、この動きベクトルを出力端子260を介して上記図7に示した動き補償回路204に供給する。
【0048】
これにより、上記図7に示した画像データの符号化装置において、上述のように画像データの圧縮符号化処理を行うことができる。
【0049】
次に、2ステップサーチが適用される動きベクトル検出回路は、構成的には上記図11に示した回路と同じであるが、この場合、上記コントローラ255は、第1ステップで2画素毎に検査ブロックを移動させるように上記i画素ステップアドレス移動回路256を制御し、第2ステップで1画素毎に検査ブロックを移動させるように上記1画素ステップアドレス移動回路を制御するようになっている。
【0050】
すなわち、上記図11において、上記現フレームメモリ251に現在フレームの画像データが記憶され、前フレームメモリ252に前フレームの画像データが記憶されると、上記コントローラ255は、例えば上記現フレームメモリ251に設定された基準ブロックの画像データが読み出されるように上記現フレームメモリ251を読み出し制御する。この基準ブロックの画像データは、差分検出回路257に供給される。
【0051】
また、上記コントローラ255は、これとともに、まず、第1ステップとして図14(a)に示すように上記前フレームメモリ252に記憶された画像データのうち、例えば上記現フレームメモリ251から読み出した基準ブロックの中心のアドレスに対応するアドレスの画像データを原点の画像データ300とし、同図(a)中太線で示すように上記原点の画像データ300を中心とする第1の移動範囲SV1内を2画素毎に検査ブロックが移動するように上記i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。この各検査ブロックの画像データは、それぞれ上記差分検出回路257に供給される。
【0052】
上記差分検出回路257は、上記基準ブロックの画像データと、上記各検査ブロックの画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロック同士の比較により検出される差分データを全て加算して絶対値和データを形成する。例えば、図14(a)の○点及び●点に示すように49回に亘って、上記検査ブロックの移動が行われたとすると、計49個の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0053】
上記判断回路259は、例えば上記第1の移動範囲SV1内を上記検査ブロックを2画素ずつ移動してブロックマッチングを行う1回のブロックマッチング処理により形成される全ての絶対値和データを記憶できるメモリを有している。上記判断回路259は、上記絶対値和検出回路258から供給される絶対値和データを、その絶対値和データが形成された上記第1の移動範囲SV1の検査位置に対応するアドレスに一旦記憶する。そして、上記メモリの全てのアドレスに上記絶対値和データが記憶されると、この絶対値和データの中から値が最小のものを検出し、この値が最小の絶対値和データを上記コントローラ255に供給する。
【0054】
上記絶対値和データの値が最小であるということは、前フレームにおける検査ブロックと現在フレームにおける基準ブロックとの相関性が高いことを示している。このため、上記コントローラ255は、上記絶対値和データに基づいて、その絶対値和データが検出された検査ブロックの中心に位置する、上記前フレームメモリ252上のアドレスの画像データを検出する。そして、第2のステップとして、上記画像データを中心として移動範囲を狭めてブロックマッチング処理を行う。
【0055】
すなわち、上記値が最小の絶対値和データが検出された検査ブロックの中心の画像データが図14(a)に斜線で示す画像データ301であったとすると、上記コントローラ255は、第2ステップとして同図(b)中太線で示すように、上記画像データ301を中心とする第2の移動範囲SV2内を1画素毎に検査ブロックが移動するように上記1画素ステップアドレス移動回路256Bを介して上記前フレームメモリ252を読み出し制御する。この各検査ブロックの画像データは、それぞれ上記差分検出回路257に供給される。
【0056】
上記差分検出回路257は、上記基準ブロックの画像データと、上記各検査ブロックの画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロックどおしの比較により検出される差分データを全て加算して絶対値和データを形成する。これにより、図14(b)に示すように上記検査ブロックの移動を行った分の計9個の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0057】
上記判断回路259は、上記絶対値和検出回路258から供給される上記9つの絶対値和データを、その絶対値和データが形成された上記第2の移動範囲SV2の検査位置に対応するアドレスに一旦記憶する。そして、上記メモリの全てのアドレスに上記絶対値和データが記憶されると、この絶対値和データの中から値が最小のものを検出し、この値が最小の絶対値和データを上記コントローラ255に供給する。
【0058】
上記コントローラ255は、上記値が最小の絶対値和データが形成された検査ブロックが上記基準ブロックと一致しているとし、その絶対値和データが形成された検査ブロックの例えば中心の画像データのアドレスを検出する。そして、この検査ブロックの中心の画像データのアドレスと、上記基準ブロックの中心の画像データのアドレスとの差分を検出することにより、上記値が最小の絶対値和データが形成された検査ブロックに対する上記基準ブロックの動き分(動きベクトル)を検出し、この動きベクトルを出力端子260を介して上記図7に示した動き補償回路204に供給する。
【0059】
このように、マルチステップサーチでは、第1ステップ〜第3ステップの計3段階に分けて、或いは、第1ステップ及び第2ステップの計2段階に分けて動きベクトルの検出を行うようにしているため、最初は粗く徐々に細かく動きベクトルの検出を行うことができ、上述のフルサーチよりも演算量を削減することができ、画像データの高速処理化を図ることができる。
【0060】
【発明が解決しようとする課題】
しかし、従来の3ステップサーチ及び2ステップサーチ等のマルチステップサーチにおいて、各ステップで選択される絶対値和データは、最小値の絶対値和データ1点のみであるが、この最小値の絶対値和データは、最終的に正確な動きベクトルを検出できるものであるとは限らない。
【0061】
各ステップでの、上記検査ブロックを移動させる画素間隔と、正確な動きベクトルを検出することができる確率(正解率)とは比例関係にあり、上記検査ブロックを移動させる画素間隔を狭めれば上記正解率は向上するが、該検査ブロックを移動させる画素間隔を狭めると、マッチングの回数を増やすこととなるため、計算量が増大して動きベクトルの検出速度が遅くなってしまう問題が生ずる。
【0062】
本発明は上述の問題点に鑑みてなされたものであり、多段階に亘ってマッチング処理を行うことにより動きベクトルの検出を行うマルチステップサーチにおいて、計算量の増大及び検出速度の遅延化を極力抑制して動きベクトルの検出精度の向上を図ることができるような動きベクトル検出方法、及び、この動きベクトル検出方法で形成された正確な動きベクトルを用いることにより、画像データに応じた正確な圧縮符号化及び符号化効率の向上を図ることができるような画像データの符号化方法の提供を目的とする。
【0063】
【課題を解決するための手段】
本発明は、時間的に前後する現在画像或いは前画像に所定画素からなる基準ブロックを設定し、上記基準ブロックと同じ画素数からなる検査ブロックを、上記基準ブロックが設定された画像以外の画像の所定の移動範囲内で移動し、該検査ブロックを移動する毎に、検査ブロックと基準ブロックとの相関を示す評価関数値を検出し、上記検査ブロックの移動に対応して得られた各評価関数値の中から値が最小の評価関数値を検出し、この値が最小の評価関数値が形成された移動範囲内の所定位置の画素に基づいて上記検査ブロックの次の移動範囲を所定分狭め、再度、上記値が最小の評価関数値を検出する動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行い、この最小限度の移動範囲で検出された、値が最小の評価関数値に基づいて動きベクトルを検出する動きベクトル検出方法において、上記検査ブロックを、最小限度の移動範囲以外の移動範囲で移動した際に得られた評価関数値のうち、値が最小の評価関数値から順に値が小さい評価関数値を複数検出し、この複数検出された評価関数値どうしの差分と閾値とを比較し、上記複数の評価関数値どうしの差分が閾値よりも小さかった場合には、上記複数検出された評価関数値が形成された各移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を所定分狭めてそれぞれ設定し、上記複数の評価関数値どうしの差分が閾値よりも大きかった場合には、最小値の評価関数値が形成された移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を、上記最小限度の移動範囲、或いは、上記所定分以上狭めて設定し、この狭めて設定された各移動範囲で上記検査ブロックの移動をそれぞれ行って評価関数値を検出する動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行い、上記最小限度の移動範囲で検査ブロックを移動した際に得られた、値が最小の評価関数値に基づいて動きベクトルを検出することを特徴とする。
【0064】
また、本発明に係る動きベクトル検出方法は、上記最小限度の移動範囲以外の移動範囲で検査ブロックを移動することにより得られた評価関数値のうち、値が最小の評価関数値及び2番目に値が小さな評価関数値を検出し、上記値が最小の評価関数値及び2番目に値が小さな評価関数値が検出された各移動範囲内の所定位置の各画素に基づいて、上記検査ブロックの次の移動範囲を所定分狭めてそれぞれ設定することを特徴として上述の課題を解決する。
【0065】
また、本発明に係る動きベクトル検出方法は、複数回設定される上記検査ブロックの移動範囲のうち、所定の移動範囲で上記複数の評価関数値の検出を行うことを特徴として上述の課題を解決する。
【0067】
さらに、本発明は、時間的に前後する現在画像或いは前画像に所定画素からなる基準ブロックを設定し、上記基準ブロックと同じ画素数からなる検査ブロックを、上記基準ブロックが設定された画像以外の画像の所定の移動範囲内で移動し、該検査ブロックを移動する毎に、検査ブロックと基準ブロックとの相関を示す評価関数値を検出し、上記検査ブロックの移動に対応して得られた各評価関数値の中から値が最小の評価関数値を検出し、この値が最小の評価関数値が形成された移動範囲内の所定位置の画素に基づいて上記検査ブロックの次の移動範囲を所定分狭め、再度、上記値が最小の評価関数値を検出する動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行い、この最小限度の移動範囲で検出された、値が最小の評価関数値に基づいて動きベクトルを検出し、この動きベクトルに応じて前画像の動き補償を行い、上記現在画像と動き補償を行った前画像との差分を直交変換処理し量子化することにより、圧縮符号化した画像データを形成する画像データの符号化方法であって、上記動きベクトルを検出する際に、上記検査ブロックを、最小限度の移動範囲以外の移動範囲で移動した際に得られた評価関数値のうち、値が最小の評価関数値から順に値が小さい評価関数値を複数検出し、この複数検出された評価関数値どうしの差分と閾値とを比較し、上記複数の評価関数値どうしの差分が閾値よりも小さかった場合には、上記複数検出された評価関数値が形成された各移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を所定分狭めてそれぞれ設定し、上記複数の評価関数値どうしの差分が閾値よりも大きかった場合には、最小値の評価関数値が形成された移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を、上記最小限度の移動範囲、或いは、上記所定分以上狭めて設定し、この狭めて設定された各移動範囲で上記検査ブロックの移動をそれぞれ行って評価関数値を検出する動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行い、上記最小限度の移動範囲で検査ブロックを移動した際に得られた、値が最小の評価関数値に基づいて動きベクトルを検出することを特徴とする。
【0068】
【作用】
本発明に係る動きベクトル検出方法は、まず、時間的に前後する現在画像或いは前画像に所定画素からなる基準ブロックを設定し、上記基準ブロックと同じ画素数からなる検査ブロックを、上記基準ブロックが設定された画像以外の画像に設定する。
【0069】
具体的には、例えば上記現在画像として現在フレームの画像を、また、前画像として前フレームの画像を用い、上記現在フレームの画像に複数の上記基準ブロックを設定し、上記前フレームの画像の所定位置に上記検査ブロックを設定する。当該検出方法は、以下に説明するように、前フレームの所定の移動範囲内において上記検査ブロックを移動し、この検査ブロックの移動を行う毎に、該検査ブロックの画像と上記基準ブロックの画像とを比較して、該基準ブロックの画像に一致する画像の検査ブロックを検出する(マッチング処理)。そして、この検査ブロックに対して上記基準ブロックがどれだけ移動しているかを検出することにより、動きベクトルの検出を行うものである。
【0070】
すなわち、上記基準ブロック及び検査ブロックが設定されると、上記検査ブロックを大きな移動範囲内で移動し、この検査ブロックの移動を行う毎に該検査ブロックと基準ブロックとの相関を示す評価関数値を検出する。上記評価関数値としては、例えば該検査ブロックの各画素と上記基準ブロックの各画素との差分の絶対値和や、該絶対値和の二乗等がある。
【0071】
当該検出方法において、上記評価関数値として例えば上記絶対値和を用いるとすると、まず、上記検査ブロックの移動を行う毎に、検査ブロックの各画素と基準ブロックの各画素の差分の絶対値和を検出する。これにより、上記検査ブロックの移動回数分の絶対値和が検出されることとなる。
【0072】
次に、上記各絶対値和のうち、値が最小の絶対値和から順に複数の絶対値和を検出する。これは、例えば、値が最小の絶対値和,2番目に値が小さい絶対値和の2つを検出するようにしてもよいし、値が最小の絶対値和,2番目に値が小さい絶対値和,3番目に値が小さい絶対値和の3つを検出するようにしてもよく、その選択は自由である。
【0073】
次に、例えば上記値が最小の絶対値和及び2番目に値が小さい絶対値和の2つが選択されたとすると、上記値が最小の絶対値和が検出された検査ブロックの例えば中央に位置する画素を中心として上記最初の移動範囲以下の移動範囲の第1の移動範囲を設定するとともに、上記2番目に値が小さい絶対値和が検出された検査ブロックの例えば中央に位置する画素を中心として、上記第1の移動範囲と同範囲の第2の移動範囲を設定する。
【0074】
次に、上記第1の移動範囲内において上記検査ブロックを移動させ上記絶対値和の検出を行うとともに、上記第2の移動範囲内において上記検査ブロックを移動させ上記絶対値和の検出を行い、上記第1の移動範囲内で上記検査ブロックを移動させることにより検出された各絶対値和、及び、上記第2の移動範囲内で上記検査ブロックを移動させることにより検出された各絶対値和の中から、値が最小の絶対値和及び2番目に値が小さい絶対値和を検出する。
【0075】
上記絶対値和の値が小さいということは、その絶対値和が検出された位置の検査ブロックの画像と、上記基準ブロックとの画像との相関性が高いことを示している。このため、当該検出方法では、値が小さいものから順に複数の絶対値和を検出し、この各絶対値和に基づいて次の移動範囲を決定するようにしている。
【0076】
当該検出方法は、このように設定された移動範囲内で検査ブロックを移動させることにより検出された複数の絶対値和の中から、値が小さい順に複数の絶対値和を検出し、この複数の絶対値和に基づいて検査ブロックの移動範囲を徐々に狭めながら該絶対値和の検出を行う動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行う。
【0077】
そして、上記最小限度の移動範囲で検出された、複数の絶対値和のうち、値が最小の絶対値和に基づいて動きベクトルの検出を行う。
【0078】
設定された移動範囲内で上記検査ブロックを移動させることにより検出された複数の絶対値和のうち、値が最小の絶対値和のみに基づいて、上記検査ブロックの次の移動範囲を設定すると、上記値が最小の絶対値和が、最終的に正確な動きベクトルを検出できるものとは限らないため、該動きベクトルの誤検出を生ずる虞れがある。
【0079】
しかし、上記検査ブロックを、設定された移動範囲内で移動させることで検出された絶対値和のうち、値が小さいものから順に複数の絶対値和を検出し、この各絶対値和に基づいて次の移動範囲を設定することにより、上記検出した複数の絶対値和の数分だけ動きベクトルの検出範囲を広げることができる。従って、最終的に正確な動きベクトルを検出できる確率(動きベクトルの検出精度)を向上させることができる。
【0080】
このようなことから、検査ブロックの移動により得られた絶対値和の中から選択する絶対値和の数を多くすればするほど動きベクトルの検出精度を向上させることができるが、該選択する絶対値和の数を多くするとこれに伴い計算量が増大する。このため、上記各絶対値和の中からいくつ絶対値和を選択するかは、得たい精度に応じて設定することとなる。
【0081】
ここで、上記検査ブロックの移動範囲を設定する毎に上記複数の絶対値和の検出を行うようにすると検出精度は向上するが計算量が増大する。このため、本発明に係る動きベクトル検出方法では、上記複数回設定される検査ブロックの移動範囲のうち、所定の移動範囲でのみ、上記複数の絶対値和を検出するようにした。
【0082】
すなわち、動きベクトルの検出精度は、第1回目に設定された移動範囲で正確な動きベクトルを検出することができる絶対値和を誤検出してしまうと、最終的に不正確な動きベクトルが検出されてしまう等のように、第1回目に設定された移動範囲で検出される絶対値和に依存する。
【0083】
このため、例えば第1回目に設定された移動範囲でのみ、上記絶対値和の選択数を増やすようにする。これにより、上記第1回目に設定された移動範囲で、上記正確な動きベクトルを検出することができる絶対値和を選択することができる。従って、計算量の増大を極力抑えて正確な動きベクトルを検出することができる。
【0084】
なお、第1回目に設定された移動範囲でのみ上記絶対値和の選択数を増やす以外に、第2回目に設定された移動範囲でのみ絶対値和の選択数を増やしたり、第3回目に設定された移動範囲でのみ絶対値和の選択数を増やす等のように、1回の移動範囲でのみ絶対値和の選択数を増やしてもよいし、或いは、第1回目及び第3回目に設定された移動範囲で上記絶対値和の選択数を増やす等のように、複数の移動範囲を選択して上記絶対値和の選択数を増やすようにしてもよい。
【0085】
この場合、複数の絶対値和を選択する移動範囲を省略した分だけ計算量の増大を抑制することができる。
【0086】
次に、本発明に係る動きベクトル検出方法は、上記最小限度の移動範囲以外の移動範囲で検査ブロックを移動することにより得られた複数の絶対値和の差分を検出し、この複数の絶対値和どうしの差分と閾値とを比較する。
【0087】
上記閾値は、例えば絶対値和が、正確な動きベクトルを検出できる値に設定されており、この閾値と上記複数の絶対値和の差分とを比較することにより、該複数の絶対値和により正確な動きベクトルを検出できるか否かを検出することができる。
【0088】
上記複数の絶対値和の差分が閾値よりも小さかった場合には、上述のように上記複数検出された絶対値和が形成された各移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を所定分狭めてそれぞれ設定して動きベクトルの検出を行う。これにより、検査ブロックの移動範囲を設定する毎に値の小さな複数の絶対値和を検出し、該複数の絶対値和に基づいて動きベクトルの検出を行うことができるため、上述の動きベクトル検出方法と計算量としては変わらないが、動きベクトルの検出精度を向上させることができる。
【0089】
一方、上記複数の絶対値和の差分が閾値よりも大きかった場合には、各絶対値和の差が大きく、この絶対値和のうち最小の値を有する絶対値和が正確な動きベクトルを検出することができる絶対値和であることを示している。
【0090】
このため、当該検出方法では、上記複数の絶対値和の差分が閾値よりも大きかった場合には、該複数の絶対値和のうち、値が最小の絶対値和が形成された移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を、上記最小限度の移動範囲、或いは、上記所定分以上狭めてそれぞれ設定して動きベクトルの検出を行う。
【0091】
具体的には、例えば第1回目に設定された移動範囲で検査ブロックの移動を行うことにより検出された各絶対値和の差分が上記閾値よりも大きかった場合には、次に検査ブロックを移動する範囲を上記各絶対値和に基づいて最小限度の移動範囲まで狭めて動きベクトルの検出を行う。或いは、次の移動範囲以下の移動範囲となるように、上記各絶対値和に基づいて移動範囲を狭めて動きベクトルの検出を行う。
【0092】
これにより、第1回目に設定された移動範囲から上記最小限度の移動範囲までの中間の移動範囲まで、或いは、次の移動範囲以下の移動範囲に狭めた分の演算を省略することができ、検出精度を維持しながら動きベクトルの検出に必要な計算量の増大を極力抑制することができる。
【0093】
次に、本発明に係る画像データの符号化方法は、動きベクトルに応じて画像データの圧縮符号化を行う画像データの符号化方法であって、上記動きベクトルの検出に、上述のように、設定された移動範囲内で検査ブロックを移動させることにより検出された複数の絶対値和の中から、値が小さい順に複数の絶対値和を検出し、この複数の絶対値和に基づいて検査ブロックの移動範囲を徐々に狭めながら該絶対値和の検出を行う動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行い、上記最小限度の移動範囲で検出された、複数の絶対値和のうち、値が最小の絶対値和に基づいて動きベクトルの検出を行う方法を用いる。
【0094】
これにより、画像データの圧縮符号化に正確な動きベクトルを用いることができるため、画像の動きに応じて正確に画像データを圧縮符号化することができるうえ、圧縮する画像データのデータ数を削減することができ、圧縮符号化効率の向上を図ることができる。
【0095】
なお、上記現在画像として現在フレームの画像を、また、前画像として前フレームの画像を用いることとしたが、これは、上記現在画像として現在フレームの画像を、また、前画像として2フレーム前の画像,3フレーム前の画像・・・を用いるようにしてもよい。同じく、上記現在画像として現在フィールドの画像を、また、前画像として前フィールドの画像、或いは、2フィールド前の画像,3フィールド前の画像・・・を用いるようにしてもよい。
【0096】
また、上記基準ブロックを現在画像内に設定し、上記検査ブロックを前画像内に設定することとしたが、これは、逆に、前画像内に基準ブロックを設定し、現在画像内に検査ブロックを設定して、該現在画像内において検査ブロックを移動させて動きベクトルの検出を行うようにしてもよい。
【0097】
【実施例】
以下、本発明に係る動きベクトル検出方法及び画像データの符号化方法の好ましい実施例について図面を参照しながら詳細に説明する。本発明に係る動きベクトル検出方法は、現在画像中に所定画素数からなる基準ブロックを複数設定し、該基準ブロックと同画素の検査ブロックを、最初のステップでは大きく移動させて基準ブロックと検査ブロックとの相関性を検出し(マッチング処理)、続くステップでは検出された相関性に応じて移動範囲の位置を設定するとともに、該移動範囲を徐々に狭めながら相関性を検出し、最終的なステップで検出された検査ブロックの位置に対する上記基準ブロックの位置に基づいて動きベクトルの検出を行うマルチステップサーチ法である。
【0098】
上記マルチステップサーチとしては、上記検査ブロックの移動範囲を2段階に分けて徐々に狭めていく2ステップサーチ、及び、上記検査ブロックの移動範囲を3段階に分けて徐々に狭めていく3ステップサーチ等がある。
【0099】
本発明の第1の実施例に係る動きベクトル検出方法は、上記2ステップサーチに適用したものであり、図1(a)に示すように第1ステップとして、前フレームの中心に位置する画素(図中●=原点)1を中心とする第1の移動範囲SV1を設定し、この第1の移動範囲SV1内において上記マッチング処理を行って相関性の高い順に3つの検査ブロックを検出する。そして、同図(b)に示すように、第2ステップにおいて、上記相関性の高い順に選択された3つの検査ブロックに基づいて、移動範囲の狭められた第1〜第3の3つの移動範囲SV21〜SV23を設定してそれぞれマッチング処理を行い、該第2ステップでの相関性の一番高い検査ブロックに基づいて動きベクトルの検出を行うものである。
【0100】
すなわち、当該第1の実施例に係る動きベクトル検出方法は、図7に示す画像データの符号化装置の動きベクトル検出回路202に適用することができる。
【0101】
上記図7に示す画像データの符号化装置は、入力端子201を介して現在フレームの画像データが供給される。この現在フレームの画像データは、動きベクトル検出回路202及び減算器203に供給される。
【0102】
上記動きベクトル検出回路202には、上記現在フレームの画像データの他、以下に説明するフレームメモリ205からの前フレームの画像データが供給されている。上記動きベクトル検出回路202は、上記現在フレームの画像データ及び前フレームの画像データに基づいて画像の動きを検出することにより動きベクトルを形成し、これを動き補償回路204に供給する。
【0103】
上記動き補償回路204には、フレームメモリ205から前フレームの画像データが供給されている。上記動き補償回路204は、上記動きベクトル検出回路202からの動きベクトルに基づいて、上記前フレームの画像データに動き補償処理を施し、これを上記減算器203及び加算器206に供給する。
【0104】
上記減算器203は、上記現在フレームの画像データと、上記動き補償処理の施された前フレームの画像データとを減算処理することにより、現在フレームの画像データと前フレームの画像データとの差分を示す差分データを形成し、これを直交変換回路(DCT:Discrete Cosine Transform 回路)207に供給する。
【0105】
上記DCT回路207は、上記差分データを所定画素数のブロック毎に周波数軸上に変換してDCTブロックを形成し、これを量子化回路208に供給する。上記量子化回路208は、上記DCTブロックのレベルに応じて量子化ステップ可変し、この量子化ステップにより上記DCTブロックに量子化処理を施すことにより圧縮画像データを形成し、これを出力端子209を介して例えばディスク記録装置等の外部機器に供給するとともに、逆量子化回路210に供給する。
【0106】
上記逆量子化回路210は、上記量子化回路208で選択された量子化ステップとは逆の量子化ステップで、上記圧縮画像データに逆量子化処理を施すことにより、量子化処理される前のDCTブロックを再生し、これを逆DCT回路211に供給する。上記逆DCT回路211は、上記再生されたDCTブロックに逆DCT処理を施すことにより、DCTブロック化される前の差分データを形成し、これを上記加算器206に供給する。
【0107】
上記加算器206には、上記動き補償回路204からの動き補償された前フレームの画像データが別に供給されている。上記加算器206は、上記動き補償された前フレームの画像データと、上記逆DCT回路211からの差分データとを加算処理することにより、現在フレームの画像データを再生し、これをフレームメモリ205に供給する。
【0108】
上記フレームメモリ205に供給された現在フレームの画像データは、1フレーム分の遅延が施され読み出される。これにより、上記現在フレームの画像データは、読み出しの段階で前フレームの画像データとされ、上記動き補償回路204及び動きベクトル検出回路202に供給される。
上述のように、上記動き補償回路204は、上記動きベクトル検出回路202からの動きベクトルに応じて上記前フレームの画像データに動き補償処理を施し、これを上記減算器203及び加算器206に供給する。以後、各回路において、上述の動作が繰り返される。
【0109】
このように、上記画像データの符号化装置は、動きベクトルに基づいて動きベクトル補償された前フレームの画像データと、現在フレームの画像データとの差分を符号化して出力する。これにより、画像データの高能率圧縮を行うことができる。
【0110】
ここで、上記動きベクトル検出回路202は、図11に示すような構成を有しており、上記図7に示す入力端子201からの現在フレームの画像データが入力端子253を介して現フレームメモリ251に供給されて記憶され、上記図7に示すフレームメモリ205からの前フレームの画像データが入力端子254を介して前フレームメモリ252に供給されて記憶される。
【0111】
コントローラ255は、図8に示すように上記現フレームメモリ251に記憶された現在フレームの画像221の中央部分の画像データ(N画素×Mライン)からなる基準ブロック223の画像データを読み出すように該現フレームメモリ251を読み出し制御する。この現フレームメモリ251から読み出された基準ブロック223は、差分検出回路257に供給される。
【0112】
また、上記コントローラ255は、これとともに、上記前フレームメモリ252に記憶された上記図8に示す前フレームの画像データ222のうち、第1ステップとして図1(a)に示すように上記基準ブロック223の中心画素に対応する図中●で示す該前フレームの画像データ222の中心画素(原点)1を検出するとともに、図中太線で示す上記原点1を中心とした略々正方形状の第1の移動範囲SV1を設定する。
【0113】
上記第1の移動範囲SV1は、図1(a)に示すように4つの角部に画素2〜画素5が位置するようになっている。また、1ラインおきに設定された計7ラインからなっており、上記1ラインには、1画素おきに設定された計7点の画素(検索点)を有している。すなわち、上記第1の移動範囲SV1は、計49点の検索点で構成されている。
【0114】
このような第1の移動範囲SV1が設定されると、上記コントローラ255は、例えば上記検索点2を中心に有する、上記図8に示す上記基準ブロック223と同画素の検査ブロック224を設定し、この検査ブロック224の画像データが読み出されるように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0115】
また、上記コントローラ255は、これに続いて、上記49点の各検索点を中心とする検査ブロック224を次々と設定し、該設定した検査ブロック224の画像データが読み出されるように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0116】
すなわち、上記コントローラ255は、上記第1の移動範囲SV1内において、2画素間隔で(1画素おきに)検査ブロック224を移動しながら該検査ブロック224の画像データの読み出しを行うように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
上記各検査ブロック224の画像データは、それぞれ上記差分検出回路257に供給される。
【0117】
上記差分検出回路257は、上記基準ブロック223の画像データと、上記各検査ブロック224の画像データとを同位置の画素毎に比較してその差分を検出し、この各差分データを絶対値和検出回路258に供給する。
【0118】
上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロックどおしの比較(マッチング処理)により検出される差分データの絶対値を全て加算して絶対値和データを形成する。これにより、上記検査ブロック224の移動を行った分である計49個の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0119】
上記判断回路259は、例えば上記第1の移動範囲SV1内を上記検査ブロック224を2画素間隔で移動して得られた49個の絶対値和データを、その絶対値和データが検出された検査ブロック224の位置(検索点)に対応して記憶できるメモリを有している。上記コントローラ255は、上記絶対値和検出回路258から判断回路259に供給される絶対値和データを、その絶対値和データが形成された上記検査ブロック224の位置に対応して記憶されるように、上記メモリを書き込み制御する。
【0120】
上記コントローラ255は、上記判断回路259のメモリに上記49個の絶対値和データが記憶されると、この絶対値和データの中から最小値の絶対値和データ,2番目に値が小さい絶対値和データ、及び、3番目に値が小さい絶対値和データを検出する。
【0121】
上記値が最小の絶対値和データは、上記検査ブロック224と基準ブロック223との間の各画像の相関性が高いことを示しているが、必ずしも上記値が最小の絶対値和データが検出された検査ブロック224と基準ブロック223との各画像が一致しているとは限らない。また、この第1ステップにおいて正確な動きベクトルを検出できる絶対値和データを検出しなければ、後に続く第2ステップではこの第1ステップで検出された絶対値和データに基づいて動きベクトルの検出を行うため、該第2ステップにおいて誤った動きベクトルが検出される可能性が高くなる。このため、上記コントローラ255は、この第1ステップでの絶対値和データの検出を慎重化すべく、値が小さいものから順に3つの絶対値和データを検出する。
【0122】
上記コントローラ255は、上記3つの絶対値和データを検出すると、図1(a)に示すように上記最小値の絶対値和データが検出された検査ブロック224の中心の検索点6(図中×で示す)、2番目に値が小さい絶対値和データが検出された検査ブロック224の中心の検索点7(図中△で示す)、及び、3番目に値が小さい絶対値和データが検出された検査ブロック224の中心の検索点8(図中◇で示す)を検出する。
【0123】
そして、図1(b)に示すように第2ステップとして、上記検索点6を中心とした略々正方形状の第1の移動範囲SV21,上記検索点7を中心とした略々正方形状の第2の移動範囲SV22、及び、上記検索点8を中心とした略々正方形状の第3の移動範囲SV23を設定する。
【0124】
上記各移動範囲SV21,SV22,SV23は、それぞれ4つの角部に検索点10〜13,検索点15〜18,検索点20〜23を有している。また、上記各移動範囲SV21,SV22,SV23は、それぞれ1ライン毎に設定された計3ラインからなっており、上記1ラインには、1画素毎に設定された計3点の画素(検索点)を有している。すなわち、上記各移動範囲SV21,SV22,SV23は、それぞれ計9点の検索点で構成されている。
【0125】
このような各移動範囲SV21,SV22,SV23が設定されると、上記コントローラ255は、該各移動範囲SV21,SV22,SV23に沿って検査ブロック224を移動し、該移動する毎にその検査ブロック224の画像データを読み出すように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0126】
なお、この第2ステップでは、上記各移動範囲SV21,SV22,SV23の中心となる各検索点6〜8に係る絶対値和データは、それぞれ上記第1ステップにおいて既に検出済であるため、上記コントローラ255は、上記各移動範囲SV21,SV22,SV23において、上記各検索点6〜8をぬかして検査ブロック224を移動するように、上記i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0127】
この検査ブロック224の移動により読み出された画像データは、それぞれ上記差分検出回路257に供給される。
【0128】
上記差分検出回路257は、上記基準ブロック223の画像データと、上記各検査ブロック224の画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロックどおしの比較により検出される差分データを全て加算して絶対値和データを形成する。
【0129】
これにより、上記各移動範囲SV21,SV22,SV23に沿って検査ブロック224の移動を行った分である計27個(上記各検索点6〜8における3つの絶対値和データも含む。)の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0130】
上記判断回路259は、上記絶対値和検出回路258から供給される上記27個の絶対値和データを、その絶対値和データが形成された各移動範囲SV21,SV22,SV23に対応するメモリ上のアドレスに一旦記憶する。そして、上記全ての絶対値和データが上記メモリ上に記憶されると、この絶対値和データの中から最小値の絶対値和データを検出し、この最小値の絶対値和データを上記コントローラ255に供給する。
【0131】
上記絶対値和データの値が最小であるということは、上記検査ブロック224と基準ブロック223との間の各画像の相関性が高いことを示している。従って、上記基準ブロック223に対して、上記最小値の絶対値和データが検出された検査ブロック224がどれだけ離れているかを検出することにより、画像の動きベクトルを検出することができる。
【0132】
このため、上記コントローラ255は、上記最小値の絶対値和データに基づいて、その絶対値和データが検出された検査ブロック224の中心に位置する、上記前フレームメモリ252上の検索点のアドレスを検出する。そして、この検索点のアドレスと、上記基準ブロック223の現フレームメモリ251上の中心画素のアドレスとの差分を検出することにより、上記最小値の絶対値和データが検出された検査ブロック224に対する上記基準ブロック223の動き分(動きベクトル)を検出し、この動きベクトルを出力端子260を介して上記図7に示す動き補償回路204に供給する。
【0133】
これにより、上記図7に示した画像データの符号化装置において、画像データの圧縮符号化処理を行うことができる。
【0134】
上述のように、この第1の実施例に係る動きベクトル検出方法では、2ステップサーチにおける第1ステップにおいて、値が小さいものから順に3つの絶対値和データを検出するようにしている。通常の2ステップサーチでは、上記検索点の数が第1ステップにおいて49点、第2ステップにおいて8点の計57点であるが、当該動きベクトル検出方法では、第1ステップにおいて49点、第2ステップにおいて24点の計73点であり、従来と比較して16点の検索点の増加となり、多少、計算量が増加するが、第1ステップにおいて正確な動きベクトルを検出できる絶対値和データの検出確率を高めることができる。従って、計算量の増加を極力抑制して動きベクトルの検出精度の向上を図ることができる。
【0135】
なお、この第1の実施例に係る動きベクトル検出方法の説明では、本発明に係る動きベクトル検出方法を2ステップサーチに適用することとしたが、これは、3ステップサーチ等にも適用することができる。また、第1ステップにおいて、値が小さいものから順に3つの絶対値和データを検出することとしたが、これは、値が小さいものから順に2つ選択するようにしてもよい。この場合、第1ステップにおいて検出される絶対値和データの数が1つ減るため、上記値が小さいものから順に3つの絶対値和データを検出するときよりも動きベクトルの検出精度は多少落ちる虞れがあるが、第2ステップにおける検索点の数を16点とすることができるため、従来の2ステップサーチと比較して8点の検索点の増加に止めることができ、従来と比較して動きベクトルの検出精度の向上を図ることができるうえ、計算量の相加を抑制することができる。
【0136】
ここで、上記絶対値和データの検出点数を値の小さいものから順に4点あるいは5点等のように多くすればするほど、上記動きベクトルの検出精度の向上を図ることができるが、該絶対値和データの検出点数の増加にともない計算量が増大する。また、上記検査ブロック224の移動範囲を設定する毎に上記複数の絶対値和データの検出を行うようにすると検出精度は向上するが計算量が増大する。このため、本発明の第2の実施例に係る動きベクトル検出方法では、複数回設定される検査ブロック224の移動範囲のうち、所定の移動範囲でのみ、上記複数の絶対値和を検出するようにした。
【0137】
すなわち、第1ステップにおける移動範囲で正確な動きベクトルを検出することができる絶対値和データを検出できないと、最終的に不正確な動きベクトルが検出されてしまう。このため、第1ステップにおいて、どれだけ確率よく、正確な動きベクトルを検出することができる絶対値和データを検出することができるかにより、上記動きベクトルの検出精度は左右される。
【0138】
このため、当該第2の実施例に係る動きベクトル検出方法では、例えば3ステップサーチにおける第1ステップにおいてのみ最初値の絶対値和データ及び2番目に値が小さい絶対値和データの計2点の絶対値和データを選択するようにした。
【0139】
この第2の実施例に係る動きベクトル検出方法は、上述の第1の実施例に係る動きベクトル検出方法と同様に、図11に示す動きベクトル検出回路202に適用することができる。
【0140】
すなわち、上記コントローラ255は、図2(a)に示すように3ステップサーチの第1ステップとなると、上記前フレームメモリ252に同図(a)中太線で示す略々正方形状の第1の移動範囲SV1を設定する。
【0141】
上記第1の移動範囲SV1は、図2(a)中●で示すように、上記基準ブロック223の中心画素に対応する該前フレームの画像データ222の中心画素(原点)1を中心として形成されており、その4つの角部に検索点31〜34を有している。各検索点の間は、それぞれ4画素間隔となっており、この第1の移動範囲全体で計9点の検索点を有している。
【0142】
このような第1の移動範囲SV1が設定されると、上記コントローラ255は、例えば上記検索点31を中心に有する、上記検査ブロック224を設定し、この検査ブロック224の画像データが読み出されるように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0143】
また、上記コントローラ255は、これに続いて、上記9点の各検索点を中心とする検査ブロック224を次々と設定し、該設定した検査ブロック224の画像データが読み出されるように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0144】
すなわち、上記コントローラ255は、上記第1の移動範囲SV1内において、4画素間隔で検査ブロック224を移動しながら該検査ブロック224の画像データの読み出しを行うように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
上記各検査ブロック224の画像データは、それぞれ上記差分検出回路257に供給される。
【0145】
上記差分検出回路257は、上記基準ブロック223の画像データと、上記各検査ブロック224の画像データとを同位置の画素毎に比較してその差分を検出し、この各差分データを絶対値和検出回路258に供給する。
【0146】
上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のマッチング処理で検出された差分データの絶対値を全て加算して絶対値和データを形成する。これにより、上記検査ブロック224の移動を行った分である計9個の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0147】
上記判断回路259は、例えば上記第1の移動範囲SV1内を上記検査ブロック224を4画素間隔で移動して得られた9個の絶対値和データを、その絶対値和データが検出された検査ブロック224の位置(検索点)に対応してメモリ上に記憶する。
【0148】
上記コントローラ255は、上記判断回路259のメモリに上記9個の絶対値和データが記憶されると、この絶対値和データの中から最小値の絶対値和データ、及び、2番目に値が小さい絶対値和データを検出するとともに、上記最小値の絶対値和データが検出された検査ブロック224の中心の検索点33(図中×で示す)、2番目に値が小さい絶対値和データが検出された検査ブロック224の中心の検索点35(図中△で示す)を検出する。
【0149】
そして、図2(b)に示すように第2ステップとして、上記検索点33を中心とした略々正方形状の第1の移動範囲SV21、及び、上記検索点35を中心とした略々正方形状の第2の移動範囲SV22を設定する。
【0150】
上記各移動範囲SV21,SV22は、それぞれ4つの角部に検索点40〜43,検索点45〜48を有している。また、上記各移動範囲SV21,SV22は、1画素おきに設定された計3点の検索点を有するラインを、1ラインおきに計3ライン設定することにより形成されている。すなわち、上記各移動範囲SV21,SV22は、それぞれ計9点の検索点で構成されている。
【0151】
このような各移動範囲SV21,SV22が設定されると、上記コントローラ255は、該各移動範囲SV21,SV22に沿って検査ブロック224が移動し、該移動する毎にその検査ブロック224の画像データが読み出されるように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0152】
なお、この第2ステップでは、上記各移動範囲SV21,SV22の中心となる各検索点33,35に係る絶対値和データは、それぞれ上記第1ステップにおいて既に検出済であるため、上記コントローラ255は、上記各移動範囲SV21,SV22において、上記各検索点33,35をぬかして検査ブロック224を移動するように、上記i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0153】
この検査ブロック224の移動により読み出された画像データは、それぞれ上記差分検出回路257に供給される。
【0154】
上記差分検出回路257は、上記基準ブロック223の画像データと、上記各検査ブロック224の画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロックどおしの比較により検出される差分データを全て加算して絶対値和データを形成する。
【0155】
これにより、上記各移動範囲SV21,SV22に沿って検査ブロック224の移動を行った分である計18個(上記各検索点33,35における2つの絶対値和データも含む。)の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0156】
上記判断回路259は、上記絶対値和検出回路258から供給される上記18個の絶対値和データを、その絶対値和データが形成された各移動範囲SV21,SV22に対応するアドレスに一旦記憶する。そして、上記メモリに全ての絶対値和データが記憶されると、この絶対値和データの中から最小値の絶対値和データを検出し、この最小値の絶対値和データを上記コントローラ255に供給するとともに、この最小値の絶対値和データが検出された検査ブロック224の中心の検索点46(図中◇で示す)を検出する。
【0157】
次に、上記コントローラ255は、図2(c)に示すように第3ステップとして、上記検索点46を中心とした略々正方形状の移動範囲SV3を設定する。
【0158】
上記移動範囲SV3は、4つの角部に検索点50〜53を有しており、1画素毎に設定された計3点の検索点を有するラインを、順に計3ライン設定することにより形成されている。すなわち、上記移動範囲SV3は、計9点の検索点で構成されている。
【0159】
このような移動範囲SV3が設定されると、上記コントローラ255は、上記移動範囲SV3に沿って検査ブロック224を移動し、該移動する毎にその検査ブロック224の画像データを読み出すように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0160】
なお、この第3ステップでは、上記移動範囲SV3の中心となる検索点46に係る絶対値和データは、上記第2ステップにおいて既に検出済であるため、上記コントローラ255は、上記移動範囲SV3において、上記検索点46をぬかして検査ブロック224を移動するように、上記i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0161】
この検査ブロック224の移動により読み出された画像データは、それぞれ上記差分検出回路257に供給される。
【0162】
上記差分検出回路257は、上記基準ブロック223の画像データと、上記検査ブロック224の画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロックどおしの比較により検出される差分データを全て加算して絶対値和データを形成する。
【0163】
これにより、上記移動範囲SV3に沿って検査ブロック224の移動を行った分である計9個(上記各検索点46における1つの絶対値和データも含む。)の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0164】
上記判断回路259は、上記絶対値和検出回路258から供給される上記9個の絶対値和データを、その絶対値和データが形成された移動範囲SV3に対応するメモリ上のアドレスに一旦記憶する。そして、上記メモリに全ての絶対値和データが記憶されると、この絶対値和データの中から最小値の絶対値和データを検出し、この最小値の絶対値和データを上記コントローラ255に供給する。
【0165】
上記コントローラ255は、上記第3ステップで検出された最小値の絶対値和データに基づいて、その絶対値和データが検出された検査ブロック224の中心に位置する、上記前フレームメモリ252上の検索点のアドレスを検出する。そして、この検索点のアドレスと、上記基準ブロック223の現フレームメモリ251上の中心画素のアドレスとの差分を検出することにより、上記最小値の絶対値和データが検出された検査ブロック224に対する上記基準ブロック223の動き分(動きベクトル)を検出し、この動きベクトルを出力端子260を介して上記図7に示す動き補償回路204に供給する。
【0166】
これにより、上記図7に示した画像データの符号化装置において、画像データの圧縮符号化処理を行うことができる。
【0167】
この第2の実施例に係る動きベクトル検出方法では、3ステップサーチにおける第1ステップにおいてのみ複数の絶対値和データ、例えば最小値の絶対値和データ及び2番目に値の小さい絶対値和データを検出するようにしている。通常の3ステップサーチでは、上記検索点の数が第1ステップにおいて9点、第2ステップにおいて8点,第3ステップにおいて8点の計25点であるが、当該動きベクトル検出方法では、第1ステップにおいて9点、第2ステップにおいて16点、第3ステップにおいて8点の計33点であり、従来と比較して8点の検索点の増加となり、多少、計算量が増加するが、第1ステップにおいて正確な動きベクトルを検出できる絶対値和データの検出確率を高めることができる。
【0168】
上述のように、動きベクトルの検出精度は、第1ステップにおいて、どれだけ確率よく、正確な動きベクトルを検出することができる絶対値和データを検出することができるかで左右されるが、上記第1ステップにおける、正確な動きベクトルを検出できる絶対値和データの検出確率を高めることができるため、動きベクトルの検出精度の向上を図ることができる。しかも、上記複数の絶対値和データの検出を第1ステップでのみ適用しているため、計算量の増加を最低限に抑えることができる。
【0169】
なお、この第2の実施例に係る動きベクトル検出方法の説明では、本発明に係る動きベクトル検出方法を3ステップサーチに適用することとしたが、これは、2ステップサーチ等にも適用することができる。また、第1ステップにおいて、値が小さいものから順に2つの絶対値和データを検出することとしたが、これは、値が小さいものから順に3つ,4つ或いは5つ選択するようにしてもよい。この場合、第1ステップにおいて検出される絶対値和データの数が増えた分計算量が増加するが、その分、正確な動きベクトルを検出できる絶対値和データの検出確率を高めることができ、動きベクトルの検出精度をさらに向上させることができる。
【0170】
また、第1ステップのみ複数の絶対値和データを検出するようにしたが、これは、第2ステップのみ複数の絶対値和データを検出するようにしてもよい。
【0171】
次に、本発明の第3の実施例に係る動きベクトル検出方法の説明をする。上述の第2の実施例に係る動きベクトル検出方法では、所望のステップにおいてのみ複数の絶対値和データを検出することにより計算量の削減を図ったが、この第3の実施例に係る動きベクトル検出方法では、所望のステップにおいてのみ複数の絶対値和データを検出するとともに、この検出した絶対値和データの差分を閾値と比較し、この比較結果に応じて後のステップの移動範囲を決定することにより、さらなる計算量の削減を図った。
【0172】
すなわち、この第3実施例に係る動きベクトル検出方法は、図3に示すような動きベクトル検出回路に適用することができる。なお、この図3に示す動きベクトル検出回路は、3ステップサーチにより動きベクトルの検出を行うものとする。また、上記図3に示す動きベクトル検出回路において、上記図11に示した動きベクトル検出回路202と同じ動作を示す箇所には同符号を付し、その詳細な説明を省略する。
【0173】
上記図3において、上記コントローラ255は3ステップサーチの第1ステップとなると前フレームメモリ252に、図4中太線で示すような略々正方形状の第1の移動範囲SV1を設定する。
【0174】
上記第1の移動範囲SV1は、図4中●で示す中心画素(原点)1を中心として形成されており、その4つの角部に検索点71〜74を有している。この第1の移動範囲SV1全体では計9点の検索点を有しており、各検索点の間はそれぞれ4画素間隔となっている。
【0175】
このような第1の移動範囲SV1が設定されると、上記コントローラ255は、例えば上記検索点71を中心に有する検査ブロック224を設定し、この検査ブロック224の画像データが読み出されるように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0176】
また、上記コントローラ255は、これに続いて、上記9点の各検索点を中心とする検査ブロック224を次々と設定し、該設定した検査ブロック224の画像データが読み出されるように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0177】
すなわち、上記コントローラ255は、上記第1の移動範囲SV1内において、4画素間隔で検査ブロック224を移動しながら該検査ブロック224の画像データの読み出しを行うように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
上記各検査ブロック224の画像データは、それぞれ上記差分検出回路257に供給される。
【0178】
上記差分検出回路257は、上記基準ブロック223の画像データと、上記各検査ブロック224の画像データとを同位置の画素毎に比較してその差分を検出し、この各差分データを絶対値和検出回路258に供給する。
【0179】
上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のマッチング処理で検出された差分データの絶対値を全て加算して絶対値和データを形成する。これにより、上記検査ブロック224の移動を行った分である計9個の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0180】
上記判断回路259は、例えば上記第1の移動範囲SV1に沿って、上記検査ブロック224を4画素間隔で移動して得られた9個の絶対値和データを、その絶対値和データが検出された検査ブロック224の位置(検索点)に対応してメモリ上に記憶する。
【0181】
上記コントローラ255は、上記判断回路259のメモリに上記9個の絶対値和データが記憶されると、この絶対値和データの中から最小値の絶対値和データ、及び、2番目に値が小さい絶対値和データを検出するとともに、該最小値の絶対値和データ、及び、2番目に値が小さい絶対値和データの差分を検出する。
【0182】
上記判断回路259には、閾値発生回路261からの、例えば正確な動きベクトルを検出できる上記最小値の絶対値和データ及び2番目に値が小さい絶対値和データの差分値の限界値が閾値データとして供給されている。上記判断回路259は、この閾値データと、上記最小値の絶対値和データ及び2番目に値が小さい絶対値和データの差分値とを比較し、この比較データを上記コントローラ255に供給する。
【0183】
上記閾値データは、上記正確な動きベクトルを検出できる差分値の限界値となっている。このため、上記最小値の絶対値和データと2番目に値が小さい絶対値和データとの差分と上記閾値データとを比較することにより、その絶対値和データにより正確な動きベクトルを検出できるか否かを検出することができる。
【0184】
このため、上記コントローラ255は、上記閾値データよりも上記差分値の方が小さかった場合、さらなる詳細な検出が必要あるとして、図5(a)に示すように第2ステップに移行する。
【0185】
上記コントローラ255は、上記第2ステップとなると、上記最小値の絶対値和データが検出された検査ブロック224の中心の検索点73(図中×で示す)、2番目に値が小さい絶対値和データが検出された検査ブロック224の中心の検索点75(図中△で示す)を検出する。
【0186】
そして、図5(a)に示すように第2ステップとして、上記検索点73を中心とした略々正方形状の第1の移動範囲SV21、及び、上記検索点75を中心とした略々正方形状の第2の移動範囲SV22を設定する。
【0187】
上記各移動範囲SV21,SV22は、それぞれ4つの角部に検索点77〜80,検索点81〜84を有している。また、上記各移動範囲SV21,SV22は、1画素おきに設定された計3点の検索点を有するラインを、1ラインおきに計3ライン設定することにより形成されている。すなわち、上記各移動範囲SV21,SV22は、それぞれ計9点の検索点で構成されている。
【0188】
このような各移動範囲SV21,SV22が設定されると、上記コントローラ255は、該各移動範囲SV21,SV22に沿って検査ブロック224が移動し、該移動する毎にその検査ブロック224の画像データが読み出されるように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0189】
なお、この第2ステップでは、上記各移動範囲SV21,SV22の中心となる各検索点33,35に係る絶対値和データは、それぞれ上記第1ステップにおいて既に検出済であるため、上記コントローラ255は、上記各移動範囲SV21,SV22において、上記各検索点33,35をぬかして検査ブロック224を移動するように、上記i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0190】
この検査ブロック224の移動により読み出された画像データは、それぞれ上記差分検出回路257に供給される。
【0191】
上記差分検出回路257は、上記基準ブロック223の画像データと、上記各検査ブロック224の画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロックどおしの比較により検出される差分データを全て加算して絶対値和データを形成する。
【0192】
これにより、上記各移動範囲SV21,SV22に沿って検査ブロック224の移動を行った分である計18個(上記各検索点73,75における2つの絶対値和データも含む。)の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0193】
上記判断回路259は、上記絶対値和検出回路258から供給される上記18個の絶対値和データを、その絶対値和データが形成された各移動範囲SV21,SV22に対応するアドレスに一旦記憶する。そして、上記メモリに全ての絶対値和データが記憶されると、この絶対値和データの中から最小値の絶対値和データを検出し、この最小値の絶対値和データを上記コントローラ255に供給するとともに、この最小値の絶対値和データが検出された検査ブロック224の中心の検索点82(図中◇で示す)を検出する。
【0194】
次に、上記コントローラ255は、図5(b)に示すように第3ステップとして、上記検索点82を中心とした略々正方形状の移動範囲SV3を設定する。
【0195】
上記移動範囲SV3は、4つの角部に検索点86〜89を有しており、1画素毎に設定された計3点の検索点を有するラインを、順に計3ライン設定することにより形成されている。すなわち、上記移動範囲SV3は、計9点の検索点で構成されている。
【0196】
このような移動範囲SV3が設定されると、上記コントローラ255は、上記移動範囲SV3に沿って検査ブロック224を移動し、該移動する毎にその検査ブロック224の画像データを読み出すように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0197】
なお、この第3ステップでは、上記移動範囲SV3の中心となる検索点82に係る絶対値和データは、上記第2ステップにおいて既に検出済であるため、上記コントローラ255は、上記移動範囲SV3において、上記検索点82をぬかして検査ブロック224を移動するように、上記i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0198】
この検査ブロック224の移動により読み出された画像データは、それぞれ上記差分検出回路257に供給される。
【0199】
上記差分検出回路257は、上記基準ブロック223の画像データと、上記検査ブロック224の画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のブロックどおしの比較により検出される差分データを全て加算して絶対値和データを形成する。
【0200】
これにより、上記移動範囲SV3に沿って検査ブロック224の移動を行った分である計9個(上記各検索点82における1つの絶対値和データも含む。)の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0201】
上記判断回路259は、上記絶対値和検出回路258から供給される上記9個の絶対値和データを、その絶対値和データが形成された移動範囲SV3に対応するメモリ上のアドレスに一旦記憶する。そして、上記メモリに全ての絶対値和データが記憶されると、この絶対値和データの中から最小値の絶対値和データを検出し、この最小値の絶対値和データを上記コントローラ255に供給する。
【0202】
上記コントローラ255は、上記第3ステップで検出された最小値の絶対値和データに基づいて、その絶対値和データが検出された検査ブロック224の中心に位置する、上記前フレームメモリ252上の検索点のアドレスを検出する。そして、この検索点のアドレスと、上記基準ブロック223の現フレームメモリ251上の中心画素のアドレスとの差分を検出することにより、上記最小値の絶対値和データが検出された検査ブロック224に対する上記基準ブロック223の動き分(動きベクトル)を検出し、この動きベクトルを出力端子260を介して上記図7に示す動き補償回路204に供給する。
【0203】
これにより、上記図7に示した画像データの符号化装置において、画像データの圧縮符号化処理を行うことができる。
【0204】
次に、上記閾値データよりも、上記最小値の絶対値和データと2番目に値の小さい絶対値和データとの差分値の方が大きかった場合、該差分値が大きいということは、上記最小値の絶対値和データを用いて正確な動きベクトルの検出が行えることを示している。このため、上記コントローラ255は、上記最小値の絶対値和データに基づいて動きベクトルを検出すべく、上述の第2ステップをぬかして第3ステップに移行する。
【0205】
すなわち、上記コントローラ255は、上記最小値の絶対値和データと2番目に値の小さい絶対値和データとの差分値の方が大きかった場合、上記最小値の絶対値和データが検出された検査ブロック224の中心の検索点73(図中×で示す)を検出するとともに、図6に示すように上記検索点73を中心とした略々正方形状の第3ステップの移動範囲SV3を設定する。
【0206】
上記図6において、移動範囲SV3は、4つの角部に検索点90〜93を有しており、1画素毎に設定された計3点の検索点を有するラインを、順に計3ライン設定することにより形成されている。すなわち、上記移動範囲SV3は、計9点の検索点で構成されている。
【0207】
このような移動範囲SV3が設定されると、上記コントローラ255は、上記移動範囲SV3に沿って検査ブロック224を移動し、該移動する毎にその検査ブロック224の画像データを読み出すように、i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0208】
なお、この第3ステップでは、上記移動範囲SV3の中心となる検索点73に係る絶対値和データは、上記第1ステップにおいて既に検出済であるため、上記コントローラ255は、上記移動範囲SV3において、上記検索点73をぬかして検査ブロック224を移動するように、上記i画素ステップアドレス移動回路256Aを介して上記前フレームメモリ252を読み出し制御する。
【0209】
この検査ブロック224の移動により読み出された画像データは、それぞれ上記差分検出回路257に供給される。
【0210】
上記差分検出回路257は、上記基準ブロック223の画像データと、上記検査ブロック224の画像データとを比較してその差分を検出し、この差分データを絶対値和検出回路258に供給する。上記絶対値和検出回路258は、上記差分データの絶対値を検出し、1回のマッチング処理により検出される差分データを全て加算して絶対値和データを形成する。
【0211】
これにより、上記移動範囲SV3に沿って検査ブロック224の移動を行った分である計9個(上記各検索点73における1つの絶対値和データも含む。)の絶対値和データが形成されることとなる。この絶対値和データは、それぞれ判断回路259に供給される。
【0212】
上記判断回路259は、上記絶対値和検出回路258から供給される上記9個の絶対値和データを、その絶対値和データが形成された移動範囲SV3に対応するメモリ上のアドレスに一旦記憶する。そして、上記メモリに全ての絶対値和データが記憶されると、この絶対値和データの中から最小値の絶対値和データを検出し、この最小値の絶対値和データを上記コントローラ255に供給する。
【0213】
上記コントローラ255は、上記第3ステップで検出された最小値の絶対値和データに基づいて、その絶対値和データが検出された検査ブロック224の中心に位置する、上記前フレームメモリ252上の検索点のアドレスを検出する。そして、この検索点のアドレスと、上記基準ブロック223の現フレームメモリ251上の中心画素のアドレスとの差分を検出することにより、上記最小値の絶対値和データが検出された検査ブロック224に対する上記基準ブロック223の動き分(動きベクトル)を検出し、この動きベクトルを出力端子260を介して上記図7に示す動き補償回路204に供給する。
【0214】
これにより、上記図7に示した画像データの符号化装置において、画像データの圧縮符号化処理を行うことができる。
【0215】
この第3の実施例に係る動きベクトル検出方法では、第1ステップでのみ複数の絶対値和データを検出し、この各絶対値和データの差分値と閾値とを比較し、この比較結果に応じて次の移動範囲を制御することにより、上記差分値が閾値よりも小さかった場合はさらに詳細に動きベクトルの検出を行って動きベクトルの検出精度を維持することができ、また、上記差分値が閾値よりも大きかった場合には、途中のステップを省略して計算量を削減して動きベクトルの検出を行うことができる。すなわち、上記第2の実施例に係る動きベクトル検出方法で述べた動きベクトルの検出精度を維持したまま、計算量の削減を図ることができる。
【0216】
なお、上述の第3の実施例に係る動きベクトル検出方法の説明では、第1ステップにおいて、最小値の絶対値和データ及び2番目に値の小さい絶対値和データを検出することとしたが、これは、値の小さいものから順に3つ,4つ,5つ・・・の絶対値和データを検出するようにしてもよい。
【0217】
また、3ステップサーチの第1ステップで複数の絶対値和データを検出することとしたが、これは、4段階にわけて動きベクトルの検出を行う4ステップサーチの第2ステップにおいて複数の絶対値和データの差分を検出して上記閾値と比較し、この比較結果に応じて後のステップを移動範囲を設定するようにしてもよいし、5段階に分けて動きベクトルの検出を行う5ステップサーチの第2ステップ或いは第3ステップにおいて複数の絶対値和データの差分を検出して上記閾値と比較し、この比較結果に応じて後のステップを移動範囲を設定するようにしてもよい。
【0218】
また、上記各実施例に係る動きベクトル検出方法は、上述のように正確な動きベクトルを検出することができる。このため、上記図7に示したような画像データの符号化装置において、圧縮符号化する画像データを削減することができ、圧縮符号化効率の向上を図ることができる。
【0219】
最後に、上述の各実施例の説明では、上記現在画像として現在フレームの画像を、また、前画像として前フレームの画像を用いることとしたが、これは、上記現在画像として現在フレームの画像を、また、前画像として2フレーム前の画像,3フレーム前の画像・・・を用いるようにしてもよい。同じく、上記現在画像として現在フィールドの画像を、また、前画像として前フィールドの画像、或いは、2フィールド前の画像,3フィールド前の画像・・・を用いるようにしてもよい。
【0220】
また、上記基準ブロックを現在画像内に設定し、上記検査ブロックを前画像内に設定することとしたが、これは、逆に、前画像内に基準ブロックを設定し、現在画像内に検査ブロックを設定して、該現在画像内において検査ブロックを移動させて動きベクトルの検出を行うようにしてもよい。
【0221】
また、本発明に係る動きベクトル検出方法及び画像データの符号化方法を、直交変換回路として上記DCT回路207を用いた画像データの圧縮符号化装置に適用することとしたが、これは、いわゆるフーリエ変換,アダマール変換,K−L変換等の他の直交変換手段を用いるようにしてもよい。
【0222】
また、本発明に係る動きベクトル検出方法及び画像データの符号化方法を、2ステップサーチ及び3ステップサーチに適用した場合について説明したが、これは、検査ブロックの移動範囲を4段階に分けて徐々に狭めていく4ステップサーチや、該検査ブロックの移動範囲を5段階に分けて徐々に狭めていく5ステップサーチ等、多段階に分けて検査ブロックの移動範囲を狭めながら動きベクトルの検出を行う方法であれば何にでも適用可能である。
【0223】
また、上述の各実施例の説明では、検査ブロックと基準ブロックとの相関を示す評価関数値として上記絶対値和を用いることとしたが、これは、例えば上記差分の二乗和等、検査ブロックと基準ブロックとの相関を示す情報であれば何でもよく、その他、本発明に係る技術的思想を逸脱しない範囲であれば種々の変更が可能であることは勿論である。
【0224】
【発明の効果】
本発明に係る動きベクトル検出方法は、多段階に亘ってマッチング処理を行うことにより動きベクトルの検出を行うマルチステップサーチにおける、計算量の増大及び検出速度の遅延化を極力抑制して動きベクトルの検出精度の向上を図ることができる。
【0225】
また、本発明に係る画像データの符号化方法は、動きベクトル検出手段における計算量の増大及び検出速度の遅延化を極力抑制して正確な動きベクトルを検出することができるため、画像データに応じた正確な圧縮符号化を行うことができる。また、圧縮符号化する画像データを削減して圧縮符号化効率の向上を図ることができる。
【図面の簡単な説明】
【図1】本発明の第1の実施例に係る動きベクトル検出方法を説明するための図である。
【図2】本発明の第2の実施例に係る動きベクトル検出方法を説明するための図である。
【図3】本発明の第3の実施例に係る動きベクトル検出方法を適用した動きベクトル検出装置のブロック図である。
【図4】上記第3の実施例に係る動きベクトル検出方法を適用した動きベクトル検出装置の第1ステップでの動作を説明するための図である。
【図5】上記第3の実施例に係る動きベクトル検出方法を適用した動きベクトル検出装置における、上記第1ステップで検出された絶対値和の差分が閾値以上の場合の動作を説明するための図である。
【図6】上記第3の実施例に係る動きベクトル検出方法を適用した動きベクトル検出装置における、上記第1ステップで検出された絶対値和の差分が閾値以下の場合の動作を説明するための図である。
【図7】画像の動きベクトルを検出して画像データの圧縮符号化処理を行う画像データの圧縮符号化装置のブロック図である。
【図8】上記画像データの圧縮符号化装置に設けられている動きベクトル検出回路で行われるブロックマッチング処理を説明するための図である。
【図9】フルサーチにより動きベクトル検出を行う動きベクトル検出回路のブロック図である。
【図10】上記フルサーチによる動きベクトルの検出の仕方を説明するための図である。
【図11】2ステップサーチ或いは3ステップサーチにより動きベクトルの検出を行う動きベクトル検出回路のブロック図である。
【図12】従来の3ステップサーチの第1ステップによる動きベクトルの検出の仕方を説明するための図である。
【図13】従来の3ステップサーチの第2,第3ステップによる動きベクトルの検出の仕方を説明するための図である。
【図14】従来の2ステップサーチによる動きベクトルの検出の仕方を説明するための図である。
【符号の説明】
SV1・・・・・第1ステップの検査ブロックの移動範囲
1・・・・・・・第1ステップの移動範囲の中心に位置する画素(原点)
2〜5・・・・・第1ステップの移動範囲の角部に位置する画素
6・・・・・・・第1ステップの絶対値和の最小値に係る画素
7・・・・・・・第1ステップの2番目に値の小さい絶対値和に係る画素
8・・・・・・・第1ステップの3番目に値の小さい絶対値和に係る画素
SV21・・・・最小値の絶対値和による第2ステップでの第1の移動範囲
10〜13・・・第1の移動範囲の角部に位置する画素
SV22・・・・2番目に値の小さい絶対値和による第2ステップでの第2の移動範囲
15〜18・・・第2の移動範囲の角部に位置する画素
SV23・・・・3番目に値の小さい絶対値和による第2ステップでの第3の移動範囲
20〜23・・・第3の移動範囲の角部に位置する画素
SV1・・・・・第1ステップの検査ブロックの移動範囲
30・・・・・・第1ステップの移動範囲の中心に位置する画素(原点)
31〜34・・・第1ステップの移動範囲の角部に位置する画素
33・・・・・・第1ステップの絶対値和の最小値に係る画素
35・・・・・・第1ステップの2番目に値の小さい絶対値和に係る画素
SV21・・・・最小値の絶対値和による第2ステップでの第1の移動範囲
40〜43・・・第1の移動範囲の角部に位置する画素
SV22・・・・2番目に値の小さい絶対値和による第2ステップでの第2の移動範囲
45〜48・・・第2の移動範囲の角部に位置する画素
46・・・・・・第2ステップの絶対値和の最小値に係る画素
49・・・・・・第2ステップの2番目に値の小さい絶対値和に係る画素
SV3・・・・・絶対値和の最初値による第3ステップでの第3の移動範囲
50〜53・・・第3の移動範囲の角部に位置する画素
251・・・・・現フレームメモリ
252・・・・・前フレームメモリ
253・・・・・現フレームの画像データの入力端子
254・・・・・前フレームの画像データの入力端子
255・・・・・コントローラ
256A・・・・i画素ステップアドレス移動回路
256B・・・・1画素ステップアドレス移動回路
257・・・・・差分検出回路
258・・・・・絶対値和検出回路
259・・・・・判断回路
260・・・・・動きベクトルの出力端子
261・・・・・閾値発生回路
SV1・・・・・第1ステップの検査ブロックの移動範囲
70・・・・・・第1ステップの移動範囲の中心に位置する画素(原点)
71〜74・・・第1ステップの移動範囲の角部に位置する画素
73・・・・・・第1ステップの絶対値和の最小値に係る画素
75・・・・・・第1ステップの2番目に値の小さい絶対値和に係る画素
SV21・・・・最小値の絶対値和による第2ステップでの第1の移動範囲
77〜80・・・第1の移動範囲の角部に位置する画素
SV22・・・・2番目に値の小さい絶対値和による第2ステップでの第2の移動範囲
81〜84・・・第2の移動範囲の角部に位置する画素
82・・・・・・第2ステップの絶対値和の最小値に係る画素
85・・・・・・第2ステップの2番目に値の小さい絶対値和に係る画素
SV3・・・・・絶対値和の最初値による第3ステップでの第3の移動範囲
86〜89・・・第3の移動範囲の角部に位置する画素
90〜93・・・第3の移動範囲の角部に位置する画素
201・・・・・画像データの入力端子
202・・・・・動きベクトル検出回路
203・・・・・減算器
204・・・・・動き補償回路
205・・・・・フレームメモリ
206・・・・・加算器
207・・・・・直交変換回路
208・・・・・量子化器
209・・・・・圧縮符号化された画像データの出力端子
210・・・・・逆量子化器
211・・・・・逆直交変換回路
[0001]
[Industrial applications]
The present invention relates to a motion vector detection method and an image data encoding method suitable for use in, for example, a moving image compression processing device (MPEG device) that performs compression encoding of image data according to the motion of an image. A motion vector detection method for improving the detection accuracy of a motion vector in a multi-step search for detecting a motion vector of an image in multiple stages while gradually narrowing the range at first, and the motion vector detection The present invention relates to a method of encoding image data in which the compression encoding of image data is performed using a method to improve the compression encoding efficiency and compression encoding accuracy.
[0002]
[Prior art]
At present, the MPEG (Moving Picture Coding Transform) system is known as an international standard system for high-efficiency compression coding of moving images. The MPEG method is a high-efficiency compression technique for an image in which orthogonal transformation processing is performed on image data, for example, DCT (Discrete Cosine Transform) conversion and motion compensation are combined.
[0003]
This MPEG method can be applied to, for example, an image data encoding apparatus as shown in FIG. 7, which compresses and encodes image data using the correlation between the image of the previous frame and the image of the current frame.
[0004]
The image data encoding apparatus shown in FIG. 7 is supplied with the image data of the current frame via the input terminal 201. The image data of the current frame is supplied to the motion vector detection circuit 202 and the subtractor 203.
[0005]
The motion vector detecting circuit 202 is supplied with image data of a previous frame from a frame memory 205 described below, in addition to the image data of the current frame. The motion vector detection circuit 202 forms a motion vector by detecting a motion of an image based on the image data of the current frame and the image data of the previous frame, and supplies the motion vector to the motion compensation circuit 204.
[0006]
The motion compensation circuit 204 is supplied with the image data of the previous frame from the frame memory 205. The motion compensation circuit 204 performs a motion compensation process on the image data of the previous frame based on the motion vector from the motion vector detection circuit 202, and supplies this to the subtractor 203 and the adder 206.
[0007]
The subtracter 203 subtracts the image data of the current frame from the image data of the previous frame to which the motion compensation processing has been performed, thereby calculating the difference between the image data of the current frame and the image data of the previous frame. The difference data shown is formed and supplied to the DCT circuit 207.
[0008]
The DCT circuit 207 converts the difference data on a frequency axis for each block of a predetermined number of pixels to form a DCT block, and supplies this to the quantization circuit 208. The quantization circuit 208 varies the quantization step in accordance with the level of the DCT block, and performs quantization processing on the DCT block in this quantization step to form compressed image data, which is output to an output terminal 209. For example, the information is supplied to an external device such as a disk recording device via the disk, and is also supplied to an inverse quantization circuit 210.
[0009]
The inverse quantization circuit 210 performs an inverse quantization process on the compressed image data in the quantization step selected by the quantization circuit 208, thereby reproducing a DCT block before being subjected to the quantization process. Is supplied to the inverse DCT circuit 211. The inverse DCT circuit 211 performs an inverse DCT process on the reproduced DCT block to form difference data before being converted into a DCT block, and supplies the difference data to the adder 206.
[0010]
The adder 206 is separately supplied with the motion-compensated image data of the previous frame from the motion compensation circuit 204. The adder 206 reproduces the image data of the current frame by adding the motion-compensated image data of the previous frame and the difference data from the inverse DCT circuit 211 to the frame memory 205. Supply.
[0011]
The image data of the current frame supplied to the frame memory 205 is read with a delay of one frame. As a result, the image data of the current frame is converted into image data of the previous frame at the stage of reading, and is supplied to the motion compensation circuit 204 and the motion vector detection circuit 202.
As described above, the motion compensation circuit 204 performs a motion compensation process on the image data of the previous frame according to the motion vector from the motion vector detection circuit 202, and supplies this to the subtractor 203 and the adder 206. I do. Thereafter, the above operation is repeated in each circuit.
[0012]
As described above, the image data encoding apparatus encodes and outputs the difference between the image data of the previous frame and the image data of the current frame, which have been subjected to the motion vector compensation based on the motion vector. Thereby, highly efficient compression of image data can be performed.
[0013]
Here, in the motion vector detection circuit 202, as shown in FIG. 8, the reference block 223 formed from a plurality of pixels (N pixels × M lines) set in the current frame 221 moves in the previous frame 222. A motion vector is detected by block matching for detecting which test block 224 matches a test block formed from a plurality of pixels (N pixels × M lines).
[0014]
That is, the motion vector detection circuit 202 moves the inspection block 224 of the previous frame 222 within a predetermined movement range, and compares the inspection block 224 with the reference block 223 of the current frame 221 each time the inspection block 224 moves. Then, the test block 224 that best matches the reference block 223 is detected as a matching block, and a motion vector is detected based on the matching block.
[0015]
As such a block matching method, a block matching method called a full search and a block matching method called a multi-step search are known.
[0016]
A motion vector detection circuit to which the above-described full search block matching method is applied has, for example, a configuration as shown in FIG.
9, the current frame memory 231 is supplied with the image data of the current frame via the input terminal 233, and the previous frame memory 232 is supplied with the image data of the previous frame via the input terminal 234. The respective image data supplied to the respective frame memories 231 and 232 are temporarily written in the respective frame memories 231 and 232 under the write control of the controller 235.
[0017]
When the respective image data are written in the respective frame memories 231 and 232, the controller 235 stores the current frame memory 231 so as to read the image data of the reference block of the current frame 221 shown in FIG. Read control is performed, and read control of the previous frame memory 232 is performed via the address transfer circuit 236 so that image data of the inspection block 224 of the previous frame 222 is read. Further, the controller 235 sets the read address of the previous frame memory 232 one pixel at a time so that the inspection block 224 moves within the predetermined movement range SV for each pixel as shown in FIG. Variable control via 236.
[0018]
As a result, the image data of the reference block 223 is supplied from the current frame memory 231 to the difference detection circuit 237, and the inspection block at the inspection position moved one pixel at a time within the movement range SV from the previous frame memory 232. The image data 224 is supplied to the difference detection circuit 237.
[0019]
The difference detection circuit 237 subtracts the image data of the reference block 223 and the image data of the inspection block 224 for each pixel to form difference data, and supplies the difference data to the absolute value sum detection circuit 238. .
[0020]
The absolute value sum detection circuit 238 detects the absolute value of the difference data formed by one block comparison, forms the absolute value sum data by adding all the absolute values, and determines this. 239.
[0021]
The determination circuit 239 has a memory capable of storing all absolute value sum data formed by one block matching process in which the inspection block 224 is moved one pixel at a time within the movement range SV to perform block matching. are doing. The determination circuit 239 temporarily stores the absolute value sum data supplied from the absolute value sum detection circuit 238 at an address corresponding to the inspection position in the moving range SV where the absolute value sum data is formed. When the absolute value sum data is stored in all the addresses of the memory, an address in which the smallest value is stored is detected from the absolute value sum data, and a motion vector is calculated based on the address. Is detected. Then, the motion vector is supplied to the motion compensation circuit 204 shown in FIG.
[0022]
The absolute value sum data having the minimum value is that the difference between the image data of the inspection block 224 of the previous frame and the image data of the reference block 223 of the current frame is minimum, that is, the image data of the inspection block 224 and the reference This shows that the correlation with the image data of the block 223 is high. Further, as described above, the absolute value sum data is stored at the address on the memory corresponding to the position where the block matching has been performed.
[0023]
Therefore, by detecting the address on the memory where the absolute value sum data with the minimum value is stored, the movement of the reference block 223 relative to the inspection block 224 on which the absolute value sum data with the minimum value is formed is detected. The minute (motion vector) can be detected.
[0024]
When a motion vector is detected by one block matching, the determination circuit 259 supplies the controller 235 with data indicating that the motion vector has been detected. When the controller 235 is supplied with data indicating that the motion vector has been detected, the controller 235 writes the new current frame image data and the previous frame image data into the frame memories 231 and 232, respectively. The writing control is performed on each of the frame memories 231 and 232. Thereby, the above-described block matching processing is newly performed.
[0025]
However, when such a full search is performed, it is necessary to detect the motion vector while moving the inspection block 224 for each pixel in the movement range SV. It interferes with high-speed processing. For this reason, at present, the motion vector is first detected in a large moving range, and the block matching process is performed in multiple stages so as to gradually reduce the moving range according to the detection result. Many multi-step searches have been performed to reduce this.
[0026]
As the multi-step search, a three-step search for detecting a motion vector in three stages and a two-step search for detecting a motion vector in two stages are known.
[0027]
First, a motion vector detection circuit to which the above-described three-step search is applied has, for example, a configuration as shown in FIG.
11, the current frame memory 251 is supplied with the image data of the current frame via the input terminal 253, and the previous frame memory 252 is supplied with the image data of the previous frame via the input terminal 254. The image data supplied to the frame memories 251 and 252 are temporarily written into the frame memories 251 and 252 under the write control of the controller 255, respectively.
[0028]
When each image data is written in each of the frame memories 251 and 252 in this way, the controller 255 causes the current frame memory 251 to read the image data of the reference block set in the current frame memory 251, for example. Is read and controlled. The image data of the reference block is supplied to the difference detection circuit 257.
[0029]
In addition, the controller 255, together with this, first, as a first step, among the image data stored in the previous frame memory 252 as shown in FIG. 12, for example, the image at the address corresponding to the center address of the reference block Inspection blocks having the same number of image data as the image data of the above-mentioned reference block centered on image data 271 which is shifted by four pixels in the upper left diagonal direction with respect to the image data 270 of the origin, as the image data 270 of the origin. Is read out from the previous frame memory 252 via the i-pixel step address moving circuit 256A so that the image data is read out.
[0030]
Further, the controller 255 subsequently performs a test block centering on the image data 272 separated by four pixels to the right from the image data 271 and the image data separated by four pixels from the image data 272 to the right. An inspection block centered at 273, an inspection block centered on image data 274 separated four pixels to the left from the image data 270 at the origin, an inspection block centered at image data 270 at the origin, and an image at the origin An inspection block centered on image data 275 separated four pixels to the right from data 270, an inspection block centered on image data 276 separated four pixels diagonally downward left from image data 270 at the origin, and the image An inspection block centered on image data 277 separated by four pixels to the right from data 276; 7 the image data of the inspection blocks around the image data 278 apart four pixels to the right to control reads the previous frame memory 252 via the i pixel step address moving circuit 256A as sequentially read from.
[0031]
The image data of each inspection block read from the previous frame memory 252 is supplied to the difference detection circuit 257, respectively.
[0032]
That is, in this first step, the inspection block is moved every four pixels centering on each of the image data 271 to 278 shown in FIG. 12 above, so that the block matching is performed in the first movement range SV1 shown by the thick line in FIG. Processing will be performed.
[0033]
The difference detection circuit 257 compares the image data of the reference block with the image data of each inspection block to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, and adds all the difference data detected by one comparison between the blocks to form sum-of-absolute-value data. As a result, a total of nine absolute value sum data corresponding to the movement of the inspection block is formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0034]
The determination circuit 259 can store, for example, all absolute value sum data formed by one block matching process of moving the inspection block by four pixels in the first movement range SV1 and performing block matching. have. The determination circuit 259 temporarily stores the absolute value sum data supplied from the absolute value sum detection circuit 258 at an address corresponding to the inspection position in the first movement range SV1 where the absolute value sum data is formed. . When the absolute value sum data is stored in all the addresses of the memory, the absolute value sum data having the smallest value is detected from the absolute value sum data, and the absolute value sum data having the smallest value is stored in the controller 255. To supply.
[0035]
The minimum value of the absolute value sum data indicates that the correlation between the check block in the previous frame and the reference block in the current frame is high. Therefore, based on the absolute value sum data, the controller 255 detects the image data at the address on the previous frame memory 252 located at the center of the inspection block where the absolute value sum data is detected. Then, as a second step, a block matching process is performed by narrowing the movement range around the image data.
[0036]
That is, assuming that the image data at the center of the inspection block in which the absolute value sum data having the minimum value is detected is the image data 276 indicated by a dot in FIG. 12, the controller 255 performs the second step in FIG. As shown in a), the inspection block centered on the image data 281 separated two pixels diagonally to the upper left from the image data 276, and the image block 282 separated two pixels rightward from the image data 281. An inspection block centered on image data 283 separated two pixels to the right from the image data 282, an inspection block centered on image data 284 separated two pixels to the left from the image data 276, Inspection block centered on the image data 276, image data 285 separated two pixels to the right from the image data 276 An inspection block having a center, an inspection block having image data 286 separated from the image data 276 by two pixels in a diagonally lower left direction, and an image block 287 having two pixels separated right from the image data 286 by a center. The previous frame memory 252 is transmitted via the i-pixel step address moving circuit 256A so that each image data of the inspection block to be inspected and the inspection block centering on the image data 288 separated by two pixels from the image data 287 are read out in order. Read control.
[0037]
The image data of each inspection block read from the previous frame memory 252 is supplied to the difference detection circuit 257, respectively.
[0038]
That is, in the second step, the inspection block is moved every two pixels centering on each of the image data 281 to 288 and the image data 276 shown in FIG. The block matching process is performed in the second movement range SV2 shown.
[0039]
The difference detection circuit 257 compares the image data of the reference block with the image data of each inspection block to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, and adds all the difference data detected by one comparison between the blocks to form sum-of-absolute-value data. As a result, a total of nine absolute value sum data corresponding to the movement of the inspection block is formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0040]
The determination circuit 259 stores the nine absolute value sum data supplied from the absolute value sum detection circuit 258 in an address corresponding to the inspection position in the second movement range SV2 where the absolute value sum data is formed. Once memorize. When the absolute value sum data is stored in all the addresses of the memory, the absolute value sum data having the smallest value is detected from the absolute value sum data, and the absolute value sum data having the smallest value is stored in the controller 255. To supply.
[0041]
As described above, the fact that the value of the absolute value sum data is the minimum indicates that the correlation between the check block in the previous frame and the reference block in the current frame is high. Therefore, based on the absolute value sum data, the controller 255 detects the image data at the address on the previous frame memory 252 located at the center of the inspection block where the absolute value sum data is detected. Then, as a third step, a block matching process is performed by further narrowing the moving range around the image data.
[0042]
That is, assuming that the image data at the center of the inspection block in which the absolute value sum data having the minimum value is detected is the image data 283 indicated by a point 図 in FIG. 13A, the controller 255 performs a third step. As shown in FIG. 13B, an inspection block centered on image data 291 separated by one pixel to the upper left from the image data 283, and an image data 292 separated by one pixel to the right from the image data 291. , A test block centered on image data 293 separated by one pixel to the right from the image data 292, and a test block centered on image data 294 separated by one pixel to the left from the image data 283 An inspection block, an inspection block centered on the image data 283, and image data separated one pixel to the right from the image data 283 An inspection block centered at 95, an inspection block centered on image data 296 one pixel diagonally left down from the image data 283, and image data 297 separated one pixel right from the image data 296 The previous frame memory 252 via the one-pixel step address transfer circuit 256B so that each image data of the inspection block at the center and the image data 298 separated by one pixel from the image data 297 is read out in order. Is read and controlled.
[0043]
The image data of each inspection block read from the previous frame memory 252 is supplied to the difference detection circuit 257, respectively.
[0044]
That is, in the third step, the inspection block is moved by one pixel centering on each of the image data 291 to 298 and the image data 283 shown in FIG. The block matching process is performed in the third movement range SV3 shown.
[0045]
The difference detection circuit 257 compares the image data of the reference block with the image data of each inspection block to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, adds all the difference data detected by one block-by-block comparison, and forms absolute value sum data. As a result, a total of nine absolute value sum data corresponding to the movement of the inspection block is formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0046]
The determination circuit 259 converts the nine absolute value sum data supplied from the absolute value sum detection circuit 258 into an address corresponding to the inspection position in the third movement range SV3 where the absolute value sum data is formed. Once memorize. When the absolute value sum data is stored in all the addresses of the memory, the absolute value sum data having the smallest value is detected from the absolute value sum data, and the absolute value sum data having the smallest value is stored in the controller 255. To supply.
[0047]
The controller 255 detects an inspection block on which the absolute value sum data having the minimum value is formed, and detects image data located at the center of the inspection block. Specifically, for example, if the image data located at the center of the inspection block on which the absolute value sum data having the minimum value is formed is the image data 296 indicated by oblique lines in FIG. , The address of the image data 296 on the previous frame memory 252 is detected. Then, by detecting the difference between the address of the image data at the center of the inspection block on the previous frame memory 252 and the address of the image data at the center of the reference block on the current frame memory 251, the value is minimized. The motion (motion vector) of the reference block with respect to the test block in which the absolute value sum data is formed is detected, and the motion vector is supplied to the motion compensation circuit 204 shown in FIG.
[0048]
As a result, the image data encoding apparatus shown in FIG. 7 can perform the compression encoding processing of the image data as described above.
[0049]
Next, the motion vector detection circuit to which the two-step search is applied is structurally the same as the circuit shown in FIG. 11, but in this case, the controller 255 checks in every two pixels in the first step. The i-pixel step address moving circuit 256 is controlled so as to move the block, and the one-pixel step address moving circuit is controlled so as to move the inspection block for each pixel in the second step.
[0050]
That is, in FIG. 11, when the image data of the current frame is stored in the current frame memory 251 and the image data of the previous frame is stored in the previous frame memory 252, the controller 255 stores the image data in the current frame memory 251, for example. The current frame memory 251 is read and controlled so that the image data of the set reference block is read. The image data of the reference block is supplied to the difference detection circuit 257.
[0051]
In addition, as shown in FIG. 14A, the controller 255 first performs, for example, a reference block read from the current frame memory 251 among the image data stored in the previous frame memory 252 as a first step. The image data at the address corresponding to the center address is designated as the image data 300 at the origin, and as shown by the bold line in FIG. 10A, two pixels are within the first movement range SV1 centered on the image data 300 at the origin. The preceding frame memory 252 is read out and controlled via the i pixel step address moving circuit 256A so that the inspection block moves every time. The image data of each inspection block is supplied to the difference detection circuit 257, respectively.
[0052]
The difference detection circuit 257 compares the image data of the reference block with the image data of each inspection block to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, and adds all the difference data detected by one comparison between the blocks to form sum-of-absolute-value data. For example, assuming that the inspection block has been moved 49 times, as indicated by the circles and the circles in FIG. 14A, a total of 49 absolute value sum data will be formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0053]
The determination circuit 259 can store, for example, all absolute value sum data formed by one block matching process of moving the inspection block by two pixels in the first movement range SV1 and performing block matching. have. The determination circuit 259 temporarily stores the absolute value sum data supplied from the absolute value sum detection circuit 258 at an address corresponding to the inspection position in the first movement range SV1 where the absolute value sum data is formed. . When the absolute value sum data is stored in all the addresses of the memory, the absolute value sum data having the smallest value is detected from the absolute value sum data, and the absolute value sum data having the smallest value is stored in the controller 255. To supply.
[0054]
The minimum value of the absolute value sum data indicates that the correlation between the check block in the previous frame and the reference block in the current frame is high. Therefore, based on the absolute value sum data, the controller 255 detects the image data at the address on the previous frame memory 252 located at the center of the inspection block where the absolute value sum data is detected. Then, as a second step, a block matching process is performed by narrowing the movement range around the image data.
[0055]
That is, assuming that the image data at the center of the inspection block in which the absolute value sum data having the minimum value is detected is the image data 301 indicated by oblique lines in FIG. 14A, the controller 255 performs the same as the second step. As shown by the bold line in the figure, the test block moves through the one-pixel step address moving circuit 256B so that the inspection block moves by one pixel within the second movement range SV2 centered on the image data 301. The read control of the previous frame memory 252 is performed. The image data of each inspection block is supplied to the difference detection circuit 257, respectively.
[0056]
The difference detection circuit 257 compares the image data of the reference block with the image data of each inspection block to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, adds all the difference data detected by one block-by-block comparison, and forms absolute value sum data. Thus, as shown in FIG. 14B, a total of nine absolute value sum data corresponding to the movement of the inspection block are formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0057]
The determination circuit 259 stores the nine absolute value sum data supplied from the absolute value sum detection circuit 258 in an address corresponding to the inspection position in the second movement range SV2 where the absolute value sum data is formed. Once memorize. When the absolute value sum data is stored in all the addresses of the memory, the absolute value sum data having the smallest value is detected from the absolute value sum data, and the absolute value sum data having the smallest value is stored in the controller 255. To supply.
[0058]
The controller 255 determines that the test block in which the absolute value sum data with the minimum value is formed matches the reference block, and determines, for example, the address of the center image data of the test block in which the absolute value sum data is formed. Is detected. Then, by detecting a difference between the address of the image data at the center of the inspection block and the address of the image data at the center of the reference block, the above-described value for the inspection block in which the absolute value sum data having the minimum value is formed The motion (motion vector) of the reference block is detected, and the motion vector is supplied to the motion compensation circuit 204 shown in FIG.
[0059]
As described above, in the multi-step search, motion vectors are detected in three stages of the first step to the third step, or in two stages of the first step and the second step. Therefore, the motion vector can be initially detected roughly and gradually and finely, the amount of calculation can be reduced as compared with the above-described full search, and high-speed processing of image data can be achieved.
[0060]
[Problems to be solved by the invention]
However, in a conventional multi-step search such as a three-step search and a two-step search, the absolute value sum data selected at each step is only one point of the absolute value sum data of the minimum value. The sum data may not always be able to finally detect an accurate motion vector.
[0061]
In each step, the pixel interval at which the inspection block is moved is proportional to the probability (correct answer rate) that an accurate motion vector can be detected. Although the accuracy rate is improved, if the pixel interval for moving the test block is reduced, the number of times of matching is increased, so that there is a problem that the amount of calculation is increased and the speed of detecting the motion vector is reduced.
[0062]
The present invention has been made in view of the above-described problems, and in a multi-step search in which a motion vector is detected by performing a matching process in multiple stages, an increase in a calculation amount and a delay in a detection speed are minimized. A motion vector detecting method capable of suppressing the motion vector detection accuracy and improving the accuracy of motion vector detection, and accurate compression according to image data by using an accurate motion vector formed by the motion vector detecting method. It is an object of the present invention to provide an image data encoding method capable of improving encoding and encoding efficiency.
[0063]
[Means for Solving the Problems]
The present invention sets a reference block composed of predetermined pixels in a current image or a previous image that is temporally preceding and succeeding, and sets an inspection block composed of the same number of pixels as the reference block to an inspection block other than the image in which the reference block is set. Each time the test block moves within a predetermined moving range and the test block is moved, an evaluation function value indicating a correlation between the test block and the reference block is detected, and each evaluation function obtained corresponding to the movement of the test block is detected. The value of the evaluation function having the smallest value is detected from the values, and the next movement range of the inspection block is narrowed by a predetermined amount based on the pixel at the predetermined position in the movement range in which the value of the evaluation function having the smallest value is formed. Again, the operation of detecting the evaluation function value with the minimum value is repeated until the inspection block reaches the minimum movement range, and the evaluation function with the minimum value detected in this minimum movement range is performed. In the motion vector detection method of detecting a motion vector based on the above, among the evaluation function values obtained when the inspection block is moved in a movement range other than the minimum movement range, A plurality of evaluation function values having smaller values in order are detected, and a difference between the plurality of detected evaluation function values and a threshold value are compared. If the difference between the plurality of evaluation function values is smaller than the threshold value, A next moving range of the inspection block is narrowed by a predetermined amount and set based on a pixel at a predetermined position in each moving range in which a plurality of detected evaluation function values are formed, and a difference between the plurality of evaluation function values is set. Is larger than the threshold value, the next moving range of the inspection block is changed to the minimum moving range based on the pixel at a predetermined position in the moving range in which the minimum evaluation function value is formed. Alternatively, the operation of detecting the evaluation function value by moving the inspection block in each of the moving ranges set to be narrower by the predetermined amount or more is set as the minimum moving range of the inspection block. It is characterized by detecting the motion vector based on the evaluation function value having the minimum value obtained when the inspection block is moved in the minimum moving range described above.
[0064]
In addition, the motion vector detection method according to the present invention is such that, among the evaluation function values obtained by moving the inspection block in a movement range other than the minimum movement range, the evaluation function value with the smallest value and the second A value of the evaluation function having a small value is detected, and based on each pixel at a predetermined position within each movement range in which the value of the evaluation function having the smallest value and the value of the evaluation function having the second smallest value are detected, The above-mentioned problem is solved by setting the next movement range by narrowing it by a predetermined amount.
[0065]
In addition, a motion vector detection method according to the present invention solves the above-mentioned problem by detecting the plurality of evaluation function values in a predetermined moving range among the moving ranges of the test block set a plurality of times. I do.
[0067]
Further, the present invention sets a reference block including predetermined pixels in a current image or a previous image that is temporally preceding or succeeding, and sets an inspection block including the same number of pixels as the reference block to an inspection block other than the image in which the reference block is set. Each time the image moves within a predetermined moving range and the inspection block is moved, an evaluation function value indicating the correlation between the inspection block and the reference block is detected, and each of the evaluation function values obtained corresponding to the movement of the inspection block is detected. The evaluation function value having the smallest value is detected from the evaluation function values, and the next movement range of the inspection block is determined based on the pixel at the predetermined position in the movement range where the minimum evaluation function value is formed. The operation of detecting the evaluation function value having the minimum value is repeated until the value becomes the minimum movement range of the inspection block, and the value detected in the minimum movement range is minimized. By detecting a motion vector based on the valence function value, performing motion compensation on the previous image in accordance with the motion vector, orthogonally transforming and quantizing the difference between the current image and the motion-compensated previous image. A method of encoding image data that forms compression-encoded image data, the method being obtained when the test block is moved in a movement range other than the minimum movement range when the motion vector is detected. Among the evaluation function values obtained, a plurality of evaluation function values having smaller values in order from the smallest evaluation function value are detected, and a difference between the plurality of detected evaluation function values is compared with a threshold value, and the plurality of evaluation function values are determined. If the difference between the values is smaller than the threshold value, the next moving range of the inspection block is divided by a predetermined amount based on the pixel at a predetermined position in each moving range in which the plurality of detected evaluation function values are formed. Narrow If the difference between the plurality of evaluation function values is larger than a threshold value, based on the pixel at a predetermined position in the movement range where the minimum evaluation function value is formed, The next movement range is set to be narrower than the minimum movement range or the predetermined amount or more, and the inspection block is moved in each of the narrowed movement ranges to detect an evaluation function value. Is repeated until the test block reaches the minimum moving range, and a motion vector is detected based on the evaluation function value having the minimum value obtained when the test block is moved in the minimum moving range. It is characterized by the following.
[0068]
[Action]
In the motion vector detection method according to the present invention, first, a reference block including predetermined pixels is set in a current image or a previous image that is temporally preceding and succeeding, and an inspection block including the same number of pixels as the reference block is used. Set an image other than the set image.
[0069]
Specifically, for example, using the image of the current frame as the current image and the image of the previous frame as the previous image, setting a plurality of the reference blocks in the image of the current frame, The inspection block is set at the position. As described below, the detection method moves the inspection block within a predetermined movement range of the previous frame, and each time the inspection block is moved, the image of the inspection block and the image of the reference block are compared with each other. To detect an inspection block of an image that matches the image of the reference block (matching processing). Then, a motion vector is detected by detecting how much the reference block has moved with respect to the inspection block.
[0070]
That is, when the reference block and the test block are set, the test block is moved within a large moving range, and each time the test block is moved, an evaluation function value indicating the correlation between the test block and the reference block is calculated. To detect. The evaluation function value includes, for example, the sum of absolute values of the differences between each pixel of the test block and each pixel of the reference block, the square of the sum of the absolute values, and the like.
[0071]
In the detection method, assuming that, for example, the sum of absolute values is used as the evaluation function value, first, every time the inspection block is moved, the absolute value sum of the difference between each pixel of the inspection block and each pixel of the reference block is calculated. To detect. As a result, the sum of absolute values for the number of times of movement of the inspection block is detected.
[0072]
Next, among the sums of the absolute values, a plurality of sums of absolute values are detected in order from the absolute value sum having the smallest value. For example, the absolute value sum having the smallest value and the absolute value sum having the second smallest value may be detected, or the absolute value sum having the smallest value and the absolute value having the second smallest value may be detected. The sum of the values and the sum of the absolute values having the third smallest value may be detected, and the choice is free.
[0073]
Next, for example, if two of the absolute value sum having the smallest value and the absolute value sum having the second smallest value are selected, the above value is located, for example, at the center of the test block where the smallest absolute value sum is detected. A first moving range of a moving range equal to or less than the first moving range is set around a pixel, and a pixel located at, for example, the center of a test block in which the absolute value sum having the second smallest value is detected is set as a center. , A second moving range that is the same as the first moving range is set.
[0074]
Next, the inspection block is moved within the first movement range to detect the absolute value sum, and the inspection block is moved within the second movement range to detect the absolute value sum, The sum of each absolute value detected by moving the inspection block within the first movement range and the sum of absolute values detected by moving the inspection block within the second movement range Among them, the absolute value sum having the smallest value and the absolute value sum having the second smallest value are detected.
[0075]
The fact that the value of the sum of absolute values is small indicates that the correlation between the image of the inspection block at the position where the sum of absolute values is detected and the image of the reference block is high. For this reason, in the detection method, a plurality of sums of absolute values are detected in ascending order of values, and the next moving range is determined based on each sum of absolute values.
[0076]
The detection method detects a plurality of sums of absolute values in ascending order of values from among a plurality of sums of absolute values detected by moving the inspection block within the movement range set in this way, and The operation of detecting the sum of absolute values while gradually narrowing the moving range of the test block based on the sum of absolute values is repeated until the test block reaches the minimum moving range.
[0077]
Then, a motion vector is detected based on the minimum absolute value sum among a plurality of absolute value sums detected in the minimum movement range.
[0078]
Of the plurality of absolute value sums detected by moving the inspection block within the set movement range, based on only the minimum absolute value sum, setting the next movement range of the inspection block, Since the absolute value sum having the minimum value is not always the one that can finally detect an accurate motion vector, erroneous detection of the motion vector may occur.
[0079]
However, among the absolute value sums detected by moving the inspection block within the set movement range, a plurality of absolute value sums are detected in ascending order of the value, and based on each absolute value sum, By setting the next movement range, the detection range of the motion vector can be expanded by the number of the detected absolute value sums. Therefore, it is possible to improve the probability of finally detecting an accurate motion vector (the accuracy of detecting a motion vector).
[0080]
For this reason, as the number of absolute value sums selected from the absolute value sums obtained by moving the inspection block is increased, the detection accuracy of the motion vector can be improved. Increasing the number of sums of values increases the amount of calculation accordingly. For this reason, how many absolute value sums are selected from each of the above absolute value sums is set according to the accuracy to be obtained.
[0081]
Here, if the detection of the sum of the plurality of absolute values is performed every time the moving range of the inspection block is set, the detection accuracy is improved, but the calculation amount is increased. For this reason, in the motion vector detecting method according to the present invention, the plurality of sums of absolute values are detected only in a predetermined moving range among the moving ranges of the test block set a plurality of times.
[0082]
In other words, the detection accuracy of the motion vector is such that if the sum of absolute values that can detect an accurate motion vector in the first set movement range is erroneously detected, an inaccurate motion vector is finally detected. It depends on the sum of absolute values detected in the movement range set for the first time, as in the case of being performed.
[0083]
Therefore, for example, the number of selections of the absolute value sum is increased only in the movement range set for the first time. This makes it possible to select an absolute value sum that allows the accurate motion vector to be detected within the first set movement range. Therefore, it is possible to detect an accurate motion vector while minimizing an increase in the amount of calculation.
[0084]
In addition, in addition to increasing the number of selections of the absolute value sum only in the movement range set in the first time, the number of selections of the absolute value sum is increased only in the movement range set in the second time, or the third time. The number of selections of the sum of absolute values may be increased only in one movement range, such as increasing the number of selections of the sum of absolute values only in the set movement range, or the first and third times. A plurality of moving ranges may be selected to increase the number of selections of the absolute value sum, such as increasing the number of selections of the absolute value sum in the set moving range.
[0085]
In this case, it is possible to suppress an increase in the amount of calculation by the amount by which the moving range for selecting a plurality of sums of absolute values is omitted.
[0086]
Next, the motion vector detection method according to the present invention detects a difference between a plurality of sums of absolute values obtained by moving the inspection block in a movement range other than the minimum movement range, and calculates the plurality of absolute values. The difference between the sums is compared with a threshold.
[0087]
The threshold value is set to a value at which, for example, the sum of absolute values can detect an accurate motion vector. By comparing this threshold value with the difference between the plurality of sums of absolute values, the plurality of sums of absolute values are more accurate. It is possible to detect whether or not a suitable motion vector can be detected.
[0088]
If the difference between the plurality of absolute value sums is smaller than a threshold value, the inspection block is determined based on the pixel at a predetermined position within each moving range in which the plurality of detected absolute value sums are formed as described above. Then, the next movement range is narrowed by a predetermined amount and set, and a motion vector is detected. This makes it possible to detect a plurality of small sums of absolute values each time the moving range of the inspection block is set and to detect a motion vector based on the plurality of sums of absolute values. Although the method and the calculation amount do not change, the detection accuracy of the motion vector can be improved.
[0089]
On the other hand, when the difference between the plurality of absolute value sums is larger than the threshold value, the difference between the absolute value sums is large, and the absolute value sum having the minimum value among the absolute value sums detects the accurate motion vector. It is a sum of absolute values that can be calculated.
[0090]
For this reason, in the detection method, when the difference between the plurality of sums of absolute values is larger than the threshold value, of the plurality of sums of absolute values, the moving range within the moving range in which the smallest sum of the absolute values is formed is formed. Based on the pixel at the predetermined position, the next movement range of the inspection block is set to be the minimum movement range or to be narrower by the predetermined amount or more, and a motion vector is detected.
[0091]
Specifically, for example, when the difference between the sums of the absolute values detected by moving the inspection block in the movement range set at the first time is larger than the threshold, the inspection block is moved next. The range of the motion vector is narrowed down to the minimum moving range based on the sum of the absolute values. Alternatively, the motion vector is detected by narrowing the moving range based on the sum of the absolute values so that the moving range is equal to or smaller than the next moving range.
[0092]
As a result, it is possible to omit the calculation of the movement range set from the first movement range to an intermediate movement range from the minimum movement range or the movement range smaller than the next movement range, An increase in the amount of calculation required for detecting a motion vector can be suppressed as much as possible while maintaining detection accuracy.
[0093]
Next, an image data encoding method according to the present invention is an image data encoding method for performing compression encoding of image data in accordance with a motion vector, and in detecting the motion vector, as described above, From a plurality of absolute value sums detected by moving the inspection block within the set movement range, a plurality of absolute value sums are detected in ascending order of the value, and the inspection block is detected based on the plurality of absolute value sums. The operation of detecting the sum of absolute values while gradually narrowing the moving range is repeated until the moving range of the inspection block becomes the minimum moving range, and a plurality of sums of absolute values detected in the minimum moving range are detected. Among them, a method of detecting a motion vector based on the sum of absolute values having the smallest value is used.
[0094]
As a result, an accurate motion vector can be used for the compression encoding of the image data, so that the image data can be compression-encoded accurately according to the motion of the image and the number of image data to be compressed can be reduced. Thus, the compression encoding efficiency can be improved.
[0095]
The image of the current frame is used as the current image, and the image of the previous frame is used as the previous image. This is because the image of the current frame is used as the current image, and the image of the previous frame is used as the previous image. An image, an image three frames before,... May be used. Similarly, the image of the current field may be used as the current image, and the image of the previous field, the image of two fields before, the image of three fields before, etc. may be used as the previous image.
[0096]
In addition, the reference block is set in the current image, and the inspection block is set in the previous image. However, this is conversely set to the reference block in the previous image and the inspection block is set in the current image. May be set, and the inspection block may be moved in the current image to detect a motion vector.
[0097]
【Example】
Hereinafter, preferred embodiments of a motion vector detecting method and image data encoding method according to the present invention will be described in detail with reference to the drawings. In the motion vector detection method according to the present invention, a plurality of reference blocks each having a predetermined number of pixels are set in a current image, and an inspection block having the same pixels as the reference block is largely moved in a first step to thereby make a reference block and an inspection block In the following step, the position of the moving range is set in accordance with the detected correlation, and the correlation is detected while gradually narrowing the moving range. Is a multi-step search method for detecting a motion vector based on the position of the reference block with respect to the position of the test block detected in step (1).
[0098]
As the multi-step search, a two-step search in which the moving range of the inspection block is divided into two stages and gradually narrowed, and a three-step search in which the moving range of the inspection block is divided into three stages and gradually narrowed Etc.
[0099]
The motion vector detection method according to the first embodiment of the present invention is applied to the above-described two-step search, and as shown in FIG. 1A, as a first step, a pixel located at the center of the previous frame ( In the figure, a first movement range SV1 centered at 1 is set, and the matching processing is performed within the first movement range SV1 to detect three inspection blocks in descending order of correlation. Then, as shown in FIG. 7B, in the second step, the first to third three moving ranges whose moving ranges are narrowed based on the three test blocks selected in the descending order of the correlation. SV21 to SV23 are set, matching processing is performed, and a motion vector is detected based on the test block having the highest correlation in the second step.
[0100]
That is, the motion vector detection method according to the first embodiment can be applied to the motion vector detection circuit 202 of the image data encoding device shown in FIG.
[0101]
The image data encoding apparatus shown in FIG. 7 is supplied with the image data of the current frame via the input terminal 201. The image data of the current frame is supplied to the motion vector detection circuit 202 and the subtractor 203.
[0102]
The motion vector detecting circuit 202 is supplied with image data of a previous frame from a frame memory 205 described below, in addition to the image data of the current frame. The motion vector detection circuit 202 forms a motion vector by detecting a motion of an image based on the image data of the current frame and the image data of the previous frame, and supplies the motion vector to the motion compensation circuit 204.
[0103]
The motion compensation circuit 204 is supplied with the image data of the previous frame from the frame memory 205. The motion compensation circuit 204 performs a motion compensation process on the image data of the previous frame based on the motion vector from the motion vector detection circuit 202, and supplies this to the subtractor 203 and the adder 206.
[0104]
The subtracter 203 subtracts the image data of the current frame from the image data of the previous frame to which the motion compensation processing has been performed, thereby calculating the difference between the image data of the current frame and the image data of the previous frame. The difference data shown is formed and supplied to an orthogonal transform circuit (DCT: Discrete Cosine Transform circuit) 207.
[0105]
The DCT circuit 207 converts the difference data on a frequency axis for each block of a predetermined number of pixels to form a DCT block, and supplies this to the quantization circuit 208. The quantization circuit 208 varies the quantization step in accordance with the level of the DCT block, and performs quantization processing on the DCT block in this quantization step to form compressed image data, which is output to an output terminal 209. For example, the information is supplied to an external device such as a disk recording device via the disk, and is also supplied to an inverse quantization circuit 210.
[0106]
The inverse quantization circuit 210 performs an inverse quantization process on the compressed image data in a quantization step opposite to the quantization step selected by the quantization circuit 208, so that the compressed image data before the quantization process is performed. The DCT block is reproduced and supplied to the inverse DCT circuit 211. The inverse DCT circuit 211 performs an inverse DCT process on the reproduced DCT block to form difference data before being converted into a DCT block, and supplies the difference data to the adder 206.
[0107]
The adder 206 is separately supplied with the motion-compensated image data of the previous frame from the motion compensation circuit 204. The adder 206 reproduces the image data of the current frame by adding the motion-compensated image data of the previous frame and the difference data from the inverse DCT circuit 211 to the frame memory 205. Supply.
[0108]
The image data of the current frame supplied to the frame memory 205 is read with a delay of one frame. As a result, the image data of the current frame is converted into image data of the previous frame at the stage of reading, and is supplied to the motion compensation circuit 204 and the motion vector detection circuit 202.
As described above, the motion compensation circuit 204 performs a motion compensation process on the image data of the previous frame according to the motion vector from the motion vector detection circuit 202, and supplies this to the subtractor 203 and the adder 206. I do. Thereafter, the above operation is repeated in each circuit.
[0109]
As described above, the image data encoding apparatus encodes and outputs the difference between the image data of the previous frame and the image data of the current frame, which have been subjected to the motion vector compensation based on the motion vector. Thereby, highly efficient compression of image data can be performed.
[0110]
Here, the motion vector detecting circuit 202 has a configuration as shown in FIG. 11, and the image data of the current frame from the input terminal 201 shown in FIG. The image data of the previous frame from the frame memory 205 shown in FIG. 7 is supplied to and stored in the previous frame memory 252 via the input terminal 254.
[0111]
The controller 255 reads out the image data of the reference block 223 composed of the image data (N pixels × M lines) of the central part of the image 221 of the current frame stored in the current frame memory 251 as shown in FIG. The current frame memory 251 is read and controlled. The reference block 223 read from the current frame memory 251 is supplied to the difference detection circuit 257.
[0112]
In addition, the controller 255 also performs, as a first step, the reference block 223 of the image data 222 of the previous frame shown in FIG. 8 stored in the previous frame memory 252 as shown in FIG. In the figure, the center pixel (origin) 1 of the image data 222 of the previous frame corresponding to the center pixel is detected, and the first pixel having a substantially square shape centered on the origin 1 indicated by a thick line in the figure is detected. The movement range SV1 is set.
[0113]
As shown in FIG. 1A, the first movement range SV1 is such that pixels 2 to 5 are located at four corners. Further, it is composed of a total of seven lines set every other line, and the one line has a total of seven pixels (search points) set every other pixel. That is, the first movement range SV1 is composed of a total of 49 search points.
[0114]
When the first movement range SV1 is set, the controller 255 sets, for example, an inspection block 224 having the same pixel as the reference block 223 shown in FIG. The preceding frame memory 252 is read and controlled via the i-pixel step address moving circuit 256A so that the image data of the inspection block 224 is read.
[0115]
Subsequently, the controller 255 successively sets the inspection blocks 224 centered on the 49 search points, and sets the i-pixel steps so that the image data of the set inspection blocks 224 is read out. The previous frame memory 252 is read out and controlled via the address transfer circuit 256A.
[0116]
That is, the controller 255 moves the inspection block 224 at an interval of two pixels (every other pixel) within the first movement range SV1 so as to read out the image data of the inspection block 224. The previous frame memory 252 is read out and controlled via the step address moving circuit 256A.
The image data of each inspection block 224 is supplied to the difference detection circuit 257.
[0117]
The difference detection circuit 257 compares the image data of the reference block 223 and the image data of each of the inspection blocks 224 for each pixel at the same position to detect the difference, and detects each difference data as an absolute value sum detection. The signal is supplied to the circuit 258.
[0118]
The absolute value sum detection circuit 258 detects the absolute value of the difference data, adds all the absolute values of the difference data detected by one block-by-block comparison (matching process), and sums the absolute value data. To form As a result, a total of 49 absolute value sum data corresponding to the movement of the inspection block 224 are formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0119]
The determination circuit 259 determines, for example, the 49 absolute value sum data obtained by moving the inspection block 224 at an interval of two pixels within the first movement range SV1 to an inspection in which the absolute value sum data is detected. It has a memory that can be stored corresponding to the position (search point) of the block 224. The controller 255 stores the absolute value sum data supplied from the absolute value sum detection circuit 258 to the determination circuit 259 in correspondence with the position of the inspection block 224 where the absolute value sum data is formed. , Write control of the memory.
[0120]
When the 49 pieces of absolute value sum data are stored in the memory of the determination circuit 259, the controller 255 determines the absolute value sum data of the minimum value from among the absolute value sum data, and the absolute value of the second smallest value. The sum data and the absolute value sum data having the third smallest value are detected.
[0121]
The absolute value sum data having the minimum value indicates that the correlation between the images between the inspection block 224 and the reference block 223 is high, but the absolute value sum data having the minimum value is not necessarily detected. The images of the inspection block 224 and the reference block 223 do not always match. If absolute value sum data capable of accurately detecting a motion vector is not detected in the first step, a motion vector is detected based on the absolute value sum data detected in the first step in a subsequent second step. Therefore, there is a high possibility that an erroneous motion vector is detected in the second step. For this reason, the controller 255 detects three absolute value sum data in ascending order of value in order to make the detection of absolute value sum data in the first step more careful.
[0122]
When the controller 255 detects the three absolute value sum data, as shown in FIG. 1A, the controller 255 searches for the search point 6 (x in the figure) at the center of the inspection block 224 where the minimum absolute value sum data is detected. The search point 7 (indicated by △ in the figure) at the center of the inspection block 224 where the second smallest absolute value sum data is detected, and the third smallest absolute value sum data are detected. The search point 8 (indicated by ◇ in the figure) at the center of the inspection block 224 is detected.
[0123]
Then, as shown in FIG. 1B, as a second step, a substantially square first moving range SV21 centered on the search point 6 and a substantially square shaped first movement range SV centered on the search point 7 are set. A second movement range SV22 and a substantially square third movement range SV23 centered on the search point 8 are set.
[0124]
Each of the moving ranges SV21, SV22, and SV23 has search points 10 to 13, search points 15 to 18, and search points 20 to 23 at four corners, respectively. Each of the movement ranges SV21, SV22, and SV23 is composed of a total of three lines set for each line, and the one line includes a total of three pixels (search points) set for each pixel. )have. That is, each of the moving ranges SV21, SV22, and SV23 is composed of a total of nine search points.
[0125]
When such moving ranges SV21, SV22, SV23 are set, the controller 255 moves the inspection block 224 along each of the moving ranges SV21, SV22, SV23, and each time the controller 255 moves, the inspection block 224 is moved. Is read out from the previous frame memory 252 via the i-pixel step address moving circuit 256A so as to read out the image data.
[0126]
In the second step, the sum of absolute value data relating to each of the search points 6 to 8 at the center of each of the moving ranges SV21, SV22, SV23 has already been detected in the first step. 255, the previous frame memory 252 via the i-pixel step address moving circuit 256A so as to move the inspection block 224 through each of the search points 6 to 8 in each of the moving ranges SV21, SV22, SV23. Read control.
[0127]
The image data read by the movement of the inspection block 224 is supplied to the difference detection circuit 257, respectively.
[0128]
The difference detection circuit 257 compares the image data of the reference block 223 with the image data of each of the inspection blocks 224 to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, adds all the difference data detected by one block-by-block comparison, and forms absolute value sum data.
[0129]
Thus, a total of 27 absolute values (including the three absolute value sum data at each of the search points 6 to 8), which is the amount of movement of the inspection block 224 along each of the movement ranges SV21, SV22, and SV23. Value sum data will be formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0130]
The determination circuit 259 converts the 27 absolute value sum data supplied from the absolute value sum detection circuit 258 into a memory corresponding to each of the moving ranges SV21, SV22, and SV23 in which the absolute value sum data is formed. Store it temporarily at the address. Then, when all the absolute value sum data is stored in the memory, the absolute value sum data of the minimum value is detected from the absolute value sum data, and the absolute value sum data of the minimum value is transferred to the controller 255. To supply.
[0131]
The fact that the value of the absolute value sum data is the minimum indicates that the correlation of each image between the inspection block 224 and the reference block 223 is high. Therefore, the motion vector of the image can be detected by detecting how far the inspection block 224 from which the absolute value sum data of the minimum value is detected is apart from the reference block 223.
[0132]
Therefore, based on the absolute value sum data of the minimum value, the controller 255 determines the address of the search point on the previous frame memory 252 located at the center of the inspection block 224 where the absolute value sum data is detected. To detect. Then, by detecting the difference between the address of this search point and the address of the center pixel on the current frame memory 251 of the reference block 223, the above-described test block 224 for the absolute value sum data of the minimum value is detected. The motion (motion vector) of the reference block 223 is detected, and the motion vector is supplied to the motion compensation circuit 204 shown in FIG.
[0133]
As a result, the image data encoding apparatus shown in FIG. 7 can perform the compression encoding processing of the image data.
[0134]
As described above, in the motion vector detection method according to the first embodiment, in the first step of the two-step search, three absolute value sum data are detected in ascending order of value. In a normal two-step search, the number of search points is 49 points in the first step and eight points in the second step, for a total of 57 points. In the motion vector detection method, 49 points and second points are used in the first step. In the step, there are a total of 73 points of 24 points, which is an increase of 16 search points as compared with the conventional method, and the calculation amount is slightly increased. However, in the first step, the absolute value sum data which can detect an accurate motion vector is obtained. The detection probability can be increased. Therefore, it is possible to improve the detection accuracy of the motion vector by minimizing an increase in the amount of calculation.
[0135]
In the description of the motion vector detection method according to the first embodiment, the motion vector detection method according to the present invention is applied to a two-step search. Can be. Further, in the first step, three absolute value sum data are detected in ascending order of value, but two absolute value sum data may be selected in ascending order of value. In this case, since the number of absolute value sum data detected in the first step is reduced by one, the detection accuracy of the motion vector may be slightly lower than when detecting the three absolute value sum data in ascending order of the value. However, since the number of search points in the second step can be set to 16 points, the number of search points can be increased to 8 points as compared with the conventional two-step search, and compared with the conventional method. The detection accuracy of the motion vector can be improved, and the addition of the calculation amount can be suppressed.
[0136]
Here, as the number of detection points of the absolute value sum data is increased, such as 4 points or 5 points, in ascending order of the value, the detection accuracy of the motion vector can be improved. As the number of detection points of the value sum data increases, the amount of calculation increases. If the detection of the plurality of absolute value sum data is performed every time the moving range of the inspection block 224 is set, the detection accuracy is improved, but the amount of calculation is increased. For this reason, in the motion vector detecting method according to the second embodiment of the present invention, the plurality of sums of absolute values are detected only in a predetermined moving range of the moving range of the inspection block 224 set a plurality of times. I made it.
[0137]
That is, if absolute value sum data capable of detecting an accurate motion vector in the moving range in the first step cannot be detected, an incorrect motion vector will be finally detected. For this reason, in the first step, the detection accuracy of the motion vector depends on the probability with which the absolute value sum data capable of detecting the accurate motion vector can be detected.
[0138]
For this reason, in the motion vector detecting method according to the second embodiment, for example, only in the first step of the three-step search, the absolute value sum data of the first value and the absolute value sum data of the second smallest value are used for a total of two points. Added the absolute value sum data.
[0139]
The motion vector detecting method according to the second embodiment can be applied to the motion vector detecting circuit 202 shown in FIG. 11, similarly to the motion vector detecting method according to the first embodiment.
[0140]
That is, when the first step of the three-step search is performed as shown in FIG. 2A, the controller 255 stores the substantially square first movement shown by the bold line in FIG. The range SV1 is set.
[0141]
The first movement range SV1 is formed around the center pixel (origin) 1 of the image data 222 of the previous frame corresponding to the center pixel of the reference block 223, as indicated by ● in FIG. 2A. And has search points 31 to 34 at the four corners. There are four pixel intervals between the search points, and the first movement range has a total of nine search points.
[0142]
When the first movement range SV1 is set, the controller 255 sets the inspection block 224 having, for example, the search point 31 at the center, and reads out the image data of the inspection block 224. , Read control of the previous frame memory 252 via the i pixel step address moving circuit 256A.
[0143]
Subsequently, the controller 255 successively sets the inspection blocks 224 centered on the nine search points, and sets the i-pixel steps so that the image data of the set inspection blocks 224 is read out. The previous frame memory 252 is read out and controlled via the address transfer circuit 256A.
[0144]
That is, the controller 255 causes the i-pixel step address moving circuit 256A to read the image data of the inspection block 224 while moving the inspection block 224 at intervals of four pixels within the first movement range SV1. The read-out control of the previous frame memory 252 is performed via the above-mentioned control.
The image data of each inspection block 224 is supplied to the difference detection circuit 257.
[0145]
The difference detection circuit 257 compares the image data of the reference block 223 and the image data of each of the inspection blocks 224 for each pixel at the same position to detect the difference, and detects each difference data as an absolute value sum detection. The signal is supplied to the circuit 258.
[0146]
The absolute value sum detection circuit 258 detects the absolute value of the difference data, adds all the absolute values of the difference data detected in one matching process, and forms absolute value sum data. As a result, a total of nine absolute value sum data corresponding to the movement of the inspection block 224 is formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0147]
The determination circuit 259 determines, for example, the nine absolute value sum data obtained by moving the inspection block 224 at an interval of four pixels within the first movement range SV1 and performs an inspection in which the absolute value sum data is detected. The data is stored in the memory corresponding to the position (search point) of the block 224.
[0148]
When the nine pieces of absolute value sum data are stored in the memory of the determination circuit 259, the controller 255 calculates the absolute value sum data of the minimum value among the absolute value sum data and the second smallest value. The absolute value sum data is detected, and the search point 33 (indicated by x in the drawing) at the center of the inspection block 224 where the absolute value sum data of the minimum value is detected, the absolute value sum data having the second smallest value is detected. A search point 35 (indicated by △ in the figure) at the center of the inspection block 224 thus detected is detected.
[0149]
Then, as shown in FIG. 2B, as a second step, a substantially square-shaped first movement range SV21 centered on the search point 33 and a substantially square-shaped first movement range SV centered on the search point 35 Is set as the second movement range SV22.
[0150]
Each of the moving ranges SV21 and SV22 has search points 40 to 43 and search points 45 to 48 at four corners, respectively. Each of the moving ranges SV21 and SV22 is formed by setting a total of three lines having a total of three search points set every other pixel. That is, each of the moving ranges SV21 and SV22 is composed of a total of nine search points.
[0151]
When such moving ranges SV21 and SV22 are set, the controller 255 moves the inspection block 224 along each of the moving ranges SV21 and SV22, and every time the inspection block 224 moves, the image data of the inspection block 224 is changed. The previous frame memory 252 is read out and controlled via the i-pixel step address moving circuit 256A so that it is read out.
[0152]
In the second step, the absolute value sum data relating to the search points 33 and 35 at the center of the moving ranges SV21 and SV22 has already been detected in the first step, respectively. In the moving ranges SV21 and SV22, the previous frame memory 252 is read out and controlled via the i-pixel step address moving circuit 256A so as to move the inspection block 224 through the search points 33 and 35.
[0153]
The image data read by the movement of the inspection block 224 is supplied to the difference detection circuit 257, respectively.
[0154]
The difference detection circuit 257 compares the image data of the reference block 223 with the image data of each of the inspection blocks 224 to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, adds all the difference data detected by one block-by-block comparison, and forms absolute value sum data.
[0155]
As a result, a total of 18 absolute value sums (including two absolute value sum data at the search points 33 and 35) corresponding to the movement of the inspection block 224 along the movement ranges SV21 and SV22 are included. Data will be formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0156]
The determination circuit 259 temporarily stores the eighteen absolute value sum data supplied from the absolute value sum detection circuit 258 at an address corresponding to each of the moving ranges SV21 and SV22 where the absolute value sum data is formed. . When all the absolute value sum data is stored in the memory, the minimum value absolute value sum data is detected from the absolute value sum data, and the minimum value absolute value sum data is supplied to the controller 255. At the same time, a search point 46 (indicated by ◇ in the figure) at the center of the inspection block 224 where the absolute value sum data of the minimum value is detected is detected.
[0157]
Next, as shown in FIG. 2C, the controller 255 sets, as a third step, a substantially square-shaped movement range SV3 around the search point 46.
[0158]
The moving range SV3 has search points 50 to 53 at four corners, and is formed by sequentially setting a total of three lines having three search points set for each pixel. ing. That is, the moving range SV3 is composed of a total of nine search points.
[0159]
When such a movement range SV3 is set, the controller 255 moves the inspection block 224 along the movement range SV3, and reads out the image data of the inspection block 224 every time the controller 255 moves. The previous frame memory 252 is read out and controlled via the step address moving circuit 256A.
[0160]
In the third step, the absolute value sum data relating to the search point 46 at the center of the movement range SV3 has already been detected in the second step. The previous frame memory 252 is read out and controlled via the i-pixel step address moving circuit 256A so as to move the inspection block 224 through the search point 46.
[0161]
The image data read by the movement of the inspection block 224 is supplied to the difference detection circuit 257, respectively.
[0162]
The difference detection circuit 257 compares the image data of the reference block 223 with the image data of the inspection block 224 to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, adds all the difference data detected by one block-by-block comparison, and forms absolute value sum data.
[0163]
Thus, a total of nine absolute value sum data (including one absolute value sum data at each of the search points 46) corresponding to the movement of the inspection block 224 along the movement range SV3 are formed. It will be. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0164]
The determination circuit 259 temporarily stores the nine absolute value sum data supplied from the absolute value sum detection circuit 258 at an address on the memory corresponding to the moving range SV3 in which the absolute value sum data is formed. . When all the absolute value sum data is stored in the memory, the minimum value absolute value sum data is detected from the absolute value sum data, and the minimum value absolute value sum data is supplied to the controller 255. I do.
[0165]
Based on the absolute value sum data of the minimum value detected in the third step, the controller 255 searches the previous frame memory 252 located at the center of the inspection block 224 where the absolute value sum data is detected. Find the address of a point. Then, by detecting the difference between the address of this search point and the address of the center pixel on the current frame memory 251 of the reference block 223, the above-described test block 224 for the absolute value sum data of the minimum value is detected. The motion (motion vector) of the reference block 223 is detected, and the motion vector is supplied to the motion compensation circuit 204 shown in FIG.
[0166]
As a result, the image data encoding apparatus shown in FIG. 7 can perform the compression encoding processing of the image data.
[0167]
In the motion vector detection method according to the second embodiment, a plurality of absolute value sum data, for example, the absolute value sum data of the minimum value and the absolute value sum data of the second smallest value are obtained only in the first step of the three-step search. I try to detect. In a normal three-step search, the number of search points is nine in the first step, eight in the second step, and eight in the third step, for a total of 25 points. There are a total of 33 points, 9 points in the step, 16 points in the second step, and 8 points in the third step, which is an increase of eight search points as compared with the conventional method, and the amount of calculation slightly increases. In the step, the detection probability of the absolute value sum data that can detect an accurate motion vector can be increased.
[0168]
As described above, the detection accuracy of the motion vector depends on how much probability and the absolute value sum data that can detect an accurate motion vector can be detected in the first step. In the first step, the detection probability of the absolute value sum data capable of detecting an accurate motion vector can be increased, so that the detection accuracy of the motion vector can be improved. In addition, since the detection of the plurality of absolute value sum data is applied only in the first step, an increase in the amount of calculation can be minimized.
[0169]
In the description of the motion vector detection method according to the second embodiment, the motion vector detection method according to the present invention is applied to a three-step search. Can be. Further, in the first step, two absolute value sum data are detected in ascending order of the value. However, this may be performed by selecting three, four or five in descending order of the value. Good. In this case, although the calculation amount increases as the number of absolute value sum data detected in the first step increases, the detection probability of the absolute value sum data capable of detecting an accurate motion vector can be increased accordingly, The detection accuracy of the motion vector can be further improved.
[0170]
Although a plurality of absolute value sum data are detected only in the first step, a plurality of absolute value sum data may be detected only in the second step.
[0171]
Next, a motion vector detecting method according to a third embodiment of the present invention will be described. In the above-described motion vector detection method according to the second embodiment, the amount of calculation is reduced by detecting a plurality of sums of absolute values only at desired steps, but the motion vector according to the third embodiment is reduced. In the detection method, a plurality of absolute value sum data is detected only in a desired step, a difference between the detected absolute value sum data is compared with a threshold value, and a moving range of a subsequent step is determined according to the comparison result. As a result, the amount of calculation was further reduced.
[0172]
That is, the motion vector detecting method according to the third embodiment can be applied to a motion vector detecting circuit as shown in FIG. It is assumed that the motion vector detection circuit shown in FIG. 3 detects a motion vector by a three-step search. Also, in the motion vector detection circuit shown in FIG. 3, the same reference numerals are given to portions exhibiting the same operations as those of the motion vector detection circuit 202 shown in FIG. 11, and detailed description thereof will be omitted.
[0173]
In FIG. 3, the controller 255 sets a substantially square-shaped first movement range SV1 as indicated by a bold line in FIG. 4 in the previous frame memory 252 at the first step of the three-step search.
[0174]
The first movement range SV1 is formed around a center pixel (origin) 1 indicated by ● in FIG. 4, and has search points 71 to 74 at its four corners. The entire first movement range SV1 has a total of nine search points, and each search point is spaced by four pixels.
[0175]
When such a first movement range SV1 is set, the controller 255 sets an inspection block 224 having, for example, the search point 71 as a center, and sets i so that the image data of the inspection block 224 is read out. The preceding frame memory 252 is read out and controlled via the pixel step address moving circuit 256A.
[0176]
Subsequently, the controller 255 successively sets the inspection blocks 224 centered on the nine search points, and sets the i-pixel steps so that the image data of the set inspection blocks 224 is read out. The previous frame memory 252 is read out and controlled via the address transfer circuit 256A.
[0177]
That is, the controller 255 causes the i-pixel step address moving circuit 256A to read the image data of the inspection block 224 while moving the inspection block 224 at intervals of four pixels within the first movement range SV1. The read-out control of the previous frame memory 252 is performed via the above-mentioned control.
The image data of each inspection block 224 is supplied to the difference detection circuit 257.
[0178]
The difference detection circuit 257 compares the image data of the reference block 223 and the image data of each of the inspection blocks 224 for each pixel at the same position to detect the difference, and detects each difference data as an absolute value sum detection. The signal is supplied to the circuit 258.
[0179]
The absolute value sum detection circuit 258 detects the absolute value of the difference data, adds all the absolute values of the difference data detected in one matching process, and forms absolute value sum data. As a result, a total of nine absolute value sum data corresponding to the movement of the inspection block 224 is formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0180]
The determination circuit 259 detects nine absolute value sum data obtained by moving the inspection block 224 at an interval of four pixels along the first movement range SV1, for example. Is stored in the memory corresponding to the position of the inspection block 224 (search point).
[0181]
When the nine pieces of absolute value sum data are stored in the memory of the determination circuit 259, the controller 255 calculates the absolute value sum data of the minimum value among the absolute value sum data and the second smallest value. In addition to detecting absolute value sum data, a difference between the absolute value sum data of the minimum value and the absolute value sum data having the second smallest value is detected.
[0182]
In the judgment circuit 259, for example, the threshold value of the difference value between the absolute value sum data of the minimum value and the second smallest absolute value sum data from which the accurate motion vector can be detected, Is supplied as The judgment circuit 259 compares the threshold value data with the difference value between the absolute value sum data of the minimum value and the absolute value sum data having the second smallest value, and supplies the comparison data to the controller 255.
[0183]
The threshold data is a limit value of a difference value at which the accurate motion vector can be detected. Therefore, by comparing the difference between the absolute value sum data of the minimum value and the absolute value sum data having the second smallest value with the threshold value data, is it possible to detect a correct motion vector based on the absolute value sum data? Can be detected.
[0184]
For this reason, when the difference value is smaller than the threshold value data, the controller 255 determines that further detailed detection is necessary and shifts to the second step as shown in FIG.
[0185]
In the second step, the controller 255 sets the search point 73 (indicated by X in the drawing) at the center of the inspection block 224 where the absolute value sum data of the minimum value is detected, and the absolute value sum of the second smallest value. A search point 75 (indicated by △ in the figure) at the center of the inspection block 224 where the data is detected is detected.
[0186]
Then, as shown in FIG. 5A, as a second step, a substantially square-shaped first movement range SV21 centered on the search point 73 and a substantially square-shaped first movement range SV centered on the search point 75 Is set as the second movement range SV22.
[0187]
Each of the moving ranges SV21 and SV22 has search points 77 to 80 and search points 81 to 84 at four corners, respectively. Each of the moving ranges SV21 and SV22 is formed by setting a total of three lines having a total of three search points set every other pixel. That is, each of the moving ranges SV21 and SV22 is composed of a total of nine search points.
[0188]
When such moving ranges SV21 and SV22 are set, the controller 255 moves the inspection block 224 along each of the moving ranges SV21 and SV22, and every time the inspection block 224 moves, the image data of the inspection block 224 is changed. The previous frame memory 252 is read out and controlled via the i-pixel step address moving circuit 256A so that it is read out.
[0189]
In the second step, the absolute value sum data relating to the search points 33 and 35 at the center of the moving ranges SV21 and SV22 has already been detected in the first step, respectively. In the moving ranges SV21 and SV22, the previous frame memory 252 is read out and controlled via the i-pixel step address moving circuit 256A so as to move the inspection block 224 through the search points 33 and 35.
[0190]
The image data read by the movement of the inspection block 224 is supplied to the difference detection circuit 257, respectively.
[0191]
The difference detection circuit 257 compares the image data of the reference block 223 with the image data of each of the inspection blocks 224 to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, adds all the difference data detected by one block-by-block comparison, and forms absolute value sum data.
[0192]
As a result, a total of 18 absolute value sums (including two absolute value sum data at the search points 73 and 75) corresponding to the movement of the inspection block 224 along the respective movement ranges SV21 and SV22. Data will be formed. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0193]
The determination circuit 259 temporarily stores the eighteen absolute value sum data supplied from the absolute value sum detection circuit 258 at an address corresponding to each of the moving ranges SV21 and SV22 where the absolute value sum data is formed. . When all the absolute value sum data is stored in the memory, the minimum value absolute value sum data is detected from the absolute value sum data, and the minimum value absolute value sum data is supplied to the controller 255. At the same time, a search point 82 (indicated by ◇ in the figure) at the center of the inspection block 224 where the absolute value sum data of the minimum value is detected is detected.
[0194]
Next, as shown in FIG. 5B, the controller 255 sets, as a third step, a substantially square movement range SV3 centered on the search point 82.
[0195]
The movement range SV3 has search points 86 to 89 at four corners, and is formed by sequentially setting a total of three lines having three search points set for each pixel. ing. That is, the moving range SV3 is composed of a total of nine search points.
[0196]
When such a movement range SV3 is set, the controller 255 moves the inspection block 224 along the movement range SV3, and reads out the image data of the inspection block 224 every time the controller 255 moves. The previous frame memory 252 is read out and controlled via the step address moving circuit 256A.
[0197]
In the third step, the absolute value sum data relating to the search point 82 at the center of the movement range SV3 has already been detected in the second step. The preceding frame memory 252 is read and controlled via the i-pixel step address moving circuit 256A so as to move the inspection block 224 through the search point 82.
[0198]
The image data read by the movement of the inspection block 224 is supplied to the difference detection circuit 257, respectively.
[0199]
The difference detection circuit 257 compares the image data of the reference block 223 with the image data of the inspection block 224 to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The sum-of-absolute-values detection circuit 258 detects the absolute value of the difference data, adds all the difference data detected by one block-by-block comparison, and forms absolute value sum data.
[0200]
As a result, a total of nine absolute value sum data (including one absolute value sum data at each of the search points 82) corresponding to the movement of the inspection block 224 along the movement range SV3 are formed. It will be. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0201]
The determination circuit 259 temporarily stores the nine absolute value sum data supplied from the absolute value sum detection circuit 258 at an address on the memory corresponding to the moving range SV3 in which the absolute value sum data is formed. . When all the absolute value sum data is stored in the memory, the minimum value absolute value sum data is detected from the absolute value sum data, and the minimum value absolute value sum data is supplied to the controller 255. I do.
[0202]
Based on the absolute value sum data of the minimum value detected in the third step, the controller 255 searches the previous frame memory 252 located at the center of the inspection block 224 where the absolute value sum data is detected. Find the address of a point. Then, by detecting the difference between the address of this search point and the address of the center pixel on the current frame memory 251 of the reference block 223, the above-described test block 224 for the absolute value sum data of the minimum value is detected. The motion (motion vector) of the reference block 223 is detected, and the motion vector is supplied to the motion compensation circuit 204 shown in FIG.
[0203]
As a result, the image data encoding apparatus shown in FIG. 7 can perform the compression encoding processing of the image data.
[0204]
Next, when the difference value between the absolute value sum data of the minimum value and the absolute value sum data having the second smallest value is larger than the threshold value data, it is determined that the difference value is larger than the minimum value. This shows that accurate motion vector detection can be performed using the absolute value sum data of the values. Therefore, the controller 255 skips the above-described second step and proceeds to the third step in order to detect a motion vector based on the absolute value sum data of the minimum values.
[0205]
That is, when the difference value between the absolute value sum data of the minimum value and the absolute value sum data having the second smallest value is larger, the controller 255 checks whether the absolute value sum data of the minimum value is detected. A search point 73 (indicated by x in the figure) at the center of the block 224 is detected, and as shown in FIG. 6, a substantially square-shaped movement range SV3 around the search point 73 is set.
[0206]
In FIG. 6, the moving range SV3 has search points 90 to 93 at four corners, and a total of three lines are set in order, with a total of three search points set for each pixel. It is formed by this. That is, the moving range SV3 is composed of a total of nine search points.
[0207]
When such a movement range SV3 is set, the controller 255 moves the inspection block 224 along the movement range SV3, and reads out the image data of the inspection block 224 every time the controller 255 moves. The previous frame memory 252 is read out and controlled via the step address moving circuit 256A.
[0208]
In the third step, the absolute value sum data relating to the search point 73 at the center of the movement range SV3 has already been detected in the first step. The preceding frame memory 252 is read out and controlled via the i-pixel step address moving circuit 256A so as to move the inspection block 224 through the search point 73.
[0209]
The image data read by the movement of the inspection block 224 is supplied to the difference detection circuit 257, respectively.
[0210]
The difference detection circuit 257 compares the image data of the reference block 223 with the image data of the inspection block 224 to detect the difference, and supplies the difference data to the absolute value sum detection circuit 258. The absolute value sum detection circuit 258 detects the absolute value of the difference data and adds all the difference data detected by one matching process to form absolute value sum data.
[0211]
As a result, a total of nine absolute value sum data (including one absolute value sum data at each of the search points 73), which is the amount of movement of the inspection block 224 along the movement range SV3, is formed. It will be. This absolute value sum data is supplied to the judgment circuit 259, respectively.
[0212]
The determination circuit 259 temporarily stores the nine absolute value sum data supplied from the absolute value sum detection circuit 258 at an address on the memory corresponding to the moving range SV3 in which the absolute value sum data is formed. . When all the absolute value sum data is stored in the memory, the minimum value absolute value sum data is detected from the absolute value sum data, and the minimum value absolute value sum data is supplied to the controller 255. I do.
[0213]
Based on the absolute value sum data of the minimum value detected in the third step, the controller 255 searches the previous frame memory 252 located at the center of the inspection block 224 where the absolute value sum data is detected. Find the address of a point. Then, by detecting the difference between the address of this search point and the address of the center pixel on the current frame memory 251 of the reference block 223, the above-described test block 224 for the absolute value sum data of the minimum value is detected. The motion (motion vector) of the reference block 223 is detected, and the motion vector is supplied to the motion compensation circuit 204 shown in FIG.
[0214]
As a result, the image data encoding apparatus shown in FIG. 7 can perform the compression encoding processing of the image data.
[0215]
In the motion vector detecting method according to the third embodiment, a plurality of absolute value sum data is detected only in the first step, and a difference value of each absolute value sum data is compared with a threshold value. By controlling the next moving range, if the difference value is smaller than the threshold value, the motion vector can be detected in more detail to maintain the detection accuracy of the motion vector. If it is larger than the threshold value, it is possible to omit steps in the middle and reduce the amount of calculation to detect a motion vector. That is, it is possible to reduce the calculation amount while maintaining the motion vector detection accuracy described in the motion vector detection method according to the second embodiment.
[0216]
In the description of the motion vector detection method according to the third embodiment, in the first step, the absolute value sum data of the minimum value and the absolute value sum data of the second smallest value are detected. This may be done by detecting three, four, five,... Absolute value sum data in ascending order of value.
[0217]
Further, a plurality of absolute value sum data is detected in the first step of the three-step search. However, this is performed in the second step of the four-step search for detecting a motion vector in four stages. The difference of the sum data may be detected and compared with the threshold value, and the subsequent step may be set to a moving range according to the comparison result, or a 5-step search for detecting a motion vector in five steps In the second step or the third step, a difference between a plurality of absolute value sum data may be detected and compared with the threshold value, and a moving range may be set in a subsequent step according to the comparison result.
[0218]
Further, the motion vector detection method according to each of the above embodiments can detect an accurate motion vector as described above. For this reason, in the image data encoding device as shown in FIG. 7, the image data to be compression-encoded can be reduced, and the compression-encoding efficiency can be improved.
[0219]
Lastly, in the description of each of the above-described embodiments, the image of the current frame is used as the current image, and the image of the previous frame is used as the previous image. Alternatively, an image two frames before, an image three frames before, etc. may be used as the previous image. Similarly, the image of the current field may be used as the current image, and the image of the previous field, the image of two fields before, the image of three fields before, etc. may be used as the previous image.
[0220]
In addition, the reference block is set in the current image, and the inspection block is set in the previous image. However, this is conversely set to the reference block in the previous image and the inspection block is set in the current image. May be set, and the inspection block may be moved in the current image to detect a motion vector.
[0221]
Further, the motion vector detection method and the image data encoding method according to the present invention are applied to a compression encoding apparatus for image data using the DCT circuit 207 as an orthogonal transformation circuit. Other orthogonal transform means such as transform, Hadamard transform, and KL transform may be used.
[0222]
Also, the case where the motion vector detection method and the image data encoding method according to the present invention are applied to the two-step search and the three-step search has been described. The motion vector is detected while narrowing the moving range of the test block in multiple stages, such as a 4-step search that narrows the moving range of the test block and a 5-step search that gradually narrows the moving range of the test block in five stages. Any method is applicable.
[0223]
Further, in the description of each of the above-described embodiments, the absolute value sum is used as the evaluation function value indicating the correlation between the inspection block and the reference block. Any information may be used as long as the information indicates the correlation with the reference block, and it is needless to say that various changes can be made without departing from the technical idea of the present invention.
[0224]
【The invention's effect】
The motion vector detection method according to the present invention is a multi-step search for detecting a motion vector by performing a matching process in multiple stages, and suppresses an increase in the amount of calculation and a delay in detection speed as much as possible. Detection accuracy can be improved.
[0225]
In addition, the method for encoding image data according to the present invention can detect an accurate motion vector by minimizing an increase in the amount of calculation and delaying the detection speed in the motion vector detection means. And accurate compression encoding can be performed. Further, it is possible to reduce the image data to be compression-encoded and to improve the compression-encoding efficiency.
[Brief description of the drawings]
FIG. 1 is a diagram for explaining a motion vector detection method according to a first embodiment of the present invention.
FIG. 2 is a diagram for explaining a motion vector detection method according to a second embodiment of the present invention.
FIG. 3 is a block diagram of a motion vector detection device to which a motion vector detection method according to a third embodiment of the present invention is applied.
FIG. 4 is a diagram for explaining an operation in a first step of a motion vector detection device to which the motion vector detection method according to the third embodiment is applied.
FIG. 5 is a diagram for explaining an operation in a case where a difference between sums of absolute values detected in the first step is equal to or more than a threshold value in a motion vector detecting apparatus to which the motion vector detecting method according to the third embodiment is applied. FIG.
FIG. 6 is a diagram illustrating an operation in a case where a difference between sums of absolute values detected in the first step is equal to or less than a threshold value in a motion vector detecting apparatus to which the motion vector detecting method according to the third embodiment is applied. FIG.
FIG. 7 is a block diagram of an image data compression encoding apparatus that performs image data compression encoding processing by detecting a motion vector of an image.
FIG. 8 is a diagram for explaining a block matching process performed by a motion vector detection circuit provided in the image data compression encoding apparatus.
FIG. 9 is a block diagram of a motion vector detection circuit that performs motion vector detection by full search.
FIG. 10 is a diagram for explaining how to detect a motion vector by the full search.
FIG. 11 is a block diagram of a motion vector detection circuit that detects a motion vector by a two-step search or a three-step search.
FIG. 12 is a diagram for explaining a method of detecting a motion vector in a first step of a conventional three-step search.
FIG. 13 is a diagram for explaining how to detect a motion vector by the second and third steps of the conventional three-step search.
FIG. 14 is a diagram for explaining a method of detecting a motion vector by a conventional two-step search.
[Explanation of symbols]
SV1... The moving range of the inspection block in the first step
1... Pixel located at the center of the movement range of the first step (origin)
... Pixels located at the corners of the movement range of the first step
6... Pixels related to the minimum value of the sum of absolute values in the first step
7. Pixel related to the absolute value sum having the second smallest value in the first step
8 pixels related to the sum of absolute values having the third smallest value in the first step
SV21... First movement range in the second step by sum of absolute values of minimum values
10 to 13: pixels located at the corners of the first movement range
SV22: second moving range in the second step based on the absolute value sum having the second smallest value
15-18: pixels located at the corners of the second movement range
SV23... Third moving range in the second step by the sum of absolute values having the third smallest value
20 to 23: pixels located at the corners of the third movement range
SV1... The moving range of the inspection block in the first step
30: Pixel located at the center of the movement range of the first step (origin)
31 to 34... Pixels located at the corners of the movement range of the first step
33 pixels related to the minimum value of the sum of absolute values in the first step
35 pixels related to the sum of absolute values having the second smallest value in the first step
SV21... First movement range in the second step by sum of absolute values of minimum values
40 to 43... Pixels located at the corners of the first movement range
SV22: second moving range in the second step based on the absolute value sum having the second smallest value
45 to 48... Pixels located at the corners of the second movement range
46: Pixel related to minimum value of sum of absolute values in second step
49: Pixel related to the absolute value sum having the second smallest value in the second step
SV3: Third moving range in the third step based on the first value of the sum of absolute values
50 to 53... Pixels located at the corners of the third movement range
251 ... Current frame memory
252... Previous frame memory
253 ····· Input terminal for image data of current frame
254: Input terminal for image data of previous frame
255 Controller
256A... I pixel step address moving circuit
256B... 1 pixel step address transfer circuit
257... Difference detection circuit
258 ... Absolute value sum detection circuit
259 ... Judgment circuit
260 ····· Motion vector output terminal
261 ... Threshold generation circuit
SV1... The moving range of the inspection block in the first step
70: Pixel located at the center of the movement range of the first step (origin)
71 to 74... Pixels located at the corners of the movement range of the first step
73 pixels related to the minimum value of the sum of absolute values in the first step
75: Pixel related to the absolute value sum having the second smallest value in the first step
SV21... First movement range in the second step by sum of absolute values of minimum values
77 to 80: pixels located at the corners of the first movement range
SV22: second moving range in the second step based on the absolute value sum having the second smallest value
81 to 84... Pixels located at the corners of the second movement range
82: Pixel related to minimum value of sum of absolute values in second step
85 pixels related to the sum of absolute values having the second smallest value in the second step
SV3: Third moving range in the third step based on the first value of the sum of absolute values
86 to 89... Pixels located at the corners of the third movement range
90 to 93: pixels located at the corners of the third movement range
201 ... Image data input terminal
202 .... Motion vector detection circuit
203 ····· Subtractor
204 ... Motion compensation circuit
205 Frame memory
206 ・ ・ ・ ・ ・ Adder
207... Orthogonal transformation circuit
208 Quantizer
209 ····· Output terminal for compression-encoded image data
210 ... Inverse quantizer
211 ... Inverse orthogonal transform circuit

Claims (4)

時間的に前後する現在画像或いは前画像に所定画素からなる基準ブロックを設定し、上記基準ブロックと同じ画素数からなる検査ブロックを、上記基準ブロックが設定された画像以外の画像の所定の移動範囲内で移動し、該検査ブロックを移動する毎に、検査ブロックと基準ブロックとの相関を示す評価関数値を検出し、上記検査ブロックの移動に対応して得られた各評価関数値の中から値が最小の評価関数値を検出し、この値が最小の評価関数値が形成された移動範囲内の所定位置の画素に基づいて上記検査ブロックの次の移動範囲を所定分狭め、再度、上記値が最小の評価関数値を検出する動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行い、この最小限度の移動範囲で検出された、値が最小の評価関数値に基づいて動きベクトルを検出する動きベクトル検出方法において、
上記検査ブロックを、最小限度の移動範囲以外の移動範囲で移動した際に得られた評価関数値のうち、値が最小の評価関数値から順に値が小さい評価関数値を複数検出し、
この複数検出された評価関数値どうしの差分と閾値とを比較し、
上記複数の評価関数値どうしの差分が閾値よりも小さかった場合には、上記複数検出された評価関数値が形成された各移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を所定分狭めてそれぞれ設定し、
上記複数の評価関数値どうしの差分が閾値よりも大きかった場合には、最小値の評価関数値が形成された移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を、上記最小限度の移動範囲、或いは、上記所定分以上狭めて設定し、
この狭めて設定された各移動範囲で上記検査ブロックの移動をそれぞれ行って評価関数値を検出する動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行い、
上記最小限度の移動範囲で検査ブロックを移動した際に得られた、値が最小の評価関数値に基づいて動きベクトルを検出することを特徴とする動きベクトル検出方法。
A reference block consisting of predetermined pixels is set in the current image or the previous image that is temporally before and after, and an inspection block consisting of the same number of pixels as the reference block is moved to a predetermined moving range of an image other than the image in which the reference block is set Within the inspection block, every time the inspection block is moved, an evaluation function value indicating the correlation between the inspection block and the reference block is detected, and from among the evaluation function values obtained corresponding to the movement of the inspection block, The value of the smallest evaluation function value is detected, and the next movement range of the inspection block is narrowed by a predetermined amount based on the pixel at a predetermined position in the movement range in which the minimum evaluation function value is formed. The operation of detecting the minimum evaluation function value is repeated until the inspection block reaches the minimum movement range, and based on the minimum evaluation function value detected in the minimum movement range. In the motion vector detecting method for detecting a motion vector,
Among the evaluation function values obtained when the inspection block is moved in a movement range other than the minimum movement range, a plurality of evaluation function values having smaller values in order from the smallest evaluation function value are detected,
By comparing the difference between the plurality of evaluation function values detected and the threshold value,
If the difference between the plurality of evaluation function values is smaller than a threshold, the next of the inspection block is determined based on a pixel at a predetermined position in each movement range in which the plurality of detected evaluation function values are formed. Narrow the movement range by a predetermined amount and set each,
If the difference between the plurality of evaluation function values is larger than the threshold, the next movement range of the inspection block is determined based on the pixel at a predetermined position in the movement range where the minimum evaluation function value is formed. , The minimum movement range, or set to be narrower than the predetermined amount,
The operation of detecting the evaluation function value by moving the inspection block in each of the narrowly set movement ranges is repeatedly performed until the inspection block reaches the minimum movement range,
A motion vector detecting method, comprising: detecting a motion vector based on an evaluation function value having a minimum value obtained when the inspection block is moved within the minimum movement range.
上記最小限度の移動範囲以外の移動範囲で検査ブロックを移動することにより得られた評価関数値のうち、値が最小の評価関数値及び2番目に値が小さな評価関数値を検出し、上記値が最小の評価関数値及び2番目に値が小さな評価関数値が検出された各移動範囲内の所定位置の各画素に基づいて、上記検査ブロックの次の移動範囲を所定分狭めてそれぞれ設定することを特徴とする請求項1記載の動きベクトル検出方法。Among the evaluation function values obtained by moving the inspection block in the movement range other than the minimum movement range, the evaluation function value having the smallest value and the evaluation function value having the second smallest value are detected, and The next moving range of the inspection block is narrowed by a predetermined amount and set based on each pixel at a predetermined position in each moving range in which the smallest evaluation function value and the second smallest evaluation function value are detected. 2. The motion vector detecting method according to claim 1, wherein: 複数回設定される上記検査ブロックの移動範囲のうち、所定の移動範囲で上記複数の評価関数値の検出を行うことを特徴とする請求項1又は請求項2記載の動きベクトル検出方法。3. The motion vector detecting method according to claim 1, wherein the plurality of evaluation function values are detected in a predetermined moving range of the moving range of the test block set a plurality of times. 時間的に前後する現在画像或いは前画像に所定画素からなる基準ブロックを設定し、上記基準ブロックと同じ画素数からなる検査ブロックを、上記基準ブロックが設定された画像以外の画像の所定の移動範囲内で移動し、該検査ブロックを移動する毎に、検査ブロックと基準ブロックとの相関を示す評価関数値を検出し、上記検査ブロックの移動に対応して得られた各評価関数値の中から値が最小の評価関数値を検出し、この値が最小の評価関数値が形成された移動範囲内の所定位置の画素に基づいて上記検査ブロックの次の移動範囲を所定分狭め、再度、上記値が最小の評価関数値を検出する動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行い、この最小限度の移動範囲で検出された、値が最小の評価関数値に基づいて動きベクトルを検出し、この動きベクトルに応じて前画像の動き補償を行い、上記現在画像と動き補償を行った前画像との差分を直交変換処理し量子化することにより、圧縮符号化した画像データを形成する画像データの符号化方法であって、
上記動きベクトルを検出する際に、上記検査ブロックを、最小限度の移動範囲以外の移動範囲で移動した際に得られた評価関数値のうち、値が最小の評価関数値から順に値が小さい評価関数値を複数検出し、この複数検出された評価関数値どうしの差分と閾値とを比較し、上記複数の評価関数値どうしの差分が閾値よりも小さかった場合には、上記複数検出された評価関数値が形成された各移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を所定分狭めてそれぞれ設定し、上記複数の評価関数値どうしの差分が閾値よりも大きかった場合には、最小値の評価関数値が形成された移動範囲内の所定位置の画素に基づいて、上記検査ブロックの次の移動範囲を、上記最小限度の移動範囲、或いは、上記所定分以上狭めて設定し、この狭めて設定された各移動範囲で上記検査ブロックの移動をそれぞれ行って評価関数値を検出する動作を、上記検査ブロックの最小限度の移動範囲となるまで繰り返し行い、上記最小限度の移動範囲で検査ブロックを移動した際に得られた、値が最小の評価関数値に基づいて動きベクトルを検出することを特徴とする画像データの符号化方法。
A reference block consisting of predetermined pixels is set in the current image or the previous image that is temporally before and after, and an inspection block consisting of the same number of pixels as the reference block is moved to a predetermined moving range of an image other than the image in which the reference block is set Within the inspection block, every time the inspection block is moved, an evaluation function value indicating the correlation between the inspection block and the reference block is detected, and from among the evaluation function values obtained corresponding to the movement of the inspection block, The value of the smallest evaluation function value is detected, and the next movement range of the inspection block is narrowed by a predetermined amount based on the pixel at a predetermined position in the movement range in which the minimum evaluation function value is formed. The operation of detecting the minimum evaluation function value is repeated until the inspection block reaches the minimum movement range, and based on the minimum evaluation function value detected in the minimum movement range. Detects a motion vector, performs motion compensation on the previous image according to the motion vector, and orthogonally transforms and quantizes the difference between the current image and the previous image on which motion compensation has been performed, thereby compressing and encoding the image. A method of encoding image data forming data,
When the motion vector is detected, among the evaluation function values obtained when the inspection block is moved in a movement range other than the minimum movement range, evaluation values are evaluated in order from the smallest evaluation function value to the smallest evaluation function value. A plurality of function values are detected, and a difference between the plurality of detected evaluation function values and a threshold are compared. If the difference between the plurality of evaluation function values is smaller than the threshold, the plurality of detected evaluation function values are compared. Based on the pixel at a predetermined position in each movement range in which the function value is formed, the next movement range of the inspection block is set to be narrowed by a predetermined amount, and the difference between the plurality of evaluation function values is larger than a threshold value. In this case, the next moving range of the inspection block is changed to the minimum moving range or the predetermined amount or more based on the pixel at the predetermined position in the moving range in which the minimum evaluation function value is formed. Narrow The operation of detecting the evaluation function value by moving the inspection block in each of the narrowly set movement ranges is repeated until the inspection block reaches the minimum movement range. A method for encoding image data, comprising detecting a motion vector based on a minimum evaluation function value obtained when an inspection block is moved within a movement range.
JP35538493A 1993-12-29 1993-12-29 Motion vector detection method and image data encoding method Expired - Fee Related JP3598526B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35538493A JP3598526B2 (en) 1993-12-29 1993-12-29 Motion vector detection method and image data encoding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35538493A JP3598526B2 (en) 1993-12-29 1993-12-29 Motion vector detection method and image data encoding method

Publications (2)

Publication Number Publication Date
JPH07203462A JPH07203462A (en) 1995-08-04
JP3598526B2 true JP3598526B2 (en) 2004-12-08

Family

ID=18443626

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35538493A Expired - Fee Related JP3598526B2 (en) 1993-12-29 1993-12-29 Motion vector detection method and image data encoding method

Country Status (1)

Country Link
JP (1) JP3598526B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100275694B1 (en) 1998-03-02 2000-12-15 윤덕용 Hierarchical search block matching method by using multiple motion vector candidates
JP2000172848A (en) * 1998-12-09 2000-06-23 Mitsubishi Electric Corp Position shift quantity detecting device
US20050286777A1 (en) * 2004-06-27 2005-12-29 Roger Kumar Encoding and decoding images
US8265158B2 (en) * 2007-12-20 2012-09-11 Qualcomm Incorporated Motion estimation with an adaptive search range
JP5657391B2 (en) 2007-12-20 2015-01-21 クゥアルコム・インコーポレイテッドQualcomm Incorporated Image interpolation to reduce halo
US8537283B2 (en) 2010-04-15 2013-09-17 Qualcomm Incorporated High definition frame rate conversion
US20130235274A1 (en) * 2010-11-17 2013-09-12 Mitsubishi Electric Corporation Motion vector detection device, motion vector detection method, frame interpolation device, and frame interpolation method

Also Published As

Publication number Publication date
JPH07203462A (en) 1995-08-04

Similar Documents

Publication Publication Date Title
US9800889B2 (en) Video decoding device, video decoding method, video decoding program, and video decoding integrated circuit
EP0643539B1 (en) Motion vector detection apparatus and method
EP0645933B1 (en) Image reproducing apparatus
EP0679034A2 (en) Apparatus and method for detecting motion vectors
US6058142A (en) Image processing apparatus
EP0893924B1 (en) Method and apparatus for motion estimation using block matching
US6266371B1 (en) Motion vector detecting apparatus and method
JP3598526B2 (en) Motion vector detection method and image data encoding method
JP2672468B2 (en) Motion detection circuit using spatial information and method thereof
US7773673B2 (en) Method and apparatus for motion estimation using adaptive search pattern for video sequence compression
JP3277419B2 (en) Apparatus and method for detecting motion vector
US6788741B1 (en) Device and method of retrieving high-speed motion
JPH0262178A (en) Motion detection system for picture processor
JP3433489B2 (en) Motion vector detection method and image data encoding method
JP2861963B2 (en) Motion vector detection circuit
JP2000050278A (en) Motion vector calculation method, and recording medium recorded with motion vector calculation program therein
JP3334317B2 (en) Image matching method and apparatus
JP3277417B2 (en) Apparatus and method for detecting motion vector
JP3334316B2 (en) Image matching method and apparatus
JPH10313458A (en) Image data converter and method, predictive coefficient generator and method and predictive coefficient storage medium
JP3046313B2 (en) Motion compensation method for interframe coding
JPH0795526A (en) Apparatus and method for processing of image
JP2003070000A (en) Image encoder
JPH02222389A (en) Moving picture encoder
GB2327827A (en) Motion vector detection image processing apparatus

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040309

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040430

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: 20040824

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040906

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080924

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090924

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090924

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100924

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100924

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110924

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110924

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120924

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120924

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130924

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees