JP4159798B2 - Image processing apparatus and image processing program - Google Patents

Image processing apparatus and image processing program Download PDF

Info

Publication number
JP4159798B2
JP4159798B2 JP2002136050A JP2002136050A JP4159798B2 JP 4159798 B2 JP4159798 B2 JP 4159798B2 JP 2002136050 A JP2002136050 A JP 2002136050A JP 2002136050 A JP2002136050 A JP 2002136050A JP 4159798 B2 JP4159798 B2 JP 4159798B2
Authority
JP
Japan
Prior art keywords
image
reference image
epipolar
pixel
epipolar line
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
JP2002136050A
Other languages
Japanese (ja)
Other versions
JP2003331262A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2002136050A priority Critical patent/JP4159798B2/en
Publication of JP2003331262A publication Critical patent/JP2003331262A/en
Application granted granted Critical
Publication of JP4159798B2 publication Critical patent/JP4159798B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、画像処理装置及び画像処理のプログラムに関するものである。
【0002】
【従来の技術】
ビデオカメラ等で撮影される二次元の動画像、もしくは多視点の静止画像から三次元情報を復元することは、自動制御等の分野で活用が期待できるため、多くの研究がなされている。
【0003】
その基本的な原理は、三角測量の原理を利用したステレオ法であり、これは2つ以上の異なる視点から同一対象物を撮影した画像間での各画像の対応点を見つけることで、その位置関係を求めることにより計測対象までの距離を計測する方法である。ある視点の画像から別の視点の画像の対応点を求める場合には、各画像の撮影位置や撮影方向等に関するパラメータが分かっていれば、これを制約条件として奥行きを未知とする一次元の探索問題になる。
【0004】
その一例として、「複数視点画像からの三次元形状復元−局所アフィン変形ウィンドウによるステレオマッチング−」、情報処理学会研究報告、98−CVIM−109、pp.33−40には、ある視点の画像に撮影位置や撮影方向と奥行きをパラメータとするアフィン変換をほどこすことにより、別の視点の画像に変形でき、これを利用して画像の対応点を探索することにより三次元情報が得られることが示されている。
【0005】
また、別の例としては、「信頼性情報をもったオプティカルフローからの形状復元とその移動物体検出への応用」、電子情報通信学会論文誌D−II Vol.J76−D−II No.8 pp.1562−1571では、カメラが並進速度T、回転速度Rで移動したときに生じるオプティカルフローから画像の対応点を求めることが示されている。
【0006】
これらの文献の場合では、2つの画像の対応する点は、エピポーラ方程式と呼ばれる式を満たし、エピポーラ線と呼ばれる線上に乗る。図8は、2つの画像の対応する点のエピポーラ線を示す図である。図8において、30(30−1,30−2,30−3)は被写体としての物体、31はある基準用カメラ(図示せず)によりある視点から物体30を撮像した基準となる画像(これ以降、「基準画像」と称する)、32は他の参照用カメラ(図示せず)により別の視点から同一の物体30を撮像した参照用の画像(これ以降、「参照画像」と称する)、Pは基準画像31における物体30の基準画像、Q1,Q2,Q3は参照画像32における物体30の参照画像である。
【0007】
次に、動作について説明する。
物体30が基準用カメラの一定の視線上に存在する限り、基準画像31から物体30までの距離がZ1,Z2,Z3というようにその視線上で変化しても、すなわち、物体30が物体30−1,30−2,30−3のように移動しても、基準画像31上の点Pの位置(座標)は変化しない。一方、参照用カメラで移動する物体30−1,30−2,30−3を撮像した場合には、参照画像32上では、Q1,Q2,Q3のように、エピポーラ線E上に現れて、物体30が基準用カメラの一定の視線上に存在する限り、参照画像32上での物体30の画像はエピポーラ線E上から外れることはない。
【0008】
このような、幾何光学的な性質を利用して、点Pに対する対応点を探索することにより、点Pにおける対象物体までの距離を求めることができる。この方法を画面上の全ての画素について行うことにより三次元情報を取得できる。
【0009】
対応点を探索する方法としては、例えば、「複数の基線長を利用したステレオマッチング」、電子情報通信学会論文誌D−II Vol.J75−D−II No.8 pp.1317−1327にあるマルチベースラインステレオ法がある。ここには、複数の画像間の自乗誤差の総和を用いて対応点を判断する方法が示されている。マルチベースラインステレオ法では、想定される距離Zの逆数1/Zを変化させることにより、基準画像と参照画像の対応点にあたる画素の誤差の総和を求め、最も誤差の小さくなる時の距離の逆数1/Zをその画素での三次元情報(奥行き)とする。また、このような手法を用いれば、3つ以上の異なる視点から撮影された画像から三次元情報を復元することも可能になる。
【0010】
【発明が解決しようとする課題】
しかしながら、上述のような複数の視点の二次元画像から三次元情報を復元しようとする場合、一般的にエピポーラ線は、参照画像のXY座標軸に対して斜めの直線になる。このため、三次元情報の復元を行う画像処理装置を構成した場合、参照画像をメモリ等の記憶装置から読み取るには、離散的にメモリアクセスを行わなくてはならない。特に、二次元の動画像のような、連続的に変化する画像から三次元情報を復元する場合、エピポーラ線の傾き等も動的に変化するため、メモリへのアクセスも動的に変化することになる。
【0011】
従来は、複数の視点の二次元画像から三次元情報を復元する際に、対応点を求める等の処理の負荷が大きく、その演算に時間がかかるため、メモリのアクセス時間が問題になるようなことはなかった。しかし、半導体技術等の向上により、これらの処理が高速に実行できるようになり、メモリの読み取り速度が全体の処理に対するボトルネックになる可能性が出てきた。また、この場合、読み取りデータは連続的ではなく離散的であるため、バースト転送によりアドレス指定等を省略するといった手法により、読み取りを高速化することが困難である。
このような問題の解決方法として、読み取り速度の速いメモリを使用する方法があるが、このようなメモリは極めて高価であるため製品のコストが高くなり、装置の規模も大きくなってしまう。
すなわち、上記従来の画像処理装置においては、読み取りを高速化することと製品のコストダウンを図ることがトレードオフの関係になっていて、双方の要求を満たすことができないという課題があった。
【0012】
この発明は上記のような課題を解決するためになされたもので、複数の視点の二次元画像から三次元情報を復元する装置を構成しようとする場合に、画素データの読み取りを高速かつ効率的に行うことにより全体の処理の高速化を可能にするとともに、製品のコストダウンを図ることが可能な画像処理装置及び画像処理のプログラムを得ることを目的とする。
【0013】
【課題を解決するための手段】
この発明に係る画像処理装置は、基準画像におけるエピポーラ線に沿って基準画素データを読み取る基準画像読み取り手段と、基準画像におけるエピポーラ線に対応する参照画像におけるエピポーラ線に沿って参照画素データを読み取る参照画像読み取り手段と、参照画像読み取り手段によって読み出された参照画素データを一時的に保持するエピポーラ画素記憶手段とを有するものである。
【0014】
この発明に係る画像処理装置は、参照画像におけるエピポーラ線の傾きによって参照画素データを一時的に保持するエピポーラ画素記憶手段の領域を動的に変化させる制御手段を有するものである。
【0015】
この発明に係る画像処理装置の参照画像読み取り手段は、参照画像におけるエピポーラ線の傾きによってそのエピポーラ線に沿った参照画像の特定の領域のみをエピポーラ画素記憶手段に記憶するようにしたものである。
【0016】
この発明に係る画像処理装置の参照画像読み取り手段は、エピポーラ画素記憶手段に対応する参照画素データがない場合には、主記憶装置から参照画素データを読み込むようにしたものである。
【0017】
この発明に係る画像処理装置は、複数の参照画像を用いて各参照画像のエピポーラ線を算出し、算出した各エピポーラ線に対応する基準画像の複数のエピポーラ線から共通のエピポーラ線を算出する制御手段を有するものである。
【0018】
この発明に係る画像処理のプログラムは、基準画像におけるエピポーラ線に沿って基準画素データを読み取る第1のステップと、基準画像におけるエピポーラ線に対応する参照画像におけるエピポーラ線に沿って参照画素データを読み取る第2のステップと、第2のステップによって読み出された参照画素データをエピポーラ画素記憶手段に一時的に記憶する第3のステップとを有するものである。
【0019】
この発明に係る画像処理のプログラムは、参照画像におけるエピポーラ線の傾きによって参照画素データを一時的に記憶するエピポーラ画素記憶手段の領域を動的に変化させる第4のステップをさらに有するものである。
【0020】
この発明に係る画像処理のプログラムにおける第2のステップは、参照画像におけるエピポーラ線の傾きによってそのエピポーラ線に沿った参照画像の特定の領域のみをエピポーラ画素記憶手段に記憶するようにしたものである。
【0021】
この発明に係る画像処理のプログラムにおける第2のステップは、エピポーラ画素記憶手段に対応する参照画素データがない場合には、主記憶装置から参照画素データを読み込むようにしたものである。
【0022】
この発明に係る画像処理のプログラムは、複数の参照画像を用いて各参照画像のエピポーラ線を算出し、算出した各エピポーラ線に対応する基準画像の複数のエピポーラ線から共通のエピポーラ線を算出する第5のステップをさらに有するものである。
【0023】
【発明の実施の形態】
以下、この発明の実施の一形態を説明する。
実施の形態1.
図1は、この発明の実施の形態1における画像処理装置の構成を示すブロック図である。図1において、1は画像処理装置、2は基準画像と参照画像の画素データを入力する画像入力手段、3は画像入力手段2が搭載された移動手段、4は画像入力手段2から送られてきた基準画像を記憶する基準画像記憶手段、5は画像入力手段2から送られてきた参照画像を記憶する参照画像記憶手段(主記憶装置)、6は基準画像のどの画素データを読み取るかを決めて基準画像記憶手段4からの読み取りを実行する基準画像読み取り手段、7は基準読み取り手段6が基準画像のどの画素を読み取ったかに基づいて、参照画像のどの画素データを読み取るかを決めて参照画像の画素データの読み取りを実行する参照画像読み取り手段、8は参照画像読み取り手段7の指示に従い、参照画像記憶手段5から読み出された参照画像の画素データを一時的に記憶する一時記憶手段(エピポーラ画素記憶手段)、9は基準画像の画素データとそれに対応する参照画像の画素データから距離画像を作成する距離画像生成手段、10は距離画像作成手段9で算出した距離画像のデータを出力する距離画像出力手段、11は画像入力手段2が画像を取得した際の位置情報と方位情報を計測する三次元位置方位センサである。
【0024】
なお、図1には記載されていないが、この画像処理装置1を全体的に制御する制御手段があり、移動手段3、基準画像読み取り手段6、参照画像読み取り手段7、距離画像生成手段9、距離画像出力手段10にシステムバス等を介して接続されており、これらの各手段を制御する。ただし、以下においては説明を簡潔にするために、基準画像読み取り手段6、参照画像読み取り手段7、距離画像生成手段9等が自らデータ処理を実行するものとする。
【0025】
また、上述の基準画像記憶手段4と参照画像記憶手段5は、例えば距離画像生成手段9の外部に接続されているメモリで構成されている。一方、一時記憶手段8は、これらのメモリと比較して、参照画像読み取り手段7と高速にデータ受け渡しが可能であるが、記憶容量の小さな内部メモリもしくはキャッシュ等で構成されている。しかしながら、この発明は上記構成に限定されるものではない。すなわち、基準画像読み取り手段6、参照画像読み取り手段7、一時記憶手段8、距離画像生成手段9は別々の装置(デバイス)で構成される必要はなく、1つのLSI等で構成されていてもよい。
【0026】
また、上述の画像入力手段2は、例えばカメラなどの撮影手段を想定しているが、外部の記憶装置からの入力や、他の画像処理装置からの入力などであってもよい。また、距離画像出力手段10は、例えばディスプレイ等であるが、外部の記憶装置や他の画像処理装置への出力であってもよい。
【0027】
次に、動作について説明する。
まず、この画像処理装置1による画像処理方法の概略について以下の(1)〜(7)の順に従って説明する。
(1) 画像入力手段2は撮影対象を撮影し、これを基準画像として基準画像記憶手段4に送る。また、撮影時に三次元位置方位センサ11は位置情報と方位情報を取得し、基準画像記憶手段4に送る。基準画像記憶手段4は、画像データと位置情報、方位情報を1つのセットとして記憶する。
【0028】
(2) 移動手段3により、基準画像を撮影した位置から移動する。次に、画像入力手段2は撮影対象を撮影し、これを参照画像として参照画像記憶手段5に送る。また、撮影時に三次元位置方位センサ11は位置情報と方位情報を取得し、参照画像記憶手段5に送る。参照画像記憶手段5は、画像データと位置情報、方位情報を1つのセットとして記憶する。
【0029】
(3) 基準画像読み取り手段6は、基準画像記憶手段4と参照画像記憶手段5から、処理の対象となる基準画像と参照画像の位置情報と方位情報をそれぞれ読み取る。次に、基準画像読み取り手段6はこれらの位置情報と方位情報から、基準画像と参照画像上のエピポーラ線の傾きをそれぞれ算出する。算出した傾きは参照画像読み取り手段7に送られる。
【0030】
(4) 基準画像読み取り手段6は、基準画像上の画素データをエピポーラ線に沿うようにして、基準画像記憶手段4から読み取る。基準画像読み取り手段6は、画素データをひとつ読み取る毎に、読み取った画素データとその画像上の位置を距離画像生成手段9に送る。また、読み取った画素の画像上の位置の情報を参照画像読み取り手段7に送る。あるエピポーラ線上のすべての画素データを読み取った後は、エピポーラ線をずらして(シフトして)、順次読み取りを行い、基準画像上のすべての画素データを読み取るようにする。
【0031】
(5) 参照画像読み取り手段7は、基準画像読み取り手段6が新たなエピポーラ線の画素データを読み取る場合、それに対応する参照画像上のエピポーラ線を求め、その線に沿う画素データを参照画像記憶手段5から読み取り、一時記憶手段8に書き込んでおく。
【0032】
(6) 参照画像読み取り手段7は、基準画像読み取り手段6から送られてきた、基準画像上の画素に対応する参照画像上の画素を算出する。その後、一時記憶手段8から対応する画素データを読み取り、距離画像生成手段9に送る。
【0033】
(7) 距離画像生成手段9は、基準画像読み取り手段6から送られてきた画素データと、参照画像読み取り手段7から送られてきた画素データから距離画像を算出し、距離画像出力手段10に送る。
画像処理装置1は、以上の動作により距離画像を生成する。
【0034】
図2は、この発明の実施の形態1において基準画像における画素の配列及びエピポーラ線を示す図である。図2において、21は基準画像である。基準画像21上の任意のエピポーラ線(図2の点線)を想定し、そのエピポーラ線に沿った各画素データと、後述する図4の参照画像のエピポーラ線に沿った複数の画素データとによって、距離画像を生成する。
【0035】
この例では、エピポーラ方程式から、基準画像上でのエピポーラ線の傾きの角度がα、後述する図4の参照画像上でのエピポーラ線の傾きがβになったものとする。ただし、ここでは、−π/2<α≦π/2、−π/2<β≦π/2とする。α,βは基準画像と参照画像の位置情報と方位情報から、2つの画像間の並進速度Tと回転速度Rを求め、それからエピポーラ方程式を導くことにより求めることができる。
【0036】
また、基準画像、参照画像の画像のサイズを共に横64画素、縦64画素とし、画像の左下すみの画素を原点(0,0)として、横軸をX軸、縦軸をY軸とし、原点から右側x画素目、上側y画素目の点の座標を(x,y)と表すものとする。また、対象までの距離ZはZ0からZ8までの範囲で9段階の距離をとるものとして、Zの探索を行うものとする。また、以下の例では、基準画像上の画素P(x,y)に対する参照画像上の対応点Q(x’,y’)の画素データは、x’,y’の値の小数点以下を切り捨てて整数値とした時の画素データを用いるものとする。
【0037】
まず、基準画像読み取り手段6の動作を以下の手順(A1)〜(A4)に従って説明する。
(A1) 基準画像読み取り手段6は、αの角度により、以下のようにして場合分けを行う。
(i) 0<α<π/2
(ii) −π/2<α<0
(iii) α=0 もしくは α=π/2
以下では、まず、(i) 0<α<π/2の場合について説明する。
【0038】
(A2) 最初に、基準画像読み取り手段6は、基準画像上の左上すみの画素(0,63)の画素データを読み取る。次に、画素(0,63)の乗るエピポーラ線(図形的には、画素(0,63)を通るエピポーラ線)を算出する。このときのエピポーラ線はy=(tanα)x+63となる。
【0039】
(A2−1) 基準画像読み取り手段6は、エピポーラ線上にある画素(0,63)の画素データを、距離画像生成手段9に送り、画素の位置を示す(0,63)という情報を参照画像読み取り手段7に送る。基準画像読み取り手段6は、参照画像読み取り手段7が、画素(0,63)に対する対応点を全て距離画像生成手段9に送り終えるまで、この読み取り処理を休止する。
(A2−2) 画素(0,63)の処理が完了した時点で、基準画像読み取り手段6内部で画素(0,63)を0列目(x=0の列)の画素の「処理完了画素」として記録する。図3は、この発明の実施の形態1における処理完了画素を記録する表を示している。図3に示すように、列毎に処理の完了した画素の中で最も行番号(yの値)の小さい画素を記憶するような表を作成し、処理を行った画素を記録する。なお、処理の開始時にこの表の各列の値は全て64(又は、それ以上のデフォルト値)になっているものとする。
【0040】
(A3) 次に、エピポーラ線のy切片を1つシフトして、y=(tanα)x+62を新たなエピポーラ線とする。この後、基準画像読み取り手段6は、参照画像読み取り手段7に、エピポーラ線を更新(シフト)した旨の信号を送り、現時点でのエピポーラ線y=(tanα)x+62上の画素である(0,62)と、1つ前のエピポーラ線y=(tanα)x+63上の画素である(0,63)の情報を送る。以下、(A3−1)〜(A3−3)の処理を行い、y=(tanα)x+63とy=(tanα)x+62の間にある画素を読み取っていく。各エピポーラ線上のみの画素を読み取るとすると、エピポーラ線の角度αによっては画素の欠落のおそれがあるので、2つのエピポーラ線の間にある画素を読み取るのである。
【0041】
(A3−1) x=0でエピポーラ線上にある画素を求める。ただし、これ以降、yの値は小数点以下の値を切り上げるようにする。この場合は(0,62)になる。この画素を(A2−1)のように処理する。
(A3−2) 次に、x=1の場合のエピポーラ線上にある画素を求める。この場合はyの値を切り上げて(1,63)になる。このとき、基準画像読み取り手段6はこの画素が処理完了画素であるかどうかを確認し、過去に処理した画素を2度処理することがないようにする。また、画素を求める際の切り上げ等の演算の丸め誤差等で処理の飛ばされた画素がないかを確認し、飛ばされた画素があればその画素を処理する。具体的には、図3の表の1列目の数値と現在処理中の画素のyの値(この場合は63)を比較する。
この時点で、表の1列目の数値は64であるため、画素(1,63)は初めて処理される画素であり、また、x=1の画素にしては処理の飛ばされた画素はないものとして処理を継続する。これらの処理の後、画素(1,63)を(A2−1)のように処理する。また、処理の終了した時点で(A2−2)のようにして「処理完了画素」として記録する。
(A3−3) x=2以降についても同様の処理を行い、エピポーラ線y=(tanα)x+62とy=(tanα)x+63の間にある画素(2,63),(3,63)について、(A2−1),(A2−2)と同様の処理を行う。
【0042】
(A4) 以下、同様にして、エピポーラ線のy切片を1つずつシフトして順次処理を行っていく。最後の画素に当たる画素(63,0)が処理されるまで処理を行う。
【0043】
次に、(ii) −π/2<α<0の場合では、画素(63,63)を通るエピポーラ線から処理を開始し、順次y切片を下げて最後の画素に当たる(0,0)が処理されるまで処理を行うようにする。それ以外は、(i) 0<α<π/2の場合と同様の処理となる。
また、(iii) α=0 もしくは α=π/2の場合では、X軸もしくは、Y軸に沿って画素を順次読み取り処理を実行する。これは、従来の一般的な画像処理での操作と同様であるので、説明は省略する。
【0044】
以上のように処理を行うことにより、基準画像読み取り手段6は、基準画像21におけるエピポーラ線に沿う画素毎に、画素データの読み取りを実行する。
【0045】
図4は、この発明の実施の形態1において参照画像における画素の配列及びエピポーラ線を示す図である。図5は一時記憶手段8の記憶エリアを示している。図5に示すように、一時記憶手段8は64×8個(総計512個)のブロック(アドレス)からなり、各ブロックは1つの画素データを保持できるものとする。また、各ブロックには識別のため、0番から511番までの通し番号が割り当てられている。
【0046】
次に、参照画像読み取り手段7と一時記憶手段8の動作を以下の手順(B1)〜(B6)に従って説明する。ここでの動作は上述の基準画像読み取り手段6の動作と連動しているものとする。
【0047】
(B1) 最初に、参照画像読み取り手段7は、基準画像読み取り手段6から基準画像上の画素(0,63)の情報を受け取る。これは、上述の(A2)での基準画像読み取り手段6の動作に対応している。その後、参照画像読み取り手段7は、基準画像上の画素(0,63)の対応する画素を以下の手順で求め、参照画像記憶手段5から読み取り、距離画像生成手段9に送る。なお、このときの処理では、一時記憶手段8への書き込み、読み取り等は行われない。
【0048】
(B1−1) まず、参照画像読み取り手段7は、対象までの距離がZの場合の基準画像上の画素(0,63)に対する対応点を求める。対応点の求め方については様々な方法があるが、すでに周知の技術であるので詳細な説明は省略する。いま、画像間の併進速度を(Tx,Ty,Tz)、回転速度を(Rx,Ry,Rz)とすると、基準画像上の点P(x,y)に対する対応点Q(x’,y’)は、以下のようになる。ただし、ここでは、距離の単位を焦点距離(焦点距離=1)としたものとする。
x’=x+(−Tx+x×Tz)/Z+x×y×Rx−(x−1)
×Ry+y×Rz
y’=y+(−Ty+y×Tz)/Z−x×y×Ry+(y−1)
×Rx−x×Rz
参照画像読み取り手段7は、この画素データを参照画像記憶手段5から読み取り、距離画像生成手段9に送る。
(B1−2) 参照画像読み取り手段7は、距離Z1からZ8までについても(B1−1)と同様に対応点を求め、画素データを参照画像記憶手段5から読み取り、距離画像生成手段9に送る。その後、参照画像読み取り手段7は、基準画像上の画素(0,63)に対応する画素を全て距離画像生成手段9に送った時点で、上述の(A2)にあるように、基準画像読み取り手段6は次に処理を行う画素の読み取り処理を再開する。
【0049】
(B2) 次に、参照画像読み取り手段7は、基準画像読み取り手段6から基準画像上での、エピポーラ線を更新した旨の信号を受け取り、現時点でのエピポーラ線上の画素(0,62)と、1つ前のエピポーラ線上の画素(0,63)の情報を受け取る。これは、上述の(A3)での基準画像読み取り手段6の動作に対応している。その後、参照画像読み取り手段7は、以下の(B2−1)〜(B2−5)のようにして、参照画像記憶手段5から画素データを読み取り、一時記憶手段8に書き込む。
【0050】
(B2−1) 参照画像読み取り手段7は、基準画像上の画素(0,63)と(0,62)の対応する点を(B1−1)と同様にして求め、その点の通るエピポーラ線を算出する。このとき、図4のように、画素(0,63)に対応する点の通るエピポーラ線E0及び画素(0,62)に対応する点の通るエピポーラ線E1をそれぞれ下記の式とする。
E0 {y=(tanβ)x+C0}
E1 {y=(tanβ)x+C1}
(B2−2) 参照画像読み取り手段7は、一時記憶手段8をLブロック毎の仮想的な領域に分割する。このとき、Lはエピポーラ線E1とE0の間にある画素か、もしくはどちらかの線をも含んでいる画素を列毎に分けて格納できるような大きさであればよい。例えば、Lを「L>|C1−C0|+|tanβ|+1を満たすような最小の整数」というように、エピポーラ線の傾きtanβと、y切片C1とC0の間隔に応じて決めてもよい。この例では、Lを4とする。以後、一時記憶手段8において領域毎に分けたブロックの「m領域目のk番目のブロック」を[m,k]ブロックと表記する。このとき、図5のように、一時記憶手段8の0番のブロックが[0,0]ブロック、1番のブロックが[0,1]ブロック、・・・となるものとする。なお、一時記憶手段8の最後尾の領域がLブロックに満たない場合(一時記憶手段8がLで割り切れない場合)は最後尾の領域は使用しないものとする。
【0051】
(B2−3) 参照画像読み取り手段7は、図4において、エピポーラ線E0とE1の間にある画素か、もしくはどちらかの線をも含んでいる画素の中で最小の列番号(最も左側にある列の番号)を「列番号のオフセット開始値」として記録する。図4では56となる。その後、参照画像読み取り手段7は、56列の画素の中で、エピポーラ線E0とE1の間にある画素か、もしくはどちらかの線をも含んでいる画素を行番号の小さい順に一時記憶手段8の“0”の領域に書き込む。例えば、画素(56,63)は[0,0]ブロックに書き込まれる。ただし、画素(56,64),(56,65)は存在しないので、[0,1],[0,2]ブロックは何も書き込まない。
【0052】
(B2−4) 次に、57列の画素を同様にして“1”の領域に書き込む。例えば、画素(57,62)は[1,0]ブロックに、画素(57,63)は[1,1]ブロックに書き込まれる。以下、同様にして、63列までの画素を各領域に書き込んでいく。
(B2−5) 上述で一時記憶手段8に対応する画素が書ききれない場合があり得る。例えば、一時記憶手段8をLブロック毎に分割する際にLが8より大きく、かつ0列から63列までのエピポーラ線E0とE1の間にある画素か、もしくはどちらかの線をも含んでいる画素が0列から63列まで存在する場合である。この場合には、参照画像読み取り手段7は、一時記憶手段8に書き込むことのできた最後の列を「列番号のオフセット終了値」として記録する。それ以降の列の画素は一時記憶手段8に書き込まないものとする。
【0053】
(B3) 次に、参照画像読み取り手段7は、基準画像読み取り手段6から基準画像上の画素(0,62)の情報を受け取る。
(B3−1) その後、参照画像読み取り手段7は、距離がZ0の場合の基準画像上の画素(0,62)の対応する点を(B1−1)と同様にして求める。この点は、下記のエピポーラ線上
y=(tanβ)x+C1
にあるので、対応する点の画素データは一時記憶手段8に格納されている。この画素データを(x1,y1)とする。このとき、参照画像読み取り手段7は、以下の(B3−1−1)〜(B3−2)のように、一時記憶手段8から対応する画素データを読み取る。
【0054】
(B3−1−1) まず、参照画像読み取り手段7は、画素(x1,y1)のx1が「列番号のオフセット開始値」以上であり、「列番号のオフセット終了値」以下であることを確認する。そうでない場合は、対応する画素が一時記憶手段8に格納されていないので、参照画像記憶手段5から直接対応する画素データを読み取り、距離画像生成手段9に送る。
(B3−1−2) 次に、参照画像読み取り手段7は、x=x1の時のエピポーラ線E1のyの値を算出し、これを「行番号のオフセット開始値」とする。この場合には
y=(tanβ)x1+C1
となる(ただし、端数は切捨てられる)。このとき、一時記憶手段8の[x1−(列番号のオフセット開始値),y1−(行番号のオフセット開始値)]ブロックに画素(x1,y1)の画素データが格納されているので、その画素データを呼び出し、距離画像生成手段9に送る。なお、ここでは、図4のように、エピポーラ線E1がE0の下にあるため、「行番号のオフセット開始値」の算出にエピポーラ線E1を使用した。もし、エピポーラ線E1がE0の上にあるならば、E0を使用して「行番号のオフセット開始値」を算出する。
(B3−2) 同様にして、参照画像読み取り手段7は、距離がZ1からZ8までの場合の基準画像上の画素(0,62)の対応する点についても(B3−1),(B3−1−1),(B3−1−2)と同様にして求める。ただし、このとき「行番号のオフセット開始値」を逐次算出する。
【0055】
(B4) 次に、参照画像読み取り手段7は、基準画像読み取り手段6から基準画像上の画素(1,63)の情報を受け取る。この場合も、(B3)と同様に処理をする。画素(1,63)は、基準画像上の下記の2つのエピポーラ線
y=(tanα)x+63
y=(tanα)x+62
の間にあるので、参照画像上の対応点は下記の2つのエピポーラ線
y=(tanβ)x + C1
y=(tanβ)x + C0
の間にある。このため、(B3)と同様に画素データを一時記憶手段8から読み取ることができる。
【0056】
(B5) 参照画像読み取り手段7が受け取る、画素(2,63),(3,63)に関しても(B3)と同様に処理する。
【0057】
(B6) 次に、参照画像読み取り手段7は、基準画像読み取り手段6から基準画像上でのエピポーラ線を更新した旨の信号を受け取り、現時点でのエピポーラ線上の画素(0,61)と、一つ前のエピポーラ線上の画素(0,62)の情報を受け取る。この場合、画素(0,61)に対応する点の通るエピポーラ線を
2{y=(tanβ)x+C2}
とすると、エピポーラ線上E2とE1に関して、(B2)の(B2−2)〜(B2−5)と同様の処理を行う。ただし、一時記憶手段内部にすでにある画素データは、参照画像記憶手段5から読み込まないようにする。
例えば、図4で、列60においてのエピポーラ線E2とE1の間にある画素か、もしくはどちらかの線をも含んでいる画素は、(60,59),(60,60),(60,61)であるが、画素(60,61)の画像データはすでに一時記憶手段8の[1,0],[1,1]ブロックにそれぞれ格納されているので、画素(60,59),(60,60)の画素データのみを読み取る。この後、画素(60,59)〜(60,62)までの画素を、一時記憶手段8の[1,0]〜[1,3]ブロックに書き込む。 以上のように処理を行うことにより、参照画像読み取り手段7と一時記憶手段8は、エピポーラ線に沿う画素毎に画素データの読み取り処理、画素データの書き込み処理を実行する。
【0058】
次に、距離画像生成手段9の動作を説明する。
距離画像生成手段9は、基準画像読み取り手段6から送られてきた画素データと、参照画像読み取り手段7から送られてきた画素データの差をとり、その差の絶対値が最小となるような距離Zを出力する。
【0059】
例えば、距離画像生成手段9が、基準画像読み取り手段6から基準画素上の画素(0,63)の画素データを受け取る。次に、参照画像読み取り手段7から参照画像上の対応画素Q〜Qを受け取る。ただし、Qは距離をZとした場合の対応画素とし、同様にQは距離Zの場合の対応画素、・・・とする。その後、距離画像生成手段9は、画素(0,63)の画素データと画素Q〜Qの画素データそれぞれとの差を取る。このとき、これら9組の組み合わせの中で、差の絶対値が最も小さい値となるものが画素(0,63)と画素Q3の組だったとする。この場合、距離画像生成手段9はZを結果として出力する。
【0060】
以上のように処理を行うことにより、距離画像生成手段9は距離を出力する。なお、上述の距離画像生成手段9の処理では、画素毎に差を取っているが、複数の画素が含まれる領域毎に差を取るようにしてもよい。
【0061】
図6及び図7は、上記画像処理装置1の図示しない制御手段によって実行される画像処理のプログラムを示す概略のフローチャートである。このプログラムは制御手段のROM等のメモリに予め記憶されていてもよいが、プログラム自体を装置とは独立に存在するものとし、フロッピー(登録商標)ディスクやCD等の外部記憶媒体、又はインターネット等の通信回線を介して、書き込み可能なメモリにインストールするようにしてもよい。この場合には、画像処理のプログラムの発明として成立する。
【0062】
図6において、まず、基準画像記憶手段4に記憶された基準画像の最初の画素を指定する(ステップST1)。図2の例では画素(0,63)を指定する。次に、指定画素により基準画像のエピポーラ線Aを算出する(ステップST2)。次に、そのエピポーラ線A上の画素データ(厳密には、上記したように2つのエピポーラ線Aに乗る画素データもあるので、エピポーラ線Aに沿った画素データ)を基準画像読み取り手段6によって基準画像記憶手段4から読み取って、距離画像生成手段9に送出する(ステップST3)。また、指定画素の座標(位置)により参照画像のエピポーラ線Bを算出する(ステップST4)。
【0063】
次に、エピポーラ線B上の参照画素(エピポーラ線Bに沿った参照画素)の座標を各距離(Z0からZ8まで)毎に指定する(ステップST5)。次に、指定した参照画素データを参照画像読み取り手段7によって参照画像記憶手段5から読み取って、一時記憶手段8に記憶する(ステップST6)。そして、エピポーラ線B上に次の参照画素があるか否かを判別し(ステップST7)、次の参照画素がある場合にはその画素を指定する(ステップST8)。そして、ステップST5に移行して、その参照画素の座標を各距離(Z0からZ8まで)毎に指定し、ステップST6、ステップST7の処理を行う。
すなわち、エピポーラ線B上に次の参照画素がある限り、ステップST5〜ステップST8のループ処理を繰り返して、図5に示したように、参照画素の画素データを一時記憶手段8に順に記憶する。
【0064】
エピポーラ線B上におけるすべての参照画素の画素データを参照画像記憶手段5から読み取って一時記憶手段8に記憶した後、すなわち、ステップST7において次の参照画素がない場合には、一時記憶手段8に記憶したエピポーラ線B上の参照画素を距離画像生成手段9に送出する(ステップST9)。次に、距離画像生成手段9によって距離画像生成処理が実行される(ステップST10)。
【0065】
なお、距離画像生成手段9によって実行される距離画像生成処理は、次の図7のフローチャートに示すように、各基準画素毎になされるので、基準画像における1つのエピポーラ線Aに関するエピポーラ線B上のすべての参照画素が一時記憶手段8に記憶されなくとも、参照画像読み取り手段7は一時記憶手段8から参照画素を読み取って、距離画像生成手段9に送出できるものとする。
【0066】
基準画像の1つのエピポーラ線Aについて、ステップST3からステップST10までの処理が終了したときは、エピポーラ線Aをシフトする(ステップST11)。このシフトの結果、基準画像記憶手段4に基準画素がないか否かを判別する(ステップST12)。すなわち、シフトされたエピポーラ線Aを通る基準画素がないか否かを判別する。シフトされたエピポーラ線Aを通る基準画素がある場合には、ステップST3に移行して、ステップST12までのループ処理を繰り返す。シフトされたエピポーラ線Aを通る基準画素がない場合、例えば、図2において、右下の画素(63,0)を通るエピポーラ線Aがさらに下にシフトされた場合には、このフローを終了する。
【0067】
図7は、図6のステップST10における距離画像生成処理のフローチャートである。まず、距離画像生成手段9に送出された基準画素Pを指定する(ステップST21)。次に、この指定した基準画素Pと比較される各距離(この場合は、Z0からZ8まで)毎の参照画素を指定するポインタnに0(初期値)をストアし、基準画素の画素データと参照画素の画素データとの最小値を求めるためのレジスタd(min)にデフォルトの最大値MAXをストアする(ステップST22)。そして、nの値をインクリメントしながら、すなわち、この場合、距離Z0からZ8までに対応する参照画素データを順に指定しながら、ステップST23〜ステップST28のループ処理を繰り返す。
【0068】
このループ処理では、距離Z(n)における参照画素Q(n)を指定し(ステップST23)、基準画素Pの画素データと参照画素Q(n)の画素データとの差分の絶対値をレジスタd(n)にストアする(ステップST24)。そして、d(n)の値がd(min)の値よりも小さいか否かを判別する(ステップST25)。nの値が0の場合は、d(min)の値は最大値であるので、d(0)の値はd(min)の値よりも小さい。d(n)の値がd(min)の値よりも小さい場合には、d(min)の値をd(n)の値に更新する(ステップST26)。したがって、nの値が0の場合は、d(min)の値はd(0)の値に更新される。
【0069】
次に、nの値をインクリメントして(ステップST27)、nの値が最大値nMAX(この場合は8)より大きくなったか否かを判別する(ステップST28)。nの値が最大値以内である場合には、ステップST23に移行して、上記ループ処理を繰り返す。ステップST25において、d(n)の値がd(min)の値以上の場合は、d(min)の値を更新することなく、ステップST27においてnの値をインクリメントする。
【0070】
このループ処理において、複数の参照画素Qの中で基準画素Pの画素データとの差分の絶対値が最小となる参照画素を求める。ステップST28において、nの値が最大値nMAXより大きくなったとき、すなわち、指定した1つの基準画素Pと、すべての距離Z(n)における参照画素Q(n)との比較が終了したときは、d(n)の値が最小となる参照画素Q(n)の距離Z(n)を距離画素出力手段10に出力する(ステップST29)。
【0071】
この後に、次の基準画素があるか否かを判別する(ステップST30)。次の基準画素がある場合には、ステップST21に移行してその基準画素を指定し、ステップST30までの上記処理を繰り返す。ステップST30において、比較対象となる次の基準画素がない場合には、このフローを終了して図6のフローに戻る。
【0072】
以上のように、この実施の形態1によれば、エピポーラ線に沿って基準画像21と参照画像22の画素データの読み取りを行い、それを一時記憶手段8にバッファリング(一時的に記憶)することによって、参照画像記憶手段5からのデータ読み取りの回数を減らすことができる。このため、二次元の動画像もしくは多視点の静止画像から三次元情報を復元する際に、画素データの読み取りを高速かつ効率的に行うことにより全体の処理の高速化を可能にするという効果が得られる。
また、一時記憶手段8を用いることによって、高速動作の高価な参照画像記憶手段を必要としないので、製品のコストダウンを図ることが可能になるという効果が得られる。
【0073】
なお、この実施の形態1では、三次元位置方位センサ11を用いて、撮影した画像の位置情報と方位情報を取得し、それを用いてエピポーラ線等を算出しているが、基準画像21と参照画像22との画像処理等により、画像間の並進ベクトルと回転行列等を求め、それを用いてエピポーラ線等を算出するようにしてもよい。
また、画像の撮影時に位置情報と方位情報を取得する必要はなく、画像撮影前もしくは後に位置情報や方位情報を取得して、基準画像記憶手段4や参照画像記憶手段5等に記録し、その後に処理を行うようにしてもよい。
【0074】
また、この実施の形態1では、基準画像上の画素P(x,y)に対する参照画像上の対応点Q(x’,y’)の画素データは、x’,y’の小数点以下の値を切り捨てて整数値とした時の画素データを用いたが、複数の画素の間に対応点がある場合には、バイリニア補間等の手段を用いて、複数の画像間で補間を行うようにしてもよい。
【0075】
また、この実施の形態1では、参照画像のエピポーラ線上に沿う画素データを全て一括して呼び出しているが、一時記憶手段8に画素データがない場合には、必要な画素データのみ、参照画像記憶手段5から逐次読み取るような構成にしてもよい。この場合には、必要な画素データの読み取り欠落を回避できるという効果が得られる。
【0076】
また、この実施の形態1によれば、参照画像におけるエピポーラ線Bの傾きβに応じて、一時記憶手段8の領域を動的に変化させるので、参照画像におけるエピポーラ線の傾きに応じて一時記憶手段8の領域を柔軟に活用できるという効果がある。
【0077】
実施の形態2.
上述の実施の形態1では、一時記憶手段8の記憶容量は64×8のブロックがあり、8行分の画素データを保持できる大きさがあった。そして、一時記憶手段8に対応する画素データが書ききれない場合には、書き込むことのできた最後の列を列番号の「列番号のオフセット終了値」として記録し、「列番号のオフセット開始値」と「列番号のオフセット終了値」の間の画素データを書き込むようにしていた。
【0078】
これに対して、一時記憶手段8の記憶容量がさらに小さくて1行程度の画素データしか保持できない場合には、その一時記憶手段8に対応する画素が書ききれない状態が多くなり、参照画像上のエピポーラ線の端(始めの部分)の画素データのみが一時記憶手段8に書き込まれることになる。しかし、参照画像上のエピポーラ線における中央部分の画素を一時記憶手段8に書き込むようにしたほうが、対応点を含む画素データが一時記憶手段8にバッファリングされる可能性が多くなる。
【0079】
このため、エピポーラ線を含む画素の中で最も左側にある列と、最も右側にある列を算出し、一時記憶手段8に対応する画素が書ききれない場合には、中央部分の列が一時記憶手段8に書き込まれるようにしてもよい。そこで、この実施の形態2による画像処理方法においては、実施の形態1の参照画像読み取り手段7と一時記憶手段8の動作において、(B2−3)〜(B2−5)の処理を以下の(B’2−3)〜(B’2−5)ようにする。それ以外の画像処理については、実施の形態1と同じである。
【0080】
(B’2−3) 参照画像読み取り手段7は、図4において、エピポーラ線E0とE1の間にある画素か、もしくはどちらかの線をも含んでいる画素の中で、最小の列番号(最も左側の列番号)と最大の列番号(最も右側の列番号)をそれぞれ、開始列番号Hsと終了列番号Heとして記録する。ここで、HsとHeとLの値に応じて以下の(i),(ii)どちらかの処理を行う。以下、動作について説明する。
【0081】
(i) 一時記憶手段8に書き込むことができる列の数(この場合、64×6/Lと64のどちらか小さい方。以降この値をHとする)が、エピポーラ線E0とE1の間にある列か、もしくはどちらかの線をも含んでいる列の数(He−Hs+1)よりも小さい場合、(He−Hs+1−H)/2を開始列番号Hsに足した値を「列番号のオフセット開始値」とする。また、「列番号のオフセット開始値」にH−1を足した値を「列番号のオフセット終了値」とする。
(ii) 一時記憶手段8に書き込むことができる列の数(この場合、64×6/Lと64のどちらか小さい方。以降この値をHとする)が、エピポーラ線E0とE1の間にある列か、もしくはどちらかの線をも含んでいる列の数(He−Hs+1)以上の場合、開始列番号Hsを「列番号のオフセット開始値」、終了列番号Heを「列番号のオフセット終了値」とする。
【0082】
(B’2−4) 「列番号のオフセット開始値」の列の画素の中で、エピポーラ線E0とE1の間にある画素か、もしくはどちらかの線をも含んでいる画素を行番号の小さい物から順に一時記憶手段8の“0”の領域に書き込む。同様にして、「列番号のオフセット開始値」+1以降の列を、“1”以降の領域に順次書き込んでいく。
【0083】
(B’2−5) 「列番号のオフセット終了値」より後ろの列の画素は一時記憶手段8に書き込まないものとする。
これ以降の処理は、実施の形態1における(B3)以降の動作と同じである。
【0084】
以上のように、この実施の形態2によれば、参照画像におけるエピポーラ線の傾きによってそのエピポーラ線に沿った参照画像の特定の領域(この場合は、中央部分の列であるが、この範囲に限定するものではない)のみを一時記憶手段8に記憶するので、一時記憶手段の記憶容量が小さい場合でも、画素データのバッファリングがある程度可能になり、参照画像記憶手段からのデータ読み取りの回数をさらに減らすことができ、画像処理をさらに高速化することができるという効果が得られる。また、一時記憶手段の記憶容量が小さくてもよいので、製品のさらなるコストダウンを図ることが可能になるという効果が得られる。
【0085】
実施の形態3.
上述の実施の形態1では、1つの基準画像及び1つの参照画像からなる2つの画像から距離画像を算出する構成にしたが、この実施の形態3では3つ以上の画像から距離画像を算出した画像処理方法を行う。以下、動作について説明する。
【0086】
3つ以上の画像のうち1つを基準画像とし、残りを複数の参照画像として、それぞれ基準画像との対応点の差をとり、各画像の差を加算して距離画像を算出する。この場合でも、実施の形態1のように、エピポーラ線に沿ってデータを読み取る処理を各参照画素で並列して実行することにより、処理を高速に行うことができる。ただし、この場合、各参照画像でエピポーラ線は異なる。この場合には、基準画像上では異なる傾きの複数のエピポーラ線となる。このため、基準画像読み取り手段は、これら複数のエピポーラ線の中間の角度、又は、適宜の角度の直線、すなわち共通の1つのエピポーラ線を算出し、その算出した共通のエピポーラ線に沿ってデータを読み取るようにする。
【0087】
以上のように、この実施の形態3によれば、3つ以上の画像から距離画像を算出して一時記憶手段8にデータをバッファリングすることにより、極めて高速の画像処理を実現できるという効果が得られる。
【0088】
【発明の効果】
以上のように、この発明によれば、画像処理装置を、基準画像におけるエピポーラ線に沿って基準画素データを読み取る基準画像読み取り手段と、基準画像におけるエピポーラ線に対応する参照画像におけるエピポーラ線に沿って参照画素データを読み取る参照画像読み取り手段と、参照画像読み取り手段によって読み出された参照画素データを一時的に保持するエピポーラ画素記憶手段とを有するように構成したので、画素データの読み取りを高速かつ効率的に行うことにより全体の処理の高速化を可能にするという効果がある。また、製品のコストダウンを図ることが可能になるという効果がある。
【0089】
この発明によれば、画像処理装置を、参照画像におけるエピポーラ線の傾きによって参照画素データを一時的に保持するエピポーラ画素記憶手段の領域を動的に変化させる制御手段を有するように構成したので、参照画像におけるエピポーラ線の傾きに応じてエピポーラ画素記憶手段の領域を柔軟に活用できるという効果がある。
【0090】
この発明によれば、画像処理装置の参照画像読み取り手段を、参照画像におけるエピポーラ線の傾きによってそのエピポーラ線に沿った参照画像の特定の領域のみをエピポーラ画素記憶手段に記憶するように構成したので、エピポーラ画素記憶手段の記憶容量を少なくすることにより、製品のさらなるコストダウンを図ることが可能になるという効果がある。
【0091】
この発明によれば、画像処理装置の参照画像読み取り手段を、エピポーラ画素記憶手段に対応する参照画素データがない場合には、主記憶装置から参照画素データを読み込むように構成したので、必要な画素データの読み取り欠落を回避できるという効果がある。
【0092】
この発明によれば、画像処理装置を、複数の参照画像を用いて各参照画像のエピポーラ線を算出し、算出した各エピポーラ線に対応する基準画像の複数のエピポーラ線から共通のエピポーラ線を算出する制御手段を有するように構成したので、極めて高速の画像処理を実現できるという効果がある。
【0093】
この発明によれば、画像処理のプログラムを、基準画像におけるエピポーラ線に沿って基準画素データを読み取る第1のステップと、基準画像におけるエピポーラ線に対応する参照画像におけるエピポーラ線に沿って参照画素データを読み取る第2のステップと、第2のステップによって読み出された参照画素データをエピポーラ画素記憶手段に一時的に記憶する第3のステップとを有するように構成したので、画素データの読み取りを高速かつ効率的に行うことにより全体の処理の高速化を可能にするという効果がある。また、製品のコストダウンを図ることが可能になるという効果がある。
【0094】
この発明によれば、画像処理のプログラムを、参照画像におけるエピポーラ線の傾きによって参照画素データを一時的に記憶するエピポーラ画素記憶手段の領域を動的に変化させる第4のステップをさらに有するように構成したので、参照画像におけるエピポーラ線の傾きに応じてエピポーラ画素記憶手段の領域を柔軟に活用できるという効果がある。
【0095】
この発明によれば、画像処理のプログラムにおける第2のステップを、参照画像におけるエピポーラ線の傾きによってそのエピポーラ線に沿った参照画像の特定の領域のみをエピポーラ画素記憶手段に記憶するように構成したので、エピポーラ画素記憶手段の記憶容量を少なくすることにより、製品のさらなるコストダウンを図ることが可能になるという効果がある。
【0096】
この発明によれば、画像処理のプログラムにおける第2のステップを、エピポーラ画素記憶手段に対応する参照画素データがない場合には、主記憶装置から参照画素データを読み込むように構成したので、必要な画素データの読み取り欠落を回避できるという効果がある。
【0097】
この発明によれば、画像処理のプログラムを、複数の参照画像を用いて各参照画像のエピポーラ線を算出し、算出した各エピポーラ線に対応する基準画像の複数のエピポーラ線から共通のエピポーラ線を算出する第5のステップをさらに有するように構成したので、極めて高速の画像処理を実現できるという効果がある。
【図面の簡単な説明】
【図1】 この発明の実施の形態1における画像処理装置の構成を示すブロック図である。
【図2】 この発明の実施の形態1において基準画像における画素の配列及びエピポーラ線を示す図である。
【図3】 この発明の実施の形態1における処理完了画素を記録する表を示す図である。
【図4】 この発明の実施の形態1において参照画像における画素の配列及びエピポーラ線を示す図である。
【図5】 この発明の実施の形態1における一時記憶手段の記憶エリアを示す図である。
【図6】 この発明の実施の形態1における画像処理のプログラムを示すフローチャートである。
【図7】 図6における距離画像生成処理のフローチャートである。
【図8】 2つの画像の対応する点のエピポーラ線を示す一般的な図である。
【符号の説明】
1 画像処理装置、2 画像入力手段、3 移動手段、4 基準画像記憶手段、5 参照画像記憶手段(主記憶装置)、6 基準画像読み取り手段、7 参照画像読み取り手段、8 一時記憶手段(エピポーラ画素記憶手段)、9 距離画像生成手段、10 距離画像出力手段、11 三次元位置方位センサ、21 基準画像、22 参照画像、30−1,30−2,30−3 物体、31 基準画像、32 参照画像、P 物体の基準画像、Q1,Q2,Q3 物体の参照画像、Z1,Z2,Z3 基準画像から物体までの距離。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus and an image processing program.
[0002]
[Prior art]
Since restoring three-dimensional information from a two-dimensional moving image captured by a video camera or the like or a multi-viewpoint still image can be expected to be used in fields such as automatic control, many studies have been made.
[0003]
Its basic principle is a stereo method using the principle of triangulation, which finds the corresponding point of each image between images taken from the same object from two or more different viewpoints. This is a method of measuring the distance to the measurement object by obtaining the relationship. When finding the corresponding point of an image from another viewpoint from an image from one viewpoint, if the parameters related to the shooting position, shooting direction, etc. of each image are known, a one-dimensional search in which the depth is unknown using this as a constraint It becomes a problem.
[0004]
As an example, “3D shape restoration from multiple viewpoint images—stereo matching by local affine deformation window”, Information Processing Society of Japan, 98-CVIM-109, pp. In 33-40, an image of a certain viewpoint can be transformed into an image of another viewpoint by performing affine transformation using the shooting position, shooting direction, and depth as parameters, and a corresponding point of the image can be searched using this. It is shown that three-dimensional information can be obtained by doing so.
[0005]
As another example, “Shape recovery from optical flow with reliability information and its application to moving object detection”, IEICE Transactions D-II Vol. J76-D-II No. 8 pp. 1562 to 1571 indicate that corresponding points of an image are obtained from an optical flow generated when the camera moves at a translational speed T and a rotational speed R.
[0006]
In the case of these documents, the corresponding points of the two images satisfy an expression called an epipolar equation and ride on a line called an epipolar line. FIG. 8 is a diagram showing epipolar lines at corresponding points of two images. In FIG. 8, 30 (30-1, 30-2, 30-3) is an object as a subject, 31 is a reference image obtained by imaging the object 30 from a certain viewpoint by a reference camera (not shown) (this) (Hereinafter referred to as “reference image”), 32 is a reference image (hereinafter referred to as “reference image”) obtained by imaging the same object 30 from another viewpoint by another reference camera (not shown). P is a standard image of the object 30 in the standard image 31, and Q1, Q2, and Q3 are reference images of the object 30 in the reference image 32.
[0007]
Next, the operation will be described.
As long as the object 30 exists on a constant line of sight of the reference camera, even if the distance from the reference image 31 to the object 30 changes on the line of sight such as Z1, Z2, and Z3, that is, the object 30 is the object 30. Even if it moves like -1, 30-2, 30-3, the position (coordinates) of the point P on the reference image 31 does not change. On the other hand, when the moving objects 30-1, 30-2, 30-3 are imaged with the reference camera, they appear on the epipolar line E on the reference image 32 like Q1, Q2, Q3, As long as the object 30 exists on a constant line of sight of the reference camera, the image of the object 30 on the reference image 32 does not deviate from the epipolar line E.
[0008]
By searching for a corresponding point corresponding to the point P using such geometric optical properties, the distance to the target object at the point P can be obtained. Three-dimensional information can be acquired by performing this method for all the pixels on the screen.
[0009]
As a method of searching for corresponding points, for example, “stereo matching using a plurality of base line lengths”, IEICE Transactions D-II Vol. J75-D-II No. 8 pp. There is a multi-baseline stereo method at 1317-1327. Here, a method of determining corresponding points using the sum of square errors between a plurality of images is shown. In the multi-baseline stereo method, the reciprocal 1 / Z of the assumed distance Z is changed to obtain the sum of the errors of the pixels corresponding to the corresponding points of the base image and the reference image, and the reciprocal of the distance when the error becomes the smallest. Let 1 / Z be the three-dimensional information (depth) at that pixel. In addition, if such a method is used, it is possible to restore three-dimensional information from images taken from three or more different viewpoints.
[0010]
[Problems to be solved by the invention]
However, when the three-dimensional information is to be restored from the two-dimensional images as described above, the epipolar line is generally an oblique line with respect to the XY coordinate axes of the reference image. For this reason, when an image processing apparatus that restores three-dimensional information is configured, in order to read a reference image from a storage device such as a memory, memory access must be performed discretely. In particular, when recovering 3D information from a continuously changing image such as a 2D moving image, the slope of the epipolar line also changes dynamically, so that access to the memory also changes dynamically. become.
[0011]
Conventionally, when restoring three-dimensional information from two-dimensional images from a plurality of viewpoints, the processing load such as finding corresponding points is heavy, and the computation takes time, so that the memory access time becomes a problem. It never happened. However, with the improvement of semiconductor technology and the like, these processes can be executed at high speed, and the reading speed of the memory may become a bottleneck for the entire process. In this case, since the read data is not continuous but discrete, it is difficult to speed up reading by a technique such as omitting address designation by burst transfer.
As a method for solving such a problem, there is a method using a memory having a high reading speed. However, since such a memory is extremely expensive, the cost of the product is increased and the scale of the apparatus is increased.
That is, in the conventional image processing apparatus, there is a trade-off relationship between increasing the reading speed and reducing the cost of the product, and there is a problem that both requirements cannot be satisfied.
[0012]
The present invention has been made to solve the above-described problems. When a device for restoring three-dimensional information from two-dimensional images from a plurality of viewpoints is to be configured, pixel data can be read at high speed and efficiently. It is an object of the present invention to obtain an image processing apparatus and an image processing program capable of increasing the overall processing speed and reducing the cost of the product.
[0013]
[Means for Solving the Problems]
An image processing apparatus according to the present invention includes a reference image reading unit that reads reference pixel data along an epipolar line in a reference image, and a reference that reads reference pixel data along an epipolar line in a reference image corresponding to the epipolar line in the reference image. Image reading means and epipolar pixel storage means for temporarily holding reference pixel data read by the reference image reading means.
[0014]
The image processing apparatus according to the present invention includes a control unit that dynamically changes an area of an epipolar pixel storage unit that temporarily holds reference pixel data according to an inclination of an epipolar line in a reference image.
[0015]
The reference image reading means of the image processing apparatus according to the present invention stores only a specific region of the reference image along the epipolar line in the epipolar pixel storage means by the inclination of the epipolar line in the reference image.
[0016]
The reference image reading means of the image processing apparatus according to the present invention reads the reference pixel data from the main storage device when there is no reference pixel data corresponding to the epipolar pixel storage means.
[0017]
The image processing apparatus according to the present invention calculates the epipolar line of each reference image using a plurality of reference images, and controls to calculate a common epipolar line from the plurality of epipolar lines of the reference image corresponding to each calculated epipolar line It has a means.
[0018]
The image processing program according to the present invention reads the reference pixel data along the epipolar line in the reference image corresponding to the first step of reading the reference pixel data along the epipolar line in the reference image, and the epipolar line in the reference image. The second step and the third step of temporarily storing the reference pixel data read out in the second step in the epipolar pixel storage means.
[0019]
The image processing program according to the present invention further includes a fourth step of dynamically changing the region of the epipolar pixel storage means for temporarily storing the reference pixel data according to the inclination of the epipolar line in the reference image.
[0020]
In the second step of the image processing program according to the present invention, only a specific region of the reference image along the epipolar line is stored in the epipolar pixel storage means by the inclination of the epipolar line in the reference image. .
[0021]
The second step in the image processing program according to the present invention is to read the reference pixel data from the main storage device when there is no reference pixel data corresponding to the epipolar pixel storage means.
[0022]
The image processing program according to the present invention calculates an epipolar line of each reference image using a plurality of reference images, and calculates a common epipolar line from the plurality of epipolar lines of the reference image corresponding to each calculated epipolar line. The method further includes a fifth step.
[0023]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described below.
Embodiment 1 FIG.
FIG. 1 is a block diagram showing the configuration of the image processing apparatus according to Embodiment 1 of the present invention. In FIG. 1, 1 is an image processing apparatus, 2 is an image input means for inputting pixel data of a standard image and a reference image, 3 is a moving means on which the image input means 2 is mounted, and 4 is sent from the image input means 2. The reference image storage means for storing the reference image, 5 is a reference image storage means (main storage device) for storing the reference image sent from the image input means 2, and 6 determines which pixel data of the reference image is to be read. The reference image reading means for executing the reading from the reference image storage means 4, and the reference image 7 determines which pixel data of the reference image is read based on which pixel of the reference image is read by the reference reading means 6. The reference image reading means 8 executes the reading of the pixel data of the reference image. The reference image reading means 8 reads the pixel data of the reference image read from the reference image storage means 5 in accordance with the instruction of the reference image reading means 7. Temporary storage means (epipolar pixel storage means) for temporally storing, 9 is a distance image generating means for generating a distance image from pixel data of a reference image and pixel data of a reference image corresponding thereto, and 10 is a distance image generating means 9 A distance image output means 11 for outputting the calculated distance image data, 11 is a three-dimensional position and orientation sensor for measuring position information and orientation information when the image input means 2 acquires an image.
[0024]
Although not shown in FIG. 1, there is a control unit that controls the image processing apparatus 1 as a whole. The moving unit 3, the reference image reading unit 6, the reference image reading unit 7, the distance image generating unit 9, The distance image output means 10 is connected via a system bus or the like, and controls each of these means. However, in the following, in order to simplify the description, it is assumed that the standard image reading unit 6, the reference image reading unit 7, the distance image generating unit 9 and the like execute data processing themselves.
[0025]
The standard image storage unit 4 and the reference image storage unit 5 described above are constituted by a memory connected to the outside of the distance image generation unit 9, for example. On the other hand, the temporary storage means 8 can exchange data with the reference image reading means 7 at a higher speed than these memories, but is constituted by an internal memory or a cache having a small storage capacity. However, the present invention is not limited to the above configuration. That is, the standard image reading unit 6, the reference image reading unit 7, the temporary storage unit 8, and the distance image generating unit 9 do not need to be configured by separate devices (devices), and may be configured by one LSI or the like. .
[0026]
The image input unit 2 is assumed to be a photographing unit such as a camera, but may be input from an external storage device or input from another image processing device. The distance image output means 10 is a display, for example, but may be an output to an external storage device or another image processing apparatus.
[0027]
Next, the operation will be described.
First, an outline of an image processing method by the image processing apparatus 1 will be described in the following order (1) to (7).
(1) The image input means 2 takes an image of the subject and sends it to the reference image storage means 4 as a reference image. Further, at the time of shooting, the three-dimensional position / orientation sensor 11 acquires position information and direction information and sends them to the reference image storage means 4. The reference image storage unit 4 stores image data, position information, and orientation information as one set.
[0028]
(2) The moving means 3 moves from the position where the reference image is taken. Next, the image input unit 2 captures an imaging target and sends it to the reference image storage unit 5 as a reference image. In addition, the three-dimensional position / orientation sensor 11 acquires position information and direction information and sends them to the reference image storage unit 5 at the time of photographing. The reference image storage means 5 stores image data, position information, and orientation information as one set.
[0029]
(3) The reference image reading unit 6 reads the position information and the azimuth information of the reference image to be processed and the reference image from the reference image storage unit 4 and the reference image storage unit 5, respectively. Next, the standard image reading means 6 calculates the inclinations of the epipolar lines on the standard image and the reference image from these position information and orientation information. The calculated inclination is sent to the reference image reading means 7.
[0030]
(4) The reference image reading unit 6 reads pixel data on the reference image from the reference image storage unit 4 along the epipolar line. Every time one piece of pixel data is read, the reference image reading unit 6 sends the read pixel data and the position on the image to the distance image generation unit 9. Also, information on the position of the read pixel on the image is sent to the reference image reading means 7. After reading all the pixel data on a certain epipolar line, the epipolar line is shifted (shifted) and sequentially read to read all the pixel data on the reference image.
[0031]
(5) When the standard image reading means 6 reads pixel data of a new epipolar line, the reference image reading means 7 obtains an epipolar line on the reference image corresponding thereto, and the pixel data along the line is referred to as reference image storage means. 5 is read and written in the temporary storage means 8.
[0032]
(6) The reference image reading unit 7 calculates pixels on the reference image corresponding to the pixels on the standard image sent from the standard image reading unit 6. Thereafter, the corresponding pixel data is read from the temporary storage unit 8 and sent to the distance image generation unit 9.
[0033]
(7) The distance image generation means 9 calculates a distance image from the pixel data sent from the standard image reading means 6 and the pixel data sent from the reference image reading means 7 and sends the distance image to the distance image output means 10. .
The image processing apparatus 1 generates a distance image by the above operation.
[0034]
FIG. 2 is a diagram showing the pixel arrangement and epipolar lines in the reference image in the first embodiment of the present invention. In FIG. 2, 21 is a reference image. Assuming an arbitrary epipolar line (dotted line in FIG. 2) on the reference image 21, each pixel data along the epipolar line and a plurality of pixel data along the epipolar line of the reference image in FIG. Generate a distance image.
[0035]
In this example, it is assumed from the epipolar equation that the inclination angle of the epipolar line on the standard image is α, and the inclination of the epipolar line on the reference image of FIG. However, here, −π / 2 <α ≦ π / 2 and −π / 2 <β ≦ π / 2. α and β can be obtained by obtaining the translational speed T and the rotational speed R between the two images from the position information and orientation information of the standard image and the reference image, and then deriving the epipolar equation.
[0036]
In addition, both the size of the standard image and the reference image are 64 pixels wide and 64 pixels high, the pixel at the lower left corner of the image is the origin (0, 0), the horizontal axis is the X axis, and the vertical axis is the Y axis. The coordinates of the point on the right x pixel and the upper y pixel from the origin are represented as (x, y). Further, the search for Z is performed on the assumption that the distance Z to the target is a nine-step distance in the range from Z0 to Z8. In the following example, the pixel data of the corresponding point Q (x ′, y ′) on the reference image with respect to the pixel P (x, y) on the base image is rounded down to the decimal point of the value of x ′, y ′. Pixel data when an integer value is used is used.
[0037]
First, the operation of the reference image reading means 6 will be described according to the following procedures (A1) to (A4).
(A1) The reference image reading means 6 performs case classification as follows according to the angle α.
(I) 0 <α <π / 2
(Ii) -π / 2 <α <0
(Iii) α = 0 or α = π / 2
Hereinafter, first, the case of (i) 0 <α <π / 2 will be described.
[0038]
(A2) First, the reference image reading means 6 reads pixel data of the pixel (0, 63) at the upper left corner on the reference image. Next, an epipolar line (graphically, an epipolar line passing through the pixel (0, 63)) on which the pixel (0, 63) rides is calculated. The epipolar line at this time is y = (tan α) x + 63.
[0039]
(A2-1) The reference image reading means 6 sends the pixel data of the pixel (0, 63) on the epipolar line to the distance image generating means 9 and uses the information (0, 63) indicating the pixel position as a reference image. Send to reading means 7. The reference image reading unit 6 pauses this reading process until the reference image reading unit 7 finishes sending all corresponding points for the pixel (0, 63) to the distance image generating unit 9.
(A2-2) At the time when the processing of the pixel (0, 63) is completed, the pixel (0, 63) is replaced with the “processing completed pixel” of the pixel in the 0th column (x = 0 column) in the reference image reading unit 6. ". FIG. 3 shows a table for recording process completion pixels in the first embodiment of the present invention. As shown in FIG. 3, a table that stores the pixel with the smallest row number (y value) among the pixels that have been processed for each column is created, and the processed pixel is recorded. It is assumed that the values of each column in this table are all 64 (or more default values) at the start of processing.
[0040]
(A3) Next, the y-intercept of the epipolar line is shifted by 1, and y = (tan α) x + 62 is set as a new epipolar line. Thereafter, the standard image reading unit 6 sends a signal indicating that the epipolar line has been updated (shifted) to the reference image reading unit 7, and is a pixel on the epipolar line y = (tan α) x + 62 at the present time (0, 62) and (0, 63) information that is a pixel on the previous epipolar line y = (tan α) x + 63. Thereafter, the processing of (A3-1) to (A3-3) is performed, and pixels between y = (tan α) x + 63 and y = (tan α) x + 62 are read. If pixels only on each epipolar line are read, there is a possibility that the pixel may be lost depending on the angle α of the epipolar line, so the pixels between the two epipolar lines are read.
[0041]
(A3-1) Find a pixel on the epipolar line at x = 0. However, thereafter, the value of y is rounded up to the next decimal point. In this case, (0, 62) is obtained. This pixel is processed as shown in (A2-1).
(A3-2) Next, pixels on the epipolar line in the case of x = 1 are obtained. In this case, the value of y is rounded up to (1, 63). At this time, the reference image reading unit 6 confirms whether or not this pixel is a processing completion pixel, and prevents the pixel processed in the past from being processed twice. Further, it is checked whether there is a skipped pixel due to a rounding error in calculation such as rounding up when obtaining a pixel, and if there is a skipped pixel, the pixel is processed. Specifically, the numerical value in the first column of the table of FIG. 3 is compared with the y value (63 in this case) of the pixel currently being processed.
At this time, since the numerical value in the first column of the table is 64, the pixel (1, 63) is the pixel to be processed for the first time, and no pixel is skipped for x = 1. Continue processing as a thing. After these processes, the pixel (1, 63) is processed as in (A2-1). Further, when processing is completed, it is recorded as “processing completed pixel” as in (A2-2).
(A3-3) The same processing is performed after x = 2, and the pixels (2, 63) and (3, 63) between the epipolar lines y = (tan α) x + 62 and y = (tan α) x + 63 are Processing similar to (A2-1) and (A2-2) is performed.
[0042]
(A4) Hereinafter, similarly, the y-intercept of the epipolar line is shifted one by one, and the processing is sequentially performed. Processing is performed until the pixel (63, 0) corresponding to the last pixel is processed.
[0043]
Next, in the case of (ii) −π / 2 <α <0, processing is started from an epipolar line passing through the pixel (63, 63), and the y-intercept is sequentially lowered to hit the last pixel (0, 0). Process until it is processed. Other than that, the process is the same as (i) 0 <α <π / 2.
(Iii) When α = 0 or α = π / 2, pixels are sequentially read along the X axis or Y axis. Since this is the same as the operation in the conventional general image processing, the description is omitted.
[0044]
By performing the processing as described above, the reference image reading unit 6 reads pixel data for each pixel along the epipolar line in the reference image 21.
[0045]
FIG. 4 is a diagram showing the pixel arrangement and the epipolar line in the reference image in the first embodiment of the present invention. FIG. 5 shows a storage area of the temporary storage means 8. As shown in FIG. 5, the temporary storage means 8 is composed of 64 × 8 (total 512) blocks (addresses), and each block can hold one pixel data. Each block is assigned a serial number from 0 to 511 for identification.
[0046]
Next, operations of the reference image reading unit 7 and the temporary storage unit 8 will be described according to the following procedures (B1) to (B6). It is assumed that the operation here is interlocked with the operation of the reference image reading means 6 described above.
[0047]
(B1) First, the reference image reading unit 7 receives information of the pixel (0, 63) on the standard image from the standard image reading unit 6. This corresponds to the operation of the reference image reading means 6 in (A2) described above. Thereafter, the reference image reading unit 7 obtains the corresponding pixel of the pixel (0, 63) on the standard image by the following procedure, reads it from the reference image storage unit 5, and sends it to the distance image generation unit 9. In the process at this time, writing and reading to the temporary storage unit 8 are not performed.
[0048]
(B1-1) First, the reference image reading unit 7 has a distance Z to the target. 0 In this case, a corresponding point for the pixel (0, 63) on the reference image is obtained. There are various methods for obtaining the corresponding points, but since they are already well-known techniques, a detailed description thereof will be omitted. Now, assuming that the translation speed between images is (Tx, Ty, Tz) and the rotation speed is (Rx, Ry, Rz), the corresponding point Q (x ′, y ′) for the point P (x, y) on the reference image. ) Is as follows. However, here, the unit of distance is assumed to be the focal length (focal length = 1).
x ′ = x + (− Tx + x × Tz) / Z 0 + X × y × Rx− (x 2 -1)
× Ry + y × Rz
y ′ = y + (− Ty + y × Tz) / Z 0 −x × y × Ry + (y 2 -1)
× Rx-x × Rz
The reference image reading means 7 reads this pixel data from the reference image storage means 5 and sends it to the distance image generation means 9.
(B1-2) The reference image reading means 7 obtains corresponding points for the distances Z1 to Z8 in the same manner as (B1-1), reads the pixel data from the reference image storage means 5, and sends it to the distance image generation means 9. . After that, the reference image reading means 7 sends all the pixels corresponding to the pixels (0, 63) on the standard image to the distance image generating means 9 as shown in (A2) above. 6 restarts the pixel reading process to be processed next.
[0049]
(B2) Next, the reference image reading unit 7 receives a signal indicating that the epipolar line has been updated on the standard image from the standard image reading unit 6, and the pixel (0, 62) on the epipolar line at the present time; Information on the pixel (0, 63) on the previous epipolar line is received. This corresponds to the operation of the reference image reading means 6 in (A3) described above. Thereafter, the reference image reading means 7 reads the pixel data from the reference image storage means 5 and writes it in the temporary storage means 8 as in the following (B2-1) to (B2-5).
[0050]
(B2-1) The reference image reading means 7 obtains corresponding points of the pixels (0, 63) and (0, 62) on the standard image in the same manner as (B1-1), and the epipolar line through which the points pass Is calculated. At this time, as shown in FIG. 4, the epipolar line E0 through which the point corresponding to the pixel (0, 63) passes and the epipolar line E1 through which the point corresponding to the pixel (0, 62) passes are respectively represented by the following equations.
E0 {y = (tan β) x + C0}
E1 {y = (tan β) x + C1}
(B2-2) The reference image reading unit 7 divides the temporary storage unit 8 into virtual areas for each L block. At this time, L may be a pixel that is between the epipolar lines E1 and E0 or a size that can store pixels including either line separately for each column. For example, L may be determined according to the slope tanβ of the epipolar line and the interval between the y-intercepts C1 and C0 such that “L> | C1−C0 | + | tanβ | +1” . In this example, L is 4. Hereinafter, the “k-th block in the m-th area” of the blocks divided for each area in the temporary storage unit 8 is referred to as an [m, k] block. At this time, as shown in FIG. 5, it is assumed that the 0th block of the temporary storage means 8 is a [0,0] block, the 1st block is a [0,1] block,. When the last area of the temporary storage means 8 is less than L blocks (when the temporary storage means 8 is not divisible by L), the last area is not used.
[0051]
(B2-3) In FIG. 4, the reference image reading means 7 has the smallest column number (on the leftmost side) among the pixels between the epipolar lines E0 and E1 or the pixels including either line. Record a column number) as the “column number offset start value”. In FIG. After that, the reference image reading means 7 temporarily stores the pixels that are between the epipolar lines E0 and E1 among the 56 columns of pixels or that include either of the lines in ascending order of the row numbers. Is written in the "0" area. For example, pixel (56, 63) is written in the [0, 0] block. However, since the pixels (56, 64) and (56, 65) do not exist, nothing is written in the [0, 1] and [0, 2] blocks.
[0052]
(B2-4) Next, the pixels in the 57th column are written in the area “1” in the same manner. For example, the pixel (57, 62) is written in the [1, 0] block, and the pixel (57, 63) is written in the [1, 1] block. In the same manner, pixels up to 63 columns are written in each area.
(B2-5) In some cases, pixels corresponding to the temporary storage unit 8 cannot be written. For example, when the temporary storage unit 8 is divided into L blocks, L is larger than 8 and pixels between the epipolar lines E0 and E1 from the 0th column to the 63rd column, or one of the lines is included. This is the case where there are 0 to 63 columns. In this case, the reference image reading unit 7 records the last column that can be written in the temporary storage unit 8 as the “column number offset end value”. It is assumed that the pixels in the subsequent columns are not written in the temporary storage unit 8.
[0053]
(B3) Next, the reference image reading unit 7 receives information of the pixel (0, 62) on the standard image from the standard image reading unit 6.
(B3-1) Thereafter, the reference image reading unit 7 obtains the corresponding point of the pixel (0, 62) on the standard image when the distance is Z0 in the same manner as (B1-1). This point is on the epipolar line below
y = (tan β) x + C1
Therefore, the pixel data of the corresponding point is stored in the temporary storage unit 8. This pixel data is assumed to be (x1, y1). At this time, the reference image reading unit 7 reads the corresponding pixel data from the temporary storage unit 8 as in the following (B3-1-1) to (B3-2).
[0054]
(B3-1-1) First, the reference image reading unit 7 determines that x1 of the pixel (x1, y1) is equal to or greater than the “column number offset start value” and equal to or less than the “column number offset end value”. Check. Otherwise, since the corresponding pixel is not stored in the temporary storage unit 8, the corresponding pixel data is read directly from the reference image storage unit 5 and sent to the distance image generation unit 9.
(B3-1-2) Next, the reference image reading unit 7 calculates the value of y of the epipolar line E1 when x = x1, and sets this as the “offset start value of the row number”. In this case
y = (tan β) × 1 + C1
(However, the fraction is rounded down). At this time, since the pixel data of the pixel (x1, y1) is stored in the [x1- (column number offset start value), y1- (row number offset start value)] block of the temporary storage unit 8, Pixel data is called and sent to the distance image generation means 9. Here, as shown in FIG. 4, since the epipolar line E1 is below E0, the epipolar line E1 was used to calculate the “offset start value of the row number”. If the epipolar line E1 is above E0, “offset start value of row number” is calculated using E0.
(B3-2) Similarly, the reference image reading means 7 also applies the points (B3-1) and (B3−3) to the corresponding points of the pixel (0, 62) on the standard image when the distance is from Z1 to Z8. 1-1) and (B3-1-2). At this time, however, the “line number offset start value” is sequentially calculated.
[0055]
(B4) Next, the reference image reading unit 7 receives information of the pixel (1, 63) on the standard image from the standard image reading unit 6. In this case, the same process as in (B3) is performed. Pixel (1, 63) is the following two epipolar lines on the reference image
y = (tan α) x + 63
y = (tan α) x + 62
The corresponding points on the reference image are the following two epipolar lines
y = (tan β) x + C1
y = (tan β) x + C0
Between. For this reason, the pixel data can be read from the temporary storage means 8 as in (B3).
[0056]
(B5) The pixels (2, 63) and (3, 63) received by the reference image reading means 7 are processed in the same manner as (B3).
[0057]
(B6) Next, the reference image reading unit 7 receives a signal indicating that the epipolar line on the standard image has been updated from the standard image reading unit 6, and the pixel (0, 61) on the epipolar line at the present time Information on the pixel (0, 62) on the previous epipolar line is received. In this case, the epipolar line through which the point corresponding to the pixel (0, 61) passes is
2 {y = (tan β) x + C2}
Then, the same processing as (B2-2) to (B2-5) in (B2) is performed on E2 and E1 on the epipolar line. However, the pixel data already in the temporary storage means is not read from the reference image storage means 5.
For example, in FIG. 4, pixels that are between epipolar lines E2 and E1 in column 60, or pixels that include either line, are (60, 59), (60, 60), (60, 61) However, since the image data of the pixel (60, 61) has already been stored in the [1, 0] and [1, 1] blocks of the temporary storage means 8, respectively, the pixel (60, 59), ( 60, 60) only pixel data is read. Thereafter, the pixels (60, 59) to (60, 62) are written in the [1, 0] to [1, 3] blocks of the temporary storage means 8. By performing the processing as described above, the reference image reading unit 7 and the temporary storage unit 8 execute pixel data reading processing and pixel data writing processing for each pixel along the epipolar line.
[0058]
Next, the operation of the distance image generating unit 9 will be described.
The distance image generating means 9 takes the difference between the pixel data sent from the standard image reading means 6 and the pixel data sent from the reference image reading means 7, and a distance that minimizes the absolute value of the difference. Z is output.
[0059]
For example, the distance image generation unit 9 receives pixel data of the pixel (0, 63) on the reference pixel from the reference image reading unit 6. Next, the corresponding pixel Q on the reference image is read from the reference image reading means 7. 0 ~ Q 8 Receive. However, Q 0 Is the distance Z 0 In the same way, Q 1 Is the distance Z 1 The corresponding pixels in the case of. Thereafter, the distance image generation means 9 performs the pixel data of the pixel (0, 63) and the pixel Q. 0 ~ Q 8 The difference between each pixel data is taken. At this time, it is assumed that the combination of the pixel (0, 63) and the pixel Q3 has the smallest absolute value among these nine combinations. In this case, the distance image generating means 9 is Z 3 Is output as a result.
[0060]
By performing the processing as described above, the distance image generating means 9 outputs the distance. In the processing of the distance image generation unit 9 described above, a difference is taken for each pixel, but a difference may be taken for each region including a plurality of pixels.
[0061]
6 and 7 are schematic flowcharts showing an image processing program executed by a control unit (not shown) of the image processing apparatus 1. This program may be stored in advance in a memory such as a ROM of the control means, but the program itself exists independently of the apparatus, and is an external storage medium such as a floppy (registered trademark) disk or CD, or the Internet. It may be installed in a writable memory via the communication line. In this case, the invention of the image processing program is established.
[0062]
In FIG. 6, first, the first pixel of the reference image stored in the reference image storage means 4 is designated (step ST1). In the example of FIG. 2, the pixel (0, 63) is designated. Next, the epipolar line A of the reference image is calculated from the designated pixel (step ST2). Next, pixel data on the epipolar line A (strictly speaking, pixel data along the epipolar line A because there is also pixel data on the two epipolar lines A as described above) is used as a reference by the reference image reading means 6. The image is read from the image storage means 4 and sent to the distance image generation means 9 (step ST3). Also, the epipolar line B of the reference image is calculated from the coordinates (position) of the designated pixel (step ST4).
[0063]
Next, the coordinates of the reference pixels on the epipolar line B (reference pixels along the epipolar line B) are designated for each distance (from Z0 to Z8) (step ST5). Next, the designated reference pixel data is read from the reference image storage means 5 by the reference image reading means 7 and stored in the temporary storage means 8 (step ST6). Then, it is determined whether or not there is a next reference pixel on the epipolar line B (step ST7). If there is a next reference pixel, that pixel is designated (step ST8). And it transfers to step ST5, the coordinate of the reference pixel is designated for every distance (Z0 to Z8), and the process of step ST6 and step ST7 is performed.
That is, as long as there is the next reference pixel on the epipolar line B, the loop processing from step ST5 to step ST8 is repeated, and the pixel data of the reference pixel is sequentially stored in the temporary storage unit 8 as shown in FIG.
[0064]
After the pixel data of all the reference pixels on the epipolar line B are read from the reference image storage means 5 and stored in the temporary storage means 8, that is, when there is no next reference pixel in step ST7, the temporary storage means 8 The stored reference pixels on the epipolar line B are sent to the distance image generating means 9 (step ST9). Next, distance image generation processing is executed by the distance image generation means 9 (step ST10).
[0065]
Note that the distance image generation process executed by the distance image generation means 9 is performed for each reference pixel as shown in the flowchart of the next FIG. 7, and therefore, on the epipolar line B related to one epipolar line A in the reference image. Even if all the reference pixels are not stored in the temporary storage unit 8, the reference image reading unit 7 can read the reference pixels from the temporary storage unit 8 and send them to the distance image generation unit 9.
[0066]
When the process from step ST3 to step ST10 is completed for one epipolar line A of the reference image, the epipolar line A is shifted (step ST11). As a result of this shift, it is determined whether or not there is no reference pixel in the reference image storage means 4 (step ST12). That is, it is determined whether or not there is a reference pixel passing through the shifted epipolar line A. If there is a reference pixel passing through the shifted epipolar line A, the process proceeds to step ST3 and the loop process up to step ST12 is repeated. If there is no reference pixel passing through the shifted epipolar line A, for example, if the epipolar line A passing through the lower right pixel (63, 0) in FIG. .
[0067]
FIG. 7 is a flowchart of the distance image generation process in step ST10 of FIG. First, the reference pixel P sent to the distance image generation means 9 is designated (step ST21). Next, 0 (initial value) is stored in a pointer n for designating a reference pixel for each distance (in this case, Z0 to Z8) to be compared with the designated standard pixel P, and the pixel data of the standard pixel The default maximum value MAX is stored in the register d (min) for obtaining the minimum value with the pixel data of the reference pixel (step ST22). Then, while incrementing the value of n, that is, in this case, while sequentially specifying the reference pixel data corresponding to the distances Z0 to Z8, the loop processing from step ST23 to step ST28 is repeated.
[0068]
In this loop processing, the reference pixel Q (n) at the distance Z (n) is designated (step ST23), and the absolute value of the difference between the pixel data of the standard pixel P and the pixel data of the reference pixel Q (n) is registered in the register d. Store in (n) (step ST24). Then, it is determined whether or not the value of d (n) is smaller than the value of d (min) (step ST25). When the value of n is 0, the value of d (min) is the maximum value, so the value of d (0) is smaller than the value of d (min). When the value of d (n) is smaller than the value of d (min), the value of d (min) is updated to the value of d (n) (step ST26). Therefore, when the value of n is 0, the value of d (min) is updated to the value of d (0).
[0069]
Next, the value of n is incremented (step ST27), and it is determined whether or not the value of n has become larger than the maximum value nMAX (8 in this case) (step ST28). If the value of n is within the maximum value, the process moves to step ST23 and the loop process is repeated. If the value of d (n) is greater than or equal to the value of d (min) in step ST25, the value of n is incremented in step ST27 without updating the value of d (min).
[0070]
In this loop processing, a reference pixel having a minimum absolute value of a difference from the pixel data of the base pixel P among a plurality of reference pixels Q is obtained. In step ST28, when the value of n becomes larger than the maximum value nMAX, that is, when the comparison between the designated one reference pixel P and the reference pixel Q (n) at all the distances Z (n) is completed. , D (n), the distance Z (n) of the reference pixel Q (n) having the minimum value is output to the distance pixel output means 10 (step ST29).
[0071]
Thereafter, it is determined whether or not there is a next reference pixel (step ST30). If there is a next reference pixel, the process proceeds to step ST21, the reference pixel is designated, and the above processing up to step ST30 is repeated. In step ST30, if there is no next reference pixel to be compared, this flow is terminated and the flow returns to the flow of FIG.
[0072]
As described above, according to the first embodiment, the pixel data of the standard image 21 and the reference image 22 are read along the epipolar line and buffered (temporarily stored) in the temporary storage unit 8. As a result, the number of times of reading data from the reference image storage means 5 can be reduced. For this reason, when restoring three-dimensional information from a two-dimensional moving image or a multi-viewpoint still image, it is possible to increase the overall processing speed by reading pixel data at high speed and efficiently. can get.
In addition, the use of the temporary storage means 8 eliminates the need for an expensive reference image storage means that operates at high speed, so that it is possible to reduce the cost of the product.
[0073]
In the first embodiment, the positional information and the azimuth information of the captured image are acquired using the three-dimensional position / orientation sensor 11 and the epipolar lines and the like are calculated using the acquired positional information and azimuth information. A translation vector, a rotation matrix, or the like between images may be obtained by image processing with the reference image 22 or the like, and an epipolar line or the like may be calculated using the translation vector and rotation matrix.
Further, it is not necessary to acquire position information and azimuth information at the time of image capture, and position information and azimuth information are acquired before or after image capture and recorded in the standard image storage means 4, reference image storage means 5 or the like, and thereafter You may make it perform a process.
[0074]
In the first embodiment, the pixel data of the corresponding point Q (x ′, y ′) on the reference image with respect to the pixel P (x, y) on the base image is a value below the decimal point of x ′, y ′. The pixel data when rounded down to an integer value was used, but if there is a corresponding point between multiple pixels, use a means such as bilinear interpolation to interpolate between multiple images. Also good.
[0075]
Further, in the first embodiment, all the pixel data along the epipolar line of the reference image are collectively called, but when there is no pixel data in the temporary storage unit 8, only the necessary pixel data is stored in the reference image. You may make it the structure which reads from the means 5 sequentially. In this case, there is an effect that it is possible to avoid missing reading of necessary pixel data.
[0076]
Further, according to the first embodiment, since the area of the temporary storage unit 8 is dynamically changed according to the inclination β of the epipolar line B in the reference image, the temporary storage is performed according to the inclination of the epipolar line in the reference image. There is an effect that the area of the means 8 can be flexibly used.
[0077]
Embodiment 2. FIG.
In the first embodiment described above, the storage capacity of the temporary storage unit 8 has 64 × 8 blocks, and has a size capable of holding pixel data for eight rows. When the pixel data corresponding to the temporary storage unit 8 cannot be written, the last column that can be written is recorded as the “column number offset end value” of the column number, and the “column number offset start value” And “pixel number offset end value” are written.
[0078]
On the other hand, when the storage capacity of the temporary storage unit 8 is further small and only about one row of pixel data can be held, there are many states in which pixels corresponding to the temporary storage unit 8 cannot be written. Only the pixel data at the end (first part) of the epipolar line is written in the temporary storage means 8. However, if the pixel at the center of the epipolar line on the reference image is written in the temporary storage unit 8, the pixel data including the corresponding points is more likely to be buffered in the temporary storage unit 8.
[0079]
Therefore, the leftmost column and the rightmost column among the pixels including the epipolar line are calculated, and when the pixel corresponding to the temporary storage unit 8 cannot be written, the central column is temporarily stored. It may be written in the means 8. Therefore, in the image processing method according to the second embodiment, in the operations of the reference image reading unit 7 and the temporary storage unit 8 of the first embodiment, the processes (B2-3) to (B2-5) are performed as follows ( B′2-3) to (B′2-5). Other image processing is the same as in the first embodiment.
[0080]
(B′2-3) The reference image reading means 7 in FIG. 4 uses the smallest column number (in the pixels between the epipolar lines E0 and E1 or among the pixels including either line. The leftmost column number) and the largest column number (rightmost column number) are recorded as the start column number Hs and the end column number He, respectively. Here, either of the following processes (i) and (ii) is performed according to the values of Hs, He, and L. The operation will be described below.
[0081]
(I) The number of columns that can be written to the temporary storage means 8 (in this case, 64 × 6 / L or 64, whichever is smaller, hereinafter this value is H) is between the epipolar lines E0 and E1. If it is smaller than the number (He−Hs + 1) of a column or a column containing either line, the value obtained by adding (He−Hs + 1−H) / 2 to the starting column number Hs is “column number Offset start value ”. Also, a value obtained by adding H-1 to “offset start value of column number” is set as “offset end value of column number”.
(Ii) The number of columns that can be written to the temporary storage means 8 (in this case, 64 × 6 / L or 64, whichever is smaller, hereinafter this value is H) is between the epipolar lines E0 and E1. If the number of columns is greater than or equal to the number of columns (He−Hs + 1) including either line, the start column number Hs is “column number offset start value” and the end column number He is “column number offset”. End value ”.
[0082]
(B′2-4) Among the pixels in the column of “column number offset start value”, a pixel between the epipolar lines E0 and E1 or a pixel including both lines is selected as the row number. Write in the “0” area of the temporary storage means 8 in order from the smallest. Similarly, the columns after “column number offset start value” +1 are sequentially written in the areas after “1”.
[0083]
(B′2-5) It is assumed that the pixels in the column subsequent to the “column number offset end value” are not written in the temporary storage unit 8.
The subsequent processing is the same as the operation after (B3) in the first embodiment.
[0084]
As described above, according to the second embodiment, the specific region of the reference image along the epipolar line (in this case, the column of the central portion, depending on the inclination of the epipolar line in the reference image, (But not limited) is stored in the temporary storage means 8, so even if the storage capacity of the temporary storage means is small, pixel data can be buffered to some extent, and the number of times of data reading from the reference image storage means is reduced. This can be further reduced, and the effect of further speeding up the image processing can be obtained. Further, since the storage capacity of the temporary storage unit may be small, an effect that it is possible to further reduce the cost of the product is obtained.
[0085]
Embodiment 3 FIG.
In the first embodiment described above, the distance image is calculated from two images including one standard image and one reference image. In the third embodiment, the distance image is calculated from three or more images. Perform an image processing method. The operation will be described below.
[0086]
One of the three or more images is used as a standard image, and the rest are used as a plurality of reference images. Differences of corresponding points from the standard image are calculated, and a difference image is added to calculate a distance image. Even in this case, the processing can be performed at high speed by executing the processing for reading data along the epipolar line in parallel with each reference pixel as in the first embodiment. However, in this case, the epipolar line is different for each reference image. In this case, a plurality of epipolar lines with different inclinations are obtained on the reference image. For this reason, the reference image reading unit calculates an intermediate angle of the plurality of epipolar lines or a straight line with an appropriate angle, that is, one common epipolar line, and the data along the calculated common epipolar line. Try to read.
[0087]
As described above, according to the third embodiment, it is possible to realize extremely high-speed image processing by calculating a distance image from three or more images and buffering data in the temporary storage unit 8. can get.
[0088]
【The invention's effect】
As described above, according to the present invention, the image processing apparatus includes the reference image reading unit that reads the reference pixel data along the epipolar line in the reference image, and the epipolar line in the reference image corresponding to the epipolar line in the reference image. The reference image reading means for reading the reference pixel data and the epipolar pixel storage means for temporarily holding the reference pixel data read by the reference image reading means. By performing it efficiently, there is an effect that the whole processing can be speeded up. In addition, there is an effect that the cost of the product can be reduced.
[0089]
According to this invention, the image processing apparatus is configured to have the control unit that dynamically changes the region of the epipolar pixel storage unit that temporarily holds the reference pixel data according to the inclination of the epipolar line in the reference image. There is an effect that the area of the epipolar pixel storage means can be flexibly used according to the inclination of the epipolar line in the reference image.
[0090]
According to this invention, the reference image reading means of the image processing apparatus is configured to store only a specific area of the reference image along the epipolar line in the epipolar pixel storage means by the inclination of the epipolar line in the reference image. By reducing the storage capacity of the epipolar pixel storage means, there is an effect that the cost of the product can be further reduced.
[0091]
According to the present invention, the reference image reading unit of the image processing apparatus is configured to read the reference pixel data from the main storage device when there is no reference pixel data corresponding to the epipolar pixel storage unit. There is an effect that it is possible to avoid missing data reading.
[0092]
According to this invention, the image processing apparatus calculates an epipolar line of each reference image using a plurality of reference images, and calculates a common epipolar line from the plurality of epipolar lines of the reference image corresponding to each calculated epipolar line. Therefore, the present invention has an effect that it is possible to realize extremely high-speed image processing.
[0093]
According to the present invention, the image processing program includes a first step of reading the reference pixel data along the epipolar line in the reference image, and the reference pixel data along the epipolar line in the reference image corresponding to the epipolar line in the reference image. Since the second step of reading out the pixel data and the third step of temporarily storing the reference pixel data read out in the second step in the epipolar pixel storage means, the pixel data can be read at high speed. Moreover, there is an effect that it is possible to speed up the entire processing by performing it efficiently. In addition, there is an effect that the cost of the product can be reduced.
[0094]
According to the present invention, the image processing program further includes a fourth step of dynamically changing an area of the epipolar pixel storage unit that temporarily stores the reference pixel data according to the inclination of the epipolar line in the reference image. Since it comprises, there exists an effect that the area | region of an epipolar pixel memory | storage means can be utilized flexibly according to the inclination of the epipolar line in a reference image.
[0095]
According to the present invention, the second step in the image processing program is configured to store only a specific area of the reference image along the epipolar line in the epipolar pixel storage means by the inclination of the epipolar line in the reference image. Therefore, there is an effect that the cost of the product can be further reduced by reducing the storage capacity of the epipolar pixel storage means.
[0096]
According to the present invention, the second step in the image processing program is configured to read the reference pixel data from the main storage device when there is no reference pixel data corresponding to the epipolar pixel storage means. There is an effect that omission of reading of pixel data can be avoided.
[0097]
According to the present invention, the image processing program calculates the epipolar line of each reference image using the plurality of reference images, and generates a common epipolar line from the plurality of epipolar lines of the reference image corresponding to each calculated epipolar line. Since the fifth step of calculating is further provided, there is an effect that extremely high-speed image processing can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an image processing apparatus according to Embodiment 1 of the present invention.
FIG. 2 is a diagram showing pixel arrangement and epipolar lines in a reference image in Embodiment 1 of the present invention.
FIG. 3 is a diagram showing a table for recording process completion pixels in the first embodiment of the present invention.
FIG. 4 is a diagram showing an arrangement of pixels and epipolar lines in a reference image in Embodiment 1 of the present invention.
FIG. 5 is a diagram showing a storage area of temporary storage means in Embodiment 1 of the present invention.
FIG. 6 is a flowchart showing an image processing program according to the first embodiment of the present invention.
7 is a flowchart of a distance image generation process in FIG.
FIG. 8 is a general diagram showing epipolar lines at corresponding points of two images.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Image processing apparatus, 2 Image input means, 3 Moving means, 4 Reference image storage means, 5 Reference image storage means (main storage device), 6 Reference image reading means, 7 Reference image reading means, 8 Temporary storage means (Epipolar pixel) Storage means), 9 distance image generation means, 10 distance image output means, 11 three-dimensional position and orientation sensor, 21 reference image, 22 reference image, 30-1, 30-2, 30-3 object, 31 reference image, 32 reference Image, reference image of P object, reference image of Q1, Q2, Q3 object, Z1, Z2, Z3 Distance from the reference image to the object.

Claims (10)

対象を異なる方向から撮影した画像を用いて対象の三次元形状を求めることにより距離画像を生成する画像処理装置において、
基準画像におけるエピポーラ線に沿って基準画素データを読み取る基準画像読み取り手段と、
前記基準画像におけるエピポーラ線に対応する参照画像におけるエピポーラ線に沿って参照画素データを読み取る参照画像読み取り手段と、
前記参照画像読み取り手段によって読み出された参照画素データを一時的に保持するエピポーラ画素記憶手段と、
を有することを特徴とする画像処理装置。
In an image processing apparatus that generates a distance image by obtaining a three-dimensional shape of an object using images taken from different directions of the object,
Reference image reading means for reading reference pixel data along an epipolar line in the reference image;
Reference image reading means for reading reference pixel data along the epipolar line in the reference image corresponding to the epipolar line in the reference image;
Epipolar pixel storage means for temporarily holding reference pixel data read by the reference image reading means;
An image processing apparatus comprising:
参照画像におけるエピポーラ線の傾きによって参照画素データを一時的に保持するエピポーラ画素記憶手段の領域を動的に変化させる制御手段を有することを特徴とする請求項1記載の画像処理装置。The image processing apparatus according to claim 1, further comprising a control unit that dynamically changes an area of the epipolar pixel storage unit that temporarily holds the reference pixel data according to an inclination of the epipolar line in the reference image. 参照画像読み取り手段は、参照画像におけるエピポーラ線の傾きによってそのエピポーラ線に沿った参照画像の特定の領域のみをエピポーラ画素記憶手段に記憶することを特徴とする請求項1又は請求項2記載の画像処理装置。3. The image according to claim 1, wherein the reference image reading unit stores only a specific region of the reference image along the epipolar line in the epipolar pixel storage unit according to the inclination of the epipolar line in the reference image. Processing equipment. 参照画像読み取り手段は、エピポーラ画素記憶手段に対応する参照画素データがない場合には、主記憶装置から参照画素データを読み込むことを特徴とする請求項1から請求項3のうちのいずれか1項記載の画像処理装置。4. The reference image reading means reads reference pixel data from a main storage device when there is no reference pixel data corresponding to the epipolar pixel storage means. The image processing apparatus described. 複数の参照画像を用いて各参照画像のエピポーラ線を算出し、算出した各エピポーラ線に対応する基準画像の複数のエピポーラ線から共通のエピポーラ線を算出する制御手段を有することを特徴とする請求項1から請求項4のうちのいずれか1項記載の画像処理装置。A control means for calculating an epipolar line of each reference image using a plurality of reference images and calculating a common epipolar line from a plurality of epipolar lines of a standard image corresponding to each calculated epipolar line. The image processing device according to any one of claims 1 to 4. 対象を異なる方向から撮影した画像を用いて対象の三次元形状を求めることにより距離画像を生成する画像処理のプログラムにおいて、
基準画像におけるエピポーラ線に沿って基準画素データを読み取る第1のステップと、
前記基準画像におけるエピポーラ線に対応する参照画像におけるエピポーラ線に沿って参照画素データを読み取る第2のステップと、
前記第2のステップによって読み出された参照画素データをエピポーラ画素記憶手段に一時的に記憶する第3のステップと、
を有することを特徴とする画像処理のプログラム。
In an image processing program for generating a distance image by obtaining a three-dimensional shape of an object using images taken from different directions of the object,
A first step of reading reference pixel data along an epipolar line in the reference image;
A second step of reading reference pixel data along an epipolar line in a reference image corresponding to an epipolar line in the reference image;
A third step of temporarily storing the reference pixel data read out in the second step in the epipolar pixel storage means;
An image processing program characterized by comprising:
参照画像におけるエピポーラ線の傾きによって参照画素データを一時的に記憶するエピポーラ画素記憶手段の領域を動的に変化させる第4のステップをさらに有することを特徴とする請求項6記載の画像処理のプログラム。7. The image processing program according to claim 6, further comprising a fourth step of dynamically changing an area of epipolar pixel storage means for temporarily storing reference pixel data according to an inclination of an epipolar line in the reference image. . 第2のステップは、参照画像におけるエピポーラ線の傾きによってそのエピポーラ線に沿った参照画像の特定の領域のみをエピポーラ画素記憶手段に記憶することを特徴とする請求項6又は請求項7記載の画像処理のプログラム。8. The image according to claim 6, wherein in the second step, only a specific area of the reference image along the epipolar line is stored in the epipolar pixel storage unit according to the inclination of the epipolar line in the reference image. Processing program. 第2のステップは、エピポーラ画素記憶手段に対応する参照画素データがない場合には、主記憶装置から参照画素データを読み込むことを特徴とする請求項6から請求項8のうちのいずれか1項記載の画像処理のプログラム。The second step reads the reference pixel data from the main storage device when there is no reference pixel data corresponding to the epipolar pixel storage means. The image processing program described. 複数の参照画像を用いて各参照画像のエピポーラ線を算出し、算出した各エピポーラ線に対応する基準画像の複数のエピポーラ線から共通のエピポーラ線を算出する第5のステップをさらに有することを特徴とする請求項6から請求項9のうちのいずれか1項記載の画像処理のプログラム。The method further comprises a fifth step of calculating an epipolar line of each reference image using a plurality of reference images and calculating a common epipolar line from the plurality of epipolar lines of the reference image corresponding to each calculated epipolar line. The image processing program according to any one of claims 6 to 9.
JP2002136050A 2002-05-10 2002-05-10 Image processing apparatus and image processing program Expired - Fee Related JP4159798B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002136050A JP4159798B2 (en) 2002-05-10 2002-05-10 Image processing apparatus and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002136050A JP4159798B2 (en) 2002-05-10 2002-05-10 Image processing apparatus and image processing program

Publications (2)

Publication Number Publication Date
JP2003331262A JP2003331262A (en) 2003-11-21
JP4159798B2 true JP4159798B2 (en) 2008-10-01

Family

ID=29698211

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002136050A Expired - Fee Related JP4159798B2 (en) 2002-05-10 2002-05-10 Image processing apparatus and image processing program

Country Status (1)

Country Link
JP (1) JP4159798B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100795482B1 (en) 2006-11-23 2008-01-16 광주과학기술원 A method and apparatus for encoding or decoding frames of different views in multiview video using rectification, and a storage medium using the same

Also Published As

Publication number Publication date
JP2003331262A (en) 2003-11-21

Similar Documents

Publication Publication Date Title
WO2019170164A1 (en) Depth camera-based three-dimensional reconstruction method and apparatus, device, and storage medium
US10621446B2 (en) Handling perspective magnification in optical flow processing
JP6338021B2 (en) Image processing apparatus, image processing method, and image processing program
US7835441B2 (en) Supporting motion vectors outside picture boundaries in motion estimation process
RU2623806C1 (en) Method and device of processing stereo images
US20130335529A1 (en) Camera pose estimation apparatus and method for augmented reality imaging
US20220084215A1 (en) Dense optical flow processing in a computer vision system
KR19990008059A (en) A method for reproducing and operating a three-dimensional object based on a two-dimensional projection of a three-dimensional object and its apparatus
JP2002228442A (en) Positioning attitude determining method and device, and recording media
US20110122298A1 (en) Image processing apparatus, and method of operating an image processing apparatus
CN110580720B (en) Panorama-based camera pose estimation method
US6774898B1 (en) Image storage method, image rendering method, image storage apparatus, image processing apparatus, image download method, and computer and storage medium
US11682212B2 (en) Hierarchical data organization for dense optical flow processing in a computer vision system
CN111861883A (en) Multi-channel video splicing method based on synchronous integral SURF algorithm
CN107509067B (en) A kind of free view-point image composition method of high-speed high-quality amount
CN110706332B (en) Scene reconstruction method based on noise point cloud
US20190197659A1 (en) Optimized memory access for reconstructing a three dimensional shape of an object by visual hull
JP4159798B2 (en) Image processing apparatus and image processing program
JP2002074337A (en) Method for restoring movement of three-dimensional structure and camera directly from picture intensity
JPS61201581A (en) Method and apparatus for detecting dynamic vector
JP6843552B2 (en) Image processing equipment, image processing methods and programs.
JP7532238B2 (en) GENERATION APPARATUS, GENERATION METHOD, AND PROGRAM
CN117057982B (en) Integrated circuit for performing distortion transformation on image and electronic equipment
RU168781U1 (en) STEREO IMAGE PROCESSING DEVICE
US10866907B2 (en) Eviction prioritization for image processing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050412

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20071101

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071101

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071101

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080604

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

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

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110725

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110725

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120725

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120725

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130725

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees