JP4335036B2 - Ranging device and ranging method - Google Patents
Ranging device and ranging method Download PDFInfo
- Publication number
- JP4335036B2 JP4335036B2 JP2004062969A JP2004062969A JP4335036B2 JP 4335036 B2 JP4335036 B2 JP 4335036B2 JP 2004062969 A JP2004062969 A JP 2004062969A JP 2004062969 A JP2004062969 A JP 2004062969A JP 4335036 B2 JP4335036 B2 JP 4335036B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- pair
- difference
- contrast
- bit
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Measurement Of Optical Distance (AREA)
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Studio Devices (AREA)
Description
本発明は、カメラなどで撮影対象を撮影する際に、撮影対象までの距離を測定する測距装置および測距方法に関し、特にパッシブ測距を行うことのできる測距装置および測距方法に関する。 The present invention relates to a distance measuring apparatus and a distance measuring method for measuring a distance to an object to be photographed when a subject is photographed by a camera or the like, and more particularly to a distance measuring apparatus and a distance measuring method capable of performing passive distance measurement.
従来から銀塩カメラ、デジタルカメラなどに搭載されているパッシブ測距を行うことのできる測距装置は、撮影用のカメラのレンズ、CCDとは別に一対の複数の受光素子からなるラインセンサを備え、このラインセンサに入力された複数素子のデータから一つおきに隣接する画素の輝度の差を示す差分データがどれぐらいずれているかを判断することで、撮影対象までの距離を測定することができる。この距離を高精度で測定する技術が、特許文献1に記載されている。この特許文献1によると、測距装置に入力されたデータが、低輝度かつ低コントラストである場合には、積分制御する際に使用する基準電圧を高電圧に切り替えて再度、入力したデータに対する積分光電変換動作を行うことが記載されている。
しかしながら、特許文献1による技術では、図12(b)に示すように測距装置に入力されたコントラストデータが低輝度かつ低コントラストと判断される場合は、再度、積分光電変換動作を実施することになるため、図12(a)に示す通常の場合よりも測距時間がかなり長くなるといった問題が生じる。
However, in the technique according to
また、コントラストデータが低輝度かつ高コントラストでである場合には、図13(a)に示すように、低輝度の部分を底上げする処理を行うが、図13(b)に示すように全体的に高輝度で低コントラストである場合は、再度、積分光電変換動作を行わないものの、高精度の測距を行うことができないといった問題が生じる。 Further, when the contrast data has low luminance and high contrast, a process of raising the low luminance portion is performed as shown in FIG. 13A, but the overall processing is performed as shown in FIG. 13B. However, when the brightness is high and the contrast is low, the integral photoelectric conversion operation is not performed again, but there is a problem that high-precision distance measurement cannot be performed.
そこで、本発明では、再積分光電変換動作をすることなく、高精度の測距を行うことのできる測距装置および測距方法を実現することを目的とする。 Therefore, an object of the present invention is to realize a distance measuring device and a distance measuring method that can perform highly accurate distance measurement without performing reintegration photoelectric conversion operation.
上記課題を解決するため、本発明の測距装置は、撮影対象物からの反射光を受光する複数の受光素子からなる測距用の一対の受光センサと、前記一対の受光センサのそれぞれで受光した反射光の輝度データを一対のデジタルデータに変換するA/D変換手段と、前記A/D変換手段で変換した一対のデジタルデータを用いて、前記複数の受光素子における一つおきに隣接する受光素子同士の輝度データの差分を算出することで、前記デジタルデータを所定ビットの相関演算用の一対の差分データに変換する差分データ変換手段と、前記差分データ変換手段で変換した一対の差分データを、前記複数の受光素子で受光した反射光の輝度データの中でコントラストの高低差が拡大された一対の高コントラストデータに変換する高コントラストデータ変換手段と、前記高コントラストデータ変換手段で変換した一対の高コントラストデータを用いて撮影対象物までの距離を算出する算出手段とを備え、前記高コントラストデータ変換手段は、所定のNビットをもって表した差分データの中で最大値となる差分データを抽出し、抽出した差分データNビットの中から、最高位のビットを抜き出すとともに最高位以外の1が付されている最も高いビットを先頭に(M−1)ビット(M<N)を抽出することにより、コントラストの高低差が拡大された高コントラストデータに変換し、前記算出手段は、前記高コントラストデータ変換手段により変換して得られた一対の高コントラストデータであって、相関演算対象となる測距エリア単位ごとに区分された高コントラストデータに対して、当該測距エリア単位ごとに、当該一対の高コントラストデータの測距エリアを一対のウインドウを用いて一対の高コントラストデータの一部の相関度を演算するとともに前記一対のウインドウを当該測距エリア内で所定量シフトするごとに当該相関度の演算処理を行い、前記演算処理の結果にしたがって得られた相関度の高い測距エリアおよび前記ウインドウのシフト量に基づいて、撮影対象物までの距離を算出することを備えている。
To solve the above problem, the distance measuring apparatus of the present invention comprises a pair of light-receiving sensor for distance measurement comprising a plurality of light receiving elements for receiving light reflected from the object to be shot, received by each of the pair of light receiving sensors a / D converting means for converting the luminance data of the reflected light to a pair of digital data, using a pair of digital data converted by said a / D converting means, adjacent to every other of the plurality of light receiving elements by calculating the difference between the luminance data among the light receiving elements, and the difference data conversion means for converting the digital data into a pair of differential data for correlation calculation of a predetermined bit, a pair of differential data converted by the difference data conversion means the high contrast data to be converted to a pair of high-contrast data height difference of contrast is expanded in the luminance data of the reflected light received by the plurality of light receiving elements Conversion means, and a calculating means for calculating a distance to the high contrast data conversion means pair of the imaging object using high contrast data converted by said high contrast data conversion means, with a predetermined N-bit table The difference data having the maximum value is extracted from the difference data, and the highest order bit is extracted from the extracted difference data N bits, and the highest bit with 1 other than the highest order is attached to the top ( M-1) By extracting bits (M <N), the contrast level is converted into high contrast data in which the difference in height is enlarged, and the calculation means is a pair obtained by conversion by the high contrast data conversion means. High-contrast data, which is classified for each distance measurement area unit to be correlated, For each distance area unit, the pair of high contrast data ranging areas is calculated using a pair of windows, and the degree of correlation of a part of the pair of high contrast data is calculated, and the pair of windows are located within the distance measuring area. Each time a quantitative shift is performed, the correlation degree is calculated, and the distance to the object to be photographed is calculated based on the distance measurement area having a high degree of correlation obtained according to the result of the calculation process and the shift amount of the window. It has that.
また、本発明の測距方法は、撮影対象物からの反射光の輝度データを複数の受光素子からなる測距用の一対の受光センサを介して入力する入力ステップと、入力した輝度データを一対のデジタルデータに変換する第1の変換ステップと、変換した一対のデジタルデータを用いて、前記複数の受光素子における一つおきに隣接する受光素子同士の輝度データの差分を算出することで、前記デジタルデータを所定ビットの相関演算用の一対の差分データに変換する第2の変換ステップと、変換した一対の差分データを、複数の受光素子で受光した反射光の輝度データの中でコントラストの高低差が拡大された一対の高コントラストデータに変換する第3の変換ステップと、変換した一対の高コントラストデータを用いて対象物までの距離を算出する算出ステップとを備え、前記第3の変換ステップは、所定のNビットをもって表した差分データの中で最大値となる差分データを抽出し、抽出した差分データNビットの中から、最高位のビットを抜き出すとともに最高位以外の1が付されている最も高いビットを先頭に(M−1)ビット(M<N)を抽出することにより、コントラストの高低差が拡大された高コントラストデータに変換し、前記算出ステップは、前記第3の変換ステップにより変換して得られた一対の高コントラストデータであって、相関演算対象となる測距エリア単位ごとに区分された高コントラストデータに対して、当該測距エリア単位ごとに、当該一対の高コントラストデータの測距エリアを一対のウインドウを用いて一対の高コントラストデータの一部の相関度を演算するとともに前記一対のウインドウを当該測距エリア内で所定量シフトするごとに当該相関度の演算処理を行い、前記演算処理の結果にしたがって得られた相関度の高い測距エリアおよび前記ウインドウのシフト量に基づいて、撮影対象物までの距離を算出することを特徴とすることを備えている。
Further, the distance measuring method of the present invention includes an input step of inputting luminance data of reflected light from an object to be photographed through a pair of light receiving sensors for distance measurement composed of a plurality of light receiving elements, and a pair of input luminance data. Calculating a difference in luminance data between light receiving elements adjacent to each other in the plurality of light receiving elements, using a first conversion step of converting the digital data into a pair of digital data, A second conversion step for converting digital data into a pair of differential data for correlation calculation of a predetermined bit, and a contrast level in the luminance data of reflected light received by a plurality of light receiving elements is converted into a pair of converted differential data. A third conversion step for converting into a pair of high-contrast data with an enlarged difference and a distance to the object are calculated using the converted pair of high-contrast data. A third conversion step, wherein the difference data having the maximum value is extracted from the difference data represented by predetermined N bits, and the highest bit is extracted from the extracted difference data N bits. Is extracted and (M-1) bits (M <N) are extracted starting with the highest bit with 1 other than the highest one, and converted to high contrast data in which the difference in contrast is expanded. The calculation step includes a pair of high contrast data obtained by the conversion in the third conversion step, and the high contrast data divided for each ranging area unit to be subjected to correlation calculation For each ranging area unit, the pair of high contrast data ranging areas are used as a pair of windows, and the degree of correlation of a part of the pair of high contrast data Each time the pair of windows is shifted by a predetermined amount within the distance measurement area, the correlation degree calculation process is performed, and the distance measurement area having a high correlation degree obtained according to the result of the calculation process and the window It is characterized by calculating the distance to the object to be photographed based on the shift amount.
本発明の上述構成において、撮影対象物からの反射光の輝度データを複数の受光素子からなる受光センサを介して入力し、入力した輝度データをデジタルデータに変換し、変換したデジタルデータを相関演算用の差分データに変換し、変換した差分データを、複数の受光素子で受光したデータの中でコントラストの高低差が拡大された高コントラストデータに変換するようにしたことにより、受光センサで受光した輝度データが低輝度である場合のデータ変換の再演算処理を行うことなく、距離を測定するに際して適切なデータを算出することができ、測距時間を短縮することができるとともに撮影時間を短縮することができる。
また、Nビットで形成された複数の差分データから最大値の差分データ一つを抜き出し、この差分データがM(M<N)ビットで表した際最大値をとることができるよう、NビットからMビットを抜き出すことで、高コントラストのデータを得ることができ、簡易な構成で高コントラストデータを得ることができる。
In the above-described configuration of the present invention, the luminance data of the reflected light from the object to be photographed is input through a light receiving sensor composed of a plurality of light receiving elements, the input luminance data is converted into digital data, and the converted digital data is correlated. The difference data is converted to high-contrast data in which the difference in contrast is expanded among the data received by a plurality of light receiving elements. It is possible to calculate appropriate data when measuring distance without performing re-calculation processing of data conversion when the luminance data is low luminance, and it is possible to reduce the distance measuring time and the photographing time. be able to.
In addition, from a plurality of difference data formed by N bits, one difference data having a maximum value is extracted, and when this difference data is expressed by M (M <N) bits, the maximum value can be taken from N bits. By extracting M bits, high-contrast data can be obtained, and high-contrast data can be obtained with a simple configuration.
また、本発明の測距装置は、所定ビット数Nをもって表した差分データに対してコントラストの程度を判断する判断手段をさらに備え、上記高コントラストデータ変換手段は、上記判断手段により判断したコントラストの程度に応じて、コントラストの高低差を拡大させる程度を変えて変換するようにしてもよい。 The distance measuring apparatus according to the present invention further includes a judging means for judging the degree of contrast with respect to the difference data represented by a predetermined number of bits N, and the high contrast data converting means has the contrast determined by the judging means. Depending on the degree, conversion may be performed by changing the degree of increasing the contrast difference.
本発明の上述の構成において、コントラストの度合いに応じて変換する程度を変えることで、適切な高コントラストデータに変換することができる。 In the above-described configuration of the present invention, it is possible to convert to appropriate high contrast data by changing the degree of conversion according to the degree of contrast.
また、本発明の測距装置は、撮影対象物からの反射光を受光する複数の受光素子からなる測距用の一対の受光センサと、前記一対の受光センサのそれぞれで受光した反射光の輝度データを一対のデジタルデータに変換するA/D変換手段と、前記A/D変換手段で変換した一対のデジタルデータを用いて、前記複数の受光素子における一つおきに隣接する受光素子同士の輝度データの差分を算出することで、前記デジタルデータを所定ビットの相関演算用の一対の差分データに変換する差分データ変換手段と、前記差分データ変換手段で変換した一対の差分データを、前記複数の受光素子で受光した反射光の輝度データの中でコントラストの高低差が拡大された一対の高コントラストデータに変換する高コントラストデータ変換手段と、前記高コントラストデータ変換手段で変換した一対の高コントラストデータを用いて撮影対象物までの距離を算出する算出手段とを備え、前記高コントラストデータ変換手段は、所定のNビットをもって表した差分データの中で、Nビットで表される最大値と最小値との中心である中心値より小さく当該中心値に最も近い差分データを抽出し、抽出した差分データNビットの中から、最高位のビットを抜き出すとともに最高位以外の0が付されているビットを先頭に(M−1)ビット(M<N)を抽出することにより、コントラストの高低差が拡大された高コントラストデータに変換し、前記算出手段は、前記高コントラストデータ変換手段により変換して得られた一対の高コントラストデータであって、相関演算対象となる測距エリア単位ごとに区分された高コントラストデータに対して、当該測距エリア単位ごとに、当該一対の高コントラストデータの測距エリアを一対のウインドウを用いて一対の高コントラストデータの一部の相関度を演算するとともに前記一対のウインドウを当該測距エリア内で所定量シフトするごとに当該相関度の演算処理を行い、前記演算処理の結果にしたがって得られた相関度の高い測距エリアおよび前記ウインドウのシフト量に基づいて、撮影対象物までの距離を算出することを備えている。
また、本発明の測距方法は、撮影対象物からの反射光の輝度データを複数の受光素子からなる測距用の一対の受光センサを介して入力する入力ステップと、入力した輝度データを一対のデジタルデータに変換する第1の変換ステップと、変換した一対のデジタルデータを用いて、前記複数の受光素子における一つおきに隣接する受光素子同士の輝度データの差分を算出することで、前記デジタルデータを所定ビットの相関演算用の一対の差分データに変換する第2の変換ステップと、変換した一対の差分データを、複数の受光素子で受光した反射光の輝度データの中でコントラストの高低差が拡大された一対の高コントラストデータに変換する第3の変換ステップと、変換した一対の高コントラストデータを用いて対象物までの距離を算出する算出ステップとを備え、前記高コントラストデータ変換ステップは、所定のNビットをもって表した差分データの中で、Nビットで表される最大値と最小値との中心である中心値より小さく当該中心値に最も近い差分データを抽出し、抽出した差分データNビットの中から、最高位のビットを抜き出すとともに最高位以外の0が付されているビットを先頭に(M−1)ビット(M<N)を抽出することにより、コントラストの高低差が拡大された高コントラストデータに変換し、前記算出ステップは、前記第3の変換ステップにより変換して得られた一対の高コントラストデータであって、相関演算対象となる測距エリア単位ごとに区分された高コントラストデータに対して、当該測距エリア単位ごとに、当該一対の高コントラストデータの測距エリアを一対のウインドウを用いて一対の高コントラストデータの一部の相関度を演算するとともに前記一対のウインドウを当該測距エリア内で所定量シフトするごとに当該相関度の演算処理を行い、前記演算処理の結果にしたがって得られた相関度の高い測距エリアおよび前記ウインドウのシフト量に基づいて、撮影対象物までの距離を算出することを備えている。
Further, the distance measuring device of the present invention includes a pair of light receiving sensors for distance measurement composed of a plurality of light receiving elements that receive reflected light from an object to be photographed, and the luminance of reflected light received by each of the pair of light receiving sensors. A / D conversion means for converting data into a pair of digital data, and a pair of digital data converted by the A / D conversion means, the luminance between adjacent light receiving elements in the plurality of light receiving elements By calculating the difference between the data, the digital data is converted into a pair of differential data for correlation calculation of a predetermined bit, and the pair of differential data converted by the differential data conversion unit is converted into the plurality of differential data. High-contrast data conversion means for converting into a pair of high-contrast data in which the difference in height of contrast is enlarged in the luminance data of the reflected light received by the light-receiving element; And a calculating means for calculating the distance to the photographed object using a pair of high-contrast data converted by the contrast data conversion unit, the high contrast data conversion means among the difference data representing at predetermined N-bit , The difference data that is smaller than the center value that is the center of the maximum value and the minimum value represented by N bits and that is closest to the center value is extracted, and the highest order bit is extracted from the extracted difference data N bits By extracting (M−1) bits (M <N) starting from the bit with 0 other than the highest-order bit, it is converted into high-contrast data in which the difference in contrast is expanded, and the calculating means A pair of high-contrast data obtained by conversion by the high-contrast data conversion means, for each ranging area unit to be subjected to correlation calculation For the divided high-contrast data, for each distance measuring area unit, the pair of high-contrast data ranging areas is calculated using a pair of windows to calculate the degree of correlation of a part of the pair of high-contrast data. Each time the pair of windows are shifted by a predetermined amount within the distance measurement area, the correlation degree calculation process is performed, and the distance measurement area having a high degree of correlation obtained according to the result of the calculation process and the shift amount of the window are calculated. And calculating a distance to the object to be photographed.
Further, the distance measuring method of the present invention includes an input step of inputting luminance data of reflected light from an object to be photographed through a pair of light receiving sensors for distance measurement composed of a plurality of light receiving elements, and a pair of input luminance data. Calculating a difference in luminance data between light receiving elements adjacent to each other in the plurality of light receiving elements, using a first conversion step of converting the digital data into a pair of the converted digital data, A second conversion step for converting digital data into a pair of differential data for correlation calculation of a predetermined bit, and a contrast level in the luminance data of reflected light received by a plurality of light receiving elements is converted into a pair of converted differential data. A third conversion step for converting into a pair of high-contrast data with an enlarged difference and a distance to the object are calculated using the converted pair of high-contrast data. A high-contrast data conversion step, wherein the high-contrast data conversion step is smaller than the central value that is the center between the maximum value and the minimum value represented by N bits in the difference data represented by predetermined N bits. The difference data closest to is extracted, and the highest-order bit is extracted from the extracted difference data N bits, and the bit with 0 other than the highest-order bit is (M−1) bits (M <N ) Is converted into high-contrast data in which the difference in contrast is expanded, and the calculation step is a pair of high-contrast data obtained by conversion in the third conversion step, For high-contrast data divided for each ranging area unit to be calculated, the pair of high-contrast data for each ranging area unit Using the pair of windows in the distance measurement area, the degree of correlation of a part of the pair of high contrast data is calculated, and the degree of correlation is calculated each time the pair of windows are shifted by a predetermined amount within the distance measurement area. And calculating the distance to the object to be photographed based on the distance measurement area having a high degree of correlation obtained according to the result of the arithmetic processing and the shift amount of the window.
本発明の上述の構成において、中心値より下であって中心値に最も近い値をとる差分データを抽出し、ここでの中心値とMビットで形成した差分データとの差が最大となるよう、NビットからMビットを抜き出すことで、高コントラストのデータを得ることができ、簡易な構成で高コントラストデータを得ることができる
In the above-described configuration of the present invention, differential data having a value lower than the central value and closest to the central value is extracted, and the difference between the central value here and the differential data formed by M bits is maximized. By extracting M bits from N bits, high contrast data can be obtained, and high contrast data can be obtained with a simple configuration.
本発明は、高コントラストデータ変換手段を備えたことにより、受光センサで受光したデータが低輝度である場合のデータ変換の再演算処理を行うことなく、距離を測定するに際して適切なデータを算出することができ、測距時間を短縮することができるとともに撮影時間を短縮することができる、という効果を奏する。 The present invention includes high-contrast data conversion means, and calculates appropriate data when measuring the distance without performing re-calculation processing of data conversion when the data received by the light receiving sensor has low brightness. As a result, the distance measurement time can be shortened and the photographing time can be shortened.
以下、図面を参照して本発明に係る測距装置の実施の形態を説明する。 Hereinafter, embodiments of a distance measuring device according to the present invention will be described with reference to the drawings.
図1は、本発明の測距装置を備えたカメラ装置の外観図であり、図1(a)は、前面斜視図、図1(b)が後方斜視図である。 FIG. 1 is an external view of a camera device provided with a distance measuring device of the present invention. FIG. 1 (a) is a front perspective view, and FIG. 1 (b) is a rear perspective view.
図1(a)において、オートフォーカス用センサ窓10は、パッシブ測距法により撮影対象物までの距離を測定するために使用されるセンサ窓であり、このオートフォーカス用センサ窓10を介して後述する測距用レンズ1A−L、1A−Rにセンサデータとなる画像データを入力させるものである。レンズ11は、撮影した撮影対象物データをCCDに入力させるものである。シャッターボタン12は、撮影対象物を撮影する際に操作者が操作するためのボタンである。ストロボ13は、撮影対象物を撮影する際に、光量を確保するために撮影対象物に対して光を照射するものである。ストロボ調光センサ14は、ストロボ13で撮影対象物に照射した光量が適当か否か判断し、光量を調整するセンサである。ファインダー窓15は、後述するファインダー16から操作者が覗くことにより撮影対象物を視認可能とした窓である。
In FIG. 1A, an
図1(b)において、ファインダー16は、操作者がこのファインダー16を覗くことで撮影対象物を視認可能とするものである。操作部17は、ストロボのポップアップ、操作のキャンセル、機能の選択、動画・静止画・再生などの動作モードを設定することのできるスイッチである。液晶表示部18は、操作部17で操作した結果を表示し、また再生した動画、静止画を表示するものである。電源ボタン19は、カメラ装置の電源のオン・オフを行うスイッチである。
In FIG. 1B, the
このようなカメラ装置に搭載される測距装置について説明する。図2は上述カメラ装置に搭載される測距装置のブロック構成図である。 A distance measuring device mounted on such a camera device will be described. FIG. 2 is a block diagram of a distance measuring device mounted on the camera device.
一実施形態に係る測距装置は、例えばAF(Auto Focus)カメラやビデオカメラなどにおいて、撮影レンズから撮影対象物までの距離を演算するために使用される測距装置である。この測距装置は、図2に示すように、相互に並列に配置された左右一対の測距用レンズ1A−L,1A−Rと、測距用レンズ1A−L,1A−Rを通して撮影対象物Sの画像がそれぞれ結像される受光センサとしての左右一対のラインセンサ1B−L,1B−R(本発明の受光センサ)と、このラインセンサ1B−L,1B−Rからの信号を処理するラインセンサ制御回路1Cとを備えたラインセンサユニット1、およびこのラインセンサユニット1のラインセンサ制御回路1Cから出力されるセンサデータに基づいて撮影対象物Sまでの距離を演算処理する測距演算装置2などを備えて構成されている。
A distance measuring apparatus according to an embodiment is a distance measuring apparatus used to calculate a distance from a photographing lens to a photographing object in, for example, an AF (Auto Focus) camera or a video camera. As shown in FIG. 2, the distance measuring device includes a pair of left and right distance measuring lenses 1A-L and 1A-R, and distance measuring lenses 1A-L and 1A-R. A pair of left and
ラインセンサ1B−L,1B−Rは、例えば234個などの多数に分割されたフォトダイオードなどのセル(画素)が直線状に配列されて構成される。ラインセンサ1B−L,1B−Rの各セルは、それぞれの受光面に結像された撮影対象物Sの画像の光量を光電変換することにより、撮影対象物Sの画像の輝度信号をラインセンサ制御回路1Cに出力する。
The
ラインセンサ1B−L,1B−Rの各セルには、その出力信号を取り出す際に使用されるセル番号が付される。例えば左側のラインセンサ1B−Lの各セルには、図の左側から順にL1〜L234のセル番号が付され、右側のラインセンサ1B−Rでは図の左側から順にR1〜R234のセル番号が付される。なお、左右のラインセンサ1B−L,1B−Rの先頭側の5個および末尾側の5個のセルは、いわゆるダミーのセルであるため、左側のラインセンサ1B−Lの有効画素数はL6〜L229の224個となり、右側のラインセンサ1B−Rの有効画素数はR6〜R229の224個となる。
Each cell of the
ラインセンサ制御回路1Cは、後述する測距演算装置2のラインセンサ制御部2Aからの指令信号に応じてラインセンサ1B−L,1B−Rを制御し、ラインセンサ1B−L,1B−Rの各セルからセル番号と関連付けて輝度信号を入力する。そして、このラインセンサ制御回路1Cは、入力した輝度信号を積分(加算)処理することにより、相関演算に使用するためのセンサデータを各セル毎にセル番号に関連付けて生成する。ちなみに、このセンサデータは、撮影対象物Sの画像が明るいほど低く、暗いほど高い値を示す。
The line
測距演算装置2は、マイクロコンピュータのハードウェアおよびソフトウェアを利用して構成される。この測距演算装置2は、ラインセンサ制御回路1Cから入出力インターフェースを介して入力されるアナログ信号のセンサデータをデジタル信号に変換するA/D変換部2Bの他、このA/D変換部2Bにより変換されたデジタル信号のセンサデータ等を一時記憶するRAM(Random Access Memory)、撮影対象物Sまでの距離を演算するためのプログラムやデータが格納されたROM(Read Only Memory)、このROMに格納されたプログラムを実行することにより、ROMおよびRAMに記憶されたデータに基づいて撮影対象物Sまでの距離を演算するための各種の演算処理を行うCPU(Central Processing Unit)などの図示しないハードウェアを備えている。
The ranging
この測距演算装置2には、ラインセンサ制御回路1Cが生成したセンサデータに基づいて撮影対象物Sまでの距離を演算するため、ラインセンサ制御部2A、A/D変換部2B(本発明のA/D変換手段)の他、センサデータ変換部2C(本発明の差分データ変換手段および高コントラストデータ変換手段並びに判断手段)、センサデータ格納部2D、相関演算部2E、ウインドウシフト部2F、極小値判定部2G、測距エラー判定部2H、距離演算部2I(本発明の算出手段)などがソフトウェアとして構成されている。
In this distance measuring
センサデータ変換部2Cは、A/D変換部2Bで変換された12ビットのデータを差分データに変換する。この差分データは、図3に示すように、ラインセンサの画素において一つおきに隣接する画素データの輝度の差を示す差分をとったものである。さらに、変換した12ビットからなる差分データを8ビットのデータに変換する。8ビットのデータに変換する際、コントラストの程度に応じて拡大する程度を変えることができるよう、どのビットを取り出すか判断し、高コントラストのデータが得ることができるよう後述する手法に従ってビットを抽出する。
The sensor
センサデータ格納部2Dは、センサデータ変換部2Cで変換され、得られた1データを8ビットで表した差分データをセンサデータとして格納する。
The sensor data storage unit 2D stores, as sensor data, differential data that is converted by the sensor
ウインドウシフト部2Fは、センサデータ格納部2Dに格納されたセンサデータから相関演算に使用する一対のセンサデータを読み出すための一対のウインドウWL,WR(図4参照)のシフト操作を制御する。
The
このウインドウシフト部2Fは、図4に示すように、ラインセンサ1B−L,1B−R上にそれぞれ一部重複して設定されたセンサ領域である中央エリアM、左エリアL、右エリアRの各測距エリア単位ごとにセンサデータ格納部2Dから一群のセンサデータをそれぞれ読み出して相関演算させるように、一対のウインドウWL,WRのシフト操作を制御する。この場合、ウインドウシフト部2Fは、例えば中央エリアM、左エリアL、右エリアRの順に一対のウインドウWL,WRのシフト操作を制御する。
As shown in FIG. 4, the
ここで、図4に示すラインセンサ1B−L,1B−Rの各中央エリアMにおけるシフト操作において、ウインドウシフト部2Fは、左側のラインセンサ1B−Lに対応したウインドウWLを中央エリアMの右端の初期位置に対応する位置から左端の最大シフト位置に対応する位置へと順次1づつシフトさせ、右側のラインセンサ1B−Rに対応したウインドウWRを中央エリアMの左端の初期位置に対応する位置から右端の最大シフト位置に対応する位置へと順次1つずつシフトさせる。その際、ウインドウシフト部2Fは、ウインドウWL,WRを交互に1づつシフト操作する。
Here, in the shift operation in each central area M of the
なお、ウインドウシフト部2Fによるラインセンサ1B−L,1B−Rの各左エリアLおよび各右エリアRにおけるシフト操作は、各中央エリアMにおけるシフト操作と略同様であるため、詳細な説明は省略する。
Note that the shift operation in each left area L and each right area R of the
図2に戻り、相関演算部2Eは、ラインセンサ1B−L,1B−R上にそれぞれ設定された各測距エリアM,L,R単位で一対のウインドウWL,WRが交互に1づつ相対的にシフト操作されるごとに(図4参照)、センサデータ格納部2Dから一群のセンサデータを読み出して相関演算を実行する。
Returning to FIG. 2, the
この相関演算は、一方のウインドウWLにより読み出された一群のセンサデータと、他方のウインドウWRにより読み出された一群のセンサデータとの間における各センサデータ同士の差分の絶対値を求め、その絶対値の総和を相関値として求めるものである。この相関値は、値が小さいほど相関度が高く、一対のラインセンサ1B−L,1B−R上に結像された撮影対象物Sの画像が相互に似ていることを示す。
This correlation calculation calculates the absolute value of the difference between each sensor data between the group of sensor data read by one window WL and the group of sensor data read by the other window WR. The sum of absolute values is obtained as a correlation value. This correlation value indicates that the smaller the value is, the higher the degree of correlation is, and the images of the imaging target S imaged on the pair of
ここで、撮影対象物Sが遠距離に位置する場合には、一対の測距用レンズ1A−L,1A−Rを通して一対のラインセンサ1B−L,1B−R上に結像される撮影対象物Sの一対の画像の位置ズレが小さくなり、撮影対象物Sが近距離に位置するほど、一対のラインセンサ1B−L,1B−R上に結像される撮影対象物Sの一対の画像の位置ズレが大きくなる。そして、一対の画像の位置ズレの大小は、一対の画像が相互に似ていることを示す相関度が最大となるまでの一対のウインドウWL,WRのシフト量、換言すれば、相関演算により得られた相関値が最小極小値またはピーク値となるに至るまでの一対のウインドウWL,WRのシフト量として検出することができる。
Here, when the photographing object S is located at a long distance, the photographing object formed on the pair of
そこで、距離演算部2Iは、基本的に、相関演算部2Eにより相関演算された相関値の最小極小値minに対応するウインドウWL,WRのシフト量xに基づいて撮影対象物Sまでの距離を演算する。この距離演算部2Iは、後述する極小値判定部2Gによりラインセンサ1B−L,1B−Rの各測距エリアM,L,R(図4参照)単位で認定された有効極小値に基づいてそれぞれ撮影対象物Sまでの距離を演算し、得られた距離のうち最も近い距離を基準距離とした所定の平均化処理により撮影対象物Sまでの距離を決定する。
Therefore, the distance calculation unit 2I basically calculates the distance to the object S based on the shift amount x of the windows WL and WR corresponding to the minimum minimum value min of the correlation value calculated by the
なお、距離演算部2Iは、撮影対象物Sまでの距離をより詳細に演算するため、相関値の有効極小値に対応するウインドウWL,WRのシフト量と、その前後2つのシフト量に対応する相関値とに基づいて相関値の補間値演算を実施する。そして、この補間値に対応するシフト量に基づき、距離演算部2Iは、一対の測距用レンズ1A−L,1A−Rと一対のラインセンサ1B−L,1B−Rとの間隔、一対のラインセンサ1B−L,1B−Rの中心間距離、一対のラインセンサ1B−L,1B−Rの各セルのピッチ間隔などのパラメータを参照して撮影対象物Sまでの距離を演算する。
Note that the distance calculation unit 2I calculates the distance to the imaging object S in more detail, and therefore corresponds to the shift amounts of the windows WL and WR corresponding to the effective minimum value of the correlation value and the two shift amounts before and after that. An interpolation value calculation of the correlation value is performed based on the correlation value. Based on the shift amount corresponding to the interpolation value, the distance calculation unit 2I determines the distance between the pair of distance measuring lenses 1A-L, 1A-R and the pair of
極小値判定部2Gは、ラインセンサ1B−L,1B−Rの各測距エリアM,L,R単位ごとに相関演算された相関値のうち、相関度が最大となる最小極小値を予め設定された相関度の基準値SLと比較する。そして、この基準値SLより小さい最小極小値を測距演算に有効な有効極小値として各測距エリアごとに認定する。すなわち、中央エリアMにおける有効極小値mM、左エリアLおける有効極小値mL、右エリアRおける有効極小値mR(図示省略)として認定する。
The minimum
測距エラー判定部2Hは、認定された有効極小値のエラー判定を行う。このエラー判定は、(1)センサデータ格納部2Dから読み出される左右のセンサデータに差がある場合、(2)相関演算部2Eにより相関演算された相関値に相互差が小さい2つ以上の極小値が存在する場合、(3)相関演算部2Eにより相関演算された最小極小値と、これに対応するウインドウWL,WRのシフト量の前後2つのシフト量に対応する相関値との差が小さい場合などになされる。
The distance measurement error determination unit 2H performs error determination of the recognized effective minimum value. In this error determination, (1) when there is a difference between the left and right sensor data read from the sensor data storage unit 2D, (2) two or more minimums in which the correlation value calculated by the
次に、本発明の測距装置における動作について説明する。図5は、測距装置の動作フロー図である。 Next, the operation of the distance measuring device of the present invention will be described. FIG. 5 is an operation flowchart of the distance measuring apparatus.
AFセンサ設定処理を行い、図1に示したオートフォーカス用センサ10を用いて撮影対象物からの反射されたデータをラインセンサ1A−L、1A−Rに輝度信号として取り込み(S1)、ラインセンサ制御回路1Cは、ラインセンサ1A−L、1A−Rから入力された輝度信号を積分処理する(S2)。A/D変換部2Bは、積分処理された輝度信号を12ビットのデジタルデータに変換し、センサデータ変換部2Cは変換したデジタルデータを差分データに変換する(S3)。さらにセンサデータ変換部2Cは、12ビットの差分データから高低差の拡大された高コントラストのデータを得ることができる8ビットのデータに変換する(S4)。S4の詳細な処理については後述する。
AF sensor setting processing is performed, and the reflected data from the object to be photographed is taken into the line sensors 1A-L and 1A-R as luminance signals using the
8ビットのデータに変換された差分データは、センサデータ格納部2Dに一時格納され、ウインドウシフト部2Fのウインドウシフト制御とあいまって、ラインセンサ1A−R、1A−Lで受光したデータに関して、左右のウインドウに対応する差分データの相関度合いを示す相関値をウインドウシフトごとに算出する(S5)。
The difference data converted into 8-bit data is temporarily stored in the sensor data storage unit 2D, and with the window shift control of the
極小判定部2Gでは、ウインドウシフトごとに算出した複数の相関値から極小値を判定し(S6)、測距エラー判定部2Hでは、測距エラー処理として上述したエラー判定(1)〜(3)などに基づいてエラー判定を行う(S7)。そして、距離演算部2Iでは、上述したとおり、有効極小値に基づいてそれぞれ撮影対象物までの距離を演算する(S8)。
The
次に、本発明の特徴部分である図5のS4で示すセンサデータ変換処理について説明する。図6は、複数の差分データのうちの一データを12ビットで表し、この12ビットの差分データから8ビットの差分データに変換するときの説明図である。図6(a)はコントラストが低い状態のときの処理を示し、図6(b)、図6(c)、図7(a)、図7(b)に従うにつれて、コントラストが高い状態のときの処理を示す。以下、具体的に説明する。なお、図8(a)等で示すように、D_bit1とは、複数の差分データの中で、最大値と最小値の中心である中心値以上の値を示す12ビット目(bit11)が1である(この場合、中心値を原点とするとプラスの符号とみることができる)もののうち、12ビット目(bit11)を除いて1となっている最上位のビットを示し、D_bit0とは、複数の差分データの中で、上述の中心値以下を示す12ビット目が0である(この場合、マイナスの符号とみることができる)もののうち、12ビット目を除いて0となっている最上位のビットを示す。 Next, the sensor data conversion process indicated by S4 in FIG. 5 which is a characteristic part of the present invention will be described. FIG. 6 is an explanatory diagram when one of a plurality of difference data is represented by 12 bits and converted from the 12-bit difference data to 8-bit difference data. FIG. 6A shows the processing when the contrast is low. As shown in FIG. 6B, FIG. 6C, FIG. 7A, and FIG. Indicates processing. This will be specifically described below. As shown in FIG. 8A and the like, D_bit1 is 1 in the 12th bit (bit11) indicating a value equal to or greater than the center value that is the center of the maximum value and the minimum value among a plurality of difference data. Among the ones (in this case, the central value can be regarded as a plus sign), the most significant bit is 1 except for the 12th bit (bit 11), and D_bit0 is a plurality of bits. Among the difference data, the highest bit that is 0 except the 12th bit among the difference data in which the 12th bit indicating the center value or less is 0 (in this case, it can be regarded as a minus sign). Indicates a bit.
図6(a)は、D_bit1≧D_bit0かつ、D_bit1=6の場合、またはD_bit1<D_bit0かつ、D_bit0=6の場合は、すなわち、12ビットの差分データが低コントラストの状態(明暗が明確になっていない状態)である場合は、12ビットからなる差分データのうち、12ビット目および、1ビット目から6ビット目のデータを取り出すことにより、8ビットのデータに変換する様子を示す。 FIG. 6A shows the case where D_bit1 ≧ D_bit0 and D_bit1 = 6, or D_bit1 <D_bit0 and D_bit0 = 6, that is, the 12-bit difference data is in a low contrast state (light and dark are clear). In this case, the 12th bit difference data and the 1st bit to 6th bit data are extracted from the 12 bit differential data and converted to 8 bit data.
図6(b)は、D_bit1≧D_bit0かつ、D_bit1=7の場合またはD_bit1<D_bit0かつ、D_bit0=7の場合、すなわち、12ビットの差分データが比較的低コントラストの状態(明暗がやや明確となっていない状態)である場合は(図6(a)で示す状態より高コントラストの状態である)、12ビットの差分データのうち、12ビット目、および2ビット目から8ビット目のデータを取り出すことにより8ビットのデータに変換するときの様子を示す。 FIG. 6B shows a case where D_bit1 ≧ D_bit0 and D_bit1 = 7 or D_bit1 <D_bit0 and D_bit0 = 7, that is, 12-bit difference data is in a relatively low contrast state (light and dark becomes slightly clear). (The state is higher in contrast than the state shown in FIG. 6A), the 12th bit data and the 2nd to 8th bit data are extracted from the 12-bit difference data. This shows the state when converting to 8-bit data.
同様に、図6(c)は、D_bit1≧D_bit0かつ、D_bit1=8の場合またはD_bit1<D_bit0かつ、D_bit0=8の場合、すなわち12ビットの差分データのうち、12ビットの差分データが中程度のコントラストの状態(明暗の明確さが中程度となっている状態)である場合は(図6(b)で示す状態より高コントラストの状態である)、12ビットの差分データのうち、12ビット目、および3ビット目から9ビット目のデータを取り出すことにより8ビットのデータに変換するときの様子を示す。 Similarly, FIG. 6C shows a case where D_bit1 ≧ D_bit0 and D_bit1 = 8 or D_bit1 <D_bit0 and D_bit0 = 8, that is, 12-bit difference data is medium among 12-bit difference data. In the case of a contrast state (a state where the clarity of light and darkness is moderate) (a state of higher contrast than the state shown in FIG. 6B), the 12th bit of the 12-bit difference data , And a state when data is converted into 8-bit data by extracting data from the third bit to the ninth bit.
同様に、図7(a)は、D_bit1≧D_bit0かつ、D_bit1=9の場合、または、D_bit1<D_bit0かつ、D_bit0=9の場合、すなわち、12ビットの差分データのうち、12ビットの差分データがやや高コントラストの状態(明暗がやや明確となっている状態)である場合は(図6(c)で示す状態より高コントラストの状態である)、12ビットの差分データのうち、12ビット目、および4ビット目から10ビット目のデータを取り出すことにより8ビットのデータに変換するときの様子を示す。 Similarly, FIG. 7A shows a case where D_bit1 ≧ D_bit0 and D_bit1 = 9, or D_bit1 <D_bit0 and D_bit0 = 9, that is, 12-bit difference data is 12-bit difference data. In the case of a slightly high contrast state (a state in which light and dark are slightly clear) (a state of higher contrast than the state shown in FIG. 6C), the 12th bit of the 12-bit difference data, The state when the data of the 4th to 10th bits is taken out and converted to the data of 8 bits is shown.
同様に、図7(b)は、D_bit1≧D_bit0かつ、D_bit1=10の場合、またはD_bit1<D_bit0かつ、D_bit0=10の場合、すなわち、すなわち、12ビットの差分データのうち、12ビットの差分データが高コントラストの状態(明暗が明確となっている状態)である場合は(図7(b)で示す状態より高コントラストの状態である)、12ビットの差分データのうち、12ビット目、および5ビット目から11ビット目のデータを取り出すことにより8ビットのデータに変換するときの様子を示す。 Similarly, FIG. 7B shows a case where D_bit1 ≧ D_bit0 and D_bit1 = 10, or D_bit1 <D_bit0 and D_bit0 = 10, that is, 12-bit difference data out of 12-bit difference data. Is in a high contrast state (a state in which light and dark are clear) (which is a state of higher contrast than the state shown in FIG. 7B), the 12th bit of the 12-bit difference data, and A state when the data of the 5th bit to the 11th bit is extracted and converted to the 8-bit data is shown.
以上のとおり、本発明は、12ビットのデジタルデータをもって表した差分データにおいて、複数ある差分データの中で最大値となる差分データを抽出し、抽出した差分データが、8ビットで差分データを表す際に最大値をとることができるよう、12ビットで表された差分データから8ビットを抽出し、また、複数ある差分データの中で12ビットをもって最大値と最小値とを表したときの中心値より小さい値であるとともに、この中心値に最も遠い値をとる差分データを抽出し、抽出した差分データと上記中心値との差が大きくなることができるよう、上記12ビットで表された差分データから8ビットを抽出している。 As described above, the present invention extracts difference data having a maximum value from a plurality of difference data in difference data represented by 12-bit digital data, and the extracted difference data represents difference data by 8 bits. The center when 8 bits are extracted from the difference data represented by 12 bits and the maximum value and the minimum value are represented by 12 bits among a plurality of difference data so that the maximum value can be taken. The difference data represented by the 12 bits is extracted so that the difference data having a value smaller than the center value and the value farthest from the center value can be extracted and the difference between the extracted difference data and the center value can be increased. 8 bits are extracted from the data.
すなわち、所定ビット(本実施の形態では12ビット)をもって表した差分データの中で最大値となる差分データを抽出し、抽出した差分データの中から、最高位のビット(本実施の形態では12ビット目)を抜き出すとともに最高位以外の1が付されている最も高いビットを先頭に所定ビット(本実施の形態では7ビット)を抽出することにより、また、所定ビット(本実施の形態では12ビット)をもって表した差分データの中で、所定ビット(本実施の形態では12ビット)で表される最大値と最小値との中心である中心値より小さくこの中心値に最も遠い差分データを抽出し、抽出した差分データの中から、最高位のビット(本実施の形態では12ビット目)を抜き出すとともに最高位以外の0が付されているビットを先頭に所定のビット(本実施の形態では7ビット)を抽出することにより、コントラストの高低差が拡大された高コントラストデータに変換することができ、絶対値の小さな差分データについては、より大きな絶対値のデータとすることで、データにメリハリをつけることができる。すなわち、本発明においては、コントラストの高低差をより大きくすることができる。 That is, the difference data having the maximum value is extracted from the difference data represented by predetermined bits (12 bits in the present embodiment), and the highest bit (12 in the present embodiment) is extracted from the extracted difference data. By extracting a predetermined bit (7 bits in the present embodiment) starting from the highest bit to which 1 other than the highest is added and extracting the predetermined bit (12 in the present embodiment) In the difference data represented by (bit), the difference data that is smaller than the center value that is the center of the maximum value and the minimum value represented by a predetermined bit (12 bits in the present embodiment) and is farthest from the center value is extracted. Then, the highest-order bit (the 12th bit in the present embodiment) is extracted from the extracted difference data, and a bit with 0 other than the highest-order bit is specified at the beginning. (7 bits in the present embodiment) can be converted into high contrast data in which the difference in contrast is enlarged. For difference data with a small absolute value, data with a larger absolute value can be obtained. By doing so, the data can be sharpened. That is, in the present invention, the difference in contrast can be increased.
次に、その具体例を示す。図8(a)、図8(b)は、ラインセンサから算出した差分データの中から上述のD_bit1、D_bit0を抽出するときの具体例を示す説明図である。なお、本図においては1ビット目をbit0、2ビット目をbit1、・・・12ビット目をbit11と表現している。 Next, a specific example is shown. FIGS. 8A and 8B are explanatory diagrams illustrating a specific example when the above-described D_bit1 and D_bit0 are extracted from the difference data calculated from the line sensor. In this figure, the first bit is represented as bit0, the second bit as bit1,..., The 12th bit as bit11.
図8(a)に示す差分データa1において、中心値以上を示す12ビット目が1であり、12ビット目(bit11)以外である11ビット目(bit10)に1がある。また、差分データa2の12ビット目(bit11)に0があり、11ビット目(bit10)から8ビット目(bit7)に1があり、7ビット目(bit6)に0がある。また、差分データa3の12ビット目(bit11)に1があり、10ビット目(bit9)に1がある。また、差分データa4の12ビット目(bit11)に1があり、9ビット目(bit8)に1がある。ほか、差分データa5、a6、・・・an−2などにも同様の形でデータが形成されているとする。 In the difference data a 1 shown in FIG. 8 (a), a 12 bit indicating a higher center value is 1, there is a 1 in 12 bit (bit11) than in a 11 bit (bit10). Further, there is a 0 in the 12-th bit (bit11) of the difference data a 2, there is 1 to 8 bit to 11 bit (bit10) (bit7), there is a 0 in bit 7 (bit6). Also, there is 1 to 12 bit (bit11) of the differential data a 3, there is a 1 in 10 bit (bit9). Also, there is 1 to 12 bit (bit11) of the differential data a 4, there is a 1 in the 9th bit (bit8). In addition, the difference data a 5, a 6, data in a similar manner to such ··· a n-2 is formed.
この中で12ビット目(bit11)に1があるデータの中で、最上位のビットに1があるデータは差分データa1ということになり、D_bit1=10ということになる。 Among the data having 1 in the 12th bit (bit 11), the data having 1 in the most significant bit is the difference data a 1 and D_bit1 = 10.
同様に、12ビット目(bit11)に0があるデータの中で、最上位にビットに0があるデータは差分データa2ということになり、ここでのD_bit0=6となる。 Similarly, among the data that 0 to 12 bit (bit11), data that 0 bit at the top will be referred to as difference data a 2, a D_bit0 = 6 here.
そして、D_bit1とD_bit0とを比較すると、本例ではD_bit1>D_bit0となり、図7(b)に示す抽出パターンで8ビットの差分データを生成することになる。つまり、すべての差分データa1からan−2に対して12ビット目、および5ビット目から11ビット目までのビットを取り出すことで、12ビットの差分データを8ビットの差分データに変換することができる。 Then, comparing D_bit1 and D_bit0, in this example, D_bit1> D_bit0 is established, and 8-bit difference data is generated with the extraction pattern shown in FIG. 7B. In other words, converting from all the differential data a 1 12 bit against a n-2, and the fifth bit by extracting the bits up to 11 bit, 12-bit differential data into 8-bit difference data be able to.
同様の例を図8(b)に示す。ここでは、D_bit0=8、D_bit1=4とすることから、図6(c)に示す抽出パターンで12ビットから8ビットへのデータ変換を行うことになる。 A similar example is shown in FIG. Here, since D_bit0 = 8 and D_bit1 = 4, data conversion from 12 bits to 8 bits is performed using the extraction pattern shown in FIG.
このような変換処理を行うことにより、撮影対象物のコントラストを示すデータが小であってもコントラストを大きくするようデータ変換を行うことができ、低コントラスト時においても再積分処理をすることなく、測距時間を短縮することができ(図12(c)参照)、撮影時間の短縮を達成することができるとともに、測距精度を向上させることができる。図9は、その効果の面における具体例を示す説明図である。 By performing such conversion processing, it is possible to perform data conversion to increase the contrast even if the data indicating the contrast of the object to be photographed is small, and without performing reintegration processing even at low contrast, The distance measurement time can be shortened (see FIG. 12C), the photographing time can be shortened, and the distance measurement accuracy can be improved. FIG. 9 is an explanatory diagram showing a specific example of the effect.
図9は、従来の技術で再積分処理をしない場合、従来の技術で再積分処理をした場合、本発明の場合を示したものである。図9(a)はコントラストが大きい差分データが入力されたときの様子を示す図であり、この場合は、従来の技術の方法であっても、本発明の方法であっても、差分データはあまりかわりはなく、高コントラストの状態である。コントラストが下がっていくに従って、例えば図9(d)、図9(e)に示すように、従来の技術の方法では、差分データのコントラストが小さい場合には、再積分処理をすることになり、測距時間のかかるものである(図12参照)。さらに、再積分処理をしてもコントラストが小さい状態にとどまる場合もあり(図9(e))、この場合、従来の技術の方法では測距精度の向上は望めない。これに対して、本発明の方法においては、差分データのコントラストが小さい場合でも(図9(e))、上述したとおりこれを大きくなるよう変換処理をすることができるため、図に示すようにコントラストの大きい差分データを得ることができる。 FIG. 9 shows the case of the present invention when the reintegration process is not performed by the conventional technique, when the reintegration process is performed by the conventional technique. FIG. 9A is a diagram showing a state when difference data having a high contrast is input. In this case, the difference data is not limited to the conventional method or the method of the present invention. There is not much change, and it is in a high contrast state. As the contrast decreases, for example, as shown in FIGS. 9 (d) and 9 (e), in the method of the conventional technique, when the difference data has a small contrast, reintegration processing is performed. It takes a long distance measurement time (see FIG. 12). Furthermore, even if the reintegration process is performed, the contrast may remain small (FIG. 9E). In this case, the accuracy of distance measurement cannot be improved by the conventional method. On the other hand, in the method of the present invention, even when the contrast of the difference data is small (FIG. 9 (e)), the conversion process can be performed to increase the difference data as described above. Difference data with high contrast can be obtained.
以下、コントラストの小さい差分データをコントラストの大きい差分データに変換するときの詳細な動作について説明する。 Hereinafter, a detailed operation when converting difference data with low contrast into difference data with high contrast will be described.
図10は、図5におけるS4の詳細なセンサデータ変換処理を行うときの詳細な動作フロー図であり、本発明の測距装置における差分データを高コントラストデータに変換する際のコントラストを判断する動作フロー図である。 FIG. 10 is a detailed operation flow diagram when the detailed sensor data conversion process of S4 in FIG. 5 is performed, and the operation for determining the contrast when the difference data of the present invention is converted into high contrast data. FIG.
まず、初期としてD_bit0=6、D_bit1=6をセンサデータ変換部2C内に備え付けられているレジスタ部(図示せず)に設定し、保持する(S10)。そして、センサデータ変換部2Cで得られた差分データの中の一つの12ビットからなる差分データを読み出す(S11)。読み出した12ビットからなる差分データがbit11=1(つまり、12ビット目が1である)であるか、否か判断する(S12)。ここでは、最大値に対して中心値より小さいか、大きいかを判断するものであって、中心値を原点と考えると、プラスか、マイナスかを判断することになる。
First, D_bit0 = 6 and D_bit1 = 6 are initially set in a register unit (not shown) provided in the sensor
差分データがbit11=1である場合は、次に差分データがbit10=1(11ビット目が1であるか)であるか判断する(S13)。肯定判断された場合は、D_bit1=10を上述レジスタ部に上述レジスタ部に設定し、保持し(S14)、後述する図11におけるデータ変換処理のステップS36に進む。 If the difference data is bit11 = 1, it is then determined whether the difference data is bit10 = 1 (whether the 11th bit is 1) (S13). If an affirmative determination is made, D_bit1 = 10 is set in the register unit and held in the register unit (S14), and the process proceeds to step S36 of the data conversion process in FIG.
S13で、否定判断された場合、差分データがbit9=1(10ビット目が1であるか)であるか判断する(S15)。肯定判断された場合は、D_bit<9であるか、さらに判断し、肯定判断された場合はD_bit1=9と上述レジスタ部に上述レジスタ部に設定し、保持し(S17)、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。否定判断された場合は、特に情報を保持することなく、次の差分データがあれば(S24)、その差分データを読み出す(S11)。 If a negative determination is made in S13, it is determined whether or not the difference data is bit9 = 1 (whether the 10th bit is 1) (S15). If an affirmative determination is made, it is further determined whether or not D_bit <9. If an affirmative determination is made, D_bit1 = 9 is set in the register unit and held in the register unit (S17), and the next difference data is stored. If there is (S24), the difference data is read (S11). If a negative determination is made, if there is the next difference data (S24) without specifically holding the information, the difference data is read (S11).
S15で否定判断された場合は、差分データがbit8=1(9ビット目が1であるか)であるか判断する(S18)。肯定判断された場合は、さらにD_bit1<8であるか判断し(S19)、肯定判断された場合は、D_bit1=8を上述レジスタ部に設定し、保持し(S20)、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。否定判断された場合は、特に情報を保持することなく、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。 If a negative determination is made in S15, it is determined whether the difference data is bit8 = 1 (whether the 9th bit is 1) (S18). If an affirmative determination is made, it is further determined whether or not D_bit1 <8 (S19). If an affirmative determination is made, D_bit1 = 8 is set and held in the register unit (S20), and the next difference data is available. If this is the case (S24), the difference data is read (S11). When a negative determination is made, if there is the next difference data (S24) without particularly holding the information, the difference data is read (S11).
S18で否定判断された場合は、差分データがbit7=1(8ビット目が1であるか)であるか判断する(S21)。肯定判断された場合は、さらにD_bit1<7であるか判断し(S22)、肯定判断された場合は、D_bit1=7を上述レジスタ部に設定し、保持し(S23)、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。否定判断された場合は、特に情報を保持することなく、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。 If a negative determination is made in S18, it is determined whether the difference data is bit7 = 1 (whether the 8th bit is 1) (S21). If an affirmative determination is made, it is further determined whether or not D_bit1 <7 (S22). If an affirmative determination is made, D_bit1 = 7 is set and held in the register section (S23), and the next difference data is available. If this is the case (S24), the difference data is read (S11). When a negative determination is made, if there is the next difference data (S24) without particularly holding the information, the difference data is read (S11).
S21で否定判断された場合は、差分データの全てを読み出したかを判断し(S24)、全て読み出していない場合は、次の差分データを読み出していく(S11)。 If a negative determination is made in S21, it is determined whether all of the difference data has been read (S24), and if not all have been read, the next difference data is read (S11).
S12に戻り、S12において差分データがbit11=0である場合は、差分データがbit10=0(11ビット目が0であるか)であるか判断する(S25)。肯定判断された場合は、D_bit0=10に上述レジスタ部に設定し、保持し(S26)、後述するデータ変換処理のステップS36に進む。 Returning to S12, if the difference data is bit11 = 0 in S12, it is determined whether the difference data is bit10 = 0 (whether the 11th bit is 0) (S25). When an affirmative determination is made, D_bit0 = 10 is set in the register unit and held (S26), and the process proceeds to step S36 of the data conversion process described later.
S25で否定判断された場合は、差分データがbit9=0(10ビット目が0であるか)であるか判断する(S27)。肯定判断された場合はD_bit0<9であるか、否か判断し(S28)、肯定判断された場合は、D_bit0=9を上述レジスタ部に設定し、保持し(S29)、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。否定判断された場合は、特に情報を保持することなく、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。 If a negative determination is made in S25, it is determined whether the difference data is bit9 = 0 (whether the 10th bit is 0) (S27). If an affirmative determination is made, it is determined whether or not D_bit0 <9 (S28). If an affirmative determination is made, D_bit0 = 9 is set and held in the register unit (S29), and the next difference data is stored. If there is (S24), the difference data is read (S11). When a negative determination is made, if there is the next difference data (S24) without particularly holding the information, the difference data is read (S11).
S27で否定判断された場合は、差分データがbit8=0(9ビット目が0であるか)であるか判断する(S30)。肯定判断された場合はD_bit0<8であるか、否か判断し(S31)、肯定判断された場合は、D_bit0=8を上述レジスタ部に設定し、保持し(S32)、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。否定判断された場合は、特に情報を保持することなく、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。 If a negative determination is made in S27, it is determined whether the difference data is bit8 = 0 (whether the 9th bit is 0) (S30). If an affirmative determination is made, it is determined whether or not D_bit0 <8 (S31). If an affirmative determination is made, D_bit0 = 8 is set and held in the register unit (S32), and the next difference data is stored. If there is (S24), the difference data is read (S11). When a negative determination is made, if there is the next difference data (S24) without particularly holding the information, the difference data is read (S11).
S30で否定判断された場合は、差分データがbit7=0(8ビット目が0であるか)であるか判断する(S33)。肯定判断された場合はD_bit0<7であるか、否か判断し(S34)、肯定判断された場合は、D_bit0=7を上述レジスタ部に設定し、保持し(S35)、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。否定判断された場合は、特に情報を保持することなく、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。 If a negative determination is made in S30, it is determined whether the difference data is bit7 = 0 (whether the 8th bit is 0) (S33). If an affirmative determination is made, it is determined whether or not D_bit0 <7 (S34). If an affirmative determination is made, D_bit0 = 7 is set and held in the register unit (S35), and the next difference data is stored. If there is (S24), the difference data is read (S11). When a negative determination is made, if there is the next difference data (S24) without particularly holding the information, the difference data is read (S11).
S33で否定判断された場合は、ここで取り出した差分データは、コントラストの判断をする上で、対象となるべきデータはないとして、次の差分データがあれば(S24)、その差分データの読み出しを行う(S11)。 If a negative determination is made in S33, the difference data extracted here is determined that there is no data that should be the object in determining the contrast. If there is next difference data (S24), the difference data is read out. (S11).
そうして、全ての差分データの読み出しが終わるまでこれらS11からS35を繰り返す(S24)。 Then, S11 to S35 are repeated until reading of all the difference data is completed (S24).
このように、S11からS35までの処理は、差分データから撮影対象物の輝度信号のコントラストの高低を判断している。例えばD_bit1=10、またはD_bit0=10に設定、保持された場合は、撮影対象物からの輝度信号のコントラストは高い場合であり、後述する図11ではその場合に合ったデータ変換処理を行っている。逆にD_bit1=6、またはD_bit0=6に設定、保持された場合は、撮影対象物からの輝度信号のコントラストが低い場合であり、後述する図11ではコントラストを大きくするようなデータ変換処理を行っている。 As described above, the processing from S11 to S35 determines the level of the contrast of the luminance signal of the photographing object from the difference data. For example, when D_bit1 = 10 or D_bit0 = 10 is set and held, the contrast of the luminance signal from the object to be photographed is high, and data conversion processing suitable for that case is performed in FIG. . On the contrary, when D_bit1 = 6 or D_bit0 = 6 is set and held, the contrast of the luminance signal from the object to be photographed is low, and data conversion processing for increasing the contrast is performed in FIG. ing.
次に、上述した図10によるコントラストの判断を行った後の動作について説明する。図11は、12ビットの差分データを8ビットの差分データに変換するときの動作フロー図である。 Next, the operation after the above-described contrast determination according to FIG. 10 is performed will be described. FIG. 11 is an operation flowchart when converting 12-bit difference data into 8-bit difference data.
上述にしたとおり、D_bit1、D_bit0がレジスタ部に設定されており、まず、両者を比較し、どちらが大きいか判断する(S36)。D_bit1が大きいと判断すると、D_bit1=10であるかを判断する(S37)。ここで肯定判断された場合は、全ての12ビットで表された差分データの12ビット目、および5ビット目から11ビット目を抜き出し、8ビットのデータとして変換する(S38)。 As described above, D_bit1 and D_bit0 are set in the register unit. First, the two are compared to determine which is larger (S36). If it is determined that D_bit1 is large, it is determined whether D_bit1 = 10 (S37). If the determination is affirmative, the 12th bit and the 5th to 11th bits of the differential data represented by all 12 bits are extracted and converted as 8-bit data (S38).
S37で否定判断された場合、D_bit1=9であるかを判断する(S39)。ここで肯定判断された場合は、12ビットで表された全差分データの12ビット目、および4ビット目から10ビット目を抜き出し、8ビットのデータとして変換する(S40)。 If a negative determination is made in S37, it is determined whether D_bit1 = 9 (S39). If an affirmative determination is made here, the 12th bit and the 10th bit from the 4th bit of all the difference data represented by 12 bits are extracted and converted to 8 bit data (S40).
S39で否定判断された場合、D_bit1=8であるかを判断する(S41)。ここで肯定判断された場合は、12ビットで表された全差分データの12ビット目、および3ビット目から9ビット目を抜き出し、8ビットのデータとして変換する(S42)。 If a negative determination is made in S39, it is determined whether D_bit1 = 8 (S41). If an affirmative determination is made here, the 12th bit and the 9th to 9th bits of all the difference data represented by 12 bits are extracted and converted as 8-bit data (S42).
S41で否定判断された場合、D_bit1=7であるかを判断する(S43)。ここで肯定判断された場合は、12ビットで表された全差分データの12ビット目、2ビット目から8ビット目を抜き出し、8ビットのデータとして変換する(S44)。 If a negative determination is made in S41, it is determined whether D_bit1 = 7 (S43). If an affirmative determination is made here, the 12th bit, the 2nd bit to the 8th bit of all the difference data represented by 12 bits are extracted and converted as 8 bit data (S44).
S43で否定判断された場合、12ビットで表された全差分データの12ビット目、および1ビット目から7ビット目を抜き出し、8ビットのデータとして変換する(S54)。 If a negative determination is made in S43, the 12th bit and the 1st to 7th bits of all the difference data represented by 12 bits are extracted and converted as 8-bit data (S54).
S36に戻り、D_bit0が大きいと判断すると、D_bit0=10であるか判断する(S50)。肯定判断するとS38に示すとおり、全ての12ビットで表された差分データの12ビット目、および5ビット目から11ビット目を抜き出し、8ビットのデータとして変換する(S38)。 Returning to S36, if it is determined that D_bit0 is large, it is determined whether D_bit0 = 10 (S50). If an affirmative decision is made, as shown in S38, the 12th bit and the 5th to 11th bits of the differential data represented by all 12 bits are extracted and converted as 8-bit data (S38).
また、S50で否定判断された場合、さらにD_bit0=9であるか判断する(S51)。ここで肯定判断すると、S40に示すとおり、12ビットで表された全差分データの12ビット目、および4ビット目から10ビット目を抜き出し、8ビットのデータとして変換する(S40)。 If a negative determination is made in S50, it is further determined whether D_bit0 = 9 (S51). If an affirmative decision is made here, as shown in S40, the 12th bit and the 4th to 10th bits of the total difference data represented by 12 bits are extracted and converted as 8-bit data (S40).
また、S51で否定判断された場合、さらにD_bit0=8であるか判断する(S52)。ここで肯定判断すると、S42に示すとおり、12ビットで表された全差分データの12ビット目、および3ビット目から9ビット目を抜き出し、8ビットのデータとして変換する(S42)。 If a negative determination is made in S51, it is further determined whether D_bit0 = 8 (S52). If an affirmative decision is made here, as shown in S42, the 12th bit and the 3rd to 9th bits of the total difference data represented by 12 bits are extracted and converted into 8-bit data (S42).
また、S52で否定判断された場合、さらにD_bit0=7であるか判断する(S53)。ここで肯定判断すると、12ビットで表された全差分データの12ビット目、2ビット目から8ビット目を抜き出し、8ビットのデータとして変換する(S44)。 If a negative determination is made in S52, it is further determined whether D_bit0 = 7 (S53). If an affirmative decision is made here, the 12th bit, the 2nd bit to the 8th bit of the total difference data represented by 12 bits are extracted and converted as 8-bit data (S44).
S53で否定判断された場合、S54に示すとおり、12ビットで表された全差分データの12ビット目、および1ビット目から7ビット目を抜き出し、8ビットのデータとして変換する(S54)。 If a negative determination is made in S53, as shown in S54, the 12th bit and the 7th bit from the 1st bit of all the difference data represented by 12 bits are extracted and converted as 8-bit data (S54).
以上説明したとおり、撮影対象物の輝度信号から生成された差分データからコントラストを判断し、コントラストの程度に応じて12ビットからなる差分データのうち適切な8ビット分を抜き出し、8ビットのデータに変換することで、低コントラストの差分データについては高コントラストの差分データとすることができる。これにより、受光センサで受光したデータが低輝度である場合のデータ変換の再演算処理を行うことなく、距離を測定するに際して適切なデータを算出することができ、測距時間を短縮することができるとともに(図12(c)参照)、撮影時間を短縮することができ、さらに低コントラスト時の測距精度の向上を図ることができる。 As described above, the contrast is determined from the difference data generated from the luminance signal of the object to be photographed, and appropriate 8 bits are extracted from the 12-bit difference data according to the degree of contrast, and converted into 8-bit data. By converting, low contrast difference data can be converted to high contrast difference data. As a result, it is possible to calculate appropriate data when measuring the distance without performing recalculation processing of data conversion when the data received by the light receiving sensor has low luminance, and to shorten the distance measurement time. In addition, the shooting time can be shortened (see FIG. 12C), and the ranging accuracy at low contrast can be improved.
なお、本実施の形態においては、12ビットのデータから8ビットのデータに変換し、コントラストの程度に応じて5とおりのビット抽出を行っているが、これに限るものではなく、コントラストの程度に応じて6通り以上のビットの抽出方法を採用しても良く、またデータ変換の拡大率の度合いに応じて7ビットに、または9ビットに変換するような装置としても良い。 In this embodiment, 12-bit data is converted to 8-bit data, and five types of bit extraction are performed according to the degree of contrast. However, the present invention is not limited to this. Accordingly, six or more types of bit extraction methods may be employed, and a device that converts to 7 bits or 9 bits according to the degree of enlargement rate of data conversion may be used.
1…ラインセンサユニット、2…測距演算装置、1A−L…レンズ、1A−R…レンズ、1B−L…ラインセンサ、1B−L…ラインセンサ、1C…ラインセンサ制御回路、2A…ラインセンサ制御部、2B…A/D変換部、2C・・・センサデータ変換部、2D・・・センサデータ格納部、2E…相関演算部、2F…ウインドウシフト部、2G…極小判定部、2H…測距エラー判定部、2I…距離演算部、10…オートフォーカス用センサ窓、11…レンズ、12…シャッターボタン
DESCRIPTION OF
Claims (5)
前記一対の受光センサのそれぞれで受光した反射光の輝度データを一対のデジタルデータに変換するA/D変換手段と、
前記A/D変換手段で変換した一対のデジタルデータを用いて、前記複数の受光素子における一つおきに隣接する受光素子同士の輝度データの差分を算出することで、前記デジタルデータを所定ビットの相関演算用の一対の差分データに変換する差分データ変換手段と、
前記差分データ変換手段で変換した一対の差分データを、前記複数の受光素子で受光した反射光の輝度データの中でコントラストの高低差が拡大された一対の高コントラストデータに変換する高コントラストデータ変換手段と、
前記高コントラストデータ変換手段で変換した一対の高コントラストデータを用いて撮影対象物までの距離を算出する算出手段とを備え、
前記高コントラストデータ変換手段は、所定のNビットをもって表した差分データの中で最大値となる差分データを抽出し、抽出した差分データNビットの中から、最高位のビットを抜き出すとともに最高位以外の1が付されている最も高いビットを先頭に(M−1)ビット(M<N)を抽出することにより、コントラストの高低差が拡大された高コントラストデータに変換し、
前記算出手段は、前記高コントラストデータ変換手段により変換して得られた一対の高コントラストデータであって、相関演算対象となる測距エリア単位ごとに区分された高コントラストデータに対して、当該測距エリア単位ごとに、当該一対の高コントラストデータの測距エリアを一対のウインドウを用いて一対の高コントラストデータの一部の相関度を演算するとともに前記一対のウインドウを当該測距エリア内で所定量シフトするごとに当該相関度の演算処理を行い、前記演算処理の結果にしたがって得られた相関度の高い測距エリアおよび前記ウインドウのシフト量に基づいて、撮影対象物までの距離を算出することを特徴とする測距装置。 A pair of light-receiving sensors for distance measurement composed of a plurality of light-receiving elements that receive reflected light from the object to be photographed;
A / D conversion means for converting luminance data of reflected light received by each of the pair of light receiving sensors into a pair of digital data;
Using the pair of digital data converted by the A / D conversion means, the digital data is converted into a predetermined bit by calculating a difference in luminance data between adjacent light receiving elements in the plurality of light receiving elements. Differential data conversion means for converting into a pair of differential data for correlation calculation;
High-contrast data conversion for converting a pair of difference data converted by the difference data conversion means into a pair of high-contrast data in which the difference in height of contrast is expanded in the luminance data of reflected light received by the plurality of light receiving elements Means,
Calculating means for calculating the distance to the object to be photographed using a pair of high contrast data converted by the high contrast data converting means ;
The high-contrast data conversion means extracts differential data having a maximum value from differential data represented by predetermined N bits, extracts the highest-order bit from the extracted differential data N-bits and other than the highest-order data By extracting (M−1) bits (M <N) with the highest bit attached with 1 as the head, it is converted to high contrast data in which the difference in contrast is expanded,
The calculation means is a pair of high contrast data obtained by the conversion by the high contrast data conversion means, and is applied to the high contrast data divided for each distance measurement area unit to be subjected to correlation calculation. For each distance area unit, the pair of high contrast data ranging areas is calculated using a pair of windows, and the degree of correlation of a part of the pair of high contrast data is calculated, and the pair of windows are located within the distance measuring area. The correlation is calculated every time the quantitative shift is performed, and the distance to the object to be imaged is calculated based on the distance measurement area having a high correlation obtained according to the result of the calculation and the shift amount of the window. A distance measuring device characterized by that .
前記一対の受光センサのそれぞれで受光した反射光の輝度データを一対のデジタルデータに変換するA/D変換手段と、
前記A/D変換手段で変換した一対のデジタルデータを用いて、前記複数の受光素子における一つおきに隣接する受光素子同士の輝度データの差分を算出することで、前記デジタルデータを所定ビットの相関演算用の一対の差分データに変換する差分データ変換手段と、
前記差分データ変換手段で変換した一対の差分データを、前記複数の受光素子で受光した反射光の輝度データの中でコントラストの高低差が拡大された一対の高コントラストデータに変換する高コントラストデータ変換手段と、
前記高コントラストデータ変換手段で変換した一対の高コントラストデータを用いて撮影対象物までの距離を算出する算出手段とを備え、
前記高コントラストデータ変換手段は、所定のNビットをもって表した差分データの中で、Nビットで表される最大値と最小値との中心である中心値より小さく当該中心値に最も近い差分データを抽出し、抽出した差分データNビットの中から、最高位のビットを抜き出すとともに最高位以外の0が付されているビットを先頭に(M−1)ビット(M<N)を抽出することにより、コントラストの高低差が拡大された高コントラストデータに変換し、
前記算出手段は、前記高コントラストデータ変換手段により変換して得られた一対の高コントラストデータであって、相関演算対象となる測距エリア単位ごとに区分された高コントラストデータに対して、当該測距エリア単位ごとに、当該一対の高コントラストデータの測距エリアを一対のウインドウを用いて一対の高コントラストデータの一部の相関度を演算するとともに前記一対のウインドウを当該測距エリア内で所定量シフトするごとに当該相関度の演算処理を行い、前記演算処理の結果にしたがって得られた相関度の高い測距エリアおよび前記ウインドウのシフト量に基づいて、撮影対象物までの距離を算出することを特徴とする測距装置。 A pair of light-receiving sensors for distance measurement composed of a plurality of light-receiving elements that receive reflected light from the object to be photographed;
A / D conversion means for converting luminance data of reflected light received by each of the pair of light receiving sensors into a pair of digital data;
Using the pair of digital data converted by the A / D conversion means, the digital data is converted into a predetermined bit by calculating a difference in luminance data between adjacent light receiving elements in the plurality of light receiving elements. Differential data conversion means for converting into a pair of differential data for correlation calculation;
High-contrast data conversion for converting a pair of difference data converted by the difference data conversion means into a pair of high-contrast data in which the difference in height of contrast is expanded in the luminance data of reflected light received by the plurality of light receiving elements Means,
Calculating means for calculating the distance to the object to be photographed using a pair of high contrast data converted by the high contrast data converting means;
The high-contrast data conversion means calculates difference data closest to the center value smaller than the center value that is the center between the maximum value and the minimum value expressed by N bits among the difference data expressed by predetermined N bits. Extracting and extracting the highest order bit from the extracted differential data N bits and extracting (M−1) bits (M <N) starting from the bit with 0 other than the highest order. , Converted to high-contrast data with an enlarged contrast difference ,
The calculation means is a pair of high contrast data obtained by the conversion by the high contrast data conversion means, and is applied to the high contrast data divided for each distance measurement area unit to be subjected to correlation calculation. For each distance area unit, the pair of high contrast data ranging areas is calculated using a pair of windows, and the degree of correlation of a part of the pair of high contrast data is calculated, and the pair of windows are located within the distance measuring area. Each time a quantitative shift is performed, the correlation degree is calculated, and the distance to the object to be photographed is calculated based on the distance measurement area having a high degree of correlation obtained according to the result of the calculation process and the shift amount of the window. A distance measuring device characterized by that .
入力した輝度データを一対のデジタルデータに変換する第1の変換ステップと、
変換した一対のデジタルデータを用いて、前記複数の受光素子における一つおきに隣接する受光素子同士の輝度データの差分を算出することで、前記デジタルデータを所定ビットの相関演算用の一対の差分データに変換する第2の変換ステップと、
変換した一対の差分データを、複数の受光素子で受光した反射光の輝度データの中でコントラストの高低差が拡大された一対の高コントラストデータに変換する第3の変換ステップと、
変換した一対の高コントラストデータを用いて対象物までの距離を算出する算出ステップとを備え、
前記第3の変換ステップは、所定のNビットをもって表した差分データの中で最大値となる差分データを抽出し、抽出した差分データNビットの中から、最高位のビットを抜き出すとともに最高位以外の1が付されている最も高いビットを先頭に(M−1)ビット(M<N)を抽出することにより、コントラストの高低差が拡大された高コントラストデータに変換し、
前記算出ステップは、前記第3の変換ステップにより変換して得られた一対の高コントラストデータであって、相関演算対象となる測距エリア単位ごとに区分された高コントラストデータに対して、当該測距エリア単位ごとに、当該一対の高コントラストデータの測距エリアを一対のウインドウを用いて一対の高コントラストデータの一部の相関度を演算するとともに前記一対のウインドウを当該測距エリア内で所定量シフトするごとに当該相関度の演算処理を行い、前記演算処理の結果にしたがって得られた相関度の高い測距エリアおよび前記ウインドウのシフト量に基づいて、撮影対象物までの距離を算出することを特徴とする測距方法。 An input step for inputting brightness data of reflected light from the object to be photographed through a pair of light receiving sensors for distance measurement composed of a plurality of light receiving elements;
A first conversion step for converting the input luminance data into a pair of digital data;
Using the pair of converted digital data , a difference between luminance data of every other adjacent light receiving elements in the plurality of light receiving elements is calculated, whereby the digital data is paired with a difference for correlation calculation of a predetermined bit. A second conversion step for converting to data;
A third conversion step for converting the pair of converted difference data into a pair of high contrast data in which the difference in height of the contrast is enlarged in the luminance data of the reflected light received by the plurality of light receiving elements;
A calculation step of calculating a distance to the object using the pair of converted high contrast data ,
The third conversion step extracts differential data having the maximum value from the differential data represented by predetermined N bits, extracts the highest-order bit from the extracted differential data N-bit, and other than the highest By extracting (M−1) bits (M <N) with the highest bit attached with 1 as the head, it is converted to high contrast data in which the difference in contrast is expanded,
In the calculation step, a pair of high contrast data obtained by the conversion in the third conversion step, and the high contrast data divided for each distance measurement area unit to be subjected to correlation calculation, the measurement is performed. For each distance area unit, the pair of high contrast data ranging areas is calculated using a pair of windows, and the degree of correlation of a part of the pair of high contrast data is calculated, and the pair of windows are located within the distance measuring area. Each time a quantitative shift is performed, the correlation degree is calculated, and the distance to the object to be photographed is calculated based on the distance measurement area having a high degree of correlation obtained according to the result of the calculation process and the shift amount of the window. A distance measuring method characterized by that .
入力した輝度データを一対のデジタルデータに変換する第1の変換ステップと、 A first conversion step for converting the input luminance data into a pair of digital data;
変換した一対のデジタルデータを用いて、前記複数の受光素子における一つおきに隣接する受光素子同士の輝度データの差分を算出することで、前記デジタルデータを所定ビットの相関演算用の一対の差分データに変換する第2の変換ステップと、 Using the pair of converted digital data, a difference between luminance data of every other adjacent light receiving elements in the plurality of light receiving elements is calculated, whereby the digital data is paired with a difference for correlation calculation of a predetermined bit. A second conversion step for converting to data;
変換した一対の差分データを、複数の受光素子で受光した反射光の輝度データの中でコントラストの高低差が拡大された一対の高コントラストデータに変換する第3の変換ステップと、 A third conversion step for converting the pair of converted difference data into a pair of high contrast data in which the difference in height of the contrast is enlarged in the luminance data of the reflected light received by the plurality of light receiving elements;
変換した一対の高コントラストデータを用いて対象物までの距離を算出する算出ステップとを備え、 A calculation step of calculating a distance to the object using the pair of converted high contrast data,
前記高コントラストデータ変換ステップは、所定のNビットをもって表した差分データの中で、Nビットで表される最大値と最小値との中心である中心値より小さく当該中心値に最も近い差分データを抽出し、抽出した差分データNビットの中から、最高位のビットを抜き出すとともに最高位以外の0が付されているビットを先頭に(M−1)ビット(M<N)を抽出することにより、コントラストの高低差が拡大された高コントラストデータに変換し、In the high contrast data conversion step, difference data that is smaller than the center value that is the center between the maximum value and the minimum value that are represented by N bits and that is closest to the center value among the difference data that is represented by predetermined N bits. Extracting and extracting the highest order bit from the extracted differential data N bits and extracting (M−1) bits (M <N) starting from the bit with 0 other than the highest order. , Converted to high-contrast data with an enlarged contrast difference,
前記算出ステップは、前記第3の変換ステップにより変換して得られた一対の高コントラストデータであって、相関演算対象となる測距エリア単位ごとに区分された高コントラストデータに対して、当該測距エリア単位ごとに、当該一対の高コントラストデータの測距エリアを一対のウインドウを用いて一対の高コントラストデータの一部の相関度を演算するとともに前記一対のウインドウを当該測距エリア内で所定量シフトするごとに当該相関度の演算処理を行い、前記演算処理の結果にしたがって得られた相関度の高い測距エリアおよび前記ウインドウのシフト量に基づいて、撮影対象物までの距離を算出することを特徴とする測距方法。 In the calculation step, a pair of high contrast data obtained by the conversion in the third conversion step, and the high contrast data divided for each distance measurement area unit to be subjected to correlation calculation, the measurement is performed. For each distance area unit, the pair of high contrast data ranging areas is calculated using a pair of windows, and the degree of correlation of a part of the pair of high contrast data is calculated, and the pair of windows are located within the distance measuring area. Each time a quantitative shift is performed, the correlation degree is calculated, and the distance to the object to be photographed is calculated based on the distance measurement area having a high degree of correlation obtained according to the result of the calculation process and the shift amount of the window. A distance measuring method characterized by that.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004062969A JP4335036B2 (en) | 2004-03-05 | 2004-03-05 | Ranging device and ranging method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004062969A JP4335036B2 (en) | 2004-03-05 | 2004-03-05 | Ranging device and ranging method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005249688A JP2005249688A (en) | 2005-09-15 |
| JP4335036B2 true JP4335036B2 (en) | 2009-09-30 |
Family
ID=35030284
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004062969A Expired - Fee Related JP4335036B2 (en) | 2004-03-05 | 2004-03-05 | Ranging device and ranging method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4335036B2 (en) |
-
2004
- 2004-03-05 JP JP2004062969A patent/JP4335036B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2005249688A (en) | 2005-09-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7474352B2 (en) | Focus detection based on an opening pupil ratio | |
| CN101459762B (en) | Image capturing apparatus, control method therefor | |
| US8103158B2 (en) | Image sensing apparatus and control method thereof | |
| CN106254754A (en) | Filming apparatus, image processing apparatus, the control method of filming apparatus | |
| JP4617870B2 (en) | Imaging apparatus and method, and program | |
| JP4985403B2 (en) | Image processing system and image processing program | |
| EP0553850A1 (en) | Automatic focussing apparatus for automatically matching focus in response to video signal | |
| US7710492B2 (en) | Imaging device and imaging method for performing automatic focus detection | |
| JP4335036B2 (en) | Ranging device and ranging method | |
| JP4700993B2 (en) | Imaging device | |
| JP2009069740A (en) | Imaging device | |
| JP2008294945A (en) | IMAGING DEVICE, IMAGING DEVICE AUTOMATIC CONTROL METHOD, AND IMAGING DEVICE AUTOMATIC CONTROL PROGRAM | |
| JP4632640B2 (en) | Ranging device | |
| US8588530B2 (en) | Method and camera for detecting a region having a specific shape | |
| JP4127808B2 (en) | Ranging device | |
| JP4863441B2 (en) | Imaging apparatus and control method thereof | |
| JP4036503B2 (en) | Ranging device | |
| EP2091233B1 (en) | Imaging apparatus | |
| JP3984138B2 (en) | Ranging device and camera equipped with the same | |
| JP5365633B2 (en) | Imaging device | |
| JP4612512B2 (en) | Automatic focusing device, camera, portable information input device, focusing position detection method, and computer-readable recording medium | |
| JP2002250857A (en) | Range finder | |
| JP3798866B2 (en) | Ranging device | |
| JP2005250296A (en) | Ranging device and ranging method | |
| JP2005250295A (en) | Ranging device and ranging method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20061005 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090219 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090224 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090422 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20090623 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090624 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120703 Year of fee payment: 3 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120703 Year of fee payment: 3 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313113 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120703 Year of fee payment: 3 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| LAPS | Cancellation because of no payment of annual fees |