JP2013113600A - Stereo three-dimensional measuring apparatus - Google Patents
Stereo three-dimensional measuring apparatus Download PDFInfo
- Publication number
- JP2013113600A JP2013113600A JP2011257349A JP2011257349A JP2013113600A JP 2013113600 A JP2013113600 A JP 2013113600A JP 2011257349 A JP2011257349 A JP 2011257349A JP 2011257349 A JP2011257349 A JP 2011257349A JP 2013113600 A JP2013113600 A JP 2013113600A
- Authority
- JP
- Japan
- Prior art keywords
- stereo
- calibration
- image
- images
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Measurement Of Optical Distance (AREA)
Abstract
【課題】回路規模および演算時間の増大を招くことなくキャリブレーションずれを再補正する。
【解決手段】キャリブレーションによって補正された左右のカメラステレオ平行化後画像間のずれ量を、キャリブレーションずれ再補正部15を含む対応点探索部9による対応点の探索処理中において、キャリブレーションずれ再補正部15によるキャリブレーションずれ再補正処理で得られるデータを用いて再補正する。こうして、距離計測装置1における内部ハードウェアの回路規模および演算時間を増大させることなく計測精度を高めることができる。また、上記右カメラステレオ平行化後画像を上下にずらして、左右のカメラステレオ平行化後画像の上下方向のずれを再補正する。こうして、問題になり易い上下方向のキャリブレーションずれを低減することができる。その際に、対応点の探索を行う際の右カメラステレオ平行化後画像の最適位置を確実に見出すことができる。
【選択図】図1Calibration deviation is corrected again without increasing the circuit scale and calculation time.
The amount of deviation between the left and right camera stereo-parallelized images corrected by the calibration is corrected during a corresponding point search process by a corresponding point searching unit including a calibration deviation re-correcting unit. Re-correction is performed using data obtained by the calibration deviation re-correction processing by the re-correction unit 15. Thus, the measurement accuracy can be increased without increasing the circuit scale and calculation time of the internal hardware in the distance measuring apparatus 1. In addition, the right camera stereo parallelized image is shifted up and down to recorrect the vertical shift of the left and right camera stereo parallelized images. In this way, it is possible to reduce the vertical calibration deviation that is likely to be a problem. At that time, it is possible to reliably find the optimal position of the right camera stereo parallelized image when searching for the corresponding point.
[Selection] Figure 1
Description
この発明は、複数のカメラを用いて距離や形状等の計測を行うステレオ3次元計測装置に関する。 The present invention relates to a stereo three-dimensional measurement apparatus that measures distance, shape, and the like using a plurality of cameras.
複数のカメラを用いて対象物までの距離や対象物の形状などを計測するステレオ3次元計測装置が実用化されている。ステレオ3次元計測の手法としては、一般に「相関法」と呼ばれる方法が知られている。 A stereo three-dimensional measuring apparatus that measures a distance to an object and a shape of the object using a plurality of cameras has been put into practical use. As a method of stereo three-dimensional measurement, a method generally called “correlation method” is known.
上記「相関法」においては、カメラを左右に配置して対象物を同時に撮影し、得られた左右画像のペアから対応する画素の組である対応点を探索する。そして、左右画像の対応点同士が左右方向にどれだけ離れているかを表す視差を求め、この視差から三角測量の原理を適用して対象物までの距離を算出することができる。また、対象物に直線や多角形などの既知の光パターンを投影し、投影されたパターン形状の変化から対象物の形状を求める「光切断法」と呼ばれる方法も存在し、前述の「相関法」と併用して計測が行われることもある。 In the “correlation method”, cameras are arranged on the left and right, and an object is photographed at the same time, and a corresponding point that is a set of corresponding pixels is searched from the obtained pair of left and right images. Then, a parallax representing how far the corresponding points of the left and right images are separated in the left-right direction can be obtained, and the distance to the object can be calculated from this parallax by applying the principle of triangulation. In addition, there is a method called “light cutting method” in which a known light pattern such as a straight line or a polygon is projected onto an object, and the shape of the object is obtained from a change in the projected pattern shape. In some cases, measurement is performed in combination with "."
ところで、複数のカメラを用いてステレオ3次元計測を行う場合に、レンズの歪みや撮像素子の中心ずれや左右カメラの位置関係のずれ等の誤差要因によって、計測誤差が生じる。これを補正するために、計測の前に「キャリブレーション」と呼ばれる作業が必要となる。 By the way, when performing stereo three-dimensional measurement using a plurality of cameras, measurement errors occur due to error factors such as lens distortion, image sensor center misalignment, and left and right camera positional misalignment. In order to correct this, an operation called “calibration” is required before measurement.
すなわち、形状が既知の幾何学的パターンを印刷した「キャリブレーションボード」と呼ばれる被写体を異なる距離および異なる角度で複数枚撮影し、それらの画像情報から誤差要因に関する情報を含むキャリブレーションパラメータを算出しておく。その後、ステレオ計測を行う際に、撮影した左右画像にキャリブレーションパラメータを適用し、誤差要因を取り除いた補正後の左右画像対を生成する。この補正後の左右画像対を用いて対応点の探索および視差の算出を行うことによって、誤差の少ない計測を行うことができるのである。 That is, a plurality of subjects called `` calibration boards '' printed with geometric patterns with known shapes are photographed at different distances and different angles, and calibration parameters including information on error factors are calculated from the image information. Keep it. Thereafter, when performing stereo measurement, a calibration parameter is applied to the captured left and right images to generate a corrected left and right image pair from which an error factor has been removed. By searching for corresponding points and calculating parallax using the corrected left and right image pairs, measurement with less error can be performed.
しかしながら、実際の3次元計測においては、計測中の経時変化によって上述の誤差要因に変化が発生し、キャリブレーションパラメータとの間にずれが生じて、計測誤差が次第に大きくなる現象が起こる場合がある。これを防止するには、計測の前に毎回キャリブレーションを行ったり、一定時間ごとに計測を一時停止してキャリブレーションを行ったりすることも考えられるが、手間と時間が掛かるため、計測の作業性を大きく損ねてしまう。 However, in actual three-dimensional measurement, a change may occur in the above-described error factor due to a change over time during measurement, and there may be a phenomenon in which the measurement error gradually increases due to deviation from the calibration parameter. . To prevent this, calibration may be performed before each measurement, or calibration may be performed by pausing the measurement at regular intervals. It will greatly impair the sex.
そこで、上述のようなキャリブレーションパラメータのずれに起因するキャリブレーションずれを補正するために、特開2004‐354257号公報(特許文献1)に開示されたキャリブレーションずれ補正装置を備えたステレオカメラが提案されている。 Therefore, in order to correct the calibration deviation caused by the calibration parameter deviation as described above, a stereo camera equipped with the calibration deviation correction apparatus disclosed in Japanese Patent Application Laid-Open No. 2004-354257 (Patent Document 1) is provided. Proposed.
上記従来のステレオカメラにおいては、撮影装置が撮影したステレオ画像から、特徴抽出装置によって幾何学的形状が既知の特徴を抽出し、この抽出された特徴に基づいて、キャリブレーションデータ補正装置によって、キャリブレーションデータ記録装置に記憶されたキャリブレーションパラメータに関するキャリブレーションずれを補正するようにしている。 In the conventional stereo camera, a feature having a known geometric shape is extracted from the stereo image captured by the image capturing device by the feature extracting device, and the calibration data correcting device performs calibration based on the extracted feature. The calibration deviation relating to the calibration parameters stored in the calibration data recording apparatus is corrected.
しかしながら、上記従来のステレオカメラにおいては、以下のような問題がある。すなわち、通常の3次元計測に必要な対応点探索部以外に、上記特徴点を検出するための上記特徴抽出装置が別途必要になる。したがって、上記特徴抽出装置をハードウェアで実装する場合には回路規模の増大を招いてしまう一方、ソフトウェアとして実装する場合には演算時間の増大を招いてしまうという問題がある。 However, the conventional stereo camera has the following problems. That is, in addition to the corresponding point search unit required for normal three-dimensional measurement, the feature extraction device for detecting the feature points is required separately. Therefore, when the feature extraction apparatus is implemented by hardware, the circuit scale is increased. On the other hand, when the feature extraction apparatus is implemented as software, the calculation time is increased.
また、上記特徴抽出装置による上記特徴の抽出は、計測対象物の大まかな形状が予め分かっている場合には比較的容易であるが、計測画像のコントラストが低い場合や計測対象物の形状が頻繁に変化するような場合には適用が非常に困難になるという問題がある。 The feature extraction by the feature extraction device is relatively easy when the rough shape of the measurement object is known in advance, but the measurement image has a low contrast or the shape of the measurement object is frequent. In such a case, there is a problem that application becomes very difficult.
さらに、近年、ステレオ3次元計測に用いられる撮像素子の高画素化・狭画素ピッチ化が進んで、より高精度の計測を行う要求が高まっている。そして、撮像素子の画素ピッチが狭まると、それに比例して計測距離の分解能が高まるため、高精度の計測を行うことが可能となる。ところが、その反面、キャリブレーションに求められる精度も高くなるという問題がある。 Furthermore, in recent years, an image sensor used for stereo three-dimensional measurement has been increased in the number of pixels and the pitch of the pixel has been reduced, and the demand for more accurate measurement has increased. When the pixel pitch of the image sensor is narrowed, the resolution of the measurement distance is increased in proportion thereto, so that highly accurate measurement can be performed. However, on the other hand, there is a problem that accuracy required for calibration is also increased.
そこで、この発明の課題は、回路規模および演算時間の増大を招くことなくキャリブレーションずれを容易に再補正し、精度の高い3次元計測を行うことができるステレオ3次元計測装置を提供することにある。 SUMMARY OF THE INVENTION An object of the present invention is to provide a stereo three-dimensional measurement apparatus that can easily re-calibrate a calibration shift without causing an increase in circuit scale and calculation time and perform highly accurate three-dimensional measurement. is there.
上記課題を解決するため、この発明のステレオ3次元計測装置は、
計測対象物を撮影して画像を取得する複数のカメラと、
上記複数のカメラによって取得された複数のカメラキャリブレーションボードの撮影画像を用いてカメラキャリブレーションを行ってキャリブレーションパラメータを算出するキャリブレーション演算部と、
上記算出されたキャリブレーションパラメータを記憶する記憶部と、
上記複数のカメラによって取得された複数の上記計測対象物の画像に含まれる歪み,傾きおよびずれのうちの少なくとも一つを含む誤差を、上記キャリブレーションパラメータを用いて補正するステレオ平行化処理を行うステレオ平行化処理と、
上記ステレオ平行化処理後の複数の画像間のずれを、上記ステレオ平行化処理後の各画像における互いに対応する画素を探索して得られたデータを用いて再補正するキャリブレーションずれ再補正部と、
上記キャリブレーションずれ再補正部によって再補正された複数の上記計測対象物の画像における互いに対応する画素を対応点として探索すると共に、探索された複数の上記対応点間の距離であって上記複数のカメラのうちの少なくとも2つが配列されている方向への距離を表す視差情報を生成する対応点探索部と、
上記対応点探索部によって生成された上記視差情報から上記計測対象物までの距離情報を求める距離情報生成部と
を備えたことを特徴としている。
In order to solve the above problems, the stereo three-dimensional measuring apparatus of the present invention is
A plurality of cameras that take images of measurement objects and acquire images;
A calibration calculation unit that calculates a calibration parameter by performing camera calibration using captured images of a plurality of camera calibration boards acquired by the plurality of cameras;
A storage unit for storing the calculated calibration parameter;
A stereo parallelization process is performed to correct an error including at least one of distortion, inclination, and shift included in the images of the plurality of measurement objects acquired by the plurality of cameras using the calibration parameter. Stereo parallelization processing,
A calibration deviation recorrector that recorrects the shift between the plurality of images after the stereo parallelization processing using data obtained by searching for pixels corresponding to each other in the images after the stereo parallelization processing; ,
The pixels corresponding to each other in the images of the plurality of measurement objects recorrected by the calibration deviation recorrection unit are searched as corresponding points, and the distances between the searched corresponding points are the plurality of the plurality of corresponding points. A corresponding point search unit that generates disparity information indicating a distance in a direction in which at least two of the cameras are arranged;
And a distance information generation unit for obtaining distance information from the parallax information generated by the corresponding point search unit to the measurement target.
上記構成によれば、キャリブレーションずれ再補正部によって、ステレオ平行化処理によるステレオ平行化処理後の複数の画像間のずれを、上記ステレオ平行化処理後の各画像における互いに対応する画素を探索して得られたデータを用いて再補正するようにしている。したがって、キャリブレーション演算部で算出されたキャリブレーションパラメータを用いてステレオ平行化処理によって計測対象物の画像に含まれる誤差を補正した際に、複数の画像間の補正しきれないずれ量を、互いに対応する画素を探索して得られたデータを用いて再補正することができる。 According to the above configuration, the calibration deviation re-correction unit searches for pixels corresponding to each other in each image after the stereo parallelization process for the deviation between the plurality of images after the stereo parallelization process by the stereo parallelization process. The data obtained in this way is used for recorrection. Therefore, when the error included in the image of the measurement object is corrected by the stereo parallelization process using the calibration parameter calculated by the calibration calculation unit, the deviation amount that cannot be corrected between the plurality of images is mutually corrected. Re-correction can be performed using data obtained by searching the corresponding pixel.
したがって、本ステレオ3次元計測装置における内部ハードウェアの回路規模の増大および演算時間の増大を招くことなくキャリブレーションずれを容易に再補正し、精度の高い3次元計測を行うことができる。 Therefore, calibration deviation can be easily re-corrected and highly accurate three-dimensional measurement can be performed without increasing the circuit scale of internal hardware and the calculation time of the stereo three-dimensional measuring apparatus.
また、1実施の形態のステレオ3次元計測装置では、
上記2つのカメラが配列されている方向をx方向とし、上記2つのカメラによって撮影されている画像の面内で上記x方に直交する方向をy方向とした場合に、
上記キャリブレーションずれ再補正部は、上記ステレオ平行化処理後の各画像間における少なくとも上記y方向のずれを再補正する。
Moreover, in the stereo three-dimensional measurement apparatus of one embodiment,
When the direction in which the two cameras are arranged is the x direction and the direction orthogonal to the x direction in the plane of the image captured by the two cameras is the y direction,
The calibration shift recorrection unit recorrects at least the shift in the y direction between the images after the stereo parallelization process.
この実施の形態によれば、上記キャリブレーションずれ再補正部は、上記ステレオ平行化処理後の各画像間における少なくとも上記y方向のずれを再補正するようにしている。したがって、特に高画素数・狭画素ピッチの複数のカメラで取得された複数の計測対象物の画像に基づいて3次元計測を行う際に問題になり易い上記y方向(上下方向)のキャリブレーションずれを低減することができる。 According to this embodiment, the calibration deviation recorrection unit recorrects at least the deviation in the y direction between the images after the stereo parallelization processing. Therefore, the calibration deviation in the y direction (vertical direction), which is likely to be a problem when performing three-dimensional measurement based on images of a plurality of measurement objects acquired by a plurality of cameras having a high pixel count and a narrow pixel pitch, in particular. Can be reduced.
また、1実施の形態のステレオ3次元計測装置では、
上記計測対象物に対して2次元ランダムテクスチャを投影するためのプロジェクタを備えている。
Moreover, in the stereo three-dimensional measurement apparatus of one embodiment,
A projector for projecting a two-dimensional random texture onto the measurement object is provided.
この実施の形態によれば、上記計測対象物に対して2次元ランダムテクスチャを投影するようにしている。したがって、上記計測対象物の表面におけるテクスチャの変化が乏しい場合やコントラストが低い場合であっても、上記計測対象物の表面に輝度変化を付与することによって上記対応点探索部による対応点の探索が容易になり、安定して3次元計測を行うことができる。 According to this embodiment, a two-dimensional random texture is projected onto the measurement object. Therefore, even if the texture change on the surface of the measurement object is poor or the contrast is low, the corresponding point search unit can search for the corresponding point by applying a luminance change to the surface of the measurement object. It becomes easy and can perform three-dimensional measurement stably.
また、1実施の形態のステレオ3次元計測装置では、
上記キャリブレーションずれ再補正部は、上記ステレオ平行化処理後の複数の画像から基準となる基準画像とこの基準画像と比較される残りの比較画像の夫々とでなる画像対を順次選択し、この選択された画像対の上記比較画像を上記基準画像に対して上記y方向にずらしながら両画像における互いに対応する画素を探索して上記データとしての探索パラメータを得、この得られた探索パラメータに基づいて上記比較画像の最適なずらし位置を求め、上記比較画像を上記基準画像に対して上記最適なずらし位置まで上記y方向にずらすことによって上記複数の画像間のずれを再補正する。
Moreover, in the stereo three-dimensional measurement apparatus of one embodiment,
The calibration deviation re-correction unit sequentially selects image pairs each including a reference image serving as a reference and a remaining comparison image compared with the reference image from the plurality of images after the stereo parallelization processing. A search parameter as the data is obtained by searching for a corresponding pixel in both images while shifting the comparison image of the selected image pair in the y direction with respect to the reference image, and based on the obtained search parameter Then, an optimum shift position of the comparison image is obtained, and the shift between the plurality of images is recorrected by shifting the comparison image in the y direction to the optimum shift position with respect to the reference image.
この実施の形態によれば、上記キャリブレーションずれ再補正部によって、上記ステレオ平行化処理後の複数の画像から選択された画像対において、比較画像を基準画像に対して上記y方向にずらしながら互いに対応する画素を探索して得られた探索パラメータに基づいて、上記比較画像の最適なずらし位置を求めるようにしている。したがって、上記比較画像の最適なずらし位置を確実に見出すことができる。 According to this embodiment, in the image pair selected from the plurality of images after the stereo parallelization processing by the calibration deviation re-correction unit, the comparison images are shifted from each other in the y direction with respect to the reference image. Based on search parameters obtained by searching for corresponding pixels, the optimum shift position of the comparison image is obtained. Therefore, the optimum shift position of the comparative image can be found with certainty.
また、1実施の形態のステレオ3次元計測装置では、
上記記憶部は、上記キャリブレーションずれ再補正部によって求められた上記最適なずらし位置をも記憶するようになっており、
上記キャリブレーションずれ再補正部は、上記複数の画像間のずれを再補正する場合には、上記記憶部に記憶されている上記最適なずらし位置を用いて、上記比較画像を上記基準画像に対して上記最適なずらし位置まで上記y方向にずらすようになっている。
Moreover, in the stereo three-dimensional measurement apparatus of one embodiment,
The storage unit also stores the optimal shift position obtained by the calibration shift recorrection unit,
The calibration deviation re-correction unit, when re-correcting the deviation between the plurality of images, uses the optimum shift position stored in the storage unit to compare the comparison image with the reference image. Thus, the y-direction is shifted to the optimum shift position.
この実施の形態によれば、上記キャリブレーションずれ再補正部によって求められた上記最適なずらし位置を、上記記憶部に記憶するようにしている。したがって、上記対応点探索部が一端中断した上記対応点の探索および視差画像の生成を再開する場合には、上記キャリブレーションずれ再補正部は、上記記憶部に記憶されている上記最適なずらし位置を用いることよって、迅速に上記複数の画像間のずれを上記中断の前と同じ位置に再補正することができ、上記対応点探索部による処理の再開を迅速に行うことができる。 According to this embodiment, the optimum shift position obtained by the calibration deviation re-correction unit is stored in the storage unit. Therefore, when the corresponding point search unit resumes the search for the corresponding point and the generation of the parallax image once interrupted, the calibration shift recorrection unit stores the optimal shift position stored in the storage unit. By using, the shift between the plurality of images can be quickly corrected again to the same position as before the interruption, and the corresponding point search unit can be quickly restarted.
また、1実施の形態のステレオ3次元計測装置では、
上記対応点探索部は、上記対応点探索および上記視差情報の生成を行っている際に上記探索パラメータを監視し、上記探索パラメータの値が最適値よりも所定の値を超えて悪化した場合には、上記キャリブレーションずれ再補正部に対して、上記最適なずらし位置の再取得を指示する。
Moreover, in the stereo three-dimensional measurement apparatus of one embodiment,
The corresponding point search unit monitors the search parameter when performing the corresponding point search and the generation of the disparity information, and when the value of the search parameter deteriorates beyond a predetermined value beyond a predetermined value. Instructs the calibration deviation recorrection unit to reacquire the optimum shift position.
この実施の形態によれば、上記対応点探索部は、上記探索パラメータの値が最適値よりも所定の値を超えて悪化した場合には、上記キャリブレーションずれ再補正部に対して、上記最適なずらし位置の再取得を指示するようにしている。したがって、上記対応点探索部が連続して上記対応点探索および上記視差情報の生成を行う場合においても、計測誤差の発生を最小限に抑えることができる。 According to this embodiment, when the value of the search parameter has deteriorated beyond a predetermined value beyond the optimum value, the corresponding point search unit determines the optimum point for the calibration deviation re-correction unit. The re-acquisition of the shift position is instructed. Therefore, even when the corresponding point search unit continuously searches for the corresponding points and generates the parallax information, generation of measurement errors can be minimized.
また、1実施の形態のステレオ3次元計測装置では、
少なくとも上記距離情報生成部によって生成された上記距離情報を表示する表示部を備え、
上記キャリブレーションずれ再補正部は、得られた上記複数の探索パラメータの値が予め設定された設定値に満たない場合には、上記キャリブレーション演算部による上記カメラキャリブレーションの実行を促す情報を上記表示部に表示させるようになっている。
Moreover, in the stereo three-dimensional measurement apparatus of one embodiment,
A display unit that displays at least the distance information generated by the distance information generation unit;
The calibration deviation re-correction unit, when the obtained values of the plurality of search parameters are less than a preset setting value, information that prompts the calibration calculation unit to execute the camera calibration It is designed to be displayed on the display unit.
この実施の形態によれば、上記キャリブレーションずれ再補正部によって得られた上記複数の探索パラメータの値が予め設定された設定値に満たない場合には、使用者に対して上記キャリブレーションの実行を促すようにしている。したがって、上記キャリブレーションずれ再補正部によって再補正しきれないような画像のずれにも対処して、3次元計測誤差の増大を防止することができる。 According to this embodiment, when the values of the plurality of search parameters obtained by the calibration deviation recorrecting unit are less than preset values, the calibration is performed on the user. Is encouraged. Therefore, it is possible to deal with an image shift that cannot be recorrected by the calibration shift recorrector, and to prevent an increase in three-dimensional measurement error.
以上より明らかなように、この発明のステレオ3次元計測装置は、キャリブレーションずれ再補正部によって、ステレオ平行化処理によるステレオ平行化処理後の複数の画像間のずれを、上記ステレオ平行化処理後の各画像における互いに対応する画素を探索して得られたデータを用いて再補正するので、キャリブレーションパラメータを用いたステレオ平行化処理によって計測対象物の複数の画像を補正しても補正しきれないずれ量を、上記互いに対応する画素を探索して得られたデータを用いて、再補正することができる。 As is clear from the above, the stereo three-dimensional measurement apparatus according to the present invention uses the calibration deviation re-correction unit to correct the deviation between the plurality of images after the stereo parallelization process by the stereo parallelization process after the stereo parallelization process. Because correction is performed using data obtained by searching for pixels that correspond to each other in each of the images, even if multiple images of the measurement target are corrected by stereo parallelization processing using calibration parameters, correction can be completed. This amount can be re-corrected using the data obtained by searching for the corresponding pixels.
したがって、本ステレオ3次元計測装置における内部ハードウェアの回路規模の増大および演算時間の増大を招くことなくキャリブレーションずれ容易に再補正して、精度の高い3次元計測を行うことができる。 Therefore, calibration deviation can be easily re-corrected without causing an increase in the circuit scale of internal hardware and an increase in calculation time in the stereo three-dimensional measurement apparatus, and highly accurate three-dimensional measurement can be performed.
以下、この発明を図示の実施の形態により詳細に説明する。 Hereinafter, the present invention will be described in detail with reference to the illustrated embodiments.
・第1実施の形態
図1は、本実施の形態のステレオ3次元計測装置としての距離計測装置のブロック図である。図1において、距離計測装置1は、ステレオカメラ2,計測演算部3,表示部4および筺体(図示せず)から構成されている。そして、計測対象物5までの距離を表す上記距離情報としての距離画像を生成して表示部4に表示する。
First Embodiment FIG. 1 is a block diagram of a distance measuring device as a stereo three-dimensional measuring device of the present embodiment. In FIG. 1, a
上記ステレオカメラ2は、一対の左カメラ6と右カメラ7とで構成されている。ここで、左カメラ6と右カメラ7とは、左カメラ6と右カメラ7との間の距離(即ち基線長)および左カメラ6と右カメラ7とのなす角(即ち輻輳角)が一定の値になるように、上記筐体の内部で機械的に固定されて配置されている。
The
本距離計測装置1では、上記左カメラ6における撮像素子の光軸中心を原点として、左カメラ6と右カメラ7とにおける両撮像素子の光軸中心を結ぶ方向をx方向(左右方向)、左カメラ6の撮像素子面内で上記x方向に直交する方向をy方向(上下方向)、上記x方向および上記y方向に直交する方向をz方向(奥行き方向)と定義する。左カメラ6および右カメラ7は、夫々CMOS(complementary metal oxide semiconductor:相補型金属酸化膜半導体)撮像素子,集光用のレンズおよび制御用のDSP(Digital Signal Processor)が一体となったカメラモジュールであり、上記DSPに外部から制御信号を与えることによって、撮影画像サイズ,焦点距離,露出,ホワイトバランス等のカメラパラメータを電気的に制御することができる。
In the
上記計測演算部3は、ステレオ平行化部8,対応点探索部9,キャリブレーション演算部10,キャリブレーションパラメータ記憶部11,CPU(中央演算処理装置)12,上記距離情報生成部としての距離画像生成部13および距離計算部14を含んで構成されている。ここで、対応点探索部9は、後述するキャリブレーションずれの再補正機能を有している。すなわち、対応点探索部9は、キャリブレーションずれ再補正部15を含んだ構成を有している。
The measurement calculation unit 3 includes a stereo parallelization unit 8, a corresponding point search unit 9, a
本距離計測装置1を用いた3次元計測処理の全体的な流れを、図2のフローチャートに示す。また、図3に、ステレオ平行化部8によるステレオ平行化処理および対応点探索部9による対応点探索処理の説明図を示す。図2に従って3次元計測の全体的な流れを説明するに先立って、図3に従って上記ステレオ平行化処理および上記対応点探索処理に付いて説明する。
The overall flow of the three-dimensional measurement process using the
上記ステレオカメラ2を計測対象物5に相対する適切な位置に配置し、焦点距離や露出等を調整した後、CPU12の制御の下に左カメラ6と右カメラ7との画像キャプチャが行われる。こうして、図3(a)に示すごとく、左カメラキャプチャ画像および右カメラキャプチャ画像が得られる。
After the
上記ステレオカメラ2のキャプチャ画像は、レンズの歪みや左右カメラの角度ずれ等が存在するため、図3(a)に示すように歪みや傾きやずれを含む画像になっている。これを補正して左右画像の対応点探索を容易にするために、キャリブレーション演算部10によってカメラキャリブレーションと呼ばれる作業が事前に行われる。カメラキャリブレーションの詳細については後述する。
The captured image of the
上記カメラキャリブレーションによって算出されて、キャリブレーションパラメータ記憶部11に記憶されているキャリブレーションパラメータに基づいて、ステレオ平行化部8によって、左カメラキャプチャ画像および右カメラキャプチャ画像に対してステレオ平行化処理が施される。左右カメラのステレオ平行化後画像は、図3(b)に示すように、互いに対応する画素が画像の上下方向に揃っていると考えられる。即ち、左カメラ6のステレオ平行化後画像におけるある画素に対して、右カメラ7のステレオ平行化後画像における対応する画素は必ず同一の行に存在する。したがって、エピポーラ線上の画素を探索すれば、左右画像の対応関係を探し出すことが可能となる。
Stereo parallelization processing is performed on the left camera capture image and the right camera capture image by the stereo parallelization unit 8 based on the calibration parameters calculated by the camera calibration and stored in the calibration parameter storage unit 11. Is given. As shown in FIG. 3B, the stereo-parallelized image of the left and right cameras is considered to have pixels corresponding to each other aligned in the vertical direction of the image. That is, for a certain pixel in the stereo-parallelized image of the
上記対応点探索部9による実際の対応点探索処理の手順は、図3(c)に示すようになる。先ず、左カメラステレオ平行化後画像に、注目する画素を中心として縦横夫々p画素の正方形状の「相関窓」と呼ばれる領域16を設定する。そして、右カメラステレオ平行化後画像における相関窓16との同一行に同じ大きさの相関窓17を設定し、この相関窓17を左右方向にスライドさせながら、左右の相関窓16,17に含まれる画素間の相関度合いを示す評価量を計算するのである。その場合における上記相関度合いを示す評価量としては、例えばSAD(Sum of Absolute Differrence:差分絶対値和)等の画素演算で計算できる量が用いられる。
The actual corresponding point searching process performed by the corresponding point searching unit 9 is as shown in FIG. First, a square-shaped
所定の相関探索範囲の端から端まで探索した場合に、相関度合いの上記相関窓に関する合計値が最も高くなる状態での右カメラステレオ平行化後画像における相関窓17の中心画素が、左カメラステレオ平行化後画像における注目画素に対する対応点(対応画素)となる。その際に、左カメラステレオ平行化後画像の注目画素と右カメラステレオ平行化後画像の対応画素との距離(相関窓16の中心点と相関窓17の対応点との距離)を、水平方向の画素単位で表したものが視差dと定義される。
When searching from end to end of the predetermined correlation search range, the center pixel of the
このような探索処理を左カメラ平行化後画像の全画素に対して実施することによって、各画素に対して視差dの値が夫々一意に定まる。この視差dの値をグレースケール画像として左カメラ平行化後画像に表すと、図3(d)に示すような上記視差情報としての視差画像が得られる。 By performing such a search process for all the pixels of the image after parallelization of the left camera, the value of the parallax d is uniquely determined for each pixel. When the value of the parallax d is expressed as a grayscale image in the image after parallelization of the left camera, a parallax image as the parallax information as shown in FIG.
尚、上記対応点探索処理によって上記相関探索範囲の端から端まで探索しても相関度合いが所定の値以上になる相関窓17が得られない場合は、対応点が存在しないと見なされる。左カメラ6からは見えているが右カメラ7からは見えない部分(オクルージョン領域)を探索する場合や、計測対象物5のコントラストが低い場合には、対応点が存在しないという探索結果になることが多い。図3(d)においては、計測対象物5の一部がオクルージョン領域となっている。
If the
以下、図2に示すフローチャートに従って、CPU12の制御の下に実行される上記ステレオ平行化処理および上記対応点探索処理を含む3次元計測処理動作について説明する。
Hereinafter, the three-dimensional measurement processing operation including the stereo parallelization processing and the corresponding point search processing executed under the control of the
ステップS1a,S1bで、ステレオカメラ2における左カメラ6と右カメラ7との画像キャプチャが同じタイミングで行われ、得られた左カメラキャプチャ画像および右カメラキャプチャ画像が、ステレオ平行化部8に送出される。同様にして、上記カメラキャリブレーションの場合には、後に詳述するキャリブレーションボードが左カメラ6と右カメラ7とで撮影され、キャリブレーションボード撮影画像がキャリブレーション演算部10に送出される。ステップS2で、キャリブレーション演算部10によって、後に詳述するようなカメラキャリブレーション処理が行われる。そして、算出されたキャリブレーションパラメータがキャリブレーションパラメータ記憶部11に記憶される。
In steps S1a and S1b, the
ステップS3で、上記ステレオ平行化部8によって、キャリブレーションパラメータ記憶部11に記憶されているキャリブレーションパラメータに基づいて、左カメラキャプチャ画像および右カメラキャプチャ画像に対し、上述したようなステレオ平行化処理が施される。そして、得られた左カメラ6および右カメラ7のステレオ平行化後画像は、対応点探索部9に送出される。
In step S3, the stereo parallelization unit 8 performs the stereo parallelization process as described above on the left camera capture image and the right camera capture image based on the calibration parameters stored in the calibration parameter storage unit 11. Is given. Then, the obtained stereo parallelized images of the
ステップS4で、上記対応点探索部9によって、上述した対応点探索処理が実行される。先ず、ステップS4aで、プレフィルタ処理が行われる。ここで、プレフィルタ処理は、左右カメラのステレオ平行化後画像の輝度差や画像内の局所的な輝度レベルの変動等を吸収するためのエッジ強調処理である。その後、ステップS4bで、実際に上記対応点探索処理が行われる。本距離計測装置1においては、左カメラ6を基準として、左カメラ6の平行化後画像上の全画素に対して右カメラ7のステレオ平行化後画像から対応点を探索し、図3(d)に示すような視差画像を生成する。この探索によって対応点が見出せなかったり対応点を誤って検出したりした場合には、上記視差画像の一部にノイズが混じることがある。特に、対応点探索時の相関窓16,17のサイズが比較的小さい場合には、計測精度が高まる代わりにノイズの割合が大きくなる傾向にある。このようなノイズ成分を低減するため、ステップS4cで、対応点探索後の上記視差画像に、ポストフィルタ処理を行って画像整形を行う。ここで、上記ポストフィルタ処理としては、例えばガウシアンフィルタ処理やメディアンフィルタ処理等の平滑化フィルタ処理、あるいは、膨張収縮等のモルフォロジー処理が用いられる。
In step S4, the corresponding point search unit 9 performs the corresponding point search process described above. First, prefiltering is performed in step S4a. Here, the pre-filtering process is an edge enhancement process for absorbing a luminance difference between the stereo-parallelized images of the left and right cameras, a local luminance level variation in the image, and the like. Thereafter, in step S4b, the corresponding point search process is actually performed. In the
こうして得られた画像整形後の上記視差画像が距離画像生成部13に送出される。
The parallax image after image shaping obtained in this way is sent to the distance
これらの上記ステレオ平行化部8および対応点探索部9による処理は、CPU12から送出される制御信号に基づいて、適切なタイミングで実行される。
The processing by the stereo parallelizing unit 8 and the corresponding point searching unit 9 is executed at an appropriate timing based on the control signal sent from the
ステップS5で、上記距離画像生成部13によって、上記視差画像から距離画像が生成される。
In step S5, the distance
上記視差画像上の任意の画素の視差値dは、三角測量の原理によって、左カメラ6における撮像素子の光軸中心である原点Oからの奥行き方向の距離Zに変換できる。具体的には、ステレオカメラ2の上記基線長をAとし、左カメラ6の焦点距離をfとして、
Z=A・f/d
で計算することができる。そこで、距離画像生成部13は、上記視差画像の各画素のグレースケール画像から各画素の視差dを求め、各画素に関して視差値dから距離Zを求めることによって、上記視差画像から距離画像を生成することができるのである。
The parallax value d of any pixel on the parallax image can be converted into a distance Z in the depth direction from the origin O, which is the center of the optical axis of the image sensor in the
Z = A · f / d
Can be calculated with Therefore, the distance
ステップS6で、上記ステップS5において生成された距離画像が、CPU12の制御に基づいて表示部4に表示される。そうした後、3次元計測処理動作が終了される。
In step S6, the distance image generated in step S5 is displayed on the display unit 4 based on the control of the
さらに、本距離計測装置1においては、入力手段(図示せず)によって、上記距離画像上の1点あるいは2点が指示選択されると、1点が指示された場合にはその1点の座標値が、2点が指示された場合にはその2点間の距離が、CPU12の制御に基づいて距離計算部14によって計算され、計算結果が表示部4に表示される。
Further, in the
このように、本距離計測装置1においては、上記ステレオカメラ2で撮影した計測対象物5の左右カメラ画像から上記距離画像を生成して表示すると共に、上記距離画像における対象物上の任意の1点の座標値および対象物上の任意の2点間距離を表示することができる。
As described above, in the
尚、上記奥行き方向の距離Zだけでなく、水平方向の距離X、垂直方向の距離Yも、視差dから三角測量の原理を用いて算出することができる。こうして、原点Oを基準とした計測対象物5の3次元座標(X,Y,Z)を得ることができる。さらに、この3つの座標値に適当な視点変換行列を掛けることによって、計測対象物5を任意の視点から見た画像を生成することもできる。
Not only the distance Z in the depth direction but also the distance X in the horizontal direction and the distance Y in the vertical direction can be calculated from the parallax d using the principle of triangulation. In this way, the three-dimensional coordinates (X, Y, Z) of the
次に、上記ステレオ平行化部8によって、左カメラキャプチャ画像および右カメラキャプチャ画像に対してステレオ平行化処理を施す際に用いられるキャリブレーションパラメータを得るためのカメラキャリブレーションについて説明する。 Next, camera calibration for obtaining calibration parameters used when the stereo parallelization unit 8 performs stereo parallelization processing on the left camera capture image and the right camera capture image will be described.
上記ステレオカメラ2でキャプチャされた左右のカメラキャプチャ画像は、様々な誤差要因によって歪みや傾きやずれを含んだ画像になっている。具体的な誤差要因としては、単体要因即ちカメラ単体の誤差要因と、相対要因即ち左右カメラ6,7間の位置関係に関する要因とに分類できる。上記単体要因は、レンズの半径方向および円周方向の歪みや撮像素子の中心ずれ等である。また、上記相対要因は、左右カメラ6,7間の回転行列および並進行列で表される。これらは直接計測することができない。
The left and right camera capture images captured by the
そこで、上記カメラキャリブレーションにおいては、上記キャリブレーションボードと呼ばれる幾何的な形状および寸法が既知のパターンを印刷した平板を用意し、これをステレオカメラ2の前に様々な距離および角度で配置して、なるべく多くの回数撮影を行う。上記キャリブレーションボードとしては、例えば、図4(a)に示すようなチェッカー(市松)パターンや、図4(b)に示すようなグリッド状のドット(水玉)パターン等が用いられる。しかしながらこれらのパターンに限定されるものではない。
Therefore, in the camera calibration, a flat plate on which a pattern having a known geometric shape and dimensions, which is called the calibration board, is prepared and placed in front of the
上記撮影されたキャリブレーションボードの画像から、チェッカーパターンであればコーナー点、グリッドパターンであればグリッドの中心点のような、特徴となる点を見出す。次に、左右カメラ画像の組において、対応する特徴点が何れであるかを探索する。このようにして求められた左右カメラ画像上の特徴点の座標の組と、上記キャリブレーションボード上の相対距離が既知の2点が撮影画像上の2点に対応付けられるという条件と、上記キャリブレーションボード上の1点が左右カメラ画像上の各1点と同一であるという条件とから、複数の方程式を立てることができる。例えば、上記キャリブレーションボードとして図4(a)に示すチェッカーパターンを用いる場合、チェッカーのコーナー数を12×8、撮影回数を10回とすると、12×8×10=960個の式が得られる。これらの式を連立方程式として解くことによって、未知数であるキャリブレーションパラメータを求めることができる。 From the photographed calibration board image, a characteristic point such as a corner point in the case of a checker pattern or a center point of a grid in the case of a grid pattern is found. Next, in the set of left and right camera images, the corresponding feature point is searched. The set of feature point coordinates on the left and right camera images obtained in this way, the condition that two points with known relative distances on the calibration board are associated with the two points on the captured image, and the calibration A plurality of equations can be established based on the condition that one point on the motion board is the same as each point on the left and right camera images. For example, in the case where the checker pattern shown in FIG. 4A is used as the calibration board, if the number of corners of the checker is 12 × 8 and the number of shootings is 10, 12 × 8 × 10 = 960 equations are obtained. . By solving these equations as simultaneous equations, calibration parameters that are unknown numbers can be obtained.
このようなキャリブレーションの具体的な手順については、例えば非特許文献「Z.Zhang, “IEEE Transactions on Pattern Analysis and Machine Intelligence”,#22(2000),1330−1334」等に記載されている。 A specific procedure of such calibration is described in, for example, non-patent document “Z. Zhang,“ IEEE Transactions on Pattern Analysis and Machine Intelligence ”, # 22 (2000), 1330-1334”.
実際のキャリブレーションにおいては、上述したように多数の誤差要因(キャリブレーションパラメータ)を未知数として求めるため、得られる解はばらつきを含むものになる。即ち、全く同じ条件でキャリブレーションを行っても、得られるキャリブレーションパラメータは完全には同じにならない。尚、キャリブレーションパラメータのばらつきを可能な限り低減するために、上記キャリブレーションボードのコーナー数や撮影回数を多くして非常に多くの方程式から最小自乗法で最適な解を求めたとしても、一定量のばらつきが残ってしまう。そして、計算で求められたキャリブレーションパラメータの値と真の値との差はキャリブレーション誤差となり、一定の計測誤差を発生させることになる。特に、ステレオカメラのフォーカス合わせの性能が低い場合には、上記キャリブレーションボードの撮影時にボケが残り、特徴点の対応付けに誤差を含むことになるので、キャリブレーション誤差が大きくなる傾向があることが知られている。 In actual calibration, as described above, since many error factors (calibration parameters) are obtained as unknowns, the obtained solutions include variations. That is, even if calibration is performed under exactly the same conditions, the obtained calibration parameters are not completely the same. In order to reduce the variation of calibration parameters as much as possible, even if the number of corners and the number of shots of the calibration board are increased and the optimal solution is obtained by the least square method from a large number of equations, it is constant. Variations in quantity remain. Then, the difference between the value of the calibration parameter obtained by calculation and the true value becomes a calibration error, and a certain measurement error is generated. In particular, when the focusing performance of the stereo camera is low, blurring remains when the calibration board is photographed, and there is an error in associating the feature points, which tends to increase the calibration error. It has been known.
上述したような一定量の(即ち定常的な)キャリブレーション誤差に加えて、キャリブレーション後の経時変化によって非定常的なキャリブレーション誤差が発生する。このような非定常誤差には、熱膨張・熱収縮によるレンズの形状変化のように環境に応じて可逆的に変動する成分と、機械的な衝撃等によって発生する不可逆な成分とが存在する。 In addition to the fixed amount of calibration error (that is, stationary) as described above, a non-stationary calibration error occurs due to a change with time after calibration. Such unsteady errors include a component that reversibly fluctuates according to the environment, such as a lens shape change due to thermal expansion and contraction, and an irreversible component that occurs due to a mechanical impact or the like.
実際の計測におけるキャリブレーション誤差は、上記定常的な誤差成分と、キャリブレーション後の経時変化による可逆・不可逆を含めた非定常誤差成分との和になる。そのため、計測精度を高めるためにステレオカメラ2を高画素化・狭画素ピッチ化すると、キャリブレーションに求められる精度もそれに応じて高まるので、上記定常誤差および上記非定常誤差の両方を極めて小さい値に抑える必要が生ずる。これが高精度の計測を行う場合において大きな障害となる。
The calibration error in actual measurement is the sum of the stationary error component and the unsteady error component including reversible / irreversible due to the change with time after calibration. For this reason, if the
様々なキャリブレーションパラメータが誤差を含んでいる場合、それらのキャリブレーションパラメータが左カメラ6および右カメラ7のステレオ平行化後画像に与える影響は、画面の「上下方向のずれ」,「左右方向のずれ」および「その他の影響」に大きく分けられる。
When various calibration parameters include errors, the effects of these calibration parameters on the stereo-parallelized images of the
上記「上下方向のずれ」は、主に、左カメラ6あるいは右カメラ7の撮像素子の上下方向のずれ(ΔcY)、左右カメラ6,7の上下方向の位置ずれ(ΔY)、および、左右カメラ6,7の水平軸周りの角度ずれ(θX)と、関係している。これに対し、上記「左右方向のずれ」は、主に上記撮像素子の左右方向のずれ(ΔcX)、左右カメラ6,7の左右方向の位置ずれ(ΔX)、および、左右カメラ6,7の垂直軸周りの角度ずれ(θY)と、関係している。また、上記「その他の影響」として、レンズの半径方向・円周方向の歪み係数はより高次の影響(画像の中心と周辺または上下左右とで異なる影響)を及ぼす。
The above-mentioned “vertical shift” mainly includes vertical shift (Δc Y ) of the image sensor of the
計測精度を高めるためにステレオカメラ2を高画素化・狭画素ピッチ化した場合、上述したステレオ平行化後画像に対する3つの影響のうち、「上下方向のずれ」が深刻な問題となる場合がある。その理由について、以下で説明する。
When the
上記ステレオ平行化後画像が左右方向にずれている場合、視差が真の値と異なる値となるので計測誤差が発生する。視差が真の値dからΔdだけずれた場合に、奥行き方向距離の計測値ZがΔZの計測誤差が発生したとする。このとき、三角測量の「Z=A・f/d」の関係式から、
ΔZ/Z=−Δd/(d+Δd)≒−Δd/d
が得られる。この式から、d>>Δdの条件下では、視差の左右方向ずれの割合Δd/dと計測誤差ΔZ/Zとは略同じオーダーになることが分かる。
When the stereo-parallelized image is shifted in the left-right direction, the parallax becomes a value different from the true value, resulting in a measurement error. It is assumed that when the parallax deviates from the true value d by Δd, a measurement error in which the depth direction distance measurement value Z is ΔZ occurs. At this time, from the relational expression “Z = A · f / d” of triangulation,
ΔZ / Z = −Δd / (d + Δd) ≈−Δd / d
Is obtained. From this equation, it can be seen that, under the condition of d >> Δd, the ratio Δd / d of the parallax deviation in the left-right direction and the measurement error ΔZ / Z are substantially in the same order.
例えば、左右方向のずれ量が3%とすると、それによって発生する計測誤差も約3%となる。これを逆に考えると、3%の計測誤差が許容できるならば左右方向のずれ量は3%まで許されることになる。このように、左右方向のずれは計測誤差に直接影響を与えるが、誤差が生じても計測そのものは問題なく実行することができるのである。 For example, if the amount of deviation in the left-right direction is 3%, the measurement error caused thereby is also about 3%. Conversely, if a measurement error of 3% can be tolerated, a deviation amount in the left-right direction is allowed up to 3%. As described above, the deviation in the left-right direction directly affects the measurement error, but even if an error occurs, the measurement itself can be executed without any problem.
これに対し、左右カメラの上記ステレオ平行化後画像が左右方向にではなく上下方向にずれている場合には、計測誤差よりも寧ろ計測そのものの可否に影響を与えてしまう可能性がある。例えば、左カメラステレオ平行化後画像における相関窓16のサイズを13画素×13画素として上記対応点探索を行う場合、上下方向の画素ずれが全くない場合には、図5(a)に示すように、左右カメラステレオ平行化後画像の対応点が上下方向に完全に揃っているため、左カメラステレオ平行化後画像に対して右カメラステレオ平行化後画像の同じラインが探索される。ところが、上下方向の画素ずれ量が13画素以上である場合には、図5(b)に示すように、左カメラステレオ平行化後画像に対して右カメラステレオ平行化後画像の全く異なるラインを探索することになる。
On the other hand, if the stereo-parallelized images of the left and right cameras are shifted in the vertical direction instead of the horizontal direction, there is a possibility that the possibility of the measurement itself is affected rather than the measurement error. For example, when the corresponding point search is performed with the size of the
上記対応点探索部9は、前段のステレオ平行化処理によって得られた左右カメラステレオ平行化後画像の対応点が、上下方向に完全に揃っていることを前提として上記対応点探索を行う。そのために、図5(b)に示す状態では対応点が全く見出せず、計測不能になってしまうのである。 The corresponding point search unit 9 performs the corresponding point search on the assumption that the corresponding points of the left and right camera stereo parallelized images obtained by the stereo parallelization processing in the previous stage are perfectly aligned in the vertical direction. For this reason, in the state shown in FIG. 5 (b), no corresponding point is found and measurement becomes impossible.
このような現象は、上記左カメラ6および右カメラ7として、比較的画素ピッチが広く画素数の少ない(数万〜100万画素程度)カメラを用いる場合には問題にはならない。ところが、計測精度向上のために、画素ピッチの狭い高画素数のカメラ(300万画素以上)を用いる場合には、顕著に現れる。
Such a phenomenon is not a problem when the
例えば、上記左右カメラ6,7における撮像素子のサイズが1/4インチであり、画素数が500万画素である場合には、画素ピッチが約1.4μmとなる。そのため、上下方向の画素ずれ量を13画素以内に抑えるためには、キャリブレーションによる上下方向のずれを18.2μm以下の精度に抑える必要がある。これは、キャリブレーション後の熱膨張収縮等による寸法変化によっても影響を受けるレベルである。そのため、上述した上下方向のずれ要因となるパラメータの全てを高精度に求めたとしても、キャリブレーションの誤差あるいはキャリブレーション後の温度変化等によって容易に上下方向ずれ量が許容範囲を超えてしまい、計測が不能になってしまうのである。このように、左右カメラ6,7として計測精度を向上させるために高画素数のカメラを採用しても、キャリブレーションの上下ずれのために計測精度が高めることができないという問題が発生することになる。
For example, when the size of the image sensor in the left and
そこで、本距離計測装置1においては、このような問題を解決するために、以下に詳述するように、対応点探索部9のキャリブレーションずれ再補正部15によって、対応点探索時に探索パラメータを得、この得られた探索パラメータを用いてキャリブレーションずれ再補正を行うのである。そのキャリブレーションずれ再補正処理を含む上記対応点探索処理の手順を図6のフローチャートに示す。また、キャリブレーションずれ再補正処理時における上下方向ずれ調整量と認識率との関係を図7に示す。図6に従ってキャリブレーションずれ再補正処理の手順を説明するに先立って、図7に従ってキャリブレーションずれ再補正処理に付いて説明する。
Therefore, in the
本実施の形態においては、上記探索パラメータとして「認識率」を用いる。すなわち、キャリブレーションずれ再補正部15を含む対応点探索部9は、左右カメラステレオ平行化後画像の対応点(対応画素)を探索するに先立って、先ず、左カメラステレオ平行化後画像における注目する画素領域の全画素に占める対応点が見出された画素の割合(%)を上記認識率として算出する。
In the present embodiment, “recognition rate” is used as the search parameter. That is, prior to searching for corresponding points (corresponding pixels) in the left-right camera stereo parallelized image, the corresponding point search unit 9 including the calibration
以下、詳述すると、上記「注目する画素領域」とは、左カメラステレオ平行化後画像における上記認識率算出の対象となる画素領域であり、左カメラステレオ平行化後画像の全体であっても良いし、左カメラステレオ平行化後画像のうちの計測対象物が存在する領域であって良いし、左カメラステレオ平行化後画像から後の対応点探索の際に誤りが生じ易い領域を除いた領域であっても良い。こうして設定された「注目する画素領域」の全画素に対して、先に図3(c)で説明したように、左右のカメラステレオ平行化後画像に相関窓16,17を設定し、相関窓17をスライドさせながら相関窓16,17に含まれる画素間の相関度合の合計値を計算し、その値が最も高くなる状態での相関窓17の中心画素を対応点とする対応点探索を行う。そして、「注目する画素領域」の全画素に占める対応点が見出された画素の割合(%)を上記認識率として算出するのである。
Hereinafter, in detail, the “pixel region of interest” is a pixel region for which the recognition rate is calculated in the image after parallelization of the left camera stereo, and may be the entire image after parallelization of the left camera stereo. It may be a region where the measurement object exists in the image after parallelization of the left camera stereo, or an area in which an error is likely to occur in the subsequent search for corresponding points from the image after parallelization of the left camera stereo is excluded. It may be an area. As described above with reference to FIG. 3C, the
次に、上記左カメラステレオ平行化後画像に対して右カメラステレオ平行化後画像を上方向に1画素分ずらし、先程と同様に対応点探索と認識率算出とを行う。このような操作を所定の上下方向のずらし画素範囲(例えば、「開始位置−5画素」から「開始位置+5画素」まで)で行い、図7に示すように、上下方向画素ずらし量に対する上記認識率を示す曲線を求める。そして、得られた曲線のピーク位置における上記認識率が予め定められた所定の値以上である場合に、このピーク位置を最適位置とする。そして、右カメラステレオ平行化後画像を上記最適位置の画素ずらし量だけ上下方向にずらして、左カメラステレオ平行化後画像に設定された相関窓16と同じライン上の画素に対して本来の対応点の探索処理を行うのである。
Next, the right camera stereo parallelized image is shifted upward by one pixel with respect to the left camera stereo parallelized image, and corresponding point search and recognition rate calculation are performed in the same manner as described above. Such an operation is performed in a predetermined vertical shift pixel range (for example, from “start position−5 pixel” to “start position + 5 pixel”), and as shown in FIG. 7, the above recognition for the vertical pixel shift amount is performed. A curve showing the rate is obtained. And when the said recognition rate in the peak position of the obtained curve is more than the predetermined value defined beforehand, this peak position is made into the optimal position. Then, the right camera stereo parallelized image is shifted in the vertical direction by the pixel shift amount of the optimal position, and the original correspondence is applied to the pixels on the same line as the
上記左カメラステレオ平行化後画像に対する右カメラステレオ平行化後画像の下方向への画素ずらし量を変化させた場合に得られる視差画像の変化を、図8(a)〜図8(c)に示す。ここで、図8(a)は、右カメラステレオ平行化後画像を最適位置から下方向に2画素ずらした場合の視差画像である。また、図8(b)は、最適位置での視差画像である。また、図8(c)は、最適位置から上方向に2画素ずらした場合の視差画像である。 FIGS. 8A to 8C show changes in parallax images obtained when the pixel shift amount in the downward direction of the right camera stereo parallelized image with respect to the left camera stereo parallelized image is changed. Show. Here, FIG. 8A is a parallax image when the right camera stereo parallelized image is shifted downward by two pixels from the optimal position. FIG. 8B is a parallax image at the optimum position. FIG. 8C shows a parallax image when the pixel is shifted upward by two pixels from the optimum position.
図8(b)に示す最適位置では、画面の略全面にわたって対応点が探索されて視差が算出されている。しかしながら、図8(a)に示す下方向への2画素ずらし位置では、画面の下付近対に応点探索不能の領域が発生しており、図8(c)に示す上方向への2画素ずらし位置では、画像の上付近に対応点探索不能の領域が発生している。そのために、上記認識率が低下することになる。したがって、上下方向に画素ずらしを行いながら上記認識率のピークを求めることによって、図8(b)に示すように、最適位置を見出すことが可能であることが分かる。 At the optimum position shown in FIG. 8 (b), corresponding points are searched over substantially the entire screen, and the parallax is calculated. However, at the position shifted by two pixels in the downward direction shown in FIG. 8 (a), there is an area where the search for the corresponding point is impossible in the lower vicinity of the screen, and two pixels in the upward direction shown in FIG. 8 (c). At the shifted position, an area where the corresponding point cannot be searched is generated near the top of the image. For this reason, the recognition rate is lowered. Accordingly, it can be seen that the optimum position can be found as shown in FIG. 8B by obtaining the peak of the recognition rate while shifting the pixels in the vertical direction.
以下、図6に示すフローチャートに従って、CPU12の制御の下に実行される上記3次元計測処理動作の上記ステップS4bにおいて、対応点探索部9によって実行される上記対応点探索処理について詳細に説明する。上記3次元計測処理動作の上記ステップS4aにおいてプレフィルタ処理が終了すると、キャリブレーションずれ再補正処理を含む上記対応点探索処理動作がスタートする。
Hereinafter, the corresponding point search process executed by the corresponding point search unit 9 in step S4b of the three-dimensional measurement processing operation executed under the control of the
先ず、上記対応点探索部9のキャリブレーションずれ再補正部15によって、キャリブレーションずれ再補正処理が行われる。
First, calibration deviation recorrection processing is performed by the calibration
ステップS4b1で、上記基準画像である左カメラステレオ平行化後画像に上記「注目する画素領域(以下、注目画素領域と言う)」を設定し、この注目画素領域の全画素に関して、上述したように、上記比較画像である右カメラステレオ平行化後画像に対して対応点探索を行う。 In step S4b1, the above-mentioned “target pixel region (hereinafter referred to as the target pixel region)” is set in the left camera stereo parallelized image that is the reference image, and all the pixels in this target pixel region are set as described above. The corresponding point search is performed on the image after the parallelization of the right camera stereo, which is the comparative image.
ステップS4b2で、上記「注目する画素領域」の全画素に占める上記ステップS4b1において対応点(対応画素)が見出された画素の割合(%)が、当該右カメラステレオ平行化後画像の上記認識率として算出される。 In step S4b2, the ratio (%) of pixels in which the corresponding point (corresponding pixel) is found in step S4b1 occupying in all the pixels of the “focused pixel region” is the recognition of the right camera stereo parallelized image. Calculated as a rate.
ステップS4b3で、上記上下方向のずらし画素範囲である探索範囲内の探索が終了したか否かが判別される。その結果、終了していればステップS4b5に進む一方、終了していなければステップS4b4に進む。ステップS4b4で、右カメラステレオ平行化後画像が上方向あるいは下方向に1画素分だけ移動される。そうした後に、上記ステップS4b1にリターンして、左カメラステレオ平行化後画像と上下方向に1画素だけ移動された右カメラステレオ平行化後画像との間で、上記対応点の探索が行われる。 In step S4b3, it is determined whether or not the search within the search range, which is the vertically shifted pixel range, is completed. As a result, if completed, the process proceeds to step S4b5. If not completed, the process proceeds to step S4b4. In step S4b4, the right camera stereo parallelized image is moved upward or downward by one pixel. After that, the process returns to step S4b1 to search for the corresponding point between the left camera stereo parallelized image and the right camera stereo parallelized image moved by one pixel in the vertical direction.
ステップS4b5で、上記探索範囲内での対応点探索の結果得られた上記認識率のうちで最大認識率を呈する右カメラステレオ平行化後画像の上下方向のずらし位置が算出される。ステップS4b6で、上記ステップS4b5において得られた最大認識率が、予め設定された設定値(例えば80%)以上であるか否かが判別される。その結果、上記設定値以上であればステップS4b7に進み、上記設定値以上でなければステップS4b9に進む。 In step S4b5, the vertical shift position of the right camera stereo parallelized image that exhibits the maximum recognition rate among the recognition rates obtained as a result of the corresponding point search within the search range is calculated. In step S4b6, it is determined whether or not the maximum recognition rate obtained in step S4b5 is equal to or higher than a preset setting value (for example, 80%). As a result, if it is not less than the set value, the process proceeds to step S4b7, and if not, the process proceeds to step S4b9.
ステップS4b7で、上記ステップS4b5において算出された上記最大認識率を呈する右カメラステレオ平行化後画像の位置が、最適位置として上記最大認識率と共にキャリブレーションパラメータ記憶部11に記憶される。 In step S4b7, the position of the right camera stereo parallelized image exhibiting the maximum recognition rate calculated in step S4b5 is stored in the calibration parameter storage unit 11 together with the maximum recognition rate as the optimum position.
ステップS4b8で、上記ステップS4b7において記憶された最適位置に、右カメラステレオ平行化後画像が移動される。こうして、キャリブレーションずれ再補正部15によるキャリブレーションずれ再補正処理が終了する。以後、上述した本来の対応点探索処理が行われる。すなわち、先に図3(c)で説明したように、左右のカメラステレオ平行化後画像に相関窓16,17を設定し、相関窓17をスライドさせながら相関窓16,17に含まれる画素間の相関度合の合計値を計算し、その値が最も高くなる状態での相関窓17の中心画素を対応点とする。そして、左カメラステレオ平行化後画像の注目画素と右カメラステレオ平行化後画像の対応点(対応画素)との距離を水平方向の画素単位で表した視差dが得られる。このような対応点探索処理を左カメラ平行化後画像の全画素に対して実施して、各画素の視差dの値を求め、この視差dの値に基づいて、図3(d)に示すような視差画像が生成される。
In step S4b8, the right camera stereo parallelized image is moved to the optimum position stored in step S4b7. In this way, the calibration deviation recorrection processing by the calibration
そうした後、上記対応点探索処理動作が終了されて、上記3次元計測処理動作における上記ステップS4cでの上記ポストフィルタ処理にリターンする。 After that, the corresponding point search processing operation is ended, and the process returns to the post filter processing in step S4c in the three-dimensional measurement processing operation.
ステップS4b9で、上記ステップS4b6において設定値以上の最大認識率が得られないと判別されたため、左右のカメラステレオ平行化後画像の上下方向のずれに起因するキャリブレーションずれの度合が、本実施の形態における上記キャリブレーションずれ再補正処理では修正しきれない度合であると判定して、以後の視差画像の生成を停止する。 In step S4b9, since it was determined that the maximum recognition rate equal to or higher than the set value was not obtained in step S4b6, the degree of calibration deviation caused by the vertical deviation of the left and right camera stereo parallelized images is determined in this embodiment. It is determined that the degree of correction cannot be corrected by the calibration deviation re-correction process in the embodiment, and the subsequent generation of the parallax image is stopped.
ステップS4b10で、上記キャリブレーションずれの度合が上記キャリブレーションずれ再補正処理では修正しきれないため、CPU12の制御に基づいて、キャリブレーション演算部10によるカメラキャリブレーションの要求が表示部4に表示される。そうした後に、上記3次元計測処理動作における上記ステップS6の後段にリターンして、3次元計測処理動作が終了される。
In step S4b10, since the degree of calibration deviation cannot be corrected by the calibration deviation re-correction processing, a request for camera calibration by the
以上のように、この実施の形態においては、上記キャリブレーションによって補正しきれない、つまり上記カメラキャリブレーションによって得られた上記キャリブレーションパラメータを用いたステレオ平行化処理によって補正しきれない左右のカメラステレオ平行化後画像間のずれ量を、キャリブレーションずれ再補正部15を含む対応点探索部9による対応点の探索処理中において、キャリブレーションずれ再補正部15によるキャリブレーションずれ再補正処理で得られるデータ(検索パラメータ:認識率)を用いて再補正するようにしている。したがって、本距離計測装置1における内部ハードウェアの回路規模の増大および演算時間の増大を招くことなくキャリブレーションずれを再補正して、3次元計測の精度を高めることができる。
As described above, in this embodiment, left and right camera stereo that cannot be corrected by the calibration, that is, cannot be corrected by stereo parallelization processing using the calibration parameter obtained by the camera calibration. The amount of deviation between the parallelized images can be obtained by the calibration deviation recorrection processing by the calibration
また、上記右カメラステレオ平行化後画像を上下にずらすことによって左右のカメラステレオ平行化後画像の上下方向のずれを再補正するため、特に高画素数・狭画素ピッチの撮像素子を有するステレオカメラでの計測において問題になり易い上下方向のキャリブレーションずれを低減することができる。その際に、左右のカメラステレオ平行化後画像対の一方(比較画像)を他方(基準画像)に対し上下方向に順次ずらして、上記認識率のピークを探索して最適位置を設定するという手順をとることで、対応点の探索を行う際の右カメラステレオ平行化後画像の最適位置を確実に見出すことができるのである。 Further, in order to re-correct the vertical shift of the left and right camera stereo parallelized images by shifting the right camera stereo parallelized image up and down, particularly a stereo camera having an image sensor with a high pixel count and a narrow pixel pitch Thus, it is possible to reduce the vertical calibration deviation, which is likely to be a problem in the measurement in the above. At that time, one of the left and right camera stereo parallelized image pair (comparison image) is sequentially shifted up and down with respect to the other (reference image), the peak of the recognition rate is searched and the optimum position is set By taking this, it is possible to reliably find the optimal position of the right camera stereo parallelized image when searching for the corresponding point.
また、上記実施の形態においては、上記対応画素領域の探索で見出された上記最適位置とその最適位置での上記認識率の値を、CPU12の制御に基づいて、キャリブレーションパラメータ記憶部11に記憶するようにしている。したがって、本距離計測装置1の電源を落とさずに連続的にあるいは断続的に計測を行う場合には、この最適位置に合わせた状態から処理を開始することができる。このように、上下方向の最適位置を本距離計測装置1の内部に記憶しておくことによって、最適な計測条件で迅速に計測を続けることができる。
In the above embodiment, the optimum position found in the search for the corresponding pixel region and the value of the recognition rate at the optimum position are stored in the calibration parameter storage unit 11 based on the control of the
尚、本距離計測装置1の電源を一旦落として再度電源を立ち上げた場合には、上記最適位置から計測を開始するようにしてもよいが、温度変化等に起因する不連続な変動が生じている可能性があるため、改めて上記キャリブレーションずれ再補正処理を行って、右カメラステレオ平行化後画像に対して上下方向に画素ずらしを行って、最適位置を求めることが望ましい。
In addition, when the power of the
また、上記実施の形態においては、ここまで説明した比較的小さな状態変化とは別に、長期間の経時変化や強い機械的ショック等によって、キャリブレーションを行った時の状態から大きな状態変化が発生した場合には、上記上下方向のずらし画素範囲では吸収しきれないキャリブレーションずれが生じることになる。そのような場合には、上下方向画素ずらし量‐認識率の曲線は、図7(b)に示すように明確なピークが存在せず、且つ全域にわたって低い値となる。そこで、図6に示す上記対応点探索処理動作における上記ステップS4b6において、得られた最大認識率が予め設定された設定値(例えば、80%)を下回る場合には最適位置が存在しないと判断し、CPU12の制御に基づいて、再キャリブレーションの実施を促すメッセージを表示部4に表示させるようにしている。こうすることによって、本距離計測装置1の使用者に適切なタイミングでキャリブレーションを実行させて、計測精度の大幅な低下を防ぐことができる。
Further, in the above embodiment, apart from the relatively small state change described so far, a large state change has occurred from the state at the time of calibration due to a long-term change over time, a strong mechanical shock, etc. In this case, a calibration shift that cannot be absorbed in the shifted pixel range in the vertical direction occurs. In such a case, the vertical pixel shift amount-recognition rate curve does not have a clear peak as shown in FIG. Therefore, in step S4b6 in the corresponding point search processing operation shown in FIG. 6, when the obtained maximum recognition rate falls below a preset value (for example, 80%), it is determined that there is no optimal position. Based on the control of the
尚、上記実施の形態においては、上記左カメラ6を基準として、左カメラステレオ平行化後画像の注目画素に対する対応画素を、右カメラステレオ平行化後画像から探索している。しかしながら、右カメラ7を基準として、右カメラステレオ平行化後画像の注目画素に対する対応画素を、左カメラステレオ平行化後画像から探索しても一向に差し支えない。
In the above embodiment, the
また、上記対応点探索部9を、本距離計測装置1の電源を落とさずに連続的にあるいは断続的に計測を行う場合であっても、上記対応点探索処理動作中において、所定の時間間隔で当該最適位置での上記認識率を演算することによって、上記探索パラメータである上記認識率を監視する。そして、上記認識率が最適値(例えば、上記ステップS4b5において算出された最大認識率)から所定の値(例えば10%)を超えて低下した場合に、CPU12の制御の下に、上記対応点探索処理動作を一時中断して、右カメラステレオ平行化後画像を上下方向にずらしての最適位置の再設定を指示する制御信号をキャリブレーションずれ再補正部15に送信するように構成することも可能である。こうすることによって、経時変化による計測誤差の増大を最小限に抑えることができる。
Even when the corresponding point search unit 9 performs measurement continuously or intermittently without turning off the power of the
また、上記実施の形態においては、探索パラメータとして上記認識率を採用したが、他のパラメータを最適位置の探索に用いることも可能である。例えば、計測対象物5が比較的平らなx‐y方向に延在する面上に書かれた文字のような場合には、奥行き方向の位置変化が小さいので、算出される視差dの値が狭い範囲に分布すると予想される。したがって、キャリブレーションずれが大きくなると、誤検出等によって視差dの値は広い範囲に分布するようになる。したがって、視差dの値のばらつき(標準偏差)を探索パラメータとして利用し、この探索パラメータが最小となる上下画素ずれ量を探索するという手法も考えられる。
Moreover, in the said embodiment, although the said recognition rate was employ | adopted as a search parameter, it is also possible to use another parameter for the search of an optimal position. For example, when the
この場合にも、対応点探索部9で得られるデータをそのまま利用できるため、本距離計測装置1の内部ハードウェアの回路規模の増大あるいは演算時間の増大を招くことなく計測精度を高めることができる。
Also in this case, since the data obtained by the corresponding point search unit 9 can be used as it is, the measurement accuracy can be improved without increasing the circuit scale of the internal hardware of the
また、上記実施の形態においては、上記対応点探索部9は、キャリブレーションずれ再補正部15を含んだ構成を有しているが、この発明はこれに限定されるものではない。キャリブレーションずれ再補正部15を、対応点探索部9と別のハードウェアあるいはソフトウェアのブロックとして実現することも可能である。
Moreover, in the said embodiment, although the said corresponding point search part 9 has the structure containing the calibration
・第2実施の形態
本実施の形態は、車輪のタイヤ等のコントラストが低い計測対象物の表面に刻印されている文字を認識する距離計測装置に関する。
-2nd Embodiment This Embodiment is related with the distance measuring device which recognizes the character stamped on the surface of the measurement object with low contrast, such as a tire of a wheel.
本実施の形態における距離計測装置のブロック図を図9に示す。図9において、上記第1実施の形態と同一の構成部材には同一の符号を付して、詳細な説明は省略する。 FIG. 9 shows a block diagram of the distance measuring device in this embodiment. In FIG. 9, the same components as those in the first embodiment are denoted by the same reference numerals, and detailed description thereof is omitted.
本実施の形態における距離計測装置21は、上記第1実施の形態において図1に示す距離計測装置1に対して、2次元ランダムパターン投影用のプロジェクタ22と、刻印文字を文字情報として取り出すための2値化部23およびOCR(Optical Character Reader:光学式文字読取装置)等の文字認識部24が付加されている。
The
本距離計測装置1を用いた文字認識処理の全体的な流れを、図10のフローチャートに示す。また、図11に、プロジェクタ22によって計測対象物5に対して投影される2次元ランダムテクスチャの説明図を示す。また、図12に、計測対象物5の表面に2次元ランダムなテクスチャを投影することによって下地面および文字上面に付与される輝度変化の説明図を示す。図10に従って文字認識の全体的な流れを説明するに先立って、図11および図12に従って上記ランダムパターンの投影と刻印文字の文字認識とに付いて説明する。
The overall flow of character recognition processing using this
上記プロジェクタ22は、文字認識時において、計測対象物5に対して、図11(a)および図11(b)に示すような2次元ランダムテクスチャを投影する。この計測対象物5に投影する2次元テクスチャは、対応点探索時の誤検出を防ぐために、可能な限り周期性を排除した2次元的にランダムなパターンであることが望ましい。図11(a)に示すようなランダム2値ドットパターン以外に、図11(b)に示すようなグレースケール多諧調を含むパターンや、その他これらのランダムパターンをランダムな色で彩色したパターン等の、何れのパターンを用いることも可能である
上記計測対象物5が上記タイヤのようなコントラストの低い物体である場合に、上記第1実施の形態における通常の対応点探索では対応点を検出できない場合がある。例えば、図12(a)に示すように、タイヤの表面に刻印された文字「A」を読み取る場合、タイヤの表面は一様に黒色であり、下地面と文字「A」の上面との夫々の面に殆ど輝度変化が存在しないので、対応点を検出することができない。また、輝度変化が存在する場所であっても、文字の横方向のエッジ等の左右方向に一様な輝度変化が生ずる部分では、対応点を一意に決定することができない。そのため、結果として文字「A」の縦(上下)方向のエッジしか検出できないことになり、タイヤの刻印文字「A」を正しく認識することが非常に困難になる。
The
これに対し、上記タイヤの表面に2次元的にランダムなテクスチャであるランダム2値ドットパターンを投影すると、図12(b)に示すように、タイヤ表面である下地面と文字「A」の上面とに、夫々テクスチャ起因の細かい輝度変化が付与される。そのため、テクスチャのランダム性によって、これらの輝度変化を左右のステレオ平行化後画像で一対一に対応づけて認識することが可能になる。したがって、2次元ランダムテクスチャを投影しない場合に比較して、上記認識率を飛躍的に高めることができる。その結果として、計測対象物5の表面のテクスチャの変化が乏しい場合やコントラストの低い場合であっても、安定した文字認識が可能になる。
On the other hand, when a random binary dot pattern, which is a two-dimensional random texture, is projected onto the surface of the tire, as shown in FIG. 12 (b), the ground surface that is the tire surface and the upper surface of the letter “A” In addition, a fine luminance change caused by the texture is applied. Therefore, due to the randomness of the texture, it is possible to recognize these luminance changes in a one-to-one correspondence with the left and right stereo parallelized images. Therefore, the recognition rate can be dramatically increased as compared with the case where no two-dimensional random texture is projected. As a result, stable character recognition is possible even when the texture change on the surface of the
以下、図10に示すフローチャートに従って、CPU12の制御の下に実行される上記ステレオ平行化処理および上記対応点探索処理を含む文字認識処理動作について説明する。プロジェクタ22によって、計測対象物5の表面への2次元ランダムテクスチャの投影を開始した後、文字認識処理動作が開始される。
Hereinafter, according to the flowchart shown in FIG. 10, the character recognition processing operation including the stereo parallelization processing and the corresponding point search processing executed under the control of the
ステップS11a,S11b〜ステップS15で、上述した第1実施の形態におけるステップS1a,S1b〜ステップS5と同様にして、ステレオカメラ2の左カメラ6と右カメラ7とによる画像キャプチャ、カメラキャリブレーション処理、ステレオ平行化処理、プレフィルタ処理,キャリブレーションずれ再補正処理およびポストフィルタ処理を含む対応点探索処理、および、距離画像生成が行われる。
In steps S11a and S11b to step S15, image capture and camera calibration processing by the
ステップS16で、上記ステップS15において生成された距離画像に対して、2値化部23によって2値化処理が行われ、2値化画像が生成される。この2値化処理は、例えば、上記距離画像における各画素の明るさを示す画素値として、文字「A」の上面に対応する距離を基準距離として、この基準距離以下の距離を表している画素の場合には、文字領域の明るさを示す第1の画素値に設定する。これに対し、上記基準距離を上回る距離を表している画素の場合には、上記第1の画素値よりも大きなあるいは小さな第2の画素値に設定することによって行われる。尚、ステレオカメラ2に対してタイヤ下地面が傾いている場合など、単純な2値化処理では文字と下地面とを分離するのが困難な場合には、所謂「適応2値化」等のより高度な2値化処理を行ったり、画像整形のための前処理を追加したりすることもできる。
In step S16, the binarization process is performed by the
ステップS17で、上記ステップS16において生成された2値化画像に基づいて、光学文字認識等による文字認識処理が行われる。ステップS18で、上記ステップS17における文字認識処理の結果得られた文字情報が、CPU12の制御に基づいて表示部4に表示される。そうした後、文字認識処理動作が終了される。
In step S17, character recognition processing such as optical character recognition is performed based on the binarized image generated in step S16. In step S18, the character information obtained as a result of the character recognition process in step S17 is displayed on the display unit 4 under the control of the
以上のごとく、本実施の形態においては、上記タイヤ等のコントラストが低い計測対象物5の表面に刻印されている文字を認識する場合等に、計測対象物5の表面に2次元的にランダムなテクスチャであるランダム2値ドットパターンを投影する。したがって、タイヤ表面である下地面と文字の上面とに輝度変化を付与することができ、これらの輝度変化を左右のステレオ平行化後画像において一対一に対応づけることによって、容易に対応点の探索を行うことが可能になる。したがって、左カメラステレオ平行化後画像における上記注目画素領域の全画素に占める対応点が見出された画素の割合(%)で算出される「認識率」を精度良く算出することができ、延いては、上記文字認識における認識率を高めることができるのである。
As described above, in the present embodiment, when recognizing characters imprinted on the surface of the
尚、上記第2実施の形態においては、文字認識を例に挙げて説明しているが、文字認識に限定されるものではなく、コントラストが低い計測対象物5の表面に刻印されているものは記号やパターンであっても差し支えない。
In the second embodiment, the character recognition is described as an example. However, the present invention is not limited to the character recognition, and what is imprinted on the surface of the
・その他の実施の形態
上記第1,第2実施の形態においては、上記左カメラ6と右カメラ7との2つのカメラを搭載し、左右2枚の画像対から対応点探索を行っている。しかしながら、カメラの個数は2つに限らず、3眼や4眼等の多眼ステレオの場合においてもこの発明を応用することは可能である。N眼カメラ(N≧3)の場合には、何れか1つのカメラを基準のカメラとし、他の(N−1)個のカメラのキャリブレーションおよびキャリブレーションずれ補正を行うことが望ましい。すなわち、基準のカメラに対して(N−1)個のカメラのキャリブレーションを行い、(N−1)セットのキャリブレーションパラメータをキャリブレーションパラメータ記憶部に記憶しておく。キャリブレーションずれが発生した場合は、(N−1)個のカメラの夫々について基準カメラに対して上下方向にスライドさせてキャリブレーションずれ再補正を行って、上記最適位置を求めることになる。
Other Embodiments In the first and second embodiments, two cameras, the
また、上記第1,第2実施の形態においては、簡略化のため計測対象物5が静止物体である場合について説明している。しかしながら、計測対象物5が動く物体であっても、左カメラ6と右カメラ7とを同期させて動画像を撮影し、動画像の各フレームを静止画像として取り出すことで上記第1,第2実施の形態と同様の処理を行うことができる。但し、動画像から上記3次元計測処理や文字認識処理を行う場合には、1フレーム期間内に対応点の探索および視差演算処理を行う必要があるため、高速な演算回路が必要となる。
In the first and second embodiments, the case where the
尚、上記各距離計測装置である3次元計測装置は、独立した計測装置として、産業用や民生用、その他の用途に用いることができる他、汎用的な携帯情報端末などの一部に組み込んだり、演算回路の一部または全部を集積回路(IC)化して利用したりすることもできる。 The three-dimensional measuring device, which is each of the distance measuring devices, can be used as an independent measuring device for industrial use, consumer use, and other purposes, or can be incorporated into a part of a general-purpose portable information terminal or the like. In addition, a part or all of the arithmetic circuit can be used as an integrated circuit (IC).
その他、本発明の趣旨を損なわない範囲で種々の変更を加えることが可能である。 In addition, various modifications can be made without departing from the spirit of the present invention.
本発明のステレオ3次元計測装置は、複数のカメラを用いて距離・形状などの計測を行う場合に有用であり、独立した計測装置として産業用や民生用、その他の用途に用いることができる他、汎用的な携帯情報端末などの一部に組み込んで利用したり、演算回路の一部または全部を集積回路IC化して利用したりすることができる。 The stereo three-dimensional measuring apparatus of the present invention is useful when measuring a distance and shape using a plurality of cameras, and can be used as an independent measuring apparatus for industrial, consumer, and other purposes. It can be used by being incorporated into a part of a general-purpose portable information terminal or the like, or a part or all of an arithmetic circuit can be used as an integrated circuit IC.
1,21…距離計測装置、
2…ステレオカメラ、
3…計測演算部、
4…表示部、
5…計測対象物、
6…左カメラ、
7…右カメラ、
8…ステレオ平行化部、
9…対応点探索部、
10…キャリブレーション演算部、
11…キャリブレーションパラメータ記憶部、
12…CPU、
13…距離画像生成部、
14…距離計算部、
15…キャリブレーションずれ再補正部、
16,17…相関窓、
22…プロジェクタ、
23…2値化部、
24…文字認識部。
1,21 ... Distance measuring device,
2 ... Stereo camera,
3 ... measurement calculation part,
4 ... display part,
5 ... Measurement object,
6 ... Left camera,
7 ... Right camera,
8 ... Stereo parallelizing section,
9 ... corresponding point search part,
10: Calibration calculation unit,
11: Calibration parameter storage unit,
12 ... CPU,
13 ... Distance image generation unit,
14 ... distance calculation part,
15 ... Calibration deviation re-correction unit,
16, 17 ... correlation window,
22 ... Projector,
23... Binarization unit,
24: Character recognition unit.
Claims (7)
上記複数のカメラによって取得された複数のカメラキャリブレーションボードの撮影画像を用いてカメラキャリブレーションを行ってキャリブレーションパラメータを算出するキャリブレーション演算部と、
上記算出されたキャリブレーションパラメータを記憶する記憶部と、
上記複数のカメラによって取得された複数の上記計測対象物の画像に含まれる歪み,傾きおよびずれのうちの少なくとも一つを含む誤差を、上記キャリブレーションパラメータを用いて補正するステレオ平行化処理を行うステレオ平行化処理と、
上記ステレオ平行化処理後の複数の画像間のずれを、上記ステレオ平行化処理後の各画像における互いに対応する画素を探索して得られたデータを用いて再補正するキャリブレーションずれ再補正部と、
上記キャリブレーションずれ再補正部によって再補正された複数の上記計測対象物の画像における互いに対応する画素を対応点として探索すると共に、探索された複数の上記対応点間の距離であって上記複数のカメラのうちの少なくとも2つが配列されている方向への距離を表す視差情報を生成する対応点探索部と、
上記対応点探索部によって生成された上記視差情報から上記計測対象物までの距離情報を求める距離情報生成部と
を備えたことを特徴とするステレオ3次元計測装置。 A plurality of cameras that take images of measurement objects and acquire images;
A calibration calculation unit that calculates a calibration parameter by performing camera calibration using captured images of a plurality of camera calibration boards acquired by the plurality of cameras;
A storage unit for storing the calculated calibration parameter;
A stereo parallelization process is performed to correct an error including at least one of distortion, inclination, and shift included in the images of the plurality of measurement objects acquired by the plurality of cameras using the calibration parameter. Stereo parallelization processing,
A calibration deviation recorrector that recorrects the shift between the plurality of images after the stereo parallelization processing using data obtained by searching for pixels corresponding to each other in the images after the stereo parallelization processing; ,
The pixels corresponding to each other in the images of the plurality of measurement objects recorrected by the calibration deviation recorrection unit are searched as corresponding points, and the distances between the searched corresponding points are the plurality of the plurality of corresponding points. A corresponding point search unit that generates disparity information indicating a distance in a direction in which at least two of the cameras are arranged;
A stereo three-dimensional measurement apparatus comprising: a distance information generation unit that obtains distance information from the parallax information generated by the corresponding point search unit to the measurement object.
上記2つのカメラが配列されている方向をx方向とし、上記2つのカメラによって撮影されている画像の面内で上記x方に直交する方向をy方向とした場合に、
上記キャリブレーションずれ再補正部は、上記ステレオ平行化処理後の各画像間における少なくとも上記y方向のずれを再補正する
ことを特徴とするステレオ3次元計測装置。 The stereo three-dimensional measurement apparatus according to claim 1,
When the direction in which the two cameras are arranged is the x direction and the direction orthogonal to the x direction in the plane of the image captured by the two cameras is the y direction,
The calibration deviation re-correction unit re-corrects at least the deviation in the y direction between the images after the stereo parallelization process.
上記計測対象物に対して2次元ランダムテクスチャを投影するプロジェクタを備えた
ことを特徴とするステレオ3次元計測装置。 In the stereo three-dimensional measuring apparatus according to claim 1 or 2,
A stereo three-dimensional measurement apparatus comprising a projector that projects a two-dimensional random texture onto the measurement object.
上記キャリブレーションずれ再補正部は、上記ステレオ平行化処理後の複数の画像から基準となる基準画像とこの基準画像と比較される残りの比較画像の夫々とでなる画像対を順次選択し、この選択された画像対の上記比較画像を上記基準画像に対して上記y方向にずらしながら両画像における互いに対応する画素を探索して上記データとしての探索パラメータを得、この得られた探索パラメータに基づいて上記比較画像の最適なずらし位置を求め、上記比較画像を上記基準画像に対して上記最適なずらし位置まで上記y方向にずらすことによって上記複数の画像間のずれを再補正する
ことを特徴とするステレオ3次元計測装置。 In the stereo three-dimensional measuring apparatus according to claim 2 or 3,
The calibration deviation re-correction unit sequentially selects image pairs each including a reference image serving as a reference and a remaining comparison image compared with the reference image from the plurality of images after the stereo parallelization processing. A search parameter as the data is obtained by searching for a corresponding pixel in both images while shifting the comparison image of the selected image pair in the y direction with respect to the reference image, and based on the obtained search parameter Determining an optimal shift position of the comparison image, and re-correcting the shift between the plurality of images by shifting the comparison image in the y direction to the optimal shift position with respect to the reference image. Stereo three-dimensional measuring device.
上記記憶部は、上記キャリブレーションずれ再補正部によって求められた上記最適なずらし位置をも記憶するようになっており、
上記キャリブレーションずれ再補正部は、上記複数の画像間のずれを再補正する場合には、上記記憶部に記憶されている上記最適なずらし位置を用いて、上記比較画像を上記基準画像に対して上記最適なずらし位置まで上記y方向にずらすようになっている
ことを特徴とするステレオ3次元計測装置。 The stereo three-dimensional measurement apparatus according to claim 4,
The storage unit also stores the optimal shift position obtained by the calibration shift recorrection unit,
The calibration deviation re-correction unit, when re-correcting the deviation between the plurality of images, uses the optimum shift position stored in the storage unit to compare the comparison image with the reference image. A stereo three-dimensional measuring apparatus characterized by being shifted in the y direction up to the optimum shift position.
上記対応点探索部は、上記対応点探索および上記視差情報の生成を行っている際に上記探索パラメータを監視し、上記探索パラメータの値が最適値よりも所定の値を超えて悪化した場合には、上記キャリブレーションずれ再補正部に対して、上記最適なずらし位置の再取得を指示する
ことを特徴とするステレオ3次元計測装置。 The stereo three-dimensional measurement apparatus according to claim 5,
The corresponding point search unit monitors the search parameter when performing the corresponding point search and the generation of the disparity information, and when the value of the search parameter deteriorates beyond a predetermined value beyond a predetermined value. A stereo three-dimensional measurement apparatus characterized by instructing the calibration shift re-correction unit to reacquire the optimal shift position.
少なくとも上記距離情報生成部によって生成された上記距離情報を表示する表示部を備え、
上記キャリブレーションずれ再補正部は、得られた上記複数の探索パラメータの値が予め設定された設定値に満たない場合には、上記キャリブレーション演算部による上記カメラキャリブレーションの実行を促す情報を上記表示部に表示させるようになっている
ことを特徴とするステレオ3次元計測装置。 The stereo three-dimensional measurement apparatus according to claim 6,
A display unit that displays at least the distance information generated by the distance information generation unit;
The calibration deviation re-correction unit, when the obtained values of the plurality of search parameters are less than a preset setting value, information that prompts the calibration calculation unit to execute the camera calibration A stereo three-dimensional measuring apparatus characterized by being displayed on a display unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011257349A JP2013113600A (en) | 2011-11-25 | 2011-11-25 | Stereo three-dimensional measuring apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011257349A JP2013113600A (en) | 2011-11-25 | 2011-11-25 | Stereo three-dimensional measuring apparatus |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2013113600A true JP2013113600A (en) | 2013-06-10 |
Family
ID=48709280
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2011257349A Pending JP2013113600A (en) | 2011-11-25 | 2011-11-25 | Stereo three-dimensional measuring apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2013113600A (en) |
Cited By (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2016080399A (en) * | 2014-10-10 | 2016-05-16 | エヌ・ティ・ティ・インフラネット株式会社 | Three-dimensional shape measurement device and three-dimensional shape measurement method |
| US9524557B2 (en) | 2013-12-24 | 2016-12-20 | Hyundai Motor Company | Vehicle detecting method and system |
| EP3128482A1 (en) | 2015-08-07 | 2017-02-08 | Xovis AG | Method for calibration of a stereo camera |
| KR20170039608A (en) * | 2015-10-01 | 2017-04-11 | 라온피플 주식회사 | System for clibration and method threrof |
| CN107532881A (en) * | 2015-05-15 | 2018-01-02 | 华为技术有限公司 | The method and terminal of a kind of measurement |
| JP2018112522A (en) * | 2017-01-13 | 2018-07-19 | 株式会社東芝 | Image processing device and image processing method |
| WO2019003771A1 (en) | 2017-06-26 | 2019-01-03 | 日立オートモティブシステムズ株式会社 | Imaging device |
| WO2019087253A1 (en) * | 2017-10-30 | 2019-05-09 | オリンパス株式会社 | Stereo camera calibration method |
| JP2019078716A (en) * | 2017-10-27 | 2019-05-23 | キヤノン株式会社 | Distance measuring device, distance measuring system, imaging apparatus, mobile body, method for controlling distance measuring device, and program |
| WO2019216229A1 (en) * | 2018-05-09 | 2019-11-14 | ソニー株式会社 | Data processing device, data processing method, and program |
| JP2020193950A (en) * | 2019-05-30 | 2020-12-03 | キヤノン株式会社 | Image processing device, method of controlling image processing device, and program |
| JP2021076495A (en) * | 2019-11-11 | 2021-05-20 | キヤノン株式会社 | Parallax detection device, imaging apparatus, parallax detection method, and program |
| CN113424021A (en) * | 2019-02-12 | 2021-09-21 | 日立安斯泰莫株式会社 | Image processing apparatus |
| JP2022001879A (en) * | 2017-09-08 | 2022-01-06 | 株式会社小松製作所 | Work machine measurement system, work machine, and work machine measurement method |
| WO2024014265A1 (en) * | 2022-07-12 | 2024-01-18 | ソニーグループ株式会社 | Moving body, calibration method, and program |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001147110A (en) * | 1999-11-22 | 2001-05-29 | Sony Corp | Random pattern generation device and method, range image generation device and method, and program providing medium |
| JP2010128575A (en) * | 2008-11-25 | 2010-06-10 | Nec System Technologies Ltd | Stereo image processing device, stereo image processing method, and program |
| JP2010197198A (en) * | 2009-02-25 | 2010-09-09 | Roland Dg Corp | Highly precise stereo camera calibration by difference in image |
-
2011
- 2011-11-25 JP JP2011257349A patent/JP2013113600A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001147110A (en) * | 1999-11-22 | 2001-05-29 | Sony Corp | Random pattern generation device and method, range image generation device and method, and program providing medium |
| JP2010128575A (en) * | 2008-11-25 | 2010-06-10 | Nec System Technologies Ltd | Stereo image processing device, stereo image processing method, and program |
| JP2010197198A (en) * | 2009-02-25 | 2010-09-09 | Roland Dg Corp | Highly precise stereo camera calibration by difference in image |
Cited By (29)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9524557B2 (en) | 2013-12-24 | 2016-12-20 | Hyundai Motor Company | Vehicle detecting method and system |
| JP2016080399A (en) * | 2014-10-10 | 2016-05-16 | エヌ・ティ・ティ・インフラネット株式会社 | Three-dimensional shape measurement device and three-dimensional shape measurement method |
| US10552971B2 (en) | 2015-05-15 | 2020-02-04 | Huawei Technologies Co., Ltd. | Measurement method, and terminal |
| CN107532881A (en) * | 2015-05-15 | 2018-01-02 | 华为技术有限公司 | The method and terminal of a kind of measurement |
| JP2018519500A (en) * | 2015-05-15 | 2018-07-19 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Measuring method and terminal |
| CN107532881B (en) * | 2015-05-15 | 2020-02-14 | 华为技术有限公司 | Measurement method and terminal |
| EP3128482A1 (en) | 2015-08-07 | 2017-02-08 | Xovis AG | Method for calibration of a stereo camera |
| WO2017025214A1 (en) | 2015-08-07 | 2017-02-16 | Xovis Ag | Method for calibration of a stereo camera |
| US10679380B2 (en) | 2015-08-07 | 2020-06-09 | Xovis Ag | Method for calibration of a stereo camera |
| KR20170039608A (en) * | 2015-10-01 | 2017-04-11 | 라온피플 주식회사 | System for clibration and method threrof |
| KR101892155B1 (en) * | 2015-10-01 | 2018-08-28 | 라온피플 주식회사 | System for clibration and method threrof |
| JP2018112522A (en) * | 2017-01-13 | 2018-07-19 | 株式会社東芝 | Image processing device and image processing method |
| US10510163B2 (en) | 2017-01-13 | 2019-12-17 | Kabushiki Kaisha Toshiba | Image processing apparatus and image processing method |
| WO2019003771A1 (en) | 2017-06-26 | 2019-01-03 | 日立オートモティブシステムズ株式会社 | Imaging device |
| JP2022001879A (en) * | 2017-09-08 | 2022-01-06 | 株式会社小松製作所 | Work machine measurement system, work machine, and work machine measurement method |
| JP7135191B2 (en) | 2017-09-08 | 2022-09-12 | 株式会社小松製作所 | Working machine measurement system, working machine, and working machine measurement method |
| JP7057097B2 (en) | 2017-10-27 | 2022-04-19 | キヤノン株式会社 | Control methods and programs for distance measuring devices, distance measuring systems, imaging devices, moving objects, and distance measuring devices |
| JP2019078716A (en) * | 2017-10-27 | 2019-05-23 | キヤノン株式会社 | Distance measuring device, distance measuring system, imaging apparatus, mobile body, method for controlling distance measuring device, and program |
| US11295478B2 (en) | 2017-10-30 | 2022-04-05 | Olympus Corporation | Stereo camera calibration method and image processing device for stereo camera |
| WO2019087253A1 (en) * | 2017-10-30 | 2019-05-09 | オリンパス株式会社 | Stereo camera calibration method |
| WO2019216229A1 (en) * | 2018-05-09 | 2019-11-14 | ソニー株式会社 | Data processing device, data processing method, and program |
| US11438570B2 (en) * | 2018-05-09 | 2022-09-06 | Sony Corporation | Data processing apparatus and data processing method for generation of calibration data for performing image processing |
| CN113424021A (en) * | 2019-02-12 | 2021-09-21 | 日立安斯泰莫株式会社 | Image processing apparatus |
| JP2020193950A (en) * | 2019-05-30 | 2020-12-03 | キヤノン株式会社 | Image processing device, method of controlling image processing device, and program |
| JP7240258B2 (en) | 2019-05-30 | 2023-03-15 | キヤノン株式会社 | IMAGE PROCESSING DEVICE, CONTROL METHOD AND PROGRAM OF IMAGE PROCESSING DEVICE |
| JP2021076495A (en) * | 2019-11-11 | 2021-05-20 | キヤノン株式会社 | Parallax detection device, imaging apparatus, parallax detection method, and program |
| JP7341033B2 (en) | 2019-11-11 | 2023-09-08 | キヤノン株式会社 | Parallax detection device, imaging device, parallax detection method, and program |
| US11909942B2 (en) | 2019-11-11 | 2024-02-20 | Canon Kabushiki Kaisha | Parallax detecting apparatus, image capturing apparatus, parallax detecting method, and storage medium |
| WO2024014265A1 (en) * | 2022-07-12 | 2024-01-18 | ソニーグループ株式会社 | Moving body, calibration method, and program |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2013113600A (en) | Stereo three-dimensional measuring apparatus | |
| US11985293B2 (en) | System and methods for calibration of an array camera | |
| CN110390719B (en) | Reconstruction equipment based on flight time point cloud | |
| JP6934026B2 (en) | Systems and methods for detecting lines in a vision system | |
| CN109405765B (en) | A high-precision depth calculation method and system based on speckle structured light | |
| CN103053154B (en) | The auto-focusing of stereoscopic camera | |
| WO2023201578A1 (en) | Extrinsic parameter calibration method and device for monocular laser speckle projection system | |
| JP2013174547A (en) | Stereo three-dimensional measuring instrument | |
| JP6570296B2 (en) | Image processing apparatus, image processing method, and program | |
| CN112184811B (en) | Monocular space structured light system structure calibration method and device | |
| JP2010041419A (en) | Image processor, image processing program, image processing method, and electronic apparatus | |
| JP4055998B2 (en) | Distance detection device, distance detection method, and distance detection program | |
| CN108564540A (en) | Remove image processing method, device and the terminal device that eyeglass is reflective in image | |
| JP2019530059A (en) | Method for independently processing multiple target areas | |
| CN114383564A (en) | Depth measurement method, device, device and storage medium based on binocular camera | |
| CN115830131B (en) | Method, device and equipment for determining fixed phase deviation | |
| JP6009206B2 (en) | 3D measuring device | |
| JP2014155063A (en) | Chart for resolution measurement, resolution measurement method, positional adjustment method for camera module, and camera module manufacturing method | |
| WO2022171003A1 (en) | Camera calibration method and apparatus, and electronic device | |
| CN116563388B (en) | Calibration data acquisition method, device, electronic equipment and storage medium | |
| TWI536206B (en) | Locating method, locating device, depth determining method and depth determining device of operating body | |
| US10091469B2 (en) | Image processing apparatus, image processing method, and storage medium | |
| CN115375773A (en) | External parameter calibration method and related device for monocular laser speckle projection system | |
| CN114926538A (en) | External parameter calibration method and device for monocular laser speckle projection system | |
| JP2016156702A (en) | Imaging device and imaging method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20141001 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20150706 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20150714 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20151110 |