JP4035903B2 - Motion vector detection method and apparatus - Google Patents

Motion vector detection method and apparatus Download PDF

Info

Publication number
JP4035903B2
JP4035903B2 JP30147898A JP30147898A JP4035903B2 JP 4035903 B2 JP4035903 B2 JP 4035903B2 JP 30147898 A JP30147898 A JP 30147898A JP 30147898 A JP30147898 A JP 30147898A JP 4035903 B2 JP4035903 B2 JP 4035903B2
Authority
JP
Japan
Prior art keywords
motion vector
block
cpu
macroblock
adjacent
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
JP30147898A
Other languages
Japanese (ja)
Other versions
JP2000134628A (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 JP30147898A priority Critical patent/JP4035903B2/en
Priority to TW088117602A priority patent/TW444507B/en
Priority to CNB031530427A priority patent/CN1222174C/en
Priority to AU61242/99A priority patent/AU751909B2/en
Priority to PCT/JP1999/005735 priority patent/WO2000024202A1/en
Priority to CNB998031798A priority patent/CN1148069C/en
Priority to US09/582,156 priority patent/US6594314B1/en
Priority to EP99947946A priority patent/EP1051040A1/en
Priority to CNB031530419A priority patent/CN1222173C/en
Priority to CA002314976A priority patent/CA2314976C/en
Priority to KR1020007006895A priority patent/KR100659627B1/en
Priority to MYPI99004526A priority patent/MY125635A/en
Publication of JP2000134628A publication Critical patent/JP2000134628A/en
Application granted granted Critical
Publication of JP4035903B2 publication Critical patent/JP4035903B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、例えばMPEG(Moving Picture Image Coding Experts Group)に準拠した画像符号化処理を行うときに用いられる動きベクトルを検出する動きベクトル検出方法及び装置に関する。
【0002】
【従来の技術】
MPEG方式は、画面内におけるDCT(Discrete Cosine Transform)と画像間における動き補償予測と可変長符号化とを組み合わせて動画像データの圧縮を行う符号化方式である。
【0003】
一般に、画像間の動き補償予測においてなされる動きベクトルの検出処理は、所謂ブロックマッチングによって行われていた。このブロックマッチングは、処理の対象となる基準画像において所定の画素数に分割された基準ブロックに対して、参照画像内における同位置を起点として動きベクトルに対応する参照ブロックと上記所定の画素数と同じ画素数を有する領域を抽出し、基準ブロックと参照ブロックの対応する画素の差分の絶対値を演算し、基準ブロック内の全ての画素について差分の絶対値の和を演算する処理を行う。そして、動きベクトルを検出するときには、参照画像の探索領域内で抽出する領域を1画素ずつ移動させながら上述のブロックマッチングを繰り返して行い、上記差分の絶対値の和が最も小さい値を示した点を基点として動きベクトルを検出する。
【0004】
【発明が解決しようとする課題】
しかし、上述のブロックマッチングを行うときは、参照画像についての動きベクトルを求めたときの探索領域と、基準画像についての動きベクトルを求めたときの探索領域と同じサイズの範囲となされて行われている。また、基準画像についての動きベクトルを求めるときには、基準ブロックの動きベクトルがある程度予測できる場合であっても、参照画像の動きベクトルを基準として、ある一定の大きさの領域を探索領域として基準画像の動きベクトルを検出していた。
【0005】
更に、上述したブロックマッチングにより動きベクトルを検出する処理は、ブロックマッチングを行うときなされる上記差分の絶対値の和を求める処理についての演算量が非常に膨大となっており、MPEG等の画像圧縮処理の大半の時間がこれに費やされ、ソフトウェアで実現するときの障害となっており、演算量の削減が望まれている。
【0006】
そこで、本発明は、上述したような実情に鑑みて提案されたものであり、動きベクトルの検出を行うときのブロックマッチングを行う回数を削減して動きベクトルを検出するときの演算量の削減及び処理時間の短縮を図ることができる動きベクトル検出方法及び装置を提供することを目的とする。
【0007】
【課題を解決するための手段】
本発明者は、上述の目的を達成するために鋭意研究を重ねた結果、動きベクトルを検出するとき、相互に隣接する画素ブロックの動きベクトルにおける相関が高いことが、動きベクトルの予測に用いることが可能であることを見い出した。
【0008】
本発明は、水平方向又は垂直方向に交互に位置する第1のブロックと第2のブロックを有する複数のブロックからなる画像についての動きベクトルを検出する動きベクトル検出方法において、各第1のブロックについて、それぞれ第1の探索領域で動きベクトルを検出し、各第2のブロックについて、それぞれ第2の探索領域で動きベクトルを検出するにあたり、上記第2のブロックと水平方向又は垂直方向における両側に隣接する上記第1のブロックについての各動きベクトルの差分の絶対値を演算し、得られた絶対値が所定値よりも小さい場合には、上記隣接する第1のブロックについての各動きベクトルの平均動きベクトルを演算して、得られた平均動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定し、また、得られた絶対値が所定値よりも大きい場合には、上記隣接する第1のブロックについての各動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定し、上記第2のブロックについての動きベクトルを上記第1の探索領域よりも小さい上記第2の探索領域でブロックマッチングを行って検出することを特徴とする。
また、本発明は、水平方向又は垂直方向に交互に位置する第1のブロックと第2のブロックを有する複数のブロックからなる画像についての動きベクトルを検出する動きベクトル検出装置において、各第1のブロックについて、それぞれ第1の探索領域で動きベクトルを検出する第1の動きベクトル検出手段と、各第2のブロックについて、それぞれ第2の探索領域で動きベクトルを検出するにあたり、上記第2のブロックと水平方向又は垂直方向における両側に隣接する上記第1のブロックについての各動きベクトルの差分の絶対値を演算し、得られた絶対値が所定値よりも小さい場合には、上記隣接する第1のブロックについての各動きベクトルの平均動きベクトルを演算して、得られた平均動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定し、また、得られた絶対値が所定値よりも大きい場合には、上記隣接する第1のブロックについての各動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定する探索領域設定手段と、上記第2のブロックについての動きベクトルを上記第1の探索領域よりも小さい上記第2の探索領域でブロックマッチングを行って検出する第2の動きベクトル検出手段とを備えることを特徴とする。
【0009】
このような動きベクトル検出方法及び装置によれば、上記第1のブロックについては第1の探索領域でブロックマッチングを行って動きベクトルの検出を行い、上記第1のブロックに隣接する第2のブロックについては、隣接する第1のブロックについての動きベクトルを用いて第2の探索領域を設定して上記所定の探索領域とは異なるサイズの第2の探索領域でブロックマッチングを行って第2のブロックについての動きベクトルの検出を行う。
【0010】
【発明の実施の形態】
以下、本発明の実施の形態について図面を参照しながら詳細に説明する。
【0011】
本発明は、例えば図1に示すように構成された動きベクトル検出装置1に適用される。
【0012】
この動きベクトル検出装置1は、動画像を構成する複数のフレーム画像についてMPEG2規格に準拠した画像符号化処理における動きベクトルを検出する処理を行うCPU(Central Processing Unit)2を備えている。このCPU2は、動きベクトル検出プログラム起動することで、動きベクトルを検出する処理を行う。このCPU2は、動きベクトルを検出するときには、メモリ3に格納された画像データ及び動きベクトル検出プログラムを用いる。このとき、CPU2は、制御信号をメモリ3及びHDD(Hard Disc Drive)4に出力することで、HDD4に格納された画像データ及び動きベクトル検出プログラムをメモリ3に格納するように制御する。
【0013】
また、このCPU2は、例えばMPEG2方式に準拠した画像圧縮処理を行うときには、I(Intra)ピクチャについてDCT(Discrete Cosine Transform)処理を行うとともに、B(Bidirectionally predictive),P(Predictive)ピクチャを動き補償予測をすることで画像圧縮処理を行う。このとき、CPU2は、フレーム画像について動きベクトルを求めるときには、動きベクトルを探索するときの探索領域を設定し、前記探索領域において例えば8×8画素からなるマクロブロック単位でブロックマッチングを行うことで動きベクトルを検出する。具体的には、CPU2は、マクロブロック毎にフレーム画像を分割し、相互に隣接するマクロブロックの動きベクトルを用いてブロックマッチングを行うときの探索領域を設定する。
【0014】
このCPU2が行う上記ブロックマッチングとは、動きベクトルを検出する処理の対象となる基準画像において所定の画素数に分割された例えばマクロブロック単位の基準ブロックに対して、参照画像内における同位置を起点として動きベクトルに対応する参照ブロックと上記所定の画素数と同じ画素数を有する領域を基準画像内から抽出し、基準ブロックと参照ブロックの対応する画素の差分の絶対値を演算し、基準ブロック内の全ての画素について差分の絶対値の和を演算する処理である。
【0015】
そして、CPU2は、動きベクトルを検出するとき、参照画像の探索領域内で抽出する領域を1画素ずつ移動させながら上述のブロックマッチングを繰り返して行い、上記差分の絶対値の和が最も小さい値を示した点を基点として動きベクトルを検出する。なお、このCPU2が行う上記探索領域を設定して動きベクトルを検出するときの処理手順の詳細については後述する。
【0016】
メモリ3は、上記CPU2により制御されることで、格納する内容が制御される。このメモリ3は、CPU2からの制御信号に応じてHDD4から動きベクトル検出プログラム及び画像データが格納されるとともに、格納された動きベクトル検出プログラム及び画像データが読み込まれる。
【0017】
HDD4は、画像データ及び動きベクトル検出プログラムを格納する。そして、このHDD4は、CPU2からの制御信号に応じて指定された画像データをメモリ3に出力する。
【0018】
このHDD4に格納される画像データは、フレーム画像が時系列に配列されてなり、CPU2により動きベクトルを検出する処理がされるときには、図2に示すように、例えばマクロブロック単位に分割される。そして、CPU2は、動きベクトルを検出するときには、先ず図2中の網掛け部分で示すように1つおきにマクロブロックを所定の探索領域でブロックマッチングを行うことで動きベクトルを検出する処理を行う。続いて、CPU2は、図2中の白抜き部分におけるマクロブロックを上記網掛け部分におけるマクロブロックについての動きベクトルを用いて探索領域を演算し、当該探索領域でブロックマッチングを行うことで白抜き部分のマクロブロックについての動きベクトルを検出する処理を行う。
【0019】
I/F(インターフェイス)回路5は、例えば外部から画像データが入力されるとともに、CPU2からの制御信号に応じて画像データを外部に出力する。このI/F回路5は、例えば外部から画像データが入力されたときには、HDD4に当該画像データを出力する。
【0020】
このように構成された動きベクトル検出装置1は、CPU2によりフレーム画像の画像データについて動きベクトルを検出するとき、HDD4に格納された動きベクトル検出プログラムを実行することで図3及び図4のフローチャートに示すような処理を行う。
【0021】
先ずステップS1において、CPU2は、図2に示すような複数のマクロブロックが水平方向に配列されてなるライン(Line)のアドレスを指定することでラインの番号(No.)を指定する処理を行う。ここで、CPU2は、マクロブロック(MB)が水平方向に配列する複数のラインのうち、最も上部に位置するライン「0」の番号を指定する。ここで、上記ラインの番号は、上部から0,1,2,・・・,ボトム(Bottm)からなる。
【0022】
次のステップS2において、CPU2は、上述のステップS1において指定したライン「0」のうち、動きベクトルを検出するマクロブロックの番号「0」を指定する処理を行う。各ラインを構成する複数のマクロブロックの番号は、左端から右端に向かって、0,1,2,・・・,ライト(Right)からなる。
【0023】
次のステップS3において、CPU2は、上述のステップS2で指定された番号のマクロブロックについて探索領域を設定する。ここで、CPU2は、探索領域を所定の画素数からなるサーチレンジRに設定する。このとき、CPU2は、例えばマクロブロックの中心位置を示す座標から(±R,±R)の対角点を有する矩形領域を探索領域として設定する。また、CPU2は、例えばサーチレンジRの探索領域として、32×32画素からなる矩形領域を設定する。そして、このCPU2は、所定の画素数からなる探索領域において時間的に前後するフレーム画像の対応するマクロブロックを用いて上述したブロックマッチングを行うことで動きベクトルを検出する処理を行う。
【0024】
次のステップS4において、CPU2は、上述のステップS3において動き検出を行ったマクロブロックと水平方向の左右に2つの番号だけずれたマクロブロックを指定する処理を行う。
【0025】
次に、ステップS5において、CPU2は、上述のステップS4で指定したマクロブロックが、フレーム画像の右端に位置するか否かを判断する。そして、CPU2は、指定したマクロブロックがフレーム画像の右端に位置すると判断したときにはステップS6に進み、右端に位置しないと判断したときにはステップS3に戻る。すなわち、CPU2は、上述のステップS3〜ステップS5に示す処理を行うことにより、指定したラインのうち、左端に位置するマクロブロックから右端に向かって2つの番号毎に上記ステップS3で説明した所定の探索領域で動きベクトルを検出する処理を行う。
【0026】
次のステップS6において、CPU2は、上述のステップS2で指定した番号「0」のマクロブロックに右側に隣接する番号「1」のマクロブロックを指定する処理を行う。
【0027】
次のステップS7において、CPU2は、上述のステップS6又は後述のステップS14で指定された番号におけるマクロブロックの右側に隣接するマクロブロックが存在するか否かを判断する。そして、CPU2は、指定した番号におけるマクロブロックの右側に隣接するマクロブロックが存在しないと判断したときにはステップS8に進み、指定した番号におけるマクロブロックの右側に隣接するマクロブロックが存在すると判断したときにはステップS9に進む。
【0028】
ステップS8において、CPU2は、上述のステップS7において右側に隣接するマクロブロックが存在しないと判断されたマクロブロックについて、上述のステップS3における上記所定の探索領域を設定して、当該探索領域でブロックマッチングを行うことで動きベクトルを検出する処理を行ってステップS14に進む。
【0029】
一方、ステップS9において、CPU2は、上述のステップS6又は後述のステップS14で指定したマクロブロックの両側に隣接するマクロブロックの動きベクトルの差分を演算し、当該差分の絶対値ΔVを演算する。ここで、上記動きベクトルの差分の絶対値ΔVは、マクロブロックの両側に隣接するマクロブロックの動きベクトルの指し示す方向が略同方向であるときには小さな値となり、マクロブロックの両側に隣接するマクロブロックの動きベクトルの指し示す方向が異なるほど大きな値となる。
【0030】
次のステップS10において、CPU2は、上述のステップS9で演算して得た差分の絶対値ΔVがサーチレンジrよりも十分に大きいか否かを判断する。ここで、「r」は任意の値であり、サーチレンジrとは点(−r,−r)と点(+r,+r)とを対角点に有する矩形領域である。また、このサーチレンジrで定義される矩形領域は、上述したステップS3におけるサーチレンジRで定義される矩形領域よりも占める領域が小さく、例えば6×6画素からなる矩形領域である。そして、CPU2は、差分の絶対値ΔVがサーチレンジrよりも十分に大きいとき、すなわち隣接するマクロブロックの各動きベクトルの指し示す方向が異なる場合にはステップS11に進み、差分の絶対値ΔVがサーチレンジrよりも十分に大きくないとき、すなわち隣接するマクロブロックの各動きベクトルの指し示す方向が略同方向である場合にはステップS12に進む。
【0031】
ステップS11において、CPU2は、上述のステップS6又は後述のステップS14で指定されたマクロブロックの水平方向における両側に隣接するマクロブロックについての各動きベクトルを図5に示すように指定されたマクロブロックの左上の座標位置とし、指し示す点を中心としてサーチレンジrで定義される探索領域A,Bをそれぞれ設定する。そして、CPU2は、各探索領域A,Bにおいてブロックマッチングを行うことで動きベクトルを検出してステップS14に進む。
【0032】
一方、ステップS12において、CPU2は、ステップS6又はステップS14で指定されたマクロブロックの水平方向における両側に隣接するマクロブロックについての各動きベクトルを用いて、図6に示すような平均動きベクトルAveV(h,v)を演算する。
【0033】
次のステップS13において、CPU2は、平均動きベクトルAveV(h,v)の先端が指し示す座標位置(h,v)を中心とし、点(−r,−r)と点(+r,+r)とを対角点とした矩形の探索領域Cを設定する。そして、CPU2は、設定した探索領域Cにおいてブロックマッチングを行うことでステップS6又はステップS14で指定したマクロブロックについての動きベクトルを検出する。
【0034】
次のステップS14において、CPU2は、上述のステップS13で動きベクトルを検出したマクロブロックから水平方向における右側に向かって2番号だけ進める処理を行う。
【0035】
次のステップS15において、CPU2は、上述のステップS14で指定した番号のマクロブロックがラインにおける右端に位置するか否かを判断する。そして、CPU2は、指定したマクロブロックがラインにおける右端に位置すると判断したときにはステップS16に進み、指定したマクロブロックがラインにおける右端に位置しないと判断したときにはステップS7に戻る。すなわち、CPU2は、上述のステップS2〜ステップS15までの処理を繰り返すことにより、上述の処理を行っているラインを構成する全てのマクロブロックについて動きベクトルを検出する。
【0036】
ステップS16において、CPU2は、上述したステップS3からステップS15までの処理を行ったラインから2つの番号だけボトムに向かって進めて新たなラインを指定する処理を行う。
【0037】
次のステップS17において、CPU2は、上述のステップS16で指定したラインの番号がボトムであるか否かを判断する。そして、CPU2は、指定したラインがボトムであると判断したときには図4に示すステップS18に進み、指定したラインがボトムでないと判断したときにはステップS2に戻って指定したラインについて上述のステップS2〜ステップS15に示す処理を行う。すなわち、CPU2は、ステップS1〜ステップS17までの処理を行うことで、フレーム画像の番号「0」のラインからボトムのラインに向かって2つの番号毎に上述のステップS2〜ステップS15に示す処理を行う。
【0038】
次のステップS18において、CPU2は、図2に示すような複数のマクロブロックが垂直方向に配列されてなるラインの番号を指定する処理を行う。ここで、CPU2は、マクロブロックが水平方向に配列する複数のラインのうち、上端から1つの番号だけ下側に隣接するライン「1」の番号を指定する。
【0039】
次のステップS19において、CPU2は、上述のステップS18において指定したライン「1」のうち、動きベクトルを検出するマクロブロックの番号「0」を指定する処理を行う。
【0040】
次のステップS20において、CPU2は、上述のステップS19で指定したマクロブロックの下側にマクロブロックが存在するか否かを判断する。そして、CPU2は、指定したマクロブロックの下側にマクロブロックが存在しないと判断したときにはステップS21に進み、指定したマクロブロックの下側にマクロブロックが存在すると判断したときにはステップS22に進む。
【0041】
ステップS21において、CPU2は、上述のステップS20において下側に隣接するマクロブロックが存在しないと判断されたマクロブロックについて、上述のステップS3におけるサーチレンジRの探索領域を設定して、当該探索領域でブロックマッチングを行うことで動きベクトルを検出する処理を行ってステップS27に進む。
【0042】
一方、ステップS22において、CPU2は、上述のステップS19又は後述のステップS27で指定したマクロブロックの垂直方向において隣接するマクロブロックの動きベクトルの差分を演算し、当該差分の絶対値ΔVを演算する。
【0043】
次のステップS23において、CPU2は、上述のステップS22で演算して得た差分の絶対値ΔVがサーチレンジrよりも大きいか否かを判断する。そして、CPU2は、差分の絶対値ΔVがサーチレンジrよりも大きいときにはステップS24に進み、差分の絶対値ΔVがサーチレンジrよりも大きくないときにはステップS25に進む。
【0044】
ステップS24において、CPU2は、上述のステップS19又は後述のステップS27で指定されたマクロブロックの垂直方向において隣接するマクロブロックについての各動きベクトルを図7に示すように指定されたマクロブロックの左上の座標位置とし、指し示す点を中心としてサーチレンジrで定義される探索領域D,Eをそれぞれ設定する。そして、CPU2は、各探索領域D,Eにおいてブロックマッチングを行うことで動きベクトルを検出してステップS27に進む。
【0045】
一方、ステップS25において、CPU2は、ステップS19又はステップS27で指定されたマクロブロックの垂直方向において隣接するマクロブロックについての各動きベクトルを用いて、図8に示すような平均動きベクトルAveV(h,v)を演算する。
【0046】
次のステップS26において、CPU2は、平均動きベクトルAveV(h,v)の先端が指し示す座標位置(h,v)を中心とし、点(−r,−r)と点(+r,+r)とを対角点とした矩形の探索領域Fを設定する。そして、CPU2は、設定した探索領域においてブロックマッチングを行うことでステップS19又はステップS27で指定したマクロブロックについての動きベクトルを検出する。
【0047】
次のステップS27において、CPU2は、上述のステップS26で動きベクトルを検出したマクロブロックから水平方向における右側に向かって1つの番号だけ進める処理を行う。
【0048】
次のステップS28において、CPU2は、上述のステップS27で指定した番号のマクロブロックがラインにおける右端に位置するか否かを判断する。そして、CPU2は、指定したマクロブロックがラインにおける右端に位置すると判断したときにはステップS29に進み、指定したマクロブロックがラインにおける右端に位置しないと判断したときにはステップS20に戻る。すなわち、CPU2は、上述のステップS20〜ステップS28までの処理を繰り返すことにより、上述の処理を行っているラインを構成する全てのマクロブロックについて動きベクトルを検出する。
【0049】
ステップS29において、CPU2は、上述したステップS19からステップS28までの処理を行ったラインから2つの番号だけ下端に向かって進めて新たなラインを指定する処理を行う。
【0050】
次のステップS30において、CPU2は、上述のステップS29で指定したラインの番号がボトムであるか否かを判断する。そして、CPU2は、指定したラインがボトムであると判断したときには処理を終了し、指定したラインがボトムでないと判断したときにはステップS19に戻って指定したラインについて上述のステップS2〜ステップS28に示す処理を行う。すなわち、CPU2は、ステップS18〜ステップS30までの処理を行うことで、フレーム画像の垂直方向において、番号「0」のラインからボトムのラインに向かって2つの番号毎に上述のステップS19〜ステップS28に示す処理を行う。
【0051】
上述した動きベクトル検出装置1は、ステップS1〜ステップS17に示す処理を実行することにより指定したラインのうち水平方向に配列する全てのマクロブロックについて動きベクトルを検出し、ステップS18〜ステップS30に示す処理を実行することにより上記ステップS1〜ステップS17で処理の対象となっていないラインを指定して垂直方向に隣接するマクロブロックを用いて動きベクトルを検出することでフレーム画像を構成する全てのマクロブロックについて動きベクトルを検出する。
【0052】
したがって、このような動きベクトル検出装置1によれば、ステップS3に示す処理を行うことで、フレーム画像を構成する一部のマクロブロックについて所定の画素サイズの探索領域にてブロックマッチングを行って動きベクトルを検出する処理を行い、他のマクロブロックについては隣接するマクロブロックの動きベクトルを参照することで上記所定の画素サイズよりも小さい画素サイズの探索領域にてブロックマッチングを行って動きベクトルを検出するので、フレーム画像を構成する全てのマクロブロックについて上記所定の画素サイズの探索領域にてブロックマッチングを行って動きベクトルを検出する場合と比較して探索領域を削減することができ、ブロックマッチングを行う回数を削減することができる。したがって、この動きベクトル検出装置1によれば、動きベクトルを検出するのに要する処理時間を大幅に短縮することができる。具体的には、動きベクトル検出装置1は、上述のステップS3におけるサーチレンジRを32×32画素とし、隣接するマクロブロックの動きベクトルを参照した場合の上記サーチレンジrを6×6画素としたとき、フレーム画像を構成する全てのマクロブロックについて動きベクトルを検出するための処理時間を1/100程度に短縮することができる。
【0053】
また、この動きベクトル検出装置1によれば、ステップS9及びステップS10で示す処理を行うことで動きベクトルを検出するマクロブロックに隣接するマクロブロックの動きベクトルが指し示す方向を判断し、各動きベクトルが指し示す方向に応じて設定する探索範囲を変化させるので、隣接するマクロブロックの動きベクトルが異なる方向を指し示していても、高精度な動きベクトルの検出を行うことができる。
【0054】
【発明の効果】
以上詳細に説明したように、本発明によれば、水平方向又は垂直方向に交互に位置する第1のブロックと第2のブロックを有する複数のブロックからなる画像の各第1のブロックについて、それぞれ第1の探索領域で動きベクトルを検出し、各第2のブロックについて、それぞれ第2の探索領域で動きベクトルを検出するにあたり、上記第2のブロックと水平方向又は垂直方向における両側に隣接する上記第1のブロックについての各動きベクトルの差分の絶対値を演算し、得られた絶対値が所定値よりも小さい場合には、上記隣接する第1のブロックについての各動きベクトルの平均動きベクトルを演算して、得られた平均動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定し、また、得られた絶対値が所定値よりも大きい場合には、上記隣接する第1のブロックについての各動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定し、上記第2のブロックについての動きベクトルを上記第1の探索領域よりも小さい上記第2の探索領域でブロックマッチングを行って検出するので、第2のブロックに隣接する第1のブロックについての動きベクトルに応じて第2の探索領域を第1の探索領域と比較して小さな画素サイズとすることができ、動きベクトルの検出を行うときのブロックマッチングを行う回数を削減して動きベクトルを検出するときの演算量の削減及び処理時間の短縮を図ることができる。
【図面の簡単な説明】
【図1】本発明を適用した動きベクトル検出装置の構成を示すブロック図である。
【図2】本発明を適用した動きベクトル検出装置に備えられるCPUにより動きベクトルを検出する処理がされるときに、フレーム画像がマクロブロック単位に分割されることを説明するための図である。
【図3】本発明を適用した動きベクトル検出装置に備えられるCPUが動きベクトル検出プログラムにしたがって動きベクトルを検出する処理手順を示すフローチャートである。
【図4】本発明を適用した動きベクトル検出装置に備えられるCPUが動きベクトル検出プログラムにしたがって動きベクトルを検出する処理手順を示すフローチャートである。
【図5】水平方向において隣接するマクロブロックが異なる方向を指し示しているときにおいて、隣接するマクロブロックの動きベクトルを用いて探索領域を設定して動きベクトルを検出することを説明するための図である。
【図6】水平方向において隣接するマクロブロックが略同方向を指し示しているときにおいて、隣接するマクロブロックの動きベクトルを用いて探索領域を設定して動きベクトルを検出することを説明するための図である。
【図7】垂直方向において隣接するマクロブロックが異なる方向を指し示しているときにおいて、隣接するマクロブロックの動きベクトルを用いて探索領域を設定して動きベクトルを検出することを説明するための図である。
【図8】水平方向において隣接するマクロブロックが略同方向を指し示しているときにおいて、隣接するマクロブロックの動きベクトルを用いて探索領域を設定して動きベクトルを検出することを説明するための図である。
【符号の説明】
1 動きベクトル検出装置、2 CPU
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a motion vector detection method and apparatus for detecting a motion vector used when performing an image encoding process compliant with, for example, MPEG (Moving Picture Image Coding Experts Group).
[0002]
[Prior art]
The MPEG method is a coding method that compresses moving image data by combining DCT (Discrete Cosine Transform) in a screen, motion compensation prediction between images, and variable length coding.
[0003]
In general, motion vector detection processing performed in motion compensation prediction between images is performed by so-called block matching. This block matching is based on the reference block corresponding to the motion vector starting from the same position in the reference image and the predetermined number of pixels with respect to the reference block divided into the predetermined number of pixels in the reference image to be processed. A region having the same number of pixels is extracted, the absolute value of the difference between corresponding pixels of the base block and the reference block is calculated, and the sum of the absolute values of the differences is calculated for all the pixels in the base block. When detecting a motion vector, the above-mentioned block matching is repeated while moving the region to be extracted within the reference image search region pixel by pixel, and the sum of the absolute values of the differences is the smallest. The motion vector is detected from the base point.
[0004]
[Problems to be solved by the invention]
However, when performing the block matching described above, the search area when the motion vector for the reference image is obtained and the search area when the motion vector for the base image is obtained are made the same size range. Yes. In addition, when obtaining a motion vector for a reference image, even if the motion vector of the reference block can be predicted to some extent, an area of a certain size is used as a search area based on the motion vector of the reference image. A motion vector was detected.
[0005]
Furthermore, the above-described processing for detecting a motion vector by block matching has an enormous amount of calculation for the processing for obtaining the sum of the absolute values of the differences performed when block matching is performed. Most of the processing time is spent on this, which is an obstacle to the realization with software, and a reduction in the amount of calculation is desired.
[0006]
Therefore, the present invention has been proposed in view of the above-described circumstances, and the amount of calculation when detecting a motion vector by reducing the number of times of performing block matching when detecting a motion vector, and It is an object of the present invention to provide a motion vector detection method and apparatus capable of shortening the processing time.
[0007]
[Means for Solving the Problems]
As a result of intensive research to achieve the above-mentioned object, the present inventor uses a high correlation between motion vectors of pixel blocks adjacent to each other when detecting a motion vector. Found that it was possible.
[0008]
  The present invention relates to a motion vector detection method for detecting a motion vector for an image composed of a plurality of blocks each having a first block and a second block that are alternately positioned in the horizontal direction or the vertical direction. When detecting a motion vector in each first search area and detecting a motion vector in each second search area for each second block, the second block is adjacent to both sides in the horizontal direction or the vertical direction. When the absolute value of the difference of each motion vector for the first block is calculated and the obtained absolute value is smaller than a predetermined value, the average motion of each motion vector for the adjacent first block Calculating the vector, setting the second search area centered on the coordinate position indicated by the obtained average motion vector, and If the obtained absolute value is larger than a predetermined value, the second search area centered on the coordinate position indicated by each motion vector for the adjacent first block is set, and the second block The motion vector is detected by performing block matching in the second search area smaller than the first search area.
The present invention also provides a motion vector detection apparatus for detecting a motion vector for an image composed of a plurality of blocks each having a first block and a second block that are alternately positioned in the horizontal direction or the vertical direction. First motion vector detection means for detecting a motion vector in the first search area for each block, and the second block for detecting a motion vector in the second search area for each second block, respectively. When the absolute value of the difference between the motion vectors for the first block adjacent to both sides in the horizontal direction or the vertical direction is calculated and the obtained absolute value is smaller than a predetermined value, the adjacent first Calculate the average motion vector of each motion vector for the block, and center the coordinate position indicated by the obtained average motion vector. When the second search area is set and the obtained absolute value is larger than a predetermined value, the second search area is centered on the coordinate position indicated by each motion vector for the adjacent first block. Search area setting means for setting two search areas, and a second motion for detecting a motion vector for the second block by performing block matching in the second search area smaller than the first search area Vector detection meansIt is characterized by that.
[0009]
According to such a motion vector detection method and apparatus, the first block is subjected to block matching in the first search region to detect a motion vector, and the second block adjacent to the first block. For the second block, a second search area is set using a motion vector for the adjacent first block, and block matching is performed in the second search area having a size different from the predetermined search area. A motion vector is detected for.
[0010]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0011]
The present invention is applied to, for example, a motion vector detection device 1 configured as shown in FIG.
[0012]
The motion vector detection apparatus 1 includes a CPU (Central Processing Unit) 2 that performs a process of detecting a motion vector in an image encoding process based on the MPEG2 standard for a plurality of frame images constituting a moving image. The CPU 2 performs a motion vector detection process by starting a motion vector detection program. When detecting a motion vector, the CPU 2 uses image data and a motion vector detection program stored in the memory 3. At this time, the CPU 2 outputs a control signal to the memory 3 and an HDD (Hard Disc Drive) 4 to control the image data and the motion vector detection program stored in the HDD 4 to be stored in the memory 3.
[0013]
For example, when performing image compression processing conforming to the MPEG2 system, the CPU 2 performs DCT (Discrete Cosine Transform) processing for I (Intra) pictures and motion compensation for B (Bidirectionally predictive) and P (Predictive) pictures. Image compression processing is performed by making a prediction. At this time, when obtaining a motion vector for the frame image, the CPU 2 sets a search area for searching for the motion vector, and performs block matching in the search area by performing block matching in units of macroblocks composed of 8 × 8 pixels, for example. Detect vectors. Specifically, the CPU 2 divides the frame image for each macroblock, and sets a search area when performing block matching using motion vectors of macroblocks adjacent to each other.
[0014]
The block matching performed by the CPU 2 starts from the same position in the reference image with respect to a reference block in units of macroblocks, for example, divided into a predetermined number of pixels in the reference image to be processed for detecting a motion vector. As a reference block corresponding to the motion vector and an area having the same number of pixels as the above-mentioned predetermined number of pixels are extracted from the standard image, and an absolute value of a difference between corresponding pixels of the standard block and the reference block is calculated. This is a process for calculating the sum of absolute values of differences for all the pixels.
[0015]
Then, when detecting the motion vector, the CPU 2 repeatedly performs the block matching described above while moving the region to be extracted within the search region of the reference image pixel by pixel, and obtains the value with the smallest sum of the absolute values of the differences. A motion vector is detected using the indicated point as a base point. Details of the processing procedure performed when the CPU 2 sets the search area and detects a motion vector will be described later.
[0016]
The memory 3 is controlled by the CPU 2 to control the contents to be stored. The memory 3 stores a motion vector detection program and image data from the HDD 4 in accordance with a control signal from the CPU 2 and reads the stored motion vector detection program and image data.
[0017]
The HDD 4 stores image data and a motion vector detection program. Then, the HDD 4 outputs image data designated in accordance with a control signal from the CPU 2 to the memory 3.
[0018]
The image data stored in the HDD 4 is composed of frame images arranged in time series. When the CPU 2 performs a process of detecting a motion vector, the image data is divided into, for example, macroblock units as shown in FIG. Then, when detecting a motion vector, the CPU 2 first performs a process of detecting a motion vector by performing block matching on every other macroblock in a predetermined search area as shown by the shaded portion in FIG. . Subsequently, the CPU 2 calculates a search region using the motion vector for the macroblock in the shaded portion of the macroblock in the shaded portion in FIG. 2, and performs block matching in the search region to thereby obtain a white portion. A process for detecting a motion vector for the macroblock is performed.
[0019]
The I / F (interface) circuit 5 receives, for example, image data from the outside and outputs the image data to the outside according to a control signal from the CPU 2. For example, when image data is input from the outside, the I / F circuit 5 outputs the image data to the HDD 4.
[0020]
The motion vector detection apparatus 1 configured as described above executes the motion vector detection program stored in the HDD 4 when the CPU 2 detects the motion vector for the image data of the frame image, and the flowchart of FIGS. 3 and 4 is executed. Processing as shown is performed.
[0021]
First, in step S1, the CPU 2 performs a process of designating a line number (No.) by designating an address of a line (Line) in which a plurality of macroblocks are arranged in the horizontal direction as shown in FIG. . Here, the CPU 2 designates the number of the line “0” positioned at the top of the plurality of lines in which the macroblocks (MB) are arranged in the horizontal direction. Here, the number of the line consists of 0, 1, 2, ..., bottom (Bottm) from the top.
[0022]
In the next step S2, the CPU 2 performs a process of designating the macro block number “0” for detecting the motion vector among the lines “0” designated in the above step S1. The number of a plurality of macroblocks constituting each line consists of 0, 1, 2,..., Right (Right) from the left end toward the right end.
[0023]
In the next step S3, the CPU 2 sets a search area for the macroblock of the number designated in the above step S2. Here, the CPU 2 sets the search area to a search range R having a predetermined number of pixels. At this time, the CPU 2 sets, for example, a rectangular area having (± R, ± R) diagonal points from the coordinates indicating the center position of the macroblock as a search area. For example, the CPU 2 sets a rectangular area of 32 × 32 pixels as a search area of the search range R. And this CPU2 performs the process which detects a motion vector by performing the block matching mentioned above using the macroblock corresponding to the frame image which temporally precedes and falls in the search area | region which consists of a predetermined number of pixels.
[0024]
In the next step S4, the CPU 2 performs a process of designating a macroblock that is shifted by two numbers on the left and right in the horizontal direction from the macroblock for which motion detection was performed in step S3.
[0025]
Next, in step S5, the CPU 2 determines whether or not the macro block designated in step S4 described above is located at the right end of the frame image. The CPU 2 proceeds to step S6 when determining that the designated macroblock is located at the right end of the frame image, and returns to step S3 when determining that it is not located at the right end. That is, the CPU 2 performs the processing shown in steps S3 to S5 described above, so that the predetermined number described in step S3 described above for every two numbers from the macroblock located at the left end toward the right end in the designated line. A process for detecting a motion vector in the search area is performed.
[0026]
In the next step S6, the CPU 2 performs a process of designating the macroblock having the number “1” adjacent to the right side to the macroblock having the number “0” designated in the above step S2.
[0027]
In the next step S7, the CPU 2 determines whether or not there is a macroblock adjacent to the right side of the macroblock in the number designated in the above-described step S6 or step S14 described later. The CPU 2 proceeds to step S8 when determining that there is no macroblock adjacent to the right side of the macroblock at the designated number, and proceeds to step S8 when determining that there is a macroblock adjacent to the right side of the macroblock at the specified number. Proceed to S9.
[0028]
In step S8, the CPU 2 sets the predetermined search area in the above-described step S3 for the macroblock determined to have no macroblock adjacent on the right side in the above-described step S7, and performs block matching in the search area. To detect a motion vector, and the process proceeds to step S14.
[0029]
On the other hand, in step S9, the CPU 2 calculates a difference between motion vectors of macroblocks adjacent to both sides of the macroblock specified in the above-described step S6 or step S14 described later, and calculates an absolute value ΔV of the difference. Here, the absolute value ΔV of the difference between the motion vectors is a small value when the direction indicated by the motion vector of the macroblock adjacent on both sides of the macroblock is substantially the same direction, and the absolute value ΔV of the macroblock adjacent on both sides of the macroblock. The larger the direction indicated by the motion vector, the larger the value.
[0030]
In the next step S10, the CPU 2 determines whether or not the absolute value ΔV of the difference obtained by the calculation in the above step S9 is sufficiently larger than the search range r. Here, “r” is an arbitrary value, and the search range r is a rectangular region having a point (−r, −r) and a point (+ r, + r) as diagonal points. The rectangular area defined by the search range r is smaller than the rectangular area defined by the search range R in step S3 described above, and is a rectangular area composed of, for example, 6 × 6 pixels. Then, when the absolute value ΔV of the difference is sufficiently larger than the search range r, that is, when the directions indicated by the motion vectors of the adjacent macroblocks are different, the CPU 2 proceeds to step S11, and the absolute value ΔV of the difference is searched. When it is not sufficiently larger than the range r, that is, when the direction indicated by each motion vector of the adjacent macroblock is substantially the same direction, the process proceeds to step S12.
[0031]
In step S11, the CPU 2 determines each motion vector of the macroblock adjacent to both sides in the horizontal direction of the macroblock specified in step S6 described above or step S14 described later, as shown in FIG. The search areas A and B defined by the search range r are set around the point indicated by the upper left coordinate position. And CPU2 detects a motion vector by performing block matching in each search area A and B, and progresses to step S14.
[0032]
On the other hand, in step S12, the CPU 2 uses the motion vectors for the macroblocks adjacent to both sides in the horizontal direction of the macroblock designated in step S6 or step S14, and uses the average motion vector AveV ( h, v) is calculated.
[0033]
In the next step S13, the CPU 2 sets the point (−r, −r) and the point (+ r, + r) around the coordinate position (h, v) indicated by the tip of the average motion vector AveV (h, v). A rectangular search area C as a diagonal point is set. And CPU2 detects the motion vector about the macroblock designated by step S6 or step S14 by performing block matching in the set search area | region C. FIG.
[0034]
In the next step S14, the CPU 2 performs a process of advancing by 2 numbers from the macroblock in which the motion vector is detected in the above-described step S13 toward the right side in the horizontal direction.
[0035]
In the next step S15, the CPU 2 determines whether or not the macroblock with the number designated in the above-described step S14 is located at the right end in the line. The CPU 2 proceeds to step S16 when determining that the designated macroblock is located at the right end in the line, and returns to step S7 when determining that the designated macroblock is not located at the right end in the line. That is, the CPU 2 repeats the processes from step S2 to step S15 described above, thereby detecting motion vectors for all macroblocks constituting the line on which the above process is performed.
[0036]
In step S16, the CPU 2 performs a process of designating a new line by proceeding toward the bottom by two numbers from the line on which the processes from the above-described steps S3 to S15 are performed.
[0037]
In the next step S17, the CPU 2 determines whether or not the line number designated in the above step S16 is the bottom. When the CPU 2 determines that the designated line is the bottom, the process proceeds to step S18 shown in FIG. 4. When the CPU 2 determines that the designated line is not the bottom, the process returns to step S2 and the above-described steps S2 to S2 are performed for the designated line. The process shown in S15 is performed. That is, the CPU 2 performs the processing shown in the above-described steps S2 to S15 for every two numbers from the line “0” of the frame image toward the bottom line by performing the processing from step S1 to step S17. Do.
[0038]
In the next step S18, the CPU 2 performs a process of designating a line number in which a plurality of macroblocks as shown in FIG. 2 are arranged in the vertical direction. Here, the CPU 2 designates the number of the line “1” adjacent to the lower side by one number from the upper end among the plurality of lines in which the macroblocks are arranged in the horizontal direction.
[0039]
In the next step S19, the CPU 2 performs a process of designating the macroblock number “0” for detecting the motion vector among the lines “1” designated in the above step S18.
[0040]
In the next step S20, the CPU 2 determines whether or not there is a macroblock below the macroblock specified in step S19. The CPU 2 proceeds to step S21 when determining that there is no macroblock below the designated macroblock, and proceeds to step S22 when determining that there is a macroblock below the designated macroblock.
[0041]
In step S21, the CPU 2 sets the search area of the search range R in the above-described step S3 for the macroblock determined in the above-described step S20 that there is no adjacent lower macroblock. Processing for detecting a motion vector is performed by performing block matching, and the process proceeds to step S27.
[0042]
On the other hand, in step S22, the CPU 2 calculates a difference between motion vectors of macroblocks adjacent in the vertical direction of the macroblock specified in step S19 described above or step S27 described later, and calculates an absolute value ΔV of the difference.
[0043]
In the next step S23, the CPU 2 determines whether or not the absolute value ΔV of the difference obtained by the calculation in the above step S22 is larger than the search range r. The CPU 2 proceeds to step S24 when the absolute value ΔV of the difference is larger than the search range r, and proceeds to step S25 when the absolute value ΔV of the difference is not larger than the search range r.
[0044]
In step S24, the CPU 2 sets each motion vector for the macroblock adjacent in the vertical direction of the macroblock specified in step S19 described above or step S27 described later to the upper left of the specified macroblock as shown in FIG. The search areas D and E defined by the search range r are set with the coordinate position as the center and the point indicated. And CPU2 detects a motion vector by performing block matching in each search area | region D and E, and progresses to step S27.
[0045]
On the other hand, in step S25, the CPU 2 uses the motion vectors for the macroblocks adjacent to each other in the vertical direction of the macroblock specified in step S19 or S27, and uses the average motion vector AveV (h, v) is calculated.
[0046]
In the next step S26, the CPU 2 sets the point (−r, −r) and the point (+ r, + r) around the coordinate position (h, v) indicated by the tip of the average motion vector AveV (h, v). A rectangular search area F as a diagonal point is set. And CPU2 detects the motion vector about the macroblock designated by step S19 or step S27 by performing block matching in the set search area | region.
[0047]
In the next step S27, the CPU 2 performs a process of advancing by one number from the macroblock in which the motion vector is detected in the above-described step S26 toward the right side in the horizontal direction.
[0048]
In the next step S28, the CPU 2 determines whether or not the macroblock having the number designated in the above-described step S27 is located at the right end in the line. The CPU 2 proceeds to step S29 when determining that the designated macroblock is located at the right end in the line, and returns to step S20 when determining that the designated macroblock is not located at the right end in the line. That is, the CPU 2 detects the motion vector for all the macroblocks constituting the line on which the above-described processing is performed by repeating the above-described processing from step S20 to step S28.
[0049]
In step S29, the CPU 2 performs a process of designating a new line by proceeding toward the lower end by two numbers from the line on which the processes from step S19 to step S28 described above are performed.
[0050]
In the next step S30, the CPU 2 determines whether or not the line number designated in the above step S29 is the bottom. Then, the CPU 2 ends the process when it is determined that the designated line is the bottom, and when it is determined that the designated line is not the bottom, the process returns to step S19 and the processes shown in the above steps S2 to S28 for the designated line. I do. That is, the CPU 2 performs the processing from step S18 to step S30, thereby performing the above-described step S19 to step S28 every two numbers from the line “0” to the bottom line in the vertical direction of the frame image. The process shown in is performed.
[0051]
The motion vector detection apparatus 1 described above detects the motion vectors for all macroblocks arranged in the horizontal direction among the designated lines by executing the processing shown in steps S1 to S17, and shows the steps in steps S18 to S30. All macros constituting a frame image by executing processing and detecting a motion vector using a macroblock adjacent in the vertical direction by designating a line not to be processed in steps S1 to S17. A motion vector is detected for the block.
[0052]
Therefore, according to such a motion vector detection device 1, by performing the processing shown in step S3, block matching is performed in a search region having a predetermined pixel size for a part of macroblocks constituting the frame image, and the motion is detected. Performs vector detection processing, and for other macroblocks, refers to the motion vectors of adjacent macroblocks, and performs block matching in the search area with a pixel size smaller than the predetermined pixel size to detect motion vectors Therefore, it is possible to reduce the search area compared to the case where the motion vector is detected by performing block matching in the search area having the predetermined pixel size for all the macroblocks constituting the frame image. The number of times to do can be reduced. Therefore, according to this motion vector detection apparatus 1, the processing time required to detect a motion vector can be significantly shortened. Specifically, the motion vector detection device 1 sets the search range R in step S3 described above to 32 × 32 pixels, and the search range r when referring to the motion vector of the adjacent macroblock is set to 6 × 6 pixels. At this time, it is possible to reduce the processing time for detecting motion vectors for all the macroblocks constituting the frame image to about 1/100.
[0053]
Further, according to the motion vector detection device 1, the processing shown in step S9 and step S10 is performed to determine the direction indicated by the motion vector of the macroblock adjacent to the macroblock for detecting the motion vector, and each motion vector is Since the search range to be set is changed according to the pointing direction, it is possible to detect a motion vector with high accuracy even when the motion vectors of adjacent macroblocks indicate different directions.
[0054]
【The invention's effect】
  As explained in detail above,According to the present invention, for each first block of an image composed of a plurality of blocks each having a first block and a second block that are alternately positioned in the horizontal direction or the vertical direction, a motion vector in the first search region. And detecting motion vectors in each second search area for each second block, each motion for the first block adjacent to the second block on both sides in the horizontal or vertical direction. When the absolute value of the vector difference is calculated and the obtained absolute value is smaller than the predetermined value, the average motion vector of the respective motion vectors for the adjacent first block is calculated and the obtained average The second search area centered on the coordinate position indicated by the motion vector is set, and if the obtained absolute value is larger than a predetermined value, the adjacent search area is set. The second search area centered on the coordinate position indicated by each motion vector for the first block is set, and the motion vector for the second block is smaller than the first search area. Since block matching is performed in the search area,The second search area can be made smaller in pixel size compared to the first search area in accordance with the motion vector for the first block adjacent to the second block. It is possible to reduce the amount of calculation and the processing time when detecting a motion vector by reducing the number of times of performing block matching.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a motion vector detection apparatus to which the present invention is applied.
FIG. 2 is a diagram for explaining that a frame image is divided into macroblock units when a process of detecting a motion vector is performed by a CPU provided in a motion vector detection apparatus to which the present invention is applied.
FIG. 3 is a flowchart showing a processing procedure in which a CPU provided in a motion vector detection apparatus to which the present invention is applied detects a motion vector according to a motion vector detection program.
FIG. 4 is a flowchart showing a processing procedure in which a CPU provided in a motion vector detection apparatus to which the present invention is applied detects a motion vector according to a motion vector detection program.
FIG. 5 is a diagram for explaining that a motion vector is detected by setting a search region using motion vectors of adjacent macroblocks when adjacent macroblocks point in different directions in the horizontal direction; is there.
FIG. 6 is a diagram for explaining that a motion vector is detected by setting a search region using a motion vector of an adjacent macroblock when adjacent macroblocks in the horizontal direction indicate substantially the same direction. It is.
FIG. 7 is a diagram for explaining that a motion vector is detected by setting a search region using a motion vector of an adjacent macroblock when adjacent macroblocks point in different directions in the vertical direction; is there.
FIG. 8 is a diagram for explaining that a motion vector is detected by setting a search region using a motion vector of an adjacent macroblock when adjacent macroblocks in the horizontal direction indicate substantially the same direction; It is.
[Explanation of symbols]
1 motion vector detection device, 2 CPU

Claims (2)

水平方向又は垂直方向に交互に位置する第1のブロックと第2のブロックを有する複数のブロックからなる画像についての動きベクトルを検出する動きベクトル検出方法において、
各第1のブロックについて、それぞれ第1の探索領域で動きベクトルを検出し、
各第2のブロックについて、それぞれ第2の探索領域で動きベクトルを検出するにあたり、
上記第2のブロックと水平方向又は垂直方向における両側に隣接する上記第1のブロックについての各動きベクトルの差分の絶対値を演算し、
得られた絶対値が所定値よりも小さい場合には、上記隣接する第1のブロックについての各動きベクトルの平均動きベクトルを演算して、得られた平均動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定し、
また、得られた絶対値が所定値よりも大きい場合には、上記隣接する第1のブロックについての各動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定し、
上記第2のブロックについての動きベクトルを上記第1の探索領域よりも小さい上記第2の探索領域でブロックマッチングを行って検出することを特徴とする動きベクトル検出方法。
In a motion vector detection method for detecting a motion vector for an image composed of a plurality of blocks each having a first block and a second block alternately positioned in the horizontal direction or the vertical direction ,
For each first block, detect a motion vector in the first search region ,
In detecting a motion vector in the second search region for each second block,
Calculating the absolute value of the difference of each motion vector for the first block adjacent to the second block on both sides in the horizontal or vertical direction;
When the obtained absolute value is smaller than a predetermined value, the average motion vector of each motion vector for the adjacent first block is calculated, and the coordinate position indicated by the obtained average motion vector is the center. Set the second search area to
When the obtained absolute value is larger than a predetermined value, the second search area centered on the coordinate position indicated by each motion vector for the adjacent first block is set.
A motion vector detection method comprising: detecting a motion vector for the second block by performing block matching in the second search region smaller than the first search region .
水平方向又は垂直方向に交互に位置する第1のブロックと第2のブロックを有する複数のブロックからなる画像についての動きベクトルを検出する動きベクトル検出装置において、
各第1のブロックについて、それぞれ第1の探索領域で動きベクトルを検出する第1の動きベクトル検出手段と、
各第2のブロックについて、それぞれ第2の探索領域で動きベクトルを検出するにあたり、
上記第2のブロックと水平方向又は垂直方向における両側に隣接する上記第1のブロックについての各動きベクトルの差分の絶対値を演算し、
得られた絶対値が所定値よりも小さい場合には、上記隣接する第1のブロックについての各動きベクトルの平均動きベクトルを演算して、得られた平均動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定し、また、得られた絶対値が所定値よりも大きい場合には、上記隣接する第1のブロックについての各動きベクトルで示される座標位置を中心とする上記第2の探索領域を設定する探索領域設定手段と、
上記第2のブロックについての動きベクトルを上記第1の探索領域よりも小さい上記第2の探索領域でブロックマッチングを行って検出する第2の動きベクトル検出手段とを備える
ことを特徴とする動きベクトル検出装置。
In a motion vector detection device for detecting a motion vector for an image composed of a plurality of blocks each having a first block and a second block alternately positioned in the horizontal direction or the vertical direction ,
First motion vector detection means for detecting a motion vector in the first search region for each first block ;
In detecting a motion vector in the second search region for each second block,
Calculating the absolute value of the difference of each motion vector for the first block adjacent to the second block on both sides in the horizontal or vertical direction;
When the obtained absolute value is smaller than a predetermined value, the average motion vector of each motion vector for the adjacent first block is calculated, and the coordinate position indicated by the obtained average motion vector is the center. The second search area is set, and when the obtained absolute value is larger than a predetermined value, the coordinate position indicated by each motion vector for the adjacent first block is the center. Search area setting means for setting a second search area ;
A motion vector comprising: second motion vector detection means for detecting a motion vector of the second block by performing block matching in the second search region smaller than the first search region. Detection device.
JP30147898A 1998-10-22 1998-10-22 Motion vector detection method and apparatus Expired - Fee Related JP4035903B2 (en)

Priority Applications (12)

Application Number Priority Date Filing Date Title
JP30147898A JP4035903B2 (en) 1998-10-22 1998-10-22 Motion vector detection method and apparatus
TW088117602A TW444507B (en) 1998-10-22 1999-10-12 Detecting method and device for motion vector
CA002314976A CA2314976C (en) 1998-10-22 1999-10-18 Motion vector detecting method and device
PCT/JP1999/005735 WO2000024202A1 (en) 1998-10-22 1999-10-18 Motion vector detecting method and device
CNB998031798A CN1148069C (en) 1998-10-22 1999-10-18 Motion vector detecting method and device
US09/582,156 US6594314B1 (en) 1998-10-22 1999-10-18 Motion vector detection method and apparatus
CNB031530427A CN1222174C (en) 1998-10-22 1999-10-18 Method and device for checking motion vector
CNB031530419A CN1222173C (en) 1998-10-22 1999-10-18 Method and device for checking motion vector
AU61242/99A AU751909B2 (en) 1998-10-22 1999-10-18 Motion vector detecting method and device
KR1020007006895A KR100659627B1 (en) 1998-10-22 1999-10-18 Motion vector detecting method and device
EP99947946A EP1051040A1 (en) 1998-10-22 1999-10-18 Motion vector detecting method and device
MYPI99004526A MY125635A (en) 1998-10-22 1999-10-20 Motion vector detection method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30147898A JP4035903B2 (en) 1998-10-22 1998-10-22 Motion vector detection method and apparatus

Publications (2)

Publication Number Publication Date
JP2000134628A JP2000134628A (en) 2000-05-12
JP4035903B2 true JP4035903B2 (en) 2008-01-23

Family

ID=17897397

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30147898A Expired - Fee Related JP4035903B2 (en) 1998-10-22 1998-10-22 Motion vector detection method and apparatus

Country Status (1)

Country Link
JP (1) JP4035903B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6671319B1 (en) * 1999-12-28 2003-12-30 Sony Corporation Methods and apparatus for motion estimation using neighboring macroblocks
JP3968712B2 (en) 2003-04-28 2007-08-29 ソニー株式会社 Motion prediction compensation apparatus and method
JP2008061162A (en) * 2006-09-04 2008-03-13 Fujitsu Ltd Motion vector search apparatus and motion vector search method
TWI782974B (en) * 2017-04-13 2022-11-11 美商松下電器(美國)知識產權公司 Decoding device, decoding method, and non-transitory computer-readable medium
KR102577599B1 (en) * 2017-04-13 2023-09-12 파나소닉 인텔렉츄얼 프로퍼티 코포레이션 오브 아메리카 Encoding device, decoding device, encoding method and decoding method

Also Published As

Publication number Publication date
JP2000134628A (en) 2000-05-12

Similar Documents

Publication Publication Date Title
US6418168B1 (en) Motion vector detection apparatus, method of the same, and image processing apparatus
US7953154B2 (en) Image coding device and image coding method
JP3538055B2 (en) Motion vector detection device
KR100659627B1 (en) Motion vector detecting method and device
KR100843418B1 (en) Apparatus and method for image coding
JP2007124408A (en) Motion vector detector and motion vector detecting method
JP4035903B2 (en) Motion vector detection method and apparatus
CN101822058A (en) Video encoding using pixel decimation
JPH089379A (en) Motion vector detection method
JP2008177630A (en) Motion vector detector
JP4196447B2 (en) Motion vector detection method and apparatus
JPH1042300A (en) Motion vector detection device
JP3309519B2 (en) Motion vector detection device
JP2004229150A (en) Motion vector searching method and device
JPH11113003A (en) Motion vector detector and motion vector detection method
JP4078733B2 (en) Motion vector detection method and apparatus
JP4241021B2 (en) Motion vector detection method, motion vector detection device, and image encoding device
WO1999044369A1 (en) Device and method for coding image
JPH08242454A (en) Method for detecting global motion parameter
JPH09182078A (en) Motion vector detector and method therefor
JPH10191347A (en) Motion detector, motion detecting method and storage medium
JPH11205816A (en) Moving vector detection device
JP2002501697A (en) Computer-aided motion estimation method and apparatus for image elements of an image to be encoded
JP2000069481A (en) Moving vector detection device
JP4304912B2 (en) Motion vector detection apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050617

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070710

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070910

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071022

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

Free format text: PAYMENT UNTIL: 20101109

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees