JP2013178656A - Image processing device, image processing method, and image processing program - Google Patents

Image processing device, image processing method, and image processing program Download PDF

Info

Publication number
JP2013178656A
JP2013178656A JP2012041977A JP2012041977A JP2013178656A JP 2013178656 A JP2013178656 A JP 2013178656A JP 2012041977 A JP2012041977 A JP 2012041977A JP 2012041977 A JP2012041977 A JP 2012041977A JP 2013178656 A JP2013178656 A JP 2013178656A
Authority
JP
Japan
Prior art keywords
lattice
viewpoint
point
points
image
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.)
Granted
Application number
JP2012041977A
Other languages
Japanese (ja)
Other versions
JP5955028B2 (en
Inventor
Nobuo Takachi
伸夫 高地
Kazuo Kitamura
和男 北村
Tadayuki Ito
忠之 伊藤
Takeshi Sasaki
剛 佐々木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Topcon Corp
Original Assignee
Topcon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Topcon Corp filed Critical Topcon Corp
Priority to JP2012041977A priority Critical patent/JP5955028B2/en
Publication of JP2013178656A publication Critical patent/JP2013178656A/en
Application granted granted Critical
Publication of JP5955028B2 publication Critical patent/JP5955028B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a technique capable of highly accurately detecting correspondence between a plurality of images.SOLUTION: An image processing device includes: a specific shape extraction unit 111 that extracts a specific shape in each of two left/right photographic images on the basis of feature points extracted from each of the two photographic images; and a correspondence identification unit 115 that identifies correspondence between the two photographic images on the basis of the extracted specific shapes. The specific shape includes at least one of a straight line and a curve, the straight line is identified by end points at both ends thereof, and the curve is identified by end points at both ends thereof and separation points separating an interval between the end points at both ends.

Description

本発明は、複数の画像間の対応関係を求める機能を有する画像処理装置、画像処理方法および画像処理用のプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program having a function of obtaining a correspondence relationship between a plurality of images.

写真測量の原理を用いて、撮影対象物の3次元データを得る技術が知られている(例えば、特許文献1参照)。この技術においては、異なる2つの視点から対象物を撮影した2枚の写真画像における対応する部分を特定する技術が重要となる。すなわち、第1の写真画像中のどの部分が第2の写真画像中のどの部分に対応するのかを特定する作業が重要となる。以下、この技術を総称してステレオマッチングと称する。   A technique for obtaining three-dimensional data of a photographing object using the principle of photogrammetry is known (for example, see Patent Document 1). In this technique, a technique for identifying corresponding portions in two photographic images obtained by photographing an object from two different viewpoints is important. That is, it is important to specify which part in the first photographic image corresponds to which part in the second photographic image. Hereinafter, this technique is collectively referred to as stereo matching.

ステレオマッチングを自動で行う技術として、テンプレートマッチングが知られている。テンプレートマッチングは、2つの座標系における画像の座標データを相互に比較し、両者の相関関係により、2つの画像の対応関係を求める方法である。テンプレートマッチングでは、テンプレート画像を、それよりも大きい入力画像内の探索範囲で動かし、相互相関関数が最大となるような(つまり相関の程度が最大となるような)テンプレート画像の位置を求める作業をソフトウェア処理により行う技術である。また、特徴点をオペレータが手動で何点か指定し、それを基準としてテンプレートマッチングにより、2つの画像の特徴点の対応関係を求める手法もある。この方法は、初期値をマニュアル操作で入力することで、無駄な処理を減らすことができ、また手動で指定した特徴点のマッチング精度が高ければ、最終的なマッチングの精度を高くできる。   Template matching is known as a technique for automatically performing stereo matching. Template matching is a method in which the coordinate data of images in two coordinate systems are compared with each other, and the correspondence between the two images is obtained by the correlation between the two. In template matching, the template image is moved within a larger search range in the input image, and the position of the template image that maximizes the cross-correlation function (that is, the maximum degree of correlation) is obtained. This is a technology performed by software processing. In addition, there is a technique in which an operator manually designates several feature points and obtains a correspondence relationship between feature points of two images by template matching using the feature points as a reference. In this method, it is possible to reduce unnecessary processing by manually inputting initial values, and it is possible to increase the accuracy of final matching if the matching accuracy of manually designated feature points is high.

特開2005−308553号公報JP 2005-308553 A

初期値を入力せず、演算処理のみで行うステレオマッチングは、マッチングの精度が悪く、また演算時間が長くなる問題がある。他方で、手動で対応点を指定し、その後に演算によりステレオマッチングを行う方法は、オペレータへの負担が大きく、またオペレータの技量の影響を受け易い。また、この初期値をオペレータが指定する方法は、オペレータの作業にミスがあった場合に最終的なマッチングの精度が著しく低下する問題もある。   Stereo matching that is performed only by calculation processing without inputting an initial value has a problem that matching accuracy is low and calculation time is long. On the other hand, the method of manually designating corresponding points and then performing stereo matching by calculation is heavy on the operator and is easily influenced by the skill of the operator. In addition, the method in which the operator designates the initial value has a problem that the accuracy of the final matching is remarkably lowered when there is an error in the operator's work.

このような背景において、本発明は、複数の画像間における対応関係の検出を高い精度で行うことができる技術を提供することを目的とする。   In such a background, an object of the present invention is to provide a technique capable of detecting a correspondence relationship between a plurality of images with high accuracy.

請求項1に記載の発明は、第1の視点および第2の視点から見た測定対象物の特徴点に基づいて、前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状とを抽出する特定形状抽出部と、前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状との対応関係の特定を行う対応関係特定部とを備え、前記特定の形状が直線および曲線の少なくとも一方を含み、前記直線は、その両端の端点により特定され、前記曲線は、その両端の端点と該両端の端点の間を分割する分割点によって特定されていることを特徴とする画像処理装置である。   According to the first aspect of the present invention, the specific shape viewed from the first viewpoint and the second viewpoint are based on the feature points of the measurement object viewed from the first viewpoint and the second viewpoint. A specific shape extracting unit that extracts a specific shape, a correspondence relationship specifying unit that specifies a correspondence relationship between the specific shape viewed from the first viewpoint and the specific shape viewed from the second viewpoint, The specific shape includes at least one of a straight line and a curve, and the straight line is specified by endpoints at both ends thereof, and the curve is defined by a dividing point that divides between the endpoints at both ends and the endpoints at both ends. An image processing apparatus characterized by being specified.

請求項1に記載の発明によれば、特定の形状が直線、または曲線、または直線と曲線を組み合わせたものとしてデータ化され、さらに直線がその端点によって特定され、曲線が端点と両端の端点の間を分割する分割点とによって特定されるので、少ないデータ量で精度の高いマッチングを行なうことができる。   According to the first aspect of the present invention, a specific shape is converted into data as a straight line, a curve, or a combination of a straight line and a curve, a straight line is specified by the end points, and the curve is defined by the end points and the end points of both ends. Since it is specified by the dividing points that divide the space, highly accurate matching can be performed with a small amount of data.

例えば、仮に直線を線状に分布した多数の特徴点の集合として取り扱う場合において、左写真画像中の直線と右写真画像中の直線との間の対応関係を調べる場合を考える。この場合、直線は、線状に分布した複数の特徴点として取り扱われるので、本発明の場合に比較して、データ量が多く演算量が多くなる。また、この線状に分布した複数の特徴点により直線を特定する手法では、直線の延在方向におけるずれがあっても同一点が多数得られるので、延在方向でずれた状態で対応関係が特定される可能性がある。これに対して、本発明の手法では、直線は両端の端点により把握されるので、扱うデータ量を少なくできる。また、端点の一致により対応関係の特定が行なわれるので、延在方向にズレがある状態で対応関係が特定される可能性が低い。   For example, in the case where a straight line is handled as a set of a large number of feature points distributed linearly, a case will be considered in which the correspondence between the straight line in the left photograph image and the straight line in the right photograph image is examined. In this case, since a straight line is handled as a plurality of feature points distributed in a linear shape, the amount of data is large and the amount of calculation is large compared to the case of the present invention. In addition, in the method of specifying a straight line by a plurality of feature points distributed in a linear shape, a large number of the same points can be obtained even if there is a deviation in the extending direction of the straight line. May be identified. On the other hand, in the method of the present invention, since the straight line is grasped by the end points at both ends, the amount of data handled can be reduced. In addition, since the correspondence is specified by matching the end points, the possibility that the correspondence is specified in a state where there is a deviation in the extending direction is low.

請求項1に記載の発明において、特徴点は、写真画像中から抽出される特徴点である場合と、レーザスキャナから得られる3次元点群位置データの中から得られる特徴点である場合が含まれる。また、第1の視点から写真撮影を行い、その中から画像解析処理により特徴点を抽出し、それを一方の特徴点のデータとし、他方において、第2の視点からレーザスキャナによって3次元点群位置データを取得し、そこで得られた特徴点のデータを他方の特徴点のデータとして取り扱うこともできる。   In the first aspect of the present invention, the feature point includes a case where the feature point is a feature point extracted from a photographic image and a case where the feature point is a feature point obtained from 3D point cloud position data obtained from a laser scanner. It is. Also, a photograph is taken from the first viewpoint, and a feature point is extracted from the first viewpoint by image analysis processing and used as one feature point data. It is also possible to acquire position data and handle the feature point data obtained there as data of the other feature point.

請求項2に記載の発明は、請求項1に記載の発明において、前記第1の視点および前記第2の視点から見た測定対象物の特徴点を2枚の写真画像のそれぞれから抽出する特徴点抽出部を備えることを特徴とする。   The invention according to claim 2 is characterized in that, in the invention according to claim 1, the feature point of the measurement object viewed from the first viewpoint and the second viewpoint is extracted from each of the two photographic images. A point extraction unit is provided.

請求項3に記載の発明は、請求項1または2に記載の発明において、前記第1の視点から見た前記特定の形状を構成する特徴点と、前記第2の視点から見た前記特定の形状を構成する特徴点との間の視差を推定する視差推定部と、前記視差推定部が推定した視差に基づいて前記対応関係特定部における前記対応関係の特定のための探索の範囲を設定する探索範囲設定部とを更に備えることを特徴とする。   The invention according to claim 3 is the invention according to claim 1 or 2, wherein the feature point constituting the specific shape viewed from the first viewpoint and the specific point viewed from the second viewpoint. Based on the parallax estimated by the parallax estimated by the parallax estimator and the parallax estimated by the parallax estimator, the search range for specifying the correspondence is set based on the parallax estimated by the feature points constituting the shape And a search range setting unit.

請求項3に記載の発明によれば、第1の視点から測定対象物を見た場合の画面と第2の視点から測定対象物を見た場合の画面との間のズレを視差として推定し、それに基づいて対応関係を探索する範囲を決める。この手法によれば、探索の範囲が狭められるので、無駄な演算が少なくなり、演算の効率を高めることができる。   According to the third aspect of the present invention, the deviation between the screen when the measurement object is viewed from the first viewpoint and the screen when the measurement object is viewed from the second viewpoint is estimated as parallax. Based on this, a range for searching for correspondence is determined. According to this method, the search range is narrowed, so that unnecessary calculations are reduced and the calculation efficiency can be increased.

請求項4に記載の発明は、請求項3に記載の発明において、前記視差推定部は、当該着目した特徴点を含む広がりを持った領域から得られる複数の視差の算出値に基づいて算出されることを特徴とする。請求項4に記載の発明によれば、ピンポイントのデータに基づかず、ある程度の広がりをもった領域から得られたデータに基づいて視差を推定するので、推定した視差の値の誤差を抑えることができる。視差を推定する方法として、最近隣法や線形補間法が挙げられる。線形補間法としては、近傍n点のパスポイントの視差を利用し、その単純平均を計算する方法や、後述する距離に応じ重み付き平均を計算する方法が挙げられる。また、視差を推定する方法として、TIN生成後に注目特徴点を含む三角形の視差を利用する方法やボロノイ領域で視差を推定する方法等が挙げられる。   According to a fourth aspect of the present invention, in the third aspect of the present invention, the parallax estimation unit is calculated based on a plurality of calculated parallax values obtained from a spread area including the focused feature point. It is characterized by that. According to the invention described in claim 4, since the parallax is estimated based on the data obtained from the area having a certain extent without being based on the pinpoint data, the error of the estimated parallax value is suppressed. Can do. As a method for estimating the parallax, a nearest neighbor method or a linear interpolation method can be cited. Examples of the linear interpolation method include a method of calculating a simple average using the parallax of pass points of n nearby points, and a method of calculating a weighted average according to a distance described later. Further, as a method of estimating the parallax, there are a method of using a triangular parallax including a target feature point after TIN generation, a method of estimating a parallax in a Voronoi region, and the like.

請求項5に記載の発明は、請求項4に記載の発明において、前記視差推定部は、前記第1の視点から見た前記特定の形状を構成する特定の特徴点の周囲から複数の特徴点を第1群のパスポイントとして抽出するステップと、前記第1群のパスポイントに対応する第2群のパスポイントを前記第2の視点から見た測定対象物の特徴点の中から抽出するステップと、前記第1の群のパスポイントと前記第2群のパスポイントの対応するパスポイント毎の視差Dnを算出するステップと、前記特定の特徴点からの距離に応じた重みを用いて前記Dnの加重平均を計算し、その結果に基づいて前記視差の推定値Dを算出するステップとを行なうことを特徴とする。   According to a fifth aspect of the present invention, in the fourth aspect of the invention, the disparity estimation unit includes a plurality of feature points from around a specific feature point that forms the specific shape viewed from the first viewpoint. As a first group pass point, and a second group pass point corresponding to the first group pass point is extracted from the characteristic points of the measurement object viewed from the second viewpoint. Calculating a parallax Dn for each corresponding pass point of the first group of pass points and the second group of pass points, and using a weight corresponding to the distance from the specific feature point And calculating the parallax estimate D based on the result.

請求項5に記載の発明によれば、個々のDnの算出値が正確さに欠き、そこに誤差が含まれていても、誤差が平均化され、更に着目した特徴点からの距離の違いによる誤差の増大が抑えられ、視差の推定値Dを高い精度で推定することができる。例えば、一例として図9の場合でいうと、D1〜D3には、真の視差の値よりも大きな方向にぶれた誤差と小さな方向にぶれた誤差とが含まれる。したがって、その平均値を算出することで、真の値よりも上下の方向にぶれた誤差がキャンセルされ、より真の値に近い視差の推定値が得られる。また、着目した特徴点Fから離れると、Fに係る誤差要因以外の誤差要因の影響が強くなるので、単に平均をとったのでは、その影響でDの値の精度が低下する。そこで、Fからの距離に応じた重みを掛けた状態での加重平均を計算することで、Fからの距離に応じて発生する誤差要因の影響を抑え、Dの推定精度を高めることができる。   According to the fifth aspect of the present invention, even if the calculated value of each Dn is inaccurate and includes an error, the error is averaged, and further, due to the difference in distance from the feature point of interest. The increase in error is suppressed, and the estimated value D of parallax can be estimated with high accuracy. For example, in the case of FIG. 9 as an example, D1 to D3 include an error that has shifted in a direction larger than the true parallax value and an error that has shifted in a smaller direction. Therefore, by calculating the average value, an error that is shifted in the vertical direction from the true value is canceled, and an estimated value of parallax closer to the true value is obtained. Further, since the influence of an error factor other than the error factor relating to F becomes stronger when moving away from the feature point F of interest, if the average is simply taken, the accuracy of the value of D decreases due to the influence. Therefore, by calculating a weighted average in a state where a weight according to the distance from F is applied, the influence of the error factor generated according to the distance from F can be suppressed and the estimation accuracy of D can be improved.

請求項6に記載の発明は、請求項1〜5のいずれか一項に記載の発明において、前記第1の視点から撮影した第1の撮影画像中に格子を設定する格子設定部と、前記格子に前記対応関係特定部が特定した前記特定の形状を構成する特徴点に基づく分割形状を形成する分割形状形成部と、前記分割形状形成部が形成した前記分割形状を前記格子に内挿する分割形状内挿部と、前記格子に内挿された前記分割形状の前記格子に対する傾きに基づき、前記第2の視点から撮影した第2の撮影画像中に前記第1の画像中の格子を変形した変形格子を設定する変形格子設定部と、前記第1の撮影画像中の前記格子の格子点と前記第2の撮影画像中の前記変形格子の格子点との対応関係を検出する対応格子点検出部とを備えることを特徴とする。   The invention according to claim 6 is the invention according to any one of claims 1 to 5, wherein a lattice setting unit that sets a lattice in a first photographed image photographed from the first viewpoint; A divided shape forming unit that forms a divided shape based on feature points that constitute the specific shape specified by the correspondence specifying unit in the lattice, and the divided shape formed by the divided shape forming unit is interpolated in the lattice. The grid in the first image is deformed in the second captured image captured from the second viewpoint based on the segmented shape interpolation unit and the inclination of the segmented shape interpolated in the grid with respect to the grid. A deformed grid setting unit for setting the deformed grid, and a corresponding grid check for detecting a correspondence between the grid points of the grid in the first captured image and the grid points of the deformed grid in the second captured image And a projecting portion.

請求項6に記載の発明によれば、左右の写真画像における設定された格子点間におけるマッチング処理において、視差に起因する格子形状の歪みの影響が勘案され、他方の写真画像に設定された格子が変形される。このため、格子点間のマッチングの処理精度が高くなる。   According to the invention described in claim 6, in the matching process between the set grid points in the left and right photographic images, the effect of the distortion of the grid shape caused by the parallax is taken into account, and the grid set in the other photographic image Is transformed. For this reason, the processing accuracy of matching between lattice points is increased.

請求項7に記載の発明は、請求項6に記載の発明において、前記格子設定手段は、第1の階層の処理において、第1の格子間隔の第1の格子を設定し、第2の階層の処理において、前記第1の格子間隔より格子間隔が狭い第2の格子を設定し、前記変形格子設定部は、前記第1の格子間隔および前記第2の格子間隔に対して格子の変形を行い、前記対応格子点検出部は、前記第1の格子間隔および前記第2の格子間隔に対して、対応する格子点の検出を行うことを特徴とする。   The invention according to claim 7 is the invention according to claim 6, wherein the lattice setting means sets the first lattice of the first lattice interval in the processing of the first layer, and the second layer In the processing, a second lattice having a lattice interval narrower than the first lattice interval is set, and the modified lattice setting unit deforms the lattice with respect to the first lattice interval and the second lattice interval. And the corresponding grid point detection unit detects the corresponding grid points with respect to the first grid interval and the second grid interval.

請求項7に記載の発明によれば、複数の階層に渡って段階的に間隔が狭くなった格子が設定されるので、段階的により微細な部分のマッチングが行なわれる。このため、処理効率を高めることができる。例えば、一挙に微細な部分までのマッチングを行なう場合、演算装置に加わる負担が大きく、また途中でエラーが生じる可能性や誤差が増大する可能性が大きいが、本発明の手法によれば、段階的に処理が行われるので、この点で有利となる。   According to the seventh aspect of the present invention, since the lattices whose intervals are gradually reduced over a plurality of hierarchies are set, matching of finer portions is performed in stages. For this reason, processing efficiency can be improved. For example, when matching up to a minute portion at a stroke, the burden imposed on the arithmetic unit is large, and there is a high possibility that an error will occur or an error will increase in the middle. This is advantageous because the process is performed automatically.

請求項8に記載の発明は、請求項7に記載の発明において、特定の階層の処理において、一つ前の階層において特定された対応点に加えて、前記特定の形状を構成する特徴点を初期値として加える初期値付加部を更に備えることを特徴とする。請求項8に記載の発明によれば、各階層におけるマッチング処理において、概略の形状同士におけるマッチングが特定された特徴点が初期値として用いられるので、新たにマッチングが行なわれる処理において、常に初期値の影響が現れ、マッチングが大きくずれる現象が抑えられる。   The invention according to claim 8 is characterized in that, in the process according to claim 7, in the process of the specific hierarchy, in addition to the corresponding points specified in the previous hierarchy, the feature points constituting the specific shape are An initial value adding unit that is added as an initial value is further provided. According to the eighth aspect of the present invention, in the matching process in each layer, the feature point for which the matching between the approximate shapes is specified is used as the initial value. And the phenomenon that matching is greatly shifted is suppressed.

請求項9に記載の発明は、請求項1に記載の発明において、前記第1の視点および前記第2の視点から見た測定対象物の特徴点の少なくとも一方がレーザスキャナで測定された3次元点群位置データであることを特徴とする。   The invention according to claim 9 is the invention according to claim 1, wherein at least one of the feature points of the measurement object viewed from the first viewpoint and the second viewpoint is measured by a laser scanner. It is point cloud position data.

請求項10に記載の発明は、第1の視点および第2の視点から見た測定対象物の特徴点に基づいて、前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状とを抽出する特定形状抽出ステップと、前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状との対応関係の特定を行う対応関係特定ステップとを備え、前記特定の形状が直線および曲線の少なくとも一方を含み、前記直線は、その両端の端点により特定され、前記曲線は、その両端の端点と該両端の端点の間を分割する分割点によって特定されていることを特徴とする画像処理方法である。   According to a tenth aspect of the present invention, the specific shape viewed from the first viewpoint and the second viewpoint are based on the feature points of the measurement object viewed from the first viewpoint and the second viewpoint. A specific shape extraction step for extracting a specific shape; a correspondence relationship specifying step for specifying a correspondence relationship between the specific shape viewed from the first viewpoint and the specific shape viewed from the second viewpoint; The specific shape includes at least one of a straight line and a curve, and the straight line is specified by endpoints at both ends thereof, and the curve is defined by a dividing point that divides between the endpoints at both ends and the endpoints at both ends. An image processing method characterized by being specified.

請求項11に記載の発明は、コンピュータに読み取らせて実行させるプログラムであって、コンピュータに第1の視点および第2の視点から見た測定対象物の特徴点に基づいて、前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状とを抽出させる特定形状抽出ステップと、前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状との対応関係の特定を行なわせる対応関係特定ステップとを実行させ、前記特定の形状が直線および曲線の少なくとも一方を含み、前記直線は、その両端の端点により特定され、前記曲線は、その両端の端点と該両端の端点の間を分割する分割点によって特定されていることを特徴とする画像処理用のプログラムである。   The invention according to claim 11 is a program that is read and executed by a computer, and the first viewpoint is based on feature points of the measurement object viewed from the first viewpoint and the second viewpoint. A specific shape extracting step for extracting a specific shape viewed from the second viewpoint and a specific shape viewed from the second viewpoint; a specific shape viewed from the first viewpoint; and a specific shape viewed from the second viewpoint A correspondence specifying step for specifying a correspondence relationship with a shape, wherein the specific shape includes at least one of a straight line and a curve, the straight line is specified by end points at both ends thereof, and the curve is An image processing program characterized by being specified by an end point at both ends and a dividing point for dividing between the end points at both ends.

請求項12に記載の発明は、第1の視点および第2の視点から見た測定対象物の特徴点に基づいて、前記第1の視点から見た画像と前記第2の視点から見た画像との対応関係の特定を行う対応関係特定部と、前記第1の視点から撮影した第1の撮影画像中に格子を設定する格子設定部と、前記格子に前記第1の視点から見た前記第1の測定対象物の特徴点に基づく分割形状を形成する分割形状形成部と、前記分割形状形成部が形成した前記分割形状を前記格子に内挿する分割形状内挿部と、前記格子に内挿された前記分割形状の前記格子に対する傾きに基づき、前記第2の視点から撮影した第2の撮影画像中に前記第1の画像中の格子を変形した変形格子を設定する変形格子設定部と、前記第1の撮影画像中の前記格子の格子点と前記第2の撮影画像中の前記変形格子の格子点との対応関係を検出する対応格子点検出部とを備えることを特徴とする画像処理装置である。   According to a twelfth aspect of the present invention, an image viewed from the first viewpoint and an image viewed from the second viewpoint based on the feature points of the measurement object viewed from the first viewpoint and the second viewpoint. A correspondence relationship identifying unit that identifies a correspondence relationship with the grid, a lattice setting unit that sets a lattice in the first captured image captured from the first viewpoint, and the lattice viewed from the first viewpoint. A divided shape forming unit that forms a divided shape based on a feature point of the first measurement object; a divided shape inserting unit that interpolates the divided shape formed by the divided shape forming unit into the lattice; and A deformed grid setting unit that sets a deformed grid obtained by deforming the grid in the first image in the second captured image captured from the second viewpoint based on the inclination of the divided shape with respect to the grid. And lattice points of the lattice in the first captured image and the second An image processing apparatus, characterized in that it comprises a corresponding lattice point detecting unit for detecting a correspondence between the grid points of the deformed grid in the shadow image.

請求項12に記載の発明では、マッチング点の初期値を得る方法は、限定されない。すなわち、対応点特定部は、請求項1に記載の方法でマッチング点の初期値を得ても良いし、他の方法でマッチング点の初期値を得てもよい。この他の方法としては、OCM法(Orientation Code Matching)を挙げることができる。   In the invention described in claim 12, the method for obtaining the initial value of the matching point is not limited. That is, the corresponding point specifying unit may obtain the initial value of the matching point by the method described in claim 1 or may obtain the initial value of the matching point by another method. As another method, there is an OCM method (Orientation Code Matching).

請求項13に記載の発明は、請求項12に記載の発明において、前記格子設定手段は、第1の階層の処理において、第1の格子間隔の第1の格子を設定し、第2の階層の処理において、前記第1の格子間隔より格子間隔が狭い第2の格子を設定し、前記変形格子設定部は、前記第1の格子間隔および前記第2の格子間隔に対して格子の変形を行い、前記対応格子点検出部は、前記第1の格子間隔および前記第2の格子間隔に対して、対応する格子点の検出を行うことを特徴とする。請求項14に記載の発明は、請求項13に記載の発明において、特定の階層の処理において、一つ前の階層において特定された対応点に加えて、対応関係特定部で対応が特定された特徴点を初期値として加える初期値付加部を更に備えることを特徴とする。   According to a thirteenth aspect of the present invention, in the invention according to the twelfth aspect, the lattice setting means sets the first lattice having the first lattice interval in the processing of the first layer, and the second layer. In the processing, a second lattice having a lattice interval narrower than the first lattice interval is set, and the modified lattice setting unit deforms the lattice with respect to the first lattice interval and the second lattice interval. And the corresponding grid point detection unit detects the corresponding grid points with respect to the first grid interval and the second grid interval. In the invention described in claim 14, in the invention described in claim 13, in the processing of the specific hierarchy, in addition to the corresponding point specified in the previous hierarchy, the correspondence is specified by the correspondence specifying part. An initial value adding unit for adding a feature point as an initial value is further provided.

本発明によれば、複数の画像間における対応関係の検出を高い精度で行うことができる技術が提供される。   ADVANTAGE OF THE INVENTION According to this invention, the technique which can perform the detection of the correspondence between several images with high precision is provided.

実施形態のブロック図である。It is a block diagram of an embodiment. 実施形態における処理の手順の一例を示すフローチャートである。It is a flowchart which shows an example of the procedure of the process in embodiment. 後方交会法を説明する説明図である。It is explanatory drawing explaining a back intersection method. 前方交会法を説明する説明図である。It is explanatory drawing explaining the forward meeting method. 実施形態におけるマッチング処理部のブロック図である。It is a block diagram of the matching process part in embodiment. 特定の形状を抽出する処理の原理を説明する原理図である。It is a principle figure explaining the principle of the process which extracts a specific shape. 特定の形状を抽出する処理の原理を説明する原理図である。It is a principle figure explaining the principle of the process which extracts a specific shape. 視差の推定を行なう原理を説明する原理図であるIt is a principle figure explaining the principle which estimates parallax 視差の推定を行なう原理に係り、左右の写真画像を重ねた状態を示す原理図である。FIG. 5 is a principle diagram showing a state in which left and right photographic images are overlaid on the principle of performing parallax estimation. 左右のテンプレート形状を構成する特徴点間のマッチングを行なう状態を示す原理図である。It is a principle figure which shows the state which performs the matching between the feature points which comprise the template shape on either side. テンプレートマッチングの原理を示す原理図である。It is a principle figure which shows the principle of template matching. マッチング処理の手順の一例を示すフローチャートである。It is a flowchart which shows an example of the procedure of a matching process. マッチング処理の内容を段階的に示すイメージ図である。It is an image figure which shows the content of the matching process in steps. マッチング処理の内容を段階的に示すイメージ図である。It is an image figure which shows the content of the matching process in steps. マッチング処理の内容を段階的に示すイメージ図である。It is an image figure which shows the content of the matching process in steps. 格子とTINを構成する三角形の関係を示すイメージ図である。It is an image figure which shows the relationship between the grating | lattice and the triangle which comprises TIN. 実施形態のブロック図である。It is a block diagram of an embodiment.

1.第1の実施形態
(全体の構成)
以下において、左右2台のカメラを用意して、左写真画像と右写真画像を同時に撮影し、この左右の写真画像間の対応間関係の特定を行う機能を有する装置について説明する。なお、この例では、予め偏位修正画像が得られるように、2台のカメラの位置や向きが調整されている場合を説明する。勿論、撮影した画像を偏位修正画像に修正する手法も可能である。また、1台のカメラを用い、位置を変えての撮影を行なうことで、左写真画像と右写真画像を得る方法であってもよい。
1. First embodiment (overall configuration)
In the following, there will be described an apparatus having a function of preparing two left and right cameras, taking a left photographic image and a right photographic image at the same time, and specifying a correspondence relationship between the left and right photographic images. In this example, a case will be described in which the positions and orientations of the two cameras are adjusted so that a deviation corrected image is obtained in advance. Of course, a method of correcting a photographed image into a displacement corrected image is also possible. Alternatively, a method may be used in which a left camera image and a right camera image are obtained by performing shooting at different positions using a single camera.

図1には、実施形態のシステムのブロック図が示されている。図1には、画像処理装置100が示されている。画像処理装置100には、立体写真撮影を行なうための左カメラ200と右カメラ300が接続されている。左カメラ200と右カメラ300は、例えばデジタルスチールカメラである。左カメラ200と右カメラ300は、ステレオ画像を構成するペアとなる左右の写真画像を撮影するために、予め定めた間隔(左右間の距離)をもって配置され、撮影対象物を重複して撮影する位置関係とされている。これは、通常の立体写真を撮影する場合の設定と同じである。左右のカメラは、図示するように個別にカメラを配置する形態でもよいし、ステレオ写真撮影用の専用のカメラを用いた形態であってもよい。なお、左カメラ200と右カメラ300とは、予めキャリブレーションが行なわれており、その内部標定要素およびカメラ間の上下の視差は既知であるとする。   FIG. 1 shows a block diagram of a system according to an embodiment. FIG. 1 shows an image processing apparatus 100. The image processing apparatus 100 is connected to a left camera 200 and a right camera 300 for taking a stereoscopic photograph. The left camera 200 and the right camera 300 are digital still cameras, for example. The left camera 200 and the right camera 300 are arranged with a predetermined interval (distance between left and right) in order to take a pair of left and right photographic images constituting a stereo image, and shoot a subject to be photographed in duplicate. It is a positional relationship. This is the same as the setting for taking a normal stereoscopic photograph. The left and right cameras may be configured such that the cameras are individually arranged as shown, or may be configured using dedicated cameras for stereo photography. It is assumed that the left camera 200 and the right camera 300 are calibrated in advance, and the internal orientation elements and the vertical parallax between the cameras are known.

画像処理装置100は、CPU、RAM、ROM、ハードディスク装置、各種のインターフェースを備えた汎用のコンピュータを利用して構成されている。画像処理装置100は、ソフトウェア的に構成された以下に示す機能部を備えている。なお、以下に示す機能部は、ソフトウェア的に構成されるものに限定されず、その少なくとも一部が専用のハードウェアにより構成されていてもよい。また、画像処理装置100を汎用のコンピュータではなく、図示する機能部を備えた専用のハードウェアで構成することも可能である。   The image processing apparatus 100 is configured using a general-purpose computer having a CPU, a RAM, a ROM, a hard disk device, and various interfaces. The image processing apparatus 100 includes the following functional units configured as software. Note that the functional units shown below are not limited to those configured as software, and at least a part thereof may be configured with dedicated hardware. In addition, the image processing apparatus 100 can be configured not by a general-purpose computer but by dedicated hardware including the illustrated function unit.

画像処理装置100は、写真画像取得部101、外部標定要素取得部102、特徴点抽出部103、マッチング処理部104、特徴点座標算出部105を備えている。写真画像取得部101は左カメラ200と右カメラ300が撮影した左右の写真画像の画像データを画像処理装置100の内部に取り込む。外部標定要素取得部102は、左カメラ200と右カメラ300の外部標定要素、すなわち左カメラ200と右カメラの位置と姿勢のデータを取得する。   The image processing apparatus 100 includes a photographic image acquisition unit 101, an external orientation element acquisition unit 102, a feature point extraction unit 103, a matching processing unit 104, and a feature point coordinate calculation unit 105. The photographic image acquisition unit 101 captures image data of left and right photographic images taken by the left camera 200 and the right camera 300 into the image processing apparatus 100. The external orientation element acquisition unit 102 acquires the external orientation elements of the left camera 200 and the right camera 300, that is, the position and orientation data of the left camera 200 and the right camera.

特徴点抽出部103は、左右の写真画像のそれぞれから、撮影対象物の特徴点をソフトウェア処理により抽出する。特徴点というのは、写真画像中において、画像の特徴として他の部分と区別できる点のことである。例えば、写っている物体のエッジの部分や点として認識できる部分が特徴点となる。特徴点の抽出には、ソーベル、ラプラシアン、プリューウィット、ロバーツなどの微分フィルタを用いる。   The feature point extraction unit 103 extracts feature points of the shooting target object from each of the left and right photographic images by software processing. A feature point is a point that can be distinguished from other parts as a feature of an image in a photographic image. For example, a feature point is a portion that can be recognized as an edge portion or a point of a captured object. For extracting feature points, differential filters such as Sobel, Laplacian, Prewitt, and Roberts are used.

マッチング処理部104は、後述する手法により、ペアとなる左右の写真画像中における対応する特徴部分を検出し、その対応関係を特定する。マッチング処理部104は、図5に示す構成を有している。図5に示すマッチング処理部104の詳細については後述する。   The matching processing unit 104 detects corresponding feature portions in the paired left and right photographic images by a method to be described later, and specifies the corresponding relationship. The matching processing unit 104 has the configuration shown in FIG. Details of the matching processing unit 104 shown in FIG. 5 will be described later.

特徴点座標算出部105は、前方交会法を用いて、ペア写真画像から抽出した特徴点の三次元座標を算出する。前方交会法とは、既知の2点以上から未知点へ向かう方向を観測して、それらの方向線の交点として未知点の位置の座標を定める方法である。撮影対象物の特徴点の3次元座標を算出することで、撮影対象物を3次元データ化することができる。   The feature point coordinate calculation unit 105 calculates the three-dimensional coordinates of the feature points extracted from the pair photo images using the forward intersection method. The forward intersection method is a method of observing a direction from two or more known points to an unknown point and determining the coordinates of the position of the unknown point as an intersection of these direction lines. By calculating the three-dimensional coordinates of the feature points of the photographing object, the photographing object can be converted into three-dimensional data.

(処理の一例)
以下、画像処理装置100で行なわれる処理の一例を説明する。図2は、画像処理装置100において行われる処理の手順の一例を示すフローチャートである。図2のフローチャートを実行するためのプログラムは、画像処理装置100が備える適当なメモリ領域に格納され、画像処理装置100が備えるCPUによって実行される。なお、図2のフローチャートを実行するためのプログラムを外部の適当な記憶媒体に格納し、そこから画像処理装置100に提供される形態も可能である。この点は、後述するフローチャートを実行するプログラムにおいても同じである。
(Example of processing)
Hereinafter, an example of processing performed in the image processing apparatus 100 will be described. FIG. 2 is a flowchart illustrating an example of a processing procedure performed in the image processing apparatus 100. A program for executing the flowchart of FIG. 2 is stored in an appropriate memory area included in the image processing apparatus 100 and executed by the CPU included in the image processing apparatus 100. Note that a form in which a program for executing the flowchart of FIG. 2 is stored in an appropriate external storage medium and provided to the image processing apparatus 100 from the storage medium is also possible. This also applies to a program that executes a flowchart described later.

図2に示す処理においては、まず外部標定要素の取得を行なう(ステップS201)。なお、外部標定要素が既に取得されている場合は、ステップS201は行なわず、ステップS202以下の処理が実行される。ステップS201では、左カメラ200および右カメラ300の位置と姿勢の値が取得される。この処理は、外部標定要素取得部102において行われる。この処理では、位置が明確に判っている基準点が撮影された画像から左カメラ200および右カメラ300の外部標定要素の算出が行われる。   In the process shown in FIG. 2, first, an external orientation element is acquired (step S201). If an external orientation element has already been acquired, step S201 is not performed, and the processing from step S202 onward is executed. In step S201, the position and orientation values of the left camera 200 and the right camera 300 are acquired. This process is performed in the external orientation element acquisition unit 102. In this process, the external orientation elements of the left camera 200 and the right camera 300 are calculated from an image obtained by capturing a reference point whose position is clearly known.

ステップS201で行われる処理の一例を説明する。まず、測定対象となる実空間に基準点を設置し、この基準点の実空間における三次元座標をトータルステーションやGPSを用いて計測する。あるいは、実空間における3次元座標が既知である基準点を用意する。次に、その基準点を左カメラ200と右カメラ300で撮影し、基準点の三次元座標と各写真画像中における画像座標とに基づいて、後方交会法によってカメラの外部標定要素を算出する。また、位置関係が既知の2点が決められたスケールを用意し、このスケールの撮影画像に基づいて、カメラ200および300の外部標定要素の算出を行なってもよい。尚、この場合に得られる外部標定要素は、ローカル座標系におけるものとなる。   An example of the process performed in step S201 will be described. First, a reference point is set in the real space to be measured, and the three-dimensional coordinates of the reference point in the real space are measured using a total station or GPS. Alternatively, a reference point whose three-dimensional coordinates in the real space are known is prepared. Next, the reference point is photographed by the left camera 200 and the right camera 300, and an external orientation element of the camera is calculated by a backward intersection method based on the three-dimensional coordinates of the reference point and the image coordinates in each photographic image. Alternatively, a scale in which two points with known positional relationships are determined may be prepared, and the external orientation elements of the cameras 200 and 300 may be calculated based on the captured image of this scale. The external orientation element obtained in this case is in the local coordinate system.

以下、左カメラ200と右カメラ300の外部標定要素を算出する手順の一例を説明する。図3は、後方交会法を説明する説明図である。後方交会法とは、未知点Oから3つ以上の既知点P、P、Pへ向かう方向を観測して、それらの方向線の交点として未知点Oの位置を求める方法である。 Hereinafter, an example of a procedure for calculating the external orientation elements of the left camera 200 and the right camera 300 will be described. FIG. 3 is an explanatory diagram for explaining the backward intersection method. The backward intersection method is a method of observing directions from the unknown point O toward three or more known points P 1 , P 2 , P 3 and obtaining the position of the unknown point O as an intersection of these direction lines.

例えば、左カメラ200に着目する。ここで、左カメラ200の位置をО(X,Y,Z)とし、そこから位置が既知である基準点をP、P、Pを撮影したものとする。まず、カメラ座標系をx,y,z、写真座標系x,y、測定対象物の座標系である基準座標系X,Y,Zとする。カメラを各座標軸の正方向に対して左回りにそれぞれω,φ,κだけ順次回転させた向きで撮影が行われたものとする。そして、4点の画像座標(図3では3点のみ記載)と対応する基準点の三次元座標を下記数1に示す2次の射影変換式に代入し、観測方程式を立ててパラメ−タb1〜b8を求める。 For example, focus on the left camera 200. Here, it is assumed that the position of the left camera 200 is O (X 0 , Y 0 , Z 0 ), and reference points whose positions are known are taken from P 1 , P 2 , and P 3 . First, the camera coordinate system is assumed to be x, y, z, the photographic coordinate system x, y, and the reference coordinate system X, Y, Z which is the coordinate system of the measurement object. It is assumed that photographing is performed in a direction in which the camera is sequentially rotated counterclockwise by ω, φ, and κ counterclockwise with respect to the positive direction of each coordinate axis. Then, the four image coordinates (only three points are shown in FIG. 3) and the corresponding three-dimensional coordinates of the reference point are substituted into the quadratic projective transformation equation shown in the following equation 1, and an observation equation is established to set the parameter b1. -B8 is obtained.

Figure 2013178656
Figure 2013178656

そして、数1のパラメータb1〜b8を用いて、以下の数2から外部標定要素(X,Y,Z,ω,φ,κ)を求める。ここで、(X,Y,Z)は左カメラ20の位置を示す座標であり、(ω,φ,κ)は、その位置における左カメラ200の姿勢(向き)である。 Then, using the parameters b1 to b8 of Equation 1, external orientation elements (X 0 , Y 0 , Z 0 , ω, φ, κ) are obtained from Equation 2 below. Here, (X 0 , Y 0 , Z 0 ) are coordinates indicating the position of the left camera 20, and (ω, φ, κ) is the posture (orientation) of the left camera 200 at that position.

Figure 2013178656
Figure 2013178656

以上のようにして、位置が明確に判っている基準点を用いての左カメラ200の外部標定要素が算出される。また、同様な手法により、右カメラ300の外部標定要素の算出が行なわれる。以上が、図2のステップ201において行なわれる処理の詳細な一例である。   As described above, the external orientation element of the left camera 200 using the reference point whose position is clearly known is calculated. Further, the external orientation element of the right camera 300 is calculated by a similar method. The above is a detailed example of the process performed in step 201 of FIG.

外部標定要素を取得したら、左カメラ200から左写真画像を、右カメラ300から右写真画像を取得する(ステップS202)。この処理は、写真画像取得部101において行なわれる。ここで、左右の写真画像は、偏位修正画像として取得される。偏位修正画像は、左右の写真画像をエピポーラライン(モデル座標系のZ軸線上(撮影対象物の奥行き方向の軸線上))に整列させた画像であり、モデル座標系に対して傾きを持たない写真画像のことである。例えば、左右の偏位修正画像を左右に並べ、偏向眼鏡等を用いて左目で左偏位修正画像を選択的に視認し、右目で右偏位修正画像を選択的に視認することで、立体視を行うことができる。   When the external orientation element is acquired, a left photographic image is acquired from the left camera 200, and a right photographic image is acquired from the right camera 300 (step S202). This process is performed in the photographic image acquisition unit 101. Here, the left and right photographic images are acquired as displacement correction images. The displacement corrected image is an image in which left and right photographic images are aligned on an epipolar line (on the Z axis line of the model coordinate system (on the axis line in the depth direction of the object to be photographed)) and has an inclination with respect to the model coordinate system. There are no photographic images. For example, left and right deviation correction images are arranged side by side, and the left deviation correction image is selectively visually recognized by the left eye using deflection glasses or the like, and the right deviation correction image is selectively visually recognized by the right eye. Can be seen.

次に、取得した左右の写真画像のそれぞれにおける特徴点の抽出を行なう(ステップS203)。この処理は、特徴点抽出部103において行われる。特徴点の検出には、モラベック、ラプラシアン、ソーベルなどのフィルタが用いられる。特徴点を抽出する方法の詳細については後述する。   Next, feature points in each of the acquired left and right photographic images are extracted (step S203). This process is performed in the feature point extraction unit 103. Filters such as Moravec, Laplacian, and Sobel are used for feature point detection. Details of the method of extracting feature points will be described later.

特徴点を抽出したら、それに基づき、左右の写真画像の間における対応関係を求めるマッチング処理を行う(ステップS204)。ステップS204の処理の詳細については後述する。マッチング処理を行ったら、左右の写真画像間で対応する特徴点の3次元座標の算出を行なう(ステップS205)。   After the feature points are extracted, matching processing is performed based on the feature points to obtain the correspondence between the left and right photographic images (step S204). Details of the processing in step S204 will be described later. After performing the matching process, the three-dimensional coordinates of the corresponding feature points between the left and right photographic images are calculated (step S205).

以下、ステップS205で行なわれる処理の詳細な手順の一例を説明する。ここでは、前方交会法を用いて、左右の写真画像の中で対応関係が特定された特徴点の3次元座標の算出を行う例を説明する。図4は、前方交会法を説明する説明図である。前方交会法とは、既知の2点(O,O)上から未知点Pへ向かう方向を観測して、それらの方向線の交点として未知点Pの位置を求める方法である。図4において、対象空間の座標系をO−XYZとする。ここで、右画像のカメラの投影中心Oの座標(X01,Y01,Z01)およびカメラ座標軸の傾き(ω,φ,κ)と、左画像のカメラの投影中心Oの座標(X02,Y02,Z02)およびカメラ座標軸の傾き(姿勢)(ω,φ,κ)は、ステップS201において既に取得され既知である。また、内部標定要素(焦点距離、主点位置、レンズ歪係数)も既知である。 Hereinafter, an example of a detailed procedure of the process performed in step S205 will be described. Here, an example will be described in which the forward intersection method is used to calculate the three-dimensional coordinates of the feature points whose correspondence is specified in the left and right photographic images. FIG. 4 is an explanatory diagram for explaining the forward meeting method. The forward intersection method is a method of observing a direction from two known points (O 1 , O 2 ) toward the unknown point P and obtaining the position of the unknown point P as an intersection of these direction lines. In FIG. 4, the coordinate system of the object space is O-XYZ. Here, the coordinates (X 01 , Y 01 , Z 01 ) of the projection center O 1 of the camera on the right image and the tilts (ω 1 , φ 1 , κ 1 ) of the camera coordinate axis, and the projection center O 2 of the camera on the left image. The coordinates (X 02 , Y 02 , Z 02 ) and the tilt (posture) (ω 2 , φ 2 , κ 2 ) of the camera coordinate axes have already been acquired and known in step S201. Also, the internal orientation elements (focal length, principal point position, lens distortion coefficient) are known.

ここで、右写真画像上の特徴点p(x,y)と、これに対応する左写真画像上の特徴点p(x,y)は、左右それぞれの写真画像から得られる。したがって、対象空間の未知点となる特徴点Pの3次元座標(X,Y,Z)は、光線Oと光線Oの交点として定まる。ただし、実際には誤差があり、2本の光線が正確に交わらないため、最小二乗法によって交点位置を求める。具体的には、2本の共線条件式(数3)を立てる。これに既知の外部標定要素、内部標定要素、対応点の画像座標を代入する。 Here, the feature point p 1 (x 1 , y 1 ) on the right photographic image and the corresponding feature point p 2 (x 2 , y 2 ) on the left photographic image are obtained from the left and right photographic images. It is done. Therefore, the three-dimensional coordinates (X, Y, Z) of the feature point P, which is an unknown point in the target space, are determined as the intersection of the light beam O 1 p 1 and the light beam O 2 p 2 . However, in reality, there is an error, and the two light beams do not accurately intersect, so the intersection position is obtained by the least square method. Specifically, two collinear conditional expressions (Formula 3) are established. A known external orientation element, internal orientation element, and image coordinates of corresponding points are substituted for this.

Figure 2013178656
Figure 2013178656

さらに、この共線条件式に未知点Pの近似値(X’,Y’,Z’)に補正量を加えたもの(X’+ΔX,Y’+ΔY,Z’+ΔZ)を代入する。そして、近似値回りにテーラー展開して線形化し、最小二乗法により補正量を求める。求めた補正量によって近似値を補正し、同様の操作を繰り返し、収束解を求める。この操作によって、特徴点の三次元座標P(X,Y,Z)が求められる。この計算をすべての特徴点について行い、左写真画像と右写真画像の中で対応関係が特定された複数の特徴点の3次元座標の算出が行われる。以上がステップS205で行われる処理の内容の詳細な一例である。こうして、左カメラ200が撮影した左写真画像と右カメラ300が撮影した右写真画像とを用いて、撮影した対象物の3次元座標データが得られる。   Further, the approximate value (X ′, Y ′, Z ′) of the unknown point P plus the correction amount (X ′ + ΔX, Y ′ + ΔY, Z ′ + ΔZ) is substituted into this collinear conditional expression. Then, Taylor expansion is performed around the approximate value to linearize, and the correction amount is obtained by the least square method. The approximate value is corrected by the obtained correction amount, and the same operation is repeated to obtain a converged solution. By this operation, the three-dimensional coordinates P (X, Y, Z) of the feature points are obtained. This calculation is performed for all feature points, and the three-dimensional coordinates of a plurality of feature points whose correspondences are specified in the left photograph image and the right photograph image are calculated. The above is a detailed example of the contents of the process performed in step S205. In this way, the three-dimensional coordinate data of the photographed object is obtained using the left photograph image photographed by the left camera 200 and the right photograph image photographed by the right camera 300.

(特徴点の抽出)
以下、特徴点抽出部103において行われるステップS203の処理の詳細な一例を説明する。特徴点の抽出は、OCR(Orientation Code Richness)と呼ばれる特徴量を用いて行う。まず、方向符号θ(x,y)と呼ばれるパラメータを導入する。方向符号θ(x,y)は、直目した点から周囲の方向における明度の勾配の変化を評価するためのパラメータである。方向符号θ(x,y)は、以下のように定義される。まず、対象画像の画素(x,y)における明度をI(x,y)とし、水平方向の勾配を▽I=∂I/∂x、垂直方向の勾配を▽I=∂I/∂yとする。ここで、注目する画素における勾配方向を示すパラメータが方向符号θ(x,y)である。方向符号θ(x,y)は、θ(x,y)=tan-1(▽I/▽I)で算出される。この勾配方向の算出には、ソーベルフィルタを用いる。方向符号θ(x,y)により、注目した点における明度の勾配の方向を評価することができる。
(Extraction of feature points)
Hereinafter, a detailed example of the process of step S203 performed in the feature point extraction unit 103 will be described. Extraction of feature points is performed using a feature amount called OCR (Orientation Code Richness). First, a parameter called direction code θ (x, y) is introduced. The direction code θ (x, y) is a parameter for evaluating the change in the lightness gradient in the surrounding direction from the straight point. The direction code θ (x, y) is defined as follows. First, the brightness at the pixel (x, y) of the target image is I (x, y), the horizontal gradient is ▽ I x = ∂I / ∂x, and the vertical gradient is ▽ I y = ∂I / ∂. y. Here, the parameter indicating the gradient direction in the pixel of interest is the direction code θ (x, y). The direction code θ (x, y) is calculated by θ (x, y) = tan −1 (▽ I y / ▽ I x ). A Sobel filter is used to calculate the gradient direction. With the direction code θ (x, y), the direction of the lightness gradient at the point of interest can be evaluated.

方向符号θ(x,y)は、適当な量子化幅Δθ=2π/Nで量子化される。この方向符号θ(x,y)を量子化したものをcxyで示す(数4)。 The direction code θ (x, y) is quantized with an appropriate quantization width Δθ = 2π / N. A quantized version of this direction code θ (x, y) is denoted by c xy ( Equation 4).

Figure 2013178656
Figure 2013178656

例えば、N=16であれば、22.5度の角度間隔で方向が量子化される。なお、▽Iの絶対値と▽Iの絶対値の和に閾値を設け、低コントラストの方向を無効符合としてNを割り当てる。 For example, if N = 16, the direction is quantized at an angular interval of 22.5 degrees. Incidentally, ▽ the threshold is the sum of the absolute value of the absolute value and ▽ I y of I x, assign N in the direction of low contrast as invalid sign.

そして、着目している画素(x,y)を中心とする大きさM×M画素の局所領域Ixyを考え、その領域に含まれる各方向符合の出現頻度をhxy(i)(i=0,1,2・・)とする。そして、hxy(i)の相対度数、つまり局所領域Ixyにおける各方向符合が現れる割合を計算する。この相対度数Pxyは、下記数5で計算される。 Then, a local region I xy having a size of M × M pixels centered on the pixel (x, y) of interest is considered, and the appearance frequency of each direction code included in the region is expressed as h xy (i) (i = 0,1,2, ...). Then, the relative frequency of h xy (i), that is, the ratio at which each direction code appears in the local region I xy is calculated. This relative frequency P xy is calculated by the following equation 5.

Figure 2013178656
Figure 2013178656

ここで、hxy(N)は、低コントラスト明度に対応する値であるので、相対度数Pxyより除外する。次に、勾配方向の変化の分布がより乱雑な領域を特徴点として抽出するために、方向符合のエントロピーExyを、数6によって計算する。 Here, h xy (N) is a value corresponding to low contrast brightness, and is excluded from the relative frequency P xy . Next, the entropy E xy of the direction code is calculated by Equation 6 in order to extract a region where the distribution of changes in the gradient direction is more random as a feature point.

Figure 2013178656
Figure 2013178656

数7で計算されるエントロピーの名目最大値Emaxは、各方向符合が一様な分布Pxy(i)=1/Nに従うときに、Emax=log2Nである。ここで、閾値αe(0<αe<1)を設定し、αeEmax以上のエントロピーを持つ集まりを特徴領域と考え、特徴領域を示すパラメータであるリッチネスRxyを数7で表す。 The nominal maximum value Emax of entropy calculated by Equation 7 is Emax = log 2 N when each direction code follows a uniform distribution P xy (i) = 1 / N. Here, a threshold α e (0 <α e <1) is set, a group having an entropy equal to or greater than α e Emax is considered as a feature region, and richness R xy that is a parameter indicating the feature region is expressed by Equation 7.

Figure 2013178656
Figure 2013178656

画像全体でこのリッチネスRxyを計算して、OCR画像を作成する。そして、予め決めておいた幅でこのOCR画像をグリッド化し、各グリッド内におけるリッチネスRxyが最大値を示す点を特徴点として抽出する。以上の処理により、勾配方向の変化の分布がより乱雑な領域、言い換えると勾配の変化の分布がより多い領域が特徴点として抽出される。 The richness R xy is calculated for the entire image to create an OCR image. Then, the OCR image is gridded with a predetermined width, and a point where the richness R xy in each grid shows the maximum value is extracted as a feature point. As a result of the above processing, a region having a more gradual distribution of gradient direction changes, in other words, a region having a larger distribution of gradient changes, is extracted as a feature point.

(マッチング処理部の詳細)
以下、図1におけるマッチング処理部104の詳細な構成の一例を説明する。図5は、マッチング処理部104の詳細を示すブロック図である。図5に示すように、マッチング処理部104は、特定形状抽出部111、テンプレート形状設定部112、視差推定部113、探索範囲設定部114、対応関係特定部115を備えている。
(Details of matching processing section)
Hereinafter, an example of a detailed configuration of the matching processing unit 104 in FIG. 1 will be described. FIG. 5 is a block diagram showing details of the matching processing unit 104. As shown in FIG. 5, the matching processing unit 104 includes a specific shape extraction unit 111, a template shape setting unit 112, a parallax estimation unit 113, a search range setting unit 114, and a correspondence relationship specifying unit 115.

特定形状抽出部111は、写真画像中から抽出した複数の特徴点から特定の形状を抽出する。この処理は、左右の写真画像のそれぞれを対象に行なわれる。特定の形状としては、直線、曲線、多角形状、円、楕円、それらの組み合わせ等が挙げられる。以下、特定形状抽出部111で行なわれる処理の詳細について説明する。図6および図7は、特定の形状を抽出する処理を説明する原理図である。図6には、特定の形状として直線を抽出する場合が示され、図7には、特定の形状として曲線を抽出する場合が示されている。   The specific shape extraction unit 111 extracts a specific shape from a plurality of feature points extracted from the photographic image. This process is performed for each of the left and right photographic images. Specific shapes include straight lines, curved lines, polygonal shapes, circles, ellipses, combinations thereof, and the like. Hereinafter, details of processing performed by the specific shape extraction unit 111 will be described. 6 and 7 are principle diagrams for explaining processing for extracting a specific shape. FIG. 6 shows a case where a straight line is extracted as the specific shape, and FIG. 7 shows a case where a curve is extracted as the specific shape.

例えば、写真画像中から抽出した特徴点の集合から図6(A)に示す線状の形状が抽出できる場合を考える。この場合、特定形状抽出部111は、まず、長さに対して端点の数が多い線を、閾値を用いて除去し、ある程度の長さを有した直線だけを残す。つまり、折れ曲がりの多い形状は排除し、ある程度の長さを有した直線を抽出する。次いで、残した直線の両端の端点のデータを取得する(図6(B))。この場合、図6(B)に示されるように、2つの端点により、直線の形状がデータとして特定される。このような処理を行なうのは、扱うデータ量を減らし、処理を効率化するためである。   For example, consider a case where the linear shape shown in FIG. 6A can be extracted from a set of feature points extracted from a photographic image. In this case, the specific shape extraction unit 111 first removes a line having a large number of end points with respect to the length using a threshold value, and leaves only a straight line having a certain length. That is, a shape with many bends is excluded, and a straight line having a certain length is extracted. Next, end point data at both ends of the remaining straight line is acquired (FIG. 6B). In this case, as shown in FIG. 6B, the shape of a straight line is specified as data by two end points. Such processing is performed in order to reduce the amount of data to be handled and to improve the processing efficiency.

また例えば、図7(A)に示すような特徴点の集まりから曲線が抽出された場合、特定形状抽出部111は、まず曲線の端点を取得する(図7(B))。次に、2つの端点を結ぶ直線を設定し、端点を除く当該曲線を構成する各特徴点からこの直線の垂線を設定し、その長さを計算する(図7(C))。そして、曲線Rと直線Lの間隔dが最大となる曲線Rの部分に分割点Dを設定し(図7(D))、この分割点Dと端点との間で同様の方法により、更に細かい分割点を設定する(図7(E))。これをdが予め定めた閾値以下となるまで繰り返す。こうして、図7(F)に示すように曲線を複数の直線で近似した形状を得る。ここで、各直線は、図6(B)に示す2つの端点を結ぶ直線の場合と同様の方法でデータとして取得される。すなわち、曲線Rが、端点と分割点により、データとして特定される。なお、図7では、説明を省略しているが、曲線の場合も図6の直線の場合と同様に、扱うデータ量を制限するために、閾値により、長さの短い曲線の排除が行なわれる。   For example, when a curve is extracted from a collection of feature points as shown in FIG. 7A, the specific shape extraction unit 111 first acquires the end points of the curve (FIG. 7B). Next, a straight line connecting the two end points is set, a perpendicular of the straight line is set from each feature point constituting the curve excluding the end points, and the length thereof is calculated (FIG. 7C). Then, a dividing point D is set in the portion of the curve R where the distance d between the curve R and the straight line L is maximum (FIG. 7D), and a finer method is performed between the dividing point D and the end point by the same method. A division point is set (FIG. 7E). This is repeated until d falls below a predetermined threshold. In this way, a shape obtained by approximating the curve with a plurality of straight lines is obtained as shown in FIG. Here, each straight line is acquired as data in the same manner as in the case of a straight line connecting two end points shown in FIG. That is, the curve R is specified as data by the end points and the division points. Although the description is omitted in FIG. 7, in the case of a curve, similarly to the case of the straight line in FIG. 6, in order to limit the amount of data to be handled, a short-length curve is eliminated by a threshold. .

そして、図6(B)に示す端点の特定による直線の把握、および図7(F)に示す曲線を端点と分割点により把握する方法により、撮影対象物を形作る特定の形状の大雑把な輪郭がデータ化される。以上の処理が、特定形状抽出部111で行なわれる。   Then, the outline of the specific shape that forms the object to be photographed can be obtained by grasping the straight line by specifying the end point shown in FIG. 6B and the method of grasping the curve shown in FIG. 7F by the end point and the dividing point. It is converted into data. The above process is performed by the specific shape extraction unit 111.

テンプレート形状設定部112は、特定形状抽出部111で抽出された特定の形状の中から1または複数を選択し、それをテンプレート形状として設定する。このテンプレート形状の設定は、左右の写真画像のそれぞれに対して行なわれる。図13には、テンプレート形状の一例が示されている。図13では明らかでないが、図13の形状は、実際の形状を簡素化して大雑把に把握した形状であり、その形状は、直線の組み合わせ、直線と曲線の組み合わせ、または曲線の組み合わせより構成されている。そして、当該テンプレート形状を構成する要素となる直線および/または曲線は、図6(B)や図7(F)に示す端点や分割点を用いた方法により、特定されている。   The template shape setting unit 112 selects one or a plurality of specific shapes extracted by the specific shape extraction unit 111 and sets them as a template shape. The template shape is set for each of the left and right photographic images. FIG. 13 shows an example of the template shape. Although it is not clear in FIG. 13, the shape of FIG. 13 is a shape obtained by simplifying the actual shape and roughly grasping the shape, and the shape is composed of a combination of straight lines, a combination of straight lines and curves, or a combination of curves. Yes. And the straight line and / or curve used as the element which comprises the said template shape are specified by the method using the end point and division | segmentation point shown to FIG. 6 (B) and FIG. 7 (F).

視差推定部113は、左右の写真画像の視差を推定する。以下、視差推定部113で行なわれる処理の一例を説明する。図8は、視差の推定を行なう原理を説明する原理図である。図8には、図6の端点、図7の端点や分割点に対応する左写真画像の特徴点Fおよび右写真画像の特徴点F’が示されている。なお、この段階において、特徴点Fと特徴点F’とは、対応関係が特定されていない状態が示されている。   The parallax estimation unit 113 estimates the parallax between the left and right photographic images. Hereinafter, an example of processing performed by the parallax estimation unit 113 will be described. FIG. 8 is a principle diagram for explaining the principle of performing parallax estimation. FIG. 8 shows the feature points F of the left photographic image and the feature points F ′ of the right photographic image corresponding to the endpoints of FIG. 6, the endpoints and the dividing points of FIG. 7. Note that, at this stage, the feature point F and the feature point F ′ are in a state where no correspondence is specified.

ここで、視差推定部113は、以下の処理を行なう。まず、左写真画像中の特徴点Fの近傍から特徴点として利用できるパスポイントP1〜P3を抽出する。パスポイントP1〜P3は、特徴点Fに係る左右の写真画像の視差を計算するための補助的な特徴点として利用される。パスポイントP1〜P3は、特徴点Fからの距離が画像の分解能の数倍〜数千倍となる位置から抽出する。この処理は、図1の特徴点抽出部103の機能によって行なわれる。なお、パスポイントの数は、3点に限定されず、2点以上であればよい。パスポイントの数を多くすると、演算の精度は向上するが、処理の負担は増大する。したがって、ハードウェアの演算速度や許容される演算時間に鑑み、パスポイントの数が選択される。ここでは、左写真画像に着目して、パスポイントP1〜P3の抽出を行なったが、右写真画像に着目してパスポイントの抽出を行なってもよい。   Here, the parallax estimation unit 113 performs the following processing. First, pass points P1 to P3 that can be used as feature points are extracted from the vicinity of the feature point F in the left photograph image. The pass points P1 to P3 are used as auxiliary feature points for calculating the parallax between the left and right photographic images related to the feature point F. The pass points P1 to P3 are extracted from positions where the distance from the feature point F is several to several thousand times the resolution of the image. This process is performed by the function of the feature point extraction unit 103 in FIG. The number of pass points is not limited to three, but may be two or more. Increasing the number of pass points improves the accuracy of the calculation, but increases the processing load. Therefore, the number of pass points is selected in view of the hardware calculation speed and the allowable calculation time. Here, the extraction of the pass points P1 to P3 is performed focusing on the left photograph image, but the path points may be extracted focusing on the right photograph image.

次に、左写真画像のパスポイントP1〜P3に対応する右写真画像のパスポイントの検出が行なわれる。この処理は、LSM(最小二乗)マッチングやテンプレートマッチングを用いて行なわれる。以下、LSM(最小二乗)マッチングについて説明する。まず、LSM法のパターン比較を行う際のテンプレートをt1(i,j)とし、変形されたマッチングウィンドウをf(x,y)とし、マッチングウィンンドウの変形を数8のアフィン変換によって近似する。 Next, detection of the pass point of the right photographic image corresponding to the pass points P1 to P3 of the left photographic image is performed. This processing is performed using LSM (least square) matching or template matching. Hereinafter, LSM (least square) matching will be described. First, let t 1 (i, j) be a template for pattern comparison in the LSM method, f (x, y) be a modified matching window, and approximate the deformation of the matching window by the affine transformation of Eq. .

Figure 2013178656
Figure 2013178656

ここで、比較する画素における濃度差r(i,j)は、以下の数9によって与えられる。   Here, the density difference r (i, j) in the pixel to be compared is given by the following equation (9).

Figure 2013178656
Figure 2013178656

r(i,j)は、テンプレートと幾何学的変換後のマッチングウィンドウの間における濃淡の差を表す。そして、数10に示す濃度差の二乗和を最小化するように、パラメータt〜tを求める。 r (i, j) represents the difference in shading between the template and the matching window after geometric transformation. Then, parameters t 0 to t 5 are obtained so as to minimize the square sum of the density differences shown in Equation 10 .

Figure 2013178656
Figure 2013178656

ここで、t,t,t,tは、マッチングウィンドウの変形を表し、t,tが求めるべき検出位置の座標となる。 Here, t 1 , t 2 , t 4 , and t 5 represent the deformation of the matching window, and t 0 and t 3 are the coordinates of the detection position to be obtained.

次に、テンプレートマッチングの一例を説明する。テンプレートマッチングは、2つの座標系における画像の座標データを相互に比較し、両者の相関関係により、2つの画像の対応関係を求める方法である。テンプレートマッチングでは、2つの視点それぞれから見た画像の特徴点の対応関係が求められる。図11は、テンプレートマッチングの原理を説明する説明図である。この方法では、図示するように、N×N画素のテンプレート画像を、それよりも大きいM×M画素の入力画像内の探索範囲(M−N+1)上で動かし、下記数11で示される相互相関関数C(a,b)が最大となるような(つまり相関の程度が最大となるような)テンプレート画像の左上位置を求める。 Next, an example of template matching will be described. Template matching is a method in which the coordinate data of images in two coordinate systems are compared with each other, and the correspondence between the two images is obtained by the correlation between the two. In template matching, a correspondence relationship between feature points of an image viewed from two viewpoints is obtained. FIG. 11 is an explanatory diagram for explaining the principle of template matching. In this method, as shown in the drawing, a template image of N 1 × N 1 pixel is moved on a search range (M 1 −N 1 +1) 2 in an input image of M 1 × M 1 pixel larger than that, The upper left position of the template image is calculated so that the cross-correlation function C (a, b) expressed by the following formula 11 is maximized (that is, the degree of correlation is maximized).

Figure 2013178656
Figure 2013178656

上記の処理は、一方の画像の倍率を変えながら、また回転させながら行われる。そして、相関関係が最大となった条件で、両画像の一致する領域が求まり、更にこの領域における特徴点を抽出することで、対応点の検出が行われる。   The above processing is performed while changing the magnification of one image and rotating it. And the area | region where both images correspond is calculated | required on the conditions from which the correlation became the maximum, Furthermore, the corresponding point is detected by extracting the feature point in this area | region.

以上のような、一例を挙げて説明した方法により、左右の写真画像におけるパスポイント同士の対応関係、すなわちP1とP1’、P2とP2’、P3とP3’の対応関係が求められる。なお、この段階では、左右の写真画像におけるパスポイント同士の対応関係には、それなりの誤差が含まれている。   By the method described above with an example as described above, the correspondence between the pass points in the left and right photographic images, that is, the correspondence between P1 and P1 ', P2 and P2', and P3 and P3 'is obtained. At this stage, the correspondence between the pass points in the left and right photographic images includes a certain error.

次に、左右の写真画像中における対応するパスポイント同士の視差、つまり2つの写真画像を重ねた場合における対応するパスポイント同士の写真座標位置の差Dn(D,D,D)を算出する。図9は、左右の写真画像を重ねた状態を示す原理図が示されている。 Next, the parallax between the corresponding pass points in the left and right photographic images, that is, the difference Dn (D 1 , D 2 , D 3 ) between the photographic coordinate positions of the corresponding pass points when the two photographic images are overlapped. calculate. FIG. 9 is a principle diagram showing a state in which left and right photographic images are superimposed.

ここで、左写真画像中におけるパスポイントP1の位置と右写真画像中におけるパスポイントP1’の位置は、写真画像中の座標として求めることができる。よって、P1とP1’の対応関係が特定された状態で、P1とP1’の写真画像中における位置の差D1を視差として算出できる。同様の方法で、P2とP2’の間の視差D2、P3とP3’の間の視差D3の算出が行なわれる。そして、下記数12を用いて、着目した特徴点Fからの距離Lnに応じた重み付けを行い視差の加重平均Dを算出する。   Here, the position of the pass point P1 in the left photographic image and the position of the pass point P1 'in the right photographic image can be obtained as coordinates in the photographic image. Therefore, with the correspondence relationship between P1 and P1 'specified, the position difference D1 in the photographic image between P1 and P1' can be calculated as the parallax. The parallax D2 between P2 and P2 'and the parallax D3 between P3 and P3' are calculated by the same method. Then, the weighted average D of parallax is calculated by performing weighting according to the distance Ln from the focused feature point F using the following formula 12.

Figure 2013178656
Figure 2013178656

数12には、以下の意味がある。まず、上述したように、左右の写真画像間におけるパスポイント同士(例えば、P1とP1’)に係る視差には、それなりの誤差が含まれている。また、その値は、Fから遠い程、Fに係る真の視差(つまり、FとF’の間の実際の視差)と異なる傾向が増大する。したがって、パスポイントのFからの距離に応じて、Dnの寄与に重みを付け、Dnの加重平均Dを算出する。そして、このDを特徴点FとF’の間の視差の推定値とする。   Equation 12 has the following meaning. First, as described above, the parallax between the pass points between the left and right photographic images (for example, P1 and P1 ') includes a certain error. Further, as the value is farther from F, the tendency to be different from the true parallax related to F (that is, the actual parallax between F and F ′) increases. Therefore, the contribution of Dn is weighted according to the distance from the pass point F, and the weighted average D of Dn is calculated. This D is an estimated value of the parallax between the feature points F and F ′.

この手法によれば、個々のDnの算出値が正確さに欠き、そこに誤差が含まれていても、誤差が平均化され、更にFからの距離の違いによる誤差の増大が抑えられ、精度の高いFとF’に係る視差の推定値を算出することができる。すなわち、図9の場合でいうと、D1〜D3には、真の視差の値よりも大きな方向にぶれた誤差と小さな方向にぶれた誤差とが含まれる。したがって、その平均値を算出することで、真の値よりも上下の方向にぶれた誤差がキャンセルされ、より真の値に近い視差の推定値が得られる。また、Fから離れると、Fに係る誤差要因以外の誤差要因の影響が強くなるので、単に平均をとったのでは、その影響でDの値の精度が低下する。そこで、Fからの距離に応じた重み(Ls−Ln)/Lsを掛けた状態での加重平均を計算することで、Fからの距離に応じて発生する誤差要因の影響を抑え、Dの推定精度を高めることができる。なお、Dの値は、特徴点毎に異なる可能性が高いので、着目する特徴点毎に算出する。   According to this method, even if the calculated value of each Dn is inaccurate and an error is included in the calculated value, the error is averaged, and an increase in error due to a difference in distance from F can be suppressed. It is possible to calculate an estimated value of parallax related to high F and F ′. That is, in the case of FIG. 9, D1 to D3 include an error that is blurred in a direction larger than the true parallax value and an error that is blurred in a small direction. Therefore, by calculating the average value, an error that is shifted in the vertical direction from the true value is canceled, and an estimated value of parallax closer to the true value is obtained. Further, since the influence of an error factor other than the error factor relating to F becomes stronger when moving away from F, if the average is simply taken, the accuracy of the value of D decreases due to the influence. Therefore, by calculating the weighted average in a state where the weight (Ls−Ln) / Ls corresponding to the distance from F is multiplied, the influence of the error factor generated according to the distance from F is suppressed, and D is estimated. Accuracy can be increased. Note that the value of D is likely to be different for each feature point, so it is calculated for each feature point of interest.

以上が視差推定部113の機能である。上記の視差の推定は、テンプレート形状設定部112が設定した複数のテンプレート形状のそれぞれにおいて行なわれる。また、各テンプレート形状を特定する端点や分割点(図6,図7参照)の少なくとも一つに対して行なわれる。また、上記の説明では、左写真画像に着目して数12の計算を行なったが、右写真画像に着目して同様の処理をおこなってもよい。また、ここでは、上下方向の視差が既知である場合を前提に説明を行ったが、上下方向の視差が不明の場合は、同様の方法により、上下方向も含めた視差の推定値の算出を視差推定部113において行うことができる。   The above is the function of the parallax estimation unit 113. The above parallax estimation is performed for each of a plurality of template shapes set by the template shape setting unit 112. Further, it is performed on at least one of end points and division points (see FIGS. 6 and 7) for specifying each template shape. In the above description, the calculation of Formula 12 is performed focusing on the left photograph image, but the same processing may be performed focusing on the right photograph image. Also, here, the description has been made on the assumption that the parallax in the vertical direction is known, but when the parallax in the vertical direction is unknown, the estimated value of the parallax including the vertical direction is calculated by the same method. This can be done in the parallax estimation unit 113.

次に、探索範囲設定部114について説明する。探索範囲設定部114は、視差推定部113が推定した視差の値に基づき、テンプレート形状設定部112が設定したテンプレート形状の左右の写真画像間における探索範囲を決定する。ここでは、左右の写真画像中におけるテンプレート形状を構成する特徴点(端点と分割点)毎に探索範囲の設定が行なわれる。本実施形態の場合、左カメラ200と右カメラ300の標定を行った段階で上下方向の視差は求められている。また、左右の写真画像で対応するテンプレート形状間の視差は、視差推定部113によって数12に係る処理により求められている。数12のDは、左右の写真画像を構成する特徴点が、Dの程度で左右にずれていることを意味している。したがって、左右におけるDの範囲で探索を行うことで、左画像のテンプレート形状に対応する右画像のテンプレート形状を探し出すことができる。実際には、Dは推定値であり、誤差を含むので、D+ΔD(ΔD=D/4〜D)の範囲が探索範囲として設定される。なお、視差推定部113が左右方向に加えて上下方向の視差も算出した場合には、上下左右の方向にも探索範囲の設定が行われる。   Next, the search range setting unit 114 will be described. The search range setting unit 114 determines a search range between the left and right photographic images of the template shape set by the template shape setting unit 112 based on the parallax value estimated by the parallax estimation unit 113. Here, the search range is set for each feature point (end point and division point) constituting the template shape in the left and right photographic images. In the case of the present embodiment, the vertical parallax is obtained when the left camera 200 and the right camera 300 are oriented. Further, the parallax between the template shapes corresponding to the left and right photographic images is obtained by the parallax estimation unit 113 by the processing according to Equation 12. D in Expression 12 means that the feature points constituting the left and right photographic images are shifted to the left and right by the degree of D. Therefore, by searching in the range of D on the left and right, the template shape of the right image corresponding to the template shape of the left image can be found. Actually, since D is an estimated value and includes an error, a range of D + ΔD (ΔD = D / 4 to D) is set as a search range. When the parallax estimation unit 113 calculates the vertical parallax in addition to the horizontal direction, the search range is also set in the vertical and horizontal directions.

対応関係特定部115は、探索範囲設定部114が設定した範囲において、左写真画像のテンプレート形状と右写真画像のテンプレート形状の対応関係を探索し、それを特定する処理を行う。具体的には、左写真画像のテンプレート形状を構成する端点および分割点と、右写真画像のテンプレート形状を構成する端点および分割点との対応関係を、上記の探索範囲において探索し、当該対応関係の特定を行なう。図10には、左写真画像における特徴点F1と右写真画像における特徴点F1’の対応関係(マッチング)を調べる原理が示されている。特徴点F1,F1’は、図6で説明した端点や分割点の一つである。   The correspondence relationship specifying unit 115 searches for the correspondence relationship between the template shape of the left photograph image and the template shape of the right photograph image in the range set by the search range setting unit 114, and performs a process of specifying it. Specifically, the correspondence between the end points and the dividing points constituting the template shape of the left photographic image and the end points and the dividing points constituting the template shape of the right photographic image is searched in the search range, and the correspondence relationship is searched. To identify. FIG. 10 shows the principle of examining the correspondence (matching) between the feature point F1 in the left photographic image and the feature point F1 'in the right photographic image. The feature points F1 and F1 'are one of the end points and division points described with reference to FIG.

図10の例では、特徴点F1とF1’との間の視差は、図8,図9に示す原理によって算出され、その値を用いて、図中の探索範囲(D+ΔD)の設定がされている。この方法によれば、探索範囲が限定されて絞られ、更に特徴が把握し易いテンプレート形状の対応関係(マッチング性)の探索が行われる。このため、多数の特徴点同士のマッチングを総当りで行なう方法に比較して、対応する形状の一致性を高い精度で、且つ少ない演算量で求めることができる。   In the example of FIG. 10, the parallax between the feature points F1 and F1 ′ is calculated according to the principle shown in FIGS. 8 and 9, and the search range (D + ΔD) in the figure is set using the value. Yes. According to this method, the search range is limited and narrowed down, and a search for the correspondence (matching property) of the template shapes for which the features are easier to grasp is performed. For this reason, compared with a method in which a large number of feature points are matched with each other, the matching of corresponding shapes can be obtained with high accuracy and with a small amount of calculation.

探索範囲の設定は、複数ある特徴点毎で行うのが、精度の上で好ましい。なお、テンプレート形状の形は、円や多角形等の閉じた形であってもよいし、線や曲線等の閉じていない形であってもよい。また、実際には、一つのテンプレート形状だけではなく、複数のテンプレート形状が画面中から抽出され、それらの組み合わせ、あるいはそのそれぞれが処理の対象となる。以上が、対応関係特定部115において行われる処理の概要である。   The search range is preferably set for each of a plurality of feature points in terms of accuracy. The shape of the template shape may be a closed shape such as a circle or a polygon, or may be a non-closed shape such as a line or a curve. In practice, not only one template shape but also a plurality of template shapes are extracted from the screen, and a combination thereof or each of them is a processing target. The above is the outline of the processing performed in the correspondence relationship specifying unit 115.

また、マッチング処理部104は、格子設定部121、分割形状形成部122、分割形状内挿部123、変形格子設定部124、対応格子点検出部125、初期値付加部126を備えている。格子設定部121は、第1の視点から撮影した第1の撮影画像(この場合は、左写真画像)中に格子を設定する。分割形状形成部122は、設定された格子に対応関係特定部115が特定したテンプレート形状を構成する特徴点に基づく分割形状を形成する。この分割形状としては、TINを構成する三角形が挙げられる。三角形以外の四角形や五角形と等の多角形に分割することも可能である。   The matching processing unit 104 includes a lattice setting unit 121, a divided shape forming unit 122, a divided shape interpolation unit 123, a modified lattice setting unit 124, a corresponding lattice point detecting unit 125, and an initial value adding unit 126. The lattice setting unit 121 sets a lattice in the first captured image (in this case, the left photograph image) captured from the first viewpoint. The divided shape forming unit 122 forms a divided shape based on feature points constituting the template shape specified by the correspondence specifying unit 115 in the set lattice. As this divided shape, a triangle constituting TIN can be cited. It is also possible to divide into polygons such as quadrilaterals and pentagons other than triangles.

分割形状内挿部123は、分割形状形成部122が形成した分割形状を格子に内挿する。変形格子設定部124は、格子に内挿された分割形状の格子面に対する傾きに基づき、第2の視点から撮影した第2の撮影画像中(第1の写真画像が左写真画像であれば、右写真画像)に第1の画像中の格子を変形した変形格子を設定する。対応格子点検出部125は、第1の撮影画像中の格子の格子点と第2の撮影画像中の変形格子の格子点との対応関係を特定する。初期値付加部126は、特定の階層の処理において、一つ前の階層において特定された対応点に加えて、テンプレート形状を構成する特徴点を初期値として加える処理を行う。   The divided shape interpolation unit 123 interpolates the divided shape formed by the divided shape forming unit 122 into the lattice. The deformation grid setting unit 124 is based on the inclination with respect to the grid surface of the divided shape interpolated in the grid, in the second captured image captured from the second viewpoint (if the first photographic image is a left photographic image, A deformed grid obtained by deforming the grid in the first image is set in the right photograph image). The corresponding grid point detection unit 125 identifies the correspondence between the grid points of the grid in the first captured image and the grid points of the deformed grid in the second captured image. The initial value adding unit 126 performs a process of adding a feature point constituting the template shape as an initial value in addition to the corresponding point specified in the previous hierarchy in the process of the specific hierarchy.

例えば、格子設定部121は、図14のステップ5に係る処理、および図15のステップ9に係る処理を行う。例えば、分割形状形成部122は、図14のステップ5に係る処理、および図15のステップ9に係る処理を行う。例えば、分割形状内挿部123は、図14のステップ5に係る処理、および図15のステップ9に係る処理を行う。例えば、変形格子設定部124は、図14のステップ6に係る処理、および図15のステップ10に係る処理を行う。例えば、対応格子点検出部125は、図14のステップ7に係る処理、および図15のステップ11に係る処理を行う。   For example, the lattice setting unit 121 performs the process according to Step 5 in FIG. 14 and the process according to Step 9 in FIG. For example, the divided shape forming unit 122 performs the process according to Step 5 in FIG. 14 and the process according to Step 9 in FIG. For example, the divided shape interpolation unit 123 performs the process according to Step 5 in FIG. 14 and the process according to Step 9 in FIG. For example, the modified grid setting unit 124 performs the process according to Step 6 in FIG. 14 and the process according to Step 10 in FIG. For example, the corresponding grid point detection unit 125 performs the process according to Step 7 in FIG. 14 and the process according to Step 11 in FIG.

(対応点処理の一例)
図2のステップS204において行われる処理の詳細な一例を説明する。この処理では、左右の写真画像のより詳細な対応関係を特定する処理が行われる。図12は、図2のステップS204で行われる処理の詳細な一例を示すフローチャートである。図13〜図15は、処理の状態を段階的に示す左右の写真画像のイメージ図である。この処理では、テンプレート形状を利用したエッジマッチングによりマッチングが特定された特徴点を初期値とし、この初期値を格子に内挿して格子点を生成し、この内挿した格子点から他方の写真画像の対応する格子(探索範囲)を変形し、この変形した探索範囲でのステレオマッチングを行なう。更に、この一連の処理を1階層の処理とし、格子間隔を順次小さくすることで、段階的に探索範囲を狭めながらのステレオマッチングを行なう。また、階層が進むごとに、テンプレート形状を利用したエッジマッチングによりマッチングが特定された特徴点を初期値として付加し、その都度、この初期値を探索範囲の設定に用いることで、マッチングの精度を高めている。以下、この処理の一例を詳細に説明する。
(Example of corresponding point processing)
A detailed example of the process performed in step S204 of FIG. 2 will be described. In this process, a process for specifying a more detailed correspondence between the left and right photographic images is performed. FIG. 12 is a flowchart showing a detailed example of the process performed in step S204 of FIG. 13 to 15 are image diagrams of left and right photographic images showing the processing state in stages. In this process, feature points whose matching is specified by edge matching using a template shape are used as initial values, and the initial values are interpolated into a lattice to generate lattice points, and the other photographic image is generated from the interpolated lattice points. The corresponding grid (search range) is modified, and stereo matching is performed in the modified search range. Further, this series of processing is made one-level processing, and the lattice matching is sequentially reduced to perform stereo matching while gradually narrowing the search range. Also, each time the hierarchy progresses, feature points identified by edge matching using template shapes are added as initial values, and each time the initial value is used for setting a search range, the matching accuracy is improved. It is increasing. Hereinafter, an example of this process will be described in detail.

図12の処理が開始されると、まず左右の写真画像における特徴点に基づく特定形状の抽出が行われる(ステップS401)。この処理は、図5の特定形状抽出部111において、図6および図7に関連して説明した原理に従って行われる。   When the processing of FIG. 12 is started, extraction of a specific shape based on feature points in the left and right photographic images is first performed (step S401). This processing is performed in the specific shape extraction unit 111 of FIG. 5 according to the principle described in relation to FIGS.

次に、ステップS401で抽出した特定形状に基づく、テンプレート形状の設定が行われる(ステップS402、ステップ1)。この処理は、図5のテンプレート形状設定部112において行われる。図13には、テンプレート形状の一例が示されている。   Next, a template shape is set based on the specific shape extracted in step S401 (step S402, step 1). This processing is performed in the template shape setting unit 112 in FIG. FIG. 13 shows an example of the template shape.

次に、左写真画像と右写真画像における着目した特徴点における左右の写真画像間における視差を推定する(ステップS403、ステップ2)。ここで、着目する特徴点は、テンプレート形状を特定する端点と分割点が選択される。この処理は、図5の視差推定部113において、図8および図9に示した原理に従って行われる。また、図13のステップ2には、この段階の画像イメージが示されている。   Next, the parallax between the left and right photographic images at the feature point of interest in the left photographic image and the right photographic image is estimated (step S403, step 2). Here, as the feature point of interest, an end point and a division point that specify the template shape are selected. This process is performed in accordance with the principle shown in FIGS. 8 and 9 in the parallax estimation unit 113 of FIG. Step 2 in FIG. 13 shows an image at this stage.

ステップS403における視差の推定を行ったら、推定した視差に基づく探索範囲の設定を着目した特徴点毎に行う(ステップS404)。この処理は、図5の探索範囲設定部114において、図10に示した原理に従って行われる。次に、推定した視差を探索範囲とした左右の写真画像における特徴点間の対応関係の探索が行われ、テンプレート形状を構成する端点と分割点間の対応関係の特定が行なわれる(ステップS405、ステップ3)。この処理が形状マッチング(エッジマッチング)である。対応関係の特定は、例えば、前述した最小二乗マッチング(LSM)を用いて行われる。この際、直線や曲線といった把握し易い形状に沿った特徴点同士の対応関係が限定された範囲で探索されるので、高精度のマッチングが可能となる。また、この際、テンプレート形状を特定する端点および分割点のマッチングの結果を利用して、端点および分割点の間の点、すなわちテンプレート形状を構成する全ての特徴点のマッチングが調べられる。   When the parallax is estimated in step S403, the search range based on the estimated parallax is set for each feature point of interest (step S404). This processing is performed according to the principle shown in FIG. 10 in the search range setting unit 114 of FIG. Next, the correspondence between the feature points in the left and right photographic images with the estimated parallax as the search range is searched, and the correspondence between the end points constituting the template shape and the division points is specified (step S405, Step 3). This process is shape matching (edge matching). The identification of the correspondence is performed using, for example, the aforementioned least square matching (LSM). At this time, since the correspondence between feature points along a shape that is easy to grasp, such as a straight line or a curve, is searched in a limited range, highly accurate matching is possible. At this time, the matching between the end points and the dividing points, that is, the points between the end points and the dividing points, that is, the matching of all feature points constituting the template shape is examined using the result of matching the end points and the dividing points that specify the template shape.

次に、ステップS405(ステップ3)で対応関係が特定された左右の写真画像における特徴点の3次元座標の算出が行われる(ステップS406、ステップ4)。この処理は、図4に原理を示す前方交会法を用いて特徴点座標算出部105において行なわれる。なお、この際、3次元座標の算出は、端点および分割点のみではなく、それに加えてその間の点、すなわちテンプレート形状を構成する全ての特徴点を対象に行なわれる。   Next, the three-dimensional coordinates of the feature points in the left and right photographic images for which the correspondence relationship is specified in step S405 (step 3) are calculated (steps S406 and step 4). This processing is performed in the feature point coordinate calculation unit 105 using the forward intersection method whose principle is shown in FIG. At this time, the calculation of the three-dimensional coordinates is performed not only on the end points and the division points, but also on the points in between, that is, on all the feature points constituting the template shape.

次に、ステップS407(図14のS5)の処理を行う。この処理では、まず、ステップS406(ステップS4)で3次元座標が算出された特徴点(これが初期値となる)を用いてTIN(Triangular Irregular Network)の作成を行なう。TINは、対象物の画像を三角形のパッチの集合として捉えた近似画像のことである。また、一方の写真画像上(この例の場合は、左写真画像を利用)において、一辺の長さがpの正方格子を形成する。なお、kは、階層の数である。階層の数kは、左右の偏位修正画像の画素数(H,V)から、H,Vの画素数の小さい方を32画素以下になる2で割った回数、すなわちmin(H,V)/2≦32を満たすkの最小値として設定される。格子間隔pは、予め設定した分解能をPi、当該格子の中心座標における視差をdm、左右のカメラの間隔をBとして、p=Pi×(dm/B)で計算される。なお、pの値は、後述するTINの内挿が可能な値が採用される。 Next, the process of step S407 (S5 in FIG. 14) is performed. In this process, first, a TIN (Triangular Irregular Network) is created using the feature point (this is the initial value) for which the three-dimensional coordinates are calculated in step S406 (step S4). TIN is an approximate image obtained by capturing an image of an object as a set of triangular patches. Also, (in this example, use the left photographic image) on one of the photographic image in a length of one side to form a square lattice of p k. Note that k is the number of hierarchies. The number k of layers is the number of times obtained by dividing the smaller number of pixels of H and V from the number of pixels (H, V) of the left and right deviation corrected images by 2, which is 32 pixels or less, that is, min (H, V). It is set as the minimum value of k that satisfies / 2 k ≦ 32. The grid interval pk is calculated by p k = Pi × (dm / B) where Pi is a preset resolution, dm is the parallax at the center coordinates of the grid, and B is the distance between the left and right cameras. The value of p k are capable of interpolation to be described later TIN value is adopted.

そして、作成したTINを格子間隔pの正方格子に内挿し、正方格子に内装されたTINを作成する。この処理では、まず、テンプレート形状(図13のステップ1)を構成する直線や曲線の上にある特徴点をDelaunay三角形分割し、Delaunay三角形を得る。そして、得られたDelaunay三角形の格子点におけるZ値を内装し、格子点を頂点とする三角形を得る。この際、テンプレート形状を構成する特徴点として、端点および分割点のみではなく、それに加えてその間の点も利用する。 Then, the created TIN interpolated in a square lattice of lattice spacing p k, create a TIN is decorated in a square lattice. In this process, first, Delaunay triangles are obtained by dividing Delaunay triangles on feature points on the straight lines and curves constituting the template shape (step 1 in FIG. 13). Then, the Z value at the lattice point of the obtained Delaunay triangle is internally provided to obtain a triangle having the lattice point as a vertex. At this time, not only the end points and the division points but also the points between them are used as the feature points constituting the template shape.

図14には、ステップS406(ステップS4)で3次元座標が算出された特徴点(これが初期値となる)を用いて作成したDelaunay三角形(TINを構成する三角形)の一つTIN0と、TIN0を正方格子に内挿することで得たTINkの関係が示されている。ここで、TIN0の三箇所の頂点は、ステップS406(ステップS4)で3次元座標が算出された特徴点から得られ、TINkの三箇所の頂点は、格子の頂点である。図示するように、TIN0に含まれる正方格子の各頂点におけるTIN0のZ値によって、TINkの各頂点が特定される。こうして、正方格子に内挿された三角形TINkを得る。図14のステップ5には、このようにして形成されたTINおよびTIN0が、簡素化されたイメージとして示されている。ここでは、格子に内挿された三角形として、TINのみが示されているが、同様の処理が格子の各部(各正方格子)において行われる。以上がTINの正方格子への内挿を行なうステップS407の処理についての説明である。 FIG. 14 shows one of TIN 0 and TIN 0 of Delaunay triangles (triangles constituting TIN) created using the feature points (this is the initial value) for which the three-dimensional coordinates have been calculated in step S406 (step S4). The relationship of TIN k obtained by interpolating 0 into a square lattice is shown. Here, the three vertices of TIN 0 are obtained from the feature points whose three-dimensional coordinates are calculated in step S406 (step S4), and the three vertices of TIN k are the vertices of the lattice. As shown, the Z value of TIN 0 at each vertex of a square grid that is included in the TIN 0, each vertex of the TIN k is specified. Thus, a triangle TIN k interpolated in a square lattice is obtained. Step 5 of FIG. 14 shows the TIN k and TIN 0 formed in this way as a simplified image. Here, only TIN k is shown as a triangle interpolated in the lattice, but the same processing is performed in each part (each square lattice) of the lattice. The above is the description of the processing in step S407 for performing interpolation on the square lattice of TIN.

次に、ステップS408を行なう。ここで、TINは、奥行きのある三次元的な形状の一部を三角形で近似したものであり、その面が写真画像の面と一致するとは限らない(一致する場合もある)。したがって、図16(A)に示すように、例えばTINの3つの頂点のz方向の座標値Z(K)i,j、Z(K)i+1,j、Z(K)i+1,j+1は、一般に同じにならず、格子面に対してTINは傾いている。ここで、TINの各頂点は、ステップS406においてその3次元座標の算出が行われているので、TINの面の向きと対応する格子の面の向きとの差、言い換えるとTINの対応する正方格子に対する傾きは定量的に計算することができる。 Next, step S408 is performed. Here, TIN k is obtained by approximating a part of a three-dimensional shape having a depth with a triangle, and its surface does not always coincide with the surface of the photographic image (it may coincide). Therefore, as shown in FIG. 16A, for example, coordinate values Z (K) i, j, Z (K) i + 1, j, Z (K) i + 1 of the three vertices of TIN k in the z direction. , j + 1 are generally not the same, and TIN k is inclined with respect to the lattice plane. Here, since the three-dimensional coordinates of each vertex of TIN k are calculated in step S406, the difference between the orientation of the surface of TIN k and the corresponding lattice surface, in other words, the correspondence of TIN k . The slope with respect to the square lattice can be calculated quantitatively.

ここで、左写真画像と右写真画像とは、異なる視点から撮影されているので、左写真画像で設定した正方格子に対応する右写真画像の格子は、正方ではなく、正方から歪んだ形状となる。この歪みの具合を勘案して、左写真画像に設定した格子点と右写真画像に設定した格子点間の対応関係をLSM等により探索することで、より精度の高いステレオマッチングを行なうことができる。ステップS408では、上記の意図を実現するために、右写真画像に設定される格子を変形させる。   Here, since the left photograph image and the right photograph image are taken from different viewpoints, the lattice of the right photograph image corresponding to the square lattice set in the left photograph image is not square but is distorted from square. Become. Taking this distortion into account, searching for the correspondence between the lattice points set in the left photograph image and the lattice points set in the right photograph image using LSM or the like enables more accurate stereo matching. . In step S408, the grid set in the right photograph image is deformed in order to realize the above intention.

この右写真画像における格子の変形は、以下のようにして行われる。まず、左写真画像の場合と同様な格子を右写真画像に導入する。この際、ステップS405(ステップ3)で対応関係が特定された特徴点を用いて左右の写真画像における格子(メッシュ)同士の位置関係を特定する。そして、左写真画像の格子点の法線ベクトルを算出する。この格子点の法線ベクトルは、当該格子点に隣接する三角面の法線ベクトルの平均として算出される。ここで、TINで示される三角の各頂点の3次元座標は、既知であるので、その面の法線ベクトルは算出可能である。正方格子の各頂点の法線ベクトルを求めたら、各頂点の法線ベクトルの向きに対応させて、右写真画像における対応する格子の形状を変形する。この対応する格子(右写真画像の格子)の変形は、視差によるずれが解消されるように行われる。すなわち、この場合でいうと、右写真画像における正方格子を左写真画像の視点から見た場合に、当該右写真画像の正方格子は歪むわけであるが、この歪んだ形状と一致(あるいは近似)するように、右写真画像の格子を正方格子から変形させる。このように、TINの傾きに基づいて、右斜視画像に設定された格子の変形が行なわれる。 The deformation of the lattice in the right photograph image is performed as follows. First, a grid similar to that for the left photographic image is introduced into the right photographic image. At this time, the positional relationship between the lattices (mesh) in the left and right photographic images is specified using the feature points for which the correspondence relationship has been specified in step S405 (step 3). Then, the normal vector of the lattice point of the left photograph image is calculated. The normal vector of the lattice point is calculated as the average of the normal vectors of the triangular planes adjacent to the lattice point. Here, since the three-dimensional coordinate of each vertex of the triangle indicated by TIN k is known, the normal vector of the surface can be calculated. When the normal vector of each vertex of the square lattice is obtained, the shape of the corresponding lattice in the right photographic image is deformed so as to correspond to the direction of the normal vector of each vertex. The deformation of the corresponding lattice (the lattice of the right photographic image) is performed so that the shift due to the parallax is eliminated. That is, in this case, when the square lattice in the right photographic image is viewed from the viewpoint of the left photographic image, the square lattice in the right photographic image is distorted, but matches (or approximates) this distorted shape. As described above, the grid of the right photographic image is deformed from the square grid. In this way, the lattice set in the right perspective image is deformed based on the inclination of TIN k .

以上のステップS409(図14のステップ6)で行なわれる処理の一例である。次に、右写真画像において設定した格子点(変形された格子の格子点)と左写真画像で設定した格子点との対応関係がLSMによって行なわれる(ステップS409、ステップ7)。なお、このマッチング処理は、LSMに限定されず、テンプレートマッチング等の他の手法により行ってもよい。   It is an example of the process performed by the above step S409 (step 6 of FIG. 14). Next, the correspondence between the lattice points set in the right photograph image (the lattice points of the deformed lattice) and the lattice points set in the left photograph image is performed by LSM (steps S409 and S7). This matching process is not limited to LSM, and may be performed by other methods such as template matching.

次に、その時点で行なわれた処理が最後の階層である否か、が判定され(ステップS410)、最後の階層であれば、処理を終了し、最後の階層でないのであれば、ステップS411に進む。図15には、2階層目に進んだ場合が示されている。また、図15には、図14のステップ7でマッチングされた特徴点が●で示されている。この●で示されるマッチング点は、格子点同士の比較によって左右の写真画像において対応関係が特定された特徴点(マッチング点)である。なお、図では、記載を簡素化するために、右写真画像におけるマッチング点の位置には、図14のステップ7で示す格子の変形の状態は反映されていない。   Next, it is determined whether or not the process performed at that time is the last hierarchy (step S410). If it is the last hierarchy, the process ends. If not, the process proceeds to step S411. move on. FIG. 15 shows a case where the process proceeds to the second layer. In FIG. 15, the feature points matched in step 7 of FIG. 14 are indicated by ●. The matching points indicated by ● are feature points (matching points) whose correspondence is specified in the left and right photographic images by comparing the lattice points. In the figure, in order to simplify the description, the position of the matching point in the right photograph image does not reflect the state of deformation of the lattice shown in step 7 of FIG.

ステップS411では、初期値として、左右の写真画像に、ステップS405(図12ステップ3)で特定したテンプレート形状を構成する特徴点を再度導入する。この際、端点と分割点以外の点も対象とする。例えば、図15のステップ8には、前回の階層でのマッチング点(●)と初期値(○)が示されている。なお、以下の説明で明らかになるが、階層が進むにつれて、●に対応するマッチング点が増えてゆき、左右の写真画像のマッチングがより精緻に行なわれてゆく。各階層におけるマッチングにおいて、初期値を混ぜることで、初期値によって基本的な(あるいは大まかな)マッチングを維持し、階層が進むにつれて誤差が増大する現象を抑えることができる。   In step S411, feature points constituting the template shape specified in step S405 (step 3 in FIG. 12) are reintroduced into the left and right photographic images as initial values. At this time, points other than the end points and the division points are also targeted. For example, in step 8 of FIG. 15, the matching point (●) and the initial value (◯) in the previous hierarchy are shown. As will be apparent from the following description, as the hierarchy progresses, the matching points corresponding to ● increase and the left and right photographic images are more precisely matched. In the matching in each layer, by mixing the initial values, the basic (or rough) matching is maintained by the initial values, and the phenomenon that the error increases as the layers progress can be suppressed.

ステップS411の後、格子間隔を前回の半分に設定する処理が行われ、(ステップS412)、ステップS407以下の処理が再度実行される。図15のステップ9以下には、格子間隔を前回の半分に設定した場合の処理の一例が示されている。この際、TINkから1階層進んだTINk-1では、3箇所の頂点のZ値は、図16(B)に示す関係式によって算出される。こうして、各辺の寸法が半分(面積比で(1/4))にスケールダウンされた格子が設定され、この格子を対象として、前の階層の場合と同様な処理が行われる。この場合、ステップ10に示されるように、より小さい格子を対象に探索範囲の変形が行なわれ、左右の写真画像における格子点間のマッチングが調べられる(ステップ11)。こうして、更に細かくマッチング点の特定が行なわれる。 After step S411, a process of setting the lattice interval to half of the previous time is performed (step S412), and the processes after step S407 are executed again. Step 9 and the subsequent steps in FIG. 15 show an example of processing when the lattice spacing is set to half of the previous time. At this time, in TIN k −1 which is one layer higher than TIN k , the Z values of the three vertices are calculated by the relational expression shown in FIG. In this way, a lattice in which the dimension of each side is scaled down to half (area ratio (1/4)) is set, and the same processing as in the previous layer is performed on this lattice. In this case, as shown in step 10, the search range is deformed for a smaller lattice, and matching between lattice points in the left and right photographic images is examined (step 11). In this way, the matching point is specified more finely.

図13のステップ4と図15のステップ8を比較した場合から理解されるように、ステップ11の次の段階では、ステップ9で設定した格子点でマッチング点が見つけられるので、マッチング点の数(密度)は更に増える。こうして、2階層目、3階層目と階層を経るにしたがって、マッチング点の数が増えてゆき、左右の写真画像の対応関係の特定が段階的により緻密に行なわれてゆく。   As can be understood from the comparison between Step 4 in FIG. 13 and Step 8 in FIG. 15, in the next stage after Step 11, since the matching points are found at the lattice points set in Step 9, the number of matching points ( Density) further increases. In this way, the number of matching points increases as the second and third hierarchies pass, and the correspondence between the left and right photographic images is specified more precisely in stages.

(優位性)
左右の写真画像の対応を調べる際に、各写真画像中からテンプレート形状を抽出し、このテンプレート形状同士の対応関係を調べることで、高いマッチングの精度が得られ、また演算時間を短くできる。また、テンプレート形状の抽出において、テンプレート形状を直線と曲線の集合体として捉え、さらに直線をその両端の端点で捉え、曲線を両端の端点とその間の分割点で捉えることで、高い演算精度を得られる。また、この手法は、扱うデータ量が削減されるので、演算時間を短くできる。また、左右の写真画像の視差を推定し、この推定した視差に基づいて探索の範囲を決めることで、不正確なマッチングが行なわれる可能性が減少し、マッチングの精度が向上する。また、探索の範囲が限定されることで、演算量を大きく削減できる。また、この視差の推定を、着目した特徴点の周囲から選択された複数のパスポイントにおける計算値の加重平均を用いて行なうことで、当該視差を高い精度で推定することができる。
(Superiority)
When examining the correspondence between the left and right photographic images, template shapes are extracted from each photographic image, and by examining the correspondence between the template shapes, high matching accuracy can be obtained and the calculation time can be shortened. In addition, when extracting template shapes, the template shape is regarded as a collection of straight lines and curves, the straight line is captured at the end points of both ends, and the curve is captured at the end points of both ends and the dividing points between them, thereby obtaining high calculation accuracy. It is done. In addition, this method can reduce the amount of data to be handled, so that the calculation time can be shortened. Also, by estimating the parallax between the left and right photographic images and determining the search range based on the estimated parallax, the possibility of inaccurate matching is reduced, and the matching accuracy is improved. In addition, the amount of calculation can be greatly reduced by limiting the search range. In addition, the parallax can be estimated with high accuracy by performing the parallax estimation using a weighted average of calculated values at a plurality of pass points selected from around the feature point of interest.

また、テンプレート形状を利用したエッジマッチングによりマッチングが特定された特徴点を初期値とし、この初期値を格子に内挿して格子点を生成し、この内挿した格子点(TINkのZ値)に基づいて他方の写真画像の対応する格子(探索範囲)を変形し、この変形した探索範囲での格子点間のステレオマッチングを行なうことで、初期値を利用したより詳細なマッチングが行なわれる。そして、この一連の処理を1階層の処理とし、格子間隔を順次小さくして段階的に探索範囲を狭めながらのステレオマッチングを行なことで、段階的にマッチング点の密度を高めることができる。 In addition, a feature point whose matching is specified by edge matching using a template shape is used as an initial value, and the initial value is interpolated into a lattice to generate a lattice point. This interpolated lattice point (Z value of TIN k ) Based on the above, the corresponding lattice (search range) of the other photographic image is deformed, and stereo matching between lattice points in the deformed search range is performed, so that more detailed matching using the initial value is performed. Then, the density of matching points can be increased step by step by performing this series of processing as one-layer processing and performing stereo matching while sequentially decreasing the lattice interval and gradually narrowing the search range.

また、階層が進むごとに、テンプレート形状を利用したエッジマッチングによりマッチングが特定された特徴点を初期値として付加し、この初期値をマッチングに用いることで、誤差の増大が抑えられ、高いマッチング精度を得ることができる。すなわち、各階層におけるマッチングにおいて、画像内容の大雑把な形状の対応関係を特定しているテンプレート形状の特徴点を基準値として用いることで、大枠の形状の対応関係を基礎として、更により詳細に細かい部分のマッチングが段階的に行なわれる。このため、テンプレート形状に起因する初期値を各階層において用いない場合に比較して、階層が進むにしたがって、徐々にマッチング誤差が増大し、最終的に大雑把な輪郭の対応関係がずれて特定される不都合を避けることができる。   In addition, as the hierarchy progresses, feature points whose matching is specified by edge matching using template shapes are added as initial values, and this initial value is used for matching, thereby suppressing an increase in errors and high matching accuracy. Can be obtained. In other words, in the matching in each layer, the template shape feature points that specify the correspondence of the rough shape of the image content are used as the reference value, so that the details of the shape of the large frame are used as the basis. Part matching is performed in stages. For this reason, as compared to the case where the initial value due to the template shape is not used in each layer, the matching error gradually increases as the layer progresses, and finally the rough contour correspondence is specified by being shifted. Inconvenience can be avoided.

(その他)
以上説明した実施形態では、ステレオ画像を構成する2枚の写真画像における対応を特定する場合の例を説明したが、対象となる写真画像は、2枚に限定されず、3枚以上であってもよい。また、動画を撮影し、この動画を構成するフレーム画像中の複数を対象に、対応関係を特定する技術に本発明を適用することも可能である。また、本発明は、立体写真測量技術への利用に限定されず、視点を変えて撮影した複数の写真画像間における対応関係の特定、カメラの位置は同じであるが、その向きを変えて撮影した複数の写真画像間における対応関係の特定、1台のカメラの位置および向きの少なくとも一方を変えて撮影した複数の写真画像間における対応関係の特定に利用することもできる。
(Other)
In the embodiment described above, an example in which correspondence between two photographic images constituting a stereo image is specified has been described. However, the target photographic image is not limited to two, and is three or more. Also good. In addition, the present invention can be applied to a technique for capturing a moving image and specifying a correspondence relationship among a plurality of frame images constituting the moving image. In addition, the present invention is not limited to use in stereoscopic photogrammetry technology, the correspondence between a plurality of photographic images taken from different viewpoints is specified, and the camera position is the same, but the orientation is changed and taken. The correspondence relationship between a plurality of photograph images can also be used to identify the correspondence relationship between a plurality of photograph images taken by changing at least one of the position and orientation of one camera.

なお、上記の説明では、左写真画像を基準として、右写真画像の格子の変形(探索範囲の修正)を行なう場合の例を説明したが、右写真画像を基準として、左写真画像の格子の変形(探索範囲の修正)を行なう処理も可能である。   In the above description, an example in which the lattice of the right photograph image is modified (correction of the search range) using the left photograph image as a reference has been described. However, the lattice of the left photograph image is represented using the right photograph image as a reference. A process of performing deformation (correction of the search range) is also possible.

図12において、ステップS406の処理を「その時点でマッチングがとれている特徴点の3次元座標を算出」と変更し、更にステップS412の後にステップS406の前段階に戻る手順としてもよい。この場合、2階層目以降において、ステップS409で対応関係が特定された(つまり、左右の写真画像間でマッチングがとれた)特徴点の3次元座標の算出が行われ、それが新たなTINの作成に利用される。階層が進むにつれて、マッチング点の密度は増えてゆくので、この場合、階層が進むにつれてより細かいTINの作成が行なわれ、それが、同様に段階的に細かくなる格子に内挿される処理が各階層において行われる。すなわち、各階層において、その時点でマッチングがとれ、且つ、その3次元座標が算出されている特徴点に基づき、TINがその都度作成され、このTINを図14のステップ5および図16(A)に示すのと同様の手法により、格子に内挿をする処理が行われる。この場合、テンプレート形状を用いた初期値と各階層での格子を利用したマッチング点が、後段の階層におけるTINの形成、検索範囲の変形(他方の格子の変形)および後段の階層で新たに行なわれるマッチングに利用される。このため、段階的に徐々に細かく行なわれるマッチングの精度が更に高くなる。   In FIG. 12, the process of step S406 may be changed to “calculate the three-dimensional coordinates of the feature points that are matched at that time”, and the process may return to the previous stage of step S406 after step S412. In this case, in the second and subsequent layers, the calculation of the three-dimensional coordinates of the feature points whose correspondence is specified in step S409 (that is, the matching between the left and right photographic images) is performed, and this is the new TIN. Used for creation. Since the density of matching points increases as the hierarchy progresses, in this case, a finer TIN is created as the hierarchy progresses, and the process in which it is interpolated into a grid that gradually becomes finer is performed for each hierarchy. Done in That is, in each hierarchy, a TIN is created each time based on the feature points that are matched at that time and whose three-dimensional coordinates are calculated. This TIN is created in step 5 of FIG. 14 and FIG. A process for interpolating the lattice is performed by the same method as shown in FIG. In this case, the initial value using the template shape and the matching point using the lattice in each layer are newly formed in the subsequent layer, the TIN formation in the subsequent layer, the deformation of the search range (the deformation of the other lattice), and the subsequent layer. Used for matching. For this reason, the precision of matching performed gradually in steps is further increased.

2.第2の実施形態
本発明は、3次元レーザスキャナが測定した3次元点群位置データの処理に利用することもできる。3次元レーザスキャナは、測定対象物にレーザー光を照射し、その反射光を検出することで、測定位置からレーザー光の反射点までの距離、方位、仰角(または俯角)に関するデータを測定し、当該反射点の3次元位置データを取得する。ここで、測定対象物に無数の反射点を設定することで、測定対象物を無数の3次元点群でデータ化した3次元モデルを得ることができる。3次元点群位置データでは、2次元画像と3次元座標とが結び付けられている。すなわち、3次元点群位置データでは、測定対象物の2次元画像のデータと、この2次元画像に対応付けされた複数の測定点(点群)と、この複数の測定点の3次元空間中の位置(3次元座標)とが関連付けされている。
2. Second Embodiment The present invention can also be used for processing of three-dimensional point cloud position data measured by a three-dimensional laser scanner. A three-dimensional laser scanner irradiates a measurement object with laser light and detects the reflected light to measure data on the distance, azimuth, and elevation angle (or depression angle) from the measurement position to the reflection point of the laser light, The three-dimensional position data of the reflection point is acquired. Here, by setting an infinite number of reflection points on the measurement object, a three-dimensional model in which the measurement object is converted into data using an infinite number of three-dimensional point groups can be obtained. In the three-dimensional point cloud position data, a two-dimensional image and a three-dimensional coordinate are linked. That is, in the three-dimensional point group position data, the data of the two-dimensional image of the measurement object, a plurality of measurement points (point group) associated with the two-dimensional image, and the three-dimensional space of the plurality of measurement points Are associated with each other (three-dimensional coordinates).

3次元点群位置データによれば、点の集合により測定対象物の外形を再現した三次元モデルを得ることができる。また、各点の3次元座標が判るので、各点の3次元空間中における相対位置関係が把握でき、画面表示した3次元モデルの画像を回転させたり、異なる視点から見た画像に切り替えたりする処理が可能となる。   According to the three-dimensional point cloud position data, it is possible to obtain a three-dimensional model that reproduces the outer shape of the measurement object using a set of points. In addition, since the three-dimensional coordinates of each point are known, the relative positional relationship of each point in the three-dimensional space can be grasped, and the image of the three-dimensional model displayed on the screen can be rotated or switched to an image viewed from a different viewpoint. Processing is possible.

測定対象物からのレーザ光の反射光は、反射点の色相や形状の状態が反映されている。したがって、レーザスキャナから得られた3次元点群位置データにおける点群のそれぞれを画素のデータと捉えることで、3次元点群位置データを画像の画素情報として取り扱うことができる。この3次元点群位置データによる画像からも特徴点を抽出することができる。つまり、3次元点群位置データの中には、写真画像の場合と同様に、エッジの部分や視覚的に特徴付けられる部分等の点群が含まれており、それらを写真画像の場合と同様な特徴点として取り扱うことができる。   The reflected light of the laser beam from the measurement object reflects the hue and shape of the reflection point. Therefore, each of the point groups in the three-dimensional point group position data obtained from the laser scanner is regarded as pixel data, so that the three-dimensional point group position data can be handled as image pixel information. Feature points can also be extracted from an image based on the three-dimensional point cloud position data. That is, in the 3D point cloud position data, as in the case of a photographic image, point clouds such as edge portions and visually characterized portions are included, and these are the same as in the case of a photographic image. It can be handled as a unique feature point.

したがって、本発明における特定形状の抽出を3次元点群位置データに基づいて行うことも可能である。例えば、オクルージョンを解消するために異なる位置(視点)から測定対象物の3次元点群位置データを取得する場合に、第1の視点から得られた第1の3次元点群位置データと、第1の視点とは異なる第2の視点から得られた第2の3次元点群位置データとの対応関係の特定に本発明を利用することができる。この場合、特定形状の抽出、テンプレート形状の設定、視差の推定、格子を利用したマッチングの方法は、第1の実施形態の場合と同じである。   Therefore, the extraction of the specific shape in the present invention can be performed based on the three-dimensional point cloud position data. For example, when acquiring three-dimensional point cloud position data of a measurement object from different positions (viewpoints) in order to eliminate occlusion, the first three-dimensional point cloud position data obtained from the first viewpoint, The present invention can be used to specify the correspondence with the second three-dimensional point cloud position data obtained from a second viewpoint different from the first viewpoint. In this case, extraction of a specific shape, setting of a template shape, estimation of parallax, and a matching method using a lattice are the same as in the case of the first embodiment.

例えば、3次元点群位置データを用いた特定形状の抽出は、以下のようにして行なわれる。3次元点群位置データには反射点の3次元座標のデータが含まれているので、3次元点群位置データから測定対象物の輪郭に係るデータを得ることができる。この輪郭に係るデータから特定形状を抽出することができる。ここで、特定形状を構成する直線や曲線を端点や分割点によって特定する方法は、図6や図7に示す手法と同じである。   For example, extraction of a specific shape using 3D point cloud position data is performed as follows. Since the three-dimensional point group position data includes the data of the three-dimensional coordinates of the reflection point, data related to the contour of the measurement object can be obtained from the three-dimensional point group position data. A specific shape can be extracted from the data relating to the contour. Here, the method of specifying the straight line or the curve constituting the specific shape by the end points or the dividing points is the same as the method shown in FIGS.

図17には、3次元点群位置データに基づく上述した処理を行なう3次元点群画像処理装置500が示されている。3次元点群画像処理装置500には、レーザスキャナ400が接続されている。レーザスキャナ400は、測定対象物にレーザー光を照射し、その反射光を検出することで、測定位置からレーザー光の反射点までの距離、方位、仰角(または俯角)に関するデータを測定し、測定対象物の3次元点群位置データを取得する。   FIG. 17 shows a three-dimensional point cloud image processing apparatus 500 that performs the above-described processing based on three-dimensional point cloud position data. A laser scanner 400 is connected to the three-dimensional point cloud image processing apparatus 500. The laser scanner 400 irradiates a measurement object with laser light and detects the reflected light, thereby measuring and measuring data on the distance, azimuth, and elevation angle (or depression angle) from the measurement position to the reflection point of the laser light. The three-dimensional point cloud position data of the object is acquired.

3次元点群画像処理装置500には、3次元点群位置データ取得部501、エッジ抽出部502、特徴点抽出部503を備えている。3次元点群位置データ取得部501は、レーザスキャナ400から出力される3次元点群位置データを取得し、3次元点群位置データを3次元点群画像処理装置500内に取り込む。エッジ抽出部502は、3次元点群位置データ取得部501が取得した3次元点群位置データから測定対象物の外観を構成する輪郭線を抽出する。特徴点抽出部503は、エッジ抽出部502が抽出したエッジに基づき、特徴点を抽出する。   The 3D point cloud image processing apparatus 500 includes a 3D point cloud position data acquisition unit 501, an edge extraction unit 502, and a feature point extraction unit 503. The three-dimensional point group position data acquisition unit 501 acquires the three-dimensional point group position data output from the laser scanner 400 and takes the three-dimensional point group position data into the three-dimensional point group image processing apparatus 500. The edge extraction unit 502 extracts a contour line constituting the appearance of the measurement object from the 3D point cloud position data acquired by the 3D point cloud position data acquisition unit 501. The feature point extraction unit 503 extracts feature points based on the edges extracted by the edge extraction unit 502.

以下、エッジ抽出部502の機能について説明する。まず、レーザスキャナ400から取得した3次元点群位置データに基づき、注目点を中心とした一辺が3〜7画素程度の正方領域(格子状の領域)を局所領域として取得する。次いで、上記の局所領域における各点の法線ベクトルの算出を行う。そして、上述した局所領域内の法線ベクトルのバラツキ(局所曲率)を算出する。ここでは、着目している局所領域において、各法線ベクトルの3軸成分の強度値(NVx, NVy, NVz)の平均(mNVx,mNVy,mNVz)を求める。またこの結果に基づき、さらに標準偏差(StdNVx,StdNVy,StdNVz)を求める。次に、標準偏差の二乗和の平方根を局所曲率(Local Curveture:crv)として算出する。   Hereinafter, the function of the edge extraction unit 502 will be described. First, based on the three-dimensional point cloud position data acquired from the laser scanner 400, a square region (grid-like region) whose side is about 3 to 7 pixels around the target point is acquired as a local region. Next, the normal vector of each point in the local region is calculated. Then, the variation (local curvature) of the normal vector in the local region described above is calculated. Here, the average (mNVx, mNVy, mNVz) of the intensity values (NVx, NVy, NVz) of the three-axis components of each normal vector is obtained in the local region of interest. Based on this result, standard deviations (StdNVx, StdNVy, StdNVz) are further obtained. Next, the square root of the sum of squares of the standard deviation is calculated as a local curvature (crv).

次に、局所領域にフィッティング(近似)する局所平面を求める。この処理では、着目している局所領域の各点の三次元座標から局所平面の方程式を求める。局所平面は、着目している局所領域にフィッティングさせた平面である。ここでは、最小二乗法を用いて、当該局所領域にフィッティングする局所平面の面の方程式を算出する。以上の処理を、局所領域を順次ずらしながら、全ての3次元点群位置データが対象となるように繰り返し行い、各局所領域における法線ベクトル、局所平面、局所曲率を得る。   Next, a local plane fitting (approximate) to the local region is obtained. In this process, an equation of the local plane is obtained from the three-dimensional coordinates of each point in the local region of interest. The local plane is a plane that is fitted to the local region of interest. Here, the equation of the surface of the local plane to be fitted to the local region is calculated using the least square method. The above process is repeated so that all three-dimensional point cloud position data is targeted while sequentially shifting the local area, and the normal vector, local plane, and local curvature in each local area are obtained.

次に、上で求めた各局所領域における法線ベクトル、局所平面、局所曲率に基づいて、非面領域の点を除去する処理を行う。すなわち、面(平面および曲面)を抽出するために、予め面でないと判断できる部分(非面領域)を除去する。なお、非面領域とは、平面でも曲面でもない領域であるが、下記の(1)〜(3)の閾値によっては曲率の高い曲面を含む場合がある。   Next, based on the normal vector, local plane, and local curvature in each local area obtained above, processing for removing points in the non-surface area is performed. That is, in order to extract a surface (a plane and a curved surface), a portion (non-surface region) that can be determined not to be a surface in advance is removed. The non-surface region is a region that is neither a plane nor a curved surface, but may include a curved surface with a high curvature depending on the following threshold values (1) to (3).

非面領域除去の処理は、以下に示す3つの方法のうち、少なくとも一つを用いて行うことができる。ここでは、下記の(1)〜(3)の方法による判定を上述した局所領域の全てに対して行い、1以上の方法において非面領域と判定された局所領域を、非面領域を構成する局所領域として抽出する。そして、抽出された非面領域を構成する点に係る3次元点群位置データを除去する。   The non-surface area removal process can be performed using at least one of the following three methods. Here, the determination by the following methods (1) to (3) is performed for all the local regions described above, and the local region determined as the non-surface region by one or more methods is configured as the non-surface region. Extract as a local region. Then, the three-dimensional point cloud position data relating to the points constituting the extracted non-surface area is removed.

(1)局所曲率の高い部分:上述した局所曲率を予め設定しておいた閾値と比較し、閾値を超える局所曲率の局所領域を非面領域と判定する。局所曲率は、注目点とその周辺点における法線ベクトルのバラツキを表しているので、面(平面および曲率の小さい曲面)ではその値が小さく、面以外(非面)ではその値は大きくなる。したがって、予め決めた閾値よりも局所曲率が大きければ、当該局所領域を非面領域と判定する。 (1) A portion having a high local curvature: The above-described local curvature is compared with a preset threshold value, and a local region having a local curvature exceeding the threshold value is determined as a non-surface region. Since the local curvature represents the variation of the normal vector at the point of interest and its peripheral points, the value is small for a surface (a flat surface and a curved surface with a small curvature), and the value is large for a surface other than a surface (non-surface). Therefore, if the local curvature is larger than a predetermined threshold, the local region is determined as a non-surface region.

(2)局所平面へのフィッティング精度:局所領域の各点と対応する局所平面との距離を計算し、これらの距離の平均が予め設定した閾値よりも大きい場合、当該局所領域を非面領域と判定する。すなわち、局所領域が平面から乖離した状態であると、その程度が激しい程、当該局所領域の各点と対応する局所平面との距離は大きくなる。このことを利用して当該局所領域の非面の程度が判定される。 (2) Fitting accuracy to the local plane: When the distance between each point of the local area and the corresponding local plane is calculated and the average of these distances is greater than a preset threshold, the local area is determined as a non-surface area. judge. That is, when the local area is in a state of being deviated from the plane, the distance between the local plane corresponding to each point of the local area increases as the degree becomes more severe. Using this fact, the degree of non-surface of the local region is determined.

(3)共平面性のチェック:ここでは、隣接する局所領域において、対応する局所平面同士の向きを比較する。この局所平面の向きの違いが閾値を超えている場合、比較の対象となった局所領域が非面領域に属していると判定する。具体的には、対象となる2つの局所領域のそれぞれにフィッティングする2つの局所平面の法線ベクトルと、その中心点間を結ぶベクトルとの内積が0であれば、両局所平面が同一平面上に存在すると判定される。また、上記内積が大きくなる程、2つの局所平面が同一面上にない程度がより顕著であると判定され、非面の程度が高いものと判定される。 (3) Coplanarity check: Here, the directions of corresponding local planes are compared in adjacent local regions. If the difference in orientation of the local planes exceeds the threshold value, it is determined that the local area to be compared belongs to the non-plane area. Specifically, if the inner product of the normal vector of the two local planes fitted to each of the two target local regions and the vector connecting the center points is 0, both local planes are on the same plane. Is determined to exist. Further, as the inner product increases, it is determined that the degree that the two local planes are not on the same plane is more remarkable, and the degree of non-surface is determined to be higher.

上記の(1)〜(3)の方法による判定において、1以上の方法において非面領域と判定された局所領域を、非面領域を構成する局所領域として抽出する。そして、この抽出された局所領域を構成する点に係る三次元点群位置データを算出対象としている3次元点群位置データから除去する。以上のようにして、非面領域の除去が行われる。   In the determination by the above methods (1) to (3), a local region determined as a non-surface region by one or more methods is extracted as a local region constituting the non-surface region. Then, the three-dimensional point group position data relating to the points constituting the extracted local region is removed from the three-dimensional point group position data to be calculated. The non-surface area is removed as described above.

次に、面ラベリングを行なう。面ラベリング部は、非面領域の3次元点群位置データが除去された3次元点群位置データに対して、法線ベクトルの連続性に基づいて面ラベリングを行う。具体的には、特定の注目点と隣接点の法線ベクトルの角度差が予め決めた閾値以下なら、それらの点に同一ラベルを貼る。この作業を繰り返すことで、連続する平面、連続する緩やかな曲面に同一ラベルが貼られ、それらを一つの面として識別可能となる。また、面ラベリングの後、法線ベクトルの角度差や法線ベクトルの3軸成分の標準偏差を用いて、ラベル(面)が平面であるか、または曲率の小さい曲面であるかを判定し、その旨を識別する識別データを各ラベルに関連付ける。   Next, surface labeling is performed. The surface labeling unit performs surface labeling on the 3D point cloud position data from which the 3D point cloud position data of the non-surface area is removed based on the continuity of the normal vectors. Specifically, if the angle difference between the normal vector of a specific point of interest and an adjacent point is less than a predetermined threshold, the same label is attached to those points. By repeating this operation, the same label is attached to a continuous flat surface and a continuous gentle curved surface, and these can be identified as one surface. Further, after the surface labeling, it is determined whether the label (surface) is a plane or a curved surface with a small curvature by using the angle difference between the normal vectors and the standard deviation of the three-axis components of the normal vectors. Identification data for identifying the fact is associated with each label.

続いて、面積の小さいラベル(面)をノイズとして除去する。なお、このノイズ除去は、面ラベリングの処理と同時に行ってもよい。この場合、面ラベリングを行いながら、同一ラベルの点数(ラベルを構成する点の数)を数え、所定以下の点の数であるラベルを取り消す処理を行う。次に、この時点でラベルが無い点に対して、最近傍面(最も近い面)と同一のラベルを付与していく。これにより、既にラベリングされた面の拡張を行う。   Subsequently, the label (surface) having a small area is removed as noise. This noise removal may be performed simultaneously with the surface labeling process. In this case, while performing surface labeling, the number of points of the same label (the number of points constituting the label) is counted, and a process of canceling the label having the number of points equal to or less than a predetermined value is performed. Next, the same label as the nearest surface (closest surface) is given to the point having no label at this time. As a result, the already labeled surface is expanded.

すなわち、ラベルの付いた面の方程式を求め、当該面とラベルが無い点との距離を求める。ラベルが無い点の周辺に複数のラベル(面)がある場合には、その距離が最も短いラベルを選択する。そして、依然としてラベルが無い点が残存している場合には、非面領域除去、ノイズ除去、およびラベル拡張における各閾値を変更し、再度関連する処理を行う。例えば、非面領域除去において、局所曲率の閾値を上げることで、非面として抽出する点の数が少なくなるようにする。または、ラベル拡張において、ラベルの無い点と最近傍面との距離の閾値を上げることで、ラベルの無い点に対してより多くのラベルを付与するようにする。   That is, an equation of a labeled surface is obtained, and a distance between the surface and a point without a label is obtained. If there are a plurality of labels (surfaces) around a point where there is no label, the label with the shortest distance is selected. If there is still a point with no label, the threshold values for non-surface area removal, noise removal, and label expansion are changed, and related processing is performed again. For example, in non-surface area removal, the number of points to be extracted as non-surface is reduced by increasing the threshold value of local curvature. Alternatively, in label expansion, by increasing the threshold of the distance between a point without a label and the nearest surface, more labels are given to the point without a label.

次に、ラベルが異なる面であっても同一面である場合にラベルを統合する。この場合、連続しない面であっても、位置または向きが等しい面同士に同じラベルを付ける。具体的には、各面の法線ベクトルの位置および向きを比較することで、連続しない同一面を抽出し、いずれかの面のラベルに統一する。   Next, even if the labels are different surfaces, the labels are integrated when they are the same surface. In this case, even if the surfaces are not continuous, the same label is attached to the surfaces having the same position or orientation. Specifically, by comparing the position and orientation of the normal vector of each surface, the same non-continuous surface is extracted and unified to the label of any surface.

次に、隣接する面の間を繋ぐ境界領域面を形成する。この例では、隣接する面の間の非面領域に局所平面をフィッティングさせ、この局所平面を複数繋ぐことで、当該非面領域を複数の局所平面によって近似した境界領域面を形成する。これは、複数の局所平面により構成される多面体で非面領域を近似し、面と面との境界部分となる境界領域面を形成する処理と捉えることができる。なお、この多面体構造を有する境界領域面にフィッティングする滑らかな曲面を設定し、当該境界領域面をこの曲面に置き換えてもよい。   Next, a boundary region surface connecting adjacent surfaces is formed. In this example, a local plane is fitted to a non-surface region between adjacent surfaces, and a plurality of these local planes are connected to form a boundary region surface that approximates the non-surface region by a plurality of local planes. This can be regarded as a process of approximating a non-surface region with a polyhedron composed of a plurality of local planes and forming a boundary region surface that is a boundary portion between the surfaces. It is also possible to set a smooth curved surface to be fitted to the boundary region surface having this polyhedral structure and replace the boundary region surface with this curved surface.

次に、隣接する面の3次元点群位置データに基づき、測定対象物の三次元エッジとなる輪郭線を算出(推定)する。この場合、上記の境界領域面の形成において、隣接する面から局所平面をつないでゆく処理が行われる。この際、最後に隣接した局所平面同士の交線を輪郭線として算出する。輪郭線が算出されることで、測定対象物の輪郭の画像が明確となる。境界領域面を用いた輪郭線の算出方法としては、境界領域面の中央位置を輪郭線が通るように輪郭線を設定する方法や、境界領域面の曲率が最小となる部分を輪郭線が通るように輪郭線を設定する方法も可能である。なお、境界領域面の形成を行わずに隣接する面と面との交線を輪郭線とする処理も可能である。   Next, based on the three-dimensional point cloud position data of the adjacent surfaces, a contour line that is a three-dimensional edge of the measurement object is calculated (estimated). In this case, in the formation of the boundary area surface, a process of connecting the local plane from the adjacent surface is performed. At this time, the line of intersection between the adjacent local planes is calculated as the contour line. By calculating the contour line, the contour image of the measurement object becomes clear. As a method for calculating the contour line using the boundary region surface, the contour line is set so that the contour line passes through the center position of the boundary region surface, or the contour line passes through the portion where the curvature of the boundary region surface is minimized. A method of setting the contour line as described above is also possible. In addition, the process which makes the intersection line of an adjacent surface and a surface an outline without forming a boundary area surface is also possible.

次に、二次元エッジを算出する。この処理では、対象物からの反射光の強度分布に基づいて、ラプラシアン、プリューウィット、ソーベル、キャニーなどの公知のエッジ抽出オペレータを用いて、セグメント化(区分け)された面に対応する二次元画像の領域内からエッジを抽出する。すなわち、二次元エッジは、面内の濃淡の違いにより認識されるので、この濃淡の違いを反射光の強度の情報から抽出し、その抽出条件に閾値を設けることで、濃淡の境目をエッジとして抽出する。次に、抽出されたエッジを構成する点の三次元座標の高さ(z値)と、その近傍の輪郭線(三次元エッジ)を構成する点の三次元座標の高さ(z値)とを比較し、この差が所定の閾値以内の場合には、当該エッジを二次元エッジとして抽出する。すなわち、二次元画像上で抽出されたエッジを構成する点が、セグメント化された面上にあるか否かを判定し、面上にあると判定された場合にそれを二次元エッジとする。   Next, a two-dimensional edge is calculated. In this process, based on the intensity distribution of reflected light from the object, a two-dimensional image corresponding to a segmented (segmented) surface using a known edge extraction operator such as Laplacian, Pleuwit, Sobel, Canny, etc. Edges are extracted from within the region. In other words, since the two-dimensional edge is recognized by the difference in shading in the surface, the difference in shading is extracted from the information on the intensity of the reflected light, and by setting a threshold value in the extraction condition, the border between the shading is used as an edge. Extract. Next, the height (z value) of the three-dimensional coordinates of the points constituting the extracted edge, and the height (z value) of the three-dimensional coordinates of the points constituting the neighboring contour line (three-dimensional edge) If the difference is within a predetermined threshold, the edge is extracted as a two-dimensional edge. That is, it is determined whether or not a point constituting the edge extracted on the two-dimensional image is on the segmented surface, and if it is determined that the point is on the surface, it is set as the two-dimensional edge.

二次元エッジの算出後、先に算出した輪郭線と二次元エッジとを統合する。これにより、対象物の外観を特徴付けるエッジの抽出が行われる。このエッジの抽出により、測定対象物を視認する際における測定対象物の外観を構成する特徴部分が抽出され、三次元モデルのデータが得られる。以上がエッジ抽出部502の機能である。   After calculating the two-dimensional edge, the previously calculated contour line and the two-dimensional edge are integrated. Thereby, extraction of an edge characterizing the appearance of the object is performed. By extracting the edge, a characteristic portion constituting the appearance of the measurement object when the measurement object is visually recognized is extracted, and three-dimensional model data is obtained. The function of the edge extraction unit 502 has been described above.

特徴点抽出部503は、上記対象物を特徴付けるエッジ部分を構成する点群を特徴点として抽出する。あるいは、特徴点抽出部503は、上記対象物を特徴付けるエッジ部分を構成する点群を新たに設定する。この場合も図6(A)や図7(A)に示すように、多数の特徴点により、上記のエッジを構成する直線や曲線が表される。そして、図6(B)や図7(F)に示されるように、当該エッジを構成する直線は、両端の端点により特定され、曲線は、両端の端点と分割点とにより特定される。こうして、レーザスキャナ400が測定した3次元点群位置データに基づいて、測定対象物の外観を特徴付けるエッジ、およびこのエッジを構成する特徴点が得られ、それに基づいて測定対象物を画像として取り扱うことができる状態となる。   The feature point extraction unit 503 extracts a point group constituting an edge portion characterizing the object as a feature point. Alternatively, the feature point extraction unit 503 newly sets a point group that constitutes an edge portion that characterizes the object. Also in this case, as shown in FIGS. 6A and 7A, a straight line and a curve constituting the edge are represented by a large number of feature points. Then, as shown in FIGS. 6B and 7F, the straight line constituting the edge is specified by the end points at both ends, and the curve is specified by the end points and the dividing points at both ends. Thus, based on the three-dimensional point cloud position data measured by the laser scanner 400, an edge characterizing the appearance of the measurement object and the characteristic points constituting the edge are obtained, and the measurement object is handled as an image based on the edge. It will be in a state that can be.

3次元点群画像処理装置500は、マッチング処理部104を備えている。マッチング処理部104は、図5に示す構成を有し、図12に示す処理を実行する。この場合、対象となる少なくとも一方の画像は、写真画像ではなく、3次元点群位置データから得られた上述したエッジにより構成される測定対象物のモデル画像となる。この際、マッチング処理部104は、当該エッジのデータから、図6や図7に示す原理により特定の形状を抽出し、更にテンプレート形状の設定を行なう。   The three-dimensional point cloud image processing apparatus 500 includes a matching processing unit 104. The matching processing unit 104 has the configuration shown in FIG. 5 and executes the processing shown in FIG. In this case, at least one target image is not a photographic image, but a model image of a measurement object configured by the above-described edges obtained from the three-dimensional point cloud position data. At this time, the matching processing unit 104 extracts a specific shape from the edge data according to the principle shown in FIGS. 6 and 7, and further sets a template shape.

写真画像から抽出した特徴点とレーザスキャナから得られた3次元点群位置データの対応関係を求める技術に本発明を利用することもできる。すなわち、第1の視点から写真撮影を行い、第2の視点からレーザスキャニングを行い、両視点から得られたデータ間の対応関係を求める技術に本発明を利用することもできる。この場合、第1の視点から得た写真画像から抽出されたテンプレート形状と、第2の視点から得た3次元点群位置データに基づくモデル画像から抽出されたテンプレート形状を対象として、その対応関係を求めるマッチング処理が行われ、更に図13〜図15に例示する格子点間のマッチング処理が行なわれる。   The present invention can also be applied to a technique for obtaining a correspondence relationship between feature points extracted from a photographic image and three-dimensional point cloud position data obtained from a laser scanner. That is, the present invention can also be used in a technique for taking a photograph from the first viewpoint, performing laser scanning from the second viewpoint, and obtaining a correspondence relationship between the data obtained from both viewpoints. In this case, the correspondence between the template shape extracted from the photographic image obtained from the first viewpoint and the template shape extracted from the model image based on the 3D point cloud position data obtained from the second viewpoint. Is performed, and further, matching processing between lattice points illustrated in FIGS. 13 to 15 is performed.

3.第3の実施形態
最初に大枠のマッチングを行い、初期値を得る方法として、エッジマッチングの代わりに、OCM法(Orientation Code Matching)を用いることもできる。OCMでは、上述したOCRを用いて、特徴点を抽出する。この際、閾値を適切に設定することで、特に特徴的な部分(例えば、明確なエッジ部分等)がソフトウェア的に抽出される。この場合、OCRで抽出された特徴点を初期値として、図12のステップS403以下の処理が実行される。
3. Third Embodiment As a method of first performing outline matching and obtaining an initial value, an OCM method (Orientation Code Matching) can be used instead of edge matching. In the OCM, feature points are extracted using the OCR described above. At this time, by setting the threshold appropriately, a particularly characteristic portion (for example, a clear edge portion or the like) is extracted by software. In this case, the process after step S403 in FIG. 12 is executed using the feature points extracted by OCR as initial values.

本発明は、複数の画像間における対応関係を特定する技術に利用することができる。   The present invention can be used for a technique for specifying the correspondence between a plurality of images.

Claims (14)

第1の視点および第2の視点から見た測定対象物の特徴点に基づいて、前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状とを抽出する特定形状抽出部と、
前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状との対応関係の特定を行う対応関係特定部と
を備え、
前記特定の形状が直線および曲線の少なくとも一方を含み、
前記直線は、その両端の端点により特定され、
前記曲線は、その両端の端点と該両端の端点の間を分割する分割点によって特定されていることを特徴とする画像処理装置。
Specification for extracting a specific shape viewed from the first viewpoint and a specific shape viewed from the second viewpoint based on the feature points of the measurement object viewed from the first viewpoint and the second viewpoint A shape extraction unit;
A correspondence specifying unit that specifies the correspondence between the specific shape viewed from the first viewpoint and the specific shape viewed from the second viewpoint;
The specific shape includes at least one of a straight line and a curve;
The straight line is specified by the end points at both ends thereof,
2. The image processing apparatus according to claim 1, wherein the curve is specified by an end point at both ends thereof and a dividing point that divides between the end points at both ends.
前記第1の視点および前記第2の視点から見た測定対象物の特徴点を2枚の写真画像のそれぞれから抽出する特徴点抽出部を備えることを特徴とする請求項1に記載の画像処理装置。   The image processing according to claim 1, further comprising a feature point extraction unit that extracts a feature point of the measurement object viewed from the first viewpoint and the second viewpoint from each of two photographic images. apparatus. 前記第1の視点から見た前記特定の形状を構成する特徴点と、前記第2の視点から見た前記特定の形状を構成する特徴点との間の視差を推定する視差推定部と、
前記視差推定部が推定した視差に基づいて前記対応関係特定部における前記対応関係の特定のための探索の範囲を設定する探索範囲設定部と
を更に備えることを特徴とする請求項1または2に記載の画像処理装置。
A parallax estimation unit that estimates a parallax between a feature point that forms the specific shape viewed from the first viewpoint and a feature point that forms the specific shape viewed from the second viewpoint;
The search range setting unit that sets a search range for specifying the correspondence in the correspondence specifying unit based on the parallax estimated by the parallax estimation unit, further comprising: The image processing apparatus described.
前記視差推定部は、当該着目した特徴点を含む広がりを持った領域から得られる複数の視差の算出値に基づいて算出されることを特徴とする請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the parallax estimation unit is calculated based on a plurality of calculated parallax values obtained from a wide area including the feature point of interest. 前記視差推定部は、
前記第1の視点から見た前記特定の形状を構成する特定の特徴点の周囲から複数の特徴点を第1群のパスポイントとして抽出するステップと、
前記第1群のパスポイントに対応する第2群のパスポイントを前記第2の視点から見た測定対象物の特徴点の中から抽出するステップと、
前記第1の群のパスポイントと前記第2群のパスポイントの対応するパスポイント毎の視差Dnを算出するステップと、
前記特定の特徴点からの距離に応じた重みを用いて前記Dnの加重平均を計算し、その結果に基づいて前記視差の推定値Dを算出するステップと
を行なうことを特徴とする請求項4に記載の画像処理装置。
The parallax estimation unit
Extracting a plurality of feature points as a first group of pass points from around a specific feature point constituting the specific shape viewed from the first viewpoint;
Extracting a second group of pass points corresponding to the first group of pass points from the feature points of the measurement object viewed from the second viewpoint;
Calculating a parallax Dn for each corresponding pass point of the first group of pass points and the second group of pass points;
5. A step of calculating a weighted average of the Dn using a weight according to a distance from the specific feature point, and calculating an estimated value D of the parallax based on the result. An image processing apparatus according to 1.
前記第1の視点から撮影した第1の撮影画像中に格子を設定する格子設定手段と、
前記格子に前記対応関係特定部が特定した前記特定の形状を構成する特徴点に基づく分割形状を形成する分割形状形成部と、
前記分割形状形成部が形成した前記分割形状を前記格子に内挿する分割形状内挿部と、
前記格子に内挿された前記分割形状の前記格子に対する傾きに基づき、前記第2の視点から撮影した第2の撮影画像中に前記第1の画像中の格子を変形した変形格子を設定する変形格子設定部と、
前記第1の撮影画像中の前記格子の格子点と前記第2の撮影画像中の前記変形格子の格子点との対応関係を特定する対応格子点検出部と
を備えることを特徴とする請求項1〜5のいずれか一項に記載の画像処理装置。
Lattice setting means for setting a lattice in the first captured image captured from the first viewpoint;
A divided shape forming unit that forms a divided shape based on feature points constituting the specific shape specified by the correspondence specifying unit in the lattice;
A split shape interpolation section for interpolating the split shape formed by the split shape forming section into the lattice;
Deformation of setting a deformed grid obtained by deforming the grid in the first image in the second captured image captured from the second viewpoint based on the inclination of the divided shape inserted into the grid with respect to the grid A lattice setting unit;
The correspondence grid point detection part which specifies the correspondence of the lattice point of the lattice in the 1st picked-up image and the lattice point of the deformation lattice in the 2nd picked-up image is provided. The image processing apparatus according to any one of 1 to 5.
前記格子設定手段は、第1の階層の処理において、第1の格子間隔の第1の格子を設定し、第2の階層の処理において、前記第1の格子間隔より格子間隔が狭い第2の格子を設定し、
前記変形格子設定部は、前記第1の格子間隔および前記第2の格子間隔に対して格子の変形を行い、
前記対応格子点検出部は、前記第1の格子間隔および前記第2の格子間隔に対して、対応する格子点の検出を行うことを特徴とする請求項6に記載の画像処理装置。
The lattice setting means sets a first lattice having a first lattice interval in the processing of the first layer, and sets a second lattice narrower than the first lattice interval in the processing of the second layer. Set the grid,
The deformation lattice setting unit performs lattice deformation on the first lattice interval and the second lattice interval,
The image processing apparatus according to claim 6, wherein the corresponding lattice point detection unit detects corresponding lattice points with respect to the first lattice interval and the second lattice interval.
特定の階層の処理において、一つ前の階層において特定された対応点に加えて、前記特定の形状を構成する特徴点を初期値として加える初期値付加部を更に備えることを特徴とする請求項7に記載の画像処理装置。   The processing of a specific layer further includes an initial value adding unit that adds, as an initial value, a feature point constituting the specific shape in addition to the corresponding point specified in the previous layer. 8. The image processing apparatus according to 7. 前記第1の視点および前記第2の視点から見た測定対象物の特徴点の少なくとも一方がレーザスキャナで測定された3次元点群位置データであることを特徴とする請求項1に記載の画像処理装置。   The image according to claim 1, wherein at least one of the feature points of the measurement object viewed from the first viewpoint and the second viewpoint is three-dimensional point cloud position data measured by a laser scanner. Processing equipment. 第1の視点および第2の視点から見た測定対象物の特徴点に基づいて、前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状とを抽出する特定形状抽出ステップと、
前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状との対応関係の特定を行う対応関係特定ステップと
を備え、
前記特定の形状が直線および曲線の少なくとも一方を含み、
前記直線は、その両端の端点により特定され、
前記曲線は、その両端の端点と該両端の端点の間を分割する分割点によって特定されていることを特徴とする画像処理方法。
Specification for extracting a specific shape viewed from the first viewpoint and a specific shape viewed from the second viewpoint based on the feature points of the measurement object viewed from the first viewpoint and the second viewpoint A shape extraction step;
A correspondence specifying step for specifying a correspondence between the specific shape viewed from the first viewpoint and the specific shape viewed from the second viewpoint; and
The specific shape includes at least one of a straight line and a curve;
The straight line is specified by the end points at both ends thereof,
2. The image processing method according to claim 1, wherein the curve is specified by an end point at both ends thereof and a dividing point for dividing between the end points at both ends.
コンピュータに読み取らせて実行させるプログラムであって、
コンピュータに
第1の視点および第2の視点から見た測定対象物の特徴点に基づいて、前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状とを抽出させる特定形状抽出ステップと、
前記第1の視点から見た特定の形状と前記第2の視点から見た特定の形状との対応関係の特定を行なわせる対応関係特定ステップと
を実行させ、
前記特定の形状が直線および曲線の少なくとも一方を含み、
前記直線は、その両端の端点により特定され、
前記曲線は、その両端の端点と該両端の端点の間を分割する分割点によって特定されていることを特徴とする画像処理用のプログラム。
A program that is read and executed by a computer,
The computer extracts a specific shape viewed from the first viewpoint and a specific shape viewed from the second viewpoint based on the feature points of the measurement object viewed from the first viewpoint and the second viewpoint. A specific shape extraction step,
A correspondence specifying step for specifying the correspondence between the specific shape seen from the first viewpoint and the specific shape seen from the second viewpoint;
The specific shape includes at least one of a straight line and a curve;
The straight line is specified by the end points at both ends thereof,
The program for image processing, wherein the curve is specified by an end point at both ends thereof and a dividing point that divides between the end points at both ends.
第1の視点および第2の視点から見た測定対象物の特徴点に基づいて、前記第1の視点から見た画像と前記第2の視点から見た画像との対応関係の特定を行う対応関係特定部と、
前記第1の視点から撮影した第1の撮影画像中に格子を設定する格子設定部と、
前記格子に前記第1の視点から見た前記第1の測定対象物の特徴点に基づく分割形状を形成する分割形状形成部と、
前記分割形状形成部が形成した前記分割形状を前記格子に内挿する分割形状内挿部と、
前記格子に内挿された前記分割形状の前記格子に対する傾きに基づき、前記第2の視点から撮影した第2の撮影画像中に前記第1の画像中の格子を変形した変形格子を設定する変形格子設定部と、
前記第1の撮影画像中の前記格子の格子点と前記第2の撮影画像中の前記変形格子の格子点との対応関係を特定する対応格子点検出部と
を備えることを特徴とする画像処理装置。
Correspondence for specifying the correspondence between the image viewed from the first viewpoint and the image viewed from the second viewpoint based on the feature points of the measurement object viewed from the first viewpoint and the second viewpoint A relationship identification part;
A grid setting unit for setting a grid in the first captured image captured from the first viewpoint;
A divided shape forming unit that forms a divided shape based on a feature point of the first measurement object viewed from the first viewpoint on the lattice;
A split shape interpolation section for interpolating the split shape formed by the split shape forming section into the lattice;
Deformation of setting a deformed grid obtained by deforming the grid in the first image in the second captured image captured from the second viewpoint based on the inclination of the divided shape inserted into the grid with respect to the grid A lattice setting unit;
An image processing comprising: a corresponding grid point detection unit that specifies a correspondence relationship between a grid point of the grid in the first captured image and a grid point of the deformed grid in the second captured image. apparatus.
前記格子設定手段は、第1の階層の処理において、第1の格子間隔の第1の格子を設定し、第2の階層の処理において、前記第1の格子間隔より格子間隔が狭い第2の格子を設定し、
前記変形格子設定部は、前記第1の格子間隔および前記第2の格子間隔に対して格子の変形を行い、
前記対応格子点検出部は、前記第1の格子間隔および前記第2の格子間隔に対して、対応する格子点の検出を行うことを特徴とする請求項12に記載の画像処理装置。
The lattice setting means sets a first lattice having a first lattice interval in the processing of the first layer, and sets a second lattice narrower than the first lattice interval in the processing of the second layer. Set the grid,
The deformation lattice setting unit performs lattice deformation on the first lattice interval and the second lattice interval,
The image processing apparatus according to claim 12, wherein the corresponding lattice point detection unit detects corresponding lattice points with respect to the first lattice interval and the second lattice interval.
特定の階層の処理において、一つ前の階層において特定された対応点に加えて、対応関係特定部で対応が特定された特徴点を初期値として加える初期値付加部を更に備えることを特徴とする請求項13に記載の画像処理装置。   In the processing of a specific layer, in addition to the corresponding point specified in the previous layer, the method further comprises an initial value adding unit that adds, as an initial value, the feature point whose correspondence is specified by the correspondence specifying unit The image processing apparatus according to claim 13.
JP2012041977A 2012-02-28 2012-02-28 Image processing apparatus, image processing method, and image processing program Active JP5955028B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012041977A JP5955028B2 (en) 2012-02-28 2012-02-28 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012041977A JP5955028B2 (en) 2012-02-28 2012-02-28 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2013178656A true JP2013178656A (en) 2013-09-09
JP5955028B2 JP5955028B2 (en) 2016-07-20

Family

ID=49270232

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012041977A Active JP5955028B2 (en) 2012-02-28 2012-02-28 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP5955028B2 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3370209A1 (en) 2017-03-02 2018-09-05 Topcon Corporation Point cloud data processing device, point cloud data processing method, and point cloud data processing program
JP2018159565A (en) * 2017-03-22 2018-10-11 株式会社トプコン Measurement data processing device, measurement data processing method, measurement data processing system, and measurement data processing program
EP3413266A1 (en) 2017-06-09 2018-12-12 Topcon Corporation Image processing device, image processing method, and image processing program
WO2019024723A1 (en) * 2017-08-01 2019-02-07 歌尔股份有限公司 Feature point matching result processing method and device
EP3454008A1 (en) 2017-09-06 2019-03-13 Topcon Corporation Survey data processing device, survey data processing method, and survey data processing program
CN109671115A (en) * 2017-10-16 2019-04-23 三星电子株式会社 The image processing method and device estimated using depth value
WO2019160022A1 (en) 2018-02-14 2019-08-22 株式会社トプコン Installation stand of unmanned aircraft, measurement method, measurement device, measurement system and program
EP3628968A1 (en) 2018-09-25 2020-04-01 Topcon Corporation Survey data processing device, survey data processing method, and survey data processing program
EP3731182A1 (en) 2019-04-24 2020-10-28 Topcon Corporation Infrared image processing method, infrared image processing device, and infrared image processing program
WO2020240949A1 (en) 2019-05-31 2020-12-03 公益財団法人かずさDna研究所 Three-dimensional measurement device, three-dimensional measurement method, and three-dimensional measurement program
JP2021508135A (en) * 2017-12-22 2021-02-25 ノヴァラム・ディーエックス・リミテッド Analysis of captured images to determine inspection conclusions
EP3792591A1 (en) 2019-08-26 2021-03-17 Topcon Corporation Surveying data processing device, surveying data processing method, and surveying data processing program
EP3795945A1 (en) 2019-09-18 2021-03-24 Topcon Corporation Surveying data processing device, surveying data processing method, and surveying data processing program
CN114786001A (en) * 2022-05-20 2022-07-22 广东未来科技有限公司 3D picture shooting method and 3D shooting system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011013706A (en) * 2009-06-30 2011-01-20 Hitachi Ltd Stereo image processing device and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011013706A (en) * 2009-06-30 2011-01-20 Hitachi Ltd Stereo image processing device and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JPN6015048834; 石山豊 外4名: 'セグメントベーストステレオにおける対応候補探索' 映像情報メディア学会誌 第52巻 第5号, 19980520, 第723-728頁, 社団法人映像情報メディア学会 *

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3370209A1 (en) 2017-03-02 2018-09-05 Topcon Corporation Point cloud data processing device, point cloud data processing method, and point cloud data processing program
US10810699B2 (en) 2017-03-02 2020-10-20 Topcon Corporation Point cloud data processing device, point cloud data processing method, and point cloud data processing program
JP2018159565A (en) * 2017-03-22 2018-10-11 株式会社トプコン Measurement data processing device, measurement data processing method, measurement data processing system, and measurement data processing program
US10767990B2 (en) 2017-03-22 2020-09-08 Topcon Corporation Device, method, and system for processing survey data, and program therefor
US10650583B2 (en) 2017-06-09 2020-05-12 Topcon Corporation Image processing device, image processing method, and image processing program
EP3413266A1 (en) 2017-06-09 2018-12-12 Topcon Corporation Image processing device, image processing method, and image processing program
WO2019024723A1 (en) * 2017-08-01 2019-02-07 歌尔股份有限公司 Feature point matching result processing method and device
US11100361B1 (en) 2017-08-01 2021-08-24 Goertek Inc. Method and apparatus for processing feature point matching result
EP3454008A1 (en) 2017-09-06 2019-03-13 Topcon Corporation Survey data processing device, survey data processing method, and survey data processing program
US10565730B2 (en) 2017-09-06 2020-02-18 Topcon Corporation Survey data processing device, survey data processing method, and survey data processing program
JP2019075082A (en) * 2017-10-16 2019-05-16 三星電子株式会社Samsung Electronics Co.,Ltd. Video processing method and device using depth value estimation
JP7173772B2 (en) 2017-10-16 2022-11-16 三星電子株式会社 Video processing method and apparatus using depth value estimation
CN109671115A (en) * 2017-10-16 2019-04-23 三星电子株式会社 The image processing method and device estimated using depth value
JP7390730B2 (en) 2017-12-22 2023-12-04 ノヴァラム・ディーエックス・リミテッド Analysis of captured images to determine test conclusions
JP2021508135A (en) * 2017-12-22 2021-02-25 ノヴァラム・ディーエックス・リミテッド Analysis of captured images to determine inspection conclusions
WO2019160022A1 (en) 2018-02-14 2019-08-22 株式会社トプコン Installation stand of unmanned aircraft, measurement method, measurement device, measurement system and program
US11221216B2 (en) 2018-02-14 2022-01-11 Topcon Corporation Placement table for unmanned aerial vehicle, surveying method, surveying device, surveying system and program
EP3628968A1 (en) 2018-09-25 2020-04-01 Topcon Corporation Survey data processing device, survey data processing method, and survey data processing program
US10877155B2 (en) 2018-09-25 2020-12-29 Topcon Corporation Survey data processing device, survey data processing method, and survey data processing program
US11341673B2 (en) 2019-04-24 2022-05-24 Topcon Corporation Infrared image processing method, infrared image processing device, and infrared image processing program
EP3731182A1 (en) 2019-04-24 2020-10-28 Topcon Corporation Infrared image processing method, infrared image processing device, and infrared image processing program
WO2020240949A1 (en) 2019-05-31 2020-12-03 公益財団法人かずさDna研究所 Three-dimensional measurement device, three-dimensional measurement method, and three-dimensional measurement program
US11941852B2 (en) 2019-05-31 2024-03-26 Kazusa Dna Research Institute Three-dimensional measurement device, three-dimensional measurement method, and three-dimensional measurement program
EP3792591A1 (en) 2019-08-26 2021-03-17 Topcon Corporation Surveying data processing device, surveying data processing method, and surveying data processing program
US11580696B2 (en) 2019-08-26 2023-02-14 Topcon Corporation Surveying data processing device, surveying data processing method, and surveying data processing program
EP3795945A1 (en) 2019-09-18 2021-03-24 Topcon Corporation Surveying data processing device, surveying data processing method, and surveying data processing program
US11619741B2 (en) 2019-09-18 2023-04-04 Topcon Corporation Surveying data processing device, surveying data processing method, and surveying data processing program
CN114786001A (en) * 2022-05-20 2022-07-22 广东未来科技有限公司 3D picture shooting method and 3D shooting system
CN114786001B (en) * 2022-05-20 2023-12-05 广东未来科技有限公司 3D picture shooting method and 3D shooting system

Also Published As

Publication number Publication date
JP5955028B2 (en) 2016-07-20

Similar Documents

Publication Publication Date Title
JP5955028B2 (en) Image processing apparatus, image processing method, and image processing program
JP5963353B2 (en) Optical data processing apparatus, optical data processing system, optical data processing method, and optical data processing program
US8447099B2 (en) Forming 3D models using two images
JP6426968B2 (en) INFORMATION PROCESSING APPARATUS AND METHOD THEREOF
US8452081B2 (en) Forming 3D models using multiple images
US8208029B2 (en) Method and system for calibrating camera with rectification homography of imaged parallelogram
WO2021140886A1 (en) Three-dimensional model generation method, information processing device, and program
US9025862B2 (en) Range image pixel matching method
JP2005308553A (en) Three-dimensional image measuring device and method
JP2011179907A (en) Device and method for measuring position and attitude, and program
Remondino 3-D reconstruction of static human body shape from image sequence
JP2014013147A5 (en)
JP2017510793A (en) Structured optical matching of a set of curves from two cameras
JP6071257B2 (en) Image processing apparatus, control method therefor, and program
JP4701848B2 (en) Image matching apparatus, image matching method, and image matching program
CN116188558A (en) Stereo photogrammetry method based on binocular vision
Yoon et al. Targetless multiple camera-LiDAR extrinsic calibration using object pose estimation
Ling et al. A dense 3D reconstruction approach from uncalibrated video sequences
JP2009186287A (en) Plane parameter estimating device, plane parameter estimating method, and plane parameter estimating program
Siddique et al. 3d object localization using 2d estimates for computer vision applications
JP2006113832A (en) Stereoscopic image processor and program
CN111583388A (en) Scanning method and device of three-dimensional scanning system
CN111127613A (en) Scanning electron microscope-based image sequence three-dimensional reconstruction method and system
Arslan 3D object reconstruction from a single image
Remondino 3D reconstruction of static human body with a digital camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151203

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160128

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160128

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160526

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160614

R150 Certificate of patent or registration of utility model

Ref document number: 5955028

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250