JP2005173995A - Device and method for calculating depth, and program - Google Patents
Device and method for calculating depth, and program Download PDFInfo
- Publication number
- JP2005173995A JP2005173995A JP2003413547A JP2003413547A JP2005173995A JP 2005173995 A JP2005173995 A JP 2005173995A JP 2003413547 A JP2003413547 A JP 2003413547A JP 2003413547 A JP2003413547 A JP 2003413547A JP 2005173995 A JP2005173995 A JP 2005173995A
- Authority
- JP
- Japan
- Prior art keywords
- image
- parallax amount
- depth
- calculating
- image feature
- 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
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Measurement Of Optical Distance (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
Description
本発明は横軸が平行投影な画像を用いてステレオ視することにより奥行きを算出する技術に関するものである。 The present invention relates to a technique for calculating depth by performing stereo viewing using an image whose horizontal axis is parallel projection.
ステレオ画像から奥行きを算出するには、以下の2つの方法が知られている。 The following two methods are known for calculating the depth from a stereo image.
方法1として、一方の画像中の画素を中心とするブロック状の部分画像を切り出してきて、もう一方の画像上でもっとも類似度が高い領域を求め、その領域を対応点とし奥行きを算出するブロックマッチングに基づく方法がある。この方法では画像上すべての領域または濃淡等の特徴を抽出しその特徴点に対して対応点付けを行い、各画素または領域ごとに奥行きを算出する(例えば、非特許文献1参照。)。 Method 1 is a block in which a block-shaped partial image centered on a pixel in one image is cut out, an area having the highest similarity is obtained on the other image, and the depth is calculated using that area as a corresponding point. There are methods based on matching. In this method, all regions on the image or features such as shading are extracted, corresponding points are assigned to the feature points, and the depth is calculated for each pixel or region (see Non-Patent Document 1, for example).
また方法2として、平面や曲面といった3次元の形状モデルを用意し、マッチング処理により得られた類似度を形状モデルのパラメータで張られる空間に投票し、多数決の原理を用いてパラメータを決定することにより、形状を復元する方法がある(例えば、特許文献1参照。)。
上述の方法1は、各ブロック状の部分画像ごとにマッチング処理を行うため、処理時間がかかるという欠点を有している。また各点ごとに奥行きを求めるため、復元する奥行きに優先順位をつけることができず、必要度の低い奥行きまで算出してしまう。このため復元する際に対象物を構成する面の数が非常に多くなり、そのままでは十分なモデル化がなされているとは言えない。さらに算出した奥行きには雑音も多く、たとえば平面モデルを復元したいときでも凹凸のある複雑な形状となってしまい、余計なデータを保存しなければならない場合もある。 The above-described method 1 has a drawback that it takes a long time to perform the matching process for each block-shaped partial image. Further, since the depth is obtained for each point, priority cannot be given to the depth to be restored, and a depth that is less necessary is calculated. For this reason, the number of surfaces constituting the object becomes very large at the time of restoration, and it cannot be said that sufficient modeling is performed as it is. Further, the calculated depth has a lot of noise. For example, even when it is desired to restore the planar model, it becomes a complicated shape with irregularities, and it may be necessary to store extra data.
上述の方法2は、投票を用いているため、必要度の高い物体の奥行きから算出することが可能であるが、計算量が多い上、対象物の領域抽出が難しいという問題がある。また3次元形状を探索するとき投票する空間の次元数は高くなるため、形状復元に投票と多数決の原理によるHough変換(松山 隆司、久野 義徳、井宮 淳 編「コンピュータビジョン」、新技術コミュニケーションズ、1999年7月25日)を用いた場合は、投票する空間の次元数のべき乗に比例して計算量とメモリが増加してしまう。また投票する空間中では異なる図形からの投票軌跡が干渉し、形状復元精度が落ちることがあるが、次元が多いほどその対処は難しくなるという問題がある。 Since the method 2 described above uses voting, it can be calculated from the depth of a highly necessary object. However, there is a problem that the calculation amount is large and it is difficult to extract the region of the object. In addition, since the number of dimensions of the space for voting increases when searching for 3D shapes, Hough transformation based on the principle of voting and majority voting for shape restoration (Takashi Matsuyama, Yoshinori Kuno, Satoshi Imiya “Computer Vision”, New Technology Communications, 1999 July 25th), the amount of calculation and memory increase in proportion to the power of the number of dimensions of the space for voting. In addition, in the voting space, voting trajectories from different figures may interfere and the shape restoration accuracy may decrease, but there is a problem that it is difficult to deal with the more dimensions.
本発明はかかる事情に鑑みなされたもので、その目的は、上記課題を解決した奥行き算出技術を提供することにある。 This invention is made | formed in view of this situation, The objective is to provide the depth calculation technique which solved the said subject.
上記の問題を解決するために、本発明は画像特徴点を算出する画像特徴点算出処理と、画像特徴点に対してのみ投票を行い視差量候補を算出する視差量候補算出処理と、視差量候補から視差量を決定し画像中の奥行きを決定していく視差決定処理を有することを特徴としている。 In order to solve the above problem, the present invention provides an image feature point calculation process for calculating an image feature point, a parallax amount candidate calculation process for calculating a parallax amount candidate by voting only on the image feature point, and a parallax amount It is characterized by having a parallax determination process in which the amount of parallax is determined from candidates and the depth in the image is determined.
これらの処理を奥行き算出装置、奥行き算出方法、および、プログラムとして以下のように実現した。 These processes were realized as a depth calculation device, a depth calculation method, and a program as follows.
請求項1に記載の奥行き算出装置は、横軸が平行投影であるステレオ画像を用いて、画像中の対象物の奥行きを算出する装置であって、対象物を撮影した2枚のステレオ画像並びにこの画像を構成する縦方向のライン画像間の撮影間隔距離およびステレオ画像撮影時のカメラの設置角度を含む撮影パラメータを取得する入出力処理手段と、前記2枚のステレオ画像から画像特徴点を算出する画像特徴点算出処理手段と、前記算出した画像特徴点を用いて投票により視差量候補を算出する視差量候補算出手段と、前記視差量候補から視差量を決定し、この視差量および前記撮影パラメータから奥行きを算出して、この奥行きを前記視差量に対応する画像の領域に付する視差量決定処理手段と、を備えることを特徴とする。 The depth calculation apparatus according to claim 1 is an apparatus that calculates a depth of an object in an image using a stereo image whose horizontal axis is parallel projection, and includes two stereo images obtained by photographing the object, and Input / output processing means for acquiring shooting parameters including the shooting interval distance between the vertical line images constituting this image and the camera installation angle at the time of stereo image shooting, and calculating image feature points from the two stereo images Image feature point calculation processing means for performing, parallax amount candidate calculation means for calculating a parallax amount candidate by voting using the calculated image feature points, and determining a parallax amount from the parallax amount candidates, and the parallax amount and the photographing Parallax amount determination processing means for calculating a depth from the parameter and attaching the depth to an image area corresponding to the parallax amount.
また、請求項2に記載の奥行き算出装置は請求項1において、前記画像特徴点算出処理手段は、前記画像特徴点として、画像上の局所領域における濃淡値の変化の大きい箇所を抽出することを特徴とする。 In addition, the depth calculation apparatus according to claim 2 is characterized in that, in claim 1, the image feature point calculation processing means extracts, as the image feature point, a portion having a large change in gray value in a local region on the image. Features.
また、請求項3に記載の奥行き算出装置は、請求項1または2において、前記視差量候補算出手段は、一方の画像をずらして前記2枚の画像の対応する画像特徴点どうしを重ねるのに必要な差分値を算出し、この差分値に対して投票を行い、得票が閾値以上であったものを視差量候補とすることを特徴とする。 According to a third aspect of the present invention, in the depth calculation apparatus according to the first or second aspect, the parallax amount candidate calculating unit shifts one image and superimposes corresponding image feature points of the two images. A necessary difference value is calculated, a vote is given to the difference value, and a candidate whose vote is equal to or greater than a threshold value is set as a parallax amount candidate.
また、請求項4に記載の奥行き算出装置は、請求項1〜3いずれかにおいて、前記視差量候補算出手段は、前記画像特徴点を用いて視差量候補を算出するときに、画像特徴点間の距離を伸縮させることを特徴とする。 According to a fourth aspect of the present invention, in the depth calculation apparatus according to any one of the first to third aspects, when the parallax amount candidate calculating unit calculates the parallax amount candidates using the image feature points, It is characterized by expanding and contracting the distance.
また、請求項5記載の奥行き算出装置は、請求項1〜4いずれかにおいて、前記視差量決定処理手段は、前記投票された得票数順に視差量候補の処理を行うことで、画像中に占める面積割合の大きい対象物から順に奥行きを算出することを特徴とする。 According to a fifth aspect of the present invention, in the depth calculation apparatus according to any one of the first to fourth aspects, the parallax amount determination processing unit occupies an image by performing processing of parallax amount candidates in order of the voted number of votes. The depth is calculated in order from an object with a large area ratio.
また、請求項6に記載の奥行き算出方法は、横軸が平行投影であるステレオ画像を用いて、画像中の対象物の奥行きを算出する方法であって、対象物を撮影した2枚のステレオ画像並びにこの画像を構成する縦方向のライン画像間の撮影間隔距離およびステレオ画像撮影時のカメラの設置角度を含む撮影パラメータを取得する入出力処理ステップと、前記2枚のステレオ画像から画像特徴点を算出する画像特徴点算出ステップと、前記算出した画像特徴点を用いて投票により視差量候補を算出する視差量候補算出ステップと、前記視差量候補から視差量を決定し、この視差量および前記撮影パラメータから奥行きを算出して、この奥行きを前記視差量に対応する画像の領域に付する視差量決定処理ステップと、を備えることを特徴とする。
The depth calculation method according to
また、請求項7に記載の奥行き算出方法は、請求項6において、前記画像特徴点算出ステップは、前記画像特徴点として、画像上の局所領域における濃淡値の変化の大きい箇所を抽出することを特徴とする。 According to a seventh aspect of the present invention, in the depth calculation method according to the sixth aspect, the image feature point calculating step is to extract, as the image feature point, a portion having a large change in gray value in a local region on the image. Features.
また、請求項8に記載の奥行き算出方法は、前記視差量候補算出ステップは、請求項6または7において、一方の画像をずらして前記2枚の画像の対応する画像特徴点どうしを重ねるのに必要な差分値を算出し、この差分値に対して投票を行い、得票が閾値以上であったものを視差量候補とすることを特徴とする。
Further, in the depth calculation method according to claim 8, in the parallax amount candidate calculation step according to
また、請求項9に記載の奥行き算出方法は、請求項6〜8いずれかにおいて、前記視差量候補算出ステップは、前記画像特徴点を用いて視差量候補を算出するときに、画像特徴点間の距離を伸縮させることを特徴とする。 A depth calculation method according to a ninth aspect of the present invention is the depth calculation method according to any one of the sixth to eighth aspects, wherein the parallax amount candidate calculating step calculates a parallax amount candidate using the image feature points. It is characterized by expanding and contracting the distance.
また、請求項10に記載の奥行き算出方法は、請求項6〜9いずれかにおいて、前記視差量決定処理ステップは、前記投票された得票数順に視差量候補の処理を行うことで、画像中に占める面積割合の大きい対象物から順に奥行きを算出することを特徴とする。 The depth calculation method according to a tenth aspect of the present invention is the depth calculation method according to any one of the sixth to ninth aspects, wherein the parallax amount determination processing step performs processing of the parallax amount candidates in the order of the voted number of votes, thereby including in the image It is characterized in that the depth is calculated in order from an object having a large area ratio.
また、請求項11に記載のプログラムは、前記の請求項1〜10のいずれか1項に記載の奥行き算出装置ムまたは奥行き算出方法を、コンピュータプログラムで記載してそれを実行可能にしたことを特徴とする。 In addition, the program according to claim 11 is a computer program that enables the depth calculation device or the depth calculation method according to any one of claims 1 to 10 to be executed. Features.
これにより市街地などにおける道路沿いの建物までの奥行きのように、画像中の対象物がおおよそ一定の奥行きを持つ場合には、投票を用いることにより、一番多く画像中を占める奥行きから復元することが可能となる。また画像特徴点のみに対して投票を行っているため、処理時間を短くすることができる。また縦エッジ間を数画素伸縮させて投票することで、縦エッジ間の距離が撮影時に伸縮してしまったときにも対応できる。また投票における得票数をもとに視差量候補に優先度を与えることにより、復元したい奥行きの解像度を選択することが可能となる。 Thus, if the object in the image has a roughly constant depth, such as the depth to a building along the road in an urban area, etc., it is restored from the most occupied depth in the image by using voting. Is possible. Further, since the voting is performed only on the image feature points, the processing time can be shortened. In addition, by voting by extending or contracting several pixels between the vertical edges, it is possible to cope with the case where the distance between the vertical edges is expanded or contracted during photographing. Further, by giving priority to the parallax amount candidates based on the number of votes obtained in voting, it becomes possible to select the resolution of the depth to be restored.
なお、ここでいう平行投影とは、物体から放射される平行光と投影面とが交差する点で結像するように表現することであり、実空間中での物体のサイズと画像上での物体のサイズとは比例関係になる。一般に普通のカメラで撮影した場合には、透視投影で表現され、実空間のサイズとは比例関係にはない。またここでいう横軸が平行投影な画像とは、画像横軸が実空間と比例関係にある画像のことを指す。 Note that the parallel projection referred to here is an expression that forms an image at the point where the parallel light radiated from the object intersects the projection plane. The size of the object in real space and the image It is proportional to the size of the object. In general, when shooting with an ordinary camera, it is represented by perspective projection and is not proportional to the size of the real space. Further, the image in which the horizontal axis here is parallel projection refers to an image in which the horizontal axis of the image is proportional to the real space.
また、奥行きを視差量に対応する画像の領域に付することには、縦エッジに該当する対象物にこの縦エッジの視差量から算出した奥行きを付すること、および、縦エッジで挟まれた領域に該当する対象物にこの縦エッジの視差量から算出した奥行きを付することが含まれる。 In addition, in order to attach the depth to the region of the image corresponding to the parallax amount, the depth corresponding to the vertical edge is added to the object corresponding to the vertical edge, and the object is sandwiched between the vertical edges. This includes adding a depth calculated from the parallax amount of the vertical edge to the object corresponding to the region.
本発明により、画像特徴点に対してのみ投票を行い奥行きを算出することにより、奥行き算出に最も重要な大きな対象物から復元することが可能となり、安定して、かつ効率の良い非常に高速な処理を実現できる効果が得られる。また復元する奥行きの解像度を選択できることにより、効率の良いデータ量に調整することが可能となる。これにより効率的に実際の市街地の3次元都市空間を構築できるようになる。 According to the present invention, by calculating the depth by voting only on the image feature points, it is possible to restore from a large object that is most important for the depth calculation, and it is very fast and stable and efficient. The effect which can implement | achieve a process is acquired. In addition, since the resolution of the depth to be restored can be selected, it is possible to adjust to an efficient data amount. This makes it possible to efficiently construct a three-dimensional city space in an actual urban area.
以下、本発明の実施形態について図面を用いて説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
本発明の実施形態では横軸が平行投影な画像を用いたステレオ視により奥行きを算出する。 In the embodiment of the present invention, the depth is calculated by stereo viewing using an image whose horizontal axis is parallel projection.
なお、ここでいう平行投影とは、物体から放射される平行光と投影面とが交差する点で結像するように表現することであり、実空間中での物体のサイズと画像上での物体のサイズとは比例関係になる。一般に普通のカメラで撮影した場合には、透視投影で表現され、実空間のサイズとは比例関係にはない。またここでいう横軸が平行投影な画像とは、画像横軸が実空間と比例関係にある画像のことを指す。 Note that the parallel projection referred to here is an expression that forms an image at the point where the parallel light radiated from the object intersects the projection plane. The size of the object in real space and the image It is proportional to the size of the object. In general, when shooting with an ordinary camera, it is represented by perspective projection and is not proportional to the size of the real space. Further, the image in which the horizontal axis here is parallel projection refers to an image in which the horizontal axis of the image is proportional to the real space.
本実施形態における奥行き算出装置の構成を図1に示す。図1に示すように奥行き算出装置は、オペレータから処理を受け付け、処理結果を奥行きデータベース6ヘ格納する入出力処理手段1と、画像特徴点を算出する画像特徴点算出処理手段2と、画像特徴点算出処理手段2にて算出された画像特徴点を利用して視差量候補を算出する視差量候補算出手段3と、算出された視差量候補から視差量を決定する視差量算出処理手段4とを備えている。
The configuration of the depth calculation apparatus in this embodiment is shown in FIG. As shown in FIG. 1, the depth calculation apparatus receives processing from an operator, stores the processing result in the
また、奥行き算出装置は横軸が平行投影なステレオ画像と、画像を構成する縦方向のライン画像間の撮影間隔距離およびステレオ画像撮影時のカメラの設置角度を含む撮影パラメータを格納する画像データベース5、および、処理対象となる画像に奥行き情報を付加したデータを格納する奥行きデータベース6に接続しているか、またはこれらを備えているものとする。
In addition, the depth calculation apparatus stores an
ここで、奥行き算出装置の各手段について説明するにあたり、先ず入出力処理手段1から説明する。入出力処理手段1は画像データベース5から処理対象画像を入力し、画像特徴点算出処理手段2、視差量候補算出手段3、および、視差量決定処理手段4によりこの処理対象画像の奥行きを算出した結果を奥行きデータベース6ヘ格納する。この処理は図2に示す手順で以下のように行われる。
Here, in describing each unit of the depth calculation apparatus, first, the input / output processing unit 1 will be described. The input / output processing unit 1 inputs the processing target image from the
(S21)入出力処理手段1が画像データベース5から、ステレオ視をおこなうための2枚の処理対象画像とその縦方向のライン画像間の撮影間隔距離およびステレオ画像撮影時のカメラの設置角度を含む撮影パラメータとを取得し、バッファに格納する。
(S21) The input / output processing means 1 includes, from the
(S22) 画像特徴点算出処理手段2が画像特徴点算出処理を行う。 (S22) The image feature point calculation processing means 2 performs image feature point calculation processing.
(S23) 視差量候補算出手段3、および、視差量決定処理手段4が奥行き算出処理を行う。 (S23) The parallax amount candidate calculation unit 3 and the parallax amount determination processing unit 4 perform depth calculation processing.
(S24) 入出力処理手段1が奥行きデータベース6に算出された奥行きを格納する。
(S24) The input / output processing means 1 stores the calculated depth in the
続いて、画像特徴点算出処理手段2について説明する。画像特徴点算出処理手段2は入出力処理手段1で取得した処理対象画像から画像特徴点の算出を行う。この処理は図3に示す手順で以下のように行われる。 Next, the image feature point calculation processing unit 2 will be described. The image feature point calculation processing unit 2 calculates image feature points from the processing target image acquired by the input / output processing unit 1. This processing is performed as follows in the procedure shown in FIG.
(S31)処理対象画像の各画素(i、j)に対して、Sobelのx方向のエッジ検出オペレータ(画像処理標準テキストブック編集委員会監修、「画像処理標準テキストブック」、財団法人画像情報教育振興協会、平成9年2月25日、pp.179)を適用し、特徴量F(i、j)を算出する。 (S31) For each pixel (i, j) of the image to be processed, Sobel's edge detection operator in the x direction (supervised by the Image Processing Standard Textbook Editorial Board, “Image Processing Standard Textbook”, Image Information Education Foundation) Japan Society for the Promotion of Science, February 25, 1997, pp. 179) is applied to calculate the feature value F (i, j).
ただし、平行投影になっている軸をx方向、それと垂直な方向をy方向とする。 However, the axis in parallel projection is the x direction, and the direction perpendicular thereto is the y direction.
(S32)閾値以上のF(i、j)を持つ(i、j)を画像特徴点として算出する。 (S32) (i, j) having F (i, j) equal to or greater than the threshold is calculated as an image feature point.
なお、特徴量算出にSobelのエッジ検出オペレータを用いているが、ラプラシアンフィルタ(画像処理標準テキストブック編集委員会監修、「画像処理標準テキストブック」、財団法人画像情報教育振興協会、平成9年2月25日、pp.170)などを用いてもよい。また特徴量の閾値は、あらかじめ固定値を設定しておいてもよいし、特徴量の平均値、偏差値などといった統計的に算出される値を利用して決定してもよい。 The Sobel edge detection operator is used to calculate the feature amount. The Laplacian filter (supervised by the Image Processing Standard Textbook Editorial Committee, “Image Processing Standard Textbook”, Foundation for Image Information Education, 1997 2) May 25, pp. 170) may be used. The threshold value of the feature amount may be set in advance as a fixed value, or may be determined using a statistically calculated value such as an average value or a deviation value of the feature amount.
続いて視差量候補算出手段3について説明する。視差量候補算出手段3は、前記手順にて算出された2枚の画像上の画像特徴点を利用して、視差量候補を算出する。この処理は図4に示す手順で以下のように行われる。 Next, the parallax amount candidate calculation unit 3 will be described. The parallax amount candidate calculating means 3 calculates parallax amount candidates using the image feature points on the two images calculated in the above procedure. This process is performed as follows in the procedure shown in FIG.
(S41)一方の画像上の画像特徴点ともう一方の画像のエピポーラ線上(画像処理標準テキストブック編集委員会監修、「画像処理標準テキストブック」、財団法人画像情報教育振興協会、平成9年2月25日、pp.272)の画像特徴点のx座標の差分値を算出し、この差分値に対し得票数を算出する。 (S41) Image feature point on one image and epipolar line of the other image (supervised by the Image Processing Standard Textbook Editorial Committee, “Image Processing Standard Textbook”, Japan Image Information Education Promotion Association, 1997 2 On the 25th of May, pp.272), the difference value of the x coordinate of the image feature point is calculated, and the number of votes is calculated for this difference value.
(S42)得票数が閾値を満たす上位N個の差分値を取得し、これを視差量候補とする。 (S42) The top N difference values that satisfy the threshold value for the number of votes are acquired and set as parallax amount candidates.
なお、奥行きは、両画像上での対象物のx軸座標の差分値に比例するので、一方の画像をx軸方向にずらしながら、両画像上とも画像特徴点であった場合の画素数を、そのずらし量に対してカウントすればよい。得票数は、単純にカウントした結果の値でもよいし、カウント数/全カウント数として算出してもよい。 Note that the depth is proportional to the difference between the x-axis coordinates of the object on both images, so the number of pixels when both images are image feature points on both images while shifting one image in the x-axis direction. What is necessary is just to count with respect to the shift amount. The number of votes obtained may be a simple count value or may be calculated as count / total count.
続いて視差量決定処理手段4について説明する。視差量決定処理手段4は、前記手順にて算出された視差量候補から視差量を決定する。この処理は図5に示す手順で以下のように行われる。 Next, the parallax amount determination processing unit 4 will be described. The parallax amount determination processing unit 4 determines the parallax amount from the parallax amount candidates calculated in the above procedure. This process is performed as follows in the procedure shown in FIG.
(S51)差分値が所定の範囲に入らない視差量候補を削除し、残った視差量候補より視差量を決定する。 (S51) Delete the parallax amount candidate whose difference value does not fall within the predetermined range, and determine the parallax amount from the remaining parallax amount candidates.
(S52)決定した視差量をもとに、画像特徴点に挟まれている領域の視差量を決定する。 (S52) Based on the determined amount of parallax, the amount of parallax of the region sandwiched between the image feature points is determined.
(S53)復元したいすべての視差量候補に対して処理をおこなったか確認する。 (S53) It is confirmed whether processing has been performed for all parallax amount candidates to be restored.
なお、復元したい物体の奥行きの範囲がある程度既知の場合には、視差量の範囲がわかっているので、その所定範囲内に入らない場合には削除し、復元したい奥行きの解像度まで得票数が多い奥行き順に視差量を決定することができる。 If the depth range of the object to be restored is known to some extent, the range of parallax is known, so if it does not fall within the predetermined range, it is deleted and the number of votes obtained is high up to the resolution of the depth to be restored. The amount of parallax can be determined in the order of depth.
以下に、上述した処理手順を実際のデータに即して、具体的に説明する。 In the following, the above-described processing procedure will be specifically described with reference to actual data.
まず、画像データベース5に格納されている横軸が平行投影なステレオ画像と、画像を構成する縦方向のライン画像間の撮影間隔距離およびステレオ画像撮影時のカメラの設置角度を含む撮影パラメータとの取得について、2台のラインセンサカメラを車両に搭載し、移動しながら市街地の建造物の画像を取得する場合を例に説明する。
First, a stereo image in which the horizontal axis is parallel projection stored in the
図6は、上述の画像取得方法を説明するための図である。図6において、2台のラインセンサカメラ601、602は同時に建造物606の撮影を開始し、2台のラインセンサカメラ601、602は光軸が移動方向603に垂直な方向に対称になるように設置する。ライン方向604は地面に鉛直方向であり、移動方向603に垂直な方向とラインセンサカメラ601、602の光軸とのなす角は等しく、カメラ設置角度は共にθ(605)とする。
FIG. 6 is a diagram for explaining the above-described image acquisition method. In FIG. 6, the two
このような状況で2台のラインセンサカメラ601、602を移動させながら、ロータリエンコーダーを用いて一定距離ごとにライン画像を取り込む。この距離を撮影間隔距離と呼ぶ。なおロータリーエンコーダとは車両等に取り付けることにより、一定距離ごとに特定信号を発生させる装置のことである。本発明においては1〜100mmの範囲の中で一定距離を自由に設定でき、例えば、5mmの距離走行毎にラインセンサカメラのシャッターをきるための信号を発生することができるものとする。
While moving the two
このようにしてそれぞれのラインセンサカメラ601、602から取得したライン画像を時系列にならべて2枚のステレオ画像を作成する。そして得られた横軸が平行投影なステレオ画像と、この画像を構成する縦方向のライン画像間の撮影間隔距離およびステレオ画像撮影時のカメラの設置角度θ(605)を含む撮影パラメータとを取得し、これを画像データベース5に格納する。
In this way, two stereo images are created by arranging the line images acquired from the respective
この横軸が平行投影なステレオ画像の一例を図7に示す。図7は建物711と2本の電信柱712、713が立っている街並みを撮影した例である。建物711は同じ奥行きの面で構成されており、電信柱712、713の方が建物711より手前にある様子を示している。703は進行方向に傾けたラインセンサカメラ601で撮影した画像を示し、これを右画像と呼ぶ。704は進行方向と逆に傾けたラインセンサカメラ602により撮影した画像を示し、これを左画像と呼ぶ。この画像の時間軸方向がx軸701、ライン方向がy軸702にあたる。
An example of a stereo image whose horizontal axis is parallel projection is shown in FIG. FIG. 7 shows an example of a cityscape where a
ここで、右画像703に写っている建物711の端を705と706、左画像704に写っている同じ建物711の端を707と708として、後の処理で、705、706、707、708のような建物711の端などエッジにあたる特徴を用いて奥行きを算出する。
Here, the ends of the
なお、右画像703上の709と左画像704上の710は同じ箇所を撮影しているが、それぞれの座標を(xA、yA)と(xB、yA)とすると、その箇所の奥行きLは、
In addition, although 709 on the
で表される。つまり奥行きは差分値(視差量)に比例する。 It is represented by That is, the depth is proportional to the difference value (parallax amount).
続いて画像特徴量算出手段2における処理ついて説明する。画像特徴量算出手段2は上述の処理対象画像に対して画像特徴点算出処理を行い、画像特徴点を算出する。ここでは良く知られているSobelのx方向のエッジ検出オペレータを処理対象画像に適用し、各画素(i、j)のエッジ強度を算出する。そしてこのエッジ強度の分布を算出し、算出された分布から閾値を算出し、閾値を満たすエッジ強度を有する画素を画像特徴点として算出する。なおこの画像特徴点を縦エッジと呼ぶ。 Next, processing in the image feature quantity calculation unit 2 will be described. The image feature amount calculation means 2 performs image feature point calculation processing on the above-described processing target image to calculate image feature points. Here, the well-known Sobel edge detection operator in the x direction is applied to the processing target image to calculate the edge intensity of each pixel (i, j). Then, the distribution of the edge strength is calculated, a threshold value is calculated from the calculated distribution, and a pixel having edge strength that satisfies the threshold value is calculated as an image feature point. This image feature point is called a vertical edge.
図8に図7のステレオ画像の画像特徴点を算出した結果を例示する。図8において、画像のx軸を801、y軸を802、右画像を803、左画像を804とし、図7の右画像703に写っている建物711の端の縦エッジを抽出した線分を805と806、左画像704に写っている建物711の端の縦エッジを抽出した線分を807と808とする。
FIG. 8 illustrates the result of calculating the image feature points of the stereo image of FIG. In FIG. 8, the x-axis of the image is 801, the y-axis is 802, the right image is 803, the left image is 804, and the line segment obtained by extracting the vertical edge of the end of the
続いて視差量候補算出手段3について説明する。視差量候補算出手段3は前記手順にて算出された両画像の画像特徴点である縦エッジどうしの差分値を算出する。すなわち、右画像を左画像上のx軸方向に一画素ずつずらしながら、両画素が縦エッジであるとき右画像をずらした差分値に対し投票する。つまり、右画像の(i、j)と左画像の(i+n、j)との両方が縦エッジであれば、差分値nに対して+1を投票する。ここでは投票して得られたカウント数を得票数とする。そしてこの得票数が閾値を満たす上位いくつかの差分値を取得し、視差量候補とする。なお、縦エッジ間の距離は撮影時に伸縮してしまう可能性もあるので、縦エッジ間を数画素伸縮させて投票してもよい。 Next, the parallax amount candidate calculation unit 3 will be described. The parallax amount candidate calculating means 3 calculates a difference value between vertical edges, which are image feature points of both images calculated in the above procedure. That is, while shifting the right image pixel by pixel in the x-axis direction on the left image, when both pixels are vertical edges, the difference value obtained by shifting the right image is voted. That is, if both (i, j) of the right image and (i + n, j) of the left image are vertical edges, +1 is voted for the difference value n. Here, the count obtained by voting is set as the number of votes. Then, the top several difference values satisfying the threshold value for the number of votes are acquired and set as parallax amount candidates. Note that the distance between the vertical edges may be expanded or contracted at the time of shooting. Therefore, the voting may be performed by extending or contracting several pixels between the vertical edges.
図9は、図8の画像特徴点を算出した結果を用いて視差量候補を求めている様子を示している。図9において差分値n分だけ移動したとき、右画像903上の建物の両端の縦エッジ905と906を含む建物の縦エッジが、それぞれ左画像904上の建物の両端の縦エッジ907と908を含む建物の縦エッジと一致し、右画像と左画像との一致度が最大になる状態を示している。ここでは建物の奥行きに該当する差分値への得票数が一番多く、電信柱の奥行きに該当する差分値への得票数が二番目に多くなる。
FIG. 9 shows a state in which a parallax amount candidate is obtained using the result of calculating the image feature points of FIG. In FIG. 9, when moving by the difference value n, the vertical edges of the buildings including the
続いて視差量決定処理手段4について説明する。視差量決定処理手段4は、前記手順にて算出された視差量候補から視差量を決定する。得票数が一番高い視差量に関して、その視差量をずらしたときに重なる両画像上の縦エッジに、この視差量に対する奥行きを付与する。次に、各y座標ごとに得票数が一番高い視差量に該当する奥行きが付与された縦エッジで挟まれた領域の奥行きを決定する。つまり、縦エッジで挟まれた元画像上の領域どうしを比較し、領域どうしの類似度が閾値を満たす場合には、その領域を挟んでいる縦エッジに付与された視差量に対する奥行きに決定する。次に、得票数が二番目に高い視差量に関して前記と同様の処理を行う。 Next, the parallax amount determination processing unit 4 will be described. The parallax amount determination processing unit 4 determines the parallax amount from the parallax amount candidates calculated in the above procedure. With respect to the parallax amount with the highest number of votes, a depth for this parallax amount is given to the vertical edges on both images that overlap when the parallax amount is shifted. Next, the depth of the region sandwiched between the vertical edges to which the depth corresponding to the parallax amount with the highest number of votes is obtained for each y coordinate is determined. That is, the regions on the original image sandwiched between the vertical edges are compared, and if the similarity between the regions satisfies the threshold, the depth is determined with respect to the parallax amount given to the vertical edges sandwiching the region. . Next, the same processing as described above is performed for the parallax amount having the second highest number of votes.
図10に画像特徴点である縦エッジに挟まれた領域の奥行きを決定する様子を示す。図10において、1001に画像のx軸、1002に画像のy軸、1003に右画像、1004に左画像を示す。1011、1012、1013はそれぞれ図7における建物711と電信柱712、713を示す。まず、右画像1003を得票数が一番多い視差量n分だけx軸方向にずらしたときに、右画像1003と左画像1004とで重なる縦エッジに、視差量nに該当する奥行きを付与する。つまり、縦エッジ1005と1006、1007と1008には視差量nに該当する奥行きが付与される。次に上記の視差量n分だけずらしたときに重なる縦エッジに挟まれた領域の奥行きを決定する。1009は右画像1003上の得票数が一番高い視差量nに該当する奥行きが付与された1005と1006に挟まれた領域を示し、領域Pとする。1010は左画像1004上の視差量nに該当する奥行きが付与された1007と1008に挟まれた領域を示し、領域Qとする。領域Pと領域Qとの類似度が閾値を満たす場合には、1005、1006、1007、1008と同じ奥行きにあたる視差量nに該当する奥行きを付与する。なお類似度には画素値の差分や相関値を用いることができる。
FIG. 10 shows how the depth of a region sandwiched between vertical edges, which are image feature points, is determined. In FIG. 10, 1001 indicates the x-axis of the image, 1002 indicates the y-axis of the image, 1003 indicates the right image, and 1004 indicates the left image.
このようにしてまず得票数が一番高い視差量nに該当する奥行きをもつ建物にその奥行きを付与することができる。次に得票数が二番目だった視差量に関して、上記と同じ処理を行う。 In this way, the depth can be given to a building having a depth corresponding to the parallax amount n having the highest number of votes. Next, the same process as described above is performed for the parallax amount with the second vote count.
このように得票数が多い視差量の順番に奥行きを決定していけばよく、画像中の占有領域が最も大きい建物の奥行きが一定の場合、この得票数が多くなるため、大きい建物から順に復元できるという効果がある。 Depth should be determined in the order of the amount of parallax with the largest number of votes in this way, and if the depth of the building with the largest occupied area in the image is constant, the number of votes will increase, so the largest building will be restored in order There is an effect that can be done.
また細かい詳細形状まで復元する場合には、奥行きを決定する視差量候補を多くすればよく、また大局的な形状のみ復元する場合には、視差量候補を少なくすればよい。例えば、撮影した街並みがほとんど歩道の手前にある電信柱と歩道の奥にある建物とで構成され、かつ建物の奥行きがほぼ一定である場合には、電信柱と建物の2種類の奥行きがわかればいいので、得票数が二番目までの奥行きに関して復元すればよい。このように、復元する奥行きの解像度を求めようとする詳細形状のレベルに応じて選択することが可能となる。 Further, when restoring to a fine detailed shape, the number of parallax amount candidates for determining the depth may be increased, and when only the global shape is restored, the number of parallax amount candidates may be reduced. For example, if the captured cityscape is mostly composed of a telegraph pole in front of the sidewalk and a building in the back of the sidewalk, and the depth of the building is almost constant, the two types of depth of the telegraph pole and the building can be identified. All you need to do is restore the depth of the second vote. In this way, it is possible to select according to the level of the detailed shape for which the resolution of the depth to be restored is to be obtained.
以上のように画像特徴点に対してのみ投票を行い奥行きを算出することにより、処理時間を短縮することができ、かつ安定して画像中で最も占有面積が大きい対象物、つまり一番重要と思われる大きな対象物から復元することが可能となる。 By voting only on the image feature points and calculating the depth as described above, the processing time can be shortened and the object having the largest occupied area in the image stably, that is, the most important It is possible to recover from a large object that seems to be.
なお、本発明は図1に示した装置の一部又は全部の処理機能をプログラムとして構成してコンピュータを用いて実現すること、あるいは図2〜図10で示した処理手順をプログラムとして構成してコンピュータに実行させることができる。また、コンピュータでその各部の処理機能を実現するためのプログラム、あるいはコンピュータにその処理手順を実行させるためのプログラムを、そのコンピュータが読み取り可能な記録媒体、例えば、フレキシブルディスク、MO、ROM、メモリカード、CD、DVD、リムーバブルディスクなどに記録して、保存したり、提供したりすることが可能であり、また、インターネットのような通信ネットワークを介して配布したりすることが可能である。 In the present invention, some or all of the processing functions of the apparatus shown in FIG. 1 are configured as a program and realized using a computer, or the processing procedures shown in FIGS. 2 to 10 are configured as a program. It can be executed by a computer. In addition, a computer-readable recording medium such as a flexible disk, MO, ROM, or memory card can be used to store a program for realizing the processing function of each unit by the computer or a program for causing the computer to execute the processing procedure. It can be recorded on a CD, a DVD, a removable disk, etc., stored, provided, and distributed via a communication network such as the Internet.
1…入出力処理手段
2…画像特徴点算出処理手段
3…視差量候補算出手段
4…視差量決定処置手段
5…画像データベース
6…奥行きデータベース
601…カメラ
602…カメラ
603…移動方向
604…ライン方向
605…カメラ角度
606…建造物
701…x軸
702…y軸
703…右画像
704…左画像
705…建物の端
706…建物の端
707…建物の端
708…建物の端
709…画像上の一箇所
710…画像上の一箇所
711…建物
801…x軸
802…y軸
803…右画像
804…左画像
805…建物の端の縦エッジを抽出した線分
806…建物の端の縦エッジを抽出した線分
807…建物の端の縦エッジを抽出した線分
808…建物の端の縦エッジを抽出した線分
901…x軸
902…y軸
903…右画像
904…左画像
905…建物の端の縦エッジ
906…建物の端の縦エッジ
907…建物の端の縦エッジ
908…建物の端の縦エッジ
1001…x軸
1002…y軸
1003…右画像
1004…左画像
1005…縦エッジ
1006…縦エッジ
1007…縦エッジ
1008…縦エッジ
1009…領域P
1010…領域Q
1011…建物
1012…電信柱
1013…電信柱
DESCRIPTION OF SYMBOLS 1 ... Input / output processing means 2 ... Image feature point calculation processing means 3 ... Parallax amount candidate calculation means 4 ... Parallax amount determination processing means 5 ...
1010 ... Area Q
1011 ... Building 1012 ...
Claims (11)
対象物を撮影した2枚のステレオ画像並びにこの画像を構成する縦方向のライン画像間の撮影間隔距離およびステレオ画像撮影時のカメラの設置角度を含む撮影パラメータを取得する入出力処理手段と、
前記2枚のステレオ画像から画像特徴点を算出する画像特徴点算出処理手段と、
前記算出した画像特徴点を用いて投票により視差量候補を算出する視差量候補算出手段と、
前記視差量候補から視差量を決定し、この視差量および前記撮影パラメータから奥行きを算出して、この奥行きを前記視差量に対応する画像の領域に付する視差量決定処理手段と、を備えることを特徴とする奥行き算出装置。 An apparatus for calculating the depth of an object in an image using a stereo image whose horizontal axis is parallel projection,
Input / output processing means for acquiring shooting parameters including two stereo images obtained by shooting an object, a shooting interval distance between vertical line images constituting the image, and a camera installation angle during stereo image shooting;
Image feature point calculation processing means for calculating image feature points from the two stereo images;
Parallax amount candidate calculating means for calculating a parallax amount candidate by voting using the calculated image feature points;
Parallax amount determination processing means for determining a parallax amount from the parallax amount candidates, calculating a depth from the parallax amount and the shooting parameter, and attaching the depth to an image region corresponding to the parallax amount. Depth calculation device characterized by.
前記画像特徴点として、画像上の局所領域における濃淡値の変化の大きい箇所を抽出することを特徴とする請求項1に記載の奥行き算出装置。 The image feature point calculation processing means includes:
The depth calculation apparatus according to claim 1, wherein a portion having a large change in gray value in a local region on the image is extracted as the image feature point.
一方の画像をずらして前記2枚の画像の対応する画像特徴点どうしを重ねるのに必要な差分値を算出し、
この差分値に対して投票を行い、得票が閾値以上であったものを視差量候補とすることを特徴とする請求項1または2に記載の奥行き算出装置。 The parallax amount candidate calculating means includes:
Calculating a difference value required to superimpose corresponding image feature points of the two images by shifting one image;
3. The depth calculation apparatus according to claim 1, wherein voting is performed for the difference value, and a candidate whose parallax amount is equal to or greater than a threshold value is set as a parallax amount candidate.
前記画像特徴点を用いて視差量候補を算出するときに、画像特徴点間の距離を伸縮させることを特徴とする請求項1〜3いずれかに記載の奥行き算出装置。 The parallax amount candidate calculating means includes:
The depth calculation apparatus according to claim 1, wherein when calculating a parallax amount candidate using the image feature point, a distance between the image feature points is expanded and contracted.
前記投票された得票数順に視差量候補の処理を行うことで、画像中に占める面積割合の大きい対象物から順に奥行きを算出することを特徴とする請求項1〜4いずれかに記載の奥行き算出装置。 The parallax amount determination processing means includes
The depth calculation according to any one of claims 1 to 4, wherein the depth calculation is performed in order from an object having a large area ratio in the image by processing the parallax amount candidates in order of the voted number of votes. apparatus.
対象物を撮影した2枚のステレオ画像並びにこの画像を構成する縦方向のライン画像間の撮影間隔距離およびステレオ画像撮影時のカメラの設置角度を含む撮影パラメータを取得する入出力処理ステップと、
前記2枚のステレオ画像から画像特徴点を算出する画像特徴点算出ステップと、
前記算出した画像特徴点を用いて投票により視差量候補を算出する視差量候補算出ステップと、
前記視差量候補から視差量を決定し、この視差量および前記撮影パラメータから奥行きを算出して、この奥行きを前記視差量に対応する画像の領域に付する視差量決定処理ステップと、を備えることを特徴とする奥行き算出方法。 A method for calculating the depth of an object in an image using a stereo image whose horizontal axis is parallel projection,
An input / output processing step for acquiring shooting parameters including two stereo images obtained by shooting an object, a shooting interval distance between vertical line images constituting the image, and a camera installation angle at the time of shooting a stereo image;
An image feature point calculating step for calculating an image feature point from the two stereo images;
A parallax amount candidate calculating step of calculating a parallax amount candidate by voting using the calculated image feature points;
A parallax amount determination processing step of determining a parallax amount from the parallax amount candidates, calculating a depth from the parallax amount and the shooting parameter, and attaching the depth to an image region corresponding to the parallax amount. Depth calculation method characterized by
前記画像特徴点として、画像上の局所領域における濃淡値の変化の大きい箇所を抽出することを特徴とする請求項6に記載の奥行き算出方法。 The image feature point calculation step includes:
The depth calculation method according to claim 6, wherein a portion having a large change in gray value in a local region on the image is extracted as the image feature point.
一方の画像をずらして前記2枚の画像の対応する画像特徴点どうしを重ねるのに必要な差分値を算出し、
この差分値に対して投票を行い、得票が閾値以上であったものを視差量候補とすることを特徴とする請求項6または7に記載の奥行き算出方法。 The parallax amount candidate calculating step includes:
Calculating a difference value required to superimpose corresponding image feature points of the two images by shifting one image;
8. The depth calculation method according to claim 6, wherein voting is performed on the difference value, and a candidate whose parallax amount is equal to or greater than a threshold value is set as a parallax amount candidate.
前記画像特徴点を用いて視差量候補を算出するときに、画像特徴点間の距離を伸縮させることを特徴とする請求項6〜8いずれかに記載の奥行き算出方法。 The parallax amount candidate calculating step includes:
The depth calculation method according to claim 6, wherein when calculating a parallax amount candidate using the image feature points, a distance between the image feature points is expanded and contracted.
前記投票された得票数順に視差量候補の処理を行うことで、画像中に占める面積割合の大きい対象物から順に奥行きを算出することを特徴とする請求項6〜9いずれかに記載の奥行き算出方法。 The parallax amount determination processing step includes:
The depth calculation according to any one of claims 6 to 9, wherein the depth calculation is performed in order from an object having a large area ratio in the image by performing processing of parallax amount candidates in the order of the voted number of votes. Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003413547A JP2005173995A (en) | 2003-12-11 | 2003-12-11 | Device and method for calculating depth, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003413547A JP2005173995A (en) | 2003-12-11 | 2003-12-11 | Device and method for calculating depth, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005173995A true JP2005173995A (en) | 2005-06-30 |
Family
ID=34733655
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003413547A Pending JP2005173995A (en) | 2003-12-11 | 2003-12-11 | Device and method for calculating depth, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005173995A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007271386A (en) * | 2006-03-30 | 2007-10-18 | Toyota Central Res & Dev Lab Inc | Device, method, and program for measuring position, and device, method and program for detecting moving amount |
JP2010133751A (en) * | 2008-12-02 | 2010-06-17 | Topcon Corp | Shape measuring device and program |
CN111639667A (en) * | 2020-04-14 | 2020-09-08 | 北京迈格威科技有限公司 | Image recognition method and device, electronic equipment and computer readable storage medium |
-
2003
- 2003-12-11 JP JP2003413547A patent/JP2005173995A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007271386A (en) * | 2006-03-30 | 2007-10-18 | Toyota Central Res & Dev Lab Inc | Device, method, and program for measuring position, and device, method and program for detecting moving amount |
JP2010133751A (en) * | 2008-12-02 | 2010-06-17 | Topcon Corp | Shape measuring device and program |
CN111639667A (en) * | 2020-04-14 | 2020-09-08 | 北京迈格威科技有限公司 | Image recognition method and device, electronic equipment and computer readable storage medium |
CN111639667B (en) * | 2020-04-14 | 2023-06-16 | 北京迈格威科技有限公司 | Image recognition method, device, electronic equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Fathi et al. | Automated as-built 3D reconstruction of civil infrastructure using computer vision: Achievements, opportunities, and challenges | |
CN111209770B (en) | Lane line identification method and device | |
Golparvar-Fard et al. | Evaluation of image-based modeling and laser scanning accuracy for emerging automated performance monitoring techniques | |
WO2012017650A1 (en) | Object detection device, object detection method, and program | |
JP4157620B2 (en) | Moving object detection apparatus and method | |
JP6442834B2 (en) | Road surface height shape estimation method and system | |
JP6111745B2 (en) | Vehicle detection method and apparatus | |
US20090296984A1 (en) | System and Method for Three-Dimensional Object Reconstruction from Two-Dimensional Images | |
KR102200299B1 (en) | A system implementing management solution of road facility based on 3D-VR multi-sensor system and a method thereof | |
KR101787542B1 (en) | Estimation system and method of slope stability using 3d model and soil classification | |
CN112465970B (en) | Navigation map construction method, device, system, electronic device and storage medium | |
JP6091658B2 (en) | Information processing apparatus, information processing method, and program | |
CN105005964A (en) | Video sequence image based method for rapidly generating panorama of geographic scene | |
JP4427052B2 (en) | Image processing apparatus and area tracking program | |
CN105335959B (en) | Imaging device quick focusing method and its equipment | |
CN107767332A (en) | A kind of single image depth recovery method and system in real time | |
Ebrahimikia et al. | True orthophoto generation based on unmanned aerial vehicle images using reconstructed edge points | |
CN111488762A (en) | Lane-level positioning method and device and positioning equipment | |
JP2005173995A (en) | Device and method for calculating depth, and program | |
Hamzah et al. | Software Calibration for Stereo Camera on Stereo Vision Mobile Robot using Tsai's Method | |
Kiran et al. | Automatic hump detection and 3D view generation from a single road image | |
CN107808160B (en) | Three-dimensional building extraction method and device | |
KR102516450B1 (en) | Method of generating map and visual localization system using the map | |
KR20150130078A (en) | Method and apparatus for generating spanning tree, method and apparatus for stereo matching, method and apparatus for up-sampling, and method and apparatus for generating reference pixel | |
CN111738906B (en) | Indoor road network generation method and device, storage medium and electronic equipment |