JPS6286317A - Focus detector - Google Patents

Focus detector

Info

Publication number
JPS6286317A
JPS6286317A JP22726385A JP22726385A JPS6286317A JP S6286317 A JPS6286317 A JP S6286317A JP 22726385 A JP22726385 A JP 22726385A JP 22726385 A JP22726385 A JP 22726385A JP S6286317 A JPS6286317 A JP S6286317A
Authority
JP
Japan
Prior art keywords
light
difference
data
value
focus
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
JP22726385A
Other languages
Japanese (ja)
Inventor
Masataka Hamada
正隆 浜田
Tokuji Ishida
石田 徳治
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.)
Minolta Co Ltd
Original Assignee
Minolta 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 Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP22726385A priority Critical patent/JPS6286317A/en
Publication of JPS6286317A publication Critical patent/JPS6286317A/en
Pending legal-status Critical Current

Links

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

PURPOSE:To simplify arithmetic processing for range finding by fixing a difference value on a prescribed value when an overflow is generated at the calculation of a difference by a difference arithmetic means. CONSTITUTION:Output from respective picture elements in a CCD image sensor 20 are successively converted into digital signals D(X) by an A/D converter 24 and inputted to a four-picture element delay circuit 28 to delay four picture elements. A subtractor 30 calculates the difference DELTAD(X) between the raw picture element data and the data D(X+4) delayed by four picture elements and outputs the difference data DELTAD(X) successively. The difference data DELTAD(X) is inputted to an overflow checking circuit 32, and if an overflow is generated in the difference data DELTAD(X), a data correcting circuit 34 fixes the DELTAD(X) on maximum data generating no overflow and outputs the fixed value. When no overflow is generated in the DELTAD(X), the data correcting circuit 34 outputs the difference data DELTAD(X) as they are.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、カメラの焦点検出装置に関する。[Detailed description of the invention] (Industrial application field) The present invention relates to a focus detection device for a camera.

(従来の技術) 従来、光軸に対して互いに対称な関係にある撮影レンズ
の2つの領域をそれぞれ透過した被写体光束をそれぞれ
結像させて2つの像をつくり、この2つの像の間の間隔
を求めて、撮影レンズの結像面の予定焦点面からのずれ
を検出するカメラの焦点検出装置は知られている。
(Prior art) Conventionally, two images are created by forming two images of the subject light beams that have passed through two areas of a photographic lens that are symmetrical to each other with respect to the optical axis, and the distance between these two images is A camera focus detection device is known that detects the deviation of the imaging plane of the photographing lens from the expected focal plane.

このような焦点検出装置の光学系は、第6図に示すよう
な構成となっており、この光学系は撮影レンズ2の後方
の予定焦点面4あるいはこの面からさらに後方の位置に
コンデンサレンズ6を有し、さらにその後方に再結像レ
ンズ8.10を有し、各再結像レンズ8,10の結像面
には例えばCODによるラインセンサ12.14を配し
ている。
The optical system of such a focus detection device has a configuration as shown in FIG. It further has a re-imaging lens 8.10 behind it, and a line sensor 12.14 based on COD, for example, is arranged on the imaging plane of each re-imaging lens 8,10.

各センサ12.14−1=の像は、第7図に示すように
、ピントをあわすべき被写体の像が予定焦点面より前方
に結像する、いわゆる面ピンの場合、互いに光軸18側
により近くなり、反対に後ピンの場合、光軸18からよ
り遠くなる。ピントがあった場合、2つの像の互いに対
応しあう2点間の間隔は、焦点検出装置の光学系の構成
によって規定される特定の距離になる。したがって、原
理的には、2つの像の間隔を検出すればピン)・状態が
分かることになる。
As shown in FIG. 7, the images of each sensor 12.14-1 are located closer to each other on the optical axis 18 side in the case of so-called surface focusing, in which the image of the subject to be focused is formed in front of the intended focal plane. Conversely, in the case of rear focus, it is farther from the optical axis 18. When in focus, the distance between two corresponding points of the two images is a specific distance defined by the configuration of the optical system of the focus detection device. Therefore, in principle, the pin status can be determined by detecting the distance between the two images.

この像間隔の検出方法の1つとして、次のような方法が
公知である。第8図において、ラインセンサ12,14
は、それぞれ、例えば10個および16個のフォトダイ
オードのセルa1〜alas b+〜bl[+からなっ
ている。また、便宜」−1各セルに付けた符号は各セル
の出力値も表わすものとする。
The following method is known as one of the methods for detecting this image interval. In FIG. 8, line sensors 12, 14
are made up of, for example, 10 and 16 photodiode cells a1 to alas b+ to bl[+, respectively. Further, for convenience, the numeral attached to each cell also represents the output value of each cell.

ここで、ラインセンサ14において、連続する10個の
セルの組を考えると、図のように7つの組B + 、 
B 2.・・・、B7ができる。これら7組のうち、ど
の組の像がラインセンサ12の像と最も一致しているか
を検出してピント状態を知るイっけである。
Here, in the line sensor 14, considering the sets of 10 consecutive cells, as shown in the figure, there are seven sets B + ,
B2. ..., B7 is possible. The focus state is determined by detecting which of these seven sets of images most closely matches the image of the line sensor 12.

このため、次の関数をj=1.2.−.7に対して求め
る。Sjの最小になるJが最も一致した組を示す。
Therefore, the following function j=1.2. −. Find for 7. J that minimizes Sj indicates the most matched set.

]O 8,−Σ l a、 −b、     l   −= 
(1)3  i=l  I   l+j−1 このような最小値をとる組を見出すために、まず各組の
像に対してSjの計算が行われる。ついで、得られた計
算結果の中から最小値を見出す操作が行われる。このよ
うにして、ピント状態の検出が一3= なされていた。
]O 8, -Σ l a, -b, l -=
(1) 3 i=l I l+j-1 In order to find a set that takes such a minimum value, Sj is first calculated for each set of images. Next, an operation is performed to find the minimum value from among the obtained calculation results. In this way, the focus state was detected.

今、例えばラインセンサ12の像がラインセンサ14の
組B、の部分の像と一致しているものとする。つまり、
セルa I−82+・・・・、 aloの各出力とセル
b、、 b2.・・・・、 bloの各出力との間に、
a。
For example, assume that the image of the line sensor 12 matches the image of the group B of the line sensor 14. In other words,
Cell a I-82+..., each output of alo and cell b,, b2. ..., between each output of blo,
a.

−1)、、 a2=bt+ ”””+ ago =b+
oの関係が成立しているものとする。この場合、 S+−1a+  btl + laz  btl + 
、 、 。
-1),, a2=bt+ “””+ ago=b+
It is assumed that the relationship o holds true. In this case, S+-1a+ btl + laz btl +
, , .

、 、 −+ l ago  boo l = O−(
2)となるが、S、は組B、以外の組の像に対する同様
な計算の結果よりも小さく、すべての組の像に対する計
算結果の中で最小となる。
, , −+ lago boo l = O−(
2), but S is smaller than the results of similar calculations for images of sets other than set B, and is the smallest among the results of calculations for all sets of images.

しかしながら、上記のようにして求めた各計算値の中の
最小値が、2つの像が最も一致した場合に対応するのは
、2つの像のパターンが合同であるとともに、2つのラ
インセンサの感度が互いに等しい場合である。合同性が
くずれたり、センザ間に感度差がある場合は、上記の最
小値は必ずしも2つの像の一致状態に対応しなくなり、
これはピント検出誤差となる。
However, the minimum value among the calculated values obtained above corresponds to the case where the two images most closely match, when the patterns of the two images are congruent and the sensitivity of the two line sensors is are equal to each other. If the congruence breaks down or there is a sensitivity difference between the sensors, the above minimum value will not necessarily correspond to the state of coincidence between the two images.
This becomes a focus detection error.

=4= 以上のことを第9図(a)〜(C)を用いて説明する。=4= The above will be explained using FIGS. 9(a) to 9(C).

第9図(a)は、階段状の明暗部を持ったピント検出対
象を示し、枠20の部分が2つのラインセンサ12,1
4上に結像されるものとする。そして、第9図(b)に
おいて示すように、実線(out+)、破線(out2
)がそれぞれ第9図(a)の検出対象に対するラインセ
ンサ12,14の出力を示すものとする。2つの出力が
合同ではなく、検出対象の明部に対応するところで出力
間に差が生じている。尚、このグラフは、ラインセンサ
12上の像がラインセンサ14の第3の組B3の部分の
像と一致する場合を示し、像の一致に対応させて2つの
出力を重ね合わせたものである。
FIG. 9(a) shows a focus detection target with step-like bright and dark areas, and the frame 20 shows two line sensors 12, 1.
Assume that the image is formed on 4. As shown in FIG. 9(b), the solid line (out+) and the broken line (out2
) respectively indicate the outputs of the line sensors 12 and 14 for the detection target shown in FIG. 9(a). The two outputs are not congruent, and a difference occurs between the outputs where they correspond to the bright area of the detection target. Note that this graph shows a case where the image on the line sensor 12 matches the image of the third group B3 portion of the line sensor 14, and the two outputs are superimposed in correspondence to the matching of the images. .

さて、2つの出力0LIt+、 0LIt、が合同であ
れば、で示される計算値S3はOとなって、他の計算値
に比べて最小となる。ところが、グラフに示すように両
者が合同でない場合には計算値S3は最小とはならず、
むしろ出力0Llt+のグラフをセル1ピッヂ分たけ左
ヘシフトした状態の場合の計算値S2の方が小さくなる
。つまり、1ピッチ分だけ検出誤差を生ずる。今、■ピ
ッチが例えば30 Itに相当するとずれば、1ビッヂ
分の検出誤差は、撮影レンズの光軸方向における検出誤
差に換算して例えば1mm程になる。このような誤差は
、例えば−眼レフレックスカメラにとっては実用上支障
をきたす量である。
Now, if the two outputs 0LIt+ and 0LIt are congruent, the calculated value S3 shown by is O, which is the minimum compared to other calculated values. However, as shown in the graph, if the two are not congruent, the calculated value S3 will not be the minimum,
Rather, the calculated value S2 is smaller when the graph of the output 0Llt+ is shifted to the left by one cell pitch. In other words, a detection error occurs by one pitch. Now, if the ■ pitch corresponds to, for example, 30 It, then the detection error of one bit is converted to the detection error in the optical axis direction of the photographing lens, for example, about 1 mm. Such an error is of an amount that causes a practical problem in, for example, a -eye reflex camera.

一方、他にも2つの像の合同性を崩す要因がある。焦点
検出装置における光学系は、第7図に示すように上下の
センサ12.1.4に結像される2つの像が光軸18に
関して非対称となりうるような構成である。更には、コ
ンデンサレンズ6および再結像レンズ8.IOの収差特
性によって像面湾曲が生じる。もっとも像面湾曲は、コ
ンデンサレンズ6を非球面レンズにしたり、複数のレン
ズを組み合わせて用いたりして改善を図ることはできる
が、それでも完全に満足を得るところまで改善を図るこ
とは困難である。さらにまた、2つの再結像レンズ8.
lOを撮影レンズの光軸に対して十分に対称に構成、配
置することは、製造北困難である。
On the other hand, there are other factors that disrupt the congruence between the two images. The optical system in the focus detection device is configured such that the two images formed on the upper and lower sensors 12.1.4 can be asymmetrical with respect to the optical axis 18, as shown in FIG. Furthermore, a condenser lens 6 and a reimaging lens 8. Field curvature occurs due to the aberration characteristics of the IO. Although it is possible to improve the field curvature by using an aspherical lens for the condenser lens 6 or by using a combination of multiple lenses, it is still difficult to improve the field curvature to the point where complete satisfaction is obtained. . Furthermore, two reimaging lenses 8.
It is difficult in manufacturing to configure and arrange the IO sufficiently symmetrically with respect to the optical axis of the photographing lens.

以上のような種々の要因によって2つの像あるいは各機
に応じた出カバターンが合同となることは不可能であり
、したがって、上述したような従来の像比較方式では焦
点検出誤差の発生は避けられない。
Due to the various factors mentioned above, it is impossible for the two images or the output patterns depending on each machine to be congruent. Therefore, in the conventional image comparison method as described above, the occurrence of focus detection errors cannot be avoided. do not have.

このような問題を改善するために、本願出願人は、先に
、特開昭60−4’914号公報において、フォトダイ
オードセルの出力信号列を所定のフォトダイオードセル
分だけシフトした出力信号列と差分をとり、この差分デ
ータを用いて(1)式と同様の計算値を求めて焦点検出
を行う焦点検出装置を提案した。この装置においては、
2つのセンサの出カバターンを直接的に比較するように
した従来の方法に代えて、各センサの出力信号について
各出力信号からその位相を所定量だけ所定方向へシフl
−した信号をつくり、このシフトした信号とシフト前の
元の信号との差に応じた差分信号を求め、こうして求め
た各センサの差分信号を相互に比較することにより2つ
の像の間隔を検出する。
In order to improve such problems, the applicant of the present application previously proposed in Japanese Patent Laid-Open No. 60-4'914 an output signal sequence in which the output signal sequence of a photodiode cell is shifted by a predetermined number of photodiode cells. We have proposed a focus detection device that performs focus detection by calculating the difference between the two and using this difference data to obtain a calculated value similar to equation (1). In this device,
Instead of the conventional method of directly comparing the output patterns of two sensors, the phase of each output signal of each sensor is shifted by a predetermined amount in a predetermined direction.
− is generated, a difference signal corresponding to the difference between this shifted signal and the original signal before shifting is determined, and the distance between the two images is detected by comparing the thus determined difference signals of each sensor with each other. do.

たとえば、第1O図(b)の出力データにおいて、2画
素分シフトして差分信号を求めると、第9図(c)に示
すように、ラインセンサ12.14に対して、それぞれ
out、” 、 out2’となる。この差分信号につ
いて、(1)式と同様な関数の値を計算すると、j=3
において最小となり、正しいピント検出が行えたことに
なる。
For example, if the output data in FIG. 1O (b) is shifted by two pixels and a difference signal is obtained, as shown in FIG. out2'. When calculating the value of a function similar to equation (1) for this difference signal, j = 3
, which means that correct focus detection has been performed.

このピント検出精度の改善効果の生ずる理由は、元の信
号に含まれる誤差を生ずる土台となっている直流成分が
抑制され、比較にとって有効な交流成分が強調されると
ころにあると考えられる。
The reason for this improvement in focus detection accuracy is thought to be that the DC component, which is the basis of errors in the original signal, is suppressed and the AC component, which is effective for comparison, is emphasized.

(発明の解決すべき問題点) しかしながら、このような差分データを用いて、デジタ
ル演算回路で演算を行おうとすると、次のような問題が
生じる。
(Problems to be Solved by the Invention) However, when attempting to perform arithmetic operations using such differential data using a digital arithmetic circuit, the following problems arise.

例えば、8ビットのデジタル演算回路を用いて差分デー
タを得ると、画素生データ(オリジナルの画素出力を以
下こう呼ぶ)は、0〜255の範囲にあるのに対して、
8ビツトの範囲内の2つの正の数どうしの減算結果は、
−255から+255の範囲にわたることになる。しか
し、これを表現するには8ビツトでは不可能である。す
なわち、8ビツトの範囲で表現できる正と負の数は、M
SBを正負の符号ビットに当てると、以下の表を参照し
て−128(2進数では補数で示されて1000000
0B)から+127(2進数では01111.1.11
B)の範囲のものである。10進数128は2進数では
本来10000000 Bと表現されるが、負の数を導
入した表現系ではこの2進数はlO進数の−128に対
応することになってしまう。同様に、10進数−129
は127に対応することになる。このように、128以
上および一129以下の数は、8ビツトでは不都合が生
じて表現することができないのである。
For example, when differential data is obtained using an 8-bit digital arithmetic circuit, pixel raw data (original pixel output is hereinafter referred to as this) is in the range of 0 to 255, whereas
The result of subtracting two positive numbers within the range of 8 bits is
It will range from -255 to +255. However, this cannot be expressed using 8 bits. In other words, the positive and negative numbers that can be expressed in the range of 8 bits are M
If you apply SB to the positive and negative sign bits, refer to the table below and get -128 (1000000 in binary, indicated by complement)
0B) to +127 (01111.1.11 in binary)
B). The decimal number 128 is originally expressed as 10000000 B in binary, but in a representation system that introduces negative numbers, this binary number corresponds to -128 in IO base. Similarly, decimal number -129
corresponds to 127. In this way, numbers greater than or equal to 128 and less than -129 cannot be expressed using 8 bits due to inconvenience.

以下余白 8ビツトの演算回路で、2つの正の数どうしの減算結果
が8ビツトでは表わし切れない場合を、以下、オーバー
フローと称する。このようなオーバーフローを含むデー
タを無点検1:llこ用いると、かえって焦点検出精度
を悪化してしまう。というのは、例えば本来128とい
う数値データが−128として扱われるという事態が発
生し得るからである。
In an arithmetic circuit with an 8-bit margin, the case where the result of subtraction between two positive numbers cannot be expressed completely in 8 bits will be referred to as an overflow. If data including such an overflow is used without inspection, focus detection accuracy will worsen. This is because, for example, a situation may occur where the numerical data originally 128 is treated as -128.

このような事態を回避するために、データメモリのビッ
ト数を例えば8から9に増し、符号ビットを設けること
が考えられるが、市場に用意されているマイクロコンピ
ュータやメモリは8ビツトあるいは16ビツトを用いる
ものであり、この規格を外れた使い方をすると手間がか
かったり、効果の悪いメモリの使用方法となったりし、
また、9ビツト系マイクロコンピユータを作ればコスト
高となる。
In order to avoid this situation, it is conceivable to increase the number of bits of the data memory from 8 to 9 and provide a sign bit, but microcomputers and memories available on the market are 8 bits or 16 bits. If you use it outside of this standard, it will be time consuming and may result in an ineffective way of using memory.
Furthermore, manufacturing a 9-bit microcomputer would be expensive.

画素生データが正の値であったのに対して、差分データ
は正の値と負の値が存在するので、符号ビットが必要と
なる。ところが、これらを考慮した測距演算を行うとな
ると、回路構成または演算アルゴリズムが複雑になり、
メモリ容量が多く必要になったり、測距時間が長くなっ
たりする。すなわち、コストがかかり、また、繰り返し
連続した焦点検出の場合は被写体に対する追随性が悪く
なる。
While the pixel raw data has a positive value, the difference data has positive and negative values, so a sign bit is required. However, when performing distance measurement calculations that take these into account, the circuit configuration or calculation algorithm becomes complicated.
A large memory capacity is required, and distance measurement time becomes long. That is, it is costly, and in the case of repeated and continuous focus detection, the ability to follow the subject deteriorates.

また、本出願人が別の出願において提案したように、差
分データを8ビツトデータにおさえるために、データの
大きさが8ビツトを越えれば縮小する方法も考えられる
。しかし、これも演算処理が複雑になり、さらに測距演
算時間も長くなり、やはり、追随性が悪くなる。
Furthermore, as proposed by the present applicant in another application, in order to limit the difference data to 8-bit data, a method of reducing the size of data exceeding 8 bits may be considered. However, this also complicates the arithmetic processing and further increases the distance measurement calculation time, resulting in poor followability.

他方、オーバーフローの発生を予め避けることを目的と
して、演算すべき2つのデータそのものの大きさに制限
を加えることが考えられる。データの大きさを制限する
方法としてCODの積分時間を制限して、CODの出力
レベルをあるレベル以内に抑えることが考えられる。例
えば、8ビツトで表現できる出力レベルを得るのに要す
る積分時間の半分に積分時間を制限する。すると、その
場合の出力は7ビツトで表現できるレベルとなるであろ
う。
On the other hand, in order to prevent the occurrence of overflow in advance, it is conceivable to limit the size of the two pieces of data to be operated on. One possible way to limit the size of data is to limit the COD integration time to keep the COD output level within a certain level. For example, the integration time is limited to half of the integration time required to obtain an output level that can be expressed in 8 bits. Then, the output in that case will be at a level that can be expressed with 7 bits.

しかし、このような方法で信号のレベルを抑えることは
、次のような理由でS/N比の劣化を招くことになって
好ましくない。CODからの画像出力には、各セルに入
射した光の強度を示す信号の他に、積分時間の長さには
依存しないノイズが含まれる。このノイズの発生原因や
発生場所は特定し難いものであるが、周辺の関連回路に
高速の論理回路が含まれていて、それらの動作に基づく
電源電圧の高周波成分を含む不断の変動が信号にノイズ
を与えたりするものと推定される。このようなノイズに
対してS/N比を高めるには、信号成分を大きくすれば
よい。CODの出力信号の成分を大きくするには、CO
Dのダイナミックレンジが許す範囲内において、光入力
に対する光電流が積分されるように、十分に積分時間に
保証することである。したがって、この見地からすれば
、積分時間を短縮することはS/N比を下げることにな
り好ましくない。
However, suppressing the signal level by such a method is undesirable because it causes deterioration of the S/N ratio for the following reasons. The image output from the COD includes a signal indicating the intensity of light incident on each cell, as well as noise that does not depend on the length of integration time. Although it is difficult to identify the cause or location of this noise, it is likely that the related circuits in the periphery include high-speed logic circuits, and that constant fluctuations in the power supply voltage, including high-frequency components, caused by the operation of these circuits may affect the signal. It is estimated that this may cause noise. In order to increase the S/N ratio against such noise, the signal component may be increased. To increase the component of the COD output signal, the COD
The goal is to ensure a sufficient integration time so that the photocurrent for optical input is integrated within the range allowed by the dynamic range of D. Therefore, from this point of view, shortening the integration time is not preferable because it lowers the S/N ratio.

さらに別の方法として、十分に積分時間が保証された場
合の出力信号を7ビツトのデジタル値に変換するように
、AD変換手段の入力レベルを設定することが考えられ
る。
Still another method is to set the input level of the AD conversion means so that the output signal is converted into a 7-bit digital value when a sufficient integration time is guaranteed.

しかし、このようにした場合には、次のような問題が生
ずる。すでに知られているように、CCDの如きイメー
ジセンサでは受光する像の明るさに応して積分時間を変
えることにより、後段の回路に都合のよいレベルの信号
を出力させるようにすることがよく行われる。像の明る
さが低い場合は、より長い積分時間が必要となるけれど
も、オートフォーカス機能を備えたカメラにおいては、
手持で撮影が行われるので、手振れの影響によって焦点
検出に誤差を生ずる程に長い積分時間を掛+3ることは
意味がないから、必要な積分時間に達する以前に積分が
打ち切られることがある。例えば、400ミリ秒の積分
時間が必要なところを200ミリ秒で打ち切ってしまう
という具合である。
However, in this case, the following problem occurs. As is already known, image sensors such as CCDs often output signals at a convenient level to subsequent circuits by changing the integration time depending on the brightness of the image they receive. It will be done. If the image brightness is low, a longer integration time is required, but for cameras with autofocus,
Since the image is taken hand-held, it is meaningless to increase the integration time by +3 so long that it causes an error in focus detection due to the influence of camera shake, so the integration may be terminated before the required integration time is reached. For example, an integration time that requires 400 milliseconds is cut off at 200 milliseconds.

このような場合、400ミリ秒の積分時間を与えると、
最大7ビツトで示される信号が得られるのに対し、その
半分の時間で積分を打ぢ切るものであるから、その出力
は6ビツトで示されることになる。一方、必要十分な積
分時間を与えた場合の出力を最大8ビツトのデジタル値
で示すようにすると、上述の場合のように止むを得ず積
分時間を半分に制限した場合の出力は7ビツトで示され
る。
In such a case, given an integration time of 400 milliseconds, we get
Although a signal represented by a maximum of 7 bits is obtained, since the integration is terminated in half the time, the output is represented by 6 bits. On the other hand, if the output when the necessary and sufficient integration time is given is shown as a maximum of 8-bit digital value, the output when the integration time is unavoidably limited to half as in the above case will be 7 bits. shown.

前者の場合は、後者に比べて1ビツトだけ情報量が少な
くなっている。精度の高い焦点検出にとっては、情報量
が多い方が好ましい。このような理由でCODの出力の
AD変換値を当初から7ビツトの如く、デジタル演算回
路の情報容量よりも小さいものに制限することは問題が
残る。
In the former case, the amount of information is 1 bit less than the latter. For highly accurate focus detection, it is preferable to have a large amount of information. For these reasons, it remains a problem to limit the AD conversion value of the output of the COD to a value smaller than the information capacity of the digital arithmetic circuit, such as 7 bits, from the beginning.

なお、特開昭58−80607号公報においては、1つ
以上おきの画素差分データをとり、これに基づきデフォ
ーカス量を演算している。ただし、具体的な説明はなさ
れていない。
Note that in Japanese Patent Laid-Open No. 58-80607, pixel difference data for every one or more pixels is taken, and the defocus amount is calculated based on this. However, no specific explanation was given.

本発明の目的は、ラインセンザ上の互いに一定間隔だけ
異なる位置にある2つのセルの出力の差の信号を用いる
焦点検出装置において、9ビツト演算や2つの補数表現
の演算または8ビツトオーバーフロ一時データ縮少化と
いった複雑な処理を行なわずに、自動焦点性能(特に追
随性)を上げた焦点検出装置を提供することである。
An object of the present invention is to perform 9-bit arithmetic operations, two's complement expression arithmetic operations, or 8-bit overflow temporary data in a focus detection device that uses the signal of the difference between the outputs of two cells located at positions different from each other by a fixed interval on a line sensor. It is an object of the present invention to provide a focus detection device that improves autofocus performance (particularly tracking ability) without performing complicated processing such as reduction.

(問題点を解決するための手段) 本発明に係る焦点検出装置は、撮影レンズの光軸を挟む
、該撮影レンズの第1の部分と第2の部分とをそれぞれ
通過した被写体光束からつくられる第1と第2の2つの
像の相対的な位置関係を検出して撮影レンズの合焦位置
からのずれ量を検出する焦点検出装置において、第1お
よび第2の像を受光するように多数の受光素子が一列に
配列され、第2像を検出する部分の受光素子の数が第1
像を検出する部分(基準部という)の受光素子の数より
も多く、第2像を検出する部分にて、基準部を構成する
受光素子の数と同じ数の受光素子が一列に配列してなる
組(比較部という)が相互に1受光素子だけずらして複
数組構成できる受光手段と、受光手段の出力する受光素
子の受光量をデジタル値に変換するAD変換手段と、A
D変換手段の出力する各受光素子の受光量とその受光素
子と所定量だけずれた位置の受光素子の受光量との差分
を演算し、差分演算の際に所定の範囲の上限と下限に対
してオーバーフローしたと判別した場合には、差分値を
それぞれ所定の上限値または下限値とする差分演算手段
と、基準部の受光素子と比較部の受光素子にそれぞれ対
応して演算された上記の差分値から所定の合焦判定用の
相関関数値を計算する相関演算手段と、複数組の比較部
に対して、それぞれ相関演算手段により計算された相関
関数値から合焦位置からのずれ量を判別する合焦判別手
段とを備える。
(Means for Solving the Problems) A focus detection device according to the present invention is created from a subject light beam that has passed through a first part and a second part of a photographic lens, which sandwich the optical axis of the photographic lens. In a focus detection device that detects the relative positional relationship between the first and second images and detects the amount of deviation from the in-focus position of the photographic lens, a plurality of The number of light-receiving elements in the part that detects the second image is arranged in a row, and the number of light-receiving elements in the part that detects the second image is
The number of light-receiving elements is greater than the number of light-receiving elements in the part that detects the image (referred to as the reference part), and the number of light-receiving elements in the part that detects the second image is the same as the number of light-receiving elements that make up the reference part. A light-receiving means capable of forming a plurality of sets (referred to as comparison sections) shifted by one light-receiving element from each other, and an AD conversion means for converting the amount of light received by the light-receiving element outputted by the light-receiving means into a digital value;
The difference between the amount of light received by each light receiving element outputted by the D conversion means and the amount of light received by the light receiving element at a position shifted by a predetermined amount from that light receiving element is calculated, and when calculating the difference, the upper and lower limits of the predetermined range are calculated. If it is determined that an overflow has occurred, the difference calculation means sets the difference value to a predetermined upper limit value or lower limit value, respectively, and calculates the above-mentioned difference calculated corresponding to the light receiving element of the reference part and the light receiving element of the comparison part, respectively. A correlation calculation means for calculating a correlation function value for predetermined focus determination from the value, and a deviation amount from the in-focus position is determined from the correlation function value calculated by each of the correlation calculation means for the plurality of comparison units. and a focus determining means.

(作 用) 本発明においては、差分演算手段において、差分演算の
際にオーバーフローが生じた場合には、差分値を所定の
値に固定する。
(Function) In the present invention, in the difference calculation means, when an overflow occurs during difference calculation, the difference value is fixed to a predetermined value.

(実施例) 本発明の実施例を添付の図面を参照して次の順序で説明
する。
(Example) Examples of the present invention will be described in the following order with reference to the accompanying drawings.

a、焦点検出装置の構成 り9合焦判別 C1焦点検出のフロー (a)焦点検出装置の構成 第1図は、本発明の一実施例の構成を示すブロック図で
ある。第1図において、2は撮影レンズである。自動焦
点モジ2.−ル22は、撮影レンズ2の予定焦点面の後
方に配置されていて、コンデンサレンズ6、撮影レンズ
2の光軸に関して対称的な再結像レンズ8.10及び第
5図のラインセンザ12.14を1つにしたCODイメ
ージセンサ20を有する。CCDイメージセンセン0の
第1像を検出する部分を基準部、第2像を検出する部分
を参照部と呼ぶ。基準部は、10個の素子からなり、参
照部は、16個の素子からなる。CODイメージセンサ
20の各画素の出力は、順次、A/D変換器24でデジ
タル信号D(X)に変換される(X  =1,2.3.
・)。コノ画素生データD(X)は、4画素遅延回路2
8に入力されて4画素分(4セル分)遅延される。減算
回路30は画素生データD(X)とそれの4画素分遅延
したデータD (X+4)との差ΔD(X)を演算し、
この差分データΔD(X)を順次出力する。
a. Structure of focus detection device 9 Focus determination C1 Flow of focus detection (a) Structure of focus detection device FIG. 1 is a block diagram showing the structure of an embodiment of the present invention. In FIG. 1, 2 is a photographing lens. Auto focus mod 2. - lens 22 is arranged behind the intended focal plane of the taking lens 2 and includes a condenser lens 6, a reimaging lens 8.10 symmetrical with respect to the optical axis of the taking lens 2, and a line sensor 12.14 in FIG. It has a COD image sensor 20 which is a single COD image sensor. The part of the CCD image sensor 0 that detects the first image is called a reference part, and the part that detects the second image is called a reference part. The reference part consists of 10 elements and the reference part consists of 16 elements. The output of each pixel of the COD image sensor 20 is sequentially converted into a digital signal D(X) by the A/D converter 24 (X = 1, 2.3, .
・). The raw pixel data D(X) is the 4-pixel delay circuit 2
8 and is delayed by 4 pixels (4 cells). The subtraction circuit 30 calculates the difference ΔD(X) between the raw pixel data D(X) and the data D(X+4) delayed by 4 pixels,
This difference data ΔD(X) is sequentially output.

ΔD(X)−D(X−1−4)−D(X)   ・・(
4)この差分データΔD(X)は、オーバーフローチェ
ック回路32に入力されて、オーバーフローが生じてい
るか否かが判断される。そしてもし、差分データΔD(
X)にオーバーフローが生じていればデータ修正回路3
4はΔD(X)をオーバーフローしない最大データに固
定し出力する。もし、ΔD(X)にオーバーフローが生
じていなければ、データ修正回路34(」差分データΔ
D(X)をそのまま出力する。データ修正回路34から
順次出力されるデータは、差分データメモリ回路40に
入力されて順次メモリされる。
ΔD(X)-D(X-1-4)-D(X)...(
4) This difference data ΔD(X) is input to the overflow check circuit 32, and it is determined whether or not an overflow has occurred. And if the difference data ΔD(
If an overflow occurs in X), data correction circuit 3
4 fixes ΔD(X) to the maximum data that does not overflow and outputs it. If no overflow occurs in ΔD(X), the data correction circuit 34 ("Difference data Δ
Output D(X) as is. The data sequentially output from the data correction circuit 34 is input to the differential data memory circuit 40 and sequentially stored.

この差分データメモリ回路40にメモリされた差分デー
タに基づいて、デフォーカス演算回路42は、撮影レン
ズ2の予定焦点面に対するデフォーカス量及び方向を演
算する。デフォーカス演算回路42の出力は、レンズ駆
動及び表示回路44に入力され、撮影レンズ2の焦点調
節及び合焦状態の表示に用いられる。
Based on the difference data stored in the difference data memory circuit 40, the defocus calculation circuit 42 calculates the defocus amount and direction of the photographic lens 2 with respect to the planned focal plane. The output of the defocus calculation circuit 42 is input to a lens drive and display circuit 44, and is used to adjust the focus of the photographic lens 2 and to display the in-focus state.

第2図は、第1図に示す本発明によるピント検出装置の
回路をマイクロコンピュータを用いて実現した場合の構
成を示すブロック図である。第2図においてマイクロコ
ンピュータ60は、一般的な8ビツトのワンチップマイ
クロコンピュータ(例えばモトローラ社製 タイプ65
02)においてメモリ容量の増加を図ったものを用いる
。マイクロコンピュータを利用すると、第1図に示す回
路ブロックのうちA−D変換回路24の構成の一部およ
びその後段の部分はすべてマイクロコンピュータ60に
よる構成部分となる。マイクロコンピュータ60の外部
にはA−D変換回路62、合焦動作を指令するスイッチ
64、CCD駆動回路66、モーター駆動回路68、モ
ーター70、表示回路72等が接続される。A−D変換
回路62は、電圧比較回路とD−A変換回路が含まれ、
A−D変換時に、マイクロコンピュータ60から時間的
に変化するデジタルコードが与えられて、これに対応す
るアナログ電圧とC0D20からのセル出力との比較を
行い、両者が所定の関係に達したときのデジタルコード
がA−D変換値とされる。
FIG. 2 is a block diagram showing a configuration in which the circuit of the focus detection device according to the present invention shown in FIG. 1 is implemented using a microcomputer. In FIG. 2, the microcomputer 60 is a general 8-bit one-chip microcomputer (for example, Motorola Type 65).
02) with increased memory capacity is used. When a microcomputer is used, a part of the structure of the A-D converter circuit 24 and the subsequent stage of the circuit blocks shown in FIG. 1 are all formed by the microcomputer 60. Connected to the outside of the microcomputer 60 are an A-D conversion circuit 62, a switch 64 for instructing a focusing operation, a CCD drive circuit 66, a motor drive circuit 68, a motor 70, a display circuit 72, and the like. The A-D conversion circuit 62 includes a voltage comparison circuit and a D-A conversion circuit,
During A-D conversion, a time-varying digital code is given from the microcomputer 60, the corresponding analog voltage is compared with the cell output from C0D20, and when the two reach a predetermined relationship, The digital code is taken as an A-D conversion value.

CCD駆動回路66は、C0D20の駆動制御−20= に必要な制御信号をマイクロコンピュータ60から供給
されるクロックパルスからつくる。モーター駆動回路6
8は、検出されたずれ量の信号に基づいて撮影レンズ2
を合焦位置へ駆動すべくレンズ駆動モーター70への給
電制御を行う。表示回路72は、ずれ量の信号に基づい
て前ピン、合焦、後ピン、合焦不能等の表示をファイン
ダ内で表示する。以上のピント検出装置は、スイッチ6
4が閉じられている間は、前述のずれ量の検出動作を繰
り返し行い、撮影レンズを合焦位置へ向けて移動させる
。尚、CCD20とA−D変換回路62との間には、例
えば、CCD特有の暗出力成分を除去するための回路や
、各セルの出力信号を被写体輝度に応じて増幅したりす
るための回路が設(Jられるが、本発明に直接に係わる
ものではないので説明は省略する。また実際の装置は、
CODの積分時間をセルへの入射光強度に応じて変化さ
せる等、公知の技術を種々適用して構成されるものであ
るということはいうまでもない。
The CCD drive circuit 66 generates control signals necessary for drive control of the C0D 20 from clock pulses supplied from the microcomputer 60. Motor drive circuit 6
8 is a photographic lens 2 based on the signal of the detected amount of deviation.
Power supply to the lens drive motor 70 is controlled to drive the lens to the in-focus position. The display circuit 72 displays indications such as front focus, in focus, back focus, and out of focus in the finder based on the shift amount signal. The above focus detection device has switch 6
4 is closed, the above-described shift amount detection operation is repeated and the photographic lens is moved toward the in-focus position. Note that between the CCD 20 and the A-D conversion circuit 62, for example, a circuit for removing a dark output component peculiar to a CCD or a circuit for amplifying the output signal of each cell according to the subject brightness is installed. is installed, but the explanation is omitted as it is not directly related to the present invention.The actual device is
Needless to say, it is constructed by applying various known techniques, such as changing the COD integration time depending on the intensity of light incident on the cell.

(b)合焦判別 次に、本実施例の効果を具体的数値を挙げて説明する。(b) Focus determination Next, the effects of this embodiment will be explained using specific numerical values.

第3図(A)〜(F)は、被写体として白い面」−に黒
色のスリットというヂャー1−(第3図(A))を用い
、これに対する測距検出演算における一致度の関数I]
”(D、HU)を求めたものである。
Figures 3 (A) to (F) use Jar 1 (Figure 3 (A)), which has a black slit on a white surface as the subject, and the function I of the degree of coincidence in the distance measurement detection calculation for this.
” (D, HU).

第3図(B)は、被写体(第3図(Δ))の測距エリア
51の部分で検出したデータD(X)である。第3図(
C)は、この画素生データD(X)と4画素遅延データ
D(X+4)との差分をとったデータである。基準部(
第1像)、参照部(第2像)の生画素データをそれぞれ
DΔ(X)、DB(X)とすると、ΔDA(X)=DA
(X−+−4)−DΔ(X)  ・・・(5)ΔDB(
X)=DB(X+4.)−DB(X)  ・・・(6)
である。これらのデータを用いて、第1像、第2像の相
関をとり、−政変の関数トr’(Dを求めると、第3図
(E)のようになる。
FIG. 3(B) shows data D(X) detected in the distance measurement area 51 of the subject (FIG. 3(Δ)). Figure 3 (
C) is data obtained by taking the difference between this pixel raw data D(X) and the 4-pixel delayed data D(X+4). Reference part (
If the raw pixel data of the first image) and reference part (second image) are DΔ(X) and DB(X), respectively, ΔDA(X)=DA
(X-+-4)-DΔ(X) ...(5)ΔDB(
X)=DB(X+4.)-DB(X)...(6)
It is. Using these data, the correlation between the first image and the second image is calculated, and the -political change function r'(D) is determined, as shown in FIG. 3(E).

H’(D二ΣlΔDA(i)=ΔDB(i+j−])l
/C’t = −1 ・・・(7) ここに、C’7Σ”lΔDA(i)−△DA (i−+
−D lに1 コントラスト信号C°は、像のコントラストを示す信号
として代用する。(7)式においては、コントラストの
影響を除去するために用いる。合焦位置は、H’(Dが
最小値となるところのjを選べば、jの値がデフォーカ
ス虫に関連する値となり、焦点検出ができる。
H'(D2ΣlΔDA(i)=ΔDB(i+j-])l
/C't = -1...(7) Here, C'7Σ"lΔDA(i)-△DA (i-+
-D l to 1 The contrast signal C° is substituted as a signal indicating the contrast of the image. In equation (7), it is used to remove the influence of contrast. If the in-focus position is selected at j where H'(D has the minimum value), the value of j will be a value related to the defocused insect, and focus detection will be possible.

データ処理には、8ビツト演算を用いる。MSBを符号
に用いるとする。ところが、ここで差分を求めるべき画
素生データD(X)値が150D(1、OOI O+、
 10 B )とOD (OOOOOOOOB)テある
とするど、差分データバー+−150D (1,001
01]、OB )またバー150 D (011,O]
01OB)という値になる。しかし、デジタル演算処理
方式で多く使イっれる補数表現による計算をすると、8
ビツト演算では、+]、50D(1001011OB)
トイウ値タケを見ルト、−+06Dという値と全く同じ
となり区別がつがなくなる。
8-bit arithmetic is used for data processing. It is assumed that the MSB is used for the code. However, the pixel raw data D(X) value for which the difference should be calculated is 150D(1, OOI O+,
10B) and OD (OOOOOOOOOOOB), the difference data bar +-150D (1,001
01], OB ) Also bar 150 D (011, O]
01OB). However, when calculations are performed using complement representation, which is often used in digital arithmetic processing methods, 8
For bit operations, +], 50D (1001011OB)
The current value is exactly the same as the value -+06D, and there is no difference between the values.

また、−150D (011010]、OB)モ+10
6Dと区別がっかない。したがって、このまま相関をと
り一致度の関数H’(j)を求め、合焦位置を求めるた
め、H’(j)の極小値(最小値)を求めようとしても
、差分データの擬解釈によって幾多の擬極小値が生じ、
求めるべき極小値の判別の妨げとなる。
Also, -150D (011010], OB)Mo+10
Hard to distinguish from 6D. Therefore, even if you try to calculate the minimum value (minimum value) of H'(j) by calculating the correlation as it is to find the matching function H'(j) and find the focusing position, it will be difficult to find the minimum value (minimum value) of H'(j) due to pseudo-interpretation of the difference data. A pseudo-minimum value of
This hinders the determination of the local minimum value that should be found.

一方、9ビット演算を行うとすると、+150Dは(0
10月吋10B)と、−106Dは(11001011
,OB)となり、区別がつくことになるが、9ビツト演
算処理になるため、メモリ容量も演算処理時間もかかる
On the other hand, if we perform a 9-bit operation, +150D is (0
-106D is (11001011
.

そこで、本発明の要点である第3図(D)の方式をとる
。すなわち、第3図(B)の画素生データDへ(X)、
DB(X)から差分データをとる時に、オーバーフロー
しているかいないかをチェックして、オーバーフローし
ていればオーバーフローしていない最大のデータに固定
し、オーバーフローしていな(Jれば、そのままのデー
タを使うのである。ここでは、8ビツトのデータを1つ
のデータと見なす例であるので、オーバーフローとは差
分データΔD(X)が127を超えた場合か、−128
より小さくなった場合である。
Therefore, the method shown in FIG. 3(D), which is the main point of the present invention, is adopted. That is, to the pixel raw data D in FIG. 3(B) (X),
When taking differential data from DB(X), check whether there is an overflow or not. If there is an overflow, fix it to the largest data that does not overflow, and if there is no overflow (J, leave the data as it is) In this example, 8-bit data is considered as one piece of data, so an overflow is defined as when the difference data ΔD(X) exceeds 127 or -128.
This is the case when it becomes smaller.

すなわち、」−記の差分データ△DA(X)。That is, the difference data ΔDA(X) written in "-".

ΔDB(X)を測距演算にそのまま使用するのではなく
、以下のように定義した差分データρXまたはrXを用
いる。
Instead of using ΔDB(X) as it is for distance measurement calculations, difference data ρX or rX defined as below is used.

ΔDA(X) > 127    : 0.X−127
−128≦ΔDA(X)≦127・0.X−ΔDA(X
)ΔDA(X) < −1,28・)4 =−128・
・・(8) ΔDB(X) > 127    : r)(=127
−128≦ΔDB(X)≦127 : rX−ΔDB(
X)ΔDB(X) < −128: rX=−128・
・・(9) QXとrxを用いて、第1像と第2像の相関をとり、−
政変関数H(Dを求めると、第3図(F)のように第3
図(E)とほぼ同じになり、正しい合焦位置が得られる
ΔDA(X) > 127: 0. X-127
-128≦ΔDA(X)≦127・0. X-ΔDA(X
)ΔDA(X) <-1,28・)4 =-128・
...(8) ΔDB(X) > 127: r) (=127
−128≦ΔDB(X)≦127: rX−ΔDB(
X) ΔDB(X) < -128: rX=-128・
...(9) Using QX and rx, take the correlation between the first image and the second image, -
When the political change function H (D) is calculated, the third
The result is almost the same as in Figure (E), and the correct in-focus position can be obtained.

n ここに、  c−、Σ 1ジ、−ρ1+11に1 ・・(10) この方法で(J1相関を求めるために寄与するデータが
幾分域ることになる。しかし、前述17たような、CO
Dの出力レベルを低ドさせ、オーバーフローしないよう
に回路の設定をする方式と(J異なり、大かたの被写体
に対し、情報量が豊富になるようにレベルを設定し、こ
れでオーバーフローする場合には、本実施例のような方
式をとることによって、焦点検出能力も低下させること
なしに、また、複雑な処理をすることなく測距演算でき
るので、測距演算時間に多くの時間をかけずにすむ。
n Here, c-, Σ 1 di, -ρ1 + 11...(10) In this method, the data that contributes to finding the J1 correlation will be somewhat limited. However, as mentioned in 17 above, C.O.
One method is to lower the output level of D and set the circuit so that it does not overflow (unlike J, one method is to set the level so that the amount of information is rich for a large subject, and this method causes overflow. By adopting the method of this embodiment, it is possible to perform distance measurement calculations without degrading the focus detection ability and without performing complicated processing. I live without.

(c)  焦点検出のフロー 第4図は、第2図の回路をマイクロコンピュータ60を
用いて制御した場合のその動作順序を示すフローヂャー
トである。以下、このフローヂャートについて説明する
(c) Focus Detection Flow FIG. 4 is a flowchart showing the sequence of operations when the circuit shown in FIG. 2 is controlled using the microcomputer 60. This flowchart will be explained below.

まず、ステップlでCODイメージセンセン0の積分動
作を行9つ仕る。ステップ2でその出力をA/D変換器
24でデジタル信号に変換さH゛る。
First, in step 1, the integration operation of COD image sensor 0 is performed in nine rows. In step 2, the output is converted into a digital signal by the A/D converter 24.

そして、ステップ3でこのデジタル信号を画素生データ
D(X)として順に取り込む(X=1,2,3゜・・)
。次に、ステップ4で1つのデータT)(X)と4画素
ずら且た画素生データD (X +4)との差分を演算
し、この結果をΔD(X)とする。
Then, in step 3, this digital signal is sequentially captured as pixel raw data D(X) (X = 1, 2, 3°...)
. Next, in step 4, the difference between one data T)(X) and the pixel raw data D(X+4) shifted by 4 pixels is calculated, and this result is set as ΔD(X).

ステップ5では、このΔD(X)が正か負かを判別する
。ΔD(X)が正もしくは0であれば、ステップ6に進
み、正にオーバーフローしていないか、どうかの判別を
する。ここでは、8ビット1データの考え方なので、正
のデータとしての最大値+127よりも太き+3れば、
ステップ8でρX、rXを+127に固定し、−1−1
27よりも小さIJれば、ステップ9でrx”xに(、
lΔD(X)をそのまま代入しておく。一方、ΔD(X
)が負であればステップ7に進み、負にオーバーフロー
(アンダーフロー)シていないかどうかの判別をする。
In step 5, it is determined whether this ΔD(X) is positive or negative. If ΔD(X) is positive or 0, the process proceeds to step 6, where it is determined whether there is a positive overflow. Here, we are thinking of 8-bit 1 data, so if it is thicker +3 than the maximum value of positive data +127,
In step 8, fix ρX, rX to +127, -1-1
If IJ is smaller than 27, in step 9 set rx”x (,
Substitute lΔD(X) as is. On the other hand, ΔD(X
) is negative, the process proceeds to step 7, where it is determined whether there is a negative overflow (underflow).

8ビツト負のデータとしての最大値−128よりも小さ
ければステップ10で−128に固定し、=128より
も大き(Jれげステップ9でrx”xにはΔD(X)を
そのまま代入しておく。そして、ステップ11でQx、
rxをメモリしておく。
If it is smaller than the maximum value of 8-bit negative data -128, it is fixed at -128 in step 10, and it is larger than =128. Then, in step 11, Qx,
Store rx in memory.

次に、ステップ12で全てのデータを取り込ん一27= だがどうかをヂエツクして、取り込み終えていなければ
ステップ3へもどるが、取り込み終えていればステップ
I3でデフォーカス量を演算する。
Next, in step 12, it is checked whether all the data has been captured. If the data has not been captured, the process returns to step 3, but if the data has been captured, the defocus amount is calculated in step I3.

そして、ステップ14でデフォーカス量を出力して、ス
テップ15でレンズをピント位置へ駆動させてフローの
1周期が終了する。
Then, in step 14, the defocus amount is output, and in step 15, the lens is driven to the focus position, and one cycle of the flow ends.

そして、連続した自動焦点をするために再びステップ1
へもどって、次のCCDセンセン積分に入る。
Then step 1 again for continuous autofocus.
Go back and start the next CCD Sensen integral.

第5図はステップ13の詳細を示したしのである。マイ
コン60はステップ12までで測距演算に使用する差分
データQx、rXの取り込みを終了する。ステップ13
に入ると、ステップ21で、イメージセンサの基学部上
の像のコントラストCを計算式 %式% に基づいて演算する。続いて、ステップ22で計算式 %式% に基づき、jを1から7までシフトさせて、7通りの相
関値H(1)、 H(2)、  ・、 H(7)を順次
演算する。ただし、ρに、 rkはそれぞれ基準部、参
照部のに番目の画素に対応するデジタル化された画素差
分出力を表わす。ステップ23では、それらの相関値の
うち、最大の相関度を示す最小の相関値H(jM)を求
めると共に、そのときのシフト位置jyを求める。
FIG. 5 shows details of step 13. The microcomputer 60 finishes taking in the difference data Qx and rX used for distance measurement calculation up to step 12. Step 13
In step 21, the contrast C of the image on the basic part of the image sensor is calculated based on the calculation formula %. Subsequently, in step 22, j is shifted from 1 to 7 based on the calculation formula %, and seven correlation values H(1), H(2), . . . , H(7) are sequentially calculated. However, ρ and rk represent the digitized pixel difference output corresponding to the th pixel of the standard part and the reference part, respectively. In step 23, among these correlation values, the minimum correlation value H(jM) indicating the maximum degree of correlation is determined, and the shift position jy at that time is determined.

次のステップ24〜26では、このjMの値をもとにし
て、内挿Zこより、ラインセンザの画素ピッチよりも高
い精度で最小相関値(最大相関度)及びそれを与えるシ
フト位置(最大相関シフト位置)を求める。まず、ステ
ップ24では、最小相関値を与えるjMの値が1または
7のいずれでもないと判別すると、ステップ25で補間
演算を行なう。
In the next steps 24 to 26, based on this value of jM, the minimum correlation value (maximum correlation degree) and the shift position giving it (maximum correlation shift position). First, in step 24, if it is determined that the value of jM giving the minimum correlation value is neither 1 nor 7, an interpolation calculation is performed in step 25.

この補間演算は、jMの両隣りのシフ)・位置jM−】
、jM+1での相関値H(jM−D、H(jM+1)を
比較して、その比較結果に応じて次の2つの計算式のい
ずれかを用いる。
This interpolation calculation calculates the shifts on both sides of jM) and position jM−]
, jM+1 are compared, and one of the following two calculation formulas is used depending on the comparison result.

11(JM−1)≧ H(jM−+−])のとき・(1
2) IT(j)7−1) < 1((31−+−1)のとき
・・・(13) ここで、XMは補間演算された最大相関シフト位置であ
る。ステップ26では、この位置での相関値すなわち補
間演算による最小相関値(最大相関度)YMを次の計算
式によって求める。
When 11(JM-1)≧H(jM-+-]), (1
2) When IT(j)7-1) < 1 ((31-+-1)...(13) Here, XM is the maximum correlation shift position calculated by interpolation. In step 26, this position The correlation value, that is, the minimum correlation value (maximum correlation degree) YM by interpolation calculation is determined by the following calculation formula.

YM  =H(jM) −l H(jM(−1)l((
jM−1) 1・・・(14) なお、ステップ24て、 jM=Iまたは7と判別した
ときは、H(jy−1)またはH(JM川)が存在せず
、」二連の補間演算ができない場合であるから、ステッ
プ27に進み、jM、トr(jy)の値をそのままXM
、YMとしてそれぞれ設定する。
YM = H(jM) -l H(jM(-1)l((
jM-1) 1...(14) Note that when it is determined in step 24 that jM=I or 7, H(jy-1) or H(JM river) does not exist, and ``double interpolation Since this is a case where the calculation cannot be performed, proceed to step 27 and use the values of jM and r(jy) as they are as XM.
, YM.

ステップ31では、焦点検出不能かどうかを判別する。In step 31, it is determined whether focus cannot be detected.

本実施例の場合、補間演算による最小相関値YMをライ
ンセンザの基準部り七の像のコントラスト値Cで正規化
したYM/Cが所定値Aよりも大きいかどうかで判別す
る。すなわち、YMの値は相関度が高い程小さな値とな
り、これからさらにコン)・ラストの影響を除去したも
のがYM/Cとなるが、このYM/Cの値が所定値A以
−1−であれば、相関度が低く、信頼性に欠ける。した
がって、ステップ31でYM/C≧Aと判別したときは
、焦点検出不能と判断し、再びステップ2に戻って次の
光積分を行わせる。一方、YM/C<A と判別したと
きは、ステップ41で、デフォーカス量DFの演算を行
う。本システムでは、合焦時の最大相関シフト位置はX
y、=4で与えられる。ちょうどXM=]からXM=7
の真ん中である。すなわち、まず、(XM−4)によっ
て、合焦時からのずれシフ)・飛を求める。一方、1ソ
フト上(1ピツチのずれ)に対するピントずれ量(デフ
ォーカス@)は、光学系によってα(例えば800μm
/ピッヂ)と決められるので、(XM−4)・αによっ
て、デフォーカス91)Fが求まる。そして、さらにス
テップ42で、レンズ駆動装置40(こよって行うレン
ズ駆動の量をデフォーカス量DFから算出する。
In the case of this embodiment, the determination is made based on whether YM/C, which is obtained by normalizing the minimum correlation value YM obtained by interpolation calculation with the contrast value C of the seven images of the reference part of the line sensor, is larger than a predetermined value A. In other words, the value of YM becomes smaller as the degree of correlation increases, and the value obtained by further removing the influence of contrast and last becomes YM/C, but if the value of YM/C is less than the predetermined value A -1- If there is, the degree of correlation is low and reliability is lacking. Therefore, when it is determined in step 31 that YM/C≧A, it is determined that focus detection is impossible, and the process returns to step 2 to perform the next optical integration. On the other hand, when it is determined that YM/C<A, the defocus amount DF is calculated in step 41. In this system, the maximum correlation shift position during focusing is
It is given by y,=4. just XM=] to XM=7
It is in the middle of That is, first, the deviation (shift) from the time of focus is determined by (XM-4). On the other hand, the amount of focus deviation (defocus@) for one software (one pitch deviation) depends on the optical system, α (e.g. 800 μm)
/Pidge), the defocus 91)F can be found from (XM-4)·α. Further, in step 42, the amount of lens driving performed by the lens driving device 40 is calculated from the defocus amount DF.

以下、第4図にもどって、Iノンズ駆動量信号を出力し
て、レンズを動かし自動的に焦点を合わせる。
Hereinafter, returning to FIG. 4, the I-nons drive amount signal is output, the lens is moved, and the focus is automatically adjusted.

このように連続した自動焦点をしようとした場合、測距
演算時間は、自動焦点の繰り返し周期に直接関係してく
る要因である。本実施例のように使用データが所定レベ
ル範囲に対して、オーバーフローするかどうかの判別を
して、オーバーフローすればオーバーフローしない最大
値または最小値に固定したデータを使い、オーバーフロ
ーしなければそのままデータを使う演算方式をとること
によって演算処理が容易になり、フローチャート内のス
テップI3の処理時間が早くなるので、被写体追随性に
優れたすばやい自動焦点が可能となっている。
When attempting to perform continuous automatic focusing in this manner, the distance measurement calculation time is a factor that is directly related to the repetition period of automatic focusing. As in this example, it is determined whether or not the data used overflows within a predetermined level range, and if it overflows, the data is fixed at the maximum or minimum value that will not overflow, and if it does not overflow, the data is used as is. The calculation method used makes the calculation processing easier and the processing time of step I3 in the flowchart becomes faster, so quick automatic focusing with excellent subject tracking performance is possible.

ここでは、オーバーフローすれば、オーバーフローする
前の最大値または最小値に固定するようにしているが、
これは他の数値、例えば0でもよく、これによって同様
の効果が得られる。
Here, if it overflows, it is fixed to the maximum or minimum value before overflow, but
This may be any other value, for example 0, and a similar effect can be achieved.

(発明の効果) 本発明により、測距演算処理が簡略化でき、処理アルゴ
リズムも簡略化できる。また、データを保持するための
メモリの容量が節約でき、データ処理の機能も省略でき
る。
(Effects of the Invention) According to the present invention, distance measurement calculation processing can be simplified, and processing algorithms can also be simplified. Furthermore, the memory capacity for holding data can be saved, and data processing functions can also be omitted.

さらに、測距演算時間も早くなり、連続自動焦点の場合
等繰り返し測距演算をする自動焦点の性能、特に被写体
に対する追随性の性能も向]−する。
Furthermore, the distance measurement calculation time becomes faster, and the performance of autofocus, which repeatedly performs distance measurement calculations such as in the case of continuous autofocus, is improved, especially the performance of tracking the subject.

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

第1図と第2図は、それぞれ、本発明の実施例の構成を
示す図である。 第3図(A)〜(F)は、それぞれ、合焦判別のデータ
処理を説明するための図である。 第4図と第5図は、それぞれ、本発明にかかる焦点検出
のフローチャートである。 第6図〜第8図は、それぞれ、従来の合焦判別方式を説
明するための図である。 第9図(a)〜(c)は、それぞれ、従来の合焦判別方
式の問題点を説明するための図である。 2・・撮影レンズ、  6・・コンデンサレンズ、8.
10・・・再結像レンズ、 I2.I4・・・ラインセンザ、   18・・光軸、
20 ラインセンザ、 22・・・自動焦点モジュール、 60 マイクロコンピュータ。 特許出願人   ミノルタカメラ株式会社代  理  
人 弁理士 前出 葆 ほか2名第8図 第9図(c) b5b、 b、 b8b9blQ bll b12第9
i(a) 第9市Hb>
FIG. 1 and FIG. 2 are diagrams showing the configuration of an embodiment of the present invention, respectively. FIGS. 3A to 3F are diagrams for explaining data processing for focus determination, respectively. 4 and 5 are flowcharts of focus detection according to the present invention, respectively. FIGS. 6 to 8 are diagrams for explaining conventional focus determination methods, respectively. FIGS. 9(a) to 9(c) are diagrams for explaining the problems of the conventional focus determination method, respectively. 2. Photographing lens, 6. Condenser lens, 8.
10... Re-imaging lens, I2. I4...Line sensor, 18...Optical axis,
20 line sensor, 22... automatic focus module, 60 microcomputer. Patent applicant Minolta Camera Co., Ltd. Representative
People Patent Attorneys Previously mentioned 葆 and 2 others Figure 8 Figure 9 (c) b5b, b, b8b9blQ bll b12 No. 9
i(a) 9th City Hb>

Claims (1)

【特許請求の範囲】[Claims] (1)撮影レンズの光軸を挟む、該撮影レンズの第1の
部分と第2の部分とをそれぞれ通過した被写体光束から
つくられる第1と第2の2つの像の相対的な位置関係を
検出して撮影レンズの合焦位置からのずれ量を検出する
焦点検出装置において、 第1および第2の像を受光するように多数の受光素子が
一列に配列され、第2像を検出する部分の受光素子の数
が第1像を検出する部分(基準部という)の受光素子の
数よりも多く、第2像を検出する部分にて、基準部を構
成する受光素子の数と同じ数の受光素子が一列に配列し
てなる組(比較部という)が相互に1受光素子だけずら
して複数組構成できる受光手段と、 受光手段の出力する受光素子の受光量をデジタル値に変
換するAD変換手段と、 AD変換手段の出力する各受光素子の受光量とその受光
素子と所定量だけずれた位置の受光素子の受光量との差
分を演算し、差分演算の際に所定の範囲の上限と下限に
対してオーバーフローしたと判別した場合には、差分値
をそれぞれ所定の上限値または下限値とする差分演算手
段と、 基準部の受光素子と比較部の受光素子にそれぞれ対応し
て演算された上記の差分値から所定の合焦判定用の相関
関数値を計算する相関演算手段と、複数組の比較部に対
して、それぞれ相関演算手段により計算された相関関数
値から合焦位置からのずれ量を判別する合焦判別手段と
を備えた焦点検出装置。
(1) Determine the relative positional relationship between the first and second images created from the subject light beams that have passed through the first and second parts of the photographic lens, which sandwich the optical axis of the photographic lens. In a focus detection device that detects the amount of deviation of a photographic lens from its in-focus position, a portion where a large number of light receiving elements are arranged in a line to receive the first and second images, and which detects the second image. The number of light-receiving elements in the part that detects the first image is greater than the number of light-receiving elements in the part that detects the first image (referred to as the reference part), and the number of light-receiving elements in the part that detects the second image is the same as the number of light-receiving elements that make up the reference part. A light-receiving means that can form a plurality of sets of light-receiving elements arranged in a row (referred to as comparison sections) shifted by one light-receiving element from each other, and an AD conversion that converts the amount of light received by the light-receiving elements output by the light-receiving means into a digital value. calculating the difference between the amount of light received by each light receiving element outputted by the AD converting means and the amount of light received by a light receiving element at a position shifted by a predetermined amount from that light receiving element, and determining the upper limit of the predetermined range and the upper limit of the predetermined range when calculating the difference. If it is determined that an overflow has occurred with respect to the lower limit, the difference calculation means sets the difference value to a predetermined upper limit value or lower limit value, respectively, and calculates the calculated value corresponding to the light receiving element of the reference section and the light receiving element of the comparison section, respectively. A correlation calculation means for calculating a correlation function value for a predetermined focus determination from the above difference value, and a deviation from the in-focus position from the correlation function value calculated by the correlation calculation means for each of the plurality of comparison units. A focus detection device comprising a focus determination means for determining the amount of focus.
JP22726385A 1985-10-12 1985-10-12 Focus detector Pending JPS6286317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22726385A JPS6286317A (en) 1985-10-12 1985-10-12 Focus detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22726385A JPS6286317A (en) 1985-10-12 1985-10-12 Focus detector

Publications (1)

Publication Number Publication Date
JPS6286317A true JPS6286317A (en) 1987-04-20

Family

ID=16858079

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22726385A Pending JPS6286317A (en) 1985-10-12 1985-10-12 Focus detector

Country Status (1)

Country Link
JP (1) JPS6286317A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014038127A (en) * 2012-08-10 2014-02-27 Canon Inc Image signal processing device and control method therefor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS604914A (en) * 1983-06-23 1985-01-11 Minolta Camera Co Ltd Focus detector

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS604914A (en) * 1983-06-23 1985-01-11 Minolta Camera Co Ltd Focus detector

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014038127A (en) * 2012-08-10 2014-02-27 Canon Inc Image signal processing device and control method therefor

Similar Documents

Publication Publication Date Title
JP2008122835A (en) Correlation calculation method, correlation calculation device, focus detector and imaging apparatus
US6768540B2 (en) Phase difference detection method, phase difference detection apparatus, range finding apparatus and imaging apparatus
US6973262B2 (en) Camera and wide-angle field distance-measuring camera
JPS59126517A (en) Focusing detector of camera
JP2015172640A (en) Imaging apparatus including af function
JPS6148807A (en) Focus detecting device
US6714732B2 (en) Phase difference detection method, phase difference detection apparatus, range finding apparatus and imaging apparatus
JP2002213946A (en) Method and device for outputting image signal, range finder, and image pick-up device
JPH04165777A (en) Picture element signal correcting device
JPS61145515A (en) Focus detecting device
JPS6286317A (en) Focus detector
US7154589B2 (en) Rangefinder apparatus
JP3230759B2 (en) Distance measuring device
JP4817552B2 (en) Phase difference detection method, phase difference detection device, distance measuring device, and imaging device
US6760547B2 (en) Rangefinder apparatus and camera equipped therewith
JP4938922B2 (en) Camera system
JP4632803B2 (en) Focus detection device
JPS6286316A (en) Focus detector
JPH11249004A (en) Image sensor
JPH0693059B2 (en) Focus detection device
JP2558377B2 (en) Focus detection device
US20240064401A1 (en) Light receiving element, imaging device, and correction processing method
JP4615912B2 (en) Camera focus calculation device
JPH03174127A (en) Exposure controller for camera
JP2909130B2 (en) Focus state detector