JP2008090583A - Information processing system, program, and information processing method - Google Patents
Information processing system, program, and information processing method Download PDFInfo
- Publication number
- JP2008090583A JP2008090583A JP2006270524A JP2006270524A JP2008090583A JP 2008090583 A JP2008090583 A JP 2008090583A JP 2006270524 A JP2006270524 A JP 2006270524A JP 2006270524 A JP2006270524 A JP 2006270524A JP 2008090583 A JP2008090583 A JP 2008090583A
- Authority
- JP
- Japan
- Prior art keywords
- image
- corresponding point
- information processing
- processing system
- search
- 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.)
- Pending
Links
- 230000010365 information processing Effects 0.000 title claims abstract description 81
- 238000003672 processing method Methods 0.000 title claims description 4
- 238000000034 method Methods 0.000 claims abstract description 118
- 230000008569 process Effects 0.000 claims description 83
- 230000008859 change Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 5
- 238000003384 imaging method Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000010606 normalization Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Measurement Of Optical Distance (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は、異なる視点から撮像し取得された第1画像および第2画像に関する処理を行う情報処理技術に関する。 The present invention relates to an information processing technique for performing processing related to a first image and a second image captured and acquired from different viewpoints.
ステレオカメラによって異なる視点から撮像し取得された2つの画像の各画素を相互に対応付けし、その得られた対応関係から三角測量の原理に基づいて、画像上の各点の3次元位置を算出する方法が知られている。 Each pixel of two images captured and acquired from different viewpoints by a stereo camera is associated with each other, and the three-dimensional position of each point on the image is calculated from the obtained correspondence based on the principle of triangulation How to do is known.
図12は、画像間の対応点から三角測量の原理に基づいて、3次元位置を算出する方法を模式的に示す図である。 FIG. 12 is a diagram schematically illustrating a method of calculating a three-dimensional position from the corresponding points between images based on the principle of triangulation.
基準カメラと参照カメラとの対応点位置の差がΔdであった場合に、対象物までの距離Dは、次の式で算出される。 When the difference between the corresponding point positions of the reference camera and the reference camera is Δd, the distance D to the object is calculated by the following equation.
D=fB/Δd:
ただし、カメラの基準長をB、カメラレンズの焦点距離をfとする。
D = fB / Δd:
However, the reference length of the camera is B, and the focal length of the camera lens is f.
このとき、対象物の3次元位置(X,Y,Z)は、次の式で算出される。 At this time, the three-dimensional position (X, Y, Z) of the object is calculated by the following equation.
X=xD/f、Y=yD/f、Z=D:
ただし、上記のx、yは、基準画像上の注目画素の座標である。
X = xD / f, Y = yD / f, Z = D:
However, the above x and y are the coordinates of the target pixel on the reference image.
例えば、一方の画像(基準画像)上に設定されたウィンドウ内の画像と、このウィンドウと同サイズで他方の画像(参照画像)上に複数設定される各ウィンドウ内の画像との類似度(相関値)をSAD等を用いて求め、類似度が最も高くなる参照画像上のウィンドウ位置を特定することにより、2つの画像間の対応点を探索する手法がある。このような対応点探索手法を用いれば、ステレオカメラで得られた撮影画像において、その画像上の各点に関する3次元位置の取得が可能となる。 For example, the similarity (correlation) between an image in a window set on one image (reference image) and an image in each window set on the other image (reference image) that is the same size as this window There is a method of searching for a corresponding point between two images by obtaining a value) using SAD or the like and specifying a window position on a reference image having the highest similarity. If such a corresponding point search method is used, it is possible to acquire a three-dimensional position regarding each point on the captured image obtained by the stereo camera.
しかし、上記の対応点探索手法では、一定サイズのウィンドウを用いて画像の類似性を判定するため、そのウィンドウサイズが、必ずしも適切なサイズ(例えば画像の濃度変化に応じて決定されるサイズ)に設定されているとは限らず、高精度な対応点探索を良好に行えないという問題がある。 However, in the above-described corresponding point search method, since the similarity of images is determined using a window of a certain size, the window size is not necessarily an appropriate size (for example, a size determined according to a change in image density). It is not always set, and there is a problem that high-precision corresponding point search cannot be performed satisfactorily.
この問題を改善するための技術としては、例えば特許文献1に開示されるものがある。この技術においては、異なるサイズのウィンドウを基準画像および参照画像に設定し、これら各ウィンドウ内の画像の類似度を判定することにより、対応点探索の精度向上を図っている。
As a technique for improving this problem, there is one disclosed in
しかしながら、上記の特許文献1の技術では、異なるサイズのウィンドウそれぞれで類似度の演算を行わなければならないため、その演算時間が増大してしまい、画像間の対応点探索を迅速に行うことが困難である。
However, in the technique of the above-mentioned
本発明は、上記課題に鑑みてなされたものであり、異なる視点から撮像し取得された2の画像間における対応点の探索を精度良く迅速に行える情報処理技術を提供することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide an information processing technique capable of quickly and accurately searching for corresponding points between two images captured and acquired from different viewpoints.
上記の課題を解決するため、請求項1の発明は、異なる視点から撮像し取得された第1画像および第2画像に関する処理を行う情報処理システムであって、(a)前記第1画像上で指定される指定点に対応した前記第2画像上の対応点を探索する第1探索手段と、(b)前記第1探索手段で行われる第1の対応点探索処理と異なる第2の対応点探索処理により、前記第1画像上の指定点に対応した前記第2画像上の対応点を探索する第2探索手段と、(c)前記第1の対応点探索処理による対応点の探索を実行した後に、当該第1の対応点探索処理を通じて得られた取得情報に基づき、前記第2の対応点探索処理による対応点の再探索を実行するか否かを決定する決定手段とを備え、前記第1探索手段は、(a-1)所定のサイズを有し前記指定点を内包する第1領域を、前記第1画像に設定する第1設定手段と、(a-2)前記所定のサイズを有する第2領域を、前記第2画像における複数の位置に設定する第2設定手段と、(a-3)前記第2設定手段によって設定される第2領域の各位置において、前記第1領域内の画像と前記第2領域内の画像とに関する相関値を算出する相関演算手段と、(a-4)前記相関演算手段で算出される相関値に基づき、前記第2画像上の対応点を探索する手段とを有するとともに、前記取得情報は、前記相関演算手段で得られた前記第2領域の各位置と前記相関値との関係から取得される極値情報である。
In order to solve the above problems, the invention of
また、請求項2の発明は、請求項1の発明に係る情報処理システムにおいて、前記第2の対応点探索処理は、前記第1の対応点探索処理において前記第1領域および前記第2領域のサイズを前記所定のサイズと異なる別のサイズに設定して行われる対応点探索処理である。
Further, the invention according to
また、請求項3の発明は、請求項2の発明に係る情報処理システムにおいて、前記別のサイズは、前記第1領域内の画像に関するコントラスト情報に基づき設定されるサイズである。 According to a third aspect of the present invention, in the information processing system according to the second aspect of the present invention, the different size is a size set based on contrast information relating to an image in the first region.
また、請求項4の発明は、請求項1ないし請求項3のいずれかの発明に係る情報処理システムにおいて、前記取得情報は、前記相関値の極大値に係る極値点の数の情報である。 According to a fourth aspect of the present invention, in the information processing system according to any one of the first to third aspects, the acquired information is information on the number of extreme points related to the maximum value of the correlation value. .
また、請求項5の発明は、請求項4の発明に係る情報処理システムにおいて、前記極値点は、前記相関値に係る極大値が第1の閾値より大きい第1の条件と、極大値をとる第2領域の位置に隣接して設定される第2領域の位置で算出される相関値の、当該極大値に対する比率が第2の閾値より小さい第2の条件とを満たす極大値の点である。 According to a fifth aspect of the present invention, in the information processing system according to the fourth aspect of the present invention, the extreme value point includes a first condition in which the maximum value related to the correlation value is greater than a first threshold, and a maximum value. The point of the maximum value satisfying the second condition in which the ratio of the correlation value calculated at the position of the second region set adjacent to the position of the second region to be taken is smaller than the second threshold value. is there.
また、請求項6の発明は、請求項4または請求項5の発明に係る情報処理システムにおいて、前記決定手段は、(c-1)前記極値点の数が1である場合には、前記第2の対応点探索処理による対応点の再探索を実行しないことを決定する手段を有する。
The invention according to
また、請求項7の発明は、請求項2または請求項3の発明に係る情報処理システムにおいて、前記取得情報は、前記相関値の極大値に係る極値点の数の情報であり、前記決定手段は、(c-2)前記極値点の数が2以上である場合には、当該2以上の極値点それぞれに係る前記第2領域の各位置においてのみ前記相関値を算出する第2の対応点探索処理によって対応点の再探索を実行することを決定する手段を有する。
The invention according to claim 7 is the information processing system according to
また、請求項8の発明は、請求項1の発明に係る情報処理システムにおいて、前記第2の対応点探索処理は、位相限定相関法を用いた対応点探索処理である。 According to an eighth aspect of the present invention, in the information processing system according to the first aspect of the invention, the second corresponding point search process is a corresponding point search process using a phase-only correlation method.
また、請求項9の発明は、情報処理システムに搭載されたコンピュータにおいて実行されることにより、当該情報処理システムを請求項1ないし請求項8のいずれかの発明に係る情報処理システムとして機能させるプログラムである。
The invention of
また、請求項10の発明は、異なる視点から撮像し取得された第1画像および第2画像に関する処理を行う情報処理方法であって、(a)前記第1画像上で指定される指定点に対応した前記第2画像上の対応点を探索する第1探索工程と、(b)前記第1探索工程で行われる第1の対応点探索処理と異なる第2の対応点探索処理により、前記第1画像上の指定点に対応した前記第2画像上の対応点を探索する第2探索工程と、(c)前記第1の対応点探索処理による対応点の探索を実行した後に、当該第1の対応点探索処理を通じて得られた取得情報に基づき、前記第2の対応点探索処理による対応点の再探索を実行するか否かを決定する決定工程とを備え、前記第1探索工程は、(a-1)所定のサイズを有し前記指定点を内包する第1領域を、前記第1画像に設定する第1設定工程と、(a-2)前記所定のサイズを有する第2領域を、前記第2画像における複数の位置に設定する第2設定工程と、(a-3)前記第2設定工程で設定される第2領域の各位置において、前記第1領域内の画像と前記第2領域内の画像とに関する相関値を算出する相関演算工程と、(a-4)前記相関演算工程で算出される相関値に基づき、前記第2画像上の対応点を探索する工程とを有するとともに、前記取得情報は、前記相関演算工程で得られた前記第2領域の各位置と前記相関値との関係から取得される極値情報である。 The invention of claim 10 is an information processing method for performing processing related to a first image and a second image captured and acquired from different viewpoints, and (a) a designated point designated on the first image A first search step for searching for a corresponding point on the corresponding second image; and (b) a second corresponding point search process different from the first corresponding point search process performed in the first search step. A second search step of searching for a corresponding point on the second image corresponding to a specified point on one image; and (c) a search for a corresponding point by the first corresponding point searching process, A determination step for determining whether or not to perform a corresponding point re-search by the second corresponding point search process, based on the acquired information obtained through the corresponding point search process, wherein the first search step includes: (a-1) A first area having a predetermined size and including the designated point is defined as the first image. A first setting step for setting; (a-2) a second setting step for setting the second region having the predetermined size at a plurality of positions in the second image; and (a-3) the second setting. A correlation calculation step of calculating a correlation value between the image in the first region and the image in the second region at each position of the second region set in the step; (a-4) in the correlation calculation step And searching for corresponding points on the second image based on the calculated correlation value, and the acquired information includes each position of the second region and the correlation value obtained in the correlation calculation step. It is extreme value information acquired from the relationship.
請求項1から請求項10の発明によれば、第1の対応点探索処理による対応点の探索を実行した後に、当該第1の対応点探索処理を通じて得られた取得情報(基準画像上の指定点に対応する参照画像上の対応点を探索するために設定される参照画像上の第2領域の各位置と、指定点を内包する第1領域内の画像と第2領域内の画像とに関する相関値との関係から取得される極値情報)に基づき、第1の対応点探索処理と異なる第2の対応点探索処理による対応点の再探索を実行するか否かを決定する。その結果、対応点探索を精度良く迅速に行える。 According to the first to tenth aspects of the present invention, acquired information (designated on the reference image) obtained through the first corresponding point search process after the corresponding point search by the first corresponding point search process is executed. Each position of the second area on the reference image set for searching for the corresponding point on the reference image corresponding to the point, and the image in the first area and the image in the second area including the designated point Based on the extreme value information obtained from the relationship with the correlation value), it is determined whether or not to perform a corresponding point re-search by a second corresponding point search process different from the first corresponding point search process. As a result, the corresponding point search can be performed quickly with high accuracy.
特に、請求項2の発明においては、第2の対応点探索処理が、第1の対応点探索処理において第1領域および第2領域のサイズを所定のサイズと異なる別のサイズに設定して行われる対応点探索処理であるため、対応点の再探索を精度良く行える。 In particular, in the second aspect of the invention, the second corresponding point search process is performed by setting the sizes of the first area and the second area to different sizes from the predetermined size in the first corresponding point search process. Therefore, the corresponding points can be re-searched with high accuracy.
また、請求項3の発明においては、別のサイズは、第1領域内の画像に関するコントラスト情報に基づき設定されるサイズであるため、対応点の再探索を一層精度良く行える。 In another aspect of the invention, the different size is a size set based on the contrast information regarding the image in the first region, so that the corresponding points can be searched again with higher accuracy.
また、請求項4の発明においては、取得情報は、相関値の極大値に係る極値点の数の情報であるため、対応点の再探索を実行すべきか否かを容易に判断できる。 Further, in the invention of claim 4, since the acquired information is information on the number of extreme points related to the maximum value of the correlation value, it can be easily determined whether or not to re-search for corresponding points.
また、請求項5の発明においては、極値点は、相関値に係る極大値が第1の閾値より大きい第1の条件と、極大値をとる第2領域の位置に隣接して設定される第2領域の位置で算出される相関値の、当該極大値に対する比率が第2の閾値より小さい第2の条件とを満たす極大値の点であるため、対応点の再探索を実行すべきか否かを適切に判断できる。 In the invention of claim 5, the extreme point is set adjacent to the first condition where the maximum value related to the correlation value is larger than the first threshold and the position of the second region where the maximum value is taken. Since the correlation value calculated at the position of the second region is a maximum value point that satisfies the second condition in which the ratio of the correlation value to the maximum value is smaller than the second threshold value, whether or not the corresponding point should be re-searched Can be determined appropriately.
また、請求項6の発明においては、極値点の数が1である場合には、第2の対応点探索処理による対応点の再探索を実行しないため、不必要な処理を省いて、対応点探索を高速に行える。
In the invention of
また、請求項7の発明においては、極値点の数が2以上である場合には、当該2以上の極値点それぞれに係る第2領域の各位置においてのみ相関値を算出する第2の対応点探索処理によって対応点の再探索を実行するため、対応点の再探索を迅速に行える。 In the invention of claim 7, when the number of extreme points is two or more, the correlation value is calculated only at each position of the second region relating to each of the two or more extreme points. Since the corresponding points are searched again by the corresponding point search process, the corresponding points can be searched again quickly.
また、請求項8の発明においては、第2の対応点探索処理が位相限定相関法を用いた対応点探索処理であるため、対応点の再探索を精度良く行える。 In the invention of claim 8, since the second corresponding point search process is a corresponding point search process using the phase only correlation method, the corresponding points can be re-searched with high accuracy.
<第1実施形態>
<情報処理システムの構成>
図1は、本発明の第1実施形態に係る情報処理システム1Aの要部構成を示すブロック図である。
<First Embodiment>
<Configuration of information processing system>
FIG. 1 is a block diagram showing a main configuration of an
情報処理システム1Aは、2眼のステレオカメラ2と、ステレオカメラ2にデータ伝送可能に接続する情報処理装置3Aとを備えている。
The
ステレオカメラ2には、それぞれ撮像素子を有する2つの撮像系21、22が設けられている。これらの撮像系21、22では、カメラ正面の被写体をタイミングを同期して異なる視点から撮像できるように構成されており、撮像して取得された各画像データは、データ線CBを介して情報処理装置3Aに送信される。
The
情報処理装置3Aは、例えばパーソナルコンピュータとして構成されており、マウスやキーボードからなる操作部31と、例えば液晶ディスプレイとして構成される表示部32と、ステレオカメラ2からのデータを受信するためのインターフェース(I/F)部33とを備えている。また、情報処理装置3Aは、記憶部34と入出力部35と制御部36とを有している。
The
記憶部34は、例えばハードディスクとして構成されており、後述する対応点探索処理を行うプログラムPGaなどが格納されている。
The
入出力部35は、例えばディスクドライブとして構成されており、光ディスク9とのデータ授受を行うための部位である。
The input /
制御部36は、コンピュータとして働くCPU36aおよびメモリ36bを有しており、情報処理装置3Aの各部を統括的に制御するための部位である。この制御部36で記憶部34内のプログラムPGaが実行されることにより、対応点探索処理(後述)が行えることとなる。
The
制御部36のメモリ36bには、記録媒体である光ディスク9に記録されているプログラムデータを入出力部35を介して格納することができる。これにより、この格納したプログラムを情報処理装置1Aの動作に反映できる。
Program data recorded on the
また、制御部36では、ステレオカメラ2で取得したステレオ画像間の対応点を探索する処理を行えるが、この対応点探索処理について以下で説明する。
Further, the
なお、本実施形態では、説明を簡素化するために、ステレオカメラの収差は良好に補正されており、かつ平行に設定されているものとする。実際のハードがこのような条件になくても、画像処理によって同等の画像に変換することは可能である。 In this embodiment, in order to simplify the description, it is assumed that the aberration of the stereo camera is corrected well and set in parallel. Even if the actual hardware is not in such a condition, it is possible to convert it to an equivalent image by image processing.
<対応点探索処理>
情報処理装置3Aでは、SAD(Sum of Absolute Difference)法を用いたステレオ画像間の対応点探索処理が可能となっている。このSAD法による対応点探索について図2を参照して説明する。
<Corresponding point search processing>
In the
図2は、SAD法を用いた対応点探索処理を説明するための図である。 FIG. 2 is a diagram for explaining the corresponding point search processing using the SAD method.
ステレオカメラ2の撮像系21、22により同期して取得された2つの画像を、基準画像(第1画像)Gaおよび参照画像(第2画像)Gbとして設定する。そして、参照画像Gb上での対応画素(対応点)を探索するために基準画像Ga上で指定される画素(指定点)Waoを中心点として内包するウィンドウ(第1領域)Waを基準画像Ga上に設定するとともに、ウィンドウWaのサイズと同じサイズを有するウィンドウ(第2領域)Wbを参照画像Gbにおける複数の位置に設定する。
Two images acquired in synchronization by the
ここで、ステレオカメラは平行に設置されているため、参照画像Gbにおける複数のウィンドウWbは、最大視差pmaxの範囲にわたって水平方向(横方向)に設定される。例えば、図2に示す参照画像Gb上における位置(視差p=0の位置)Qoから、最大視差pmaxに対応した位置Qmaxまで水平方向に1画素ずつずらせた複数のウィンドウWbが設定される。 Here, since the stereo cameras are installed in parallel, the plurality of windows Wb in the reference image Gb are set in the horizontal direction (lateral direction) over the range of the maximum parallax pmax. For example, a plurality of windows Wb that are shifted one pixel at a time from the position Qo on the reference image Gb shown in FIG. 2 (position where parallax p = 0) to the position Qmax corresponding to the maximum parallax pmax are set.
次に、各視差p、つまり参照画像Gb上に設定されるウィンドウWbの各位置において、基準画像GaにおけるウィンドウWa内の画像と参照画像GbにおけるウィンドウWb内の画像とに関する類似度を示す相関値を演算する。この相関演算では、例えばウィンドウWa内の各画素の濃度をImg1(i,j)、視差pでのウィンドウWb内の各画素の濃度をImg2(i,j+p)として次の式(1)を用いた相関値CORpが算出される。 Next, at each position of the parallax p, that is, the position of the window Wb set on the reference image Gb, a correlation value indicating the similarity between the image in the window Wa in the standard image Ga and the image in the window Wb in the reference image Gb. Is calculated. In this correlation calculation, for example, the density of each pixel in the window Wa is Img1 (i, j), and the density of each pixel in the window Wb at the parallax p is Img2 (i, j + p). Correlation value CORp using is calculated.
上式(1)によって各視差pに対する相関値が算出されると、図2のグラフKfのように視差pと相関値との関係が明らかになる。このグラフKfにおいて相関値の極大値(極値点)をとる視差psに対応するウィンドウWbの中心点が、基準画像Gaの指定点Waoに対応した点となる。すなわち、上式(1)を用いて算出される相関値に基づき相関値のピーク位置を特定することで、基準画像Gaの指定点Waoに対応した参照画像Gb上の対応点が探索されることとなる。 When the correlation value for each parallax p is calculated by the above equation (1), the relationship between the parallax p and the correlation value becomes clear as shown in the graph Kf of FIG. In this graph Kf, the center point of the window Wb corresponding to the parallax ps having the maximum correlation value (extreme point) is the point corresponding to the designated point Wao of the reference image Ga. That is, the corresponding point on the reference image Gb corresponding to the designated point Wao of the standard image Ga is searched by specifying the peak position of the correlation value based on the correlation value calculated using the above equation (1). It becomes.
以下では、各視差pに対する相関値から、相関値の極値点を適切に判断(検出)する手法について説明する。 Hereinafter, a method for appropriately determining (detecting) the extreme value point of the correlation value from the correlation value for each parallax p will be described.
相関値の極値点については、次の式(2)および式(3)を満足する視差pの位置を、極値点として検出することとする。 For the extreme points of the correlation value, the position of the parallax p that satisfies the following equations (2) and (3) is detected as an extreme point.
すなわち、上式(2)のように視差pでの相関値(極大値)に対する両隣の視差(p-1)および視差(p+1)での相関値の割合が閾値α(例えば0.9)より小さい場合(つまりグラフ形状において一定の凸部がある場合)で、かつ視差pでの相関値が閾値βより大きい場合には、その視差pにおいて極値点を持つものと判断する。つまり、相関値に係る極大値が閾値(第1の閾値)βより大きい第1の条件と、極大値をとるウィンドウWbの位置に隣接して設定されるウィンドウWbの位置で算出される相関値の、当該極大値に対する比率が閾値(第2の閾値)αより小さい第2の条件とを満たす極大値の点を、極値点として検出することとする。 That is, the ratio of the correlation value in the adjacent parallax (p-1) and the parallax (p + 1) to the correlation value (maximum value) in the parallax p as shown in the above equation (2) is the threshold α (for example, 0.9). ) Is smaller (that is, when there is a certain convex portion in the graph shape), and if the correlation value at the parallax p is greater than the threshold value β, it is determined that the parallax p has an extreme point. That is, the correlation value calculated based on the first condition where the maximum value related to the correlation value is greater than the threshold (first threshold) β and the position of the window Wb set adjacent to the position of the window Wb having the maximum value. The point of the maximum value that satisfies the second condition in which the ratio to the maximum value is smaller than the threshold value (second threshold value) α is detected as the extreme value point.
次に、以上のような極値点を判断する手法を適用して検出される極値点について、具体例を挙げて説明する。 Next, the extreme points detected by applying the method for determining the extreme points as described above will be described with specific examples.
図3は、極値点の検出について説明するための図である。図3(a)〜(e)では、視差と相関値との関係において想定されるグラフの例示として5種類のグラフ形状を示している。 FIG. 3 is a diagram for explaining detection of extreme points. In FIGS. 3A to 3E, five types of graph shapes are shown as examples of graphs assumed in relation to the parallax and the correlation value.
図3(a)〜(e)に示す各グラフに対し、上記の式(2)および式(3)を適用して検出される極値点について、以下で説明する。 The extreme points detected by applying the above equations (2) and (3) to the graphs shown in FIGS. 3A to 3E will be described below.
図3(a)は、1個の極値点Jkが検出されるケースで、図3(b)は、2個の極値点J1、J2が検出されるケースである。すなわち、図3(a)の極値点Jpおよび図3(b)の各極値点J1、J2は、それぞれ相関値が閾値βより大きく、その相関値に対する両隣りの視差での相関値の割合が閾値α(例えば0.9)より小さい条件を満たしている点である。 FIG. 3A shows a case where one extreme point Jk is detected, and FIG. 3B shows a case where two extreme points J1 and J2 are detected. That is, the extreme value point Jp in FIG. 3A and the extreme value points J1 and J2 in FIG. 3B each have a correlation value larger than the threshold value β, and the correlation values at the parallax adjacent to the correlation value are The ratio satisfies a condition that the ratio is smaller than a threshold value α (for example, 0.9).
図3(c)〜(e)は、それぞれ極値点が検出されない(つまり0個の極値点が検出される)ケースである。すなわち、図3(d)〜(e)のグラフにおいては、相関値(の最大値)が閾値β以下である(つまり上記の式(3)を満足しない)ため、極値点が検出されない。一方、図3(c)のグラフでは、相関値の最大値(極大値)Ekが閾値βより大きいものの、その両隣りの視差での相関値E1、E2の比率が閾値α以上である(つまり上記の式(2)を満足しない)ため、相関値の最大値Ekが極値点として検出されないこととなる。 FIGS. 3C to 3E show cases where no extreme points are detected (that is, zero extreme points are detected). That is, in the graphs of FIGS. 3D to 3E, since the correlation value (the maximum value thereof) is equal to or less than the threshold value β (that is, the above expression (3) is not satisfied), no extreme point is detected. On the other hand, in the graph of FIG. 3C, although the maximum correlation value (maximum value) Ek is larger than the threshold value β, the ratio of the correlation values E1 and E2 in the parallax on both sides is equal to or larger than the threshold value α (that is, Since the above formula (2) is not satisfied), the maximum correlation value Ek is not detected as an extreme point.
以上のような極値点の検出によって、図3(a)のように1個の極値点Jkが検出される場合には、基準画像Gaの指定点Waoに関する参照画像Gbの対応点を容易に特定できるものの、図3(b)のように2個の極値点J1、J2が検出される場合や、図3(c)〜(e)のように極値点が検出されない場合には、参照画像において対応点を特定するのが困難となる。 When one extreme point Jk is detected as shown in FIG. 3A by detecting the extreme points as described above, the corresponding points of the reference image Gb related to the designated point Wao of the standard image Ga can be easily obtained. However, when two extreme points J1 and J2 are detected as shown in FIG. 3B, or when extreme points are not detected as shown in FIGS. Therefore, it is difficult to specify corresponding points in the reference image.
そこで、相関演算によって得られた視差(ウィンドウWbの各位置)と相関値との関係から取得される極値情報(例えば図3(a)〜(e)に示すグラフでの極値点の情報)に基づき、2個以上の極値点が検出される場合や極値点が検出されない場合には、基準画像Ga上のウィンドウWaおよび参照画像Gb上のウィンドウWbのウィンドウサイズを変更し、サイズ変更されたウィンドウで上述の対応点探索処理による対応点の再探索を実行することとする。 Therefore, extreme value information (for example, extreme point information in the graphs shown in FIGS. 3A to 3E) acquired from the relationship between the parallax (each position of the window Wb) obtained by the correlation calculation and the correlation value. ), When two or more extreme points are detected or when no extreme points are detected, the window size of the window Wa on the reference image Ga and the window Wb on the reference image Gb is changed to the size It is assumed that the corresponding point is re-searched by the above-described corresponding point search process in the changed window.
最適なウィンドウサイズは、画像の濃度変化に応じて決定するのが好ましいと言われている。すなわち、濃度の変化が小さい一様な画像部分では、ウィンドウサイズが小さいと類似する参照画像上のウィンドウが多くなってしまうとともに、濃度の変化が大きいエッジ部分では、ウィンドウサイズが大きいと周辺部が雑音となってしまうため、対応点の探索を良好に行うことが困難となる。よって、本実施形態の情報処理装置3Aでは、基準画像GaのウィンドウWa内の画像におけるコントラストを算出し、このコントラストに基づくウィンドウサイズに設定されたウィンドウを用いて対応点の探索を行う。
It is said that the optimum window size is preferably determined according to the density change of the image. That is, in a uniform image portion where the change in density is small, the window on the similar reference image increases when the window size is small, and in the edge portion where the change in density is large, the peripheral portion becomes large when the window size is large. Since it becomes noise, it is difficult to search for the corresponding points satisfactorily. Therefore, in the
具体的には、次の式(4)を用いて基準画像GaにおけるウィンドウWa内の画像のコントラストCTRを算出する。 Specifically, the contrast CTR of the image in the window Wa in the reference image Ga is calculated using the following equation (4).
そして、上式(4)で算出されたコントラストCTRが、予め定められた閾値γより大きい場合には、小さいウィンドウサイズに変更するとともに、コントラストCTRが閾値γ以下である場合には、大きいウィンドウサイズに変更する。このウィンドウサイズの変更については、例えばウィンドウの重心位置(中心点)を中心としてウィンドウの拡大・縮小が行われる。 When the contrast CTR calculated by the above equation (4) is larger than the predetermined threshold γ, the window size is changed to a smaller window size, and when the contrast CTR is equal to or smaller than the threshold γ, the large window size is changed. Change to As for the change of the window size, for example, the window is enlarged / reduced around the center of gravity (center point) of the window.
このようにウィンドウWa内の画像に関するコントラスト情報に基づき別のサイズにサイズ変更されたウィンドウWa、Wbを基準画像Gaおよび参照画像Gbに設定して上述の対応点探索処理を再び実行することにより、1個の極値点が適切に得られるようになるため、対応点の再探索が良好に行えることとなる。 Thus, by setting the windows Wa and Wb resized to different sizes based on the contrast information regarding the image in the window Wa to the base image Ga and the reference image Gb, and executing the corresponding point search process again, Since one extreme point can be obtained appropriately, the corresponding points can be re-searched satisfactorily.
なお、情報処理システム1Aでは、基準画像Gaでの1つの指定点に対応する参照画像Gb上の対応点が特定されると、次の指定点に関する対応点探索処理が行われる。具体的には、ウィンドウWaの中心点を所定の画素数(例えば1画素)だけ右方向にずらせたウィンドウを基準画像Ga上に設定して参照画像Gb上の対応点が探索されることとする。このような指定点を基準画像Ga上の全画素に設定すれば、基準画像Ga上の全画素に対する参照画像Gb上の対応点の特定が可能となる。
In the
<情報処理システム1Aの動作>
図4は、情報処理システム1Aの基本的な動作を示すフローチャートである。この情報処理システム1Aの動作は、制御部36のCPU36aで記憶部34内のプログラムPGaが実行されることにより実施される。
<Operation of
FIG. 4 is a flowchart showing the basic operation of the
ステップS1では、ステレオカメラ2によって撮影されたステレオ画像(基準画像Gaおよび参照画像Gb)をデータ線CBを介して情報処理装置3Aで取得する。
In step S1, the stereo image (standard image Ga and reference image Gb) taken by the
ステップS2では、ウィンドウWaによるスキャン対象が基準画像Gaに存在するかを判定する。すなわち、基準画像Gaの各画素について参照画像Gbの対応点が探索されたか否かを判断する。ここで、スキャン対象が存在する場合には、ステップS3に進み、スキャン対象が残存しない場合には、本フローチャートの動作を終了する。 In step S <b> 2, it is determined whether or not the scan target by the window Wa exists in the reference image Ga. That is, it is determined whether a corresponding point of the reference image Gb has been searched for each pixel of the base image Ga. If the scan target exists, the process proceeds to step S3. If the scan target does not remain, the operation of the flowchart ends.
ステップS3では、基準画像Ga上の指定点に対応した参照画像Gb上の対応点の探索を行う(後で詳述)。 In step S3, a corresponding point on the reference image Gb corresponding to the designated point on the standard image Ga is searched (detailed later).
ステップS4では、ステップS3で得られた各視差に対する相関値のデータから、相関値のグラフ形状を解析する(後で詳述)。 In step S4, the graph shape of the correlation value is analyzed from the correlation value data for each parallax obtained in step S3 (detailed later).
ステップS5では、ステップS4における相関値のグラフ形状の解析結果に基づき、相関値のグラフにおける相関値の極大値に係る極値点の数が1個であるかを判定する。ここで、極値点の数が1個である場合には、ステップS6における対応点の再探索を実行しないことを決定してステップS7に進み、極値点の数が1個以外の場合には、ステップS3において適切な対応点探索処理が行われなかったとしてステップS6に進む。 In step S5, based on the analysis result of the graph shape of the correlation value in step S4, it is determined whether the number of extreme points related to the maximum value of the correlation value in the correlation value graph is one. Here, when the number of extreme points is one, it is decided not to perform the corresponding point re-search in step S6, and the process proceeds to step S7. When the number of extreme points is other than one, Advances to step S6 on the assumption that an appropriate corresponding point search process has not been performed in step S3.
すなわち、ステップS5では、ステップS3での対応点探索処理による対応点の探索を実行した後に、この対応点探索処理を通じて得られた極値点の数の情報(取得情報)に基づき、次のステップS6における対応点の再探索を実行するか否かが決定されることとなる。 That is, in step S5, after the corresponding point search by the corresponding point search process in step S3 is executed, the next step is performed based on the information on the number of extreme points (acquired information) obtained through the corresponding point search process. Whether or not to perform the corresponding point re-search in S6 is determined.
ステップS6では、基準画像Gaおよび参照画像Gbに設定するウィンドウのサイズを変更して対応点の再探索を行う(後で詳述)。すなわち、ステップS3で行われた対応点探索処理と異なる対応点探索処理(第2の対応点探索処理)により、基準画像Ga上の指定点Wao(図2)に対応した参照画像Gb上の対応点が探索される。 In step S6, the size of the window set in the base image Ga and the reference image Gb is changed, and the corresponding points are searched again (detailed later). That is, the correspondence on the reference image Gb corresponding to the designated point Wao (FIG. 2) on the standard image Ga is obtained by the corresponding point search processing (second correspondence point search processing) different from the corresponding point search processing performed in step S3. A point is searched.
ステップS7では、基準画像Ga上での指定点(ウィンドウWaの中心点)に対応した参照画像Gb上の対応点を特定する。この場合、ステップS3における対応点の探索動作によって極値点が1個に定まらない場合でも、ステップS6における対応点の再探索を行うことによって1個の極値点を検出できるため、参照画像Gbにおいて適切に対応点を特定できることとなる。 In step S7, the corresponding point on the reference image Gb corresponding to the designated point (the center point of the window Wa) on the standard image Ga is specified. In this case, even if the extreme point is not fixed to one by the corresponding point search operation in step S3, one extreme point can be detected by re-searching the corresponding point in step S6. In this case, the corresponding points can be appropriately identified.
ステップS8では、スキャン位置を更新する。すなわち、基準画像GaのウィンドウWaを例えば右方向に1画素ずらせた位置に移動させる。なお、横方向に1画素ずらすとウィンドウWaが基準画像Gaからはみ出る場合には、1画素下の左端にウィンドウWaを移動する。 In step S8, the scan position is updated. That is, the window Wa of the reference image Ga is moved to a position shifted by one pixel in the right direction, for example. If the window Wa protrudes from the reference image Ga when shifted by one pixel in the horizontal direction, the window Wa is moved to the left end one pixel below.
図5は、上記ステップS3の動作に対応しており、対応点の探索動作を示すフローチャートである。 FIG. 5 is a flowchart corresponding to the operation in step S3 and showing the corresponding point search operation.
ステップS31では、ステップS1で取得した基準画像Gaおよび参照画像Gbの各画像に同じウィンドウサイズのウィンドウWaおよびウィンドウWbを設定する。ここで、参照画像Gb上のウィンドウWbは、視差p=0の位置(図2のウィンドウ位置Qo)に設定されるものとする。 In step S31, a window Wa and a window Wb having the same window size are set in each of the base image Ga and the reference image Gb acquired in step S1. Here, it is assumed that the window Wb on the reference image Gb is set at a position where the parallax p = 0 (window position Qo in FIG. 2).
ステップS32では、参照画像GbにおけるウィンドウWbの位置に対応する視差pが最大視差pmax未満であるかを判定する。ここで、視差pが最大視差pmax未満の場合にはステップS33に進み、最大視差pmax以上となった場合には、ステップS4に進む。 In step S32, it is determined whether the parallax p corresponding to the position of the window Wb in the reference image Gb is less than the maximum parallax pmax. If the parallax p is less than the maximum parallax pmax, the process proceeds to step S33. If the parallax p is greater than or equal to the maximum parallax pmax, the process proceeds to step S4.
ステップS33では、基準画像GaにおけるウィンドウWa内の画像と、参照画像GbにおけるウィンドウWb内の画像との相関値を算出する。ここでは、上記の式(1)を用いて視差pでの相関値CORpが算出されることとなる。 In step S33, a correlation value between the image in the window Wa in the standard image Ga and the image in the window Wb in the reference image Gb is calculated. Here, the correlation value CORp at the parallax p is calculated using the above equation (1).
ステップS34では、現在設定されている視差pと、ステップS33で算出された相関値とを、例えばメモリ36bに記憶する。
In step S34, the currently set parallax p and the correlation value calculated in step S33 are stored in, for example, the
このステップS34の動作を各視差0〜pmaxにおいて繰り返すことにより、メモリ36bには各視差0〜pmaxと相関値との関係を表すデータが蓄積されることとなる。
By repeating the operation of step S34 for each
ステップS35では、視差pを更新する。具体的には、視差pを例えば1だけ増加させる。これにより、参照画像Gbに設定されるウィンドウWbが右方向に1画素ずれることとなる。 In step S35, the parallax p is updated. Specifically, the parallax p is increased by 1, for example. As a result, the window Wb set in the reference image Gb is shifted by one pixel in the right direction.
図6は、上記ステップS4の動作に対応しており、相関値のグラフ形状の解析動作を示すフローチャートである。 FIG. 6 is a flowchart corresponding to the operation of step S4 and showing the graph value analysis operation of the correlation value.
ステップS41では、上記のステップS34の動作によりメモリ36bに蓄積された各視差0〜pmaxと相関値との関係を示すデータを読み出す。これにより、図2のグラフKfに示すような相関値のグラフ形状が把握できることとなる。
In step S41, data indicating the relationship between each
ステップS42では、ステップS41で読み出されたデータから、相関値の極大値と、その視差とを抽出する。 In step S42, the maximum value of the correlation value and its parallax are extracted from the data read in step S41.
ステップS43では、極大値が閾値βより大きいかを判定する。具体的には、極大値が上記の式(3)を満たしているか否かを判断する。ここで、例えば図3(a)〜(c)のように極大値が閾値βより大きい場合には、ステップS44に進み、例えば図3(d)〜(e)のように極大値が閾値β以下の場合には、ステップS5に進む。 In step S43, it is determined whether the maximum value is larger than the threshold value β. Specifically, it is determined whether or not the maximum value satisfies the above formula (3). Here, when the maximum value is larger than the threshold value β as shown in FIGS. 3A to 3C, for example, the process proceeds to step S44, and the maximum value is set as the threshold value β as shown in FIGS. 3D to 3E, for example. In the following cases, the process proceeds to step S5.
ステップS44では、上記の式(2)および式(3)を満足する極大値を極値点として検出する。例えば、図3(a)では、1個の極値点Jkが検出され、図3(b)では、2個の極値点J1、J2が検出されるとともに、図3(c)では、0個の極値点が検出される。 In step S44, a local maximum value that satisfies the above equations (2) and (3) is detected as an extreme point. For example, one extreme point Jk is detected in FIG. 3A, two extreme points J1 and J2 are detected in FIG. 3B, and 0 in FIG. 3C. Extreme points are detected.
ステップS45では、ステップS44で検出された極値点の数を、例えばメモリ36bに記憶する。具体的には、図3(a)のグラフ形状については極値点の数「1」が記憶され、図3(b)のグラフ形状については極値点の数「2」が記憶される。また、図3(c)のグラフ形状においては極値点の数「0」が記憶されることとなる。
In step S45, the number of extreme points detected in step S44 is stored in, for example, the
ステップS46では、極値点の数を「0」として、例えばメモリ36bに記憶する。
In step S46, the number of extreme points is set to “0”, for example, stored in the
図7は、上記ステップS6の動作に対応しており、対応点の再探索動作を示すフローチャートである。 FIG. 7 is a flowchart corresponding to the operation in step S6 and showing the corresponding point re-search operation.
ステップS61では、基準画像Gaおよび参照画像Gbに対してウィンドウのサイズを再設定する(後で詳述)。 In step S61, the window size is reset for the base image Ga and the reference image Gb (details will be described later).
ステップS62では、ステップS61で再設定されたサイズのウィンドウを基準画像Gaおよび参照画像Gbに設定し、上記のステップS3と同様の動作、つまり図5のフローチャートに示す対応点の探索動作を行う。すなわち、上記のステップS3で行われる対応点探索処理において基準画像Ga上のウィンドウWaおよび参照画像Gb上のウィンドウWbのサイズを、ステップS3でのウィンドウサイズと異なる別のサイズに設定して行われる対応点探索処理が実施される。 In step S62, the window having the size reset in step S61 is set as the standard image Ga and the reference image Gb, and the same operation as in step S3 described above, that is, the corresponding point search operation shown in the flowchart of FIG. 5 is performed. That is, in the corresponding point search process performed in step S3 described above, the size of the window Wa on the standard image Ga and the window Wb on the reference image Gb is set to a different size from the window size in step S3. Corresponding point search processing is performed.
図8は、上記ステップS61の動作に対応しており、ウィンドウサイズの再設定動作を示すフローチャートである。 FIG. 8 is a flowchart corresponding to the operation in step S61 and showing the window size resetting operation.
ステップS71では、基準画像Ga上のウィンドウWa内の画像に関するコントラストを算出する。具体的には、上記の式(4)を用いてコントラストCTRが算出される。 In step S71, the contrast relating to the image in the window Wa on the reference image Ga is calculated. Specifically, the contrast CTR is calculated using the above equation (4).
ステップS72では、ステップS71で算出されたコントラストが閾値γより大きいかを判定する。ここで、コントラストが閾値γより大きい場合には、ステップS73に進み、閾値γ以下の場合には、ステップS76に進む。 In step S72, it is determined whether the contrast calculated in step S71 is larger than the threshold value γ. If the contrast is greater than the threshold γ, the process proceeds to step S73. If the contrast is less than the threshold γ, the process proceeds to step S76.
ステップS73では、基準画像Gaに設定するウィンドウサイズを縮小する。 In step S73, the window size set for the reference image Ga is reduced.
ステップS74では、ステップS73でサイズ変更したウィンドウ内の画像に関するコントラストを再び算出する。 In step S74, the contrast relating to the image in the window whose size has been changed in step S73 is calculated again.
ステップS75では、ステップS74で算出されたコントラストが閾値γより小さいかを判定する。ここで、コントラストが閾値γより小さい場合には、ウィンドウサイズが適切であるとしてステップS79に進む。一方、コントラストが閾値γ以上の場合には、ステップS73に戻って更にウィンドウサイズを縮小する。 In step S75, it is determined whether the contrast calculated in step S74 is smaller than the threshold value γ. If the contrast is smaller than the threshold γ, the window size is appropriate and the process proceeds to step S79. On the other hand, if the contrast is greater than or equal to the threshold γ, the process returns to step S73 to further reduce the window size.
ステップS76では、基準画像Gaに設定するウィンドウサイズを拡大する。 In step S76, the window size set for the reference image Ga is enlarged.
ステップS77では、ステップS76でサイズ変更したウィンドウ内の画像に関するコントラストを再び算出する。 In step S77, the contrast relating to the image in the window whose size has been changed in step S76 is calculated again.
ステップS78では、ステップS77で算出されたコントラストが閾値γより大きいかを判定する。ここで、コントラストが閾値γより大きい場合には、ウィンドウサイズが適切であるとしてステップS79に進む。一方、コントラストが閾値γ以下の場合には、ステップS76に戻って更にウィンドウサイズを拡大する。 In step S78, it is determined whether the contrast calculated in step S77 is larger than the threshold value γ. Here, if the contrast is larger than the threshold γ, it is determined that the window size is appropriate and the process proceeds to step S79. On the other hand, if the contrast is less than or equal to the threshold γ, the process returns to step S76 to further enlarge the window size.
ステップS79では、ステップS73またはステップS76の動作によってサイズ変更したウィンドウを基準画像Ga(および参照画像Gb)に再設定する。 In step S79, the window whose size has been changed by the operation in step S73 or step S76 is reset to the base image Ga (and reference image Gb).
以上で説明した情報処理システム1Aの動作により、SAD法を用いた対応点の探索によって得られた視差と相関値との関係を示すグラフ形状から得られる極値点の数に基づき、ウィンドウサイズを変更した対応点の再探索を行うか否かを決定するため、対応点探索を精度良く迅速に行えることとなる。
Based on the number of extreme points obtained from the graph shape showing the relationship between the parallax and the correlation value obtained by searching for the corresponding points using the SAD method by the operation of the
なお、情報処理システム1Aにおける対応点探索処理については、SAD法を用いて相関値を算出するのは必須でなく、濃度の二乗和を求めるSSD法や、NCC(正規化相互相関)法を用いて相関値を算出するようにしても良い。
For the corresponding point search processing in the
<第2実施形態>
本発明の第2実施形態に係る情報処理システム1Bは、図1に示す第1実施形態の情報処理システム1Aと類似の構成を有しているが、情報処理装置の記憶部に格納されるプログラム(の構成)が異なっている。
<Second Embodiment>
An
すなわち、第2実施形態に係る情報処理装置3Bの記憶部34には、以下で説明する情報処理システム1Bの動作を実行するためのプログラムPGbが記憶されている。
That is, the
<情報処理システム1Bの動作>
情報処理システム1Bでは、図4のフローチャートに示す動作と類似した動作が行われるが、対応点の再探索動作が異なっている。以下では、情報処理システム1Bにおける対応点再探索動作(図4のステップS60の動作)について説明する。
<Operation of
In the
図9は、情報処理システム1Bにおける対応点の再探索動作を示すフローチャートである。
FIG. 9 is a flowchart showing the corresponding point re-search operation in the
ステップS81では、第1実施形態のステップS61(図7)と同様の動作、つまり上述した図8のフローチャートに示すウィンドウサイズの再設定動作を行う。 In step S81, the same operation as step S61 (FIG. 7) of the first embodiment, that is, the window size resetting operation shown in the flowchart of FIG. 8 described above is performed.
ステップS82では、図5のステップS31と同様に、ステレオカメラ2で取得した基準画像Gaおよび参照画像Gbの各画像にウィンドウWaおよびウィンドウWbを設定する。
In step S82, the window Wa and the window Wb are set for each of the standard image Ga and the reference image Gb acquired by the
ステップS83では、フラグFlagに0を代入する。 In step S83, 0 is substituted for the flag Flag.
ステップS84では、図4のステップS4における相関値のグラフ形状の解析結果に基づき、相関値のグラフにおける極値点の数が2以上であるかを判定する。ここで、極値点の数が2以上の場合には、ステップS85に進み、極値点の数が2未満の場合には、ステップS86に進む。 In step S84, it is determined whether the number of extreme points in the correlation value graph is two or more based on the analysis result of the correlation value graph shape in step S4 of FIG. If the number of extreme points is 2 or more, the process proceeds to step S85. If the number of extreme points is less than 2, the process proceeds to step S86.
ステップS85では、フラグFlagに1を代入する。 In step S85, 1 is assigned to the flag Flag.
ステップS86では、図5のステップS32と同様に、参照画像GbにおけるウィンドウWbの位置に対応する視差pが最大視差pmax未満であるかを判定する。ここで、視差pが最大視差pmax未満の場合にはステップS87に進み、最大視差pmax以上となった場合には、ステップS92に進む。 In step S86, as in step S32 of FIG. 5, it is determined whether the parallax p corresponding to the position of the window Wb in the reference image Gb is less than the maximum parallax pmax. If the parallax p is less than the maximum parallax pmax, the process proceeds to step S87. If the parallax p is greater than or equal to the maximum parallax pmax, the process proceeds to step S92.
ステップS87では、フラグFlagが0であるかを判定する。すなわち、図4のステップS4における相関値のグラフ形状の解析動作によって2未満の極値点が検出されたかを否かを判断する。 In step S87, it is determined whether the flag Flag is 0. That is, it is determined whether or not an extreme point less than 2 is detected by the graph shape analysis operation of the correlation value in step S4 of FIG.
このステップS87において、フラグFlagが0である場合には、ステップS89に進む。ただし、図4のステップS4で1個の極値点が検出された場合には本フローチャートの対応点の再探索動作は行われないため、実質的には上記のステップS4で極値点が検出されなかった場合に、ステップS89に進むこととなる。 If the flag Flag is 0 in step S87, the process proceeds to step S89. However, when one extreme point is detected in step S4 of FIG. 4, the corresponding point in this flowchart is not re-searched, so the extreme point is substantially detected in step S4. If not, the process proceeds to step S89.
一方、ステップS87において、フラグFlagが0でない場合、つまり図4のステップS4で2個以上の極値点が検出された場合には、ステップS88に進む。 On the other hand, if the flag Flag is not 0 in step S87, that is, if two or more extreme points are detected in step S4 of FIG. 4, the process proceeds to step S88.
ステップS88では、視差pで極値点をとるかを判定する。具体的には、図4のステップS4で検出された極値点での視差に該当しているか否かを判断する。ここで、視差pで極値点をとる場合には、ステップS89に進み、極値点をとらない場合には、ステップS91に進む。 In step S88, it is determined whether or not the extreme value point is taken with the parallax p. Specifically, it is determined whether or not the parallax at the extreme point detected in step S4 of FIG. Here, when an extreme point is obtained with the parallax p, the process proceeds to step S89, and when an extreme point is not taken, the process proceeds to step S91.
このステップS88の動作は、図4のステップS4で検出された2個以上の極値点の中には、適切な1個の極値点が含まれているものと考えられるため、検出された2個以上の極値点に関する視差のみを対象にステップS89の相関値の演算を行うのに必要な動作となる。このように極値点の数が2以上である場合には当該2以上の極値点それぞれに係るウィンドウWbの各位置においてのみ相関値を算出する対応点探索処理によって対応点の再探索を実行するにより、相関値の算出を効率良く行え、迅速な対応点の再探索が可能となる。 The operation of step S88 is detected because it is considered that one or more appropriate extreme points are included in the two or more extreme points detected in step S4 of FIG. This operation is necessary for calculating the correlation value in step S89 only for the parallax related to two or more extreme points. In this way, when the number of extreme points is 2 or more, the corresponding points are re-searched by the corresponding point search process that calculates the correlation value only at each position of the window Wb related to each of the two or more extreme points. Thus, the correlation value can be calculated efficiently, and the corresponding points can be searched again quickly.
ステップS89〜S91では、図5のステップS33〜35と同様の動作を行う。 In steps S89 to S91, operations similar to those in steps S33 to S35 in FIG. 5 are performed.
ステップS92では、ステップS90で記憶された視差pと相関値との関係のデータを参照し、最大の相関値(つまり1個の極値点)と、その相関値での視差とを決定する。 In step S92, the maximum correlation value (that is, one extreme point) and the parallax at the correlation value are determined by referring to the data on the relationship between the parallax p and the correlation value stored in step S90.
以上の情報処理システム1Bの動作により、第1実施形態と同様の効果を奏する。さらに、本実施形態の情報処理システム1Bでは、対応点探索(図4のステップS3)において2個以上の極値点が検出された場合には、検出された各極値点のみでウィンドウサイズを変更した対応点の再探索(図4のステップS60)を行うため、対応点の再探索を効率良く迅速に行える。
The operation of the
<第3実施形態>
本発明の第3実施形態に係る情報処理システム1Cは、図1に示す第1実施形態の情報処理システムと類似の構成を有しているが、情報処理装置の記憶部に格納されているプログラム(の構成)が異なっている。
<Third Embodiment>
An
すなわち、第3実施形態に係る情報処理装置3Cの記憶部34には、以下で説明する情報処理システム1Cの動作を実行するためのプログラムPGcが記憶されている。
That is, the
<情報処理システム1Cの動作>
情報処理システム1Cでは、図4のフローチャートに示す動作と類似した動作が行われるが、対応点の再探索動作が異なっている。具体的には、情報処理システム1Cにおける対応点の再探索動作では、第1実施形態のようにSAD法を用いた対応点探索処理を行うのではなく、以下で説明する位相限定相関法(POC:Phase Only Correlation)を用いた対応点探索処理を行うように構成されている。
<Operation of
In the
図10は、位相限定相関法を用いた対応点探索処理を説明するための図である。 FIG. 10 is a diagram for explaining the corresponding point search process using the phase only correlation method.
位相限定相関法を用いた対応点探索処理では、まず基準画像上のウィンドウ内の画像と、参照画像上のウィンドウ内の画像とが抽出される。これらの画像については、次の数4のように表されるものとする。 In the corresponding point search process using the phase only correlation method, first, an image in the window on the reference image and an image in the window on the reference image are extracted. These images are expressed as the following Expression 4.
ここで、上記の数4におけるf(n1,n2)およびg(n1,n2)は、基準画像上のウィンドウ内の画像および参照画像上のウィンドウ内の画像を示している。また、N1およびN2は、例えばN1=2M1+1、N2=2M2+1と設定されている。 Here, f (n 1 , n 2 ) and g (n 1 , n 2 ) in the above equation 4 indicate an image in the window on the standard image and an image in the window on the reference image. N 1 and N 2 are set as N 1 = 2M 1 +1 and N 2 = 2M 2 +1, for example.
次に、基準画像および参照画像のウィンドウ内の各画像に対し、次の数5に示す演算式を用いた2次元のフーリエ変換処理T1a、T1bを行う。 Next, two-dimensional Fourier transform processing T1a and T1b using the arithmetic expression shown in the following equation 5 is performed on each image in the window of the standard image and the reference image.
なお、上記の数5のただし書におけるWの添字Pには、N1、N2が代入され、またkの添字sには、1、2が代入される。 Note that N 1 and N 2 are substituted for the subscript P of W in the proviso of the above formula 5, and 1 and 2 are substituted for the subscript s of k.
このようなフーリエ変換処理T1a、T1bが施された各画像に対しては、次の数6に示す演算式を用いて、画像の振幅成分を除去するための規格化処理T2a、T2bが行われる。 For each image subjected to such Fourier transform processing T1a, T1b, normalization processing T2a, T2b for removing the amplitude component of the image is performed using the arithmetic expression shown in the following equation (6). .
規格化処理T2a、T2bが完了すると、次の数7に示す演算式を用いた合成処理T3が行われるとともに、数8に示す演算式を用いた2次元の逆フーリエ変換処理T4が行われる。これにより、各画像間の相関演算が実施されることとなり、その結果(POC値)が出力される。 When the normalization processes T2a and T2b are completed, a synthesis process T3 using the following equation 7 is performed, and a two-dimensional inverse Fourier transform process T4 using the equation 8 is performed. Thereby, the correlation calculation between the images is performed, and the result (POC value) is output.
以上の位相限定相関法を用いた処理により、例えば図11に示すような結果が得られる。この図11においては、ウィンドウ(N1×N2)内で相関が高い箇所のPOC値が大きくなっており、POC値のピークJcに対応する参照画像上のウィンドウ内の位置が、基準画像上のウィンドウの中心点(指定点)に対応した参照画像上の対応点に相当することとなる。 By the processing using the above phase-only correlation method, for example, a result as shown in FIG. 11 is obtained. In FIG. 11, the POC value at a location with high correlation in the window (N 1 × N 2 ) is large, and the position in the window on the reference image corresponding to the peak Jc of the POC value is This corresponds to the corresponding point on the reference image corresponding to the center point (designated point) of the window.
以上のような位相限定相関法を用いた対応点探索処理によれば、画像の振幅成分を除去し画像の位相成分のみで相関演算が行われるため、輝度変動やノイズの影響を抑制して参照画像上の対応点を精度良く探索できる。 According to the corresponding point search process using the phase-only correlation method as described above, the amplitude component of the image is removed, and the correlation calculation is performed only with the phase component of the image. The corresponding points on the image can be searched with high accuracy.
そして、情報処理システム1Cでは、SAD法を用いた対応点探索(図4のステップS3)で良好な結果が得られない場合(つまり極値点数が1以外となる場合)には、上述した位相限定相関法を用いた対応点の再探索を行うため、参照画像上の対応点を精度良く確実に特定できることとなる。
In the
<変形例>
・上記の各実施形態における対応点探索処理(図4のステップS3)では、基準画像の全画素について参照画像上の対応点を探索するのは必須でなく、基準画像で予め定められた画像範囲内の画素のみについて対応点の探索を行うようにしても良い。
<Modification>
In the corresponding point search processing (step S3 in FIG. 4) in each of the above embodiments, it is not essential to search for corresponding points on the reference image for all the pixels of the standard image, and an image range predetermined in the standard image A search for corresponding points may be performed for only the pixels within the pixel.
・上記の第2実施形態においては、図8のステップS72、S75、S78で比較される閾値γが同じ数値に設定されるのは必須でなく、それぞれ異なる数値に設定されていても良い。 In the second embodiment, it is not essential that the threshold value γ compared in steps S72, S75, and S78 of FIG. 8 is set to the same numerical value, and may be set to different numerical values.
1A、1B、1C 情報処理システム
2 ステレオカメラ
3A、3B、3C 情報処理装置
34 記憶部
36 制御部
36b メモリ
J1、J2、Jk 極値点
Ga 基準画像
Gb 参照画像
PGa、PGb、PGc プログラム
Wa、Wb ウィンドウ
1A, 1B, 1C
Claims (10)
(a)前記第1画像上で指定される指定点に対応した前記第2画像上の対応点を探索する第1探索手段と、
(b)前記第1探索手段で行われる第1の対応点探索処理と異なる第2の対応点探索処理により、前記第1画像上の指定点に対応した前記第2画像上の対応点を探索する第2探索手段と、
(c)前記第1の対応点探索処理による対応点の探索を実行した後に、当該第1の対応点探索処理を通じて得られた取得情報に基づき、前記第2の対応点探索処理による対応点の再探索を実行するか否かを決定する決定手段と、
を備え、
前記第1探索手段は、
(a-1)所定のサイズを有し前記指定点を内包する第1領域を、前記第1画像に設定する第1設定手段と、
(a-2)前記所定のサイズを有する第2領域を、前記第2画像における複数の位置に設定する第2設定手段と、
(a-3)前記第2設定手段によって設定される第2領域の各位置において、前記第1領域内の画像と前記第2領域内の画像とに関する相関値を算出する相関演算手段と、
(a-4)前記相関演算手段で算出される相関値に基づき、前記第2画像上の対応点を探索する手段と、
を有するとともに、
前記取得情報は、前記相関演算手段で得られた前記第2領域の各位置と前記相関値との関係から取得される極値情報であることを特徴とする情報処理システム。 An information processing system that performs processing related to a first image and a second image captured and acquired from different viewpoints,
(a) first search means for searching for a corresponding point on the second image corresponding to a specified point specified on the first image;
(b) A corresponding point on the second image corresponding to the designated point on the first image is searched by a second corresponding point searching process different from the first corresponding point searching process performed by the first searching means. Second search means for performing,
(c) After performing the corresponding point search by the first corresponding point search process, based on the acquired information obtained through the first corresponding point search process, the corresponding point search by the second corresponding point search process Determining means for determining whether to perform a re-search;
With
The first search means includes
(a-1) first setting means for setting, in the first image, a first area having a predetermined size and containing the designated point;
(a-2) second setting means for setting the second region having the predetermined size at a plurality of positions in the second image;
(a-3) correlation calculation means for calculating a correlation value related to the image in the first area and the image in the second area at each position of the second area set by the second setting means;
(a-4) means for searching for corresponding points on the second image based on the correlation value calculated by the correlation calculating means;
And having
The information processing system, wherein the acquired information is extreme value information acquired from a relationship between each position of the second region and the correlation value obtained by the correlation calculation means.
前記第2の対応点探索処理は、前記第1の対応点探索処理において前記第1領域および前記第2領域のサイズを前記所定のサイズと異なる別のサイズに設定して行われる対応点探索処理であることを特徴とする情報処理システム。 The information processing system according to claim 1,
The second corresponding point search process is performed by setting the first area and the second area to a different size from the predetermined size in the first corresponding point search process. An information processing system characterized by
前記別のサイズは、前記第1領域内の画像に関するコントラスト情報に基づき設定されるサイズであることを特徴とする情報処理システム。 The information processing system according to claim 2,
The information processing system according to claim 1, wherein the different size is a size set based on contrast information relating to an image in the first region.
前記取得情報は、前記相関値の極大値に係る極値点の数の情報であることを特徴とする情報処理システム。 In the information processing system according to any one of claims 1 to 3,
The acquired information is information on the number of extreme points related to the maximum value of the correlation value.
前記極値点は、前記相関値に係る極大値が第1の閾値より大きい第1の条件と、極大値をとる第2領域の位置に隣接して設定される第2領域の位置で算出される相関値の、当該極大値に対する比率が第2の閾値より小さい第2の条件とを満たす極大値の点であることを特徴とする情報処理システム。 The information processing system according to claim 4,
The extreme point is calculated based on a first condition where the maximum value related to the correlation value is greater than a first threshold, and a position of a second region set adjacent to a position of the second region where the maximum value is taken. An information processing system, wherein a point of a maximum value satisfying a second condition in which a ratio of the correlation value to the maximum value is smaller than a second threshold value.
前記決定手段は、
(c-1)前記極値点の数が1である場合には、前記第2の対応点探索処理による対応点の再探索を実行しないことを決定する手段、
を有することを特徴とする情報処理システム。 In the information processing system according to claim 4 or 5,
The determining means includes
(c-1) means for determining not to re-execute the corresponding point search by the second corresponding point search process when the number of extreme points is one;
An information processing system comprising:
前記取得情報は、前記相関値の極大値に係る極値点の数の情報であり、
前記決定手段は、
(c-2)前記極値点の数が2以上である場合には、当該2以上の極値点それぞれに係る前記第2領域の各位置においてのみ前記相関値を算出する第2の対応点探索処理によって対応点の再探索を実行することを決定する手段、
を有することを特徴とする情報処理システム。 In the information processing system according to claim 2 or claim 3,
The acquired information is information on the number of extreme points related to the maximum value of the correlation value,
The determining means includes
(c-2) When the number of extreme points is two or more, a second corresponding point for calculating the correlation value only at each position of the second region related to each of the two or more extreme points Means for deciding to re-search for corresponding points by a search process;
An information processing system comprising:
前記第2の対応点探索処理は、位相限定相関法を用いた対応点探索処理であることを特徴とする情報処理システム。 The information processing system according to claim 1,
The information processing system, wherein the second corresponding point search process is a corresponding point search process using a phase only correlation method.
(a)前記第1画像上で指定される指定点に対応した前記第2画像上の対応点を探索する第1探索工程と、
(b)前記第1探索工程で行われる第1の対応点探索処理と異なる第2の対応点探索処理により、前記第1画像上の指定点に対応した前記第2画像上の対応点を探索する第2探索工程と、
(c)前記第1の対応点探索処理による対応点の探索を実行した後に、当該第1の対応点探索処理を通じて得られた取得情報に基づき、前記第2の対応点探索処理による対応点の再探索を実行するか否かを決定する決定工程と、
を備え、
前記第1探索工程は、
(a-1)所定のサイズを有し前記指定点を内包する第1領域を、前記第1画像に設定する第1設定工程と、
(a-2)前記所定のサイズを有する第2領域を、前記第2画像における複数の位置に設定する第2設定工程と、
(a-3)前記第2設定工程で設定される第2領域の各位置において、前記第1領域内の画像と前記第2領域内の画像とに関する相関値を算出する相関演算工程と、
(a-4)前記相関演算工程で算出される相関値に基づき、前記第2画像上の対応点を探索する工程と、
を有するとともに、
前記取得情報は、前記相関演算工程で得られた前記第2領域の各位置と前記相関値との関係から取得される極値情報であることを特徴とする情報処理方法。 An information processing method for performing processing related to a first image and a second image captured and acquired from different viewpoints,
(a) a first search step of searching for a corresponding point on the second image corresponding to a specified point specified on the first image;
(b) A corresponding point on the second image corresponding to the designated point on the first image is searched by a second corresponding point searching process different from the first corresponding point searching process performed in the first searching step. A second search step,
(c) After performing the corresponding point search by the first corresponding point search process, based on the acquired information obtained through the first corresponding point search process, the corresponding point search by the second corresponding point search process A decision step for deciding whether to perform a re-search;
With
The first search step includes
(a-1) a first setting step of setting, in the first image, a first area having a predetermined size and including the designated point;
(a-2) a second setting step of setting the second region having the predetermined size at a plurality of positions in the second image;
(a-3) a correlation calculation step of calculating a correlation value regarding the image in the first region and the image in the second region at each position of the second region set in the second setting step;
(a-4) searching for corresponding points on the second image based on the correlation value calculated in the correlation calculation step;
And having
The information processing method, wherein the acquired information is extreme value information acquired from a relationship between each position of the second region and the correlation value obtained in the correlation calculation step.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006270524A JP2008090583A (en) | 2006-10-02 | 2006-10-02 | Information processing system, program, and information processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006270524A JP2008090583A (en) | 2006-10-02 | 2006-10-02 | Information processing system, program, and information processing method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2008090583A true JP2008090583A (en) | 2008-04-17 |
Family
ID=39374660
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006270524A Pending JP2008090583A (en) | 2006-10-02 | 2006-10-02 | Information processing system, program, and information processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2008090583A (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009282762A (en) * | 2008-05-22 | 2009-12-03 | Konica Minolta Holdings Inc | Corresponding point retrieval device |
| JP2009293971A (en) * | 2008-06-03 | 2009-12-17 | Fujifilm Corp | Distance measuring device and method, and program |
| JP2009293970A (en) * | 2008-06-03 | 2009-12-17 | Fujifilm Corp | Distance measuring device and method, and program |
| JP2011027496A (en) * | 2009-07-23 | 2011-02-10 | Konica Minolta Opto Inc | Periphery display device |
| WO2011111247A1 (en) | 2010-03-12 | 2011-09-15 | 日立オートモティブシステムズ株式会社 | Stereo camera device |
| JP2011198378A (en) * | 2011-05-18 | 2011-10-06 | Konica Minolta Holdings Inc | Corresponding point searching device |
| US8903164B2 (en) | 2012-04-17 | 2014-12-02 | Panasonic Corporation | Disparity calculating apparatus and disparity calculating method |
| JP2017199220A (en) * | 2016-04-27 | 2017-11-02 | 株式会社リコー | Information processing device, imaging device, mobile body control system, information processing method, and program |
-
2006
- 2006-10-02 JP JP2006270524A patent/JP2008090583A/en active Pending
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009282762A (en) * | 2008-05-22 | 2009-12-03 | Konica Minolta Holdings Inc | Corresponding point retrieval device |
| JP2009293971A (en) * | 2008-06-03 | 2009-12-17 | Fujifilm Corp | Distance measuring device and method, and program |
| JP2009293970A (en) * | 2008-06-03 | 2009-12-17 | Fujifilm Corp | Distance measuring device and method, and program |
| JP2011027496A (en) * | 2009-07-23 | 2011-02-10 | Konica Minolta Opto Inc | Periphery display device |
| WO2011111247A1 (en) | 2010-03-12 | 2011-09-15 | 日立オートモティブシステムズ株式会社 | Stereo camera device |
| US9443313B2 (en) | 2010-03-12 | 2016-09-13 | Hitachi Automotive Systems, Ltd. | Stereo camera apparatus |
| JP2011198378A (en) * | 2011-05-18 | 2011-10-06 | Konica Minolta Holdings Inc | Corresponding point searching device |
| US8903164B2 (en) | 2012-04-17 | 2014-12-02 | Panasonic Corporation | Disparity calculating apparatus and disparity calculating method |
| JP2017199220A (en) * | 2016-04-27 | 2017-11-02 | 株式会社リコー | Information processing device, imaging device, mobile body control system, information processing method, and program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7471809B2 (en) | Method, apparatus, and program for processing stereo image | |
| US9361699B2 (en) | Imaging system and method | |
| US9237326B2 (en) | Imaging system and method | |
| US9014463B2 (en) | System for real-time stereo matching | |
| JP2006221603A (en) | 3D information restoration device, 3D information restoration method, and 3D information restoration program | |
| CN105744138B (en) | Quick focusing method and electronic equipment | |
| US9430834B2 (en) | Visual perception matching cost on binocular stereo images | |
| EP3460757B1 (en) | Image processing apparatus and image processing system | |
| CN102326394B (en) | Image processing method and device | |
| KR20150114950A (en) | Increasing frame rate of an image stream | |
| JP5318168B2 (en) | Stereoscopic image processing apparatus, stereoscopic image processing method, and program | |
| TWI528783B (en) | Methods and systems for generating depth images and related computer products | |
| CN112053394A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
| JP2008090583A (en) | Information processing system, program, and information processing method | |
| JP2001194126A (en) | Three-dimensional shape measuring device, three-dimensional shape measuring method, and program providing medium | |
| KR101804157B1 (en) | Disparity map generating method based on enhanced semi global matching | |
| JP4337203B2 (en) | Distance image generating apparatus, distance image generating method, and program providing medium | |
| JP2004356747A (en) | Image matching method and apparatus | |
| KR101178015B1 (en) | Generating method for disparity map | |
| US20250220145A1 (en) | Parallax information generation device, parallax information generation method, and parallax information generation program | |
| JP2015158394A (en) | Parallax calculation system, information processing apparatus, information processing method, and program | |
| JP6579816B2 (en) | Image processing apparatus, image processing method, and program | |
| US10430971B2 (en) | Parallax calculating apparatus | |
| KR20180051241A (en) | Method and system for stereo matching by using rectangular window | |
| JP2017126264A (en) | Information processing apparatus, information processing method, and program |