JP2005114581A - Distance measurement method - Google Patents
Distance measurement method Download PDFInfo
- Publication number
- JP2005114581A JP2005114581A JP2003349873A JP2003349873A JP2005114581A JP 2005114581 A JP2005114581 A JP 2005114581A JP 2003349873 A JP2003349873 A JP 2003349873A JP 2003349873 A JP2003349873 A JP 2003349873A JP 2005114581 A JP2005114581 A JP 2005114581A
- Authority
- JP
- Japan
- Prior art keywords
- photosensor
- function
- value
- equation
- reliability
- 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.)
- Withdrawn
Links
Images
Landscapes
- Measurement Of Optical Distance (AREA)
- Automatic Focus Adjustment (AREA)
Abstract
【目的】三角測距の原理に基づく距離測定において、2つのフォトセンサアレイ出力の相関を表す評価関数が最小値近傍で左右対称にならないことに起因する不具合を検出するための信頼性判定を行うことのできる距離測定方法を提供する。
【構成】真の最小値f(x)を推定して所定値Hと比較することにより信頼性評価を行なう。所定値Hについては、フォトセンサのランダムばらつき(a%)、A/D変換器によりデジタル化されたフォトセンサ出力の平均ビット数(n)、評価関数の計算に適用する1フォトセンサアレイあたりのフォトセンサ数(m)を考慮して決める。さらに、低コントラスト被写体などフォトセンサ出力のSN比が低い場合などに対処するため、推定された真の相対変位とフォトセンサピッチ毎に離散的に求められた評価関数の最小値を与えるシフト値i0との位置関係による信頼性評価も実施する。
【選択図】 図1[Purpose] In distance measurement based on the principle of triangulation, a reliability judgment is performed to detect a defect caused by an evaluation function representing a correlation between two photosensor array outputs not being symmetrical in the vicinity of the minimum value. Provide a distance measurement method that can.
The reliability is evaluated by estimating the true minimum value f (x) and comparing it with a predetermined value H. For the predetermined value H, the random variation (a%) of the photosensors, the average number of bits of the photosensor output digitized by the A / D converter (n), and per photosensor array applied to the calculation of the evaluation function Determined in consideration of the number of photosensors (m). Further, in order to deal with a case where the S / N ratio of the photosensor output is low, such as a low-contrast subject, a shift value i that gives the estimated true relative displacement and the minimum value of the evaluation function discretely obtained for each photosensor pitch. Reliability evaluation based on the positional relationship with 0 is also performed.
[Selection] Figure 1
Description
本発明は、例えばカメラ等の自動焦点装置に用いられる、距離測定方法に関するものである。 The present invention relates to a distance measuring method used for an autofocus device such as a camera.
図3は、三角測距の原理に基づく距離測定原理図である。被写体55の光がレンズ51、52を通して、フォトセンサアレイ53、54上に被写体像56、57として結像する。点P6、点P7は、正面の無限遠からレンズ51、52の中心点P2、P3を通過する光線(光軸58、59)とフォトセンサアレイ53、54との交点である。点P6と点P7の間の距離をB、フォトセンサアレイ53、54とレンズ51、52との距離をf(レンズ51、52の焦点距離と略等しい)とする。また、光軸58、59からの被写体像56、57のずれをX1、X2とし、このX1とX2を足した長さをXとする。尚、61は測定系を示す。
ここで三角P1P2P4と三角形P2P5P6および三角形P1P4P3と三角形P3P7P8はそれぞれ相似であることから、被写体55までの距離dは次式で求められる。
FIG. 3 is a distance measurement principle diagram based on the principle of triangulation. The light of the
Here, since the triangle P 1 P 2 P 4 and the triangle P 2 P 5 P 6 and the triangle P 1 P 4 P 3 and the triangle P 3 P 7 P 8 are similar to each other, the distance d to the
(数5)
d=B・f/(X1+X2)=B・f/X
Xは被写体55が無限遠にあるとき、すなわち二つの被写体像56、57がレンズ51、52の光軸58、59とフォトセンサアレイの交点にある場合を基準とした2像の相対変移である。Bとfは定数であるので、Xを検出することで距離dを求めることができる。
測距精度を上げるためには、2像の相対変位Xを精密に求めることが必要になる。しかしながら、フォトセンサの物理的配置(ピッチ)にて決まる精度・分解能以上には直接求めることはできないので、まずフォトセンサピッチの精度で相対変位を求め、その後に補間計算を行うことにより、センサピッチ以上の精度を求める技術が特許文献1などに示されている。以下、その従来技術について説明する。
(Equation 5)
d = B · f / (X1 + X2) = B · f / X
X is a relative transition of two images based on the case where the
In order to increase the distance measurement accuracy, it is necessary to accurately obtain the relative displacement X of the two images. However, since it cannot be obtained directly beyond the accuracy and resolution determined by the physical arrangement (pitch) of the photosensor, the sensor pitch is calculated by first calculating the relative displacement with the accuracy of the photosensor pitch and then performing interpolation calculation. A technique for obtaining the above accuracy is disclosed in
図4は距離検出装置の一般的な例を示す構成図、図5は補間方法の第1の従来例を説明するための図、図6は補間方法の第2の従来例を説明するための図である。図4において、53,54は図3に示すものと同じフォトセンサアレイであり、62,63はA/D変換器である。フォトセンサアレイ53,54内の各センサからのアナログ出力はA/D変換器62,63によりデジタル信号に変換される。また、64はマイクロコンピュータのような演算処理装置(以下、マイコンという)で、2つの像の相対変位Xを求め、このXにより撮像レンズの制御を行う。このように、かかる距離検出装置はマイコンを用いてシステムを組むのが一般的である。いま、A/D変換されたフォトセンサアレイ53,54の出力値をそれぞれL(1),L(2),・・・,L(M1), R(1),R(2),・・・,R(M2)とし、X=i・p(pはフォトセンサピッチ)という2つの像の相対変位に対する、像の不一致度を示す評価関数f(i)は例えば(1)式や(2)式で与えられる。
FIG. 4 is a configuration diagram showing a general example of a distance detecting device, FIG. 5 is a diagram for explaining a first conventional example of an interpolation method, and FIG. 6 is a diagram for explaining a second conventional example of an interpolation method. FIG. 4, 53 and 54 are the same photosensor arrays as shown in FIG. 3, and 62 and 63 are A / D converters. Analog outputs from the sensors in the
(数6)
f(i)≡Σ|L(j)−R(j+i)| ・・・(1)
j
(Equation 6)
f (i) ≡Σ | L (j) −R (j + i) | (1)
j
(数7)
f(i)≡Σ|L(j−s)−R(j+t)|
j
s+t=i ・・・(2)
もし、フォトセンサアレイ53,54上の2つの像が相対的にi0フォトセンサピッチずれているとすれば、f(i0)=0となる。ただし、前記Xが完全に光センサピッチの整数倍になることは稀なため、通常はf(i0)>0となる。
iの所定の範囲において、f(i)の最小値を求めることはマイコンで容易に実行できるが、これは上述のように、通常は第1次近似でしかないので、高精度の検出を行うためには補間計算が必要になる。この補間方法に関する第1の従来例を図5に示す。
(Equation 7)
f (i) ≡Σ | L (j−s) −R (j + t) |
j
s + t = i (2)
If the two images on the
In the predetermined range of i, the minimum value of f (i) can be easily obtained by a microcomputer. However, as described above, this is usually only a first order approximation, so that highly accurate detection is performed. For this purpose, interpolation calculation is required. A first conventional example relating to this interpolation method is shown in FIG.
図5および発明の実施の形態を含む以下の説明において、i0はフォトセンサピッチ毎ではf(i)の最小値を与えるiであり、 In the following description, including FIG. 5 and the embodiment of the invention, i 0 is i giving the minimum value of f (i) for each photosensor pitch,
(数8)
f(i0−1)>f(i0+1) ・・・(3)
であるとする。(3)式の条件は真の相対変位Xがi0とi0+1の間にあると判断するためのもので、f(i0−1)<f(i0+1)の場合はi0−2およびi0−1とi0+2およびi0+1の立場を入れ替えて以下同様にすればよい。
補間方法の第1の従来例は図5のように、まず点(i0−1,f(i0−1))と点(i0,f(i0))を結ぶ直線L0に対しその傾き−B1を求め、また点(i0+1,f(i0+1))と点(i0+2,f(i0+2))を結ぶ直線に対しその傾きB2を求める。次に点(i0,f(i0))を通り傾きが−{B1+K1(B1−B2)}である直線L2をひき、点(i0+1,f(i0+1))を通り傾きがB1+K1(B1−B2)である直線L3をひく。そして直線L2とL3の交点の横座標Xの値を最終的に補間された相対変位とするものである。
(Equation 8)
f (i 0 -1)> f (i 0 +1) (3)
Suppose that The condition of the expression (3) is for determining that the true relative displacement X is between i 0 and i 0 +1. When f (i 0 −1) <f (i 0 +1), i 0 The positions of −2 and i 0 −1 and i 0 +2 and i 0 +1 may be interchanged, and so on.
As shown in FIG. 5, the first conventional example of the interpolation method starts with a straight line L0 connecting the point (i 0 -1, f (i 0 -1)) and the point (i 0 , f (i 0 )). obtains the inclination -B1, also determine the points (i 0 + 1, f ( i 0 +1)) and the point (i 0 + 2, f ( i 0 +2)) the slope B2 to the straight line connecting the. Then the point (i 0, f (i 0 )) is the street slope - {B1 + K1 (B1- B2)} pull a line L2 is a point (i 0 + 1, f ( i 0 +1)) is the street slope The straight line L3 which is B1 + K1 (B1-B2) is drawn. The value of the abscissa X at the intersection of the straight lines L2 and L3 is finally set as the interpolated relative displacement.
第1の従来例による補間方法を定式化すると次のようになる。すなわち、関数値f(i0−1)とf(i0+1)とを比較して、イ)f(i0−1)>f(i0+1)、ロ)f(i0−1)=f(i0+1)、ハ)f(i0−1)<f(i0+1)のいずれの関係であるかを判定し、前記イ)の場合は下記(I)式、ロ)の場合はx=i0、ハ)の場合は下記(II)式、にてそれぞれ与えられるxまたはこれにフォトセンサピッチを乗じた値を前記相対変位量とする。 The interpolation method according to the first conventional example is formulated as follows. That is, the function values f (i 0 −1) and f (i 0 +1) are compared, and a) f (i 0 −1)> f (i 0 +1), b) f (i 0 −1) = F (i 0 +1), c) f (i 0 −1) <f (i 0 +1) is determined. In the case of a), the following formula (I), b) In the case of x = i 0 , c), x given by the following equation (II) or a value obtained by multiplying this by the photosensor pitch is set as the relative displacement amount.
(数9)
x=i0+1/2−{f(i0+1)−f(i0)}/A
A=2{B1+K1(B1−B2)}
B1=f(i0−1)−f(i0)
B2=f(i0+2)−f(i0+1)
(K1=0〜0.5なる定数) ・・・(4)
(Equation 9)
x = i 0 + 1 / 2− {f (i 0 +1) −f (i 0 )} / A
A = 2 {B1 + K1 (B1-B2)}
B1 = f (i 0 −1) −f (i 0 )
B2 = f (i 0 +2) −f (i 0 +1)
(A constant of K1 = 0 to 0.5) (4)
(数10)
x=i0−1/2+{f(i0−1)−f(i0)}/C
C=2{D1+K1(D1−D2)}
D1=f(i0+1)−f(i0)
D2=f(i0−2)−f(i0−1)
(K1=0〜0.5なる定数) ・・・(5)
この第1の従来例は、以下に説明する第2の従来例を改良するものとして発明されたものである。すなわち、補間方法の第2の実施例は、図6のように点(i0−1,f(i0−1))と点(i0,f(i0))を結ぶ直線L0をひき、この直線L0の傾き−B1に対し絶対値が逆で符号が逆の+B1という傾きを持つ直線L4を点(i0+1,f(i0+1))を通るようにひき、直線L0とL4の交点の横座標Xの値を最終的に補間された相対変位とするものである。ここで、補間計算の考え方には、f(x)のグラフはf(x)の真の最小値を与えるx=x0の近傍では左右対称であり、また一次式で表されるグラフ(直線)ではないという前提があり、これによると第2の従来例は以下の問題を内在している。なお、第1および第2の従来例とも、上述以外に、x=x0の近傍でf(x)は、x<x0の範囲では単調減少でx>x0の範囲では単調増加である、という前提もおいている。
(Equation 10)
x = i 0 −1 / 2 + {f (i 0 −1) −f (i 0 )} / C
C = 2 {D1 + K1 (D1-D2)}
D1 = f (i 0 +1) −f (i 0 )
D2 = f (i 0 −2) −f (i 0 −1)
(A constant of K1 = 0 to 0.5) (5)
This first conventional example was invented as an improvement of the second conventional example described below. That is, the second embodiment of the interpolation method is to draw a straight line L0 connecting the points (i 0 -1, f (i 0 -1)) and the point (i 0, f (i 0 )) as shown in FIG. 6 , drawn to pass this straight line L4 absolute values for the slope -B1 the straight line L0 is the sign reversed with inclination of reverse + B1 point (i 0 + 1, f ( i 0 +1)), the straight line L0 and L4 The value of the abscissa X of the intersection point is finally set as the interpolated relative displacement. Here, the concept of interpolation calculation is that the graph of f (x) is symmetrical in the vicinity of x = x 0 that gives the true minimum value of f (x), and is a graph (linear line) expressed by a linear expression. ), The second conventional example has the following problems. In both the first and second conventional examples, in addition to the above, f (x) decreases monotonously in the range of x <x 0 and monotonically increases in the range of x> x 0 in the vicinity of x = x 0. The assumption is also made.
すなわち上述の内在する問題とは、点(i0,f(i0))を通る傾き−B1の直線と点(i0+1,f(i0+1))を通る傾き+B1の直線の交点の横座標が(x)の真の最小値を与えるx=x0と一致するのは、f(i0)=f(i0+1)の場合しかない、ということである。通常はf(i0)とf(i0+1)は等しくないため、第2の従来例では基本的には誤差を免れないものとなっている。これに対し、第1の従来例では、点(i0,f(i0))および点(i0+1,f(i0+1))をそれぞれ通る2つの直線の傾きの絶対値を、第2の従来例のB1に対し修正項K1(B1−B2)を付加してB1+K1(B1−B2)と修正することにより(K1=0〜0.5なる定数)、f(i0)とf(i0+1)が等しくない場合でも、2つの直線の交点の横座標が真の最小値を与えるx=x0に近い補間値となるようにしたものである。 Ie to a problem inherent above, the point (i 0, f (i 0 )) of the inclination -B1 through the straight line and the point (i 0 + 1, f ( i 0 +1)) of straight intersection of slope + B1 through It is only in the case of f (i 0 ) = f (i 0 +1) that the abscissa coincides with x = x 0 giving the true minimum value of (x). Usually, since f (i 0 ) and f (i 0 +1) are not equal, in the second conventional example, basically, an error cannot be avoided. In contrast, in the first conventional example, the point (i 0, f (i 0 )) and point (i 0 + 1, f ( i 0 +1)) The absolute values of the two straight lines of slope through respective first By adding a correction term K1 (B1-B2) to B1 of the conventional example 2 and correcting it to B1 + K1 (B1-B2) (a constant of K1 = 0 to 0.5), f (i 0 ) and f Even when (i 0 +1) is not equal, the abscissa of the intersection of the two straight lines is an interpolation value close to x = x 0 giving the true minimum value.
一方、補間計算に関しその信頼性を評価して、その補間計算が真の相対変位を与えるものかを判断する手法も提案されている。これは、遠近混在被写体や繰り返しパターンを含む被写体などがいわゆる偽合焦を引き起こすことがあるためで、f(i0)が所定値より大きい場合は像の一致度が低く、信頼性が低いと判断する手法などが知られている(例えば、特許文献2参照)
上述のように相対変位Xが完全に光センサピッチの整数倍になることは稀であるため、f(i0)により信頼性の判断を行う場合は判定値のその分余裕をとっておく必要がある。例えば、図7に示すようにf(i0)がf(i0+1)とほとんど等しいときが最も真の最小値とf(i0)の差が大きいと考えられるが、この場合でも像の一致度が低いと誤判定しないようにしなければならない。図7に示す評価関数の真の最小値は、例えば図7に示すように点(i0−1,f(i0−1))と点(i0,f(i0))を結ぶ直線と点(i0+1,f(i0+1))と点(i0+2,f(i0+2))を結ぶ交点の高さ(y座標の値)fminとして推定され、fminは十分小さく像の一致度は高いと判断することができる。一方、f(i0)自体の値はさほど小さいものではないが、このケースに対して像の一致度が低いと誤判定しないようにするために、f(i0)に対する判定値はある程度大きくせざるを得ない。このように判定値が大きめになっているため、図7のケースとは逆に、f(i0−1)がf(i0+1)とほとんど等しくf(i0)が真の最小値とほとんど等しいと考えられる場合に対しては、本当は像の一致度が低いのにも関わらず一致度が高いと判断されてしまうことがあるなど、信頼性が正しく判断されない場合が出てしまうという課題がある。 As described above, it is rare that the relative displacement X is an integral multiple of the optical sensor pitch. Therefore, when the reliability is determined by f (i 0 ), it is necessary to leave a margin corresponding to the determination value. There is. For example, as shown in FIG. 7, when f (i 0 ) is almost equal to f (i 0 +1), the difference between the true minimum value and f (i 0 ) is considered to be large. It is necessary to prevent misjudgment that the degree of matching is low. The true minimum value of the evaluation function shown in FIG. 7 is, for example, a straight line connecting point (i 0 −1, f (i 0 −1)) and point (i 0 , f (i 0 )) as shown in FIG. It is estimated as the preparative point (i 0 + 1, f ( i 0 +1)) and the point (i 0 + 2, f ( i 0 +2)) the connecting intersection in the height (y-coordinate value) fmin, fmin is sufficiently small image It can be determined that the degree of coincidence is high. On the other hand, although the value of f (i 0 ) itself is not so small, the determination value for f (i 0 ) is somewhat large in order to prevent erroneous determination that the image matching degree is low in this case. I have to. Since the determination value is thus large, f (i 0 −1) is almost equal to f (i 0 +1), and f (i 0 ) is a true minimum value, contrary to the case of FIG. For cases that are considered to be almost equal, there is a problem that reliability may not be judged correctly, for example, it may be judged that the degree of coincidence is high despite the fact that the degree of coincidence of images is actually low. There is.
また、上述の第1の従来例および第2の従来例で示した補間方法では、f(x)の真の最小値を与えるx=x0の近傍におけるf(x)が、x=x0に対し左右対称であることを前提としている。これを根拠に、背景技術で説明した補間方法および、f(i0−1)>f(i0+1)の場合はi0とi0+1の間に真の相対変位が存在し、f(i0−1)<f(i0+1)の場合はi0−1とi0の間に真の相対変位が存在するという判断を行っている。すなわち、従来の距離測定方法はこの左右対称性に拠るところ大であるが、この左右対称性が崩れる場合がある。以下に左右対称性が崩れる場合について説明する。
通常2つのフォトセンサアレイの出力は相対変位を除いて等しい。jをフォトセンサアレイ中のフォトセンサ番号、Img(j)をイメージ信号を表わす関数、zを相対変位とすると、2つのフォトセンサアレイの出力L(j),R(j)は、L(j)=Img(j+z),R(j)=Img(j)というように表わされる。これより、例えば(1)式中の|L(j)−R(j+i)|は|Img(j+z)−Img(j+i)|となり、(1)式のf(i)のグラフがi=zに対し対称になることがわかる。逆にL(j),R(j)が同一の関数Img(j)により表わせない場合、評価関数も左右対称とならない場合が出てくる。
Further, in the interpolation methods shown in the first conventional example and the second conventional example, f (x) in the vicinity of x = x 0 that gives the true minimum value of f (x) is x = x 0. Is assumed to be symmetrical. Based on this, there is a true relative displacement between i 0 and i 0 +1 when f (i 0 −1)> f (i 0 +1) and the interpolation method described in the background art, and f ( When i 0 −1) <f (i 0 +1), it is determined that a true relative displacement exists between i 0 −1 and i 0 . That is, the conventional distance measurement method is largely based on this left-right symmetry, but this right-left symmetry may be lost. A case where the left-right symmetry is broken will be described below.
Normally, the outputs of the two photosensor arrays are equal except for relative displacement. When j is a photosensor number in the photosensor array, Img (j) is a function representing an image signal, and z is a relative displacement, outputs L (j) and R (j) of the two photosensor arrays are L (j ) = Img (j + z), R (j) = Img (j). Thus, for example, | L (j) −R (j + i) | in the expression (1) becomes | Img (j + z) −Img (j + i) |, and the graph of f (i) in the expression (1) represents i It turns out that it becomes symmetrical with respect to = z. Conversely, if L (j) and R (j) cannot be represented by the same function Img (j), the evaluation function may not be symmetrical.
L(j),R(j)が同一の関数Img(j)により表わせない第1の場合が距離の異なる複数の被写体の映像を同時にフォトセンサアレイに受けた、いわゆる遠近混在の場合である。この場合L(j),R(j)は、L(j)=Img1(j+z1)+Img2(j+z2),R(j)=Img1(j)+Img2(j)というように表わされる。なお、これは距離の異なる2つの被写体が存在し、それぞれの相対変位がそれぞれz1,z2である場合を想定している。この場合、評価関数として|(Img1(j+z1)+Img2(j+z2))−(Img1(j+i)+Img2(j+i))|=|(Img1(j+z1)−Img1(j+i))+(Img2(j+z2)−Img2(j+i))|の計算を行う必要があるが、全体を把握するためにこれを|Img1(j+z1)−Img1(j+i)|+|Img2(j+z2)−Img2(j+i)|で置換して、考察を行う。これはすなわち2つの被写体に関する評価関数をそれぞれ独立に求め、最後に足し合わすことに相当する。図8にその例を示すが、グラフImg1,Img2はそれぞれ対称であるにも関わらず、グラフImg1+Img2は左右対称になっていない。なお、上の絶対値式に関する置換が正しくないのは2つのグラフImg1,Img2の最小値を与える相対変位z1とz2の間の区間のみであり、全体の傾向を把握するのに上の置換は問題ない。 The first case where L (j) and R (j) cannot be represented by the same function Img (j) is a so-called mixed perspective where images of a plurality of subjects having different distances are simultaneously received by the photosensor array. In this case, L (j) and R (j) are expressed as L (j) = Img1 (j + z1) + Img2 (j + z2), R (j) = Img1 (j) + Img2 (j). It is assumed that there are two subjects with different distances and the relative displacements are z1 and z2, respectively. In this case, | (Img1 (j + z1) + Img2 (j + z2)) − (Img1 (j + i) + Img2 (j + i)) | = | (Img1 (j + z1) −Img1 (j + i)) + (Img2 (j + z2) −Img2 (J + i)) | needs to be calculated, but in order to grasp the whole, this is replaced by | Img1 (j + z1) -Img1 (j + i) | + | Img2 (j + z2) -Img2 (j + i) | Consider it. In other words, this is equivalent to obtaining the evaluation functions for the two subjects independently and adding them together at the end. An example thereof is shown in FIG. 8, but the graphs Img1 and Img2 are not symmetrical although the graphs Img1 and Img2 are symmetrical. It is to be noted that the substitution with respect to the above absolute value formula is not correct only in the interval between the relative displacements z1 and z2 giving the minimum values of the two graphs Img1 and Img2, and the above substitution is used to grasp the overall tendency. no problem.
L(j),R(j)が同一の関数Img(j)により表わせない第2の場合が、点光源などの被写体映像の急峻な変化にフォトセンサが追随しきれない場合である。すなわち、被写体像のもつ周波数成分が高すぎて、フォトセンサアレイのフォトセンサピッチで決まるサンプリングでは被写体像を再現しきれず、L(j),R(j)が異なる関数形となってしまう場合である。この場合の例を、図9〜15に示す。図9に示すように、同じ点光源に対し2つのフォトセンサアレイLEFT,RIGHTで異なるフォトセンサ出力を得て、図10(a)〜(c)に示すように2つの像の相対変位を順次シフトさせて評価関数を求めていくと図11のように左右非対称なグラフになる。
上記以外にも、低コントラストの被写体は正規の信号とノイズの差が小さい、いわゆるSN比が小さい状態のためL(j),R(j)が同形になりにくく、左右対称性が崩れる場合がある。さらに、縞模様などの繰り返しパターンの被写体では被写体像の繰り返しピッチとフォトセンサセンサピッチの関係でモアレが生じたり、繰り返しパターンに例えばグラデーションなどのパターンが重畳されて、上述のImg1(j)が繰り返しパターン、Img2(j)がモアレやグラデーションなどのパターンといった組み合わせになり、評価関数の左右対称性の崩れに繋がることがある。
A second case where L (j) and R (j) cannot be expressed by the same function Img (j) is a case where the photosensor cannot follow a sudden change in a subject image such as a point light source. That is, the frequency component of the subject image is too high, and the subject image cannot be reproduced by sampling determined by the photosensor pitch of the photosensor array, and L (j) and R (j) have different function forms. is there. Examples of this case are shown in FIGS. As shown in FIG. 9, different photosensor outputs are obtained by the two photosensor arrays LEFT and RIGHT for the same point light source, and the relative displacement of the two images is sequentially changed as shown in FIGS. 10 (a) to 10 (c). When the evaluation function is obtained by shifting, the graph becomes asymmetrical as shown in FIG.
In addition to the above, a low-contrast subject has a small difference between a normal signal and noise, that is, a so-called SN ratio is small, so that L (j) and R (j) are unlikely to have the same shape and the left-right symmetry may be lost. is there. Furthermore, in a subject with a repetitive pattern such as a striped pattern, moire occurs due to the relationship between the repetitive pitch of the subject image and the photosensor sensor pitch, or a pattern such as gradation is superimposed on the repetitive pattern, and the above Img1 (j) is repeated. The pattern Img2 (j) may be a combination of patterns such as moire and gradation, which may lead to a collapse of the symmetry of the evaluation function.
このように評価関数の左右対称性が崩れることは上述の補間方法に対する根拠を失うことでもあり、さらに左右対称性の崩れが激しくなると図12に示すように(i0−1,f(i0−1))と(i0,f(i0))を結ぶ直線と(i0+1,f(i0+1))と(i0+2,f(i0+2))を結ぶ直線の交点がi0とi0+1の間に存在しなくなり、f(i0−1)>f(i0+1)の場合はi0とi0+1の間に真の相対変位が存在し、f(i0−1)<f(i0+1)の場合はi0−1とi0の間に真の相対変位が存在するという上述の判断にも疑義が生じることに繋がり、左右対称性の崩れは補間計算の結果の信頼性に問題を生じさせることになる。
そこで、本発明は上記課題を解決するためになされたものであり、その目的は、上述の信頼性に問題があることを検出することにより、問題のある被写体にも対処することのできる距離測定方法を提供することにある。
The loss of left-right symmetry of the evaluation function in this way also means that the basis for the above-described interpolation method is lost. Further, when the right-left symmetry is greatly broken, as shown in FIG. 12, (i 0 -1, f (i 0 -1)) and (i 0, f (i 0 )) linearly and (i 0 + 1, f (
Accordingly, the present invention has been made to solve the above-described problems, and the object of the present invention is to measure the distance that can deal with a problem subject by detecting that there is a problem in the above-described reliability. It is to provide a method.
そこで、上記課題を解決するために、請求項1に係る発明は、被写体から放射または反射される光束のうちの互いに異なる部分の光束を少なくとも2つのフォトセンサアレイ上にそれぞれ投影し、該各センサアレイ上に形成される被写体像の相対変位から前記被写体までの距離を求めるために、
前記フォトセンサアレイのセンサピッチのi(整数)倍の変位量に対する前記2つの像の不一致度を示す尺度f(i)とその最小値を与えるiの値i0、そのときの関数値f(i0)および該i0の前後のi0−1,i0−2,i0+1,i0+2に対応する関数値f(i0−1),f(i0−2),f(i0+1),f(i0+2)をそれぞれ求め、されにこれらの値から前記相対変位量を補間計算により求めるとともに、補間計算の信頼度を示す関数g(x0,x1,x2,x3)に対し前記関数値f(i0−1)とf(i0+1)とを比較して、
イ)f(i0−1)>f(i0+1)
ロ)f(i0−1)=f(i0+1)
ハ)f(i0−1)<f(i0+1)
のいずれの関係であるかを判定し、
前記イ)の場合はx0=f(i0−1),x1=f(i0),x2=f(i0+1),x3=f(i0+2)として関数g(x0,x1,x2,x3)を計算し、
ロ)の場合はg(x0,x1,x2,x3)=f(i0)とし、
ハ)の場合はx0=f(i0+1),x1=f(i0),x2=f(i0−1),x3=f(i0−2)として関数g(x0,x1,x2,x3)を計算し、該関数g(x0,x1,x2,x3)の値が所定値Hを超えるときに前記補間計算の信頼性が低いと判断する距離測定方法であることを特徴とする。
Accordingly, in order to solve the above-described problem, the invention according to
A scale f (i) indicating a degree of inconsistency between the two images with respect to a displacement amount i (integer) times the sensor pitch of the photosensor array, a value i 0 giving the minimum value, and a function value f ( i 0) and before and after i 0 -1 of the i 0, i 0 -2, i 0 + 1, i 0 +2 to the corresponding function value f (i 0 -1), f (i 0 -2), f ( i 0 +1) and f (i 0 +2) are obtained respectively, and the relative displacement amount is obtained by interpolation calculation from these values, and the function g (x0, x1, x2, x3) indicating the reliability of the interpolation calculation is obtained. Is compared with the function value f (i 0 −1) and f (i 0 +1),
A) f (i 0 −1)> f (i 0 +1)
B) f (i 0 −1) = f (i 0 +1)
C) f (i 0 −1) <f (i 0 +1)
To determine which relationship
In the case of a), the function g (x0, x1, x2) is assumed as x0 = f (i 0 −1), x1 = f (i 0 ), x2 = f (i 0 +1), x3 = f (i 0 +2). , X3)
B), g (x0, x1, x2, x3) = f (i 0 )
In the case of c), x0 = f (i 0 +1), x1 = f (i 0 ), x2 = f (i 0 −1), x3 = f (i 0 −2) and the function g (x0, x1, x2) , X3), and when the value of the function g (x0, x1, x2, x3) exceeds a predetermined value H, it is determined that the reliability of the interpolation calculation is low. .
請求項2に係る発明は、請求項1に係る発明において、前記関数g(x0,x1,x2,x3)が下記(I)式により表されることを特徴とする。
The invention according to
(数11)
g(x0,x1,x2,x3)=A1/A2
A1=2x0・x2−x0・x3+2x1・x3−3x1・x2
B1=x0−x1−x2+x3 ・・・(I)
請求項3に係る発明は、請求項1に係る発明において、前記関数g(x0,x1,x2,x3)が下記(II)式により表されることを特徴とする。
(Equation 11)
g (x0, x1, x2, x3) = A1 / A2
A1 = 2x0 · x2-x0 · x3 + 2x1 · x3-3x1 · x2
B1 = x0−x1−x2 + x3 (I)
The invention according to claim 3 is the invention according to
(数12)
g(x0,x1,x2,x3)=(2x1−x0+x2−k1(x3−x2))/2
k1=0〜0.5の定数 ・・・(II)
請求項4に係る発明は、請求項2または3に係る発明において、前記フォトセンサの出力をnビットのAD変換器によりデジタル化し、該デジタル化したフォトセンサ出力を一つのフォトセンサアレイあたりmデータを使って前記2つの像の不一致度を示す前記尺度f(i)を計算し、フォトセンサ出力の平均ランダムばらつきをa%とするときに前記所定値Hが下記(III)式により表されることを特徴とする。
(Equation 12)
g (x0, x1, x2, x3) = (2x1-x0 + x2-k1 (x3-x2)) / 2
Constant of k1 = 0 to 0.5 (II)
The invention according to
(数13)
H=k2・(a/100)・2n・m
k2=0.1〜1.0の定数 ・・・(III)
請求項5に係る発明は、請求項1に係る発明において、前記関数g(x0,x1,x2,x3)が下記(IV)式により表されるとともに、前記所定値Hが0であることを特徴とする。
(Equation 13)
H = k2 · (a / 100) · 2 n · m
Constant of k2 = 0.1 to 1.0 (III)
The invention according to claim 5 is that, in the invention according to
(数14)
g(x0,x1,x2,x3)=x1+x3−2x2 ・・・(IV)
(Equation 14)
g (x0, x1, x2, x3) = x1 + x3-2x2 (IV)
この発明の距離測定方法は、三角測距の原理に基づき被写体までの距離を測定する際に計算される2つの被写体像の相関を示す評価関数に関し、真の最小値を推定して真の最小値自体や真の最小値を与える相対変位を評価することにより、距離測定結果の信頼性評価精度を向上することのできる距離測定方法を提供することができる。 The distance measuring method of the present invention relates to an evaluation function indicating the correlation between two object images calculated when measuring the distance to the object based on the principle of triangulation, and estimates the true minimum value to estimate the true minimum It is possible to provide a distance measurement method capable of improving the reliability evaluation accuracy of the distance measurement result by evaluating the value itself or the relative displacement that gives the true minimum value.
本発明は、補間計算により真の相対変位xを求めるだけではなく、真の最小値f(x)も推定して所定値Hと比較することにより信頼性評価を行なう。所定値Hについては、フォトセンサのランダムばらつき(a%)、A/D変換器によりデジタル化されたフォトセンサ出力の平均ビット数(n)、評価関数の計算に適用する1フォトセンサアレイあたりのフォトセンサ数(m)を考慮して決めるとよい。さらに、低コントラスト被写体などフォトセンサ出力のSN比が低い場合などに対処するため、推定された真の相対変位と背景技術の項で説明したi0との位置関係による信頼性評価も実施するとよい。
以下、詳細について実施例により説明を行なう。
In the present invention, not only the true relative displacement x is obtained by interpolation calculation, but also the true minimum value f (x) is estimated and compared with a predetermined value H to perform reliability evaluation. For the predetermined value H, the random variation (a%) of the photosensors, the average number of bits of the photosensor output digitized by the A / D converter (n), and per photosensor array applied to the calculation of the evaluation function It may be determined in consideration of the number of photosensors (m). Further, in order to deal with a case where the S / N ratio of the photosensor output is low, such as a low-contrast subject, it is preferable to perform reliability evaluation based on the positional relationship between the estimated true relative displacement and i 0 described in the background art section. .
Details will be described below with reference to examples.
実施例1は、f(i0−1)>f(i0+1)が成り立ち、真の相対変位がi0と(i0+1)の間にあると判断されるとき、図7に示すように点(i0−1,f(i0−1))と点(i0,f(i0))を結ぶ直線と点(i0+1,f(i0+1))と点(i0+2,f(i0+2))を結ぶ交点の高さ(y座標の値)fminをもとめて所定値Hと比較を行なうものである。f(i0−1)>f(i0+1)という条件は真の相対変位Xがi0とi0+1の間にあると判断するためのもので、f(i0−1)<f(i0+1)の場合はi0−2およびi0−1とi0+2およびi0+1の立場を入れ替えて以下同様にすればよい。なお、f(i0−1)=f(i0+1)の場合は補間を行なわず、f(i0)が真の最小値であるとする。
計算の詳細は省略するが、f(i0−1)>f(i0+1)の場合、x0=f(i0−1),x1=f(i0),x2=f(i0+1),x3=f(i0+2)とすると、fmin=g(x0,x1,x2,x3)は次式で与えられる。
In the first embodiment, when f (i 0 −1)> f (i 0 +1) is satisfied and the true relative displacement is determined to be between i 0 and (i 0 +1), as shown in FIG. point two (i 0 -1, f (i 0 -1)) and the point (i 0, f (i 0 )) connecting the straight line and the point (i 0 + 1, f ( i 0 +1)) and the point (i 0 The height (y coordinate value) fmin of the intersection connecting +2, f (i 0 +2)) is obtained and compared with a predetermined value H. The condition of f (i 0 −1)> f (i 0 +1) is for judging that the true relative displacement X is between i 0 and i 0 +1, and f (i 0 −1) <f In the case of (i 0 +1), the positions of i 0 -2 and i 0 −1 and i 0 +2 and i 0 +1 may be interchanged and the same may be performed. Note that when f (i 0 −1) = f (i 0 +1), interpolation is not performed and f (i 0 ) is a true minimum value.
Although details of the calculation are omitted, when f (i 0 −1)> f (i 0 +1), x0 = f (i 0 −1), x1 = f (i 0 ), x2 = f (i 0 +1) ), X3 = f (i 0 +2), fmin = g (x0, x1, x2, x3) is given by the following equation.
(数15)
g(x0,x1,x2,x3)=A1/A2
A1=2x0・x2−x0・x3+2x1・x3−3x1・x2
B1=x0−x1−x2+x3 ・・・(I)
上述のように、f(i0−1)<f(i0+1)の場合はi0−2およびi0−1とi0+2およびi0+1の立場を入れ替えて、x0=f(i0+1),x1=f(i0),x2=f(i0−1),x3=f(i0−2)とすればよい。なお、上述のようにf(i0−1)=f(i0+1)の場合は、fmin=g(x0,x1,x2,x3)=f(i0)とおく。
(Equation 15)
g (x0, x1, x2, x3) = A1 / A2
A1 = 2x0 · x2-x0 · x3 + 2x1 · x3-3x1 · x2
B1 = x0−x1−x2 + x3 (I)
As described above, when f (i 0 −1) <f (i 0 +1), the positions of i 0 −2 and i 0 −1 and i 0 +2 and i 0 +1 are interchanged, and x0 = f (i 0 +1), x1 = f (i 0 ), x2 = f (i 0 −1), and x3 = f (i 0 −2). As described above, when f (i 0 −1) = f (i 0 +1), fmin = g (x0, x1, x2, x3) = f (i 0 ) is set.
所定値Hの決め方としては、フォトセンサのランダムばらつき(a%)、A/D変換器によりデジタル化されたフォトセンサ出力の平均ビット数(n)、評価関数の計算に適用する1フォトセンサアレイあたりのフォトセンサ数(m)を考慮して、次式のように決めるとよい。なお、k1は調整用の定数である。 The predetermined value H is determined by random variations (a%) of photosensors, the average number of bits (n) of the photosensor output digitized by the A / D converter, and one photosensor array applied to the calculation of the evaluation function Taking into account the number of photosensors (m), it may be determined as follows: K1 is a constant for adjustment.
(数16)
H=k2・(a/100)・2n・m
k2=0.1〜1.0の定数 ・・・(III)
(III)式は、真の最小値はランダムばらつきを除けばゼロになるはず、という考え方に基づいている。求めたfmin=g(x0,x1,x2,x3)が所定値Hより大きいと相関が低く、信頼性が低いと判断する。
(Equation 16)
H = k2 · (a / 100) · 2 n · m
Constant of k2 = 0.1 to 1.0 (III)
Equation (III) is based on the idea that the true minimum value should be zero except for random variations. If the obtained fmin = g (x0, x1, x2, x3) is larger than the predetermined value H, it is determined that the correlation is low and the reliability is low.
実施例2は、背景技術の項で説明した補間計算に関する第1の従来例の考え方に基づき、真の最小値を推定するものである。すなわち、図5に示すfminを求めて所定値Hと比較を行なう。計算の詳細は省略するが、実施例1と同様に、f(i0−1)>f(i0+1)の場合、x0=f(i0−1),x1=f(i0),x2=f(i0+1),x3=f(i0+2)とし、f(i0−1)<f(i0+1)の場合は、x0=f(i0+1),x1=f(i0),x2=f(i0−1),x3=f(i0−2)とすれば、fmin=g(x0,x1,x2,x3)は次式で与えられる。 The second embodiment estimates the true minimum value based on the concept of the first conventional example related to the interpolation calculation described in the background art section. That is, fmin shown in FIG. 5 is obtained and compared with the predetermined value H. Although details of the calculation are omitted, as in the first embodiment, when f (i 0 −1)> f (i 0 +1), x0 = f (i 0 −1), x1 = f (i 0 ), If x2 = f (i 0 +1), x3 = f (i 0 +2) and f (i 0 −1) <f (i 0 +1), then x0 = f (i 0 +1), x1 = f ( If i 0 ), x2 = f (i 0 −1), and x3 = f (i 0 −2), then fmin = g (x0, x1, x2, x3) is given by the following equation.
(数17)
g(x0,x1,x2,x3)=(2x1−x0+x2−k1(x3−x2))/2
k1=0〜0.5の定数 ・・・(II)
なお、f(i0−1)=f(i0+1)の場合は、実施例1と同様に、fmin=g(x0,x1,x2,x3)=f(i0)とおく。また、k1=0の場合は、上述の補間計算に関する第2の実施例に対応したものになる。
所定値Hの決め方についても実施例1と同様である。
(Equation 17)
g (x0, x1, x2, x3) = (2x1-x0 + x2-k1 (x3-x2)) / 2
Constant of k1 = 0 to 0.5 (II)
When f (i 0 −1) = f (i 0 +1), fmin = g (x0, x1, x2, x3) = f (i 0 ) is set as in the first embodiment. Further, when k1 = 0, this corresponds to the second embodiment relating to the interpolation calculation described above.
The method for determining the predetermined value H is the same as in the first embodiment.
低コントラストの被写体は上述のL(j)とR(j)の変化が乏しくほぼ同一の値をとるため、評価関数の算出において計算される|L(j)−R(j+i)|や|L(j−s)−R(j+t)|もほとんどゼロに近い値となり、結局評価関数自体の値も小さなものになる。(I)式や(II)式中のx0,x1,x2,x3がゼロに近い値だと、評価関数の左右対称性が崩れても(I)式や(II)式で推定される真の最小値が所定値Hを下回ってしまう可能性がある。この場合、左右対称性が崩れていて上述のように信頼性に問題ありと判断すべきところを、問題なしと誤判断してしまうことになる。このような場合には、直接評価関数の左右対称性の崩れを評価するのが有効である。但し、低コントラストの被写体に対する評価関数はSN比が小さいため、はっきりと左右対称性が崩れているものだけを検出するとよい。すなわち、図12に示すように、f(i0−1)>f(i0+1)が成り立ち、真の相対変位がi0と(i0+1)の間にあるにもかかわらず、点(i0−1,f(i0−1))と点(i0,f(i0))を結ぶ直線と点(i0+1,f(i0+1))と点(i0+2,f(i0+2))を結ぶ交点がi0と(i0+1)の間にないという場合を検出するものである。実施例1と同様、f(i0−1)>f(i0+1)という条件は真の相対変位Xがi0とi0+1の間にあるはずと判断するためのもので、f(i0−1)<f(i0+1)の場合はi0−2およびi0−1とi0+2およびi0+1の立場を入れ替えて以下同様にすればよい。なお、f(i0−1)=f(i0+1)の場合、以下の判断は行なわない。
A low-contrast subject has almost no change in the above-described L (j) and R (j), and thus takes almost the same value. Therefore, | L (j) −R (j + i) | (J−s) −R (j + t) | also becomes a value almost close to zero, and eventually the value of the evaluation function itself becomes small. If x0, x1, x2, and x3 in the formulas (I) and (II) are close to zero, the true value estimated by the formulas (I) and (II) even if the left-right symmetry of the evaluation function is lost. May be less than the predetermined value H. In this case, the left-right symmetry is broken and the place where it should be determined that there is a problem in reliability as described above is erroneously determined as no problem. In such a case, it is effective to evaluate the collapse of the symmetry of the direct evaluation function. However, since the S / N ratio of the evaluation function for a low-contrast object is small, it is preferable to detect only those whose symmetry is clearly broken. That is, as shown in FIG. 12, even though f (i 0 −1)> f (i 0 +1) holds and the true relative displacement is between i 0 and (i 0 +1), the point ( i 0 -1, f (i 0 -1)) and the point (i 0, f (i 0 )) connecting the straight line and the point (i 0 + 1, f ( i 0 +1)) and the
計算の詳細は省略するが、実施例1や2と同様に、f(i0−1)>f(i0+1)の場合、x0=f(i0−1),x1=f(i0),x2=f(i0+1),x3=f(i0+2)とし、f(i0−1)<f(i0+1)の場合は、x0=f(i0+1),x1=f(i0),x2=f(i0−1),x3=f(i0−2)として、次式のg(x0,x1,x2,x3)が正であると、上記の直線の交点があるべき範囲から外れるため(図12の場合、交点がi0より左に存在する)信頼性に問題ありと判断する。 Although details of the calculation are omitted, as in the first and second embodiments, when f (i 0 −1)> f (i 0 +1), x0 = f (i 0 −1), x1 = f (i 0 ), X2 = f (i 0 +1), x3 = f (i 0 +2), and if f (i 0 −1) <f (i 0 +1), then x0 = f (i 0 +1), x1 = If f (i 0 ), x2 = f (i 0 −1), x3 = f (i 0 −2) and g (x0, x1, x2, x3) in the following equation is positive, Since the intersection is out of the range that should be (in the case of FIG. 12, the intersection exists to the left of i 0 ), it is determined that there is a problem in reliability.
(数18)
g(x0,x1,x2,x3)=x1+x3−2x2 ・・・(IV)
(Equation 18)
g (x0, x1, x2, x3) = x1 + x3-2x2 (IV)
図1に第4の実施例として、本発明に係わり図4のマイコン64により実行される信頼性判定に関するフローチャートを示す。
図1に示すフローチャートにおいて、S1〜S3でマイコン64がフォトセンサアレイ53,54のアナログ出力をA/D変換器62,63によりデジタル変換したデータを取り込み、不一致度を示す評価関数f(i)およびその最小値を与えるi=i0を求める。次にS4で4つのフラグFLG1,FLG2,FLG3,EQFをゼロに初期化する。FLG1,FLG2,FLG3は、それぞれ上述の実施例1,2,3で示した判断を行なって信頼性に問題ありと判断されると”1”となるフラグである。フラグEQFはf(i0−1)=f(i0+1)のときに”1”となり、それ以外のときには”0”となるフラグである。S5でf(i0−1)とf(i0+1)の大小比較を行い、等しいと判断されるとS6に分岐し、EQFが”1”にセットされてサブルーチンSINRAISEIをコールする。一方、S5でf(i0−1)>f(i0+1)もしくはS5でf(i0−1)>f(i0+1)と判断されると、S7もしくはS8に分岐してそれぞれx0,x1,x2,x3の値がセットされてサブルーチンSINRAISEIをコールする。サブルーチンSINRAISEIで信頼性が判定され、その結果に従いフラグFLG1,FLG2,FLG3の値が決定されると、動作を終了する。
FIG. 1 shows a flowchart relating to the reliability determination executed by the
In the flowchart shown in FIG. 1, in S1 to S3, the
図2にサブルーチンSINRAISEIに関するフローチャートを示す。まず、S9でEQF=0か、すなわちf(i0−1)=f(i0+1)が成り立つかの判定を行い、成り立つと判断されるとS10に分岐する。f(i0−1)=f(i0+1)が成り立つ場合は補間処理を行なう意味がないと判断し、S10ではf(i0)が真の最小値であると見なして所定値Hとの大小関係を比較する。f(i0)>Hであると判断されると、FLG1およびFLG2を”1”にセットして、サブルーチンの処理を終了する。S10においてf(i0)≦Hであると判断されると、そのまま(FLG1およびFLG2が”0”のまま)サブルーチンの処理を終了する。
S9でEQFが0でない、すなわちf(i0−1)とf(i0+1)が等しくないと判断されると、S12に分岐する。S12において真の最小値に関しg1,g2の2つの推定値を計算するとともに、実施例3にて説明した評価関数の左右対称性の崩れを判断するg3を計算する。なお、g1,g2,g3はそれぞれ実施例1,2,3で説明したg(x0,x1,x2,x3)に対応する。
FIG. 2 shows a flowchart regarding the subroutine SINRAISEI. First, in S9, it is determined whether EQF = 0, that is, f (i 0 −1) = f (i 0 +1) is satisfied, and if it is determined that it is satisfied, the process branches to S10. If f (i 0 −1) = f (i 0 +1) holds, it is determined that there is no point in performing the interpolation process. In S10, f (i 0 ) is regarded as the true minimum value and the predetermined value H Compare the magnitude relationship of. If it is determined that f (i 0 )> H, FLG1 and FLG2 are set to “1”, and the subroutine processing is terminated. If it is determined in step S10 that f (i 0 ) ≦ H, the subroutine processing is terminated as it is (FLG1 and FLG2 remain “0”).
If it is determined in S9 that EQF is not 0, that is, f (i 0 −1) and f (i 0 +1) are not equal, the process branches to S12. In S12, two estimated values of g1 and g2 are calculated regarding the true minimum value, and g3 for judging the collapse of the symmetry of the evaluation function described in the third embodiment is calculated. G1, g2, and g3 correspond to g (x0, x1, x2, and x3) described in the first, second, and third embodiments, respectively.
S13でg1を所定値Hと比較し、g1>HであればS14に分岐してFLG1を”1”にセットしてS15に進む。S13でg1≦Hと判断されればそのままS15に分岐する。S15ではg2を所定値Hと比較し、g2>HであればS16に分岐してFLG2を”1”にセットしてS17に進む。S15でg2≦Hと判断されればそのままS17に分岐する。S17ではg3を所定値”0”と比較し、g3>0であればS18に分岐してFLG3を”1”にセットしてサブルーチンの処理を終了する。S17でg1≦0と判断されると、そのままサブルーチンの処理を終了する。 In step S13, g1 is compared with a predetermined value H. If g1> H, the process branches to step S14, and FLG1 is set to "1" and the process proceeds to step S15. If g1 ≦ H is determined in S13, the process branches to S15 as it is. In S15, g2 is compared with a predetermined value H. If g2> H, the process branches to S16 to set FLG2 to “1” and proceeds to S17. If g2 ≦ H is determined in S15, the process branches to S17 as it is. In S17, g3 is compared with a predetermined value “0”. If g3> 0, the process branches to S18 to set FLG3 to “1” and the subroutine processing is terminated. If g1 ≦ 0 is determined in S17, the subroutine processing is terminated as it is.
51,52 レンズ
53,54 フォトセンサアレイ
55 被写体
56,57 被写体像
58,59 光軸
62,63 A/D変換器
64 演算処理装置(マイコン)
FLG1,FLG2,FLG2,EQF フラグ
fmin 推定された真の最小値
H 信頼性評価の基準値
k1,k2 定数
51, 52
FLG1, FLG2, FLG2, EQF flag fmin Estimated true minimum value H Reference value for reliability evaluation k1, k2 constant
Claims (5)
前記フォトセンサアレイのセンサピッチのi(整数)倍の変位量に対する前記2つの像の不一致度を示す尺度f(i)とその最小値を与えるiの値i0、そのときの関数値f(i0)および該i0の前後のi0−1,i0−2,i0+1,i0+2に対応する関数値f(i0−1),f(i0−2),f(i0+1),f(i0+2)をそれぞれ求め、されにこれらの値から前記相対変位量を補間計算により求めるとともに、補間計算の信頼度を示す関数g(x0,x1,x2,x3)に対し前記関数値f(i0−1)とf(i0+1)とを比較して、
イ)f(i0−1)>f(i0+1)
ロ)f(i0−1)=f(i0+1)
ハ)f(i0−1)<f(i0+1)
のいずれの関係であるかを判定し、
前記イ)の場合はx0=f(i0−1),x1=f(i0),x2=f(i0+1),x3=f(i0+2)として関数g(x0,x1,x2,x3)を計算し、
ロ)の場合はg(x0,x1,x2,x3)=f(i0)とし、
ハ)の場合はx0=f(i0+1),x1=f(i0),x2=f(i0−1),x3=f(i0−2)として関数g(x0,x1,x2,x3)を計算し、該関数g(x0,x1,x2,x3)の値が所定値Hを超えるときに前記補間計算の信頼性が低いと判断することを特徴とする距離測定方法。 Of the light beams emitted or reflected from the subject, different portions of the light beam are projected onto at least two photosensor arrays, and the distance from the relative displacement of the subject image formed on each sensor array to the subject is determined. To seek
A scale f (i) indicating a degree of inconsistency between the two images with respect to a displacement amount i (integer) times the sensor pitch of the photosensor array, a value i 0 giving the minimum value, and a function value f ( i 0) and before and after i 0 -1 of the i 0, i 0 -2, i 0 + 1, i 0 +2 to the corresponding function value f (i 0 -1), f (i 0 -2), f ( i 0 +1) and f (i 0 +2) are obtained respectively, and the relative displacement amount is obtained by interpolation calculation from these values, and the function g (x0, x1, x2, x3) indicating the reliability of the interpolation calculation is obtained. Is compared with the function value f (i 0 −1) and f (i 0 +1),
A) f (i 0 −1)> f (i 0 +1)
B) f (i 0 −1) = f (i 0 +1)
C) f (i 0 −1) <f (i 0 +1)
To determine which relationship
In the case of a), the function g (x0, x1, x2) is assumed as x0 = f (i 0 −1), x1 = f (i 0 ), x2 = f (i 0 +1), x3 = f (i 0 +2). , X3)
B), g (x0, x1, x2, x3) = f (i 0 )
In the case of c), x0 = f (i 0 +1), x1 = f (i 0 ), x2 = f (i 0 −1), x3 = f (i 0 −2) and the function g (x0, x1, x2) , X3), and when the value of the function g (x0, x1, x2, x3) exceeds a predetermined value H, it is determined that the reliability of the interpolation calculation is low.
(数1)
g(x0,x1,x2,x3)=A1/A2
A1=2x0・x2−x0・x3+2x1・x3−3x1・x2
B1=x0−x1−x2+x3 ・・・(I) The distance measurement method according to claim 1, wherein the function g (x0, x1, x2, x3) is expressed by the following equation (I).
(Equation 1)
g (x0, x1, x2, x3) = A1 / A2
A1 = 2x0 · x2-x0 · x3 + 2x1 · x3-3x1 · x2
B1 = x0−x1−x2 + x3 (I)
(数2)
g(x0,x1,x2,x3)=(2x1−x0+x2−k1(x3−x2))/2
k1=0〜0.5の定数 ・・・(II) The distance measurement method according to claim 1, wherein the function g (x0, x1, x2, x3) is expressed by the following equation (II).
(Equation 2)
g (x0, x1, x2, x3) = (2x1-x0 + x2-k1 (x3-x2)) / 2
Constant of k1 = 0 to 0.5 (II)
(数3)
H=k2・(a/100)・2n・m
k2=0.1〜1.0の定数 ・・・(III) The scale of f (i) indicating the degree of inconsistency between the two images by digitizing the output of the photosensor by an n-bit AD converter and using the digitized photosensor output using m data per photosensor array. The distance measuring device according to claim 2, wherein the predetermined value H is expressed by the following equation (III) when the average random variation of the photosensor output is a%.
(Equation 3)
H = k2 · (a / 100) · 2 n · m
Constant of k2 = 0.1 to 1.0 (III)
(数4)
g(x0,x1,x2,x3)=x1+x3−2x2 ・・・(IV)
The distance measuring method according to claim 1, wherein the function g (x0, x1, x2, x3) is expressed by the following equation (IV), and the predetermined value H is 0.
(Equation 4)
g (x0, x1, x2, x3) = x1 + x3-2x2 (IV)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003349873A JP2005114581A (en) | 2003-10-08 | 2003-10-08 | Distance measurement method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2003349873A JP2005114581A (en) | 2003-10-08 | 2003-10-08 | Distance measurement method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2005114581A true JP2005114581A (en) | 2005-04-28 |
Family
ID=34541620
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2003349873A Withdrawn JP2005114581A (en) | 2003-10-08 | 2003-10-08 | Distance measurement method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2005114581A (en) |
-
2003
- 2003-10-08 JP JP2003349873A patent/JP2005114581A/en not_active Withdrawn
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3205477B2 (en) | Inter-vehicle distance detection device | |
| JP4554316B2 (en) | Stereo image processing device | |
| CN100381780C (en) | Tilt angle detection device and tilt angle detection method | |
| JPS6036905A (en) | focus measuring device | |
| JPH0690357B2 (en) | Deviation amount detector | |
| JP3353865B2 (en) | Distance measuring device | |
| JPH0674761A (en) | Range finder | |
| JP3343697B2 (en) | Focusing state or subject distance detection device | |
| JP2005114581A (en) | Distance measurement method | |
| JP4127808B2 (en) | Ranging device | |
| JPH11132763A (en) | Distance measuring method | |
| JP3152483B2 (en) | Distance measuring device | |
| JPH0754371B2 (en) | Focus detection method | |
| JP3354448B2 (en) | Vehicle distance measuring device | |
| JPH07306038A (en) | Distance measuring instrument | |
| JP2004257952A (en) | Distance measurement method | |
| JP3239413B2 (en) | Camera autofocus device | |
| JP3721803B2 (en) | Ranging device | |
| JP2004233190A (en) | Distance measurement method | |
| JPH0933248A (en) | Passive triangulation rangefinder | |
| JP2545758B2 (en) | Focus detection device | |
| JPH04230715A (en) | Focus detector | |
| JPH04161809A (en) | Distance measuring apparatus for vehicle | |
| JPH0527161A (en) | Focus detection device | |
| JPH06100465B2 (en) | Focus detection device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060315 |
|
| RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20060703 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20060704 |
|
| A977 | Report on retrieval |
Effective date: 20080214 Free format text: JAPANESE INTERMEDIATE CODE: A971007 |
|
| A131 | Notification of reasons for refusal |
Effective date: 20080325 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
| A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20080526 |