JPH0674762A - Distance measuring apparatus - Google Patents

Distance measuring apparatus

Info

Publication number
JPH0674762A
JPH0674762A JP4230761A JP23076192A JPH0674762A JP H0674762 A JPH0674762 A JP H0674762A JP 4230761 A JP4230761 A JP 4230761A JP 23076192 A JP23076192 A JP 23076192A JP H0674762 A JPH0674762 A JP H0674762A
Authority
JP
Japan
Prior art keywords
image
focus position
focus
dimensional
focal
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
Application number
JP4230761A
Other languages
Japanese (ja)
Inventor
Kazuo Sonobe
和夫 園部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Optical Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Optical Co Ltd filed Critical Olympus Optical Co Ltd
Priority to JP4230761A priority Critical patent/JPH0674762A/en
Publication of JPH0674762A publication Critical patent/JPH0674762A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide a distance measuring apparatus in which stereo images imaged at different focal points are utilized in the measurement of distance in order to obtain highly accurate information of an object which is present in a range wider than the depth of focus of an optical system. CONSTITUTION:An imaging system comprising focal point operating sections 2a, 2b, lenses 3a, 3b, and imaging elements 5a, 5b produces a stereo image at same focal point. A focal point setting unit 1 sets a plurality of focal points for producing stereo images. A corresponding point detector 9 subjects the stereo images to corresponding point detection and a three-dimensional coordinate calculating unit 10 calculates three-dimensional coordinates from the corresponding points thus detected. A selector 14 subjects the three-dimensional coordinates, calculated through the three-dimensional calculating unit 10, to decision based on the focal point and focal depth thus obtaining distance information.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は距離測定装置に関し、
特に視差を含んだ複数の画像を用いて測定を行う距離測
定装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a distance measuring device,
In particular, the present invention relates to a distance measuring device that performs measurement using a plurality of images including parallax.

【0002】[0002]

【従来の技術】従来より、コンピュータビジョン等の分
野では、撮像した画像から距離情報を得ることが求めら
れている。画像から距離情報を得るものとしては、例え
ば、視差を有した複数の画像から相関を用いて対応点検
出を行い、図15に示されるように三角測量と同じ原理
によって距離情報を計算する方法が知られている。この
方法は、例えば、杉原厚吉著「画像を利用した立体計測
法の動向」、[第17回画像工学コンファレンス論文集
2−1、31−36頁、(1986)]に記載されてい
る。以上の方法により、画像から距離情報を得ることが
できる。
2. Description of the Related Art Conventionally, in the field of computer vision and the like, it has been required to obtain distance information from a captured image. For obtaining distance information from an image, for example, a method of detecting corresponding points from a plurality of images having parallax using correlation and calculating distance information by the same principle as triangulation as shown in FIG. Are known. This method is described, for example, in “Trends of stereoscopic measurement methods using images” by Kokichi Sugihara, [17th Conference on Image Engineering Conference, 2-1, pp. 31-36, (1986)]. By the above method, distance information can be obtained from the image.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、これら
の処理に用いる画像を結像光学系によって得た場合に
は、次のような問題点が生じる。結像光学系を通して得
られた画像は、焦点深度の影響を受けることになるの
で、光学系の光軸方向に対して焦点深度内に含まれる対
象物に関してはシャープな像を得ることができる。しか
しながら、焦点深度を外れた対象物に関しては、シャー
プな像は得られずぼやけた像となる。ところが、ぼやけ
た像に対する精度の良い対応点検出は困難である。した
がって、光学系の焦点深度より広い範囲に存在する対象
物に対して、精度の良い対応点検出を行い、距離情報を
得るのは困難であることがわかる。
However, when the image used for these processes is obtained by the imaging optical system, the following problems occur. Since the image obtained through the imaging optical system is affected by the depth of focus, it is possible to obtain a sharp image of an object included within the depth of focus with respect to the optical axis direction of the optical system. However, with respect to the object out of the depth of focus, a sharp image cannot be obtained and a blurred image is obtained. However, it is difficult to detect corresponding points with high accuracy for a blurred image. Therefore, it can be seen that it is difficult to accurately detect corresponding points and obtain distance information for an object existing in a range wider than the depth of focus of the optical system.

【0004】この発明は上記課題に鑑みてなされたもの
で、光学系の焦点深度より広い範囲に存在する対象物に
対しても、精度の良い距離情報を得ることができる距離
測定装置を提供することを目的とする。
The present invention has been made in view of the above problems, and provides a distance measuring device capable of obtaining accurate distance information even for an object existing in a range wider than the depth of focus of an optical system. The purpose is to

【0005】[0005]

【課題を解決するための手段】すなわちこの発明は、同
一焦点位置でステレオ画像を撮像する撮像装置と、上記
ステレオ画像を撮像する焦点位置を複数設定する焦点位
置設定手段と、上記ステレオ画像に対応点検出を行う対
応点検出手段と、この対応点検出手段が検出した対応点
から三次元座標を算出する三次元座標算出手段と、この
三次元座標算出手段が算出した三次元座標を上記焦点位
置と焦点深度に基いた判定に応じて距離情報を得る判定
手段とを具備することを特徴とする。
That is, the present invention corresponds to an image pickup device for picking up a stereo image at the same focus position, a focus position setting means for setting a plurality of focus positions for picking up the stereo image, and the stereo image. Corresponding point detecting means for detecting points, three-dimensional coordinate calculating means for calculating three-dimensional coordinates from the corresponding points detected by the corresponding point detecting means, and three-dimensional coordinates calculated by the three-dimensional coordinate calculating means for the focal point position. And a determination unit that obtains distance information according to the determination based on the depth of focus.

【0006】[0006]

【作用】この発明の距離測定装置にあっては、撮像装置
により同一焦点位置でステレオ画像が撮像され、焦点位
置設定手段によって上記ステレオ画像を撮像する焦点位
置が複数設定される。また、上記ステレオ画像に対し
て、対応点検出手段で対応点検出が行われ、この対応点
検出手段が検出した対応点から、三次元座標算出手段に
於いて三次元座標が算出される。そして、この三次元座
標算出手段が算出した三次元座標が、判定手段にて上記
焦点位置と焦点深度に基いて判定が行われて距離情報が
得られる。
In the distance measuring device of the present invention, the image pickup device picks up a stereo image at the same focus position, and the focus position setting means sets a plurality of focus positions for picking up the stereo image. Corresponding point detection means performs corresponding point detection on the stereo image, and three-dimensional coordinate calculation means calculates three-dimensional coordinates from the corresponding points detected by the corresponding point detection means. Then, the three-dimensional coordinates calculated by the three-dimensional coordinate calculating means are judged by the judging means based on the focal position and the focal depth, and the distance information is obtained.

【0007】[0007]

【実施例】以下、図面を参照してこの発明の実施例を説
明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0008】この発明では、図3(a)に示されるよう
なステレオ画像を、図3(b)に示されるような、異な
る焦点位置で複数撮影し、この異なる焦点位置で撮影さ
れたステレオ画像を距離測定に利用することにより、光
学系の焦点深度より広い範囲に存在する対象物に対して
も、精度の良い距離情報を得られるようにする。
According to the present invention, a plurality of stereo images as shown in FIG. 3A are photographed at different focal positions as shown in FIG. 3B, and stereo images photographed at the different focal positions. Is used for distance measurement, it is possible to obtain accurate distance information even for an object existing in a range wider than the depth of focus of the optical system.

【0009】第1の実施例に於いては、図3(a)に示
されるようなステレオ画像に対応点検出と三次元座標算
出を行い、そのステレオ画像を撮影した時の焦点位置と
焦点深度を用いる。そして、得られた三次元座標が焦点
深度内にある場合にのみ、三次元座標を受け入れるよう
にする。
In the first embodiment, the corresponding points are detected and the three-dimensional coordinates are calculated for the stereo image as shown in FIG. 3A, and the focus position and the depth of focus when the stereo image is photographed. To use. Then, the three-dimensional coordinates are accepted only when the obtained three-dimensional coordinates are within the depth of focus.

【0010】また、図3(b)に示されるように、複数
の異なる焦点位置で得られるステレオ画像のそれぞれに
対しても同様の処理を行う。それぞれの焦点位置で得ら
れた三次元座標を統合することにより、焦点深度の影響
によって、ぼやけた部分の画像を用いずに、光学系の焦
点深度より広い範囲に存在する対象物全体の三次元座標
を得ることができる。
Further, as shown in FIG. 3B, the same processing is performed on each of the stereo images obtained at a plurality of different focus positions. By integrating the three-dimensional coordinates obtained at each focal position, the three-dimensional coordinates of the entire object existing in a range wider than the focal depth of the optical system are not used due to the effect of the depth of focus, without using the image of the blurred portion. You can get the coordinates.

【0011】図1及び図2を参照して、この発明の第1
の実施例を説明する。図1はこの発明の距離測定装置の
構成を示すブロック図であり、1は焦点位置設定装置で
ある。この焦点位置設定装置1は、焦点位置操作部2a
及び2bを通して、それぞれレンズ3a及び3bを駆動
し、所定の焦点位置で撮像する。セレクタ4a及び4b
は、撮像素子5a及び5bからA/D変換器6a及び6
bでA/D変換した画像を受ける。また、セレクタ4a
及び4bは、焦点位置設定装置1からの指示により、画
像をメモリ7a1 、7a2 、…、7am 及び7b1 、7
2 、…、7bm に格納する。
Referring to FIGS. 1 and 2, the first aspect of the present invention is described.
An example will be described. FIG. 1 is a block diagram showing the configuration of the distance measuring device of the present invention, and 1 is a focal position setting device. The focus position setting device 1 includes a focus position operation unit 2a.
And 2b to drive the lenses 3a and 3b, respectively, to pick up an image at a predetermined focus position. Selectors 4a and 4b
Is from the image pickup devices 5a and 5b to the A / D converters 6a and 6
Receive the A / D converted image in b. Also, the selector 4a
And 4b, by an instruction from the focus position setting device 1, an image memory 7a 1, 7a 2, ..., 7a m and 7b 1, 7
Stored in b 2 , ..., 7b m .

【0012】セレクタ8a及び8bは、焦点位置設定装
置1からの指示に従って、メモリ7a1 、7a2 、…、
7am 及び7b1 、7b2 、…、7bm から画像を取出
し、対応点検出装置9に送る。三次元座標算出装置10
は、対応点検出装置9から三次元座標に対応する濃度値
を得て、セレクタ11に出力する。このセレクタ11
は、焦点位置設定装置1からの指示により、メモリ12
1 、122 、…、12m に格納する。
The selectors 8a and 8b follow the instructions from the focus position setting device 1 and store the memories 7a 1 , 7a 2 ,.
Images are picked up from 7a m and 7b 1 , 7b 2 , ..., 7b m and sent to the corresponding point detecting device 9. Three-dimensional coordinate calculation device 10
The density value corresponding to the three-dimensional coordinates is obtained from the corresponding point detection device 9 and is output to the selector 11. This selector 11
Is a memory 12 according to an instruction from the focus position setting device 1.
Stored in 1 , 12 2 , ..., 12 m .

【0013】メモリ121 、122 、…、12m の出力
は、セレクタ13を介して選択装置14に供給される。
この選択装置14により選択された濃度値がメモリ15
に格納される。そして、投影装置16は、メモリ15に
格納されている三次元座標に対応する濃度値、すなわち
三次元画像を適当な方向に投影し、D/A変換器17を
介してモニタ18に出力する。次に、図2のフローチャ
ートを参照して、第1の実施例の動作を説明する。
The outputs of the memories 12 1 , 12 2 , ..., 12 m are supplied to a selector 14 via a selector 13.
The density value selected by the selection device 14 is stored in the memory 15.
Stored in. Then, the projection device 16 projects the density value corresponding to the three-dimensional coordinates stored in the memory 15, that is, the three-dimensional image in an appropriate direction, and outputs it to the monitor 18 via the D / A converter 17. Next, the operation of the first embodiment will be described with reference to the flowchart of FIG.

【0014】焦点位置設定装置1は、1番目の画像i
a-1 、ib-1 を撮像するという意味でnに1を初期設定
する(ステップS1)。次に、焦点位置設定装置1は、
焦点位置操作部2aを通してレンズ3aを駆動し、n番
目の画像ia-n を焦点位置fnで撮像する。また、焦点
位置設定装置1は焦点位置操作部2bを通してレンズ3
bを駆動し、n番目の画像ib-n を焦点位置fn で撮像
する(ステップS2)。
The focus position setting device 1 uses the first image i
Initially set to 1 in the sense of imaging a-1 and i b-1 (step S1). Next, the focus position setting device 1
The lens 3a is driven through focus position operating unit 2a, images the n-th image i an, at the focal position f n. Further, the focus position setting device 1 uses the focus position operation unit 2b to move the lens 3
b is driven and the nth image i bn is imaged at the focus position f n (step S2).

【0015】そして、A/D変換器6aは撮像素子5a
からの画像をA/D変換し、セレクタ4aに送る。同様
に、A/D変換器6bは撮像素子5bからの画像をA/
D変換し、セレクタ4bに送る。セレクタ4aは焦点位
置設定装置1からnを受けて、画像ia-n をメモリ7a
n に格納する。また、セレクタ4bは焦点位置設定装置
1からnを受けて、画像ib-n をメモリ7bn に格納す
る(ステップS3)。
The A / D converter 6a is an image pickup device 5a.
The image from is converted into A / D and sent to the selector 4a. Similarly, the A / D converter 6b converts the image from the image sensor 5b into A / D
D-convert and send to the selector 4b. The selector 4a receives n from the focus position setting device 1 and stores the image i an in the memory 7a.
Store in n . Further, the selector 4b receives n from the focus position setting device 1 and stores the image i bn in the memory 7b n (step S3).

【0016】次いで、焦点位置設定装置1は画像の番号
を表すnに1を加える(ステップS4)。この焦点位置
設定装置1は、画像の番号を表すnと予定画像番号mと
を比較し(ステップS5)、n≦mが成り立っている間
はステップS2〜S4を繰返す。
Next, the focus position setting device 1 adds 1 to n representing the image number (step S4). The focus position setting device 1 compares n representing the image number with the scheduled image number m (step S5), and repeats steps S2 to S4 while n ≦ m holds.

【0017】上述したステップS1〜S5までの操作に
よって、メモリ7a1 、7a2 、…、7an 、…、7a
m には、焦点位置f1 の画像ia-1 、焦点位置f2 の画
像ia-2 、…、焦点位置fn の画像ia-n 、…、焦点位
置fm の画像ia-m の画像が格納され、メモリ7b1
7b2 、…、7bn 、…、7bm には、焦点位置f1
画像ib-1 、焦点位置f2 の画像ib-2 、…、焦点位置
n の画像ib-n 、…、焦点位置fm の画像ib-m の画
像が格納される。
By the operations in steps S1 to S5 described above, the memories 7a 1 , 7a 2 , ..., 7a n ,.
The m, image i a-1 focus position f 1, image i a-2 of the focal position f 2, ..., the image i an, the focal position f n, ..., an image of the image i am focus position f m Stored in memory 7b 1 ,
7b 2, ..., 7b n, ..., the 7b m, image i b-1 focus position f 1, image i b-2 of the focal position f 2, ..., image i bn focus position f n, ..., The image of the image i bm at the focus position f m is stored.

【0018】次に、焦点位置設定装置1は、1番目の画
像ia-1 、ib-1 を処理するという意味でnに1を設定
する(ステップS6)。セレクタ8aは焦点位置設定装
置1からnを受けてメモリ7an から画像ia-n を取出
し、対応点検出装置9に送る。同様に、セレクタ8bは
焦点位置設定装置1からnを受けてメモリ7bn から画
像ib-n を取出し、対応点検出装置9に送る。対応点検
出装置9は画像ia-nと画像ib-n に対して対応点検出
を行い、ln 個の対応点の画像ia-n 内での座標(xa
k ,ya k )と画像ib-n 内での座標(xb k
b k )を得る(ステップS7)。
Next, the focus position setting device 1 sets n to 1 in the sense of processing the first images i a-1 and i b-1 (step S6). The selector 8a receives n from the focus position setting device 1, retrieves the image i an from the memory 7a n , and sends it to the corresponding point detection device 9. Similarly, the selector 8b receives n from the focus position setting device 1, extracts the image i bn from the memory 7b n , and sends it to the corresponding point detection device 9. Corresponding point detecting device 9 performs corresponding point detection on the image i an, and the image i bn, l n pieces of image i an, in a coordinate of the corresponding point (x a
k , Y a k ) And the coordinates (x b k in the image i bn
y b k ) Is obtained (step S7).

【0019】三次元座標算出装置10は、対応点検出装
置9から(xa k ,ya k )と(xb k ,yb k )とl
n を得る。そして、三次元座標算出装置10は1番目の
対応点に処理を行うという意味で、kに1をセットする
(ステップS8)。また、三次元座標算出装置10は、
k番目の対応点の画像ia-n 内での座標(xa k ,ya
k )と画像ib-n 内での座標(xb k ,yb k )から、
三角測量と同様な原理に基いて、k番目の対応点の三次
元座標(Xk ,Yk ,Zk )を求める(ステップS
9)。
The three-dimensional coordinate calculation device 10 receives the (x a k , Y a k ) And (x b k , Y b k ) And l
get n Then, the three-dimensional coordinate calculation device 10 sets k to 1 in the sense that the first corresponding point is processed (step S8). In addition, the three-dimensional coordinate calculation device 10
The coordinates (x a k) in the image i an of the k-th corresponding point , Y a
k ) And the coordinates (x b k in the image i bn , Y b k ) From
Based on the same principle as triangulation, the three-dimensional coordinates (X k , Y k , Z k ) Is calculated (step S
9).

【0020】上記三次元座標算出装置10は、得られた
三次元座標(Xk ,Yk ,Zk )に対する濃度値F
n (Xk ,Yk ,Zk )に、濃度値ia-n (xa k ,y
a k )、または濃度値ib-n (xa k ,ya k )を代入
する(ステップS10)。次に、セレクタ11は、三次
元座標算出装置10から三次元座標に対応する濃度値F
n (Xk ,Yk ,Zk )を得る。それと共に、焦点位置
設定装置1からnを受けて、上記濃度値Fn (Xk ,Y
k ,Zk )をメモリ12n に格納する(ステップS1
1)。
The above-mentioned three-dimensional coordinate calculation device 10 is provided with the obtained three-dimensional coordinates (X k , Y k , Z k ) Concentration value F
n (X k , Y k , Z k ), The concentration value i an (x a k , Y
a k ), Or the density value i bn (x a k , Y a k ) Is substituted (step S10). Next, the selector 11 instructs the density value F corresponding to the three-dimensional coordinates from the three-dimensional coordinate calculation device 10.
n (X k , Y k , Z k ) Get. At the same time, by receiving n from the focus position setting device 1, the density value F n (X k , Y
k , Z k ) Is stored in the memory 12 n (step S1)
1).

【0021】更に、三次元座標算出装置10は、対応点
の番号を示すkに1を加える(ステップS12)。そし
て、三次元座標算出装置10は、対応点の番号を表すk
と対応点の個数を表すln とを比較し(ステップS1
3)、k≦ln が成り立っている間はステップS9〜S
12を繰返す。
Further, the three-dimensional coordinate calculating apparatus 10 adds 1 to k indicating the corresponding point number (step S12). Then, the three-dimensional coordinate calculation device 10 uses k representing the corresponding point number.
And l n representing the number of corresponding points are compared (step S1
3), while the k ≦ l n are composed step S9~S
Repeat 12.

【0022】一方、上述したステップS8〜S13の操
作によって、メモリ12n にはn番目の画像から得られ
るln 個の三次元座標に対応する濃度値Fn (Xk ,Y
k ,Zk )が格納される。焦点位置設定装置1は、画像
の番号を表すnに1を加える(ステップS14)。
On the other hand, the density values F n (X k corresponding to 1 n three-dimensional coordinates obtained from the n-th image are stored in the memory 12 n by the above-described operations of steps S8 to S13. , Y
k , Z k ) Is stored. The focus position setting device 1 adds 1 to n representing the image number (step S14).

【0023】ここで、焦点位置設定装置1は、画像の番
号を表すnと予定画像番号mとを比較し(ステップS1
5)、n≦mが成り立っている間は、ステップS7〜S
14を繰返す。また、上述したステップS6〜S15の
操作によって、メモリ121、122 、…、12n
…、12m には、l1 個の三次元座標に対応する濃度値 F1 (Xk ,Yk ,Zk )、l2 個の三次元座標に対応
する濃度値 F2 (Xk ,Yk ,Zk )、…、ln 個の三次元座標に
対応する濃度値 Fn (Xk ,Yk ,Zk )、…、lm 個の三次元座標に
対応する濃度値 Fm (Xk ,Yk ,Zk )が、それぞれ格納される。
Here, the focus position setting device 1 compares n representing the image number with the planned image number m (step S1).
5), while n ≦ m holds, steps S7 to S
Repeat 14. Further, by the operation of step S6~S15 described above, the memory 12 1, 12 2, ..., 12 n,
..., 12 m , density values F 1 (X k corresponding to l 1 three-dimensional coordinates , Y k , Z k ), And the density value F 2 (X k corresponding to the three-dimensional coordinates of l 2 pieces) , Y k , Z k ), ..., Intensity values F n (X k corresponding to three n- dimensional coordinates , Y k , Z k ), ..., Concentration value F m (X k corresponding to the 1 m three-dimensional coordinates , Y k , Z k ) Are stored respectively.

【0024】次に、焦点位置設定装置1は、l番目の画
像から得られた三次元座標に対応する濃度値F
1 (Xk ,Yk ,Zk )を処理という意味で、nに1を
設定する(ステップS16)。そして、選択装置14
は、n番目の画像から得られた三次元座標に対応する濃
度値Fn (Xk ,Yk ,Zk )の中で、1番目の濃度値
に処理を行うという意味でkに1を設定する(ステップ
S17)。また、選択装置14は、三次元座標(Xk
k ,Zk )のZk が焦点位置fn を中心とする焦点深
度fd の幅の中に入っているか否かを判定する(ステッ
プS18)。ここで焦点深度fd の範囲内であれば、三
次元座標に対応する濃度値Fn (Xk ,Yk ,Zk )を
メモリ15に格納し、そうでなければ何もしない(ステ
ップS19)。
Next, the focus position setting device 1 uses the l-th image
Density value F corresponding to the three-dimensional coordinates obtained from the image
1(Xk , Yk , Zk ) Means processing 1
It is set (step S16). And the selection device 14
Is the darkness corresponding to the three-dimensional coordinates obtained from the nth image.
Degree value Fn(Xk , Yk , Zk ), The first concentration value
1 is set to k to mean that processing is performed (step
S17). In addition, the selection device 14 uses three-dimensional coordinates (Xk
Yk , Zk ) Zk Is the focus position fnDepth of focus centered on
Degree fdWhether it is within the width of
S18). Where depth of focus fdWithin the range of three
Density value F corresponding to dimensional coordinatesn(Xk , Yk , Zk )
Store in memory 15, otherwise do nothing (step
S19).

【0025】次いで、選択装置14は対応点の番号を表
すkに1を加える(ステップS20)。この選択装置1
4は、対応点の番号を表すkと対応点の個数を表すln
とを比較し(ステップS21)、k≦ln が成り立って
いる間はステップS18〜S20を繰返す。
Next, the selection device 14 adds 1 to k representing the corresponding point number (step S20). This selection device 1
4 is k representing the number of corresponding points and l n representing the number of corresponding points
Comparing the door (step S21), and while the k ≦ l n are composed repeats steps S18 to S20.

【0026】上述したステップS17〜S21の操作に
よって、n番目の画像から得られた三次元座標に対応す
る濃度値Fn (Xk ,Yk ,Zk )の中で、選択装置1
4によって選択されたものがメモリ15に格納される。
そして、焦点位置設定装置1は、画像の番号を表すnに
1を加える(ステップS22)。また、焦点位置設定装
置1は、画像の番号を表すnと予定画像番号mとを比較
し(ステップS23)、ここでn≦mが成り立っている
間はステップS17〜S22を繰返す。
By the operations in steps S17 to S21 described above, the density value F n (X k corresponding to the three-dimensional coordinates obtained from the n-th image is obtained. , Y k , Z k ) In the selection device 1
The one selected by 4 is stored in the memory 15.
Then, the focus position setting device 1 adds 1 to n representing the image number (step S22). Further, the focus position setting device 1 compares n representing the image number with the planned image number m (step S23), and repeats steps S17 to S22 while n ≦ m holds.

【0027】次に、上述したステップS16〜S23の
操作によって、全ての画像から得られた三次元座標に対
応する濃度値の中で、選択装置14によって選択された
ものがメモリ15に格納される。投影装置16は、メモ
リ15に格納されている三次元座標に対応する濃度値、
すなわち三次元画像を適当な方向に投影し、D/A変換
器17を通してモニタ18に出力する(ステップS2
4)。
Next, among the density values corresponding to the three-dimensional coordinates obtained from all the images, the one selected by the selection device 14 is stored in the memory 15 by the operations of steps S16 to S23 described above. . The projection device 16 uses the density values corresponding to the three-dimensional coordinates stored in the memory 15,
That is, a three-dimensional image is projected in an appropriate direction and output to the monitor 18 through the D / A converter 17 (step S2).
4).

【0028】このような構成の距離測定装置に以上の動
作を行わせることにより、光学系の焦点深度より広い範
囲に存在する対象物に対しても、精度の良い距離情報を
得ることができる。
By causing the distance measuring device having such a configuration to perform the above operation, accurate distance information can be obtained even for an object existing in a range wider than the depth of focus of the optical system.

【0029】また、一般には焦点位置の異なる複数の画
像を撮影するのであれば、カメラのAF(オートフォー
カス)等に用いられているコントラスト法を用い、単眼
画像であっても一応の距離情報を得ることはできる。し
かし、コントラスト法だけでは光学系の焦点深度より短
い距離を分別することはできず、焦点深度によって分解
能が制限されている。したがって、この発明によれば、
光学系の焦点距離より短い距離に対しても精度の良い距
離情報を得ることができる。次に、この発明の第2の実
施例について説明する。
Further, in general, if a plurality of images having different focal positions are to be photographed, the contrast method used for AF (autofocus) of a camera is used to obtain tentative distance information even for a single-eye image. You can get it. However, the contrast method alone cannot distinguish a distance shorter than the focal depth of the optical system, and the resolution is limited by the focal depth. Therefore, according to the present invention,
It is possible to obtain accurate distance information even for a distance shorter than the focal length of the optical system. Next, a second embodiment of the present invention will be described.

【0030】この第2の実施例に於いては、図3(a)
に示されるようなステレオ画像を、図4(a)、(b)
に示されるような小領域に分割し、図3(b)に示され
るような焦点位置の異なるステレオ画像に対して領域毎
のコントラストカーブを求め、それぞれのコントラスト
カーブから図5(a)、(b)に示されるような距離地
図を得る。但し、この距離地図は焦点深度以下の距離を
分別することはできず、焦点深度によって分解能が制限
されている。この距離地図を利用して対応点検出を行な
うことにより、焦点深度の影響によってぼやけた部分の
画像を用いずに、光学系の焦点深度より広い範囲に存在
する対象物全体の三次元座標を精度良く得ることができ
る。
In this second embodiment, FIG.
The stereo image as shown in FIG.
3B, a contrast curve for each area is obtained for a stereo image with different focus positions as shown in FIG. 3B, and the contrast curves shown in FIGS. Obtain a distance map as shown in b). However, this distance map cannot distinguish the distances below the depth of focus, and the resolution is limited by the depth of focus. By using this distance map to detect corresponding points, the three-dimensional coordinates of the entire object existing in a range wider than the depth of focus of the optical system can be accurately measured without using the image of the part that is blurred due to the influence of the depth of focus. You can get better.

【0031】図6は第2の実施例の構成図、図7は第2
の実施例の動作を説明するフローチャートである。尚、
以下の実施例に於いて、上述した第1の実施例と同じ部
分には同じ参照番号を付し、重複を避けるためその説明
を省略する。
FIG. 6 is a block diagram of the second embodiment, and FIG. 7 is a second diagram.
3 is a flowchart illustrating the operation of the embodiment of FIG. still,
In the following embodiments, the same parts as those in the first embodiment described above are designated by the same reference numerals, and the description thereof will be omitted to avoid duplication.

【0032】この第2の実施例では、図1の構成の距離
測定装置に対し、セレクタ8a、8bと対応点検出装置
9との間に、領域分割装置19a、19b、距離地図作
成装置20a、20b、メモリ21a、21b、領域限
定装置22a、22bが設けられ、セレクタ11、1
3、メモリ121 、122 、…、12m 、選択装置14
が削除されている部分が異なる。
In the second embodiment, with respect to the distance measuring device having the configuration of FIG. 20b, memories 21a and 21b, area limiting devices 22a and 22b are provided, and selectors 11 and 1
3, memories 12 1 , 12 2 , ..., 12 m , selection device 14
The part that is deleted is different.

【0033】焦点位置設定装置1は、1番目の画像i
a-1 、ib-1 を撮像するという意味でnに1を初期設定
する(ステップS25)。次いで、焦点位置設定装置1
は、焦点位置操作部2aを通してレンズ3aを駆動し、
n番目の画像ia-n を焦点位置fn で撮像する。同様
に、焦点位置設定装置1は焦点位置操作部2bを通して
レンズ3bを駆動し、n番目の画像ib-n を焦点位置f
n で撮像する(ステップS26)。
The focus position setting device 1 uses the first image i
In the sense that a-1 and ib-1 are imaged, 1 is initially set to n (step S25). Then, the focus position setting device 1
Drives the lens 3a through the focus position operation unit 2a,
The n-th image i an, captured at a focal position f n. Similarly, the focus position setting device 1 drives the lens 3b through the focus position operation unit 2b to move the nth image i bn to the focus position f.
The image is captured at n (step S26).

【0034】そして、A/D変換器6aは撮像素子5a
からの画像をA/D変換し、セレクタ4aに送る。同様
に、A/D変換器6bは撮像素子5bからの画像をA/
D変換し、セレクタ4bに送る。セレクタ4aは焦点位
置設定装置1からnを受けて画像ia-n をメモリ7an
に格納する。また、セレクタ4bは焦点位置設定装置1
からnを受けて画像ib-n をメモリ7bn に格納する
(ステップ27)。
The A / D converter 6a is connected to the image pickup device 5a.
The image from is converted into A / D and sent to the selector 4a. Similarly, the A / D converter 6b converts the image from the image sensor 5b into A / D
D-convert and send to the selector 4b. The selector 4a receives n from the focus position setting device 1 and stores the image i an in the memory 7a n.
To store. Further, the selector 4b is the focus position setting device 1
To n to store the image i bn in the memory 7b n (step 27).

【0035】焦点位置設定装置1は、画像の番号を表す
nに1を加える(ステップ28)。ここで、焦点位置設
定装置1は画像の番号を表すnと予定画像番号mとを比
較し(ステップS29)、n≦mが成り立っている間
は、ステップS26〜S28を繰返す。
The focus position setting device 1 adds 1 to n representing the image number (step 28). Here, the focus position setting device 1 compares n representing the image number with the planned image number m (step S29), and repeats steps S26 to S28 as long as n ≦ m holds.

【0036】上述したステップS25〜S29の操作に
よって、メモリ7a1 、7a2 、…、7an 、…、7a
m には、焦点位置f1 の画像ia-1 、焦点位置f2 の画
像ia-2 、…、焦点位置fn の画像ia-n 、…、焦点位
置fm の画像ia-m の画像が格納される。一方、メモリ
7b1 、7b2 、…、7bn 、…、7bm には、焦点位
置f1 の画像ib-1 、焦点位置f2 の画像ib-2 、…、
焦点位置fn の画像ib-n 、…、焦点位置fm の画像i
b-m の画像がそれぞれ格納される。
By the operations of steps S25 to S29 described above, the memories 7a 1 , 7a 2 , ..., 7a n ,.
The m, image i a-1 focus position f 1, image i a-2 of the focal position f 2, ..., the image i an, the focal position f n, ..., an image of the image i am focus position f m Is stored. On the other hand, the memory 7b 1, 7b 2, ..., 7b n, ..., the 7b m, image i b-1 focus position f 1, image i b-2 of the focal position f 2, ...,
The image i bn at the focus position f n , ..., The image i at the focus position f m
Each bm image is stored.

【0037】距離地図作成装置20aは、図4に示され
る領域のコントラスト値を格納するC1 ,C2 ,…,C
q ,…,Cl に初期値0をセットする(ステップS3
0)。次いで、焦点位置設定装置1は、1番目の画像i
a-1 を処理するという意味でnに1を初期設定する(ス
テップS31)。そして、セレクタ8aは、焦点位置設
定装置1からのnによって、画像ia-n を領域分割装置
19aに送る。この領域分割装置19aは、画像ia-n
を図4に示されるように分割し、画像an 1 ,画像an
2 ,…,画像an q ,…,画像an l を得る。領域分割
装置19aは、画像an 1 ,画像an 2 ,…,画像an
q ,…,画像an l を距離地図作成装置20aに送る
(ステップS32)。
The distance map creating apparatus 20a stores C 1 which stores the contrast value of the area shown in FIG. , C 2 ,,, C
q ,,, C l The initial value 0 is set to (step S3
0). Then, the focus position setting device 1 uses the first image i
In order to process a-1 , n is initialized to 1 (step S31). Then, the selector 8a sends the image ian to the area dividing device 19a by n from the focus position setting device 1. This area dividing device 19a is used for the image i an
Were divided as shown in FIG. 4, the image a n 1 , Image a n
2 ,…, Image a n q ,,, image a n l To get The area dividing device 19a uses the image a n 1 , Image a n 2 ,,, image a n
q ,,, image a n l Is sent to the distance map creating device 20a (step S32).

【0038】距離地図作成装置20aは、1番目の領域
に処理を行うという意味で、qに1をセットする(ステ
ップS33)。距離地図作成装置20aは画像an q
対するコントラスト値Cn q を求める(ステップS3
4)に相当する。ここで、Cq ≦Cn q であるか否かを
判定する(ステップS35)。そして、Cq ≦Cn q
らば(Yes)、Cq にCn q を代入し、領域qの焦点
位置を表すfq にfn を入れる(ステップS36)。一
方、Cq ≦Cn q でなければ(No)、何もしない。
The distance map creating apparatus 20a sets q to 1 in the sense that the process is performed on the first area (step S33). The distance map creating device 20a displays the image a n q. Contrast value C n q for (Step S3
It corresponds to 4). Where C q ≤ C n q It is determined whether or not (step S35). And C q ≤ C n q If (Yes), C q To C n q By substituting for f q Is input to f n (step S36). On the other hand, C q ≤ C n q If not (No), do nothing.

【0039】次いで、距離地図作成装置20aは、領域
を表すqに1を加えた後(ステップS37)、領域を表
すqと最後の領域lとを比較する(ステップS38)。
ここで、q≦lが成り立っている間はステップ34〜S
37を繰返す。そして、q≦lが成立しなくなると、焦
点位置設定装置1は、画像の番号を表すnに1を加え
(ステップS39)、画像の番号を表すnと予定画像番
号mとを比較する(ステップS40)。ここで、n≦m
が成り立っている間はステップS32〜S39を繰返
す。
Next, the distance map generator 20a adds 1 to q representing the area (step S37), and then compares q representing the area with the last area 1 (step S38).
Here, while q ≦ l holds, steps 34 to S are performed.
Repeat 37. When q ≦ l is not satisfied, the focus position setting device 1 adds 1 to n representing the image number (step S39) and compares n representing the image number with the planned image number m (step S39). S40). Where n ≦ m
Steps S32 to S39 are repeated while is satisfied.

【0040】上述したステップS31〜S40の操作に
よって、それぞれの領域のコントラスト法による焦点位
置f1 ,f2 ,…,fq ,…,fl が得られる。距離地
図作成装置20aは、焦点位置f1 ,f2 ,…,fq
…,f1 をメモリ21aに格納する(ステップS4
1)。
By the operations of steps S31 to S40 described above, the focus position f 1 of each area by the contrast method is obtained. , F 2 ,…, F q ,…, F l Is obtained. The distance map creating device 20a uses the focus position f 1 , F 2 ,…, F q
…, F 1 Is stored in the memory 21a (step S4
1).

【0041】距離地図作成装置20bは、図4に示され
る領域のコントラスト値を格納するC1 ,C2 ,…,C
q ,…,Cl に、初期値0をセットする(ステップS4
2)。焦点位置設定装置1は、1番目の画像ib-1 を処
理するという意味でnに1を初期設定する(ステップS
43)。セレクタ8bは、焦点位置設定装置1からのn
によって画像ib-n を領域分割装置19bに送る。そし
て、領域分割装置19bは、画像ib-n を図4に示され
るように分割し、画像bn 1 ,画像bn 2 ,…,画像b
n q ,…,画像bn l を得る。この領域分割装置19b
は、画像bn 1 ,画像bn 2 ,…,画像bn q ,…,画
像bn l を、距離地図作成装置20bに送る(ステップ
S44)。
The distance map generator 20b is shown in FIG.
C that stores the contrast value of the area1 , C2 ,,, C
q ,,, Cl To the initial value 0 (step S4
2). The focus position setting device 1 uses the first image ib-1To
In the sense that it means, 1 is initially set to n (step S
43). The selector 8b is provided with the n from the focus position setting device 1.
By image ibnIs sent to the area dividing device 19b. That
Then, the area dividing device 19b uses the image ibnShown in Figure 4
Image bn 1 , Image bn 2 , Image b
n q , Image bn l To get This area dividing device 19b
Is the image bn 1 , Image bn 2 , Image bn q ,,, picture
Image bn l To the distance map creating device 20b (step
S44).

【0042】次に、距離地図作成装置20bは、1番目
の領域に処理を行うという意味でqに1をセットし(ス
テップS45)、距離地図作成装置20bが画像bn q
に対するコントラスト値Cn q を求める(ステップS4
6)。そして、Cq ≦Cn q を判定し(ステップS4
7)、Cq ≦Cn q ならばCq にCn q を代入し、領域
qの焦点位置を表すfq にfn を入れる(ステップS4
8)。一方、Cq ≦Cn q でなければ、ステップS49
へ進む。
Next, the distance map creating device 20b is the first
Set 1 to q in the sense that processing will be performed on the area
(Step S45), the distance map creating device 20b displays the image b.n q
Contrast value C forn q (Step S4
6). And Cq ≤Cn q Is determined (step S4
7), Cq ≤Cn q Then Cq To Cn q Substituting
f representing the focus position of qq To fn(Step S4
8). On the other hand, Cq ≤Cn q If not, step S49
Go to.

【0043】距離地図作成装置20bは、領域を表すq
に1を加え(ステップS49)、その後、領域を表すq
と最後の領域lとを比較する(ステップS50)。ここ
で、q≦lが成り立っている間は、ステップS46〜S
49を繰返す。
The distance map creating device 20b uses q to represent the area.
Is added to 1 (step S49), and then q
And the last area 1 are compared (step S50). Here, while q ≦ l holds, steps S46 to S
Repeat 49.

【0044】次いで、焦点位置設定装置1は、画像の番
号を表すnに1を加え(ステップS51)、画像の番号
を表すnと予定画像番号mとを比較する(ステップS5
2)。ここで、n≦mが成り立っている間は、ステップ
S44〜S51を繰返す。また、ステップS43〜S5
2の操作によって、それぞれの領域のコントラスト法に
よる焦点位置f1 ,f2 ,…,fq ,…,fl が得られ
る。距離地図作成装置20bは、焦点位置f1 ,f2
…,fq ,…,f1 をメモリ21bに格納する(ステッ
プS53)。
Next, the focus position setting device 1 adds 1 to n representing the image number (step S51) and compares n representing the image number with the planned image number m (step S5).
2). Here, steps S44 to S51 are repeated while n ≦ m holds. In addition, steps S43 to S5
By the operation of 2, the focus position f 1 of each area by the contrast method , F 2 ,…, F q ,…, F l Is obtained. The distance map creating device 20b uses the focus position f 1 , F 2
…, F q ,…, F 1 Is stored in the memory 21b (step S53).

【0045】焦点位置設定装置1は、1番目の画像i
a-1 ,ib-1 を処理するという意味でnに1を初期設定
する(ステップS54)。セレクタ8aは、焦点位置設
定装置1からのnによって画像ia-n を領域限定装置2
2aに送る。領域限定装置22aは、メモリ21aに格
納されている距離地図を参照し、画像ia-n の中で焦点
位置がfn の領域を画像i′a-n とする(ステップS5
5)。更に、セレクタ8bは焦点位置設定装置1からの
nによって画像ib-n を領域限定装置22bに送る。こ
の領域限定装置22bは、メモリ21bに格納されてい
る距離地図を参照し、画像ib-n の中で焦点位置がfn
の領域を画像i′b-n とする(ステップS56)。
The focus position setting device 1 uses the first image i
In order to process a-1 and ib-1 , n is initialized to 1 (step S54). The selector 8a uses the n from the focus position setting device 1 to select the image i an from the area limiting device 2
Send to 2a. Area limiting device 22a refers to the distance map stored in the memory 21a, the focal position in the image i an, to the region of the f n and the image i 'an, (step S5
5). Further, the selector 8b sends the image i bn to the area limiting device 22b by n from the focus position setting device 1. The area limiting device 22b refers to the distance map stored in the memory 21b, and the focus position is f n in the image i bn.
Area is designated as image i'bn (step S56).

【0046】領域限定装置22aは画像i′a-n を対応
点検出装置9に、一方、領域限定装置22bは画像i′
b-n を対応点検出装置9に送る。この対応点検出装置9
は、画像i′a-n と画像i′b-n に対して対応点検出を
行い、ln 個の対応点の画像i′a-n 内での座標(xa
k ,ya k )と画像i′b-n 内での座標(xb k ,yb
k )を得る(ステップS57)。
The area limiting device 22a applies the image i'an to the corresponding point detecting device 9, while the area limiting device 22b uses the image i'an.
bn is sent to the corresponding point detecting device 9. This corresponding point detection device 9
Performs corresponding point detection on the image i 'an, and the image i' bn, l n pieces of image i of the corresponding point 'coordinates in the an, (x a
k , Y a k ) And the coordinates (x b k in the image i ′ bn , Y b
k ) Is obtained (step S57).

【0047】三次元座標算出装置10は、対応点検出装
置9から(xa k ,ya k )と(xb k ,yb k )とl
n を得て、1番目の対応点に処理を行うという意味で、
kに1をセットする(ステップS58)。そして、三次
元座標算出装置10は、k番目の対応点の画像i′a-n
内での座標(xa k ,ya k )と画像i′b-n 内での座
標(xb k ,yb k )から、三角測量と同様な原理に基
いて、k番目の対応点の三次元座標(Xk ,Yk
k )を求める(ステップS59)。
The three-dimensional coordinate calculation device 10 receives the (x a k , Y a k ) And (x b k , Y b k ) And l
In the sense that n is obtained and processing is performed on the first corresponding point,
1 is set to k (step S58). Then, the three-dimensional coordinate calculation device 10 uses the image i ′ an of the k-th corresponding point.
Coordinates within (x a k , Y a k ) And the coordinates (x b k in the image i ′ bn , Y b k ), Based on the same principle as triangulation, the three-dimensional coordinates (X k , Y k
Z k ) Is obtained (step S59).

【0048】三次元座標算出装置10は、得られた三次
元座標(Xk ,Yk ,Zk )に対する濃度値F
n (Xk ,Yk ,Zk )に、濃度値i′a-n (xa k
a k )、または濃度値i′b-n (xa k ,ya k )を
代入する(ステップS60)。次いで、三次元座標算出
装置10は、三次元座標に対応する濃度値Fn (Xk
k ,Zk )をメモリ15に格納し(ステップS6
1)、対応点の番号を示すkに1を加える(ステップS
62)。
The three-dimensional coordinate calculation device 10 uses the obtained three-dimensional coordinates (X k , Y k , Z k ) Concentration value F
n (X k , Y k , Z k ), The density value i ′ an (x a k
y a k ), Or the density value i ′ bn (x a k , Y a k ) Is substituted (step S60). Next, the three-dimensional coordinate calculation device 10 determines the density value F n (X k corresponding to the three-dimensional coordinates.
Y k , Z k ) Is stored in the memory 15 (step S6
1), 1 is added to k indicating the corresponding point number (step S
62).

【0049】次に、三次元座標算出装置10は、対応点
の番号を表すkと対応点の個数を表すln とを比較する
(ステップS63)。ここで、k≦ln が成り立ってい
る間はステップS59〜S62を繰返す。また、ステッ
プS58〜S63の操作によって、メモリ15にはn番
目の画像から得られるln 個の三次元座標に対応する濃
度値Fn (Xk ,Yk ,Zk )が格納され、焦点位置設
定装置1は画像の番号を表すnに1を加える(ステップ
S64)。
Next, the three-dimensional coordinate calculation device 10 compares k representing the number of the corresponding point with l n representing the number of the corresponding points (step S63). Here, while the k ≦ l n are composed repeats steps S59~S62. Further, by the operations of steps S58 to S63, the density values F n (X k corresponding to 1 n three-dimensional coordinates obtained from the n-th image are stored in the memory 15. , Y k , Z k ) Is stored, and the focus position setting device 1 adds 1 to n representing the image number (step S64).

【0050】焦点位置設定装置1は、画像の番号を表す
nと予定画像番号mとを比較する(ステップS65)。
ここで、n≦mが成り立っている間はステップS55〜
S64を繰返す。また、ステップS54〜S65の操
作によって、メモリ15には、l1 個の三次元座標に対
応する濃度値F1 (Xk ,Yk ,Zk ),l2 個の三次
元座標に対応する濃度値F2 (Xk ,Yk ,Zk ),
…,ln 個の三次元座標に対応する濃度値Fn (Xk
k ,Zk ),…,lm 個の三次元座標に対応する濃度
値Fm (Xk ,Yk ,Zk )が格納される。
The focus position setting device 1 compares n representing the image number with the planned image number m (step S65).
Here, as long as n ≦ m holds, steps S55 to S55
Repeat S64. Further, by the operations of steps S54 to S65, the density value F 1 (X k corresponding to l 1 three-dimensional coordinates is stored in the memory 15. , Y k , Z k ), L 2 corresponding to three-dimensional coordinates F 2 (X k , Y k , Z k ),
..., density values F n (X k corresponding to l n three-dimensional coordinates
Y k , Z k ), ..., density values corresponding to l m pieces of three-dimensional coordinates F m (X k , Y k , Z k ) Is stored.

【0051】この後、投影装置16は、メモリ15に格
納されている三次元座標に対応する濃度値、すなわち三
次元画像を適当な方向に投影し、D/A変換器17を通
してモニタ18に出力する(ステップS66)。
After that, the projection device 16 projects the density value corresponding to the three-dimensional coordinates stored in the memory 15, that is, the three-dimensional image in an appropriate direction and outputs it to the monitor 18 through the D / A converter 17. Yes (step S66).

【0052】このように、第2の実施例によれば、光学
系の焦点深度より広い範囲に存在する対象物に対して
も、精度の良い距離情報を得ることができる。また、光
学系の焦点深度より短い距離に対しても、精度の良い距
離情報を得ることができる。次に、この発明の第3の実
施例について説明する。
As described above, according to the second embodiment, accurate distance information can be obtained even for an object existing in a range wider than the depth of focus of the optical system. Further, accurate distance information can be obtained even for a distance shorter than the depth of focus of the optical system. Next, a third embodiment of the present invention will be described.

【0053】第3の実施例に於いては、図3に示される
ような焦点位置の異なるステレオ画像から長焦点深度の
ステレオ画像を作成し、対応点検出を行なうことによ
り、光学系の焦点深度より広い範囲に存在する対象物に
対しても、精度の良い距離情報を得ることができるよう
にする。
In the third embodiment, a stereo image with a long focal depth is created from stereo images with different focal positions as shown in FIG. 3, and corresponding points are detected to detect the focal depth of the optical system. It is possible to obtain accurate distance information even for objects existing in a wider range.

【0054】画像処理的手法によって長焦点深度画像を
得る方法については、例えば特願昭63−39936号
に記載されている。図8を参照して、上記特願昭63−
39936号に記載の方法に基いて長焦点深度の画像を
得る場合について説明する。
A method for obtaining a long focal depth image by an image processing method is described in, for example, Japanese Patent Application No. 63-39936. Referring to FIG. 8, the above-mentioned Japanese Patent Application No. 63-
A case of obtaining a long focal depth image based on the method described in No. 39936 will be described.

【0055】画像入力光学系に於いて、焦点位置をある
物体面に設定したときに入力される画像は、対象物と合
焦面との距離関係によりぼやけた具合が決定される。こ
こで、対象物が、画像入力光学系の焦点深度よりも大き
な構造を有する場合、ある物体面に焦点位置を設定した
ときに入力される画像は、場所によってぼやけた状態が
異なることになる。次に、焦点位置を変えると、以前に
入力した画像とはぼやけた状態の分布が異なる画像が入
力される。つまり、以前に入力した画像ではぼやけてい
た部分が、次に入力した画像では焦点が合っていたり、
またその逆も起こる。これは上述したように、対象物の
構造と設定焦点位置との距離関係により決まる。
In the image input optical system, an image input when the focus position is set on a certain object plane is determined to be blurred depending on the distance relationship between the object and the focusing surface. Here, when the object has a structure larger than the depth of focus of the image input optical system, the image input when the focus position is set on a certain object plane has a different blurred state depending on the location. Next, when the focus position is changed, an image having a blurry state distribution different from that of the previously input image is input. In other words, the part that was blurred in the previously input image is in focus in the next input image,
The reverse also occurs. This is determined by the distance relationship between the structure of the object and the set focal position, as described above.

【0056】そこで適当な設定範囲に従って、合焦点の
位置を変えながら画像を入力することにより、対象物の
異なる部分に焦点があった複数枚の画像を得ることがで
きる。これらを全て加え合わせると、画像内の場所によ
らず、ほぼ一様にぼやけた画像が得られる。
Therefore, by inputting an image while changing the position of the in-focus point according to an appropriate setting range, it is possible to obtain a plurality of images in which different parts of the object are in focus. When all of these are added together, an almost uniformly blurred image is obtained regardless of the location in the image.

【0057】そこで、次に加え合わせた画像について適
当な回復処理を行うことにより、画像内の場所によらず
一様に焦点の合った画像、すなわち長焦点深度画像が得
られる。
Then, an appropriate restoration process is performed on the combined image next to obtain an image in which the focus is uniform, that is, a long focal depth image, regardless of the position in the image.

【0058】図9は第3の実施例の構成図、図10は第
3の実施例の動作を説明するフローチャートである。こ
の第3の実施例では、図1の構成の距離測定装置に対
し、セレクタ8a、8bに代えて、加算器23a、23
b、メモリ24a、24b、回復処理装置25a、25
bが設けられ、セレクタ11、13、メモリ121 、1
2 、…、12m 、選択装置14が削除されている部分
が異なる。
FIG. 9 is a block diagram of the third embodiment, and FIG. 10 is a flow chart for explaining the operation of the third embodiment. In the third embodiment, in addition to the selectors 8a and 8b, adders 23a and 23a are added to the distance measuring device having the configuration of FIG.
b, memories 24a and 24b, recovery processing devices 25a and 25
b are provided, selectors 11 and 13, memories 12 1 and 1
2 2 , ..., 12 m , except that the selection device 14 is deleted.

【0059】焦点位置設定装置1は、1番目の画像i
a-1 ,ib-1 を撮像するという意味でnに1を初期設定
する(ステップS67)。この焦点位置設定装置1は、
焦点位置操作手段2a、2bを通してレンズ3a、3b
を駆動し、n番目の画像ia-n、ib-n を焦点位置fn
で撮像する(ステップS68)。
The focus position setting device 1 uses the first image i
Initially set to 1 in the sense that a-1 and ib-1 are imaged (step S67). This focus position setting device 1
Lenses 3a, 3b through the focus position operating means 2a, 2b
To drive the n-th image i an , i bn to the focus position f n
The image is picked up at (step S68).

【0060】次いで、A/D変換器6a、6bは撮像素
子5a、5bからの画像をA/D変換し、それぞれセレ
クタ4a、4bに送る。そして、セレクタ4a、4b
は、焦点位置設定装置1からnを受けて画像ia-n 、i
b-n をメモリ7an 、7bn に格納する(ステップS6
9)。この後、焦点位置設定装置1は画像の番号を表す
nに1を加える(ステップS70)。
Next, the A / D converters 6a and 6b perform A / D conversion on the images from the image pickup devices 5a and 5b and send them to the selectors 4a and 4b, respectively. Then, the selectors 4a and 4b
Receives n from the focus position setting device 1 and the images i an , i
bn is stored in the memories 7a n and 7b n (step S6)
9). After that, the focus position setting device 1 adds 1 to n representing the image number (step S70).

【0061】焦点位置設定装置1は、画像の番号を表す
nと予定画像番号mとを比較し(ステップS71)、n
≦mが成り立っている間はステップS68〜S70を繰
返す。また、ステップS67〜S71の操作により、メ
モリ7a1 、7a2 、…、7an 、…、7am には、焦
点位置f1 の画像ia-1 、焦点位置f2 の画像ia-2
…、焦点位置fn の画像ia-n 、…、焦点位置fm の画
像ia-m の画像が格納され、一方メモリ7b1 、7
2 、…、7bn 、…、7bm には、焦点位置f1 の画
像ib-1 、焦点位置f2 の画像ib-2 、…、焦点位置f
n の画像ib-n 、…、焦点位置fm の画像ib-m の画像
が、それぞれ格納される。
The focus position setting device 1 compares n representing the image number with the planned image number m (step S71), and n
Steps S68 to S70 are repeated as long as ≤m holds. Further, by the operation of step S67~S71, memory 7a 1, 7a 2, ..., 7a n, ..., the 7a m, image i a-1 focus position f 1, an image focus position f 2 i a-2 ,
..., the image i an of the focus position f n , ..., the image i am of the focus position f m is stored, while the memories 7b 1 and 7 are stored.
b 2, ..., 7b n, ..., 7b in the m, the image i b-1 focus position f 1, image i b-2 of the focal position f 2, ..., the focal position f
The image i bn , ... Of n , and the image i bm of the focus position f m are respectively stored.

【0062】加算器23aは、メモリ7an に格納され
ている焦点位置の異なる画像ia-n(n=1,2,…,
m)を荷重加算し、画像全体にわたって一様にぼやけた
画像ia brを得て、メモリ24aに格納する(ステップ
S72)。そして、回復処理装置25aは、メモリ24
aの一様にぼやけた画像ia brに回復処理を行い、焦点
位置の異なる対象物に対して一様に焦点の合った長焦点
深度画像ia dfを得て、メモリ24aに格納する(ステ
ップS73)。
The adder 23a uses the images i an (n = 1, 2, ...,), which are stored in the memory 7a n and have different focus positions.
m) is weighted to obtain a uniformly blurred image i a br over the entire image and stored in the memory 24a (step S72). Then, the recovery processing device 25a uses the memory 24
The uniformly blurred image i a br of a is subjected to a restoration process to obtain a long focal depth image i a df in which an object having different focus positions is uniformly focused and stored in the memory 24a ( Step S73).

【0063】次いで、加算器23bは、メモリ7bn
格納されている焦点位置の異なる画像ib-n (n=1,
2,…,m)を荷重加算し、画像全体にわたって一様に
ぼやけた画像ib brを得て、メモリ24bに格納する
(ステップS74)。そして、回復処理装置25bは、
メモリ24bの一様にぼやけた画像ib brに回復処理を
行い、焦点位置の異なる対象物に対して一様に焦点の合
った長焦点深度画像ib dfを得て、メモリ24bに格納
する(ステップS75)。
Next, the adder 23b causes the image i bn (n = 1, n) with different focus positions stored in the memory 7b n .
2, ..., M) are weighted to obtain a uniformly blurred image i b br over the entire image and stored in the memory 24b (step S74). Then, the recovery processing device 25b
The uniformly blurred image i b br in the memory 24b is subjected to a recovery process to obtain a long focal depth image i b df in which an object having different focus positions is uniformly focused and stored in the memory 24b. (Step S75).

【0064】対応点検出装置9は、画像ia dfと画像i
b dfに対して対応点検出を行い、l個の対応点の画像i
a df内での座標(xa k ,ya k )と画像ib df内での
座標(xb k ,yb k )を得る(ステップS76)。三
次元座標算出装置10は、対応点検出装置9から(xa
k ,ya k )と(xb k ,yb k )とlを得る。加え
て、三次元座標算出装置10は、1番目の対応点に処理
を行うという意味でkに1をセットする(ステップS7
7)。また、三次元座標算出装置10は、k番目の対応
点の画像ia df内での座標(xa k ,ya k )と、画像
b df内での座標(xb k ,yb k )から、三角測量と
同様な原理に基いて、k番目の対応点の三次元座標(X
k ,Yk ,Zk )を求める(ステップS78)。
The corresponding point detecting device 9 uses the image i a df and the image i a df.
Corresponding point detection is performed for b df , and the image i of l corresponding points is detected.
coordinates in a df (x a k , Y a k ) And the coordinates (x b k in the image i b df , Y b k ) Is obtained (step S76). The three-dimensional coordinate calculation device 10 receives from the corresponding point detection device 9 (x a
k , Y a k ) And (x b k , Y b k ) And l. In addition, the three-dimensional coordinate calculation apparatus 10 sets k to 1 in the sense that processing is performed on the first corresponding point (step S7).
7). Further, the three-dimensional coordinate calculation device 10 uses the coordinates (x a k) in the image i a df of the k-th corresponding point. , Y a k ) And the coordinates (x b k in the image i b df , Y b k ), Based on the same principle as triangulation, the three-dimensional coordinates (X
k , Y k , Z k ) Is obtained (step S78).

【0065】三次元座標算出装置10は、得られた三次
元座標(Xk ,Yk ,Zk )に対する濃度値F(Xk
k ,Zk )に、濃度値ia df(xa k ,ya k )か、
または濃度値ib df(xa k ,ya k )を代入する(ス
テップS79)。三次元座標算出装置10は、三次元座
標に対応する濃度値F(Xk ,Yk ,Zk )をメモリ1
5に格納する(ステップS80)。更に、三次元座標算
出装置10は、対応点の番号を示すkに1を加える(ス
テップS81)。
The three-dimensional coordinate calculation device 10 uses the obtained three-dimensional coordinate (X k , Y k , Z k ) Concentration value F (X k
Y k , Z k ), The density value i a df (x a k , Y a k ) Or
Or the density value i b df (x a k , Y a k ) Is substituted (step S79). The three-dimensional coordinate calculation device 10 uses the density value F (X k corresponding to the three-dimensional coordinates. , Y k , Z k ) Memory 1
5 (step S80). Furthermore, the three-dimensional coordinate calculation device 10 adds 1 to k indicating the corresponding point number (step S81).

【0066】ここで、三次元座標算出装置10は対応点
の番号を表すkと対応点の個数を表すlとを比較する
(ステップS82)。このステップS82に於いて、k
≦lが成り立っている間はステップS78〜S81を繰
返す。
Here, the three-dimensional coordinate calculation apparatus 10 compares k representing the corresponding point number with l representing the number of corresponding points (step S82). In step S82, k
Steps S78 to S81 are repeated while ≦ l is satisfied.

【0067】上述したステップS77〜S82の操作に
よって、メモリ15にはl個の三次元座標に対応する濃
度値F(Xk ,Yk ,Zk )が格納される。そして、投
影装置16は、メモリ15に格納されている三次元座標
に対応する濃度値、すなわち三次元画像を適当な方向に
投影し、D/A変換器17を通してモニタ18に出力す
る(ステップS83)。このように、第3の実施例によ
れば、光学系の焦点深度より広い範囲に存在する対象物
に対しても、精度の良い情報を得ることができる。次
に、この発明の第4の実施例について説明する。
By the operations of steps S77 to S82 described above, the density values F (X k corresponding to 1 three-dimensional coordinates are stored in the memory 15. , Y k , Z k ) Is stored. Then, the projection device 16 projects the density value corresponding to the three-dimensional coordinates stored in the memory 15, that is, the three-dimensional image in an appropriate direction, and outputs it to the monitor 18 through the D / A converter 17 (step S83). ). As described above, according to the third embodiment, it is possible to obtain accurate information even for an object existing in a range wider than the depth of focus of the optical system. Next, a fourth embodiment of the present invention will be described.

【0068】第4の実施例に於いては、図11(a)及
び(b)に示されるように、対象物が光を透過する物体
である場合について説明する。基本的には、第4の実施
例でも、図11(b)に示されるように、複数の異なる
焦点位置で得られるステレオ画像を距離測定に利用する
ことにより、光学系の焦点深度より広い範囲に存在する
対象物に対しても、精度の良い距離情報を得られるよう
にする。
In the fourth embodiment, as shown in FIGS. 11 (a) and 11 (b), the case where the object is an object that transmits light will be described. Basically, also in the fourth embodiment, as shown in FIG. 11B, a stereo image obtained at a plurality of different focal positions is used for distance measurement, so that a range wider than the focal depth of the optical system can be obtained. It is possible to obtain accurate distance information even for an object existing in.

【0069】但し、対象物が透過物体である場合、得ら
れる画像には、焦点位置を外れた物体のぼやけた像が焦
点位置に存在する物体の像に重畳されるという問題があ
る。重畳されたぼやけた像は、精度の良い対応点検出を
困難なものにする。そこで、結像光学系の特性から求め
られる三次元OTF(Optical Transfer Function )を
用いて回復処理を行い、ぼやけた像を消去してから対応
検出を行うようにする。
However, when the object is a transmissive object, there is a problem in the obtained image that a blurred image of the object out of the focus position is superimposed on the image of the object existing at the focus position. The superimposed blurred image makes accurate corresponding point detection difficult. Therefore, recovery processing is performed using a three-dimensional OTF (Optical Transfer Function) obtained from the characteristics of the imaging optical system to erase the blurred image before performing correspondence detection.

【0070】図12は第4の実施例の構成図、図13は
第4の実施例の動作を説明するフローチャートである。
この第4の実施例では、図1の構成の距離測定装置に対
し、回復処理装置26a、26bが設けられ、セレクタ
11、13、メモリ121 、122 、…、12m 、選択
装置14が削除されている部分が異なる。
FIG. 12 is a block diagram of the fourth embodiment, and FIG. 13 is a flow chart for explaining the operation of the fourth embodiment.
In the fourth embodiment, recovery processing devices 26a and 26b are provided for the distance measuring device having the configuration of FIG. 1, and selectors 11 and 13, memories 12 1 , 12 2 , ..., 12 m and a selection device 14 are provided. The deleted part is different.

【0071】焦点位置設定装置1は、1番目の画像i
a-1 ,ib-1 を撮像するという意味でnに1を初期設定
する(ステップS84)。この焦点位置設定装置1は、
焦点位置操作手段2a、2bを通してレンズ3a、3b
を駆動し、n番目の画像ia-n、ib-n を、それぞれ焦
点位置fn で撮像する(ステップS85)。その後、A
/D変換器6a、6bは、撮像素子5a、5bからの画
像をA/D変換し、それぞれセレクタ4a、4bに送
る。セレクタ4a、4bは、焦点位置設定装置1からn
を受けて、画像ia-n 、ib-n をメモリ7an 、7bn
に格納する(ステップS86)。次いで、焦点位置設定
装置1は、画像の番号を表すnに1を加える(ステップ
S87)。
The focus position setting device 1 uses the first image i
Initially set to 1 in the sense that the image of a-1 and i b-1 is taken (step S84). This focus position setting device 1
Lenses 3a, 3b through the focus position operating means 2a, 2b
Is driven to image the nth images i an and i bn at the focal position f n (step S85). After that, A
The / D converters 6a and 6b perform A / D conversion on the images from the image pickup devices 5a and 5b, and send the images to the selectors 4a and 4b, respectively. The selectors 4a and 4b are used for the focus position setting devices 1 to n.
In response, the images i an and i bn are stored in the memories 7a n and 7b n.
(Step S86). Next, the focus position setting device 1 adds 1 to n representing the image number (step S87).

【0072】次に、焦点位置設定装置1は、画像の番号
を表すnと予定画像番号mとを比較する(ステップS8
8)。ここで、n≦mが成り立っている間はステップS
85〜S87を繰返す。そして、ステップS84〜S8
8の操作によって、メモリ7a1 、7a2 、…、7
n 、…、7am には、焦点位置f1 の画像ia-1 、焦
点位置f2 の画像ia-2 、…、焦点位置fn の画像i
a-n 、…、焦点位置fm の画像ia-m の画像が格納さ
れ、メモリ7b1 、7b2 、…、7bn 、…、7bm
は、焦点位置f1 の画像ib-1 、焦点位置f2 の画像i
b-2 、…、焦点位置fn の画像ib-n 、…、焦点位置f
m の画像ib-m の画像がそれぞれ格納される。
Next, the focus position setting device 1 compares n representing the image number with the planned image number m (step S8).
8). Here, while n ≦ m holds, step S
85 to S87 are repeated. Then, steps S84 to S8
By the operation of 8, the memories 7a 1 , 7a 2 , ..., 7
a n, ..., the 7a m, image i a-1 focus position f 1, image i a-2 of the focal position f 2, ..., image i of the focal position f n
An image of the image i am at the focal position f m is stored, and the images i b-1 and focal position f 1 at the focal position f 1 are stored in the memories 7b 1 , 7b 2 , ..., 7b n , ..., 7b m. image i of f 2
b-2 , ..., Image i bn of focus position f n , ..., Focus position f
The images of m and i bm are stored.

【0073】次いで、回復処理装置26aは、メモリ7
1 、7a2 、…、7an 、…、7am から、画像i
a-1 、ia-2 、…、ia-n 、…、ia-m を取出し、結像
光学系の三次元OTFを用いて回復処理を行い、画像
i′a-1 、i′a-2 、…、i′a-n 、…、i′a-m を得
る。回復処理装置26aは、画像i′a-1 、i′a-2
…、i′a-n 、…、i′a-m をメモリ7a1 、7a2
…、7an 、…、7am に格納する(ステップS8
9)。ここで、回復処理装置26aの動作について説明
する。
Next, the recovery processing device 26a has the memory 7
a 1, 7a 2, ..., 7a n, ..., from 7a m, image i
, a , i a-2 , ..., I an , ..., i am are taken out, restoration processing is performed using the three-dimensional OTF of the imaging optical system, and images i ′ a-1 , i ′ a-2 , ..., i'an , ..., i'am are obtained. The restoration processing device 26a uses the images i'a -1 , i'a -2 ,
..., i 'an, ..., i' the am memory 7a 1, 7a 2,
..., 7a n, ..., stored in the 7a m (step S8
9). Here, the operation of the recovery processing device 26a will be described.

【0074】先ず、図14を参照して、回復処理原理を
簡単のために一次元で説明する。画像の劣化は図14
(a)に示されるように、原画像の周波数成分Fと、光
学系のOTF Hの、周波数成分毎の積で表される。し
たがって、原画像の推定は図14(b)に示されるよう
に、劣化画像の周波数成分Gと、光学系のOTFの逆変
換H-1の周波数成分毎の積で表される。同実施例では、
回復処理を、光軸方向とそれに直交する平面とで表され
る三次元空間で行う必要がある。
First, with reference to FIG. 14, the recovery processing principle will be described one-dimensionally for simplicity. Image degradation is shown in Figure 14.
As shown in (a), it is represented by the product of the frequency component F of the original image and the OTF H of the optical system for each frequency component. Therefore, the estimation of the original image is represented by the product of the frequency component G of the deteriorated image and the frequency component of the inverse transformation H −1 of the OTF of the optical system, as shown in FIG. In the same example,
The recovery process needs to be performed in a three-dimensional space represented by the optical axis direction and a plane orthogonal to the optical axis direction.

【0075】そこで、回復処理装置26aは画像
a-1 、ia-2 、…、ia-n 、…、ia-mを光軸方向に
積み重ねた三次元画像gとして扱う。回復処理装置26
aは、三次元画像gに三次元フーリエ変換を行い、周波
数成分Gを得る。更に、周波数成分Gと三次元OTFの
逆変換H-1の周波数成分毎の積を計算し、周波数成分
F′を得る。回復処理装置26aは、周波数成分F′に
三次元逆フーリエ変換を行い、三次元の推定原画像f′
を得る。加えて、光軸方向に積重ねた三次元画像f′
を、画像i′a-1 、i′a-2 、…、i′a-n 、…、i′
a-m とする。
Therefore, the restoration processing device 26a handles the images i a-1 , i a-2 , ..., I an , ..., I am as a three-dimensional image g in which they are stacked in the optical axis direction. Recovery processor 26
In a, the three-dimensional image g is subjected to three-dimensional Fourier transform to obtain a frequency component G. Further, the product of the frequency component G and the inverse transformation H −1 of the three-dimensional OTF for each frequency component is calculated to obtain the frequency component F ′. The restoration processing device 26a performs a three-dimensional inverse Fourier transform on the frequency component F'to obtain a three-dimensional estimated original image f '.
To get In addition, the three-dimensional images f ′ stacked in the optical axis direction
, I ′ a-1 , i ′ a-2 , ..., i ′ an , ..., i ′
am

【0076】同様に、回復処理装置26bは、メモリ7
1 、7b2 、…、7bn 、…、7bm から、画像i
b-1 、ib-2 、…、ib-n 、…、ib-m を取出し、結像
光学系の三次元OTFを用いて回復処理を行い、画像
i′b-1 、i′b-2 、…、i′b-n 、…、i′b-m を得
る。そして、画像i′b-1 、i′b-2 、…、i′b-n
…、i′b-m をメモリ7b1 、7b2 、…、7bn
…、7bm に格納する(ステップS90)。回復処理装
置26bの動作は回復処理装置26aの動作と同様であ
る。
Similarly, the recovery processing device 26b has a memory 7
b 1, 7b 2, ..., 7b n, ..., from 7b m, image i
b-1, i b-2 , ..., i bn, ..., taken out i bm, performs restoration processing using three-dimensional OTF of the imaging optical system, the image i 'b-1, i' b-2, , I'bn , ..., i'bm are obtained. Then, the images i'b -1 , i'b -2 , ..., i'bn ,
, I ′ bm are stored in the memories 7b 1 , 7b 2 , ..., 7b n ,
..., 7b m are stored (step S90). The operation of the recovery processing device 26b is similar to the operation of the recovery processing device 26a.

【0077】次に、焦点位置設定装置1は、1番目の画
像i′a-1 、i′b-1 を処理するという意味でnに1を
設定する(ステップS91)。そして、セレクタ8a、
8bは、焦点位置設定装置1からnを受けてメモリ7a
n 、7bn から画像i′a-n、i′b-n を取出し、対応
点検出装置9に送る。対応点検出装置9は画像i′a-n
と画像i′b-n に対して対応点検出を行い、ln 個の対
応点の画像i′a-n 内での座標(xa k ,ya k )と画
像i′b-n 内での座標(xb k ,yb k )を得る(ステ
ップS92)。
Next, the focus position setting device 1 sets n to 1 in the sense that the first images i'a -1 and i'b-1 are processed (step S91). Then, the selector 8a,
The memory 8a receives the n from the focus position setting device 1b.
Images i ′ an and i ′ bn are taken out from n and 7b n and sent to the corresponding point detecting device 9. The corresponding point detection device 9 displays the image i ′ an
And the image i ′ bn are subjected to corresponding point detection, and the coordinates (x a k of the l n corresponding points in the image i ′ an , Y a k ) And the coordinates (x b k in the image i ′ bn , Y b k ) Is obtained (step S92).

【0078】三次元座標算出装置10は、対応点検出装
置9から(xa k ,ya k )と(xb k ,yb k )とl
n を得た後、1番目の対応点に処理を行うという意味で
kに1をセットする(ステップS93)。次いで、三次
元座標算出装置10は、k番目の対応点の画像i′a-n
内での座標(xa k ,ya k )と画像i′b-n 内での座
標(xb k ,yb k )から、三角測量と同様な原理に基
いてk番目の対応点の三次元座標(Xk ,Yk ,Zk
を求める(ステップS94)。
The three-dimensional coordinate calculation apparatus 10 receives the (x a k , Y a k ) And (x b k , Y b k ) And l
After n is obtained, k is set to 1 in the sense that the first corresponding point is processed (step S93). Next, the three-dimensional coordinate calculation device 10 determines the image i ′ an of the k-th corresponding point.
Coordinates within (x a k , Y a k ) And the coordinates (x b k in the image i ′ bn , Y b k ) Based on the same principle as triangulation, the three-dimensional coordinate (X k , Y k , Z k )
Is calculated (step S94).

【0079】上記三次元座標算出装置10は、得られた
三次元座標(Xk ,Yk ,Zk )に対する濃度値F
n (Xk ,Yk ,Zk )に、濃度値i′a-n (xa k
a k )、または濃度値i′b-n (xa k ,ya k )を
代入する(ステップS95)。三次元座標算出装置10
は、三次元座標に対する濃度値Fn (Xk ,Yk
k )を得て、メモリ15に格納する(ステップS9
6)。そして、三次元座標算出装置10は、対応点の番
号を示すkに1を加える(ステップS97)。
The above-mentioned three-dimensional coordinate calculation device 10 uses the obtained three-dimensional coordinate (X k , Y k , Z k ) Concentration value F
n (X k , Y k , Z k ), The density value i ′ an (x a k
y a k ), Or the density value i ′ bn (x a k , Y a k ) Is substituted (step S95). Three-dimensional coordinate calculation device 10
Is the density value F n (X k for three-dimensional coordinates) , Y k
Z k ) Is obtained and stored in the memory 15 (step S9).
6). Then, the three-dimensional coordinate calculation device 10 adds 1 to k indicating the corresponding point number (step S97).

【0080】次に、三次元座標算出装置10は、対応点
の番号を表すkと対応点の個数を表すln とを比較し
(ステップS98)、k≦ln が成り立っている間はス
テップS94〜S97を繰返す。そして、ステップS9
3〜S98の操作によって、メモリ15にはn番目の画
像から得られるln 個の三次元座標に対応する濃度値F
n (Xk ,Yk ,Zk )が格納される。次いで、焦点位
置設定装置1は、画像の番号を表すnに1を加える(ス
テップS99)。
Next, the three-dimensional coordinate calculation apparatus 10 compares k representing the number of the corresponding point with l n representing the number of the corresponding points (step S98), and step k is satisfied while k ≦ l n. Repeat S94 to S97. Then, step S9
By the operations from 3 to S98, the density value F corresponding to 1 n three-dimensional coordinates obtained from the n-th image is stored in the memory 15.
n (X k , Y k , Z k ) Is stored. Next, the focus position setting device 1 adds 1 to n representing the image number (step S99).

【0081】ここで、焦点位置設定装置1は画像の番号
を表すnと予定画像番号mとを比較し(ステップS10
0)、n≦mが成り立っている間はステップS92〜S
99を繰返す。また、ステップS91〜S100までの
操作によって、メモリ15には、l1 個の三次元座標に
対応する濃度値F1 (Xk ,Yk ,Zk ),l2 個の三
次元座標に対応する濃度値F2 (Xk ,Yk ,Zk ),
…,ln 個の三次元座標に対応する濃度値Fn (Xk
k ,Zk ),…,lm 個の三次元座標に対応する濃度
値Fm (Xk ,Yk ,Zk )が格納される。そして、投
影装置16は、メモリ15に格納されている三次元座標
に対応する濃度値、すなわち三次元画像を適当な方向に
投影し、D/A変換器17を通してモニタ18に出力す
る(ステップS101)。
Here, the focus position setting device 1 compares n representing the image number with the planned image number m (step S10).
0) and n ≦ m are satisfied, steps S92 to S
Repeat 99. Further, by the operations of steps S91 to S100, the memory 15 stores the density values F 1 (X k corresponding to three 1- dimensional coordinates). , Y k , Z k ), L 2 corresponding to three-dimensional coordinates F 2 (X k , Y k , Z k ),
..., density values F n (X k corresponding to l n three-dimensional coordinates
Y k , Z k ), ..., density values corresponding to l m pieces of three-dimensional coordinates F m (X k , Y k , Z k ) Is stored. Then, the projection device 16 projects the density value corresponding to the three-dimensional coordinates stored in the memory 15, that is, the three-dimensional image in an appropriate direction, and outputs it to the monitor 18 through the D / A converter 17 (step S101). ).

【0082】以上のように、第4の実施例によれば、対
象物が透過物体であっても、光学系の焦点深度より広い
範囲に存在する対象物に対しても、精度の良い距離情報
を得ることができる。
As described above, according to the fourth embodiment, even if the object is a transmissive object, accurate distance information can be obtained for the object existing in a range wider than the depth of focus of the optical system. Can be obtained.

【0083】また、一般には焦点位置の異なる複数の画
像を撮影するのであれば、単眼画像であっても回復処理
を行うことにより、三次元画像を求めて距離情報を得る
ことはできる。しかし、それだけでは光学系の焦点深度
より短い距離を分別することはできず焦点深度によって
分解能が制限されている。この発明によれば、光学系の
焦点深度より短い距離に対しても精度の良い距離情報を
得ることができる。
Further, generally, if a plurality of images having different focal positions are photographed, it is possible to obtain a three-dimensional image and obtain distance information by performing restoration processing even for a monocular image. However, this alone cannot separate a distance shorter than the depth of focus of the optical system, and the resolution is limited by the depth of focus. According to the present invention, it is possible to obtain accurate distance information even for a distance shorter than the depth of focus of the optical system.

【0084】[0084]

【発明の効果】以上のようにこの発明によれば、光学系
の焦点深度より広い範囲に存在する対象物に対しても、
精度の良い距離情報を得ることができる距離測定装置を
提供することができる。
As described above, according to the present invention, even for an object existing in a range wider than the depth of focus of the optical system,
A distance measuring device that can obtain accurate distance information can be provided.

【図面の簡単な説明】[Brief description of drawings]

【図1】この発明の第1の実施例で、距離測定装置の構
成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a distance measuring device according to a first embodiment of the present invention.

【図2】第1の実施例の動作を説明するフローチャート
である。
FIG. 2 is a flowchart illustrating the operation of the first embodiment.

【図3】ステレオ画像の例を示した図である。FIG. 3 is a diagram showing an example of a stereo image.

【図4】図3のステレオ画像を小領域に分割した例を示
した図である。
FIG. 4 is a diagram showing an example in which the stereo image of FIG. 3 is divided into small areas.

【図5】距離地図を表した図である。FIG. 5 is a diagram showing a distance map.

【図6】この発明の第2の実施例で、距離測定装置の構
成を示すブロック図である。
FIG. 6 is a block diagram showing a configuration of a distance measuring device in a second embodiment of the present invention.

【図7】第2の実施例の動作を説明するフローチャート
である。
FIG. 7 is a flowchart illustrating the operation of the second embodiment.

【図8】画像処理的手法によって長焦点深度画像を得る
方法を説明する図である。
FIG. 8 is a diagram illustrating a method of obtaining a long focal depth image by an image processing method.

【図9】この発明の第3の実施例で、距離測定装置の構
成を示すブロック図である。
FIG. 9 is a block diagram showing a configuration of a distance measuring device in a third embodiment of the present invention.

【図10】第3の実施例の動作を説明するフローチャー
トである。
FIG. 10 is a flowchart illustrating the operation of the third embodiment.

【図11】対象物が光を透過する物体である場合のステ
レオ画像の例を示した図である。
FIG. 11 is a diagram showing an example of a stereo image when an object is an object that transmits light.

【図12】この発明の第4の実施例で、距離測定装置の
構成を示すブロック図である。
FIG. 12 is a block diagram showing a configuration of a distance measuring device according to a fourth embodiment of the present invention.

【図13】第4の実施例の動作を説明するフローチャー
トである。
FIG. 13 is a flowchart illustrating the operation of the fourth embodiment.

【図14】回復処理装置の動作を説明する図である。FIG. 14 is a diagram illustrating an operation of the recovery processing apparatus.

【図15】従来の技術による三角測量と同じ原理によっ
て距離情報を計算する方法を示した図である。
FIG. 15 is a diagram showing a method of calculating distance information according to the same principle as triangulation according to a conventional technique.

【符号の説明】[Explanation of symbols]

1…焦点位置設定装置、2a、2b…焦点位置操作部、
3a、3b…レンズ、4a、4b、8a、8b、11、
13…セレクタ、5a、5b…撮像素子、6a、6b…
A/D変換器、7a1 、7a2 、…、7am 、7b1
7b2 、…、7bm 、121 、122 、…、12m 、1
5、21a、21b、24a、24b…メモリ、9…対
応点検出装置、10…三次元座標算出装置、14…選択
装置、16…投影装置、17…D/A変換器、18…モ
ニタ、19a、19b…領域分割装置、20a、20b
…距離地図作成装置、22a、22b…領域限定装置、
23a、23b…加算器、25a、25b、26a、2
6b…回復処理装置。
1 ... Focus position setting device, 2a, 2b ... Focus position operation unit,
3a, 3b ... Lenses, 4a, 4b, 8a, 8b, 11,
Reference numeral 13 ... Selector, 5a, 5b ... Image pickup element, 6a, 6b ...
A / D converter, 7a 1, 7a 2, ... , 7a m, 7b 1,
7b 2 , ..., 7b m , 12 1 , 12 2 , ..., 12 m , 1
5, 21a, 21b, 24a, 24b ... Memory, 9 ... Corresponding point detection device, 10 ... Three-dimensional coordinate calculation device, 14 ... Selection device, 16 ... Projection device, 17 ... D / A converter, 18 ... Monitor, 19a , 19b ... Area dividing device, 20a, 20b
... distance map creating device, 22a, 22b ... region limiting device,
23a, 23b ... Adder, 25a, 25b, 26a, 2
6b ... Recovery processing device.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 同一焦点位置でステレオ画像を撮像する
撮像装置と、 上記ステレオ画像を撮像する焦点位置を複数設定する焦
点位置設定手段と、 上記ステレオ画像に対応点検出を行う対応点検出手段
と、 この対応点検出手段が検出した対応点から三次元座標を
算出する三次元座標算出手段と、 この三次元座標算出手段が算出した三次元座標を上記焦
点位置と焦点深度に基いた判定に応じて距離情報を得る
判定手段とを具備することを特徴とする距離測定装置。
1. An image pickup device for picking up a stereo image at the same focus position, a focus position setting means for setting a plurality of focus positions for picking up the stereo image, and a corresponding point detecting means for detecting corresponding points in the stereo image. The three-dimensional coordinate calculating means for calculating three-dimensional coordinates from the corresponding points detected by the corresponding point detecting means, and the three-dimensional coordinate calculated by the three-dimensional coordinate calculating means according to the determination based on the focus position and the depth of focus. A distance measuring device, comprising:
JP4230761A 1992-08-31 1992-08-31 Distance measuring apparatus Pending JPH0674762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4230761A JPH0674762A (en) 1992-08-31 1992-08-31 Distance measuring apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4230761A JPH0674762A (en) 1992-08-31 1992-08-31 Distance measuring apparatus

Publications (1)

Publication Number Publication Date
JPH0674762A true JPH0674762A (en) 1994-03-18

Family

ID=16912858

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4230761A Pending JPH0674762A (en) 1992-08-31 1992-08-31 Distance measuring apparatus

Country Status (1)

Country Link
JP (1) JPH0674762A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008050904A1 (en) * 2006-10-25 2008-05-02 Tokyo Institute Of Technology High-resolution vertual focusing-plane image generating method
US10205928B2 (en) 2012-06-07 2019-02-12 Canon Kabushiki Kaisha Image processing apparatus that estimates distance information, method of controlling the same, and storage medium
WO2019138835A1 (en) * 2018-01-12 2019-07-18 キヤノン株式会社 Information processing system, information processing device, information processing method, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008050904A1 (en) * 2006-10-25 2008-05-02 Tokyo Institute Of Technology High-resolution vertual focusing-plane image generating method
JPWO2008050904A1 (en) * 2006-10-25 2010-02-25 国立大学法人東京工業大学 High resolution virtual focal plane image generation method
JP4942221B2 (en) * 2006-10-25 2012-05-30 国立大学法人東京工業大学 High resolution virtual focal plane image generation method
US10205928B2 (en) 2012-06-07 2019-02-12 Canon Kabushiki Kaisha Image processing apparatus that estimates distance information, method of controlling the same, and storage medium
WO2019138835A1 (en) * 2018-01-12 2019-07-18 キヤノン株式会社 Information processing system, information processing device, information processing method, and program

Similar Documents

Publication Publication Date Title
US20070189750A1 (en) Method of and apparatus for simultaneously capturing and generating multiple blurred images
US20090214107A1 (en) Image processing apparatus, method, and program
CN109883391B (en) Monocular distance measurement method based on digital imaging of microlens array
JP2002056379A (en) Three-dimensional data generating device
JP3335419B2 (en) Camera ranging device
JP4549481B2 (en) Focusing device
JP4892014B2 (en) camera
JP4752733B2 (en) IMAGING DEVICE, IMAGING METHOD, AND IMAGING DEVICE DESIGNING METHOD
JP2016161721A (en) In-focus position detection device, in-focus position detection method, and in-focus position detection computer program
JP2881995B2 (en) Object detection device for optical instruments
JP5454392B2 (en) Ranging device and imaging device
JPH0674762A (en) Distance measuring apparatus
JPH10320558A (en) Calibration method, corresponding point search method and device therefor, focus distance detection method and device therefor, three-dimensional position information detection method and device therefor, and recording medium
JP2020193820A (en) Measurement device, imaging device, control method, and program
US6625301B2 (en) Image processing apparatus, image processing method and transmission medium
JP4228430B2 (en) Focus position determination method and apparatus
JP5484129B2 (en) Imaging device
US20130076868A1 (en) Stereoscopic imaging apparatus, face detection apparatus and methods of controlling operation of same
JPH0875454A (en) Range finding device
JPH0252204A (en) Measuring instrument for three-dimensional coordinate
WO2018235256A1 (en) Stereo measurement device and system
JP3135162B2 (en) Distance measuring device
JPH09211316A (en) Image signal processor
JP2020181401A (en) Image processing system, image processing method and program
JP4282300B2 (en) Camera ranging device

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20020423