JP2003232982A - Ranging apparatus - Google Patents

Ranging apparatus

Info

Publication number
JP2003232982A
JP2003232982A JP2001377257A JP2001377257A JP2003232982A JP 2003232982 A JP2003232982 A JP 2003232982A JP 2001377257 A JP2001377257 A JP 2001377257A JP 2001377257 A JP2001377257 A JP 2001377257A JP 2003232982 A JP2003232982 A JP 2003232982A
Authority
JP
Japan
Prior art keywords
correlation value
sensor
data
value
shift amount
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
JP2001377257A
Other languages
Japanese (ja)
Inventor
Hideo Yoshida
秀夫 吉田
Kiichi Mihara
喜一 三原
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.)
Fujinon Corp
Original Assignee
Fuji Photo Optical Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Photo Optical Co Ltd filed Critical Fuji Photo Optical Co Ltd
Priority to JP2001377257A priority Critical patent/JP2003232982A/en
Priority to US10/314,284 priority patent/US6701074B2/en
Publication of JP2003232982A publication Critical patent/JP2003232982A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To decrease computational complexity by performing a correlation value computation at each shift amount while shifting a pair of window ranges at every other prescribed intervals with the window range for one pixel component as a minimum interval and on the other hand, to prevent the degradation in the accuracy of ranging by performing a correlation value computation at each of the shift amounts of the minimum interval by narrowing the window ranges down to the prescribed ranges before and behind the reference which is the shift amount of the window ranges when the maximum correlation value among the correlation values determined in such a manner is obtained. <P>SOLUTION: A pair of the window ranges within the range of an adopted sensor are shifted at every other three (three pixels) and the correlation value computation is performed by each of every other three shift amounts. The correlation value computation (ordinary computation) is performed by each one shift amount within the prescribed range (recomputation range) before and behind the reference which is the shift amount of the window ranges when the maximum correlation value among the correlation values obtained by the correlation value computing means is obtained. <P>COPYRIGHT: (C)2003,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は測距装置に係り、特
にパッシブ方式のAFセンサを用いた例えばカメラの測
距装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a distance measuring device, and more particularly to, for example, a camera distance measuring device using a passive AF sensor.

【0002】[0002]

【従来の技術】パッシブ方式のAFセンサを用いたカメ
ラの測距装置は、例えば左右一対のラインセンサにより
測距対象物を撮像し、左右のセンサ像(AFデータ)を
取得する。この左右一対のラインセンサから得られるA
Fデータのうち、相関値演算に使用する一対のAFデー
タを取得するための一対のウインドウ範囲を決定し、こ
の一対のウインドウ範囲を一対の所定のセンサ領域(採
用センサ)内で互いに逆方向にシフトさせながら順次相
関値演算に使用する一対のAFデータを取得する。又
は、一方のウインドウ範囲を固定し、他方のウインドウ
範囲をシフトさせながら順次相関値演算に使用する一対
のAFデータを取得する。このようにして得られる一対
のAFデータの相関を求め、最高相関が得られるとき
(一対の採用センサ内の左右のセンサ像が一致すると
き)のウインドウ範囲のシフト量に基づいて測距対象物
距離を算出している(特開平8−285580号公報、
特開平11−23957号公報、特許第3099603
号等参照)。
2. Description of the Related Art A distance measuring device for a camera using a passive AF sensor, for example, images a distance measuring object by a pair of left and right line sensors and acquires left and right sensor images (AF data). A obtained from this pair of left and right line sensors
Of the F data, a pair of window ranges for obtaining a pair of AF data used for the correlation value calculation are determined, and the pair of window ranges are set in opposite directions in a pair of predetermined sensor regions (adopted sensors). While shifting, a pair of AF data used for the correlation value calculation is sequentially acquired. Alternatively, while fixing one window range and shifting the other window range, a pair of AF data used for the correlation value calculation is sequentially acquired. The correlation between the pair of AF data thus obtained is obtained, and the distance measurement object is determined based on the shift amount of the window range when the maximum correlation is obtained (when the left and right sensor images in the pair of adopted sensors match). The distance is calculated (Japanese Patent Laid-Open No. 8-285580,
Japanese Patent Laid-Open No. 11-23957 and Japanese Patent No. 3099603.
No.).

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来、
ウインドウ範囲を一画素単位でシフトさせながら各シフ
ト量における相関値を算出し、算出した相関値から最高
相関が得られるときのウインドウ範囲のシフト量を検出
するようにしているため、AFセンサの画素数が多くな
ると、相関値演算の回数が増加し、測距時間が長くなる
という問題がある。
[Problems to be Solved by the Invention]
Since the correlation value at each shift amount is calculated while shifting the window range pixel by pixel, and the shift amount of the window range when the maximum correlation is obtained from the calculated correlation value is detected, the pixels of the AF sensor are When the number is large, the number of times the correlation value is calculated increases, and there is a problem that the distance measurement time becomes long.

【0004】本発明はこのような事情に鑑みてなされた
もので、測距精度を低下させずに測距時間の短縮を図る
ことができる測距装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and an object thereof is to provide a distance measuring device capable of shortening the distance measuring time without lowering the distance measuring accuracy.

【0005】[0005]

【課題を解決するための手段】前記目的を達成するため
に請求項1に係る発明は、複数の受光素子からなる一対
のラインセンサに測距対象物からの光を結像させ、各受
光素子から得られた信号に基づいて相関値演算用の一対
のAFデータを生成するAFデータ生成手段と(ここ
で、AFデータはラインセンサの各受光素子から出力さ
れた信号を積分して得られたセンサデータをそのまま用
いたもの、及び、センサデータにコントラスト抽出処理
等を施したものを含む)、前記一対のラインセンサのう
ちの測距に使用する一対の採用センサ範囲から一対のA
Fデータを取得するAFデータ取得手段と、前記一対の
採用センサ範囲内において、相関値演算に使用する一対
のAFデータを取得するための一対のウインドウ範囲を
決定し、該一対のウインドウ範囲を前記一対の採用セン
サ範囲内の最高相関を得るためにシフトさせながら順次
相関値演算する第1の相関値演算手段であって、前記一
対のウインドウ範囲を一画素分ずつシフトさせる場合に
おける前記一対のウインドウ範囲のシフト量間隔を最小
間隔として、前記一対のウインドウ範囲を所定間隔置き
にシフトさせた場合における前記一対のウインドウ範囲
のシフト量ごとに前記一対のウインドウ範囲内のAFデ
ータを用いて相関値演算する第1の相関値演算手段と、
前記第1の相関値演算手段により得られた相関値のうち
の最高相関値が得られたときの前記ウインドウ範囲のシ
フト量を基準とする前後の所定の範囲内で、前記一対の
ウインドウ範囲を前記最小間隔でシフトさせながら順次
相関値演算する第2の相関値演算手段と、前記第2の相
関値演算手段により得られた相関値のうちの最高相関値
が得られたときの前記ウインドウ範囲のシフト量に基づ
いて測距対象物の距離を算出する測距対象物距離算出手
段と、を備えたことを特徴としている。
In order to achieve the above object, the invention according to claim 1 forms light from an object to be measured on a pair of line sensors composed of a plurality of light receiving elements, and each light receiving element is formed. AF data generating means for generating a pair of AF data for calculating a correlation value based on the signal obtained from (here, the AF data is obtained by integrating the signals output from the respective light receiving elements of the line sensor). The sensor data is used as it is, and the sensor data is subjected to contrast extraction processing and the like), and a pair of A from a pair of adopted sensor ranges used for distance measurement of the pair of line sensors.
AF data acquisition means for acquiring F data, and a pair of window ranges for acquiring a pair of AF data used for correlation value calculation within the pair of adopted sensor ranges are determined, and the pair of window ranges are defined as the window ranges. First correlation value calculation means for sequentially calculating correlation values while shifting in order to obtain the highest correlation within a pair of adopted sensor ranges, wherein the pair of windows when the pair of window ranges are shifted by one pixel Correlation value calculation using AF data in the pair of window ranges for each shift amount of the pair of window ranges when the pair of window ranges are shifted at predetermined intervals with the range shift amount interval as the minimum interval. First correlation value computing means for
Within the predetermined range before and after the shift amount of the window range when the highest correlation value among the correlation values obtained by the first correlation value calculating means is obtained, the pair of window ranges are Second correlation value calculation means for sequentially calculating correlation values while shifting at the minimum interval, and the window range when the highest correlation value among the correlation values obtained by the second correlation value calculation means is obtained. Distance measuring object distance calculating means for calculating the distance of the distance measuring object based on the shift amount.

【0006】即ち、第1の相関演算手段は、一対のウイ
ンドウ範囲を所定間隔置きにシフトさせた場合の各シフ
ト量ごとに相関値を算出するため、相関値演算の演算量
を低減することができ、一方、第2の相関演算手段は、
第1の相関値演算手段により得られた相関値のうちの最
高相関値が得られたときのウインドウ範囲のシフト量を
基準とする前後の所定の範囲内で、最小間隔のシフト量
ごとに相関値を算出するため、測距精度が低下すること
がない。
That is, since the first correlation calculating means calculates the correlation value for each shift amount when the pair of window ranges are shifted at predetermined intervals, the calculation amount of the correlation value calculation can be reduced. Yes, on the other hand, the second correlation calculation means
Correlation is performed for each shift amount of the minimum interval within a predetermined range before and after the shift amount of the window range when the highest correlation value of the correlation values obtained by the first correlation value calculating means is obtained. Since the value is calculated, the ranging accuracy does not decrease.

【0007】また、請求項2に記載の発明は、請求項1
に記載の発明において、前記第1の相関値演算手段は、
前記一対のウインドウ範囲のシフト量の最小値及び最大
値の近傍における所定の範囲内においては、前記最小間
隔のシフト量ごとに相関値演算を行うことを特徴として
いる。
The invention described in claim 2 is the same as claim 1
In the invention described in (1), the first correlation value calculation means is
A correlation value is calculated for each shift amount of the minimum interval within a predetermined range near the minimum and maximum shift amounts of the pair of window ranges.

【0008】即ち、最高相関値が得られるときのウイン
ドウ範囲のシフト量が、シフト量の最小値又は最大値の
近傍にあると、所定間隔置きのシフト量のみで算出した
相関値からはその最高相関値が得られるときのシフト量
を検出できない場合がある。請求項2の発明は、このよ
うな場合でも最高相関値が得られるときのシフト量を適
切に検出できるようにしたものである。
That is, when the shift amount of the window range when the maximum correlation value is obtained is in the vicinity of the minimum value or the maximum value of the shift amount, the maximum value is obtained from the correlation values calculated only by the shift amount at the predetermined intervals. The shift amount when the correlation value is obtained may not be detected in some cases. According to the second aspect of the present invention, the shift amount when the highest correlation value is obtained can be appropriately detected even in such a case.

【0009】また、請求項3に示すように、前記第1の
相関値演算手段は、前記採用センサ範囲内の相関値演算
により高い相関を示す極値が複数ある場合には、最も相
関の高い極値を暫定第1極値とし、次に相関の高い極値
を暫定第2極値として求め、前記第2の相関値演算手段
は、前記暫定第1極値と暫定第2極値との差が所定の基
準値内の場合には、前記暫定第1極値が得られたときの
前記ウインドウ範囲のシフト量を基準とする前後の所定
の範囲内と、前記暫定第2極値が得られたときの前記ウ
インドウ範囲のシフト量を基準とする前後の所定の範囲
内とでそれぞれ相関値演算を行うことを特徴としてい
る。
Further, as described in claim 3, the first correlation value calculating means has the highest correlation when there are a plurality of extreme values showing a high correlation due to the correlation value calculation within the adopted sensor range. The extreme value is set as the temporary first extreme value, and the extreme value having the next highest correlation is obtained as the temporary second extreme value, and the second correlation value calculation means calculates the temporary first extreme value and the temporary second extreme value. If the difference is within a predetermined reference value, the temporary second extreme value is obtained within a predetermined range before and after the shift amount of the window range when the temporary first extreme value is obtained is used as a reference. It is characterized in that the correlation value is calculated within a predetermined range before and after the shift amount of the window range at the time of reference.

【0010】即ち、前記暫定第1極値と暫定第2極値と
の差が所定の基準値内の場合には、いずれの極値が最高
相関値に近いか不明だからである。
That is, when the difference between the temporary first extreme value and the temporary second extreme value is within a predetermined reference value, it is unknown which extreme value is close to the maximum correlation value.

【0011】請求項4に示すように前記第2の相関値演
算手段は、該第2の相関値演算手段により相関値演算を
行う範囲内のシフト量のうち、前記第1の相関値演算手
段により既に相関値が得られているシフト量について
は、相関値演算を行うことなく、前記第1の相関値演算
手段により得られた相関値を前記第2の相関値演算手段
により得られた相関値とすることを特徴としている。即
ち、同じシフト量の相関値を重複して演算するのを防止
し、測距時間の短縮を図る。
According to a fourth aspect of the present invention, the second correlation value calculating means has the first correlation value calculating means of the shift amount within the range in which the correlation value calculation is performed by the second correlation value calculating means. For the shift amount for which the correlation value has already been obtained by the above, the correlation value obtained by the first correlation value calculating means is not calculated and the correlation value obtained by the second correlation value calculating means is calculated. It is characterized by setting it as a value. That is, it is possible to prevent the correlation values having the same shift amount from being redundantly calculated and to shorten the distance measurement time.

【0012】請求項5に示すように、前記第1の相関値
演算手段により最高相関値が得られたときの前記ウイン
ドウ範囲のシフト量と、前記第2の相関値演算手段によ
り最高相関値が得られるときの前記ウインドウ範囲のシ
フト量との差を求める手段と、前記求めた差が所定のシ
フト量以上の場合には測距不能とする判定手段と、を有
することを特徴としている。
As described in claim 5, the shift amount of the window range when the highest correlation value is obtained by the first correlation value computing means and the highest correlation value by the second correlation value computing means It is characterized in that it has a means for obtaining a difference from the shift amount of the window range when it is obtained, and a determining means for making distance measurement impossible when the obtained difference is equal to or more than a predetermined shift amount.

【0013】前記第1、第2の相関値演算手段によって
求めた最高相関値が得られたときの各シフト量の差が所
定のシフト量以上の場合には、それぞれ求めたシフト量
の信頼性が低く、誤測距されるおそれがあるからであ
る。
When the difference between the shift amounts when the maximum correlation value obtained by the first and second correlation value calculating means is obtained is a predetermined shift amount or more, the reliability of the shift amounts obtained respectively This is because the distance is low and the distance may be erroneously measured.

【0014】請求項6に示すように、前記第1の相関値
演算手段により最高相関値が得られたときの前記ウイン
ドウ範囲のシフト量と、前記第2の相関値演算手段によ
り最高相関値が得られるときの前記ウインドウ範囲のシ
フト量との差を求める手段を有し、前記第2の相関値演
算手段は、前記求めた差のシフト量の分だけ前記所定の
範囲を越えて追加の相関値演算を行うことを特徴として
いる。
As described in claim 6, the shift amount of the window range when the maximum correlation value is obtained by the first correlation value calculating means and the maximum correlation value by the second correlation value calculating means are The second correlation value calculating means has means for obtaining a difference from the shift amount of the window range when it is obtained, and the second correlation value computing means exceeds the predetermined range by an additional correlation amount by the shift amount of the obtained difference. It is characterized by performing value calculation.

【0015】請求項7に示すように、前記測距対象物距
離算出手段は、前記第2の相関値演算手段により得られ
た相関値のうちの最高相関値と、その前後の前記所定の
範囲の相関値とに基づいて補間値演算によって真の最高
相関値が得られるシフト量を求め、該シフト量に基づい
て測距対象物距離を算出することを特徴としている。
According to a seventh aspect of the present invention, the distance measuring object distance calculating means has the highest correlation value among the correlation values obtained by the second correlation value calculating means and the predetermined range before and after the highest correlation value. It is characterized in that the shift amount for obtaining the true highest correlation value is obtained by the interpolating value calculation based on the correlation value and the distance measurement target distance is calculated based on the shift amount.

【0016】前記第2の相関値演算手段により得られる
最高相関値は、離散的な相関値のなかの最高相関値であ
るが、請求項7によれば、離散的でない真の最高相関値
のシフト量を求めることができる。尚、請求項6は、前
記補間値演算によって真の最高相関値を求める際に、補
間値演算に使用する相関値が不足しないようにしてい
る。
The highest correlation value obtained by the second correlation value calculating means is the highest correlation value among the discrete correlation values, but according to the seventh aspect, the true highest correlation value that is not discrete is calculated. The shift amount can be calculated. According to the sixth aspect, when the true maximum correlation value is calculated by the interpolation value calculation, the correlation value used for the interpolation value calculation is not insufficient.

【0017】請求項8に示すように、前記AFデータ取
得手段によって取得された一対のAFデータのコントラ
ストが所定の基準よりも高いか低いかを判定するコント
ラスト判定手段と、前記一対の採用センサ範囲内におい
て、相関値演算に使用する一対のAFデータを取得する
ための一対のウインドウ範囲を決定し、該一対のウイン
ドウ範囲を前記一対の採用センサ範囲内の最高相関を得
るためにシフトさせながら順次相関値演算する第3の相
関値演算手段であって、前記一対のウインドウ範囲内の
AFデータのうちの所定間隔置きのAFデータを用いて
相関値演算する第3の相関値演算手段と、前記第3の相
関値演算手段により得られた相関値のうちの最高相関値
が得られたときの前記ウインドウ範囲のシフト量を基準
とする前後の所定の範囲内で、前記一対のウインドウ範
囲をシフトさせながら順次相関値演算する第4の相関値
演算手段であって、前記一対のウインドウ範囲内の全て
のAFデータを用いて相関値演算する第4の相関値演算
手段と、前記コントラスト判定手段によって前記一対の
AFデータのコントラストが高いと判定された場合に
は、前記第3の相関値演算手段及び第4の相関値演算手
段による相関値演算を選択実行させ、前記コントラスト
判定手段によって前記一対のAFデータのコントラスト
が低いと判定された場合には、前記第1の相関値演算手
段及び第2の相関値演算手段による相関値演算を選択実
行させる相関値演算選択手段を備え、前記測距対象物距
離算出手段は、前記相関値演算選択手段により選択実行
された前記第2の相関値演算手段又は第4の相関値演算
手段により得られた相関値のうち最高相関値が得られた
ときの前記ウインドウ範囲のシフト量に基づいて測距対
象物の距離を算出することを特徴としている。
As described in claim 8, contrast determination means for determining whether the contrast of the pair of AF data acquired by the AF data acquisition means is higher or lower than a predetermined reference, and the pair of adopted sensor ranges. In which a pair of window ranges for obtaining a pair of AF data used for correlation value calculation are determined, and the pair of window ranges are sequentially shifted while obtaining the highest correlation within the pair of adopted sensor ranges. Third correlation value calculating means for calculating a correlation value, the third correlation value calculating means for calculating a correlation value using AF data at predetermined intervals of the AF data in the pair of window ranges; A predetermined value before and after the reference is based on the shift amount of the window range when the highest correlation value among the correlation values obtained by the third correlation value calculation means is obtained. It is a fourth correlation value calculating means for sequentially calculating a correlation value while shifting the pair of window ranges within the range, and a fourth correlation value calculating means for calculating a correlation value using all the AF data within the pair of window ranges. When the correlation value calculation means and the contrast determination means determine that the contrast of the pair of AF data is high, the correlation value calculation by the third correlation value calculation means and the fourth correlation value calculation means is selected. When the contrast determination means determines that the contrast of the pair of AF data is low, the correlation value calculation is selectively performed by the first correlation value calculation means and the second correlation value calculation means. A distance calculation object distance calculation means, wherein the distance measurement object distance calculation means is the second correlation value calculation means selected and executed by the correlation value calculation selection means or It is characterized by calculating the distance measuring object on the basis of the shift amount of the window range when the maximum correlation value is obtained among the correlation values obtained by the correlation value calculation means 4.

【0018】即ち、測距精度を低下させずに測距時間を
短縮する手段として、請求項1に記載の手段の他に、ウ
インドウ範囲内のAFデータのうち所定間隔置きのAF
データを用いて相関値演算を行い(第3の相関値演算手
段)、測距時間の短縮を図り、次いで、第3の相関値演
算手段によって算出された相関値のうち最高相関値が得
られるときのウインドウ範囲のシフト量を基準とする前
後の所定範囲でウインドウ範囲内の全てのAFデータを
用いた相関値演算を行い(第4の相関値演算手段)、こ
れによって求めた相関値から最高相関値が得られるとき
のシフト量を検出し、そのシフト量に基づいて測距対象
物の距離を求めることにより測距精度の低下を防止す
る、という演算手段が考えられる。この第3及び第4の
相関値演算手段は、AFデータのコントラストが高い場
合には有効であるが、コントラストが低いと誤測距とな
る可能性が高くなるため、AFデータのコントラストが
高い場合には、第3及び第4の相関値演算手段を用い、
一方、AFデータのコントラストが低い場合には、第1
及び第2の相関値演算手段を用いて相関値演算を行うも
のとする。
That is, as means for shortening the distance measuring time without lowering the distance measuring accuracy, in addition to the means described in claim 1, AF data at a predetermined interval among AF data within the window range is used.
A correlation value calculation is performed using the data (third correlation value calculation means) to shorten the distance measuring time, and then the highest correlation value among the correlation values calculated by the third correlation value calculation means is obtained. The correlation value calculation is performed using all the AF data within the window range within a predetermined range before and after the shift amount of the window range as a reference (fourth correlation value calculation means), and the correlation value obtained from this is the highest. It is possible to consider a calculation unit that detects the shift amount when the correlation value is obtained and obtains the distance to the distance measurement target based on the shift amount to prevent the distance measurement accuracy from decreasing. The third and fourth correlation value calculation means are effective when the contrast of the AF data is high, but when the contrast is low, the possibility of erroneous distance measurement increases. Therefore, when the contrast of the AF data is high. For the third and fourth correlation value calculating means,
On the other hand, if the contrast of the AF data is low, the first
Also, the correlation value calculation is performed using the second correlation value calculation means.

【0019】請求項9に示すように前記一対の採用セン
サ範囲は、前記一対のラインセンサの全測距エリアのセ
ンサ、又は前記一対のラインセンサの全測距エリアを複
数の分割エリアに分割した各分割エリアのセンサであ
る。後者の場合には、ある採用センサでの測距が不能と
なる場合でも、他の採用センサでの測距が可能となる場
合がある。
According to a ninth aspect of the present invention, the pair of adopted sensor ranges is a sensor in the total distance measuring area of the pair of line sensors, or the total distance measuring area of the pair of line sensors is divided into a plurality of divided areas. A sensor for each divided area. In the latter case, even when the distance measurement by a certain adopted sensor becomes impossible, the distance measurement by another adopted sensor may be possible.

【0020】[0020]

【発明の実施の形態】以下添付図面に従って、本発明に
係る測距装置を例えばカメラに適用した場合の好ましい
実施の形態について詳説する。
BEST MODE FOR CARRYING OUT THE INVENTION Preferred embodiments of the distance measuring apparatus according to the present invention applied to, for example, a camera will be described below in detail with reference to the accompanying drawings.

【0021】図1は、本発明が適用されたカメラの正面
斜視図である。同図に示すようにカメラ10には、被写
体像を銀塩フイルムに結像する撮影レンズを備えたズー
ムレンズ鏡胴12と、ストロボ光が発光されるストロボ
発光窓16と、撮影者が被写体を確認するファインダ窓
18と、被写体距離を測定するパッシブタイプのAFセ
ンサが内蔵されているAF窓22と、被写体の明るさを
測定する測光センサが内蔵されている測光窓25と、撮
影者がシャッタレリーズを指示する際に操作するシャッ
タボタン34等が設けられている。
FIG. 1 is a front perspective view of a camera to which the present invention is applied. As shown in the figure, the camera 10 includes a zoom lens barrel 12 having a photographing lens for forming a subject image on a silver salt film, a strobe light emitting window 16 for emitting strobe light, and a photographer for confirming the subject. A finder window 18 for confirmation, an AF window 22 having a built-in passive type AF sensor for measuring the subject distance, a photometric window 25 having a photometric sensor for measuring the brightness of the subject, and a shutter for the photographer. A shutter button 34 or the like that is operated when instructing a release is provided.

【0022】図2は、カメラ10の背面斜視図である。
同図に示すようにカメラ10には、設定されている撮影
モード等や日付情報等を表示するLCD表示パネル38
と、ストロボの発光モードを設定するフラッシュボタン
42と、セルフタイマーのモードを設定するセルフタイ
マーボタン44と、フォーカスのモードを設定するフォ
ーカスボタン46と、日付や時刻を設定する日付ボタン
48と、撮影画角をワイド方向又はテレ方向に指示する
ズームボタン50とが設けられている。
FIG. 2 is a rear perspective view of the camera 10.
As shown in the figure, the camera 10 has an LCD display panel 38 for displaying the set shooting mode and date information.
A flash button 42 for setting the flash firing mode, a self-timer button 44 for setting the self-timer mode, a focus button 46 for setting the focus mode, a date button 48 for setting the date and time, and shooting. A zoom button 50 for indicating the angle of view in the wide direction or the tele direction is provided.

【0023】例えば、フラッシュボタン42を操作する
と、フラッシュ(ストロボ)に関するモードを切り替え
ることができ、フラッシュボタン42で選択可能なモー
ドとして、被写体が暗い場合にストロボ光を自動発光す
るオートモード、本発光前にプレ発光を行い赤目を軽減
する赤目軽減モード、ストロボ光を強制発光する強制発
光モード、ストロボを発光しない発光禁止モード、スト
ロボを発光して人物と夜景とを撮影する夜景ポートレー
トモード等がある。また、フォーカスボタン46を操作
すると、フォーカスに関するモードを切り替えることが
でき、フォーカスボタン46で選択可能なモードとし
て、自動でピント合わせを行うオートフォーカスモー
ド、遠景を撮影するための遠景モード、マクロ撮影のた
めのマクロモード等のモードがある。
For example, when the flash button 42 is operated, a mode related to the flash (strobe) can be switched. As a mode selectable with the flash button 42, an auto mode in which a strobe light is automatically emitted when a subject is dark, and a main emission is performed. Red-eye reduction mode to reduce red-eye by performing pre-flash before, forced-flash mode to forcibly discharge strobe light, flash-off mode without flash, and night-view portrait mode to shoot person and night scene by flash is there. Further, when the focus button 46 is operated, a mode related to focus can be switched. As modes selectable by the focus button 46, there are an auto focus mode for automatically focusing, a distant view mode for shooting a distant view, and a macro shooting mode. There are modes such as macro mode for.

【0024】図3は、上記カメラ10の制御部を示した
ブロック図である。同図に示すようにカメラ10には、
カメラ10の全体を制御するCPU60(情報処理手
段)が設けられており、以下に示す各部から情報を取得
するとともに、CPU60からの指示によって以下に示
す各部を制御することが可能となっている。尚、図3に
示すCPU60は、CPUコア部とI/O、ウォッチド
グタイマ、A/D変換器等の周辺回路から構成されるA
SICであってもよい。
FIG. 3 is a block diagram showing the control unit of the camera 10. As shown in FIG.
A CPU 60 (information processing means) that controls the entire camera 10 is provided, and it is possible to acquire information from the following units and control the following units according to instructions from the CPU 60. The CPU 60 shown in FIG. 3 is an A composed of a CPU core unit and peripheral circuits such as an I / O, a watchdog timer, and an A / D converter.
It may be a SIC.

【0025】また、同図に示すようにカメラ10には、
電池の電圧を昇圧させるとともに安定化させてCPU6
0及びその他の各周辺回路に電源を供給するレギュレー
タ62と、ズームレンズ鏡胴12をモータ駆動してズー
ム位置やフォーカス位置を変更するとともにズーム位置
やフォーカス位置の位置情報をCPU60に出力する鏡
胴駆動部64と、フイルム給送モータを駆動してフイル
ムを給送するフイルム給送駆動部66とが設けられてい
る。
Further, as shown in FIG.
CPU6 boosts and stabilizes the battery voltage
0 and other peripheral circuits for supplying power to the peripheral circuits, and a lens barrel for driving the zoom lens barrel 12 by a motor to change the zoom position and the focus position and outputting position information of the zoom position and the focus position to the CPU 60. A drive unit 64 and a film feeding drive unit 66 that drives the film feeding motor to feed the film are provided.

【0026】またカメラ10には、露光時にシャッタを
開閉してフイルムを露光するシャッタ駆動部68と、図
1の測光窓25を介して取り込んだ外光に基づいて被写
体の光量を測定する測光センサ70と、メインコンデン
サを充電し、また、メイコンデンサに充電した発光エネ
ルギーによりストロボを発光させるストロボ装置72
と、図1のAF窓22から取り込んだ被写体光からオー
トフォーカスにおける測距に必要なデータを取得するパ
ッシブタイプのAFセンサ74とが設けられている。
Further, the camera 10 has a shutter drive unit 68 for opening and closing the shutter to expose the film at the time of exposure, and a photometric sensor for measuring the light quantity of the object based on the external light taken in through the photometric window 25 of FIG. 70, and a strobe device 72 that charges the main capacitor and also causes the strobe to emit light by the light emission energy charged in the main capacitor.
And a passive-type AF sensor 74 that acquires data necessary for distance measurement in autofocus from the subject light captured from the AF window 22 in FIG.

【0027】またカメラ10には、カメラ10の制御に
関するパラメータやデータ、処理プログラム、測距に関
する情報等の各種情報を書き換え自在に記録するプログ
ラマブルROM82(EEPROM等の記録手段)と、
CPU60からの指示に基づいてLCD表示パネル38
に対して各モードに応じた図形、文字、数字等を表示す
るための信号を出力するLCD駆動部84とが設けられ
ている。
In the camera 10, a programmable ROM 82 (recording means such as EEPROM) for rewritably recording various information such as parameters and data relating to control of the camera 10, processing programs, information relating to distance measurement, and the like,
The LCD display panel 38 based on the instruction from the CPU 60
On the other hand, an LCD drive unit 84 for outputting a signal for displaying a figure, a character, a number or the like according to each mode is provided.

【0028】図2に示したシャッタボタン34、フラッ
シュボタン42、セルフタイマーボタン44、フォーカ
スボタン46、日付ボタン48、ズームボタン50等の
各種ボタンの操作は各ボタンに対応して設けられたスイ
ッチからのオン/オフ信号としてCPU60に与えられ
る。これらのスイッチは、図3においてスイッチ部86
として示されている。尚、シャッタボタン34について
は半押しの状態(SP1がONの状態)と全押しの状態
(SP2がONの状態)とが区別して検出される。
Various buttons such as the shutter button 34, the flash button 42, the self-timer button 44, the focus button 46, the date button 48 and the zoom button 50 shown in FIG. 2 are operated by the switches provided corresponding to the respective buttons. Is given to the CPU 60 as an ON / OFF signal. These switches are shown in FIG.
As shown. Regarding the shutter button 34, a half-pressed state (SP1 is ON) and a full-pressed state (SP2 is ON) are detected separately.

【0029】尚、図3に示すドライバ88は、CPU6
0からの指令に基づいて鏡胴駆動部64に設けられてい
るズーム駆動モータやフォーカス駆動モータを制御し、
フイルム給送駆動部66に設けられているフイルム給送
モータを駆動することが可能となっている。また、ドラ
イバ88は、CPU60からの指令に基づいて基準電圧
や駆動電力をA/D変換回路や測光センサ70に出力す
ることが可能となっている。また、ドライバ88は、C
PU60からの指令に基づいてフイルム露光時に開閉す
るシャッタの制御信号をシャッタ駆動部68に出力する
とともに、ストロボの発光/停止を指示する信号をスト
ロボ装置72に出力することが可能となっている。
The driver 88 shown in FIG.
The zoom drive motor and the focus drive motor provided in the lens barrel drive unit 64 are controlled based on a command from 0,
It is possible to drive the film feeding motor provided in the film feeding driving unit 66. Further, the driver 88 can output the reference voltage and the driving power to the A / D conversion circuit and the photometric sensor 70 based on the command from the CPU 60. Further, the driver 88 is C
Based on a command from the PU 60, it is possible to output to the shutter drive unit 68 a control signal for the shutter that opens and closes during film exposure, and to output to the strobe device 72 a signal for instructing the strobe light emission / stop.

【0030】図4は、パッシブ方式によるAFセンサ7
4の構成を示した図である。同図に示すようにAFセン
サ74には、例えば白と黒の2つの色から構成されてい
る被写体90の像を左右の各センサの受光面に結像する
レンズ92と、受光面に結像した像を光電変換して輝度
信号として出力する右側のR(右)センサ94及び左側
のL(左)センサ96と、CPU60と間で各種データ
の送受信を行うとともにRセンサ94及びLセンサ96
の制御とデータ処理を行う処理回路99とが設けられて
いる。尚、Rセンサ94、Lセンサ96、及び、処理回
路99は、例えば、同一基板上に実装される。
FIG. 4 shows a passive type AF sensor 7.
4 is a diagram showing a configuration of No. 4 of FIG. As shown in the figure, in the AF sensor 74, for example, a lens 92 for forming an image of a subject 90 composed of two colors of white and black on the light receiving surfaces of the left and right sensors, and an image on the light receiving surface. The R sensor 94 and the L sensor 96 are used for transmitting and receiving various data between the CPU 60 and the R (right) sensor 94 on the right side and the L (left) sensor 96 on the left side for photoelectrically converting the formed image and outputting it as a luminance signal.
There is provided a processing circuit 99 for controlling the above and data processing. The R sensor 94, the L sensor 96, and the processing circuit 99 are mounted on the same board, for example.

【0031】Rセンサ94及びLセンサ96は例えばC
MOSラインセンサであり、直線上に配列された複数の
セル(受光素子)から構成される。尚、Rセンサ94と
Lセンサ96のそれぞれのセルには図中左側から順にセ
ンサ番号1、2、3…233、234が付されるものと
する。ただし、Rセンサ94及びLセンサ96の左右両
側の5つずつのセルは、ダミーのセルとして実際には使
用されていないため、有効なセンサ領域は、センサ番号
6から229までとなっている。これらのRセンサ94
及びLセンサ96の各セルからは受光した光量に応じた
輝度信号がセンサ番号と関連付けて処理回路99に順次
出力される。
The R sensor 94 and the L sensor 96 are, for example, C
It is a MOS line sensor and is composed of a plurality of cells (light receiving elements) arranged in a straight line. It should be noted that sensor numbers 1, 2, 3, ... 233, 234 are assigned to the cells of the R sensor 94 and the L sensor 96 in order from the left side in the drawing. However, since the five cells on the left and right sides of the R sensor 94 and the L sensor 96 are not actually used as dummy cells, the effective sensor areas are sensor numbers 6 to 229. These R sensors 94
From each cell of the L sensor 96, a luminance signal corresponding to the amount of received light is sequentially output to the processing circuit 99 in association with the sensor number.

【0032】処理回路99は、CPU60から指示信号
によってAFセンサ74の動作状態と非動作状態の切替
えを行い、動作状態においてCPU60から動作内容に
関する制御データを取得すると、その制御データに基づ
いて積分処理等の処理を開始する。詳細は後述するが積
分処理は各Rセンサ94及びLセンサ96から得た各セ
ルの輝度信号を各セル毎に積分(加算)し、各セル毎の
輝度信号の積分値(光量の積分値)を生成する処理であ
る。尚、各セル毎の輝度信号の積分値を示す値としてA
Fセンサ74の受光セルから出力されるデータをセンサ
データというものとすると、処理回路99がセンサデー
タとして実際に生成する値は、各セルの輝度信号の積分
値を所定の基準値(基準電圧VREF)から減算した値
であり、以下の説明においてセンサデータという場合に
は、この値をいうものとする。従って、センサデータは
受光した光量が多い程、低い値を示す。但し、AFセン
サ74から出力されるセンサデータは、各セルからの出
力を各セルごとに積分した信号に基づく値であって、A
Fセンサ74で撮像した被写体の特徴を示すデータ(例
えば、被写体のコントラストを示すデータ)であれば、
少なくとも以下で説明する処理を同様に適用できる。ま
た、以下の説明において、単に積分又は積分処理という
場合にはセンサデータ(輝度信号の積分値)を得るため
の積分又は積分処理を示すものとする。
The processing circuit 99 switches the operating state and the non-operating state of the AF sensor 74 in response to an instruction signal from the CPU 60. When control data concerning the operation content is acquired from the CPU 60 in the operating state, the integration processing is performed based on the control data. Etc. start processing. Although details will be described later, the integration process integrates (adds) the brightness signals of the cells obtained from the R sensor 94 and the L sensor 96 for each cell, and integrates the brightness signal of each cell (integrated value of light amount). Is a process for generating. In addition, as a value indicating the integrated value of the luminance signal of each cell, A
When the data output from the light receiving cell of the F sensor 74 is referred to as sensor data, the value actually generated as the sensor data by the processing circuit 99 is a predetermined reference value (reference voltage VREF) that is the integrated value of the luminance signal of each cell. ), And when referred to as sensor data in the following description, this value is referred to. Therefore, the sensor data shows a lower value as the received light amount is larger. However, the sensor data output from the AF sensor 74 is a value based on a signal obtained by integrating the output from each cell for each cell.
If the data indicates the characteristics of the subject captured by the F sensor 74 (for example, the data indicating the contrast of the subject),
At least the processing described below can be similarly applied. Further, in the following description, when simply referred to as integration or integration processing, integration or integration processing for obtaining sensor data (integrated value of luminance signal) is shown.

【0033】また、積分処理は、例えば、Rセンサ94
とLセンサ96のそれぞれのセンサ領域内(有効なセル
内)のうちCPU60によって指定された後述するピー
ク選択領域内のいずれかのセルのセンサデータが所定の
積分終了値に達すると、即ち、ピーク選択領域内のセン
サデータのピーク値(最小値)が積分終了値に達する
と、測距を行うのに十分なセンサデータが得られたと判
断して終了する。このとき、処理回路99は、CPU6
0に積分終了を示す信号(積分終了信号)を出力する。
尚、上述のようにセンサデータのピーク値が積分終了値
に達した場合をAFセンサ74における積分終了条件と
するのではなく、例えば、ピーク選択領域内におけるセ
ンサデータの平均値が所定値に達した場合を積分終了条
件としてもよく、また、他の条件を積分終了条件として
もよい。
The integration process is performed by, for example, the R sensor 94.
When the sensor data of any of the cells within the peak selection area, which will be described later, designated by the CPU 60 within the respective sensor areas (in the valid cells) of the L sensor and the L sensor 96 reaches a predetermined integration end value, that is, the peak When the peak value (minimum value) of the sensor data in the selected area reaches the integration end value, it is determined that sufficient sensor data for distance measurement has been obtained, and the process ends. At this time, the processing circuit 99 causes the CPU 6
A signal indicating the end of integration (an integration end signal) is output to 0.
Note that the case where the peak value of the sensor data reaches the integration end value as described above is not used as the integration end condition in the AF sensor 74, but, for example, the average value of the sensor data in the peak selection area reaches a predetermined value. If so, the integration end condition may be used, or another condition may be used as the integration end condition.

【0034】CPU60は、積分終了信号を受けて処理
回路99から積分処理によって得られた各セルのセンサ
データをセンサ番号と対応付けて取得する。これによっ
て、CPU60はRセンサ94及びLセンサ96で撮像
された画像(以下、センサ像という)を認識する。そし
て、詳細を後述するようにRセンサ94とLセンサ96
のそれぞれのセンサ像の間(又は、センサ像のコントラ
スト抽出処理を実施した後)で相関値演算を行い、相関
が最も高くなるときのセンサ像のズレ量を求め、被写体
90までの距離を算出する(三角測量の原理)。図5、
図6は、それぞれAFセンサ74から被写体90までの
距離が近い場合と遠い場合のセンサ像(センサデータ)
を例示した図である。被写体90までの距離が近い場
合、図5に示すようにLセンサ96のセンサ番号87〜
101までのセンサデータは明るい値(50)となり、
センサ番号101〜150までは暗い値(200)とな
る。Rセンサ94についてはLセンサ96と異なる位置
に設けられているため、センサ番号85〜133までの
センサデータは明るい値(50)となり、センサ番号1
33〜148までは暗い値(200)となる。
The CPU 60 receives the integration end signal and acquires the sensor data of each cell obtained by the integration processing from the processing circuit 99 in association with the sensor number. As a result, the CPU 60 recognizes an image captured by the R sensor 94 and the L sensor 96 (hereinafter referred to as a sensor image). Then, as will be described later in detail, the R sensor 94 and the L sensor 96
Correlation value calculation is performed between the respective sensor images (or after performing the contrast extraction processing of the sensor image), the shift amount of the sensor image when the correlation becomes the highest is calculated, and the distance to the subject 90 is calculated. Yes (principle of triangulation). Figure 5,
FIG. 6 shows sensor images (sensor data) when the distance from the AF sensor 74 to the subject 90 is short and when they are far.
It is the figure which illustrated. When the distance to the subject 90 is short, as shown in FIG.
The sensor data up to 101 becomes a bright value (50),
The sensor numbers 101 to 150 have dark values (200). Since the R sensor 94 is provided at a position different from the L sensor 96, the sensor data of the sensor numbers 85 to 133 has a bright value (50), and the sensor number 1
From 33 to 148, the value is dark (200).

【0035】これに対して、被写体90までの距離が遠
い場合(例えば略無限遠の場合)には、図6に示すよう
に、Lセンサ96のセンサ番号87〜117までのセン
サデータは明るい値(50)となり、センサ番号118
〜150までは暗い値(200)となる。一方、Rセン
サ94は、Lセンサ96とは異なる位置に設けられてい
るものの被写体位置が遠距離に存在するために、センサ
番号85〜116までのセンサデータは明るい値(5
0)となり、センサ番号117〜148までは暗い値
(200)となる。この場合にCPU60は、Rセンサ
94とLセンサ96のセンサ像のズレ量がほとんどな
く、被写体が略無限遠に存在すると判断することができ
る。これに対して、図5に示したように被写体が近距離
に存在する場合には、センサ像のズレ量が大きくなる。
On the other hand, when the distance to the subject 90 is long (for example, when the distance is approximately infinity), the sensor data of the sensor numbers 87 to 117 of the L sensor 96 are bright values, as shown in FIG. (50) and sensor number 118
Up to 150, the value is dark (200). On the other hand, the R sensor 94 is provided at a position different from that of the L sensor 96, but since the subject position exists at a long distance, the sensor data of sensor numbers 85 to 116 is a bright value (5
0), and sensor values 117 to 148 have dark values (200). In this case, the CPU 60 can determine that there is almost no deviation between the sensor images of the R sensor 94 and the L sensor 96, and that the subject exists at approximately infinity. On the other hand, when the subject is present at a short distance as shown in FIG. 5, the shift amount of the sensor image becomes large.

【0036】定量的には、被写体距離は、Rセンサ94
とLセンサ96との間隔及び各センサからレンズ92ま
での距離、Rセンサ94及びLセンサ96の各セルのピ
ッチ(例えば12μm)等を考慮して、センサ像のズレ
量から算出することができる。センサ像のズレ量は、R
センサ94とLセンサ96のそれぞれのセンサ像の間で
相関値演算を行うことにより求めることができ、詳細に
ついては後述する。
Quantitatively, the subject distance is determined by the R sensor 94.
And the L sensor 96, the distance from each sensor to the lens 92, the pitch of each cell of the R sensor 94 and the L sensor 96 (for example, 12 μm), and the like can be calculated from the shift amount of the sensor image. . The shift amount of the sensor image is R
It can be obtained by performing a correlation value calculation between the sensor images of the sensor 94 and the L sensor 96, and the details will be described later.

【0037】次に、上記構成のAFセンサ74を使用し
て被写体の距離を測距し、その被写体にピントを合わせ
るAF測距の処理内容について説明する。
Next, the contents of the AF distance measuring process for measuring the distance to the object using the AF sensor 74 having the above-described structure and focusing on the object will be described.

【0038】カメラ10の処理モードを撮像のモードに
設定して利用者がシャッタボタン34を半押しすると、
CPU60はスイッチ部86からシャッタボタン34が
半押しされたことを示すSP1のオン信号を取得する。
SP1のオン信号を取得した場合、CPU60は、被写
体を撮像するために被写体の輝度に応じたAEを設定す
るとともに、被写体を特定してピントを合わせるAF測
距処理を開始する。
When the processing mode of the camera 10 is set to the imaging mode and the user half-presses the shutter button 34,
The CPU 60 obtains the ON signal of SP1 indicating that the shutter button 34 is half-depressed from the switch unit 86.
When the ON signal of SP1 is acquired, the CPU 60 sets the AE according to the brightness of the subject in order to image the subject, and starts the AF distance measurement process in which the subject is specified and the focus is adjusted.

【0039】図7は、上記CPU60におけるAF測距
の処理手順の概要を示すフローチャートである。 [ステップS10(測距エリア設定処理)]撮影レンズ
は、ズームレンズ鏡胴12を駆動することにより焦点距
離を可変できるのに対し、AFセンサ74にセンサ像を
結像させるレンズ92は、固定焦点レンズである。そこ
で、撮影レンズのレンズ位置(画角)に対応して測距エ
リアを変更するようにしている。即ち、撮影レンズがテ
レ位置の場合には、測距エリアを狭くする。
FIG. 7 is a flow chart showing an outline of the processing procedure of AF distance measurement in the CPU 60. [Step S10 (Distance Measurement Area Setting Processing)] The taking lens can change the focal length by driving the zoom lens barrel 12, while the lens 92 for forming a sensor image on the AF sensor 74 has a fixed focus. It is a lens. Therefore, the distance measuring area is changed according to the lens position (angle of view) of the photographing lens. That is, when the taking lens is at the tele position, the distance measuring area is narrowed.

【0040】ここで、図8に示すようにRセンサ94及
びLセンサ96のセンサ領域は、それぞれ5分割したエ
リア単位で相関値演算等の処理が行われ、各エリア毎に
被写体距離が算出されるようになっている。これらの分
割されたエリアを以下分割エリアというものとすると、
分割エリアは、同図に示すように「右エリア」、「右中
エリア」、「中央エリア」、「左中エリア」、「左エリ
ア」から構成される。また、各分割エリアは、隣接する
分割エリアと一部領域(セル)を共有している。相関値
演算等の際には、Rセンサ94とLセンサ96の対応す
る各分割エリア間(同一名の分割エリア間)でそれぞれ
個別に相関値演算が行われることになる。尚、本実施の
形態では分割エリアはセンサ領域を5分割したものであ
るが5分割以外の分割数であってもよい。
Here, as shown in FIG. 8, the sensor areas of the R sensor 94 and the L sensor 96 are subjected to processing such as correlation value calculation in units of five divided areas, and the subject distance is calculated for each area. It has become so. If these divided areas are called divided areas below,
The divided area is composed of "right area", "right middle area", "center area", "left middle area", and "left area" as shown in FIG. Further, each divided area shares a partial area (cell) with an adjacent divided area. When calculating the correlation value, the correlation value is calculated individually between the corresponding divided areas of the R sensor 94 and the L sensor 96 (between divided areas having the same name). In the present embodiment, the divided area is formed by dividing the sensor area into five, but the number of divided areas may be other than five.

【0041】測距エリアは、Rセンサ94とLセンサ9
6のそれぞれのセンサ領域のうち測距に使用する領域で
あり、その領域を決めるのに上記分割エリアが使用され
る。この測距エリア設定処理の詳細について、図9のフ
ローチャートを用いて説明する。
The distance measuring area includes R sensor 94 and L sensor 9
Of the six sensor areas, the areas are used for distance measurement, and the divided areas are used to determine the areas. Details of the distance measurement area setting process will be described with reference to the flowchart of FIG.

【0042】まず、CPU60は、現在設定されている
ズーム位置(画角の設定角度)に関する情報を鏡胴駆動
部64から取得して、現在のズーム位置が所定のズーム
位置よりテレ側かワイド側(テレ以外)かを判定する
(ステップS10A)。例えばズーム可変範囲をZ1〜
Z6の6つの範囲に分けた場合に、現在のズーム位置が
テレ端側の範囲Z6に設定されているときにはテレ側と
判定し、それ以外の範囲Z1〜Z5に設定されていると
きには、テレ以外と判定する。尚、マクロモードに設定
されているときにはテレ以外と判定する。
First, the CPU 60 obtains information about the currently set zoom position (angle of view setting angle) from the lens barrel driving section 64, and the current zoom position is on the tele side or the wide side of the predetermined zoom position. It is determined whether (other than tele) (step S10A). For example, the zoom variable range is Z1
When divided into six ranges of Z6, when the current zoom position is set to the tele end side range Z6, it is determined to be the tele side, and when it is set to the other range Z1 to Z5, it is not the tele range. To determine. When the macro mode is set, it is determined to be other than tele.

【0043】もし、テレ側と判定した場合には、図10
に示すようにRセンサ94及びLセンサ96のセンサ領
域(画角が±6.5°の範囲)のうち、測距に使用する
測距エリアを撮影レンズの画角に対応した範囲(画角が
±3.9°の範囲)に制限する。即ち、テレと判定した
場合には、Rセンサ94及びLセンサ96の全センサ領
域(5エリア)のうちの中央部の「右中エリア」、「中
央エリア」、及び「左中エリア」の3つの分割エリアで
構成される領域を測距エリアとして設定する(3エリ
ア設定)(ステップS10B)。一方、テレ以外と判定
した場合には、「右エリア」、「右中エリア」、「中央
エリア」、「左中エリア」、「左エリア」の5つの分割
エリアで構成される領域を測距エリアとして設定する
(5エリア設定)(ステップS10C)。 [ステップS12(AFデータ取得処理)]ステップS
12では、被写体の明るさに応じてAFデータ(後に記
述)の取得方法を切り替えている。
If it is determined that the tele side,
As shown in (4), in the sensor area of the R sensor 94 and the L sensor 96 (angle of view is ± 6.5 °), the distance measurement area used for distance measurement is the range corresponding to the angle of view of the photographing lens (angle of view). Is within ± 3.9 °). That is, when it is determined to be the tele, the central part “right middle area”, the “center area”, and the “left middle area” among the entire sensor areas (5 areas) of the R sensor 94 and the L sensor 96 are divided into three areas. An area composed of one divided area is set as a distance measuring area (3 area setting) (step S10B). On the other hand, when it is determined that the area is other than tele, the area including the five divided areas of “right area”, “middle right area”, “center area”, “middle left area”, and “left area” is measured. The area is set (5 areas are set) (step S10C). [Step S12 (AF data acquisition process)] Step S
In 12, the acquisition method of AF data (described later) is switched according to the brightness of the subject.

【0044】即ち、被写体の輝度が超高輝度又は高輝度
の場合には、AFセンサ74のセンサ感度(輝度信号の
ゲイン)を低感度に設定し、かつ測距エリアが3エリア
設定の場合には、測距エリア(図10の領域参照)を
構成する「中央エリア」、「左中エリア」、及び「右中
エリア」における積分処理を個別に行い、測距エリアが
5エリア設定の場合には、測距エリア(図10の領域
参照)を構成する「中央エリア」、「左中及び左エリ
ア」、及び「右中及び右エリア」における積分処理を個
別に行う。尚、「左中及び左エリア」は「左中エリア」
及び「左エリア」から構成される領域を示し、「右中及
び右エリア」は「右中エリア」及び「右エリア」から構
成される領域を示す。また、AFセンサ74のセンサ感
度は、高感度と低感度の2段階に切り替えることができ
るようになっている。
That is, when the brightness of the subject is extremely high or high, the sensor sensitivity (gain of the brightness signal) of the AF sensor 74 is set to low sensitivity and the distance measuring area is set to 3 areas. In the case where the distance measurement area is set to 5 areas, the integration processing is individually performed in the “center area”, the “left middle area”, and the “right middle area” that configure the distance measurement area (see the area in FIG. 10). Performs the integration processing individually in the "center area", "left middle and left area", and "right middle and right area" that constitute the distance measurement area (see the area in FIG. 10). In addition, "left middle and left area" is "left middle area"
And "left area", and "middle right and right area" indicate an area composed of "middle right area" and "right area". Further, the sensor sensitivity of the AF sensor 74 can be switched between two levels of high sensitivity and low sensitivity.

【0045】ここで、上記測距エリアを構成する「中央
エリア」、「左中エリア」(又は「左中及び左エリ
ア」)、及び「右中エリア」(又は「右中及び右エリ
ア」)における積分処理を個別に行うとは、「中央エリ
ア」内のいずれかのセンサデータが積分終了値に達する
と、その「中央エリア」のセンサデータを取得し、続い
てセンサデータをリセットして積分を開始し、「左中エ
リア」(又は「左中及び左エリア」)内のいずれかのセ
ルのセンサデータが積分終了値に達すると、その「左中
エリア」(又は「左中及び左エリア」)のセンサデータ
を取得し、次にセンサデータをリセットして積分を開始
し、「右中エリア」(又は「右中及び右エリア」)内の
いずれかのセルのセンサデータが積分終了値に達する
と、その「右中エリア」(又は「右中及び右エリア」)
のセンサデータを取得することをいう。このようにし
て、複数の領域の積分処理を個別に行うことにより、い
ずれかの領域に高輝度のライトなどが入射し、その領域
のセンサデータが不適当な場合でも他の領域から有効な
センサデータを取得することができる。例えば、測距エ
リアが5エリア設定の場合において、測距エリア内に図
11(A)、(B)に示すような主要被写体である人物
と、人物後方の高輝度のライトが存在するものとする。
このとき、例えば、測距エリアの全領域を選択領域(ピ
ーク選択領域)として積分処理を行うと、図11(A)
に示すように高輝度のライトに対応する右エリアにおけ
るセンサデータの信号レベルが適切なものとなり、主要
被写体である人物に対応する中央エリアにおけるセンサ
データの信号レベルが小さくなる。このため、各分割エ
リアごとに被写体距離を求めようとすると、中央エリア
に関しては測距不能と判断され、結果的に後方のライト
に合焦してしまう不具合が生じる。これに対して、上述
のように測距エリアを複数の領域に分けて個別に積分処
理を行うと、図11(B)に示すように中央エリアの積
分処理において主要被写体である人物に対応するのセン
サデータの信号レベルが適切なものとなり、結果的に人
物に合焦させることができるようになる。
Here, the "center area", "left middle area" (or "left middle and left area"), and "right middle area" (or "right middle and right area") which constitute the distance measuring area In the case of performing the integration processing separately in, when any sensor data in the "central area" reaches the integration end value, the sensor data in the "central area" is acquired, and then the sensor data is reset and integrated. When the sensor data of any cell in the "left middle area" (or "left middle and left area") reaches the integration end value, the "left middle area" (or "left middle and left area") is started. )) Sensor data, then reset the sensor data and start integration, and the sensor data of any cell in the “right middle area” (or “right middle and right area”) is the integration end value. When you reach the "right middle area" ( The "right and in the right area")
It means to acquire the sensor data of. In this way, by individually performing the integration processing of multiple areas, even if a high-intensity light enters one of the areas and the sensor data in that area is inadequate, the effective sensor from other areas Data can be acquired. For example, when the distance measuring area is set to 5 areas, it is assumed that a person who is a main subject as shown in FIGS. 11A and 11B and a high-intensity light behind the person exist in the distance measuring area. To do.
At this time, for example, when the integration processing is performed with the entire area of the distance measurement area as the selection area (peak selection area), FIG.
As shown in, the signal level of the sensor data in the right area corresponding to the high-intensity light becomes appropriate, and the signal level of the sensor data in the central area corresponding to the person who is the main subject becomes small. Therefore, if the subject distance is to be obtained for each divided area, it is determined that distance measurement cannot be performed for the central area, and as a result, the rear light is focused. On the other hand, when the distance measurement area is divided into a plurality of areas and the integration processing is individually performed as described above, as shown in FIG. 11B, it corresponds to the person who is the main subject in the integration processing of the central area. The signal level of the sensor data becomes appropriate, and as a result, the person can be focused.

【0046】また、被写体の輝度が中輝度の場合には、
AFセンサ74のセンサ感度を低感度に設定し、かつ3
エリア設定又は5エリア設定された測距エリアにおける
積分処理を一括して行う。例えば、3エリア設定の場合
には、測距エリア(図10の領域参照)を構成する
「中央エリア」、「左中エリア」、及び「右中エリア」
の積分処理を同時に行い、これらの「中央エリア」、
「左中エリア」、及び「右中エリア」内のいずれかのセ
ルのセンサデータが積分終了値に達すると、「中央エリ
ア」、「左中エリア」、及び「右中エリア」のセンサデ
ータを一括して取得する。
If the brightness of the subject is medium,
The sensor sensitivity of the AF sensor 74 is set to low sensitivity, and 3
Integral processing is collectively performed in the range-finding areas in which the areas are set or five areas are set. For example, in the case of setting three areas, a "center area", a "left center area", and a "right center area" that configure a distance measurement area (see the area in FIG. 10).
The integration processing of
When the sensor data of one of the cells in the "left middle area" and the "right middle area" reaches the integration end value, the sensor data of the "center area", "left middle area", and "right middle area" are collected. Get in bulk.

【0047】更に、被写体の輝度が低輝度の場合には、
AFセンサ74のセンサ感度を高感度に設定し、かつ3
エリア設定又は5エリア設定された測距エリアにおける
積分処理を一括して行う。尚、積分時間が所定の時間経
過しても測距エリア内のセルのセンサデータが積分終了
値に達しない場合には、積分を終了させた後、AFセン
サ74のセンサ感度を低感度に切り替えて積分を開始す
ると共に、オートフォーカス用の補助光をストロボ装置
72から発光させる(AFプレ発光)。この場合には、
3エリア設定又は5エリア設定された測距エリアにおけ
る積分処理を一括して行う。
Further, when the brightness of the subject is low,
The sensor sensitivity of the AF sensor 74 is set to high sensitivity, and 3
Integral processing is collectively performed in the range-finding areas in which the areas are set or five areas are set. If the sensor data of the cell in the distance measurement area does not reach the integration end value even after the integration time reaches a predetermined time, the sensor sensitivity of the AF sensor 74 is switched to a low sensitivity after the integration is completed. Then, integration is started and auxiliary light for autofocus is emitted from the strobe device 72 (AF pre-emission). In this case,
Integral processing is collectively performed in the distance measurement areas set in 3 areas or 5 areas.

【0048】尚、ここでは、AFセンサ74の受光セル
より出力されるデータをセンサデータとしており、下記
コントラスト検出処理1以降に使用される画像データと
しては、センサデータ自体とする場合の他に、センサデ
ータにコントラスト抽出処理等を施したものとする場合
もあるため、コントラスト検出処理1以降の処理では、
センサデータをそのまま処理に用いたもの、及び、セン
サデータにコントラスト抽出処理等を施したものを総称
してAFデータと記載する。 [ステップS14(コントラスト検出処理1)]ステッ
プS14では、ステップS12で取得したAFデータが
測距に必要なコントラストがあるか否かを判定する。そ
して、AFデータが測距に必要なコントラストがないと
判定(低コントラスト判定)されると、測距不能とす
る。
Here, the data output from the light receiving cell of the AF sensor 74 is used as the sensor data, and the image data used after the following contrast detection processing 1 is not limited to the sensor data itself. In some cases, the sensor data may be subjected to contrast extraction processing, etc., so in the processing after the contrast detection processing 1,
AF data is used as a general term for data obtained by directly using sensor data for processing and data obtained by subjecting sensor data to contrast extraction processing. [Step S14 (Contrast Detection Processing 1)] In step S14, it is determined whether or not the AF data acquired in step S12 has a contrast necessary for distance measurement. When it is determined that the AF data does not have the contrast necessary for distance measurement (low contrast determination), distance measurement is impossible.

【0049】ここで、ステップS10の測距エリア設定
処理において、測距エリアとして3エリア設定がされて
いる場合には、右中エリア、中央エリア、及び左中エリ
アの各分割エリアごとに上記コントラスト判定を行い、
低コントラスト判定された分割エリアのAFデータを使
用した相関値演算等の処理は行わないようにしている。
同様に、測距エリアとして5エリア設定がされている場
合には、右エリア、右中エリア、中央エリア、左中エリ
ア、左エリアの各分割エリアごとに上記コントラスト判
定を行い、低コントラスト判定された分割エリアのAF
データを使用した相関値演算等の処理は行わないように
している。 [ステップS16(相関値演算処理)]ステップS16
では、AFセンサ74のRセンサ94及びLセンサ96
からそれぞれ取り込んだセンサ像(AFデータ)の間で
相関値演算を行い、相関が最も高くなるときのセンサ像
のズレ量(左右のAFデータ間のシフト量)を求める。
この左右のAFデータ間のシフト量から被写体の距離を
求めることができる。
Here, in the distance measuring area setting process of step S10, when three areas are set as the distance measuring areas, the contrast is set for each of the divided areas of the right middle area, the center area, and the left middle area. Make a decision,
The processing such as the correlation value calculation using the AF data of the divided area determined to have the low contrast is not performed.
Similarly, when 5 areas are set as the distance measuring areas, the contrast determination is performed for each of the divided areas of the right area, the right middle area, the central area, the left middle area, and the left area, and the low contrast is determined. AF of divided areas
The processing such as correlation value calculation using data is not performed. [Step S16 (Correlation Value Calculation Processing)] Step S16
Then, the R sensor 94 and the L sensor 96 of the AF sensor 74
Correlation value calculation is performed between the sensor images (AF data) respectively captured from the above, and the shift amount (shift amount between the left and right AF data) of the sensor images when the correlation is highest is obtained.
The distance of the subject can be obtained from the shift amount between the left and right AF data.

【0050】尚、測距エリアとして3エリア設定がされ
ている場合には、右中エリア、中央エリア、及び左中エ
リアの各分割エリアごとに相関値演算を行い、測距エリ
アとして5エリア設定がされている場合には、右エリ
ア、右中エリア、中央エリア、左中エリア、左エリアの
各分割エリアごとに相関値演算を行うが、上記ステップ
S14で低コントラスト(測距不能)の判定が行われた
分割エリアでの相関値演算は行わない。
When three areas are set as the distance measuring areas, the correlation value is calculated for each of the divided areas of the right middle area, the center area, and the left middle area, and five areas are set as the distance measuring areas. If it is, the correlation value is calculated for each of the divided areas of the right area, the middle right area, the center area, the middle left area, and the left area. The correlation value calculation is not performed in the divided area in which

【0051】次に、上記相関値演算について図12を参
照しながら説明する。
Next, the correlation value calculation will be described with reference to FIG.

【0052】図12において、94A及び96Aは、そ
れぞれRセンサ94及びLセンサ96のうちのある分割
エリアのセンサ(以下「採用センサ」という)である。
また、94B及び96Bは、それぞれ採用センサ94A
及び96AのAFデータから相関値演算に使用するAF
データを抽出するためのRウインドウ及びLウインドウ
である。
In FIG. 12, 94A and 96A are sensors of a certain divided area of the R sensor 94 and the L sensor 96 (hereinafter referred to as "adopted sensor").
Also, 94B and 96B are adopted sensors 94A, respectively.
And AF used for correlation value calculation from 96A AF data
An R window and an L window for extracting data.

【0053】ここで、Rウインドウ94BとLウインド
ウ96Bとのシフト量をn(n=−2,−1,0,1,
…,MAX(=38))とすると、n=−2のときにRウインド
ウ94Bは採用センサ94Aの左端に位置し、Lウイン
ドウ96Bは採用センサ96Aの右端に位置している。
そして、n=−1のときにLウインドウ96Bは採用セ
ンサ96Aの右端から1セル分だけ左にシフトし、n=
0のときにRウインドウ94Bは採用センサ94Aの左
端から1セル分だけ右にシフトし、同様にしてnが1増
加するごとにRウインドウ94BとLウインドウ96B
とは交互に1セルずつ移動する。そして、n=MAXのと
きにRウインドウ94Bは採用センサ94Aの右端に位
置し、Lウインドウ96Bは採用センサ96Aの左端に
位置する。
Here, the shift amount between the R window 94B and the L window 96B is n (n = -2, -1, 0, 1,).
, MAX (= 38)), when n = -2, the R window 94B is located at the left end of the adopted sensor 94A, and the L window 96B is located at the right end of the adopted sensor 96A.
Then, when n = -1, the L window 96B is shifted to the left by one cell from the right end of the adopted sensor 96A, and n =
When it is 0, the R window 94B is shifted to the right by one cell from the left end of the adopted sensor 94A, and similarly, each time n is increased by 1, the R window 94B and the L window 96B.
And move alternately one cell at a time. Then, when n = MAX, the R window 94B is located at the right end of the adopted sensor 94A, and the L window 96B is located at the left end of the adopted sensor 96A.

【0054】いま、Rウインドウ94BとLウインドウ
96Bとのあるシフト量nのときの相関値をf(n)とす
ると、相関値f(n)は、次式、
Assuming that the correlation value between the R window 94B and the L window 96B at a certain shift amount n is f (n), the correlation value f (n) is

【0055】[0055]

【数1】 で表すことができる。尚、式(1)において、iはウイン
ドウ内のセルの位置(i=1,2,…wo(=42))を示す
番号であり、R(i)及びL(i)は、それぞれRウインドウ
94B及びLウインドウ96Bの同じセル位置iのセル
から得られたAFデータである。即ち、式(1)に示すよ
うに相関値f(n)は、Rウインドウ94B及びLウイン
ドウ96Bの同じセル位置のセルから得られたAFデー
タの差分の絶対値の総和であり、相関が高い程、ゼロに
近づく。
[Equation 1] Can be expressed as In the formula (1), i is a number indicating the position of the cell in the window (i = 1, 2, ... wo (= 42)), and R (i) and L (i) are R window respectively. It is AF data obtained from the cell at the same cell position i of 94B and L window 96B. That is, as shown in the equation (1), the correlation value f (n) is the sum of the absolute values of the differences of the AF data obtained from the cells at the same cell position in the R window 94B and the L window 96B, and the correlation is high. The closer to zero.

【0056】従って、シフト量nを変えて相関値f(n)
を求め、相関値f(n)が最も小さくなるとき(相関が最
も高くなるとき)のシフト量nから被写体の距離を求め
ることができる。尚、被写体距離が無限遠のときに、シ
フト量n=0で相関が最も高くなり、被写体距離が至近
端のときに、シフト量n=MAXで相関が最も高くなるよ
うに被写体像がRセンサ94及びLセンサ96に結像す
るようになっている。また、相関を求める演算式は、上
式(1)に限らず、他の演算式を用いることができる。そ
の場合において、相関が高いほど相関値が大きくなる場
合があり、このときには、以下の説明における相関値に
ついての大小関係を反転してその演算式において本実施
の形態を適用する。例えば、上式(1)により算出した相
関値の極小値は、極大値となり、また、上式(1)により
算出した相関値について小さい又は大きいなどの文言
は、大きい又は小さいなどの文言に反転して適用するこ
とができる。 [ステップS18(コントラスト検出処理2)]ステッ
プS14では、分割エリア内のAFデータが、測距に必
要なコントラストがあるか否かを判定しているのに対
し、ステップS18では相関が最大となるシフト量nの
ときのウインドウ範囲内のAFデータが、測距に必要な
コントラストがあるか否かを判定する。そして、低コン
トラストと判定すると、測距不能とし、そのときのシフ
ト量nに基づく測距は行わない。 [ステップS20(L、Rチャンネル差補正処理)]ス
テップS20では、AFセンサ74から得られた左右の
AFデータであって、相関が最大となるウインドウ範囲
内の左右のAFデータの最小値を比較する。そして、左
右のAFデータの最小値の差の絶対値が第1の基準値以
上かつ第2の基準値以下の場合に、ダイナミックレンジ
を越えない方のチャンネルのAFデータを補正する。
尚、相関が最大となったときの相関値が小さい場合に
は、AFデータを補正しなくても相関値演算の結果は信
頼性が高いと判断できるため、相関が最大となったとき
の相関値が第3の基準値以上の場合にのみAFデータの
補正を行うようにしてもよい。
Therefore, the correlation value f (n) is changed by changing the shift amount n.
Then, the distance of the object can be obtained from the shift amount n when the correlation value f (n) is the smallest (when the correlation is the highest). It should be noted that when the subject distance is infinity, the correlation is highest when the shift amount is n = 0, and when the subject distance is at the close end, the subject image is R so that the correlation is highest when the shift amount is n = MAX. An image is formed on the sensor 94 and the L sensor 96. Further, the calculation formula for obtaining the correlation is not limited to the above formula (1), and other calculation formulas can be used. In that case, the higher the correlation is, the larger the correlation value may be. In this case, the magnitude relation of the correlation values in the following description is inverted and the present embodiment is applied to the arithmetic expression. For example, the minimum value of the correlation value calculated by the above formula (1) becomes the maximum value, and the phrase such as small or large for the correlation value calculated by the above formula (1) is inverted to the phrase such as large or small. And can be applied. [Step S18 (Contrast Detection Processing 2)] In step S14, it is determined whether or not the AF data in the divided area has a contrast necessary for distance measurement, whereas in step S18, the correlation is maximum. It is determined whether or not the AF data within the window range when the shift amount is n has the contrast necessary for distance measurement. If it is determined that the contrast is low, it is determined that distance measurement is impossible, and distance measurement based on the shift amount n at that time is not performed. [Step S20 (L, R Channel Difference Correction Processing)] In step S20, the left and right AF data obtained from the AF sensor 74 are compared with each other in the minimum value of the left and right AF data within the window range where the correlation is maximum. To do. Then, when the absolute value of the difference between the minimum values of the left and right AF data is greater than or equal to the first reference value and less than or equal to the second reference value, the AF data of the channel that does not exceed the dynamic range is corrected.
If the correlation value when the correlation becomes maximum is small, it can be judged that the result of the correlation value calculation is highly reliable without correcting the AF data. The AF data may be corrected only when the value is equal to or larger than the third reference value.

【0057】また、AFデータを補正した場合には、再
度相関値演算を行い、最小の相関値を求める。そして、
補正後の最小の相関値と補正前の最小の相関値とを比較
し、一致度の高い方の相関値のシフト量を採用する。 [ステップS22(補間値演算処理)]ステップS22
では、相関が最も高くなるときの相関値f(n)(最小極
小値)を求めた後、その最小極小値と前後の相関値とを
使用し、シフト量が1以内(AFセンサ74のセルの1
ピッチ以内)の補間値を算出する。
When the AF data is corrected, the correlation value is calculated again to obtain the minimum correlation value. And
The minimum correlation value after correction is compared with the minimum correlation value before correction, and the shift amount of the correlation value having the higher degree of coincidence is adopted. [Step S22 (Interpolation Value Calculation Processing)] Step S22
Then, after obtaining the correlation value f (n) (minimum minimum value) when the correlation is highest, the shift amount is within 1 (cell of the AF sensor 74) by using the minimum minimum value and the correlation values before and after. Of 1
Interpolation value within the pitch) is calculated.

【0058】前記補間値は、最小極小値が得られたシフ
ト量をnとすると、その最小極小値と、そのシフト量n
の前後の複数のシフト量における相関値(最低3つの相
関値)とに基づいて、これらの相関値を通りV字状に交
わる2本の直線の交点を求め、その交点の位置と前記シ
フト量nとの差分値として算出される。 [ステップS24(AFエラー処理)]ステップS24
では、3エリア設定又は5エリア設定された測距エリア
の全ての測距エリアで測距不能と判定されると、予め設
定した被写体距離にピントを合わせるように撮影レンズ
をセットする。
In the interpolation value, when the shift amount at which the minimum minimum value is obtained is n, the minimum minimum value and the shift amount n
Based on the correlation values in a plurality of shift amounts before and after (at least three correlation values), the intersection of two straight lines passing through these correlation values and intersecting in a V shape is obtained, and the position of the intersection and the shift amount. It is calculated as a difference value from n. [Step S24 (AF error processing)] Step S24
Then, if it is determined that the distance measurement is impossible in all the distance measurement areas of the three area setting or the five area setting, the photographing lens is set so as to focus on the preset object distance.

【0059】即ち、オートフォーカス用の補助光を発光
し、かつ全ての測距エリアのAFデータ量不足によりエ
ラーと判断された場合、無限遠にピントが合うように撮
影レンズをセットする。
That is, when the auxiliary light for autofocus is emitted and it is determined that there is an error due to insufficient AF data amount in all distance measuring areas, the taking lens is set so that it is focused at infinity.

【0060】また、オートフォーカス用の補助光を発光
し、かつ全ての測距エリアのAFデータ量不足によりエ
ラーと判断された場合、フイルム感度に応じてストロボ
到達可能な固定焦点セット距離に切り替える。例えば、
ISO400以上の場合には、固定焦点セット距離を6
mとし、ISO400未満の場合には、固定焦点セット
距離を3mとする。更に、エラーの種類によってピント
を合わせる固定焦点セット距離を切り替えるようにして
もよい。 [ステップS26(距離算出処理)]ステップS26で
は、ステップS16での相関値演算により最小極小値の
相関値が得られるときのシフト量nと、ステップS22
で演算した補間値とに基づいて被写体距離を算出する。
尚、3エリア設定又は5エリア設定された測距エリアの
全ての測距エリアごとに被写体距離を算出する。 [ステップS28(エリア選択処理)]AF測距処理中
にエラーが発生しない場合には、3エリア設定時には3
つの被写体距離が算出され、5エリア設定時には5つの
被写体距離が算出される。複数の被写体距離が算出され
ると、基本的には最も近距離の被写体距離を採用する。
When an auxiliary light for autofocus is emitted and it is determined that an error occurs due to insufficient AF data amount in all distance measuring areas, the fixed focus set distance that can reach the strobe is switched according to the film sensitivity. For example,
For ISO 400 or higher, set the fixed focus set distance to 6
When ISO is less than 400, the fixed focus set distance is 3 m. Further, the fixed focus set distance for focusing may be switched depending on the type of error. [Step S26 (Distance Calculation Processing)] In step S26, the shift amount n when the correlation value of the minimum minimum value is obtained by the correlation value calculation in step S16, and step S22
The subject distance is calculated based on the interpolation value calculated in.
Note that the subject distance is calculated for each of all the distance measuring areas set in the three areas or the five areas. [Step S28 (area selection processing)] If no error occurs during AF distance measurement processing, 3 is set when 3 areas are set.
One subject distance is calculated, and when five areas are set, five subject distances are calculated. When a plurality of subject distances are calculated, the closest subject distance is basically adopted.

【0061】尚、5エリア設定時に5つの被写体距離が
算出され、これらの被写体距離のうち、左エリア又は右
エリアのうちの何れか一方のエリアに対応する被写体距
離が超至近距離となり、それ以外のエリアに対応する被
写体距離が全て中間距離以遠となる場合には、超至近の
結果を採用せず、中間距離以遠の被写体距離のうちの最
も近距離の被写体距離を採用する。 {AFデータ取得処理(図7ステップS12)の詳細}
次に、上記図7のステップS12におけるAFデータ取
得処理について詳説する。
Five object distances are calculated when the five areas are set. Of these object distances, the object distance corresponding to either the left area or the right area is the super close distance, and other than that. When all the subject distances corresponding to the area are beyond the intermediate distance, the super close result is not adopted, and the closest object distance among the object distances beyond the intermediate distance is adopted. {Details of AF data acquisition process (step S12 in FIG. 7)}
Next, the AF data acquisition process in step S12 of FIG. 7 will be described in detail.

【0062】まず、ピーク選択領域について説明する
と、ピーク選択領域とは、AFセンサ74の積分処理に
おいて、センサデータのピーク値(最小値)が積分終了
値に達したか否かを監視するセルの範囲をいう。図13
は、以下で説明するAFデータ取得処理において設定さ
れるピーク選択領域の態様を示した図である。ピーク選
択領域は、上記図8で説明した分割エリアを単位として
構成され、図13(A)には、Rセンサ94及びLセン
サ96の分割エリアが示されている。これに対して、同
図(B)〜同図(H)にはピーク選択領域が示されてお
り、ピーク選択領域は領域〜の7通りに切り替えら
れる。
First, the peak selection area will be described. The peak selection area is a cell for monitoring whether or not the peak value (minimum value) of the sensor data has reached the integration end value in the integration processing of the AF sensor 74. A range. FIG.
FIG. 6 is a diagram showing a mode of a peak selection area set in an AF data acquisition process described below. The peak selection area is configured with the divided areas described in FIG. 8 as a unit, and the divided areas of the R sensor 94 and the L sensor 96 are shown in FIG. 13A. On the other hand, the peak selection regions are shown in FIGS. 7B to 7H, and the peak selection regions can be switched to seven types of regions to.

【0063】同図(B)に示す領域は、Rセンサ94
及びLセンサ96における「中央エリア」、「右中エリ
ア」、及び「左中エリア」の3つの分割エリアから構成
され、同図(C)に示す領域は、Rセンサ94及びL
センサ96における「中央エリア」、「右中エリア」、
「右エリア」、「左中エリア」、及び「左エリア」の5
つの分割エリアから構成される。尚、領域は、図10
で示した3エリア設定時の領域に等しく、領域は、
図10で示した5エリア設定時の領域に等しい。同図
(D)、(E)、(F)に示す領域、、はそれぞ
れ、Rセンサ94及びLセンサ96における「中央エリ
ア」、「左中エリア」、「右中エリア」であり、同図
(G)に示す領域は、Rセンサ94及びLセンサ96
における左中エリア及び左エリアから構成され、同図
(H)に示す領域は、Rセンサ94及びLセンサ96
における右中エリア及び右エリアから構成される。
The area shown in FIG.
The L sensor 96 is composed of three divided areas of “center area”, “middle right area”, and “middle left area”. The area shown in FIG.
“Center area”, “right middle area” in the sensor 96,
5 of "right area", "left middle area", and "left area"
It consists of two divided areas. The area is shown in FIG.
The area is equal to the area when the three areas are set, and the area is
This is equal to the area when 5 areas are set as shown in FIG. Areas shown in (D), (E), and (F) of the same figure are the “center area”, “left middle area”, and “right middle area” of the R sensor 94 and the L sensor 96, respectively. The area shown in (G) is an R sensor 94 and an L sensor 96.
In the left middle area and the left area in FIG.
It consists of the right middle area and the right area.

【0064】図14は、AFデータ取得処理の手順を示
したフローチャートである。まず、CPU60は、測光
センサ70が出力する光量の信号出力を参照して、被写
体から得た光量が超高輝度と判断する所定の閾値以上で
あるか否かを判定する(ステップS50)。NOと判定
した場合、CPU60は、AFセンサ74(AFセンサ
74の処理回路99)に対して一括ゲイン高積分の処理
を開始させる(ステップS52)。尚、以下の説明で
は、AFセンサ74の処理回路99が行う処理であって
も処理回路99とは明記せず、単にAFセンサ74と記
述する。
FIG. 14 is a flow chart showing the procedure of AF data acquisition processing. First, the CPU 60 refers to the signal output of the light amount output by the photometric sensor 70, and determines whether or not the light amount obtained from the subject is equal to or higher than a predetermined threshold value for determining the ultra-high brightness (step S50). When the determination is NO, the CPU 60 causes the AF sensor 74 (processing circuit 99 of the AF sensor 74) to start the collective gain high integration processing (step S52). In the following description, the processing circuit 99 of the AF sensor 74 does not describe the processing circuit 99, but simply describes it as the AF sensor 74.

【0065】一括ゲイン高積分は、上記図7に示したス
テップS10の測距エリア設定処理により設定した測距
エリアと同一範囲の領域をピーク選択領域とし、また、
AFセンサ74のセンサ感度を高感度とし、測距エリア
内の各セルのセンサデータを一括して取得する処理であ
る。上記測距エリア設定処理において測距エリアを3エ
リア設定とした場合(ズーム位置がテレの場合)には、
ピーク選択領域は、図13(B)に示した領域に設定
される。一方、測距エリアを5エリア設定とした場合
(ズーム位置がテレ以外の場合)には、ピーク選択領域
は、図13(C)に示したピーク選択領域に設定され
る。尚、一括ゲイン高積分は、被写体輝度が低輝度の場
合のセンサデータを取得するための積分処理であるが、
後述の記載からも分かるように被写体輝度が高輝度、中
輝度、低輝度のどの状態にあるかを判別するための処理
でもある。このステップS52の一括ゲイン高積分の処
理の代わりに被写体輝度を判別するための他の方法を採
用してもよい。
In the collective high gain integration, an area in the same range as the distance measuring area set by the distance measuring area setting process of step S10 shown in FIG. 7 is set as the peak selection area, and
This is a process in which the sensor sensitivity of the AF sensor 74 is set to high and the sensor data of each cell in the distance measurement area is collectively acquired. When the distance measurement area is set to three areas in the distance measurement area setting process (when the zoom position is tele),
The peak selection area is set to the area shown in FIG. On the other hand, when the distance measuring area is set to 5 areas (when the zoom position is other than tele), the peak selection area is set to the peak selection area shown in FIG. 13 (C). Note that the collective gain high integration is an integration process for acquiring sensor data when the subject brightness is low,
As will be understood from the description below, this is also processing for determining whether the subject brightness is in high brightness, medium brightness, or low brightness. Instead of the collective gain high integration process of step S52, another method for determining the subject brightness may be adopted.

【0066】AFセンサ74による一括ゲイン高積分の
開始後、CPU60は、AFセンサ74から積分処理の
終了を示す積分終了信号が出力されるのを待機する。そ
して、積分処理の開始後、積分処理が終了するまでに要
した時間(積分時間)が2ms未満か、2ms以上4m
s未満か、又は、4ms以上か(4ms経過しても積分
処理が終了しないか)を判定する(ステップS54)。
After the start of the high-integration of the collective gain by the AF sensor 74, the CPU 60 waits for the AF sensor 74 to output an integration end signal indicating the end of the integration process. The time (integration time) required for the integration process to end after the integration process starts is less than 2 ms, or 2 ms or more and 4 m
It is determined whether it is less than s or 4 ms or more (whether the integration process is not completed even after 4 ms has elapsed) (step S54).

【0067】もし、積分時間が2ms未満であった場合
には、被写体が高輝度であると判断してAFセンサ74
のセンサデータをリセットし、詳細を後述する3分割ゲ
イン低積分の処理に切り替える(ステップS56)。積
分時間が2ms以上4ms未満であった場合には、被写
体が中輝度であると判断してAFセンサ74のセンサデ
ータをリセットし、詳細を後述する一括ゲイン低積分の
処理に切り替える(ステップS58)。積分時間が4m
s以上であった場合には、被写体が低輝度であると判断
して詳細を後述する低輝度時処理を実行する(ステップ
S60)。
If the integration time is less than 2 ms, the AF sensor 74 judges that the subject has high brightness.
Sensor data is reset, and the process is switched to the three-part low gain integration process, the details of which will be described later (step S56). If the integration time is 2 ms or more and less than 4 ms, it is determined that the subject has medium brightness, the sensor data of the AF sensor 74 is reset, and the process is switched to the collective gain low integration process described in detail later (step S58). . 4m integration time
If it is s or more, it is determined that the subject has low brightness, and low-luminance processing, which will be described in detail later, is executed (step S60).

【0068】ここで、上記ステップS50においてYE
S、即ち、被写体が超高輝度と判定した場合には、2m
s未満で終了した場合と同様に3分割ゲイン低積分の処
理を実行する(ステップS56)。
Here, in step S50, YE
S, that is, 2 m when the subject is determined to have ultra-high brightness
Similar to the case where the processing ends in less than s, the 3-division gain low integration processing is executed (step S56).

【0069】ステップS56の3分割ゲイン低積分の処
理は、AFセンサ74のセンサ感度を低感度に設定し、
また、上記測距エリア設定処理において設定した測距エ
リアを3分割し、分割した各エリアをそれぞれ順にピー
ク選択領域としてAFセンサ74に積分処理を実行させ
るCPU60の処理である。
In the processing of the 3-division gain low integration in step S56, the sensor sensitivity of the AF sensor 74 is set to low sensitivity,
Further, it is a process of the CPU 60 which divides the distance measuring area set in the distance measuring area setting process into three, and causes the AF sensor 74 to perform the integration process by setting each of the divided areas as a peak selection region in order.

【0070】即ち、上記図7ステップS10の測距エリ
ア設定処理において測距エリアを3エリア設定として場
合(ズーム位置がテレの場合)、測距エリアは「中央エ
リア」、「左中エリア」及び「右中エリア」から構成さ
れる。この測距エリアを「中央エリア」、「左中エリ
ア」、及び、「右中エリア」の各分割エリアに3分割し
て、各分割エリアを順にピーク選択領域として積分処理
を実行する。図13で示したピーク選択領域の態様にお
いては、同図(D)、(E)、(F)の領域、、
が順にピーク選択領域として設定される。具体的には、
図15のフローチャートに示すように、まず、中央エリ
ア(領域)をピーク選択領域とし(ステップS8
0)、また、AFセンサ74のセンサ感度を低感度とし
て(ステップS82)積分処理を開始する(ステップS
84)。この積分処理が終了し、CPU60が領域の
センサデータを取得すると(ステップS86)、測距エ
リアが3エリア設定であるため(ステップS88)、続
いて、左中エリア(領域)をピーク選択領域とし(ス
テップS90)、また、AFセンサ74のセンサ感度を
低感度として(ステップS92)積分処理を開始する
(ステップS94)。この積分処理が終了し、CPU6
0が領域のセンサデータを取得すると(ステップS9
6)、続いて、右中エリア(領域)をピーク選択領域
とし(ステップS98)、また、AFセンサ74のセン
サ感度を低感度として(ステップS100)積分処理を
開始する(ステップS102)。この積分処理が終了
し、CPU60が領域のセンサデータを取得すると
(ステップS104)、3分割ゲイン低積分の処理を終
了する。これによって以後の測距演算に必要な測距エリ
ア内の各分割エリアのセンサデータが取得される。
That is, when the distance measurement area is set to three areas in the distance measurement area setting process of step S10 in FIG. 7 (when the zoom position is tele), the distance measurement areas are the "center area", the "left middle area" and the It consists of the "right middle area". The distance measuring area is divided into three areas, that is, a "center area", a "left middle area", and a "right middle area", and the integration processing is executed by sequentially using each of the divided areas as a peak selection area. In the aspect of the peak selection area shown in FIG. 13, the areas of (D), (E) and (F) of FIG.
Are sequentially set as peak selection regions. In particular,
As shown in the flowchart of FIG. 15, first, the central area (area) is set as the peak selection area (step S8).
0), the sensor sensitivity of the AF sensor 74 is set to low sensitivity (step S82), and the integration process is started (step S).
84). When this integration processing is completed and the CPU 60 acquires the sensor data of the area (step S86), the distance measuring area is set to three areas (step S88), and subsequently, the left middle area (area) is set as the peak selection area. (Step S90) Further, the sensor sensitivity of the AF sensor 74 is set to low sensitivity (Step S92), and the integration process is started (Step S94). This integration process ends, and the CPU 6
When 0 acquires the area sensor data (step S9)
6) Subsequently, the right middle area (area) is set as the peak selection area (step S98), the sensor sensitivity of the AF sensor 74 is set as low sensitivity (step S100), and the integration process is started (step S102). When this integration processing is completed and the CPU 60 acquires the sensor data of the area (step S104), the three-division gain low integration processing is completed. As a result, the sensor data of each divided area within the distance measurement area necessary for the distance measurement calculation thereafter is acquired.

【0071】一方、上記測距エリア設定処理において5
エリア設定とした場合(ズーム位置がテレ以外の場
合)、測距エリアは、「中央エリア」、「左中エリ
ア」、「左エリア」、「右中エリア」、「右エリア」か
ら構成される。この測距エリアを図13(D)、
(G)、(H)の領域、、に3分割して、各領域
、、を順にピーク選択領域として積分処理を実行
する。具体的には、図15のフローチャートで説明する
と、上述の3エリア設定の場合と同様に、まず、中央エ
リア(領域)をピーク選択領域とし(ステップS8
0)、また、AFセンサ74のセンサ感度を低感度とし
て(ステップS82)積分処理を開始する(ステップS
84)。この積分処理が終了し、CPU60が領域の
センサデータを取得すると(ステップS86)、測距エ
リアが5エリア設定であるため(ステップS88)、続
いて、左中エリア及び左エリア(領域)をピーク選択
領域とし(ステップS106)、また、AFセンサ74
のセンサ感度を低感度として(ステップS108)積分
処理を開始する(ステップS110)。この積分処理が
終了し、CPU60が領域のセンサデータを取得する
と(ステップS112)、続いて、右中エリア及び右エ
リア(領域)をピーク選択領域とし(ステップS11
4)、また、AFセンサ74のセンサ感度を低感度とし
て(ステップS116)積分処理を開始する(ステップ
S118)。この積分処理が終了し、CPU60が領域
のセンサデータを取得すると(ステップS120)、
3分割ゲイン低積分の処理を終了する。これによって以
後の測距演算に必要な測距エリア内の各分割エリアのセ
ンサデータが取得される。
On the other hand, in the distance measuring area setting process, 5
When the area is set (when the zoom position is other than tele), the distance measurement area consists of "center area", "left middle area", "left area", "right middle area", and "right area". . This distance measuring area is shown in FIG.
(G) and (H) area are divided into three areas, and the integration processing is executed using each area as a peak selection area in order. Specifically, with the flowchart in FIG. 15, as in the case of the above-described three-area setting, first, the central area (area) is set as the peak selection area (step S8).
0), the sensor sensitivity of the AF sensor 74 is set to low sensitivity (step S82), and the integration process is started (step S).
84). When this integration process is completed and the CPU 60 acquires the sensor data of the area (step S86), the distance measuring area is set to 5 areas (step S88), and then the left middle area and the left area (area) are peaked. The selected area (step S106), and the AF sensor 74
The sensor sensitivity of is set to low sensitivity (step S108) and the integration process is started (step S110). When this integration processing ends and the CPU 60 acquires the sensor data of the area (step S112), subsequently, the right middle area and the right area (area) are set as the peak selection area (step S11).
4) Further, the sensor sensitivity of the AF sensor 74 is set to low sensitivity (step S116), and the integration process is started (step S118). When the integration processing is completed and the CPU 60 acquires the sensor data of the area (step S120),
The process of 3-division gain low integration is completed. As a result, the sensor data of each divided area within the distance measurement area necessary for the distance measurement calculation thereafter is acquired.

【0072】尚、上記説明では測距エリアが5エリア設
定の場合には、測距エリアを領域、、に3分割す
るようにしたが、これに限らず、各分割エリアに5分割
してそれぞれの分割エリアを順にピーク選択領域として
積分処理を実行しセンサデータを取得するようにしても
よい。即ち、測距エリアを分割する領域の数は本実施の
形態の場合に限らず任意に設定変更できる。
In the above description, when the distance measuring area is set to five areas, the distance measuring area is divided into three areas, but the present invention is not limited to this, and each divided area is divided into five areas. The sensor data may be acquired by performing the integration process by sequentially setting the divided areas as the peak selection area. That is, the number of areas into which the distance measuring area is divided is not limited to the case of this embodiment, and the setting can be changed arbitrarily.

【0073】図14のステップS58における一括ゲイ
ン低積分の処理は、ステップS52の一括ゲイン高積分
において採用したピーク選択領域を変更せず、AFセン
サ74のセンサ感度を高感度から低感度に切り替えてA
Fセンサ74に積分処理を実行させるCPU60の処理
である。
The process of collective gain low integration in step S58 of FIG. 14 switches the sensor sensitivity of the AF sensor 74 from high sensitivity to low sensitivity without changing the peak selection region adopted in the collective gain high integration of step S52. A
This is the processing of the CPU 60 that causes the F sensor 74 to execute the integration processing.

【0074】即ち、上記測距エリア設定処理において測
距エリアを3エリア設定とした場合(ズーム位置がテレ
の場合)には、ピーク選択領域を、図13(B)に示し
た領域とし、また、AFセンサ74のセンサ感度を低
感度としてAFセンサ74に積分処理を実行させる。一
方、上記測距エリア設定処理において測距エリアを5エ
リア設定とした場合(ズーム位置がテレ以外の場合)に
は、ピーク選択領域を、図13(C)に示した領域と
し、また、AFセンサ74のセンサ感度を低感度として
AFセンサ74に積分処理を実行させる。
That is, when the distance measuring area is set to three areas in the distance measuring area setting process (when the zoom position is tele), the peak selection area is set to the area shown in FIG. , The sensor sensitivity of the AF sensor 74 is set to low sensitivity, and the AF sensor 74 is caused to execute the integration process. On the other hand, when the distance measuring area is set to five areas in the distance measuring area setting process (when the zoom position is other than tele), the peak selection area is set to the area shown in FIG. The sensor sensitivity of the sensor 74 is set to low sensitivity and the AF sensor 74 is caused to execute the integration process.

【0075】以上の積分処理が終了するとCPU60
は、AFセンサ74から測距エリア内のセンサデータを
取得する。これによって、測距演算に必要な測距エリア
内の各分割エリアのセンサデータが取得される。
When the above integration processing is completed, the CPU 60
Acquires sensor data in the distance measuring area from the AF sensor 74. As a result, the sensor data of each divided area within the distance measurement area necessary for the distance measurement calculation is acquired.

【0076】図14のステップS60における低輝度時
処理は、ステップS52における一括ゲイン高積分の処
理を、最大許容積分時間を限度として積分処理が終了す
るまで継続させる処理である。
The low-luminance process in step S60 of FIG. 14 is a process of continuing the collective gain high integration process in step S52 until the integration process is completed within the maximum allowable integration time.

【0077】最大許容積分時間は、撮影モードにより異
なり、撮影モードが発光禁止モードに設定されている場
合には、上記ステップS52の一括ゲイン高積分の積分
時間が4ms以上経過した後も200ms(最大許容積
分時間)を限度としてそのまま積分処理を継続させる。
もし、積分処理が200ms以内で正常に終了した場合
(ピーク選択領域内のセンサデータのピーク値が積分終
了値に達したことにより積分を終了した場合(以下同
様))には、その時点のセンサデータをAFセンサ74
から取得する。一方、200msが経過しても積分処理
が正常に終了しない場合には、CPU60からの指示信
号により強制的に積分処理を終了させ、その時点でのセ
ンサデータをAFセンサ74から取得する。
The maximum allowable integration time differs depending on the photographing mode. If the photographing mode is set to the light emission prohibition mode, the maximum allowable integration time is 200 ms (maximum after the integration time of the collective gain high integration in step S52 is 4 ms or more). The integration process is continued as it is with the allowable integration time) as the limit.
If the integration process ends normally within 200 ms (when the integration ends because the peak value of the sensor data in the peak selection area reaches the integration end value (the same applies below)), the sensor at that point AF sensor 74 data
To get from. On the other hand, if the integration processing does not end normally after 200 ms has elapsed, the integration processing is forcibly ended by the instruction signal from the CPU 60, and the sensor data at that time is acquired from the AF sensor 74.

【0078】また、撮影モードが発光禁止モードでない
場合には、まず、上記ステップS52の一括ゲイン高積
分の積分時間が4ms以上経過した後も100msを限
度(最大許容積分時間)としてそのまま積分処理を継続
させる。もし、積分処理が100ms以内で正常に終了
した場合には、その時点でセンサデータをAFセンサ7
4から取得する。一方、積分時間が100msに達して
も積分処理が終了しない場合には、CPU60からの指
示信号により強制的に積分処理を終了させる。そして、
ストロボ装置AF72による補助光の発光によりAFプ
レ発光させながら積分処理を再度開始させる。尚、夜景
ポートレートモードのように夜景と手前の人物とを同時
に撮影するようなモードに設定されている場合には、夜
景にピントが合う不具合を防止するために、一括ゲイン
高積分の積分時間は、100msの替わりに25msを
限度とし、積分時間が25msに達しても積分処理が正
常に終了しない場合には、積分処理を強制的に終了させ
て、AFプレ発光と共に積分処理を開始させる。尚、以
下、AFプレ発光させながら積分を行う処理をプレ発光
処理という。
If the photographing mode is not the light emission prohibition mode, first, the integration process is continued as it is with 100 ms as a limit (maximum allowable integration time) even after the integration time of the collective gain high integration in step S52 has passed 4 ms or more. Let it continue. If the integration process ends normally within 100 ms, the sensor data is sent to the AF sensor 7 at that time.
Get from 4. On the other hand, if the integration processing does not end even after the integration time reaches 100 ms, the integration processing is forcibly ended by the instruction signal from the CPU 60. And
The integration process is restarted while the AF pre-emission is performed by the auxiliary light emitted from the strobe device AF72. In addition, when the mode is set to capture the night view and the person in front of the camera at the same time as in the night view portrait mode, the integration time of the collective gain high integration is set to prevent the trouble of focusing on the night view. Is limited to 25 ms instead of 100 ms, and if the integration process does not end normally even if the integration time reaches 25 ms, the integration process is forcibly ended and the integration process is started together with the AF pre-emission. Note that, hereinafter, the process of performing integration while the AF pre-emission is performed is referred to as pre-emission process.

【0079】プレ発光処理による積分処理を開始する場
合、ステップS52の一括ゲイン高積分において採用し
たピーク選択領域を変更せず、AFセンサ74のセンサ
感度を高感度から低感度に切り替えてAFセンサ74に
積分処理を開始させる。また、AFプレ発光は、断続的
なパルス発光により所定の上限回数を設定して行う。こ
れにより、プレ発光が上限回数に達する前に積分処理が
正常に終了した場合には、そのときのセンサデータをA
Fセンサ74から取得する。一方、プレ発光が上限回数
に達しても積分処理が正常に終了しない場合には、積分
処理を強制的に終了させて、その時点でのセンサデータ
をAFセンサ74から取得する。
When the integration processing by the pre-light emission processing is started, the peak sensitivity region adopted in the high gain integration of the collective gain in step S52 is not changed, and the sensor sensitivity of the AF sensor 74 is switched from high sensitivity to low sensitivity. To start the integration process. Further, the AF pre-emission is performed by setting a predetermined upper limit number of times by intermittent pulse emission. As a result, if the integration process ends normally before the pre-flash reaches the upper limit number of times, the sensor data at that time is set to A.
It is acquired from the F sensor 74. On the other hand, if the integration process does not end normally even if the pre-light emission reaches the upper limit number of times, the integration process is forcibly ended and the sensor data at that time is acquired from the AF sensor 74.

【0080】尚、上記実施の形態では被写体輝度が高輝
度又は超高輝度の場合だけ測距エリアを複数の領域(ピ
ーク選択領域)に分割して各領域ごとにセンサデータを
取得するようにしたが、被写体輝度が中輝度や低輝度の
場合であっても高輝度等の場合と同様に測距エリアを複
数の領域に分割して各領域ごとにセンサデータを取得す
るようにしてもよい。
In the above embodiment, the range-finding area is divided into a plurality of areas (peak selection areas) only when the subject brightness is high brightness or ultra-high brightness, and the sensor data is acquired for each area. However, even when the subject brightness is medium brightness or low brightness, the distance measurement area may be divided into a plurality of areas and the sensor data may be acquired for each area as in the case of high brightness.

【0081】また、上記実施の形態では、被写体輝度が
超高輝度、高輝度、中輝度、低輝度の場合に場合分けし
てそれぞれの場合に対応したセンサデータの取得処理を
行うようにしたが、これに限らず、被写体輝度のレベル
を上記実施の形態よりも細かく又は粗く場合分けしてそ
れぞれの被写体輝度のレベルに対応したセンサデータの
取得処理を行うようにしてもよい。
Further, in the above-described embodiment, the case where the subject brightness is ultra-high brightness, high brightness, medium brightness, and low brightness is divided into cases, and the acquisition processing of the sensor data corresponding to each case is performed. However, the present invention is not limited to this, and the subject brightness level may be divided into finer or rougher cases than in the above-described embodiment and the acquisition processing of the sensor data corresponding to each subject brightness level may be performed.

【0082】次に、上記AFデータ取得処理を実行する
際のCPU60とAFセンサ74(処理回路99)の処
理動作について詳説する。図16に示すようにCPU6
0とAFセンサ74との間では、複数の信号ラインによ
り各種信号の送受信が行われる。CPU60からAFセ
ンサ74に送信される信号の信号ラインとしては、AF
センサ74を動作状態又は非動作状態に切り替える信号
が送信される/AFCEN、制御データの設定を指示す
る信号が送信される/AFRST、制御データの内容を
示す信号が送信されるAFAD、READ/WRIGH
T−クロックパルスが送信されるAFCLK等がある。
AFセンサ74からCPU60に送信される信号の信号
ラインとしては、積分処理が終了したことを示す信号が
送信される/AFEND、ピーク選択領域におけるセン
サデータのピーク値(最小値)がアナログデータとして
送信されるMDATA、Rセンサ94及びLセンサ96
の各セルのセンサデータがアナログデータとして送信さ
れるAFDATAP等がある。尚、以下、各信号ライン
から送信される信号の種類を信号ラインの名称により識
別する(/AFCEN信号、/AFRST信号等)。
Next, the processing operation of the CPU 60 and the AF sensor 74 (processing circuit 99) when executing the AF data acquisition processing will be described in detail. As shown in FIG. 16, the CPU 6
Various signals are transmitted and received between 0 and the AF sensor 74 by a plurality of signal lines. The signal line of the signal transmitted from the CPU 60 to the AF sensor 74 is AF
A signal for switching the sensor 74 to an operating state or a non-operating state is transmitted / AFCEN, a signal for instructing setting of control data is transmitted / AFRST, a signal indicating the content of control data is transmitted AFAD, READ / WRIGH.
There is AFCLK etc. in which the T-clock pulse is transmitted.
As a signal line of a signal transmitted from the AF sensor 74 to the CPU 60, a signal indicating that the integration process is completed is transmitted / AFEND, and the peak value (minimum value) of the sensor data in the peak selection region is transmitted as analog data. MDATA, R sensor 94 and L sensor 96
There is AFDATAP or the like in which the sensor data of each cell is transmitted as analog data. In the following, the type of signal transmitted from each signal line is identified by the name of the signal line (/ AFCEN signal, / AFRST signal, etc.).

【0083】CPU60及びAFセンサ74における上
記各信号の送受信の動作タイミングについて図17の動
作タイミングチャートを用いて説明する。CPU60が
/AFCEN信号を1(Highレベル)に設定してい
る場合、AFセンサ74は非動作状態にあり、CPU6
0が/AFCEN信号を0(Lowレベル)に切り替え
るとAFセンサ74が動作状態に切り替わる(時刻T1
0参照)。
The operation timing of transmission and reception of the above signals in the CPU 60 and the AF sensor 74 will be described with reference to the operation timing chart of FIG. When the CPU 60 sets the / AFCEN signal to 1 (High level), the AF sensor 74 is in the inoperative state, and the CPU 6
When 0 switches the / AFCEN signal to 0 (Low level), the AF sensor 74 switches to the operating state (time T1
0).

【0084】AFセンサ74を動作状態に切り替えた
後、所定時間(10ms)が経過すると、CPU60は
/AFRST信号を1から0に切り替えてAFセンサ7
4に対して制御データの設定を指示する(時刻T20参
照)。そして、CPU60は、AFセンサ74に対し
て、AFAD信号により制御データを送信すると共に、
AFCLK信号によりクロックパルスを送信する(時刻
T20〜T30の期間参照)。AFセンサ74は、/A
FRST信号が1から0に切り替えられると、AFCL
K信号により与えられるクロックパルスに同期してAF
AD信号の信号レベルを読み込む。これによって、ピー
ク選択領域、センサ感度等の積分処理に必要なデータが
AFセンサ74にセットされる。尚、制御データとし
て、D0からD127までの128個の1又は0で示さ
れるデータが時系列で送信されるが、制御データの内容
については後述する。
When a predetermined time (10 ms) elapses after the AF sensor 74 is switched to the operating state, the CPU 60 switches the / AFRST signal from 1 to 0 to switch the AF sensor 7
4 is instructed to set the control data (see time T20). Then, the CPU 60 transmits the control data by the AFAD signal to the AF sensor 74, and
A clock pulse is transmitted by the AFCLK signal (see the period from time T20 to T30). AF sensor 74 is / A
When the FRST signal is switched from 1 to 0, AFCL
AF in synchronization with the clock pulse given by the K signal
Read the signal level of the AD signal. As a result, data necessary for integration processing such as the peak selection area and sensor sensitivity is set in the AF sensor 74. As the control data, 128 pieces of data represented by 1 or 0 from D0 to D127 are transmitted in time series, and the contents of the control data will be described later.

【0085】AFAD信号により最後のデータ(D12
7)が送信され(時刻T30参照)、100μsが経過
すると(時刻T40参照)、CPU60は/AFRST
信号を0から1に切り替え、積分処理の開始を指示す
る。これにより、AFセンサ74は、センサ感度を高感
度に設定した場合には150μs後に、センサ感度を低
感度に設定した場合には30μs後に、Rセンサ94及
びLセンサ96の各セルによる受光を開始すると共に、
各セルから逐次出力される輝度信号の積分を開始する
(時刻T50参照)。同時に、AFセンサ74は、/A
FEND信号を1から0に切り替え、積分を開始したこ
とをCPU60に送信する。また、MDATA信号によ
りピーク選択領域内のセンサデータのピーク値をアナロ
グデータとして出力する。
The final data (D12
7) is transmitted (see time T30), and 100 μs has elapsed (see time T40), the CPU 60 causes / AFRST.
The signal is switched from 0 to 1 and the start of integration processing is instructed. As a result, the AF sensor 74 starts light reception by each cell of the R sensor 94 and the L sensor 96 after 150 μs when the sensor sensitivity is set to high sensitivity and after 30 μs when the sensor sensitivity is set to low sensitivity. Along with
The integration of the luminance signal sequentially output from each cell is started (see time T50). At the same time, the AF sensor 74
The FEND signal is switched from 1 to 0, and the start of integration is transmitted to the CPU 60. Also, the peak value of the sensor data in the peak selection area is output as analog data by the MDATA signal.

【0086】積分処理の開始後、センサデータのピーク
値が所定の積分終了値VEND(例えば、0.5V)に
達すると、AFセンサ74は、輝度信号の積分を終了す
ると共に、/AFEND信号を0から1に切り替える
(時刻T60参照)。尚、/AFEND信号の0から1
への切替りが積分終了信号となる。
After the integration process is started, when the peak value of the sensor data reaches a predetermined integration end value VEND (for example, 0.5V), the AF sensor 74 ends the integration of the brightness signal and outputs the / AFEND signal. Switch from 0 to 1 (see time T60). In addition, 0 to 1 of / AFEND signal
The changeover to becomes the integration end signal.

【0087】CPU60は、/AFEND信号が0に設
定されていた時間(時刻T50〜T60の期間)を検出
することより、積分時間を検出すると共に、/AFEN
D信号が0から1に切り替えられたことにより積分が終
了したことを検出する。
The CPU 60 detects the integration time by detecting the time when the / AFEND signal is set to 0 (the period from time T50 to T60), and
It is detected that the integration is completed by switching the D signal from 0 to 1.

【0088】積分が終了すると、CPU60は、AFセ
ンサ74に対してAFCLK信号によりクロックパルス
を送信し、センサデータの読出しを指示する(時刻T7
0参照)。尚、ピーク選択領域内におけるセンサデータ
のピーク値が積分終了値に達した場合にAFセンサ74
が積分を自動的に終了する自動終了モードと、センサデ
ータのピーク値が積分終了値に達したか否かとは無関係
に外部(CPU60)からの指示により積分を終了する
外部終了モードとがあり、CPU60は、前者の場合に
はAFAD信号を1に設定した状態を維持して上記クロ
ックパルスを送信し、後者の場合にはAFAD信号を0
に切り替えてAFセンサ74の積分を終了させた後、上
記クロックパルスを送信する。また、前者の場合であっ
てもCPU60がAFAD信号を1から0に切り替える
ことにより強制的にAFセンサ74における積分を終了
させることができるようになっている。
When the integration is completed, the CPU 60 sends a clock pulse by the AFCLK signal to the AF sensor 74 to instruct the reading of the sensor data (time T7).
0). When the peak value of the sensor data in the peak selection area reaches the integration end value, the AF sensor 74
Has an automatic end mode in which the integration is automatically ended, and an external end mode in which the integration is ended by an instruction from the outside (CPU 60) regardless of whether or not the peak value of the sensor data reaches the integration end value. In the former case, the CPU 60 maintains the state in which the AFAD signal is set to 1, and transmits the clock pulse, and in the latter case, the AFAD signal is set to 0.
Then, the clock pulse is transmitted after the integration of the AF sensor 74 is completed. Even in the former case, the CPU 60 can forcibly end the integration in the AF sensor 74 by switching the AFAD signal from 1 to 0.

【0089】AFセンサ74は、AFCLK信号により
与えられるクロックパルスに同期して各セルごとに積分
して得たセンサデータをアナログデータとしてLセンサ
96とRセンサ94のセンサ番号1からセンサ番号23
4まで交互にCPU60に送信する。これによってCP
U60はセンサデータをAFセンサ74から取得する。
The AF sensor 74 uses the sensor data obtained by integrating each cell in synchronism with the clock pulse given by the AFCLK signal as analog data from the sensor number 1 to the sensor number 23 of the L sensor 96 and the R sensor 94.
Up to 4 are transmitted to the CPU 60 alternately. This makes CP
U60 acquires the sensor data from the AF sensor 74.

【0090】次に、上記AFAD信号により送受信され
る制御データの内容について説明する。上述のように制
御データは、D0からD127までの128個の1又は
0のデータから構成される(図17時刻T20〜T30
の期間参照)。このうち、D0〜D111は、AFセン
サ74において設定すべきピーク選択領域を示すピーク
選択領域設定データであり、D112〜D118は、ピ
ーク選択領域数を示すピーク選択領域数データである。
尚、ピーク選択領域設定データ及びピーク選択領域数デ
ータの詳細は後述する。
Next, the content of the control data transmitted / received by the AFAD signal will be described. As described above, the control data is composed of 128 pieces of 1 or 0 data from D0 to D127 (time T20 to T30 in FIG. 17).
See period). Of these, D0 to D111 are peak selection region setting data indicating peak selection regions to be set in the AF sensor 74, and D112 to D118 are peak selection region number data indicating the number of peak selection regions.
Details of the peak selection area setting data and the peak selection area number data will be described later.

【0091】また、D119〜D120はダミーデータ
(0)であり、D121は設定すべきセンサ感度を示す
感度データである。本実施の形態においてセンサ感度
は、高又は低の2段階で切替可能であり、D121が1
の場合には高感度、D121が0の場合には低感度の設
定を示す。
D119 to D120 are dummy data (0), and D121 is sensitivity data indicating the sensor sensitivity to be set. In the present embodiment, the sensor sensitivity can be switched in two steps of high and low, and D121 is set to 1
In the case of, high sensitivity is set, and in the case of D121 is 0, low sensitivity is set.

【0092】D122は、積分の終了に関するモードを
示す積分モードデータであり、D122が1のときは外
部からの指示によって積分を終了する外部終了モードの
設定を示し、D122が0のときは、ピーク選択領域内
のセンサデータが所定の積分終了値(積分終了電圧)V
ENDに達したときにAFセンサ74が自動で積分処理
を終了する自動終了モードの設定を示す。
D122 is integration mode data indicating a mode relating to the end of integration. When D122 is 1, it indicates the setting of the external end mode in which integration is ended by an instruction from the outside, and when D122 is 0, the peak is set. The sensor data in the selected area has a predetermined integration end value (integration end voltage) V
The setting of the automatic end mode in which the AF sensor 74 automatically ends the integration process when reaching END is shown.

【0093】D123は、自動終了モードの場合に積分
終了値VENDを設定する自動積分終了電圧設定データ
であり、本実施の形態では、D123が1の場合には電
圧Lの設定を示し、D123が0の場合には電圧Hの設
定を示す。
D123 is automatic integration end voltage setting data for setting the integration end value VEND in the automatic end mode. In this embodiment, when D123 is 1, the voltage L is set, and D123 is In the case of 0, the setting of the voltage H is shown.

【0094】D124〜D126は、基準電圧VREF
を設定するVREF選択データである。3ビットのデー
タによって8種類の基準電圧を設定することができる。
D127は、制御データの終了を示す終了データであ
り、常に1に設定される。
D124 to D126 are reference voltages VREF.
Is VREF selection data for setting. Eight kinds of reference voltages can be set by 3-bit data.
D127 is end data indicating the end of the control data and is always set to 1.

【0095】次に、ピーク選択領域設定データD0〜D
111及びピーク選択領域数データD112〜D118
について詳説する。Rセンサ94及びLセンサ96は、
それぞれ図18に示すようにセンサ番号1から234ま
での234個のセルによって構成されている。各センサ
94、96の左右5つのセル(センサ番号1〜5、及
び、センサ番号230〜234)はダミーセルであり、
実際に有効なセル(有効画素)はセンサ番号6〜229
までの224個となっている。
Next, the peak selection area setting data D0 to D
111 and peak selection area number data D112 to D118
Will be explained in detail. The R sensor 94 and the L sensor 96 are
As shown in FIG. 18, each is composed of 234 cells of sensor numbers 1 to 234. The left and right five cells (sensor numbers 1 to 5 and sensor numbers 230 to 234) of each of the sensors 94 and 96 are dummy cells,
Actually effective cells (effective pixels) are sensor numbers 6 to 229.
Up to 224.

【0096】CPU60及びAFセンサ74の処理上に
おいて、有効画素範囲のセンサ番号6〜229のセル
は、隣接する4つずつセルを1ブロックとしてブロック
単位で管理されており、同図に示すようにLセンサ96
のセンサ番号229からセンサ番号6まで順に4つ単位
でブロック番号D0、D1、…、D55(ブロック数5
6)が割り当てられ、Rセンサ94のセンサ番号229
からセンサ番号6まで順に4つ単位でブロック番号D5
6、D57、…、D111(ブロック数56)が割り当
てられている。
In the processing of the CPU 60 and the AF sensor 74, the cells of the sensor numbers 6 to 229 in the effective pixel range are managed on a block-by-block basis with four adjacent cells as one block, as shown in FIG. L sensor 96
, From sensor number 229 to sensor number 6 in units of four, block numbers D0, D1, ..., D55 (5 blocks)
6) is assigned, the sensor number 229 of the R sensor 94
Block number D5 in units of 4 from sensor number 6 to sensor number 6
6, D57, ..., D111 (56 blocks) are assigned.

【0097】CPU60とAFセンサ74との間で制御
データとして送受信されるD0〜D111のデータは、
このようにして割り当てられたブロック番号に対応して
おり、ピーク選択領域設定データD0〜D111を図1
9のように配列して示すと、Lセンサ96についての設
定データは、点線で囲まれていないD0〜D55であ
り、Rセンサ94についての設定データは、点線で囲ま
れたD56〜D111である。例えば、設定データD
0、D56は、それぞれLセンサ96、Rセンサ94の
センサ番号226〜229についての設定データを示
し、設定データD55、D111は、それぞれLセンサ
96、Rセンサ94のセンサ番号6〜9についての設定
データを示す。
The data of D0 to D111 transmitted and received as control data between the CPU 60 and the AF sensor 74 are
The peak selection area setting data D0 to D111 corresponding to the block numbers thus assigned are shown in FIG.
9, the setting data for the L sensor 96 is D0 to D55 which are not surrounded by the dotted line, and the setting data for the R sensor 94 is D56 to D111 which is surrounded by the dotted line. . For example, setting data D
0 and D56 indicate setting data for the sensor numbers 226 to 229 of the L sensor 96 and the R sensor 94, respectively, and setting data D55 and D111 set to the sensor numbers 6 to 9 of the L sensor 96 and the R sensor 94, respectively. Show the data.

【0098】ピーク選択領域設定データD0〜D111
は、その設定データに対応するブロック番号の4つのセ
ルをピーク選択領域内のセルとして設定するか否かを示
しており、設定データが1のときは、その設定データに
対応するブロック番号の4つのセルはピーク選択領域内
のセルとして設定され、設定データが0のときは、その
設定データに対応するブロック番号の4つのセルはピー
ク選択領域外のセルとして設定される。例えば、設定デ
ータD0が1の場合、Lセンサ96のセル229、22
8、227、226は、ピーク選択領域内のセルとして
設定される。
Peak selection area setting data D0 to D111
Indicates whether or not the four cells having the block number corresponding to the setting data are set as cells in the peak selection area. When the setting data is 1, the block number 4 corresponding to the setting data is set to 4. One cell is set as a cell within the peak selection area, and when the setting data is 0, four cells with block numbers corresponding to the setting data are set as cells outside the peak selection area. For example, when the setting data D0 is 1, the cells 229, 22 of the L sensor 96
8, 227 and 226 are set as cells in the peak selection area.

【0099】また、ピーク選択領域設定データと共に制
御データとして送受信されるピーク選択領域数データD
112〜D118は、ピーク選択領域設定データにより
ピーク選択領域として設定するブロック数を2進数で示
したものであり、図20に示すように、D112を最上
位ビット、D118を最下位ビットとした7ビットデー
タにより、ピーク選択領域として設定するブロック数が
表される。同図(A)に示すようにD115のみが1の
場合にはピーク選択領域として設定するブロック数は8
であり、同図(B)に示すようにD112〜D114が
1、D115〜D118が0の場合にはピーク選択領域
として設定するブロック数は112である。
The peak selection area number data D transmitted and received as control data together with the peak selection area setting data D
Reference numerals 112 to D118 represent the number of blocks to be set as the peak selection area in accordance with the peak selection area setting data in a binary number. As shown in FIG. 20, D112 is the most significant bit and D118 is the least significant bit. The bit data represents the number of blocks set as the peak selection area. As shown in (A) of the figure, when only D115 is 1, the number of blocks set as the peak selection region is 8.
When D112 to D114 are 1 and D115 to D118 are 0 as shown in FIG. 7B, the number of blocks set as the peak selection region is 112.

【0100】次に、ピーク選択領域設定データの生成手
順について説明する。ピーク選択領域は、図13に示し
たように領域〜のいずれかに設定される。各領域
〜をピーク選択領域として設定する際のピーク選択領
域設定データは、以下のように生成される。
Next, the procedure for generating the peak selection area setting data will be described. The peak selection area is set to any one of areas 1 to 3 as shown in FIG. The peak selection area setting data when setting each area (1) to (3) as the peak selection area is generated as follows.

【0101】例えば、図21に示すようにRセンサ94
又はLセンサ96のセンサ領域Sにおいて領域P(斜線
部分)をピーク選択領域として設定する場合、領域Pの
右端と左端のセルのセンサ番号を求め、センサ番号が領
域Pの右端と左端のセルのセンサ番号の間にあるセルを
ピーク選択領域内のセルとする。
For example, as shown in FIG. 21, the R sensor 94
Alternatively, when the region P (hatched portion) in the sensor region S of the L sensor 96 is set as the peak selection region, the sensor numbers of the cells at the right and left ends of the region P are obtained, and the sensor numbers of the cells at the right and left ends of the region P are calculated. The cells between the sensor numbers are the cells in the peak selection area.

【0102】ここで、各セルのセンサ番号が各セルのア
ドレスを示すものとし、特に領域Pの右端のアドレスを
ピーク選択開始アドレスPS、左端のアドレスをピーク
選択終了アドレスPEとする。
Here, it is assumed that the sensor number of each cell indicates the address of each cell, and in particular, the right end address of the area P is the peak selection start address PS and the left end address is the peak selection end address PE.

【0103】一方、領域Pを特定する情報として領域P
の右端のアドレスS1と、領域P内の所定セルのアドレ
スS2と、アドレスS2のセルから領域Pの左端のセル
までのセル数(センサ数)Dが予め参照データとして与
えられているとする。このとき、領域Pのピーク選択領
域開始アドレスPSとピーク選択領域終了アドレスPE
は、次式、
On the other hand, the area P is used as information for specifying the area P.
It is assumed that the address S1 at the right end, the address S2 of a predetermined cell in the region P, and the number of cells (the number of sensors) D from the cell at the address S2 to the leftmost cell of the region P are given in advance as reference data. At this time, the peak selection area start address PS and the peak selection area end address PE of the area P
Is

【0104】[0104]

【数2】PS=S1 …(2) PE=S2+D−1…(3) により求めることができる。尚、Rセンサ94において
ピーク選択領域とする領域に対する上記ピーク選択開始
アドレスPS、ピーク選択終了アドレスPE、参照デー
タS1、S2、Dを、それぞれPSR、PER、SR
1、SR2、DRとし、Lセンサ96においてピーク選
択領域とする領域に対する上記ピーク選択開始アドレス
PS、ピーク選択終了アドレスPE、参照データS1、
S2、Dを、それぞれPSL、PEL、SL1、SL
2、DLとして識別する。
[Equation 2] PS = S1 (2) PE = S2 + D-1 (3) In the R sensor 94, the peak selection start address PS, the peak selection end address PE, and the reference data S1, S2, D for the area to be the peak selection area are PSR, PER, SR, respectively.
1, SR2, DR, and the peak selection start address PS, peak selection end address PE, and reference data S1 for the area to be the peak selection area in the L sensor 96.
S2 and D are PSL, PEL, SL1 and SL respectively
2, identified as DL.

【0105】図13に示した各領域〜をピーク選択
領域として設定する場合について具体的に説明すると、
各領域〜をピーク選択領域として設定する際の参照
データとして、Rセンサ94及びLセンサ96の各分割
エリアの右端のセルのアドレスと、各分割エリアの採用
センサ数(セル数)が用いられる。
A specific description will be given of the case where each of the areas shown in FIG. 13 is set as the peak selection area.
The address of the cell at the right end of each divided area of the R sensor 94 and the L sensor 96 and the number of adopted sensors (the number of cells) of each divided area are used as reference data when setting each area to the peak selection area.

【0106】本実施の形態においてRセンサ94及びL
センサ96に対して採用される各分割エリアの右端のセ
ルのアドレス及び各分割エリアの採用センサ数の具体的
数値例を図22に示す。尚、Rセンサ94については括
弧なしの数値で示し、Lセンサ96については括弧付き
の数値で示している。
In the present embodiment, the R sensor 94 and L
FIG. 22 shows a specific numerical example of the address of the cell at the right end of each divided area used for the sensor 96 and the number of adopted sensors in each divided area. The R sensor 94 is indicated by a numerical value without parentheses, and the L sensor 96 is indicated by a numerical value in parentheses.

【0107】例えば、領域をピーク選択領域とする場
合、Rセンサ94についての参照データSR1、SR
2、DRは、それぞれ左中エリアの右端のセルのアドレ
ス46、右中エリアの右端のセルのアドレス126、右
中エリアの採用センサ数62である。同様にLセンサ9
6にについての参照データSL1、SL2、DLは、そ
れぞれ左中エリアの右端のセルのアドレス48、右中エ
リアの右端のセルのアドレス128、右中エリアの採用
センサ数62である。これらの参照データを上式(2)、
(3)に代入すると、Rセンサ94及びLセンサ96にお
ける領域のピーク選択開始アドレスPSR、PSL、
ピーク選択終了アドレスPER、PELが算出される。
即ち、
For example, when the area is the peak selection area, the reference data SR1 and SR for the R sensor 94 are used.
2 and DR are the address 46 of the cell at the right end of the middle left area, the address 126 of the cell at the right end of the middle right area, and the number of adopted sensors 62 in the middle right area, respectively. Similarly, L sensor 9
The reference data SL1, SL2, and DL for 6 are the address 48 of the cell at the right end of the left middle area, the address 128 of the cell at the right end of the right middle area, and the adopted sensor number 62 of the right middle area, respectively. Using these reference data as the above formula (2),
Substituting into (3), the peak selection start addresses PSR, PSL of the area in the R sensor 94 and the L sensor 96,
The peak selection end addresses PER and PEL are calculated.
That is,

【0108】[0108]

【数3】PSR=46 PER=126+62−1=187 PSL=48 PEL=128+62−1=189 が算出される。従って、領域をピーク選択領域とする
場合にはRセンサ94についてはセンサ番号46〜18
7のセルがピーク選択領域内のセルとすることが求ま
り、Lセンサ96についてはセンサ番号48〜189の
セルがピーク選択領域内のセルとすることが求まる。
## EQU3 ## PSR = 46 PER = 126 + 62-1 = 187 PSL = 48 PEL = 128 + 62-1 = 189 is calculated. Therefore, when the area is set as the peak selection area, the sensor numbers 46 to 18 for the R sensor 94 are used.
It is determined that the cell No. 7 is a cell within the peak selection area, and for the L sensor 96, the cells with sensor numbers 48 to 189 are each required to be a cell within the peak selection area.

【0109】領域以外の領域〜をピーク選択領域
とする場合についても上述と同様にしてピーク選択開始
アドレスPSR、PSL、ピーク選択終了アドレスPE
R、PELを算出することができる。即ち、設定しよう
とするピーク選択領域内において、右端にある分割エリ
ア内の右端のアドレスを参照データSR1、SL1と
し、左端にある分割エリア内の右端のアドレスを参照デ
ータSR2、SL2とする。また、その左端にある分割
エリアの採用センサ数をDR、DLとする。そして、上
式(2)、(3)にそれらの値を代入することによって、各領
域〜をピーク選択領域として設定する場合のピーク
選択開始アドレスPSR、PSL及びピーク選択終了ア
ドレスPER、PELを算出することができる。図22
にも示されているように、領域の場合には、PSR=
6、PER=227、PSL=8、PEL=229、領
域の場合には、PSR=86、PER=147、PS
L=88、PEL=149、領域の場合には、PSR
=46、PER=107、PSL=48、PEL=10
9、領域の場合には、PSR=126、PER=18
7、PSL=128、PEL=189、領域の場合に
は、PSR=6、PER=107、PSL=8、PEL
=109、領域の場合には、PSR=126、PER
=227、PSL=128、PEL=229となる。
In the case where the areas other than the area 1 to 3 are set as the peak selection area, the peak selection start addresses PSR, PSL, and the peak selection end address PE are similarly set as described above.
R and PEL can be calculated. That is, in the peak selection area to be set, the rightmost address in the rightmost divided area is set as the reference data SR1 and SL1, and the rightmost address in the leftmost divided area is set as the reference data SR2 and SL2. Further, the numbers of adopted sensors in the divided area at the left end are DR and DL. Then, by substituting these values into the above equations (2) and (3), the peak selection start addresses PSR and PSL and the peak selection end addresses PER and PEL in the case of setting each area to as the peak selection area are calculated. can do. FIG. 22
, Also in the case of regions, PSR =
6, PER = 227, PSL = 8, PEL = 229, in the case of a region, PSR = 86, PER = 147, PS
L = 88, PEL = 149, PSR in case of area
= 46, PER = 107, PSL = 48, PEL = 10
In case of 9, area, PSR = 126, PER = 18
7, PSL = 128, PEL = 189, in the case of a region, PSR = 6, PER = 107, PSL = 8, PEL
= 109, PSR = 126, PER in case of area
= 227, PSL = 128, and PEL = 229.

【0110】尚、右エリア、右中エリア、中央エリア、
左中エリア、左エリアの順に、Rセンサ94における各
分割エリアの右端のセルのアドレスをRSR、RMS
R、MSR、LMSR、LSR、各エリアの採用センサ
数をRWR、RMWR、MWR、LMWR、LWRと
し、また、Lセンサ96における各分割エリアの右端の
セルのアドレスをRSL、RMSL、SL、LMSL、
LSL、各エリアの採用センサ数をRWL、RMWL、
MWL、LMWL、LWLとすると、図23に示すよう
に各領域〜をピーク選択領域とする場合に上記SR
1、SR2、SL1、SL2、DR、DLに代入するア
ドレス及びセンサ数が対応する。
The right area, the right middle area, the central area,
The address of the cell at the right end of each divided area in the R sensor 94 in the order of the middle left area and the left area is RSR, RMS
R, MSR, LMSR, LSR, the number of adopted sensors in each area is RWR, RMWR, MWR, LMWR, LWR, and the address of the rightmost cell of each divided area in the L sensor 96 is RSL, RMSL, SL, LMSL,
LSL, the number of sensors used in each area is RWL, RMWL,
Assuming MWL, LMWL, and LWL, the above-mentioned SR is applied when each region to is a peak selection region as shown in FIG.
1, SR2, SL1, SL2, DR, and the address assigned to DL and the number of sensors correspond to each other.

【0111】以上のようにして、ピーク選択領域とする
領域のピーク選択開始アドレスPSとピーク選択終了ア
ドレスPEを得ると、次に図18のように4つのセルを
1ブロックとしたブロック番号D0〜D55、D56〜
D111によりピーク選択領域の範囲を求める。このと
き、ピーク選択開始アドレスPSとピーク選択終了アド
レスPEを含むブロック番号の4つのセルは、ピーク選
択領域内のセルとする。
As described above, when the peak selection start address PS and the peak selection end address PE of the area to be used as the peak selection area are obtained, next, as shown in FIG. D55, D56 ~
The range of the peak selection area is obtained by D111. At this time, the four cells of the block number including the peak selection start address PS and the peak selection end address PE are cells in the peak selection area.

【0112】そこで、Lセンサ96とRセンサ94のそ
れぞれについてピーク選択領域の左端のブロック番号を
ピーク選択開始ブロック番号DSL、DSRとし、ピー
ク選択領域の右端のブロック番号をピーク選択終了ブロ
ック番号DEL、DERとすると、次式、
Therefore, for each of the L sensor 96 and the R sensor 94, the block number at the left end of the peak selection region is the peak selection start block number DSL, DSR, and the block number at the right end of the peak selection region is the peak selection end block number DEL, Assuming DER,

【0113】[0113]

【数4】 DSL=INT((229−PEL)/4) …(4) DEL=55−INT((PSL−6)/4) …(5) DSR=56+INT((229−PER)/4) …(6) DER=111−INT((PSR−6)/4) …(7) によりDSL、DEL、DSR、DERが得られる。た
だし、DSL<0の場合は、DSL=0とし、DEL>
55の場合は、DEL=55とし、DSR<56の場合
は、DSR=56とし、DER>111の場合は、DE
R=111とする。
(4) DSL = INT ((229-PEL) / 4) (4) DEL = 55-INT ((PSL-6) / 4) (5) DSR = 56 + INT ((229-PER) / 4) (6) DER = 111-INT ((PSR-6) / 4) (7) gives DSL, DEL, DSR, and DER. However, if DSL <0, set DSL = 0 and then DEL>
In the case of 55, DEL = 55, in the case of DSR <56, DSR = 56, and in the case of DER> 111, DE
Let R = 111.

【0114】ピーク選択領域は、Rセンサ94について
は、ブロック番号DSRからDERまでの範囲となり、
Lセンサ96については、ブロック番号DSLからDE
Lまでの範囲となるため、ピーク選択領域設定データD
0〜D111は、それらの範囲において1に設定され、
他の範囲で0に設定される。
For the R sensor 94, the peak selection area is the range from the block number DSR to DER,
For the L sensor 96, block numbers DSL to DE
Since the range is up to L, the peak selection area setting data D
0-D111 is set to 1 in those ranges,
It is set to 0 in other ranges.

【0115】また、このとき、ピーク選択領域数をDP
Sとすると、ピーク選択領域数DPSは、次式、
At this time, the number of peak selection areas is set to DP.
Let S be the number of peak selection regions DPS,

【0116】[0116]

【数5】 DPS=DEL−DSL+1+DER−DSR+1 …(8) により得られる。ピーク選択領域数データD112〜D
118は、DPSを二進数により表すことで得られる。
## EQU5 ## DPS = DEL-DSL + 1 + DER-DSR + 1 (8) Peak selection area number data D112 to D
118 is obtained by expressing DPS by a binary number.

【0117】図24は、図13の各領域〜をピーク
選択領域とする場合に、図22に示した数値例から上式
(4)〜(8)により生成されるピーク選択領域設定データD
0〜D111及びピーク選択領域数データD112〜D
118を示した図である。例えば、領域をピーク選択
領域とする場合、ピーク選択開始アドレスPSR、PS
Lはそれぞれ46、48であり、ピーク選択終了アドレ
スPER、PELはそれぞれ187、189であるか
ら、これらの数値を上式(4)〜(7)に代入すると、ピーク
選択開始ブロック番号DSL、DSRは、それぞれ1
0、66となり、ピーク選択終了ブロック番号DEL、
DERは、それぞれ45、101となる。従って、図2
4の領域についてのピーク選択領域設定データD0〜
D111に示すように、D0〜D9が0、D10〜D4
5が1、D46〜D55が0、D56〜D65が0、D
66〜D101が1、D102〜D111が0となる。
また、上式(8)により、領域のピーク選択領域数は1
12となり、図24の領域についてのピーク選択領域
数データD112〜D118に示すように、各データ値
は、順に1001000となる。
FIG. 24 shows the above equation based on the numerical example shown in FIG. 22 when each of the areas from FIG.
Peak selection area setting data D generated by (4) to (8)
0 to D111 and peak selection area number data D112 to D
It is the figure which showed 118. For example, when the area is the peak selection area, the peak selection start addresses PSR, PS
Since L is 46 and 48, respectively, and peak selection end addresses PER and PEL are 187 and 189, respectively, substituting these numerical values into the above equations (4) to (7), the peak selection start block numbers DSL and DSR. Are each 1
0 and 66, and the peak selection end block number DEL,
The DERs are 45 and 101, respectively. Therefore, FIG.
Peak selection area setting data D0 for area 4
As shown in D111, D0 to D9 are 0, D10 to D4
5 is 1, D46 to D55 is 0, D56 to D65 is 0, D
66 to D101 are 1 and D102 to D111 are 0.
Also, the number of peak selection regions is 1 according to the above equation (8).
12, and as shown in the peak selection region number data D112 to D118 for the region of FIG. 24, each data value becomes 1001000 in order.

【0118】以上のように各領域〜をピーク選択領
域として設定する際に、ピーク選択領域設定データD0
〜D111やピーク選択領域数データD112〜D11
8を、各分割エリアの範囲を示すアドレス情報を参照デ
ータとして生成するようにしているため、予め図24に
示したような膨大なデータをメモリに登録しておく必要
がなく、メモリを節約することができる。尚、上記実施
の形態では、各分割エリアの範囲を示すアドレス情報と
して各分割エリアの右端のアドレスと採用センサ数を参
照する場合について説明したが、各分割エリアの範囲を
示すアドレス情報として各分割エリアの右端と左端のア
ドレスを参照データとしてピーク選択領域設定データD
0〜D111やピーク選択領域数データD112〜D1
18を生成することもできる。また、各分割エリアの範
囲を示すアドレス情報であれば、上記以外のアドレス情
報であってもピーク選択領域設定データD0〜D111
やピーク選択領域数データD112〜D118を生成す
ることができる。
As described above, when each of the areas 1 to 3 is set as the peak selection area, the peak selection area setting data D0 is set.
To D111 and peak selection area number data D112 to D11
Since 8 is generated as the reference data using the address information indicating the range of each divided area, it is not necessary to register a huge amount of data as shown in FIG. 24 in the memory in advance, which saves the memory. be able to. In the above embodiment, the case where the right end address of each divided area and the number of adopted sensors are referred to as the address information indicating the range of each divided area has been described. Peak selection area setting data D with the right and left edge addresses of the area as reference data
0 to D111 and peak selection area number data D112 to D1
18 can also be generated. Further, as long as it is address information indicating the range of each divided area, even if it is address information other than the above, the peak selection area setting data D0 to D111
The peak selection area number data D112 to D118 can be generated.

【0119】次に、AFセンサ74から/AFEND信
号が正常に出力されない場合における処理について説明
する。例えば、図14のステップS52、ステップS5
6、ステップS58における各積分処理において、通常
は、図17に示したように/AFRST信号が0から1
に切り替わった後(時刻T40参照)、所定時間経過後
(センサ感度が高感度の場合には150μs後、低感度
の場合には30μs後)に積分が開始されて/AFEN
D信号が1から0に切り替わる(時刻T50参照)。そ
して、ピーク選択領域内のセンサデータのピーク値が積
分終了値に達すると、/AFEND信号が0から1に切
り替わる(時刻T60参照)。CPU60はこの/AF
END信号の0から1への切り替わりを積分終了信号と
して検知し、積分終了を認識する。
Next, the processing when the / AFEND signal is not normally output from the AF sensor 74 will be described. For example, step S52 and step S5 in FIG.
6. In each integration process in step S58, the / AFRST signal is normally 0 to 1 as shown in FIG.
After switching to (see time T40), integration is started after a lapse of a predetermined time (150 μs when the sensor sensitivity is high sensitivity, 30 μs when the sensor sensitivity is low) / AFEN
The D signal switches from 1 to 0 (see time T50). When the peak value of the sensor data in the peak selection area reaches the integration end value, the / AFEND signal switches from 0 to 1 (see time T60). CPU60 is this / AF
The change of the END signal from 0 to 1 is detected as an integration end signal, and the end of integration is recognized.

【0120】これに対して、被写体輝度が低い場合や、
被写体輝度が一定輝度を超えている場合、又は、/AF
END信号の接続エラーの場合には、最大許容積分時間
が経過しても/AFEND信号が正常に出力されない場
合がある。
On the other hand, when the subject brightness is low,
If the subject brightness exceeds a certain level, or / AF
In the case of a connection error of the END signal, the / AFEND signal may not be normally output even after the maximum allowable integration time has elapsed.

【0121】被写体輝度が低い場合に/AFEND信号
が正常に出力されない(/AFEND信号が0から1へ
切り替わらない)のは、センサデータのピーク値が積分
終了値に達しないためである。例えば、被写体が明るい
場合には、図26(A)に示すように/AFEND信号
が1から0に切り替わった後(積分処理が開始された
後)、最大許容積分時間が経過する前に、ピーク選択領
域におけるセンサデータのピーク値が積分終了値に達す
るため(同図MDATA信号参照)、/AFEND信号
が0から1に切り替わる(積分終了信号が出力され
る)。これに対して、被写体が暗い場合には、図26
(C)に示すように/AFEND信号が1から0に切り
替わった後、最大許容積分時間が経過する前に、ピーク
選択領域におけるセンサデータのピーク値が積分終了値
に達しないため(同図MDATA信号参照)、最大許容
積分時間が経過するまでに/AFEND信号は0から1
に切り替わらず、積分終了信号は出力されない。尚、最
大許容積分時間に達するとCPU60からAFセンサ7
4に強制的に積分処理を終了させる信号(図26(B)
のAFAD=“L”にする)が与えられるため、その信
号により最大許容積分時間経過時に積分処理が終了し、
/AFEND信号が0から1に切り替わる。
The reason why the / AFEND signal is not normally output when the subject brightness is low (the / AFEND signal does not switch from 0 to 1) is that the peak value of the sensor data has not reached the integration end value. For example, when the subject is bright, a peak is generated after the / AFEND signal is switched from 1 to 0 (after the integration process is started) and before the maximum allowable integration time elapses, as shown in FIG. Since the peak value of the sensor data in the selected area reaches the integration end value (see the MDATA signal in the same figure), the / AFEND signal switches from 0 to 1 (the integration end signal is output). On the other hand, when the subject is dark, FIG.
As shown in (C), since the / AFEND signal is switched from 1 to 0 and before the maximum allowable integration time elapses, the peak value of the sensor data in the peak selection area does not reach the integration end value (MDATA in the figure). Signal), / AFEND signal is 0 to 1 before the maximum allowable integration time elapses
The integration end signal is not output without switching to. When the maximum allowable integration time is reached, the CPU 60 causes the AF sensor 7
4 signal forcibly ending the integration process (FIG. 26 (B)).
AFAD = “L”) is given, the integration processing is terminated by the signal when the maximum allowable integration time has elapsed,
The / AFEND signal switches from 0 to 1.

【0122】一方、被写体輝度が一定輝度を超えている
場合に/AFEND信号が正常に出力されない(/AF
END信号が1から0へ切り替わらない、及び、/AF
END信号が0から1へ切り替わらない)のは、AFセ
ンサ74の特性上の問題である。即ち、正常に積分処理
が行われ、センサデータのピーク値が積分終了値に達し
ていても被写体輝度が極めて高い場合にはAFセンサ7
4の特性上、/AFEND信号が正常に出力されない場
合があり、例えば、/AFEND信号が次のような出力
形態となることがある(特に、図14ステップS32の
ゲイン高感度積分時に生じやすい)。被写体輝度がある
一定輝度を超えた場合、図25に示すように/AFRS
T信号が0から1に切り替わってから所定時間経過後の
積分開始時に本来0に切り替わるべき/AFEND信号
が0に切り替わらなくなる(同図(A)の場合)。この
場合には当然に積分処理の終了時においても/AFEN
D信号は0から1に切り替わることがなく積分終了信号
は出力されない。一方、これよりも被写体輝度が高くな
ると、/AFEND信号が正常に出力されるようになる
が(同図(B)の場合)、積分時間が極めて短いために
/AFEND信号の1から0への切替わり及び0から1
への切替わりを正常に認識できない場合がある。更に被
写体輝度が高くなりセンサの動作限界を超えると、/A
FEND信号が1から0に切り替わったまま積分が終了
しても1に切り替わらなくなり(同図(C)の場合)、
この場合も積分終了信号が出力されない。
On the other hand, the / AFEND signal is not normally output when the subject brightness exceeds a certain brightness (/ AF
END signal does not switch from 1 to 0, and / AF
The fact that the END signal does not switch from 0 to 1) is a problem in the characteristics of the AF sensor 74. That is, if the integration processing is normally performed and the subject brightness is extremely high even if the peak value of the sensor data reaches the integration end value, the AF sensor 7
In some cases, the / AFEND signal may not be output normally due to the characteristics of No. 4, and for example, the / AFEND signal may have the following output form (particularly, this is likely to occur during the gain sensitive integration in step S32 of FIG. 14). . When the subject brightness exceeds a certain level, as shown in FIG. 25, / AFRS
The / AFEND signal, which should originally be switched to 0 at the start of integration after a predetermined time has elapsed after the T signal was switched from 1 to 1, does not switch to 0 (in the case of FIG. 9A). In this case, of course, / AFEN is set even at the end of the integration process.
The D signal does not switch from 0 to 1, and the integration end signal is not output. On the other hand, when the subject brightness becomes higher than this, the / AFEND signal comes to be output normally (in the case of FIG. 7B), but since the integration time is extremely short, the / AFEND signal changes from 1 to 0. Switching and 0 to 1
The switch to may not be recognized normally. When the subject brightness becomes higher and the sensor operation limit is exceeded, / A
Even if the integration is completed while the FEND signal is switched from 1 to 0, it will not be switched to 1 (in the case of (C) in the figure),
In this case also, the integration end signal is not output.

【0123】このように被写体輝度が一定輝度を超える
と(特に感度高で積分を実行した場合(S52))、輝
度が高くなるに従って、 (a) /AFEND信号が1から0に切り替わらない場
合。 (b) /AFEND信号が1から0に切り替わった後、
/AFEND信号が0から1へとの切り替わりが非常に
短い場合。 (c) /AFDEN信号が1から0となるが、その後/
AFEND信号が0から1へと切り替わらない場合。 の3通り、/AFEND信号が正常に出力されない場合
がある。
In this way, when the subject brightness exceeds a certain brightness (especially when the integration is executed with high sensitivity (S52)), (a) / AFEND signal does not switch from 1 to 0 as the brightness increases. (b) After the / AFEND signal switches from 1 to 0,
When the / AFEND signal switches from 0 to 1 for a very short time. (c) / AFDEN signal goes from 1 to 0, but then /
When the AFEND signal does not switch from 0 to 1. In some cases, the / AFEND signal may not be output normally.

【0124】/AFEND信号が1から0に切り替わら
ない場合は、ある一定輝度を超えた場合(この場合は/
AFEND信号の接続エラーの場合も考えられる)と想
定し、後に示すMDATAにより、実際にある一定輝度
を超えていたかを判断する。
If the / AFEND signal does not switch from 1 to 0, it exceeds a certain brightness (in this case, /
It is assumed that a connection error of the AFEND signal is also possible), and it is determined by MDATA described later whether or not the brightness has actually exceeded a certain constant level.

【0125】また、ある一定輝度よりも被写体輝度が高
くなり、/AFEND信号が1から0に切り替わった
後、/AFEND信号が0から1へとの切り替わりが非
常に短く、CPUに於いて正常に/AFEND信号を認
識できない場合も、CPU側から見ると上記の/AFE
ND信号が1から0に切り替わらないと認識するため、
ある一定輝度を超えた場合と推定し、後に示すMDAT
Aにより、実際にある一定輝度を超えていたかを判断す
る。
Also, after the subject brightness becomes higher than a certain level and the / AFEND signal switches from 1 to 0, the switching of the / AFEND signal from 0 to 1 is very short and the CPU normally operates. Even if the / AFEND signal cannot be recognized, the above / AFE is seen from the CPU side.
Since it recognizes that the ND signal does not switch from 1 to 0,
It is estimated that the brightness exceeds a certain level, and the
From A, it is determined whether the brightness actually exceeds a certain level.

【0126】更に被写体輝度が高くなり、/AFEND
信号が1から0となり、その後/AFEND信号が0か
ら1へと切り替わらない場合は被写体輝度が低い場合で
丁度最大許容積分時間で積分が終了した場合と、超高輝
度の場合で/AFEND信号が0から1へと切り替わら
ない場合との判断ができなくなる(センサピーク(後に
示すMDATAの値)が共に最小値のため)。
The subject brightness becomes higher and / AFEND
If the signal changes from 1 to 0 and then the / AFEND signal does not switch from 0 to 1, the / AFEND signal changes when the subject brightness is low and the integration ends just within the maximum allowable integration time, and when the brightness is extremely high. It becomes impossible to judge that the state does not switch from 0 to 1 (because the sensor peak (the value of MDATA shown later) is the minimum value).

【0127】そこで、図14のステップS50において
測距対象物が測光センサにより超高輝度と判定された場
合は、図14のステップS52(感度高積分)を実施せ
ず、ステップS56の3分割ゲイン低積分を実施し上記
誤判断を防ぐこととしている。
Therefore, in step S50 of FIG. 14, when the object to be measured is determined to have ultra-high brightness by the photometric sensor, step S52 (high sensitivity integration) of FIG. 14 is not executed and the three-division gain of step S56 is executed. A low integration is performed to prevent the above-mentioned misjudgment.

【0128】ところで、回路の不具合により/AFEN
D信号が1から0に切り替わらない場合も想定される。
By the way, due to a circuit defect, / AFEN
It is also assumed that the D signal does not switch from 1 to 0.

【0129】ここで、(a)/AFEND信号のみの接
続エラーの場合(正常に積分は実施されるが、積分開始
及び積分終了が判断できない場合)及び(b)回路の積
分動作エラーの場合(/AFEND信号以外の接続エラ
ーであり、VCC、GND、/AFCEN、/AFRS
T、AFCLKのいずれかの接続エラーにより積分が実
施されない場合、及び、AFセンサ破損等により積分が
実施されない場合)が考えられる。
Here, in the case of (a) / connection error of AFEND signal only (when integration is normally performed, but integration start and integration end cannot be determined) and (b) circuit integration operation error ( Connection error other than / AFEND signal, V CC , GND, / AFCEN, / AFRS
It is conceivable that the integration is not performed due to a connection error of either T or AFCLK, and the integration is not performed due to damage of the AF sensor).

【0130】/AFEND信号の接続エラーの場合も、
/AFEND信号が1から0に切り替わらず、/AFE
ND信号が正常に出力されない。このため、/AFEN
D信号が1から0に切り替わらない場合には、上述のよ
うに被写体輝度が一定輝度を超えている場合を想定する
だけでなく、/AFEND信号の接続エラーの場合も想
定する。そして、後に示すMDATAによりセンサデー
タが積分終了条件を満たすか否かを判断する。/AFE
ND信号の接続エラーの場合で、MDATAの値が、図
26(B)のMC_JDG以上(ほぼ初期値(VRE
F))となる場合(被写体輝度が極端に低く信号蓄積が
ほとんど行われていない場合)は、測距不能と判断す
る。
In case of connection error of / AFEND signal,
/ AFEND signal does not switch from 1 to 0
The ND signal is not output normally. Therefore, / AFEN
When the D signal does not switch from 1 to 0, not only the case where the subject brightness exceeds the constant brightness as described above is assumed, but also the case where a connection error of the / AFEND signal is assumed. Then, it is determined by MDATA described later whether or not the sensor data satisfies the integration end condition. / AFE
In the case of a connection error of the ND signal, the value of MDATA is not less than MC_JDG in FIG. 26B (almost the initial value (VRE
F)) (the subject brightness is extremely low and almost no signal is accumulated), it is determined that the distance measurement is impossible.

【0131】また、/AFEND信号の接続エラーの場
合で、MDATAの値が、図26(B)のMC_JDG
未満の場合(被写体輝度が極端に低くなく、ある程度信
号蓄積が行われている場合)は、測距を継続する。
In the case of a connection error of the / AFEND signal, the value of MDATA is MC_JDG in FIG. 26 (B).
If less than (subject luminance is not extremely low and signal accumulation is performed to some extent), distance measurement is continued.

【0132】また、回路の積分動作エラーの場合も、/
AFEND信号が1から0に切り替わらず、/AFEN
D信号が正常に出力されない。このため、/AFEND
信号が1から0に切り替わらない場合には、上述のよう
に被写体輝度が一定輝度を超えている場合を想定するだ
けでなく、回路の積分動作エラーの場合も想定する。そ
して、後に示すMDATAによりセンサデータが積分終
了条件を満たすか否かを判断する。回路の積分動作エラ
ーの場合は、MDATAの値が、ほぼ初期値(VRE
F)となる(積分が実施されていない)。この場合は、
測距不能と判断する。
Also, in the case of an integration operation error of the circuit, /
AFEND signal does not switch from 1 to 0, / AFEN
D signal is not output normally. Therefore, / AFEND
When the signal does not switch from 1 to 0, not only the case where the subject brightness exceeds a certain brightness as described above, but also the case where an integration operation error of the circuit is assumed. Then, it is determined by MDATA described later whether or not the sensor data satisfies the integration end condition. In the case of an integration operation error of the circuit, the value of MDATA is almost the initial value (VRE
F) (no integration has been performed). in this case,
Judge that distance measurement is impossible.

【0133】一方、被写体輝度がある一定輝度を超えて
いることに起因する場合にはMDATAの値が、約0.
6Vとなり(積分が終了している)、この場合は、測距
を継続する。
On the other hand, when the subject brightness exceeds a certain brightness, the value of MDATA is about 0.
It becomes 6 V (integration is completed), and in this case, distance measurement is continued.

【0134】尚、表現上、被写体輝度が低いためにセン
サデータが信号量不足となるような場合も積分処理が正
常に行われていない場合の範疇に属するものとする。ま
た、信号量不足のため測距不能と判断するのは、実際に
は、積分処理の開始からセンサデータのピーク値に全く
変化が生じなかった場合か、又は、極めて少ない変化し
か生じなかった場合であり、それ以外では測距可能な場
合もあるため積分処理は正常に行われていると判断し、
測距不能とは判断しないものとしている。
In terms of expression, the case where the signal amount of the sensor data is insufficient due to the low subject brightness is included in the category where the integration process is not normally performed. In addition, it is judged that distance measurement is impossible due to insufficient signal amount when, in fact, there is no change in the peak value of the sensor data from the start of integration processing, or when there is an extremely small change. Since it may be possible to measure the distance in other cases, it is determined that the integration process is normally performed.
It is not judged that distance measurement is impossible.

【0135】以上のように、積分時間が一定時間を経過
しても/AFEND信号から積分開始信号又は積分終了
信号が正常に出力されない場合には、積分処理が正常に
行われているか否かをMDATA信号により判定するこ
ととする。MDATA信号はピーク選択領域におけるセ
ンサデータのピーク値をアナログデータとして出力する
ものであるから、積分処理が行われていれば、図25に
示すように/AFEND信号が正常に出力されていなく
てもMDATA信号からピーク選択領域におけるセンサ
データのピーク値が正常に出力され、積分処理が正常に
行われているか否が容易に判断できる。
As described above, if the integration start signal or the integration end signal is not normally output from the / AFEND signal even after the integration time has passed a certain time, it is determined whether the integration processing is normally performed. It will be determined by the MDATA signal. Since the MDATA signal outputs the peak value of the sensor data in the peak selection area as analog data, if the integration process is performed, the / AFEND signal is not normally output as shown in FIG. It is possible to easily determine whether or not the peak value of the sensor data in the peak selection region is normally output from the MDATA signal and the integration process is normally performed.

【0136】CPU60の処理内容を具体的に説明する
と、図14のステップS52における一括ゲイン高積分
の実行時において、CPU60は、/AFRST信号を
0から1に切り替えた後(図17時刻T40参照)、一
定時間(例えば500μs)経過するまでに、AFセン
サ74から積分開始を示す/AFEND信号の1から0
への切り替わりを検出しなかった場合には、MDATA
信号を読み取る。そして、そのMDATA信号の値が積
分終了値に達していれば、/AFEND信号の1から0
への切り替わりが検出されなかった理由が被写体輝度が
高輝度(超高輝度)であることに起因するものと判断し
て、積分時間が2ms未満であった場合と同様に3分割
ゲイン低積分の処理(図14ステップS54、S56参
照)に移行する。一方、MDATA信号の値が所定値以
上の場合、即ち、積分開始時の値から全く変化していな
い場合(上記基準電圧VREFの値の場合)、又は、全
く変化がないのと同等とみなせる値の場合には、回路の
積分動作エラーとして測距不能とする。上述以外の場合
には通常通り積分処理を継続する。この後の処理は、図
14のフローチャートで説明したので省略する。
Specifically, the processing contents of the CPU 60 will be described. After executing the batch gain high integration in step S52 of FIG. 14, the CPU 60 switches the / AFRST signal from 0 to 1 (see time T40 in FIG. 17). , The AF sensor 74 indicates the start of integration before the fixed time (eg, 500 μs) elapses from 1 to 0 of the AFEND signal.
If the switch to is not detected, MDATA
Read the signal. Then, if the value of the MDATA signal has reached the integration end value, 1 to 0 of the / AFEND signal
It was judged that the reason that the changeover to was not detected was that the subject brightness was high brightness (ultra high brightness), and as with the case where the integration time was less than 2 ms, the 3-division gain low integration The process shifts to (see steps S54 and S56 in FIG. 14). On the other hand, when the value of the MDATA signal is greater than or equal to a predetermined value, that is, when the value at the start of integration has not changed at all (in the case of the value of the reference voltage VREF), or a value that can be regarded as equivalent to no change. In this case, the distance cannot be measured as an integration operation error of the circuit. In cases other than the above, the integration process is continued as usual. The subsequent processing has been described in the flowchart of FIG.

【0137】図14のステップS56における3分割ゲ
イン低積分の実行時において(図15のステップS8
4、S94、S102、S110、S118の各積分処
理の実行時において)、上述と同様にCPU60は、/
AFRST信号を0から1に切り替えた後、一定時間
(例えば500μs)経過するまでに、AFセンサ74
から積分開始を示す/AFEND信号の1から0への切
り替わりを検出しなかった場合には、MDATA信号を
読み取る。このときMDATA信号の値が所定値(図2
6(B)のMC_JDG)以上の場合、即ち、積分開始
時の値から全く変化していない場合(上記基準電圧VR
EFの値の場合)、又は、全く変化がないのと同等とみ
なせる値の場合には、そのときの積分処理におけるピー
ク選択領域を構成する分割エリアについて測距不能とす
る(回路の積分動作エラー)。一方、前記一定時間が経
過するまでに、AFセンサ74から積分開始を示す/A
FEND信号の1から0への切り替わりを検出した場合
には、最大許容積分時間を限度として積分処理を継続す
る。もし、最大許容積分時間が経過するまでにAFセン
サ74から積分終了を示す/AFEND信号の0から1
への切り替わりを検出しなかった場合には、最大許容積
分時間に達した時点でMDATA信号を読み取る。この
ときMDATA信号の値が所定値(図26(B)のMC
_JDG)以上の場合、即ち、積分開始時の値から全く
変化していない場合(上記基準電圧VREFの値の場
合)、又は、全く変化がないのと同等とみなせる値の場
合には、そのときの積分処理におけるピーク選択領域を
構成する分割エリアについてセンサデータの信号量不足
として測距不能とする(センサデータを無効とする)。
これ以外の場合は、正常に積分処理が行われたと判定
し、それまでCPU60に蓄積されたセンサデータを有
効として、その時点におけるセンサデータの読み出しを
行う。尚、最大許容積分時間が経過してもMDATA信
号の値が積分終了値に達していない場合には積分処理が
継続しているため、CPU60は、強制的にAFセンサ
74の積分処理を停止させてから(AFAD信号を1か
ら0に切り替えてから)、センサデータの読出しを行
う。
At the time of executing the 3-division gain low integration in step S56 of FIG. 14 (step S8 of FIG. 15).
4, S94, S102, S110, and S118), the CPU 60 executes
After the AFRST signal is switched from 0 to 1, the AF sensor 74 does not have to wait a certain time (for example, 500 μs).
When the switching of the / AFEND signal indicating the start of integration from 1 to 0 is not detected, the MDATA signal is read. At this time, the value of the MDATA signal is a predetermined value (see FIG.
6 (B) MC_JDG) or more, that is, when there is no change from the value at the start of integration (the reference voltage VR described above).
In the case of the value of EF) or a value which can be regarded as equivalent to no change at all, distance measurement is impossible for the divided areas forming the peak selection area in the integration processing at that time (integration operation error of the circuit). ). On the other hand, the AF sensor 74 indicates the start of integration by the time the fixed time elapses / A
When the switching of the FEND signal from 1 to 0 is detected, the integration process is continued within the maximum allowable integration time. If the maximum allowable integration time elapses, the AF sensor 74 indicates the end of integration / AFEND signal 0 to 1
When the switch to is not detected, the MDATA signal is read when the maximum allowable integration time is reached. At this time, the value of the MDATA signal is a predetermined value (MC in FIG. 26B).
_JDG) or more, that is, when there is no change from the value at the start of integration (in the case of the value of the reference voltage VREF), or when the value can be regarded as equivalent to no change at all, then The distance measurement is disabled for the divided areas forming the peak selection area in the integration processing (2), and the distance measurement is disabled (the sensor data is invalidated).
In other cases, it is determined that the integration process has been normally performed, the sensor data accumulated in the CPU 60 until then is validated, and the sensor data at that time is read. If the value of the MDATA signal has not reached the integration end value even after the maximum allowable integration time has elapsed, the integration processing is continuing, so the CPU 60 forcibly stops the integration processing of the AF sensor 74. Then (after switching the AFAD signal from 1 to 0), the sensor data is read.

【0138】図14のステップS58における一括ゲイ
ン低積分の実行時において、上述と同様にCPU60
は、/AFRST信号を0から1に切り替えた後、一定
時間(例えば500μs)経過するまでに、AFセンサ
74から積分終了を示す/AFEND信号の0から1へ
の切り替わりを検出しなかった場合には、MDATA信
号を読み取る。このとき、MDATA信号の値が所定値
以上の場合、即ち、積分開始時の値から全く変化してい
ない場合(上記基準電圧VREFの値の場合)、又は、
全く変化がないのと同等とみなせる値の場合には、測距
不能と判定する(回路の積分動作エラー)。尚、一括ゲ
イン低積分ではピーク選択領域は測距エリア全域に設定
されているため、測距エリアを構成する全ての分割エリ
アにおいて測距不能(測距自体が不能)となる。一方、
前記一定時間が経過するまでに、AFセンサ74から積
分開始を示す/AFEND信号の1から0への切り替わ
りを検出した場合には、最大許容積分時間を限度として
積分処理を継続する。もし、最大許容積分時間が経過す
るまでにAFセンサ74から積分終了を示す/AFEN
D信号の0から1への切り替わりを検出しなかった場合
には、最大許容積分時間に達した時点でMDATA信号
を読み取る。このときMDATA信号の値が所定値以上
の場合、即ち、積分開始時の値から全く変化していない
場合(上記基準電圧VREFの値の場合)、又は、全く
変化がないのと同等とみなせる値の場合には、センサデ
ータの信号量不足として測距不能とする(センサデータ
を無効とする)。これ以外の場合は、正常に積分処理が
行われたと判定し、それまでCPU60に蓄積されたセ
ンサデータを有効として、その時点におけるセンサデー
タの読み出しを行う。尚、この場合も上述と同様に最大
許容積分時間が経過してもMDATA信号の値が積分終
了値に達していない場合には積分処理が継続しているた
め、CPU60は、強制的にAFセンサ74の積分処理
を停止させてから(AFAD信号を1から0に切り替え
てから)、センサデータの読出しを行う。
When the collective gain low integration is executed in step S58 of FIG. 14, the CPU 60 operates in the same manner as described above.
If the AF sensor 74 does not detect the switching of the / AFEND signal indicating the end of integration from 0 to 1 within a fixed time (for example, 500 μs) after switching the / AFRST signal from 0 to 1. Reads the MDATA signal. At this time, when the value of the MDATA signal is equal to or greater than a predetermined value, that is, when the value at the start of integration has not changed at all (in the case of the value of the reference voltage VREF), or
If the value is equivalent to no change at all, it is determined that distance measurement is impossible (integral operation error of the circuit). Since the peak selection area is set in the entire distance measuring area in the case of low gain integration in a lump, the distance measurement cannot be performed (the distance measurement itself cannot be performed) in all the divided areas forming the distance measuring area. on the other hand,
When the AF sensor 74 detects the switching of the / AFEND signal indicating the start of integration from 1 to 0 before the fixed time elapses, the integration process is continued within the maximum allowable integration time. If the maximum allowable integration time elapses, the AF sensor 74 indicates the end of integration / AFEN
When the switching of the D signal from 0 to 1 is not detected, the MDATA signal is read when the maximum allowable integration time is reached. At this time, when the value of the MDATA signal is equal to or larger than a predetermined value, that is, when the value at the start of integration does not change at all (in the case of the value of the reference voltage VREF), or a value that can be regarded as no change at all. In the case, the distance cannot be measured because the signal amount of the sensor data is insufficient (the sensor data is invalidated). In other cases, it is determined that the integration process has been normally performed, the sensor data accumulated in the CPU 60 until then is validated, and the sensor data at that time is read. Also in this case, similarly to the above, if the value of the MDATA signal has not reached the integration end value even after the maximum allowable integration time has elapsed, the integration process is continuing, so the CPU 60 forces the AF sensor to operate. After stopping the integration process of 74 (after switching the AFAD signal from 1 to 0), the sensor data is read.

【0139】次に、CPU60によるセンサデータの読
出し処理について説明する。図17のタイミングチャー
トに示したように、CPU60は、例えば、AFセンサ
74から送信される/AFEND信号が0から1に切り
替えられ、積分が終了したことを検出すると、AFセン
サ74に対してAFCLK信号によりクロックパルスを
送信し、センサデータの読出しを開始する。AFセンサ
74からは、クロックパルスに同期して各セルごとのセ
ンサデータがアナログデータとして順次AFDATAP
信号により出力され、A/D変換された後、CPU60
に入力される。
Next, the process of reading sensor data by the CPU 60 will be described. As shown in the timing chart of FIG. 17, for example, when the CPU 60 detects that the / AFEND signal transmitted from the AF sensor 74 is switched from 0 to 1 and the integration is completed, the CPU 60 sends AFCLK to the AF sensor 74. A clock pulse is transmitted by the signal to start reading the sensor data. From the AF sensor 74, the sensor data of each cell is sequentially output as analog data AFDATAP in synchronization with the clock pulse.
The signal is output by the signal, and after the A / D conversion, the CPU 60
Entered in.

【0140】具体的には、AFDATAP信号によりL
センサ96とRセンサ94の各セルのセンサデータが交
互にセンサ番号1からセンサ番号234まで順に出力さ
れCPU60のA/D変換回路により読み出される。
尚、Lセンサ96とRセンサ94のすべてのセルのセン
サデータが送信された後、数個のダミーデータが送信さ
れる。
More specifically, L is set by the AFDATAP signal.
The sensor data of each cell of the sensor 96 and the R sensor 94 are alternately output in order from the sensor number 1 to the sensor number 234 and read by the A / D conversion circuit of the CPU 60.
Incidentally, after the sensor data of all cells of the L sensor 96 and the R sensor 94 are transmitted, several dummy data are transmitted.

【0141】ここで、クロックパルスによるセンサデー
タの読出し速度について説明する。上述のようにあるピ
ーク選択領域をAFセンサ74に対して設定して上記積
分処理を実行させた場合に、その積分処理によってAF
センサ74で蓄積された各セルのセンサデータのうち、
CPU60が以後の測距演算の処理において実際に使用
するセンサデータは、1又は複数の分割エリアにより構
成されるピーク選択領域の範囲内における各セルのセン
サデータに限られ、それ以外の範囲における各セルのセ
ンサデータは不要である。また、上述のようにピーク選
択領域の範囲内であっても、AFセンサ74に対するピ
ーク選択領域の設定は、隣接する4つのセルを1ブロッ
クとしたブロック単位(上記ブロック番号D0、D1、
…、D55、ブロック番号D56、D57、…、D11
1についての記載事項参照)で行われるため、実際に
は、ピーク選択領域の両端のブロック内においてもセン
サデータを取得する必要のないセルが存在する。更に、
本実施の形態では、必要なセンサデータはピーク選択領
域内に限られるが、測距演算の態様によってはピーク選
択領域内に限らず、ピーク選択領域外のセルのセンサデ
ータも必要な場合がある。そこで、CPU60の以後の
処理において必要なセンサデータを生成するセルの範囲
をデータ取得範囲といい、CPU60の以後の処理にお
いて不要なセンサデータを生成するセルの範囲をデータ
非取得範囲というものとすると、CPU60は、一定周
期のクロックパルスを出力するのではなく、図27に示
すようにデータ取得範囲のセルのセンサデータを搬送す
る期間T2のクロック周期よりも、データ非取得範囲の
セルのセンサデータを搬送する期間T1のクロック周期
を短くし、不要なセンサデータの読出し時間を短縮して
いる。
Here, the reading speed of the sensor data by the clock pulse will be described. When a certain peak selection region is set in the AF sensor 74 as described above and the integration process is executed, the AF process is performed by the integration process.
Of the sensor data of each cell accumulated by the sensor 74,
The sensor data actually used by the CPU 60 in the subsequent distance measurement processing is limited to the sensor data of each cell within the range of the peak selection region formed by one or a plurality of divided areas, and the sensor data in each range other than that. No cell sensor data is required. Further, as described above, even within the range of the peak selection area, the peak selection area is set for the AF sensor 74 by a block unit (block numbers D0, D1,
..., D55, block numbers D56, D57, ..., D11
1)), there are actually cells that do not need to acquire sensor data even in the blocks at both ends of the peak selection region. Furthermore,
In the present embodiment, the necessary sensor data is limited to the peak selection area, but depending on the mode of the distance measurement calculation, the sensor data of cells outside the peak selection area may be necessary, not limited to the peak selection area. . Therefore, it is assumed that the range of cells that generate sensor data necessary for the subsequent processing of the CPU 60 is called a data acquisition range, and the range of cells that generate unnecessary sensor data for the subsequent processing of the CPU 60 is called a data non-acquisition range. , The CPU 60 does not output the clock pulse of a constant cycle, but rather than the clock cycle of the period T2 in which the sensor data of the cell of the data acquisition range is conveyed, as shown in FIG. 27, the sensor data of the cell of the data non-acquisition range. The clock cycle of the period T1 for transporting is shortened to shorten the reading time of unnecessary sensor data.

【0142】例えば、データ取得範囲のセルのセンサデ
ータを搬送する際、AFDATAP信号の安定期間の周
期(“H”)を16μs、A/D変換を実施する期間の
周期を18μs(“L”)とすると、データ非取得範囲
のセルのセンサデータを搬送する際はクロック周期を
(“H”)2μs、(“L”)2μsとしている。
(“H”)16μs、(“L”)18μs周期のクロッ
クパルスでは、各セルのセンサデータの値をA/D変換
回路により適切に取得することができるが、2μs周期
のクロックパルスでは、各セルのセンサデータの値を適
切に取得することができない可能性がある。しかしなが
ら、データ非取得範囲のセンサデータは不要であるた
め、データ非取得範囲のセンサデータを(“H”)2μ
s、(“L”)2μs周期のクロックパルスで搬送する
ことに不具合は生じない。
For example, when carrying sensor data of cells in the data acquisition range, the stable period cycle (“H”) of the AFDATAP signal is 16 μs, and the stable period cycle of A / D conversion is 18 μs (“L”). Then, when the sensor data of the cells in the data non-acquisition range is carried, the clock cycle is (“H”) 2 μs and (“L”) 2 μs.
With the clock pulse of (“H”) 16 μs and (“L”) 18 μs period, the value of the sensor data of each cell can be properly acquired by the A / D conversion circuit, but with the clock pulse of 2 μs period, It may not be possible to properly obtain the value of the sensor data of the cell. However, since the sensor data in the data non-acquisition range is unnecessary, the sensor data in the data non-acquisition range is (“H”) 2 μm.
There is no problem in carrying with a clock pulse of s, (“L”) 2 μs period.

【0143】また、図27に示すようにデータ取得範囲
の全てのセンサデータの搬送が終了した場合には、デー
タ非取得範囲のセンサデータの搬送が残っているときで
も、AFCLK信号(クロックパルス)の出力を停止さ
せ、データ取得範囲後のデータ非取得範囲のセンサデー
タの読み出しを実施しないようにすることで、更に、セ
ンサデータの読出し時間を短縮することができる。
Further, as shown in FIG. 27, when the conveyance of all the sensor data in the data acquisition range is completed, the AFCLK signal (clock pulse) is generated even when the conveyance of the sensor data in the non-data acquisition range remains. It is possible to further shorten the reading time of the sensor data by stopping the output of the above and not reading the sensor data in the data non-acquisition range after the data acquisition range.

【0144】尚、データ非取得範囲のセンサデータの搬
送からデータ取得範囲のセンサデータの搬送に移行する
場合には、クロックパルスの安定等を考慮してデータ取
得範囲ののセンサデータの搬送を開始する1つ前のセル
からクロック周期を(“H”)16μs、(“L”)1
8μsに切り替えるようにしている。但し、このように
データ取得範囲のセンサデータの搬送時におけるクロッ
ク周期への移行を、データ取得範囲のセンサデータの搬
送を開始する1つ前のセルから行うのではなく、データ
取得範囲のセンサデータの搬送を開始するのと同時に行
うようにしてもよいし、また、2つ以上前のセルから行
うようにしてもよい。
When the transfer of the sensor data in the data non-acquisition range to the transfer of the sensor data in the data acquisition range is started, the transfer of the sensor data in the data acquisition range is started in consideration of the stability of the clock pulse and the like. The clock cycle from the immediately preceding cell is (“H”) 16 μs, (“L”) 1
It is designed to switch to 8 μs. However, the transition to the clock cycle when the sensor data in the data acquisition range is conveyed is not performed from the cell immediately before the start of the conveyance of the sensor data in the data acquisition range, but the sensor data in the data acquisition range. It may be carried out at the same time as the start of the transportation of the above, or it may be carried out from the cell two or more before.

【0145】次に、センサデータからAFデータを生成
する処理について説明する。上述のようにAFセンサ7
4の受光セルより出力されるデータをセンサデータとす
ると、AFセンサ74から出力された各センサデータを
A/D変換回路により取得し、取得したセンサデータの
A/D変換値そのものをCPU60における以後の各処
理で使用するAFデータとする場合と、測距精度向上の
ためセンサデータに所定の処理を施したものをAFデー
タとする場合とが考えられる。前者の場合にはCPU6
0においてAFデータを生成するための特別の処理を行
う必要はなく、センサデータの取得処理がAFデータの
取得処理となるが、後者の場合にはセンサデータの取得
後、CPU60においてAFデータを生成するための特
別の処理が行われることになる。後者の場合の例とし
て、センサデータにコントラスト抽出処理を施したもの
を以後の各処理で使用するAFデータとすることがで
き、以下、センサデータにコントラスト抽出処理を施し
てAFデータを生成する場合の処理について説明する。
Next, a process of generating AF data from sensor data will be described. As described above, the AF sensor 7
When the data output from the light receiving cell of No. 4 is sensor data, each sensor data output from the AF sensor 74 is acquired by the A / D conversion circuit, and the A / D conversion value itself of the acquired sensor data is stored in the CPU 60 thereafter. It is considered that the AF data is used in each of the processes, and that the AF data is obtained by subjecting the sensor data to a predetermined process to improve the distance measurement accuracy. CPU6 in the former case
0 does not require special processing for generating AF data, and the sensor data acquisition processing is AF data acquisition processing. In the latter case, the CPU 60 generates AF data after the sensor data acquisition. A special process for doing so will be performed. As an example of the latter case, the sensor data subjected to the contrast extraction processing can be used as AF data used in each subsequent processing. Hereinafter, in the case where the sensor data is subjected to the contrast extraction processing to generate the AF data. The process will be described.

【0146】コントラスト抽出処理は、例えば、あるセ
ンサ番号(アドレスi)のセルに着目したときに、その
着目したセルのセンサデータと、着目したセルに対して
mセル分(m画素分)離間したセンサ番号(i+m)の
セルのセンサデータとの差分(又は比)を算出する演算
処理である。言い換えると、Rセンサ94とLセンサ9
6から得たセンサデータのそれぞれについて、センサデ
ータとそのセンサデータをm画素分シフトしたものとの
差分を算出する処理である。即ち、Rセンサ94におけ
るセンサ番号(i)のセルのセンサデータをR(i)、L
センサ96におけるセンサ番号(i)のセルのセンサデ
ータをL(i)とすると、Rセンサ94のセンサデータに
対しては、次式、
In the contrast extraction processing, for example, when a cell having a certain sensor number (address i) is focused, the sensor data of the focused cell is separated from the focused cell by m cells (m pixels). This is a calculation process for calculating the difference (or ratio) from the sensor data of the cell with the sensor number (i + m). In other words, the R sensor 94 and the L sensor 9
It is a process of calculating the difference between the sensor data and the sensor data shifted by m pixels for each of the sensor data obtained from FIG. That is, the sensor data of the cell with the sensor number (i) in the R sensor 94 is set to R (i), L
If the sensor data of the cell of the sensor number (i) in the sensor 96 is L (i), the sensor data of the R sensor 94 can be expressed by the following equation:

【0147】[0147]

【数6】R(i)−R(i+m) …(9) の演算が行われ、Lセンサ96のセンサデータに対して
は、次式、
[Mathematical formula-see original document] The calculation of R (i) -R (i + m) (9) is performed, and for the sensor data of the L sensor 96, the following equation,

【0148】[0148]

【数7】L(i)−L(i+m) …(10) の演算が行われる。これによって得られた差分データは
AFセンサ74の各セルによって撮像されたセンサ像の
コントラストを示す。尚、本明細書では、2画素分のセ
ンサデータの差分によりコントラストを示すデータを算
出する演算処理を2画素差分演算という。
[Equation 7] L (i) -L (i + m) (10) is calculated. The difference data obtained thereby indicates the contrast of the sensor image captured by each cell of the AF sensor 74. In this specification, the calculation process for calculating the data indicating the contrast based on the difference between the sensor data for two pixels is referred to as a two-pixel difference calculation.

【0149】差分をとる2つのセンサデータの上記セル
間隔mの値は、所望の設定値とすることができるが、以
下の説明ではm=2とする。但し、AFセンサ74にお
いてセンサ番号が偶数のセルで蓄積された電荷と奇数の
セルで蓄積された電荷は、異なるチャンネルにより伝送
され、処理されるため、上記差分データも同一チャンネ
ル同士のセルのセンサデータから求めるのが好ましく、
mの値としては偶数であることが望ましい。尚、上式
(9)、(10)により求めたデータは、CPU60でAFセ
ンサ74から取得したセンサデータの数に比べてm個分
減少するが、予めm個分減少することを考慮して上記デ
ータ取得範囲を拡大しておくことによって必要なAFデ
ータ数を確保することができる。
The value of the cell interval m of the two sensor data for which the difference is taken can be a desired set value, but in the following description, m = 2. However, in the AF sensor 74, the charges accumulated in the cells having even numbers and the charges accumulated in the cells having odd numbers are transmitted and processed by different channels, and thus the difference data is also obtained by the sensors of the cells of the same channel. It is preferable to obtain it from the data,
It is desirable that the value of m be an even number. The above formula
The data obtained by (9) and (10) is reduced by m in comparison with the number of sensor data acquired from the AF sensor 74 by the CPU 60, but the data acquisition range is considered in consideration of the decrease in m in advance. It is possible to secure the necessary number of AF data by enlarging.

【0150】従来においては、上式(9)、(10)により得
られた差分データをAFデータとしているが本実施の形
態では、その差分データに対して更に+255を加算す
る処理と、2で割る処理とを加えたものをAFデータと
する。即ち、Rセンサ94のセンサ番号iに対応するA
FデータをAFR(i)とし、Lセンサ96のセンサ番号
iに対応するAFデータをAFL(i)とすると、m=2
の場合、次式、
Conventionally, the difference data obtained by the above equations (9) and (10) is used as the AF data, but in the present embodiment, the processing of adding +255 to the difference data and 2 AF data is obtained by adding division processing. That is, A corresponding to the sensor number i of the R sensor 94
If F data is AFR (i) and AF data corresponding to the sensor number i of the L sensor 96 is AFL (i), m = 2
If,

【0151】[0151]

【数8】 AFR(i)=(255+R(i−1)−R(i+1))/2 …(11) AFL(i)=(255+L(i−1)−L(i+1))/2 …(12) により得られた値をAFデータとする。[Equation 8]   AFR (i) = (255 + R (i-1) -R (i + 1)) / 2 (11)   AFL (i) = (255 + L (i-1) -L (i + 1)) / 2 (12) The value obtained by is used as AF data.

【0152】ここで、AFデータを単に上式(9)、(10)
により得られた差分データとするのではなく、上式(1
1)、(12)としたのは、RAM使用量の増加と相関値演算
等の演算時間の増加を抑止するためである。例えば、各
セルのセンサデータは8ビットのデータとして得られる
とする。この場合、センサデータR(i)、L(i)の値は
図28(A)に示すように0〜+255の範囲にある。
これに対して上式(9)、(10)により得られた差分データ
をAFデータとした場合(この場合を従来方式とい
う)、図28(B)に示すようにAFデータの値は−2
55〜+255の範囲にあり、9ビットのデータとな
る。RAMの使用及び演算においてはバイト単位で処理
されるため、9ビットのデータは、16ビット(2バイ
ト)のデータとして処理されることになる。
Here, the AF data is simply expressed by the above equations (9) and (10).
Instead of using the difference data obtained by
The reasons (1) and (12) are for suppressing an increase in RAM usage and an increase in calculation time such as correlation value calculation. For example, it is assumed that the sensor data of each cell is obtained as 8-bit data. In this case, the values of the sensor data R (i) and L (i) are in the range of 0 to +255, as shown in FIG.
On the other hand, when the difference data obtained by the above equations (9) and (10) is used as the AF data (this case is called the conventional method), the value of the AF data is −2 as shown in FIG.
It is in the range of 55 to +255 and becomes 9-bit data. Since the RAM is used and operated in byte units, 9-bit data is processed as 16-bit (2 bytes) data.

【0153】一方、上式(11)、(12)により得られた差分
データをAFデータとした場合には(この場合を新方式
という)、図28(C)に示すようにAFデータの値は
0〜+255の範囲にあり、8ビットのデータとなる。
従って、RAMの使用及び演算においては1バイトのデ
ータとして処理されることになる。図29(A)、
(B)に、それぞれ同一のセンサデータに基づいて新方
式により生成されたAFデータの値と、従来方式により
生成されたAFデータの値とを例示しておく。
On the other hand, when the difference data obtained by the above equations (11) and (12) is used as the AF data (this case is called the new method), the value of the AF data is as shown in FIG. 28C. Is in the range of 0 to +255, and is 8-bit data.
Therefore, in the use and calculation of the RAM, it is processed as 1-byte data. FIG. 29 (A),
In (B), the values of the AF data generated by the new method and the values of the AF data generated by the conventional method based on the same sensor data are illustrated.

【0154】新方式のようにAFデータをセンサデータ
と同じビット数のデータとなるように生成することによ
り、RAM使用量が低減すると共に、相関値演算等の以
後の各処理における処理時間が低減する。尚、上式(1
1)、(12)による新方式では、上式(9)、(10)による従来
方式の差分演算結果を半分にしているため、測距精度の
低下が考えられるが、実質的な不具合は生じないことを
確認している。
By generating AF data so that it has the same number of bits as the sensor data as in the new method, the RAM usage amount is reduced and the processing time in each process such as correlation value calculation is reduced. To do. The above equation (1
In the new method by 1) and 12), the difference calculation result of the conventional method by the above equations (9) and (10) is halved. I'm sure it's not there.

【0155】次に、上記新方式によりAFデータを生成
する際の具体的処理内容について説明する。従来では、
測距エリアの各セルのセンサデータがAFセンサから読
み出されると、その読み出されたセンサデータはそのま
まRAMに格納される。そして、AFデータ(画像)を
用いた相関値演算等の処理が開始されると、その処理の
実行中においてRAMからAFデータ(画像)が読み出
されて上式(9)、(10)の演算により必要な差分データが
逐次生成されるようになっている。例えば、AFデータ
(画像)が使用される相関値演算処理では、図12に示
したようにRウインドウ94BとLウインドウ96Bと
を1セルずつシフトさせながら、各シフト量n(採用セ
ンサ数62、ウインドウサイズ42の場合、n=−2,
−1,0,1,…,MAX(=38))ごとに各ウインドウ範囲
内のAFデータ(画像)により相関値が算出される。こ
のため、同じセルのAFデータ(画像)が繰り返し使用
されることになり、その都度、AFデータ(画像)がR
AMから読み出され、2画素差分演算により差分データ
が生成されることになる。このように相関値演算の実行
時(実行中)において差分データを生成する場合におけ
る各シフト量n(n=−2,−1,0,1,…,MAX(=3
8))ごとの相関値演算の処理手順を図30に示す。ま
ず、i=1としてRAMからセンサデータL(i+1)と
L(i−1)を読み出す(ステップS600、S60
2)。尚、ここで示すiは、上記Rウインドウ94B、
Lウインドウ96Bにおけるセル位置iを示す。そし
て、上式(12)により、差分データAFL(i)=(255
+L(i−1)−L(i+1))/2を算出する(ステップ
S604)。同様に、RAMからセンサデータR(i+
1)とR(i−1)を読み出す(ステップS606、S6
08)。そして、上式(11)により、差分データAFR
(i)=(255+R(i−1)−R(i+1))/2を算出
する(ステップS610)。次に、相関値f(n)を求め
るための上式(1)における右辺の|L(i)−R(i)|を
f(ni)として、AFL(i)>AFR(i)か否かを判定す
る(ステップS612)。YESと判定した場合、f(n
i)=L(i)−R(i)とし(ステップS614)、NOと
判定した場合、f(ni)=R(i)−L(i)とする(ステッ
プS616)。続いて、上式(1)の左辺f(n)の値(初期
値0)に対してf(ni)を加算してその値をf(n)の新た
な値とする。即ち、f(n)=f(n)+f(ni)とする(ステ
ップS618)。
Next, the specific processing contents when the AF data is generated by the new method will be described. Traditionally,
When the sensor data of each cell in the distance measuring area is read from the AF sensor, the read sensor data is stored in the RAM as it is. Then, when a process such as correlation value calculation using the AF data (image) is started, the AF data (image) is read from the RAM during the execution of the process, and Necessary difference data is sequentially generated by calculation. For example, in the correlation value calculation process using AF data (image), as shown in FIG. 12, each shift amount n (the number of adopted sensors 62, 62 When the window size is 42, n = -2,
The correlation value is calculated for each (-1, 0, 1, ..., MAX (= 38)) from the AF data (image) in each window range. Therefore, the AF data (image) of the same cell is repeatedly used, and each time the AF data (image) becomes R
The difference data is read from the AM and the difference data is generated by the 2-pixel difference calculation. In this way, each shift amount n (n = -2, -1, 0, 1, ..., MAX (= 3
FIG. 30 shows the processing procedure of the correlation value calculation for each of 8)). First, the sensor data L (i + 1) and L (i-1) are read from the RAM with i = 1 (steps S600 and S60).
2). In addition, i shown here is the R window 94B,
The cell position i in the L window 96B is shown. Then, the difference data AFL (i) = (255
+ L (i-1) -L (i + 1)) / 2 is calculated (step S604). Similarly, sensor data R (i +
1) and R (i-1) are read (steps S606 and S6).
08). Then, according to the above equation (11), the difference data AFR
(i) = (255 + R (i−1) −R (i + 1)) / 2 is calculated (step S610). Next, if | L (i) -R (i) | on the right side in the above equation (1) for obtaining the correlation value f (n) is set to f (ni), AFL (i)> AFR (i) It is determined (step S612). If YES is determined, f (n
i) = L (i) -R (i) (step S614), and if NO is determined, f (ni) = R (i) -L (i) is set (step S616). Then, f (ni) is added to the value (initial value 0) of the left side f (n) of the above equation (1) to make that value a new value of f (n). That is, f (n) = f (n) + f (ni) is set (step S618).

【0156】次に、i=(ウインドウサイズwo(=42))
となったか否かを判定し(ステップS620)、YES
と判定した場合にはこの処理を終了する(ステップS6
22)。一方、NOと判定した場合には、i=i+1と
し(ステップS624)、上記ステップS600の処理
に戻り、ステップS600の処理から繰り返す。上記が
各シフト量nごとの演算であり、さらに各シフト量n
(n=−2〜38)ごとにi=1からi=woまで演算処
理を繰り返す。
Next, i = (window size wo (= 42))
Is determined (step S620), YES
If it is determined that this processing is completed (step S6)
22). On the other hand, if NO is determined, i = i + 1 is set (step S624), the process returns to step S600, and the process is repeated from step S600. The above is the calculation for each shift amount n, and each shift amount n
The calculation process is repeated from i = 1 to i = wo every (n = −2 to 38).

【0157】このようにAFデータ(画像)を用いた相
関値演算処理の実行時に差分データを生成する場合で
は、図12に示したように同じセルのAFデータ(画
像)を繰り返し使用するため重複して2画素差分演算を
実行する必要がある。従って、その演算に時間を要し、
結果的に測距演算に要する時間が長くなるという問題が
生じることとなる。
As described above, when the difference data is generated when the correlation value calculation process using the AF data (image) is performed, the AF data (image) of the same cell is repeatedly used as shown in FIG. Then, it is necessary to perform the 2-pixel difference calculation. Therefore, the calculation takes time,
As a result, the problem that the time required for the distance measurement calculation becomes long occurs.

【0158】上記不具合を解消するため、本実施の形態
では、差分データを用いた処理を開始する前に予めAF
データ(差分)を生成しておき、その生成したAFデー
タ(差分)をRAMに格納しておくようにする。図31
に、相関値演算の実行前に予めAFデータ(差分)を生
成してRAMに格納しておいた場合における相関値演算
の処理手順を示す。まず、i=1としてRAMからAF
データ(差分)AFL(i)とAFR(i)を読み出す(ス
テップS650、S652)。尚、ここで示すiは、上
記Rウインドウ94B、Lウインドウ96Bにおけるセ
ル位置iを示す。次に、相関値f(n)を求めるための上
式(1)における右辺の|L(i)−R(i)|をf(ni)とし
て、AFL(i)>AFR(i)か否かを判定する(ステッ
プS654)。YESと判定した場合、f(ni)=L(i)
−R(i)とし(ステップS656)、NOと判定した場
合、f(ni)=R(i)−L(i)とする(ステップS65
8)。続いて、上式(1)の左辺f(n)の値(初期値0)に
対してf(ni)を加算してその値をf(n)の新たな値とす
る。即ち、f(n)=f(n)+f(ni)とする(ステップS6
60)。
In order to solve the above problem, in the present embodiment, AF processing is performed in advance before starting the processing using the difference data.
Data (difference) is generated and the generated AF data (difference) is stored in the RAM. Figure 31
The processing procedure of the correlation value calculation when the AF data (difference) is previously generated and stored in the RAM before the execution of the correlation value calculation is shown in FIG. First, from i RAM to AF
The data (difference) AFL (i) and AFR (i) are read (steps S650 and S652). Note that i shown here indicates a cell position i in the R window 94B and the L window 96B. Next, if | L (i) -R (i) | on the right side in the above equation (1) for obtaining the correlation value f (n) is set to f (ni), AFL (i)> AFR (i) It is determined whether or not (step S654). If YES is determined, f (ni) = L (i)
-R (i) (step S656), and if NO is determined, f (ni) = R (i) -L (i) is set (step S65).
8). Then, f (ni) is added to the value (initial value 0) of the left side f (n) of the above equation (1) to make that value a new value of f (n). That is, f (n) = f (n) + f (ni) is set (step S6).
60).

【0159】次に、i=(ウインドウサイズwo(=42))
となったか否かを判定し(ステップS662)、YES
と判定した場合にはこの処理を終了する(ステップS6
64)。一方、NOと判定した場合には、i=i+1と
し(ステップS666)、上記ステップS650の処理
に戻り、ステップS650の処理から繰り返す。
Next, i = (window size wo (= 42))
Is determined (step S662), YES
If it is determined that this processing is completed (step S6)
64). On the other hand, if NO is determined, i = i + 1 is set (step S666), the process returns to step S650, and the process is repeated from step S650.

【0160】このようにAFデータ(差分)を予め生成
してRAMに格納しておくことによって、AFデータ
(差分)を用いた各処理の実行時には、必要なAFデー
タ(差分)をRAMから読み出すだけでよく、差分デー
タを生成するための処理に要する時間が大幅に削減され
る。図30と図31に示した相関値演算における処理時
間を比較すると、図31の処理では、図30のステップ
S602、S604と、ステップS608、S610の
処理に要する時間分(2×21μs)だけ相関値演算に
要する時間を短縮することができる。上記iの演算回数
は、採用センサ数62、ウインドウサイズ42の設定で
5エリアの場合、(i=1〜42→42回)×(n=−
2〜38→41回)×5エリア=42×41×5=86
10回となる。従って、総合測距時間は、8610回×
(2×21μs)≒362ms短縮することができる。
尚、AFデータ(差分)を予め生成してRAMに格納し
ておく場合には、センサデータからAFデータ(差分)
を生成するための処理時間が相関値演算の時間とは別に
必要であるが、これについては後述する。
By thus generating the AF data (difference) in advance and storing it in the RAM, the necessary AF data (difference) is read from the RAM when each process using the AF data (difference) is executed. This is sufficient, and the time required for the processing for generating the difference data is significantly reduced. Comparing the processing times in the correlation value calculation shown in FIG. 30 and FIG. 31, in the processing of FIG. 31, the correlation for the time required for the processing of steps S602 and S604 of FIG. The time required for value calculation can be shortened. When the number of adopted sensors is 62 and the window size is 42, and there are 5 areas, the number of calculations of i is (i = 1 to 42 → 42 times) × (n = −
2 to 38 → 41 times) × 5 area = 42 × 41 × 5 = 86
10 times. Therefore, the total distance measurement time is 8610 times ×
(2 × 21 μs) ≈362 ms can be shortened.
When the AF data (difference) is generated in advance and stored in the RAM, the AF data (difference) is calculated from the sensor data.
The processing time required to generate the above is required separately from the time for calculating the correlation value, which will be described later.

【0161】ところで、2画素差分演算を実施する場合
の態様については2通りの態様が考えられる。第1の態
様は、AFセンサ74から読み出したセンサデータを一
旦、RAMに格納し(AFデータ(画像))、その後、
RAMからAFデータ(画像)を読み出して差分データ
を上式(11)、(12)により生成して2画素差分演算を実施
するというものである。第2の態様は、AFセンサ74
からセンサデータを順次読み出している際に、各センサ
番号iのセンサデータについて上式(11)、(12)の演算に
必要なセンサデータが得られた時点でその差分演算(1
1)、(12)を実施し、順次生成した差分演算結果をRAM
に格納する(AFデータ(差分))というものである。
第1の態様におけるセンサデータの読出し処理について
は、差分データの生成処理と独立して行われるため2画
素差分演算を行わない場合や相関値演算等の各処理の実
行時においてAFデータ(画像)を生成する場合のセン
サデータの読出し処理と同じである。一方、第2の態様
のセンサデータの読出し処理については、センサデータ
を読出しながら2画素差分演算を行っているため、その
分センサデータの読出しに要する時間が長くなる。但
し、第1の態様においても2画素差分演算を行うことを
考慮すると、第1の態様の方が第2の態様よりも有利と
いうことではない。
There are two possible modes for carrying out the two-pixel difference calculation. In the first mode, the sensor data read from the AF sensor 74 is temporarily stored in the RAM (AF data (image)), and then,
The AF data (image) is read from the RAM, the difference data is generated by the above equations (11) and (12), and the 2-pixel difference calculation is performed. The second mode is the AF sensor 74.
When the sensor data is sequentially read from the sensor data of each sensor number i, when the sensor data necessary for the calculation of the above formulas (11) and (12) is obtained, the difference calculation (1
Perform 1) and 12), and sequentially generate the difference calculation results in RAM
(AF data (difference)).
Since the sensor data reading process in the first aspect is performed independently of the difference data generating process, the AF data (image) is obtained when the two-pixel difference calculation is not performed or when each process such as the correlation value calculation is performed. This is the same as the process of reading the sensor data when the is generated. On the other hand, in the process of reading the sensor data of the second aspect, since the two-pixel difference calculation is performed while reading the sensor data, the time required to read the sensor data becomes longer accordingly. However, considering that the two-pixel difference calculation is performed also in the first mode, the first mode is not advantageous over the second mode.

【0162】ここで、相関値演算等の実行時に差分デー
タを生成する場合(以下、この場合を従来方式という)
のデータの流れを図32に示し、AFデータ(差分)を
予め生成してRAMに格納しておく場合(以下、この場
合を新方式という)として上記第2の態様を採用した場
合のデータの流れを図33に示す。図32に示すように
従来方式ではAFセンサから順次読み出された各セルの
センサデータはRAMに格納される。そして、相関値演
算の実行時においてRAMからAFデータ(画像)が読
み出されて上式(11)又は(12)により差分データが生成さ
れ、相関値f(n)が算出される。一方、図33に示すよ
うに新方式の第2の態様では、AFセンサから順次読み
出された各セルのセンサデータは上式(11)又は(12)によ
り差分演算処理が実施されAFデータ(差分)としてR
AMに格納される。そして、相関値演算の実行時にはR
AMに格納されたAFデータ(差分)が読出されて相関
値f(n)が算出される。図には示していないが新方式に
おいて上式(11)又は(12)によりセンサデータをAFデー
タ(差分)に変換する際には2つのセンサデータが必要
であるため、2つのセンサデータが読み出されるまでA
Fセンサから先に読み出されたセンサデータを保持して
おくメモリ(RAM)が必要である。しかしながら全て
のセンサデータを格納するためのメモリ容量を必要とし
ない。具体的には、センサデータはL(i−1)、R(i
−1)、L(i)、R(i)、L(i+1)、R(i+1)、…
の順に読み出されるため、2つのセンサデータのセル間
隔mが2の場合には、5つのセンサデータを格納するR
AMがあれば十分である。例えば、L(i−1)、R(i
−1)、L(i)、R(i)、L(i+1)を格納した時点
で、上式(12)のAFL(i)をRAMに格納されたL(i
−1)、L(i+1)から求めることができる。そして、
AFL(i)を求めた際には、L(i−1)のセンサデータ
は以後不要となるため、そのデータを消去して、次いで
AFセンサ74から読み出されるセンサデータR(i+
1)をその消去したアドレスに格納することによって、
上式(11)のAFR(i)をR(i−1)、R(i+1)から求
めることができる。このようにして、AFセンサ74か
ら読み出した5つのセンサデータをRAMに格納すると
共に、新たなセンサデータを読み出した際にはRAMに
格納されているセンサデータのうち最も先に読み出した
センサデータを消去してその新たなセンサデータをRA
Mに格納することによって少ないメモリ容量のRAMで
AFデータ(差分)を順次作成することができる。
Here, when the difference data is generated at the time of executing the correlation value calculation or the like (hereinafter, this case is referred to as the conventional method).
32 shows the data flow of FIG. 32. The data of the case where the second mode is adopted as a case where AF data (difference) is generated in advance and stored in the RAM (hereinafter, this case is referred to as a new method) The flow is shown in FIG. As shown in FIG. 32, in the conventional method, the sensor data of each cell sequentially read from the AF sensor is stored in the RAM. Then, when the correlation value calculation is executed, the AF data (image) is read from the RAM, the difference data is generated by the above equation (11) or (12), and the correlation value f (n) is calculated. On the other hand, as shown in FIG. 33, in the second mode of the new method, the sensor data of each cell sequentially read from the AF sensor is subjected to the difference calculation processing according to the above formula (11) or (12) and the AF data ( R) as difference
Stored in AM. When performing the correlation value calculation, R
The AF data (difference) stored in the AM is read out and the correlation value f (n) is calculated. Although not shown in the figure, when the sensor data is converted into the AF data (difference) by the above formula (11) or (12) in the new method, two sensor data are required, so that two sensor data are read out. A until
A memory (RAM) for holding the sensor data previously read from the F sensor is required. However, it does not require a memory capacity for storing all sensor data. Specifically, the sensor data is L (i-1), R (i
-1), L (i), R (i), L (i + 1), R (i + 1), ...
Therefore, when the cell interval m of the two sensor data is 2, R which stores the five sensor data is read.
AM is enough. For example, L (i-1), R (i
−1), L (i), R (i), and L (i + 1) are stored, the AFL (i) of the above formula (12) is stored in the RAM as L (i
-1), L (i + 1). And
When the AFL (i) is obtained, the sensor data of L (i-1) is no longer necessary, so that data is erased, and then the sensor data R (i +) read from the AF sensor 74 is read.
By storing 1) at the erased address,
AFR (i) in the above equation (11) can be calculated from R (i-1) and R (i + 1). In this way, the five sensor data read from the AF sensor 74 are stored in the RAM, and when the new sensor data is read, the sensor data read out first among the sensor data stored in the RAM is stored. Erase and RA the new sensor data
By storing in M, the AF data (difference) can be sequentially created in the RAM having a small memory capacity.

【0163】続いて、センサデータの読出し処理に関し
て、上記従来方式を採用した場合と、新方式として上記
第2の態様を採用した場合とを比較する。図34は、従
来方式におけるセンサデータの読出し処理を示したフロ
ーチャートであり、図35は、従来方式におけるセンサ
データ読出し時の上記AFCLK信号及びAFDATA
P信号を示したタイミングチャートである。これらの図
を参照して従来方式におけるセンサデータの読出し処理
について説明すると、まず、AFCLK信号を“H”か
ら“L”に切り替え(ステップS700)、センサデー
タを示すAFDATAP信号をA/D変換する(ステッ
プS702)。そして、AFCLK信号を“L”から
“H”に切り替え(ステップS704)、A/D変換に
より取得したセンサデータR(i)又はL(i)をRAMに
格納する(ステップS706)。以上の処理を繰り返
す。尚、AFCLK信号の“H”、“L”の期間はそれ
ぞれ例えば16μs、18μsである。
Next, regarding the process of reading the sensor data, the case where the conventional method is adopted and the case where the second mode is adopted as the new method are compared. FIG. 34 is a flowchart showing a process of reading sensor data in the conventional method, and FIG. 35 is a diagram showing the AFCLK signal and AFDATA when reading the sensor data in the conventional system.
6 is a timing chart showing a P signal. The sensor data read processing in the conventional method will be described with reference to these drawings. First, the AFCLK signal is switched from “H” to “L” (step S700), and the AFDATAP signal indicating the sensor data is A / D converted. (Step S702). Then, the AFCLK signal is switched from "L" to "H" (step S704), and the sensor data R (i) or L (i) acquired by the A / D conversion is stored in the RAM (step S706). The above process is repeated. The periods of “H” and “L” of the AFCLK signal are 16 μs and 18 μs, respectively.

【0164】一方、図36は、新方式(第2の態様)に
おけるセンサデータの読出し処理のフローチャートであ
り、図37は、新方式におけるセンサデータ読出し時の
上記AFCLK信号及びAFDATAP信号を示した図
である。これらの図を参照して新方式におけるセンサデ
ータの読出し処理について説明すると、まず、AFCL
K信号を“H”から“L”に切り替え(ステップS75
0)、センサデータを示すAFDATAP信号をA/D
変換する(ステップS752)。そして、AFCLK信
号を“L”から“H”に切り替え(ステップS75
4)、A/D変換により取得したセンサデータR(i)又
はL(i)をRAMに格納する(ステップS756)。次
にRAMからセンサデータR(i−2)又はL(i−2)を
読み出し(ステップS6−5)、上式(11)又は(12)によ
りAFデータ(差分)AFR(i−1)又はAFL(i−
1)を算出する(ステップS760)、そして、算出し
たAFデータ(差分)AFR(i−1)又はAFL(i−
1)をRAMに格納する(ステップS762)。以上の
処理を繰り返す。
On the other hand, FIG. 36 is a flow chart of sensor data read processing in the new method (second mode), and FIG. 37 is a diagram showing the AFCLK signal and the AFDATAP signal when the sensor data is read in the new method. Is. The process of reading the sensor data in the new method will be described with reference to these figures. First, AFCL
The K signal is switched from "H" to "L" (step S75
0), A / D signal AFDATAP indicating sensor data
It is converted (step S752). Then, the AFCLK signal is switched from "L" to "H" (step S75).
4) The sensor data R (i) or L (i) acquired by the A / D conversion is stored in the RAM (step S756). Next, the sensor data R (i-2) or L (i-2) is read from the RAM (step S6-5), and AF data (difference) AFR (i-1) or AFL (i-
1) is calculated (step S760), and the calculated AF data (difference) AFR (i-1) or AFL (i-) is calculated.
1) is stored in the RAM (step S762). The above process is repeated.

【0165】以上の新方式と従来方式のセンサデータ読
出し処理手順から分かるように新方式ではステップS7
58、S760、S762の動作時間分(21μs)だ
け従来方式よりも1つのセンサデータの読出しに時間を
要する。尚、ステップS758、S760、S762の
処理は、AFCLK信号が“H”の際に行われるため、
図37に示すようにAFCLK信号の“H”の期間が従
来方式に比べてセンサデータの読出し時間が長く、37
μsとなっている。即ち、センサデータの読出し時間だ
けを考慮すると、新方式は、従来方式よりも不利であ
る。しかしながら、センサデータの読出しと、例えば相
関値演算を含む処理全体の時間を比較すると新方式の方
が短時間で処理を終了させることができる。具体的に計
算した例を図38の表に示す。表には新方式、従来方
式、及び、参考として2画素差分演算を行わない場合
(従来方式)のそれぞれにおいて、センサデータの読
出し時間、1回当たりの相関値演算時間、相関値総演算
時間(41回、5エリア設定)、合計(センサデータ読
出し時間+相関値総演算時間)が示されており、また、
新方式と従来方式との差Δと、新方式と従来方式と
の差Δが示されている。
As can be seen from the sensor data read processing procedures of the above new method and conventional method, in the new method, step S7 is performed.
It takes more time to read one sensor data than the conventional method by the operation time of 58, S760, and S762 (21 μs). Note that the processes of steps S758, S760, and S762 are performed when the AFCLK signal is "H".
As shown in FIG. 37, the period of "H" of the AFCLK signal is longer than that of the conventional method, and the reading time of the sensor data is longer.
It is μs. That is, considering only the reading time of sensor data, the new method is more disadvantageous than the conventional method. However, when the time for reading the sensor data and the time for the entire process including, for example, the correlation value calculation are compared, the new method can complete the process in a shorter time. An example of concrete calculation is shown in the table of FIG. In the table, in each of the new method, the conventional method, and the case where the two-pixel difference calculation is not performed (conventional method) for reference, the sensor data read time, the correlation value calculation time per time, the correlation value total calculation time ( 41 times, 5 areas set), total (sensor data read time + correlation value total calculation time) are shown.
The difference Δ between the new method and the conventional method and the difference Δ between the new method and the conventional method are shown.

【0166】センサデータの読出し時間は、{AFCL
K信号の(“H”の時間+“L”の時間)}×セル数×
2(Rセンサ94とLセンサ96)であり、新方式の場
合には、はじめの5セル分のセンサデータ読出し期間で
は2画素差分演算ができないので、(従来方式による5
セル分のセンサデータの読出し時間)+(新方式による
残りセル分のセンサデータの読出し時間)となる。上記
説明で使用した数値を当てはめると、(16+18)×
5+(37+18)×((229−6+1)×2−5)
=24535μsとなる。
The reading time of the sensor data is {AFCL
K signal (“H” time + “L” time)} × number of cells ×
2 (R sensor 94 and L sensor 96). In the case of the new method, the 2-pixel difference calculation cannot be performed in the sensor data reading period for the first 5 cells.
(Reading time of sensor data for cells) + (reading time of sensor data for remaining cells by the new method). Applying the numerical values used in the above explanation, (16 + 18) ×
5+ (37 + 18) × ((229-6 + 1) × 2-5)
= 24535 μs.

【0167】一方、1回当たりの相関値演算時間は、新
方式の場合には実測値を用いており、従来方式の場合に
は、実測値+演算時間増加分としている。演算時間増加
分は図30に示したように21μs×2としている。
尚、従来方式の1回当たりの相関値演算時間は、1.2
×0.021×2×42=2.964msである。
On the other hand, as the correlation value calculation time per time, the measured value is used in the case of the new method, and the measured value + calculation time increment is used in the case of the conventional method. The calculation time increment is set to 21 μs × 2 as shown in FIG.
In addition, the correlation value calculation time per time in the conventional method is 1.2
× 0.021 × 2 × 42 = 2.964 ms.

【0168】この表から分かるように新方式では、従来
方式に比べて全センサデータの読出し時間が9ms程度
長くなる。しかしながら、相関値演算に関しては、新方
式では従来方式に対して約361msも処理時間が短縮
されるため、その他の判断処理等に要する時間が同じだ
とすると、新方式では測距時間が352msも短縮され
ることになる。
As can be seen from this table, in the new method, the read time of all sensor data is about 9 ms longer than in the conventional method. However, regarding the correlation value calculation, the new method shortens the processing time by about 361 ms as compared with the conventional method, so if the time required for other determination processing is the same, the new method also shortens the distance measurement time by 352 ms. Will be.

【0169】以上、センサデータに所要の処理を施して
AFデータを生成する場合、そのAFデータの生成はC
PU60において行うようにしたが、必ずしもCPU6
0において行う必要はなく、AFセンサ74においてセ
ンサデータに所要の処理を施してAFデータを生成し、
CPU60にその生成したAFデータを与えるようにし
てもよい。更に、後述の相関値演算処理についてもCP
U60において行うのではなく、AFセンサ74におい
て行い、その結果得られた距離信号をCPU60に与え
るようにしてもよい。 {相関値演算処理(図7ステップS16)の詳細}次
に、上記図7のステップS16における相関値演算処理
について詳説する。図12を用いて上述したように相関
値演算処理においてCPU60は、AFセンサ74のR
センサ94及びLセンサ96の測距エリアを構成する各
分割エリアごとに、図7のステップS14のAFデータ
取得処理により取得したAFデータに基づいて上式(1)
により相関値f(n)(n=−2,−1,0,1,…,MAX
(=38))を算出する。そして、算出した相関値f(n)に基
づいて各分割エリアごとに相関が最も高くなるシフト量
nを検出する。尚、ステップS14のコントラスト検出
処理1において測距に必要なコントラストがないと判定
された分割エリアについては、相関値演算処理は行わな
い。
As described above, when the sensor data is subjected to the required processing to generate the AF data, the AF data is generated by the C
Although it is performed in the PU 60, it is not always the CPU 6
It is not necessary to perform the processing in 0, and the AF sensor 74 performs necessary processing on the sensor data to generate AF data,
The generated AF data may be given to the CPU 60. In addition, the correlation value calculation processing described later
Instead of U60, the AF sensor 74 may be used and the distance signal obtained as a result may be given to the CPU 60. {Details of Correlation Value Calculation Process (Step S16 in FIG. 7)} Next, the correlation value calculation process in step S16 in FIG. 7 will be described in detail. In the correlation value calculation processing as described above with reference to FIG.
Based on the AF data acquired by the AF data acquisition processing in step S14 of FIG. 7, the above formula (1) is calculated for each divided area forming the distance measurement areas of the sensor 94 and the L sensor 96.
Correlation value f (n) (n = -2, -1, 0, 1, ..., MAX
(= 38)) is calculated. Then, based on the calculated correlation value f (n), the shift amount n having the highest correlation is detected for each divided area. Note that the correlation value calculation process is not performed for the divided areas determined to have no contrast necessary for distance measurement in the contrast detection process 1 of step S14.

【0170】ここで、CPU60は、極小値を求めるた
めf(n−1)≧f(n)<f(n+1)の判断を実施し、相
関が最も高くなる(最高相関の)シフト量として、相関
値f(n)が最小極小値となるシフト量nを検出する。多
くの場合には相関値の極小値は1つであり、最高相関の
シフト量は、その極小値が得られるシフト量nとなる。
Here, the CPU 60 makes a determination of f (n-1) ≧ f (n) <f (n + 1) in order to obtain the minimum value, and as the shift amount with the highest correlation (highest correlation), The shift amount n at which the correlation value f (n) becomes the minimum minimum value is detected. In many cases, the minimum value of the correlation value is one, and the shift amount of the highest correlation is the shift amount n at which the minimum value is obtained.

【0171】一方、相関値f(n)の分布(f(n−1)≧
f(n)<f(n+1)の判断)において極小値が複数存在
する場合もあり、その場合には、最高相関のシフト量
は、原則として、複数の極小値のうち最小の極小値(最
小極小値)が得られるシフト量nとなる。ただし、極小
値が複数存在する場合には、誤測距となる可能性がある
ため、以下で説明する極小値判断処理において、最小極
小値のシフト量nを最高相関のシフト量として採用する
ことが妥当であるか否かを判断する。尚、極小値が1つ
の場合の極小値とそのシフト量、又は、極小値が複数存
在する場合の最小極小値とそのシフト量をいずれも最小
極小値fmin1(又は、最小極小値f(nmin1))
とシフト量nmin1で表す。
On the other hand, the distribution of correlation values f (n) (f (n-1) ≧
f (n) <f (n + 1)), there may be a plurality of local minimum values. In that case, the shift amount of the highest correlation is, in principle, the smallest local minimum value (minimum local minimum value among the plurality of local minimum values. The shift amount n is the minimum value). However, when there are a plurality of local minimum values, there is a possibility of incorrect distance measurement. Therefore, in the local minimum value determination process described below, the minimum minimum value shift amount n should be adopted as the maximum correlation shift amount. To determine whether is appropriate. The minimum value fmin1 (or the minimum minimum value f (nmin1) is the minimum value and the shift amount when there is one minimum value, or the minimum minimum value and the shift amount when there are multiple minimum values. )
And the shift amount nmin1.

【0172】次に、極小値判断処理について説明する。
ある分割エリアにおいて相関値f(n)の極小値が2つ以
上存在した場合、CPU60は、最小極小値fmin1
と2番目に小さい極小値(第2極小値という)とを検出
し、それらの差(極小値差)を求める。尚、第2極小値
をfmin2、極小値差をΔfmin(=fmin2−
fmin1)で表す。極小値判断の処理概略としては、
その極小値差Δfminが大きい場合には、最小極小値
fmin1のシフト量nmin1を最高相関のシフト量
nとして採用する。一方、極小値差Δfminが小さい
場合には、誤測距となる可能性が高いため測距不能とす
る。尚、以下、最高相関のシフト量をnmin、最高相
関における相関値(最高相関値)をfmin又はf(n
min)で表す。
Next, the minimum value judgment processing will be described.
When there are two or more minimum values of the correlation value f (n) in a certain divided area, the CPU 60 causes the minimum minimum value fmin1.
And the second smallest local minimum value (referred to as the second local minimum value) are detected, and their difference (local minimum value difference) is obtained. The second minimum value is fmin2, and the minimum value difference is Δfmin (= fmin2-
It is represented by fmin1). As the outline of the process of the minimum value judgment,
When the minimum difference Δfmin is large, the shift amount nmin1 of the minimum minimum value fmin1 is adopted as the shift amount n of the highest correlation. On the other hand, when the minimum value difference Δfmin is small, there is a high possibility that erroneous distance measurement will occur, and distance measurement is impossible. In the following, the shift amount of the highest correlation is nmin and the correlation value at the highest correlation (highest correlation value) is fmin or f (n
min).

【0173】ところで、相関値f(n)の極小値が複数存
在した場合に、測距可能か又は測距不能かの判断を、一
定の基準値に対して極小値差Δfminが大きいか又は
小さいかで判断するのは次のような態様を考慮すると必
要以上に測距不能となるか、又は、誤測距の可能性が高
くなる不具合がある。即ち、極小値差Δfminがある
程度小さくても測距可能とすべき場合と、極小値差Δf
minがある程度大きくても測距不能とすべき場合とが
ある。
By the way, when there are a plurality of local minimum values of the correlation value f (n), it is judged whether the distance measurement is possible or not possible. In consideration of the following aspects, it is impossible to measure the distance more than necessary, or the possibility of erroneous distance measurement increases. That is, even if the minimum value difference Δfmin is small to some extent, distance measurement should be possible, and the minimum value difference Δfmin.
There are cases where distance measurement should be impossible even if min is large to some extent.

【0174】例えば、前者の場合の態様を図39に示
し、後者の場合の態様を図40に示す。図39(A)、
(B)にはAFセンサ74の各Rセンサ94及びLセン
サ96における中央エリアの各セルから得られたAFデ
ータの例が示されており、同図に示すように中央エリア
の各セルから得られたAFデータが低コントラストであ
ったとする。尚、以下の説明において、同様の処理が行
われる分割エリア(測距エリアを構成する各分割エリ
ア)のうち説明上着目している分割エリア又はそのセン
サ(各セル)を採用センサというものとする。このよう
な場合、相関値演算によって算出される相関値f(n)
は、同図(C)に示すように全体的に小さな値(後述の
図40との比較による)となる。また、同図(C)で
は、シフト量n=8のところで最小極小値fmin1が
検出され、シフト量n=18のところで第2極小値fm
in2が検出されているが、これらの極小値差Δfmi
nも後述の図40の場合に比べて小さい。しかしなが
ら、この図39の態様の場合、最小極小値fmin1の
シフト量nmin1(=8)は被写体距離に適切に対応
した値であり、測距可能と判断すべきである。
For example, the former case is shown in FIG. 39, and the latter case is shown in FIG. FIG. 39 (A),
(B) shows an example of AF data obtained from each cell in the central area of each R sensor 94 and L sensor 96 of the AF sensor 74. As shown in FIG. It is assumed that the obtained AF data has low contrast. In the following description, the divided area or its sensor (each cell) which is focused on in the description among the divided areas (each divided area forming the distance measuring area) in which the same processing is performed is referred to as an adopted sensor. . In such a case, the correlation value f (n) calculated by the correlation value calculation
Is a small value as a whole (compared with FIG. 40 described later) as shown in FIG. Further, in FIG. 7C, the minimum minimum value fmin1 is detected when the shift amount n = 8, and the second minimum value fm is detected when the shift amount n = 18.
Although in2 is detected, the minimum difference Δfmi between them is
n is also smaller than in the case of FIG. 40 described later. However, in the case of the embodiment of FIG. 39, the shift amount nmin1 (= 8) of the minimum minimum value fmin1 is a value that appropriately corresponds to the subject distance, and it should be determined that distance measurement is possible.

【0175】一方、図40(A)、(B)には、Rセン
サ94及びLセンサ96の採用センサ(中央エリア)か
ら得られたAFデータが周期的に変化する例が示されて
いる。このようなAFデータが得られるのは、例えば、
縞模様の被写体を撮像した場合である。この場合に、相
関値演算によって算出される相関値f(n)も同図(C)
に示すように周期的に変化し、全体的に大きな値(前述
の図39との比較による)となる。また、同図(D)の
拡大図に示すようにシフト量n=14のところで最小極
小値fmin1が検出され、シフト量n=20のところ
で第2極小値fmin2が検出されているが、これらの
極小値差Δfminも前述の図39の場合に比べて大き
い。しかしながら、この図40の態様の場合、最小極小
値fmin1のシフト量nmin1(=14)は被写体
距離に適切に対応していない可能性が高く、この採用セ
ンサについては測距不能とすべきである。
On the other hand, FIGS. 40A and 40B show an example in which AF data obtained from the adopted sensors (central area) of the R sensor 94 and the L sensor 96 changes periodically. Such AF data can be obtained, for example,
This is the case where an image of a striped object is captured. In this case, the correlation value f (n) calculated by the correlation value calculation is also shown in FIG.
, It changes periodically, and becomes a large value as a whole (by comparison with FIG. 39 described above). Further, as shown in the enlarged view of FIG. 7D, the minimum minimum value fmin1 is detected at the shift amount n = 14, and the second minimum value fmin2 is detected at the shift amount n = 20. The minimum value difference Δfmin is also larger than that in the case of FIG. 39 described above. However, in the case of the embodiment of FIG. 40, there is a high possibility that the shift amount nmin1 (= 14) of the minimum minimum value fmin1 does not properly correspond to the subject distance, and thus this adopted sensor should be unable to perform distance measurement. .

【0176】CPU60は、図39のように測距可能と
すべき場合と図40のように測距不能とすべき場合とを
適切に判断するため、具体的、以下のように判断処理を
行う。
The CPU 60 concretely performs the following determination processing in order to appropriately determine whether the distance measurement should be possible as shown in FIG. 39 and the distance measurement be impossible as shown in FIG. ..

【0177】まず、採用センサの相関値f(n)の分布に
おいて複数検出された極小値のうち最小極小値fmin
1と第2極小値fmin2を検出する。そして、次式、
First, among the minimum values detected in the distribution of the correlation value f (n) of the adopted sensor, the minimum minimum value fmin.
1 and the second minimum value fmin2 are detected. And the following equation,

【0178】[0178]

【数9】fmin1<基準値R3 …(13) が成り立つか否かを判断する。この判断は、図39と図
40の場合を分けるための判断であり、基準値R3はこ
れらの場合を分けるために適切な値に設定される。も
し、式(13)が成り立つ場合、即ち、図39の場合、次い
で、極小値差Δfmin(=fmin2−fmin1)
を求め、次式、
## EQU9 ## It is determined whether fmin1 <reference value R3 (13) holds. This judgment is a judgment for separating the cases of FIG. 39 and FIG. 40, and the reference value R3 is set to an appropriate value for separating these cases. If the equation (13) is satisfied, that is, in the case of FIG. 39, then the minimum value difference Δfmin (= fmin2-fmin1).
And the following equation,

【0179】[0179]

【数10】Δfmin<基準値R2 …(14) が成り立つか否かを判断する。基準値R2は、図39の
場合を考慮して少なくとも後述の基準値R1よりも小さ
い値に設定される。もし、式(14)が成り立つ場合には、
極小値差Δfminが小さいとして、この採用センサに
ついて測距不能とする。式(14)が成り立たない場合に
は、測距可能とし、最小極小値fmin1のシフト量n
min1を最高相関値fminのシフト量nminとし
て採用する。
[Equation 10] It is determined whether or not Δfmin <reference value R2 (14) holds. The reference value R2 is set to a value that is at least smaller than a reference value R1 described later in consideration of the case of FIG. If equation (14) holds,
Assuming that the minimum difference Δfmin is small, the distance measurement cannot be performed for this adopted sensor. When Expression (14) is not satisfied, distance measurement is possible and the shift amount n of the minimum minimum value fmin1 is n.
min1 is adopted as the shift amount nmin of the highest correlation value fmin.

【0180】一方、上式(13)が成り立たない場合、即
ち、図40の場合には、次式、
On the other hand, when the above equation (13) does not hold, that is, in the case of FIG. 40, the following equation,

【0181】[0181]

【数11】Δfmin<基準値R1 …(15) が成り立つか否かを判断する。基準値R1は、図40の
場合を考慮して少なくとも基準値R2よりも大きい値に
設定される。もし、式(15)が成り立つ場合には、図40
のように縞模様の被写体等である可能性が高いと判断し
てこの採用センサでの測距を不能とする。式(15)が成り
立たない場合には、測距可能とし、最小極小値fmin
1のシフト量nmin1を最高相関値fminのシフト
量nminとして採用する。
[Equation 11] It is determined whether or not Δfmin <reference value R1 (15) holds. The reference value R1 is set to a value at least larger than the reference value R2 in consideration of the case of FIG. If the formula (15) is satisfied, FIG.
It is judged that there is a high possibility that the subject is a striped pattern or the like, and the distance measurement by this adopted sensor is disabled. If equation (15) does not hold, distance measurement is possible and the minimum minimum value fmin
The shift amount nmin1 of 1 is adopted as the shift amount nmin of the highest correlation value fmin.

【0182】以上のような極小値判断処理を行うことに
より誤測距等の不具合の発生頻度が削減される。
By performing the minimum value determination processing as described above, the frequency of occurrence of defects such as erroneous distance measurement is reduced.

【0183】次に、相関値演算処理において測距時間の
短縮を図るための複数の他の態様について説明する。ま
ず、測距時間の短縮を図る第1の実施の形態について説
明する。図7ステップS16の説明では(式(1)参
照)、相関値f(n)(n=−2,−1,0,1,…,MAX
(=38))は、Rウインドウ94BとLウインドウ96B
の同一セル位置i(i=1,2,…wo(=42))における
AFデータの差分の絶対値(以下、単にAFデータの差
分という)を全てのセル位置iについて加算したもので
ある。本第1の実施の形態では、各シフト量nの相関値
f(n)を求める際に、全てのセル位置iについてAFデ
ータの差分を加算するのではなく、セル位置iを一定間
隔おきにとって加算するものとする。例えば、セル位置
iを3つおきにとって、AFデータの差分を加算する。
尚、以下の説明において、相関値f(n)の算出において
AFデータの差分を加算する演算対象のセルを採用セル
という。また、3つおきのセル位置iのセルを採用セル
とする場合の相関値演算を以下、「i3つおき演算」と
いい、これに対して、式(1)のように全てのセル位置i
のセルを採用セルとする場合の相関値演算を以下、「通
常演算」という。
Next, a plurality of other modes for shortening the distance measuring time in the correlation value calculation processing will be described. First, a first embodiment for reducing the distance measurement time will be described. In the description of step S16 in FIG. 7 (see formula (1)), the correlation value f (n) (n = −2, −1, 0, 1, ..., MAX)
(= 38)) is R window 94B and L window 96B
The absolute value of the difference in AF data at the same cell position i (i = 1, 2, ... Wo (= 42)) (hereinafter, simply referred to as AF data difference) is added for all cell positions i. In the first embodiment, when obtaining the correlation value f (n) of each shift amount n, the cell positions i are set at regular intervals instead of adding the differences of the AF data for all the cell positions i. It shall be added. For example, the difference of AF data is added for every third cell position i.
In addition, in the following description, a cell to be calculated for adding the difference of AF data in the calculation of the correlation value f (n) is referred to as an adopted cell. Further, the correlation value calculation when the cells at every third cell position i are adopted cells is hereinafter referred to as “i every third calculation”.
Hereinafter, the correlation value calculation in the case where the cell of (1) is set as the adopted cell is referred to as "normal calculation".

【0184】図41は、i3つおき演算におけるRウイ
ンドウ94B及びLウインドウ96B内の採用セルのセ
ル位置iを示した図である。同図に示すようにi3つお
き演算では、Rウインドウ94B及びLウインドウ96
Bともにセル位置1から順に3つおきのセル位置i(=
1、5、9、13、…)のセルが採用セルとして採用さ
れる。ウインドウサイズが42の場合(wo=42の場合)
には採用セルの最終のセル位置iは41となる。この場
合の相関値f(n)の演算式は、上式(1)と同様に次式、
FIG. 41 is a diagram showing cell positions i of adopted cells in the R window 94B and the L window 96B in every third i operation. As shown in the figure, in every third i operation, the R window 94B and the L window 96
In B, every third cell position i (=
, 1, 5, 9, 13, ...) are adopted as adopted cells. When the window size is 42 (when wo = 42)
The final cell position i of the adopted cell is 41. The calculation formula of the correlation value f (n) in this case is the same as the above formula (1).

【0185】[0185]

【数12】 により表されるが、iはi=1、5,9、13,17、
21,25,29,33、37,41のように3つおき
にとられる。尚、採用セルのセル位置iは3つおきでな
くてもよく、また、セル位置i=1からでなくてもよ
い。また、上式(16)では上式(1)に対して4倍の因子が
加えられているが、i3つおき演算では通常演算に対し
てデータ数が1/4となるため通常演算と数値を合わせ
たためである。
[Equation 12] , I is i = 1, 5, 9, 13, 17,
It is taken every third, such as 21,25,29,33,37,41. It should be noted that the cell positions i of the adopted cells may not be at every third cell position, and may not be from the cell position i = 1. Also, in the above equation (16), a factor that is four times that of the above equation (1) is added, but in the operation of every three i's, the number of data is 1/4 of that of the ordinary operation, and therefore, the normal operation and the numerical value are It is because I have combined.

【0186】ここで、採用センサの各セルで得られたA
Fデータに基づいて、通常演算とi3つおき演算とによ
り相関値f(n)を求めた場合の算出結果の例をそれぞれ
図42、図43に示す。これらの図から分かるように、
相関値f(n)の分布の大要は、i3つおき演算の場合で
も通常演算と大きくは変わらず、この例ではi3つおき
演算の場合でも通常演算と同じシフト量n(=10)で
最小極小値が得られている。
Here, A obtained in each cell of the adopted sensor
42 and 43 show examples of calculation results when the correlation value f (n) is obtained by the normal calculation and the i-third operation based on the F data. As you can see from these figures,
The outline of the distribution of the correlation value f (n) is not much different from the normal calculation even in the case of every three i's operations, and in this example, the shift amount n (= 10) is the same as the normal operation in the case of every three i'th operations. The minimum minimum value is obtained.

【0187】CPU60は、上述のようにi3つおき演
算により各シフト量nについての相関値f(n)を算出し
た場合、通常演算による場合と同様に相関値f(n)が極
小値となるシフト量nを検出する。このとき、図42、
図43から分かるようにi3つおき演算により求めた相
関値f(n)は通常演算により求めた相関値f(n)に比べて
変動が大きく、精度が低い。従って、i3つおき演算で
の極小値の位置は通常演算での極小値の位置と異なる可
能性がある。そこで、i3つおき演算を行う場合には、
検出された極小値が1つの場合にはその極小値を暫定最
小極小値とし、検出された極小値が複数の場合にはその
うちの最小の極小値を暫定最小極小値とし、その暫定最
小極小値のシフト量付近において再度、通常演算により
相関値f(n)を算出する。尚、検出された極小値が複数
の場合において、2番目に小さい極小値(暫定第2極小
値)と暫定最小極小値との差が小さい場合には、暫定第
2極小値のシフト量付近においても通常演算により相関
値f(n)の算出を行うが、この場合の詳細については後
述する。また、以下、暫定最小極小値をTfmin1、
そのときのシフト量をTnmin1で表す。また、通常
演算により相関値f(n)を再演算する範囲を再演算範囲
という。
When the CPU 60 calculates the correlation value f (n) for each shift amount n by every third i calculation as described above, the correlation value f (n) becomes the minimum value as in the case of the normal calculation. The shift amount n is detected. At this time, FIG.
As can be seen from FIG. 43, the correlation value f (n) calculated by every three i's has a larger variation and a lower accuracy than the correlation value f (n) calculated by the normal calculation. Therefore, the position of the minimum value in every third i calculation may be different from the position of the minimum value in the normal calculation. Therefore, if i3 is calculated every three times,
If the detected minimum value is one, the minimum value is set as the temporary minimum minimum value, and if the detected minimum values are multiple, the minimum minimum value is set as the temporary minimum minimum value, and the temporary minimum minimum value is set. The correlation value f (n) is calculated again by the normal calculation in the vicinity of the shift amount. When there are a plurality of detected minimum values and the difference between the second smallest local minimum value (temporary second local minimum value) and the temporary minimum local minimum value is small, near the shift amount of the temporary second local minimum value. Also calculates the correlation value f (n) by a normal calculation. Details of this case will be described later. Further, hereinafter, the provisional minimum minimum value is Tfmin1,
The shift amount at that time is represented by Tnmin1. The range in which the correlation value f (n) is recalculated by normal calculation is called the recalculation range.

【0188】CPU60は、通常演算によりシフト量T
nmin1付近の再演算範囲の相関値f(n)を再演算す
ると、その再演算範囲における相関値f(n)の極小値及
びそのシフト量を、通常演算により算出した相関値f
(n)に基づいて検出する。この再演算により検出される
極小値及びシフト量は、測距不能と判断される場合(後
述)を除き、採用センサにおける全ての相関値f(n)を
通常演算により求めた場合に検出される上述の最小極小
値fmin1及びそのシフト量nmin1に相当するた
め、それぞれ最小極小値fmin1、シフト量nmin
1で表す。尚、再演算により検出したことを強調する場
合には再演算最小極小値fmin1という。この再演算
の処理によって検出される再演算最小極小値fmin1
及びシフト量nmin1は、測距不能と判定される場合
を除き、相関値演算処理によって検出すべき最高相関値
fminとそのシフト量nminとなる。
The CPU 60 calculates the shift amount T by the normal calculation.
When the correlation value f (n) in the recalculation range near nmin1 is recalculated, the minimum value of the correlation value f (n) in the recalculation range and its shift amount are calculated by the normal calculation.
Detect based on (n). The minimum value and shift amount detected by this recalculation are detected when all the correlation values f (n) in the adopted sensors are calculated by normal calculation, except when it is determined that distance measurement is impossible (described later). The minimum minimum value fmin1 and the shift amount nmin1 correspond to the minimum minimum value fmin1 and the shift amount nmin, respectively.
Expressed as 1. In addition, when emphasizing what is detected by the recalculation, it is referred to as the recalculation minimum minimum value fmin1. Recalculation minimum local minimum value fmin1 detected by this recalculation processing
The shift amount nmin1 is the maximum correlation value fmin to be detected by the correlation value calculation process and the shift amount nmin, except when it is determined that distance measurement is impossible.

【0189】再演算範囲は、例えば、暫定最小極小値T
fmin1が得られたシフト量Tnmin1に対して±
5のシフト量の範囲とする。例えば、図43の場合に暫
定最小極小値Tfmin1が得られたシフト量Tnmi
n1は10であるから、再演算範囲は、図44に示すよ
うにシフト量n=5〜15となる。この再演算範囲で再
演算を行うと、同図に示すように再演算範囲において図
42と同一の相関値f(n)が算出されるため、本来検出
されるべき最小極小値fmin1のシフト量nmin1
が再演算により検出される。尚、この例では暫定最小極
小値Tfmin1のシフト量Tnmin1と再演算最小
極小値fmin1のシフト量nmin1とは一致してい
る。
The recalculation range is, for example, the provisional minimum minimum value T
fmin1 is ± with respect to the obtained shift amount Tnmin1
The range of shift amount is 5. For example, in the case of FIG. 43, the shift amount Tnmi for which the provisional minimum minimum value Tfmin1 is obtained
Since n1 is 10, the recalculation range is the shift amount n = 5 to 15 as shown in FIG. When the recalculation is performed in this recalculation range, the same correlation value f (n) as in FIG. 42 is calculated in the recalculation range as shown in FIG. nmin1
Is detected by recalculation. In this example, the shift amount Tnmin1 of the provisional minimum minimum value Tfmin1 and the shift amount nmin1 of the recalculation minimum minimum value fmin1 match.

【0190】ここで、i3つおき演算により検出された
暫定最小極小値Tfmin1のシフト量Tnmin1が
図45に示すように近距離警告範囲内であった場合、上
述の通常演算による再演算は行わず、Tnmin1=n
min1として近距離警告とする。近距離警告範囲と
は、オートフォーカスにおいてピント合わせができない
近距離の範囲をいい、上述の再演算は、暫定最小極小値
Tfmin1のシフト量Tnmin1が近距離警告範囲
外のときのみ行うものとする。
Here, when the shift amount Tnmin1 of the provisional minimum minimum value Tfmin1 detected by the operation of every three i's is within the short-distance warning range as shown in FIG. 45, the recalculation by the above-mentioned normal operation is not performed. , Tnmin1 = n
A short-distance warning is given as min1. The short-distance warning range is a short-distance range in which focusing cannot be performed in autofocus, and the above recalculation is performed only when the shift amount Tnmin1 of the provisional minimum local minimum value Tfmin1 is outside the short-distance warning range.

【0191】CPU60は、上述のように再演算により
算出した相関値f(n)により再演算最小極小値fmin
1のシフト量nmin1を検出すると、そのシフト量n
min1とi3つおき演算により検出された暫定最小極
小値Tfmin1のシフト量Tnmin1とを比較す
る。通常、これらのシフト量は一致するが、場合によっ
ては一致しないことがある。この場合、図7ステップS
22の補間値演算処理等、この後の処理において必要な
範囲の相関値f(n)(通常演算による相関値)が不足する
ため、不足しているシフト量nにおける相関値f(n)の
再演算を追加で行う。即ち、再演算最小極小値fmin
1のシフト量nmin1(最高相関のシフト量nmi
n)に対し、少なくとも一定のシフト量範囲(例えば、
±5の範囲)で通常演算による相関値f(n)を算出して
おく必要があり、暫定最小極小値Tfmin1のシフト
量Tnmin1と再演算最小極小値fmin1のシフト
量nmin1とが一致していない場合には、再演算最小
極小値fmin1のシフト量nmin1に対して必要な
シフト量範囲の相関値f(n)が不足する。本実施の形態
では、再演算最小極小値fmin1のシフト量nmin
1に対して通常演算による相関値f(n)が必要なシフト
量範囲は再演算範囲と同じ範囲(±5の範囲)とする。
The CPU 60 uses the correlation value f (n) calculated by recalculation as described above to calculate the minimum recalculation minimum value fmin.
When the shift amount nmin1 of 1 is detected, the shift amount n
min1 is compared with the shift amount Tnmin1 of the provisional minimum minimum value Tfmin1 detected by the operation of every third i. Usually, these shift amounts match, but in some cases, they may not match. In this case, step S in FIG.
Since the correlation value f (n) (correlation value obtained by normal calculation) in the range required in the subsequent processing such as the interpolation value calculation processing of 22 is insufficient, the correlation value f (n) of the insufficient shift amount n Perform additional recalculation. That is, the recalculation minimum minimum value fmin
Shift amount of 1 nmin1 (shift amount of highest correlation nmi
n), at least a constant shift amount range (for example,
It is necessary to calculate the correlation value f (n) by the normal calculation within a range of ± 5), and the shift amount Tnmin1 of the temporary minimum minimum value Tfmin1 and the shift amount nmin1 of the recalculation minimum minimum value fmin1 do not match. In this case, the correlation value f (n) in the necessary shift amount range is insufficient with respect to the shift amount nmin1 of the recalculation minimum minimum value fmin1. In the present embodiment, the shift amount nmin of the recalculation minimum minimum value fmin1
The shift amount range in which the correlation value f (n) by the normal calculation is required for 1 is the same range as the recalculation range (range of ± 5).

【0192】そこで、再演算最小極小値fmin1のシ
フト量nmin1に対して必要なシフト量範囲のうち、
既に通常演算による相関値f(n)が算出された再演算範
囲以外のシフト量について、通常演算による相関値f
(n)の再演算を追加で行う。但し、暫定最小極小値Tf
min1のシフト量Tnmin1と再演算最小極小値f
min1のシフト量nmin1との差(シフト量差nS
A)が所定の値(例えば3)以上の場合には、再演算最
小極小値fmin1が本来検出されるべき最小極小値で
ない可能性が高くなるため、測距不能とする。尚、再演
算の結果、極小値が検出されなくなった場合もこの場合
に相当し測距不能とする。また、不足分の相関値f(n)
を再演算するための処理を不足分相関値再演算処理とい
い、その詳細については後述する。
Therefore, of the shift amount range necessary for the shift amount nmin1 of the recalculation minimum minimum value fmin1,
For shift amounts outside the recalculation range in which the correlation value f (n) has already been calculated by the normal calculation, the correlation value f by the normal calculation
Perform recalculation of (n) additionally. However, the provisional minimum minimum value Tf
Shift amount Tnmin1 of min1 and recalculation minimum minimum value f
Difference from the shift amount nmin1 of min1 (shift amount difference nS
When A) is equal to or larger than a predetermined value (for example, 3), there is a high possibility that the recalculation minimum local minimum value fmin1 is not the minimum local minimum value that should be originally detected, so that distance measurement is impossible. It should be noted that the case where the local minimum value is not detected as a result of the recalculation corresponds to this case and the distance measurement is impossible. Also, the correlation value f (n) for the shortage
The process for recalculating is referred to as the insufficient correlation value recalculation process, the details of which will be described later.

【0193】次に、i3つおき演算により求めた相関値
f(n)において極小値が複数存在し、そのうちの最小極
小値(暫定最小極小値Tfmin1)と第2極小値(暫定
第2極小値)との差が小さい場合について説明する。例
えば、採用センサにおける全てのシフト量n(n=−2
〜MAX(=38))について通常演算により相関値f(n)を算
出した場合、図46に示すように極小値が複数存在し、
最小極小値fmin1のシフト量nmin1がシフト量
n=7で検出され、第2極小値fmin2のシフト量n
min2がシフト量n=32で検出されるものとする。
そして、このようなAFデータに対してi3つおき演算
により相関値f(n)を算出すると、図47に示すような
相関値分布が得られたとする。この場合、CPU60
は、まず、図47のようにi3つおき演算により算出し
た相関値f(n)の分布において最小極小値と第2極小値
とを検出する。尚、i3つおき演算における最小極小値
を上述のように暫定最小極小値Tfmin1、そのシフ
ト量をTnmin1で表し、第2極小値を暫定第2極小
値Tfmin2、そのシフト量をTnmin2で表す。
また、図47では、暫定最小極小値Tfmin1のシフ
ト量Tnmin1は32、暫定第2極小値Tfmin2
のシフト量Tnmin2は6で検出されている。
Next, there are a plurality of local minimum values in the correlation value f (n) obtained by calculating every third i, and the minimum local minimum value (temporary minimum local minimum value Tfmin1) and the second local minimum value (temporary second local minimum value) among them. ) Will be described when the difference is small. For example, all shift amounts n (n = -2) in the adopted sensor.
When the correlation value f (n) is calculated by a normal calculation for ~ (MAX (= 38)), there are a plurality of local minimum values as shown in FIG.
The shift amount nmin1 of the minimum minimum value fmin1 is detected with the shift amount n = 7, and the shift amount n of the second minimum value fmin2 is detected.
It is assumed that min2 is detected with the shift amount n = 32.
Then, when the correlation value f (n) is calculated for such AF data by calculating every third i, it is assumed that the correlation value distribution as shown in FIG. 47 is obtained. In this case, the CPU 60
First detects the minimum minimum value and the second minimum value in the distribution of the correlation value f (n) calculated by every third i calculation as shown in FIG. As described above, the minimum minimum value in every three i's is represented by the temporary minimum minimum value Tfmin1, the shift amount is represented by Tnmin1, the second minimum value is represented by the temporary second minimum value Tfmin2, and the shift amount is represented by Tnmin2.
Further, in FIG. 47, the shift amount Tnmin1 of the provisional minimum minimum value Tfmin1 is 32, and the provisional second minimum value Tfmin2.
The shift amount Tnmin2 of is detected at 6.

【0194】もし、i3つおき演算により検出された暫
定最小極小値Tfmin1と暫定第2極小値Tfmin
2との差(極小値差ΔTfmin=Tfmin2−Tf
min1)が所定の基準値以上の場合には、上述のよう
にCPU60は、暫定最小極小値Tfmin1のシフト
量Tnmin1に対する再演算範囲のみで再演算(通常
演算)を行う。一方、極小値差ΔTfminが上記基準
値よりも小さい場合には、暫定最小極小値Tfmin1
のシフト量Tnmin1に対する再演算範囲と、暫定第
2極小値Tfmin2のシフト量Tnmin2に対する
再演算範囲とで再演算を行う。但し、極小値差ΔTfm
inが上記基準値よりも小さい場合において、暫定最小
極小値Tfmin1のシフト量Tnmin1と暫定第2
極小値Tfmin2シフト量Tnmin2のいずれもが
近距離警告範囲内であった場合には、再演算は行わずに
近距離警告とする。いずれか一方でも近距離警告範囲内
でない場合には上述の通り、両方のシフト量の近傍で再
演算を行う。
If i3 is calculated every third, the temporary minimum minimum value Tfmin1 and the temporary second minimum value Tfmin are detected.
2 (minimum value difference ΔTfmin = Tfmin2-Tf
If min1) is greater than or equal to the predetermined reference value, the CPU 60 performs recalculation (normal calculation) only within the recalculation range for the shift amount Tnmin1 of the provisional minimum minimum value Tfmin1 as described above. On the other hand, when the minimum value difference ΔTfmin is smaller than the reference value, the provisional minimum minimum value Tfmin1
The recalculation is performed for the recalculation range for the shift amount Tnmin1 and the recalculation range for the shift amount Tnmin2 of the provisional second minimum value Tfmin2. However, the minimum value difference ΔTfm
When in is smaller than the above reference value, the shift amount Tnmin1 of the provisional minimum local minimum value Tfmin1 and the provisional second value
If both of the minimum values Tfmin2 and the shift amount Tnmin2 are within the short-distance warning range, the short-distance warning is issued without recalculation. If either one is not within the short-range warning range, recalculation is performed in the vicinity of both shift amounts as described above.

【0195】図48は、図47における極小値差ΔTf
minが上記基準値よりも小さいと判断された場合にお
ける再演算の結果を示した図である。同図に示すように
暫定最小極小値Tfmin1のシフト量Tnmin1
(=32)に対して±5のシフト量範囲(シフト量n=
27〜37)が再演算範囲として再演算され、その再演
算範囲において通常演算による相関値f(n)が算出され
る。また、暫定第2極小値Tfmin2のシフト量Tn
min2(=6)に対しても±5のシフト量範囲(シフ
ト量n=1〜11)が再演算範囲として再演算され、そ
の再演算範囲において通常演算による相関値f(n)が算
出される。これらの再演算範囲で再演算された相関値f
(n)は図46の対応するシフト量範囲の相関値f(n)の値
に等しい。
FIG. 48 shows the minimum value difference ΔTf in FIG.
It is a figure showing the result of recalculation when it is judged that min is smaller than the above-mentioned standard value. As shown in the figure, the shift amount Tnmin1 of the provisional minimum minimum value Tfmin1
A shift amount range of ± 5 with respect to (= 32) (shift amount n =
27 to 37) are recalculated as the recalculation range, and the correlation value f (n) by the normal calculation is calculated in the recalculation range. In addition, the shift amount Tn of the provisional second minimum value Tfmin2
A shift amount range (shift amounts n = 1 to 11) of ± 5 is recalculated for min2 (= 6) as a recalculation range, and the correlation value f (n) is calculated by the normal calculation in the recalculation range. It Correlation value f recalculated in these recalculation ranges
(n) is equal to the value of the correlation value f (n) in the corresponding shift amount range of FIG.

【0196】CPU60は、このように暫定最小極小値
Tfmin1のシフト量Tnmin1付近と暫定第2極
小値Tfmin2のシフト量Tnmin2付近で再演算
を行うと、それらの再演算範囲において、再演算(通常
演算)による相関値f(n)に基づいて極小値及びそのシ
フト量を検出する。これによって検出された最小極小値
と第2極小値をそれぞれ再演算最小極小値fmin1、
再演算第2極小値fmin2で表し、それらのシフト量
をそれぞれシフト量fmin1、シフト量fmin2で
表す。再演算最小極小値fmin1及びそのシフト量f
min1と、再演算第2極小値fmin2及びそのシフ
ト量nmin2は、測距不能と判断される場合(後述)
を除き、採用センサにおける全ての相関値f(n)を通常
演算により求めた場合に検出される上述の最小極小値f
min1及びそのシフト量nmin1と、第2極小値f
min2及びそのシフト量nmin2に相当し、最小極
小値fmin1のシフト量nmin1が相関値演算処理
により検出すべき最高相関値fminのシフト量nmi
nとなる。
When the CPU 60 recalculates in the vicinity of the shift amount Tnmin1 of the provisional minimum minimum value Tfmin1 and in the vicinity of the shift amount Tnmin2 of the provisional second minimum value Tfmin2 in this manner, the recalculation (normal calculation) is performed in the recalculation range. ), The minimum value and its shift amount are detected based on the correlation value f (n). The minimum minimum value and the second minimum value detected by this are respectively recalculated minimum minimum value fmin1,
Recalculation is represented by the second minimum value fmin2, and those shift amounts are represented by shift amount fmin1 and shift amount fmin2, respectively. Recalculation minimum minimum value fmin1 and its shift amount f
min1, recalculation second minimum value fmin2, and shift amount nmin2 thereof are determined to be distance-measuring impossible (described later).
Except for the above, the above-mentioned minimum minimum value f detected when all the correlation values f (n) in the adopted sensors are obtained by normal calculation.
min1 and its shift amount nmin1 and the second minimum value f
min2 and its shift amount nmin2, and the shift amount nmin1 of the minimum minimum value fmin1 is the shift amount nmi of the highest correlation value fmin to be detected by the correlation value calculation processing.
n.

【0197】次に、暫定最小極小値が複数存在する場合
において、i3つおき演算により検出された暫定最小極
小値Tfmin1のシフト量Tnmin1と再演算によ
り検出された再演算最小極小値fmin1のシフト量n
min1とが一致しない場合について説明する。この場
合、上述したのと同様に、再演算最小極小値fmin1
のシフト量nmin1に対して、少なくとも一定のシフ
ト量範囲(例えば、±5の範囲)で通常演算による相関
値f(n)が必要となるため、不足分の相関値f(n)の再演
算(通常演算)を追加で行う。
Next, in the case where there are a plurality of temporary minimum local minimum values, the shift amount Tnmin1 of the temporary minimum local minimum value Tfmin1 detected by the operation of every three i and the shift amount of the recalculated minimum local minimum value fmin1 detected by the recalculation. n
A case where min1 does not match will be described. In this case, the recalculation minimum local minimum value fmin1 is the same as described above.
For the shift amount nmin1 of, the correlation value f (n) by the normal calculation is required at least within a certain shift amount range (for example, ± 5 range), and thus the recalculation of the insufficient correlation value f (n) is performed. (Normal operation) is additionally performed.

【0198】また、シフト量差nSAが所定の基準値以
上の場合には測距不能とするが、この場合のシフト量差
nSAは、再演算最小極小値fmin1のシフト量nm
in1が暫定最小極小値Tfmin1のシフト量Tnm
in1に対する再演算に起因して検出されたものであれ
ば、それらのシフト量差とするのが適切であるが、再演
算最小極小値fmin1のシフト量nmin1が暫定第
2極小値Tfmin2のシフト量Tnmin2に対する
再演算に起因して検出された場合には、暫定第2極小値
Tfmin2のシフト量Tnmin2と再演算最小極小
値fmin1のシフト量nmin1とのシフト量差とす
るのが適切である。
When the shift amount difference nSA is greater than or equal to a predetermined reference value, distance measurement is impossible. In this case, the shift amount difference nSA is the shift amount nm of the recalculation minimum minimum value fmin1.
in1 is the shift amount Tnm of the provisional minimum minimum value Tfmin1
If it is detected due to the recalculation of in1, it is appropriate to use the shift amount difference between them. When it is detected due to the recalculation of Tnmin2, it is appropriate to use the shift amount difference between the shift amount Tnmin2 of the provisional second minimum value Tfmin2 and the shift amount nmin1 of the minimum recalculation minimum value fmin1.

【0199】そこで、暫定最小極小値Tfmin1のシ
フト量Tnmin1と再演算最小極小値fmin1のシ
フト量nmin1とのシフト量差DIS1(=|Tnm
in1−nmin1|)と、暫定最小極小値Tfmin
2のシフト量Tnmin2と再演算最小極小値fmin
1のシフト量nmin1とのシフト量差DIS2(=|
Tnmin2−nmin1|)を求め、そのうち小さい
方の値をシフト量差nSAとしてシフト量差nSAによ
り測距可能か否かを判断する。
Therefore, the shift amount difference DIS1 (= | Tnm between the shift amount Tnmin1 of the provisional minimum minimum value Tfmin1 and the shift amount nmin1 of the recalculated minimum minimum value fmin1.
in1-nmin1 |) and the temporary minimum minimum value Tfmin
2 shift amount Tnmin2 and recalculation minimum minimum value fmin
The shift amount difference DIS2 (= |
Tnmin2-nmin1 |) is obtained, and the smaller value is used as the shift amount difference nSA to determine whether or not distance measurement is possible based on the shift amount difference nSA.

【0200】図48に示した場合、再演算最小極小値f
min1のシフト量nmin1は7であるから、シフト
量差DIS1は図中で示す1の値となり、シフト量差
DIS2は図中で示す25となる。従って、測距可能
か否かは、シフト量差DIS1の大きさで判断する。
In the case shown in FIG. 48, the recalculation minimum minimum value f
Since the shift amount nmin1 of min1 is 7, the shift amount difference DIS1 has a value of 1 shown in the figure and the shift amount difference DIS2 has 25 shown in the figure. Therefore, whether or not distance measurement is possible is determined by the magnitude of the shift amount difference DIS1.

【0201】図49は、不足分再演算処理の処理手順を
示したフローチャートである。不足分再演算処理を実施
する前において、CPU60は、i3つおき演算により
相関値f(n)を算出し、暫定最小極小値Tfmin1の
シフト量Tnmin1を検出する。また、暫定最小最小
極Tfmin1以外に暫定第2極小値Tfmin2が存
在する場合には、そのシフト量Tnmin2を検出す
る。そして、再演算範囲で通常演算による再演算を行
い、再演算範囲において再演算最小極小値fmin1の
シフト量nmin1を検出する。
FIG. 49 is a flow chart showing the processing procedure of the shortage recalculation processing. Before executing the shortage recalculation processing, the CPU 60 calculates the correlation value f (n) by calculating every third i, and detects the shift amount Tnmin1 of the provisional minimum local minimum value Tfmin1. If the provisional second minimum value Tfmin2 is present other than the provisional minimum / minimum pole Tfmin1, the shift amount Tnmin2 is detected. Then, recalculation by normal calculation is performed in the recalculation range, and the shift amount nmin1 of the recalculation minimum minimum value fmin1 is detected in the recalculation range.

【0202】続いて図49の不足分再演算処理に移行す
る。まず、暫定第2極小値Tfmin2のシフト量Tn
min2が存在するか否か、即ち、暫定第2極小値Tf
min2が存在するか否かを判定する(ステップS15
0)。NOであれば、後述のステップS168に移行す
る。一方、YESであれば、次に、暫定第2極小値Tf
min2のシフト量Tnmin2に対して±5のシフト
量nの範囲を再演算範囲として再演算を実施したか否か
を判定する(ステップS152)。もし、NOと判定し
た場合には、後述のステップS168に移行する。一
方、YESと判定した場合には、(シフト量nmin1
≧シフト量Tnmin1)か否かを判定する(ステップ
S154)。YESであれば、暫定最小極小値Tfmi
n1と再演算最小極小値fmin1とのシフト量差の大
きさを示す値DIS1を(DIS1=nmin1−Tn
min1)とし(ステップS156)、NOであれば、
シフト量差DIS1を(DIS1=Tnmin1−nm
in1)とする(ステップS158)。
Subsequently, the process proceeds to the shortage recalculation process of FIG. First, the shift amount Tn of the provisional second minimum value Tfmin2
Whether or not min2 exists, that is, the temporary second minimum value Tf
It is determined whether or not min2 exists (step S15).
0). If NO, the process proceeds to step S168 described below. On the other hand, if YES, then the temporary second minimum value Tf
It is determined whether or not recalculation is performed with the range of the shift amount n of ± 5 for the shift amount Tnmin2 of min2 as the recalculation range (step S152). If NO is determined, the process proceeds to step S168 described below. On the other hand, if YES is determined, (shift amount nmin1
It is determined whether ≧ shift amount Tnmin1) (step S154). If YES, the temporary minimum minimum value Tfmi
The value DIS1 indicating the magnitude of the shift amount difference between n1 and the minimum recalculation minimum value fmin1 is set to (DIS1 = nmin1-Tn
min1) (step S156), if NO,
The shift amount difference DIS1 is (DIS1 = Tnmin1-nm
in1) (step S158).

【0203】次に、CPU60は、(シフト量nmin
1≧シフト量Tnmin2)か否かを判定する(ステッ
プS160)。YESであれば、暫定第2極小値Tfm
in2と再演算最小極小値fmin1とのシフト量差の
大きさを示す値DIS2を(DIS1=nmin1−T
nmin2)とし(ステップS162)、NOであれ
ば、シフト量差DIS2を(DIS2=Tnmin2−
nmin1)とする(ステップS164)。
Next, the CPU 60 (shift amount nmin
It is determined whether or not 1 ≧ shift amount Tnmin2) (step S160). If YES, the temporary second minimum value Tfm
The value DIS2 indicating the magnitude of the shift amount difference between in2 and the minimum recalculation minimum value fmin1 is set to (DIS1 = nmin1-T
nmin2) (step S162). If NO, the shift amount difference DIS2 is (DIS2 = Tnmin2-
nmin1) (step S164).

【0204】次に、(DIS1≦DIS2)か否かを判
定し(ステップS166)、YES、即ち、再演算最小
極小値fmin1が暫定第2極小値Tfmin2よりも
暫定最小極小値Tfmin1に近い位置にあると判定し
た場合には、暫定値ZANTEI=シフト量Tnmin
1とする(ステップS168)。NO、即ち、再演算最
小極小値fmin1が暫定最小極小値Tfmin1より
も暫定第2極小値Tfmin2に近い位置にあると判定
した場合には、暫定値ZANTEI=シフト量Tnmi
n2とする(ステップS170)。尚、ステップS15
0、又は、ステップS152においてNOと判定した場
合には、ステップS168に移行して、暫定値ZANT
EI=シフト量Tnmin1とする。
Next, it is determined whether or not (DIS1≤DIS2) (step S166), YES, that is, the recalculated minimum minimum value fmin1 is closer to the temporary minimum minimum value Tfmin1 than the temporary second minimum value Tfmin2. If it is determined that there is a provisional value ZANTEI = shift amount Tnmin
1 (step S168). If NO, that is, if it is determined that the recalculation minimum local minimum value fmin1 is closer to the temporary second local minimum value Tfmin2 than the temporary minimum local minimum value Tfmin1, the temporary value ZANTEI = shift amount Tnmi
n2 (step S170). Incidentally, step S15
0, or if NO in step S152, the process proceeds to step S168 to change the provisional value ZANT.
Let EI = shift amount Tnmin1.

【0205】次に、CPU60は、(ZANTEI≧n
min1)か否か、即ち、再演算最小極小値fmin1
のシフト量nmin1が暫定値ZANTEIに対して+
側又は−側のいずれにあるかを判定する(ステップS1
72)。YESと判定した場合、シフト量差nSAを
(nSA=ZANTEI−nmin1)とする(ステッ
プS174)。
Next, the CPU 60 causes (ZANTEI ≧ n
min1), that is, the recalculation minimum minimum value fmin1
The shift amount nmin1 of is + with respect to the provisional value ZANTEI
Whether it is on the side or the-side is determined (step S1).
72). If YES is determined, the shift amount difference nSA is set to (nSA = ZANTEI-nmin1) (step S174).

【0206】そして、まず、(nSA≧3)か否かを判
定する(ステップS176)。YESと判定した場合に
は、測距不能として(ステップS178)、この不足分
再演算処理を終了する。
First, it is determined whether or not (nSA ≧ 3) (step S176). If YES is determined, it is determined that distance measurement is impossible (step S178), and the shortage recalculation process ends.

【0207】ステップS176においてNOと判定した
場合には、続いて、(nSA=2)か否かを判定する
(ステップS180)。ここでYESと判定した場合に
は、シフト量n=nmin1−4及びnmin1−5に
おける相関値f(nmin1−4)と、相関値f(nmi
n1−5)を通常演算により再演算する(ステップS1
82)。
If NO in step S176, it is then determined whether or not (nSA = 2) (step S180). If YES is determined here, the correlation value f (nmin1-4) at the shift amount n = nmin1-4 and nmin1-5 and the correlation value f (nmi
n1-5) is recalculated by the normal calculation (step S1).
82).

【0208】ステップS180においてNOと判定した
場合には、次に(nSA=1)か否かを判定する(ステ
ップS184)。YESと判定した場合には、シフト量
nmin1−5における相関値f(nmin1−5)を通
常演算により再演算する(ステップS186)。
If NO in step S180, it is then determined whether or not (nSA = 1) (step S184). If YES is determined, the correlation value f (nmin1-5) in the shift amount nmin1-5 is recalculated by normal calculation (step S186).

【0209】ステップS184においてNOと判定した
場合には再演算(不足分の再演算)を行わず(ステップ
S188)、不足分再演算の処理を終了する。
If NO is determined in step S184, the recalculation (recalculation of the shortage) is not performed (step S188), and the process of the shortage recalculation is ended.

【0210】上記ステップS172においてNOと判定
した場合には、シフト量差nSA=nmin1−ZAN
TEIとする(ステップS190)。
If NO in step S172, the shift amount difference nSA = nmin1-ZAN.
TEI (step S190).

【0211】そして、まず、(nSA≧3)か否かを判
定する(ステップS192)。YESと判定した場合に
は、測距不能として(ステップS194)、この不足分
再演算処理を終了する。
First, it is determined whether or not (nSA ≧ 3) (step S192). If YES is determined, it is determined that the distance measurement is impossible (step S194), and the shortage recalculation process ends.

【0212】ステップS192においてNOと判定した
場合には、続いて、(nSA=2)か否かを判定する
(ステップS196)。ここでYESと判定した場合に
は、シフト量n=nmin1−4及びnmin1−5に
おける相関値f(nmin1−4)と、相関値f(nmi
n1−5)を通常演算により再演算する(ステップS1
98)。
If NO in step S192, it is subsequently determined whether or not (nSA = 2) (step S196). If YES is determined here, the correlation value f (nmin1-4) at the shift amount n = nmin1-4 and nmin1-5 and the correlation value f (nmi
n1-5) is recalculated by the normal calculation (step S1).
98).

【0213】ステップS196においてNOと判定した
場合には、次に(nSA=1)か否かを判定する(ステ
ップS200)。YESと判定した場合には、シフト量
n=nmin1−5における相関値f(nmin1−5)
を通常演算により再演算する(ステップS202)。
If NO is determined in step S196, it is then determined whether or not (nSA = 1) (step S200). If YES is determined, the correlation value f (nmin1-5) at the shift amount n = nmin1-5
Is recalculated by normal calculation (step S202).

【0214】ステップS196においてNOと判定した
場合には再演算(不足分の再演算)を行わず(ステップ
S188)、不足分再演算の処理を終了する。
If NO is determined in step S196, the recalculation (recalculation of the shortage) is not performed (step S188), and the process of the shortage recalculation is ended.

【0215】尚、不足分再演算範囲がnの最小値(−
2)未満、又は、nの最大値(38)を超えた場合は再
演算を実施しないこととする。
The shortage recalculation range is the minimum value of n (-
If it is less than 2) or exceeds the maximum value (38) of n, the recalculation is not performed.

【0216】以上の不足分再演算処理により最高相関値
fminのシフト量nminに対して必要なシフト量範
囲の通常演算による相関値f(n)が得られる。
By the above shortage recalculation processing, the correlation value f (n) is obtained by the normal calculation of the necessary shift amount range with respect to the shift amount nmin of the highest correlation value fmin.

【0217】次に、以上のi3つおき演算に特有の誤測
距及びその防止について説明する。i3つおき演算に特
有の誤測距は、上記「AFデータの取得処理」の欄で説
明したようにセンサデータにコントラスト抽出処理(2
画素差分演算)を施したものをAFデータとする場合に
おいて特に問題となる。図50(A)、(B)は2画素
差分演算により得たRセンサ94とLセンサ96のAF
データのうち、シフト量n=0におけるi3つおき演算
で使用するAFデータを例示した図である。この場合、
相関値演算は3つおきにデータを使用しているため、コ
ントラストの有る部分を捉えることができない。一方、
この前後の前後のシフト量ではコントラストの有る部分
を捉えることができるので、シフト量n=0で極小値と
なる可能性が高い。この状態からシフト量nが8ずれた
場合(n=8)は、i3つおき演算で使用するAFデー
タのセンサ番号は4つシフトすることになるため、端の
1つ以外は全てn=0のときと同じAFデータが使用さ
れることになる。このとき新たに加わった端のAFデー
タにコントラストがなかった場合には、再びこのシフト
量n=8においても極小値となる可能性が高い。
Next, the erroneous distance measurement peculiar to the above-mentioned calculation of every third i and the prevention thereof will be described. As for the erroneous distance measurement peculiar to the calculation every three i, the contrast extraction processing (2
This is a particular problem when AF data is obtained by performing pixel difference calculation. 50A and 50B are AF of the R sensor 94 and the L sensor 96 obtained by the 2-pixel difference calculation.
FIG. 6 is a diagram exemplifying AF data used in every third i calculation at a shift amount n = 0 among data. in this case,
Since the correlation value calculation uses data every 3rd, it is not possible to capture a portion with contrast. on the other hand,
Since the amount of contrast can be captured by the shift amount before and after this, the shift amount n = 0 is likely to be a minimum value. If the shift amount n deviates from this state by 8 (n = 8), the sensor number of the AF data used in the calculation every 3 i will be shifted by 4, so that n = 0 except for one at the end. The same AF data as in the above case will be used. At this time, if there is no contrast in the newly added AF data at the end, there is a high possibility that the shift amount n will be the minimum value again.

【0218】このような現象はシフト量が8ずつシフト
するごとに繰り返される。図51は、図50(A)、
(B)のAFデータの例でi3つおき演算を行って相関
値f(n)を算出した結果を示したものであり、同図に示
すようにシフト量n=0、8、16、…において極小値
が検出される。尚、図50(A)、(B)のAFデータ
の例で通常演算を行った場合の相関値分布を図52に示
す。このように通常演算において検出される真の極小値
とは無関係の位置で極小値が検出されるため、誤測距を
招くおそれがある。
Such a phenomenon is repeated each time the shift amount is shifted by 8. FIG. 51 shows FIG.
The result of calculating the correlation value f (n) by performing calculation every three i's in the example of the AF data of (B) is shown, and as shown in FIG. A local minimum is detected at. Note that FIG. 52 shows the correlation value distribution when the normal calculation is performed using the example of the AF data of FIGS. 50 (A) and 50 (B). As described above, since the minimum value is detected at a position irrelevant to the true minimum value detected in the normal calculation, erroneous distance measurement may be caused.

【0219】また、図50のようなセンサデータの態様
が実測で得られた場合にi3つおき演算で求めた相関値
f(n)を図53に示す。この場合、暫定最小極小値Tf
min1はシフト量Tnmin1=33で検出され、暫
定第2極小値Tfmin2はシフト量Tnmin2=2
6で検出されている。このような実測においては、図5
0(A)、(B)のようにあるシフト量nの相関値を算
出する際に使用する全てのセンサデータにコントラスト
がないということはほとんど無く、多少のコントラスト
が存在しており、その影響で極小値が8ごとのシフト量
間隔で繰り返されずに、±1ずれて7や9のシフト量間
隔で観測される場合がある。
Further, FIG. 53 shows the correlation value f (n) obtained by calculating every third i when the mode of the sensor data as shown in FIG. 50 is obtained by actual measurement. In this case, the provisional minimum minimum value Tf
min1 is detected by the shift amount Tnmin1 = 33, and the provisional second minimum value Tfmin2 is detected by the shift amount Tnmin2 = 2.
Detected in 6. In such an actual measurement, FIG.
There is almost no contrast in all sensor data used when calculating the correlation value of a certain shift amount n, such as 0 (A) and (B), and there is some contrast. In some cases, the local minimum value is not repeated at shift amount intervals of 8 and is observed at shift amount intervals of 7 or 9 with a shift of ± 1.

【0220】以上のことから、暫定最小極小値Tfmi
n1と暫定第2極小値Tfmin2との差が所定の調整
値aより小さい場合であって、暫定最小極小値のシフト
量Tnmin1と暫定第2極小値のシフト量Tnmin
2との差が8の倍数であるか、又は、8の倍数の±1で
ある場合にはi3つおき演算ではなく上記通常演算によ
り相関値演算を行うようにする。即ち、
From the above, the provisional minimum local minimum value Tfmi
In the case where the difference between n1 and the temporary second minimum value Tfmin2 is smaller than the predetermined adjustment value a, the temporary minimum minimum value shift amount Tnmin1 and the temporary second minimum value shift amount Tnmin.
When the difference from 2 is a multiple of 8 or ± 1 of a multiple of 8, the correlation value calculation is performed by the above-described normal calculation instead of every three i's. That is,

【0221】[0221]

【数13】Tfmin2−Tfmin1<調整値aか
つ、
[Equation 13] Tfmin2-Tfmin1 <Adjustment value a and

【0222】[0222]

【数14】|Tnmin1−Tnmin2|=(8の倍
数)又は(8の倍数の±1) の場合には通常演算に切り替える。通常演算に切り替え
ることによってi3つおき演算に特有の誤測距を防止す
ることができる。尚、i3つおき演算ではなく通常演算
により相関値演算を行う場合、暫定最小極小値のシフト
量Tnmin1と暫定第2極小値のシフト量Tnmin
2との差が、8の倍数であるか、又は、8の倍数の±1
であることを条件の一つとしたが、i3つおき演算の場
合に限らず、この条件を一般化すると、任意の値xに対
してセル位置iがxつおきのixつおき演算の場合に
は、暫定最小極小値のシフト量Tnmin1と暫定第2
極小値のシフト量Tnmin2との差が、(x+1)×
2の倍数であるか、又は、(x+1)×2の倍数の±1
であることという条件となる。
In the case of | Tnmin1−Tnmin2 | = (multiple of 8) or (± 1 of multiple of 8), the operation is switched to the normal calculation. By switching to the normal calculation, it is possible to prevent erroneous distance measurement peculiar to the calculation every 3 i. When the correlation value calculation is performed by the normal calculation instead of every three i's, the temporary minimum minimum value shift amount Tnmin1 and the temporary second minimum value shift amount Tnmin are calculated.
The difference from 2 is a multiple of 8 or ± 1 of a multiple of 8
Was used as one of the conditions, but the condition is not limited to the operation of every third i, but if this condition is generalized, if the cell position i is every xth ixth operation with respect to an arbitrary value x. Is the provisional minimum minimum shift amount Tnmin1 and the provisional second
The difference between the minimum shift amount Tnmin2 is (x + 1) ×
It is a multiple of 2 or ± 1 of a multiple of (x + 1) × 2
The condition is that

【0223】次に、相関値演算処理において測距時間の
短縮を図る第2の実施の形態について説明する。上述の
通常演算、i3つおき演算のいずれの場合においても採
用センサにおける全てのシフト量n(n=−2,−1,
0,1,…,MAX(=38))について、相関値f(n)を算出
するようにしたが、本第2の実施の形態においては、全
てのシフト量nについての相関値f(n)は算出せず、一
定間隔おきのシフト量nについての相関値f(n)を算出
する。例えば、シフト量nを3つおきに算出する。尚、
シフト量nを3つおきにとる場合の相関値演算を以下、
「n3つおき演算」といい、これに対して、全てのシフ
ト量nについ相関値f(n)を求める場合の相関値演算を
本第2の実施の形態の説明では「通常演算」という(第
1の実施の形態における「通常演算」の意味とは異な
る)。また、n3つおき演算において相関値f(n)を算
出するシフト量nを、採用シフト量nという。
Next, a second embodiment for reducing the distance measuring time in the correlation value calculation processing will be described. In any of the above-described normal calculation and i3 every other calculation, all shift amounts n (n = -2, -1,
0, 1, ..., MAX (= 38)), the correlation value f (n) is calculated. However, in the second embodiment, the correlation value f (n) for all shift amounts n is calculated. ) Is not calculated, but the correlation value f (n) for the shift amount n at regular intervals is calculated. For example, the shift amount n is calculated every three. still,
The correlation value calculation when the shift amount n is every three is
This is referred to as "every nth calculation", whereas the correlation value calculation for obtaining the correlation value f (n) for all shift amounts n is called "normal calculation" in the description of the second embodiment ( (This is different from the meaning of "normal operation" in the first embodiment). Further, the shift amount n for calculating the correlation value f (n) in every nth third calculation is referred to as the adopted shift amount n.

【0224】図54(A)は、採用センサのセンサ数
(即ち、採用センサ数)が62、ウインドウサイズが4
2の場合に、n3つおき演算における採用シフト量nの
例を示しており、採用シフト量nは、シフト量n=−2
から3つおきのn=2、6、10、14、…、38に設
定される。尚、同図のN1は、図12を参照すると、採
用センサ96Aの右端に対する各採用シフト量n=−
2、2、6、…におけるLウインドウ96Bのシフト量
を示し、N2は、採用センサ94Aの左端に対する各採
用シフト量におけるRウインドウ94Bのシフト量を示
す。
In FIG. 54A, the number of employed sensors (that is, the number of employed sensors) is 62, and the window size is 4
In the case of 2, the example of the adopted shift amount n in every n nth calculation is shown, and the adopted shift amount n is the shift amount n = -2.
To n = 2, 6, 10, 14, ... Note that N1 in the figure refers to each of the adopted shift amounts n = − with respect to the right end of the adopted sensor 96A as shown in FIG.
.. indicates the shift amount of the L window 96B in 2, 2, 6, ..., And N2 indicates the shift amount of the R window 94B in each adopted shift amount with respect to the left end of the adopted sensor 94A.

【0225】但し、n3つおき演算においても図54
(A)に示す採用シフト量以外に図54(B)に示すシ
フト量n=−1、0、36、37については採用シフト
量として相関値f(n)を算出することが望ましい。図5
5、図56、図57は、通常演算により全てのシフト量
nについて相関値f(n)を求めた場合において、最小極
小値fmin1が遠距離、中距離、近距離のそれぞれに
得られる場合を仮定して、図54(A)に示した採用シ
フト量n(=2、6、10、14、…、38)のみで相
関値f(n)を算出した場合の相関値分布と、図54
(A)に示した採用シフト量nと併せて図54(B)に
示した採用シフト量n(=−1、0、36、37)で相
関値f(n)を算出した場合の相関値分布を示したグラフ
である。尚、図54(A)の採用シフト量nのみの相関
値分布は、図中「□」記号の点を結ぶ分布により示し、
図54(A)及び図54(B)の採用シフト量nの相関
値分布は、図中「▲」記号の点を結ぶ分布により示す。
However, in the operation of every n3 times, FIG.
In addition to the adopted shift amount shown in (A), it is desirable to calculate the correlation value f (n) as the adopted shift amount for the shift amounts n = -1, 0, 36, 37 shown in FIG. 54 (B). Figure 5
5, FIG. 56, and FIG. 57 show the case where the minimum minimum value fmin1 is obtained for each of the long distance, the medium distance, and the short distance when the correlation values f (n) are obtained for all the shift amounts n by the normal calculation. Assuming that the correlation value f (n) is calculated only with the adopted shift amount n (= 2, 6, 10, 14, ..., 38) shown in FIG.
Correlation value when the correlation value f (n) is calculated with the adopted shift amount n (= -1, 0, 36, 37) shown in FIG. 54B together with the adopted shift amount n shown in (A). It is a graph showing distribution. Incidentally, the correlation value distribution of only the adopted shift amount n in FIG. 54 (A) is shown by a distribution connecting points of “□” symbols in the figure,
The correlation value distribution of the adopted shift amount n in FIGS. 54 (A) and 54 (B) is shown by the distribution connecting the points of the symbol “▲” in the figures.

【0226】まず、通常演算により本来検出される最小
極小値fmin1が遠距離のシフト量に存在する場合で
あって、その最小極小値fmin1が図54(A)の採
用シフト量nと異なるシフト量n=−1にあるとする。
この場合に図54(A)の採用シフト量nのみで相関値
f(n)を算出すると、図55の「□」記号を結ぶ相関値
分布に示すように、これによって算出された相関値分布
からは、そのシフト量n=−1付近において極小値が検
出されない事態が生じる。これに対して、図54(B)
の採用シフト量n(=−1、0)において相関値f(n)
を算出すれば、図55の「▲」記号を結ぶ相関値分布に
示すようにシフト量n=−1において最小極小値が検出
され、遠距離側において本来検出されるべき最小極小値
fmin1が検出されない不具合が解消される。
First, when the minimum minimum value fmin1 originally detected by the normal calculation exists in the shift amount at a long distance, and the minimum minimum value fmin1 is different from the shift amount n adopted in FIG. 54 (A). It is assumed that n = -1.
In this case, when the correlation value f (n) is calculated only with the adopted shift amount n in FIG. 54 (A), the correlation value distribution calculated by this is as shown in the correlation value distribution connecting the “□” symbols in FIG. Therefore, there occurs a situation in which the minimum value is not detected in the vicinity of the shift amount n = -1. On the other hand, FIG. 54 (B)
The correlation value f (n) in the adopted shift amount n (= -1, 0) of
Is calculated, the minimum minimum value is detected at the shift amount n = −1 as shown in the correlation value distribution connecting the “▲” symbols in FIG. 55, and the minimum minimum value fmin1 that should be originally detected on the far side is detected. The problem that is not done is solved.

【0227】これと同様に、通常演算により本来検出さ
れる最小極小値fmin1が近距離のシフト量に存在す
る場合であって、その最小極小値fmin1が図54
(A)の採用シフト量nと異なるシフト量n=−37に
あるとする。この場合に図54(A)の採用シフト量n
のみで相関値f(n)を算出すると、図57の「□」記号
を結ぶ相関値分布に示すように、これによって算出され
た相関値分布からは、そのシフト量n=−37付近にお
いて極小値が検出されない事態が生じる。これに対し
て、図54(B)の採用シフト量n(=36、37)に
おいて相関値f(n)を算出すれば、図57の「▲」記号
を結ぶ相関値分布に示すようにシフト量n=−37にお
いて最小極小値が検出され、近距離側において本来検出
されるべき最小極小値fmin1が検出されない不具合
が解消される。
Similarly, in the case where the minimum minimum value fmin1 originally detected by the normal calculation exists in the shift amount in the short distance, the minimum minimum value fmin1 is shown in FIG.
It is assumed that the shift amount n = −37, which is different from the adopted shift amount n of (A). In this case, the adopted shift amount n in FIG.
When the correlation value f (n) is calculated by only the correlation value distribution connecting the “□” symbols in FIG. 57, the correlation value distribution thus calculated has a minimum value near the shift amount n = −37. The value may not be detected. On the other hand, if the correlation value f (n) is calculated for the adopted shift amount n (= 36, 37) in FIG. 54B, the shift is performed as shown in the correlation value distribution connecting the “▲” symbols in FIG. 57. The problem that the minimum minimum value is detected at the amount n = -37 and the minimum minimum value fmin1 that should be originally detected on the short distance side is not detected is solved.

【0228】一方、通常演算により本来検出される最小
極小値fmin1が中距離に存在する場合においては、
上述のような不具合はほとんど生じない。例えば、図5
6の細線で示すように通常演算による最小極小値fmi
n1が図54(A)の採用シフト量nと異なるシフト量
n=16にあるとする。このような場合に図54(A)
の採用シフト量nのみで相関値f(n)を算出したとする
と、図56の「□」記号を結ぶ相関値分布に示すように
シフト量n=16の近傍の例えばシフト量n=18にお
いて極小値が検出される。一般に、最小極小値fmin
1のシフト量nmin1が中距離に存在する場合には、
そのシフト量nに向かって両側から相関値が小さくなる
相関値分布を示すため、図54(A)の採用シフト量n
のみで相関値f(n)を算出した場合であっても最小極小
値fmin1のシフト量nに対して、少なくともその近
傍で極小値が検出される。極小値の存在が分かれば、通
常演算により検出される最小極小値fmi1の正確なシ
フト量nmin1は、後述の再演算によって検出できる
ため、このn3つおき演算の処理としては十分である。
On the other hand, in the case where the minimum minimum value fmin1 originally detected by the normal calculation exists in the middle distance,
The above-mentioned problems hardly occur. For example, in FIG.
As indicated by the thin line 6 in FIG.
It is assumed that n1 is a shift amount n = 16 which is different from the adopted shift amount n in FIG. In such a case, FIG. 54 (A)
If the correlation value f (n) is calculated only with the adopted shift amount n, the correlation value f (n) in the vicinity of the shift amount n = 16, for example, the shift amount n = 18, as shown in the correlation value distribution connecting the “□” symbols in FIG. The minimum value is detected. Generally, the minimum minimum value fmin
When the shift amount nmin1 of 1 exists in the middle distance,
Since the correlation value distribution in which the correlation values decrease from both sides toward the shift amount n is shown, the adopted shift amount n in FIG.
Even when the correlation value f (n) is calculated only by itself, the minimum value is detected at least in the vicinity of the shift amount n of the minimum minimum value fmin1. If the existence of the local minimum value is known, the accurate shift amount nmin1 of the minimum local minimum value fmi1 detected by the normal calculation can be detected by the recalculation described later, and thus it is sufficient as the processing of every nth calculation.

【0229】以上のことから、n3つおき演算では図5
4(A)に示した採用シフト量nのみでなく、図54
(B)に示した採用シフト量nについても相関値f(n)
を算出するのが好適である。以下、図54(A)のよう
に3つおきの採用シフト量nと、図54(B)のように
遠距離側及び近距離側の特定の採用シフト量nとにおい
て相関値f(n)を算出することをn3つおき演算という
ものとする。但し、図54(A)の採用シフト量nのみ
で相関値演算を行うようにしてもよく、また、この場合
に図55や図57に示すような極小値の存在しない相関
値分布が得られたときには、遠距離又は近距離に極小値
が存在すると仮定して後述の再演算を行うようにしても
よい。
From the above, in the case of every n3 operations, the calculation shown in FIG.
In addition to the adopted shift amount n shown in FIG.
Also for the adopted shift amount n shown in (B), the correlation value f (n)
Is preferably calculated. In the following, the correlation value f (n) is calculated for every three adopted shift amounts n as shown in FIG. 54A and the specific adopted shift amounts n for the long distance side and the short distance side as shown in FIG. Is calculated every n3 times. However, the correlation value calculation may be performed only with the adopted shift amount n in FIG. 54 (A), and in this case, a correlation value distribution without a minimum value as shown in FIGS. 55 and 57 is obtained. In such a case, it may be assumed that a local minimum value exists at a long distance or a short distance, and the recalculation described later may be performed.

【0230】CPU60は、上述のようにn3つおき演
算により採用シフト量nにおける相関値f(n)を算出し
た場合、採用シフト量nで得られた相関値f(n)の分布
から相関値f(n)が極小値となるシフト量nを検出す
る。このとき検出された極小値が1つの場合にはその極
小値を暫定最小極小値Tfmin1とし、検出された極
小値が複数の場合にはそのうちの最小の極小値を暫定最
小極小値とし、その暫定最小極小値のシフト量付近にお
いて再度、通常演算により相関値f(n)を再演算する。
尚、この再演算の処理は、上述のi3つおき演算におけ
る再演算と全く同様の方法を用いることができ、再演算
の範囲、検出された極小値が複数の場合の処理方法、不
足分相関値演算等の詳細な説明については省略する。ま
た、用語の定義もi3つおき演算の説明で使用したもの
と同様とする。
When the CPU 60 calculates the correlation value f (n) at the adopted shift amount n by calculating every n3 as described above, the correlation value f (n) obtained from the adopted shift amount n is used to calculate the correlation value. The shift amount n at which f (n) has a minimum value is detected. If the minimum value detected at this time is one, the minimum value is set to the provisional minimum minimum value Tfmin1. The correlation value f (n) is recalculated again by the normal calculation in the vicinity of the shift amount of the minimum minimum value.
Note that this recalculation processing can use the same method as the above-mentioned recalculation in every third i calculation, and the recalculation range, the processing method in the case where the detected minimum value is plural, and the shortage correlation Detailed description of the value calculation and the like will be omitted. Also, the definition of terms is the same as that used in the explanation of every i3 operation.

【0231】再演算範囲は、暫定最小極小値Tfmin
1のシフト量Tnmin1に対して例えば±5のシフト
量の範囲とし、図56の例では、暫定最小極小値Tfm
in1が得られたシフト量Tnmin1は18であるか
ら、再演算範囲は、図58に示すようにシフト量n=1
3〜23となる。但し、n3つおき演算において既に相
関値f(n)を算出している採用シフト量nついては再演
算で改めて相関値f(n)を算出する必要はなく、図58
に示すように再演算範囲に含まれる採用シフト量n=1
4、18、22については、再演算において相関値f
(n)の算出は行わない。
The recalculation range is the provisional minimum local minimum value Tfmin.
For example, the range of the shift amount is ± 5 with respect to the shift amount Tnmin1 of 1, and in the example of FIG.
Since the shift amount Tnmin1 from which in1 is obtained is 18, the recalculation range is the shift amount n = 1 as shown in FIG.
3 to 23. However, for the adopted shift amount n for which the correlation value f (n) has already been calculated in every n3 calculation, it is not necessary to calculate the correlation value f (n) again by recalculation.
The adopted shift amount n = 1 included in the recalculation range as shown in
For 4, 18, and 22, the correlation value f is recalculated.
(n) is not calculated.

【0232】CPU60は、以上の再演算によって再演
算範囲の相関値f(n)を算出すると、その再演算範囲の
相関値f(n)に基づいて最小極小値fmin1のシフト
量nmin1を検出し、そのシフト量nmin1を相関
値演算において検出すべき最高相関のシフト量nmin
とする。
After calculating the correlation value f (n) in the recalculation range by the above recalculation, the CPU 60 detects the shift amount nmin1 of the minimum minimum value fmin1 based on the correlation value f (n) in the recalculation range. , The shift amount nmin1 of the highest correlation that should be detected in the correlation value calculation
And

【0233】ここで、i3つおき演算、又は、n3つお
き演算を採用した場合における演算数について示してお
くと、例えば、上述の採用センサ数62、ウインドウサ
イズ42の場合、i3つおき演算においては、演算数は
41/4=10.25であり、再演算数11を合わせて
合計21.25個である。n3つおき演算においては、
演算数は15であり、再演算数8を合わせて合計23個
である。これに対して、通常演算の場合には、41個で
あるから、i3つおき演算、n3つおき演算では、演算
数が十分削減され、測距時間の短縮が図られるのが分か
る。
Here, the number of calculations when i3 every other calculation or n3 every other calculation is shown, for example, in the case where the number of adopted sensors is 62 and the window size is 42, i3 every other calculation. Is 41/4 = 10.25, and the total number of recalculations 11 is 21.25. In every nth three operations,
The number of operations is 15, and the total number of reoperations 8 is 23. On the other hand, in the case of the normal calculation, since there are 41 calculations, it can be understood that the number of calculations is sufficiently reduced and the distance measuring time is shortened in the calculation of every 3 i and every 3 n.

【0234】以上説明した第1の実施の形態におけるi
3つおき演算において、暫定最小極小値Tfmin1の
シフト量nmin1と、通常演算の最小極小値fmin
1のシフト量nmin1とが一致しない場合、それらの
シフト量差が大きいと不足分相関値演算における演算数
が増加するため時間短縮の効果が少なくなる。また、i
3つおき演算では、データ数が通常演算の1/4になる
ため精度が低下し暫定極小値が現れない場合がある。こ
のような現象はAFデータのコントラストが低い場合に
多くみられる。
I in the first embodiment described above
In every third calculation, the shift amount nmin1 of the provisional minimum minimum value Tfmin1 and the minimum minimum value fmin of the normal calculation
When the shift amount nmin1 of 1 does not match, if the shift amount difference is large, the number of calculations in the shortfall correlation value calculation increases, and the effect of time reduction decreases. Also, i
In every third calculation, the number of data becomes 1/4 of that in the normal calculation, so that the accuracy is lowered and the temporary minimum value may not appear. Such a phenomenon is often seen when the contrast of AF data is low.

【0235】そこで、採用センサにおけるAFデータの
コントラストが所定の基準値より大きい場合には、i3
つおき演算を行い、低い場合には、通常演算を行うよう
にすれば、このような現象の多くは生じなくなる。ま
た、コントラストが低い場合には、第2の実施の形態に
おけるn3つおき演算を行うようにしてもよい。 {コントラスト検出処理(図7ステップS14、ステッ
プS18)の詳細}次に、図7のステップS14におけ
るコントラス検出処理1及びステップS18におけるコ
ントラス検出処理2について詳説する。コントラスト検
出は、AFセンサ74の所定範囲内のセル(センサデー
タ)から得られたAFデータの最大値と最小値に基づい
てセンサ像(AFデータ)のコントラストの有無を検出
する処理である。コントラストの評価値として本実施の
形態では、AFデータの最大値と最小値との差を用い、
コントラストが所定の基準値以上であればコントラスト
有りと判定し、前記基準値より小さければコントラスト
無しと判定する。
Therefore, if the contrast of the AF data in the adopted sensor is larger than the predetermined reference value, i3
Most of such phenomena do not occur if every other calculation is performed, and if it is low, the normal calculation is performed. In addition, when the contrast is low, the calculation may be performed every n3 intervals in the second embodiment. {Details of Contrast Detection Process (Step S14, Step S18 in FIG. 7)} Next, the contrast detection process 1 in step S14 and the contrast detection process 2 in step S18 of FIG. 7 will be described in detail. The contrast detection is a process of detecting the presence / absence of contrast in the sensor image (AF data) based on the maximum value and the minimum value of the AF data obtained from the cells (sensor data) within the predetermined range of the AF sensor 74. In the present embodiment, the difference between the maximum value and the minimum value of the AF data is used as the contrast evaluation value,
If the contrast is equal to or higher than a predetermined reference value, it is determined that there is contrast, and if it is smaller than the reference value, it is determined that there is no contrast.

【0236】図7のステップS14におけるコントラス
ト検出処理1は、測距エリアを構成する各分割エリアご
とに分割エリアの全セル、即ち、採用センサの全セルを
対象範囲としてコントラスト検出を行う一方、ステップ
S16におけるコントラスト検出処理2は、各分割エリ
アにおいて、相関値演算により検出された最小極小値f
min1のシフト量nmin1、即ち、最高相関値fm
inのシフト量nminにおけるウインドウ範囲内の全
セルを対象範囲としてコントラスト検出を行う。
In the contrast detection processing 1 in step S14 of FIG. 7, contrast detection is performed with all cells of the divided areas, that is, all cells of the adopted sensor, as the target range for each divided area forming the distance measuring area, while the step is performed. The contrast detection processing 2 in S16 is performed by the minimum local minimum value f detected by the correlation value calculation in each divided area.
The shift amount nmin1 of min1, that is, the maximum correlation value fm
Contrast detection is performed with all cells in the window range within the shift amount nmin of in as the target range.

【0237】図59は、コントラスト検出処理1とコン
トラスト検出処理2による一連のコントラスト検出処理
の全体手順を示したフローチャートである。CPU60
は、図7のステップS12におけるのAFデータ取得処
理によりAFデータを取得すると、図7のステップS1
4におけるコントラスト検出処理1の一処理として、測
距エリアを構成するRセンサ94及びLセンサ96の各
分割エリアを個別の対象範囲としたコントラスト検出1
の処理を行う(ステップS250)。今、Rセンサ94
及びLセンサ96の対応するある分割エリアに着目し、
そのRセンサ94の分割エリアとLセンサ96の分割エ
リアをそれぞれRセンサ94の採用センサ、Lセンサ9
6の採用センサというものとする。そして、それらの採
用センサについてコントラスト検出1を行うとすると、
CPU60は、Rセンサ94の採用センサの全セルのA
Fデータのうち最大値及び最小値を検出する。このとき
検出されたAFデータの最大値をRMAX、最小値をR
MINとする。同様にLセンサ96の採用センサの全セ
ルのAFデータのうち最大値及び最小値を検出する。こ
のとき検出されたAFデータの最大値をLMAX、最小
値をLMINとする。
FIG. 59 is a flow chart showing the overall procedure of a series of contrast detection processing by the contrast detection processing 1 and the contrast detection processing 2. CPU60
When the AF data is acquired by the AF data acquisition process in step S12 of FIG. 7, the step S1 of FIG.
As one processing of the contrast detection processing 1 in 4, the contrast detection 1 in which each divided area of the R sensor 94 and the L sensor 96 forming the distance measuring area is set as an individual target range
Is performed (step S250). Now R sensor 94
And paying attention to a certain divided area corresponding to the L sensor 96,
The divided area of the R sensor 94 and the divided area of the L sensor 96 are respectively used as the sensor of the R sensor 94 and the L sensor 9
6 is adopted. Then, if the contrast detection 1 is performed for these adopted sensors,
The CPU 60 uses the R sensor 94 for A of all cells of the sensor.
The maximum value and the minimum value of the F data are detected. The maximum value of the AF data detected at this time is RMAX, and the minimum value is R.
Let it be MIN. Similarly, the maximum value and the minimum value of the AF data of all the cells of the sensor adopted by the L sensor 96 are detected. The maximum value of the AF data detected at this time is LMAX, and the minimum value is LMIN.

【0238】次いで、CPU60は、Rセンサ94の採
用センサにおけるコントラストを次式、
Next, the CPU 60 calculates the contrast of the sensor adopted by the R sensor 94 by the following equation:

【0239】[0239]

【数15】RMAX−RMIN …(17) により求め、Lセンサ96の採用センサにおけるコント
ラストを次式、
[Equation 15] RMAX-RMIN (17)

【0240】[0240]

【数16】LMAX−LMIN …(18) により求める。 次に、CPU60は、図7のステップ
S14におけるコントラスト検出処理1の一処理とし
て、ステップS250のコントラスト検出1により検出
したコントラストによりコントラスト判定1を行う(ス
テップS252)。即ち、Rセンサ94の採用センサに
おける上式(17)のコントラストRMAX−RMIN、及
び、Lセンサ96の採用センサにおける上式(18)のコン
トラストLMAX−LMINが所定の基準値R4に対し
てそれぞれ、
[Expression 16] LMAX-LMIN (18) Next, the CPU 60 performs contrast determination 1 based on the contrast detected by the contrast detection 1 of step S250 as one process of the contrast detection process 1 in step S14 of FIG. 7 (step S252). That is, the contrast RMAX-RMIN of the above formula (17) in the sensor adopted by the R sensor 94 and the contrast LMAX-LMIN of the above formula (18) in the sensor adopted by the L sensor 96 are respectively set with respect to a predetermined reference value R4.

【0241】[0241]

【数17】RMAX−RMIN<R4 …(19) LMAX−LMIN<R4 …(20) が成り立つか否かを判定する。もし、上式(19)と(20)の
うちいずれか一方でも成り立つ場合にはコントラスト無
しとしてそれらの採用センサ(着目している分割エリ
ア)における測距を不能とする(ステップS254)。
上式(19)と(20)の両方とも成り立たない場合には、それ
らの採用センサにおけるコントラストを有りとする。
[Equation 17] RMAX-RMIN <R4 (19) It is determined whether or not LMAX-LMIN <R4 (20). If either one of the above equations (19) and (20) is satisfied, it is determined that there is no contrast and distance measurement is disabled in those adopted sensors (the divided area of interest) (step S254).
When neither of the above equations (19) and (20) is true, it is assumed that there is contrast in the adopted sensors.

【0242】次に、CPU60は、ステップS252に
おいてコントラスト有りと判定した分割エリアについ
て、上記図7のステップS16における相関値演算処理
を行う(ステップS256)。
Next, the CPU 60 performs the correlation value calculation processing in step S16 of FIG. 7 for the divided areas determined to have the contrast in step S252 (step S256).

【0243】次に、CPU60は、上記図7のステップ
S18におけるコントラスト検出処理2の一処理とし
て、相関値演算により検出された最高相関のシフト量n
minにおけるRウインドウ94B及びLウインドウ9
6Bを対象範囲としたコントラスト検出2を行う(ステ
ップS258)。今、Rセンサ94及びLセンサ96の
ある対応する分割エリアに着目し、そのRセンサ94の
分割エリアとLセンサ96の分割エリアをそれぞれRセ
ンサ94の採用センサ、Lセンサ96の採用センサとい
うものとする。そして、それらの採用センサについてコ
ントラスト検出2を行うとすると、CPU60は、その
Rセンサ94の採用センサにおいて最高相関のシフト量
nminが得られたときのRウインドウ94Bの範囲で
AFデータの最大値と最小値を検出する。このとき検出
された最大値をRWMAX、最小値をRWMINとす
る。同様にLセンサ96の採用センサにおいて最高相関
のシフト量nminが得られたときのLウインドウ96
Bの範囲でAFデータの最大値と最小値を検出する。こ
のとき検出された最大値をLWMAX、最小値をLWM
INとする。そして、CPU60は、前記Rウインドウ
94Bにおけるコントラストを次式、
Next, the CPU 60 carries out the shift amount n of the maximum correlation detected by the correlation value calculation as one process of the contrast detection process 2 in step S18 of FIG.
R window 94B and L window 9 at min
Contrast detection 2 is performed with 6B as the target range (step S258). Now, paying attention to a corresponding divided area of the R sensor 94 and the L sensor 96, the divided area of the R sensor 94 and the divided area of the L sensor 96 are referred to as an adopted sensor of the R sensor 94 and an adopted sensor of the L sensor 96, respectively. And Then, assuming that contrast detection 2 is performed for these adopted sensors, the CPU 60 determines the maximum value of the AF data within the range of the R window 94B when the shift amount nmin of the highest correlation is obtained in the adopted sensor of the R sensor 94. Find the minimum value. The maximum value detected at this time is RWMAX, and the minimum value is RWMIN. Similarly, the L window 96 when the shift amount nmin with the highest correlation is obtained in the sensor employing the L sensor 96
The maximum value and the minimum value of AF data are detected in the range of B. The maximum value detected at this time is LWMAX, and the minimum value is LWM.
Let it be IN. Then, the CPU 60 calculates the contrast in the R window 94B by the following equation,

【0244】[0244]

【数18】RWMAX−RWMIN …(21) により求める。また、Lウインドウ96Bにおけるコン
トラストを次式、
[Expression 18] RWMAX-RWMIN (21) In addition, the contrast in the L window 96B is expressed by the following equation,

【0245】[0245]

【数19】LWMAX−LWMIN …(22) により求める。[Formula 19] LWMAX-LWMIN (22) Ask by.

【0246】続いて、CPU60は、上記図7のステッ
プS18におけるコントラスト検出処理2の一処理とし
て、上式(21)、(22)により求めたコントラストによりコ
ントラスト判定2を行う(ステップS260)。即ち、
Rウインドウ94Bにおける上式(21)のコントラストR
WMAX−RWMIN、及び、Lウインドウ96Bにお
ける上式(22)のコントラストLWMAX−LWMINが
上述の基準値R4に対してそれぞれ、
Subsequently, the CPU 60 performs contrast determination 2 based on the contrast obtained by the above equations (21) and (22) as one process of the contrast detection process 2 in step S18 of FIG. 7 (step S260). That is,
Contrast R of the above formula (21) in the R window 94B
WMAX-RWMIN and the contrast LWMAX-LWMIN of the above formula (22) in the L window 96B are respectively set with respect to the above-mentioned reference value R4.

【0247】[0247]

【数20】RWMAX−RWMIN<R4 …(23) LWMAX−LWMIN<R4 …(24) が成り立つか否かを判定する。もし、上式(23)と(24)の
うちいずれか一方でも成り立つ場合にはコントラスト無
しとしてそれらの採用センサ(着目している分割エリ
ア)における測距を不能とする(ステップS254)。
上式(23)と(24)の両方とも成り立たない場合には、それ
らのウインドウにおけるコントラストを有りとする。コ
ントラスト有りとした場合には次の処理に移行する。
[Equation 20] RWMAX-RWMIN <R4 (23) It is determined whether or not LWMAX-LWMIN <R4 (24). If either one of the above equations (23) and (24) is satisfied, it is determined that there is no contrast and the distance measurement in those adopted sensors (the divided area of interest) is disabled (step S254).
If neither of the above equations (23) and (24) holds, the contrast in those windows is considered to be present. If there is contrast, the process moves to the next process.

【0248】以上のコントラスト検出処理1及びコント
ラスト検出処理2により測距不能と判定される場合の具
体例について説明する。例えば、Rセンサ94及びLセ
ンサ96の中央エリアを採用センサとして着目した場合
に、それら採用センサの全セル範囲のAFデータが図6
0(A)、(B)に示すように低コントラストを示して
いたとする。この場合に、相関値演算により相関値f
(n)を算出すると、同図(C)に示すように最小極小値
fmin1のシフト量nmin1、即ち、最高相関値f
minのシフト量nminがシフト量n=12で検出さ
れる。このような場合、同図(A)、(B)に示してい
るようにRセンサ94の採用センサ及びLセンサ96の
採用センサにおいて、シフト量nminにおけるウイン
ドウ範囲(最高相関値となったウインドウ範囲)のAF
データも低コントラストを示し、シフト量n=12を最
高相関のシフト量nminとすると誤測距となる可能性
が高い。
A specific example of the case where it is determined by the above-mentioned contrast detection processing 1 and contrast detection processing 2 that distance measurement is impossible will be described. For example, when focusing on the central area of the R sensor 94 and the L sensor 96 as the adopted sensor, the AF data of the entire cell range of the adopted sensors is shown in FIG.
It is assumed that low contrast is exhibited as shown in 0 (A) and (B). In this case, the correlation value f is calculated by the correlation value calculation.
When (n) is calculated, the shift amount nmin1 of the minimum minimum value fmin1, that is, the maximum correlation value f is calculated as shown in FIG.
The shift amount nmin of min is detected with the shift amount n = 12. In such a case, as shown in FIGS. 9A and 9B, in the sensor used by the R sensor 94 and the sensor used by the L sensor 96, the window range at the shift amount nmin (the window range having the highest correlation value) ) AF
The data also shows low contrast, and if the shift amount n = 12 is set as the shift amount nmin having the highest correlation, there is a high possibility that the distance will be erroneously measured.

【0249】このように採用センサの全セル範囲におい
てAFデータが低コントラストを示す場合、実際にはこ
の採用センサに対して相関値演算処理は行われることな
く、コントラスト検出処理1におけるコントラスト判定
1(図59のステップS252)において測距不能と判
定される。従って、明らかに測距不能なAFデータを示
す採用センサについては相関値演算が行われないため、
測距時間が短縮される。
In this way, when the AF data shows low contrast in the entire cell range of the adopted sensor, the correlation value calculation process (1) in the contrast detection process 1 is not actually performed on the adopted sensor. In step S252) of FIG. 59, it is determined that distance measurement is impossible. Therefore, since the correlation value calculation is not performed for the adopted sensor that clearly shows AF data that cannot be measured,
Distance measurement time is shortened.

【0250】一方、図61(A)、(B)に示すように
Rセンサ94及びLセンサ96の採用センサの全セル範
囲においては、AFデータが高コントラストを示してい
たとする。この場合に、相関値演算により相関値f(n)
を算出したとすると、同図(C)に示すように最高相関
値fminのシフト量nminがシフト量n=12で検
出される。しかしながら、この場合において、同図
(A)、(B)に示しているようにRセンサ94の採用
センサ及びLセンサ96の採用センサにおいて、最高相
関値となったウインドウ範囲のAFデータは低コントラ
ストを示しており、シフト量n=12を最高相関のシフ
ト量nminとすると誤測距となる可能性が高い。
On the other hand, as shown in FIGS. 61 (A) and 61 (B), it is assumed that the AF data shows high contrast in the entire cell range of the adopted sensors of the R sensor 94 and the L sensor 96. In this case, the correlation value f (n) is calculated by the correlation value calculation.
Then, the shift amount nmin of the highest correlation value fmin is detected with the shift amount n = 12 as shown in FIG. However, in this case, as shown in (A) and (B) of the same figure, the AF data in the window range having the highest correlation value in the sensor adopted by the R sensor 94 and the sensor adopted by the L sensor 96 has low contrast. When the shift amount n = 12 is set as the shift amount nmin having the highest correlation, there is a high possibility that erroneous distance measurement will occur.

【0251】このように、採用センサの全セルを対象範
囲としてコントラスト検出処理1ではコントラスト有り
と判定されるような場合であっても、相関値演算により
検出された最高相関のシフト量nminにおけるウイン
ドウ範囲ではAFデータが低コントラストを示す場合に
は、コントラスト検出処理2におけるコントラスト判定
2(図59のステップS260)において測距不能と判
定される。従って、コントラスト検出処理1において測
距可能とされた場合でも誤測距となる可能性が高い図6
1のような場合にはコントラスト検出処理2によって適
切に測距不能と判定される。
As described above, even when it is determined in the contrast detection processing 1 that all cells of the adopted sensor are in the target range and the contrast is detected, the window in the shift amount nmin of the highest correlation detected by the correlation value calculation is used. When the AF data shows low contrast in the range, it is determined that the distance measurement is impossible in the contrast determination 2 (step S260 in FIG. 59) in the contrast detection processing 2. Therefore, even if distance measurement is possible in the contrast detection processing 1, there is a high possibility that erroneous distance measurement will occur.
In the case of 1, it is appropriately determined by the contrast detection process 2 that distance measurement is impossible.

【0252】以上説明したコントラスト検出処理では、
相関値演算処理(図59のステップS256)を行った
後、最高相関のシフト量nminにおけるウインドウ範
囲についてコントラスト検出処理2を行うようにしたが
(同図ステップS258、260)、相関値演算処理を
行った後にコントラスト検出処理2を行う代わりに、相
関値演算処理を行う前において上述のコントラスト検出
処理2と同様の処理を行うようにすることもできる。例
えば、コントラスト検出処理1によりある分割エリアの
全セルのAFデータを対象としてコントラスト有りと判
定されたとする。この場合、次に、その分割エリアの全
てのシフト量nにおけるウインドウ範囲を対象として、
各ウインドウ範囲ごとにコントラストの有無を検出す
る。この結果、コントラスト無しと判定したウインドウ
範囲のシフト量nについては相関値演算を行わず、コン
トラスト有りと判定したウインドウ範囲のシフト量nに
ついてのみ相関値演算を行い、相関値f(n)を算出す
る。そして、相関値f(n)を算出したシフト量nの範囲
で最高相関値fminのシフト量nminを検出する。
この場合、相関値演算における演算数を削減することが
でき、測距時間の短縮が図れる。尚、この場合における
コントラスト検出処理は行わなくても良い。また、全て
のシフト量nにおけるウインドウ範囲においてコントラ
スト無しと判定された場合には、一度も相関値演算が行
われず、測距不能と判定される。
In the contrast detection processing described above,
After performing the correlation value calculation process (step S256 in FIG. 59), the contrast detection process 2 is performed for the window range at the shift amount nmin of the highest correlation (steps S258 and 260 in FIG. 59), but the correlation value calculation process is performed. Instead of performing the contrast detection process 2 after performing the process, the same process as the contrast detection process 2 described above may be performed before performing the correlation value calculation process. For example, it is assumed that the contrast detection processing 1 determines that there is contrast for the AF data of all cells in a certain divided area. In this case, next, targeting the window ranges in all the shift amounts n of the divided area,
The presence or absence of contrast is detected for each window range. As a result, the correlation value calculation is not performed for the shift amount n of the window range determined to have no contrast, and the correlation value calculation is performed only for the shift amount n of the window range determined to have the contrast to calculate the correlation value f (n). To do. Then, the shift amount nmin of the highest correlation value fmin is detected within the range of the shift amount n in which the correlation value f (n) is calculated.
In this case, the number of calculations in the correlation value calculation can be reduced, and the distance measurement time can be shortened. Note that the contrast detection process in this case may not be performed. When it is determined that there is no contrast in the window range for all shift amounts n, the correlation value calculation is not performed even once, and it is determined that distance measurement is impossible.

【0253】更に、一箇所でもコントラストがあるウイ
ンドウがあった場合は、全ての相関値演算を実施するよ
うにしてもよい。 {L、Rチャンネル差補正処理(図7ステップS20)
の詳細}次に、図7のステップS20におけるL、Rチ
ャンネル差補正処理について説明する。L、Rチャンネ
ル差補正処理は、AFセンサ74のRセンサ94から取
得したAFデータと、AFセンサ74のLセンサ96か
ら取得したAFデータとの信号量を一致させる処理であ
る。本処理では、上記コントラスト検出処理2のコント
ラスト判定2(図59参照)においてコントラスト有り
と判定した分割エリアにおいて、最高相関値が得られた
Rウインドウ94B及びLウインドウ96Bの範囲付近
(±5n)のAFデータに対して行う。
Furthermore, if there is a window with contrast even at one place, all correlation value calculations may be performed. {L and R channel difference correction processing (FIG. 7, step S20)
Details of L} Next, the L and R channel difference correction processing in step S20 of FIG. 7 will be described. The L and R channel difference correction processing is processing for matching the signal amounts of the AF data acquired from the R sensor 94 of the AF sensor 74 and the AF data acquired from the L sensor 96 of the AF sensor 74. In this processing, in the divided area determined to have the contrast in the contrast determination 2 (see FIG. 59) of the contrast detection processing 2, in the vicinity of the range (± 5n) of the R window 94B and the L window 96B where the highest correlation value is obtained. Perform on AF data.

【0254】まず、CPU60におけるL、Rチャンネ
ル差補正処理の手順について図62のフローチャートを
用いて説明する。同図のステップS300で示している
コントラスト判定2の処理は、上記図59ステップS2
60のコントラスト判定2に相当し、この判定処理にお
いて、コントラスト無しと判定された分割エリアについ
ては、測距不能とされ、コントラスト有りと判定された
分割エリアについては、以下のL、Rチャンネル差補正
処理に移行する。そこで、コントラスト有りと判定した
ある分割エリアを採用センサとして着目して以下説明す
ると、CPU60は、まず、補正が必要か否かを判定す
るために、その採用センサにおいて最高相関値が得られ
たRウインドウ94Bの範囲とLウインドウ96Bの範
囲でそれぞれAFデータの最小値を検出して比較し、そ
の差の絶対値(左右最小値差ΔDMIN)が大きいか小
さいか、又は、大きすぎるかを判定する(ステップS3
02)。尚、この判定の前又は後(ステップS300と
ステップS302の間、又は、ステップS302とステ
ップS304の間)において、前記採用センサにおける
最高相関値が所定の基準値以上か否かの判断を行い、最
高相関値がその基準値以上の場合にのみ本補正が必要で
あると判断し、最高相関値が基準値より小さい場合には
本補正を行わないようにしてもよい。ここで、最高相関
値が得られたRウインドウ94BにおけるAFデータの
最小値をRWMIN、Lウインドウ96におけるAFデ
ータの最小値をLWMINとすると、左右最小値差ΔD
MINは、次式、
First, the procedure of the L and R channel difference correction processing in the CPU 60 will be described with reference to the flowchart of FIG. The processing of the contrast determination 2 shown in step S300 of FIG.
Corresponding to the contrast determination 2 of 60, in this determination process, the divided area determined to have no contrast is incapable of distance measurement, and the divided area determined to have contrast has the following L and R channel difference corrections. Move to processing. Therefore, the following description will be made by focusing on a certain divided area determined as having contrast as an adopted sensor. First, the CPU 60 first determines whether the highest correlation value is obtained by the adopted sensor in order to determine whether correction is necessary. The minimum value of the AF data is detected and compared in the range of the window 94B and the range of the L window 96B, and it is determined whether the absolute value of the difference (left and right minimum value difference ΔDMIN) is large, small, or too large. (Step S3
02). Before or after this determination (between step S300 and step S302, or between step S302 and step S304), it is determined whether the highest correlation value in the adopted sensor is equal to or more than a predetermined reference value, It may be determined that the main correction is necessary only when the highest correlation value is equal to or higher than the reference value, and the main correction may not be performed when the highest correlation value is smaller than the reference value. Here, letting RWMIN be the minimum value of AF data in the R window 94B for which the highest correlation value was obtained and LWMIN the minimum value of AF data in the L window 96, the difference between the left and right minimum values ΔD.
MIN is the following equation,

【0255】[0255]

【数21】 ΔDMIN=|LWMIN−RWMIN| …(25) により算出される。そして、所定の基準値R5、R6
(R5<R6)に対して、
[Expression 21] ΔDMIN = | LWMIN−RWMIN | ... (25) Then, predetermined reference values R5 and R6
For (R5 <R6),

【0256】[0256]

【数22】ΔDMIN<R5 …(26) が成り立つ場合には左右最小値差ΔDMINが小さいと
判定し、
When ΔDMIN <R5 (26) holds, it is determined that the left-right minimum value difference ΔDMIN is small,

【0257】[0257]

【数23】R6≧ΔDMIN≧R5 …(27) が成り立つ場合には左右最小値差ΔDMINが大きいと
判定する。
If R6 ≧ ΔDMIN ≧ R5 (27) holds, it is determined that the left-right minimum value difference ΔDMIN is large.

【0258】[0258]

【数24】ΔDMIN>R6 …(28) が成り立つ場合には左右最小値差ΔDMINが大きすぎ
ると判定する。
If ΔDMIN> R6 (28) holds, it is determined that the left-right minimum value difference ΔDMIN is too large.

【0259】以上の判定処理により、左右最小値差ΔD
MINが小さいと判定した場合には、本補正を行わずに
次の処理に移行し、左右最小値差ΔDMINが大きい
(補正に適正)と判定した場合には、本補正を行うた
め、次のステップS304の処理に移行する。左右最小
値差ΔDMINが大きすぎると判定した場合には、測距
不能とする(ステップS306)。
By the above determination processing, the left and right minimum value difference ΔD
When it is determined that MIN is small, the process shifts to the next process without performing the main correction, and when it is determined that the left-right minimum value difference ΔDMIN is large (correction is appropriate), the main correction is performed. The process proceeds to step S304. If it is determined that the left-right minimum value difference ΔDMIN is too large, distance measurement is impossible (step S306).

【0260】左右最小値差ΔDMINが大きいと判定し
た場合、次に、CPU60は、Rセンサ94及びLセン
サ96の採用センサにおける補正範囲のAFデータを補
正する(ステップS304)。AFデータの補正は、例
えば、Rセンサ94の採用センサにおけるAFデータの
最小値とLセンサ96の採用センサにおけるAFデータ
の最小値との差分量を求め、その差分量が減少するよう
に一方のセンサのAFデータに対して他方のセンサのA
Fデータの信号量を加減する。尚、AFデータの補正に
ついての詳細は後述する。また、AFデータの補正範囲
は、次のステップS308の処理における補正後のAF
データに基づく相関値演算において所定シフト量範囲の
相関値f(n)を算出する際に必要なAFデータの範囲で
ある。
If it is determined that the left-right minimum value difference ΔDMIN is large, then the CPU 60 corrects the AF data in the correction range of the adopted sensors of the R sensor 94 and the L sensor 96 (step S304). For the correction of the AF data, for example, the difference amount between the minimum value of the AF data in the sensor adopted by the R sensor 94 and the minimum value of the AF data in the sensor adopted by the L sensor 96 is calculated, and one of the differences is reduced so that the difference amount decreases. For the AF data of the sensor, A of the other sensor
The signal amount of F data is adjusted. Details of AF data correction will be described later. Further, the correction range of the AF data is the AF range after the correction in the processing of the next step S308.
This is a range of AF data required when calculating the correlation value f (n) in a predetermined shift amount range in the correlation value calculation based on the data.

【0261】AFデータを補正すると、その補正後のA
Fデータを使用して再度相関値演算(補正後の相関値演
算)を行い、相関値f(n)′を求める(ステップS30
8)。AFデータ補正後の相関値演算は、全てのシフト
量nについて行うようにしてもよいが、本実施の形態で
は、AFデータ補正前の相関値演算において最高相関が
得られたシフト量nminの付近、例えば、シフト量n
minに対して±5の範囲についてのみ行うものとす
る。
When the AF data is corrected, the corrected A
The correlation value calculation (correlation value calculation after correction) is performed again using the F data to obtain the correlation value f (n) ′ (step S30
8). The correlation value calculation after AF data correction may be performed for all shift amounts n, but in the present embodiment, in the vicinity of the shift amount nmin at which the highest correlation is obtained in the correlation value calculation before AF data correction. , For example, the shift amount n
It shall be performed only within the range of ± 5 with respect to min.

【0262】次に、CPU60は、AFデータ補正後の
相関値演算によって得られた相関値f(n)′に基づい
て、AFデータ補正後の相関値演算により相関値f
(n)′を行ったシフト量の範囲で最小極小値fmin′
及びそのシフト量nmin′を検出する。そして、最小
極小値fmin′に基づいて、補正後におけるRセンサ
94のAFデータとLセンサ96のAFデータについ
て、一致度が低いか高いか、又は一致度が低すぎるかを
判定する(ステップS310)。具体的には、例えば、
AFデータ補正後の最小極小値fmin′が所定の基準
値R7に対して、次式、
Next, the CPU 60 calculates the correlation value f after the AF data correction based on the correlation value f (n) 'obtained by the correlation value calculation after the AF data correction.
(n) ′ The minimum minimum value fmin ′ within the range of shift amount
And its shift amount nmin 'are detected. Then, based on the minimum minimum value fmin ', it is determined whether the AF data of the corrected R sensor 94 and the AF data of the L sensor 96 have a low degree of coincidence, a high degree of coincidence, or a degree of low coincidence (step S310). ). Specifically, for example,
The minimum minimum value fmin 'after AF data correction is calculated by the following equation with respect to a predetermined reference value R7.

【0263】[0263]

【数25】fmin′>基準値R7 …(29) を満たす場合には、一致度が低すぎると判定する。一
方、式(29)が成り立たない場合において、AFデータ補
正後の最小極小値fmin′と補正前の最高相関値fm
inとが、次式、
If fmin '> reference value R7 (29) is satisfied, it is determined that the degree of coincidence is too low. On the other hand, when the equation (29) is not satisfied, the minimum minimum value fmin ′ after the AF data correction and the maximum correlation value fm before the correction
in is the following equation,

【0264】[0264]

【数26】fmin≦fmin′ …(30) を満たす場合には、一致度が低いと判定する。式(30)が
成り立たず、次式、
If fmin ≦ fmin ′ (30) is satisfied, it is determined that the degree of coincidence is low. Equation (30) does not hold, and the following equation,

【0265】[0265]

【数27】fmin>fmin′ …(31) が成り立つ場合には、一致度が高いと判定する。(27) fmin> fmin '(31) When is satisfied, it is determined that the degree of coincidence is high.

【0266】この判定処理により、一致度が低すぎると
判定した場合には、この採用センサについて測距不能と
する(ステップS306)。一致度が低いと判定した場
合には、以後の処理においてAFデータ補正後の相関値
演算の結果ではなく、AFデータ補正前の相関値演算の
結果を採用することとする(ステップS312)。一
方、一致度が高いと判定した場合には、AFデータ補正
後の相関値演算の結果を採用することとする(ステップ
S314)。AFデータ補正後の相関値演算の結果を採
用することとした場合において、以後の処理の説明で使
用する相関値f(n)、最高相関値fmin及びそのシフ
ト量nminの用語は、AFデータ補正後の相関値f
(n)′、最小極小値fmin′及びそのシフト量nnm
in′を示す。
If it is determined by this determination processing that the degree of coincidence is too low, distance measurement is not possible for this employed sensor (step S306). If it is determined that the degree of coincidence is low, the result of the correlation value calculation before the AF data correction is used instead of the result of the correlation value calculation after the AF data correction in the subsequent processing (step S312). On the other hand, when it is determined that the degree of coincidence is high, the result of the correlation value calculation after AF data correction is adopted (step S314). When the result of the correlation value calculation after AF data correction is adopted, the terms correlation value f (n), maximum correlation value fmin, and its shift amount nmin used in the description of the subsequent processing are AF data correction. Later correlation value f
(n) ', minimum minimum value fmin' and its shift amount nnm
indicates in '.

【0267】ここで、上記ステップS304のAFデー
タの補正について一実施例を説明する。図63は、AF
データの補正をRセンサ94のAFデータとLセンサ9
6のAFデータの信号量差を補正して行う場合の処理手
順を示したフローチャートである。まず、CPU60
は、Rセンサ94とLセンサ96のうち、AFデータを
補正するセンサ(補正センサ)を判定する(ステップS
330)。
An example of the AF data correction in step S304 will be described below. FIG. 63 shows the AF
The AF data of the R sensor 94 and the L sensor 9 are used to correct the data.
6 is a flowchart showing a processing procedure for correcting a signal amount difference of AF data of No. 6; First, the CPU 60
Determines which of the R sensor 94 and the L sensor 96 corrects the AF data (correction sensor) (step S
330).

【0268】具体的には、最高相関が得られたRウイン
ドウ内におけるAFデータの最小値RMINと最高相関
が得られたLウインドウ内における最小値LMINを比
較し、RMIN>LMINの場合には、Rセンサ94を
補正センサとし、RMIN<LMINの場合には、Lセ
ンサ96を補正センサとする。
Specifically, the minimum value RMIN of AF data in the R window in which the highest correlation is obtained is compared with the minimum value LMIN in the L window in which the highest correlation is obtained, and when RMIN> LMIN, The R sensor 94 is a correction sensor, and when RMIN <LMIN, the L sensor 96 is a correction sensor.

【0269】Lセンサ96を補正センサとする場合、R
センサ94及びLセンサ96の補正前のAFデータをR
及びL、補正後のAFデータをRH及びLHとすると、
次式、
When the L sensor 96 is used as a correction sensor, R
The AF data before correction of the sensor 94 and the L sensor 96 is converted to R
And L, and AF data after correction are RH and LH,
The following equation,

【0270】[0270]

【数28】LH=L−信号量差 RH=R により求める(ステップS332)。ここで、信号量差
は、LMIN−RMINとする。
(28) LH = L−Signal amount difference RH = R (step S332). Here, the signal amount difference is LMIN-RMIN.

【0271】一方、Rセンサ94を補正センサとする場
合には、次式、
On the other hand, when the R sensor 94 is used as a correction sensor,

【0272】[0272]

【数29】LH=L RH=R−信号量差 により求める(ステップS334)。ここで、信号量差
は、RMIN−LMINとする。
## EQU29 ## LH = L RH = R-determined by the signal amount difference (step S334). Here, the signal amount difference is RMIN-LMIN.

【0273】以上のL、Rチャンネル差補正処理による
効果について説明する。図64は、上記図62に示した
L、Rチャンネル差補正処理を新方式としてその効果を
従来方式と比較して示した図である。新方式は、従来方
式と比べると、特に、図62のステップS302におけ
る補正を行うか否かの判定処理の内容が相違しており、
1つ目の従来方式の例(この方式を従来方式とする)
としては、新方式のように最高相関値が得られたRウイ
ンドウ94BとLウインドウ96Bの範囲内におけるA
Fデータの最小値を比較するのではなく、Rセンサ94
の採用センサ内における全てのAFデータに対する最小
値RMINと、Lセンサ96の採用センサ内における全
てのAFデータに対する最小値LMINとを比較し、そ
の最小値差が所定値よりも大きい場合にAFデータを補
正する方式をいうものとする。
The effects of the above L and R channel difference correction processing will be described. FIG. 64 is a diagram showing the effects of the L and R channel difference correction processing shown in FIG. Compared to the conventional method, the new method is different in the content of the determination process of whether or not to perform the correction in step S302 of FIG. 62,
Example of first conventional method (this method is called conventional method)
Is within the range of the R window 94B and the L window 96B where the highest correlation value is obtained as in the new method.
Instead of comparing the minimum value of the F data, the R sensor 94
The minimum value RMIN for all the AF data in the adopted sensor of the L sensor 96 and the minimum value LMIN for all the AF data in the adopted sensor of the L sensor 96 are compared, and if the minimum value difference is larger than a predetermined value, the AF data is compared. The method of correcting

【0274】2つ目の従来方式の例(この方式を従来方
式とする)としては、Rセンサ94とLセンサ96の
それぞれの採用センサ内におけるAFデータの平均値を
求め、その差が所定値よりも大きい場合にAFデータを
補正する方式がある。平均値が一致するように一方のセ
ンサのAFデータを補正する方式をいうものとする。
As a second example of the conventional method (this method is referred to as a conventional method), the average value of the AF data in each of the adopted sensors of the R sensor 94 and the L sensor 96 is obtained, and the difference is a predetermined value. There is a method of correcting the AF data when it is larger than the above. It is a method of correcting the AF data of one sensor so that the average values match.

【0275】例えば、Rセンサ94及びLセンサ96の
採用センサ(例えば中央エリア)内において図64
(A)、(B)に示すようなAFデータが得られたとす
る。このAFデータの例は本来補正が不要な場合を示し
たものである。そして、この採用センサにおけるAFデ
ータに対して相関値演算を行った結果、AFデータ補正
前(補正無し)の相関値分布が同図(C)の「・」記号
で結ばれた分布を示したとする。尚、この補正無しの相
関値分布では、最高相関のシフト量nminはシフト量
n=10において検出されており、そのときのRウイン
ドウ94BとLウインドウ96Bの範囲は、それぞれ同
図(A)、(B)においてAFデータの分布が太線で示
されている範囲である。
For example, in the sensor (for example, the central area) adopted by the R sensor 94 and the L sensor 96, FIG.
It is assumed that AF data as shown in (A) and (B) is obtained. The example of the AF data shows a case where correction is not necessary originally. Then, as a result of performing the correlation value calculation on the AF data in this adopted sensor, it is shown that the correlation value distribution before the AF data correction (without correction) shows the distribution connected by the "." Symbol in FIG. To do. In this correlation value distribution without correction, the shift amount nmin of the highest correlation is detected at the shift amount n = 10, and the ranges of the R window 94B and the L window 96B at that time are shown in FIG. In (B), the AF data distribution is in the range indicated by the thick line.

【0276】このような場合に、従来方式によりAF
データの補正を行うか否かを判定すると、同図(A)、
(B)の比較から明らかなようにRセンサ94とLセン
サ96のそれぞれの採用センサ内におけるAFデータの
最小値に差(図中「従来」で示されている差)が生じ
ているため、AFデータの補正(上記信号量差の補正)
が行われることになり、その補正後のAFデータに基づ
いて相関値演算を行うと、その相関値分布は、同図
(C)の「△」記号で結ばれた分布を示す。このAFデ
ータ補正後に得られた相関値分布では、最小極小値が大
きいため、Rセンサ94のAFデータとLセンサ96の
AFデータの信号量の一致度が低いと判定され、測距不
能と判定される結果となる。尚、従来では、新方式のよ
うにAFデータ補正前に相関値演算を行うことはしてい
ないため、一致度が低いと判定した場合に、新方式のよ
うにAFデータ補正前の相関値演算の結果を採用すると
いう処置は行われていない。このように、従来方式で
は、本来測距不能とすべきでないAFデータが得られて
いるにもかかわらず、補正を行うことによって測距不能
となる不具合が生じる場合がある。
[0276] In such a case, AF is performed by the conventional method.
When it is determined whether or not to correct the data, FIG.
As is clear from the comparison of (B), there is a difference (difference shown as “conventional” in the figure) between the minimum values of the AF data in the adopted sensors of the R sensor 94 and the L sensor 96. AF data correction (correction of the above signal amount difference)
When the correlation value calculation is performed on the basis of the corrected AF data, the correlation value distribution shows the distribution connected by the symbol “Δ” in FIG. In the correlation value distribution obtained after this AF data correction, since the minimum minimum value is large, it is determined that the degree of agreement between the signal amounts of the AF data of the R sensor 94 and the AF data of the L sensor 96 is low, and it is determined that distance measurement is impossible. Result. Note that, conventionally, the correlation value calculation is not performed before the AF data correction like the new method. Therefore, when it is determined that the degree of matching is low, the correlation value calculation before the AF data correction is performed as in the new method. No measures have been taken to adopt the results of. As described above, in the conventional method, there is a possibility that the distance measurement becomes impossible due to the correction although the AF data which should not be supposed to be the distance measurement is obtained.

【0277】また、従来方式によりAFデータの補正
を行うか否かを判定すると、Rセンサ94とLセンサ9
6のそれぞれの採用センサ内におけるAFデータの平均
値に差(同図(A)、(B)の比較において「従来」
で示されている差)が生じているため、AFデータの補
正(上記信号量差の補正)が行われることになり、その
補正後のAFデータに基づいて相関値演算を行うと、そ
の相関値分布は、同図(C)の「×」記号で結ばれた相
関値分布を示す。このAFデータ補正後に得られた相関
値分布では、従来方式と同様に最小極小値が大きいた
め、Rセンサ94のAFデータとLセンサ96のAFデ
ータの信号量の一致度が低いと判定され、測距不能と判
定される結果となる。このように、従来方式において
も、本来測距不能とすべきでないAFデータが得られて
いるにもかかわらず、補正を行うことによって測距不能
となる不具合が生じる場合がある。
If it is determined whether the AF data should be corrected by the conventional method, the R sensor 94 and the L sensor 9 are detected.
There is a difference in the average value of the AF data in each of the six adopted sensors ("conventional" in the comparison of FIGS.
Therefore, the AF data is corrected (correction of the signal amount difference), and when the correlation value is calculated based on the corrected AF data, the correlation is calculated. The value distribution shows the correlation value distribution connected by the "x" symbol in FIG. In the correlation value distribution obtained after this AF data correction, since the minimum minimum value is large as in the conventional method, it is determined that the degree of coincidence between the signal amounts of the AF data of the R sensor 94 and the AF data of the L sensor 96 is low. The result is that it is determined that distance measurement is impossible. As described above, even in the conventional method, there may be a problem that the distance measurement becomes impossible due to the correction even though the AF data that should not be originally made impossible is obtained.

【0278】以上のような従来方式、に対して、新
方式によりAFデータの補正を行うか否かを判定する
と、採用センサにおいて最高相関値が得られたRウイン
ドウ94BとLウインドウ96Bの範囲内ではAFデー
タの最小値に差がないため、補正は行われず、余分な相
関値演算を実施する必要がない。従って、従来方式、
のような不具合は生じない。仮に補正を行ったとする
と、その相関値分布は、同図(C)の「□」記号で結ば
れた分布を示し、従来方式、と同様に一致度が低い
と判定される。しかし、この場合においても新方式の場
合には、測距不能ではなく、AFデータ補正前の相関値
演算の結果を採用するという判断となるため、補正前の
AFデータが補正無しで測距可能なものである場合に
は、AFデータを補正することが適切でなかった場合で
あっても測距不能となる不具合を回避することができ
る。
When it is determined whether or not the AF data is corrected by the new method in contrast to the conventional method as described above, it is within the range of the R window 94B and the L window 96B where the highest correlation value is obtained in the adopted sensor. Then, since there is no difference in the minimum value of the AF data, no correction is performed and it is not necessary to perform extra correlation value calculation. Therefore, the conventional method,
Such a problem does not occur. If correction is made, the correlation value distribution shows a distribution connected by the "□" symbols in FIG. 7C, and it is determined that the degree of coincidence is low as in the conventional method. However, even in this case, in the case of the new method, it is determined that the result of the correlation value calculation before the AF data correction is adopted instead of the distance measurement impossible, so that the AF data before correction can be measured without correction. In such a case, it is possible to avoid the problem that distance measurement becomes impossible even if the AF data is not properly corrected.

【0279】次に、上記ステップS304におけるAF
データ補正において、図63のフローチャートで示した
信号量差補正の代わりに他の補正手段を採用する場合に
ついて説明する。ここで説明するAFデータの補正は、
Rセンサ94及びLセンサ96の採用センサにおけるA
Fデータの信号量差のみではなく、コントラスト比の補
正も行うものである。補正はRセンサ94のAFデータ
とLセンサ96のAFデータのうち、ダイナミックレン
ジを超えない方のセンサのAFデータに対して行う。以
下、具体的に補正処理の内容を説明する。
Next, the AF in step S304 is performed.
In the data correction, a case will be described in which another correction means is adopted instead of the signal amount difference correction shown in the flowchart of FIG. The AF data correction described here is
A of the sensors adopted by the R sensor 94 and the L sensor 96
Not only the signal amount difference of the F data but also the contrast ratio is corrected. The correction is performed on the AF data of the R sensor 94 or the L sensor 96, whichever does not exceed the dynamic range. The details of the correction process will be described below.

【0280】まず、AFデータの補正式において使用す
るコントラスト補正量とオフセット補正量について説明
する。尚、オフセット補正量は、上記信号量差を補正す
るための補正量に相当するものである。ここで、コント
ラスト補正量をDLVCOMPA、オフセット補正量を
DLVCOMPB、Rセンサ94の採用センサにおける
AFデータの最大値及び最小値をそれぞれR1MAX及
びR1MIN、Lセンサ96の採用センサにおけるAF
データの最大値及び最小値をそれぞれL1MAX及びL
1MIN、最高相関が得られたRウインドウ94B及び
Lウインドウ96BにおけるAFデータの最小値をそれ
ぞれR2MIN及びL2MINとする。
First, the contrast correction amount and offset correction amount used in the AF data correction formula will be described. The offset correction amount corresponds to the correction amount for correcting the signal amount difference. Here, the contrast correction amount is DLVCOMPA, the offset correction amount is DLVCOMPB, the maximum value and the minimum value of the AF data in the sensor adopted by the R sensor 94 are R1MAX and R1MIN, and the AF value in the sensor adopted by the L sensor 96, respectively.
The maximum and minimum values of data are L1MAX and L, respectively.
The minimum value of AF data in the R window 94B and the L window 96B for which the maximum correlation is obtained is 1 MIN and R2MIN and L2MIN, respectively.

【0281】コントラスト補正量DLVCOMPAとオ
フセット補正量DLVCOMPBを求める式は、最高相
関が得られたRウインドウ94BにおけるAFデータの
最小値R2MINとRウインドウ94BにおけるAFデ
ータの最小値R2MINとの大小関係によって異なる。
次式、
The formula for obtaining the contrast correction amount DLVCOMPA and the offset correction amount DLVCOMP differs depending on the magnitude relationship between the minimum value R2MIN of AF data in the R window 94B and the minimum value R2MIN of AF data in the R window 94B in which the highest correlation is obtained. .
The following equation,

【0282】[0282]

【数30】L2MIN≦R2MIN …(32) が成り立つ場合、コントラスト補正量DLVCOMPA
とオフセット補正量DLVCOMPBは、次式、
[Equation 30] When L2MIN ≦ R2MIN (32) holds, the contrast correction amount DLVCOMPA
And offset correction amount DLVCOMPB are given by

【0283】[0283]

【数31】 DLVCOMPA=(R1MAX−R1MIN)/(L1MAX−L1MIN ) …(33) DLVCOMPB=R1MIN−{(R1MAX−R1MIN)/(L1MA X−L1MIN)}×L1MIN …(34) により求められる。[Equation 31]   DLVCOMPA = (R1MAX-R1MIN) / (L1MAX-L1MIN )… (33)   DLVCOMPB = R1MIN-{(R1MAX-R1MIN) / (L1MA X-L1MIN)} × L1MIN (34) Required by.

【0284】一方、次式、On the other hand, the following equation,

【0285】[0285]

【数32】L2MIN>R2MIN …(35) が成り立つ場合、コントラスト補正量DLVCOMPA
とオフセット補正量DLVCOMPBは、次式、
[Equation 32] When L2MIN> R2MIN (35) holds, the contrast correction amount DLVCOMPA
And offset correction amount DLVCOMPB are given by

【0286】[0286]

【数33】 DLVCOMPA=(L1MAX−L1MIN)/(R1MAX−R1MIN ) …(36) DLVCOMPB=L1MIN−{(L1MAX−L1MIN)/(R1MA X−R1MIN)}×R1MIN …(37) により求められる。[Expression 33]   DLVCOMPA = (L1MAX-L1MIN) / (R1MAX-R1MIN )… (36)   DLVCOMPB = L1MIN-{(L1MAX-L1MIN) / (R1MA X-R1MIN)} × R1MIN (37) Required by.

【0287】上式によりコントラスト補正量DLVCO
MPA及びオフセット補正量DLVCOMPBを求める
と、次にコントラスト補正量DLVCOMPA及びオフ
セット補正量DLVCOMPBに基づいて採用センサに
おける補正範囲のAFデータを補正する演算処理につい
て説明する。ここで、Rセンサ94及びLセンサ96の
補正前のAFデータをR及びL、補正後のAFデータを
RH及びLHとする。
From the above equation, the contrast correction amount DLVCO
Once the MPA and the offset correction amount DLVCOMPB are obtained, the calculation process for correcting the AF data of the correction range in the adopted sensor based on the contrast correction amount DLVCOMPA and the offset correction amount DLVCOMPB will be described. Here, the AF data before correction of the R sensor 94 and the L sensor 96 is R and L, and the AF data after correction is RH and LH.

【0288】次式、The following equation,

【0289】[0289]

【数34】L2MIN≦R2MIN …(38) が成り立つ場合、補正後のAFデータRH、LHは、上
式(33)、(34)により求めたコントラスト補正量DLVC
OMPAとオフセット補正量DLVCOMPBを用い
て、次の補正式、
When L2MIN ≦ R2MIN (38) holds, the corrected AF data RH and LH are the contrast correction amount DLVC obtained by the above equations (33) and (34).
Using OMPA and offset correction amount DLVCOMPB, the following correction equation,

【0290】[0290]

【数35】 LH=DLVCOMPA×L+DLVCOMPB …(39) RH=R …(40) により算出される。[Equation 35]   LH = DLVCOMPA × L + DLVCOMPB (39)   RH = R (40) Is calculated by

【0291】一方、次式、On the other hand, the following equation,

【0292】[0292]

【数36】L2MIN>R2MIN …(41) の場合、補正後のAFデータRH、LHは、上式(36)、
(37)により求めたコントラスト補正量DLVCOMPA
とオフセット補正量DLVCOMPBを用いて、次の補
正式、
In the case of L2MIN> R2MIN (41), the corrected AF data RH and LH are as shown in the above equation (36),
Contrast correction amount DLVCOMPA calculated by (37)
And offset correction amount DLVCOMPB, the following correction formula,

【0293】[0293]

【数37】 LH=L …(42) RH=DLVCOMPA×R+DLVCOMPB …(43) により算出される。[Equation 37]   LH = L (42)   RH = DLVCOMPA × R + DLVCOMPB (43) Is calculated by

【0294】以上のAFデータ補正の処理手順を図65
のフローチャートに示す。CPU60は、上記図7ステ
ップS16の相関値演算処理により最高相関が得られた
Rウインドウ94B及びLウインドウ96BにおけるA
Fデータの最小値R2MIN、L2MINについて、上
式(32)、即ち、
The above AF data correction processing procedure is shown in FIG.
It is shown in the flowchart. The CPU 60 controls the A in the R window 94B and the L window 96B for which the highest correlation is obtained by the correlation value calculation process in step S16 of FIG.
For the minimum values R2MIN and L2MIN of F data, the above equation (32), that is,

【0295】[0295]

【数38】L2MIN≦R2MIN …(32) が成り立つか否かを判定する(ステップS350)。Y
ESと判定した場合、次に、コントラスト補正量DLV
COMPAを上式(33)、即ち、
[Equation 38] It is determined whether or not L2MIN ≦ R2MIN (32) holds (step S350). Y
If it is determined to be ES, then the contrast correction amount DLV
COMPA is expressed by the above formula (33), that is,

【0296】[0296]

【数39】 DLVCOMPA=(R1MAX−R1MIN)/(L1MAX−L1MIN ) …(33) により算出する(ステップS352)。また、オフセッ
ト補正量DLVCOMPBを上式(34)、即ち、
(39) DLVCOMPA = (R1MAX-R1MIN) / (L1MAX-L1MIN) (33) (step S352). Further, the offset correction amount DLVCOMPB is expressed by the above equation (34), that is,

【0297】[0297]

【数40】 DLVCOMPB=R1MIN−{(R1MAX−R1MIN)/(L1MA X−L1MIN)}×L1MIN …(34) により算出する(ステップS354)。[Formula 40]   DLVCOMPB = R1MIN-{(R1MAX-R1MIN) / (L1MA X-L1MIN)} × L1MIN (34) Is calculated (step S354).

【0298】そして、補正後のAFデータRH、LHを
上式(39)、(40)、即ち、
Then, the corrected AF data RH and LH are represented by the above equations (39) and (40), that is,

【0299】[0299]

【数41】 LH=DLVCOMPA×L+DLVCOMPB …(39) RH=R …(40) により算出する(ステップS356)。[Formula 41]   LH = DLVCOMPA × L + DLVCOMPB (39)   RH = R (40) Is calculated according to (step S356).

【0300】一方、上記ステップS350においてNO
と判定した場合には、コントラスト補正量DLVCOM
PAを上式(36)、即ち、
On the other hand, NO in the above step S350.
If it is determined that the contrast correction amount DLVCOM
PA is expressed by the above formula (36), that is,

【0301】[0301]

【数42】 DLVCOMPA=(L1MAX−L1MIN)/(R1MAX−R1MIN ) …(36) により算出する(ステップS358)。また、オフセッ
ト補正量DLVCOMPBを、上式(37)、即ち、
## EQU42 ## DLVCOMPA = (L1MAX-L1MIN) / (R1MAX-R1MIN) (36) is calculated (step S358). In addition, the offset correction amount DLVCOMPB is expressed by the above equation (37), that is,

【0302】[0302]

【数43】 DLVCOMPB=L1MIN−{(L1MAX−L1MIN)/(R1MA X−R1MIN)}×R1MIN …(37) により算出する(ステップS360)。[Equation 43]   DLVCOMPB = L1MIN-{(L1MAX-L1MIN) / (R1MA X-R1MIN)} × R1MIN (37) Is calculated by (step S360).

【0303】そして、補正後のAFデータLH、RHを
上式(42)、(43)、即ち、
Then, the corrected AF data LH and RH are expressed by the above equations (42) and (43), that is,

【0304】[0304]

【数44】 LH=L …(42) RH=DLVCOMPA×R+DLVCOMPB …(43) により算出する(ステップS362)。[Equation 44]   LH = L (42)   RH = DLVCOMPA × R + DLVCOMPB (43) Is calculated by (step S362).

【0305】次に、ここで説明したコントラスト補正と
オフセット補正(信号量差補正)を行う場合のAFデー
タ補正処理の効果について上述の信号量差補正のみ行う
AFデータ補正処理(図63参照)と比較して説明す
る。尚、前者を新方式、後者を従来方式(実施例1)と
いう。
Next, regarding the effect of the AF data correction processing when the contrast correction and the offset correction (signal amount difference correction) described here are performed, the AF data correction processing (see FIG. 63) for performing only the signal amount difference correction described above is performed. Description will be made in comparison. The former is called the new method and the latter is called the conventional method (embodiment 1).

【0306】まず、Rセンサ94とLセンサ96のうち
一方のセンサが明るい場合(太陽光等が片側のセンサに
多く照射された場合→信号量差有り、コントラスト差無
しの場合)における補正結果を例示する。図66
(A)、(B)は、Rセンサ94及びLセンサ96の採
用センサ(図では中央エリア)における補正前(補正無
し)のAFデータの分布と従来方式による補正後のAF
データの分布を示しており、補正は、Rセンサ94のA
Fデータに対して行われている。
First, the correction result in the case where one of the R sensor 94 and the L sensor 96 is bright (when one sensor is irradiated with sunlight or the like → there is a signal amount difference and there is no contrast difference) To illustrate. FIG. 66
(A) and (B) are distributions of AF data before correction (without correction) in the sensors (center area in the figure) adopted by the R sensor 94 and L sensor 96 and AF after correction by the conventional method.
The distribution of data is shown.
This is done for F data.

【0307】一方、図67(A)、(B)は、図66と
同じ補正前(補正無し)のAFデータの分布と新方式に
よる補正後のAFデータの分布を示しており、補正は、
Lセンサ96のAFデータに対して行われている。
On the other hand, FIGS. 67A and 67B show the distribution of AF data before correction (without correction) and the distribution of AF data after correction by the new method, which are the same as those in FIG.
This is performed on the AF data of the L sensor 96.

【0308】そして、図68は、図66及び図67にお
ける補正前のAFデータと、新方式及び従来方式による
補正後のAFデータに基づいてそれぞれ相関値f(n)を
算出した場合の相関値分布を示している。
FIG. 68 is a correlation value when the correlation value f (n) is calculated based on the AF data before correction in FIGS. 66 and 67 and the AF data after correction by the new method and the conventional method, respectively. The distribution is shown.

【0309】図68の相関値分布から分かるように、補
正前におけるRセンサ94のAFデータとLセンサ96
のAFデータとにコントラスト差が無い場合には、従来
方式と新方式のいずれのAFデータ補正でも同じ結果を
示し、補正無しの場合に比べてRセンサ94のAFデー
タとLセンサ96のAFデータの信号量の一致度が向上
している。図69は、実際に被写体を至近から無限遠ま
での距離に配置し、その距離(横軸)に対して、オート
フォーカスにより設定される撮影レンズの設定距離(縦
軸)を、AFデータの補正を行わない場合(補正無しの
場合)、新方式によりAFデータを補正した場合、従来
方式によりAFデータを補正した場合、及び、設計値の
場合について示したものである。この図から明らかなよ
うに、補正無しの場合には、設計値とのずれを生じてい
るが、従来方式及び新方式による場合には撮影レンズの
設定距離が設計値とほぼ一致していることが分かる。以
上のことからRセンサ94とLセンサ96とにコントラ
スト差が無い場合には、従来方式と新方式のいずれのA
Fデータ補正処理でも適切な結果が得られる。
As can be seen from the correlation value distribution of FIG. 68, the AF data of the R sensor 94 and the L sensor 96 before correction are obtained.
When there is no contrast difference between the AF data of No. 1 and the AF data of No. 3, the same result is shown in both the conventional AF data correction and the new AF data correction. The degree of agreement of the signal amounts of is improved. In FIG. 69, the subject is actually arranged at a distance from the closest distance to infinity, and the set distance (vertical axis) of the taking lens set by autofocus is set to the distance (horizontal axis) and the AF data is corrected. Is not performed (without correction), the AF data is corrected by the new method, the AF data is corrected by the conventional method, and the design value is used. As is clear from this figure, there is a deviation from the design value without correction, but in the case of the conventional method and the new method, the set distance of the taking lens is almost the same as the design value. I understand. From the above, when there is no contrast difference between the R sensor 94 and the L sensor 96, the A method of either the conventional method or the new method is used.
Appropriate results can be obtained even in the F data correction process.

【0310】しかしながら、Rセンサ94とLセンサ9
6のうち一方のセンサが暗い場合(片側のセンサを指等
で隠してしまった場合→信号量差及びコントラスト差有
りの場合)には、新方式の方が従来方式に比べてより有
利な結果が得られる。次に、この場合における補正結果
を例示する。図70(A)、(B)は、Rセンサ94及
びLセンサ96の採用センサ(図では中央エリア)にお
ける補正前(補正無し)のAFデータの分布と従来方式
による補正後のAFデータの分布を示しており、補正
は、Rセンサ94のAFデータに対して行われている。
However, the R sensor 94 and the L sensor 9
When one of 6 sensors is dark (when the sensor on one side is hidden by a finger, etc. → when there is a signal amount difference and contrast difference), the new method is more advantageous than the conventional method. Is obtained. Next, the correction result in this case will be illustrated. 70 (A) and 70 (B) show the distribution of AF data before correction (without correction) and the distribution of AF data after correction by the conventional method in the sensors (center area in the figure) adopted by the R sensor 94 and the L sensor 96. And the correction is performed on the AF data of the R sensor 94.

【0311】一方、図71(A)、(B)は、図70と
同じ補正前(補正無し)のAFデータの分布と新方式に
よる補正後のAFデータの分布を示しており、補正は、
Lセンサ96のAFデータに対して行われている。
On the other hand, FIGS. 71A and 71B show the distribution of AF data before correction (without correction) and the distribution of AF data after correction by the new method, which are the same as those in FIG.
This is performed on the AF data of the L sensor 96.

【0312】そして、図72は、図70及び図71にお
ける補正前のAFデータ、新方式及び従来方式による補
正後のAFデータに基づいてそれぞれ相関値f(n)を算
出した場合の相関値分布を示している。
FIG. 72 is a correlation value distribution when the correlation value f (n) is calculated based on the AF data before correction in FIGS. 70 and 71 and the AF data after correction by the new method and the conventional method. Is shown.

【0313】図72の相関値分布から分かるように従来
方式に比べて新方式によるAFデータ補正の方が最小極
小値が小さな値を示し、Rセンサ94のAFデータとL
センサ96のAFデータの信号量の一致度がより向上し
ている。図73は、実際に被写体を至近から無限遠まで
の距離に配置し、その距離(横軸)に対して、AFによ
り設定される撮影レンズの設定距離(縦軸)を、AFデ
ータの補正を行わない場合(補正無しの場合)、新方式
によりAFデータを補正した場合、従来方式によりAF
データを補正した場合、及び、設計値の場合について示
したものである。この図から明らかなように、補正無し
の場合及び従来方式による場合には撮影レンズの設定距
離が設計値とのずれを生じているが、新方式による場合
には、撮影レンズの設定距離が設計値とほぼ一致してい
ることが分かる。以上のことからRセンサ94とLセン
サ96とにコントラスト差が有る場合には、従来方式よ
りも新方式によるAFデータ補正処理の方が適切な結果
が得られる。従って、コントラスト差の有無に関係なく
適切な結果が得られる新方式は従来方式に比べてより好
適である。
As can be seen from the correlation value distribution in FIG. 72, the minimum minimum value is smaller in the AF data correction by the new method than in the conventional method, and the AF data of the R sensor 94 and L
The degree of agreement of the signal amount of the AF data of the sensor 96 is further improved. In FIG. 73, the subject is actually placed at a distance from the closest distance to infinity, and the distance (horizontal axis) is set to the setting distance (vertical axis) of the photographing lens set by AF, and the AF data is corrected. If not performed (without correction), if AF data is corrected by the new method, AF is performed by the conventional method.
It shows the case where the data is corrected and the case of the design value. As is clear from this figure, the setting distance of the taking lens is deviated from the design value in the case of no correction and in the conventional method, but in the case of the new method, the setting distance of the taking lens is designed. It can be seen that the values almost match. From the above, when there is a contrast difference between the R sensor 94 and the L sensor 96, the AF data correction process by the new method can obtain a more appropriate result than the conventional method. Therefore, the new method, which can obtain an appropriate result regardless of the contrast difference, is more suitable than the conventional method.

【0314】尚、上記コントラスト補正量DLVCOM
PAやオフセット補正量DLVCOMPBを算出する際
におけるR1MAX及びR1MIN、L1MAX及びL
1MINはそれぞれRセンサ94、Lセンサ96の採用
センサにおけるAFデータの最大値及び最小値とした
が、これに限らず、Rセンサ94、Lセンサ96のAF
データを補正する範囲におけるAFデータの最大値及び
最小値としてもよい。さらに、R1MAX、R1MI
N、L1MAX、L1MINの代わりにR2MAX、R
2MIN、L2MAX、L2MINを用いてもよい。ま
た、上式(32)、(35)、(38)、(41)におけるR2MIN、
L2MINは、それぞれ最高相関が得られたRウインド
ウ94B及びLウインドウ96BにおけるAFデータの
最小値としたが、R2MIN、L2MINの代わりにA
Fデータを補正する範囲におけるAFデータの最小値を
用いてもよい。 {極小値判定処理}次に、極小値判定の処理について説
明する。上記図7ステップS16の相関値演算処理や、
図7ステップS20のL、Rチャンネル差補正処理に
は、相関値分布から相関値f(n)の極小値を検出する処
理が含まれるが、その際に、ここで説明する極小値判定
の処理により極小値が存在するか否かの判断が行われ
る。基本的に、極小値と判断される相関値は、そのシフ
ト量の両側に隣接するシフト量におけるいずれの相関値
よりも小さくなるものであり、極小値のうち最小のもの
が最小極小値となる。
The above-mentioned contrast correction amount DLVCOM
R1MAX and R1MIN, L1MAX and L when calculating PA and offset correction amount DLVCOMPB
Although 1 MIN is the maximum value and the minimum value of the AF data of the sensors adopted by the R sensor 94 and the L sensor 96, respectively, it is not limited to this, and the AF of the R sensor 94 and the L sensor 96 is not limited to this.
It may be the maximum value and the minimum value of the AF data in the range for correcting the data. In addition, R1MAX, R1MI
R2MAX, R instead of N, L1MAX, L1MIN
2MIN, L2MAX, L2MIN may be used. In addition, R2MIN in the above formulas (32), (35), (38), and (41),
L2MIN is the minimum value of the AF data in the R window 94B and the L window 96B where the highest correlation is obtained, but A2 instead of R2MIN and L2MIN
You may use the minimum value of AF data in the range which corrects F data. {Minimum value determination process} Next, the minimum value determination process will be described. The correlation value calculation processing in step S16 of FIG. 7 described above,
7. The L and R channel difference correction processing in step S20 in FIG. 7 includes processing for detecting the minimum value of the correlation value f (n) from the correlation value distribution. At that time, the processing for the minimum value determination described here is performed. Determines whether or not there is a minimum value. Basically, the correlation value determined to be the minimum value is smaller than any correlation value in the shift amounts adjacent to both sides of the shift amount, and the smallest minimum value is the minimum minimum value. .

【0315】ところで、被写体が測距可能な至近よりも
近距離に存在する場合、相関値の極小値は本来存在しな
い。図74は、この場合において、相関値f(n)をシフ
ト量nの最大値である38よりも更に近距離側のシフト
量まで求めたと仮定した場合の相関値分布の一例を示し
た図である。このような相関値分布においてはシフト量
n=−2〜38の範囲に極小値が存在しないため、この
採用センサでは測距不能と判定される。この判定は適切
である。
By the way, when the subject is present at a shorter distance than the closest distance at which the distance can be measured, the minimum value of the correlation value originally does not exist. FIG. 74 is a diagram showing an example of a correlation value distribution in the case where it is assumed that the correlation value f (n) has been calculated up to a shift amount on a closer distance side than the maximum value 38 of the shift amount n in this case. is there. In such a correlation value distribution, there is no minimum value in the range of the shift amount n = −2 to 38, and therefore it is determined that distance measurement cannot be performed by this adopted sensor. This judgment is appropriate.

【0316】しかしながら、このように被写体が至近よ
りも近距離に存在する場合においても実際には図75や
図76に示すように極小値が存在してしまう場合があ
る。尚、図75は高コントラストの場合、図76は低コ
ントラストの場合を示している。
However, even when the subject is present at a short distance rather than the closest distance in this way, there may be a local minimum value as shown in FIGS. 75 and 76. 75 shows the case of high contrast, and FIG. 76 shows the case of low contrast.

【0317】これに対して極小値判定の基本的判定内容
として、極小値が所定値よりも大きい場合には極小値で
ないと判定することとしているため、例えばその所定値
を1000とした場合、図75の場合には極小値は存在
せず、適切に測距不能と判定される。
On the other hand, as the basic determination content of the minimum value determination, when the minimum value is larger than the predetermined value, it is determined that the minimum value is not the minimum value. In the case of 75, there is no minimum value, and it is appropriately determined that distance measurement is impossible.

【0318】一方、図76の場合には、極小値が100
0より小さい値で存在するため、上記判定内容では極小
値が存在すると判定される不具合が生じる。
On the other hand, in the case of FIG. 76, the minimum value is 100.
Since there is a value smaller than 0, there is a problem that it is determined that the minimum value exists in the above determination content.

【0319】そこで、本極小値判定では、次のような判
定を行い、上記不具合を解消する。被写体が測距可能な
範囲内に存在する場合、通常、相関値f(n)の最小極小
値は最小値でもある。これに対して、最小極小値のシフ
ト量よりも至近側で最小値が検出された場合には、至近
よりもさらに近距離側に被写体があると予想できる。従
って、最小極小値のシフト量よりも至近側(シフト量が
小さい程、至近側)に最小極小値より小さい相関値が存
在する場合には、近距離警告又は測距不能とする。
Therefore, in the determination of the minimum value, the following determination is made to eliminate the above-mentioned problem. When the subject is within the range in which the distance can be measured, the minimum minimum value of the correlation value f (n) is usually also the minimum value. On the other hand, when the minimum value is detected on the side closer to the shift amount of the minimum minimum value, it can be predicted that the subject is located on the side closer than the closest point. Therefore, when there is a correlation value smaller than the minimum minimum value on the close side (the closer the shift amount is, the closer the side) to the shift amount of the minimum minimum value, the short distance warning or the distance measurement is disabled.

【0320】一方、最小極小値のシフト量よりも遠距離
側に最小値があった場合は、何らかの異常(シフト量n
=0で無限遠となるので、無限遠より更に無限遠はあり
えない)であると判断できるため、測距不能とする。 {補間値演算処理(図7ステップS22)の詳細}次
に、図7のステップS22における補間値演算処理につ
いて説明する。補間値演算処理は、各分割エリアにおい
て最高相関(最高相関値fmin)が得られたシフト量
nminに対して周辺の相関値f(n)から更に精度の高
い最高相関のシフト量を検出する処理である。尚、以下
の説明において補間値演算処理によって検出する最高相
関のシフト量を真の最高相関のシフト量といい、その値
をxで示す。
On the other hand, if there is a minimum value on the far distance side with respect to the shift amount of the minimum minimum value, some abnormality (shift amount n
Since it becomes infinity at = 0, it cannot be determined that it is infinity farther than infinity. Therefore, distance measurement is impossible. {Details of Interpolation Value Calculation Process (Step S22 in FIG. 7)} Next, the interpolation value calculation process in step S22 of FIG. 7 will be described. The interpolation value calculation process is a process of detecting the shift amount of the highest correlation with higher accuracy from the peripheral correlation value f (n) with respect to the shift amount nmin for which the highest correlation (highest correlation value fmin) is obtained in each divided area. Is. In the following description, the shift amount of the highest correlation detected by the interpolation value calculation process is called the true highest correlation shift amount, and the value is indicated by x.

【0321】CPU60は、この補間値演算処理におい
て次のような処理を行う。図77に示すように採用セン
サにおいて最高相関(最高相関値fmin(f(nmi
n))が得られたシフト量nminに対して、−1のシ
フト量nmin−1の相関値f(nmin−1)と+1
のシフト量nmin+1の相関値f(nmin+1)と
が、次式、
The CPU 60 performs the following processing in this interpolation value calculation processing. As shown in FIG. 77, the highest correlation (highest correlation value fmin (f (nmi
n)) for the obtained shift amount nmin, the correlation value f (nmin-1) of the shift amount nmin-1 of -1 and +1
And the correlation value f (nmin + 1) of the shift amount nmin + 1 of

【0322】[0322]

【数45】 f(nmin−1)>f(nmin+1) …(44) の関係を満たしたとする。この場合、CPU60は、シ
フト量nminとシフト量nmin−1の相関値f(n
min)及びf(nmin−1)を通る直線L1と、シ
フト量nmin+1とシフト量nmin+2の相関値f
(nmin+1)及びf(nmin+2)を通る直線L
2との交点を求める。そして、その交点を真の最高相関
のシフト量xとする。
It is assumed that the relationship of f (nmin−1)> f (nmin + 1) (44) is satisfied. In this case, the CPU 60 controls the correlation value f (n of the shift amount nmin and the shift amount nmin−1.
min) and f (nmin−1), and a correlation value f of the shift amount nmin + 1 and the shift amount nmin + 2.
A straight line L passing through (nmin + 1) and f (nmin + 2)
Find the intersection with 2. Then, the intersection is set as the shift amount x of the true highest correlation.

【0323】一方、図78に示すように最高相関が得ら
れたシフト量nminに対して−1のシフト量nmin
−1の相関値f(nmin−1)と+1のシフト量nm
in+1の相関値f(nmin+1)とが、次式、
On the other hand, as shown in FIG. 78, the shift amount nmin at which the highest correlation is obtained is -1.
−1 correlation value f (nmin−1) and +1 shift amount nm
and the correlation value f (nmin + 1) of in + 1 is

【0324】[0324]

【数46】 f(nmin−1)≦f(nmin+1) …(45) の関係を満たしたとする。この場合、CPU60は、シ
フト量nmin−1とシフト量nmin−2の相関値f
(nmin−1)及びf(nmin−2)を通る直線L
1と、シフト量nminとシフト量nmin+1の相関
値f(nmin)及びf(nmin+1)を通る直線L
2との交点を求める。そして、その交点を真の最高相関
のシフト量xとする。
It is assumed that the relationship of f (nmin−1) ≦ f (nmin + 1) (45) is satisfied. In this case, the CPU 60 causes the correlation value f between the shift amount nmin-1 and the shift amount nmin-2.
A straight line L passing through (nmin-1) and f (nmin-2)
1, and a straight line L passing through the correlation values f (nmin) and f (nmin + 1) of the shift amount nmin and the shift amount nmin + 1
Find the intersection with 2. Then, the intersection is set as the shift amount x of the true highest correlation.

【0325】ただし、図79に示すようにシフト量nの
最小値(シフト量n=−2)が相関値f(n)の最小値、
又は、図80に示すようにシフト量nの最大値(シフト
量n=38)が相関値f(n)の最小値であった場合、こ
れらの最小値は極小値とはならないため、シフト量nの
最小値(シフト量n=−2)又は最大値(シフト量n=
38)を最高相関のシフト量nminとして補間値演算
を行う場合はない。この場合には測距不能となる。
However, as shown in FIG. 79, the minimum value of the shift amount n (shift amount n = -2) is the minimum value of the correlation value f (n),
Alternatively, as shown in FIG. 80, when the maximum value of the shift amount n (shift amount n = 38) is the minimum value of the correlation value f (n), these minimum values do not become the minimum value, and therefore the shift amount. n minimum value (shift amount n = -2) or maximum value (shift amount n =
There is no case where the interpolation value calculation is performed with 38) as the shift amount nmin of the highest correlation. In this case, distance measurement is impossible.

【0326】また、図81(A)、(B)に示すように
シフト量nの最小値(シフト量n=−2)に対して+1
のシフト量(シフト量n=−1)が最高相関のシフト量
nminであった場合において、図81(A)のように
上式(44)の関係が成り立つ場合(図77の場合)には、
補間値演算を行うことができる。しかし、図81(B)
のように上式(45)の関係が成り立つ場合(図78の場
合)には、上記直線L1が定まらないため補間値演算を
行うことなく測距不能とする。
Further, as shown in FIGS. 81A and 81B, +1 is added to the minimum value of the shift amount n (shift amount n = -2).
When the shift amount (shift amount n = −1) is the shift amount nmin having the highest correlation, when the relationship of the above equation (44) holds as in FIG. 81 (A) (in the case of FIG. 77), ,
Interpolation value calculation can be performed. However, FIG. 81 (B)
When the relation of the above equation (45) is established (case of FIG. 78) as described above, the straight line L1 is not determined and the distance measurement is impossible without performing the interpolation value calculation.

【0327】また、図82(A)、(B)に示すように
シフト量nの最大値−1(シフト量n=37)が最高相
関のシフト量nminであった場合において、図82
(B)のように上式(45)の関係が成り立つ場合(図78
の場合)には、補間値演算を行うことができる。しか
し、図82(A)のように上式(44)の関係が成り立つ場
合(図77の場合)には、上記直線L2が定まらないた
め補間値演算を行うことなく測距不能とする。
In addition, as shown in FIGS. 82A and 82B, when the maximum value of the shift amount n-1 (shift amount n = 37) is the shift amount nmin of the highest correlation,
When the relationship of the above equation (45) is established as in (B) (Fig. 78).
In the case of), interpolation value calculation can be performed. However, when the relationship of the above equation (44) is established as in FIG. 82 (A) (the case of FIG. 77), the straight line L2 is not determined, and the distance measurement is impossible without performing the interpolation value calculation.

【0328】以上の処理は、原則的な処理であり、次の
場合には他の処理により真の最高相関のシフト量xを求
める。例えば、最高相関が得られたシフト量nminに
対して、±2の範囲のシフト量nmin−2、nmin
−1、nmin+1、nmin+2の相関値f(n)を比
較した場合に、シフト量nminを含めて連続する3点
のシフト量nのみで相関値f(n)が近い値を示したとす
る。この場合には、その3点の中央点における相関値が
シフトしていると考えられる。
The above processing is a basic processing, and in the following case, the shift amount x of the true highest correlation is obtained by another processing. For example, with respect to the shift amount nmin for which the highest correlation is obtained, the shift amounts nmin-2 and nmin in the range of ± 2
When the correlation values f (n) of −1, nmin + 1, and nmin + 2 are compared, it is assumed that the correlation values f (n) are close to each other only by the shift amount n at three consecutive points including the shift amount nmin. In this case, it is considered that the correlation values at the center points of the three points are shifted.

【0329】そこで、この場合には、上述の補間値演算
処理の代わりに、次に説明する補間値演算処理により真
の最高相関のシフト量xを検出する。尚、上述した補間
値演算処理を補間値通常演算処理といい、以下で説明す
る補間値演算処理を補間値別演算処理という。また、相
関値f(n)が近い値か否かの具体的判断については後述
する。
Therefore, in this case, the shift amount x of the true highest correlation is detected by the interpolation value calculation process described below instead of the above-mentioned interpolation value calculation process. The interpolation value calculation process described above is called an interpolation value normal calculation process, and the interpolation value calculation process described below is called an interpolation value-based calculation process. Further, a specific determination as to whether the correlation value f (n) is a close value will be described later.

【0330】上述のように連続する3点のシフト量nに
おいてのみ相関値f(n)が近い値を示す場合、その3点
のシフト量nのうち中央点の相関値が、本来、最高相関
値fminとして検出されるべきものであったと考えら
れる。そこで、CPU60は、3点のシフト量nのうち
最小のシフト量nsと、そのシフト量nsに対して−1
のシフト量ns−1との相関値f(ns)及びf(ns−
1)を通る直線L1と、3点のシフト量nのうち最大の
シフト量nlとそのシフト量nlに対して+1のシフト
量nl+1との相関値f(nl)及びf(nl+1)を通る
直線L2との交点を求める。そして、その交点を真の最
高相関のシフト量xとする。
As described above, when the correlation value f (n) shows a close value only in the continuous shift amount n of three points, the correlation value of the central point in the shift amount n of the three points is originally the highest correlation. It is considered that it should have been detected as the value fmin. Therefore, the CPU 60 sets the minimum shift amount ns among the shift amounts n of the three points and −1 for the shift amount ns.
Correlation value f (ns) and f (ns-) with the shift amount ns-1 of
A straight line L1 passing through 1) and a straight line passing the correlation values f (nl) and f (nl + 1) of the maximum shift amount nl among the three shift amounts n and the shift amount nl + 1 of +1 with respect to the shift amount nl. Find the intersection with L2. Then, the intersection is set as the shift amount x of the true highest correlation.

【0331】例えば、図83に示すように最高相関のシ
フト量nminが0で検出され、最高相関値f(0)とそ
のシフト量nminに対して+1と+2のシフト量1、
2における相関値f(1)、f(2)が近い値になったとす
る。この場合、シフト量n=−1と0の相関値を通る直
線L1と、シフト量n=2と3の相関値を通る直線L2
との交点を求め、その交点をシフト量xとする。尚、こ
の例のように最高相関のシフト量nminに対して+1
と+2のシフト量における相関値が最高相関値に近い値
となった場合の処理を処理タイプ1という。
For example, as shown in FIG. 83, the maximum correlation shift amount nmin is detected as 0, and the maximum correlation value f (0) and the shift amount nmin are shifted by +1 and +2.
It is assumed that the correlation values f (1) and f (2) in 2 are close to each other. In this case, a straight line L1 passing the correlation values of the shift amounts n = −1 and 0 and a straight line L2 passing the correlation values of the shift amounts n = 2 and 3.
The intersection point with is obtained, and the intersection point is set as the shift amount x. As in this example, the shift amount nmin of the highest correlation is +1
Processing when the correlation value in the shift amounts of + and +2 becomes a value close to the maximum correlation value is called processing type 1.

【0332】また、図84に示すように最高相関のシフ
ト量nminが0で検出され、最高相関値f(0)とその
シフト量nminに対して−1と+1のシフト量−1、
1における相関値f(−1)、f(1)が近い値になったと
する。この場合、シフト量n=−2と−1の相関値を通
る直線L1と、シフト量n=1と2の相関値を通る直線
L2との交点を求め、その交点をシフト量xとする。
尚、この例のように最高相関のシフト量nminに対し
て−1と+1のシフト量における相関値が最高相関値に
近い値となった場合の処理を処理タイプ2という。
As shown in FIG. 84, the maximum correlation shift amount nmin is detected at 0, and the maximum correlation value f (0) and the shift amount nmin are -1 and +1 shift amount -1,
It is assumed that the correlation values f (-1) and f (1) in 1 are close to each other. In this case, an intersection of a straight line L1 passing the correlation values of the shift amounts n = -2 and -1, and a straight line L2 passing the correlation values of the shift amounts n = 1 and 2 is determined, and the intersection is defined as the shift amount x.
Incidentally, the processing when the correlation value at the shift amounts of −1 and +1 becomes a value close to the maximum correlation value with respect to the shift amount nmin of the maximum correlation as in this example is referred to as processing type 2.

【0333】また、図85に示すように最高相関のシフ
ト量nminが0で検出され、最高相関値f(0)とその
シフト量nminに対して−2と−1のシフト量−2、
−1における相関値f(−2)、f(−1)が近い値になっ
たとする。この場合、シフト量n=−3と−2の相関値
を通る直線L1と、シフト量n=0と1の相関値を通る
直線L2との交点を求め、その交点をシフト量xとす
る。尚、この例のように最高相関のシフト量nminに
対して−2と−1のシフト量において相関値が最高相関
値に近い値となった場合の処理を処理タイプ3という。
As shown in FIG. 85, the maximum correlation shift amount nmin is detected at 0, and the maximum correlation value f (0) and the shift amount nmin are -2 and -1 shift amounts -2,
It is assumed that the correlation values f (-2) and f (-1) at -1 are close to each other. In this case, an intersection of a straight line L1 passing the correlation values of the shift amounts n = -3 and -2 and a straight line L2 passing the correlation values of the shift amounts n = 0 and 1 is defined as the shift amount x. Incidentally, the processing when the correlation value becomes a value close to the maximum correlation value in the shift amounts of −2 and −1 with respect to the shift amount nmin of the maximum correlation as in this example is referred to as processing type 3.

【0334】図86は、補間値演算処理において上記補
間値通常演算及び補間値別演算の処理タイプ1〜3を判
別する手順を示したフローチャートである。まず、CP
U60は、最高相関値f(nmin)と、最高相関のシフ
ト量nminに対して+1のシフト量nmin+1にお
ける相関値f(nmin+1)との相関値差f(nmin
+1)−f(nmin)が基準値R7に対して、次式、
FIG. 86 is a flow chart showing a procedure for discriminating processing types 1 to 3 of the interpolation value normal calculation and the interpolation value-based calculation in the interpolation value calculation processing. First, CP
U60 is the correlation value difference f (nmin) between the highest correlation value f (nmin) and the correlation value f (nmin + 1) at the shift amount nmin + 1 of +1 with respect to the shift amount nmin of the highest correlation.
+1) -f (nmin) is the following formula with respect to the reference value R7:

【0335】[0335]

【数47】f(nmin+1)−f(nmin)<R7 を満たすか否かを判定する(ステップS400)。尚、
基準値R7は、2つの相関値が近い値であると判定でき
る上限値である。もし、NOと判定した場合には、次
に、最高相関値f(nmin)と、シフト量nminに対
して−1のシフト量nmin−1における相関値f(n
min−1)との相関値差f(nmin−1)−f(nmi
n)が基準値R7に対して、次式、
It is determined whether or not f (nmin + 1) -f (nmin) <R7 is satisfied (step S400). still,
The reference value R7 is an upper limit value with which it can be determined that the two correlation values are close to each other. If NO is determined, next, the highest correlation value f (nmin) and the correlation value f (n at the shift amount nmin−1 of −1 with respect to the shift amount nmin are calculated.
min-1) correlation value difference f (nmin-1) -f (nmi
n) is based on the reference value R7,

【0336】[0336]

【数48】f(nmin−1)−f(nmin)<R7 を満たすか否かを判定する(ステップS402)。も
し、この判定処理においてもNOと判定した場合には、
補間値通常演算処理を行い(ステップS432)、真の
最高相関のシフト量xを検出してこの補間値演算処理を
終了する。
It is determined whether or not f (nmin-1) -f (nmin) <R7 is satisfied (step S402). If NO is also determined in this determination process,
Normal interpolation value calculation processing is performed (step S432), the shift amount x of the true highest correlation is detected, and this interpolation value calculation processing is terminated.

【0337】一方、ステップS402においてYESと
判定した場合、次に、最高相関のシフト量nminに対
して−3のシフト量nmin−3における相関値f(n
min−3)が存在するか否かを判定する(ステップS
404)。NOと判定した場合には、補間値通常演算処
理を行う(ステップS432)。一方、YESと判定し
た場合には、シフト量nmin−1における相関値f
(nmin−1)と、シフト量nmin−2における相関
値f(nmin−2)との相関値差f(nmin−2)−f
(nmin−1)が基準値R7に対して、次式、
On the other hand, if YES in step S402, then the correlation value f (n at the shift amount nmin-3 of -3 with respect to the shift amount nmin having the highest correlation is obtained.
min-3) is present (step S
404). If NO is determined, a normal interpolation value calculation process is performed (step S432). On the other hand, if YES is determined, the correlation value f at the shift amount nmin-1
(nmin-1) and the correlation value difference f (nmin-2) -f in the shift amount nmin-2 f (nmin-2) -f
(nmin-1) is the following formula with respect to the reference value R7:

【0338】[0338]

【数49】 f(nmin−2)−f(nmin−1)<R7 を満たすか否かを判定する(ステップS406)。も
し、この判定処理においてNOと判定した場合には、補
間値通常演算処理を行う(ステップS432)。一方、
YESと判定した場合には、シフト量nmin−2にお
ける相関値f(nmin−2)とシフト量nmin−3に
おける相関値f(nmin−3)との相関値差f(nmi
n−3)−f(nmin−2)が基準値R7に対して、次
式、
It is determined whether or not f (nmin-2) -f (nmin-1) <R7 is satisfied (step S406). If it is determined NO in this determination process, the interpolation value normal calculation process is performed (step S432). on the other hand,
If YES is determined, a correlation value difference f (nmi between the correlation value f (nmin-2) at the shift amount nmin-2 and the correlation value f (nmin-3) at the shift amount nmin-3.
n−3) −f (nmin−2) is the following formula with respect to the reference value R7:

【0339】[0339]

【数50】 f(nmin−3)−f(nmin−2)<R7 を満たすか否かを判定する(ステップS408)。も
し、この判定処理においてYESと判定した場合には、
補間値通常演算処理を行う(ステップS432)。一
方、NOと判定した場合には、シフト量nmin+1に
おける相関値f(nmin+1)とシフト量nmin−2
における相関値f(nmin−2)との相関値差f(nm
in+1)−f(nmin−2)が基準値R7に対して、
次式、
[Mathematical formula-see original document] It is determined whether or not f (nmin-3) -f (nmin-2) <R7 is satisfied (step S408). If YES is determined in this determination process,
Interpolation value normal calculation processing is performed (step S432). On the other hand, if NO is determined, the correlation value f (nmin + 1) at the shift amount nmin + 1 and the shift amount nmin-2
Correlation value f (nmin-2) with the correlation value f (nm
in + 1) -f (nmin-2) is relative to the reference value R7,
The following equation,

【0340】[0340]

【数51】 f(nmin+1)−f(nmin−2)<R7 を満たすか否かを判定する(ステップS410)。も
し、この判定処理においてNOと判定した場合には、処
理タイプ3の補間値別演算処理を行う(ステップS41
2)。即ち、図85に示したように相関値f(nmin
−1)付近に極小値(真の最高相関値)が存在すると想
定し、相関値f(nmin−3)、f(nmin−2)、f
(nmin)、f(nmin+1)に基づいてシフト量xを
求める。
[Equation 51] It is determined whether or not f (nmin + 1) -f (nmin-2) <R7 is satisfied (step S410). If NO is determined in this determination processing, the calculation processing for each interpolation value of processing type 3 is performed (step S41).
2). That is, as shown in FIG. 85, the correlation value f (nmin
Assuming that a local minimum value (true highest correlation value) exists near −1), correlation values f (nmin-3), f (nmin-2), f
The shift amount x is calculated based on (nmin) and f (nmin + 1).

【0341】一方、ステップS410においてYESと
判定した場合には、処理タイプ2の補間値別演算処理を
行う(ステップS420)。即ち、図84に示したよう
に相関値f(nmin)付近に極小値(真の最高相関値)
が存在すると想定し、相関値f(nmin−2)、f(n
min−1)、f(nmin+1)、f(nmin+2)に
基づいてシフト量xを求める。
On the other hand, if it is determined to be YES in step S410, the calculation processing for each interpolation value of processing type 2 is performed (step S420). That is, as shown in FIG. 84, a minimum value (true highest correlation value) near the correlation value f (nmin)
Of the correlation values f (nmin-2), f (n
The shift amount x is obtained based on (min-1), f (nmin + 1), f (nmin + 2).

【0342】上記ステップS400においてYESと判
定した場合には、CPU60は、最高相関値f(nmi
n)と、最高相関のシフト量nminに対して−1のシ
フト量nmin−1における相関値差f(nmin−1)
との相関値差f(nmin−1)−f(nmin)が基準値
R7に対して、次式、
If YES in step S400, the CPU 60 determines the highest correlation value f (nmi
n) and the correlation value difference f (nmin-1) at the shift amount nmin-1 of -1 with respect to the shift amount nmin of the highest correlation
The correlation value difference f (nmin−1) −f (nmin) with respect to the reference value R7 is

【0343】[0343]

【数52】f(nmin−1)−f(nmin)<R7 を満たすか否かを判定する(ステップS414)。YE
Sと判定した場合、次に、シフト量nmin−1におけ
る相関値f(nmin−1)と、シフト量nmin−2に
おける相関値f(nmin−2)との相関値差f(nmi
n−2)−f(nmin−1)が基準値R7に対して、次
式、
(52) It is determined whether or not f (nmin-1) -f (nmin) <R7 is satisfied (step S414). YE
When it is determined to be S, the correlation value difference f (nmi) between the correlation value f (nmin-1) at the shift amount nmin-1 and the correlation value f (nmin-2) at the shift amount nmin-2 is next.
n-2) -f (nmin-1) is the following formula with respect to the reference value R7:

【0344】[0344]

【数53】 f(nmin−2)−f(nmin−1)<R7 を満たすか否かを判定する(ステップS416)。も
し、この判定処理においてYESと判定した場合には、
補間値通常演算処理を行う(ステップS432)。一
方、NOと判定した場合には、次に、シフト量nmin
+1における相関値f(nmin+1)と、シフト量nm
in+2における相関値f(nmin+2)との相関値差
f(nmin+2)−f(nmin+1)が基準値R7に対
して、次式、
[Equation 53] It is determined whether or not f (nmin-2) -f (nmin-1) <R7 is satisfied (step S416). If YES is determined in this determination process,
Interpolation value normal calculation processing is performed (step S432). On the other hand, if NO is determined, then the shift amount nmin
Correlation value f (nmin + 1) at +1 and shift amount nm
The correlation value difference f (nmin + 2) -f (nmin + 1) with the correlation value f (nmin + 2) at in + 2 is expressed by the following equation with respect to the reference value R7:

【0345】[0345]

【数54】 f(nmin+2)−f(nmin+1)<R7 を満たすか否かを判定する(ステップS418)。も
し、この判定処理においてYESと判定した場合には、
補間値通常演算処理を行う(ステップS432)。一
方、NOと判定した場合には、処理タイプ2の補間値別
演算処理を行う(ステップS420)。
It is determined whether or not f (nmin + 2) -f (nmin + 1) <R7 is satisfied (step S418). If YES is determined in this determination process,
Interpolation value normal calculation processing is performed (step S432). On the other hand, when it is determined to be NO, the calculation process for each interpolation value of process type 2 is performed (step S420).

【0346】上記ステップS414においてNOと判定
した場合、CPU60は、最高相関のシフト量nmin
に対して−3のシフト量nmin−3における相関値f
(nmin−3)が存在するか否かを判定する(ステップ
S422)。NOと判定した場合には、補間値通常演算
処理を行う(ステップS432)。一方、YESと判定
した場合には、シフト量nmin+1における相関値f
(nmin+1)と、シフト量nmin+2における相関
値f(nmin+2)との相関値差f(nmin+2)−f
(nmin+1)が基準値R7に対して、次式、
If NO in step S414, the CPU 60 determines the maximum correlation shift amount nmin.
With respect to the shift value nmin-3 of -3 with respect to f
It is determined whether (nmin-3) exists (step S422). If NO is determined, a normal interpolation value calculation process is performed (step S432). On the other hand, when the determination is YES, the correlation value f at the shift amount nmin + 1
Correlation value difference f (nmin + 2) -f between the correlation value f (nmin + 2) at the shift amount nmin + 2
(nmin + 1) is the following equation with respect to the reference value R7:

【0347】[0347]

【数55】 f(nmin+2)−f(nmin+1)<R7 を満たすか否かを判定する(ステップS424)。NO
と判定した場合には、補間値通常演算処理を行う(ステ
ップS432)。一方、YESと判定した場合には、シ
フト量nmin+2における相関値f(nmin+2)
と、シフト量nmin+3における相関値f(nmin
+3)との相関値差f(nmin+3)−f(nmin+
2)が基準値R7に対して、次式、
It is determined whether or not f (nmin + 2) -f (nmin + 1) <R7 is satisfied (step S424). NO
If it is determined that the interpolation value normal calculation processing is performed (step S432). On the other hand, if YES is determined, the correlation value f (nmin + 2) at the shift amount nmin + 2
And the correlation value f (nmin at shift amount nmin + 3
+ (3) correlation value difference f (nmin + 3) -f (nmin +
2) is based on the reference value R7,

【0348】[0348]

【数56】 f(nmin+3)−f(nmin+2)<R7 を満たすか否かを判定する(ステップS426)。も
し、YESと判定した場合には、補間値通常演算処理を
行う(ステップS432)。一方、NOと判定した場合
には、次に、シフト量nmin−1における相関値f
(nmin−2)と、シフト量nmin+2における相関
値f(nmin+2)との相関値差f(nmin−1)−f
(nmin+2)が基準値R7に対して、次式、
[Equation 56] It is determined whether or not f (nmin + 3) -f (nmin + 2) <R7 is satisfied (step S426). If YES is determined, the interpolation value normal calculation process is performed (step S432). On the other hand, if NO is determined, then the correlation value f at the shift amount nmin-1
Correlation value difference f (nmin-1) -f between the correlation value f (nmin + 2) at the shift amount nmin + 2
(nmin + 2) is the following formula with respect to the reference value R7:

【0349】[0349]

【数57】 f(nmin−1)−f(nmin+2)<R7 を満たすか否かを判定する(ステップS428)。も
し、NOと判定した場合には、処理タイプ2の補間値別
演算処理を行う(ステップS420)。一方、YESと
判定した場合には、処理タイプ1の補間値別演算処理を
行う(ステップS430)。即ち、図83に示したよう
に相関値f(nmin+1)付近に極小値(真の最高相関
値)が存在すると想定し、相関値f(nmin−1)、f
(nmin)、f(nmin+2)、f(nmin+3)に基
づいてシフト量xを求める。 {AFエラー処理(図7ステップS24)の詳細}次
に、図7のステップS24におけるAFエラー処理につ
いて説明する。AFエラー処理は、測距エリア設定処理
(図7ステップS10参照)において3エリア設定又は
5エリア設定された測距エリアの全ての分割エリアで測
距不能と判定されると、予め設定した被写体距離にピン
トを合わせるように撮影レンズを固定焦点にセットする
処理である。尚、撮影レンズを固定焦点にセットするC
PU60の処理を固定焦点処理といい、以下、この固定
焦点処理について説明する。
[Equation 57] It is determined whether or not f (nmin-1) -f (nmin + 2) <R7 is satisfied (step S428). If NO is determined, the calculation process for each interpolation value of process type 2 is performed (step S420). On the other hand, if it is determined to be YES, the calculation processing for each interpolation value of processing type 1 is performed (step S430). That is, as shown in FIG. 83, assuming that a minimum value (true highest correlation value) exists near the correlation value f (nmin + 1), the correlation values f (nmin−1), f
The shift amount x is calculated based on (nmin), f (nmin + 2), and f (nmin + 3). {Details of AF Error Processing (Step S24 in FIG. 7)} Next, the AF error processing in step S24 in FIG. 7 will be described. In the AF error processing, when it is determined that the distance measurement is impossible in all the divided areas of the distance measurement areas set in the three areas or the five areas in the distance measurement area setting processing (see step S10 in FIG. 7), the preset object distance is set. This is a process of setting the taking lens to a fixed focus so as to focus on. In addition, C which sets the taking lens to a fixed focus
The processing of the PU 60 is called fixed focus processing, and this fixed focus processing will be described below.

【0350】測距エリアの全ての分割エリアで測距不能
と判定された場合、CPU60は測距不能と判定された
原因やフイルム感度等に応じて図87及び図88のフロ
ーチャートに示すように予め決められた固定焦点に撮影
レンズを設定する。
When it is determined that the distance measurement is impossible in all the divided areas of the distance measurement area, the CPU 60 determines in advance as shown in the flow charts of FIGS. 87 and 88 according to the cause of the determination that the distance measurement is impossible and the film sensitivity. Set the taking lens to a fixed focus.

【0351】まず、CPU60は、測距エリアの全ての
分割エリアにおいて測距不能と判定された場合、AFプ
レ発光を行ったか否かを判定する(ステップS45
0)。NOと判定した場合には、センサ感度を高感度と
低感度のいずれに設定していたかを判定する(ステップ
S452)。低感度に設定していたと判定した場合に
は、撮影レンズを固定焦点6mに設定する(ステップS
454) 一方、ステップS452においてセンサ感度を高感度に
設定していたと判定した場合には、図88のフローチャ
ートに移行し、フイルム感度がISO400未満かIS
O400以上かを判定する(ステップS464)。IS
O400未満と判定した場合には、撮影レンズを固定焦
点3mに設定する(ステップS466)。一方、ISO
400以上と判定した場合には、撮影レンズを固定焦点
6mに設定する(ステップS468)。
First, when it is determined that distance measurement is impossible in all the divided areas of the distance measurement area, the CPU 60 determines whether or not AF pre-emission has been performed (step S45).
0). If NO is determined, it is determined whether the sensor sensitivity is set to high sensitivity or low sensitivity (step S452). When it is determined that the sensitivity is set to low, the photographing lens is set to a fixed focus of 6 m (step S
454) On the other hand, if it is determined in step S452 that the sensor sensitivity has been set to high sensitivity, then the flow shifts to the flowchart in FIG. 88 and the film sensitivity is less than ISO 400 or IS.
It is determined whether it is O400 or more (step S464). IS
If it is determined to be less than O400, the taking lens is set to a fixed focus of 3 m (step S466). On the other hand, ISO
If it is determined to be 400 or more, the photographing lens is set to a fixed focus of 6 m (step S468).

【0352】上記ステップS450においてYESと判
定した場合、CPU60は、次に測距エリアが5エリア
設定か3エリア設定かを判定する(ステップS45
6)。5エリア設定と判定した場合には、それら全ての
分割エリアにおいて測距不能と判定された原因が信号量
不足(被写体が暗いこと)であったか否かを判定する
(ステップS458)。YESと判定した場合には、撮
影レンズを無限遠位置に設定する(ステップS46
0)。一方、NOと判定した場合には、上記図88のフ
ローチャートの処理に移行し、フイルム感度に応じた固
定焦点に撮影レンズを設定する(詳細は省略)。
If YES in step S450, the CPU 60 next determines whether the distance measuring area is set to 5 areas or 3 areas (step S45).
6). When it is determined that the area is set to 5 areas, it is determined whether or not the reason why it is determined that distance measurement is impossible in all of the divided areas is insufficient signal amount (the subject is dark) (step S458). If YES is determined, the taking lens is set to the infinity position (step S46).
0). On the other hand, if NO is determined, the process proceeds to the process of the flowchart of FIG. 88, and the taking lens is set to a fixed focus according to the film sensitivity (details omitted).

【0353】上記ステップS456において3エリア設
定と判定した場合も5エリア設定の場合と同様にそれら
全ての分割エリアにおいて測距不能と判定された原因が
信号量不足であったか否かを判定する(ステップS46
2)。YESと判定した場合には、撮影レンズを無限遠
位置に設定する(ステップS460)。一方、NOと判
定した場合には、上記図88のフローチャートの処理に
移行し、フイルム感度に応じた固定焦点に撮影レンズを
設定する(詳細は省略)。 {エリア選択処理(図7ステップS28)の詳細}次
に、図7のステップS28におけるエリア選択処理につ
いて説明する。エリア選択処理は、測距エリアの各分割
エリアごとに算出された被写体距離のうち、どの分割エ
リアの被写体距離を撮影レンズのピント合わせに採用す
るかを選択する処理である。原則的には、測距不能と判
定された分割エリア以外の分割エリアで算出された被写
体距離のうち最も近いものが採用される。尚、各分割エ
リアにおける被写体距離は、図7のステップS22にお
ける補間値演算処理により求められた真の最高相関のシ
フト量xに基づいて、図7のステップS26における距
離算出処理により求められる。
When it is determined in step S456 that the three areas are set, it is determined whether or not the reason why it is determined that the distance measurement is impossible in all the divided areas is the signal amount shortage, as in the case of the five areas setting (step). S46
2). If YES is determined, the taking lens is set to the infinity position (step S460). On the other hand, if NO is determined, the process proceeds to the process of the flowchart of FIG. 88, and the taking lens is set to a fixed focus according to the film sensitivity (details omitted). {Details of Area Selection Process (Step S28 in FIG. 7)} Next, the area selection process in step S28 in FIG. 7 will be described. The area selection processing is processing for selecting which divided area of the object distances calculated for each divided area of the distance measuring area is to be used for focusing of the photographing lens. In principle, the closest one of the subject distances calculated in the divided areas other than the divided areas determined to be unable to measure the distance is used. The subject distance in each divided area is calculated by the distance calculation process in step S26 of FIG. 7 based on the shift amount x of the true highest correlation calculated by the interpolation value calculation process in step S22 of FIG.

【0354】一方、例外として、他の分割エリアと比較
して左エリア又は右エリアのいずれか一方の被写体距離
だけが極めて近距離となった場合には、その被写体距離
は採用せず、他の分割エリアの被写体距離のうち最も近
いものを採用する。
On the other hand, as an exception, when only the subject distance of either the left area or the right area becomes extremely short in comparison with other divided areas, the subject distance is not adopted and other The closest subject distance in the divided area is adopted.

【0355】具体的に説明すると、被写体距離を超至近
距離、近距離、中距離以遠の3区分に分割する基準値
1、2を予め設定しておく。尚、基準値1は例えば50
cm(近距離警告が発生する距離)、基準値2は例えば
4mに設定される。今、測距エリアが5エリア設定とな
っている場合において、中央エリア、左中エリア、左エ
リア、右中エリア、右エリアのそれぞれにおいて被写体
距離が算出されたとする。そして、左エリア又は右エリ
アのいずれか一方のみの被写体距離が基準値1より近い
超至近距離となり、それ以外の分割エリア(左エリアと
右エリアのうち被写体距離が超至近距離でない方の分割
エリアも含む)の被写体距離が基準値2よりも遠い中距
離以遠となったとする。この場合、超至近距離となった
左エリア又は右エリアの被写体距離を採用せず、それ以
外の分割エリアの被写体距離のうち最も近いものを採用
する。もし、超至近距離となった左エリア又は右エリア
以外の分割エリアにおいて1つでも超至近距離、又は、
近距離となった被写体距離がある場合には、原則通り、
全ての分割エリアの被写体距離のうち最も近い被写体距
離を採用する。
To be more specific, reference values 1 and 2 for dividing the subject distance into three sections, that is, a super close range, a short range, and a medium range and beyond are set in advance. The reference value 1 is, for example, 50
The reference value 2 is set to, for example, cm (distance at which a short-distance warning is generated) and 4 m. Now, when the distance measurement area is set to 5 areas, it is assumed that the subject distance is calculated in each of the central area, the middle left area, the left area, the middle right area, and the right area. Then, the subject distance of only one of the left area and the right area becomes the super close distance closer than the reference value 1, and the other divided areas (the divided area of the left area and the right area where the subject distance is not the super close distance) It is assumed that the subject distance (including also) is more than the middle distance, which is farther than the reference value 2. In this case, the subject distance in the left area or the right area, which is the closest distance, is not adopted, and the closest one among the subject distances in the other divided areas is adopted. If any one of the divided areas other than the left area or the right area where the distance is super close, the super close distance, or
If there is a close object distance, as a general rule,
The closest subject distance among the subject distances of all the divided areas is adopted.

【0356】具体例を挙げると、各分割エリアごとの被
写体距離が、図89(A)に示すように左エリアの被写
体距離のみが基準値1より近い超至近距離となり、それ
以外の分割エリアでは基準値2よりも遠い中距離以遠に
なったとする。この場合、左エリア以外の分割エリアで
得られた被写体距離のうち最も近い中央エリアの被写体
距離を採用する。
As a concrete example, as shown in FIG. 89 (A), the object distance of each divided area is a super close distance in which only the object distance of the left area is closer than the reference value 1, and in other divided areas. It is assumed that the distance is greater than the reference value 2 and is equal to or greater than the middle distance. In this case, of the subject distances obtained in the divided areas other than the left area, the closest subject distance in the central area is used.

【0357】一方、図89(B)に示すように左エリア
の被写体距離が基準値1より近い超至近距離となり、中
央エリアの被写体距離が基準値1より遠く、基準値2よ
り近い近距離となり、それ以外の分割エリアの被写体距
離が基準値2よりも遠い中距離以遠になったとする。こ
の場合には、原則通り、最も近距離にある左エリアの被
写体距離を採用する 図89(C)に示すように左エリアの被写体距離が基準
値1よりも遠く、基準値2より近い近距離となり、それ
以外の分割エリアの被写体距離が基準値2よりも遠い中
距離以遠になったとする。この場合にも原則通り、最も
近距離にある左エリアの被写体距離を採用する。
On the other hand, as shown in FIG. 89 (B), the subject distance in the left area is a super close distance closer than the reference value 1, and the subject distance in the central area is farther than the reference value 1 and closer than the reference value 2. , It is assumed that the subject distances of the other divided areas are more than the middle distance, which is farther than the reference value 2. In this case, as a general rule, the subject distance in the left area that is the closest is adopted. As shown in FIG. 89C, the subject distance in the left area is farther than the reference value 1 and closer than the reference value 2 Then, it is assumed that the subject distances in the other divided areas are more than the middle distance, which is farther than the reference value 2. In this case also, as a general rule, the object distance in the left area that is the closest is adopted.

【0358】右エリアに関しても全く同様であり、図8
9(D)に示すように右エリアの被写体距離のみが基準
値1より近い超至近距離となり、それ以外の分割エリア
では基準値2よりも遠い中距離以遠になったとする。こ
の場合、右エリア以外の分割エリアで得られた被写体距
離のうち最も近い左エリアの被写体距離を採用する。
The same applies to the right area, as shown in FIG.
As shown in FIG. 9 (D), it is assumed that only the subject distance in the right area is a super close distance closer to the reference value 1, and the other divided areas are farther than the reference value 2 than the middle distance. In this case, of the subject distances obtained in the divided areas other than the right area, the closest subject distance in the left area is adopted.

【0359】一方、図89(E)に示すように右エリア
の被写体距離が基準値1より近い超至近距離となり、左
エリアの被写体距離が基準値1より遠く、基準値2より
近い近距離となり、それ以外の分割エリアの被写体距離
が基準値2よりも遠い中距離以遠になったとする。この
場合には、原則通り、全ての分割エリアの被写体距離の
うち最も近距離にある右エリアの被写体距離を採用す
る。
On the other hand, as shown in FIG. 89 (E), the subject distance in the right area is a super close distance closer than the reference value 1, and the subject distance in the left area is farther than the reference value 1 and closer than the reference value 2. , It is assumed that the subject distances of the other divided areas are more than the middle distance, which is farther than the reference value 2. In this case, as a general rule, of the subject distances of all the divided areas, the closest subject distance of the right area is adopted.

【0360】また、図89(F)に示すように右エリア
の被写体距離が基準値1よりも遠く、基準値2より近い
近距離となり、それ以外の分割エリアの被写体距離が基
準値2よりも遠い中距離以遠になったとする。この場合
にも原則通り、全ての分割エリアの被写体距離のうち最
も近距離にある右エリアの被写体距離を採用する。
Further, as shown in FIG. 89 (F), the subject distance in the right area is farther than the reference value 1 and closer to the reference value 2, and the subject distances in the other divided areas are smaller than the reference value 2. It is assumed that the distance is farther than the middle distance. In this case as well, as a general rule, the object distance of the closest right area is adopted among the object distances of all the divided areas.

【0361】以上の例外的処理は、測距エリアが3エリ
ア設定の場合にも同様に適用できる。即ち、3エリア設
定の場合に測距エリアを構成する中央エリア、右中エリ
ア、左中エリアのうち両端の右中エリア又は左中エリア
のいずれか一方のみで被写体距離が超至近距離となり、
それ以外の分割エリアで被写体距離が中距離以遠になっ
た場合には、超至近距離以外の被写体距離のうち最も近
い被写体距離を採用するようにしてもよい。
The above exceptional processing can be similarly applied to the case where the distance measuring areas are set to three areas. That is, in the case of setting three areas, the subject distance becomes a super close distance in only one of the center right area, the center left area, and the center left area of the left middle area which configure the distance measuring area.
When the subject distance becomes longer than the middle distance in the other divided areas, the closest subject distance among the subject distances other than the super close distance may be adopted.

【0362】以上、上記実施の形態は、AFセンサ74
よりセンサデータを出力し、CPU60によりAFデー
タに変換し、相関値演算処理を実施する形態であった
が、これに限らず、AFセンサ74において、センサデ
ータをAFデータに変換した後、AFデータを出力し、
CPU60にて相関値演算処理を実施する形態、及び、
AFセンサ74において、センサデータをAFデータに
変換し、相関値演算処理を実施した後,CPU60へ距
離信号を出力する形態であってもよい。
As described above, the AF sensor 74 is used in the above embodiment.
Although the sensor data is output by the CPU 60 and converted into AF data by the CPU 60 to perform the correlation value calculation process, the present invention is not limited to this. After the AF sensor 74 converts the sensor data into AF data, the AF data is converted into AF data. And output
A mode in which the correlation value calculation processing is executed by the CPU 60, and
The AF sensor 74 may convert the sensor data into AF data, perform the correlation value calculation process, and then output the distance signal to the CPU 60.

【0363】また、上記実施の形態は、外光パッシブ方
式の測距装置を例としたものであるが、本発明は、TT
Lのパッシブ位相差方式等にも適用できる。
Further, although the above-mentioned embodiment is an example of an external light passive type distance measuring device, the present invention is not limited to this.
It can also be applied to the passive phase difference method of L or the like.

【0364】更に、上記実施の形態におけるカメラの測
距装置は、カメラに限らず他の用途に使用される測距装
置にも適用できる。
Further, the distance measuring device for the camera according to the above-mentioned embodiment is not limited to the camera, and can be applied to the distance measuring device used for other purposes.

【0365】[0365]

【発明の効果】以上説明したように本発明に係る測距装
置によれば、一対のウインドウ範囲を所定間隔置きにシ
フトさせた場合の各シフト量ごとに相関値を算出するた
め、相関値演算の演算量を低減することができ、一方、
これによって得られた相関値のうちの最高相関値が得ら
れたときのウインドウ範囲のシフト量を基準とする前後
の所定の範囲内で、最小間隔のシフト量ごとに相関値を
算出するため、測距精度が低下することがない。
As described above, according to the distance measuring apparatus of the present invention, the correlation value is calculated for each shift amount when the pair of window ranges are shifted at a predetermined interval, so the correlation value calculation is performed. Can be reduced, while
Within the predetermined range before and after the shift amount of the window range when the highest correlation value is obtained among the correlation values obtained by this, in order to calculate the correlation value for each shift amount of the minimum interval, Distance measurement accuracy does not deteriorate.

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

【図1】図1は、本発明が適用されたカメラの正面斜視
図である。
FIG. 1 is a front perspective view of a camera to which the present invention is applied.

【図2】図2は、本発明が適用されたカメラの背面斜視
図である。
FIG. 2 is a rear perspective view of a camera to which the present invention is applied.

【図3】図3は、本発明が適用されたカメラの制御部を
示したブロック図である。
FIG. 3 is a block diagram showing a control unit of a camera to which the present invention is applied.

【図4】図4は、パッシブ方式によるAFセンサの構成
を示した図である。
FIG. 4 is a diagram showing a configuration of a passive AF sensor.

【図5】図5、AFセンサから被写体までの距離が近い
場合のセンサ像(AFデータ)を例示した図である。
FIG. 5 is a diagram exemplifying a sensor image (AF data) when the distance from the AF sensor to the subject is short.

【図6】図6は、AFセンサから被写体までの距離が遠
い場合のセンサ像(AFデータ)を例示した図である。
FIG. 6 is a diagram exemplifying a sensor image (AF data) when a distance from an AF sensor to a subject is long.

【図7】図7は、CPUにおけるAF測距の処理手順の
概要を示すフローチャートである。
FIG. 7 is a flowchart showing an outline of a processing procedure of AF distance measurement in the CPU.

【図8】図8は、Rセンサ及びLセンサのセンサ領域に
おける分割エリアを示した図である。
FIG. 8 is a diagram showing divided areas in a sensor area of an R sensor and an L sensor.

【図9】図9は、測距エリア設定処理の手順を示したフ
ローチャートである。
FIG. 9 is a flowchart showing a procedure of distance measuring area setting processing.

【図10】図10は、3エリア設定と5エリア設定の測
距エリアを示した図である。
FIG. 10 is a diagram showing distance measurement areas of 3 area setting and 5 area setting.

【図11】図11は、測距エリアを分けて個別に積分処
理を行う場合の効果の説明に使用した説明図である。
FIG. 11 is an explanatory diagram used for explaining an effect when the distance measuring areas are divided and the integration processing is individually performed.

【図12】図12は、相関値演算の説明に使用した説明
図である。
FIG. 12 is an explanatory diagram used for explaining a correlation value calculation.

【図13】図13は、AFデータ取得処理において設定
されるピーク選択領域の態様を示した図である。
FIG. 13 is a diagram showing an aspect of a peak selection area set in the AF data acquisition processing.

【図14】図14は、AFデータ取得処理の手順を示し
たフローチャートである。
FIG. 14 is a flowchart showing a procedure of AF data acquisition processing.

【図15】図15は、3分割ゲイン高積分の処理手順を
示したフローチャートである。
FIG. 15 is a flowchart showing a processing procedure of 3-division gain high integration.

【図16】図16は、CPUとAFセンサとの間の信号
ラインを示した図である。
FIG. 16 is a diagram showing a signal line between a CPU and an AF sensor.

【図17】図17は、CPUとAFセンサとの信号送受
信に関する動作タイミングを示した動作タイミングチャ
ートである。
FIG. 17 is an operation timing chart showing operation timing regarding signal transmission / reception between the CPU and the AF sensor.

【図18】図18は、ピーク選択領域設定データの説明
に使用した説明図である。
FIG. 18 is an explanatory diagram used for explaining peak selection region setting data.

【図19】図19は、ピーク選択領域設定データの説明
に使用した説明図である。
FIG. 19 is an explanatory diagram used for explaining peak selection region setting data.

【図20】図20は、ピーク選択領域数データの説明に
使用した説明図である。
FIG. 20 is an explanatory diagram used for explaining the peak selection region number data.

【図21】図21は、ピーク選択領域設定データの生成
手順の説明に使用した説明図である。
FIG. 21 is an explanatory diagram used to describe a procedure for generating peak selection region setting data.

【図22】図22は、ピーク選択領域設定データの生成
手順の説明に使用した説明図である。
FIG. 22 is an explanatory diagram used to describe a procedure for generating peak selection region setting data.

【図23】図23は、ピーク選択領域設定データの生成
手順の説明に使用した説明図である。
FIG. 23 is an explanatory diagram used to describe a procedure for generating peak selection region setting data.

【図24】図24は、ピーク選択領域設定データ及びピ
ーク選択領域数データを示した説明図である。
FIG. 24 is an explanatory diagram showing peak selection region setting data and peak selection region number data.

【図25】図25は、/AFEND信号が正常に出力さ
れない場合の出力形態を示した図である。
FIG. 25 is a diagram showing an output form when the / AFEND signal is not normally output.

【図26】図26は、被写体が明るい場合と暗い場合に
おける/AFEND信号とMDATA信号の状態を例示
した図である。
FIG. 26 is a diagram exemplifying states of / AFEND signal and MDATA signal when a subject is bright and when it is dark.

【図27】図27は、AFデータの読出し処理の説明に
使用した説明図である。
FIG. 27 is an explanatory diagram used to describe AF data read processing.

【図28】図28は、2画素差分データについて従来方
式と新方式との説明に使用した説明図である。
FIG. 28 is an explanatory diagram used for explaining the conventional method and the new method for 2-pixel difference data.

【図29】図29は、従来方式と新方式とで得た2画素
差分データ(AFデータ)を例示した図である。
FIG. 29 is a diagram exemplifying 2-pixel difference data (AF data) obtained by the conventional method and the new method.

【図30】図30は、相関値演算の実行時(実行中)に
おいてAFデータを生成する場合における相関値演算の
処理手順を示したフローチャートである。
FIG. 30 is a flowchart showing a processing procedure of a correlation value calculation when AF data is generated during (during) execution of the correlation value calculation.

【図31】図31は、相関値演算の実行前において予め
AFデータを生成してRAMに格納しておいた場合にお
ける相関値演算の処理手順を示したフローチャートであ
る。
FIG. 31 is a flowchart showing a processing procedure of correlation value calculation in a case where AF data is generated in advance and stored in a RAM before execution of the correlation value calculation.

【図32】図32は、相関値演算の実行時(実行中)に
おいてAFデータを生成する場合のデータの流れを示し
た図である。
FIG. 32 is a diagram showing a data flow when AF data is generated during execution (during execution) of a correlation value calculation.

【図33】図33は、相関値演算の実行前において予め
AFデータを生成してRAMに格納しておく場合のデー
タの流れを示した図である。
FIG. 33 is a diagram showing a data flow when AF data is generated in advance and stored in a RAM before execution of a correlation value calculation.

【図34】図34は、従来方式におけるセンサデータの
読出し処理を示したフローチャートである。
FIG. 34 is a flowchart showing a process of reading sensor data in the conventional method.

【図35】図35は、従来方式におけるセンサデータの
読出し時のAFCLK信号及びAFDATAP信号を示
したタイミングチャートである。
FIG. 35 is a timing chart showing an AFCLK signal and an AFDATAP signal when reading sensor data in the conventional method.

【図36】図36は、新方式(本発明)におけるセンサ
データの読出し処理を示したフローチャートである。
FIG. 36 is a flowchart showing a process of reading sensor data in the new method (present invention).

【図37】図37は、新方式(本発明)におけるセンサ
データの読出し時のAFCLK信号及びAFDATAP
信号を示したタイミングチャートである。
FIG. 37 is an AFCLK signal and AFDATAP at the time of reading sensor data in the new method (present invention).
6 is a timing chart showing signals.

【図38】図38は、新方式(本発明)と従来方式との
測距時間を比較して示した図である。
FIG. 38 is a diagram showing a comparison of distance measuring times of the new method (present invention) and the conventional method.

【図39】図39は、極小値判断処理の説明に使用した
説明図である。
FIG. 39 is an explanatory diagram used for explaining a local minimum value determination process.

【図40】図40は、極小値判断処理の説明に使用した
説明図である。
FIG. 40 is an explanatory diagram used for explaining a local minimum value determination process.

【図41】図41は、i3つおき演算におけるRウイン
ドウ94B及びLウインドウ96B内の採用セルのセル
位置iを示した図である。
FIG. 41 is a diagram showing cell positions i of adopted cells in the R window 94B and the L window 96B in every third i operation.

【図42】図42は、通常演算により算出された相関値
分布の例を示した図である。
FIG. 42 is a diagram showing an example of a correlation value distribution calculated by a normal calculation.

【図43】図43は、i3つおき演算により算出された
相関値分布の例を示した図である。
FIG. 43 is a diagram showing an example of a correlation value distribution calculated by every third i calculation.

【図44】図44は、i3つおき演算における再演算範
囲を示した図である。
FIG. 44 is a diagram showing a recalculation range in every third i calculation.

【図45】図45は、i3つおき演算により検出された
暫定最小極小値が近距離警告範囲内であった場合の相関
値分布の例を示した図である。
FIG. 45 is a diagram showing an example of a correlation value distribution when the provisional minimum minimum value detected by every third i calculation is within the short-range warning range.

【図46】図46は、通常演算により複数の極小値が検
出される場合の相関値分布の例を示した図である。
FIG. 46 is a diagram showing an example of a correlation value distribution when a plurality of local minimum values are detected by normal calculation.

【図47】図47は、図46と同じAFデータに基づい
てi3つおき演算を行った場合に得られる相関値分布を
示した図である。
47 is a diagram showing a correlation value distribution obtained when an operation is performed every three i's based on the same AF data as in FIG. 46.

【図48】図48は、図47の相関値分布に対して再演
算を行った結果を示した図である。
48 is a diagram showing a result of recalculation of the correlation value distribution of FIG. 47.

【図49】図49は、不足分再演算処理の処理手順を示
したフローチャートである。
FIG. 49 is a flowchart showing a processing procedure of a shortage recalculation processing.

【図50】図50(A)、(B)は、2画素差分演算に
より得たRセンサとLセンサのAFデータのうち、シフ
ト量n=0におけるi3つおき演算で使用するAFデー
タを例示した図である。
50 (A) and 50 (B) exemplify AF data used in the calculation of every third i among the AF data of the R sensor and the L sensor obtained by the 2-pixel difference calculation. FIG.

【図51】図51は、図50(A)、(B)のAFデー
タの例でi3つおき演算を行って相関値f(n)を算出し
た結果を示した図である。
FIG. 51 is a diagram showing a result of calculating a correlation value f (n) by performing an operation every third i in the example of the AF data of FIGS. 50 (A) and (B).

【図52】図52は、図50(A)、(B)のAFデー
タの例で通常演算を行って相関値f(n)を算出した結果
を示した図である。
52 is a diagram showing a result of calculating a correlation value f (n) by performing a normal calculation in the example of the AF data of FIGS. 50 (A) and 50 (B).

【図53】図53は、図50のようなセンサデータの態
様が実測で得られた場合にi3つおき演算で求めた相関
値f(n)を示した図である。
FIG. 53 is a diagram showing a correlation value f (n) obtained by computing every third i when the sensor data aspect as shown in FIG. 50 is obtained by actual measurement.

【図54】図54は、n3つおき演算における採用シフ
ト量nの例を示した説明図である。
FIG. 54 is an explanatory diagram showing an example of the adopted shift amount n in every nth third calculation.

【図55】図55は、n3つおき演算における採用シフ
ト量nのとり方に関する説明に使用した説明図である。
[FIG. 55] FIG. 55 is an explanatory diagram used to explain how to obtain an adopted shift amount n in every nth third calculation.

【図56】図56は、n3つおき演算における採用シフ
ト量nのとり方に関する説明に使用した説明図である。
[Fig. 56] Fig. 56 is an explanatory diagram used for explaining how to adopt the adopted shift amount n in every n3th calculation.

【図57】図57は、n3つおき演算における採用シフ
ト量nのとり方に関する説明に使用した説明図である。
[FIG. 57] FIG. 57 is an explanatory diagram used for explaining how to take an adopted shift amount n in every nth third calculation.

【図58】図58は、図56に示したn3つおき演算に
おける再演算範囲の例を示した図である。
FIG. 58 is a diagram showing an example of a recalculation range in every n3th calculation shown in FIG. 56;

【図59】図59は、コントラスト検出処理1とコント
ラスト検出処理2による一連のコントラスト検出処理の
全体手順を示したフローチャートである。
FIG. 59 is a flowchart showing an overall procedure of a series of contrast detection processing by contrast detection processing 1 and contrast detection processing 2.

【図60】図60は、コントラスト検出処理により測距
不能と判定される場合のAFデータ及び相関値分布の例
を示した図である。
FIG. 60 is a diagram showing an example of AF data and correlation value distribution when it is determined by the contrast detection process that distance measurement is impossible.

【図61】図61は、コントラスト検出処理により測距
不能と判定される場合のAFデータ及び相関値分布の例
を示した図である。
FIG. 61 is a diagram showing an example of AF data and a correlation value distribution when it is determined by the contrast detection process that distance measurement is impossible.

【図62】図62は、CPUにおけるL、Rチャンネル
差補正処理の手順を示したフローチャートである。
FIG. 62 is a flowchart showing a procedure of L and R channel difference correction processing in the CPU.

【図63】図63は、AFデータの補正をRセンサのA
FデータとLセンサのAFデータの信号量差を補正して
行う場合の処理手順を示したフローチャートである。
FIG. 63 is a view showing correction of AF data by A of the R sensor.
6 is a flowchart showing a processing procedure when correcting a signal amount difference between F data and AF data of an L sensor.

【図64】図64は、L、Rチャンネル差補正処理によ
る効果の説明に使用した説明図である。
FIG. 64 is an explanatory diagram used for explaining an effect of the L and R channel difference correction processing.

【図65】図65は、L、Rチャンネル差補正処理にお
けるAFデータの補正を信号量差及びコントラスト比を
補正して行うAFデータ補正処理の処理手順を示したフ
ローチャートである。
FIG. 65 is a flowchart showing a processing procedure of AF data correction processing for performing AF data correction in L and R channel difference correction processing by correcting a signal amount difference and a contrast ratio.

【図66】図66は、図65におけるAFデータ補正処
理の効果の説明に使用した説明図である。
66 is an explanatory diagram used for explaining the effect of the AF data correction processing in FIG. 65.

【図67】図67は、図65におけるAFデータ補正処
理の効果の説明に使用した説明図である。
67 is an explanatory diagram used for explaining the effect of the AF data correction processing in FIG. 65.

【図68】図68は、図65におけるAFデータ補正処
理の効果の説明に使用した説明図である。
68 is an explanatory diagram used for explaining the effect of the AF data correction processing in FIG. 65.

【図69】図69は、図65におけるAFデータ補正処
理の効果の説明に使用した説明図である。
69 is an explanatory diagram used for explaining the effect of the AF data correction processing in FIG. 65.

【図70】図70は、図65におけるAFデータ補正処
理の効果の説明に使用した説明図である。
70 is an explanatory diagram used for explaining the effect of the AF data correction processing in FIG. 65.

【図71】図71は、図65におけるAFデータ補正処
理の効果の説明に使用した説明図である。
71 is an explanatory diagram used for explaining the effect of the AF data correction processing in FIG. 65.

【図72】図72は、図65におけるAFデータ補正処
理の効果の説明に使用した説明図である。
72 is an explanatory diagram used for explaining the effect of the AF data correction processing in FIG. 65.

【図73】図73は、図65におけるAFデータ補正処
理の効果の説明に使用した説明図である。
73 is an explanatory diagram used for explaining the effect of the AF data correction processing in FIG. 65.

【図74】図74は、極小値判定の処理の説明に使用し
た説明図である。
[Fig. 74] Fig. 74 is an explanatory diagram used for explaining the processing of the minimum value determination.

【図75】図75は、極小値判定の処理の説明に使用し
た説明図である。
[Fig. 75] Fig. 75 is an explanatory diagram used for explaining the processing of the minimum value determination.

【図76】図76は、極小値判定の処理の説明に使用し
た説明図である。
[FIG. 76] FIG. 76 is an explanatory diagram used for explaining the processing of the minimum value determination.

【図77】図77は、補間値演算処理の説明に使用した
説明図である。
[Fig. 77] Fig. 77 is an explanatory diagram used for explaining an interpolation value calculation process.

【図78】図78は、補間値演算処理の説明に使用した
説明図である。
[Fig. 78] Fig. 78 is an explanatory diagram used for explaining the interpolation value calculation process.

【図79】図79は、補間値演算処理の説明に使用した
説明図である。
[Fig. 79] Fig. 79 is an explanatory diagram used for explaining the interpolation value calculation process.

【図80】図80は、補間値演算処理の説明に使用した
説明図である。
[Fig. 80] Fig. 80 is an explanatory diagram used for explaining the interpolation value calculation process.

【図81】図81は、補間値演算処理の説明に使用した
説明図である。
[FIG. 81] FIG. 81 is an explanatory diagram used for describing an interpolation value calculation process.

【図82】図82は、補間値演算処理の説明に使用した
説明図である。
[FIG. 82] FIG. 82 is an explanatory diagram used to describe an interpolation value calculation process.

【図83】図83は、補間値別演算処理の説明に使用し
た説明図である。
[Fig. 83] Fig. 83 is an explanatory diagram used for explaining the calculation processing for each interpolation value.

【図84】図84は、補間値別演算処理の説明に使用し
た説明図である。
FIG. 84 is an explanatory diagram used for describing the interpolated-value-based arithmetic processing.

【図85】図85は、補間値別演算処理の説明に使用し
た説明図である。
[FIG. 85] FIG. 85 is an explanatory diagram used for explaining the calculation processing for each interpolation value.

【図86】図86は、補間値演算処理において補間値通
常演算及び補間値別演算の処理タイプ1〜3を判別する
手順を示したフローチャートである。
FIG. 86 is a flowchart showing a procedure for determining processing types 1 to 3 of the interpolation value normal calculation and the interpolation value-based calculation in the interpolation value calculation processing.

【図87】図87は、固定焦点処理の手順を示したフロ
ーチャートである。
FIG. 87 is a flowchart showing a procedure of fixed focus processing.

【図88】図88は、固定焦点処理の手順を示したフロ
ーチャートである。
FIG. 88 is a flowchart showing a procedure of fixed focus processing.

【図89】図89は、エリア選択処理の説明に使用した
説明図である。
FIG. 89 is an explanatory diagram used for describing the area selection processing.

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

10…カメラ、34…シャッタボタン、60…CPU、
72…ストロボ装置、74…AFセンサ、94…Rセン
サ、96…Lセンサ、99…処理回路
10 ... Camera, 34 ... Shutter button, 60 ... CPU,
72 ... Strobe device, 74 ... AF sensor, 94 ... R sensor, 96 ... L sensor, 99 ... Processing circuit

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 2F112 AC03 BA05 CA02 DA28 FA03 FA05 FA07 FA29 FA36 FA38 FA41 FA45 2H011 AA01 BA05 BB02 BB04 2H051 AA01 BB07 CB20 CE18 CE20 CE24 DA03 DA07 DA22 DA26   ─────────────────────────────────────────────────── ─── Continued front page    F-term (reference) 2F112 AC03 BA05 CA02 DA28 FA03                       FA05 FA07 FA29 FA36 FA38                       FA41 FA45                 2H011 AA01 BA05 BB02 BB04                 2H051 AA01 BB07 CB20 CE18 CE20                       CE24 DA03 DA07 DA22 DA26

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】複数の受光素子からなる一対のラインセン
サに測距対象物からの光を結像させ、各受光素子から得
られた信号に基づいて相関値演算用の一対のAFデータ
を生成するAFデータ生成手段と、 前記一対のラインセンサのうちの測距に使用する一対の
採用センサ範囲から一対のAFデータを取得するAFデ
ータ取得手段と、 前記一対の採用センサ範囲内において、相関値演算に使
用する一対のAFデータを取得するための一対のウイン
ドウ範囲を決定し、該一対のウインドウ範囲を前記一対
の採用センサ範囲内の最高相関を得るためにシフトさせ
ながら順次相関値演算する第1の相関値演算手段であっ
て、前記一対のウインドウ範囲を一画素分ずつシフトさ
せる場合における前記一対のウインドウ範囲のシフト量
間隔を最小間隔として、前記一対のウインドウ範囲を所
定間隔置きにシフトさせた場合における前記一対のウイ
ンドウ範囲のシフト量ごとに前記一対のウインドウ範囲
内のAFデータを用いて相関値演算する第1の相関値演
算手段と、 前記第1の相関値演算手段により得られた相関値のうち
の最高相関値が得られたときの前記ウインドウ範囲のシ
フト量を基準とする前後の所定の範囲内で、前記一対の
ウインドウ範囲を前記最小間隔でシフトさせながら順次
相関値演算する第2の相関値演算手段と、 前記第2の相関値演算手段により得られた相関値のうち
の最高相関値が得られたときの前記ウインドウ範囲のシ
フト量に基づいて測距対象物の距離を算出する測距対象
物距離算出手段と、 を備えたことを特徴とする測距装置。
1. A pair of line sensors consisting of a plurality of light receiving elements forms an image of light from an object to be measured, and a pair of AF data for calculating a correlation value is generated based on signals obtained from the respective light receiving elements. AF data generating means, an AF data acquiring means for acquiring a pair of AF data from a pair of adopted sensor ranges used for distance measurement of the pair of line sensors, and a correlation value within the pair of adopted sensor ranges. A pair of window ranges for obtaining a pair of AF data used for calculation is determined, and correlation values are sequentially calculated while shifting the pair of window ranges to obtain the highest correlation within the pair of adopted sensor ranges. In the correlation value calculating means of No. 1, the shift amount interval of the pair of window ranges in the case of shifting the pair of window ranges by one pixel is defined as the minimum interval. First correlation value calculation means for calculating a correlation value using AF data within the pair of window ranges for each shift amount of the pair of window ranges when the pair of window ranges are shifted at predetermined intervals. And the pair of windows within a predetermined range before and after the shift amount of the window range when the highest correlation value among the correlation values obtained by the first correlation value calculating means is obtained. A second correlation value calculating means for sequentially calculating a correlation value while shifting the range at the minimum interval; and a maximum correlation value among the correlation values obtained by the second correlation value calculating means. A distance measuring object distance calculating means for calculating a distance to a distance measuring object based on a shift amount of a window range.
【請求項2】前記第1の相関値演算手段は、前記一対の
ウインドウ範囲のシフト量の最小値及び最大値の近傍に
おける所定の範囲内においては、前記最小間隔のシフト
量ごとに相関値演算を行うことを特徴とする請求項1の
測距装置。
2. The first correlation value calculating means calculates a correlation value for each shift amount of the minimum interval within a predetermined range in the vicinity of the minimum value and the maximum value of the shift amount of the pair of window ranges. The distance measuring device according to claim 1, wherein
【請求項3】前記第1の相関値演算手段は、前記採用セ
ンサ範囲内の相関値演算により高い相関を示す極値が複
数ある場合には、最も相関の高い極値を暫定第1極値と
し、次に相関の高い極値を暫定第2極値として求め、 前記第2の相関値演算手段は、前記暫定第1極値と暫定
第2極値との差が所定の基準値内の場合には、前記暫定
第1極値が得られたときの前記ウインドウ範囲のシフト
量を基準とする前後の所定の範囲内と、前記暫定第2極
値が得られたときの前記ウインドウ範囲のシフト量を基
準とする前後の所定の範囲内とでそれぞれ相関値演算を
行うことを特徴とする請求項1又は2の測距装置。
3. The first correlation value calculating means, when there are a plurality of extreme values showing a high correlation by the correlation value calculation in the adopted sensor range, the extreme value having the highest correlation is determined as the temporary first extreme value. Then, the extreme value having the next highest correlation is obtained as the temporary second extreme value, and the second correlation value calculating means determines that the difference between the temporary first extreme value and the temporary second extreme value is within a predetermined reference value. In this case, within the predetermined range before and after the shift amount of the window range when the temporary first extreme value is obtained, and in the window range when the temporary second extreme value is obtained. 3. The distance measuring device according to claim 1, wherein the correlation value calculation is performed within a predetermined range before and after the shift amount is a reference.
【請求項4】前記第2の相関値演算手段は、該第2の相
関値演算手段により相関値演算を行う範囲内のシフト量
のうち、前記第1の相関値演算手段により既に相関値が
得られているシフト量については、相関値演算を行うこ
となく、前記第1の相関値演算手段により得られた相関
値を前記第2の相関値演算手段により得られた相関値と
することを特徴とする請求項1又は3の測距装置。
4. The second correlation value calculating means has a shift value within the range for performing the correlation value calculation by the second correlation value calculating means, and the correlation value is already calculated by the first correlation value calculating means. Regarding the obtained shift amount, the correlation value obtained by the first correlation value computing means is set as the correlation value obtained by the second correlation value computing means without performing the correlation value computation. The distance measuring device according to claim 1 or 3, which is characterized in that.
【請求項5】前記第1の相関値演算手段により最高相関
値が得られたときの前記ウインドウ範囲のシフト量と、
前記第2の相関値演算手段により最高相関値が得られる
ときの前記ウインドウ範囲のシフト量との差を求める手
段と、前記求めた差が所定のシフト量以上の場合には測
距不能とする判定手段と、を有することを特徴とする請
求項1又は2の測距装置。
5. A shift amount of the window range when the maximum correlation value is obtained by the first correlation value calculating means,
A means for obtaining a difference from the shift amount of the window range when the maximum correlation value is obtained by the second correlation value calculating means, and distance measurement is impossible when the obtained difference is equal to or more than a predetermined shift amount. 3. The distance measuring device according to claim 1, further comprising a determining unit.
【請求項6】前記第1の相関値演算手段により最高相関
値が得られたときの前記ウインドウ範囲のシフト量と、
前記第2の相関値演算手段により最高相関値が得られる
ときの前記ウインドウ範囲のシフト量との差を求める手
段を有し、前記第2の相関値演算手段は、前記求めた差
のシフト量の分だけ前記所定の範囲を越えて追加の相関
値演算を行うことを特徴とする請求項1又は2の測距装
置。
6. A shift amount of the window range when the maximum correlation value is obtained by the first correlation value calculating means,
The second correlation value calculating means has a means for obtaining a difference from the shift amount of the window range when the maximum correlation value is obtained, and the second correlation value calculating means has the shift amount of the obtained difference. The distance measuring device according to claim 1 or 2, wherein an additional correlation value calculation is performed by exceeding the predetermined range by the amount.
【請求項7】前記測距対象物距離算出手段は、前記第2
の相関値演算手段により得られた相関値のうちの最高相
関値と、その前後の前記所定の範囲の相関値とに基づい
て補間値演算によって真の最高相関値が得られるシフト
量を求め、該シフト量に基づいて測距対象物の距離を算
出することを特徴とする請求項1乃至5のうちいずれか
1に記載の測距装置。
7. The distance measuring object distance calculating means is the second distance measuring means.
The highest correlation value among the correlation values obtained by the correlation value calculation means, and the shift amount at which the true highest correlation value is obtained by the interpolation value calculation based on the correlation values before and after the correlation value, The distance measuring device according to any one of claims 1 to 5, wherein the distance to the distance measuring object is calculated based on the shift amount.
【請求項8】前記AFデータ取得手段によって取得され
た一対のAFデータのコントラストが所定の基準よりも
高いか低いかを判定するコントラスト判定手段と、 前記一対の採用センサ範囲内において、相関値演算に使
用する一対のAFデータを取得するための一対のウイン
ドウ範囲を決定し、該一対のウインドウ範囲を前記一対
の採用センサ範囲内の最高相関を得るためにシフトさせ
ながら順次相関値演算する第3の相関値演算手段であっ
て、前記一対のウインドウ範囲内のAFデータのうちの
所定間隔置きのAFデータを用いて相関値演算する第3
の相関値演算手段と、 前記第3の相関値演算手段により得られた相関値のうち
の最高相関値が得られたときの前記ウインドウ範囲のシ
フト量を基準とする前後の所定の範囲内で、前記一対の
ウインドウ範囲をシフトさせながら順次相関値演算する
第4の相関値演算手段であって、前記一対のウインドウ
範囲内の全てのAFデータを用いて相関値演算する第4
の相関値演算手段と、 前記コントラスト判定手段によって前記一対のAFデー
タのコントラストが高いと判定された場合には、前記第
3の相関値演算手段及び第4の相関値演算手段による相
関値演算を選択実行させ、前記コントラスト判定手段に
よって前記一対のAFデータのコントラストが低いと判
定された場合には、前記第1の相関値演算手段及び第2
の相関値演算手段による相関値演算を選択実行させる相
関値演算選択手段を備え、 前記測距対象物距離算出手段は、前記相関値演算選択手
段により選択実行された前記第2の相関値演算手段又は
第4の相関値演算手段により得られた相関値のうち最高
相関値が得られたときの前記ウインドウ範囲のシフト量
に基づいて測距対象物の距離を算出することを特徴とす
る請求項1又は2の測距装置。
8. A contrast determination means for determining whether the contrast of a pair of AF data acquired by the AF data acquisition means is higher or lower than a predetermined reference, and a correlation value calculation within the pair of adopted sensor ranges. A pair of window ranges for acquiring a pair of AF data used for the above, and sequentially calculating correlation values while shifting the pair of window ranges to obtain the highest correlation within the pair of adopted sensor ranges. Correlation value calculating means for calculating a correlation value using AF data at predetermined intervals of the AF data within the pair of window ranges.
Within the predetermined range before and after the shift amount of the window range when the highest correlation value among the correlation values obtained by the third correlation value calculation means is obtained. A fourth correlation value calculating means for sequentially calculating the correlation value while shifting the pair of window ranges, the fourth correlation value calculating means using all the AF data within the pair of window ranges.
And the contrast determination means determines that the contrast of the pair of AF data is high, the correlation value computation by the third correlation value computation means and the fourth correlation value computation means is performed. If the contrast determination means determines that the contrast of the pair of AF data is low, the first correlation value calculation means and the second correlation value calculation means
Correlation value calculation means for selectively executing correlation value calculation by the correlation value calculation means, wherein the distance measurement object distance calculation means is the second correlation value calculation means selected and executed by the correlation value calculation selection means. Alternatively, the distance to the object for distance measurement is calculated based on the shift amount of the window range when the highest correlation value is obtained from the correlation values obtained by the fourth correlation value calculation means. 1 or 2 distance measuring device.
【請求項9】前記一対の採用センサ範囲は、前記一対の
ラインセンサの全測距エリアのセンサ、又は前記一対の
ラインセンサの全測距エリアを複数の分割エリアに分割
した各分割エリアのセンサである請求項1乃至8のうち
いずれか1に記載の測距装置。
9. The pair of adopted sensor ranges is a sensor of the entire distance measuring area of the pair of line sensors, or a sensor of each divided area obtained by dividing the total distance measuring area of the pair of line sensors into a plurality of divided areas. The distance measuring device according to any one of claims 1 to 8.
JP2001377257A 2001-12-07 2001-12-11 Ranging apparatus Pending JP2003232982A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2001377257A JP2003232982A (en) 2001-12-11 2001-12-11 Ranging apparatus
US10/314,284 US6701074B2 (en) 2001-12-07 2002-12-09 Distance measuring apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001377257A JP2003232982A (en) 2001-12-11 2001-12-11 Ranging apparatus

Publications (1)

Publication Number Publication Date
JP2003232982A true JP2003232982A (en) 2003-08-22

Family

ID=27773278

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001377257A Pending JP2003232982A (en) 2001-12-07 2001-12-11 Ranging apparatus

Country Status (1)

Country Link
JP (1) JP2003232982A (en)

Similar Documents

Publication Publication Date Title
JP2011039499A (en) Automatic focus detection device
JP4802223B2 (en) Ranging device
JP4470065B2 (en) Ranging device
JP2003172869A (en) Range finder
JP2003195152A (en) Range finder
JP2003172870A (en) Range finder
JP2003232627A (en) Distance measuring device
JP2003172872A (en) Range finder
JP2003177302A (en) Distance measuring equipment
JP2003232983A (en) Ranging apparatus
JP2003177306A (en) Distance measuring equipment
JP2003172871A (en) Range finder
JP2003177301A (en) Distance measuring equipment
JP2003232982A (en) Ranging apparatus
JP2003232628A (en) Distance measuring device
JP2003177308A (en) Distance measuring equipment
JP2003177303A (en) Distance measuring equipment
JP2003177307A (en) Distance measuring equipment
JP2003232629A (en) Distance measuring device
JP2003227995A (en) Camera
JP4109066B2 (en) Ranging device and camera equipped with the same
US6701074B2 (en) Distance measuring apparatus
JP2007086084A (en) Distance measuring device
JP2006343348A (en) Range finder
JPH03174127A (en) Exposure controller for camera