JP2010071922A - Apparatus for measuring three-dimensional position - Google Patents
Apparatus for measuring three-dimensional position Download PDFInfo
- Publication number
- JP2010071922A JP2010071922A JP2008242351A JP2008242351A JP2010071922A JP 2010071922 A JP2010071922 A JP 2010071922A JP 2008242351 A JP2008242351 A JP 2008242351A JP 2008242351 A JP2008242351 A JP 2008242351A JP 2010071922 A JP2010071922 A JP 2010071922A
- Authority
- JP
- Japan
- Prior art keywords
- pixel data
- dimensional
- data string
- image
- correlation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
Abstract
Description
この発明は、立体的な物体、例えば人間の顔などを対象物とし、この対象物を異なる視点から見た複数の画像中の対応点を探索し、この探索した対応点の視差に基づいてその対応点の3元位置を計測する3次元位置計測装置に関するものである。 The present invention uses a three-dimensional object, for example, a human face, as an object, searches for corresponding points in a plurality of images when the object is viewed from different viewpoints, and based on the parallax of the searched corresponding points. The present invention relates to a three-dimensional position measurement apparatus that measures the three-way positions of corresponding points.
従来より、対象物を異なる視点から見た複数の画像中の対応点の探索は、画像センシング、画像・映像信号処理、コンピュータビジョン等の様々な分野で重要な技術とされている。これらの分野では、通常、ピクセル精度の対応付け手法を用いることが多いが、近年、サブピクセル精度の対応付け手法への要求が高まっている。 Conventionally, searching for corresponding points in a plurality of images when an object is viewed from different viewpoints is an important technique in various fields such as image sensing, image / video signal processing, and computer vision. In these fields, the pixel accuracy matching method is usually used in many cases, but in recent years, the demand for the subpixel accuracy matching method is increasing.
例えば、基線長の短いステレオビジョンシステムにおいて、十分な3次元計測精度を実現するためには、サブピクセル精度の対応付けアルゴリズムが不可欠である。また、超解像による映像の高解像度化技術などにおいても、サブピクセル精度の対応付けアルゴリズムが重要になる。このため、例えば特許文献1に示された立体像計測装置では、対象物を異なる視点から見た複数の画像中の対応点の探索を2次元位相限定相関法を用いて行うことにより、サブピクセル精度の対応付けの要求を満たしている。
For example, in a stereo vision system with a short base line length, a subpixel accuracy matching algorithm is indispensable in order to realize sufficient three-dimensional measurement accuracy. In addition, a sub-pixel accuracy matching algorithm is important also in a technique for increasing the resolution of video by super-resolution. For this reason, for example, in the three-dimensional image measurement device disclosed in
図19は上述の特許文献1に示された立体像計装置における画像入力部の概略を示す図である。同図において、1は第1のカメラ、2は第2のカメラ、Mは対象物(人間の顔)である。カメラ1,2は、そのレンズLN1,LN2間の距離をLとして、横方向に並んで配置されている。図では分かり易いように、カメラ1および2を上方向から見た図とし、対象物Mは横方向から見た図としている。
FIG. 19 is a diagram showing an outline of an image input unit in the stereoscopic image measuring apparatus disclosed in
この立体像計測装置では、対象物Mをカメラ1で捉えた画像を入力画像I(図18(a))とし、この入力画像Iの画像データをm×n個の局所領域I(i,j)に分割する(図18(b))。そして、入力画像Iの画像データから局所領域I(i,j)を切り出し、この切り出した局所領域I(i,j)の画像データに2次元離散的フーリエ変換(DFT)を施してフーリエ画像データ(入力フーリエ画像データ)を得る。
In this stereoscopic image measuring apparatus, an image obtained by capturing the object M with the
また、対象物Mをカメラ2で捉えた画像を参照画像J(図18(c))とし、この参照画像Jの画像データに2次元離散的フーリエ変換を施してフーリエ画像データ(参照フーリエ画像データ)を得る。
Further, an image obtained by capturing the object M with the
そして、この得られた入力フーリエ画像データと参照フーリエ画像データとを合成し、この合成したフーリエ画像データ(合成フーリエ画像データ)の振幅成分を正規化して、もう一度、2次元離散的フーリエ変換(もしくは2次元離散的逆フーリエ変換)を施す。 Then, the obtained input Fourier image data and reference Fourier image data are synthesized, the amplitude component of the synthesized Fourier image data (synthesized Fourier image data) is normalized, and again a two-dimensional discrete Fourier transform (or 2D discrete inverse Fourier transform).
そして、この2次元離散的フーリエ変換が施された合成フーリエ画像データより所定の相関成分エリアの各画素の相関成分の強度(振幅)を求め、この相関成分エリア内の最も強度の高い相関成分を相関ピークとし、この相関ピークの強度値を相関ピークの値(相関を示す値)Phとし(図18(d))、この相関ピークの位置Ph(x,y)を求める。 And the intensity | strength (amplitude) of the correlation component of each pixel of a predetermined correlation component area is calculated | required from the synthetic | combination Fourier image data in which this two-dimensional discrete Fourier transform was performed, and the correlation component with the highest intensity | strength in this correlation component area is obtained. A correlation peak is set, and the intensity value of the correlation peak is set as a correlation peak value (value indicating correlation) Ph (FIG. 18D), and a position Ph (x, y) of the correlation peak is obtained.
この場合、相関成分エリアの中心Oから相関ピークの位置Ph(x,y)までの距離Aが、入力画像Iの画像データにおける局所領域I(i,j)と参照画像Jの画像データにおける一致する画像データのある領域(対応領域)との視差の方向(x軸方向)へのずれ量を示す。入力画像Iにおける局所領域I(i,j)中の画像と参照画像Jにおける対応領域中の画像とは視差によってその画像がずれており、これがx軸方向のずれ量Aとして現れる。 In this case, the distance A from the center O of the correlation component area to the correlation peak position Ph (x, y) matches the local area I (i, j) in the image data of the input image I and the image data of the reference image J. The amount of deviation in the direction of parallax (x-axis direction) with a certain region (corresponding region) of image data to be displayed is shown. The image in the local region I (i, j) in the input image I and the image in the corresponding region in the reference image J are shifted due to parallax, and this appears as a shift amount A in the x-axis direction.
このずれ量Aによって、入力画像中の局所領域I(i,j)の中心点(探索点)と、参照画像J中の対応領域の中心点(対応点)とを対応付け、三角測量の原理に基づく下記(1)式によって、カメラから対象物Mの対応点(探索点)までの距離Rを計算する。なお、下記(1)式において、fはレンズLN(LN1,LN2)の中心から撮像位置までの距離、Lはレンズ間距離である。
R=f・L/A ・・・・(1)
By this shift amount A, the center point (search point) of the local area I (i, j) in the input image is associated with the center point (corresponding point) of the corresponding area in the reference image J, and the principle of triangulation The distance R from the camera to the corresponding point (search point) of the object M is calculated by the following equation (1) based on the above. In the following formula (1), f is the distance from the center of the lens LN (LN1, LN2) to the imaging position, and L is the distance between the lenses.
R = f · L / A (1)
上述した特許文献1に示された手法は、対応付けの精度が極めて高く、様々な画像に対して同一のアルゴリズムが適用できるという長所がある。しかしながら、この手法は、2次元離散的フーリエ変換に要する計算量が多く、短時間で対応付けの結果を得ることが要求される分野では採用し難いという問題があった。
The method disclosed in
本発明は、このような課題を解決するためになされたもので、その目的とするところは、対応点の探索に要する計算量を大幅に減らし、短時間でかつ高精度に、かつトラブルの発生も含めて、対応点の3次元位置を計測することが可能な3次元位置計測装置を提供することにある。 The present invention has been made to solve such a problem, and the object of the present invention is to greatly reduce the amount of calculation required for searching for corresponding points, to generate troubles in a short time with high accuracy. Is to provide a three-dimensional position measuring apparatus capable of measuring the three-dimensional position of the corresponding point.
このような目的を達成するために、本発明は、対象物を異なる視点から見た複数の画像を取り込む画像取込手段と、画像取込手段のパラメータおよび基準点から計算されるエピポーラ線に沿って複数の画像より1次元の画素データ列を切り出す画素データ列切出手段と、画素データ列切出手段によって切り出された1次元の画素データ列の相関から複数の画像中の対応点を探索する対応点探索手段と、対応点探索手段によって探索された対応点の視差に基づいてその対応点の3次元位置を計測する3次元位置計測手段と、画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が予め定められた下限値に満たない場合、異常である旨を通知する異常通知手段とを設けたものである。 In order to achieve such an object, the present invention provides an image capturing means for capturing a plurality of images obtained by viewing an object from different viewpoints, and an epipolar line calculated from parameters and reference points of the image capturing means. The corresponding points in the plurality of images are searched from the correlation between the pixel data string cutting means for cutting out the one-dimensional pixel data string from the plurality of images and the one-dimensional pixel data string cut out by the pixel data string cutting means. Corresponding point searching means, three-dimensional position measuring means for measuring the three-dimensional position of the corresponding points based on the parallax of the corresponding points searched by the corresponding point searching means, and one-dimensional data extracted by the pixel data string extracting means And an abnormality notification means for notifying that there is an abnormality when the value indicating the correlation of the pixel data sequence is less than a predetermined lower limit value.
この発明において、例えば、画像取込手段を所定の距離隔てて配置された2台のカメラとした場合、第1のカメラと第2のカメラが対象物に対して等位置に傾斜なく配置されていれば、第1のカメラで撮像される画像および第2のカメラで撮像される画像におけるエピポーラ線は、いずれも水平となる。これに対し、第1のカメラおよび第2のカメラの何れかが傾斜していれば、第1のカメラで撮像される画像および第2のカメラで撮像される画像におけるエピポーラ線も傾斜する。このように、第1のカメラで撮像される画像および第2のカメラで撮像される画像におけるエピポーラ線は、第1および第2のカメラの位置関係(2つの画像間の基礎行列や、内部行列・外部行列などのカメラ固有のパラメータ)によって定まる。本発明では、このような画像取込手段のパラメータを保存しておき、対応点を探索する際の処理過程で用いる。 In the present invention, for example, when the image capturing means is two cameras arranged at a predetermined distance, the first camera and the second camera are arranged at equal positions with respect to the object without inclination. Then, the epipolar lines in the image captured by the first camera and the image captured by the second camera are both horizontal. On the other hand, if either the first camera or the second camera is tilted, epipolar lines in the image captured by the first camera and the image captured by the second camera are also tilted. Thus, the epipolar line in the image captured by the first camera and the image captured by the second camera is the positional relationship between the first and second cameras (the basic matrix between the two images and the internal matrix). -Camera specific parameters such as external matrix). In the present invention, the parameters of such image capturing means are stored and used in the processing process when searching for corresponding points.
本発明において、画像取込手段は、複数台のカメラに限られるものではない。例えば、光学機構を設けることによって、1台のカメラから対象物を異なる視点から見た複数の画像を得るようにしてもよい。 In the present invention, the image capturing means is not limited to a plurality of cameras. For example, by providing an optical mechanism, a plurality of images obtained by viewing an object from different viewpoints may be obtained from one camera.
本発明において、複数の画像のうちの1つを入力画像、もう1つを参照画像とした場合、画像取込手段のパラメータおよび基準点から計算されるエピポーラ線に沿って、入力画像および参照画像より1次元の画素データ列(例えば、32画素の画素データ列)が切り出される。そして、このエピポーラ線に沿って切り出された1次元の画素データ列の相関から、入力画像中の基準点に対応する参照画像中の対応点が探索され、基準点と対応点とが対応付けられる。 In the present invention, when one of the plurality of images is an input image and the other is a reference image, the input image and the reference image are taken along an epipolar line calculated from the parameters and reference points of the image capturing means. Thus, a one-dimensional pixel data string (for example, a pixel data string of 32 pixels) is cut out. A corresponding point in the reference image corresponding to the reference point in the input image is searched from the correlation of the one-dimensional pixel data string cut out along the epipolar line, and the reference point and the corresponding point are associated with each other. .
この場合、基準点の画素データ列は1次元の画素データ列であり、参照画像中の画素データ列も1次元の画素データ列であるので、1次元の位相限定相関法(1次元POC)を利用することができる。すなわち、複数の画像から切り出された1次元の画素データ列から位相限定相関関数を計算することによって得られる相関ピークの位置から位置ずれ量を求め、この位置ずれ量から複数の画像中の対応点を探索することが可能である。 In this case, since the pixel data string of the reference point is a one-dimensional pixel data string, and the pixel data string in the reference image is also a one-dimensional pixel data string, the one-dimensional phase-only correlation method (one-dimensional POC) is used. Can be used. That is, a positional deviation amount is obtained from the position of a correlation peak obtained by calculating a phase-only correlation function from a one-dimensional pixel data sequence cut out from a plurality of images, and corresponding points in the plurality of images are obtained from the positional deviation amount. Can be searched.
1次元POCでは、1次元のフーリエ変換を施せばよいので、計算量を大幅に減らすことができる。これにより、対応点の探索に要する計算量が大幅に減り、対象物における各点の3次元位置を短時間で計測することが可能となる。また、1次元POCを用いることにより、エピポーラ線の垂直方向の相関誤差要因を少なくすることができ、高精度な3次元位置の計測が可能となる。 In the one-dimensional POC, since a one-dimensional Fourier transform is performed, the amount of calculation can be greatly reduced. As a result, the amount of calculation required for searching for the corresponding point is greatly reduced, and the three-dimensional position of each point on the object can be measured in a short time. Further, by using the one-dimensional POC, it is possible to reduce the correlation error factor in the vertical direction of the epipolar line and to measure the three-dimensional position with high accuracy.
本発明において、画像取込手段を介して取り込まれる画像における実際のエピポーラ線は水平であるとは限らず、傾斜している場合もある。理想的には水平であることが望まれるが、カメラの取り付け誤差などもあり、エピポーラ線は傾斜している場合が多い。 In the present invention, the actual epipolar line in an image captured via the image capturing means is not necessarily horizontal but may be inclined. Ideally, it should be horizontal, but the epipolar line is often inclined due to camera mounting errors.
本発明において、画像取込手段に対して調整機構を設け、この調整機構を介して複数の画像の少なくとも1つについて対象物に対する視点を調整できるようにすると、例えば工場出荷前に、複数の画像における実際のエピポーラ線を手動で水平に設定することが可能である。 In the present invention, if an adjustment mechanism is provided for the image capturing means and the viewpoint for the object can be adjusted via at least one of the plurality of images via the adjustment mechanism, for example, a plurality of images can be obtained before factory shipment. It is possible to manually set the actual epipolar line at.
本発明において、複数の画像におけるエピポーラ線を水平とすると、複数の画像中の各画素データを、画像取込手段のパラメータおよび基準点から計算されるエピポーラ線に平行な軸を一軸とし、この一軸に対して垂直な軸を他軸とする座標系に変換するというような座標系の変換処理が不要となり、処理負荷が削減できるともに、対応点の探索結果が得られるまでの時間が短縮される。 In the present invention, when the epipolar lines in a plurality of images are horizontal, each pixel data in the plurality of images has an axis parallel to the epipolar line calculated from the parameters of the image capturing means and the reference point as one axis. This eliminates the need for coordinate system conversion processing, such as converting the axis perpendicular to the coordinate system to another axis, reduces the processing load, and shortens the time until the corresponding point search result is obtained. .
また、本発明では、画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が予め定められた下限値に満たない場合、すなわち画素データ列切出手段によって切り出された1次元の画素データ列に相関が認められない場合、異常である旨が通知される。これにより、ユーザは、3次元位置計測装置に何らかのトラブルが発生していることを知り、素早くメンテナンスを行うことができる。 In the present invention, when the value indicating the correlation of the one-dimensional pixel data string cut out by the pixel data string cutting means is less than a predetermined lower limit value, that is, cut out by the pixel data string cutting means. If no correlation is found in the one-dimensional pixel data string, it is notified that there is an abnormality. Thereby, the user can know that some trouble has occurred in the three-dimensional position measurement apparatus, and can quickly perform maintenance.
また、本発明において、画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が予め定められた下限値に満たない場合、異常である旨を通知すると同時に、3次元位置の計測を中止するようにするとよい。この場合、3次元計測を実行しても信憑性のある計測データは得られないので、3次元位置の計測を中止しても構わない。このようにすることにより、無駄なエネルギーの消費を抑えることができる。 In the present invention, when the value indicating the correlation of the one-dimensional pixel data string cut out by the pixel data string cutting means is less than a predetermined lower limit value, it is notified that there is an abnormality and at the same time, It is recommended to stop the position measurement. In this case, since measurement data with reliability cannot be obtained even if the three-dimensional measurement is executed, the measurement of the three-dimensional position may be stopped. In this way, useless energy consumption can be suppressed.
また、本発明において、画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が下限値以上である場合、その相関を示す値として求められる相関ピークの位置の視差の方向に対して直交する方向へのずれ量を求め、このずれ量が予め定められている閾値を超えていた場合、そのずれ量に基づいて画素データ列切出手段によって切り出された1次元の画素データ列の画素データの位置を補正するようにしてもよい。これにより、現場においてエピポーラ線が傾いてきたような場合でも、1次元の画素データ列の画素データの位置を自動的に補正して、精度の高い対応点の探索を続行することができる。 In the present invention, when the value indicating the correlation of the one-dimensional pixel data string cut out by the pixel data string cutting means is equal to or higher than the lower limit value, the parallax of the position of the correlation peak obtained as the value indicating the correlation is obtained. A one-dimensional pixel cut out by the pixel data string cutting means based on the amount of deviation when the amount of deviation in a direction orthogonal to the direction is obtained and the amount of deviation exceeds a predetermined threshold. The position of the pixel data in the data string may be corrected. As a result, even when the epipolar line is inclined at the site, the position of the pixel data in the one-dimensional pixel data string is automatically corrected, and the search for the corresponding point with high accuracy can be continued.
本発明によれば、画像取込手段を介して、対象物を異なる視点から見た複数の画像を取り込み、画像取込手段のパラメータおよび基準点から計算されるエピポーラ線に沿って複数の画像より1次元の画素データ列を切り出し、複数の画像から切り出された1次元の画素データ列の相関から複数の画像中の対応点を探索するようにしたので、1次元POCを利用することができ、対応点の探索に要する計算量を大幅に減らし、対象物における各点の3次元位置を短時間で計測することが可能となる。また、1次元POCを用いることにより、エピポーラ線の垂直方向の相関誤差要因を少なくすることができ、高精度な3次元位置の計測が可能となる。 According to the present invention, a plurality of images obtained by viewing an object from different viewpoints are captured via the image capturing means, and a plurality of images are taken along epipolar lines calculated from parameters of the image capturing means and reference points. Since the one-dimensional pixel data string is cut out and the corresponding points in the plurality of images are searched from the correlation of the one-dimensional pixel data string cut out from the plurality of images, the one-dimensional POC can be used. The amount of calculation required for searching for corresponding points can be greatly reduced, and the three-dimensional position of each point on the object can be measured in a short time. Further, by using the one-dimensional POC, it is possible to reduce the correlation error factor in the vertical direction of the epipolar line and to measure the three-dimensional position with high accuracy.
また、本発明によれば、画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が予め定められた下限値に満たない場合、異常である旨を通知するようにすることにより、3次元位置計測装置に何らかのトラブルが発生していることを知り、素早くメンテナンスを行うことができるようになる。
また、本発明によれば、画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が予め定められた下限値に満たない場合、3次元位置の計測を中止するようにすることにより、無駄なエネルギーの消費を抑えることができるようになる。
Further, according to the present invention, when the value indicating the correlation of the one-dimensional pixel data string cut out by the pixel data string cutting means is less than a predetermined lower limit value, it is notified that it is abnormal. By doing so, it is possible to know that some kind of trouble has occurred in the three-dimensional position measuring apparatus and to perform maintenance quickly.
Further, according to the present invention, when the value indicating the correlation of the one-dimensional pixel data string cut out by the pixel data string cutting means is less than a predetermined lower limit value, the measurement of the three-dimensional position is stopped. By doing so, it becomes possible to suppress the consumption of useless energy.
また、本発明によれば、画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が予め定められた下限値以上である場合、その相関を示す値として求められる相関ピークの位置の視差の方向に対して直交する方向へのずれ量を求め、このずれ量が予め定められている閾値を超えていた場合、そのずれ量に基づいて画素データ列切出手段によって切り出された1次元の画素データ列の画素データの位置を補正するようにすることにより、現場においてエピポーラ線が傾いてきたような場合でも、1次元の画素データ列の画素データの位置を自動的に補正して、精度の高い対応点の探索を続行することができるようになる。 Further, according to the present invention, when the value indicating the correlation of the one-dimensional pixel data string cut out by the pixel data string cutting means is equal to or greater than a predetermined lower limit value, the correlation obtained as the value indicating the correlation is obtained. The amount of deviation of the peak position in the direction perpendicular to the direction of the parallax is obtained, and when this amount of deviation exceeds a predetermined threshold, the pixel data string extraction unit extracts the deviation amount based on the amount of deviation. By correcting the position of the pixel data in the one-dimensional pixel data string, the position of the pixel data in the one-dimensional pixel data string is automatically adjusted even when the epipolar line is inclined in the field. After correction, the search for corresponding points with high accuracy can be continued.
以下、本発明を図面に基づいて詳細に説明する。図1はこの発明に係る3次元位置計測装置の一実施の形態を示すブロック構成図である。同図において、10は第1のカメラ(CCDカメラ)、11は第2のカメラ(CCDカメラ)、12は液晶表示装置(LCD)、20は処理部であり、処理部20は、CPUを有する制御部20−1と、ROM20−2と、RAM20−3と、ハードディスクドライブ(HDD)20−4と、フレームメモリ(FM)20−5と、外部接続部(I/F)20−6と、フーリエ変換部(FFT)20−7とを備えており、ROM20−2には3次元位置計測プログラムが格納されている。
Hereinafter, the present invention will be described in detail with reference to the drawings. FIG. 1 is a block configuration diagram showing an embodiment of a three-dimensional position measuring apparatus according to the present invention. In the figure, 10 is a first camera (CCD camera), 11 is a second camera (CCD camera), 12 is a liquid crystal display (LCD), 20 is a processing unit, and the
カメラ10,11は、図19に示した従来例と同様に、所定の距離Lを隔てて設置されている。すなわち、カメラ10,11は、そのレンズLN1,1N2間の距離をLとして、横方向に並んで配置されている。この図でも分かり易いように、3次元計測装置は上方向から見た図とし、対象物Mは横方向から見た図としている。
The
また、カメラ10,11には、このカメラ10,11の姿勢の所望の方向への手動調整を可能とする姿勢調整機構13−1,13−2が設けられている。図4に姿勢調整機構13(13−1,13−2)の一例を示す。本実施の形態では、カメラ10,11にそれぞれ姿勢調整機構13を設けているが、何れか一方のカメラのみに姿勢調整機構13を設けるようにしてもよい。
In addition, the
〔カメラパラメータの保存〕
カメラ10および11は所定の距離Lを隔てて配置されている。このカメラ10および11が互いの光軸が平行且つ、画像座標の水平軸が同一直線上で同じ向きになるように配置されていれば、図2(a)および(b)に示すように、カメラ10で撮像される画像Iにおける基準点pが存在する直線EP1およびカメラ11で撮像される画像Jにおける対応点qが存在する直線EP2、すなわちエピポーラ線EP1およびEP2は、いずれも水平となる。なお、エピポーラ線については、非特許文献1などに解説されているので、ここでの詳細な説明は省略する。
[Save camera parameters]
The
これに対し、カメラ10および11の何れかが傾斜していれば、カメラ10で撮像される画像Iおよびカメラ11で撮像される画像Jにおけるエピポーラ線EP1,EP2も傾斜する(図3(a),(b)参照)。このように、カメラ10で撮像される画像Iおよびカメラ11で撮像される画像Jにおけるエピポーラ線EP(EP1,EP2)は、カメラ10とカメラ11との位置関係(2つの画像間の基礎行列や、内部行列・外部行列などのカメラ固有のパラメータ)によって定まる。本実施の形態では、このカメラ10とカメラ11との位置関係を示すパラメータ(カメラパラメータ)をハードディスクに保存させておき、後述する対応点を探索する際の処理過程で用いる。
On the other hand, if either one of the
〔3次元位置の計測〕
この3次元位置計測装置において、対象物Mを人間の顔とした場合、この対象物Mにおける各点の3次元位置の計測は次のようにして行われる。この3次元位置の計測処理は、ROM20−2に格納された3次元位置計測プログラムに従って、制御部20−1が行う。
[Measurement of three-dimensional position]
In this three-dimensional position measurement apparatus, when the object M is a human face, the measurement of the three-dimensional position of each point on the object M is performed as follows. This three-dimensional position measurement process is performed by the control unit 20-1 according to a three-dimensional position measurement program stored in the ROM 20-2.
〔画像取り込み〕
制御部20−1は、カメラ10からの対象物Mを捉えた画像Iを入力画像(図5(a))として取り込む(図6に示すステップS101)。また、カメラ11からの対象物Mを捉えた画像J(図5(b))を参照画像として取り込む(ステップS102)。この例では、入力画像Iおよび参照画像Jにおけるエピポーラ線EPは水平となっており、エピポーラ線EPを水平とする座標系に変換する必要はない。
[Image capture]
The control unit 20-1 captures an image I that captures the object M from the
〔対象領域の抽出〕
次に、エッジ検出により、入力画像Iおよび参照画像J中から、対象物M(人間の顔)が存在する領域だけを対応点探索の対象領域(以下、オブジェクト領域と呼ぶ)として抽出する(ステップS103)。これにより、図5(c)および(d)に示されるように、オブジェクト領域OB1およびOB2を抽出した入力画像I’および参照画像J’が得られる。
[Extract target area]
Next, by edge detection, only an area where the target object M (human face) exists is extracted from the input image I and the reference image J as a corresponding point search target area (hereinafter, referred to as an object area) (step). S103). Thereby, as shown in FIGS. 5C and 5D, the input image I ′ and the reference image J ′ obtained by extracting the object regions OB1 and OB2 are obtained.
なお、ここでは、説明を簡単とするために、入力画像Iおよび参照画像Jにおける対象物M以外の背景は無地であり、対象物Mが存在する領域だけがオブジェクト領域OB1およびOB2として正しく抽出されるものとする。 Here, for simplicity of explanation, the backgrounds other than the object M in the input image I and the reference image J are plain, and only the areas where the object M exists are correctly extracted as the object areas OB1 and OB2. Shall be.
〔対応点の探索〕
そして、制御部20−1は、入力画像I’中のオブジェクト領域OB1と参照画像J’中のオブジェクト領域OB2とを対象領域として、対応点の探索を行う(ステップS104)。図7にステップS104における対応点の探索処理のフローチャートを示す。制御部20−1は、このフローチャートに従って、対応点の探索を次のようにして行う。
[Search for corresponding points]
Then, the control unit 20-1 searches for corresponding points using the object area OB1 in the input image I ′ and the object area OB2 in the reference image J ′ as target areas (step S104). FIG. 7 shows a flowchart of corresponding point search processing in step S104. In accordance with this flowchart, the control unit 20-1 searches for corresponding points as follows.
先ず、入力画像I’において、X軸に平行な各線(1画素幅の線)のオブジェクト領域OB1内の起点(ST)と終点(END)を求める(ステップS201)。 First, in the input image I ′, a starting point (ST) and an ending point (END) in the object area OB1 of each line (line having a width of one pixel) parallel to the X axis are obtained (step S201).
そして、オブジェクト領域OB1中の最上位の線の線番号をn=1とし(ステップS202)、このn=1番目の線上に基準点pを定め、その基準点pを中心とする所定幅Wの探索ウィンドウSWの画素データ列を基準点pの画素データ列として抽出する(ステップS203)。この例では、n=1番目の線(以下、探索ラインと呼ぶ)の起点ST(図8(a)参照)から、幅Wを32画素とする探索ウィンドウSW内の画素のデータ列を基準点pの画素データ列として抽出する。 Then, the line number of the uppermost line in the object area OB1 is set to n = 1 (step S202), a reference point p is defined on the n = 1st line, and a predetermined width W with the reference point p as the center is set. The pixel data string of the search window SW is extracted as the pixel data string of the reference point p (step S203). In this example, a data string of pixels in the search window SW having a width W of 32 pixels from the starting point ST (see FIG. 8A) of the n = 1st line (hereinafter referred to as a search line) is a reference point. Extracted as a pixel data string of p.
この場合、n=1番目の探索ラインが基準点pのエピポーラ線EPであり、このエピポーラ線EPに沿って基準点pの画素データ列が切り出されるものとなる。この基準点の画素データ列は1次元の画素のデータ列である。 In this case, the n = 1st search line is the epipolar line EP of the reference point p, and the pixel data string of the reference point p is cut out along this epipolar line EP. This reference point pixel data string is a one-dimensional pixel data string.
また、オブジェクト領域OB2中の基準点pに対応する座標点を候補点q’とし、この候補点q’を中心とする幅W=32画素の探索ウィンドウCWを定め、探索ウィンドウCW内の画素のデータ列を候補点q’の画素データ列として抽出する(ステップS204)。 Further, a coordinate point corresponding to the reference point p in the object area OB2 is set as a candidate point q ′, a search window CW having a width W = 32 pixels centered on the candidate point q ′ is defined, and pixels in the search window CW are determined. The data string is extracted as a pixel data string of the candidate point q ′ (step S204).
この場合、n=1番目の探索ラインが候補点q’のエピポーラ線EPであり、このエピポーラ線EPに沿って候補点q’の画素データ列が切り出されるものとなる。この候補点の画素データ列は1次元の画素のデータ列である。 In this case, the n = 1st search line is the epipolar line EP of the candidate point q ′, and the pixel data string of the candidate point q ′ is cut out along the epipolar line EP. This candidate point pixel data string is a one-dimensional pixel data string.
そして、ステップS203で抽出した基準点pの画素データ列とステップS204で抽出した候補点q’の画素データ列とから位相限定相関関数を計算する(ステップS205)。この位相限定相関関数の計算には1次元位相限定相関法(1次元POC)を用いる。この1次元POCによる位相限定相関関数の計算は次のようにして行う。 Then, a phase-only correlation function is calculated from the pixel data string of the reference point p extracted in step S203 and the pixel data string of the candidate point q ′ extracted in step S204 (step S205). A one-dimensional phase-only correlation method (one-dimensional POC) is used for calculating the phase-only correlation function. The calculation of the phase-only correlation function by the one-dimensional POC is performed as follows.
制御部20−1は、ステップS203で抽出した基準点pの画素データ列を第1の画像データG1とし(図9(a)参照)、この第1の画像データG1をフーリエ変換部20−7へ送り、この第1の画像データG1に1次元のフーリエ変換を施す。これにより、第1の画像データG1は、フーリエ画像データF1となる。 The control unit 20-1 sets the pixel data string of the reference point p extracted in step S203 as the first image data G1 (see FIG. 9A), and uses the first image data G1 as the Fourier transform unit 20-7. And a one-dimensional Fourier transform is applied to the first image data G1. As a result, the first image data G1 becomes Fourier image data F1.
また、ステップS204で抽出した候補点q’の画素データ列を第2の画像データG2とし(図9(b)参照)、この第2の画像データG2をフーリエ変換部20−7へ送り、この第2の画像データG2に1次元のフーリエ変換を施す。これにより、第2の画像データG2は、フーリエ画像データF2となる。 Further, the pixel data string of the candidate point q ′ extracted in step S204 is set as the second image data G2 (see FIG. 9B), and the second image data G2 is sent to the Fourier transform unit 20-7. A one-dimensional Fourier transform is applied to the second image data G2. As a result, the second image data G2 becomes Fourier image data F2.
そして、制御部20−1は、フーリエ画像データF1とフーリエ画像データF2とを合成し、この合成したフーリエ画像データ(合成フーリエ画像データ)の振幅成分を正規化してフーリエ変換部20−7へ送り、もう一度、1次元のフーリエ変換を施す。 Then, the control unit 20-1 synthesizes the Fourier image data F1 and the Fourier image data F2, normalizes the amplitude component of the synthesized Fourier image data (synthesized Fourier image data), and sends it to the Fourier transform unit 20-7. Once again, a one-dimensional Fourier transform is applied.
そして、この1次元のフーリエ変換が施された合成フーリエ画像データより所定の相関成分エリアの各画素の相関成分の強度(振幅)を求め、この相関成分エリア内の最も強度の高い相関成分を相関ピークとし、この相関ピークの強度値を相関ピークの値(相関値)Phとし(図9(c))、この相関ピークの位置Ph(x,y)を求める。この処理過程において、相関ピークの値Phおよび相関ピークの位置Ph(x,y)を求める処理が位相限定相関関数を計算することに対応する。 Then, the intensity (amplitude) of the correlation component of each pixel in the predetermined correlation component area is obtained from the synthesized Fourier image data subjected to the one-dimensional Fourier transform, and the highest correlation component in the correlation component area is correlated. The peak is set, and the intensity value of the correlation peak is set as the correlation peak value (correlation value) Ph (FIG. 9C), and the position Ph (x, y) of the correlation peak is obtained. In this process, the process of obtaining the correlation peak value Ph and the correlation peak position Ph (x, y) corresponds to calculating the phase-only correlation function.
この場合、相関成分エリアの中心Oから相関ピークの位置Ph(x,y)までの距離dが、探索ウィンドウSW中の画像と探索ウィンドウCW中の画像との視差の方向(x軸方向)へのずれ量、すなわち探索ウィンドウSW中の基準点pと探索ウィンドウCW中の対応点qとのx軸方向へのずれ量を示す。 In this case, the distance d from the center O of the correlation component area to the correlation peak position Ph (x, y) is in the parallax direction (x-axis direction) between the image in the search window SW and the image in the search window CW. , That is, a shift amount in the x-axis direction between the reference point p in the search window SW and the corresponding point q in the search window CW.
ここで、制御部20−1は、相関ピークの値Phと予め定められている下限値Phthとを比較し(ステップS206)、相関ピークの値Phが下限値Phthに満たなければ(ステップS206のNO)、両者に相関が認められず、探索ウィンドウCW中に対応点qが存在しないと判断し、異常として重故障である旨を通知する(ステップS207)。また、以降の3次元位置の計測を中止する(ステップS208)。この場合、重故障である旨の通知は、LCD12への表示、ブザー(図示せず)の鳴動、I/F20−6を介する上位装置への通報などによって行う。
Here, the control unit 20-1 compares the correlation peak value Ph with a predetermined lower limit value Phth (step S206), and if the correlation peak value Ph does not satisfy the lower limit value Phth (step S206). NO), it is determined that there is no correlation between the two and the corresponding point q does not exist in the search window CW, and a notice of a serious failure is given as an abnormality (step S207). Further, the subsequent measurement of the three-dimensional position is stopped (step S208). In this case, notification of a serious failure is made by displaying on the
相関ピークの値Phが下限値Phth以上である場合(ステップS206のYES)、制御部20−1は、相関成分エリアにおける相関ピークの位置Ph(x,y)の視差の方向(x軸方向)に対して直交する方向(y軸方向)へのずれ量eを求め(ステップS209)、このy軸方向へのずれ量eが予め定められている閾値ethを超えていれば(ステップS210のNO)、例えば探索ウィンドウCW中の画像の各画素の位置をy軸方向にずれ量eだけ補正したうえ(ステップS211)、ステップS205へ戻り、再度、位相限定相関関数を計算する。この位相限定相関関数の計算によって、y軸方向へのずれ量eが閾値eth以内となれば(ステップS210のYES)、この時の基準点pと対応点qとのずれ量dを基準点pに対応付けて記憶する(ステップS212)。 When the correlation peak value Ph is equal to or greater than the lower limit value Phth (YES in step S206), the control unit 20-1 determines the parallax direction (x-axis direction) of the correlation peak position Ph (x, y) in the correlation component area. Is obtained (step S209). If the deviation e in the y-axis direction exceeds a predetermined threshold eth (NO in step S210). For example, after correcting the position of each pixel of the image in the search window CW by the shift amount e in the y-axis direction (step S211), the process returns to step S205, and the phase-only correlation function is calculated again. If the shift amount e in the y-axis direction is within the threshold eth by the calculation of the phase-only correlation function (YES in step S210), the shift amount d between the reference point p and the corresponding point q at this time is determined as the reference point p. Are stored in association with each other (step S212).
このステップS209〜S211の処理により、現場においてエピポーラ線が傾いてきたような場合でも、探索ウィンドウCW中の画像の各画素の位置をy軸方向にずれ量eだけ自動的に補正して、精度の高い対応点の探索を続行することができる。 The processing of steps S209 to S211 automatically corrects the position of each pixel of the image in the search window CW by the shift amount e in the y-axis direction even when the epipolar line is inclined at the site. It is possible to continue searching for a corresponding point having a high value.
なお、この例では、探索ウィンドウCW中の画像の各画素の位置をy軸方向にずれ量eだけ補正するようにしたが、探索ウィンドウSW中の画像の各画素の位置をy軸方向にずれ量eだけ補正するようにしてもよい。また、y軸方向へのずれ量eからエピポーラ線の傾きを推定し、その推定したエピポーラ線線の傾きに応じて探索ウィンドウSWやCW中の画像の各画素のy軸方向の位置に対する補正量を定めるようにしてもよい。 In this example, the position of each pixel of the image in the search window CW is corrected by the shift amount e in the y-axis direction, but the position of each pixel of the image in the search window SW is shifted in the y-axis direction. Only the amount e may be corrected. Further, the inclination of the epipolar line is estimated from the shift amount e in the y-axis direction, and the correction amount for the position in the y-axis direction of each pixel of the image in the search window SW or CW according to the estimated inclination of the epipolar line. May be determined.
以下同様にして、制御部20−1は、オブジェクト領域OB1中のn=1番目の探索ライン上の基準点を所定画素(例えば、1画素)ずつずらしながら、すなわち探索ウィンドウSWを所定画素づつずらしながら(ステップS214)、同様の処理を繰り返す。 Similarly, the control unit 20-1 shifts the reference point on the n = 1st search line in the object area OB1 by predetermined pixels (for example, one pixel), that is, shifts the search window SW by predetermined pixels. While (step S214), the same processing is repeated.
そして、オブジェクト領域OB1中のn=1番目の探索ラインの終点ENDまで対応点の探索が完了すれば(ステップS213のYES)、オブジェクト領域OB1中のn=2番目の探索ラインの起点に探索ウィンドウSWを移す(ステップS215)。以下同様にして、オブジェクト領域OB1中の最後の探索ラインの終点まで、同様動作を繰り返す。 If the search for the corresponding points up to the end point END of the n = 1st search line in the object area OB1 is completed (YES in step S213), the search window is set at the starting point of the n = 2nd search line in the object area OB1. SW is moved (step S215). Similarly, the same operation is repeated until the end point of the last search line in the object area OB1.
〔3次元位置の計測〕
制御部20−1は、オブジェクト領域OB1中の全ての基準点について対応点の探索が完了すると(ステップS216のYES)、各基準点と各対応点とのずれ量dに基づいて、三角測量の原理に基づく下記(2)式によって、カメラから対象物Mの対応点(基準点)までの距離Rを計算する(ステップS105(図6))。
R=f・L/d ・・・・(2)
[Measurement of three-dimensional position]
When the control unit 20-1 completes the search for the corresponding points for all the reference points in the object area OB1 (YES in step S216), the control unit 20-1 performs triangulation based on the shift amount d between each reference point and each corresponding point. The distance R from the camera to the corresponding point (reference point) of the object M is calculated by the following equation (2) based on the principle (step S105 (FIG. 6)).
R = f · L / d (2)
そして、この計算したカメラから対象物Mの対応点(基準点)までの距離Rを3次元位置の計測データとし、各点の3次元位置の計測データをハードディスクに記憶させる。このハードディスクに記憶させた3次元位置の計測データ群は、必要に応じて読み出し、LCD12の画面上に表示したり、上位の装置へ送ったりする。
Then, the calculated distance R from the camera to the corresponding point (reference point) of the object M is used as the measurement data of the three-dimensional position, and the measurement data of the three-dimensional position of each point is stored in the hard disk. The measurement data group at the three-dimensional position stored in the hard disk is read out as necessary and displayed on the screen of the
〔エピポーラ線の調整〕
本実施の形態において、入力画像Iおよび参照画像Jにおけるエピポーラ線の調整は、次のようにして行う。
[Adjustment of epipolar line]
In the present embodiment, the adjustment of epipolar lines in the input image I and the reference image J is performed as follows.
〔工場出荷前の調整〕
制御部20−1は、エピポーラ線の調整モードとされると、入力画像Iと参照画像Jとを取り込み(図10に示すステップS301)、2次元位相限定相関法によって入力画像Iと参照画像J間の各対応点を求める(ステップS302)。
[Adjustment before factory shipment]
When the epipolar line adjustment mode is set, the control unit 20-1 captures the input image I and the reference image J (step S301 shown in FIG. 10), and the input image I and the reference image J by the two-dimensional phase-only correlation method. Each corresponding point between them is obtained (step S302).
そして、例えば入力画像Iについて、図11に示すように、その画像の中心(原点)を通る実際のエピポーラ線EP0’上の各点の計算上のエピポーラ線EP0(X軸上のライン)からの垂直方向の差分値の積算値Sを求める(ステップS303)。 For example, for the input image I, as shown in FIG. 11, from the calculated epipolar line EP0 (line on the X axis) of each point on the actual epipolar line EP0 ′ passing through the center (origin) of the image. An integrated value S of difference values in the vertical direction is obtained (step S303).
そして、この求めた積算値Sと予め設定されている閾値Sthとを比較し(ステップS304)、積算値Sが閾値Sthを超えていれば(ステップS304のNO)、エピポーラ線の調整が必要であると判断し、LCD12に調整量を数値で表示するなどして、作業者にエピポーラ線の調整を促す(ステップS305)。
Then, the obtained integrated value S is compared with a preset threshold value Sth (step S304). If the integrated value S exceeds the threshold value Sth (NO in step S304), the epipolar line needs to be adjusted. It is determined that there is an adjustment amount, and the adjustment amount is displayed as a numerical value on the
これを受けて、作業者は、姿勢調整機構13−1を用いて、LCD12に表示されている数値を見ながら、カメラ10の姿勢(視点)を手動調整する。この手動調整によって、入力画像Iだけではなく、参照画像J中のエピポーラ線の傾きも変化する。したがって、カメラ10の姿勢だけ調整すればよく、カメラ11の姿勢を調整する必要はない。なお、カメラ10側ではなく、カメラ11側の姿勢(視点)を調整するようにしてもよく、場合によってはカメラ10,11の姿勢(視点)をともに調整するようにしてもよい。
In response to this, the operator manually adjusts the posture (viewpoint) of the
この手動調整によって、積算値Sが閾値Sth以下となれば(ステップS304のYES)、制御部20−1は、ブザーなどで作業者に調整の終了を知らせる(ステップS305)。この場合、閾値Sthにより若干誤差はあるが、実際のエピポーラ線EPO’と計算上のエピポーラ線EP0とが一致する。 If the integrated value S becomes equal to or less than the threshold value Sth by this manual adjustment (YES in step S304), the control unit 20-1 notifies the operator of the end of the adjustment with a buzzer (step S305). In this case, although there is a slight error depending on the threshold value Sth, the actual epipolar line EPO 'matches the calculated epipolar line EP0.
〔現場での自動補正〕
現場において、制御部20−1は、定期的に、入力画像Iと参照画像Jとを取り込み(図12に示すステップS401)、2次元位相限定相関法によって入力画像Iと参照画像J間の各対応点を求める(ステップS402)。
[Automatic correction on site]
At the site, the control unit 20-1 periodically captures the input image I and the reference image J (step S401 shown in FIG. 12), and each of the input image I and the reference image J by the two-dimensional phase-only correlation method. Corresponding points are obtained (step S402).
そして、入力画像Iおよび参照画像Jについて、図11に示したと同様にして、その画像の中心(原点)を通る実際のエピポーラ線EP0’上の各点の計算上のエピポーラ線EP0(X軸上のライン)からの垂直方向の差分値の積算値Sを求める(ステップS403)。 Then, with respect to the input image I and the reference image J, in the same manner as shown in FIG. 11, the calculated epipolar line EP0 (on the X axis) of each point on the actual epipolar line EP0 ′ passing through the center (origin) of the image. The integrated value S of the difference values in the vertical direction from the (line) is obtained (step S403).
そして、求めた入力画像Iの積算値Sと予め設定されている閾値Sthとを比較し(ステップS404)、積算値Sが閾値Sthを超えていれば(ステップS404のNO)、入力画像Iの各画素のY軸方向の位置の補正が必要であると判断し、入力画像Iにおける実際のエピポーラ線EP0’の計算上のエピポーラ線EP0に対する傾きに応じて、3次元位置計測に際する入力画像Iの各画素のY軸方向の位置の補正量を求める(ステップS405)。 Then, the calculated integrated value S of the input image I is compared with a preset threshold value Sth (step S404), and if the integrated value S exceeds the threshold value Sth (NO in step S404), the input image I It is determined that it is necessary to correct the position of each pixel in the Y-axis direction, and an input image for three-dimensional position measurement is determined according to the inclination of the actual epipolar line EP0 ′ in the input image I with respect to the calculated epipolar line EP0. A correction amount of the position in the Y-axis direction of each pixel of I is obtained (step S405).
また、求めた参照画像Jの積算値Sと予め設定されている閾値Sthとを比較し(ステップS404)、積算値Sが閾値Sthを超えていれば(ステップS404のNO)、参照画像Jの各画素のY軸方向の位置の補正が必要であると判断し、参照画像Jにおける実際のエピポーラ線EP0’の計算上のエピポーラ線EP0に対する傾きに応じて、3次元位置計測に際する参照画像Jの各画素のY軸方向の位置の補正量を求める。 Further, the obtained integrated value S of the reference image J is compared with a preset threshold value Sth (step S404), and if the integrated value S exceeds the threshold value Sth (NO in step S404), the reference image J It is determined that the correction of the position of each pixel in the Y-axis direction is necessary, and the reference image for the three-dimensional position measurement is determined according to the inclination of the actual epipolar line EP0 ′ in the reference image J with respect to the calculated epipolar line EP0. The correction amount of the position in the Y-axis direction of each pixel of J is obtained.
なお、この場合、入力画像Iおよび参照画像Jにおいて、実際のエピポーラ線EP0’と計算上のエピポーラ線EP0とが交差せず、平行となっていれば、3次元位置計測に際する入力画像Iおよび参照画像Jの各画素のY軸方向の位置の補正量は一律値として求められる。 In this case, in the input image I and the reference image J, if the actual epipolar line EP0 ′ and the calculated epipolar line EP0 do not intersect and are parallel to each other, the input image I for the three-dimensional position measurement is used. The correction amount of the position in the Y-axis direction of each pixel of the reference image J is obtained as a uniform value.
以上の説明から分かるように、本実施の形態において、基準点pの画素データ列は1次元の画素データ列であり、候補点q’の画素データ列も1次元の画素データ列であり、この基準点pの画素データ列と候補点q’の画素データ列から1次元POCを利用して位相限定相関関数を計算するようにしている。1次元POCでは、1次元のフーリエ変換を施すので、対応点の探索に要する計算量が大幅に減り、対象物Mにおける各点の3次元位置を短時間で計測することができる。また、1次元POCを用いることにより、エピポーラ線EPに垂直方向の相関誤差要因を取り除くことが可能となり、高精度な3次元位置の計測が可能となる。 As can be seen from the above description, in the present embodiment, the pixel data string of the reference point p is a one-dimensional pixel data string, and the pixel data string of the candidate point q ′ is also a one-dimensional pixel data string. A phase-only correlation function is calculated from the pixel data string of the reference point p and the pixel data string of the candidate point q ′ using a one-dimensional POC. In the one-dimensional POC, since one-dimensional Fourier transform is performed, the amount of calculation required for searching for corresponding points is greatly reduced, and the three-dimensional position of each point on the object M can be measured in a short time. Further, by using the one-dimensional POC, it is possible to remove the correlation error factor in the direction perpendicular to the epipolar line EP, and to measure the three-dimensional position with high accuracy.
また、本実施の形態によれば、対応点を探索する際に切り出される探索ウィンドウSW内の画素のデータ列と探索ウィンドウCW内の画素のデータ列との相関値として求められる相関ピークの値Phが下限値Phthに満たない場合、重故障である旨が通知されるので、3次元位置計測装置に何らかのトラブルが発生していることを知り、素早くメンテナンスを行うことができるようになる。また、この場合、3次元位置の計測が中止されるので、無駄なエネルギーの消費を抑えることができる。 Further, according to the present embodiment, the correlation peak value Ph obtained as a correlation value between the pixel data string in the search window SW and the pixel data string in the search window CW cut out when searching for corresponding points. Is less than the lower limit Phth, it is notified that there is a serious failure, so that it is possible to know that some kind of trouble has occurred in the three-dimensional position measuring device and to perform maintenance quickly. In this case, since the measurement of the three-dimensional position is stopped, wasteful energy consumption can be suppressed.
また、本実施の形態によれば、対応点を探索する際に切り出される探索ウィンドウSW内の画素のデータ列と探索ウィンドウCW内の画素のデータ列との相関値として求められる相関ピークの値Phが相関ピークの下限値Phth以上であり、その相関ピークの位置Ph(x,y)の視差の方向(x軸方向)に対して直交する方向(y軸方向)へのずれ量eが閾値ethを超えていた場合、そのずれ量eに基づいて探索ウィンドウSWやCW中の画像の各画素のy軸方向の位置が自動的に補正されるものとなり、現場においてエピポーラ線が傾いてきたような場合でも、精度の高い対応点の探索を続行することができるようになる。 Further, according to the present embodiment, the correlation peak value Ph obtained as a correlation value between the pixel data string in the search window SW and the pixel data string in the search window CW cut out when searching for corresponding points. Is equal to or greater than the lower limit value Phth of the correlation peak, and the shift amount e in the direction (y-axis direction) orthogonal to the parallax direction (x-axis direction) of the correlation peak position Ph (x, y) is the threshold value eth. Is exceeded, the position in the y-axis direction of each pixel of the image in the search window SW or CW is automatically corrected based on the shift amount e, and the epipolar line is inclined in the field. Even in this case, the search for corresponding points with high accuracy can be continued.
図13に図1に示した3次元位置計測装置における処理部20の要部の機能ブロック図を示す。処理部20は、カメラ10およびカメラ11からの対象物Mを捉えた入力画像Iおよび参照画像Jを取り込む画像取込部20Aと、カメラ10とカメラ11との位置関係(2つの画像間の基礎行列や、内部行列・外部行列などのカメラ固有のパラメータ)および基準点から計算されるエピポーラ線に沿って入力画像Iおよび参照画像Jより探索ウィンドウSW内の画素のデータ列および探索ウィンドウCW内の画素のデータ列を切り出す画素データ列切出部20Bと、画素データ列切出部20Bによって切り出された探索ウィンドウSW内の画素のデータ列と探索ウィンドウCW内の画素のデータ列との相関から探索ウィンドウSWおよび探索ウィンドウCWの画像中の対応点を探索する対応点探索部20Cとを備えている。
FIG. 13 shows a functional block diagram of the main part of the
また、処理部20は、対応点探索部20Cによって探索された対応点の視差に基づいてその対応点の3次元位置を計測する3次元位置計測部20Dと、画素データ列切出部20Bによって切り出された探索ウィンドウSW内の画素のデータ列と探索ウィンドウCW内の画素のデータ列とから求められる相関ピークの値Phが下限値Phthに満たない場合、異常である旨を通知すると共に以降の3次元位置の計測を中止する異常通知処理部20Eと、画素データ列切出部20Bによって切り出された探索ウィンドウSW内の画素のデータ列と探索ウィンドウCW内の画素のデータ列とから求められる相関ピークの値Phが下限値Phth以上である場合、その相関ピークの位置Ph(x,y)の視差の方向に対して直交する方向へのずれ量eを求め、このずれ量eが予め定められている閾値ethを超えていた場合、そのずれ量eに基づいて画素データ列切出部20Bによって切り出された探索ウィンドウSW内の画素のデータ列や探索ウィンドウCW内の画素のデータ列の画素データの位置を補正する画素データ位置補正部20Fと、2次元位相限定相関法によって入力画像Iと参照画像J間の各対応点を求め実際のエピポーラ線上の各点の計算上のエピポーラ線からの垂直方向の差分値の積算値Sが閾値Sthを超えていた場合にエピポーラ線の調整量をカメラのずれ量として算出するカメラずれ量算出部20Gと、これら各部20A〜20F間の動作を制御すると共に3次元位置計測20Dでの3次元位置の計測結果やカメラずれ量算出部20Gでのカメラずれ量、異常通知処理部20Eから通知される異常をLCD12に表示する制御部20Iとを備えている。
In addition, the
なお、上述した実施の形態では、基準点pの探索ウィンドウSWと候補点q’の探索ウィンドウCWの幅Wを同じとしたが、候補点q’の探索ウィンドウCWの幅Wは基準点pの探索ウィンドウSWの幅W以上あればよく、1本の探索ラインの起点STから終点ENDまでの全ての範囲を探索ウィンドウCWとしてもよい。 In the above-described embodiment, the search window SW of the reference point p and the search window CW of the candidate point q ′ have the same width W. However, the search window CW of the candidate point q ′ has a width W of the reference point p. It suffices if the width is equal to or greater than the width W of the search window SW, and the entire range from the start point ST to the end point END of one search line may be used as the search window CW.
また、上述した実施の形態では、エピポーラ線EPに沿って各画像より1次元の画素データ列を切り出し、この切り出した1次元の画素データ列の位相限定相関関数から対応点を探索するが、その1次元の画素データ列の近傍のエピポーラ線EPに平行な線に沿う1次元の画素データ列を各画像から切り出し、これら複数組の1次元の画素データ列の位相限定相関関数から対応点を探索するようにしてもよい。このようにすると、ノイズの影響を受け難くなり、より対応点探索性能が安定する。 In the embodiment described above, a one-dimensional pixel data string is cut out from each image along the epipolar line EP, and corresponding points are searched from the phase-only correlation function of the cut-out one-dimensional pixel data string. A one-dimensional pixel data sequence along a line parallel to the epipolar line EP in the vicinity of the one-dimensional pixel data sequence is cut out from each image, and corresponding points are searched for from the phase-only correlation function of these multiple sets of one-dimensional pixel data sequences. You may make it do. If it does in this way, it will become difficult to receive to the influence of noise and corresponding point search performance will be stabilized more.
例えば、図14に示すように、入力画像I’における探索ウィンドウSW(SW0)に対して平行に、この探索ウィンドウSW0と同じ位置から同じ長さの近傍探索ウィンドウSW1〜SW4を定め、この探索ウィンドウSW0および近傍探索ウィンドウSW1〜SW4内の画素データ列と参照画像J’における探索ウィンドウCW0および近傍探索ウィンドウCW1〜CB4内の画素データ列の各組の相関値を求め、相関値の平均を計算する。平均された相関値の最大ピーク位置を求めることで基準点pと対応点qとのずれ量を算出する。 For example, as shown in FIG. 14, neighborhood search windows SW1 to SW4 having the same length are defined from the same position as the search window SW0 in parallel with the search window SW (SW0) in the input image I ′. The correlation value of each set of the pixel data sequence in SW0 and the neighborhood search windows SW1 to SW4 and the pixel data sequence in the search window CW0 and the neighborhood search windows CW1 to CB4 in the reference image J ′ is obtained, and the average of the correlation values is calculated. . The shift amount between the reference point p and the corresponding point q is calculated by obtaining the maximum peak position of the averaged correlation value.
この場合、探索ウィンドウSW0および近傍探索ウィンドウSW1〜SW4内の画素データ列に1次元のフーリエ変換を施し、探索ウィンドウCW0および近傍探索ウィンドウCW1〜CB4内の画素データ列に1次元のフーリエ変換を施し、フーリエ変換が施された探索ウィンドウSW0内の画素データ列と探索ウィンドウCW0内の画素データ列とを合成し、同様にして、フーリエ変換が施された近傍探索ウィンドウSW1〜SW4内の画素データ列と近傍探索ウィンドウCW1〜CB4内の画素データ列とを各個に合成し、これにより得られる5つの合成フーリエ画像データを平均して合成位相スペクトルを作成し、この合成位相スペクトルに対して1次元のフーリエ変換を施して最大相関ピークの位置を求めるようにすれば、5つの合成フーリエ画像データの1つひとつに1次元のフーリエ変換を施して相関ピークの位置を求めるようにする方法と比較して、格段に処理スピードがアップする。 In this case, a one-dimensional Fourier transform is performed on the pixel data strings in the search window SW0 and the neighboring search windows SW1 to SW4, and a one-dimensional Fourier transform is performed on the pixel data strings in the search window CW0 and the neighboring search windows CW1 to CB4. The pixel data string in the search window SW0 subjected to the Fourier transform and the pixel data string in the search window CW0 are synthesized, and similarly, the pixel data string in the neighboring search windows SW1 to SW4 subjected to the Fourier transform. And the pixel data strings in the neighborhood search windows CW1 to CB4 are synthesized into individual pieces, and five synthesized Fourier image data obtained thereby are averaged to create a synthesized phase spectrum. If the position of the maximum correlation peak is obtained by performing Fourier transform, Compared with the method to determine a position of the correlation peak is subjected to one-dimensional Fourier transform into one single adult Fourier image data, much processing speed up.
図14では、探索ウィンドウSW0に対して平行に、画像の水平方向に同じ位置から同じ長さの近傍探索ウィンドウSW1〜SW4を定めたが、図15に示すように、画像の水平方向に異なる位置から同じ長さの近傍探索ウィンドウSW1〜SW4を定めるようにしてもよい。また、図16に示すように、画像の水平方向に異なる位置から異なる長さの近傍探索ウィンドウSW1〜SW4を定めるようにしてもよい。また、図17に示すように、画像の異なる位置から異なる長さの近傍探索ウィンドウSW1〜SW4を定めるようにしてもよい。 In FIG. 14, the neighborhood search windows SW1 to SW4 having the same length from the same position in the horizontal direction of the image are defined in parallel to the search window SW0. However, as shown in FIG. Alternatively, neighborhood search windows SW1 to SW4 having the same length may be determined. In addition, as shown in FIG. 16, neighborhood search windows SW1 to SW4 having different lengths from different positions in the horizontal direction of the image may be determined. Also, as shown in FIG. 17, neighborhood search windows SW1 to SW4 having different lengths may be determined from different positions of the image.
また、上述した実施の形態では、入力画像I’および参照画像J’からエッジ検出によってオブジェクト領域OB1およびOB2を抽出するようにしたが、必ずしもオブジェクト領域OB1およびOB2を抽出するようにしなくてもよい。例えば、オブジェクト領域OB1およびOB2を抽出せずに、入力画像I’および参照画像J’の最上位の探索ラインの起点から最下位の探索ラインの終点まで、基準点pを移動しながら、すなわち探索ウィンドウSWを移動しながら、基準点pと対応点qとの対応付けを進めるようにしてもよい。 In the above-described embodiment, the object regions OB1 and OB2 are extracted from the input image I ′ and the reference image J ′ by edge detection. However, the object regions OB1 and OB2 do not necessarily have to be extracted. . For example, without extracting the object regions OB1 and OB2, the reference point p is moved from the start point of the highest search line to the end point of the lowest search line in the input image I ′ and the reference image J ′, that is, the search is performed. The association between the reference point p and the corresponding point q may be advanced while moving the window SW.
この場合、入力画像I’中の全領域において基準点pをずらしながら、その基準点pの画像データ列と参照画像J’中の候補点q’の1次元の画素データ列との位相限定相関関数を1次元POCによって計算することになるので、処理すべきデータ量が多くなる。これに対して、入力画像I’および参照画像J’からオブジェクト領域OB1およびOB2を抽出し、この抽出したオブジェクト領域OB1およびOB2を探索対象領域とすることにより、入力画像I’中の基準点pをずらす領域を小さくし、処理すべきデータ量を削減することができる。また、画像内のオブジェクト領域OB1,OB2外の画素データを処理対象から除外することで、これらの領域が対応点探索過程で精度を下げる外乱要因として働くことを未然に防止し、対応点探索精度の向上を図ることが可能となる。また、オブジェクト領域OB1中の探索ラインの起点から対応点の探索を始めることにより、常に対象物Mの輪郭に近い位置から対応点が求まるものとなり、対象物の3元位置の計測精度が向上する。 In this case, the phase-only correlation between the image data sequence of the reference point p and the one-dimensional pixel data sequence of the candidate point q ′ in the reference image J ′ while shifting the reference point p in the entire area in the input image I ′. Since the function is calculated by one-dimensional POC, the amount of data to be processed increases. On the other hand, the object areas OB1 and OB2 are extracted from the input image I ′ and the reference image J ′, and the extracted object areas OB1 and OB2 are set as search target areas, whereby the reference point p in the input image I ′ is obtained. It is possible to reduce the area for shifting and reduce the amount of data to be processed. Further, by excluding the pixel data outside the object regions OB1 and OB2 in the image from the processing target, it is possible to prevent these regions from acting as disturbance factors that lower the accuracy in the corresponding point search process, and the corresponding point search accuracy. Can be improved. Further, by starting the search for the corresponding point from the starting point of the search line in the object area OB1, the corresponding point is always obtained from the position close to the contour of the target object M, and the measurement accuracy of the three-way position of the target object is improved. .
また、上述した実施の形態では説明しなかったが、対応点の探索を開始する際、入力画像I’および参照画像J’を低解像度として基準点の画素データ列と候補点の画素データ列との位相限定相関関数を計算し、この結果、相関ピークが得られれば、入力画像I’および参照画像J’の解像度を上げるということを段階的に繰り返して行くようにしてもよい。 Although not described in the above-described embodiment, when starting the search for corresponding points, the input image I ′ and the reference image J ′ are set to low resolution, and the reference point pixel data sequence and the candidate point pixel data sequence If the correlation peak is obtained as a result, the resolution of the input image I ′ and the reference image J ′ may be increased step by step.
また、上述した実施の形態では、カメラを2台としたが、光学機構を設けることによって、1台のカメラから入力画像Iと参照画像Jを得るようにしてもよい。また、カメラを3台以上設け、さらに複数の画像を得るようにしてもよい。カメラを1台とすると、ハードウェアで設計的に同期をとらずによいので、作りやすい。カメラがメガピクセルで高価な場合、安価になる場合がある。また、カメラを1台とする場合、その光学機構の調整によって、対象物を一方から見た画像の視点や他方から見た画像の視点を調整するようにする。 In the above-described embodiment, two cameras are used. However, the input image I and the reference image J may be obtained from one camera by providing an optical mechanism. Further, three or more cameras may be provided, and a plurality of images may be obtained. If there is one camera, it is not necessary to synchronize the design with hardware, so it is easy to make. If the camera is megapixel and expensive, it may be cheaper. Further, when one camera is used, the viewpoint of the image when the object is viewed from one side and the viewpoint of the image when viewed from the other side are adjusted by adjusting the optical mechanism.
また、上述した実施の形態では、基準点pの画素データ列と候補点q’の画素データ列との相関関数を1次元の位相限定相関法で計算するようにしたが、1次元の帯域制限法で計算したり、1次元の相関係数法で計算したり、1次元の振幅抑制相関法で計算したりするようにしてもよい。 In the above-described embodiment, the correlation function between the pixel data string of the reference point p and the pixel data string of the candidate point q ′ is calculated by the one-dimensional phase-only correlation method. It may be calculated by the method, calculated by the one-dimensional correlation coefficient method, or calculated by the one-dimensional amplitude suppression correlation method.
10,11…カメラ(CCDカメラ)、12…液晶表示装置(LCD)、13(13−1,13−2)…姿勢調整機構、20…処理部、20−1…制御部、20−2…ROM、20−3…RAM、20−4…ハードディスクドライブ(HDD)、20−5…フレームメモリ(FM)、20−6…外部接続部(I/F)、20−7…フーリエ変換部(FFT)、LN(LN1,LN2)…レンズ、EP…エピポーラ線、SW(SW0)…探索ウィンドウ、SW1〜SW4…近傍探索ウィンドウ、CW(CW0)…探索ウィンドウ、CW1〜CW4…近傍探索ウィンドウ、OB1,OB2…オブジェクト領域、ST…起点、END…終点、I…入力画像、J…参照画像、M…対象物、20A…画像取込部、20B…画素データ切出部、20C…対応点探索部、20D…3次元位置計測部、20E…異常通知処理部、20F…画素データ位置補正部、20G…カメラずれ量算出部、20I…制御部。
DESCRIPTION OF
Claims (3)
前記画像取込手段のパラメータおよび基準点から計算されるエピポーラ線に沿って前記複数の画像より1次元の画素データ列を切り出す画素データ列切出手段と、
前記画素データ列切出手段によって切り出された1次元の画素データ列の相関から前記複数の画像中の対応点を探索する対応点探索手段と、
前記対応点探索手段によって探索された対応点の視差に基づいてその対応点の3次元位置を計測する3次元位置計測手段と、
前記画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が予め定められた下限値に満たない場合、異常である旨を通知する異常通知手段と
を備えることを特徴とする3次元位置計測装置。 Image capturing means for capturing a plurality of images of the object viewed from different viewpoints;
Pixel data string cutout means for cutting out a one-dimensional pixel data string from the plurality of images along an epipolar line calculated from parameters and reference points of the image capturing means;
Corresponding point search means for searching for corresponding points in the plurality of images from the correlation of the one-dimensional pixel data string cut out by the pixel data string cutting means;
Three-dimensional position measuring means for measuring the three-dimensional position of the corresponding point based on the parallax of the corresponding point searched by the corresponding point searching means;
An abnormality notifying means for notifying that an abnormality is detected when a value indicating the correlation of the one-dimensional pixel data string cut out by the pixel data string cutting means is less than a predetermined lower limit value. A three-dimensional position measuring device.
前記画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が前記下限値に満たない場合、前記3次元位置の計測を中止する3次元位置計測中止手段
を備えることを特徴とする3次元位置計測装置。 In the three-dimensional position measuring device according to claim 1,
3D position measurement stopping means for stopping the measurement of the 3D position when a value indicating the correlation of the 1D pixel data string cut out by the pixel data string cutting means is less than the lower limit value. A characteristic three-dimensional position measuring device.
前記画素データ列切出手段によって切り出された1次元の画素データ列の相関を示す値が前記下限値以上である場合、その相関を示す値として求められる相関ピークの位置の視差の方向に対して直交する方向へのずれ量を求め、このずれ量が予め定められている閾値を超えていた場合、そのずれ量に基づいて前記画素データ列切出手段によって切り出された1次元の画素データ列の画素データの位置を補正する画素データ位置補正手段
を備えることを特徴とする3次元位置計測装置。 In the three-dimensional position measuring device according to claim 1,
When the value indicating the correlation of the one-dimensional pixel data string cut out by the pixel data string cutting means is equal to or greater than the lower limit value, the parallax direction at the position of the correlation peak obtained as the value indicating the correlation A shift amount in the orthogonal direction is obtained, and when the shift amount exceeds a predetermined threshold value, the one-dimensional pixel data string cut out by the pixel data string cutting means based on the shift amount is obtained. A three-dimensional position measuring device comprising pixel data position correcting means for correcting the position of pixel data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008242351A JP2010071922A (en) | 2008-09-22 | 2008-09-22 | Apparatus for measuring three-dimensional position |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008242351A JP2010071922A (en) | 2008-09-22 | 2008-09-22 | Apparatus for measuring three-dimensional position |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010071922A true JP2010071922A (en) | 2010-04-02 |
Family
ID=42203839
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008242351A Pending JP2010071922A (en) | 2008-09-22 | 2008-09-22 | Apparatus for measuring three-dimensional position |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010071922A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115712118A (en) * | 2022-11-07 | 2023-02-24 | 江苏省水利科学研究院 | Pixel offset tracking monitoring and correcting method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003262510A (en) * | 2002-03-08 | 2003-09-19 | Center For Advanced Science & Technology Incubation Ltd | Method of measuring three-dimensional shape and three- dimensional scanner |
JP2007064627A (en) * | 2005-08-01 | 2007-03-15 | Topcon Corp | System for three-dimensional measurement and its method |
JP2008123141A (en) * | 2006-11-09 | 2008-05-29 | Yamatake Corp | Corresponding point search method and three-dimensional position measurement method |
JP2008123142A (en) * | 2006-11-09 | 2008-05-29 | Yamatake Corp | Corresponding point retrieval method and three-dimensional position measurement method |
-
2008
- 2008-09-22 JP JP2008242351A patent/JP2010071922A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003262510A (en) * | 2002-03-08 | 2003-09-19 | Center For Advanced Science & Technology Incubation Ltd | Method of measuring three-dimensional shape and three- dimensional scanner |
JP2007064627A (en) * | 2005-08-01 | 2007-03-15 | Topcon Corp | System for three-dimensional measurement and its method |
JP2008123141A (en) * | 2006-11-09 | 2008-05-29 | Yamatake Corp | Corresponding point search method and three-dimensional position measurement method |
JP2008123142A (en) * | 2006-11-09 | 2008-05-29 | Yamatake Corp | Corresponding point retrieval method and three-dimensional position measurement method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115712118A (en) * | 2022-11-07 | 2023-02-24 | 江苏省水利科学研究院 | Pixel offset tracking monitoring and correcting method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6446329B2 (en) | Camera calibration apparatus, camera system, and camera calibration method | |
JP5715735B2 (en) | Three-dimensional measurement method, apparatus and system, and image processing apparatus | |
JP5792662B2 (en) | Parallax calculation device, distance calculation device, and parallax calculation method | |
US9826151B2 (en) | Image capture system and image capture method | |
JP5745178B2 (en) | Three-dimensional measurement method, apparatus and system, and image processing apparatus | |
US10083513B2 (en) | Information presentation device, stereo camera system, and information presentation method | |
JP5075757B2 (en) | Image processing apparatus, image processing program, image processing method, and electronic apparatus | |
WO2011125937A1 (en) | Calibration data selection device, method of selection, selection program, and three dimensional position measuring device | |
KR20150120066A (en) | System for distortion correction and calibration using pattern projection, and method using the same | |
US7409152B2 (en) | Three-dimensional image processing apparatus, optical axis adjusting method, and optical axis adjustment supporting method | |
EP3332387B1 (en) | Method for calibration of a stereo camera | |
US20060215881A1 (en) | Distance measurement apparatus, electronic device, distance measurement method, distance measurement control program and computer-readable recording medium | |
JP2006250722A (en) | Device, method and program for calibration | |
CN109005400B (en) | Method, system and storage medium for detecting grating fitting offset | |
US10432916B2 (en) | Measurement apparatus and operation method of measurement apparatus | |
JP6954367B2 (en) | Measurement system, correction processing device, correction processing method, and program | |
US20230260159A1 (en) | Information processing apparatus, information processing method, and non-transitory computer readable medium | |
JP4993686B2 (en) | Corresponding point search method and three-dimensional position measurement method | |
JP2010071922A (en) | Apparatus for measuring three-dimensional position | |
US10726528B2 (en) | Image processing apparatus and image processing method for image picked up by two cameras | |
WO2015159791A1 (en) | Distance measuring device and distance measuring method | |
WO2019097576A1 (en) | Measurement system, correction processing device, correction processing method and computer-readable recording medium | |
KR101142279B1 (en) | An apparatus for aligning images in stereo vision system and the method thereof | |
JP6091092B2 (en) | Image processing apparatus and image processing method | |
KR101283825B1 (en) | 3-d auto-convergence camera |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110307 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120802 |
|
A131 | Notification of reasons for refusal |
Effective date: 20120814 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A521 | Written amendment |
Effective date: 20121011 Free format text: JAPANESE INTERMEDIATE CODE: A523 |
|
A02 | Decision of refusal |
Effective date: 20130108 Free format text: JAPANESE INTERMEDIATE CODE: A02 |