Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4306256B2 - Motion vector detection device, motion vector detection method, program, and recording medium - Google Patents
[go: Go Back, main page]

JP4306256B2 - Motion vector detection device, motion vector detection method, program, and recording medium - Google Patents

Motion vector detection device, motion vector detection method, program, and recording medium Download PDF

Info

Publication number
JP4306256B2
JP4306256B2 JP2003008377A JP2003008377A JP4306256B2 JP 4306256 B2 JP4306256 B2 JP 4306256B2 JP 2003008377 A JP2003008377 A JP 2003008377A JP 2003008377 A JP2003008377 A JP 2003008377A JP 4306256 B2 JP4306256 B2 JP 4306256B2
Authority
JP
Japan
Prior art keywords
line segment
point
representative point
candidate
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
JP2003008377A
Other languages
Japanese (ja)
Other versions
JP2004220419A5 (en
JP2004220419A (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 JP2003008377A priority Critical patent/JP4306256B2/en
Publication of JP2004220419A publication Critical patent/JP2004220419A/en
Publication of JP2004220419A5 publication Critical patent/JP2004220419A5/ja
Application granted granted Critical
Publication of JP4306256B2 publication Critical patent/JP4306256B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Studio Devices (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、動画映像における動きベクトルを検出するための動きベクトル検出装置、動きベクトル検出方法、さらには動きベクトル検出方法を実行させるプログラム、該プログラムを記録した記録媒体に関するものである。
【0002】
【従来の技術】
動画映像データにかかる処理として、映像の動きベクトルを検出する方法が各種提案され、例えばビデオカメラにおける被写体追尾や手ブレ補正などのために利用されている。
例えばブロックマッチング法、勾配法、代表点マッチング法などが知られている。先行技術文献としては次のものが挙げられる。
【0003】
【特許文献1】
特開平5−30495号公報
【特許文献2】
特開平8−237536号公報
【特許文献3】
特開平6−86149号公報
【0004】
ブロックマッチング法では、過去フレーム内において或る代表ブロックを設定する。例えば水平・垂直方向のn×nの画素範囲として代表ブロックを設定する。そして次フレーム(現在フレーム)で、上記代表ブロックに相当する画素範囲を探し、水平・垂直空間上で、代表ブロックの位置から、対応するブロックに至る方向及び距離を動きベクトルとする方式である。
この場合、例えば代表ブロックの画素値総計を基準に、画素値総計がほぼ同じであるn×nのブロックを、対応するブロックと判断する。
【0005】
勾配法は、画素データの輝度勾配を利用して過去フレームと現在フレームでの対応ポイントを判別し、動きベクトルを検出する。例えば上記特許文献1に勾配法を利用した動きベクトル検出装置が示されている。
【0006】
代表点マッチング法については、例えば上記特許文献2,3などに記載されている。
この代表点マッチング法を、図15により説明する。図15(a)(b)は、時間的に連続するフレームとして、過去フレームF#1と現在フレームF#2を示している。
図15(a)(b)のように、過去フレームF#1に注目領域ARaを設定し、現在フレームF#2には探索領域ARsを設定する。注目領域ARaと探索領域ARsは大きさと位置が同じものとする。
また、注目領域ARaの中心にある画素を代表点rとする。注目領域ARaと代表点rの関係を拡大して図15(c)に示している。
【0007】
このように代表点rが決められた後、現在フレームF#2において、探索領域ARsにある全ての画素と代表点rの画素との、輝度値同士の差分絶対値を計算する。そして、その差分絶対値のうち最も小さい差分絶対値を与える画素をその探索領域ARsにおける候補点eとする。
候補点eの数が1つであればその候補点eを終点、代表点rを始点とするベクトルを、求める動きベクトルとする。但し実際には候補点eの数は1つとは限らない。例えば図15(d)では、3つの候補点e1,e2,e3が検出された場合を示している。このような場合には、探索領域ARsの中心(=代表点r相当位置)に最も近い候補点をベクトルの終点とするのが一般的である。従って図15(d)の場合、図15(e)のように候補点e2が採用され、図示するように候補点e2を終点として動きベクトルVが求められる。
【0008】
【発明が解決しようとする課題】
上記各方法では、次のような問題がある。
まずブロックマッチング法の場合、動きベクトルの検出精度は高いが、ブロック単位で対応する位置を検出しなければならないため、演算処理量やそのためのデータ記憶量が多く、実現するための装置構成の規模が大きくなる。
また、画像の拡大や縮小、回転運動があった場合に不利である。さらにブロックが画像の複数のオブジェクトにまたがる場合や、例えば背景とオブジェクトにまたがる場合など、間違ったベクトルを検出する可能性が高い。
【0009】
勾配法では、画素値が急激に変化するところでは検出誤差が大きくなる。またノイズ成分によって輝度勾配の値に影響を受けやすい。
さらに、大きな動きを検出することが困難であり、大きな動きを検出しようとするとハードウアの大規模化が必要になることが知られている。
【0010】
代表点マッチング法の場合は、ブロックマッチング法と比べてハードウア構成の規模を小さくできるという利点があるが、代表点に対応する候補点を、画素差分が最小の画素とするだけでは物理的な意味に乏しい。特に画像内容として画素値が平坦な部分では、候補点が数多く検出されることになり、どの画素をベクトルの終点とするかの判定は困難である。上記のように、例えば代表点に最も近い候補点をベクトル終点とするが、これは明確な物理的な意味を持つものではない。
なお一般的には、画像の急峻なエッヂにおいては微妙なサンプリング位置の違いにより画素値が大きく変動する。そのため、画素差分を元にしたマッチングは検出誤差の要因となりやすい。
【0011】
つまり、従来の動きベクトル検出方法では、検出精度を高めるにはハードウエア規模を大きくすることが必要となり、逆にハードウエア規模を小さくするには検出精度を犠牲にする必要があった。
【0012】
【課題を解決するための手段】
そこで本発明は、ハードウアの大規模化を招かずに、精度の良い動きベクトル検出を実現することを目的とする。
【0017】
本発明の動きベクトル検出装置は、動画映像データの過去フレーム内の或る画素を代表点として設定する代表点設定手段と、現在フレームの画素データ値と上記代表点の画素データ値とを比較して、比較結果に基づいて上記代表点との対応が推定される候補点としての画素データを判定する比較判定手段と、上記候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定する線分判定手段と、上記線分判定手段で最大線分と判定された候補線分の中点を算出する中点算出手段と、上記代表点を始点とし、上記中点を終点として動きベクトルを検出するベクトル検出手段とを備える。
【0018】
また本発明の動きベクトル検出方法は、動画映像データの過去フレーム内の或る画素を代表点として設定する代表点設定ステップと、現在フレームの画素データ値と、上記代表点の画素データ値を比較して、比較結果に基づいて上記代表点との対応が推定される候補点としての画素データを判定する比較判定ステップと、上記候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定する線分判定ステップと、上記線分判定ステップで最大線分と判定された候補線分の中点を算出する中点算出ステップと、上記代表点を始点とし、上記中点を終点として動きベクトルを検出するベクトル検出ステップとを備える。
【0019】
これらの装置及び方法において、上記比較判定手段(比較判定ステップ)は、現在フレーム内で、上記代表点に相当する画素位置を中心とした所定画素範囲を探索領域とし、該探索領域内の各画素データについて、上記代表点の画素データ値との比較を行う。
また上記代表点設定手段(代表点設定ステップ)は、上記中点算出手段で算出された中点に対応する現在フレームの画素を、次のフレームに対する代表点とする。
また上記動きベクトル検出装置では、動画映像データの過去フレーム内での複数の代表点を設定し、上記各代表点を用いて動きベクトルを検出するために、上記比較判定手段、上記線分判定手段、上記中点算出手段、及び上記ベクトル検出手段が、上記複数の代表点のそれぞれに対応するように設けられる。
【0020】
また本発明のプログラムは上記動きベクトル検出方法を演算装置によって実行させるプログラムであり、本発明の記録媒体は、そのようなプログラムを記録した記録媒体である。
【0021】
以上のような本発明では、動きベクトル検出として、従来方式に比べて小規模のハードウエアで精度の良い検出を行うことのできる2つの新規なアルゴリズムとして「重心検出」と「線分検出」を提供するものである。
「重心検出」は、過去フレームにおける代表点に対してこの代表点の画素値に近い画素を候補点として検出し、その検出された候補点が空間的に連続する候補領域の重心点を検出する。そして代表点を始点とし、重心点を終点として動きベクトルを検出するものである。この場合、「線分検出」に比べればハードウエア規模が大きくなるが、精度の高い動きベクトル検出が可能となる。
「線分検出」は、過去フレームにおける代表点に対してこの代表点の画素値に近い画素を候補点として検出し、候補点が走査方向(水平方向)に最も長く連続した候補線分の中点を検出する。そして代表点を始点とし、中点を終点として動きベクトルを検出するものである。この場合、「重心検出」に検出精度がやや落ちるが、ハードウエア規模は小さくできる。
【0022】
【発明の実施の形態】
以下、本発明の実施の形態として、重心検出及び線分検出としての動きベクトル検出についき説明していく。説明は次の順序で行う。
1.重心検出による動きベクトル検出
1−1 重心検出による動きベクトル検出方式
1−2 重心検出にかかる第1の装置構成例及び処理
1−3 重心検出にかかる第2の装置構成例及び処理
2.線分検出による動きベクトル検出
2−1 線分検出による動きベクトル検出方式
2−2 線分検出にかかる第1の装置構成例及び処理
2−3 線分検出にかかる第2の装置構成例及び処理
3.代表点設定方式例
4.動きベクトル検出情報の用途
5.プログラム及び記録媒体
【0023】
1.重心検出による動きベクトル検出
1−1 重心検出による動きベクトル検出方式
図1,図2により、重心検出による動きベクトル検出方式を説明する。
図1(a)(b)は、時間的に連続するフレームとして、過去フレームF#1と現在フレームF#2を示している。
図1(a)(b)のように、過去フレームF#1に注目領域ARaを設定し、現在フレームF#2には探索領域ARsを設定する。注目領域ARaと探索領域ARsは大きさと位置が同じものとする。
また、注目領域ARaの中心にある画素を代表点rとする。注目領域ARaと代表点rの関係を拡大して図1(c)に示している。○は画素を示し、そのうちで代表点rとされた画素を●で示している。
なお、ここではあくまで説明上の例として水平/垂直方向に7画素×7画素の領域を注目領域ARaとしているが、この場合、探索領域ARsも7画素×7画素の領域となる。但し実際には、注目領域ARa及び探索領域ARsは、7画素×7画素の領域とされるとは限らず、例えば実際には代表点rとしての画素を中心として水平・垂直方向に(±32画素)×(±32画素)などとされる。
【0024】
なお、代表点rの設定方式としては各種あるが、それについては後述する。ここでは、任意の注目領域ARaの中心画素を、最初の代表点rとするとして説明を続ける。
【0025】
このように代表点rが決められた後、現在フレームF#2において、探索領域ARsにある全ての画素と代表点rの画素との、輝度値同士の差分絶対値を計算する。そして求めた差分絶対値がある一定の閾値よりも小さければ、その画素を候補点eとする比較判定処理を行う。
図1(d)には、探索領域ARs内の全ての画素について、代表点rの値との比較判定を行い、候補点eを調べた結果を示す。ここでは●の画素として示すように候補点eが検出されたとしている。
【0026】
ここで、候補点rが空間的(水平・垂直方向)に連続した領域を候補領域eAとする。図1(d)のように候補点eが検出された場合、探索領域ARs内には、図2(a)のように2つの候補領域eA1、eA2が存在することになる。
このように複数の候補領域eAが認められた場合は、その中で最大の候補領域を選択する。図2(a)の場合、候補領域eA1が選択される。なお、候補領域eAが1つであった場合は、当然、その候補領域が選択される。
そして、選択された候補領域eA1について、重心点を求める。図2(b)に重心点wを示す。
そして重心点wを求めたら、その重心点wを動きベクトルの終点とする。すなわち、求める動きベクトルは代表点rを始点とし重心点wを終点とするベクトルである。図2(c)に拡大して示すように、代表点rに相当する画素位置をexとすると、この画素位置ex→重心点wのベクトルが、動きベクトルVとなる。
【0027】
本実施の形態の重心検出による動きベクトル検出は、以上のように候補領域eA内の重心をベクトル終点とするようにして行われる。
なお、図1のフレームF#2に続く、図示していないフレームF#3の画素データが入力される期間は、フレームF#2が過去フレームとなる。その場合、代表点rは、例えば求めた重心点wに基づいて設定される。例えば重心点wに最も近い画素として、図2(c)の画素位置eyを代表点rとし、その代表点rを中心としてn×nの領域が注目領域ARaとされる。
そしてフレームF#3においては、注目領域ARaと同一位置が探索領域ARsとされ、上記同様に動きベクトル検出が行われる。
【0028】
1−2 重心検出にかかる第1の装置構成例及び処理
上記図1,図2で説明した重心検出方式を用いる動きベクトル検出装置の構成を図3に示す。
図3に示すように、動きベクトル検出装置は、判定部1、フレームメモリ2A、2B、アドレス生成部、スイッチSW1〜SW4を備える。
【0029】
フレームメモリ2A、2Bは、動画映像の各フレームを形成する画素データDgを記憶するメモリであり、1フレーム毎に交互に順番に用いられる。例えば偶数番目のフレームはフレームメモリ2Aに記憶され、奇数番目のフレームはフレームメモリ2Bに記憶される。
スイッチSW1〜SW4は、例えば入力画素データDgとして偶数番目のフレームメモリ2Aが入力される期間は、それぞれ図示するようにt1端子が選択される。そして次のフレーム期間ではt2端子が接続されるというように、フレーム期間単位で切り替えられる。
【0030】
スイッチSW1〜SW4がt1端子に接続されているフレーム期間においては、入力画素データDgは、スイッチSW1を介してフレームメモリ2Aに供給される。このとき、クロックCKに基づいてアドレス生成部3でアドレスADが生成される。即ち水平、垂直方向の画素位置を示すrow(ロウ)/column(カラム)の値による画素アドレスである。
このアドレスADは、スイッチSW2を介して入力画素データDgに対応するアドレスとしてフレームメモリ2Aに供給される。フレームメモリ2AではアドレスADに基づいて入力画素データDgを記憶する。
【0031】
また、入力画素データDg及びアドレスADは、判定部1にも入力される。判定部1は、フレームを構成する入力画素データDgについて上述した重心検出の処理を行って、前フレームの代表点を基に動きベクトルを検出する。
【0032】
判定部1は、図示するように代表点情報保持部11,比較判定部12、閾値保持部13、フラグメモリ14、重心計算部15、動きベクトル計算部16、動きベクトルメモリ17を有する。
なお、これらの各部は、ソフトウエア、ハードウエアのいずれでも実現できる。例えばハードウエアで構成する場合、代表点情報保持部11、閾値保持部13、フラグメモリ14、動きベクトルメモリ17としてのレジスタやメモリを備え、また比較判定部12,重心計算部15,動きベクトル計算部16としての演算回路が形成されるようにすればよい。
また判定部1をDSPやCPUなどの演算処理デバイスにより構成し、内部RAMやレジスタとして、代表点情報保持部11、閾値保持部13、フラグメモリ14、動きベクトルメモリ17を実現する共に、ソフトウエア実装により比較判定部12,重心計算部15,動きベクトル計算部16としての演算機能が実現されるようにしてもよい。
【0033】
代表点情報保持部11は、現在の入力画素データDgのフレームの前のフレームにおいて設定された代表点rの情報として、代表点rの画素値及びアドレスを保持する。上記のように入力画素データDgがフレームメモリ2Aに記憶されていくフレーム期間においては、前のフレームの各画素データはフレームメモリ2Bに記憶されている。つまり代表点rとしての画素データは、フレームメモリ2Bに記憶されている。このため代表点rの情報としての画素値及びアドレスはスイッチSW3を介してフレームメモリ2Bから取り込まれ、代表点情報保持部11に保持される。
閾値保持部13は、画素差分値としての閾値thを保持する。閾値thは予め設定されている。
【0034】
比較判定部12には、入力画素データDg、及びアドレスADが入力される。また閾値保持部13から閾値thが供給される。さらに代表点情報保持部11から代表点rの画素値rgと代表点rのアドレスrADが入力される。
この比較判定部12は、入力されてくる入力画素データDgが図1(b)に示した探索領域ARs内であるか否かの判断、及び探索領域ARs内の入力画素データDgの画素値(輝度レベル)について、代表点rの画素値(輝度レベル)rgとの比較処理を行い、その結果によりフラグメモリ14の判定フラグ制御を行う。
【0035】
順次供給されてくる入力画素データDgとそのアドレスADが探索領域ARs内であるか否かは、アドレスADを探索領域ARsとしてのアドレスと比較することで行う。
探索領域ARsは、図1で説明したように前フレームの代表点rを中心とする注目領域ARaと同一のアドレス範囲である。例えば図1では簡略化のために代表点rの画素アドレスを中心として7×7画素の例を示したが、例えば実際には代表点rとしての画素を中心として水平・垂直方向に(±32画素)×(±32画素)などとされる。その場合、比較判定部12は、代表点rの画素アドレスrADを中心とした水平65画素×垂直65画素の範囲を、探索領域ARsとして決定することができる。
これにより入力画素データDgと共に入力されてくるアドレスADが、この探索領域ARsの範囲内のアドレスであるか否かを判別することができる。
【0036】
入力画素データDgが探索領域ARs内のデータであった場合は、その入力画素データDgと代表点rの画素値rgの比較処理を行う。具体的には輝度レベルとしての画素差分値を算出する。そして算出された画素差分値の絶対値が閾値th未満であるか否かを判定する。
閾値th未満であった場合は、その入力画素データDgは代表点rの画素に対応する候補点e(図1(d)参照)とする。その場合、フラグメモリ14に対して判定フラグのオンを指示する。
【0037】
フラグメモリ14では、1フレーム分の各画素にそれぞれ対応したフラグ領域が確保されている。例えば1フレームの水平方向画素数がHn、垂直方向画素数がVnであり、1フレームの画素数がHn×Vnであるとすれば、フラグメモリ14としては、1画素に付き1ビットとして、(Hn×Vn)ビットのフラグ領域が確保される。
そして比較判定部12からフラグオンの指示があった場合は、その際に供給されているアドレスADに対応するビット位置に、判定フラグが立てられることになる。従ってフラグメモリ14上では、図1(d)の候補点eと示したように、判定フラグが立てられることになる。
なお、後述する重心計算のためには、フラグオンとされた画素のアドレスが必要となり、フラグに対応してアドレスADを記憶する領域が確保されるようにしてもよいが、フラグ位置自体がアドレスADを表現するのであれば、アドレス値自体を記憶する必要はない。
【0038】
重心計算部15は、フラグメモリ14での判定フラグを参照して、フラグオンのアドレス(候補点e)が空間的(水平・垂直方向)に連続する候補領域eA(図2(a)参照)を判別する。また候補領域eAが複数存在する場合は、その中で最大の候補領域eAを選択する。
そして図2(b)で説明したように、選択した最大の候補領域eAについて重心点wを例えば座標値として算出する。
【0039】
動きベクトル計算部16は、重心計算部15で算出された重心点wと、代表点rの画素アドレスrADに基づいて、動きベクトルVを計算する。つまり図2(c)で説明したように代表点rの画素アドレスrADの座標値を始点とし、重心点wの座標値を終点とする動きベクトルVが計算される。
算出された動きベクトルVの値、つまりベクトルの方向及び長さを示す値は、動きベクトルメモリ17に保持され、動きベクトルVを用いて処理を行う所定の処理系に供給される。
【0040】
また、現在の入力画素データDgのフレームの次のフレームに対しては、今回のフレーム内で代表点rが決められる。代表点rは重心点wを基準にして設定される。例えば重心点wに相当する画素位置、例えば図1(c)の例では画素位置eyが、代表点rとされる。
重心計算部15はこのように、算出した重心点wに基づいて次の代表点rとしての画素アドレスrAD’を設定し、スイッチSW4を介してフレームメモリ2Aに供給する。フレームメモリ2Aでは、画素アドレスrAD’としての画素に関する付加情報として、代表点rとしての情報が記憶される。
【0041】
そして次のフレームの入力画素データDgが入力されるフレーム期間に至ると、各スイッチSW1〜SW4はt2端子に切り替えられる。
従って、各入力画素データDgは、今度はフレームメモリ2Bに記憶されていく。
このフレーム期間においては、フレームメモリ2Aから代表点rとしての情報が読み出され、代表点情報保持部11に保持される。
そして上記同様に、判定部1内の処理で重心検出方式での動きベクトルVの検出が行われる。
また、そのフレーム期間において重心点wが計算されたら、重心計算部15ではそれに基づいて次の代表点rの画素アドレスが設定される。その場合は、次の代表点rとしての画素アドレスrAD’は、スイッチSW4を介してフレームメモリ2Bに供給され、画素アドレスrAD’としての画素に関する付加情報として、代表点rとしての情報が記憶される。
【0042】
以降、同様に、入力画素データDgがフレームメモリ2Aに記憶されていくと共に、判定部1でフレームメモリ2Bからの代表点rの情報を用いて今回のフレームについて動きベクトルVが計算される処理と、入力画素データDgがフレームメモリ2Bに記憶されていくと共に、判定部1でフレームメモリ2Aからの代表点rの情報を用いて今回のフレームについて動きベクトルVが計算される処理とが、交互に行われていく。
【0043】
図4に判定部1の処理をフローチャートで示す。なお、このフローチャートは説明上の都合により、1フレーム期間内の処理として示している。つまり、各フレームにおける画素データDgが入力されてくる期間毎に、図4の処理が行われるものである。
【0044】
まずステップF101として代表点情報が設定される。上述したように、代表点情報は前フレーム上で設定された代表点rとしての画素値rg及びアドレスrADであり、フレームメモリ(2B又は2A)から読み込まれて代表点情報保持部11にセットされる。
なお、代表点rの画素は、前フレームにおける重心点wに基づいて設定されるとしたが、動きベクトル検出を行おうとするときの、一番最初のフレームでは、当然ながら動きベクトル検出は行われず、従って一番最初のフレーム上では任意に注目領域ARa及びその中心画素としての代表点rが設定されるものとなる。
【0045】
ステップF102として入力画素データDgが比較判定部12に入力される毎に、ステップF103以降の処理が行われる。
まずステップF103では、比較判定部12が入力された画素データDgについてのアドレスADを参照し、その入力画素データDgが探索領域ARs内であるか否かを判断する。探索領域ARs内でなければ、ステップF102に戻って次の入力画素データDgを待機する。
【0046】
探索領域ARs内としての画素データDgが入力された場合、比較判定部12の処理としてステップF104で画素差分計算が行われる。つまり当該入力画素データDgの画素値と、代表点rの画素値の差分絶対値が求められる。
そしてステップF105では、画素差分絶対値と閾値thが比較され、画素差分絶対値が閾値th未満であればステップF106で、フラグメモリ14上で当該画素データDgについて判定フラグがオンとされる。画素差分絶対値が閾値th以上の場合、判定フラグはオンとされない。
【0047】
ステップF107では、上記比較判定を行った画素データDgが、探索領域ARs内の最後の画素であるか否かを判別する。即ち、探索領域ARs内の全ての画素についてステップF104、F105,F106の処理を終えたか否かを判別する。まだ終えていなければ、ステップF102に戻って次の画素データ入力に備える。そして画素データDgが入力されたら、同様に探索領域ARsであるか否かを判断し、探索領域ARs内であればステップF104、F105,F106の処理を行う。
【0048】
今回のフレーム内で、少なくとも探索領域ARs内の全ての画素データDgについて比較判定処理を行ったら、処理はステップF108に進む。
この時点で、フラグメモリ14上では、例えば図1(d)のように探索領域ARs内での候補点eの情報(アドレス)が判定フラグとして保持されている。そこで、ステップF108では、重心計算部15は、フラグメモリ14上の判定フラグを参照して、重心計算を行う。つまり、まず最大の候補領域eAを選択し、その候補領域eA内の重心点wを算出する。
【0049】
重心点wは例えば次のように計算する。
図5に判定フラグとして候補点eがみつけられた探索領域ARsを示し、そのx、y座標軸を示しているが、重心のx座標、y座標は、例えば
x座標={Σ(判定フラグオンの画素のx座標)}/(フラグオンの画素数)
y座標={Σ(判定フラグオンの画素のy座標)}/(フラグオンの画素数)
として算出する。算出されたx座標、y座標が、重心点wの座標値となる。
【0050】
次にステップF109では、算出した重心点wに基づいて、次のフレームのための、現フレーム上での代表点rを設定する。即ち上述したように、代表点rの画素アドレスrAD’を設定して、現フレームの画素データDgを記憶しているフレームメモリ(2A又は2B)に記憶させる。
【0051】
ステップF110では、代表点rの画素アドレスrADの座標値と、算出された重心点wを用いて、動きベクトル計算部16で動きベクトルVが算出される。そしてステップF111で、算出された動きベクトルVが動きベクトルメモリ17に記憶され、所要の回路系によって参照される状態となる。
【0052】
この図4の処理が各フレーム期間毎に実行され、各フレーム期間毎に動きベクトルVが検出される。
つまり本例の重心検出による動きベクトル検出は、過去フレームにおける代表点rに対してこの代表点の画素値に近い画素を候補点eとして検出し、その検出された候補点eが空間的に連続する候補領域eAの重心点wを検出する。そして代表点rを始点とし、重心点wを終点として動きベクトルを検出する。
そしてこの重心検出方式によれば、フレーム間の単なる点マッチングではなく、候補領域eAの重心点として、物理的な意味のあるベクトル終点を検出するものであるため、精度の高い動きベクトルを検出できる。
また、重心点を検出することは、画像の不安定なエッヂ部分やノイズによる影響を受けにくいものともなり、その意味でも精度向上が実現される。
さらにハードウエア規模は従来の代表点マッチング方式とほぼ同等でよく、ブロックマッチング法の場合に比べて小規模化が実現される。
つまり代表点マッチング方式と同程度のハードウエア構成で、より高精度の動きベクトル検出が可能となる。
【0053】
また、重心計算部15は、候補領域eAが複数存在する場合は、最大の候補領域eAを選択し、選択した候補領域eAについて重心点wを算出することで、より正確なベクトル検出が可能となる。
また、重心点wに基づいて、次のフレームに対する代表点rを設定することで、代表点rとして物理的意味が与えられ、動きベクトル検出の精度を上げることができる。
【0054】
1−3 重心検出にかかる第2の装置構成例及び処理
続いて同じく重心検出方式での第2の装置構成例を説明する。
上記例は、重心検出方式での基本的な構成として、代表点rを1つ設定し、代表点rを含む注目領域ARaに対応する探索領域ARs内で画素比較判定を行うものとした。
実際上の適用例としては、代表点rを1つとする場合だけでなく、1フレーム内に複数の代表点rを設定し、各代表点rを含む注目領域ARaに対応して、各探索領域ARs内で画素比較判定を行って重心検出による動きベクトル検出を行うことも考えられる。
【0055】
例えば図6(a)は、フレームF#1内に4つの代表点r1〜r4(注目領域ARa1〜ARa4)を設定した状態を示しており、この場合、探索領域ARsは、図6(b)のようにフレームF#2において、探索領域ARs1〜ARs4の4つが設定されることになる。
例えばこのように4つの代表点r1〜r4を設定する場合の構成例を図7に示す。なお、図3と同一部分には同一符号を付し、説明を省略する。
図7において、構成上、上記図3と異なる点は、判定部1A〜1Dとして、判定部1が4つ(代表点の設定数と同数)設けられること、及び判定部選択部4が設けられることである。
【0056】
判定部1A〜1Dは、それぞれ図3の判定部1と同一の構成を有している。つまり、それぞれが代表点情報保持部11,比較判定部12、閾値保持部13、フラグメモリ14、重心計算部15、動きベクトル計算部16、動きベクトルメモリ17を有する。
そして例えば判定部1Aは探索領域ARs1を担当し、判定部1Bは探索領域ARs2を担当し、判定部1Cは探索領域ARs3を担当し、判定部1Dは探索領域ARs4を担当する。従って、各探索領域ARs1〜ARs4毎に動きベクトルVが検出されることになる。
【0057】
各判定部1A〜1Dが、それぞれソフトウエア、ハードウエアのいずれでも実現できることは同様である。
また各判定部1A〜1Dは、それぞれ独立の回路系(演算処理系)として設けられても良いが、例えばDSP、CPUなどの1つの演算処理デバイスにより、ここでいう複数の判定部1A〜1Dを実現することも可能である。
【0058】
このような構成の場合、判定部選択部4には、各判定部1A〜1Dがそれぞれ設定する探索領域ARs1〜ARs4の情報(アドレス範囲)がセットされる。そして、判定部選択部4は、入力画素データDgと同期して発生されるアドレスADについて、探索領域ARs1〜ARs4のうちのどれかに含まれるアドレスであるかを判別する。そして或る探索領域ARs内のアドレスと判断された場合は、現在入力されている画素データDgについて、その探索領域ARsを担当する判定部(1A〜1Dの内の1つ)において処理させる制御を行う。
【0059】
このような構成例の場合の1フレーム期間毎の処理を図8に示す。なお、図4と同一の処理については同一のステップ番号を付している。
この図8の処理は、各判定部1A〜1Dがそれぞれ実行するものである。
【0060】
各判定部1A〜1Dは、それぞれステップF101Aで前フレーム上での担当する代表点rについて代表点情報を設定する。即ち各判定部1A〜1Dはそれぞれ、代表点rとしての画素値rg及びアドレスrADを、フレームメモリ(2B又は2A)から読み込んで代表点情報保持部11にセットする。
従って例えば、判定部1Aの代表点情報保持部11には、図6(a)の代表点r1の情報が、判定部1Bの代表点情報保持部11には、代表点r2の情報が、判定部1Cの代表点情報保持部11には、代表点r3の情報が、判定部1Dの代表点情報保持部11には代表点r4の情報が、それぞれセットされる。
またこのとき、各判定部1A〜1Dはそれぞれ、代表点r1〜r4に応じて設定される探索領域ARs1〜ARs4の情報を、判定部選択部4に通知する。
【0061】
各判定部1A〜1Dは、それぞれステップF102として入力画素データDgが比較判定部12に入力されると、ステップF103Aで、その際に判定部選択部4によって選択されたか否かを確認する。
【0062】
判定部選択部4は、入力画素データDgのアドレスADに基づいて判定部1A〜1Dの1つを選択(処理実行指示)する(又はいずれも選択しない)。
つまり、例えば入力画素データDgのアドレスADが探索領域ARs1内であった場合は、その入力画素データDgに対応して判定部1Aを選択する。
同様に、入力画素データDgのアドレスADが探索領域ARs2内であった場合は、その入力画素データDgに対応して判定部1Bを選択する。
入力画素データDgのアドレスADが探索領域ARs3内であった場合は、その入力画素データDgに対応して判定部1Cを選択する。
入力画素データDgのアドレスADが探索領域ARs4内であった場合は、その入力画素データDgに対応して判定部1Dを選択する。
また、入力画素データDgのアドレスADが探索領域ARs1〜ARs4のいずれにも相当しなかった場合は、その入力画素データDgに対応しては、判定部1A〜1Dのどれも選択しない。
【0063】
つまり、各判定部1A〜1Dでは、それぞれステップF103Aで、判定部選択部4によって選択されているか否かにより、その際に入力された画素データDgについて処理を行うか否かを決定する。
選択されていなければ、ステップF102に戻って次の入力画素データDgを待機する。
判定部選択部4によって選択されていれば、当該入力画素データDgについてステップF104〜F107の処理、つまり画素差分の算出と閾値tHとの比較による判定フラグ制御を行うことになる。
このステップF104以降の処理は、図3と同様であるため重複説明を避けるが、結果として、各判定部1A〜1Dでは、それぞれが担当する探索領域ARs1〜ARs4において候補点eを求め、その後、最大の候補領域eAから重心点wを算出し、代表点rの座標から重心点wの座標としての動きベクトルVを検出することになる。
【0064】
このようにすることで、1画面上で、その画像内容の各部の動きベクトルVを検出することができ、これによって多様且つ利用範囲の広い動きベクトル検出が可能となる。
なお、図7では判定部選択部4を備える構成としたが、各判定部1A〜1D内に、それぞれ入力画素データDgについて担当する探索領域ARs内であるか否かを判別する機能を備えるようにしてもよい。
また、この例では代表点r、探索領域ARsを4つとしたが、これらを2つ、3つ、或いは5以上とする例も当然考えられ、そのためには判定部1が代表点の数に応じて構成されればよい。
【0065】
2.線分検出による動きベクトル検出
2−1 線分検出による動きベクトル検出方式
次に、図9により、線分検出による動きベクトル検出方式を説明する。
図9(a)(b)は、時間的に連続するフレームとして、過去フレームF#1と現在フレームF#2を示している。上記重心検出の場合と同様に、過去フレームF#1に注目領域ARaを設定し、現在フレームF#2には探索領域ARsを設定する。注目領域ARaと探索領域ARsは大きさと位置が同じものとする。また注目領域ARaの中心にある画素を代表点rとする。注目領域ARaと代表点rの関係を拡大して図9(c)に示している。
【0066】
このように代表点rが決められた後、現在フレームF#2において、探索領域ARsにある全ての画素と代表点rの画素との、輝度値同士の差分絶対値を計算する。そして求めた差分絶対値がある一定の閾値よりも小さければ、その画素を候補点eとする比較判定処理を行う。
図9(d)には、探索領域ARs内の全ての画素について、代表点rの値との比較判定を行い、候補点eを調べた結果を示す。ここでは●の画素として示すように候補点eが検出されたとしている。
なお、k、k+1・・・はフレーム上での画素の走査方向(水平方向)を示している。フレームを構成する画素データは、走査方向のストリームデータとして入力されてくるため、例えば1フレーム内でのk番目の走査線期間内における或る一部期間に、図示する探索領域ARs内の最初の行の画素が入力されてくる。
【0067】
図9(d)のように候補点eが判別されるが、この結果については、候補点rが走査方向(水平方向)に連続した領域を候補線分eLとする。図9(d)のように候補点eが検出された場合、探索領域ARs内には、図9(c)のように各走査ライン毎にみて候補点eが存在する部分に、候補線分eL1、eL2・・・eL7が検出されることになる。
そして、このような各候補線分の中で最大(最長)の候補線分が選択される。
例えば図9(e)の場合、候補線分eLが選択される。なお、候補線分eLが1つであった場合は、当然、その候補線分が選択される。
そして、選択された候補線分eL2について、図9(f)に示すように中点cを求める。。
中点cを求めたら、その中点cを動きベクトルの終点とする。すなわち、求める動きベクトルは代表点rを始点とし中点cを終点とするベクトルである。図9(f)に示すように、代表点rに相当する画素位置をexとすると、この画素位置ex→中点cのベクトルが、動きベクトルVとなる。
【0068】
本実施の形態の線分検出による動きベクトル検出は、以上のように候補線分eL内の中点をベクトル終点とするようにして行われる。
なお、図9のフレームF#2に続く、図示していないフレームF#3の画素データが入力される期間は、フレームF#2が過去フレームとなる。その場合、代表点rは、例えば求めた中点cに基づいて設定される。例えば中点cに最も近い画素として、図9(f)の画素位置ey1又はey2の一方を代表点rとし、その代表点rを中心としてn×nの領域が注目領域ARaとされる。
そしてフレームF#3においては、注目領域ARaと同一位置が探索領域ARsとされ、上記同様に動きベクトル検出が行われる。
【0069】
2−2 線分検出にかかる第1の装置構成例及び処理
上記図9で説明した線分検出方式を用いる動きベクトル検出装置の構成を図10に示す。
図示するように、動きベクトル検出装置は、判定部20、フレームメモリ2A、2B、アドレス生成部、スイッチSW1〜SW4を備える。
【0070】
フレームメモリ2A、2Bは、動画映像の各フレームを形成する画素データDgを記憶するメモリであり、1フレーム毎に交互に順番に用いられる。例えば偶数番目のフレームはフレームメモリ2Aに記憶され、奇数番目のフレームはフレームメモリ2Bに記憶される。
スイッチSW1〜SW4は、例えば入力画素データDgとして偶数番目のフレームメモリ2Aが入力される期間は、それぞれ図示するようにt1端子が選択される。そして次のフレーム期間ではt2端子が接続されるというように、フレーム期間単位で切り替えられる。
【0071】
スイッチSW1〜SW4がt1端子に接続されているフレーム期間においては、入力画素データDgは、スイッチSW1を介してフレームメモリ2Aに供給される。このとき、クロックCKに基づいてアドレス生成部3でアドレスADが生成される。即ち水平、垂直方向の画素位置を示すrow(ロウ)/column(カラム)の値による画素アドレスである。
このアドレスADは、スイッチSW2を介して入力画素データDgに対応するアドレスとしてフレームメモリ2Aに供給される。フレームメモリ2AではアドレスADに基づいて入力画素データDgを記憶する。
【0072】
また、入力画素データDg及びアドレスADは、判定部20にも入力される。判定部20は、フレームを構成する入力画素データDgについて上述した線分検出の処理を行って、前フレームの代表点を基に動きベクトルを検出する。
【0073】
判定部20は、図示するように代表点情報保持部21,比較判定部22、閾値保持部23、線分判定部24、動きベクトル計算部25、動きベクトルメモリ26を有する。
なお、これらの各部は、ソフトウエア、ハードウエアのいずれでも実現できる。例えばハードウエアで構成する場合、代表点情報保持部21、閾値保持部23、後述する線分判定部24内の記憶部、及び動きベクトルメモリ26として、必要なレジスタやメモリを備え、また比較判定部22,線分判定部24,動きベクトル計算部25としての演算回路が形成されるようにすればよい。
また判定部20をDSPやCPUなどの演算処理デバイスにより構成し、内部RAMやレジスタとして、代表点情報保持部21、閾値保持部23、後述する線分判定部24内の記憶部、及び動きベクトルメモリ26として記憶領域を実現する共に、ソフトウエア実装により比較判定部22,線分判定部24,動きベクトル計算部25としての演算機能が実現されるようにしてもよい。
【0074】
代表点情報保持部21は、現在の入力画素データDgのフレームの前のフレームにおいて設定された代表点rの情報として、代表点rの画素値及びアドレスを保持する。上記のように入力画素データDgがフレームメモリ2Aに記憶されていくフレーム期間においては、前のフレームの各画素データはフレームメモリ2Bに記憶されている。つまり代表点rとしての画素データは、フレームメモリ2Bに記憶されている。このため代表点rの情報としての画素値及びアドレスはスイッチSW3を介してフレームメモリ2Bから取り込まれ、代表点情報保持部21に保持される。
閾値保持部23は、画素差分値としての閾値thを保持する。閾値thは予め設定されている。
【0075】
比較判定部22には、入力画素データDg、及びアドレスADが入力される。また閾値保持部23から閾値thが供給される。さらに代表点情報保持部21から代表点rの画素値rgと代表点rのアドレスrADが入力される。
この比較判定部22は、入力されてくる入力画素データDgが図9(b)に示した探索領域ARs内であるか否かの判断、及び探索領域ARs内の入力画素データDgの画素値(輝度レベル)について、代表点rの画素値(輝度レベル)rgとの比較処理を行い、その結果を線分判定部24に通知する。
【0076】
順次供給されてくる入力画素データDgとそのアドレスADが探索領域ARs内であるか否かは、アドレスADを探索領域ARsとしてのアドレスと比較することで行う。
探索領域ARsは、図9で説明したように前フレームの代表点rを中心とする注目領域ARaと同一のアドレス範囲である。例えば図9では簡略化のために代表点rの画素アドレスを中心として7×7画素の例を示したが、例えば実際には代表点rとしての画素を中心として水平・垂直方向に(±32画素)×(±32画素)などとされる。従ってこの場合、比較判定部22は、代表点rの画素アドレスrADを中心とした水平65画素×垂直65画素の範囲を、探索領域ARsとして決定することができる。
これにより入力画素データDgと共に入力されてくるアドレスADが、この探索領域ARsの範囲内のアドレスであるか否かを判別することができる。
【0077】
入力画素データDgが探索領域ARs内のデータであった場合は、その入力画素データDgと代表点rの画素値rgの比較処理を行う。具体的には輝度レベルとしての画素差分値を算出する。そして算出された画素差分値の絶対値が閾値th未満であるか否かを判定する。
閾値th未満であった場合は、その入力画素データDgは代表点rの画素に対応する候補点e(図9(d)参照)とする。その場合、線分判定部24に対して計測フラグのオンを指示する。
【0078】
線分判定部24は、計測レジスタ、アドレスレジスタ、最大線分レジスタ、中点座標レジスタ、としての記憶領域を備え、また所定の演算処理を行う機能を有する。
計測レジスタは、計測フラグとして1ビットの情報が保持できればよい。
アドレスレジスタは、線分の始点アドレスを記憶するもので、1つのアドレスADの記憶に必要なビット数であればよい。
最大線分レジスタは、最大長の候補線分eLの長さを記憶するレジスタであり、線分長に必要なビット数の記憶領域でよい。線分長は単に画素数やアドレス長の情報でもよい。なお最大の候補線分の始点アドレスと終点アドレスを、線分長の意味で記憶しても良い。
中点座標レジスタは、線分の中点座標を記憶する。座標値を記憶できる記憶領域でよい。
【0079】
この線分判定部24は、比較判定部12からフラグオンの指示があった場合は、計測フラグをオンとする。またその際には、その時点で供給されているアドレスADを、線分の先頭アドレスとしてアドレスレジスタに記憶する。
また、候補線分eLとされた線分のサイズ(線分長)の演算を行い、その値が最大であれば、最大線分レジスタに記憶する。
また最大線分レジスタに記憶された候補線分eLについて中点座標を計算し、中点座標レジスタに記憶する。
【0080】
詳しい説明は図11において述べるが、この線分判定部24からは、探索領域ARs内の全画素データDgについて比較判定部22及び線分判定部24の処理が終えた時点で、最大の候補線分eLについての中点c(中点座標)が中点座標レジスタに記憶されている。
動きベクトル計算部25は、線分判定部24におけて算出された中点cと、代表点rの画素アドレスrADに基づいて、動きベクトルVを計算する。つまり図9(f)で説明したように代表点rの画素アドレスrADの座標値を始点とし、重心点wの座標値を終点とする動きベクトルVが計算される。
算出された動きベクトルVの値、つまりベクトルの方向及び長さを示す値は、動きベクトルメモリ17に保持され、動きベクトルVを用いて処理を行う所定の処理系に供給される。
【0081】
また、現在の入力画素データDgのフレームの次のフレームに対しては、今回のフレーム内で代表点rが決められる。代表点rは中点cを基準にして設定される。例えば中点cに相当する画素位置、例えば図9(f)の例では画素位置ey1又はey2どちらかが、次の代表点rとされる。
線分判定部24はこのように、算出した中点cに基づいて次の代表点rとしての画素アドレスrAD’を設定し、スイッチSW4を介してフレームメモリ2Aに供給する。フレームメモリ2Aでは、画素アドレスrAD’としての画素に関する付加情報として、代表点rとしての情報が記憶される。
【0082】
そして次のフレームの入力画素データDgが入力されるフレーム期間に至ると、各スイッチSW1〜SW4はt2端子に切り替えられる。
従って、各入力画素データDgは、今度はフレームメモリ2Bに記憶されていく。
このフレーム期間においては、フレームメモリ2Aから代表点rとしての情報が読み出され、代表点情報保持部21に保持される。
そして上記同様に、判定部20内の処理で中点検出方式での動きベクトルVの検出が行われる。
また、そのフレーム期間において中点cが計算されたら、線分判定部24ではそれに基づいて次の代表点rの画素アドレスが設定される。その場合は、次の代表点rとしての画素アドレスrAD’は、スイッチSW4を介してフレームメモリ2Bに供給され、画素アドレスrAD’としての画素に関する付加情報として、代表点rとしての情報が記憶される。
【0083】
以降、同様に、入力画素データDgがフレームメモリ2Aに記憶されていくと共に、判定部20で、フレームメモリ2Bからの代表点rの情報を用いて、今回のフレームについて動きベクトルVが計算される処理と、入力画素データDgがフレームメモリ2Bに記憶されていくと共に、判定部20で、フレームメモリ2Aからの代表点rの情報を用いて、今回のフレームについて動きベクトルVが計算される処理とが、交互に行われていく。
【0084】
図11に判定部20の処理をフローチャートで示す。なお、このフローチャートは説明上の都合により、1フレーム期間内の処理として示している。つまり、各フレームにおける画素データDgが入力されてくる期間毎に、図11の処理が行われる。
【0085】
まずステップF201として代表点情報が設定される。上述したように、代表点情報は前フレーム上で設定された代表点rとしての画素値rg及びアドレスrADであり、フレームメモリ(2B又は2A)から読み込まれて代表点情報保持部21にセットされる。
なお、代表点rの画素は、前フレームにおける中点cに基づいて設定されるとしたが、動きベクトル検出を行おうとするときの、一番最初のフレームでは、当然ながら動きベクトル検出は行われず、従って一番最初のフレーム上では任意に注目領域ARa及びその中心画素としての代表点rが設定されるものとなる。
【0086】
ステップF202として入力画素データDgが比較判定部22に入力される毎に、ステップF203以降の処理が行われる。
まずステップF203では、比較判定部22は、入力された画素データDgについてのアドレスADを参照し、その入力画素データDgが探索領域ARs内であるか否かを判断する。探索領域ARs内でなければ、ステップF202に戻って次の入力画素データDgを待機する。
【0087】
探索領域ARs内としての画素データDgが入力された場合、比較判定部22の処理としてステップF204で画素差分計算が行われる。つまり当該入力画素データDgの画素値と、代表点rの画素値の差分絶対値が求められる。
そしてステップF205では、画素差分絶対値と閾値thが比較され、画素差分絶対値が閾値th未満であればステップF207に進む。
そして線分判定部24における計測フラグがオンとされているか否かを判別し、オフであったらステップF208で計測フラグをオンとさせる。
線分判定部24は、計測フラグレジスタにおいて計測フラグをオンとするとともに、ステップF209では現在のアドレスADを線分の始点アドレスとしてアドレスレジスタに記憶する。そしてステップF210に進む。
なお、ステップF207の時点で、既に計測フラグがオンとされている場合は、ステップF208,F209の処理を行わずにステップF210に進む。
【0088】
ステップF210では、線分判定部24は候補線分eLとしての線分長を算出する。即ち、現在の画素データDgについてのアドレスADを線分終点とし、アドレスレジスタに記憶してあるアドレスを線分始点として、線分終点から線分始点を減算することで線分長を求める。
そしてステップF211では、算出した線分長が、その時点で最大線分レジスタに記憶されている線分長以上であるか否かを判断する。
【0089】
算出した線分長が、その時点での最大線分レジスタに記憶されている線分長以上であった場合は、ステップF212に進んで最大線分レジスタの値を今回算出した値に更新する。
そしてステップF213で、最大線分レジスタに記憶した線分の中点座標を、その線分始点アドレスと線分終点アドレスから計算し、ステップF214で中点座標レジスタの値を、計算した値に更新する。そしてステップF215に進む。
【0090】
上記ステップF205で、画素差分絶対値と閾値thの比較結果として、画素差分絶対値が閾値th以上である場合、つまり今回入力された画素データDgが候補点eとはならない場合は、ステップF206で計測フラグのリセット処理を行ったうえでステップF215に進む。
また上記ステップF211で、算出された線分長が、最大線分レジスタに記憶されている線分長より短い場合は、最大線分レジスタや中点座標レジスタの更新を行わずにステップF215に進む。
【0091】
これら各場合においてステップF215に進んだときは、現在の処理対象となった画素データDgが、探索領域ARs内の最後の画素であるか否かを判別する。即ち、探索領域ARs内の全ての画素についてステップF204以降の処理を終えたか否かを判別する。まだ終えていなければ、ステップF202に戻って次の画素データ入力に備える。そして画素データDgが入力されたら、同様に探索領域ARsであるか否かを判断し、探索領域ARs内であればステップF204以降の処理を行う。
【0092】
そして今回のフレーム内で、少なくとも探索領域ARs内の全ての画素データDgについてステップF204以降の処理を行ったら、処理はステップF215からF216に進む。
この時点で、上記ステップF204〜F214で説明した処理により、線分判定部24の中点座標レジスタには、最大長の候補線分eLについての中点座標が記憶されているものとなる。
【0093】
上記ステップF204〜F214の処理の様子を図12に模式的に示す。
図12は、図9(d)のように候補点eが検出される場合を、拡大して示している。○及び●はフレーム内の画素(入力画素データDg)を示し、破線の範囲内が探索領域ARs内である。●で示す画素g1〜g14は図9(d)で候補点eとして示した画素としている。
【0094】
例えば走査kの水平期間において画素データg1が入力された際に、この画素は最初の候補点eとして検出されるが、このとき計測フラグがオンとされ、また画素データg1のアドレスADが線分始点としてアドレスレジスタに記憶される。
このとき、検出される線分長は、線分始点=線分終点となるため画素数でいえば「1」である。それ以前に候補線分eLは検出されていないため、線分長「1」が最大線分となって最大線分レジスタに記憶される。また中点座標が記憶される。
【0095】
次に、候補点eとなる画素データg2が入力された際には、計測フラグは既にオンであるため線分始点としてアドレスレジスタは更新されない。このとき、検出される線分長は、線分始点が画素データg1のアドレス、線分終点が画素データg2のアドレスとなるため、画素数でいえば「2」である。その時点で最大線分レジスタの値は「1」であり、今回はそれを越えるため最大線分レジスタの値は線分長「2」に更新される。また中点座標レジスタの値が画素g1,g2による線分の中点座標に更新される。
画素データg2の次の画素データが入力された際に、候補点eとはならなかったとすると、その際に計測フラグはリセットされる。
【0096】
その後、画素データDgの入力が進み、例えば走査k+1の水平期間において画素データg3が入力された際に、この画素が候補点eとして検出されたとすると、このとき計測フラグがオンとされ、また画素データg3のアドレスが線分始点としてアドレスレジスタに記憶される。
このとき、検出される線分長は、線分始点=線分終点となるため画素数でいえば「1」である。その時点の最大線分レジスタの値は「2」であるため、最大線分レジスタ及び中点座標レジスタは更新されない。
【0097】
次にも候補点eとなる画素データg4が入力された際には、計測フラグは既にオンであるため線分始点としてアドレスレジスタは更新されない。このとき、検出される線分長は、線分始点が画素データg3のアドレス、線分終点が画素データg4のアドレスとなるため、画素数でいえば「2」である。その時点で最大線分レジスタの値は「2」であり、今回は最大線分レジスタの値以上となるため最大線分レジスタの値は、画素g3,g4による候補線分eLの線分長「2」に更新され、また中点座標レジスタの値が画素g3,g4による線分の中点座標に更新される。
次の画素データg5の入力の際も、またさらに次の画素データg6の入力の際も、同様に線分長が最大値を更新していくため、最大線分レジスタ及び中点座標レジスタの値が更新されていく。画素データg6の入力後の時点で、最大線分レジスタの値は「4」となり、中点座標レジスタの値は画素g3,g4,g5,g6の線分の中点座標とされることになる。
画素データg6の次の画素データが入力された際に、これが候補点eとはならなかったとすると、その際に計測フラグはリセットされる。
【0098】
この図12の例の場合は、以降においては、候補点eとなる画素データ(g7〜g14)がそれぞれ入力される時点でも、算出される線分長が「4」以上となることはない。従って処理が図11のステップF212〜F214に進むことはなく、探索領域ARs内の全画素についてステップF204以降の処理を終えた時点では、結果的に、最大線分レジスタの値は「4」とされており、中点座標レジスタの値は画素g3,g4,g5,g6の線分の中点座標が保持されていることになる。
つまり、図11のステップF215で、探索領域ARs内の全画素について処理を終えた時点では、図9(e)(f)に示した候補線分eL2の中点cの座標が中点座標レジスタに保持されていることになる。
【0099】
図11のステップF216に進んだら、線分判定部24は、算出した最大の候補線分eLの中点c、つまり中点座標レジスタの値に基づいて、次のフレームのための、現フレーム上での代表点rを設定する。即ち上述したように、代表点rの画素アドレスrAD’を設定して、現フレームの画素データDgを記憶しているフレームメモリ(2A又は2B)に記憶させる。
【0100】
ステップF217では、代表点rの画素アドレスrADの座標値と、最大の候補線分eLの中点c、つまり中点座標レジスタの値を用いて、動きベクトル計算部25で動きベクトルVが算出される。そしてステップF218で、算出された動きベクトルVが動きベクトルメモリ17に記憶され、所要の回路系によって参照される状態となる。
【0101】
この図11の処理が各フレーム期間毎に実行され、各フレーム期間毎に動きベクトルVが検出される。
つまり本例の線分検出による動きベクトル検出は、過去フレームにおける代表点rに対してこの代表点の画素値に近い画素を候補点eとして検出し、その検出された候補点eが走査方向に連続する候補線分eLのうちで最大長の候補線分eLの中点cを検出する。そして代表点rを始点とし、中点cを終点として動きベクトルを検出する。
そしてこの線分検出方式によれば、フレーム間の単なる点マッチングではなく、最大の候補線分eLの中点として、物理的な意味のあるベクトル終点を検出するものであるため、精度の高い動きベクトルを検出できる。
また、線分中点を検出することは、画像の不安定なエッヂ部分やノイズによる影響を受けにくいものともなり、その意味でも精度向上が実現される。
また、中点に基づいて、次のフレームに対する代表点を設定することで、代表点として物理的意味が与えられ、動きベクトル検出の精度を上げることができる。
【0102】
また線分判定部24は、候補点eが走査方向に連続する候補線分eLとして、最大長となる候補線分を判定し、記憶しておけばよいため、必要な記憶容量が少なく、ハードウエア規模の小型化に好適である。
即ちハードウエア規模、特に処理に必要な記憶領域は従来の代表点マッチング方式よりも小さくでき、その上で上記理由から単なる点同士のマッチングである代表点マッチング方式よりも高精度の検出が可能となる。
【0103】
また、線分検出方式は、上述した重心検出方式よりもハードウアの軽減を意図したものとも言える。
重心検出方式の場合は、探索領域ARs内の全ての画素について差分絶対値を計算しそれが決められた閾値よりも大きいか小さいかを判断した後でないと重心wの決定ができない。つまり重心wを決定するまで探索領域ARs内のデータ、もしくは候補点eとなりうるか否かというフラグ情報を保持しておく必要がある(図3のフラグメモリ)。
一方、線分検出方式においては、求める候補線分eLの中点を決定するまでにおいて探索領域ARs内の全ての画素データDgのアドレスもしくは候補点であるか否かといった情報を持ち続ける必要がない。
即ち上記図12を用いて説明したように、最大線分が検出される毎に中点座標が更新されていくような処理形態をとることで、過去の走査に係る候補点eや候補線分eLの情報は、より長い候補線分が検出された時点で破棄される。また、最大線分を越えなかった候補点eや候補線分eLの情報は記憶されない。従って、中点座標の検出までに必要な記憶領域は、非常に少なくて済み、それによってハードウアの軽減が可能になるものである。
【0104】
2−3 線分検出にかかる第2の装置構成例及び処理
続いて同じく線分検出方式での第2の装置構成例を説明する。
上記図10の例は、線分検出方式での基本的な構成として、代表点rを1つ設定し、代表点rを含む注目領域ARaに対応する探索領域ARs内で画素比較判定を行うものとした。
この線分検出方式においても実際上の適用例としては、代表点rを1つとする場合だけでなく、1フレーム内に複数の代表点rを設定し、各代表点rを含む注目領域ARaに対応して、各探索領域ARs内で画素比較判定を行って動きベクトル検出を行うことも考えられる。
【0105】
即ち上述した重心検出方式において図6(a)(b)で説明したように、フレームF#1内に4つの代表点r1〜r4(注目領域ARa1〜ARa4)を設定し、これに対応して4つの探索領域ARs1〜ARs4を設定するような場合である。例えばこのように4つの代表点r1〜r4を設定する場合の構成例を図13に示す。なお、図10と同一部分には同一符号を付し、説明を省略する。
図13において、構成上、上記図10と異なる点は、判定部20A〜20Dとして、判定部20が4つ(代表点の設定数と同数)設けられること、及び判定部選択部4が設けられることである。
【0106】
判定部20A〜20Dは、それぞれ図3の判定部20と同一の構成を有している。つまり、それぞれが代表点情報保持部21,比較判定部22、閾値保持部23、線分判定部24、動きベクトル計算部25、動きベクトルメモリ26を有する。
そして例えば判定部20Aは図6(b)の探索領域ARs1を担当し、判定部20Bは探索領域ARs2を担当し、判定部20Cは探索領域ARs3を担当し、判定部20Dは探索領域ARs4を担当する。従って、各探索領域ARs1〜ARs4毎に動きベクトルVが検出されることになる。
【0107】
各判定部20A〜20Dが、それぞれソフトウエア、ハードウエアのいずれでも実現できることは同様である。
また各判定部20A〜20Dは、それぞれ独立の回路系(演算処理系)として設けられても良いが、例えばDSP、CPUなどの1つの演算処理デバイスにより、ここでいう複数の判定部20A〜20Dを実現することも可能である。
【0108】
判定部選択部4には、各判定部20A〜20Dがそれぞれ設定する探索領域ARs1〜ARs4の情報(アドレス範囲)がセットされる。そして、判定部選択部4は、入力画素データDgと同期して発生されるアドレスADについて、探索領域ARs1〜ARs4のうちのどれかに含まれるアドレスであるかを判別し、或る探索領域ARs内のアドレスと判断された場合は、現在入力されている画素データDgについて、その探索領域ARsを担当する判定部(20A〜20Dの内の1つ)において処理させる制御を行う。
【0109】
このような構成例の場合の1フレーム期間毎の処理を図14に示す。なお、図11と同一の処理については同一のステップ番号を付している。
この図14の処理は、各判定部20A〜20Dがそれぞれ実行する。
【0110】
各判定部20A〜20Dは、それぞれステップF201Aで前フレーム上での担当する代表点rについて代表点情報を設定する。即ち各判定部20A〜20Dはそれぞれ、代表点rとしての画素値rg及びアドレスrADを、フレームメモリ(2B又は2A)から読み込んで代表点情報保持部21にセットする。
従って例えば、判定部20Aの代表点情報保持部21には、図6(a)の代表点r1の情報が、判定部20Bの代表点情報保持部21には、代表点r2の情報が、判定部20Cの代表点情報保持部21には、代表点r3の情報が、判定部20Dの代表点情報保持部21には代表点r4の情報が、それぞれセットされる。またこのとき、各判定部20A〜20Dはそれぞれ、代表点r1〜r4に応じて設定される探索領域ARs1〜ARs4の情報を、判定部選択部4に通知する。
【0111】
各判定部20A〜20Dは、それぞれステップF202として入力画素データDgが比較判定部22に入力されると、ステップF203Aで、その際に判定部選択部4によって選択されたか否かを確認する。
【0112】
判定部選択部4は、入力画素データDgのアドレスADに基づいて判定部20A〜20Dの1つを選択(処理実行指示)する(又はいずれも選択しない)。
つまり、例えば入力画素データDgのアドレスADが探索領域ARs1内であった場合は、その入力画素データDgに対応して判定部20Aを選択する。
同様に、入力画素データDgのアドレスADが探索領域ARs2内であった場合は、その入力画素データDgに対応して判定部20Bを選択する。
入力画素データDgのアドレスADが探索領域ARs3内であった場合は、その入力画素データDgに対応して判定部20Cを選択する。
入力画素データDgのアドレスADが探索領域ARs4内であった場合は、その入力画素データDgに対応して判定部20Dを選択する。
また、入力画素データDgのアドレスADが探索領域ARs1〜ARs4のいずれにも相当しなかった場合は、その入力画素データDgに対応しては、判定部20A〜20Dのどれも選択しない。
【0113】
つまり、各判定部20A〜20Dでは、それぞれステップF203Aで、判定部選択部4によって選択されているか否かにより、その際に入力された画素データDgについて処理を行うか否かを決定する。
選択されていなければ、ステップF202に戻って次の入力画素データDgを待機する。
判定部選択部4によって選択されていれば、当該入力画素データDgについて比較判定部22と線分判定部24によりステップF204以降の処理、つまり画素差分の算出と閾値tHとの比較による計測フラグ制御、最大線分判定及び中点計算を行うことになる。
このステップF204以降の処理は、図11と同様であるため重複説明を避けるが、結果として、各判定部20A〜20Dでは、それぞれが担当する探索領域ARs1〜ARs4において最大の候補線分eLの中点cを求める。その後ステップF216〜F218の処理で、代表点rの座標から中点cの座標としての動きベクトルVを検出することになる。
【0114】
このようにすることで、1画面上で、その画像内容の各部の動きベクトルVを検出することができ、これによって多様且つ利用範囲の広い動きベクトル検出が可能となる。
なお、図13では判定部選択部4を備える構成としたが、各判定部20A〜20D内に、それぞれ入力画素データDgについて担当する探索領域ARs内であるか否かを判別する機能を備えるようにしてもよい。
また、この例では代表点r、探索領域ARsを4つとしたが、これらを2つ、3つ、或いは5以上とする例も当然考えられ、そのためには判定部20が代表点の数に応じて構成されればよい。
【0115】
3.代表点設定方式例
上述してきた重心検出方式、線分検出方式では、代表点rは、直前のフレームの候補領域eAの重心w、もしくは直前のフレームの候補線分eLの中点cに基づいて設定されるものとした。しかしながら動きベクトル検出を開始する際の最初のフレームにおいては、直前のフレームが存在しないため、代表点rを任意に設定するものとした。
例えばフレーム画面上で注目領域ARaを設定し、その中心画素を代表点rとする。これを代表点rの第1の代表点設定方法とする。
【0116】
このような第1の代表点設定方法は、設定処理が簡単であるという利点がある一方、代表点rは単に注目領域ARsの中心であるというだけであるため、選ばれた代表点rに物理的な意味に乏しく、引き続き決定される動きベクトルの精度が低くなってしまう懸念がないこともない。
そこで、最初の代表点rの設定を、次の第2,第3の設定方法のように行うことも考えられる。
【0117】
第2の代表点設定方法としては、例えば注目領域ARa内で最も広い平坦部の重心を代表点とする。
これは、上記「重心検出」の考え方を適用するもので、つまり、注目領域ARsにおいて画素値が似ている画素群を検出し、その画素群の重心を代表点とする。画素値の似ている画素群が複数ある場合は、最大面積の画素群を選択して、その重心点を代表点rとすればよい。
例えば上記重心検出方式の場合にこれを適用すれば、最初から重心点から重心点への動きベクトル検出ができる。また、最初の代表点が「重心点」として意味のあるものとすることで、3フレーム目以降も、最初の「重心点」の位置変化を追っていくことになる。これらのことから、動きベクトル検出の検出精度を向上させることができる。
【0118】
第3の代表点設定方法としては、注目領域ARa内を水平方向に切り分け、各水平部分において最も長く連続する平坦部を検出し、全ての水平部分の中で最も長く連続する線分の中点を代表点とする。
これは上記「線分検出」の考え方を適用するもので、つまり、注目領域ARにおいて、水平方向(走査線方向)に見て画素差分が小さい画素の並び(線分)を検出し、その中で最も長い線分の中点を代表点rとする。
例えば上記線分検出方式の場合にこれを適用すれば、最初から、中点から中点への動きベクトル検出ができる。また、最初の代表点が「最大線分の中点」として意味のあるものとすることで、3フレーム目以降も、最初の「最大線分の中点」の位置変化を追っていくことになる。これらのことから、動きベクトル検出の検出精度を向上させることができる。
なお、走査線方向に線分長を検査することは、ハードウエア負担が小さいことは先に述べた通りである。
【0119】
4.動きベクトル検出情報の用途
以上、本発明の実施の形態の動きベクトル検出について述べてきたが、ここでは、上記のようにして得られた動きベクトル検出結果を使用する用途、アプリケーションの例を示しておく。
例えば以下の用途が考えられる。もちろん例示する以外にも用途はある。
【0120】
・データ圧縮
動きベクトル先の画像信号を参照して最適な圧縮を行う。
・オブジェクトの追跡/トラッキング
例えばビデオカメラにおいて被写体の動きを検出し、自動追尾処理を行う。
・オブジェクトのトラッキング
例えば画像処理等のために画像データ内の特定対象をトラッキングする。
・監視カメラ
監視用カメラにおいて動きのある被写体を追尾する。
・動き物体抽出
カメラ撮影や画像処理のために動きのある物体の画像を抽出する。
・テロップ抽出
画像上に付加されたテロップを抽出する。
・手振れ補正
ビデオカメラにおける手ブレ補正
・フレーム倍速
フレーム数を倍にする
・スローモーション画像生成
フレーム間に新しいフレームを作る
・I/P(インターレース/プログレッシブ)変換
・ノイズ低減
動き成分とノイズ成分を分離する
・高画質化
・動きボケ補正
移動物体の動きボケを補正する
・画素ずらしサンプリング
オブジェクトが動くことで新しい情報が得られる
・カメラ動きの検出
・車載カメラにおける速度検出
・動き予測
・2−3pull−down検出
【0121】
5.プログラム及び記録媒体
本発明のプログラムは、上述した重心検出方式又は線分検出方式による動きベクトル検出処理を演算装置、例えばCPUやDSPによって実現させるプログラムである。
即ち、ビデオカメラ、画像処理装置、パーソナルコンピュータなどにおいて、上述した判定部1の動作を、CPU等によって実現するために、上記図4、図8、図11、図14で説明した処理を実行させるプログラムが本発明のプログラムである。
【0122】
さらに、そのような本発明のプログラムが記録された本発明のプログラム記録媒体によれば、プログラムの提供が容易となり、本発明を広く提供できる。例えばビデオカメラ、画像処理装置の設計に好適となったり、汎用のコンピュータ装置により本発明を実施できる。
【0123】
本発明のプログラムは、機器に内蔵されている記録媒体としてのHDD(ハードディスクドライブ)や、ROM等に予め記録しておくことができる。
あるいはまた、フレキシブルディスク、CD−ROM(Compact Disc Read Only Memory)、MO(Magnet optical)ディスク、DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリなどのリムーバブル記録媒体に、一時的あるいは永続的に格納(記録)しておくことができる。このようなリムーバブル記録媒体は、いわゆるパッケージソフトウェアとして提供することができる。
また本発明のプログラムは、リムーバブル記録媒体からインストールする他、ダウンロードサイトから、LAN(Local Area Network)、インターネットなどのネットワークを介してダウンロードすることもできる。
【0124】
【発明の効果】
以上の説明から理解されるように、本発明では「重心検出」及び「線分検出」として、比較的小規模のハードウエアで精度の良い動きベクトル検出が可能となるという効果がある。
重心検出は、過去フレームにおける代表点に対してこの代表点の画素値に近い画素を候補点として検出し、その検出された候補点が空間的に連続する候補領域の重心点を検出する。そして代表点を始点とし、重心点を終点として動きベクトルを検出する。
線分検出は、過去フレームにおける代表点に対してこの代表点の画素値に近い画素を候補点として検出し、候補点が走査方向(水平方向)に最も長く連続した候補線分の中点を検出する。そして代表点を始点とし、中点を終点として動きベクトルを検出する。
【0125】
いずれの場合も、フレーム間の単なる点マッチングではなく、候補領域の重心点、或いは候補線分の中点として、物理的な意味のあるベクトル終点を検出するものであるため、精度の高い動きベクトルを検出できる。
また、重心点又は線分中点を検出することは、画像の不安定なエッヂ部分やノイズによる影響を受けにくいものともなり、その意味でも精度向上が実現される。
ハードウエア規模は従来の代表点マッチング方式とほぼ同等でよく、ブロックマッチング法の場合に比べて小規模化が実現される。もちろん上記理由から単なる点同士のマッチングである代表点マッチング方式よりも高精度の検出が可能となる。
【0126】
また重心検出の場合、重心算出手段(重心算出ステップ)は、候補領域が複数存在する場合は、最大の候補領域を選択して、選択した候補領域について重心点を算出することで、より正確なベクトル検出が可能となる。
線分検出の場合、線分判定手段は、候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定し、記憶しておけばよいため、必要な記憶容量が少なく、ハードウエア規模の小型化に好適である。
また、重心検出の場合の重心点、或いは線分検出の場合の中点に基づいて、次のフレームに対する代表点を設定することで、代表点として物理的意味が与えられ、動きベクトル検出の精度を上げることができる。
【0127】
また動画映像データの過去フレーム内での複数の代表点を設定し、上記各代表点を用いて動きベクトルを検出するためには、重心検出の場合は比較判定手段、記憶手段、重心算出手段、及びベクトル検出手段を、線分検出の場合は比較判定手段、線分判定手段、中点算出手段、及びベクトル検出手段を、複数の代表点のそれぞれに対応するように設ければよく、これによって多様且つ利用範囲の広い動きベクトル検出が可能となる。
【0128】
また本発明のプログラムによれば、上記効果を奏する動きベクトル検出方法、動きベクトル検出装置を実現でき、本発明の記録媒体によれば、上記の効果を実現する動きベクトル検出装置の実現及びプログラムの広範な提供に適している。
【図面の簡単な説明】
【図1】本発明の実施の形態の重心検出による動きベクトル検出の説明図である。
【図2】実施の形態の重心検出による動きベクトル検出の説明図である。
【図3】実施の形態の重心検出にかかる第1の装置構成例のブロック図である。
【図4】実施の形態の重心検出による動きベクトル検出処理のフローチャートである。
【図5】実施の形態の重心検出動作の説明図である。
【図6】実施の形態の複数の代表点を設定する場合の説明図である。
【図7】実施の形態の重心検出にかかる第2の装置構成例のブロック図である。
【図8】実施の形態の重心検出による動きベクトル検出処理のフローチャートである。
【図9】本発明の実施の形態の線分検出による動きベクトル検出の説明図である。
【図10】実施の形態の線分検出にかかる第1の装置構成例のブロック図である。
【図11】実施の形態の線分検出による動きベクトル検出処理のフローチャートである。
【図12】実施の形態の線分判定処理の説明図である。
【図13】実施の形態の線分検出にかかる第2の装置構成例のブロック図である。
【図14】実施の形態の線分検出による動きベクトル検出処理のフローチャートである。
【図15】従来の代表点マッチング方法の説明図である。
【符号の説明】
1,1A〜1D,20,20A〜20D 判定部、2A,2B フレームメモリ、3 アドレス生成部、4 判定部選択部、11,21 代表点情報保持部、12,22 比較判定部、13,23 閾値保持部、14 フラグメモリ、15重心計算部、16,25 動きベクトル計算部、17,26 動きベクトルメモリ、24 線分判定部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a motion vector detection apparatus, a motion vector detection method, a program for executing a motion vector detection method for detecting a motion vector in a moving image, and a recording medium on which the program is recorded.
[0002]
[Prior art]
Various methods for detecting video motion vectors have been proposed as processing for moving image data, and are used for, for example, subject tracking and camera shake correction in a video camera.
For example, a block matching method, a gradient method, a representative point matching method, and the like are known. The following are mentioned as prior art documents.
[0003]
[Patent Document 1]
JP-A-5-30495
[Patent Document 2]
JP-A-8-237536
[Patent Document 3]
JP-A-6-86149
[0004]
In the block matching method, a representative block is set in the past frame. For example, a representative block is set as an n × n pixel range in the horizontal and vertical directions. Then, in the next frame (current frame), a pixel range corresponding to the representative block is searched, and the direction and distance from the representative block position to the corresponding block in the horizontal / vertical space is used as a motion vector.
In this case, for example, based on the total pixel value of the representative block, an n × n block having substantially the same pixel value total is determined as a corresponding block.
[0005]
The gradient method discriminates corresponding points in the past frame and the current frame using the luminance gradient of the pixel data, and detects a motion vector. For example, Patent Document 1 discloses a motion vector detection device using a gradient method.
[0006]
The representative point matching method is described in, for example, the above Patent Documents 2 and 3.
This representative point matching method will be described with reference to FIG. FIGS. 15A and 15B show a past frame F # 1 and a current frame F # 2 as temporally continuous frames.
As shown in FIGS. 15A and 15B, the attention area ARa is set in the past frame F # 1, and the search area ARs is set in the current frame F # 2. The attention area ARa and the search area ARs have the same size and position.
A pixel at the center of the attention area ARa is set as a representative point r. The relationship between the attention area ARa and the representative point r is enlarged and shown in FIG.
[0007]
After the representative point r is determined in this way, the absolute difference value between the luminance values of all the pixels in the search area ARs and the pixel of the representative point r is calculated in the current frame F # 2. A pixel that gives the smallest difference absolute value among the difference absolute values is set as a candidate point e in the search area ARs.
If the number of candidate points e is one, a vector having the candidate point e as the end point and the representative point r as the start point is set as a motion vector to be obtained. However, in reality, the number of candidate points e is not necessarily one. For example, FIG. 15D shows a case where three candidate points e1, e2, e3 are detected. In such a case, the candidate point closest to the center of the search area ARs (= the position corresponding to the representative point r) is generally used as the end point of the vector. Accordingly, in the case of FIG. 15D, the candidate point e2 is adopted as shown in FIG. 15E, and the motion vector V is obtained with the candidate point e2 as the end point as shown in the figure.
[0008]
[Problems to be solved by the invention]
Each of the above methods has the following problems.
First, in the case of the block matching method, the accuracy of motion vector detection is high, but the corresponding position must be detected in units of blocks, so there is a large amount of calculation processing and the amount of data to be stored. Becomes larger.
Further, it is disadvantageous when there is an enlargement or reduction of the image or a rotational movement. Furthermore, there is a high possibility that a wrong vector is detected when a block extends over a plurality of objects in the image, for example, when a block extends over the background and the object.
[0009]
In the gradient method, the detection error increases where the pixel value changes rapidly. Also, it is easily affected by the value of the luminance gradient due to the noise component.
Furthermore, it is difficult to detect large movements, and hardware attempts to detect large movements. D It is known that a larger scale is required.
[0010]
In the case of the representative point matching method, the hardware is compared with the block matching method. D Although there is an advantage that the scale of the configuration can be reduced, the physical meaning is poor if only the candidate point corresponding to the representative point is the pixel having the smallest pixel difference. In particular, in a portion where the pixel value is flat as the image content, many candidate points are detected, and it is difficult to determine which pixel is the end point of the vector. As described above, for example, a candidate point closest to the representative point is set as a vector end point, but this does not have a clear physical meaning.
In general, the pixel value greatly fluctuates due to a subtle difference in sampling position at a sharp edge of an image. For this reason, matching based on pixel differences tends to cause detection errors.
[0011]
That is, in the conventional motion vector detection method, it is necessary to increase the hardware scale in order to increase the detection accuracy, and conversely, it is necessary to sacrifice the detection accuracy in order to reduce the hardware scale.
[0012]
[Means for Solving the Problems]
Therefore, the present invention provides hardware. D The purpose is to realize accurate motion vector detection without increasing the scale of a.
[0017]
The present invention The motion vector detection device of the present invention compares the representative point setting means for setting a certain pixel in the past frame of the moving image data as a representative point, the pixel data value of the current frame and the pixel data value of the representative point, Comparison determination means for determining pixel data as a candidate point whose correspondence with the representative point is estimated based on the comparison result, and a candidate line segment having the maximum length as a candidate line segment in which the candidate point continues in the scanning direction A line segment determining unit for determining the midpoint of the candidate line segment determined as the maximum line segment by the line segment determining unit, the representative point as a start point, and the midpoint as an end point Vector detecting means for detecting a motion vector.
[0018]
The motion vector detection method of the present invention compares a representative point setting step of setting a certain pixel in a past frame of moving image data as a representative point, a pixel data value of the current frame, and a pixel data value of the representative point. Then, a comparison determination step for determining pixel data as a candidate point whose correspondence with the representative point is estimated based on the comparison result, and the candidate point has a maximum length as a candidate line segment continuous in the scanning direction. A line segment determining step for determining a candidate line segment; a midpoint calculating step for calculating the midpoint of the candidate line segment determined as the maximum line segment in the line segment determining step; and the midpoint as the starting point. And a vector detection step of detecting a motion vector with ending point as an end point.
[0019]
In these apparatuses and methods, the comparison / determination means (comparison / determination step) uses a predetermined pixel range centered on the pixel position corresponding to the representative point in the current frame as a search area, and each pixel in the search area. The data is compared with the pixel data value of the representative point.
The representative point setting means (representative point setting step) sets the pixel of the current frame corresponding to the midpoint calculated by the midpoint calculation means as the representative point for the next frame.
In the motion vector detection device, the comparison determination unit and the line segment determination unit are used to set a plurality of representative points in the past frame of the video image data and detect a motion vector using the representative points. The midpoint calculation means and the vector detection means are provided so as to correspond to each of the plurality of representative points.
[0020]
The program of the present invention is a program for causing the motion vector detection method to be executed by an arithmetic device, and the recording medium of the present invention is a recording medium recording such a program.
[0021]
In the present invention as described above, “center-of-gravity detection” and “line segment detection” are two new algorithms that can perform detection with high accuracy with a small scale of hardware compared to the conventional method as motion vector detection. It is to provide.
“Center-of-gravity detection” detects a pixel close to the pixel value of the representative point as a candidate point with respect to the representative point in the past frame, and detects the center-of-gravity point of the candidate region where the detected candidate points are spatially continuous. . The motion vector is detected with the representative point as the starting point and the center of gravity as the ending point. In this case, the hardware scale is larger than that of “line segment detection”, but highly accurate motion vector detection is possible.
“Line segment detection” detects pixels close to the pixel value of the representative point as a candidate point with respect to the representative point in the past frame, and the candidate point is the longest continuous candidate line segment in the scanning direction (horizontal direction). Detect points. A motion vector is detected with the representative point as the start point and the midpoint as the end point. In this case, the detection accuracy is slightly reduced in “center of gravity detection”, but the hardware scale can be reduced.
[0022]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, as an embodiment of the present invention, motion vector detection as centroid detection and line segment detection will be described. The description will be given in the following order.
1. Motion vector detection by center of gravity detection
1-1 Motion vector detection method by center of gravity detection
1-2 First apparatus configuration example and process for center of gravity detection
1-3 Second Device Configuration Example and Processing Related to Center of Gravity Detection
2. Motion vector detection by line segment detection
2-1 Motion vector detection method by line segment detection
2-2 First apparatus configuration example and processing for line segment detection
2-3 Second apparatus configuration example and processing according to line segment detection
3. Typical point setting method example
4). Use of motion vector detection information
5. Program and recording medium
[0023]
1. Motion vector detection by center of gravity detection
1-1 Motion vector detection method by center of gravity detection
The motion vector detection method based on the center of gravity detection will be described with reference to FIGS.
FIGS. 1A and 1B show a past frame F # 1 and a current frame F # 2 as temporally continuous frames.
As shown in FIGS. 1A and 1B, the attention area ARa is set in the past frame F # 1, and the search area ARs is set in the current frame F # 2. The attention area ARa and the search area ARs have the same size and position.
A pixel at the center of the attention area ARa is set as a representative point r. The relationship between the attention area ARa and the representative point r is enlarged and shown in FIG. ○ indicates a pixel, and among these, the pixel designated as the representative point r is indicated by ●.
Here, as an illustrative example, an area of 7 pixels × 7 pixels in the horizontal / vertical direction is used as the attention area ARa, but in this case, the search area ARs is also an area of 7 pixels × 7 pixels. However, in reality, the attention area ARa and the search area ARs are not necessarily 7 pixels × 7 pixels, and actually, for example, in the horizontal and vertical directions centered on the pixel as the representative point r (± 32). Pixel) × (± 32 pixels).
[0024]
There are various methods for setting the representative point r, which will be described later. Here, the description will be continued assuming that the central pixel of an arbitrary attention area ARa is the first representative point r.
[0025]
After the representative point r is determined in this way, the absolute difference value between the luminance values of all the pixels in the search area ARs and the pixel of the representative point r is calculated in the current frame F # 2. If the obtained difference absolute value is smaller than a certain threshold value, a comparison determination process using the pixel as a candidate point e is performed.
FIG. 1D shows the result of examining the candidate point e by comparing and determining the value of the representative point r for all the pixels in the search area ARs. Here, it is assumed that the candidate point e is detected as shown by the pixel of ●.
[0026]
Here, a region where the candidate points r are spatially (horizontal / vertical) continuous is defined as a candidate region eA. When the candidate point e is detected as shown in FIG. 1D, two candidate areas eA1 and eA2 exist in the search area ARs as shown in FIG.
Thus, when a plurality of candidate areas eA are recognized, the largest candidate area is selected. In the case of FIG. 2A, the candidate area eA1 is selected. If there is one candidate area eA, the candidate area is naturally selected.
Then, the center of gravity point is obtained for the selected candidate area eA1. FIG. 2B shows the center of gravity w.
When the center of gravity point w is obtained, the center of gravity point w is set as the end point of the motion vector. That is, the motion vector to be obtained is a vector having the representative point r as the start point and the center of gravity point w as the end point. As shown in an enlarged view in FIG. 2C, when the pixel position corresponding to the representative point r is ex, the vector of the pixel position ex → centroid point w becomes the motion vector V.
[0027]
The motion vector detection by the center of gravity detection according to the present embodiment is performed by setting the center of gravity in the candidate area eA as the vector end point as described above.
Note that, during a period in which pixel data of a frame F # 3 (not shown) following the frame F # 2 of FIG. 1 is input, the frame F # 2 is a past frame. In that case, the representative point r is set based on the obtained center-of-gravity point w, for example. For example, as the pixel closest to the barycentric point w, the pixel position ey of FIG.
In the frame F # 3, the same position as the attention area ARa is set as the search area ARs, and motion vector detection is performed in the same manner as described above.
[0028]
1-2 First apparatus configuration example and process for center of gravity detection
FIG. 3 shows the configuration of a motion vector detection apparatus that uses the centroid detection method described with reference to FIGS.
As shown in FIG. 3, the motion vector detection device includes a determination unit 1, frame memories 2A and 2B, an address generation unit, and switches SW1 to SW4.
[0029]
The frame memories 2A and 2B are memories that store pixel data Dg forming each frame of the moving image, and are used alternately for each frame. For example, even-numbered frames are stored in the frame memory 2A, and odd-numbered frames are stored in the frame memory 2B.
In the switches SW1 to SW4, for example, the t1 terminal is selected as shown in the figure when the even-numbered frame memory 2A is input as the input pixel data Dg. In the next frame period, switching is performed in units of frame periods such that the t2 terminal is connected.
[0030]
In the frame period in which the switches SW1 to SW4 are connected to the t1 terminal, the input pixel data Dg is supplied to the frame memory 2A via the switch SW1. At this time, the address AD is generated by the address generator 3 based on the clock CK. In other words, the pixel address is a row / column value indicating the pixel position in the horizontal and vertical directions.
This address AD is supplied to the frame memory 2A as an address corresponding to the input pixel data Dg via the switch SW2. The frame memory 2A stores input pixel data Dg based on the address AD.
[0031]
Further, the input pixel data Dg and the address AD are also input to the determination unit 1. The determination unit 1 performs the above-described center-of-gravity detection process on the input pixel data Dg constituting the frame, and detects a motion vector based on the representative point of the previous frame.
[0032]
The determination unit 1 includes a representative point information holding unit 11, a comparison determination unit 12, a threshold holding unit 13, a flag memory 14, a centroid calculation unit 15, a motion vector calculation unit 16, and a motion vector memory 17 as illustrated.
These units can be realized by either software or hardware. For example, when it is configured by hardware, a representative point information holding unit 11, a threshold holding unit 13, a flag memory 14, a register and a memory as a motion vector memory 17 are provided, and a comparison determination unit 12, a centroid calculation unit 15, a motion vector calculation An arithmetic circuit as the unit 16 may be formed.
Further, the determination unit 1 is constituted by an arithmetic processing device such as a DSP or a CPU, and the representative point information holding unit 11, the threshold holding unit 13, the flag memory 14, and the motion vector memory 17 are realized as an internal RAM or a register. The calculation functions as the comparison determination unit 12, the centroid calculation unit 15, and the motion vector calculation unit 16 may be realized by mounting.
[0033]
The representative point information holding unit 11 holds the pixel value and address of the representative point r as information on the representative point r set in the frame before the current input pixel data Dg frame. In the frame period in which the input pixel data Dg is stored in the frame memory 2A as described above, each pixel data of the previous frame is stored in the frame memory 2B. That is, the pixel data as the representative point r is stored in the frame memory 2B. Therefore, the pixel value and address as information of the representative point r are taken from the frame memory 2B via the switch SW3 and held in the representative point information holding unit 11.
The threshold holding unit 13 holds a threshold th as a pixel difference value. The threshold th is preset.
[0034]
The comparison determination unit 12 receives input pixel data Dg and an address AD. The threshold value th is supplied from the threshold value holding unit 13. Further, the pixel value rg of the representative point r and the address rAD of the representative point r are input from the representative point information holding unit 11.
The comparison / determination unit 12 determines whether or not the input pixel data Dg input is within the search area ARs shown in FIG. 1B, and the pixel value of the input pixel data Dg within the search area ARs ( (Luminance level) is compared with the pixel value (luminance level) rg of the representative point r, and determination flag control of the flag memory 14 is performed based on the result.
[0035]
Whether the sequentially supplied input pixel data Dg and its address AD are in the search area ARs is determined by comparing the address AD with the address as the search area ARs.
The search area ARs has the same address range as the attention area ARa centered on the representative point r of the previous frame as described in FIG. For example, FIG. 1 shows an example of 7 × 7 pixels centered on the pixel address of the representative point r for simplification, but actually, for example, in the horizontal and vertical directions centering on the pixel as the representative point r (± 32). Pixel) × (± 32 pixels). In this case, the comparison / determination unit 12 can determine a range of 65 horizontal pixels × 65 vertical pixels centered on the pixel address rAD of the representative point r as the search area ARs.
Thereby, it is possible to determine whether or not the address AD input together with the input pixel data Dg is an address within the range of the search area ARs.
[0036]
When the input pixel data Dg is data in the search area ARs, the input pixel data Dg is compared with the pixel value rg of the representative point r. Specifically, a pixel difference value as a luminance level is calculated. Then, it is determined whether or not the calculated absolute value of the pixel difference value is less than the threshold th.
If it is less than the threshold th, the input pixel data Dg is set as a candidate point e (see FIG. 1D) corresponding to the pixel of the representative point r. In that case, the flag memory 14 is instructed to turn on the determination flag.
[0037]
In the flag memory 14, a flag area corresponding to each pixel for one frame is secured. For example, if the number of horizontal pixels in one frame is Hn, the number of vertical pixels is Vn, and the number of pixels in one frame is Hn × Vn, the flag memory 14 has 1 bit per pixel, A flag area of (Hn × Vn) bits is secured.
When there is a flag ON instruction from the comparison / determination unit 12, a determination flag is set at the bit position corresponding to the address AD supplied at that time. Therefore, a determination flag is set on the flag memory 14 as indicated by the candidate point e in FIG.
It should be noted that for the calculation of the center of gravity described later, the address of the pixel with the flag turned on is required, and an area for storing the address AD corresponding to the flag may be secured, but the flag position itself is the address AD. , It is not necessary to store the address value itself.
[0038]
The center-of-gravity calculation unit 15 refers to the determination flag in the flag memory 14 and selects a candidate area eA (see FIG. 2A) where flag-on addresses (candidate points e) are spatially (horizontal and vertical) continuous. Determine. When there are a plurality of candidate areas eA, the largest candidate area eA is selected.
Then, as described with reference to FIG. 2B, the center of gravity point w is calculated as, for example, a coordinate value for the selected maximum candidate area eA.
[0039]
The motion vector calculation unit 16 calculates a motion vector V based on the centroid point w calculated by the centroid calculation unit 15 and the pixel address rAD of the representative point r. That is, as described with reference to FIG. 2C, the motion vector V is calculated with the coordinate value of the pixel address rAD of the representative point r as the start point and the coordinate value of the barycentric point w as the end point.
The calculated value of the motion vector V, that is, the value indicating the direction and length of the vector is held in the motion vector memory 17 and supplied to a predetermined processing system that performs processing using the motion vector V.
[0040]
For the next frame of the current input pixel data Dg, a representative point r is determined in the current frame. The representative point r is set with reference to the center of gravity point w. For example, the pixel position corresponding to the barycentric point w, for example, the pixel position ey in the example of FIG.
In this way, the centroid calculating unit 15 sets the pixel address rAD ′ as the next representative point r based on the calculated centroid point w, and supplies it to the frame memory 2A via the switch SW4. In the frame memory 2A, information as the representative point r is stored as additional information regarding the pixel as the pixel address rAD ′.
[0041]
Then, when the frame period in which the input pixel data Dg of the next frame is input, the switches SW1 to SW4 are switched to the t2 terminal.
Accordingly, each input pixel data Dg is now stored in the frame memory 2B.
In this frame period, information as the representative point r is read from the frame memory 2A and held in the representative point information holding unit 11.
Similarly to the above, the motion vector V is detected by the center-of-gravity detection method in the processing in the determination unit 1.
Further, when the barycentric point w is calculated in the frame period, the barycentric calculating unit 15 sets the pixel address of the next representative point r based on the calculated barycentric point w. In this case, the pixel address rAD ′ as the next representative point r is supplied to the frame memory 2B via the switch SW4, and information as the representative point r is stored as additional information regarding the pixel as the pixel address rAD ′. The
[0042]
Thereafter, similarly, the input pixel data Dg is stored in the frame memory 2A, and the determination unit 1 uses the information of the representative point r from the frame memory 2B to calculate the motion vector V for the current frame. The process in which the input pixel data Dg is stored in the frame memory 2B and the motion vector V is calculated for the current frame using the information on the representative point r from the frame memory 2A by the determination unit 1 alternately. It will be done.
[0043]
FIG. 4 is a flowchart showing the process of the determination unit 1. This flowchart is shown as processing within one frame period for convenience of explanation. That is, the process of FIG. 4 is performed for each period in which the pixel data Dg in each frame is input.
[0044]
First, representative point information is set as step F101. As described above, the representative point information is the pixel value rg and address rAD as the representative point r set on the previous frame, and is read from the frame memory (2B or 2A) and set in the representative point information holding unit 11. The
Note that the pixel at the representative point r is set based on the barycentric point w in the previous frame, but of course, the motion vector detection is not performed in the very first frame when the motion vector detection is performed. Therefore, the attention area ARa and the representative point r as the center pixel are arbitrarily set on the first frame.
[0045]
Every time the input pixel data Dg is input to the comparison determination unit 12 as Step F102, the processes after Step F103 are performed.
First, in step F103, the comparison determination unit 12 refers to the address AD for the input pixel data Dg, and determines whether the input pixel data Dg is within the search area ARs. If not in the search area ARs, the process returns to step F102 to wait for the next input pixel data Dg.
[0046]
When pixel data Dg within the search area ARs is input, pixel difference calculation is performed in step F104 as processing of the comparison determination unit 12. That is, the absolute difference between the pixel value of the input pixel data Dg and the pixel value of the representative point r is obtained.
In step F105, the pixel difference absolute value is compared with the threshold th. If the pixel difference absolute value is less than the threshold th, the determination flag is turned on for the pixel data Dg on the flag memory 14 in step F106. If the pixel difference absolute value is greater than or equal to the threshold th, the determination flag is not turned on.
[0047]
In step F107, it is determined whether or not the pixel data Dg subjected to the comparison determination is the last pixel in the search area ARs. That is, it is determined whether or not the processing in steps F104, F105, and F106 has been completed for all pixels in the search area ARs. If not completed, the process returns to step F102 to prepare for the next pixel data input. When the pixel data Dg is input, it is similarly determined whether or not it is the search area ARs. If it is within the search area ARs, the processes of steps F104, F105, and F106 are performed.
[0048]
If the comparison determination process is performed for at least all the pixel data Dg in the search area ARs in the current frame, the process proceeds to step F108.
At this time, the information (address) of the candidate point e in the search area ARs is held as a determination flag on the flag memory 14 as shown in FIG. 1D, for example. Therefore, in step F108, the centroid calculation unit 15 refers to the determination flag on the flag memory 14 and performs centroid calculation. That is, the largest candidate area eA is first selected, and the barycentric point w in the candidate area eA is calculated.
[0049]
The barycentric point w is calculated as follows, for example.
FIG. 5 shows the search area ARs where the candidate point e is found as a determination flag, and the x and y coordinate axes thereof are shown.
x coordinate = {Σ (x coordinate of determination flag on pixel)} / (number of flag on pixel)
y coordinate = {Σ (y coordinate of determination flag on pixel)} / (number of flag on pixel)
Calculate as The calculated x-coordinate and y-coordinate are the coordinate values of the barycentric point w.
[0050]
Next, in step F109, based on the calculated center of gravity point w, a representative point r on the current frame for the next frame is set. That is, as described above, the pixel address rAD ′ of the representative point r is set and stored in the frame memory (2A or 2B) storing the pixel data Dg of the current frame.
[0051]
In step F110, the motion vector V is calculated by the motion vector calculator 16 using the coordinate value of the pixel address rAD of the representative point r and the calculated barycentric point w. In step F111, the calculated motion vector V is stored in the motion vector memory 17 and is referred to by a required circuit system.
[0052]
The process of FIG. 4 is executed for each frame period, and the motion vector V is detected for each frame period.
That is, in the motion vector detection by the center-of-gravity detection in this example, pixels close to the representative point r in the past frame are detected as candidate points e, and the detected candidate points e are spatially continuous. The barycentric point w of the candidate area eA to be detected is detected. A motion vector is detected with the representative point r as the starting point and the center of gravity point w as the ending point.
According to this center-of-gravity detection method, it is not a simple point matching between frames, but a vector end point having a physical meaning is detected as the center-of-gravity point of the candidate area eA. Therefore, a highly accurate motion vector can be detected. .
In addition, detecting the barycentric point is less susceptible to the effects of unstable edge portions and noise in the image, and in that sense, accuracy is improved.
Furthermore, the hardware scale may be almost the same as that of the conventional representative point matching method, and the scale can be reduced as compared with the block matching method.
In other words, more accurate motion vector detection is possible with a hardware configuration similar to that of the representative point matching method.
[0053]
In addition, when there are a plurality of candidate areas eA, the centroid calculating unit 15 selects the largest candidate area eA, and calculates the centroid point w for the selected candidate area eA, thereby enabling more accurate vector detection. Become.
Also, by setting a representative point r for the next frame based on the barycentric point w, a physical meaning is given as the representative point r, and the accuracy of motion vector detection can be improved.
[0054]
1-3 Second Device Configuration Example and Processing Related to Center of Gravity Detection
Next, a second apparatus configuration example using the center of gravity detection method will be described.
In the above example, as a basic configuration in the center-of-gravity detection method, one representative point r is set, and pixel comparison determination is performed in the search area ARs corresponding to the attention area ARa including the representative point r.
As an actual application example, not only the case where the number of representative points r is one, but a plurality of representative points r are set in one frame, and each search region corresponds to the attention region ARa including each representative point r. It is also conceivable to perform pixel comparison determination within ARs to detect motion vectors by centroid detection.
[0055]
For example, FIG. 6A shows a state where four representative points r1 to r4 (attention areas ARa1 to ARa4) are set in the frame F # 1, and in this case, the search area ARs is shown in FIG. Thus, in the frame F # 2, four search areas ARs1 to ARs4 are set.
For example, FIG. 7 shows a configuration example when the four representative points r1 to r4 are set in this way. In addition, the same code | symbol is attached | subjected to FIG. 3 and an identical part, and description is abbreviate | omitted.
In FIG. 7, the difference from FIG. 3 is that the determination units 1 </ b> A to 1 </ b> D are provided with four determination units 1 (the same number as the number of representative points) and the determination unit selection unit 4. That is.
[0056]
The determination units 1A to 1D have the same configuration as the determination unit 1 in FIG. That is, each includes a representative point information holding unit 11, a comparison determination unit 12, a threshold holding unit 13, a flag memory 14, a centroid calculation unit 15, a motion vector calculation unit 16, and a motion vector memory 17.
For example, the determination unit 1A is in charge of the search region ARs1, the determination unit 1B is in charge of the search region ARs2, the determination unit 1C is in charge of the search region ARs3, and the determination unit 1D is in charge of the search region ARs4. Therefore, the motion vector V is detected for each search area ARs1 to ARs4.
[0057]
It is the same that each determination unit 1A to 1D can be realized by either software or hardware.
Each of the determination units 1A to 1D may be provided as an independent circuit system (arithmetic processing system). However, for example, a plurality of determination units 1A to 1D referred to here may be provided by one arithmetic processing device such as a DSP or a CPU. Can also be realized.
[0058]
In the case of such a configuration, information (address range) of search areas ARs1 to ARs4 set by the determination units 1A to 1D, respectively, is set in the determination unit selection unit 4. Then, the determination unit selection unit 4 determines whether the address AD generated in synchronization with the input pixel data Dg is an address included in any of the search areas ARs1 to ARs4. When it is determined that the address is in a certain search area ARs, control is performed to process the currently input pixel data Dg in a determination unit (one of 1A to 1D) in charge of the search area ARs. Do.
[0059]
FIG. 8 shows processing for each frame period in the case of such a configuration example. Note that the same processing steps as those in FIG. 4 are denoted by the same step numbers.
The processing of FIG. 8 is executed by each determination unit 1A to 1D.
[0060]
Each determination unit 1A to 1D sets the representative point information for the representative point r in charge on the previous frame in step F101A. That is, each of the determination units 1A to 1D reads the pixel value rg and the address rAD as the representative point r from the frame memory (2B or 2A) and sets them in the representative point information holding unit 11.
Therefore, for example, the representative point information holding unit 11 of the determination unit 1A determines the information of the representative point r1 in FIG. 6A, and the representative point information holding unit 11 of the determination unit 1B determines the information of the representative point r2. Information on the representative point r3 is set in the representative point information holding unit 11 of the unit 1C, and information on the representative point r4 is set in the representative point information holding unit 11 of the determination unit 1D.
At this time, each of the determination units 1A to 1D notifies the determination unit selection unit 4 of information on the search areas ARs1 to ARs4 set according to the representative points r1 to r4.
[0061]
When the input pixel data Dg is input to the comparison / determination unit 12 as step F102, each of the determination units 1A to 1D confirms whether or not the determination unit selection unit 4 has selected at that time in step F103A.
[0062]
The determination unit selection unit 4 selects (process execution instruction) one of the determination units 1A to 1D based on the address AD of the input pixel data Dg (or does not select any of them).
That is, for example, when the address AD of the input pixel data Dg is within the search area ARs1, the determination unit 1A is selected corresponding to the input pixel data Dg.
Similarly, when the address AD of the input pixel data Dg is within the search area ARs2, the determination unit 1B is selected corresponding to the input pixel data Dg.
When the address AD of the input pixel data Dg is within the search area ARs3, the determination unit 1C is selected corresponding to the input pixel data Dg.
When the address AD of the input pixel data Dg is within the search area ARs4, the determination unit 1D is selected corresponding to the input pixel data Dg.
When the address AD of the input pixel data Dg does not correspond to any of the search areas ARs1 to ARs4, none of the determination units 1A to 1D is selected corresponding to the input pixel data Dg.
[0063]
That is, in each of the determination units 1A to 1D, whether or not to process the pixel data Dg input at that time is determined depending on whether or not the determination unit selection unit 4 has selected in step F103A.
If not selected, the process returns to step F102 to wait for the next input pixel data Dg.
If it is selected by the determination unit selection unit 4, the process of steps F104 to F107 is performed on the input pixel data Dg, that is, determination flag control is performed by calculating the pixel difference and comparing the threshold value tH.
Since the processing after Step F104 is the same as that in FIG. 3, the redundant description is avoided. As a result, each of the determination units 1A to 1D obtains the candidate point e in the search areas ARs1 to ARs4 that each handles, The centroid point w is calculated from the maximum candidate area eA, and the motion vector V as the coordinate of the centroid point w is detected from the coordinates of the representative point r.
[0064]
By doing in this way, the motion vector V of each part of the image content can be detected on one screen, and this makes it possible to detect motion vectors with a wide range of usage.
In FIG. 7, the determination unit selection unit 4 is provided. However, the determination units 1 </ b> A to 1 </ b> D are each provided with a function of determining whether the input pixel data Dg is in the search area ARs. It may be.
In this example, the number of representative points r and the search areas ARs is four. However, examples of two, three, or five or more are also conceivable, and for this purpose, the determination unit 1 responds to the number of representative points. What is necessary is just to be comprised.
[0065]
2. Motion vector detection by line segment detection
2-1 Motion vector detection method by line segment detection
Next, a motion vector detection method based on line segment detection will be described with reference to FIG.
FIGS. 9A and 9B show a past frame F # 1 and a current frame F # 2 as temporally continuous frames. As in the case of the center of gravity detection, the attention area ARa is set in the past frame F # 1, and the search area ARs is set in the current frame F # 2. The attention area ARa and the search area ARs have the same size and position. A pixel at the center of the attention area ARa is set as a representative point r. The relationship between the attention area ARa and the representative point r is enlarged and shown in FIG.
[0066]
After the representative point r is determined in this way, the absolute difference value between the luminance values of all the pixels in the search area ARs and the pixel of the representative point r is calculated in the current frame F # 2. If the obtained difference absolute value is smaller than a certain threshold value, a comparison determination process using the pixel as a candidate point e is performed.
FIG. 9D shows the result of examining the candidate point e by comparing and determining the value of the representative point r for all the pixels in the search area ARs. Here, it is assumed that the candidate point e is detected as shown by the pixel of ●.
K, k + 1,... Indicate the scanning direction (horizontal direction) of pixels on the frame. Since the pixel data constituting the frame is input as stream data in the scanning direction, for example, during a certain period in the k-th scanning line period in one frame, the first pixel in the search area ARs shown in the figure. A row of pixels is input.
[0067]
The candidate point e is discriminated as shown in FIG. 9D. In this result, an area where the candidate point r is continuous in the scanning direction (horizontal direction) is set as a candidate line segment eL. When the candidate point e is detected as shown in FIG. 9D, the candidate line segment is located in the search area ARs in the portion where the candidate point e exists as seen for each scanning line as shown in FIG. 9C. eL1, eL2,... eL7 are detected.
Then, the largest (longest) candidate line segment is selected from such candidate line segments.
For example, in the case of FIG. 9E, the candidate line segment eL 2 Is selected. When there is one candidate line segment eL, the candidate line segment is naturally selected.
And the selected candidate Line segment eL2 As shown in FIG. 9F, a midpoint c is obtained. .
When the midpoint c is obtained, the midpoint c is set as the end point of the motion vector. In other words, the motion vector to be obtained is a vector having the representative point r as the start point and the midpoint c as the end point. As shown in FIG. 9 (f), when the pixel position corresponding to the representative point r is ex, the vector from the pixel position ex → the middle point c becomes the motion vector V.
[0068]
The motion vector detection by line segment detection according to the present embodiment is performed so that the midpoint in the candidate line segment eL is the vector end point as described above.
Note that, during a period in which pixel data of a frame F # 3 (not shown) following the frame F # 2 of FIG. 9 is input, the frame F # 2 is a past frame. In this case, the representative point r is set based on the obtained middle point c, for example. For example, as the pixel closest to the middle point c, one of the pixel positions ey1 and ey2 in FIG. 9F is set as the representative point r, and an n × n area around the representative point r is set as the attention area ARa.
In the frame F # 3, the same position as the attention area ARa is set as the search area ARs, and motion vector detection is performed in the same manner as described above.
[0069]
2-2 First apparatus configuration example and processing for line segment detection
FIG. 10 shows the configuration of a motion vector detection apparatus that uses the line segment detection method described in FIG.
As illustrated, the motion vector detection device includes a determination unit 20, frame memories 2A and 2B, an address generation unit, and switches SW1 to SW4.
[0070]
The frame memories 2A and 2B are memories that store pixel data Dg forming each frame of the moving image, and are used alternately for each frame. For example, even-numbered frames are stored in the frame memory 2A, and odd-numbered frames are stored in the frame memory 2B.
In the switches SW1 to SW4, for example, the t1 terminal is selected as shown in the figure when the even-numbered frame memory 2A is input as the input pixel data Dg. In the next frame period, switching is performed in units of frame periods such that the t2 terminal is connected.
[0071]
In the frame period in which the switches SW1 to SW4 are connected to the t1 terminal, the input pixel data Dg is supplied to the frame memory 2A via the switch SW1. At this time, the address AD is generated by the address generator 3 based on the clock CK. In other words, the pixel address is a row / column value indicating the pixel position in the horizontal and vertical directions.
This address AD is supplied to the frame memory 2A as an address corresponding to the input pixel data Dg via the switch SW2. The frame memory 2A stores input pixel data Dg based on the address AD.
[0072]
Further, the input pixel data Dg and the address AD are also input to the determination unit 20. The determination unit 20 performs the above-described line segment detection process on the input pixel data Dg constituting the frame, and detects a motion vector based on the representative point of the previous frame.
[0073]
The determination unit 20 includes a representative point information holding unit 21, a comparison determination unit 22, a threshold holding unit 23, a line segment determination unit 24, a motion vector calculation unit 25, and a motion vector memory 26 as illustrated.
These units can be realized by either software or hardware. For example, when it is configured by hardware, the representative point information holding unit 21, the threshold holding unit 23, a storage unit in a line segment determination unit 24 described later, and a motion vector memory 26 are provided with necessary registers and memories, and are compared and determined. An arithmetic circuit as the unit 22, the line segment determination unit 24, and the motion vector calculation unit 25 may be formed.
Further, the determination unit 20 includes an arithmetic processing device such as a DSP or a CPU, and as an internal RAM or register, a representative point information holding unit 21, a threshold holding unit 23, a storage unit in a line segment determination unit 24 described later, and a motion vector A storage area may be realized as the memory 26, and a calculation function as the comparison determination unit 22, the line segment determination unit 24, and the motion vector calculation unit 25 may be realized by software implementation.
[0074]
The representative point information holding unit 21 holds the pixel value and address of the representative point r as information of the representative point r set in the frame before the current input pixel data Dg frame. In the frame period in which the input pixel data Dg is stored in the frame memory 2A as described above, each pixel data of the previous frame is stored in the frame memory 2B. That is, the pixel data as the representative point r is stored in the frame memory 2B. Therefore, the pixel value and address as information of the representative point r are taken from the frame memory 2B via the switch SW3 and held in the representative point information holding unit 21.
The threshold holding unit 23 holds a threshold th as a pixel difference value. The threshold th is preset.
[0075]
The comparison determination unit 22 receives input pixel data Dg and an address AD. The threshold value th is supplied from the threshold value holding unit 23. Further, the pixel value rg of the representative point r and the address rAD of the representative point r are input from the representative point information holding unit 21.
The comparison determination unit 22 determines whether or not the input pixel data Dg that is input is within the search area ARs shown in FIG. 9B, and the pixel value of the input pixel data Dg within the search area ARs ( The luminance level is compared with the pixel value (luminance level) rg of the representative point r, and the result is notified to the line segment determination unit 24.
[0076]
Whether the sequentially supplied input pixel data Dg and its address AD are in the search area ARs is determined by comparing the address AD with the address as the search area ARs.
The search area ARs has the same address range as the attention area ARa centered on the representative point r of the previous frame as described with reference to FIG. For example, FIG. 9 shows an example of 7 × 7 pixels centered on the pixel address of the representative point r for simplification, but actually, for example, in the horizontal and vertical directions centering on the pixel as the representative point r (± 32). Pixel) × (± 32 pixels). Therefore, in this case, the comparison / determination unit 22 can determine a range of 65 horizontal pixels × 65 vertical pixels centered on the pixel address rAD of the representative point r as the search area ARs.
Thereby, it is possible to determine whether or not the address AD input together with the input pixel data Dg is an address within the range of the search area ARs.
[0077]
When the input pixel data Dg is data in the search area ARs, the input pixel data Dg is compared with the pixel value rg of the representative point r. Specifically, a pixel difference value as a luminance level is calculated. Then, it is determined whether or not the calculated absolute value of the pixel difference value is less than the threshold th.
If it is less than the threshold th, the input pixel data Dg is set as a candidate point e (see FIG. 9D) corresponding to the pixel of the representative point r. In that case, the line segment determination unit 24 is instructed to turn on the measurement flag.
[0078]
The line segment determination unit 24 includes a storage area as a measurement register, an address register, a maximum line segment register, and a midpoint coordinate register, and has a function of performing predetermined arithmetic processing.
The measurement register only needs to hold 1-bit information as a measurement flag.
The address register stores the start point address of the line segment, and may have any number of bits necessary for storing one address AD.
The maximum line segment register is a register that stores the length of the maximum candidate line segment eL, and may be a storage area of the number of bits necessary for the line segment length. The line segment length may simply be information on the number of pixels or the address length. Note that the start point address and end point address of the largest candidate line segment may be stored in the sense of the line segment length.
The midpoint coordinate register stores the midpoint coordinates of the line segment. A storage area that can store coordinate values may be used.
[0079]
When there is an instruction to turn on the flag from the comparison determination unit 12, the line segment determination unit 24 turns on the measurement flag. At that time, the address AD supplied at that time is stored in the address register as the start address of the line segment.
Also, the size (line segment length) of the line segment set as the candidate line segment eL is calculated, and if the value is maximum, it is stored in the maximum line segment register.
Further, the midpoint coordinates are calculated for the candidate line segment eL stored in the maximum line segment register and stored in the midpoint coordinate register.
[0080]
A detailed description will be given in FIG. 11. From this line segment determination unit 24, the maximum candidate line is obtained when the processing of the comparison determination unit 22 and the line segment determination unit 24 is completed for all pixel data Dg in the search area ARs. The midpoint c (midpoint coordinate) for the minute eL is stored in the midpoint coordinate register.
The motion vector calculation unit 25 calculates a motion vector V based on the midpoint c calculated by the line segment determination unit 24 and the pixel address rAD of the representative point r. That is, as described with reference to FIG. 9F, the motion vector V is calculated with the coordinate value of the pixel address rAD of the representative point r as the start point and the coordinate value of the barycentric point w as the end point.
The calculated value of the motion vector V, that is, the value indicating the direction and length of the vector is held in the motion vector memory 17 and supplied to a predetermined processing system that performs processing using the motion vector V.
[0081]
For the next frame of the current input pixel data Dg, a representative point r is determined in the current frame. The representative point r is set with reference to the middle point c. For example, the pixel position corresponding to the middle point c, for example, the pixel position ey1 or ey2 in the example of FIG. 9F is set as the next representative point r.
In this way, the line segment determination unit 24 sets the pixel address rAD ′ as the next representative point r based on the calculated middle point c, and supplies it to the frame memory 2A via the switch SW4. In the frame memory 2A, information as the representative point r is stored as additional information regarding the pixel as the pixel address rAD ′.
[0082]
Then, when the frame period in which the input pixel data Dg of the next frame is input, the switches SW1 to SW4 are switched to the t2 terminal.
Accordingly, each input pixel data Dg is now stored in the frame memory 2B.
In this frame period, information as the representative point r is read from the frame memory 2A and held in the representative point information holding unit 21.
In the same manner as described above, the motion vector V is detected by the midpoint detection method in the processing in the determination unit 20.
Further, when the midpoint c is calculated in the frame period, the line segment determination unit 24 sets the pixel address of the next representative point r based on it. In this case, the pixel address rAD ′ as the next representative point r is supplied to the frame memory 2B via the switch SW4, and information as the representative point r is stored as additional information regarding the pixel as the pixel address rAD ′. The
[0083]
Thereafter, similarly, the input pixel data Dg is stored in the frame memory 2A, and the motion vector V is calculated for the current frame by the determination unit 20 using information on the representative point r from the frame memory 2B. Processing, and the input pixel data Dg is stored in the frame memory 2B, and the determination unit 20 uses the information of the representative point r from the frame memory 2A to calculate the motion vector V for the current frame. Are done alternately.
[0084]
FIG. 11 is a flowchart showing the process of the determination unit 20. This flowchart is shown as processing within one frame period for convenience of explanation. That is, the process of FIG. 11 is performed for each period in which the pixel data Dg in each frame is input.
[0085]
First, representative point information is set as step F201. As described above, the representative point information is the pixel value rg and the address rAD as the representative point r set on the previous frame, and is read from the frame memory (2B or 2A) and set in the representative point information holding unit 21. The
Note that the pixel at the representative point r is set based on the midpoint c in the previous frame. However, naturally, motion vector detection is not performed in the very first frame when motion vector detection is performed. Therefore, the attention area ARa and the representative point r as the center pixel are arbitrarily set on the first frame.
[0086]
Every time the input pixel data Dg is input to the comparison determination unit 22 as Step F202, the processes after Step F203 are performed.
First, in step F203, the comparison / determination unit 22 refers to the address AD for the input pixel data Dg and determines whether the input pixel data Dg is within the search area ARs. If not in the search area ARs, the process returns to step F202 to wait for the next input pixel data Dg.
[0087]
When pixel data Dg within the search area ARs is input, pixel difference calculation is performed in step F204 as processing of the comparison determination unit 22. That is, the absolute difference between the pixel value of the input pixel data Dg and the pixel value of the representative point r is obtained.
In step F205, the pixel difference absolute value is compared with the threshold th. If the pixel difference absolute value is less than the threshold th, the process proceeds to step F207.
And it is discriminate | determined whether the measurement flag in the line segment determination part 24 is turned ON, and if it is OFF, a measurement flag will be turned ON by step F208.
The line segment determination unit 24 turns on the measurement flag in the measurement flag register and stores the current address AD in the address register as the start point address of the line segment in step F209. Then, the process proceeds to Step F210.
If the measurement flag has already been turned on at the time of step F207, the process proceeds to step F210 without performing the processes of steps F208 and F209.
[0088]
In step F210, the line segment determination unit 24 calculates the line segment length as the candidate line segment eL. That is, the line segment length is obtained by subtracting the line segment start point from the line segment end point with the address AD for the current pixel data Dg as the line segment end point, the address stored in the address register as the line segment start point.
In step F211, it is determined whether or not the calculated line segment length is equal to or greater than the line segment length stored in the maximum line segment register at that time.
[0089]
If the calculated line length is equal to or greater than the line length stored in the maximum line segment register at that time, the process proceeds to step F212, and the value of the maximum line segment register is updated to the value calculated this time.
In step F213, the midpoint coordinates of the line segment stored in the maximum line segment register are calculated from the line segment start point address and line segment end point address. In step F214, the value of the midpoint coordinate register is updated to the calculated value. To do. Then, the process proceeds to Step F215.
[0090]
If the pixel difference absolute value is greater than or equal to the threshold th as a comparison result between the pixel difference absolute value and the threshold th in step F205, that is, if the pixel data Dg input this time does not become the candidate point e, the process proceeds to step F206. After resetting the measurement flag, the process proceeds to step F215.
If the line length calculated in step F211 is shorter than the line length stored in the maximum line segment register, the process proceeds to step F215 without updating the maximum line segment register or the midpoint coordinate register. .
[0091]
In each of these cases, when the process proceeds to Step F215, it is determined whether or not the pixel data Dg that is the current processing target is the last pixel in the search area ARs. That is, it is determined whether or not the processing after Step F204 has been completed for all the pixels in the search area ARs. If not completed, the process returns to step F202 to prepare for the next pixel data input. Then, when the pixel data Dg is input, it is similarly determined whether or not it is the search area ARs, and if it is within the search area ARs, the processing after step F204 is performed.
[0092]
Then, when the processing after step F204 is performed on all the pixel data Dg in at least the search area ARs in the current frame, the processing proceeds from step F215 to F216.
At this point, the midpoint coordinates for the maximum length candidate line segment eL are stored in the midpoint coordinate register of the line segment determination unit 24 by the processing described in steps F204 to F214.
[0093]
FIG. 12 schematically shows the processing in steps F204 to F214.
FIG. 12 shows an enlarged view of the case where the candidate point e is detected as shown in FIG. ○ and ● indicate pixels in the frame (input pixel data Dg), and the area within the broken line is the search area ARs. The pixels g1 to g14 indicated by ● are the pixels indicated as the candidate point e in FIG.
[0094]
For example, when pixel data g1 is input in the horizontal period of scan k, this pixel is detected as the first candidate point e. At this time, the measurement flag is turned on, and the address AD of the pixel data g1 is changed to a line segment. Stored in the address register as the starting point.
At this time, the detected line segment length is “1” in terms of the number of pixels since the line segment start point = the line segment end point. Since the candidate line segment eL has not been detected before that, the line segment length “1” becomes the maximum line segment and is stored in the maximum line segment register. The midpoint coordinates are also stored.
[0095]
Next, when the pixel data g2 to be the candidate point e is input, the measurement flag is already on, so the address register is not updated as the line segment start point. At this time, the detected line segment length is “2” in terms of the number of pixels because the line segment start point is the address of the pixel data g1 and the line segment end point is the address of the pixel data g2. At that time, the value of the maximum line segment register is “1”, and since this value is exceeded this time, the value of the maximum line segment register is updated to the line segment length “2”. Further, the value of the midpoint coordinate register is updated to the midpoint coordinates of the line segment by the pixels g1 and g2.
If the next pixel data of the pixel data g2 is input and it does not become the candidate point e, the measurement flag is reset at that time.
[0096]
Thereafter, the input of the pixel data Dg proceeds. For example, when the pixel data g3 is input in the horizontal period of the scan k + 1, and this pixel is detected as the candidate point e, the measurement flag is turned on at this time. The address of the data g3 is stored in the address register as the line segment start point.
At this time, the detected line segment length is “1” in terms of the number of pixels since the line segment start point = the line segment end point. Since the value of the maximum line segment register at that time is “2”, the maximum line segment register and the midpoint coordinate register are not updated.
[0097]
Next, when the pixel data g4 as the candidate point e is input, the measurement register is already on, so the address register is not updated as the line segment start point. At this time, the detected line segment length is “2” in terms of the number of pixels because the line segment start point is the address of the pixel data g3 and the line segment end point is the address of the pixel data g4. At that time, the value of the maximum line segment register is “2”, and this time is equal to or greater than the value of the maximum line segment register, so the value of the maximum line segment register is the line segment length “L” of the candidate line segment eL by the pixels g3 and g4. 2 ", and the value of the midpoint coordinate register is updated to the midpoint coordinates of the line segment of the pixels g3 and g4.
Similarly, when the next pixel data g5 is input and when the next pixel data g6 is input, the maximum value of the line segment is updated, so the values of the maximum line segment register and the midpoint coordinate register are updated. Will be updated. At the time after the pixel data g6 is input, the value of the maximum line segment register is “4”, and the value of the midpoint coordinate register is the midpoint coordinates of the line segments of the pixels g3, g4, g5, and g6. .
If the next pixel data of the pixel data g6 is input and this does not become the candidate point e, the measurement flag is reset at that time.
[0098]
In the case of the example in FIG. 12, thereafter, the calculated line segment length does not become “4” or more even when the pixel data (g7 to g14) as the candidate point e are input. Therefore, the process does not proceed to steps F212 to F214 in FIG. 11, and when the processes after step F204 are completed for all the pixels in the search area ARs, the value of the maximum line segment register is “4” as a result. Thus, the midpoint coordinate register value holds the midpoint coordinates of the line segments of the pixels g3, g4, g5, and g6.
That is, at the time when the processing is completed for all the pixels in the search area ARs in step F215 in FIG. 11, the coordinates of the midpoint c of the candidate line segment eL2 shown in FIGS. Will be held in.
[0099]
When the process proceeds to step F216 in FIG. 11, the line segment determination unit 24 determines the top point of the current frame for the next frame based on the midpoint c of the calculated maximum candidate line segment eL, that is, the value of the midpoint coordinate register. A representative point r at is set. That is, as described above, the pixel address rAD ′ of the representative point r is set and stored in the frame memory (2A or 2B) storing the pixel data Dg of the current frame.
[0100]
In step F217, the motion vector calculation unit 25 calculates the motion vector V using the coordinate value of the pixel address rAD of the representative point r and the midpoint c of the largest candidate line segment eL, that is, the value of the midpoint coordinate register. The In step F218, the calculated motion vector V is stored in the motion vector memory 17 and is referred to by a required circuit system.
[0101]
The process of FIG. 11 is executed for each frame period, and the motion vector V is detected for each frame period.
That is, in the motion vector detection by the line segment detection in this example, a pixel close to the pixel value of the representative point with respect to the representative point r in the past frame is detected as the candidate point e, and the detected candidate point e is detected in the scanning direction. Among the continuous candidate line segments eL, the middle point c of the maximum length candidate line segment eL is detected. Then, the motion vector is detected with the representative point r as the start point and the midpoint c as the end point.
According to this line segment detection method, since the end point of a physically meaningful vector is detected as the midpoint of the largest candidate line segment eL, not just point matching between frames, a highly accurate motion A vector can be detected.
In addition, detecting the midpoint of the line segment is also less susceptible to the effects of unstable edge portions and noise in the image, and in that sense, accuracy is improved.
Also, by setting a representative point for the next frame based on the midpoint, a physical meaning is given as the representative point, and the accuracy of motion vector detection can be improved.
[0102]
The line segment determination unit 24 determines and stores the candidate line segment having the maximum length as the candidate line segment eL in which the candidate points e are continuous in the scanning direction. It is suitable for downsizing of the wear scale.
In other words, the hardware scale, especially the storage area required for processing, can be made smaller than the conventional representative point matching method, and for that reason, more accurate detection is possible than the representative point matching method, which is a simple point-to-point matching method. Become.
[0103]
Also, the line segment detection method is more hardware than the center of gravity detection method described above. D It can be said that it was intended to reduce a.
In the case of the centroid detection method, the centroid w cannot be determined unless the absolute difference value is calculated for all the pixels in the search area ARs and it is determined whether the difference is larger or smaller than the determined threshold value. That is, it is necessary to hold flag information indicating whether or not it can be a candidate point e or data in the search area ARs until the center of gravity w is determined (flag memory in FIG. 3).
On the other hand, in the line segment detection method, it is not necessary to keep information such as the addresses or candidate points of all the pixel data Dg in the search area ARs until the midpoint of the candidate line segment eL to be obtained is determined. .
That is, as described with reference to FIG. 12 above, by adopting a processing form in which the midpoint coordinates are updated each time the maximum line segment is detected, the candidate point e and the candidate line segment related to the past scan are obtained. The eL information is discarded when a longer candidate line segment is detected. Further, information on the candidate point e and the candidate line segment eL that did not exceed the maximum line segment is not stored. Therefore, very little storage space is required to detect the midpoint coordinates, thereby reducing hardware. D It is possible to reduce a.
[0104]
2-3 Second apparatus configuration example and processing according to line segment detection
Next, a second apparatus configuration example using the line segment detection method will be described.
In the example of FIG. 10, as a basic configuration in the line segment detection method, one representative point r is set, and pixel comparison determination is performed in the search area ARs corresponding to the attention area ARa including the representative point r. It was.
Also in this line segment detection method, as a practical application example, not only the case where there is one representative point r, but a plurality of representative points r are set in one frame, and the attention area ARa including each representative point r is set. Correspondingly, it is also conceivable to perform motion vector detection by performing pixel comparison determination within each search area ARs.
[0105]
That is, in the above-described center-of-gravity detection method, as described with reference to FIGS. 6A and 6B, four representative points r1 to r4 (attention areas ARa1 to ARa4) are set in the frame F # 1, and correspondingly, This is a case where four search areas ARs1 to ARs4 are set. For example, FIG. 13 shows a configuration example in which four representative points r1 to r4 are set in this way. In addition, the same code | symbol is attached | subjected to the same part as FIG. 10, and description is abbreviate | omitted.
In FIG. 13, the difference from FIG. 10 in the configuration is that the determination units 20 </ b> A to 20 </ b> D are provided with four determination units 20 (the same number as the set number of representative points) and the determination unit selection unit 4. That is.
[0106]
The determination units 20A to 20D have the same configuration as the determination unit 20 of FIG. That is, each includes a representative point information holding unit 21, a comparison determination unit 22, a threshold holding unit 23, a line segment determination unit 24, a motion vector calculation unit 25, and a motion vector memory 26.
For example, the determination unit 20A is in charge of the search area ARs1 in FIG. 6B, the determination unit 20B is in charge of the search area ARs2, the determination unit 20C is in charge of the search area ARs3, and the determination unit 20D is in charge of the search area ARs4. To do. Therefore, the motion vector V is detected for each search area ARs1 to ARs4.
[0107]
It is the same that each determination unit 20A to 20D can be realized by either software or hardware.
Each of the determination units 20A to 20D may be provided as an independent circuit system (arithmetic processing system). However, for example, a plurality of determination units 20A to 20D referred to here may be performed by one arithmetic processing device such as a DSP or a CPU. Can also be realized.
[0108]
Information (address range) of search areas ARs1 to ARs4 set by the determination units 20A to 20D, respectively, is set in the determination unit selection unit 4. Then, the determination unit selection unit 4 determines whether the address AD generated in synchronization with the input pixel data Dg is an address included in any of the search areas ARs1 to ARs4, and certain search areas ARs If it is determined that the address is the internal address, control is performed for the currently input pixel data Dg to be processed in the determination unit (one of 20A to 20D) in charge of the search area ARs.
[0109]
FIG. 14 shows processing for each frame period in the case of such a configuration example. Note that the same steps as those in FIG. 11 are denoted by the same step numbers.
The process of FIG. 14 is executed by each determination unit 20A to 20D.
[0110]
Each determination unit 20A to 20D sets representative point information for the representative point r in charge on the previous frame in step F201A. That is, each of the determination units 20A to 20D reads the pixel value rg and the address rAD as the representative point r from the frame memory (2B or 2A) and sets them in the representative point information holding unit 21.
Therefore, for example, the representative point information holding unit 21 of the determination unit 20A has information on the representative point r1 in FIG. 6A, and the representative point information holding unit 21 of the determination unit 20B has information on the representative point r2. Information on the representative point r3 is set in the representative point information holding unit 21 of the unit 20C, and information on the representative point r4 is set in the representative point information holding unit 21 of the determination unit 20D. At this time, each of the determination units 20A to 20D notifies the determination unit selection unit 4 of information on the search areas ARs1 to ARs4 set according to the representative points r1 to r4.
[0111]
When the input pixel data Dg is input to the comparison determination unit 22 as Step F202, each determination unit 20A to 20D confirms whether or not the determination unit selection unit 4 has selected at that time in Step F203A.
[0112]
The determination unit selection unit 4 selects (process execution instruction) one of the determination units 20A to 20D based on the address AD of the input pixel data Dg (or does not select any of them).
That is, for example, when the address AD of the input pixel data Dg is within the search area ARs1, the determination unit 20A is selected corresponding to the input pixel data Dg.
Similarly, when the address AD of the input pixel data Dg is within the search area ARs2, the determination unit 20B is selected corresponding to the input pixel data Dg.
When the address AD of the input pixel data Dg is within the search area ARs3, the determination unit 20C is selected corresponding to the input pixel data Dg.
When the address AD of the input pixel data Dg is within the search area ARs4, the determination unit 20D is selected corresponding to the input pixel data Dg.
When the address AD of the input pixel data Dg does not correspond to any of the search areas ARs1 to ARs4, none of the determination units 20A to 20D is selected corresponding to the input pixel data Dg.
[0113]
That is, in each of the determination units 20A to 20D, whether or not to process the pixel data Dg input at that time is determined depending on whether or not the determination unit selection unit 4 has selected in step F203A.
If not selected, the process returns to step F202 to wait for the next input pixel data Dg.
If it is selected by the determination unit selection unit 4, measurement flag control is performed on the input pixel data Dg by the comparison determination unit 22 and the line segment determination unit 24 after step F 204, that is, calculation of the pixel difference and comparison with the threshold value tH. The maximum line segment determination and midpoint calculation are performed.
Since the processing subsequent to step F204 is the same as that in FIG. 11, redundant description is avoided, but as a result, each of the determination units 20A to 20D includes the largest candidate line segment eL in the search areas ARs1 to ARs4 each responsible. Find the point c. Thereafter, in the processing of steps F216 to F218, the motion vector V as the coordinate of the midpoint c is detected from the coordinate of the representative point r.
[0114]
By doing in this way, the motion vector V of each part of the image content can be detected on one screen, and this makes it possible to detect motion vectors with a wide range of usage.
In addition, although it was set as the structure provided with the determination part selection part 4 in FIG. 13, it is provided with the function to discriminate | determine whether each determination part 20A-20D is in the search area | region ARs in charge about each input pixel data Dg. It may be.
In this example, the representative points r and the search areas ARs are set to four. However, an example in which these are set to two, three, or five or more is also conceivable. For this purpose, the determination unit 20 responds to the number of representative points. What is necessary is just to be comprised.
[0115]
3. Typical point setting method example
In the center-of-gravity detection method and line segment detection method described above, the representative point r is set based on the center of gravity w of the candidate area eA of the immediately preceding frame or the midpoint c of the candidate line segment eL of the immediately preceding frame. did. However, since the immediately preceding frame does not exist in the first frame when the motion vector detection is started, the representative point r is arbitrarily set.
For example, the attention area ARa is set on the frame screen, and the central pixel is set as the representative point r. This is the first representative point setting method for the representative point r.
[0116]
Such a first representative point setting method has an advantage that the setting process is simple, while the representative point r is simply the center of the attention area ARs. The meaning of the motion vector is poor, and there is no fear that the accuracy of the motion vector to be determined will be lowered.
Therefore, it is conceivable to set the first representative point r as in the following second and third setting methods.
[0117]
As the second representative point setting method, for example, the center of gravity of the widest flat portion in the attention area ARa is used as the representative point.
This applies the above-described concept of “centroid detection”, that is, a pixel group having similar pixel values in the attention area ARs is detected, and the center of gravity of the pixel group is used as a representative point. When there are a plurality of pixel groups having similar pixel values, the pixel group having the largest area may be selected and the center of gravity point may be set as the representative point r.
For example, if this is applied to the above-described center-of-gravity detection method, motion vectors from the center of gravity to the center of gravity can be detected from the beginning. Further, assuming that the first representative point is meaningful as the “centroid point”, the position change of the first “centroid point” is also followed from the third frame. From these things, the detection accuracy of motion vector detection can be improved.
[0118]
As a third representative point setting method, the inside of the attention area ARa is cut in the horizontal direction, the longest continuous flat part is detected in each horizontal part, and the middle point of the longest continuous line segment in all the horizontal parts Is the representative point.
This applies the above-mentioned concept of “line segment detection”, that is, an arrangement (line segment) of pixels having a small pixel difference as viewed in the horizontal direction (scan line direction) in the attention area AR is detected. The middle point of the longest line segment is designated as the representative point r.
For example, if this is applied to the above-described line segment detection method, the motion vector from the middle point to the middle point can be detected from the beginning. In addition, assuming that the first representative point is meaningful as the “midpoint of the maximum line segment”, the position change of the first “midpoint of the maximum line segment” will be followed after the third frame. . From these things, the detection accuracy of motion vector detection can be improved.
Inspecting the line length in the scanning line direction is Hardware As mentioned earlier, the burden is small.
[0119]
4). Use of motion vector detection information
The motion vector detection according to the embodiment of the present invention has been described above. Here, examples of applications and applications using the motion vector detection result obtained as described above are shown.
For example, the following uses can be considered. Of course, there are uses other than those illustrated.
[0120]
・ Data compression
Optimal compression is performed with reference to the image signal ahead of the motion vector.
・ Object tracking / tracking
For example, the motion of a subject is detected in a video camera, and automatic tracking processing is performed.
Object tracking
For example, a specific target in image data is tracked for image processing or the like.
·Surveillance camera
Track a moving subject in the surveillance camera.
・ Moving object extraction
Extract images of moving objects for camera photography and image processing.
・ Telop extraction
Extract the telop added on the image.
・ Image stabilization
Image stabilization in video cameras
・ Frame double speed
Double the number of frames
・ Slow motion image generation
Create a new frame between frames
・ I / P (interlace / progressive) conversion
・ Noise reduction
Separate motion and noise components
・ High image quality
・ Motion blur correction
Correcting motion blur of moving objects
・ Pixel shift sampling
New information can be obtained by moving objects
・ Camera movement detection
・ Speed detection for in-vehicle cameras
・ Motion prediction
・ 2-3 pull-down detection
[0121]
5. Program and recording medium
The program of the present invention is a program that realizes the motion vector detection processing by the above-described center-of-gravity detection method or line segment detection method by an arithmetic device such as a CPU or DSP.
That is, in the video camera, the image processing apparatus, the personal computer, etc., the processing described in FIGS. 4, 8, 11, and 14 is executed in order to realize the operation of the determination unit 1 by the CPU or the like. The program is the program of the present invention.
[0122]
Furthermore, according to the program recording medium of the present invention on which such a program of the present invention is recorded, the provision of the program becomes easy, and the present invention can be widely provided. For example, it is suitable for designing a video camera and an image processing apparatus, and the present invention can be implemented by a general-purpose computer apparatus.
[0123]
The program of the present invention can be recorded in advance in an HDD (Hard Disk Drive), a ROM, or the like as a recording medium built in the device.
Alternatively, temporarily or permanently stored in a removable recording medium such as a flexible disk, CD-ROM (Compact Disc Read Only Memory), MO (Magnet optical) disk, DVD (Digital Versatile Disc), magnetic disk, semiconductor memory, etc. (Record). Such a removable recording medium can be provided as so-called package software.
In addition to being installed from a removable recording medium, the program of the present invention can also be downloaded from a download site via a network such as a LAN (Local Area Network) or the Internet.
[0124]
【The invention's effect】
As can be understood from the above description, the present invention has an effect that the motion vector detection can be performed with high accuracy by relatively small scale hardware as “center of gravity detection” and “line segment detection”.
In the centroid detection, pixels close to the pixel value of the representative point with respect to the representative point in the past frame are detected as candidate points, and the centroid point of a candidate region in which the detected candidate points are spatially continuous is detected. A motion vector is detected with the representative point as the starting point and the center of gravity as the ending point.
In line segment detection, pixels that are close to the pixel value of the representative point with respect to the representative point in the past frame are detected as candidate points, and the midpoint of the candidate line segment that has been longest in the scanning direction (horizontal direction) To detect. A motion vector is detected with the representative point as the start point and the midpoint as the end point.
[0125]
In either case, it is not a simple point matching between frames, but a physical meaningful vector end point is detected as the center of gravity of the candidate area or the midpoint of the candidate line segment, so a highly accurate motion vector Can be detected.
In addition, detecting the center of gravity or the midpoint of the line segment is also less susceptible to the effects of unstable edge portions and noise in the image, and in that sense, accuracy can be improved.
The hardware scale may be almost the same as that of the conventional representative point matching method, and the scale can be reduced as compared with the block matching method. Of course, detection with higher accuracy than the representative point matching method, which is simple point-to-point matching, is possible.
[0126]
In the case of centroid detection, the centroid calculation means (centroid calculation step), when there are a plurality of candidate areas, selects the largest candidate area and calculates the centroid point for the selected candidate area. Vector detection is possible.
In the case of line segment detection, the line segment determination means needs to determine and store the candidate line segment having the maximum length as a candidate line segment in which candidate points are continuous in the scanning direction. It is suitable for downsizing the hardware scale.
Also, by setting the representative point for the next frame based on the center of gravity point in the case of center of gravity detection or the midpoint in the case of line segment detection, physical meaning is given as the representative point, and the accuracy of motion vector detection Can be raised.
[0127]
In addition, in order to set a plurality of representative points in the past frame of the moving image data and to detect a motion vector using each of the representative points, in the case of centroid detection, comparison determination means, storage means, centroid calculation means, In the case of line segment detection, the comparison determination unit, the line segment determination unit, the midpoint calculation unit, and the vector detection unit may be provided so as to correspond to each of the plurality of representative points. It is possible to detect motion vectors with a wide range of usage.
[0128]
According to the program of the present invention, a motion vector detection method and a motion vector detection device that achieve the above effects can be realized. According to the recording medium of the present invention, a motion vector detection device that realizes the above effects and a program Suitable for a wide range of offerings.
[Brief description of the drawings]
FIG. 1 is an explanatory diagram of motion vector detection by gravity center detection according to an embodiment of the present invention.
FIG. 2 is an explanatory diagram of motion vector detection by gravity center detection according to the embodiment.
FIG. 3 is a block diagram of a first apparatus configuration example according to the center of gravity detection of the embodiment.
FIG. 4 is a flowchart of motion vector detection processing based on gravity center detection according to the embodiment.
FIG. 5 is an explanatory diagram of a gravity center detection operation according to the embodiment.
FIG. 6 is an explanatory diagram for setting a plurality of representative points according to the embodiment.
FIG. 7 is a block diagram of a second apparatus configuration example according to the center of gravity detection of the embodiment.
FIG. 8 is a flowchart of motion vector detection processing based on gravity center detection according to the embodiment.
FIG. 9 is an explanatory diagram of motion vector detection by line segment detection according to the embodiment of this invention.
FIG. 10 is a block diagram of a first apparatus configuration example according to line segment detection according to the embodiment;
FIG. 11 is a flowchart of motion vector detection processing by line segment detection according to the embodiment.
FIG. 12 is an explanatory diagram of line segment determination processing according to the embodiment;
FIG. 13 is a block diagram of a second apparatus configuration example according to line segment detection according to the embodiment;
FIG. 14 is a flowchart of motion vector detection processing by line segment detection according to the embodiment.
FIG. 15 is an explanatory diagram of a conventional representative point matching method.
[Explanation of symbols]
1, 1A to 1D, 20, 20A to 20D determination unit, 2A, 2B frame memory, 3 address generation unit, 4 determination unit selection unit, 11, 21 representative point information holding unit, 12, 22 comparison determination unit, 13, 23 Threshold holding unit, 14 flag memory, 15 barycenter calculation unit, 16, 25 motion vector calculation unit, 17, 26 motion vector memory, 24 line segment determination unit

Claims (7)

動画映像データの過去フレーム内の或る画素を代表点として設定する代表点設定手段と、
現在フレームの画素データ値と、上記代表点の画素データ値を比較して、比較結果に基づいて上記代表点との対応が推定される候補点としての画素データを判定する比較判定手段と、
上記候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定する線分判定手段と、
上記線分判定手段で最大線分と判定された候補線分の中点を算出する中点算出手段と、
上記代表点を始点とし、上記中点を終点として動きベクトルを検出するベクトル検出手段と、
を備え動きベクトル検出装置。
Representative point setting means for setting a certain pixel in a past frame of moving image data as a representative point;
A comparison determination unit that compares the pixel data value of the current frame with the pixel data value of the representative point, and determines pixel data as a candidate point whose correspondence with the representative point is estimated based on the comparison result;
As a candidate line segment in which the candidate points are continuous in the scanning direction, a line segment determining unit that determines a candidate line segment having the maximum length;
Midpoint calculating means for calculating the midpoint of the candidate line segment determined as the maximum line segment by the line segment determining means;
A vector detection means for detecting a motion vector with the representative point as a start point and the midpoint as an end point;
A motion vector detection device comprising:
上記比較判定手段は、現在フレーム内で、上記代表点に相当する画素位置を中心とした所定画素範囲を探索領域とし、該探索領域内の各画素データについて、上記代表点の画素データ値との比較を行請求項に記載の動きベクトル検出装置。The comparison / determination means uses a predetermined pixel range centered on the pixel position corresponding to the representative point in the current frame as a search area, and for each pixel data in the search area, the pixel data value of the representative point It intends rows comparison motion vector detection device according to claim 1. 上記代表点設定手段は、上記中点算出手段で算出された中点に対応する現在フレームの画素を、次のフレームに対する代表点とす請求項に記載の動きベクトル検出装置。The representative point setting means, the pixels of the current frame corresponding to the middle point calculated in the mid-point calculating means, a motion vector detection device according to claim 1 shall be the representative point for the next frame. 動画映像データの過去フレーム内での複数の代表点を設定し、上記各代表点を用いて動きベクトルを検出するために、
上記比較判定手段、上記線分判定手段、上記中点算出手段、及び上記ベクトル検出手段が、上記複数の代表点のそれぞれに対応するように設けられ請求項に記載の動きベクトル検出装置。
In order to set a plurality of representative points in the past frame of the video image data and detect a motion vector using each of the representative points,
The comparison decision means, the line segment determining means, the mid-point calculating means, and the vector detecting means, a motion vector detection device according to claim 1 that is provided so as to correspond to each of the plurality of representative points.
動画映像データの過去フレーム内の或る画素を代表点として設定する代表点設定手段と、現在フレームの画素データ値と、上記代表点の画素データ値を比較して、比較結果に基づいて上記代表点との対応が推定される候補点としての画素データを判定する比較判定手段と、上記候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定する線分判定手段と、上記線分判定手段で最大線分と判定された候補線分の中点を算出する中点算出手段と、上記代表点を始点とし、上記中点を終点として動きベクトルを検出するベクトル検出手段とを備えた動きベクトル検出装置における動きベクトル検出方法において、
動画映像データの過去フレーム内の或る画素を代表点として設定する代表点設定ステップと、
現在フレームの画素データ値と、上記代表点の画素データ値を比較して、比較結果に基づいて上記代表点との対応が推定される候補点としての画素データを判定する比較判定ステップと、
上記候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定する線分判定ステップと、
上記線分判定ステップで最大線分と判定された候補線分の中点を算出する中点算出ステップと、
上記代表点を始点とし、上記中点を終点として動きベクトルを検出するベクトル検出ステップと、
実行する動きベクトル検出方法。
Representative point setting means for setting a certain pixel in a past frame of moving image data as a representative point, the pixel data value of the current frame and the pixel data value of the representative point are compared, and the representative data is based on the comparison result. Comparison determination means for determining pixel data as candidate points whose correspondence with points is estimated, and line segment determination means for determining a candidate line segment having the maximum length as a candidate line segment in which the candidate points are continuous in the scanning direction And a midpoint calculating means for calculating the midpoint of the candidate line segment determined as the maximum line segment by the line segment determining means, and vector detection for detecting a motion vector with the representative point as the start point and the midpoint as the end point A motion vector detection method in a motion vector detection device comprising:
A representative point setting step of setting a certain pixel in a past frame of the moving image data as a representative point;
A comparison determination step of comparing the pixel data value of the current frame with the pixel data value of the representative point and determining pixel data as a candidate point whose correspondence with the representative point is estimated based on the comparison result;
As a candidate line segment in which the candidate points are continuous in the scanning direction, a line segment determination step for determining a candidate line segment having the maximum length;
A midpoint calculating step of calculating a midpoint of the candidate line segment determined as the maximum line segment in the line segment determining step;
A vector detection step of detecting a motion vector with the representative point as a start point and the midpoint as an end point;
Motion vector detection method for performing
動画映像データの過去フレーム内の或る画素を代表点として設定する代表点設定手段と、現在フレームの画素データ値と、上記代表点の画素データ値を比較して、比較結果に基づいて上記代表点との対応が推定される候補点としての画素データを判定する比較判定手段と、上記候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定する線分判定手段と、上記線分判定手段で最大線分と判定された候補線分の中点を算出する中点算出手段と、上記代表点を始点とし、上記中点を終点として動きベクトルを検出するベクトル検出手段とを備えた動きベクトル検出装置において実行されるプログラムにおいて、
動画映像データの過去フレーム内の或る画素を代表点として設定する代表点設定ステップと、
現在フレームの画素データ値と、上記代表点の画素データ値を比較して、比較結果に基づいて上記代表点との対応が推定される候補点としての画素データを判定する比較判定ステップと、
上記候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定する線分判定ステップと、
上記線分判定ステップで最大線分と判定された候補線分の中点を算出する中点算出ステップと、
上記代表点を始点とし、上記中点を終点として動きベクトルを検出するベクトル検出ステップと、
実行させるプログラム。
The representative point setting means for setting a certain pixel in the past frame of the moving image data as a representative point, the pixel data value of the current frame and the pixel data value of the representative point are compared, and the representative data is based on the comparison result. Comparison determining means for determining pixel data as candidate points whose correspondence with points is estimated, and line segment determining means for determining a candidate line segment having the maximum length as a candidate line segment in which the candidate points are continuous in the scanning direction And a midpoint calculating means for calculating the midpoint of the candidate line segment determined as the maximum line segment by the line segment determining means, and vector detection for detecting a motion vector with the representative point as the start point and the midpoint as the end point In a program executed in a motion vector detection device comprising means,
A representative point setting step of setting a certain pixel in a past frame of the moving image data as a representative point;
A comparison determination step of comparing the pixel data value of the current frame with the pixel data value of the representative point and determining pixel data as a candidate point whose correspondence with the representative point is estimated based on the comparison result;
As a candidate line segment in which the candidate points are continuous in the scanning direction, a line segment determination step for determining a candidate line segment having the maximum length;
A midpoint calculating step of calculating a midpoint of the candidate line segment determined as the maximum line segment in the line segment determining step;
A vector detection step of detecting a motion vector with the representative point as a start point and the midpoint as an end point;
A program that executes
動画映像データの過去フレーム内の或る画素を代表点として設定する代表点設定手段と、現在フレームの画素データ値と、上記代表点の画素データ値を比較して、比較結果に基づいて上記代表点との対応が推定される候補点としての画素データを判定する比較判定手段と、上記候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定する線分判定手段と、上記線分判定手段で最大線分と判定された候補線分の中点を算出する中点算出手段と、上記代表点を始点とし、上記中点を終点として動きベクトルを検出するベクトル検出手段とを備えた動きベクトル検出装置において実行されるプログラムを記録した記録媒体において、
動画映像データの過去フレーム内の或る画素を代表点として設定する代表点設定ステップと、
現在フレームの画素データ値と、上記代表点の画素データ値を比較して、比較結果に基づいて上記代表点との対応が推定される候補点としての画素データを判定する比較判定ステップと、
上記候補点が走査方向に連続する候補線分として、最大長となる候補線分を判定する線分判定ステップと、
上記線分判定ステップで最大線分と判定された候補線分の中点を算出する中点算出ステップと、
上記代表点を始点とし、上記中点を終点として動きベクトルを検出するベクトル検出ステップと、
実行させるプログラムを記録した記録媒体。
The representative point setting means for setting a certain pixel in the past frame of the moving image data as a representative point, the pixel data value of the current frame and the pixel data value of the representative point are compared, and the representative data is based on the comparison result. Comparison determining means for determining pixel data as candidate points whose correspondence with points is estimated, and line segment determining means for determining a candidate line segment having the maximum length as a candidate line segment in which the candidate points are continuous in the scanning direction And a midpoint calculating means for calculating the midpoint of the candidate line segment determined as the maximum line segment by the line segment determining means, and vector detection for detecting a motion vector with the representative point as the start point and the midpoint as the end point In a recording medium recording a program executed in a motion vector detection device comprising means,
A representative point setting step of setting a certain pixel in a past frame of the moving image data as a representative point;
A comparison determination step of comparing the pixel data value of the current frame with the pixel data value of the representative point and determining pixel data as a candidate point whose correspondence with the representative point is estimated based on the comparison result;
As a candidate line segment in which the candidate points are continuous in the scanning direction, a line segment determination step for determining a candidate line segment having the maximum length;
A midpoint calculating step of calculating a midpoint of the candidate line segment determined as the maximum line segment in the line segment determining step;
A vector detection step of detecting a motion vector with the representative point as a start point and the midpoint as an end point;
A recording medium on which a program for executing is recorded.
JP2003008377A 2003-01-16 2003-01-16 Motion vector detection device, motion vector detection method, program, and recording medium Expired - Fee Related JP4306256B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003008377A JP4306256B2 (en) 2003-01-16 2003-01-16 Motion vector detection device, motion vector detection method, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003008377A JP4306256B2 (en) 2003-01-16 2003-01-16 Motion vector detection device, motion vector detection method, program, and recording medium

Publications (3)

Publication Number Publication Date
JP2004220419A JP2004220419A (en) 2004-08-05
JP2004220419A5 JP2004220419A5 (en) 2006-02-09
JP4306256B2 true JP4306256B2 (en) 2009-07-29

Family

ID=32898194

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003008377A Expired - Fee Related JP4306256B2 (en) 2003-01-16 2003-01-16 Motion vector detection device, motion vector detection method, program, and recording medium

Country Status (1)

Country Link
JP (1) JP4306256B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100787954B1 (en) 2007-01-05 2007-12-24 한양대학교 산학협력단 Fast Motion Estimation Method of Block Matching Method using Cross Diamond Searching and Recording Media with Program for Performing the Method
JP4938617B2 (en) * 2007-10-18 2012-05-23 幸輝郎 村井 Object operating device and method for specifying marker from digital image frame data

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0686149A (en) * 1992-08-31 1994-03-25 Sony Corp Motion vector detector and video camera
JPH07274180A (en) * 1994-03-31 1995-10-20 Toshiba Corp Video signal coding method, video signal decoding method, video signal coding apparatus, and video signal decoding apparatus
JPH07274178A (en) * 1994-03-31 1995-10-20 Sony Corp Motion vector detector
JPH0830495A (en) * 1994-07-15 1996-02-02 Matsushita Electric Ind Co Ltd File management system
JPH0863554A (en) * 1994-08-26 1996-03-08 Fujitsu Ltd Neocognitron
JP3296675B2 (en) * 1995-02-28 2002-07-02 三洋電機株式会社 Subject tracking apparatus and subject tracking method
JP2002329196A (en) * 2001-04-27 2002-11-15 Ntt Power & Building Facilities Inc Latency detection system

Also Published As

Publication number Publication date
JP2004220419A (en) 2004-08-05

Similar Documents

Publication Publication Date Title
US10681270B2 (en) Electronic device for creating panoramic image or motion picture and method for the same
US20120263397A1 (en) Image processing device, image processing method, and program
CN101655991B (en) Image processing apparatus, image processing method, and program
JP5506800B2 (en) Frame interpolation apparatus and frame interpolation method
JP3149840B2 (en) Apparatus and method for detecting motion vector
US10764499B2 (en) Motion blur detection
JP6610367B2 (en) Inspection apparatus and inspection method for inspection object
CN114418908A (en) Image processing method, device, electronic device and storage medium
JP4306256B2 (en) Motion vector detection device, motion vector detection method, program, and recording medium
JP2008046608A (en) Video window detector
JP5322416B2 (en) Block matching circuit and data update method
US20250245789A1 (en) Error-Aware Adaptive Video Interpolation
JPWO2007083621A1 (en) Image processing device
JP2009065283A (en) Image shake correction apparatus
KR101487685B1 (en) An image processing apparatus, an image processing method, and a recording medium storing a program for executing a processing method
JP2007243335A (en) Camera shake correction method, camera shake correction apparatus, and imaging apparatus
JP2017174094A (en) Image processing device, image processing method, and program
US6687413B2 (en) Signal processing apparatus
JP4763415B2 (en) Image processing device
JP2006215657A (en) Motion vector detection method, motion vector detection device, motion vector detection program, and program recording medium
US20140002733A1 (en) Subframe level latency de-interlacing method and apparatus
JP3925560B2 (en) Image processing apparatus and method, recording medium, and program
JP4052348B2 (en) Image processing apparatus and image processing method
JP2000350233A (en) System and method for still picture processing in moving picture reproduction
JP2021077935A (en) Control device, imaging apparatus, control method, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051220

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20051220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081113

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081118

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090210

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090324

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090427

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

Free format text: PAYMENT UNTIL: 20120515

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130515

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees