【0001】
【発明の属する技術分野】
本発明は三角測距を用いたカメラの測距装置に関するものであり、特に調整工程において、複数の調整距離データを用いて、実使用時の測距データを補正する補正演算に関するものである。
【0002】
【従来の技術】
従来、カメラの測距装置としては、被写体に向けて、投光レンズにより赤外光を集光して投光し、その被写体からの反射光を所定の基線長だけ離れた位置のある集光レンズにより、位置検出素子上に集光し、その集光された受光像の位置を検出するいわゆるアクティブ方式の測距装置や、また、被写体の像を異なる光軸を持つ受光レンズで、一対の受光素子上に結像して、その像のずれ量を検出するいわゆるパッシブ方式の測距装置が広く用いられている。
【0003】
これらの測距装置においては、被写体までの距離Lの逆数に比例した値を測距データとして出力する。
【0004】
しかしながら、測距装置から得られる距離データは、投光素子、受光素子の位置ずれ(基線長方向へのずれ、あるいは、傾き)、受光素子のリニアリティ、また、測距光学系の焦点距離等のずれ等により、理論値からずれが発生する。このようなずれは、測距出力のレベルシフト、および、傾きの変化となって現れる。測距出力のレベルシフトや、傾きの変化に対しては、特開昭62−3609号公報に示すように、測距出力の各実測点を通るように補間処理を施して、補正カーブを作成し、この補正カーブに基いて、物体位置と実測値の関係を全測距範囲にわたって所定の間隔毎に調べ、この結果を基に補正テーブルを作成し、この補正テーブルを基に測距データーの補正を行うものが開示されている。
【0005】
また、特開平1−201633号公報に示すように、インナーフォーカスレンズの焦点距離調節に関して、、所定のレンズ焦点距離におけるレンズの繰り出しカーブ、レンズ組立時のばらつき等による移動量の差を記憶し、被写体距離とレンズの焦点距離から焦点調節のための移動量を演算するものにおいて、繰り出しカーブが記憶されていないレンズの焦点距離に関しては、補間演算を行うことにより、レンズ移動量を演算することが開示されている。
【0006】
【発明が解決しようとする課題】
しかしながら、上記特開昭62−3609号公報の従来例では、測距出力の各実測点を通るように補間処理を施して、補正カーブを作成し、この補正カーブに基いて、物体位置と実測値の関係を全測距範囲にわたって所定の間隔毎に調べ、この結果を基に補正テーブルを作成するために、必然的に実測するポイントが多くなり、また、記憶すべき補正テーブルのデーター量も大きくなる。したがって、調整に要する時間が長く、また、補正テーブルを記憶する記憶装置のコスト等も高くなるという欠点があった。
【0007】
また、前記のような素子の位置調整ずれや、レンズの焦点距離のずれと行った製造工程上のずれとは別に、図3の実線13示すように被写体距離が近距離になるにしたがって、受光される像の移動量が大きくなり、受光素子上からはみ出してしまうことにより、近距離側で距離データのリニアリティが変化するという現象が発生する。また、いわゆる非TTLのいわゆる外測式の測距装置においては、測距光学系のレンズの焦点調節が固定のため近距離側では、像のはみ出しに加えて像のボケ量も変化するため測距データーのリニアリティは、段階的に変化する。したがって、特開平1−201633号公報に開示されるように、記憶されたデータを基に補間演算により、補正するものにおいては、直線により記憶されたデータ間を補うため、前述のような段階的にリニアリティの変化する曲線のデーターに関しては、図3の破線14で示すように補正結果と実際の測距データー図3の実線13に補正誤差が生じるという欠点があった。本例では、3点(O1、O2、O3での測距データーを用いて補正している)また、誤差を少なくしようとすれば、記憶するデーターを増やして、補間演算する領域を少なくする必要があり、その場合、調整時間の増加、記憶容量の増加等の欠点が生じる。
【0008】
本発明に係る第一の目的は、調整を行うための実測値と理論値とのずれを測定するポイントを極力減らして調整時間少なくすること、および、少ない調整ポイントで、補正誤差を極力少なくすることである。
【0009】
【課題を解決するための手段】
上記目的を達成するために、本出願に係る発明は、被写体までの距離を測定し、被写体距離の逆数に比例した値を出力する測距部と、前記測距装置からの出力データと不揮発性メモリー内の調整データーに基づいて、補開演算を行って被写体までの距離を測距する測距装置において、測距装置からの出力データを少なくとも2つの異なる関数を用いて補間演算することを特徴とする。前記構成において、調整工程で少なくとも3点以上の既知の距離データーを用いて補間演算を行うための2次以上の高次の補間式の係数を求めて不揮発性メモリーにストアして補間演算する区間と少なくとも2点以上の既知の距離データーを不揮発性メモリーに記憶して直線補間演算する区間とを有し、かつ2種類の関数の交点のデーターを不揮発性メモリーにストアして、前記交点のデーターを基に前記2種類の関数を使い分けることを特徴とする。
【0010】
【発明の実施の形態】
(第1の実施例)
図1は、本発明の特徴をもっともよく表す図面であり、同図において1は、後述の発光素子からの光を被写体に向けて集光して投光する投光レンズ、2は赤外光を放射する公知の発光素子(以下、IREDと略す)、3は、前記2のIREDを駆動するためのIRED駆動回路、4は、図示しない被写体上で反射された前記の投光レンズにより、集光して投光された光を集光して結像する受光レンズ、5は、前記4の受光レンズの結像位置に配置され、反射光の結像位置に応じた信号を第一の電極および第二の電極から出力する公知の半導体位置検出素子、6および7は、前記5の半導体位置検出素子5の第一および第二の電極から出力される光電流を電圧に変換して増幅する公知の電流一電圧変換増幅器、8は、6および7の増幅器の出力をアナログ演算する信号処理回路、9は、カメラの制御を行うマイクロコンピュータであり、図示しないROM、RAM、タイマー、A/D、D/A変換器をもち、不図示の測光回路、シャッター、給送、ストロボ、および、撮影レンズの焦点調節などの制御を行う(以下CPUと略す)、10は、前記CPUの外部に設けられた電気的に書き換え可能な不揮発性メモリーであり、カメラの測距、測光、シャッターなどの調整用データ等を記憶するものである。
【0011】
図2は、本発明の測距装置の半導体位置検出素子5上に結像する反射光の受光像を示したものであり、同図において5は、前記の半導体位置検出素子5の正面図であり、11は、図1の距離X1の被写体からの反射光の結像された受光像の大きさであり、12は、距離X2の被写体からの反射光の結像された像である。図2に示すように、被写体距離が近距離になると、結像された像は半導体位置検出素子5の受光面からはみ出し、かつ真の焦点位置もセンサ面よりも後ろになるため、受光像は、ぼけて大きくなる。
【0012】
図3は、図1の測距装置の出力を示した図であり、13は測距装置の補正前のデータであり、また、15は、本発明により測距データーを補正したものであり、O0’、O1’の間を直線により補間し、O1、O2’およびO2の各ポイントを通る2次の曲線により補間したものである。ここで、O0’は本測距装置で測距可能な最速距離のポイントである。(無限遠O0では、反射光が実際は反射して来ないため)。
【0013】
次に、図1から図3をもちいて本発明を詳述する。図1は、3角測距を用いた公知のアクティブ方式の測距装置であり、無限遠の被写体からの反射光の受光位置をO1とすると、距離X1、X2の被写体からの反射光は、半導体位置検出素子5のセンサ面上O1、O2の位置にそれぞれ結像する。無限遠からの反射光の結像位置をO0とすると、そのセンサ面上O1、O2に結像した受光像の基準位置からの移動量yl、y2は、それぞれ以下の式で著される。
【0014】
yl=K×f/X1 (1)
y2=K×f/X2 (2)
即ち、被写体距離Xとセンサ面上の移動量yの関係は、(1)、(2)式から明らかなように、以下の式であらわせる。
【0015】
y=K×f/X (3)
K:基線長
f:受光レンズ焦点距離
したがって、センサ面での像の移動量は、Kおよびfが固定値なので、被写体距離の逆数に比例する。また、ここでいう結像の位置はすべて結像された受光像の重心位置をあらわしている。
【0016】
また、よく知られているように、半導体位置検出素子5の第一および第二の電極からの出力電流は、結像された像の重心の位置yに応じて、
Il=y/L×I0 (4)
I2=(L−y)/L×I0 (5)
L:半導体位置検出素子5の電極間距離
y:電極2から受光像の重心までの距離
I0=総センサー電流
とあらわされる。また、(4)式および(5)式より、
Il/(Il+I2)=y/L (6)
となるので、(3)および(6)式より、
Il/(Il+I2)=K×f/(L×X) (7)
(7)式が求められ、半導体位置検出素子5の両電極の電流の比から、被写体までの距離が測距できる。
【0017】
図1の8のアナログ演算部により、6および7の出力の上記(7)のアナログ演算を行ない、その結果を9のCPUに出力する。CPU9は、前記アナログ出力をA/D変換器等によりデジタルデーターに変換し、10の不揮発性メモリーに記憶された補正データーに基づいて、補正計算を行いその結果にもとづいて撮影レンズを所望の位置に制御する。次に、図2に示すように、半導体位置検出素子5に結像される受光像は、被写体の距離により、結像位置および受光像の大きさが変化する。被写体の距離が比較的遠い、X1の距離にある場合、図2の11に示すように、半導体位置検出素子5のO1位置に結像し、その受光像の大きさは、センサの受光面よりも小さく、受光像はすべてセンサ面上に結像する。また、被写体距離がX2の近距離にある場合、半導体位置検出素子5のO2の位置に結像するが、ぞの受光像は、ボケにより大きくなり、センサ面からはみ出してしまう。したがって、センサ面からはみ出した部分の光は、光電流に変換されず、センサ面上に結像した部分の受光像の重心位置に応じた出力電流が半導体位置検出素子5の第一と第二の電極から出力される。したがって、図3の14に示すように、半導体位置検出素子5から得られる出力は、あたかも受光像の重心の移動量が少なくなったように変化が少なくなり、センサ出力のリニアリティが変化し、被写体距離の逆数に比例しなくなる。また、受光像の大きさが一定であれば、像がはみ出してからの半導体位置検出素子5の出力はある点を境に傾きは減少した直線に変化するだけであり、したがって、従来例で示されるように直線による補間で補正の精度が十分に得られる。しかしながら、近距離になればなるほど受光像のボケは大きくなるので、図3に示すように、距離O1から近距離O2へ被写体距離が近くなるにしたがって、出力の変化は曲線的になるため、少ない補正点で十分な精度を得るためには、O1からO2の距離の補正演算は、2次以上の高次の式を用いて補間する必要がある。
【0018】
被写体距離が、図3のO0’からO1までの領域では、通常既知の距離O0’、O1のそれぞれの測距データをx(O0’)、x(O1)を用いて、直線補間を行えばよい。
【0019】
しかしながら、測距点O1は、測距出力の直線部分を曲線分の境界領域に当るのでこの2点を使って直線補間すると若干傾きデーターに誤差が生じる。したがって、距離O1よりも若干遠距離の点O1’を使って、直線補間演算を行った方が精度的には向上する。不揮発性メモリーには、既知の距離の測距データーx(O0’)、x(O1’)をメモリーすればよい。この場合、直線補間に関しては、よく知られた技術なので詳述しない。
【0020】
次に、曲線部分の任意の測距点、距離O1、O2’、O2の測距データーを用いて、近距離側の補間を2次式で行う。この場合、以下の式が成り立つ。
【0021】
f(01)=a×x(O1)2+b×x(O1)+c (8)
f(02’)=a×x(O2’)2+b×x(O2’)+c (9)
f(02)=a×x(O2)2+b×x(O2)+c (10)
ここで、f(x):測距被写体距離の逆数、x:測距データー、である。
【0022】
(8)から(10)式を用いて、係数a、b、Cを求めて、不揮発性メモリーにして、この係数と実際の測距データーを使用して、補間演算して被写体までの距離を算出すればよい。
【0023】
また、不揮発性メモリーないに、測距データーx(O1)、x(O2’)、x(O2)をメモリーして、これを基に図1のCPU9で係数a、b、Cを計算して補間演算しても良い。さらに高精度の補問がしたければ、さらに高次の式を用いて補開演算すればよい。
【0024】
また、2つの関数の使い分けは、2つの関数の交点Klを求めて、この交点と測距データーを比較して、交点Klより測距データが近距離であれば、2次の補間式をつかって補間演算し、交点Klより測距データが遠距離であれば、直線補間を行う。
【0025】
各関数の交点は、調整工具により演算し、カメラの不揮発性メモリーに記憶させればよい。
【0026】
実施例は、アクティブ方式についてのみ開示しているが、三角測距方式を利用したパッシブ方式の測距装置に適応できる事は言うまでもない。また、実施例では、2つの関数を用いた補間演算についてのみ開示しているが、3つ以上の補間式を使って補間演算し、各関数の交点を演算して、交点と測距データーを使って、各補間式を使い分けてもよいことはいうまでもない。
【0027】
【発明の効果】
以上説明したように、本出願にかかる発明によれば、異なる補間式をつかって、補間演算をおこなうものにおいて、2つの補間式の交点を補間式の切換に使うことにより、各演算式に最適な補正点の測距データを用いて補間演算することにより、各補間式による補間精度を向上することができる。また、補間式の切換ポイントを実測することなく補間式を使い分けることが可能であり、補正のポイントを増やすことなく測距データの補正を行うことができる。
【図面の簡単な説明】
【図1】本発明の実施例を説明する回路図。
【図2】本発明の実施例を説明するセンサおよび受光像の図。
【図3】本発明の実施例の補正方法および従来の補正方法を説明する図。
【符号の説明】
1 投光レンズ
2 赤外発光素子
3 IRED駆動回路
4 受光レンズ
5 半導体位置検出素子
6 電流/電圧変換増幅器
7 電流/電圧変換増幅器
8 アナログ演算回路
9 CPU
10 不揮発性メモリー
11 受光像(遠距離)
12 受光像(近距離)
13 測距データー
14 補正後測距データー(直線補間)
15 補正後測距データー(二次曲線補間)[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a camera distance measuring apparatus using triangulation, and more particularly to a correction operation for correcting distance measurement data in actual use by using a plurality of adjustment distance data in an adjustment step.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, as a distance measuring device of a camera, an infrared light is condensed and projected by a light projecting lens toward a subject, and reflected light from the subject is focused at a position separated by a predetermined base line length. A so-called active type distance measuring device that focuses the light on the position detecting element by the lens and detects the position of the collected light-receiving image, or a light-receiving lens having a different optical axis for the image of the subject, a pair of 2. Description of the Related Art A so-called passive type distance measuring device that forms an image on a light receiving element and detects a shift amount of the image is widely used.
[0003]
In these distance measuring devices, a value proportional to the reciprocal of the distance L to the subject is output as distance measurement data.
[0004]
However, the distance data obtained from the distance measuring device includes positional deviations (deviation or inclination in the base line length direction) of the light emitting element and the light receiving element, linearity of the light receiving element, and a focal length of the distance measuring optical system. Due to a shift or the like, a shift occurs from the theoretical value. Such a deviation appears as a level shift of the distance measurement output and a change in the inclination. As shown in Japanese Patent Application Laid-Open No. Sho 62-3609, a correction curve is created by performing an interpolation process so as to pass through each actual measurement point of the ranging output, for a level shift of the ranging output and a change in the inclination. Then, based on this correction curve, the relationship between the object position and the actually measured value is checked at predetermined intervals over the entire distance measurement range, a correction table is created based on the result, and the distance measurement data is created based on the correction table. What performs correction is disclosed.
[0005]
Further, as disclosed in JP-A-1-201633, regarding the focal length adjustment of the inner focus lens, a difference in a movement amount due to a lens extension curve at a predetermined lens focal length, a variation in lens assembly, and the like is stored. In the calculation of the moving distance for the focus adjustment from the subject distance and the focal length of the lens, the lens moving distance can be calculated by performing the interpolation calculation for the focal length of the lens for which the extension curve is not stored. It has been disclosed.
[0006]
[Problems to be solved by the invention]
However, in the conventional example of Japanese Patent Application Laid-Open No. 62-3609, an interpolation process is performed so as to pass through each actual measurement point of the distance measurement output, and a correction curve is created. The relationship of the values is checked at predetermined intervals over the entire distance measurement range, and a correction table is created based on the result. Inevitably, the number of points to be actually measured increases, and the data amount of the correction table to be stored is also increased. growing. Therefore, there is a drawback that the time required for the adjustment is long and the cost of the storage device for storing the correction table is also high.
[0007]
In addition to the positional deviation of the element and the deviation of the focal length of the lens and the deviation in the manufacturing process performed as described above, as the subject distance becomes shorter as shown by a solid line 13 in FIG. The amount of movement of the image to be enlarged becomes large and the image moves out of the light receiving element, thereby causing a phenomenon that the linearity of the distance data changes on the short distance side. Also, in a so-called non-TTL type distance measuring device of the external measurement type, since the focus adjustment of the lens of the distance measuring optical system is fixed, the amount of blur of the image changes in addition to the protrusion of the image on the short distance side. The linearity of the distance data changes stepwise. Therefore, as disclosed in Japanese Patent Application Laid-Open No. Hei 1-201633, in the correction performed by interpolation based on the stored data, in order to compensate for the gap between the stored data by a straight line, the above-described step-by-step method is used. However, there is a drawback that correction data and actual distance measurement data, ie, a solid line 13 in FIG. 3, have a correction error as shown by a broken line 14 in FIG. In this example, three points (corrected using distance measurement data at O1, O2, and O3) In order to reduce the error, it is necessary to increase the data to be stored and reduce the area for the interpolation calculation. In this case, disadvantages such as an increase in adjustment time and an increase in storage capacity occur.
[0008]
A first object according to the present invention is to reduce the adjustment time by reducing the point for measuring the difference between the measured value and the theoretical value for adjustment as much as possible, and to reduce the correction error as small as possible with few adjustment points. That is.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, an invention according to the present application is directed to a distance measuring unit that measures a distance to a subject and outputs a value proportional to the reciprocal of the subject distance; In a distance measuring device that measures a distance to a subject by performing a supplementary opening operation based on adjustment data in a memory, output data from the distance measuring device is interpolated using at least two different functions. And In the above-described configuration, in the adjustment step, a coefficient of a second-order or higher-order interpolation formula for performing an interpolation operation using at least three or more known distance data is obtained, stored in a nonvolatile memory, and subjected to the interpolation operation. And a section for storing at least two or more known distance data in a non-volatile memory and performing a linear interpolation operation, and storing data of an intersection of two types of functions in the non-volatile memory and storing data of the intersection. The two types of functions are selectively used based on
[0010]
BEST MODE FOR CARRYING OUT THE INVENTION
(First embodiment)
FIG. 1 is a drawing that best illustrates the features of the present invention. In FIG. 1, reference numeral 1 denotes a light projecting lens for condensing and projecting light from a light emitting element described below toward a subject, and 2 denotes an infrared light. A known light emitting element (hereinafter abbreviated as IRED) 3 for emitting light, 3 is an IRED driving circuit for driving the 2 IRED, and 4 is a light collecting lens formed by the light projecting lens reflected on a subject (not shown). A light receiving lens 5 for condensing and projecting the projected light to form an image is disposed at an image forming position of the light receiving lens 4 and outputs a signal corresponding to the image forming position of the reflected light to the first electrode. And the known semiconductor position detecting elements 6 and 7 that output from the second electrode, convert the photocurrent output from the first and second electrodes of the semiconductor position detecting element 5 into a voltage, and amplify the voltage. A known current-to-voltage conversion amplifier, 8 is the output of the amplifier of 6 and 7 A signal processing circuit 9 for performing an analog operation is a microcomputer for controlling the camera, and has a ROM, a RAM, a timer, an A / D, a D / A converter (not shown), a photometric circuit (not shown), a shutter, , A strobe, and a focus adjustment of a photographing lens (hereinafter abbreviated as CPU). Reference numeral 10 denotes an electrically rewritable non-volatile memory provided outside the CPU. It stores data for adjustment such as photometry and shutter.
[0011]
FIG. 2 shows a received light image of reflected light which is formed on the semiconductor position detecting element 5 of the distance measuring apparatus of the present invention. In FIG. 2, 5 is a front view of the semiconductor position detecting element 5. 1, 11 is the size of the received light image formed by the reflected light from the subject at the distance X1 in FIG. 1, and 12 is the image formed by the reflected light from the subject at the distance X2. As shown in FIG. 2, when the subject distance is short, the formed image protrudes from the light receiving surface of the semiconductor position detecting element 5 and the true focal position is behind the sensor surface. , Grows blurry.
[0012]
FIG. 3 is a diagram showing an output of the distance measuring device of FIG. 1, 13 is data before correction of the distance measuring device, and 15 is data obtained by correcting the distance measuring data according to the present invention; This is obtained by interpolating between O0 'and O1' by a straight line and interpolating by a quadratic curve passing through points O1, O2 'and O2. Here, O0 'is the point of the fastest distance that can be measured by the distance measuring apparatus. (Because the reflected light does not actually reflect at infinity O0).
[0013]
Next, the present invention will be described in detail with reference to FIGS. FIG. 1 shows a known active distance measuring apparatus using triangular distance measurement. If a light receiving position of reflected light from an object at infinity is O1, reflected light from objects at distances X1 and X2 is: An image is formed on each of the positions O1 and O2 on the sensor surface of the semiconductor position detecting element 5. Assuming that the imaging position of the reflected light from infinity is O0, the movement amounts yl and y2 of the light-receiving images formed on O1 and O2 on the sensor surface from the reference position are expressed by the following equations, respectively.
[0014]
yl = K × f / X1 (1)
y2 = K × f / X2 (2)
That is, the relationship between the subject distance X and the amount of movement y on the sensor surface is expressed by the following equation, as is clear from equations (1) and (2).
[0015]
y = K × f / X (3)
K: Base line length f: Light receiving lens focal length Therefore, the amount of image movement on the sensor surface is proportional to the reciprocal of the subject distance since K and f are fixed values. Further, the positions of the image formation here represent the positions of the centers of gravity of the formed light-receiving images.
[0016]
Further, as is well known, the output current from the first and second electrodes of the semiconductor position detecting element 5 varies depending on the position y of the center of gravity of the formed image.
Il = y / L × I0 (4)
I2 = (L−y) / L × I0 (5)
L: distance between the electrodes of the semiconductor position detecting element 5 y: distance I0 from the electrode 2 to the center of gravity of the received image is expressed as total sensor current. Also, from equations (4) and (5),
Il / (Il + I2) = y / L (6)
From the equations (3) and (6),
Il / (Il + I2) = K × f / (L × X) (7)
Equation (7) is obtained, and the distance to the subject can be measured from the ratio of the currents of both electrodes of the semiconductor position detecting element 5.
[0017]
The analog operation unit 8 in FIG. 1 performs the analog operation (7) on the outputs 6 and 7 and outputs the result to the CPU 9. The CPU 9 converts the analog output into digital data by an A / D converter or the like, performs a correction calculation based on the correction data stored in the non-volatile memory 10, and moves the photographing lens to a desired position based on the result. To control. Next, as shown in FIG. 2, the light receiving image formed on the semiconductor position detecting element 5 changes in the image forming position and the size of the light receiving image depending on the distance to the subject. When the distance of the subject is relatively long, that is, at the distance X1, an image is formed at the position O1 of the semiconductor position detecting element 5 as shown at 11 in FIG. 2, and the size of the light receiving image is larger than the light receiving surface of the sensor. And all the received light images are formed on the sensor surface. When the subject distance is close to X2, an image is formed at the position O2 of the semiconductor position detection element 5, but the respective light-receiving images become large due to blurring and protrude from the sensor surface. Therefore, the light of the portion that protrudes from the sensor surface is not converted into a photocurrent, and the output current corresponding to the position of the center of gravity of the received image of the portion formed on the sensor surface is the first and second of the semiconductor position detecting element 5. Are output from the electrodes. Therefore, as shown at 14 in FIG. 3, the output obtained from the semiconductor position detecting element 5 changes little as if the amount of movement of the center of gravity of the received image was small, the linearity of the sensor output changed, and the It is not proportional to the reciprocal of the distance. If the size of the received light image is constant, the output of the semiconductor position detecting element 5 after the image protrudes only changes to a straight line with a reduced slope at a certain point. As described above, the accuracy of correction can be sufficiently obtained by interpolation using a straight line. However, the blur of the received image increases as the distance decreases, and as shown in FIG. 3, as the subject distance decreases from the distance O1 to the close distance O2, the output changes in a curved manner, so that the change is small. In order to obtain sufficient accuracy at the correction points, it is necessary to interpolate the distance from O1 to O2 using a higher-order expression of second or higher order.
[0018]
In the region where the subject distance is from O0 ′ to O1 in FIG. 3, linear interpolation is usually performed using the distance measurement data of the known distances O0 ′ and O1 using x (O0 ′) and x (O1). Good.
[0019]
However, since the distance measuring point O1 corresponds to the boundary area of the curved line, the straight line portion of the distance measuring output will cause a slight error in the inclination data if linear interpolation is performed using these two points. Therefore, it is more accurate to perform a linear interpolation operation using a point O1 'that is slightly farther than the distance O1. The non-volatile memory may store the distance measurement data x (O0 ') and x (O1') of a known distance. In this case, since the linear interpolation is a well-known technique, it will not be described in detail.
[0020]
Next, using the distance measurement data of arbitrary distance measurement points and distances O1, O2 ', and O2 on the curved portion, interpolation on the short distance side is performed by a quadratic expression. In this case, the following equation holds.
[0021]
f (01) = a × x (O1) 2 + b × x (O1) + c (8)
f (02 ′) = a × x (O2 ′) 2 + b × x (O2 ′) + c (9)
f (02) = a × x (O2) 2 + b × x (O2) + c (10)
Here, f (x): reciprocal of the distance measurement subject distance, x: distance measurement data.
[0022]
Using the equations (8) to (10), the coefficients a, b, and C are obtained, stored in a non-volatile memory, and the distance to the subject is calculated by interpolation using the coefficients and the actual distance measurement data. What is necessary is just to calculate.
[0023]
Also, the distance measurement data x (O1), x (O2 '), x (O2) are stored in the non-volatile memory, and the coefficients a, b, and C are calculated by the CPU 9 in FIG. Interpolation may be performed. If higher precision interpolation is desired, a higher-order equation may be used to perform the interpolation operation.
[0024]
The two functions can be properly used by finding an intersection Kl of the two functions, comparing the intersection with the distance measurement data, and using a secondary interpolation formula if the distance measurement data is a short distance from the intersection Kl. If the distance measurement data is far from the intersection Kl, linear interpolation is performed.
[0025]
The intersection of each function may be calculated by an adjustment tool and stored in the nonvolatile memory of the camera.
[0026]
Although the embodiment discloses only the active method, it goes without saying that the present invention can be applied to a passive distance measuring apparatus using a triangulation method. Further, in the embodiment, only the interpolation calculation using two functions is disclosed. However, the interpolation calculation is performed using three or more interpolation formulas, the intersection of each function is calculated, and the intersection and the distance measurement data are calculated. It goes without saying that each interpolation formula can be used properly.
[0027]
【The invention's effect】
As described above, according to the invention of the present application, an interpolation operation is performed using different interpolation formulas, and the intersection of the two interpolation formulas is used for switching between the interpolation formulas. By performing the interpolation calculation using the distance measurement data of the appropriate correction point, the interpolation accuracy by each interpolation formula can be improved. Further, it is possible to properly use the interpolation formula without actually measuring the switching points of the interpolation formula, and it is possible to correct the distance measurement data without increasing the number of correction points.
[Brief description of the drawings]
FIG. 1 is a circuit diagram illustrating an embodiment of the present invention.
FIG. 2 is a diagram of a sensor and a received light image for explaining an embodiment of the present invention.
FIG. 3 is a diagram illustrating a correction method according to an embodiment of the present invention and a conventional correction method.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Projection lens 2 Infrared light emitting element 3 IRED drive circuit 4 Light receiving lens 5 Semiconductor position detecting element 6 Current / voltage conversion amplifier 7 Current / voltage conversion amplifier 8 Analog operation circuit 9 CPU
10 Non-volatile memory 11 Reception image (far distance)
12 Reception image (short distance)
13 Distance measurement data 14 Corrected distance measurement data (linear interpolation)
15 Distance data after correction (quadratic curve interpolation)