JP4709126B2 - Imaging apparatus, method, and program - Google Patents

Imaging apparatus, method, and program Download PDF

Info

Publication number
JP4709126B2
JP4709126B2 JP2006331333A JP2006331333A JP4709126B2 JP 4709126 B2 JP4709126 B2 JP 4709126B2 JP 2006331333 A JP2006331333 A JP 2006331333A JP 2006331333 A JP2006331333 A JP 2006331333A JP 4709126 B2 JP4709126 B2 JP 4709126B2
Authority
JP
Japan
Prior art keywords
photographing
distance
subject
unit
subjects
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
JP2006331333A
Other languages
Japanese (ja)
Other versions
JP2008147894A (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 JP2006331333A priority Critical patent/JP4709126B2/en
Publication of JP2008147894A publication Critical patent/JP2008147894A/en
Application granted granted Critical
Publication of JP4709126B2 publication Critical patent/JP4709126B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、撮影により画像を取得する撮影手段から被写体までの被写体距離を算出する機能を備えた撮影装置および方法並びに撮影方法をコンピュータに実行させるためのプログラムに関するものである。   The present invention relates to a photographing apparatus and method having a function of calculating a subject distance from a photographing means for obtaining an image by photographing, and a program for causing a computer to execute the photographing method.

被写体を撮影して画像を取得する撮影装置において、被写体に向けて出射した近赤外線等の測距光が被写体により反射して戻ってくるまでの時間を計測することにより、撮影装置から被写体までの距離を測定して、距離画像を作成することが行われている。このように光の反射を用いて被写体までの距離の測定(測距)を行う方式はTOF(Time Of Flight)方式と称されるが、TOF方式を用いる場合には、被写体からの反射光が得られなければ測距を行うことができない。また、反射光が得られたとしても、光量が小さいとノイズの影響が大きくなることから、正確な測距を行うことができない。例えば、被写体が撮影装置から遠い位置にある場合には十分な光量の反射光が得られないため、正確に測距を行うことができない。   In a photographing device that captures an image by photographing a subject, the distance from the photographing device to the subject is measured by measuring the time until ranging light such as near infrared rays emitted toward the subject is reflected by the subject and returns. A distance image is created by measuring a distance. A method of measuring the distance to the subject (ranging) using the reflection of light in this manner is called a TOF (Time Of Flight) method. When the TOF method is used, the reflected light from the subject is not reflected. If it cannot be obtained, ranging cannot be performed. Even if the reflected light is obtained, the influence of noise increases if the amount of light is small, so accurate distance measurement cannot be performed. For example, when the subject is at a position far from the photographing apparatus, a sufficient amount of reflected light cannot be obtained, and thus accurate distance measurement cannot be performed.

このような場合、反射光の検出期間を長くすれば、測距に必要な十分な光量の反射光を受光することができる。しかしながら、反射光の検出期間を長くすると、被写体が撮影装置に近い場合には、反射光を受光する光検出素子が飽和しやすくなる。光検出素子が飽和すると、反射光の受光光量と光検出素子の出力信号とが対応しなくなるため、正確に測距を行うことができなくなる。   In such a case, if the detection period of the reflected light is lengthened, a sufficient amount of reflected light necessary for distance measurement can be received. However, if the detection period of the reflected light is lengthened, the light detection element that receives the reflected light is likely to be saturated when the subject is close to the photographing apparatus. When the light detection element is saturated, the received light amount of the reflected light does not correspond to the output signal of the light detection element, so that accurate distance measurement cannot be performed.

このため、光検出素子が生成した信号電荷を集積する検出期間を複数設定し、設定した複数の検出期間から、光検出素子において許容される電荷量を超えない範囲で、検出される電荷量が最大となる検出期間を選択し、検出した期間を用いて測距を行うことにより、ノイズの影響をできるだけ少なくして被写体までの距離を算出する手法が提案されている(特許文献1参照)。また、特許文献1においては、反射光から電荷を生成する領域の面積を変化させることにより、反射光の検出感度を高めるようにしている。
特開2006−84430号公報
For this reason, a plurality of detection periods for integrating the signal charges generated by the light detection element are set, and the detected charge amount is within a range not exceeding the charge amount allowed for the light detection element from the set detection periods. There has been proposed a method of calculating a distance to a subject with as little influence as possible by selecting a maximum detection period and performing distance measurement using the detected period (see Patent Document 1). In Patent Document 1, the detection sensitivity of reflected light is increased by changing the area of a region that generates charge from reflected light.
JP 2006-84430 A

しかしながら、TOF方式により測距を行う場合、特許文献1のような手法を用いても、やはりノイズの影響は避けられない。このため、ノイズの影響を受けることなく測距を行う手法が望まれている。   However, when the distance is measured by the TOF method, the influence of noise is still unavoidable even if a technique such as Patent Document 1 is used. For this reason, a method for performing distance measurement without being affected by noise is desired.

本発明は上記事情に鑑みなされたものであり、TOF方式において測距を行う場合のように、ノイズの影響を受けることなく測距を行うことができるようにすることを目的とする。   The present invention has been made in view of the above circumstances, and an object thereof is to enable distance measurement without being affected by noise as in the case of distance measurement in the TOF method.

本発明による撮影装置は、撮影により画像を取得する撮影手段を備え、画角を平行移動させつつ撮影を行う撮影装置であって、
前記画角を平行移動させつつ複数回の撮影を行うことにより複数の前記画像を取得するよう前記撮影手段を制御する制御手段と、
前記画像に含まれる複数の被写体を認識し、前記複数の画像間における対応する前記被写体間の前記複数の画像内における変位量を算出し、該変位量の大小関係に基づいて前記撮影手段から前記複数の被写体までの距離である被写体距離を算出する距離算出手段とを備えたことを特徴とするものである。
An imaging apparatus according to the present invention is an imaging apparatus that includes an imaging unit that acquires an image by imaging, and performs imaging while translating an angle of view,
Control means for controlling the photographing means so as to obtain a plurality of the images by performing photographing a plurality of times while translating the angle of view;
Recognizing a plurality of subjects included in the image, calculating a displacement amount in the plurality of images between the corresponding subjects between the plurality of images, and from the photographing unit based on a magnitude relationship of the displacement amount And a distance calculating means for calculating a subject distance, which is a distance to a plurality of subjects.

なお、本発明による撮影装置においては、前記撮影手段の平行移動量を取得する平行移動量取得手段をさらに備えるものとし、
前記距離算出手段を、前記撮影手段の平行移動量に基づいて前記複数の被写体の絶対的な被写体距離を算出する手段としてもよい。
The photographing apparatus according to the present invention further includes a parallel movement amount obtaining unit that obtains a parallel movement amount of the photographing unit,
The distance calculating unit may be a unit that calculates absolute subject distances of the plurality of subjects based on a parallel movement amount of the photographing unit.

また、本発明による撮影装置においては、前記撮影手段を平行移動させる移動手段をさらに備えるものとし、
前記平行移動量取得手段を、前記移動手段による前記撮影手段の平行移動量を取得する手段としてもよい。
The photographing apparatus according to the present invention further includes a moving unit that translates the photographing unit,
The parallel movement amount acquisition unit may be a unit that acquires a parallel movement amount of the photographing unit by the movement unit.

また、本発明による撮影装置においては、前記複数の被写体のうちの少なくとも1つの被写体の被写体距離の入力を受け付ける入力手段をさらに備えるものとし、
前記距離算出手段を、前記取得した被写体距離に基づいて前記被写体距離が入力された被写体以外の他の被写体の絶対的な被写体距離を算出する手段としてもよい。
The photographing apparatus according to the present invention further includes input means for receiving an input of a subject distance of at least one subject among the plurality of subjects.
The distance calculation unit may be a unit that calculates an absolute subject distance of a subject other than the subject to which the subject distance is input based on the acquired subject distance.

また、本発明による撮影装置においては、前記複数の被写体に光を照射し、該光の該被写体による反射光を前記撮影手段により検出し、前記光が出射されてから前記反射光が前記撮影手段により検出されるまでの時間に基づいて前記複数の被写体の被写体距離を算出する光学的距離算出手段と、
前記距離算出手段により算出された被写体距離に基づいて、前記反射光を検出する際の前記撮影手段の露出を設定する露出設定手段とをさらに備えるものとしてもよい。
In the photographing apparatus according to the present invention, the plurality of subjects are irradiated with light, reflected light of the light from the subject is detected by the photographing means, and the reflected light is emitted from the light after the light is emitted. Optical distance calculating means for calculating subject distances of the plurality of subjects based on time until detected by
An exposure setting unit that sets an exposure of the photographing unit when detecting the reflected light based on the subject distance calculated by the distance calculating unit may be further provided.

ここで、「光学的距離算出手段」は、上記TOF方式により測距を行う手段である。   Here, the “optical distance calculation means” is a means for performing distance measurement by the TOF method.

「露出を設定する」とは、露出時間を設定するものであってもよく、複数の被写体に照射する光の光量を設定するものであってもよい。   “Setting exposure” may be to set an exposure time, or to set the amount of light to be irradiated to a plurality of subjects.

本発明による撮影方法は、撮影により画像を取得する撮影手段を備え、画角を平行移動させつつ撮影を行う撮影装置における撮影方法であって、
前記画角を平行移動させつつ複数回の撮影を行うことにより複数の前記画像を取得するよう前記撮影手段を制御し、
前記画像に含まれる複数の被写体を認識し、
前記複数の画像間における対応する前記被写体間の前記複数の画像内における変位量を算出し、
該変位量の大小関係に基づいて前記撮影手段から前記複数の被写体までの距離である被写体距離を算出することを特徴とするものである。
A photographing method according to the present invention is a photographing method in a photographing apparatus that includes photographing means for obtaining an image by photographing, and performs photographing while translating an angle of view,
Controlling the photographing means to acquire a plurality of the images by performing a plurality of times of photographing while translating the angle of view;
Recognizing a plurality of subjects included in the image;
Calculating a displacement amount in the plurality of images between the corresponding subjects between the plurality of images;
A subject distance, which is a distance from the photographing unit to the plurality of subjects, is calculated based on the magnitude relationship of the displacement amount.

なお、本発明による撮影方法をコンピュータに実行させるためのプログラムとして提供してもよい。   In addition, you may provide as a program for making a computer perform the imaging | photography method by this invention.

本発明によれば、画角を平行移動させつつ複数回の撮影を行うことにより複数の画像が取得され、複数の画像に含まれる複数の被写体が認識される。そして、複数の画像間における対応する被写体間の複数の画像内における変位量が算出される。ここで、被写体までの距離が小さい場合と大きい場合とでは、画角が平行移動した際には、前者の変位量は後者の変位量と比較して大きくなる。このため、TOF方式のように光を用いることなく、変位量の大小関係に基づいて被写体距離を算出することができ、その結果、ノイズの影響を受けることなく測距を行うことができる。   According to the present invention, a plurality of images are acquired by performing photographing a plurality of times while the angle of view is translated, and a plurality of subjects included in the plurality of images are recognized. Then, the displacement amount in the plurality of images between the corresponding subjects among the plurality of images is calculated. Here, in the case where the distance to the subject is small and large, when the angle of view is translated, the former displacement amount becomes larger than the latter displacement amount. Therefore, the subject distance can be calculated based on the magnitude relationship of the displacement amount without using light as in the TOF method, and as a result, distance measurement can be performed without being affected by noise.

また、撮影手段の平行移動量を取得して複数の被写体の絶対的な被写体距離を算出することにより、複数の被写体までの絶対的な被写体距離を取得することができる。   Also, by obtaining the parallel movement amount of the photographing means and calculating the absolute subject distance of the plurality of subjects, the absolute subject distance to the plurality of subjects can be obtained.

また、撮影手段を平行移動させ、平行移動される撮影手段の平行移動量を取得することにより、撮影手段の正確な移動量を用いて、複数の被写体までの絶対的な被写体距離を算出することができる。   In addition, by calculating the absolute subject distance to a plurality of subjects by using the accurate amount of movement of the photographing means by acquiring the parallel movement amount of the photographing means that is translated by moving the photographing means in parallel. Can do.

また、複数の被写体のうちの少なくとも1つの被写体の被写体距離の入力を受け付けることにより、これを用いて、他の被写体の絶対的な被写体距離を算出することができる。   In addition, by receiving an input of the subject distance of at least one subject among the plurality of subjects, it is possible to calculate the absolute subject distance of other subjects using this.

また、被写体に光を照射し、光の該被写体による反射光を撮影手段により検出し、光が出射されてからその反射光が撮影手段により検出されるまでの時間に基づいて被写体距離を算出するに際し、変位量に基づいて算出した被写体距離に基づいて反射光を検出する際の撮影手段の露出を設定することにより、TOF方式にて測距を行う際に、反射光にノイズが含まれる可能性が高い、撮影手段から離れた位置にある被写体について、反射光を検出可能なように撮影手段の露出を制御することができる。したがって、被写体距離が大きい場合であっても、TOF方式を用いて正確に測距を行うことができる。   The subject is irradiated with light, the reflected light of the subject is detected by the photographing means, and the subject distance is calculated based on the time from when the light is emitted until the reflected light is detected by the photographing means. At this time, by setting the exposure of the photographing means when detecting the reflected light based on the subject distance calculated based on the amount of displacement, the reflected light may contain noise when measuring the distance using the TOF method. The exposure of the photographing means can be controlled so that the reflected light can be detected with respect to a subject that is highly distant from the photographing means. Therefore, even when the subject distance is large, accurate distance measurement can be performed using the TOF method.

以下、図面を参照して本発明の実施形態について説明する。図1は本発明の第1の実施形態による撮影装置を適用したデジタルカメラの構成を示す概略ブロック図である。図1に示すデジタルカメラ1は、動作モードスイッチ、上下左右ボタン、レリーズボタンおよび電源スイッチ等の操作系10と、これらのスイッチ類の操作内容をCPU42に伝えるためのインターフェース部分である操作系制御部12とを有している。   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 a digital camera to which the photographing apparatus according to the first embodiment of the present invention is applied. The digital camera 1 shown in FIG. 1 includes an operation system 10 such as an operation mode switch, up / down / left / right buttons, a release button, and a power switch, and an operation system control unit that is an interface part for transmitting the operation content of these switches to the CPU 42. 12.

光学系としては、レンズ21を有している。レンズ21は、被写体にピントを合わせるためのフォーカスレンズ、ズーム機能を実現するためのズームレンズ等の複数の機能別レンズにより構成され、レンズ駆動部22により各機能別レンズの位置が調整される。   As an optical system, a lens 21 is provided. The lens 21 includes 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 the position of each functional lens is adjusted by a lens driving unit 22.

また、絞り23は絞り駆動部24によって駆動される。この絞り駆動部24は絞り径の調整を行う。   The diaphragm 23 is driven by a diaphragm driving unit 24. The aperture drive unit 24 adjusts the aperture diameter.

シャッタ25はメカニカルシャッタであり、シャッタ駆動部26によって駆動される。シャッタ駆動部26は、レリーズボタンの押下により発生する信号に応じて、シャッタ25の開閉の制御を行う。   The shutter 25 is a mechanical shutter and is driven by a shutter driving unit 26. The shutter driving unit 26 controls opening / closing of the shutter 25 in accordance with a signal generated by pressing the release button.

光学系の後方には撮像素子27を有している。撮像素子27は、距離および画像の双方を検出可能な距離画像CMOSセンサからなるものであり、多数の受光素子からなる画素を2次元的に配列した光電面を有しており、光学系を通過した被写体光がこの光電面に結像し、光電変換される。光電面の前方には、各画素に光を集光するためのマイクロレンズアレイと、R,G,B各色のフィルタが規則的に配列されたカラーフィルタアレイとが配置されている。撮像素子27は、撮像素子制御部28から供給される垂直転送クロックおよび水平転送クロックに同期して、画素毎に蓄積された電荷を1ラインずつシリアルなアナログ撮像信号として出力する。各画素において電荷を蓄積する時間、すなわち、露出時間は、撮像素子制御部28により制御される。   An image sensor 27 is provided behind the optical system. The image sensor 27 is a distance image CMOS sensor that can detect both distance and image, and has a photocathode in which pixels including a plurality of light receiving elements are two-dimensionally arranged and passes through an optical system. The subject light thus formed forms an image on the photoelectric surface and is photoelectrically converted. In front of the photocathode, a microlens array for condensing light on each pixel and a color filter array in which filters of R, G, and B colors are regularly arranged are arranged. The image sensor 27 outputs the electric charge accumulated for each pixel as a serial analog image signal for each line in synchronization with the vertical transfer clock and the horizontal transfer clock supplied from the image sensor control unit 28. The time for accumulating charges in each pixel, that is, the exposure time is controlled by the image sensor control unit 28.

ここで、画素毎の露出時間の制御は、電子シャッタスピードを画素毎に変化させることにより制御することができる。例えば、露出時間を短くしたいときはシャッタスピードを速くし、露出時間を長くしたいときはシャッタスピードを遅くすればよい。また、撮像素子27は撮像素子制御部28により、あらかじめ定められた大きさのアナログ撮像信号が得られるようにゲインが調整されている。   Here, the exposure time for each pixel can be controlled by changing the electronic shutter speed for each pixel. For example, when it is desired to shorten the exposure time, the shutter speed is increased. When it is desired to increase the exposure time, the shutter speed may be decreased. The gain of the image sensor 27 is adjusted by the image sensor control unit 28 so that an analog image signal having a predetermined size can be obtained.

また、撮像素子27は、後述するようにTOF方式にて測距を行う際には、発光部41が出射した測距光の被写体による反射光を撮像して反射光の撮像信号を取得する。なお、撮像素子27は、TOF方式にて測距を行う際には、後述する露出設定部53により画素毎に設定された露出時間となるように、撮像素子制御部28により制御される。   Further, as described later, the imaging device 27 captures reflected light from the subject of the ranging light emitted from the light emitting unit 41 and obtains an imaging signal of the reflected light when performing distance measurement using the TOF method. Note that the image sensor 27 is controlled by the image sensor control unit 28 so as to have an exposure time set for each pixel by an exposure setting unit 53 to be described later when performing distance measurement by the TOF method.

なお、本実施形態においては、レンズ21、絞り23、シャッタ25および撮像素子27が撮像系20を構成する。   In the present embodiment, the lens 21, the diaphragm 23, the shutter 25, and the imaging element 27 constitute the imaging system 20.

被写体の撮影時において撮像素子27から取り込まれたアナログ撮像信号は、アナログ信号処理部30に入力される。アナログ信号処理部30は、アナログ撮像信号のノイズを除去する相関2重サンプリング回路(CDS)と、アナログ撮像信号のゲインを調節するオートゲインコントローラ(AGC)と、アナログ撮像信号をデジタル信号に変換するA/Dコンバータ(ADC)とからなる。このデジタル信号に変換された画像データは、画素毎にR,G,Bの濃度値を持つRAW画像データである。なお、以降の説明において画像データおよび画像とは、TOF方式により測距を行う際に取得される反射光の撮像信号から取得されるものではなく、被写体を撮影することにより取得されるものを表すこととする。   An analog image signal captured from the image sensor 27 at the time of photographing a subject is input to the analog signal processing unit 30. The analog signal processing unit 30 converts a correlated double sampling circuit (CDS) that removes noise of the analog imaging signal, an auto gain controller (AGC) that adjusts the gain of the analog imaging signal, and converts the analog imaging signal into a digital signal. It consists of an A / D converter (ADC). The image data converted into the digital signal is RAW image data having R, G, and B density values for each pixel. In the following description, the image data and the image are not acquired from the reflected light imaging signal acquired when the distance is measured by the TOF method, but are acquired by photographing the subject. I will do it.

画像入力コントローラ31は、アナログ信号処理部30から入力されたRAW画像データをフレームメモリ33に書き込む。   The image input controller 31 writes the RAW image data input from the analog signal processing unit 30 into the frame memory 33.

タイミングジェネレータ32は、タイミング信号を発生させるものであり、このタイミング信号をシャッタ駆動部26、撮像素子制御部28、アナログ信号処理部30に供給することにより、レリーズボタンの操作、シャッタ25の開閉、撮像素子27の電荷の取込み、およびアナログ信号処理部30の処理の同期をとっている。   The timing generator 32 generates a timing signal. By supplying this timing signal to the shutter drive unit 26, the image sensor control unit 28, and the analog signal processing unit 30, the release button is operated, the shutter 25 is opened and closed, The capturing of the charge of the image sensor 27 and the processing of the analog signal processing unit 30 are synchronized.

フレームメモリ33は、画像データに対して後述の各種処理を行う際に使用する作業用メモリである。   The frame memory 33 is a working memory that is used when various kinds of processing described later are performed on the image data.

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

表示制御部36は、撮影により取得した画像データの画像を液晶モニタ37に表示させたり、記録メディア35に保存されている画像データの画像を液晶モニタ37に表示させたりするためのものである。   The display control unit 36 is for displaying an image of image data acquired by photographing on the liquid crystal monitor 37 and for displaying an image of image data stored in the recording medium 35 on the liquid crystal monitor 37.

画像処理部38は、画像データに対して、階調補正、シャープネス補正、色補正等の画質補正処理、RAW画像データを輝度信号であるYデータと、青色色差信号であるCbデータおよび赤色色差信号であるCrデータとからなるYCデータに変換するYC処理を行う。   The image processing unit 38 performs image quality correction processing such as gradation correction, sharpness correction, and color correction on the image data, RAW image data is Y data that is a luminance signal, Cb data that is a blue color difference signal, and a red color difference signal. YC processing for converting into YC data consisting of Cr data is performed.

圧縮/伸長処理部39は、画像処理部38によって補正・変換処理が行われた画像の画像データに対して、例えば、JPEG等の圧縮形式で圧縮処理を行い、画像ファイルを生成する。また、圧縮/伸長処理部39は、画像を再生する場合には、記録メディア35から圧縮された画像ファイルを読み出して伸長処理を行う。伸長後の画像データは液晶モニタ37に出力される。   The compression / decompression processing unit 39 performs a compression process on the image data of the image subjected to the correction / conversion process by the image processing unit 38 in a compression format such as JPEG, and generates an image file. In addition, when reproducing an image, the compression / decompression processing unit 39 reads the compressed image file from the recording medium 35 and performs an expansion process. The decompressed image data is output to the liquid crystal monitor 37.

内部メモリ40は、デジタルカメラ1において設定される各種定数、およびCPU42が実行するプログラム等を格納する。   The internal memory 40 stores various constants set in the digital camera 1, programs executed by the CPU 42, and the like.

発光部41は、TOF方式にて測距を行う際に、CPU42により制御されて、波長域が850nm程度の近赤外線からなる測距光を被写体に向けて出射する。被写体に向けて出射された測距光は被写体により反射して撮像素子27により検出される。なお、発光部41は、多数のLEDを面状に配列したり、半導体レーザとレンズとの組み合わせにより構成することができる。   The light emitting unit 41 is controlled by the CPU 42 when performing distance measurement by the TOF method, and emits distance measuring light composed of near infrared rays having a wavelength range of about 850 nm toward the subject. The distance measuring light emitted toward the subject is reflected by the subject and detected by the image sensor 27. In addition, the light emission part 41 can comprise many LED in a planar form, or can be comprised by the combination of a semiconductor laser and a lens.

CPU42は、操作系10および各種処理部からの信号に応じてデジタルカメラ1の本体各部を制御する。また、AF処理によりフォーカス位置を調整するよう撮像系20を制御する。また、AE処理により適切な露出が得られるように撮像系20を制御する。また、CPU42は、測距を行う際にレリーズボタンが押下されるまで、所定時間間隔にて連続して撮影を行うように撮像系20を制御する。   The CPU 42 controls each part of the main body of the digital camera 1 in accordance with signals from the operation system 10 and various processing units. Further, the imaging system 20 is controlled so as to adjust the focus position by the AF process. Further, the imaging system 20 is controlled so that an appropriate exposure can be obtained by the AE process. Further, the CPU 42 controls the imaging system 20 so as to continuously shoot at predetermined time intervals until the release button is pressed when performing distance measurement.

ここで、第1の実施形態においては、被写体の測距を行うために、撮影者がデジタルカメラ1を平行移動しながら撮影を行う。平行移動量取得部50は、デジタルカメラ1の平行移動量を取得する。ここで、平行移動量取得部50は加速度センサを備えており、加速度センサによりデジタルカメラ1の平行移動量を検出してデジタルカメラ1の平行移動量を取得する。なお、平行移動量の取得は加速度センサを用いるものに限定されるものではなく、例えば、デジタルカメラ1の底面にイメージセンサを設けて所定時間間隔にて複数の画像を順次取得し、複数の画像間において共通する被写体の画像上における移動量を、デジタルカメラ1の平行移動量として算出することにより取得するものであってもよい。また、デジタルカメラ1にGPS測定装置を設けることによりデジタルカメラ1の平行移動量を取得するものであってもよい。また、撮影者が操作系10から入力した平行移動量を取得するものであってもよい。   Here, in the first embodiment, the photographer performs photographing while moving the digital camera 1 in parallel in order to perform distance measurement of the subject. The parallel movement amount acquisition unit 50 acquires the parallel movement amount of the digital camera 1. Here, the parallel movement amount acquisition unit 50 includes an acceleration sensor, and the parallel movement amount of the digital camera 1 is acquired by detecting the parallel movement amount of the digital camera 1 using the acceleration sensor. The acquisition of the amount of parallel movement is not limited to using an acceleration sensor. For example, an image sensor is provided on the bottom surface of the digital camera 1 to sequentially acquire a plurality of images at predetermined time intervals, and a plurality of images are acquired. It may be obtained by calculating the amount of movement of the subject in common on the image as the amount of parallel movement of the digital camera 1. Moreover, the parallel movement amount of the digital camera 1 may be acquired by providing the digital camera 1 with a GPS measurement device. Alternatively, the translation amount input by the photographer from the operation system 10 may be acquired.

距離算出部51は、撮像系20が取得した複数の画像に含まれる被写体を認識し、複数の画像間における被写体の変位量から被写体距離を算出する。まず、変位量の算出について説明する。距離算出部51は、撮影により取得した画像からエッジを検出し、検出したエッジにより囲まれる領域を1つの被写体として認識する。図2は被写体の認識を説明するための図であり、図2(a)はエッジ検出前の画像、図2(b)はエッジ検出後の画像を示す。図2に示すように、エッジ検出により、後方にある2本の木、その前にある2台の車および最前にある人物がそれぞれ1つの被写体H1〜H5として認識される。   The distance calculation unit 51 recognizes a subject included in a plurality of images acquired by the imaging system 20, and calculates a subject distance from a displacement amount of the subject between the plurality of images. First, the calculation of the displacement amount will be described. The distance calculation unit 51 detects an edge from an image acquired by photographing, and recognizes an area surrounded by the detected edge as one subject. 2A and 2B are diagrams for explaining recognition of a subject. FIG. 2A shows an image before edge detection, and FIG. 2B shows an image after edge detection. As shown in FIG. 2, two trees at the rear, two cars in front of the tree, and a person in front are recognized as one subject H <b> 1 to H <b> 5 by edge detection.

また、距離算出部51は、所定時間間隔にて取得された2つの画像間において、被写体H1〜H5同士を対応づける。具体的には、被写体H1〜H5内の同一部分の画素同士を対応づける。そして、対応づけた被写体間の変位量を算出する。ここで、デジタルカメラ1が平行移動した場合、被写体までの距離が小さい場合と大きい場合とでは、前者の変位量は後者の変位量と比較して大きくなる。図3および図4は変位量の違いを説明するための図である。図3に示すように2つの同一の被写体H11,H12がデジタルカメラ1の画角内に存在する場合において、デジタルカメラ1が位置P1から位置P2に平行移動すると、デジタルカメラ1の画角は実線に示すものから破線に示すものに平行移動する。   Further, the distance calculation unit 51 associates the subjects H1 to H5 with each other between two images acquired at predetermined time intervals. Specifically, pixels in the same part in the subjects H1 to H5 are associated with each other. Then, the displacement amount between the associated subjects is calculated. Here, when the digital camera 1 moves in parallel, the displacement amount of the former is larger than the displacement amount of the latter when the distance to the subject is small and when the distance is large. 3 and 4 are diagrams for explaining the difference in displacement. As shown in FIG. 3, when two identical subjects H11 and H12 exist within the angle of view of the digital camera 1, when the digital camera 1 is translated from the position P1 to the position P2, the angle of view of the digital camera 1 is a solid line. Is moved in parallel from the one shown in FIG.

ここで、図4に示すように、デジタルカメラ1が位置P1にあるときに取得された画像G11と、位置P2にあるときに取得された画像G12とを比較する。デジタルカメラ1の画角内において、被写体H11は被写体H12よりもデジタルカメラ1の近くにあるため、撮影により取得された2つの画像G11、G12間においては、被写体H12上の画素の移動量V12は、被写体H11上の画素の移動量V11よりも大きいものとなる。   Here, as shown in FIG. 4, the image G11 acquired when the digital camera 1 is at the position P1 and the image G12 acquired when the digital camera 1 is at the position P2 are compared. Since the subject H11 is closer to the digital camera 1 than the subject H12 within the angle of view of the digital camera 1, the movement amount V12 of the pixel on the subject H12 is between two images G11 and G12 acquired by photographing. The amount of movement V11 of the pixel on the subject H11 is larger.

したがって、移動前後の画像G11,G12上における被写体H11および被写体H12の移動量V11,V12を、被写体H11,H12のデジタルカメラ1からの相対的な距離である被写体距離Lrとして算出することができる。例えば、図5に示すようにデジタルカメラ1の移動前後の画像G1,G2においては、2本の木H1,H2、2台の自動車H3,H4および人物H5の被写体距離Lrは、H5<H4<H3<H1,H2となるため、被写体H1〜H5の移動量V1〜V5の関係は、V5>V4>V3>V1,V2となる。したがって、2本の木H1,H2、2台の自動車H3,H4および人物H5のデジタルカメラ1からの相対的な被写体距離Lr1〜Lr5は、Lr5>Lr4>Lr3>Lr1,Lr2となる。   Therefore, the movement amounts V11 and V12 of the subject H11 and the subject H12 on the images G11 and G12 before and after the movement can be calculated as a subject distance Lr that is a relative distance of the subjects H11 and H12 from the digital camera 1. For example, as shown in FIG. 5, in the images G1 and G2 before and after the movement of the digital camera 1, the subject distance Lr of the two trees H1 and H2, the two cars H3 and H4, and the person H5 is H5 <H4 <. Since H3 <H1, H2, the relationship between the moving amounts V1-V5 of the subjects H1-H5 is V5> V4> V3> V1, V2. Accordingly, the relative subject distances Lr1 to Lr5 of the two trees H1 and H2, the two cars H3 and H4, and the person H5 from the digital camera 1 are Lr5> Lr4> Lr3> Lr1 and Lr2.

一方、本実施形態においては、平行移動量取得部50によりデジタルカメラ1の平行移動量が取得されている。したがって、デジタルカメラ1の平行移動量から画角内の被写体の絶対的な被写体距離Laを算出することができる。以下、絶対的な被写体距離Laの算出について説明する。   On the other hand, in this embodiment, the parallel movement amount of the digital camera 1 is acquired by the parallel movement amount acquisition unit 50. Therefore, the absolute subject distance La of the subject within the angle of view can be calculated from the parallel movement amount of the digital camera 1. Hereinafter, calculation of the absolute subject distance La will be described.

図6は絶対的な被写体距離の算出を説明するための図である。図6において、dは焦点距離、b1はデジタルカメラ1の移動前における撮像素子27の光電面GS1上における撮像素子27の中心から被写体Hまでの距離、b2はデジタルカメラ1の移動後における撮像素子27の光電面GS2上における撮像素子27の中心から被写体Hまでの距離、c=c1+c2はデジタルカメラ1の平行移動量である。したがって、デジタルカメラ1の移動前後における被写体Hの変位量はb1+b2となる。   FIG. 6 is a diagram for explaining the calculation of the absolute subject distance. 6, d is a focal length, b1 is a distance from the center of the image sensor 27 to the subject H on the photocathode GS1 of the image sensor 27 before the digital camera 1 is moved, and b2 is an image sensor after the digital camera 1 is moved. The distance from the center of the image sensor 27 to the subject H on the photocathode GS2 27, c = c1 + c2, is the parallel movement amount of the digital camera 1. Therefore, the displacement amount of the subject H before and after the movement of the digital camera 1 is b1 + b2.

ここで、移動前のデジタルカメラ1における撮像素子27と被写体Hとを結ぶ線分L0上において、レンズ21から被写体Hまでの距離をx、撮像素子27からレンズ21までの距離をy、線分L0が撮像素子27の光電面となす角度をθとすると、絶対的な被写体距離Laは下記の式(1)により表される。   Here, on the line segment L0 connecting the image sensor 27 and the subject H in the digital camera 1 before movement, the distance from the lens 21 to the subject H is x, the distance from the image sensor 27 to the lens 21 is y, and the line segment. When the angle L0 forms with the photocathode of the image sensor 27 is θ, the absolute subject distance La is expressed by the following equation (1).

La=x・sinθ (1)
ここで、x:y=c:b1+b2であるため、x=c・y/(b1+b2)となる。また、y=√(b1+d)、θ=arctan(d/b1)である。したがって、絶対的な被写体距離Laは下記の式(2)により算出することができる。
La = x · sin θ (1)
Here, since x: y = c: b1 + b2, x = c · y / (b1 + b2). Further, y = √ (b1 2 + d 2 ) and θ = arctan (d / b1). Therefore, the absolute subject distance La can be calculated by the following equation (2).

La=c・√(b1+d)・arctan(d/b1)/(b1+b2) (2)
距離算出部51は、連続して撮影される2枚の画像間における被写体の変位量および上記式(2)に基づいて、絶対的な被写体距離Laを移動前の画像における画素毎に算出する。これにより、図7に示すように、被写体距離Laに応じて被写体の色を変更した距離画像Lg0を生成することができる。なお、図7においてはハッチングが密であるほど被写体距離Laが大きいことを表している。
La = c · √ (b1 2 + d 2 ) · arctan (d / b1) / (b1 + b2) (2)
The distance calculation unit 51 calculates the absolute subject distance La for each pixel in the image before the movement, based on the amount of displacement of the subject between the two images photographed continuously and the above equation (2). Thereby, as shown in FIG. 7, a distance image Lg0 in which the color of the subject is changed in accordance with the subject distance La can be generated. In FIG. 7, the denser the hatching, the greater the subject distance La.

ここで、距離算出部51は、算出した被写体距離Laをデジタルカメラ1の移動前に取得した画像の各画素と対応づけてフレームメモリ33に一時的に記憶する。ここで、本実施形態においては、所定時間間隔にて撮影が行われるため、撮影が行われて新たな画像が取得される毎に、距離算出部51が被写体距離Laを算出し、新たに算出した被写体距離Laをフレームメモリ33に上書きする。   Here, the distance calculation unit 51 temporarily stores the calculated subject distance La in the frame memory 33 in association with each pixel of the image acquired before the movement of the digital camera 1. Here, in the present embodiment, since shooting is performed at predetermined time intervals, the distance calculation unit 51 calculates the subject distance La every time shooting is performed and a new image is acquired. The recorded subject distance La is overwritten in the frame memory 33.

光学的距離算出部52は、レリーズボタンが押下されると、発光部41が被写体に向けて測距光を出射してから、撮像素子27の各画素が測距光の被写体による反射光を検出するまでの時間を測定して、光学的な被写体距離Loを算出する。例えば上記特許文献1に記載されたように、発光部41から出射される光の強度が一定周期で周期的に変化するように強度変調し、強度変調した光の反射光を撮像素子27が受光することにより得られるアナログ撮像信号から、測距光に対する反射光の位相差を検出し、検出した位相差を用いて測距光が出射されてから測距光の反射光が検出されるまでの時間を算出し、算出した時間と光速とから光学的な被写体距離Loを算出する。   When the release button is pressed, the optical distance calculation unit 52 emits distance measuring light toward the subject, and each pixel of the image sensor 27 detects the reflected light of the distance measuring light from the subject. The time until this is measured, and the optical object distance Lo is calculated. For example, as described in Patent Document 1, the image sensor 27 receives reflected light of the intensity-modulated light that is intensity-modulated so that the intensity of the light emitted from the light-emitting unit 41 periodically changes at a constant period. The phase difference of the reflected light with respect to the distance measuring light is detected from the analog imaging signal obtained by performing the process until the distance measuring light is emitted using the detected phase difference until the reflected light of the distance measuring light is detected. Time is calculated, and an optical subject distance Lo is calculated from the calculated time and the speed of light.

なお、算出した被写体距離Loは、撮像素子27の各画素と対応づけられて、距離画像として記録メディア35に記録される。   The calculated subject distance Lo is associated with each pixel of the image sensor 27 and is recorded on the recording medium 35 as a distance image.

露出設定部53は、TOF方式による測距を行う際に、距離算出部51が算出した絶対的な被写体距離Laに基づいて、撮像素子27の各画素における露出時間を設定する。具体的には、撮像素子27の光電面上の各画素において、被写体距離Laが大きい被写体に対応する画素ほどシャッタスピードを遅くすることにより露出時間を長くして、より多くの電荷が検出されるように露出時間を設定する。なお、設定した露出時間は撮像素子制御部28に出力され、露出設定部53が設定した露出時間に基づいて撮像素子制御部28が撮像素子27の露出時間を制御する。これにより、反射光の強度が弱くなる、被写体距離Laが大きい被写体についても、十分な光量に相当する電荷を検出することができる。   The exposure setting unit 53 sets the exposure time in each pixel of the image sensor 27 based on the absolute subject distance La calculated by the distance calculation unit 51 when performing distance measurement by the TOF method. Specifically, in each pixel on the photocathode of the image sensor 27, a pixel corresponding to a subject with a large subject distance La increases the exposure time by slowing down the shutter speed, and more charges are detected. Set the exposure time as follows. The set exposure time is output to the image sensor control unit 28, and the image sensor control unit 28 controls the exposure time of the image sensor 27 based on the exposure time set by the exposure setting unit 53. As a result, it is possible to detect a charge corresponding to a sufficient amount of light even for a subject whose reflected light intensity is weak and whose subject distance La is large.

一方、被写体距離Laが小さい被写体に対応する画素については、シャッタスピードを速くして露出時間を短くすることにより、飽和しないように電荷を検出する。   On the other hand, for pixels corresponding to a subject with a small subject distance La, the charge is detected so as not to be saturated by increasing the shutter speed and shortening the exposure time.

なお、距離算出部51が被写体距離Laを算出する際に使用する画像の輝度を算出することにより、反射率が低い被写体(例えば暗い被写体)をあらかじめ求めておき、反射率が低い被写体に対応する撮像素子27の画素について露出時間を長くしてより多くの電荷が検出されるようにしてもよい。これにより、反射光の強度が弱くなる暗い被写体についても、正確に反射光を検出して測距を行うことができる。   In addition, by calculating the luminance of the image used when the distance calculating unit 51 calculates the subject distance La, a subject having a low reflectance (for example, a dark subject) is obtained in advance, and the subject corresponding to the subject having a low reflectance is dealt with. The exposure time of the pixels of the image sensor 27 may be lengthened to detect more charges. Thereby, it is possible to accurately detect the reflected light and perform distance measurement even for a dark subject whose reflected light intensity is weak.

次いで、第1の実施形態において行われる処理について説明する。図8は第1の実施形態において行われる処理を示すフローチャートである。操作系10から撮影の指示が入力されることによりCPU42が処理を開始し、撮像系20により所定時間間隔にて撮影を行う(ステップST1)。次いで、距離算出部51が撮影時間が隣接する2枚の画像の被写体を認識し(ステップST2)、2枚の画像における被写体を対応づけ(ステップST3)、対応づけた被写体間の変位量を算出する(ステップST4)。   Next, processing performed in the first embodiment will be described. FIG. 8 is a flowchart showing the processing performed in the first embodiment. When a shooting instruction is input from the operation system 10, the CPU 42 starts processing, and the imaging system 20 performs shooting at predetermined time intervals (step ST1). Next, the distance calculation unit 51 recognizes the subjects of the two images whose shooting times are adjacent (step ST2), associates the subjects in the two images (step ST3), and calculates the displacement amount between the associated subjects. (Step ST4).

一方、平行移動量取得部50はデジタルカメラ1の平行移動量を取得し(ステップST5)、距離算出部51は、デジタルカメラ1の平行移動量と算出した変位量とから上記式(2)に基づいて、絶対的な被写体距離Laを算出し(ステップST6)、被写体距離Laを撮像素子27の各画素と対応づけて内部メモリ40に一時的に記憶する(ステップST7)。なお、すでに被写体距離Laが内部メモリ40に記憶されている場合には、新たな被写体距離Laを上書きする。   On the other hand, the parallel movement amount acquisition unit 50 acquires the parallel movement amount of the digital camera 1 (step ST5), and the distance calculation unit 51 obtains the above equation (2) from the parallel movement amount of the digital camera 1 and the calculated displacement amount. Based on this, an absolute subject distance La is calculated (step ST6), and the subject distance La is associated with each pixel of the image sensor 27 and temporarily stored in the internal memory 40 (step ST7). If the subject distance La is already stored in the internal memory 40, the new subject distance La is overwritten.

続いて、CPU42はレリーズボタンが押下されたか否かを判定し(ステップST8)、ステップST8が否定されるとステップST1に戻り、ステップST1以降の処理を繰り返す。ステップST8が肯定されると、露出設定部53が内部メモリ40に記憶された被写体距離Laを画素毎に読み出し(ステップST9)、被写体距離Laに基づいて撮像素子27における画素毎に露出時間を設定する(ステップST10)。そして、撮像素子27の全画素の露出時間を設定したか否かを判定し(ステップST11)、ステップST11が否定されるとステップST9に戻り、ステップST9以降の処理を繰り返す。ステップST11が肯定されると、光学的距離算出部52が発光部41から測距光を出射してTOF方式による測距を行い(ステップST12)、光学的な被写体距離Loを取得し(ステップST13)、処理を終了する。なお、取得された被写体距離Loは、各画素と対応づけられて距離画像として記録メディア35に記録される。   Subsequently, the CPU 42 determines whether or not the release button has been pressed (step ST8). If step ST8 is negative, the CPU 42 returns to step ST1 and repeats the processing after step ST1. If step ST8 is positive, the exposure setting unit 53 reads the subject distance La stored in the internal memory 40 for each pixel (step ST9), and sets the exposure time for each pixel in the image sensor 27 based on the subject distance La. (Step ST10). Then, it is determined whether or not the exposure time of all the pixels of the image sensor 27 has been set (step ST11). If step ST11 is negative, the process returns to step ST9, and the processes after step ST9 are repeated. If step ST11 is affirmed, the optical distance calculation unit 52 emits distance measuring light from the light emitting unit 41, performs distance measurement by the TOF method (step ST12), and acquires an optical subject distance Lo (step ST13). ), The process is terminated. The acquired subject distance Lo is recorded on the recording medium 35 as a distance image in association with each pixel.

このように、第1の実施形態においては、TOF方式のように光を用いることなく、デジタルカメラ1を平行移動させ、平行移動されるデジタルカメラ1の平行移動量と、所定時間間隔にて撮影される画像に含まれる対応する被写体の変位量とに基づいて被写体距離Laを算出するようにしたため、ノイズの影響を受けることなく測距を行うことができる。   As described above, in the first embodiment, the digital camera 1 is translated without using light as in the TOF method, and the parallel movement amount of the digital camera 1 to be translated and the images are taken at predetermined time intervals. Since the subject distance La is calculated based on the displacement amount of the corresponding subject included in the image to be measured, distance measurement can be performed without being affected by noise.

また、TOF方式にて測距を行う際に、算出した被写体距離Laを用いて、反射光にノイズが含まれる可能性が高い、撮像系20から離れた位置にある被写体についても、反射光を検出可能なように撮像素子27の各画素の露出時間を制御するようにしたため、被写体距離が大きい場合であっても、TOF方式を用いて正確に測距を行うことができる。   Further, when the distance is measured by the TOF method, the reflected light is also used for a subject at a position away from the imaging system 20 where the reflected light is likely to contain noise using the calculated subject distance La. Since the exposure time of each pixel of the image sensor 27 is controlled so as to be detectable, even when the subject distance is large, the distance can be accurately measured using the TOF method.

なお、上記第1の実施形態においては、平行移動量取得部50がデジタルカメラ1の移動量を取得して絶対的な被写体距離Laを算出しているが、撮影画角内に含まれる少なくとも1つの被写体の被写体距離を操作系10から入力することによっても、撮影画角内に含まれるすべての被写体の絶対的な被写体距離Laを算出することができる。以下、この手法による被写体距離Laの算出について説明する。   In the first embodiment, the parallel movement amount acquisition unit 50 acquires the movement amount of the digital camera 1 and calculates the absolute subject distance La, but at least one included in the shooting angle of view. The absolute subject distance La of all the subjects included in the shooting angle of view can also be calculated by inputting subject distances of two subjects from the operation system 10. Hereinafter, calculation of the subject distance La by this method will be described.

まず、距離算出部51により相対的な被写体距離Lrを算出した後に、相対的な被写体距離Lrを用いた距離画像を生成して液晶モニタ37に表示する。図9は液晶モニタ37に表示された距離画像を示す図である。図9に示すように距離画像Lg1においては、操作系10の操作により、距離算出部51が認識した被写体を選択することが可能となっている。例えば、上下左右ボタンを押下して輪郭を強調する被写体H1〜H5を変更することにより、被写体を選択可能となっている。ここで、図9においては被写体H5が選択された状態を示している。なお、液晶モニタ37にタッチパネルを設け、撮影者が直接またはタッチペンを用いてタッチパネルに触れることにより、被写体を選択するようにしてもよい。   First, after calculating the relative subject distance Lr by the distance calculation unit 51, a distance image using the relative subject distance Lr is generated and displayed on the liquid crystal monitor 37. FIG. 9 is a diagram showing a distance image displayed on the liquid crystal monitor 37. As shown in FIG. 9, in the distance image Lg1, the subject recognized by the distance calculation unit 51 can be selected by operating the operation system 10. For example, the subject can be selected by pressing the up / down / left / right buttons to change the subjects H1 to H5 whose contours are emphasized. Here, FIG. 9 shows a state in which the subject H5 is selected. It should be noted that a touch panel may be provided on the liquid crystal monitor 37 and the subject may be selected by the photographer touching the touch panel directly or using a touch pen.

このように被写体を選択した状態において、撮影者が自ら測定したデジタルカメラ1から被写体までの距離を操作系10を用いて入力する。具体的には、操作系10の操作により、図10に示すように距離入力ウィンドウ60を液晶モニタ37に表示し、ここに操作系10を用いて数値を入力することにより、選択した被写体までの距離を入力する。   With the subject selected in this way, the distance from the digital camera 1 to the subject measured by the photographer himself / herself is input using the operation system 10. Specifically, by operating the operation system 10, a distance input window 60 is displayed on the liquid crystal monitor 37 as shown in FIG. 10, and a numerical value is input using the operation system 10 to display the distance to the selected subject. Enter the distance.

そして、距離算出部51は入力された距離を用いて、すべての被写体の絶対的な被写体距離Laを算出する。ここで、上述したように被写体の絶対的な被写体距離Laは式(1)、(2)により算出することができるため、入力した被写体の絶対的な被写体距離をLa2、算出したい被写体距離をLa3とすると、La2,La3は下記の式(3)、(4)に示す関係を有する。   Then, the distance calculation unit 51 calculates the absolute subject distance La of all the subjects using the input distance. Here, as described above, since the absolute subject distance La of the subject can be calculated by the equations (1) and (2), the absolute subject distance of the input subject is La2, and the subject distance to be calculated is La3. Then, La2 and La3 have the relationship shown in the following formulas (3) and (4).

La2=c・y2・sinθ2/(b21+b22) (3)
La3=c・y3・sinθ3/(b31+b32) (4)
式(3)、(4)の両辺同士を除算すると、
La2/La3=y2・sinθ2・(b31+b32)/
(y3・sinθ3・(b21+b22)) (5)
となる。y2,y3,θ2、θ3、b21,b22,b31,b22は既知であるため、La2が分かればLa3を算出することができる。これにより、少なくとも1つの被写体についての絶対的な被写体距離が分かれば、他のすべての被写体の絶対的な被写体距離Laを算出することができる。したがって、第1の実施形態においては、このようにして被写体距離Laを算出するようにしてもよい。なお、この場合、平行移動量取得部50は不要となる。
La2 = c · y2 · sin θ2 / (b21 + b22) (3)
La3 = c · y3 · sin θ3 / (b31 + b32) (4)
When dividing both sides of Equations (3) and (4),
La2 / La3 = y2 · sin θ2 · (b31 + b32) /
(Y3 · sin θ3 · (b21 + b22)) (5)
It becomes. Since y2, y3, θ2, θ3, b21, b22, b31, and b22 are known, La3 can be calculated if La2 is known. As a result, if the absolute subject distance for at least one subject is known, the absolute subject distance La of all other subjects can be calculated. Therefore, in the first embodiment, the subject distance La may be calculated in this way. In this case, the parallel movement amount acquisition unit 50 is not necessary.

次いで、本発明の第2の実施形態について説明する。図11は本発明の第2の実施形態による撮影装置を適用したデジタルカメラの構成を示す概略ブロック図である。なお、第2の実施形態において第1の実施形態と同一の構成については同一の参照番号を付与し、詳細な説明は省略する。第2の実施形態によるデジタルカメラ1Aは、デジタルカメラ1自体を平行移動させる移動部55を備え、移動部55により駆動されるデジタルカメラ1Aの平行移動量を平行移動量取得部50において取得するようにした点が第1の実施形態と異なる。   Next, a second embodiment of the present invention will be described. FIG. 11 is a schematic block diagram showing the configuration of a digital camera to which the photographing apparatus according to the second embodiment of the present invention is applied. Note that in the second embodiment, the same reference numerals are assigned to the same components as those in the first embodiment, and detailed description thereof is omitted. The digital camera 1A according to the second embodiment includes a moving unit 55 that translates the digital camera 1 itself, and the parallel movement amount acquiring unit 50 acquires the parallel movement amount of the digital camera 1A driven by the moving unit 55. This is different from the first embodiment.

図12は移動部55の具体的な構成を示す図である。図12に示すように、移動部55は十分な幅を有する2輪のタイヤ71と、タイヤを駆動する不図示のモータとを備える。そしてモータを駆動することによりタイヤ71を回転させて、例えば図12における矢印A方向にデジタルカメラ1Aを平行移動させる。なお、タイヤ71は4輪であってもよい。   FIG. 12 is a diagram illustrating a specific configuration of the moving unit 55. As shown in FIG. 12, the moving part 55 includes a two-wheel tire 71 having a sufficient width and a motor (not shown) that drives the tire. Then, by driving the motor, the tire 71 is rotated, and for example, the digital camera 1A is translated in the direction of arrow A in FIG. The tire 71 may be four wheels.

ここで、第2の実施形態においては、平行移動量取得部50により上記第1の実施形態と同様にデジタルカメラ1Aの平行移動量を取得してもよいが、例えばモータの回転数を検出し、タイヤ71の半径とモータの回転数とからデジタルカメラ1Aの平行移動量を算出するようにしてもよい。この場合、加速度センサ、GPS装置および2次元センサ等のセンサが不要となる。   Here, in the second embodiment, the parallel movement amount of the digital camera 1A may be acquired by the parallel movement amount acquisition unit 50 in the same manner as in the first embodiment. For example, the number of rotations of the motor is detected. The parallel movement amount of the digital camera 1A may be calculated from the radius of the tire 71 and the rotational speed of the motor. In this case, sensors such as an acceleration sensor, a GPS device, and a two-dimensional sensor are not necessary.

このように第2の実施形態においては、移動部55によりデジタルカメラ1Aを平行移動するようにしたため、撮影者が移動しながら撮影を行わなくてもよくなり、その結果、撮影者の負担を軽減することができる。   As described above, in the second embodiment, since the digital camera 1A is moved in parallel by the moving unit 55, the photographer does not have to perform photographing while moving, and as a result, the burden on the photographer is reduced. can do.

なお、上述したようにタイヤ71によりデジタルカメラ1Aを移動する場合、モータを使用することなく、手動でタイヤ71を転がしながらデジタルカメラ1Aを移動してもよい。この場合、デジタルカメラ1Aが10cm移動する毎にビープ音を発する等してデジタルカメラ1Aの移動量を撮影者に知らせるようにしてもよい。   As described above, when the digital camera 1A is moved by the tire 71, the digital camera 1A may be moved while manually rolling the tire 71 without using a motor. In this case, the photographer may be informed of the amount of movement of the digital camera 1A by making a beep every time the digital camera 1A moves 10 cm.

また、移動部55を、図13に示すように撮像系20のみをエンドレスベルト72に取り付け、不図示のモータにより駆動される一対のローラ73A,73Bによりエンドレスベルト72を矢印B方向に回転駆動して撮像系20のみを矢印C方向に移動させるものとしてもよい。   Further, as shown in FIG. 13, only the imaging system 20 is attached to the endless belt 72, and the endless belt 72 is rotationally driven in the direction of arrow B by a pair of rollers 73A and 73B driven by a motor (not shown). Thus, only the imaging system 20 may be moved in the direction of arrow C.

また、図14に示すように、複数(ここでは3つ)のミラー75A,75B,75Cをモータ76の駆動により回動自在に設け、撮像系20の光軸X上に位置するミラーを切り替えることにより、実質的に撮像系20を移動させつつ撮影した場合と同様に複数の画像を取得することができる。例えば、図14に示すようにミラー75Aを光軸X上に位置させて撮影を行った後に、ミラー75B、ミラー75Cの順に光軸X上に位置するミラーを切り替えることにより、実質的にデジタルカメラ1Aを矢印D方向に移動させた場合と同様に複数の画像を取得することができる。この場合、ミラー75A,75B,75Cを撮像系20の光軸X上に位置させたときに撮影が行われて画像が取得される。なお、デジタルカメラ1Aの平行移動量は、各ミラー75A,75B,75Cの間隔を用いることとなる。   Further, as shown in FIG. 14, a plurality of (here, three) mirrors 75A, 75B, and 75C are rotatably provided by driving a motor 76, and the mirrors positioned on the optical axis X of the imaging system 20 are switched. As a result, a plurality of images can be acquired in the same manner as in the case of shooting while moving the imaging system 20 substantially. For example, as shown in FIG. 14, after taking a picture with the mirror 75A positioned on the optical axis X, the mirrors positioned on the optical axis X are switched in the order of the mirror 75B and the mirror 75C. A plurality of images can be acquired similarly to the case where 1A is moved in the direction of arrow D. In this case, when the mirrors 75A, 75B, and 75C are positioned on the optical axis X of the imaging system 20, shooting is performed and an image is acquired. Note that the distance between the mirrors 75A, 75B, and 75C is used as the parallel movement amount of the digital camera 1A.

なお、上記第1および第2の実施形態においては、露出設定部53が撮像素子27の各画素の露出時間を設定しているが、露出時間を変更することなく、被写体距離Laが大きい被写体の反射光が撮像素子27に検出されるように、発光部41の発光量を増加させるようにしてもよい。   In the first and second embodiments, the exposure setting unit 53 sets the exposure time of each pixel of the image sensor 27. However, without changing the exposure time, a subject with a large subject distance La is set. The light emission amount of the light emitting unit 41 may be increased so that the reflected light is detected by the image sensor 27.

また、上記第1および第2の実施形態においては、発光部41、光学的距離算出部52および露出設定部53を用いてTOF方式による測距を行っているが、図15に示す第3の実施形態によるデジタルカメラ1Bに示すように、発光部41、光学的距離算出部52および露出設定部53を省略し、距離算出部51が算出した被写体距離Laを用いて距離画像を生成する機能のみを有するものとしてもよい。   In the first and second embodiments, the light emitting unit 41, the optical distance calculating unit 52, and the exposure setting unit 53 are used to perform distance measurement by the TOF method. The third embodiment shown in FIG. As shown in the digital camera 1B according to the embodiment, the light emitting unit 41, the optical distance calculation unit 52, and the exposure setting unit 53 are omitted, and only a function for generating a distance image using the subject distance La calculated by the distance calculation unit 51 is used. It is good also as what has.

また、平行移動量取得部50を設けることなく、距離算出部51により相対的な被写体距離Lrのみを算出するようにしてもよい。   Further, without providing the parallel movement amount acquisition unit 50, only the relative subject distance Lr may be calculated by the distance calculation unit 51.

以上、本発明の実施形態に係るデジタルカメラについて説明したが、コンピュータを、上記の距離算出部51、光学的距離算出部52および露出設定部53に対応する手段として機能させ、図8に示すような処理を行わせるプログラムも本発明の実施形態の1つである。また、そのようなプログラムを記録したコンピュータ読取り可能な記録媒体も、本発明の実施形態の1つである。   Although the digital camera according to the embodiment of the present invention has been described above, the computer functions as means corresponding to the distance calculation unit 51, the optical distance calculation unit 52, and the exposure setting unit 53, as shown in FIG. 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 digital camera to which a photographing apparatus according to a first embodiment of the present invention is applied. 被写体の認識を説明するための図Diagram for explaining subject recognition 変位量の違いを説明するための図(その1)Figure for explaining the difference in displacement (Part 1) 変位量の違いを説明するための図(その2)Diagram for explaining the difference in displacement (Part 2) デジタルカメラの移動前後の画像を示す図Diagram showing images before and after moving the digital camera 絶対的な被写体距離の算出を説明するための図Diagram for explaining calculation of absolute subject distance 距離画像を示す図Figure showing distance image 第1の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 1st Embodiment 液晶モニタに表示された距離画像を示す図The figure which shows the distance picture which is displayed on the liquid crystal monitor 距離入力ウィンドウが表示された状態を示す図The figure which shows the state where the distance input window is displayed 本発明の第2の実施形態による撮影装置を適用したデジタルカメラの構成を示す概略ブロック図Schematic block diagram showing the configuration of a digital camera to which a photographing apparatus according to a second embodiment of the present invention is applied. 移動部の構成を示す図Diagram showing the configuration of the moving unit 移動部の他の構成を示す図The figure which shows the other structure of a moving part. 実質的に撮像系を移動させつつ撮影するデジタルカメラの構成を示す図The figure which shows the structure of the digital camera which image | photographs, moving an imaging system substantially 本発明の第3の実施形態による撮影装置を適用したデジタルカメラの構成を示す概略ブロック図Schematic block diagram showing the configuration of a digital camera to which a photographing apparatus according to a third embodiment of the present invention is applied.

符号の説明Explanation of symbols

1,1A,1B デジタルカメラ
10 操作系
20 撮像系
21 レンズ
23 絞り
25 シャッタ
27 撮像素子
38 画像処理部
40 内部メモリ
41 発光部
42 CPU
50 平行移動量取得部
51 距離算出部
52 光学的距離算出部
53 露出設定部
55 移動部
1, 1A, 1B Digital camera 10 Operation system 20 Imaging system 21 Lens 23 Aperture 25 Shutter 27 Imaging element 38 Image processing unit 40 Internal memory 41 Light emitting unit 42 CPU
50 parallel movement amount acquisition unit 51 distance calculation unit 52 optical distance calculation unit 53 exposure setting unit 55 movement unit

Claims (7)

撮影により画像を取得する撮影手段を備え、画角を平行移動させつつ撮影を行う撮影装置であって、
前記画角を平行移動させつつ複数回の撮影を行うことにより複数の前記画像を取得するよう前記撮影手段を制御する制御手段と、
前記画像に含まれる複数の被写体を認識し、前記複数の画像間における対応する前記被写体間の前記複数の画像内における変位量を算出し、該変位量の大小関係に基づいて前記撮影手段から前記複数の被写体までの距離である被写体距離を算出する距離算出手段とを備えたことを特徴とする撮影装置。
An imaging device that includes an imaging means for acquiring an image by imaging and performs imaging while translating the angle of view,
Control means for controlling the photographing means so as to obtain a plurality of the images by performing photographing a plurality of times while translating the angle of view;
Recognizing a plurality of subjects included in the image, calculating a displacement amount in the plurality of images between the corresponding subjects between the plurality of images, and from the photographing unit based on a magnitude relationship of the displacement amount An imaging apparatus comprising: distance calculation means for calculating a subject distance that is a distance to a plurality of subjects.
前記撮影手段の平行移動量を取得する平行移動量取得手段をさらに備え、
前記距離算出手段は、前記撮影手段の平行移動量に基づいて前記複数の被写体の絶対的な被写体距離を算出する手段であることを特徴とする請求項1記載の撮影装置。
A translation amount acquisition means for acquiring a translation amount of the photographing means;
The photographing apparatus according to claim 1, wherein the distance calculating unit is a unit that calculates absolute subject distances of the plurality of subjects based on a parallel movement amount of the photographing unit.
前記撮影手段を平行移動させる移動手段をさらに備え、
前記平行移動量取得手段は、前記移動手段による前記撮影手段の平行移動量を取得する手段であることを特徴とする請求項2記載の撮影装置。
A moving means for translating the photographing means;
The photographing apparatus according to claim 2, wherein the parallel movement amount obtaining unit is a unit that obtains a parallel movement amount of the photographing unit by the moving unit.
前記複数の被写体のうちの少なくとも1つの被写体の被写体距離の入力を受け付ける入力手段をさらに備え、
前記距離算出手段は、前記取得した被写体距離に基づいて前記被写体距離が入力された被写体以外の他の被写体の絶対的な被写体距離を算出する手段であることを特徴とする請求項1記載の撮影装置。
An input unit that receives an input of a subject distance of at least one of the plurality of subjects;
2. The photographing according to claim 1, wherein the distance calculating unit is a unit that calculates an absolute subject distance of a subject other than the subject to which the subject distance is input based on the acquired subject distance. apparatus.
前記複数の被写体に光を照射し、該光の該被写体による反射光を前記撮影手段により検出し、前記光が出射されてから前記反射光が前記撮影手段により検出されるまでの時間に基づいて前記複数の被写体の被写体距離を算出する光学的距離算出手段と、
前記距離算出手段により算出された被写体距離に基づいて、前記反射光を検出する際の前記撮影手段の露出を設定する露出設定手段とをさらに備えたことを特徴とする請求項1から4のいずれか1項記載の撮影装置。
The plurality of subjects are irradiated with light, reflected light of the light from the subject is detected by the photographing unit, and based on a time from when the light is emitted until the reflected light is detected by the photographing unit. Optical distance calculating means for calculating a subject distance of the plurality of subjects;
5. The exposure apparatus according to claim 1, further comprising an exposure setting unit that sets an exposure of the photographing unit when detecting the reflected light based on the subject distance calculated by the distance calculating unit. The photographing apparatus according to claim 1.
撮影により画像を取得する撮影手段を備え、画角を平行移動させつつ撮影を行う撮影装置における撮影方法であって、
前記画角を平行移動させつつ複数回の撮影を行うことにより複数の前記画像を取得するよう前記撮影手段を制御し、
前記画像に含まれる複数の被写体を認識し、
前記複数の画像間における対応する前記被写体間の前記複数の画像内における変位量を算出し、
該変位量の大小関係に基づいて前記撮影手段から前記複数の被写体までの距離である被写体距離を算出することを特徴とする撮影方法。
A photographing method in a photographing apparatus that includes photographing means for obtaining an image by photographing and performs photographing while translating an angle of view,
Controlling the photographing means to acquire a plurality of the images by performing a plurality of times of photographing while translating the angle of view;
Recognizing a plurality of subjects included in the image;
Calculating a displacement amount in the plurality of images between the corresponding subjects between the plurality of images;
An imaging method comprising: calculating a subject distance, which is a distance from the imaging unit to the plurality of subjects, based on a magnitude relationship of the displacement amount.
撮影により画像を取得する撮影手段を備え、画角を平行移動させつつ撮影を行う撮影装置における撮影方法をコンピュータに実行させるためのプログラムであって、
前記画角を平行移動させつつ複数回の撮影を行うことにより複数の前記画像を取得するよう前記撮影手段を制御する手順と、
前記画像に含まれる複数の被写体を認識する手順と、
前記複数の画像間における対応する前記被写体間の前記複数の画像内における変位量を算出する手順と、
該変位量の大小関係に基づいて前記撮影手段から前記複数の被写体までの距離である被写体距離を算出する手順とを有することを特徴とするプログラム。
A program for causing a computer to execute a photographing method in a photographing apparatus that includes photographing means for obtaining an image by photographing and performs photographing while translating an angle of view,
A procedure for controlling the photographing means to acquire a plurality of the images by performing a plurality of photographings while translating the angle of view;
Recognizing a plurality of subjects included in the image;
Calculating a displacement amount in the plurality of images between the corresponding subjects between the plurality of images;
And a procedure for calculating a subject distance, which is a distance from the photographing means to the plurality of subjects, based on the magnitude relationship of the displacement amount.
JP2006331333A 2006-12-08 2006-12-08 Imaging apparatus, method, and program Active JP4709126B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006331333A JP4709126B2 (en) 2006-12-08 2006-12-08 Imaging apparatus, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006331333A JP4709126B2 (en) 2006-12-08 2006-12-08 Imaging apparatus, method, and program

Publications (2)

Publication Number Publication Date
JP2008147894A JP2008147894A (en) 2008-06-26
JP4709126B2 true JP4709126B2 (en) 2011-06-22

Family

ID=39607591

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006331333A Active JP4709126B2 (en) 2006-12-08 2006-12-08 Imaging apparatus, method, and program

Country Status (1)

Country Link
JP (1) JP4709126B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5183441B2 (en) * 2008-11-27 2013-04-17 キヤノン株式会社 Imaging device
JP2011010010A (en) * 2009-06-25 2011-01-13 Sanyo Electric Co Ltd Image reproduction device and imaging apparatus
KR101642964B1 (en) 2010-11-03 2016-07-27 삼성전자주식회사 Apparatus and method for dynamic controlling integration time of depth camera for accuracy enhancement
JP6492588B2 (en) * 2014-12-01 2019-04-03 セイコーエプソン株式会社 Projector and projector control method
JP6583430B2 (en) * 2015-12-16 2019-10-02 株式会社ニコン Imaging apparatus and motion detection method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0814861A (en) * 1994-07-01 1996-01-19 Canon Inc Method of measuring three-dimensional shape and device therefor
JP2000348165A (en) * 1999-06-04 2000-12-15 Mitsubishi Electric Corp Scene display device
JP2006084430A (en) * 2004-09-17 2006-03-30 Matsushita Electric Works Ltd Range image sensor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0814861A (en) * 1994-07-01 1996-01-19 Canon Inc Method of measuring three-dimensional shape and device therefor
JP2000348165A (en) * 1999-06-04 2000-12-15 Mitsubishi Electric Corp Scene display device
JP2006084430A (en) * 2004-09-17 2006-03-30 Matsushita Electric Works Ltd Range image sensor

Also Published As

Publication number Publication date
JP2008147894A (en) 2008-06-26

Similar Documents

Publication Publication Date Title
JP4942467B2 (en) Imaging apparatus, method, and program
US8395694B2 (en) Apparatus and method for blurring image background in digital image processing device
JP4284448B2 (en) Image processing apparatus and method
US8786760B2 (en) Digital photographing apparatus and method using face recognition function
TWI423664B (en) Imaging apparatus and exposure control method
US8150252B2 (en) Imaging apparatus and imaging apparatus control method
US20090231468A1 (en) Digital imaging apparatus enabled to control flash light intensity, method of controlling the digital imaging apparatus, and recording medium having recorded thereon program for executing the method
JP5022758B2 (en) Imaging apparatus, imaging system, and driving method of imaging apparatus
CN102783135A (en) Method and apparatus for providing a high resolution image using low resolution
JP2007067870A (en) Digital camera system and calibration method of photographing condition
CN104813227A (en) Image capture device, image capture method, and program
JP4709126B2 (en) Imaging apparatus, method, and program
US7856178B2 (en) System for compensating camera movement and a calibration method thereof
JP5199736B2 (en) Imaging device
JP6175748B2 (en) Imaging device
KR20060088155A (en) An apparatus and method for lens&#39; position control of camera module
WO2016203536A1 (en) Calculation method, calculation program, and imaging device
JP5112702B2 (en) Imaging apparatus, method, and program
JP5943740B2 (en) IMAGING DEVICE, IMAGING METHOD, AND PROGRAM THEREOF
JP2011232615A (en) Imaging device
KR101630307B1 (en) A digital photographing apparatus, a method for controlling the same, and a computer-readable storage medium
JP2007071891A (en) Three-dimensional measuring device
JP5042453B2 (en) Strobe control device, strobe control program, strobe control method
US9906705B2 (en) Image pickup apparatus
JP2019125979A (en) Imaging device, control method therefor, program, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090910

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110210

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110317

R150 Certificate of patent or registration of utility model

Ref document number: 4709126

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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