JP4955508B2 - Ranging device, ranging method and program - Google Patents

Ranging device, ranging method and program Download PDF

Info

Publication number
JP4955508B2
JP4955508B2 JP2007277142A JP2007277142A JP4955508B2 JP 4955508 B2 JP4955508 B2 JP 4955508B2 JP 2007277142 A JP2007277142 A JP 2007277142A JP 2007277142 A JP2007277142 A JP 2007277142A JP 4955508 B2 JP4955508 B2 JP 4955508B2
Authority
JP
Japan
Prior art keywords
light
distance measuring
phase difference
distance
ranging
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.)
Active
Application number
JP2007277142A
Other languages
Japanese (ja)
Other versions
JP2009103627A (en
Inventor
洋一 沢地
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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2007277142A priority Critical patent/JP4955508B2/en
Publication of JP2009103627A publication Critical patent/JP2009103627A/en
Application granted granted Critical
Publication of JP4955508B2 publication Critical patent/JP4955508B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Automatic Focus Adjustment (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Description

本発明は、被写体の立体形状を表す距離画像を生成するための測距装置および方法並びに測距方法をコンピュータに実行させるためのプログラムに関するものである。   The present invention relates to a distance measuring device and method for generating a distance image representing a three-dimensional shape of a subject, and a program for causing a computer to execute the distance measuring method.

光の反射を用いて被写体までの距離の測定(測距)を行うTOF(Time Of Flight)方式の測距方法を用いて、撮影装置から被写体までの距離を測定して、被写体の立体形状を表す距離画像を生成することが行われている(特許文献1参照)。TOF方式を用いた測距は、具体的には強度変調された測距光を被写体に向けて照射し、この変調周期における0、π/2、π、3π/2の4つの位相において反射光を受光して受光光量に応じた受光信号を得、受光信号に基づいて測距光と反射光との位相の遅れ(位相差)を、撮影装置に設けられた撮像素子の受光素子毎に検出して距離情報を算出し、この距離情報を各画素の画素値とする被写体の立体形状を表す距離画像を生成するものである。   Using the TOF (Time Of Flight) distance measurement method, which measures the distance to the subject using light reflection, the distance from the imaging device to the subject is measured, and the three-dimensional shape of the subject is determined. A distance image to be expressed is generated (see Patent Document 1). Specifically, distance measurement using the TOF method irradiates a subject with intensity-modulated distance-measuring light and reflects light at four phases of 0, π / 2, π, and 3π / 2 in this modulation period. The light receiving signal corresponding to the amount of received light is obtained, and the phase delay (phase difference) between the distance measuring light and the reflected light is detected for each light receiving element of the image sensor provided in the photographing apparatus based on the light receiving signal. Thus, distance information is calculated, and a distance image representing the three-dimensional shape of the subject is generated using the distance information as the pixel value of each pixel.

また、TOF方式により測距を行う際に、強度が時間的に変化する正弦波、三角波あるいは鋸波状に強度変調された第1の測距光と、強度が一定のパルス状に強度変調された第2の測距光を使用して測距精度を向上させる手法も提案されている(特許文献2参照)。特許文献2に記載された手法は、第1の測距光により得られる第1の受光信号を第2の測距光により得られる第2の受光信号により除算することにより、距離情報を算出するものである。
特開2006−84429号公報 特開2001−313958号公報
Further, when the distance is measured by the TOF method, the first distance measuring light intensity-modulated in a sine wave, a triangular wave or a sawtooth wave whose intensity changes with time, and the intensity is modulated in a pulse shape with a constant intensity. A technique for improving the distance measurement accuracy using the second distance measuring light has also been proposed (see Patent Document 2). The method described in Patent Document 2 calculates distance information by dividing a first received light signal obtained by first ranging light by a second received light signal obtained by second ranging light. Is.
JP 2006-84429 A JP 2001-313958 A

ところで、強度が時間的に変化するように強度変調された測距光を使用する場合、その変調周期の長さを最大値とする位相差を算出することができるため、比較的長いレンジにより測距を行うことができるが、測距光の変調の位相によっては、反射光の強度が小さくなる。このため、外光の影響により得られる受光信号のS/Nが低下してしまうことから、測距の精度はそれほど高いものではない。一方、パルス状に強度変調された測距光を使用する場合、反射光の強度は一定となるためS/Nの低下が少なく、精度良く測距を行うことができる。しかしながら、パルス光を使用する場合、パルス光が発光している期間を最大値とする位相差しか算出することができないため、測距を行うことができるレンジが狭く、ある限られた範囲のみしか測距を行うことができない。   By the way, when using distance measuring light that has been intensity-modulated so that its intensity changes with time, it is possible to calculate a phase difference whose maximum value is the length of the modulation period. Although the distance can be obtained, the intensity of the reflected light decreases depending on the phase of modulation of the distance measuring light. For this reason, since the S / N of the received light signal obtained by the influence of external light is lowered, the accuracy of distance measurement is not so high. On the other hand, when distance measuring light whose intensity is modulated in a pulse form is used, the intensity of the reflected light is constant, so that the S / N is hardly lowered and the distance can be measured with high accuracy. However, when using pulsed light, it is only possible to calculate the phase difference that maximizes the period during which pulsed light is emitted, so the range over which distance measurement can be performed is narrow, and only a limited range is available. Cannot measure distance.

ここで、上記特許文献2に記載された手法においては、第1の測距光により得られる受光信号を第2の測距光により得られる受光信号により除算して距離情報を算出しているため、強度が時間的に変化するように強度変調された第1の測距光による第1の受光信号により測距が行われることとなる。このため、特許文献2に記載された手法では測距の精度はそれほど高いものではない。   Here, in the method described in Patent Document 2, the distance information is calculated by dividing the light reception signal obtained by the first distance measurement light by the light reception signal obtained by the second distance measurement light. The distance measurement is performed by the first light receiving signal by the first distance measuring light whose intensity is modulated so that the intensity changes with time. For this reason, with the method described in Patent Document 2, the accuracy of distance measurement is not so high.

本発明は上記事情に鑑みなされたものであり、精度良くかつ高速に測距を行うことができるようにすることを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to enable accurate and high-speed distance measurement.

本発明による測距装置は、所定周期にて強度が時間的に変化するように変調された第1の測距光、および前記所定周期にて強度が一定のパルス波状に変調された第2の測距光を切換可能に発光する測距光発光手段と、
受光光量に応じた受光信号を出力する複数の受光素子を有する撮像手段と、
前記撮像手段の受光期間を制御する受光制御手段と、
前記受光信号に基づいて、被写体までの距離を表す距離情報を前記受光素子毎に算出する距離情報算出手段と、
前記第1の測距光を発光し、該第1の測距光の変調周期における位相が異なる複数の受光期間において複数の第1の受光信号を取得し、前記複数の第1の受光信号に基づいて、前記第1の測距光と該第1の測距光の反射光との位相差を前記受光素子毎に算出し、該位相差に基づいて前記第2の測距光の発光開始位相を前記第1の測距光の発光開始位相とは異なるように変更して該第2の測距光を発光し、該第2の測距光の変調周期における前記位相差に応じた複数の受光期間において複数の第2の受光信号を取得し、前記複数の第1の受光信号に基づいて、前記距離情報の算出に使用する第2の受光信号を選択するよう、前記測距光発光手段、前記撮像手段、前記受光制御手段および前記距離情報算出手段を制御する制御手段とを備えたことを特徴とするものである。
The distance measuring device according to the present invention includes a first distance measuring light modulated such that the intensity changes with time in a predetermined period, and a second distance light modulated in a pulse wave having a constant intensity in the predetermined period. Ranging light emitting means for switching the ranging light so that it can be switched;
An imaging means having a plurality of light receiving elements for outputting a light reception signal corresponding to the amount of received light;
A light receiving control means for controlling a light receiving period of the imaging means;
Distance information calculating means for calculating distance information representing a distance to a subject for each light receiving element based on the light receiving signal;
The first ranging light is emitted, a plurality of first received light signals are acquired in a plurality of light receiving periods having different phases in a modulation period of the first ranging light, and the first received light signals are Based on this, a phase difference between the first distance measuring light and the reflected light of the first distance measuring light is calculated for each light receiving element, and emission of the second distance measuring light is started based on the phase difference. A phase is changed so as to be different from the light emission start phase of the first distance measuring light, the second distance measuring light is emitted, and a plurality of signals corresponding to the phase difference in the modulation period of the second distance measuring light are emitted. A plurality of second light reception signals are acquired during the light reception period, and the distance measurement light emission is performed so as to select a second light reception signal used for calculating the distance information based on the plurality of first light reception signals. And a control means for controlling the imaging means, the light reception control means, and the distance information calculation means. It is an feature.

「強度が時間的に変化するように強度変調」するとは、時間の経過とともに強度が連続して変化するように第1の測距光を変調することを意味する。具体的には、正弦波状、三角波状、鋸波状に強度を変調することにより、強度が時間的に変化するように強度変調することができる。   “Intensity modulation so that the intensity changes with time” means that the first distance-measuring light is modulated so that the intensity continuously changes with the passage of time. Specifically, the intensity can be modulated such that the intensity changes with time by modulating the intensity in a sine wave shape, a triangular wave shape, or a sawtooth wave shape.

ここで、強度が時間的に変化するように変調された第1の測距光を使用する場合、比較的長いレンジにより測距を行うことができるが、変調の位相によっては反射光の強度が小さくなる。このため、外光の影響により得られる受光信号のS/Nが低下してしまうことから、測距の精度はそれほど高いものではない。一方、強度が一定のパルス状に強度変調された第2の測距光を使用する場合、反射光の強度は一定となるためS/Nの低下が少なく、精度良く測距を行うことができる。しかしながら、測距を行うことができるレンジがパルス幅により制限されてしまうため、ある限られた範囲のみしか測距を行うことができない。   Here, when the first distance measuring light modulated so that the intensity varies with time can be measured by a relatively long range, the intensity of the reflected light depends on the phase of the modulation. Get smaller. For this reason, since the S / N of the received light signal obtained by the influence of external light is lowered, the accuracy of distance measurement is not so high. On the other hand, when using the second ranging light whose intensity is modulated in a pulse shape with a constant intensity, the intensity of the reflected light is constant, so that the S / N is hardly lowered and the ranging can be performed with high accuracy. . However, since the range in which distance measurement can be performed is limited by the pulse width, distance measurement can be performed only in a limited range.

本発明によれば、第1の測距光の反射光から得られる複数の第1の受光信号に基づいて、第2の測距光の反射光から得られる複数の第2の受光信号のうち、距離情報の算出に使用する受光信号を選択するようにしたものである。ここで、複数の第1の受光信号により第1の測距光と第1の測距光の反射光との位相差を算出でき、この位相差により被写体までの大まかな距離情報を算出できるものである。このため、第1の受光信号に基づいて選択した第2の受光信号により、第1の受光信号を用いて算出できる距離情報と同一の距離レンジにおいて、より正確に位相差を算出できるため、より正確な距離を表す距離情報を算出することができることとなる。   According to the present invention, based on the plurality of first light receiving signals obtained from the reflected light of the first distance measuring light, among the plurality of second light receiving signals obtained from the reflected light of the second distance measuring light. The received light signal used for calculating the distance information is selected. Here, the phase difference between the first ranging light and the reflected light of the first ranging light can be calculated from a plurality of first received light signals, and rough distance information to the subject can be calculated from the phase difference. It is. For this reason, the phase difference can be calculated more accurately in the same distance range as the distance information that can be calculated using the first received light signal by the second received light signal selected based on the first received light signal. Distance information representing an accurate distance can be calculated.

また、第1の測距光と反射光との位相差に基づいて、第2の測距光の位相を第1の測距光の位相とは異なるように変更して第2の測距光を発光し、位相差に応じた複数の受光期間において第2の受光信号を取得しているため、第1の受光信号を取得した受光期間のすべてにおいて第2の受光信号を取得する必要がなくなる。このため、距離情報の算出を迅速に行うことができる。したがって、本発明によれば、被写体までの距離に拘わらず正確かつ高速に測距を行うことができる。   Further, based on the phase difference between the first ranging light and the reflected light, the phase of the second ranging light is changed so as to be different from the phase of the first ranging light. And the second light receiving signal is acquired in a plurality of light receiving periods corresponding to the phase difference, so that it is not necessary to acquire the second light receiving signal in all the light receiving periods in which the first light receiving signal is acquired. . For this reason, distance information can be calculated quickly. Therefore, according to the present invention, accurate and high-speed distance measurement can be performed regardless of the distance to the subject.

なお、本発明による測距装置においては、前記測距光発光手段を、前記複数の受光素子について算出した複数の位相差のうち、最小位相差分前記第2の測距光の発光開始位相を前記第1の測距光の発光開始位相から早めて、前記第2の測距光を発光する手段とし、
前記受光制御手段を、前記複数の位相差のうち、最大位相差と前記最小位相差との差分が大きいほど、より多くの受光期間において前記第2の受光信号を取得する手段としてもよい。
In the distance measuring device according to the present invention, the distance measuring light emitting means may determine the minimum phase difference among the plurality of phase differences calculated for the plurality of light receiving elements as the light emission start phase of the second distance measuring light. Means for emitting the second distance measuring light earlier than the light emission start phase of the first distance measuring light;
The light reception control unit may be a unit that acquires the second light reception signal in a larger number of light reception periods as the difference between the maximum phase difference and the minimum phase difference among the plurality of phase differences is larger.

これにより、位相差が最小となる第2の測距光の反射光の位相を第1の測距光の変調の位相と一致させることができるため、差分位相差に応じた第2の受光信号を取得する受光期間の設定を容易に行うことができる。   As a result, the phase of the reflected light of the second distance measuring light that minimizes the phase difference can be matched with the phase of the modulation of the first distance measuring light, so that the second received light signal corresponding to the difference phase difference Can be easily set.

また、本発明による測距装置においては、前記距離情報算出手段を、前記位相差と前記最小位相差との差分位相差に基づいて、前記複数の第2の受光信号のうち、前記距離情報の算出に使用する第2の受光信号を選択する手段としてもよい。   In the distance measuring apparatus according to the present invention, the distance information calculating unit may be configured to calculate the distance information of the plurality of second received light signals based on a difference phase difference between the phase difference and the minimum phase difference. It may be a means for selecting the second received light signal used for the calculation.

これにより、差分位相差に応じて、より容易に第2の受光信号を取得する期間を設定することができる。   Accordingly, it is possible to set a period for acquiring the second received light signal more easily according to the differential phase difference.

また、本発明による測距装置においては、前記測距光発光手段を、前記第2の測距光を、前記第1の測距光の変調周期と同一周期にて、該第1の測距光の変調周期よりも短い期間発光する手段としてもよい。   In the distance measuring device according to the present invention, the distance measuring light emitting means may be configured such that the second distance measuring light is transmitted at the same period as the modulation period of the first distance measuring light. It may be a means for emitting light for a period shorter than the light modulation period.

これにより、第1および第2の測距光の発光の制御を容易に行うことができる。   Thereby, it is possible to easily control the emission of the first and second ranging light.

また、本発明による測距装置においては、前記測距光発光手段を、前記第2の測距光を前記第1の測距光の変調周期の1/4の期間発光する手段とし、
前記受光制御手段を、前記撮像手段の受光期間を、前記第1の測距光の変調周期の1/4期間または1/2期間となるように制御する手段としてもよい。
Further, in the distance measuring apparatus according to the present invention, the distance measuring light emitting means emits the second distance measuring light for a period of 1/4 of the modulation period of the first distance measuring light,
The light receiving control means may be means for controlling the light receiving period of the imaging means so as to be ¼ period or ½ period of the modulation period of the first distance measuring light.

これにより、第1および第2の測距光の発光の制御、並びに第1および第2の測距光の反射光の受光の制御をより容易に行うことができる。   As a result, it is possible to more easily control the emission of the first and second ranging light and the reception of the reflected light of the first and second ranging light.

また、本発明による測距装置においては、前記距離情報算出手段を、前記選択した前記第2の受光信号が複数の受光期間に跨る場合、信号レベルが大きい受光期間側の第2の受光信号を前記距離情報の算出に使用する手段としてもよい。   In the distance measuring device according to the present invention, the distance information calculating unit may be configured to detect the second light receiving signal on the light receiving period side having a high signal level when the selected second light receiving signal extends over a plurality of light receiving periods. It may be a means used for calculating the distance information.

ここで、信号レベルが大きいということは外光によるノイズの影響が小さいことを意味する。したがって、信号レベルが大きい側の第2の受光信号を距離情報の算出に使用することにより、より正確に距離情報を算出することができる。   Here, a large signal level means that the influence of noise due to external light is small. Therefore, the distance information can be calculated more accurately by using the second received light signal having the higher signal level for calculating the distance information.

また、本発明による測距装置においては、前記距離情報算出手段を、前記複数の第1の受光信号に基づいて外光成分を表す外光信号を算出し、該外光信号により、前記選択した第2の受光信号を補正する手段としてもよい。   In the distance measuring apparatus according to the present invention, the distance information calculating unit calculates an external light signal representing an external light component based on the plurality of first light reception signals, and the selection is performed based on the external light signal. Means for correcting the second light reception signal may be used.

これにより、より正確に距離情報を算出することができる。   Thereby, distance information can be calculated more accurately.

本発明による測距方法は、所定周期にて強度が時間的に変化するように変調された第1の測距光、および前記所定周期にて強度が一定のパルス波状に変調された第2の測距光を切換可能に発光する測距光発光手段と、
受光光量に応じた受光信号を出力する複数の受光素子を有する撮像手段と、
前記撮像手段の受光期間を制御する受光制御手段と、
前記受光信号に基づいて、被写体までの距離を表す距離情報を前記受光素子毎に算出する距離情報算出手段とを備えた測距装置における測距方法であって、
前記第1の測距光を発光し、
該第1の測距光の変調周期における位相が異なる複数の受光期間において複数の第1の受光信号を取得し、
前記複数の第1の受光信号に基づいて、前記第1の測距光と該第1の測距光の反射光との位相差を前記受光素子毎に算出し、
該位相差に基づいて前記第2の測距光の発光開始位相を前記第1の測距光の発光開始位相とは異なるように変更して該第2の測距光を発光し、
該第2の測距光の変調周期における前記位相差に応じた複数の受光期間において複数の第2の受光信号を取得し、
前記複数の第1の受光信号に基づいて、前記距離情報の算出に使用する第2の受光信号を選択することを特徴とするものである。
The distance measuring method according to the present invention includes a first distance measuring light modulated such that the intensity changes with time in a predetermined period, and a second distance light modulated in a pulse wave having a constant intensity in the predetermined period. Ranging light emitting means for switching the ranging light so that it can be switched;
An imaging means having a plurality of light receiving elements for outputting a light reception signal corresponding to the amount of received light;
A light receiving control means for controlling a light receiving period of the imaging means;
A distance measuring method in a distance measuring device comprising distance information calculating means for calculating distance information representing a distance to a subject for each of the light receiving elements based on the light receiving signal,
Emitting the first ranging light;
Obtaining a plurality of first received light signals in a plurality of light receiving periods having different phases in the modulation period of the first ranging light;
Based on the plurality of first light receiving signals, a phase difference between the first distance measuring light and the reflected light of the first distance measuring light is calculated for each light receiving element,
Based on the phase difference, the emission start phase of the second ranging light is changed to be different from the emission start phase of the first ranging light, and the second ranging light is emitted.
Obtaining a plurality of second light receiving signals in a plurality of light receiving periods according to the phase difference in the modulation period of the second ranging light;
Based on the plurality of first light reception signals, a second light reception signal used for calculating the distance information is selected.

なお、本発明による測距方法をコンピュータに実行させるためのプログラムとして提供してもよい。   The distance measuring method according to the present invention may be provided as a program for causing a computer to execute the distance measuring method.

以下、図面を参照して本発明の実施形態について説明する。図1は本発明の第1の実施形態による測距装置の構成を示す概略ブロック図である。図1に示すように第1の実施形態による測距装置1は撮像部2を備える。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a schematic block diagram showing the configuration of the distance measuring apparatus according to the first embodiment of the present invention. As shown in FIG. 1, the distance measuring device 1 according to the first embodiment includes an imaging unit 2.

撮像部2は、レンズ10、絞り11、シャッタ12、CCD13、アナログフロントエンド(AFE)14およびA/D変換部15を備える。   The imaging unit 2 includes a lens 10, a diaphragm 11, a shutter 12, a CCD 13, an analog front end (AFE) 14, and an A / D conversion unit 15.

レンズ10は、被写体にピントを合わせるためのフォーカスレンズ、ズーム機能を実現するためのズームレンズ等の複数の機能別レンズにより構成され、不図示のレンズ駆動部によりその位置が調整される。   The lens 10 is composed of a plurality of functional lenses such as a focus lens for focusing on a subject and a zoom lens for realizing a zoom function, and its position is adjusted by a lens driving unit (not shown).

絞り11は、不図示の絞り駆動部により、予め定められた絞り値データに基づいて絞り径の調整が行われる。   The aperture 11 is adjusted in aperture diameter based on predetermined aperture value data by an aperture drive unit (not shown).

シャッタ12はメカニカルシャッタであり、予め定められたシャッタスピードに応じて駆動される。   The shutter 12 is a mechanical shutter and is driven according to a predetermined shutter speed.

CCD13は、多数の受光素子を2次元的に配列した光電面を有する撮像素子であり、被写体光がこの光電面に結像して光電変換されてアナログ撮像信号である受光信号が取得される。なお、CCD13は、後述する撮像制御部19から与えられる電子シャッタ駆動信号によって受光期間が制御される。また、CCD13の前面には、後述する測距光の波長域の光を透過するフィルタ13Aが配設されているため、CCD13の受光素子は測距光の反射光のみを受光することができる。ここで、本実施形態においては、測距光として赤外光を用いるものとする。   The CCD 13 is an image pickup device having a photoelectric surface in which a large number of light receiving devices are two-dimensionally arranged, and subject light is imaged on the photoelectric surface and subjected to photoelectric conversion to obtain a light reception signal that is an analog image pickup signal. The light receiving period of the CCD 13 is controlled by an electronic shutter drive signal given from an imaging control unit 19 described later. Further, since a filter 13A that transmits light in the wavelength range of distance measuring light, which will be described later, is disposed on the front surface of the CCD 13, the light receiving element of the CCD 13 can receive only reflected light of the distance measuring light. Here, in this embodiment, infrared light is used as distance measuring light.

AFE14は、CCD13から出力される受光信号に対して、受光信号のノイズを除去する処理、および受光信号のゲインを調節する処理(以下アナログ処理とする)を施す。   The AFE 14 performs a process for removing noise of the received light signal and a process for adjusting the gain of the received light signal (hereinafter referred to as an analog process) on the received light signal output from the CCD 13.

A/D変換部15は、AFE14によりアナログ処理が施された受光信号をデジタル信号に変換する。   The A / D converter 15 converts the received light signal that has been subjected to the analog processing by the AFE 14 into a digital signal.

また、撮像部2は、被写体に向けて赤外光からなる測距光を照射するための測距光源16を備える。   The imaging unit 2 also includes a distance measuring light source 16 for irradiating distance measuring light composed of infrared light toward the subject.

図2は測距光源の構成を示す概略ブロック図である。図2に示すように測距光源16は、赤外光からなる測距光を発光するLEDが2次元状に複数配設された面光源16A、面光源16Aから発せられる測距光を強度変調する変調部16B、測距光を変調するための波形データを記憶するメモリ16C、およびメモリ16Cから波形データを読み出し、波形データをD/A変換して変調部16Bに入力するメモリ制御部16Dを備える。   FIG. 2 is a schematic block diagram showing the configuration of the ranging light source. As shown in FIG. 2, the distance measuring light source 16 includes a surface light source 16A in which a plurality of LEDs for emitting distance measuring light composed of infrared light are two-dimensionally arranged, and the distance measuring light emitted from the surface light source 16A is intensity-modulated. And a memory control unit 16D for reading the waveform data from the memory 16C, D / A converting the waveform data, and inputting the waveform data to the modulation unit 16B. Prepare.

メモリ制御部16Dは、後述する撮像制御部19からの指示により、所定の波形データを読み出してD/A変換して変調部16Bに入力する。変調部16Bは入力された波形データにより表される波形と一致するように面光源16Aから発光される測距光の強度を変調する。   The memory control unit 16D reads predetermined waveform data in accordance with an instruction from the imaging control unit 19 described later, performs D / A conversion, and inputs the data to the modulation unit 16B. The modulator 16B modulates the intensity of the distance measuring light emitted from the surface light source 16A so as to match the waveform represented by the input waveform data.

ここで、本実施形態においては、メモリ16Cには測距光を正弦波状に強度変調するための正弦波データ、および測距光をパルス波状に強度変調するためのパルス波データが記憶されている。なお、正弦波データおよびパルス波データは周期が同一であり、パルスの期間は正弦波の周期の1/4の期間であるものとする。また、正弦波データにより強度変調される測距光を第1の測距光、パルス波データにより強度変調される測距光を第2の測距光と称するものとする。   Here, in the present embodiment, the memory 16C stores sine wave data for intensity-modulating ranging light into a sine wave and pulse wave data for intensity-modulating ranging light into a pulse wave. . Note that the sine wave data and the pulse wave data have the same cycle, and the pulse period is a quarter of the sine wave cycle. In addition, distance measuring light whose intensity is modulated by sine wave data is referred to as first distance measuring light, and distance measuring light whose intensity is modulated by pulse wave data is referred to as second distance measuring light.

また、撮像部2は、CCD13、AFE14および測距光源16の駆動を制御するための撮像制御部19を備える。具体的には、撮像制御部19は、CPU32からの指示により、変調部18に変調の指示を行って測距光照射部3から第1および第2の測距光を発光させ、これとタイミングを合わせて被写体による測距光の反射光を受光し、受光光量に応じた受光信号を出力するよう撮像部2の各部を制御する。なお、第1および第2の測距光の発光、並びにCCD13の各受光素子からの受光信号の取得の詳細な制御については後述する。   In addition, the imaging unit 2 includes an imaging control unit 19 for controlling driving of the CCD 13, the AFE 14, and the ranging light source 16. Specifically, the imaging control unit 19 instructs the modulation unit 18 to perform modulation in accordance with an instruction from the CPU 32 and causes the ranging light irradiation unit 3 to emit the first and second ranging light, and the timing thereof. In addition, the reflected light of the distance measuring light from the subject is received, and each part of the imaging unit 2 is controlled so as to output a light reception signal corresponding to the amount of received light. Detailed control of the emission of the first and second ranging lights and the acquisition of the received light signals from the respective light receiving elements of the CCD 13 will be described later.

また、測距装置1は、撮影条件設定部22、画像処理部23、圧縮/伸長処理部24、フレームメモリ25、メディア制御部26、内部メモリ27、および表示制御部28を備える。   In addition, the distance measuring device 1 includes an imaging condition setting unit 22, an image processing unit 23, a compression / decompression processing unit 24, a frame memory 25, a media control unit 26, an internal memory 27, and a display control unit 28.

撮影条件設定部22は、予め定められた焦点距離、絞り値およびシャッタ速度を記憶しており、撮影を行う際に、焦点距離、絞り値およびシャッタ速度を撮像部2に出力する。   The shooting condition setting unit 22 stores a predetermined focal length, aperture value, and shutter speed, and outputs the focal length, aperture value, and shutter speed to the imaging unit 2 when shooting.

画像処理部23は、後述するように生成された距離画像の画像データに対して、階調補正、シャープネス補正等の画像処理を施す。   The image processing unit 23 performs image processing such as gradation correction and sharpness correction on the image data of the distance image generated as described later.

圧縮/伸長処理部24は、画像処理部23によって画像処理が施された距離画像の画像データに対して、例えば、JPEG等の圧縮形式で圧縮処理を行い、画像ファイルを生成する。この画像ファイルには、Exifフォーマット等に基づいて、撮影日時等の付帯情報が格納されたタグが付加される。   The compression / decompression processing unit 24 performs compression processing on the image data of the distance image subjected to image processing by the image processing unit 23 in a compression format such as JPEG, and generates an image file. A tag storing incidental information such as shooting date and time is added to the image file based on the Exif format or the like.

フレームメモリ25は、撮像部2が取得した受光信号に対して、前述の画像処理を含む各種処理を行う際に使用する作業用メモリである。   The frame memory 25 is a working memory used when various processes including the above-described image processing are performed on the received light signal acquired by the imaging unit 2.

メディア制御部26は、記録メディア29にアクセスして距離画像の画像ファイルの書き込みと読み込みの制御を行う。   The media control unit 26 accesses the recording medium 29 to control writing and reading of the distance image file.

内部メモリ27は、測距装置1において設定される各種定数、およびCPU32が実行するプログラム等を記憶する。   The internal memory 27 stores various constants set in the distance measuring device 1, a program executed by the CPU 32, and the like.

表示制御部28は、フレームメモリ25に格納された画像データをモニタ30に表示させたり、記録メディア29に記録されている画像をモニタ30に表示させたりするためのものである。   The display control unit 28 is for displaying the image data stored in the frame memory 25 on the monitor 30 and for displaying the image recorded on the recording medium 29 on the monitor 30.

また、測距装置1は、距離画像生成部31およびCPU32を備える。   The distance measuring device 1 includes a distance image generation unit 31 and a CPU 32.

距離画像生成部31は、撮像部2が取得した受光信号を用いて被写体上の各点の測距装置1からの距離情報D1を、CCD13上における受光素子毎に算出する。以下、距離情報D1の算出について説明する。   The distance image generation unit 31 calculates distance information D1 from the distance measuring device 1 of each point on the subject for each light receiving element on the CCD 13 using the light reception signal acquired by the imaging unit 2. Hereinafter, calculation of the distance information D1 will be described.

距離画像生成部31は、強度変調された第1の測距光が発光されてから被写体により反射された反射光を受光するまでの時間(すなわち光の飛行時間)に基づいて、距離情報D1を算出する。   The distance image generation unit 31 obtains the distance information D1 based on the time from when the intensity-modulated first ranging light is emitted until the reflected light reflected by the subject is received (that is, the flight time of light). calculate.

図3は距離情報を算出するための位相差の算出を説明するための図である。図3に示すように、測距光源16から発光される第1の測距光の強度は曲線K1に示すように正弦波状に変化するため、CCD13のある受光素子により受光した反射光の受光光量も曲線K2のように正弦波状に変化するが、光の飛行時間に相当する位相差tdaが発生する。   FIG. 3 is a diagram for explaining the calculation of the phase difference for calculating the distance information. As shown in FIG. 3, since the intensity of the first ranging light emitted from the ranging light source 16 changes in a sine wave shape as shown by a curve K1, the received light amount of the reflected light received by a light receiving element of the CCD 13 However, the phase difference tda corresponding to the flight time of light is generated.

位相差tdaは、第1の測距光の複数のタイミングで求めた反射光の受光光量を用いて計算することができる。本実施形態においては、第1の測距光における0、π/2、π、3π/2の位相において、第1の測距光の1/4周期に相当する受光期間Tw、パルス状に受光した反射光の受光光量を用いて位相差tdaを算出する。   The phase difference tda can be calculated using the received light amount of the reflected light obtained at a plurality of timings of the first distance measuring light. In the present embodiment, in the phase of 0, π / 2, π, 3π / 2 in the first ranging light, the light receiving period Tw corresponding to ¼ period of the first ranging light is received in pulses. The phase difference tda is calculated using the received light quantity of the reflected light.

ここで、第1の測距光における連続した0、π/2、π、3π/2の位相において受光した反射光の受光光量がそれぞれF1a、F2a、F3a、F4aであるとする。なお、受光光量F1a、F2a、F3a、F4aを求める間に位相差tdaは変化せず、かつ被写体の反射率にも変化がないものとし、時刻tにおいてCCD13の各受光素子で受光される光の強度がA・sin(ωt+δ)+Bで表されるものとする。ここで、Aは振幅、Bは外光成分、ωは角振動数、δは位相である。これにより、受光素子で受光する受光光量F1a、F2a、F3a、F4aは、次のように表すことができる。なお、受光光量は測距光における0、π/2、π、3π/2の位相において各受光素子から出力される受光信号に相当する。また、位相差tdaの算出には、上述した4つの受光光量すなわち4つの受光信号F1a、F2a、F3a、F4aをCCD13から取得することが必要であるため、すべての受光素子が4つの受光信号F1a、F2a、F3a、F4aを取得するまで、第1の測距光の発光およびCCD13による反射光の受光が行われる。   Here, it is assumed that the received light amounts of the reflected light received at the continuous phases of 0, π / 2, π, and 3π / 2 in the first ranging light are F1a, F2a, F3a, and F4a, respectively. It is assumed that the phase difference tda does not change during the calculation of the received light amounts F1a, F2a, F3a, and F4a, and the reflectance of the subject does not change, and the light received by each light receiving element of the CCD 13 at time t. It is assumed that the intensity is represented by A · sin (ωt + δ) + B. Here, A is the amplitude, B is the external light component, ω is the angular frequency, and δ is the phase. Accordingly, the received light amounts F1a, F2a, F3a, and F4a received by the light receiving element can be expressed as follows. The received light quantity corresponds to a received light signal output from each light receiving element in the phase of 0, π / 2, π, 3π / 2 in the distance measuring light. In addition, the calculation of the phase difference tda requires obtaining the above-described four received light amounts, that is, the four received light signals F1a, F2a, F3a, and F4a from the CCD 13, so that all the light receiving elements have four received light signals F1a. , F2a, F3a, and F4a are obtained until the first distance measuring light is emitted and the reflected light is received by the CCD 13.

F1a=A・sin(δ)+B
F2a=A・sin(π/2+δ)+B
F3a=A・sin(π+δ)+B
F4a=A・sin(3π/2+δ)+B
ここで、δ=−tdaであるから、F1a=−A・sin(tda)+B、F2a=A・cos(tda)+B、F3a=A・sin(tda)+B、F4a=−A・cos(tda)+Bであるため、各受光光量(受光信号)F1a、F2a、F3a、F4aと位相差tdaとの関係は、次式のようになる。
F1a = A · sin (δ) + B
F2a = A · sin (π / 2 + δ) + B
F3a = A · sin (π + δ) + B
F4a = A · sin (3π / 2 + δ) + B
Here, since δ = −tda, F1a = −A · sin (tda) + B, F2a = A · cos (tda) + B, F3a = A · sin (tda) + B, F4a = −A · cos (tda ) + B, the relationship between each received light amount (light reception signal) F1a, F2a, F3a, F4a and the phase difference tda is expressed by the following equation.

tda=tan-1{(F3a−F1a)/(F2a−F4a)} (1)
なお、位相差tdaを使用することにより、距離情報Dを下記の式(2)により算出することができる。
tda = tan −1 {(F3a−F1a) / (F2a−F4a)} (1)
Note that the distance information D can be calculated by the following equation (2) by using the phase difference tda.

D=c・tda/(4πF) (2)
cは光速、Fは周波数(=ω/2π)である。
D = c · tda / (4πF) (2)
c is the speed of light, and F is the frequency (= ω / 2π).

ここで、4つの受光信号F1a、F2a、F3a、F4aは各受光素子において、第1の測距光における0、π/2、π、3π/2の位相にてそれぞれ受光期間を区切って取得すればよいが、CCD13の各受光素子に4つの電荷蓄積部を設け、第1の測距光の1周期に相当する1つの受光期間において、4つの電荷蓄積部のそれぞれにより4つの受光信号を取得するようにしてもよい。   Here, the four light receiving signals F1a, F2a, F3a, and F4a are obtained by dividing each light receiving period by the phase of 0, π / 2, π, and 3π / 2 in the first distance measuring light in each light receiving element. However, four charge storage units are provided in each light receiving element of the CCD 13, and four light reception signals are acquired by each of the four charge storage units in one light receiving period corresponding to one cycle of the first distance measuring light. You may make it do.

また、第1の実施形態においては、距離画像生成部31は、位相差tdaを算出した後、第1の測距光に代えて第2の測距光を発光する。ここで、第2の測距光は第1の測距光と周期が同一であり、発光期間は第1の測距光の1/4、すなわちTwであるため、反射光も期間Twのパルス状の光となる。なお、第2の測距光の反射光についても、第1の測距光の反射光と同様に位相差が発生する。   In the first embodiment, the distance image generation unit 31 emits the second distance measuring light instead of the first distance measuring light after calculating the phase difference tda. Here, since the second distance measuring light has the same period as the first distance measuring light and the light emission period is ¼ of the first distance measuring light, that is, Tw, the reflected light is also a pulse of the period Tw. Light. The reflected light of the second distance measuring light also has a phase difference in the same manner as the reflected light of the first distance measuring light.

なお、距離画像生成部31は、すべての受光素子について算出した位相差tdaのうち最小位相差t1を算出し、撮像部2に出力する。撮像部2の撮像制御部19は、発光開始位相を最小位相差t1分早めて、測距光源16から第2の測距光を発光する。すなわち、発光開始位相を変更しない場合には、第2の測距光は図3の破線に示すように、第1の測距光の発光開始位相と同一の発光開始位相にて発光するが、最小位相差t1分発光開始位相を早めることにより、図3の実線に示すように第2の測距光を発光する。   The distance image generation unit 31 calculates the minimum phase difference t1 among the phase differences tda calculated for all the light receiving elements, and outputs the minimum phase difference t1 to the imaging unit 2. The imaging control unit 19 of the imaging unit 2 emits the second ranging light from the ranging light source 16 by advancing the emission start phase by the minimum phase difference t1. That is, when the light emission start phase is not changed, the second distance measuring light is emitted at the same light emission start phase as the light emission start phase of the first distance measuring light, as shown by the broken line in FIG. By advancing the light emission start phase by the minimum phase difference t1, the second distance measuring light is emitted as shown by the solid line in FIG.

さらに、距離画像生成部31は、位相差tdaの最大位相差t2を求め、最大位相差t2と最小位相差t1との差分位相差tr(=t2−t1)を算出し、撮像部2に出力する。撮像部2の撮像制御部19は、差分位相差trに応じて、第2の測距光の発光の1周期において、第1の測距光の反射光と同一の受光期間(すなわち第1の測距光の変調周期の0、π/2、π、3π/2の位相に相当する受光期間Tw)のうち、いずれの受光期間において反射光を受光するかを設定する。   Further, the distance image generation unit 31 calculates the maximum phase difference t2 of the phase difference tda, calculates a difference phase difference tr (= t2−t1) between the maximum phase difference t2 and the minimum phase difference t1, and outputs the difference to the imaging unit 2. To do. The imaging control unit 19 of the imaging unit 2 has the same light reception period as the reflected light of the first ranging light (that is, the first ranging light) in one cycle of the second ranging light emission according to the differential phase difference tr. Of the light receiving periods Tw) corresponding to the phases 0, π / 2, π, and 3π / 2 of the modulation period of the ranging light, it is set in which light receiving period the reflected light is received.

図4は受光期間の設定を説明するための図である。第2の測距光は第1の測距光を用いて算出した最小位相差t1分、第1の測距光よりも発光開始位相が早い。このため、最も早く受光される反射光は、第2の測距光と位相が最小位相差t1ずれることから、反射光の位相は、図4に示すように0の位相における第1の測距光の1/4周期に相当する期間Twに相当するものとなる。   FIG. 4 is a diagram for explaining the setting of the light receiving period. The second ranging light has a light emission start phase earlier than the first ranging light by the minimum phase difference t1 calculated using the first ranging light. For this reason, the reflected light that is received earliest is shifted in phase by the minimum phase difference t1 from the second ranging light, so that the phase of the reflected light is the first ranging at 0 phase as shown in FIG. This corresponds to a period Tw corresponding to a quarter cycle of light.

一方、差分位相差trは第1の測距光の1変調周期未満の値となるため、第2の測距光の反射光は、第1の測距光の1の変調周期に相当する期間において受光すればよいこととなる。したがって、差分位相差trに応じて第1の測距光の変調周期の0、π/2、π、3π/2のうちのいずれの位相に対応する受光期間Twにおいて受光をすればよいかが分かることとなる。   On the other hand, since the differential phase difference tr has a value less than one modulation period of the first ranging light, the reflected light of the second ranging light has a period corresponding to one modulation period of the first ranging light. It is sufficient to receive the light at. Therefore, it can be seen that light should be received in the light receiving period Tw corresponding to any phase of 0, π / 2, π, 3π / 2 of the modulation period of the first distance measuring light according to the difference phase difference tr. It will be.

具体的には、tr≦T/4(Tは第1の測距光の1変調周期)の場合は、第2の測距光の反射光の位相は0〜πにあるものとなるため、0およびπ/2の2つの受光期間Twにおいて反射光を受光すればよいこととなる。また、T/4<tr≦T/2の場合は、第2の測距光の反射光の位相は図4の差分位相差tr1の場合に示すように、0〜3π/2にあるものとなるため、0、π/2およびπの3つの受光期間Twにおいて反射光を受光すればよいこととなる。また、T/2<tr≦Tの場合は、図4の差分位相差tr2の場合に示すように第2の測距光の反射光の位相は、0〜2πにあるものとなるため、0、π/2、π、3π/2のすべての受光期間Twにおいて反射光を受光すればよいこととなる。   Specifically, when tr ≦ T / 4 (T is one modulation period of the first distance measuring light), the phase of the reflected light of the second distance measuring light is 0 to π. It is only necessary to receive the reflected light in the two light receiving periods Tw of 0 and π / 2. When T / 4 <tr ≦ T / 2, the phase of the reflected light of the second ranging light is 0-3π / 2 as shown in the case of the differential phase difference tr1 in FIG. Therefore, it is only necessary to receive the reflected light in the three light receiving periods Tw of 0, π / 2, and π. In the case of T / 2 <tr ≦ T, the phase of the reflected light of the second distance measuring light is 0-2π as shown in the case of the differential phase difference tr2 in FIG. , Π / 2, π, and 3π / 2, it is only necessary to receive the reflected light in all the light receiving periods Tw.

なお、第1の測距光の変調周期の0、π/2、π、3π/2の位相に相当する受光期間Twにおいて、第2の測距光の反射光を受光することにより得られる受光信号を受光信号F1b、F2b、F3b、F4bとする。   The light reception obtained by receiving the reflected light of the second ranging light in the light receiving period Tw corresponding to the phase of 0, π / 2, π, 3π / 2 of the modulation period of the first ranging light. The signals are light reception signals F1b, F2b, F3b, and F4b.

また、距離画像生成部31は、受光素子毎に位相差tdaと最小位相差t1との差分位相差ts(ts=tda−1)を算出し、差分位相差tsに基づいて、受光信号F1b、F2b、F3b、F4bのうち、位相差tdbの算出に使用する受光信号を選択する。すなわち、位相差tdaがTw以内であれば、第2の測距光の反射光は第1の測距光の0〜πの位相の間に存在することから、受光信号F1b、F2bを選択する。そして下記の式(3)により位相差tdbを算出する。   Further, the distance image generation unit 31 calculates a differential phase difference ts (ts = tda-1) between the phase difference tda and the minimum phase difference t1 for each light receiving element, and based on the differential phase difference ts, the light reception signal F1b, Of F2b, F3b, and F4b, the received light signal used for calculating the phase difference tdb is selected. That is, if the phase difference tda is within Tw, the reflected light of the second distance measuring light exists between the phases of 0 to π of the first distance measuring light, so that the light reception signals F1b and F2b are selected. . Then, the phase difference tdb is calculated by the following equation (3).

tdb=Tw×F2b/(F1b+F2b) (3)
差分位相差tsがTwより大きく2Tw以内であれば、第2の測距光の反射光は第1の測距光のπ/2〜3π/2の位相の間に存在することから、距離画像生成部31は受光信号F2b、F3bを選択する。そして下記の式(4)により位相差tdbを算出する。
tdb = Tw × F2b / (F1b + F2b) (3)
If the differential phase difference ts is greater than Tw and within 2 Tw, the reflected light of the second distance measuring light exists between the phases of π / 2 to 3π / 2 of the first distance measuring light. The generation unit 31 selects the light reception signals F2b and F3b. Then, the phase difference tdb is calculated by the following equation (4).

tdb=Tw+Tw×F3b/(F2b+F3b) (4)
差分位相差tsが2Twより大きく3Tw以内であれば、第2の測距光の反射光は第1の測距光のπ〜2π(すなわち0)の位相の間に存在することから、距離画像生成部31は受光信号F3b、F4bを選択する。そして下記の式(5)により位相差tdbを算出する。
tdb = Tw + Tw × F3b / (F2b + F3b) (4)
If the differential phase difference ts is larger than 2Tw and within 3Tw, the reflected light of the second distance measuring light exists between the phases of π to 2π (that is, 0) of the first distance measuring light. The generation unit 31 selects the light reception signals F3b and F4b. Then, the phase difference tdb is calculated by the following equation (5).

tdb=2Tw+Tw×F4b/(F3b+F4b) (5)
さらに、差分位相差tsが3Twより大きく4Tw以内であれば、第2の測距光の反射光は第1の測距光の3π/2〜π/2(次の周期)の位相の間に存在することから、距離画像生成部31は受光信号F4b、F1bを選択する。そして下記の式(6)により位相差tdbを算出する。
tdb = 2Tw + Tw × F4b / (F3b + F4b) (5)
Further, if the differential phase difference ts is greater than 3Tw and within 4Tw, the reflected light of the second ranging light is between 3π / 2 and π / 2 (next period) of the first ranging light. Therefore, the distance image generation unit 31 selects the light reception signals F4b and F1b. Then, the phase difference tdb is calculated by the following equation (6).

tdb=3Tw+Tw×F1b/(F4b+F1b) (6)
そして、位相差tdbを用いて下記の式(7)により受光素子毎に被写体までの距離を表す距離情報D1を算出する。
tdb = 3Tw + Tw × F1b / (F4b + F1b) (6)
Then, distance information D1 representing the distance to the subject is calculated for each light receiving element by the following equation (7) using the phase difference tdb.

D1=c×(tdb+t1)/2 (7)
なお、cは光速である。
D1 = c × (tdb + t1) / 2 (7)
C is the speed of light.

さらに、距離画像生成部31は、上述したように受光素子単位で算出した距離情報D1を各画素の画素値とする距離画像S1を生成する。   Furthermore, the distance image generation unit 31 generates a distance image S1 using the distance information D1 calculated for each light receiving element as described above as the pixel value of each pixel.

なお、差分位相差がtr≦T/4の場合には、2つの受光信号F1b、F2bのみしか取得されないが、ts≦Twとなるため、必ず式(3)により位相差tdbが算出される。また、差分位相差がT/4<tr≦T/2の場合は、3つの受光信号F1b、F2b、F3bのみしか取得されないが、ts≦2Twとなるため、必ず式(3)、(4)により位相差tdbが算出される。   When the differential phase difference is tr ≦ T / 4, only the two light reception signals F1b and F2b are acquired. However, since ts ≦ Tw, the phase difference tdb is always calculated by the equation (3). When the differential phase difference is T / 4 <tr ≦ T / 2, only three light reception signals F1b, F2b, and F3b are acquired. However, since ts ≦ 2Tw, the expressions (3) and (4) are always used. Thus, the phase difference tdb is calculated.

CPU32は、入出力部33からの信号に応じて測距装置1の各部を制御する。   The CPU 32 controls each unit of the distance measuring device 1 according to a signal from the input / output unit 33.

データバス34は、測距装置1を構成する各部およびCPU32に接続されており、測距装置1における各種データおよび各種情報のやり取りを行う。   The data bus 34 is connected to each unit constituting the distance measuring device 1 and the CPU 32, and exchanges various data and various information in the distance measuring device 1.

次いで、第1の実施形態において行われる処理について説明する。図5および図6は第1の実施形態において行われる処理を示すフローチャートである。   Next, processing performed in the first embodiment will be described. 5 and 6 are flowcharts showing the processing performed in the first embodiment.

撮影指示が行われることによりCPU32が処理を開始し、撮像部2がCPU32からの指示により、測距光源16から第1の測距光を被写体に向けて発光し(ステップST1)、さらに第1の測距光の被写体による反射光を第1の測距光における連続した0、π/2、π、3π/2の位相において受光して、4つの受光信号F1a、F2a、F3a、F4aを取得する(ステップST2)。次いで、距離画像生成部31が、4つの受光信号F1a、F2a、F3a、F4aから上記式(1)により、位相差tdaを受光素子単位で算出する(ステップST3)。さらに、距離画像生成部31は位相差tdaの最大位相差t2と最小位相差t1との差分位相差trを算出する(ステップST4)。   The CPU 32 starts processing when a shooting instruction is given, and the imaging unit 2 emits first ranging light from the ranging light source 16 toward the subject in response to the instruction from the CPU 32 (step ST1). The reflected light from the subject of the ranging light is received at the continuous phase of 0, π / 2, π, 3π / 2 in the first ranging light, and four received light signals F1a, F2a, F3a, and F4a are obtained. (Step ST2). Next, the distance image generation unit 31 calculates the phase difference tda for each light receiving element from the four light receiving signals F1a, F2a, F3a, and F4a according to the above equation (1) (step ST3). Further, the distance image generation unit 31 calculates a difference phase difference tr between the maximum phase difference t2 and the minimum phase difference t1 of the phase difference tda (step ST4).

そして、撮像部2の撮像制御部19が、第2の測距光の発光開始位相を第1の測距光よりも最小位相差t1分早くなるように設定し(ステップST5)、差分位相差trの範囲を判定する(ステップST6)。   Then, the imaging control unit 19 of the imaging unit 2 sets the emission start phase of the second ranging light so as to be earlier than the first ranging light by the minimum phase difference t1 (step ST5), and the differential phase difference The range of tr is determined (step ST6).

tr≦T/4の場合は、撮像制御部19は、位相が0およびπ/2の受光期間Twにおいて反射光を受光するよう、CCD13の各受光素子の受光期間を設定する(ステップST7)。そして、測距光源16から第2の測距光を被写体に向けて発光し(ステップST8)、さらに第2の測距光の被写体による反射光を、設定した受光期間に対応する0、π/2の位相において受光して、2つの受光信号F1b、F2bを取得する(ステップST9)。   In the case of tr ≦ T / 4, the imaging control unit 19 sets the light receiving period of each light receiving element of the CCD 13 so as to receive the reflected light in the light receiving period Tw having a phase of 0 and π / 2 (step ST7). Then, the second ranging light is emitted from the ranging light source 16 toward the subject (step ST8), and the reflected light of the second ranging light from the subject is set to 0, π / corresponding to the set light receiving period. Light is received in phase 2, and two light reception signals F1b and F2b are acquired (step ST9).

また、T/4<tr≦T/2の場合は、撮像制御部19は、位相が0、π/2およびπの受光期間Twにおいて反射光を受光するよう、CCD13の各受光素子の受光期間を設定する(ステップST10)。そして、測距光源16から第2の測距光を被写体に向けて発光し(ステップST8)、さらに第2の測距光の被写体による反射光を、設定した受光期間に対応する0、π/2、πの位相において受光して、3つの受光信号F1b、F2b、F3bを取得する(ステップST11)。   In the case of T / 4 <tr ≦ T / 2, the imaging control unit 19 receives the reflected light in the light receiving periods Tw having the phases of 0, π / 2, and π, so that the light receiving periods of the respective light receiving elements of the CCD 13 are received. Is set (step ST10). Then, the second ranging light is emitted from the ranging light source 16 toward the subject (step ST8), and the reflected light of the second ranging light from the subject is set to 0, π / corresponding to the set light receiving period. Light is received at the phase of 2 and π, and three light reception signals F1b, F2b, and F3b are obtained (step ST11).

また、T/2<tr≦Tの場合は、撮像制御部19は、位相が0、π/2、π、3π/2のすべての受光期間Twにおいて反射光を受光するよう、CCD13の各受光素子の受光期間を設定する(ステップST12)。そして、測距光源16から第2の測距光を被写体に向けて発光し(ステップST8)、さらに第2の測距光の被写体による反射光を、設定した受光期間に対応する0、π/2、π、3π/2の位相において受光して、4つの受光信号F1b、F2b、F3b、F4bを取得する(ステップST13)。   In the case of T / 2 <tr ≦ T, the imaging control unit 19 receives each reflected light of the CCD 13 so as to receive the reflected light in all the light receiving periods Tw whose phases are 0, π / 2, π, and 3π / 2. The light receiving period of the element is set (step ST12). Then, the second ranging light is emitted from the ranging light source 16 toward the subject (step ST8), and the reflected light of the second ranging light from the subject is set to 0, π / corresponding to the set light receiving period. Light is received at a phase of 2, π, and 3π / 2, and four received light signals F1b, F2b, F3b, and F4b are obtained (step ST13).

続いて、距離画像生成部31が、各受光素子について位相差tdaと最小位相差t1との差分位相差tsを算出し(ステップST14)、差分位相差tsの範囲を判定する(ステップST15)。   Subsequently, the distance image generation unit 31 calculates the difference phase difference ts between the phase difference tda and the minimum phase difference t1 for each light receiving element (step ST14), and determines the range of the difference phase difference ts (step ST15).

ts≦Twの場合は上記式(3)により位相差tdbを算出する(ステップST16)。Tw<ts≦2Twの場合は上記式(4)により位相差tdbを算出する(ステップST17)。2Tw<ts≦3Twの場合は上記式(5)により位相差tdbを算出する(ステップST18)。そして、3Tw<ts≦4Twの場合は上記式(6)により位相差tdbを算出する(ステップST19)。   In the case of ts ≦ Tw, the phase difference tdb is calculated by the above equation (3) (step ST16). In the case of Tw <ts ≦ 2Tw, the phase difference tdb is calculated by the above equation (4) (step ST17). In the case of 2Tw <ts ≦ 3Tw, the phase difference tdb is calculated by the above equation (5) (step ST18). When 3Tw <ts ≦ 4Tw, the phase difference tdb is calculated by the above equation (6) (step ST19).

次いで、距離画像生成部31は上記式(7)により距離情報D1を算出し(ステップST20)、距離情報D1を各画素の画素値とする距離画像S1を生成する(ステップST21)。そして、メディア制御部26が距離画像S1の画像データを記録メディア29に記録し(ステップST22)、処理を終了する。   Next, the distance image generation unit 31 calculates the distance information D1 by the above formula (7) (step ST20), and generates a distance image S1 having the distance information D1 as the pixel value of each pixel (step ST21). Then, the media control unit 26 records the image data of the distance image S1 on the recording medium 29 (step ST22), and the process ends.

ここで、正弦波のように強度が時間的に変化するように変調された第1の測距光を使用する場合、比較的長いレンジにより測距を行うことができるが、変調の位相によっては反射光の強度が小さくなる。例えば図3に示すπ/2の位相においては、反射光の強度は非常に小さくなる。このため、第1の測距光を使用する場合、得られる受光信号のS/Nが外光の影響により低下してしまうことから、測距の精度はそれほど高いものではない。   Here, when using the first ranging light that is modulated so that the intensity varies with time, such as a sine wave, ranging can be performed with a relatively long range, depending on the phase of the modulation. The intensity of reflected light is reduced. For example, in the phase of π / 2 shown in FIG. 3, the intensity of the reflected light is very small. For this reason, when the first ranging light is used, the S / N of the received light signal is lowered due to the influence of external light, so the accuracy of ranging is not so high.

一方、強度が一定のパルス状に強度変調された第2の測距光を使用する場合、反射光の強度は一定となるためS/Nの低下が少なく、精度良く測距を行うことができる。しかしながら、測距を行うことができるレンジがパルス幅により制限されてしまうため、ある限られた範囲のみしか測距を行うことができない。   On the other hand, when using the second ranging light whose intensity is modulated in a pulse shape with a constant intensity, the intensity of the reflected light is constant, so that the S / N is hardly lowered and the ranging can be performed with high accuracy. . However, since the range in which distance measurement can be performed is limited by the pulse width, distance measurement can be performed only in a limited range.

第1の実施形態によれば、第1の測距光の反射光から得られる複数の受光信号F1a、F2a、F3a、F4aに基づいて、第2の測距光の反射光から得られる複数の第2の受光信号F1b、F2b、F3b、F4bのうち、距離情報D1の算出に使用する受光信号を選択するようにしたものである。ここで、複数の第1の受光信号F1a、F2a、F3a、F4aにより第1の測距光と第1の測距光の反射光との位相差tdaが分かることとなる。位相差tdaは被写体までの大まかな距離情報を算出できるものであり、位相差tdaから求めた差分位相差tsにより距離情報D1の算出に使用する第2の受光信号F1b、F2b、F3b、F4bを選択することにより、位相差tdaにより求められる距離情報と同様の距離レンジにおいて、より正確に距離情報を算出することができる。したがって、第1の実施形態によれば、被写体までの距離に拘わらず正確に測距を行うことができる。   According to the first embodiment, on the basis of the plurality of light reception signals F1a, F2a, F3a, and F4a obtained from the reflected light of the first distance measuring light, the plurality of light obtained from the reflected light of the second distance measuring light. Among the second light reception signals F1b, F2b, F3b, and F4b, a light reception signal used for calculating the distance information D1 is selected. Here, the phase difference tda between the first distance measurement light and the reflected light of the first distance measurement light can be known from the plurality of first light reception signals F1a, F2a, F3a, and F4a. The phase difference tda can be used to calculate rough distance information to the subject, and the second received light signals F1b, F2b, F3b, and F4b used to calculate the distance information D1 based on the differential phase difference ts obtained from the phase difference tda are obtained. By selecting, the distance information can be calculated more accurately in the same distance range as the distance information obtained from the phase difference tda. Therefore, according to the first embodiment, accurate distance measurement can be performed regardless of the distance to the subject.

また、第1の測距光の反射光から最小位相差t1を算出し、第2の測距光の発光開始位相を第1の測距光から最小位相差t1早めて第2の測距光を発光し、最大位相差t2と最小位相差t1との差分位相差trに応じた複数の受光期間において第2の受光信号を取得しているため、第1の受光信号を取得した受光期間のすべてにおいて第2の受光信号を取得する必要がなくなる。例えば、第2の測距光の反射光をすべての位相において受光した場合、第1の測距光の受光と併せて8位相分、受光信号を取得する必要があるが、ts≦Twの場合およびTw<ts≦2Twの場合には、それぞれ6位相分および7位相分の受光信号のみを取得すればよいこととなる。   In addition, the minimum phase difference t1 is calculated from the reflected light of the first distance measuring light, and the emission start phase of the second distance measuring light is advanced from the first distance measuring light by the minimum phase difference t1 to advance the second distance measuring light. And the second light reception signal is acquired in a plurality of light reception periods corresponding to the difference phase difference tr between the maximum phase difference t2 and the minimum phase difference t1, and therefore the light reception period of the first light reception signal is acquired. In all cases, it is not necessary to acquire the second received light signal. For example, when the reflected light of the second distance measuring light is received in all phases, it is necessary to obtain the received light signals for 8 phases together with the reception of the first distance measuring light. However, when ts ≦ Tw When Tw <ts ≦ 2Tw, it is only necessary to acquire light reception signals for 6 phases and 7 phases, respectively.

したがって、本実施形態によれば、被写体までの距離に拘わらず正確かつ高速に測距を行うことができる。   Therefore, according to the present embodiment, accurate and high-speed distance measurement can be performed regardless of the distance to the subject.

次いで、本発明の第2の実施形態について説明する。なお、第2の実施形態においては、第1の実施形態と行われる処理のみが異なり、装置の構成は第1の実施形態と同一であるため、構成についての詳細な説明は省略する。ここで、第2の測距光の反射光から得られる受光信号F1b、F2b、F3b、F4bは、2つの受光期間に跨るものであるが、反射光はパルス光であるため各受光期間における信号のレベルが異なるものとなる。例えば、図7に示すように、受光信号F1b、F2bが2つの受光期間に跨る場合、受光信号F1bの方が信号レベルが大きくなる。第2の実施形態においては、信号レベルが大きい側の受光期間の受光信号を用いて位相差tdbを算出するようにした点が第1の実施形態と異なる。   Next, a second embodiment of the present invention will be described. In the second embodiment, only the processing performed in the first embodiment is different, and the configuration of the apparatus is the same as that of the first embodiment, and thus detailed description of the configuration is omitted. Here, the received light signals F1b, F2b, F3b, and F4b obtained from the reflected light of the second distance measuring light extend over two light receiving periods. However, since the reflected light is pulsed light, the signal in each light receiving period. The level of will be different. For example, as shown in FIG. 7, when the light reception signals F1b and F2b extend over two light reception periods, the light reception signal F1b has a higher signal level. The second embodiment is different from the first embodiment in that the phase difference tdb is calculated using the light reception signal in the light reception period on the side where the signal level is large.

図8は第2の実施形態において行われる処理を示すフローチャートである。なお、第2の実施形態においては、第1の実施形態におけるステップST14以降の処理のみが異なるため、ここでは第1の実施形態におけるステップST14以降の処理についてのみ説明する。ステップST14に続いて、距離画像生成部31が差分位相差tsの範囲を判定する(ステップST31)。   FIG. 8 is a flowchart showing processing performed in the second embodiment. In the second embodiment, only processes after step ST14 in the first embodiment are different, and therefore, only processes after step ST14 in the first embodiment will be described. Subsequent to step ST14, the distance image generation unit 31 determines the range of the differential phase difference ts (step ST31).

ts≦Twの場合、さらにF1b≦F2bであるか否かを判定し(ステップST32)、ステップST32が肯定されると上記式(3)により位相差tdbを算出する(ステップST33)。ステップST32が否定されると、下記の式(8)により位相差tdbを算出する(ステップST34)。   In the case of ts ≦ Tw, it is further determined whether or not F1b ≦ F2b is satisfied (step ST32). If step ST32 is affirmed, the phase difference tdb is calculated by the above equation (3) (step ST33). If step ST32 is negative, the phase difference tdb is calculated by the following equation (8) (step ST34).

tdb=Tw×{1−F1b/(F1b+F2b)} (8)
Tw<ts≦2Twの場合、さらにF2b≦F3bであるか否かを判定し(ステップST35)、ステップST35が肯定されると上記式(4)により位相差tdbを算出する(ステップST36)。ステップST35が否定されると、下記の式(9)により位相差tdbを算出する(ステップST37)。
tdb = Tw × {1−F1b / (F1b + F2b)} (8)
In the case of Tw <ts ≦ 2Tw, it is further determined whether or not F2b ≦ F3b (step ST35). If step ST35 is affirmed, the phase difference tdb is calculated by the above equation (4) (step ST36). If step ST35 is negative, the phase difference tdb is calculated by the following equation (9) (step ST37).

tdb=Tw+Tw×{1−F2b/(F2b+F3b)} (9)
2Tw<ts≦3Twの場合、さらにF3b≦F4bであるか否かを判定し(ステップST38)、ステップST38が肯定されると上記式(5)により位相差tdbを算出する(ステップST39)。ステップST38が否定されると、下記の式(10)により位相差tdbを算出する(ステップST40)。
tdb = Tw + Tw × {1−F2b / (F2b + F3b)} (9)
If 2Tw <ts ≦ 3Tw, it is further determined whether or not F3b ≦ F4b is satisfied (step ST38). If step ST38 is positive, the phase difference tdb is calculated by the above equation (5) (step ST39). If step ST38 is negative, the phase difference tdb is calculated by the following equation (10) (step ST40).

tdb=2Tw+Tw×{1−F3b/(F3b+F4b)} (10)
そして、3Tw<ts≦4Twの場合、さらにF4b≦F1bであるか否かを判定し(ステップST41)、ステップST41が肯定されると上記式(6)により位相差tdbを算出する(ステップST42)。ステップST42が否定されると、下記の式(11)により位相差tdbを算出する(ステップST43)。
tdb = 2Tw + Tw × {1−F3b / (F3b + F4b)} (10)
If 3Tw <ts ≦ 4Tw, it is further determined whether or not F4b ≦ F1b (step ST41). If step ST41 is affirmed, the phase difference tdb is calculated by the above equation (6) (step ST42). . If step ST42 is negative, the phase difference tdb is calculated by the following equation (11) (step ST43).

tdb=3Tw+Tw×{1−F4b/(F4b+F1b)} (11)
次いで、距離画像生成部31は第1の実施形態におけるステップST20以降の処理を行い、処理を終了する。
tdb = 3Tw + Tw × {1−F4b / (F4b + F1b)} (11)
Next, the distance image generation unit 31 performs the processing after step ST20 in the first embodiment, and ends the processing.

ここで、信号レベルが大きいということは外光によるノイズの影響が小さいことを意味する。したがって、信号レベルが大きい側の第2の受光信号を距離情報D1の算出に使用することにより、より正確に距離情報D1を算出することができる。   Here, a large signal level means that the influence of noise due to external light is small. Therefore, the distance information D1 can be calculated more accurately by using the second received light signal having the higher signal level for calculating the distance information D1.

次いで、本発明の第3の実施形態について説明する。なお、第3の実施形態においては、第1の実施形態と行われる処理のみが異なり、装置の構成は第1の実施形態と同一であるため、構成についての詳細な説明は省略する。ここで、第1および第2の測距光の反射光には外光成分が含まれる。外光成分は図9(a),(b)の斜線に示すように反射光に重畳されるため、受光信号は外光成分をも含むものとなっている。   Next, a third embodiment of the present invention will be described. In the third embodiment, only the processing performed in the first embodiment is different, and the configuration of the apparatus is the same as that of the first embodiment, and thus detailed description of the configuration is omitted. Here, the reflected light of the first and second distance measuring lights includes an external light component. Since the external light component is superimposed on the reflected light as shown by the hatched lines in FIGS. 9A and 9B, the light reception signal includes the external light component.

第1の測距光の反射光の受光信号からの位相差tdaの算出は、上記式(1)により行われるため、外光成分の影響は除去される。しかしながら、第2の測距光の反射光の受光信号からの位相差tdbの算出は、上記式(3)〜(6)により行われるため、外光成分の影響が含まれたものとなっている。第3の実施形態は外光成分の影響を除去して位相差tdbを算出するようにしたものである。   Since the calculation of the phase difference tda from the light reception signal of the reflected light of the first distance measuring light is performed by the above equation (1), the influence of the external light component is removed. However, the calculation of the phase difference tdb from the light reception signal of the reflected light of the second distance measuring light is performed by the above formulas (3) to (6), and therefore includes the influence of the external light component. Yes. In the third embodiment, the phase difference tdb is calculated by removing the influence of the external light component.

ここで、第1の測距光の反射光の1周期分の受光信号は、F1a+F2a+F3a+F4aである。また、第1の測距光の反射光の振幅Aは、A=√{(F1a−F3a)2+(F2a−F4a)2}により算出される。振幅Aは、図9(a)に示すように、第1の測距光の反射光の1/4周期を一辺、外光成分を除く反射光の輝度の最大値を他の一辺とする長方形の積算値となるため、第1の測距光の反射光の1周期分の振幅Aの平均値Amは、Am=(A×4)/2となる。したがって、第1の測距光の反射光の1周期分の外光成分k′は、k′=(F1a+F2a+F3a+F4a)−(A×4)/2により算出される。一方、各受光信号の位相は反射光の1/4周期であるため、外光成分k′を1/4とすることにより、下記の式(12)に示すように外光成分kを算出できる。 Here, the light reception signal for one cycle of the reflected light of the first ranging light is F1a + F2a + F3a + F4a. The amplitude A of the reflected light of the first ranging light is calculated by A = √ {(F1a−F3a) 2 + (F2a−F4a) 2 }. As shown in FIG. 9 (a), the amplitude A is a rectangle having a quarter period of the reflected light of the first distance measuring light as one side and the maximum value of the brightness of the reflected light excluding the external light component as the other side. Therefore, the average value Am of the amplitude A for one period of the reflected light of the first distance measuring light is Am = (A × 4) / 2. Accordingly, the external light component k ′ for one period of the reflected light of the first ranging light is calculated by k ′ = (F1a + F2a + F3a + F4a) − (A × 4) / 2. On the other hand, since the phase of each received light signal is ¼ period of the reflected light, the external light component k can be calculated as shown in the following formula (12) by setting the external light component k ′ to ¼. .

k={(F1a+F2a+F3a+F4a)−(A×4)/2}/4 (12)
距離画像生成部31は、上記式(12)により外光成分kを算出し、第2の測距光の反射光の受光信号F1b、F2b、F3b、F4bから外光成分kを減算し、これにより取得した受光信号F1b′、F2b′、F3b′、F4b′を用いて位相差tdbを算出する。
k = {(F1a + F2a + F3a + F4a) − (A × 4) / 2} / 4 (12)
The distance image generation unit 31 calculates the external light component k by the above equation (12), and subtracts the external light component k from the received light signals F1b, F2b, F3b, and F4b of the reflected light of the second distance measuring light. The phase difference tdb is calculated using the received light signals F1b ′, F2b ′, F3b ′, and F4b ′ obtained by the above.

図10は第3の実施形態において行われる処理を示すフローチャートである。なお、第3の実施形態においては、第1の実施形態におけるステップST9,ST11,ST13とステップST14との間の処理のみが異なるため、ここでは第1の実施形態におけるステップST9,ST11,ST13とステップST14との間の処理についてのみ説明する。   FIG. 10 is a flowchart showing processing performed in the third embodiment. In the third embodiment, since only the processes between steps ST9, ST11, ST13 and step ST14 in the first embodiment are different, here, steps ST9, ST11, ST13 in the first embodiment and Only the processing between step ST14 will be described.

ステップSTST9,ST11,ST13に続いて、距離画像生成部31が上記式(12)により、外光成分kを算出する(ステップST41)。そして、受光信号F1b、F2b、F3b、F4bを外光成分kにより補正し(ステップST42)、ステップST14の処理に進む。   Subsequent to steps STST9, ST11, and ST13, the distance image generation unit 31 calculates an external light component k by the above equation (12) (step ST41). Then, the light reception signals F1b, F2b, F3b, and F4b are corrected by the external light component k (step ST42), and the process proceeds to step ST14.

なお、第3の実施形態においては、第1の実施形態におけるステップST16,ST17,ST18,ST19の処理は、外光成分kにより補正された受光信号F1b′、F2b′、F3b′、F4b′により行われることとなる。   In the third embodiment, the processes of steps ST16, ST17, ST18, and ST19 in the first embodiment are performed by the received light signals F1b ′, F2b ′, F3b ′, and F4b ′ corrected by the external light component k. Will be done.

これにより、外光成分の影響を除去して、より精度良く距離画像を生成することができる。   Thereby, the influence of an external light component can be removed and a distance image can be generated with higher accuracy.

なお、上記第3の実施形態においては、第1の実施形態において外光成分を除去しているが、第2の実施形態においても同様に外光成分を除去することができることはもちろんである。   In the third embodiment, the external light component is removed in the first embodiment. Of course, the external light component can also be removed in the second embodiment.

また、上記第1から第3の実施形態においては、第1の測距光の変調周期における0の位相を基準としているが、0でない位相を基準として基準位相、基準位相からπ/2ずれた位相、基準位相からπずれた位相および基準位相から3π/2ずれた位相において反射光をそれぞれ受光するようにしてもよい。また、受光信号を取得する位相のずれは、π/2に限定されるものではない。   Further, in the first to third embodiments, the phase of 0 in the modulation period of the first ranging light is used as a reference, but the phase is shifted by π / 2 from the reference phase and the reference phase with a non-zero phase as a reference. The reflected light may be received at the phase, the phase shifted by π from the reference phase, and the phase shifted by 3π / 2 from the reference phase. Further, the phase shift for acquiring the received light signal is not limited to π / 2.

また、上記第1から第3の実施形態においては、第1の測距光の変調周期における0、π/2、π、3π/2の4つの位相に対応する、第1の測距光の1周期の1/4の4つの受光期間Twにおいて受光信号F1a、F2a、F3a、F4a、F1b、F2b、F3b、F4bを取得しているが、測距光の変調周期における0、π/2、πの3つの位相に対応する、第1の測距光の1周期の1/2の3つの受光期間2Twにおいて受光信号を取得することによっても、位相差を算出することができる。以下、これを第4の実施形態として説明する。   In the first to third embodiments, the first ranging light corresponding to the four phases 0, π / 2, π, and 3π / 2 in the modulation period of the first ranging light is used. The light receiving signals F1a, F2a, F3a, F4a, F1b, F2b, F3b, and F4b are acquired in four light receiving periods Tw that are ¼ of one period, but 0, π / 2 in the modulation period of the ranging light, The phase difference can also be calculated by acquiring light reception signals in three light reception periods 2Tw corresponding to the three phases of π, which is ½ of one cycle of the first ranging light. Hereinafter, this will be described as a fourth embodiment.

図11は第4の実施形態における位相差の算出を説明するための図である。図11に示すように、第4の実施形態においては、第1の測距光の変調周期における0、π/2、πの3つの位相において、変調周期の半分の受光期間2Tw反射光を受光するように受光素子の受光タイミングを制御する。なお、これにより取得される受光光量をF1c、F2c、F3cとする。   FIG. 11 is a diagram for explaining the calculation of the phase difference in the fourth embodiment. As shown in FIG. 11, in the fourth embodiment, in the three phases of 0, π / 2, and π in the modulation period of the first ranging light, the light reception period 2Tw reflected light that is half the modulation period is received. Thus, the light receiving timing of the light receiving element is controlled. In addition, let the received light quantity acquired by this be F1c, F2c, and F3c.

なお、受光光量F1cは、測距光の変調周期の0〜πの期間の受光信号に、受光光量F2cはπ/2〜3π/2の期間の受光信号に、受光光量F3cはπ〜2πの期間の受光信号にそれぞれ対応するため、受光信号についても参照符号としてF1c、F2c、F3cを用いる。   The received light amount F1c is a received light signal in the period of 0 to π of the ranging light modulation period, the received light amount F2c is a received light signal in the period of π / 2 to 3π / 2, and the received light amount F3c is π to 2π. F1c, F2c, and F3c are also used as reference symbols for the light reception signals in order to correspond to the light reception signals in the period.

また、曲線K1における0〜π/2、π/2〜π、π〜3π/2、3π/2〜2πの位相において求めた曲線K2の受光光量は、上記第1の実施形態における受光光量F1a、F2a、F3a、F4aに相当する。したがって、F1c=F1a+F2a、F2c=F2a+F3a、F3c=F3a+F4aとなるため、下記の関係が成立する。   Further, the received light amount of the curve K2 obtained in the phase of 0 to π / 2, π / 2 to π, π to 3π / 2, 3π / 2 to 2π in the curve K1 is the received light amount F1a in the first embodiment. , F2a, F3a, and F4a. Accordingly, since F1c = F1a + F2a, F2c = F2a + F3a, and F3c = F3a + F4a, the following relationship is established.

F2c−F1c=F3a−F1a
F2c−F3c=F2a−F4a
ここで位相差tdaに相当する位相差tdcは上記式(1)により算出することができるため、上記関係を式(1)に代入すると、
tdc=tan-1{(F2c−F1c)/(F2c−F3c)} (13)
となる。したがって、3つの位相において取得した受光信号F1c、F2c、F3cからも、式(13)により位相差tdaに相当する位相差tdcを算出することができる。
F2c-F1c = F3a-F1a
F2c-F3c = F2a-F4a
Here, since the phase difference tdc corresponding to the phase difference tda can be calculated by the above equation (1), if the above relationship is substituted into the equation (1),
tdc = tan −1 {(F2c−F1c) / (F2c−F3c)} (13)
It becomes. Therefore, the phase difference tdc corresponding to the phase difference tda can also be calculated from the received light signals F1c, F2c, and F3c acquired in the three phases by the equation (13).

なお、第4の実施形態において、差分位相差trの算出、第2の測距光の発光開始位相の設定は第1の実施形態と同様に行う。   In the fourth embodiment, the calculation of the differential phase difference tr and the setting of the light emission start phase of the second distance measuring light are performed in the same manner as in the first embodiment.

第2の受光素子の受光期間については、差分位相差trは第1の測距光の1周期未満の値となるため、第2の測距光の反射光は、第1の測距光の1周期に相当する期間において受光すればよいこととなる。したがって、差分位相差trに応じて第1の測距光の変調周期の0、π/2、πの位相のいずれの位相に相当する受光期間2Twにおいて受光をすればよいかが分かることとなる。   Regarding the light receiving period of the second light receiving element, the differential phase difference tr is a value less than one cycle of the first distance measuring light, so the reflected light of the second distance measuring light is the first distance measuring light. It is sufficient to receive light in a period corresponding to one cycle. Accordingly, it can be determined whether light reception should be performed in the light reception period 2Tw corresponding to the phase of 0, π / 2, or π of the modulation period of the first distance measuring light according to the difference phase difference tr.

すなわち、tr≦T/2(Tは第1の測距光の1周期)の場合は、第2の測距光の反射光の位相は0〜πにあるものとなるため、0およびπ/2の受光期間2Twにおいて反射光を受光すればよいこととなる。また、T/2<trの場合は、第2の測距光の反射光の位相は0〜2πにあるものとなるため、0,π/2およびπのすべての受光期間2Twにおいて反射光を受光すればよいこととなる。   That is, in the case of tr ≦ T / 2 (T is one cycle of the first distance measuring light), the phase of the reflected light of the second distance measuring light is 0 to π. It is sufficient to receive the reflected light during the two light receiving periods 2Tw. In addition, when T / 2 <tr, the phase of the reflected light of the second distance measuring light is 0 to 2π, so that the reflected light is reflected in all light receiving periods 2Tw of 0, π / 2, and π. What is necessary is just to receive light.

撮像部2の撮像制御部19は、このようにして差分位相差trに応じて、第2の測距光の反射光の受光期間2Twを決定する。なお、第1の測距光の変調周期の0、π/2、πの位相に相当する受光期間2Twにおいて、第2の測距光の反射光を受光することにより得られる受光信号を受光信号F1d、F2d、F3dとする。   In this way, the imaging control unit 19 of the imaging unit 2 determines the light receiving period 2Tw of the reflected light of the second ranging light according to the differential phase difference tr. Note that the light reception signal obtained by receiving the reflected light of the second distance measuring light in the light receiving period 2Tw corresponding to the phase of 0, π / 2, π of the modulation period of the first distance measuring light is the light reception signal. Let F1d, F2d, and F3d.

また、距離画像生成部31は、位相差tdcと最小位相差t1との差分位相差ts(ts=tdc−1)を算出し、差分位相差tsに基づいて、受光信号F1d、F2d、F3bdのうち、位相差tddの算出に使用する受光信号を選択する。すなわち、差分位相差tsがTw以内であれば、第2の測距光の反射光は第1の測距光の0〜πの位相の間に存在することから、受光信号F1d、F2dを選択する。そして下記の式(14)により位相差tddを算出する。   Further, the distance image generation unit 31 calculates a differential phase difference ts (ts = tdc-1) between the phase difference tdc and the minimum phase difference t1, and based on the differential phase difference ts, the light reception signals F1d, F2d, and F3bd Among them, the light reception signal used for calculating the phase difference tdd is selected. That is, if the differential phase difference ts is within Tw, the reflected light of the second distance measuring light exists between the phases of 0 to π of the first distance measuring light, so the light reception signals F1d and F2d are selected. To do. Then, the phase difference tdd is calculated by the following equation (14).

tdd=Tw×F2d/F1d (14)
差分位相差tsがTwより大きく2Tw以内であれば、第2の測距光の反射光は第1の測距光のπ/2〜3π/2の位相の間に存在することから、受光信号F1d、F2dを選択する。そして下記の式(15)により位相差tddを算出する。
tdd = Tw × F2d / F1d (14)
If the differential phase difference ts is larger than Tw and within 2 Tw, the reflected light of the second distance measuring light exists between the phases of π / 2 to 3π / 2 of the first distance measuring light. Select F1d and F2d. Then, the phase difference tdd is calculated by the following equation (15).

tdd=Tw+Tw×(1−F1d/F2d) (15)
差分位相差tsが2Twより大きく3Tw以内であれば、第2の測距光の反射光は第1の測距光のπ〜2π(すなわち0)の位相の間に存在することから、受光信号F2d、F3dを選択する。そして下記の式(16)により位相差tddを算出する。
tdd = Tw + Tw × (1−F1d / F2d) (15)
If the differential phase difference ts is greater than 2Tw and within 3Tw, the reflected light of the second distance measuring light exists between the phases of π to 2π (that is, 0) of the first distance measuring light. F2d and F3d are selected. Then, the phase difference tdd is calculated by the following equation (16).

tdd=2Tw+Tw×(1−F2d/F3d) (16)
さらに、差分位相差tsが3Twより大きく4Tw以内であれば、第2の測距光の反射光は第1の測距光の3π/2〜π/2(次の周期)の位相の間に存在することから、受光信号F3d、F1dを選択する。そして下記の式(17)により位相差tddを算出する。
tdd = 2Tw + Tw × (1−F2d / F3d) (16)
Further, if the differential phase difference ts is greater than 3Tw and within 4Tw, the reflected light of the second ranging light is between 3π / 2 and π / 2 (next period) of the first ranging light. Since it exists, the light reception signals F3d and F1d are selected. Then, the phase difference tdd is calculated by the following equation (17).

tdd=3Tw+Tw×F1d/(F3d+F1d) (17)
そして、位相差tddを用いて上記式(7)により受光素子毎に被写体までの距離を表す距離情報D1を算出する。
tdd = 3Tw + Tw × F1d / (F3d + F1d) (17)
Then, using the phase difference tdd, distance information D1 representing the distance to the subject is calculated for each light receiving element by the above equation (7).

なお、差分位相差がtr≦T/2の場合には、2つの受光信号F1d、F2dのみしか取得されないが、ts≦2Twとなるため、必ず式(14)、(15)により位相差tddが算出される。   When the differential phase difference is tr ≦ T / 2, only the two light reception signals F1d and F2d are acquired. However, since ts ≦ 2Tw, the phase difference tdd is always expressed by the equations (14) and (15). Calculated.

次いで、第4の実施形態において行われる処理について説明する。図12および図13は第4の実施形態において行われる処理を示すフローチャートである。撮影指示が行われることによりCPU32が処理を開始し、撮像部2がCPU32からの指示により、測距光源16から第1の測距光を被写体に向けて発光し(ステップST51)、さらに第1の測距光の被写体による反射光を第1の測距光における連続した0、π/2、πの位相において受光して、3つの受光信号F1c、F2c、F3cを取得する(ステップST52)。次いで、距離画像生成部31が、3つの受光信号F1c、F2c、F3cから上記式(13)により、位相差tdcを受光素子単位で算出する(ステップST53)。さらに、距離画像生成部31は位相差tdcの最大位相差t2と最小位相差t1との差分位相差trを算出する(ステップST54)。   Next, processing performed in the fourth embodiment will be described. 12 and 13 are flowcharts showing the processing performed in the fourth embodiment. The CPU 32 starts processing when a shooting instruction is issued, and the imaging unit 2 emits first ranging light from the ranging light source 16 toward the subject according to the instruction from the CPU 32 (step ST51). The reflected light from the subject of the distance measuring light is received at the continuous 0, π / 2, and π phases in the first distance measuring light, and three received light signals F1c, F2c, and F3c are obtained (step ST52). Next, the distance image generation unit 31 calculates the phase difference tdc for each light receiving element from the three light receiving signals F1c, F2c, and F3c according to the above equation (13) (step ST53). Further, the distance image generation unit 31 calculates a difference phase difference tr between the maximum phase difference t2 and the minimum phase difference t1 of the phase difference tdc (step ST54).

そして、撮像部2の撮像制御部19が、第2の測距光の発光開始位相を第1の測距光よりも最小位相差t1分早くなるように設定し(ステップST55)、差分位相差trの範囲を判定する(ステップST56)。   Then, the imaging control unit 19 of the imaging unit 2 sets the emission start phase of the second ranging light so as to be earlier than the first ranging light by the minimum phase difference t1 (step ST55), and the differential phase difference The range of tr is determined (step ST56).

tr≦T/2の場合は、撮像制御部19は、位相が0およびπ/2の受光期間2Twにおいて反射光を受光するよう、CCD13の各受光素子の受光期間を設定する(ステップST57)。そして、測距光源16から第2の測距光を被写体に向けて発光し(ステップST58)、さらに第2の測距光の被写体による反射光を、設定した受光期間に対応する0、π/2の位相において受光して、2つの受光信号F1d、F2dを取得する(ステップST59)。   In the case of tr ≦ T / 2, the imaging control unit 19 sets the light receiving period of each light receiving element of the CCD 13 so as to receive the reflected light in the light receiving period 2Tw having a phase of 0 and π / 2 (step ST57). Then, the second ranging light is emitted from the ranging light source 16 toward the subject (step ST58), and the reflected light of the second ranging light from the subject is set to 0, π / corresponding to the set light receiving period. Light is received in phase 2, and two light reception signals F1d and F2d are acquired (step ST59).

また、T/2<trの場合は、撮像制御部19は、位相が0、π/2およびπの受光期間2Twにおいて反射光を受光するよう、CCD13の各受光素子の受光期間を設定する(ステップST60)。そして、測距光源16から第2の測距光を被写体に向けて発光し(ステップST58)、さらに第2の測距光の被写体による反射光を、設定した受光期間に対応する0、π/2、πの位相において受光して、3つの受光信号F1d、F2d、F3dを取得する(ステップST61)。   When T / 2 <tr, the imaging control unit 19 sets the light receiving period of each light receiving element of the CCD 13 so as to receive the reflected light in the light receiving period 2Tw having the phases of 0, π / 2, and π ( Step ST60). Then, the second ranging light is emitted from the ranging light source 16 toward the subject (step ST58), and the reflected light of the second ranging light from the subject is set to 0, π / corresponding to the set light receiving period. Light is received at the phase of 2 and π, and three light reception signals F1d, F2d, and F3d are obtained (step ST61).

続いて、距離画像生成部31が、位相差tdcと最小位相差t1との差分位相差tsを算出し(ステップST62)、差分位相差tsの範囲を判定する(ステップST63)。   Subsequently, the distance image generation unit 31 calculates a differential phase difference ts between the phase difference tdc and the minimum phase difference t1 (step ST62), and determines a range of the differential phase difference ts (step ST63).

ts≦Twの場合は上記式(14)により位相差tddを算出する(ステップST64)。Tw<ts≦2Twの場合は上記式(15)により位相差tddを算出する(ステップST65)。2Tw<ts≦3Twの場合は上記式(16)により位相差tddを算出する(ステップST66)。そして、3Tw<ts≦4Twの場合は上記式(17)により位相差tddを算出する(ステップST67)。   When ts ≦ Tw, the phase difference tdd is calculated by the above equation (14) (step ST64). In the case of Tw <ts ≦ 2Tw, the phase difference tdd is calculated by the above equation (15) (step ST65). In the case of 2Tw <ts ≦ 3Tw, the phase difference tdd is calculated by the above equation (16) (step ST66). When 3Tw <ts ≦ 4Tw, the phase difference tdd is calculated by the above equation (17) (step ST67).

次いで、距離画像生成部31は上記式(7)により距離情報D1を算出し(ステップST68)、距離情報D1を各画素の画素値とする距離画像S1を生成する(ステップST69)。そして、メディア制御部26が距離画像S1の画像データを記録メディア29に記録し(ステップST70)、処理を終了する。   Next, the distance image generation unit 31 calculates distance information D1 by the above equation (7) (step ST68), and generates a distance image S1 having the distance information D1 as the pixel value of each pixel (step ST69). Then, the media control unit 26 records the image data of the distance image S1 on the recording medium 29 (step ST70), and ends the process.

なお、上記第4の実施形態においては、第3の実施形態と同様に、受光信号F1c、F2c、F3cから外光成分kを算出し、受光信号F1d,F2d,F3dを外光成分kにより補正して位相差tddを算出するようにしてもよい。この場合、外光成分kは下記の式(18)により算出される。   In the fourth embodiment, as in the third embodiment, the external light component k is calculated from the light reception signals F1c, F2c, and F3c, and the light reception signals F1d, F2d, and F3d are corrected by the external light component k. Thus, the phase difference tdd may be calculated. In this case, the external light component k is calculated by the following equation (18).

k=(F1c+F3c)/2
−√{(F1c−F2c)2+(F2c−F3c)2} (18)
なお、上記各実施形態においては、第1の測距光を正弦波により変調しているが、三角波、パルス波等、一定の周期で変調するものであれば、どのように変調を行ってもよい。
k = (F1c + F3c) / 2
−√ {(F1c−F2c) 2 + (F2c−F3c) 2 } (18)
In each of the above embodiments, the first distance measuring light is modulated by a sine wave. However, any modulation may be performed as long as it modulates at a constant cycle such as a triangular wave or a pulse wave. Good.

また、上記各実施形態においては、測距装置1内において距離画像を生成しているが、距離画像生成部31を装置1外に設け、入出力部33から受光信号を外部の距離画像生成部31に出力して距離画像を生成するようにしてもよい。   In each of the above embodiments, the distance image is generated in the distance measuring device 1. However, the distance image generating unit 31 is provided outside the device 1, and the received light signal is input from the input / output unit 33 to the external distance image generating unit. The distance image may be generated by outputting to 31.

以上、本発明の実施形態に係る測距装置について説明したが、コンピュータを、上記の距離画像生成部31に対応する手段として機能させ、図5,6,8,10,12,13に示すような処理を行わせるプログラムも、本発明の実施形態の1つである。また、そのようなプログラムを記録したコンピュータ読取り可能な記録媒体も、本発明の実施形態の1つである。   Although the distance measuring device according to the embodiment of the present invention has been described above, the computer functions as a unit corresponding to the distance image generation unit 31 as shown in FIGS. A program for performing a simple process is also one embodiment of the present invention. A computer-readable recording medium in which such a program is recorded is also one embodiment of the present invention.

第1の実施形態による測距装置の構成を示す概略ブロック図1 is a schematic block diagram showing the configuration of a distance measuring device according to a first embodiment. 測距光源の構成の構成を示す概略ブロック図Schematic block diagram showing the configuration of the ranging light source configuration 第1の実施形態における位相差の算出を説明するための図The figure for demonstrating calculation of the phase difference in 1st Embodiment. 受光期間の設定を説明するための図Diagram for explaining the setting of the light reception period 第1の実施形態において行われる処理を示すフローチャート(その1)The flowchart which shows the process performed in 1st Embodiment (the 1) 第1の実施形態において行われる処理を示すフローチャート(その2)The flowchart which shows the process performed in 1st Embodiment (the 2) 2つの受光期間に跨る受光信号を示す図The figure which shows the light reception signal over two light reception periods 第2の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 2nd Embodiment. 外光成分を説明するための図Diagram for explaining external light components 第3の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 3rd Embodiment 第4の実施形態における位相差の算出を説明するための図The figure for demonstrating calculation of the phase difference in 4th Embodiment 第4の実施形態において行われる処理を示すフローチャート(その1)The flowchart which shows the process performed in 4th Embodiment (the 1) 第4の実施形態において行われる処理を示すフローチャート(その2)The flowchart which shows the process performed in 4th Embodiment (the 2)

符号の説明Explanation of symbols

1 測距装置
2 撮像部
13 CCD
16 測距光源
19 撮像制御部
31 距離画像生成部
32 CPU
DESCRIPTION OF SYMBOLS 1 Distance measuring device 2 Imaging part 13 CCD
16 Ranging light source 19 Imaging control unit 31 Distance image generation unit 32 CPU

Claims (9)

所定周期にて強度が時間的に変化するように変調された第1の測距光、および前記所定周期にて強度が一定のパルス波状に変調された第2の測距光を切換可能に発光する測距光発光手段と、
受光光量に応じた受光信号を出力する複数の受光素子を有する撮像手段と、
前記撮像手段の受光期間を制御する受光制御手段と、
前記受光信号に基づいて、被写体までの距離を表す距離情報を前記受光素子毎に算出する距離情報算出手段と、
前記第1の測距光を発光し、該第1の測距光の変調周期における位相が異なる複数の受光期間において複数の第1の受光信号を取得し、前記複数の第1の受光信号に基づいて、前記第1の測距光と該第1の測距光の反射光との位相差を前記受光素子毎に算出し、該位相差に基づいて前記第2の測距光の発光開始位相を前記第1の測距光の発光開始位相とは異なるように変更して該第2の測距光を発光し、該第2の測距光の変調周期における前記位相差に応じた複数の受光期間において複数の第2の受光信号を取得し、前記複数の第1の受光信号に基づいて、前記距離情報の算出に使用する第2の受光信号を選択するよう、前記測距光発光手段、前記撮像手段、前記受光制御手段および前記距離情報算出手段を制御する制御手段とを備えたことを特徴とする測距装置。
The first distance measuring light modulated so that the intensity varies with time in a predetermined period and the second distance measuring light modulated in a pulse wave having a constant intensity in the predetermined period can be switched. Ranging light emitting means for
An imaging means having a plurality of light receiving elements for outputting a light reception signal corresponding to the amount of received light;
A light receiving control means for controlling a light receiving period of the imaging means;
Distance information calculating means for calculating distance information representing a distance to a subject for each light receiving element based on the light receiving signal;
The first ranging light is emitted, a plurality of first received light signals are acquired in a plurality of light receiving periods having different phases in a modulation period of the first ranging light, and the first received light signals are Based on this, a phase difference between the first distance measuring light and the reflected light of the first distance measuring light is calculated for each light receiving element, and emission of the second distance measuring light is started based on the phase difference. A phase is changed so as to be different from the light emission start phase of the first distance measuring light, the second distance measuring light is emitted, and a plurality of signals corresponding to the phase difference in the modulation period of the second distance measuring light are emitted. A plurality of second light reception signals are acquired during the light reception period, and the distance measurement light emission is performed so as to select a second light reception signal used for calculating the distance information based on the plurality of first light reception signals. And a control means for controlling the imaging means, the light reception control means, and the distance information calculation means. Distance measuring apparatus according to claim.
前記測距光発光手段は、前記複数の受光素子について算出した複数の位相差のうち、最小位相差分前記第2の測距光の発光開始位相を前記第1の測距光の発光開始位相から早めて、前記第2の測距光を発光する手段であり、
前記受光制御手段は、前記複数の位相差のうち、最大位相差と前記最小位相差との差分位相差が大きいほど、より多くの受光期間において前記第2の受光信号を取得する手段であることを特徴とする請求項1記載の測距装置。
The ranging light emitting unit calculates a minimum phase difference of the plurality of phase differences calculated for the plurality of light receiving elements from the emission starting phase of the first ranging light. A means for emitting the second distance measuring light earlier,
The light reception control means is means for acquiring the second light reception signal in a larger number of light reception periods as the difference phase difference between the maximum phase difference and the minimum phase difference among the plurality of phase differences is larger. The distance measuring apparatus according to claim 1.
前記距離情報算出手段は、前記位相差と前記最小位相差との差分位相差に基づいて、前記複数の第2の受光信号のうち、前記距離情報の算出に使用する第2の受光信号を選択する手段であることを特徴とする請求項1または2記載の測距装置。   The distance information calculation means selects a second light reception signal used for calculating the distance information from the plurality of second light reception signals based on a differential phase difference between the phase difference and the minimum phase difference. The distance measuring apparatus according to claim 1, wherein the distance measuring apparatus is a means for performing the operation. 前記測距光発光手段は、前記第2の測距光を、前記第1の測距光の変調周期と同一周期にて、該第1の測距光の変調周期よりも短い期間発光する手段であることを特徴とする請求項1から3のいずれか1項記載の測距装置。   The distance measuring light emitting means emits the second distance measuring light at the same period as the modulation period of the first distance measuring light and for a period shorter than the modulation period of the first distance measuring light. The distance measuring device according to any one of claims 1 to 3, wherein 前記測距光発光手段は、前記第2の測距光を、前記第1の測距光の変調周期の1/4の期間発光する手段であり、
前記受光制御手段は、前記第2の測距光の反射光の受光期間を、前記第1の測距光の変調周期の1/4期間または1/2期間となるように制御する手段であることを特徴とする請求項1から4のいずれか1項記載の測距装置。
The distance measuring light emitting means is a means for emitting the second distance measuring light for a period of 1/4 of the modulation period of the first distance measuring light,
The light receiving control means is a means for controlling the light receiving period of the reflected light of the second distance measuring light to be ¼ period or ½ period of the modulation period of the first distance measuring light. The distance measuring device according to claim 1, wherein
前記距離情報算出手段は、前記選択した第2の受光信号が複数の受光期間に跨る場合、信号レベルが大きい受光期間側の第2の受光信号を前記距離情報の算出に使用する手段であることを特徴とする請求項1から5のいずれか1項記載の測距装置。   The distance information calculation means is means for using the second light reception signal on the light reception period side having a high signal level for the calculation of the distance information when the selected second light reception signal extends over a plurality of light reception periods. The distance measuring apparatus according to claim 1, wherein: 前記距離情報算出手段は、前記複数の第1の受光信号に基づいて外光成分を表す外光信号を算出し、該外光信号により、前記選択した第2の受光信号を補正する手段であることを特徴とする請求項1から6のいずれか1項記載の測距装置。   The distance information calculation unit is a unit that calculates an external light signal representing an external light component based on the plurality of first light reception signals, and corrects the selected second light reception signal based on the external light signal. The distance measuring device according to claim 1, wherein 所定周期にて強度が時間的に変化するように変調された第1の測距光、および前記所定周期にて強度が一定のパルス波状に変調された第2の測距光を切換可能に発光する測距光発光手段と、
受光光量に応じた受光信号を出力する複数の受光素子を有する撮像手段と、
前記撮像手段の受光期間を制御する受光制御手段と、
前記受光信号に基づいて、被写体までの距離を表す距離情報を前記受光素子毎に算出する距離情報算出手段とを備えた測距装置における測距方法であって、
前記第1の測距光を発光し、
該第1の測距光の変調周期における位相が異なる複数の受光期間において複数の第1の受光信号を取得し、
前記複数の第1の受光信号に基づいて、前記第1の測距光と該第1の測距光の反射光との位相差を前記受光素子毎に算出し、
該位相差に基づいて前記第2の測距光の発光開始位相を前記第1の測距光の発光開始位相とは異なるように変更して該第2の測距光を発光し、
該第2の測距光の変調周期における前記位相差に応じた複数の受光期間において複数の第2の受光信号を取得し、
前記複数の第1の受光信号に基づいて、前記距離情報の算出に使用する第2の受光信号を選択することを特徴とする測距方法。
The first distance measuring light modulated so that the intensity varies with time in a predetermined period and the second distance measuring light modulated in a pulse wave having a constant intensity in the predetermined period can be switched. Ranging light emitting means for
An imaging means having a plurality of light receiving elements for outputting a light reception signal corresponding to the amount of received light;
A light receiving control means for controlling a light receiving period of the imaging means;
A distance measuring method in a distance measuring device comprising distance information calculating means for calculating distance information representing a distance to a subject for each of the light receiving elements based on the light receiving signal,
Emitting the first ranging light;
Obtaining a plurality of first received light signals in a plurality of light receiving periods having different phases in the modulation period of the first ranging light;
Based on the plurality of first light receiving signals, a phase difference between the first distance measuring light and the reflected light of the first distance measuring light is calculated for each light receiving element,
Based on the phase difference, the emission start phase of the second ranging light is changed to be different from the emission start phase of the first ranging light, and the second ranging light is emitted.
Obtaining a plurality of second light receiving signals in a plurality of light receiving periods according to the phase difference in the modulation period of the second ranging light;
2. A distance measuring method, comprising: selecting a second received light signal used for calculating the distance information based on the plurality of first received light signals.
所定周期にて強度が時間的に変化するように変調された第1の測距光、および前記所定周期にて強度が一定のパルス波状に変調された第2の測距光を切換可能に発光する測距光発光手段と、
受光光量に応じた受光信号を出力する複数の受光素子を有する撮像手段と、
前記撮像手段の受光期間を制御する受光制御手段と、
前記受光信号に基づいて、被写体までの距離を表す距離情報を前記受光素子毎に算出する距離情報算出手段とを備えた測距装置における測距方法をコンピュータに実行させるためのプログラムであって、
前記第1の測距光を発光する手順と、
該第1の測距光の変調周期における位相が異なる複数の受光期間において複数の第1の受光信号を取得する手順と、
前記複数の第1の受光信号に基づいて、前記第1の測距光と該第1の測距光の反射光との位相差を前記受光素子毎に算出する手順と、
該位相差に基づいて前記第2の測距光の発光開始位相を前記第1の測距光の発光開始位相とは異なるように変更して該第2の測距光を発光する手順と、
該第2の測距光の変調周期における前記位相差に応じた複数の受光期間において複数の第2の受光信号を取得する手順と、
前記複数の第1の受光信号に基づいて、前記距離情報の算出に使用する第2の受光信号を選択する手順とを有することを特徴とするプログラム。
The first distance measuring light modulated so that the intensity varies with time in a predetermined period and the second distance measuring light modulated in a pulse wave having a constant intensity in the predetermined period can be switched. Ranging light emitting means for
An imaging means having a plurality of light receiving elements for outputting a light reception signal corresponding to the amount of received light;
A light receiving control means for controlling a light receiving period of the imaging means;
A program for causing a computer to execute a distance measuring method in a distance measuring device including distance information calculating means for calculating distance information representing a distance to a subject for each of the light receiving elements based on the light receiving signal,
A procedure for emitting the first distance measuring light;
Obtaining a plurality of first received light signals in a plurality of light receiving periods having different phases in the modulation period of the first ranging light;
Calculating a phase difference between the first ranging light and the reflected light of the first ranging light for each of the light receiving elements based on the plurality of first received light signals;
Changing the light emission start phase of the second distance measuring light based on the phase difference to be different from the light emission start phase of the first distance measuring light, and emitting the second distance measuring light;
Obtaining a plurality of second light receiving signals in a plurality of light receiving periods according to the phase difference in the modulation period of the second ranging light;
And a procedure for selecting a second light reception signal used for calculating the distance information based on the plurality of first light reception signals.
JP2007277142A 2007-10-25 2007-10-25 Ranging device, ranging method and program Active JP4955508B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007277142A JP4955508B2 (en) 2007-10-25 2007-10-25 Ranging device, ranging method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007277142A JP4955508B2 (en) 2007-10-25 2007-10-25 Ranging device, ranging method and program

Publications (2)

Publication Number Publication Date
JP2009103627A JP2009103627A (en) 2009-05-14
JP4955508B2 true JP4955508B2 (en) 2012-06-20

Family

ID=40705428

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007277142A Active JP4955508B2 (en) 2007-10-25 2007-10-25 Ranging device, ranging method and program

Country Status (1)

Country Link
JP (1) JP4955508B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101668869B1 (en) * 2009-05-29 2016-10-28 삼성전자주식회사 Depth sensor, 3D image sensor and Depth sensing method there-of
KR101669412B1 (en) 2010-11-01 2016-10-26 삼성전자주식회사 Method and apparatus of measuring depth information for 3d camera
US10481263B2 (en) 2016-03-10 2019-11-19 Ricoh Company, Ltd. Range finding apparatus, moveable apparatus, robot, three dimensional measurement apparatus, method of measuring three dimensional information, and storage medium
JP6848364B2 (en) 2016-11-10 2021-03-24 株式会社リコー Distance measuring device, mobile body, robot, 3D measuring device, surveillance camera and distance measuring method
CN112799087A (en) * 2020-12-30 2021-05-14 艾普柯微电子(江苏)有限公司 Distance measuring method and distance measuring device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56133669A (en) * 1980-03-25 1981-10-19 Toshiba Corp Pulse and cw radar device
JPH01150878A (en) * 1987-12-09 1989-06-13 Omron Tateisi Electron Co Safety device in laser applied equipment
JPH04157393A (en) * 1990-10-19 1992-05-29 Nec Corp Laser alarm device
JP3746370B2 (en) * 1998-03-13 2006-02-15 スタンレー電気株式会社 Radar transceiver
JP4363296B2 (en) * 2004-10-01 2009-11-11 パナソニック電工株式会社 Distance image sensor
JP4595135B2 (en) * 2004-10-07 2010-12-08 株式会社メガチップス Distance measuring system and distance measuring method
JP4820083B2 (en) * 2004-11-17 2011-11-24 富士通株式会社 Radar device control method, radar device, and program

Also Published As

Publication number Publication date
JP2009103627A (en) 2009-05-14

Similar Documents

Publication Publication Date Title
JP4955508B2 (en) Ranging device, ranging method and program
JP2009085705A (en) Apparatus and method for distance measurement and program
JP5224319B2 (en) Stereoscopic imaging device, stereoscopic imaging device control method, and program
KR102040152B1 (en) An 3D image apparatus and method for generating a depth image in the 3D image apparatus
CN103813118B (en) Drive dynamic control device and drive control method and video output device
JP5739174B2 (en) Distance information extraction method and optical apparatus employing the method
KR101854188B1 (en) 3D image acquisition apparatus and method of acqiring depth information in the 3D image acquisition apparatus
US10545237B2 (en) Method and device for acquiring distance information
KR101955334B1 (en) 3D image acquisition apparatus and method of extractig depth information in the 3D image acquisition apparatus
CN108353158B (en) Image capturing apparatus and control method thereof
KR102194233B1 (en) Apparatus and method for generating a depth image
JP6427998B2 (en) Optical flight rangefinder
JP2017201760A (en) Imaging device and distance measuring device
JP2016045240A (en) Image processing device, image processing method, image-capturing device, and control method thereof
US20160065942A1 (en) Depth image acquisition apparatus and method of acquiring depth information
US10509125B2 (en) Method and device for acquiring distance information
JP2001313958A (en) Three-dimensional image reader
JP4955507B2 (en) Ranging device, ranging method and program
CN105848587A (en) Photoacoustic microscope
JP5021410B2 (en) Ranging device, ranging method and program
JP7149941B2 (en) Apparatus and method
US9100561B2 (en) Image pickup apparatus that provides a correlation image
US20100091264A1 (en) Distance measurement apparatus and method
JPWO2016067425A1 (en) Image processing apparatus, endoscope apparatus, and image processing method
JP2011175529A (en) Image processing apparatus, imaging apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100707

RD15 Notification of revocation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7435

Effective date: 20110418

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110523

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: 20120306

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: 20120315

R150 Certificate of patent or registration of utility model

Ref document number: 4955508

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150323

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250