JP2009047497A - Stereoscopic imaging device, control method of stereoscopic imaging device, and program - Google Patents

Stereoscopic imaging device, control method of stereoscopic imaging device, and program Download PDF

Info

Publication number
JP2009047497A
JP2009047497A JP2007212562A JP2007212562A JP2009047497A JP 2009047497 A JP2009047497 A JP 2009047497A JP 2007212562 A JP2007212562 A JP 2007212562A JP 2007212562 A JP2007212562 A JP 2007212562A JP 2009047497 A JP2009047497 A JP 2009047497A
Authority
JP
Japan
Prior art keywords
imaging
subject
image
distance
distance image
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.)
Abandoned
Application number
JP2007212562A
Other languages
Japanese (ja)
Inventor
Soji Yanagida
聡司 柳田
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 JP2007212562A priority Critical patent/JP2009047497A/en
Publication of JP2009047497A publication Critical patent/JP2009047497A/en
Abandoned legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)
  • Optical Radar Systems And Details Thereof (AREA)
  • Image Analysis (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To restrict irradiation of ranging light to a subject, in a stereoscopic imaging device equipped with an imaging means for ranging by a TOF method and an imaging means for ranging by stereo matching. <P>SOLUTION: The first distance image generation part 30 generates a distance image D1 from data for the distance image acquired by the first imaging part 2A. A stereo matching part 31 detects a corresponding point from a standard image and a reference image acquired by the second and third imaging parts 2B, 2C, and the second distance image generation part 32 generates a distance image D2. In this case, imaging is performed by the second and third imaging parts 2B, 2C before imaging by the first imaging part 2A, and a face detection part 39 detects a prescribed subject such as a face from an image acquired thereby. When the prescribed subject is detected, imaging is performed only by the second and third imaging parts, and only the second distance image generation part 32 is allowed to generate a distance image D2. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、被写体の立体形状を表す距離画像を取得する立体撮像装置および立体撮像装置の制御方法並びに立体撮像装置の制御方法をコンピュータに実行させるためのプログラムに関するものである。   The present invention relates to a stereoscopic imaging apparatus that acquires a distance image representing a stereoscopic shape of a subject, a control method for the stereoscopic imaging apparatus, and a program for causing a computer to execute the control method for the stereoscopic imaging apparatus.

被写体を撮像して画像を取得する撮像装置において、被写体に向けて出射した近赤外線等の測距光が被写体により反射して戻ってくるまでの時間を計測することにより、撮像装置から被写体までの距離を測定して、被写体の立体形状を表す距離画像を生成することが行われている。このように光の反射を用いて被写体までの距離の測定(測距)を行う方式はTOF(Time Of Flight)方式と称され、TOF方式を用いた測距を行うための種々の手法が提案されている。   In an imaging device that captures an image of a subject and obtains an image, the distance from the imaging 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 representing a three-dimensional shape of a subject is generated by measuring a distance. The method of measuring the distance to the subject (ranging) using the reflection of light in this way is called a TOF (Time Of Flight) method, and various methods for measuring the distance using the TOF method are proposed. Has been.

また、異なる位置に設けられた少なくとも2台以上のカメラを用いて被写体を撮像し、これにより取得された複数の画像(基準カメラによる基準画像および参照カメラによる参照画像)の間で対応する画素を探索し(ステレオマッチング)、互いに対応する基準画像上の画素と、参照画像上の画素との位置の差(視差)に三角測量の原理を適用することにより、基準カメラまたは参照カメラから当該画素に対応する被写体上の点までの距離を計測して、被写体の立体形状を表す距離画像を生成する手法も提案されている。   In addition, the subject is imaged using at least two cameras provided at different positions, and corresponding pixels among a plurality of images (a reference image by the reference camera and a reference image by the reference camera) acquired thereby. By searching (stereo matching) and applying the principle of triangulation to the difference in position (parallax) between the corresponding pixel on the reference image and the pixel on the reference image, the reference camera or reference camera applies the pixel to the pixel. A method for measuring a distance to a corresponding point on a subject and generating a distance image representing a three-dimensional shape of the subject has also been proposed.

ここで、ステレオマッチングを行う際には、図7に示すように、基準画像G1上のある点Paに写像される実空間上の点は、点P1,P2,P3というように点O2からの視線上に複数存在するため、実空間上の点P1 ,P2 ,P3 等の写像である直線(エピポーラ線)上に、点Paに対応する参照画像G2上の点Pa′が存在することに基づいて対応点が探索される。なお、図7において点O2は基準カメラの視点、点O3は参照カメラの視点である。このようにステレオマッチングを行う際には、エピポーラ線上のすべての画素について対応点を求める必要があるため、対応点の探索に長時間を要するものとなっている。   Here, when performing stereo matching, as shown in FIG. 7, the points on the real space mapped to a certain point Pa on the reference image G1 are points P2, P2, and P3 from the point O2. Since there are a plurality of lines on the line of sight, the point Pa ′ on the reference image G2 corresponding to the point Pa exists on a straight line (epipolar line) that is a map of the points P1, P2, P3, etc. in the real space. Corresponding points are searched for. In FIG. 7, the point O2 is the viewpoint of the base camera, and the point O3 is the viewpoint of the reference camera. When performing stereo matching in this way, it is necessary to obtain corresponding points for all the pixels on the epipolar line, so that it takes a long time to search for corresponding points.

このため、2台のカメラ(ステレオカメラとする)にこれらと別の位置に配置されたもう1台のカメラを追加し、追加したカメラにより取得した画像から被写体のシルエットを作成し、ステレオカメラにおいて取得した画像から特徴点を検出し、被写体のシルエットの範囲においてのみ、特徴点に基づいて対応点の探索を行うことにより、対応点の探索時間を短縮する手法が提案されている(特許文献1参照)。   For this reason, another camera arranged at a different position is added to two cameras (referred to as stereo cameras), and a silhouette of the subject is created from the images acquired by the added cameras. A technique has been proposed in which feature points are detected from an acquired image, and corresponding points are searched based on the feature points only in the range of the silhouette of the subject, thereby shortening the search time for the corresponding points (Patent Document 1). reference).

また、ステレオカメラおよびミリ波レーダを使用し、ミリ波レーダにより障害物が検出され、ステレオカメラにより取得した画像に障害物が検出されない場合、ミリ波レーダによる検出結果に基づいて、ステレオカメラにより取得した画像における対応点の探索範囲を限定することにより、障害物の検出精度の向上および対応点の探索時間を短縮する手法が提案されている(特許文献2参照)。   Also, if a stereo camera and millimeter wave radar are used and an obstacle is detected by the millimeter wave radar and no obstacle is detected in the image acquired by the stereo camera, it is acquired by the stereo camera based on the detection result by the millimeter wave radar. There has been proposed a technique for improving the obstacle detection accuracy and shortening the search time for corresponding points by limiting the search range for corresponding points in the image (see Patent Document 2).

また、赤外カメラではあるが、一方のステレオカメラにより取得した第1の画像から被写体の領域を抽出し、抽出した領域と他方のステレオカメラにより取得した第2の画像との相関値に基づいて、第2の画像から被写体領域を抽出し、被写体領域の範囲において対応点を探索して被写体までの距離を算出して距離画像を生成する際に、算出した距離に応じて探索範囲を狭くすることにより、対応点の誤対応を防止する手法も提案されている(特許文献3参照)。
特開2000−331160号公報 特開2006−234513号公報 特開2003−322521号公報
In addition, although it is an infrared camera, an object region is extracted from a first image acquired by one stereo camera, and based on a correlation value between the extracted region and a second image acquired by the other stereo camera. When extracting a subject area from the second image and searching for corresponding points in the range of the subject area to calculate a distance to the subject to generate a distance image, the search range is narrowed according to the calculated distance. Accordingly, a method for preventing the correspondence between the corresponding points has also been proposed (see Patent Document 3).
JP 2000-331160 A JP 2006-234513 A JP 2003-322521 A

ところで、TOF方式により測距を行うためのカメラおよびステレオマッチングにより測距を行う2台のカメラの双方を用意して、TOF方式による距離画像およびステレオマッチングによる距離画像の2つの距離画像を取得することが考えられる。しかしながら、人物のような被写体は、測距光が照射されると、撮影時に被写体である人物が煩わしさを感じる場合がある。また、人物のみならず、測距光が照射されることが好ましくない被写体もある。   By the way, both a camera for distance measurement by the TOF method and two cameras for distance measurement by stereo matching are prepared, and two distance images of a distance image by the TOF method and a distance image by the stereo matching are acquired. It is possible. However, a subject such as a person may feel annoyed by the person who is the subject at the time of shooting when the distance measuring light is irradiated. In addition, there are subjects that are not preferable to be irradiated with distance measuring light as well as a person.

本発明は上記事情に鑑みなされたものであり、TOF方式により測距を行うための撮像手段と、ステレオマッチングにより測距を行う撮像手段を備えた立体撮像装置において、被写体への測距光の照射を制限できるようにすることを目的とする。   The present invention has been made in view of the above circumstances, and in a stereoscopic imaging apparatus including an imaging unit for measuring a distance by the TOF method and an imaging unit for measuring a distance by stereo matching, The purpose is to be able to limit the irradiation.

本発明による立体撮像装置は、測距光を被写体に照射し、該被写体による前記測距光の反射光を撮像して、前記被写体の立体形状を表す距離画像用のデータを取得する第1の撮像手段と、
前記距離画像用のデータに基づいて、前記被写体の立体形状を表す第1の距離画像を生成する第1の距離画像生成手段と、
前記被写体を撮像することにより、第2の距離画像の算出のための該被写体の基準画像を取得する第2の撮像手段と、
前記第2の撮像手段と異なる位置から前記被写体を撮像することにより、前記第2の距離画像の算出のための該被写体の参照画像を取得する少なくとも1つの第3の撮像手段と、
前記基準画像および前記参照画像間における画素の対応点を探索する対応点探索手段と、
該探索した対応点に基づいて前記被写体の立体形状を表す前記第2の距離画像を生成する第2の距離画像生成手段と、
前記第1の撮像手段による撮像前に、前記第2および前記第3の撮像手段に撮像を行わせ、該撮像により取得した画像から所定被写体を検出し、該所定被写体の検出結果を出力する所定被写体検出手段と、
該所定被写体が検出された場合には、前記第2および前記第3の撮像手段にのみ撮像を行わせ、前記第2の距離画像生成手段にのみ前記第2の距離画像を生成させるよう、前記第2および前記第3の撮像手段、前記対応点探索手段、並びに前記第2の距離画像生成手段を制御する制御手段とをさらに備えたことを特徴とするものである。
A stereoscopic imaging device according to the present invention is a first imaging apparatus that irradiates a subject with distance measuring light, images reflected light of the distance measuring light from the subject, and obtains data for a distance image representing the three-dimensional shape of the subject. Imaging means;
First distance image generation means for generating a first distance image representing the three-dimensional shape of the subject based on the distance image data;
Second imaging means for acquiring a reference image of the subject for calculating a second distance image by imaging the subject;
At least one third imaging means for acquiring a reference image of the subject for calculation of the second distance image by imaging the subject from a position different from the second imaging means;
Corresponding point search means for searching for corresponding points of pixels between the reference image and the reference image;
Second distance image generation means for generating the second distance image representing the three-dimensional shape of the subject based on the searched corresponding points;
Before imaging by the first imaging unit, the second and third imaging units perform imaging, a predetermined subject is detected from an image acquired by the imaging, and a detection result of the predetermined subject is output Subject detection means;
When the predetermined subject is detected, only the second and third imaging means perform imaging, and only the second distance image generating means generates the second distance image. The apparatus further comprises second and third imaging means, corresponding point searching means, and control means for controlling the second distance image generating means.

なお、本発明による立体撮像装置においては、前記対応点探索手段を、前記所定被写体が検出された場合、前記基準画像および前記参照画像における前記所定被写体を含む距離範囲を前記対応点の探索範囲に設定する手段としてもよい。   In the stereoscopic imaging apparatus according to the present invention, when the predetermined subject is detected, the corresponding point search means uses a distance range including the predetermined subject in the reference image and the reference image as the corresponding point search range. It is good also as a means to set.

本発明による立体撮像装置の制御方法は、測距光を被写体に照射し、該被写体による前記測距光の反射光を撮像して、前記被写体の立体形状を表す距離画像用のデータを取得する第1の撮像手段と、
前記距離画像用のデータに基づいて、前記被写体の立体形状を表す第1の距離画像を生成する第1の距離画像生成手段と、
前記被写体を撮像することにより、第2の距離画像の算出のための該被写体の基準画像を取得する第2の撮像手段と、
前記第2の撮像手段と異なる位置から前記被写体を撮像することにより、前記第2の距離画像の算出のための該被写体の参照画像を取得する少なくとも1つの第3の撮像手段と、
前記基準画像および前記参照画像間における画素の対応点を探索する対応点探索手段と、
該探索した対応点に基づいて前記被写体の立体形状を表す前記第2の距離画像を生成する第2の距離画像生成手段とを備えた立体撮像装置の制御方法であって、
前記第1の撮像手段による撮像前に、前記第2および前記第3の撮像手段に撮像を行わせ、
該撮像により取得した画像から所定被写体を検出して該所定被写体の検出結果を出力し、
該所定被写体が検出された場合には、前記第2および前記第3の撮像手段にのみ撮像を行わせ、
前記第2の距離画像生成手段にのみ前記第2の距離画像を生成させることを特徴とするものである。
The method for controlling a stereoscopic imaging apparatus according to the present invention irradiates a subject with distance measuring light, images reflected light of the distance measuring light from the subject, and obtains data for a distance image representing the three-dimensional shape of the subject. First imaging means;
First distance image generation means for generating a first distance image representing the three-dimensional shape of the subject based on the distance image data;
Second imaging means for acquiring a reference image of the subject for calculating a second distance image by imaging the subject;
At least one third imaging means for acquiring a reference image of the subject for calculation of the second distance image by imaging the subject from a position different from the second imaging means;
Corresponding point search means for searching for corresponding points of pixels between the reference image and the reference image;
A control method for a stereoscopic imaging apparatus, comprising: a second distance image generation unit configured to generate the second distance image representing the stereoscopic shape of the subject based on the searched corresponding points;
Prior to imaging by the first imaging means, the second and third imaging means perform imaging,
Detecting a predetermined subject from an image acquired by the imaging and outputting a detection result of the predetermined subject;
When the predetermined subject is detected, only the second and third imaging means perform imaging,
Only the second distance image generating means generates the second distance image.

なお、本発明による立体撮像装置の制御方法をコンピュータに実行させるためのプログラムとして提供してもよい。   In addition, you may provide as a program for making a computer perform the control method of the three-dimensional imaging device by this invention.

本発明によれば、第1の撮像手段による撮像前に第2および第3の撮像手段により撮像を行わせることにより取得した画像から所定被写体が検出された場合には、第2および第3の撮像手段にのみ撮像を行わせて第2の距離画像のみを生成するようにしたものである。このため、所定の被写体が検出された場合には、測距光を所定被写体に照射して第1の距離画像を生成する必要がなくなる。とくに所定被写体が人物である場合には、測距光を人物に照射する必要がなくなるため、撮像時に測距光により被写体である人物が煩わしい思いをすることを防止することができる。   According to the present invention, when a predetermined subject is detected from an image acquired by performing imaging with the second and third imaging means before imaging by the first imaging means, the second and third Only the image capturing means performs imaging so that only the second distance image is generated. For this reason, when a predetermined subject is detected, it is not necessary to generate a first distance image by irradiating the predetermined subject with distance measuring light. In particular, when the predetermined subject is a person, it is not necessary to irradiate the person with the distance measuring light, so that it is possible to prevent the person who is the subject from being annoyed by the distance measuring light during imaging.

以下、図面を参照して本発明の実施形態について説明する。図1は本発明の第1の実施形態による立体撮像装置の外観構成を示す前面側斜視図、図2はその背面側斜視図である。図1,2に示すように、第1の実施形態による立体撮像装置1は、その前面側に、第1から第3の撮像部2A,2B,2Cを備える。第1の撮像部2Aは立体撮像装置1の前面の略中央位置に配設されており、測距光を被写体に照射することに基づいて第1の距離画像D1を取得するための撮像を行うものである。また、第1の撮像部2Aの上下の位置には、被写体に向けて赤外光からなる測距光を照射するためのLED等の測距光照射部3が設けられている。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a front perspective view showing an external configuration of a stereoscopic imaging apparatus according to a first embodiment of the present invention, and FIG. 2 is a rear perspective view thereof. As shown in FIGS. 1 and 2, the stereoscopic imaging apparatus 1 according to the first embodiment includes first to third imaging units 2 </ b> A, 2 </ b> B, and 2 </ b> C on the front side thereof. The first imaging unit 2A is disposed at a substantially central position on the front surface of the stereoscopic imaging device 1, and performs imaging for acquiring the first distance image D1 based on irradiating the subject with distance measuring light. Is. In addition, a distance measuring light irradiation unit 3 such as an LED for irradiating distance measuring light composed of infrared light toward the subject is provided at the upper and lower positions of the first imaging unit 2A.

第2および第3の撮像部2B,2Cは、第1の撮像部2Aの左右の位置に配設されており、ステレオマッチングを行って第2の距離画像D2を生成するために必要な基準画像G1および参照画像G2を取得するための撮像を行うものである。   The second and third imaging units 2B and 2C are arranged at the left and right positions of the first imaging unit 2A, and are used as reference images necessary for performing stereo matching to generate the second distance image D2. Imaging for obtaining G1 and reference image G2 is performed.

また、立体撮像装置1の上面には、撮像を行うためのレリーズボタン4が設けられている。また、背面には、撮像により取得した画像を含む各種表示を行うモニタ5が設けられている。   In addition, a release button 4 for performing imaging is provided on the top surface of the stereoscopic imaging device 1. Further, on the back side, a monitor 5 that performs various displays including an image acquired by imaging is provided.

このような立体撮像装置1により被写体を撮像する場合、撮像部2A,2B,2Cによる撮像範囲は図3に示すものとなる。なお、図3において、点O1〜O3はそれぞれ撮像部2A,2B,2Cの視点である。また、撮像部2Bの光軸をz軸、紙面の上下方向をx軸、垂直方向をy軸としている。なお、Hは被写体である。   When the subject is imaged by such a stereoscopic imaging apparatus 1, the imaging ranges by the imaging units 2A, 2B, and 2C are as shown in FIG. In FIG. 3, points O1 to O3 are viewpoints of the imaging units 2A, 2B, and 2C, respectively. Further, the optical axis of the imaging unit 2B is the z axis, the vertical direction of the paper is the x axis, and the vertical direction is the y axis. H is a subject.

図4は第1の撮像部2A、図5は第2および第3の撮像部2B,2Cの内部構成を示す概略ブロック図である。   4 is a schematic block diagram showing the internal configuration of the first imaging unit 2A, and FIG. 5 is a schematic diagram showing the internal configuration of the second and third imaging units 2B and 2C.

第1から第3の撮像部2A,2B,2Cは、レンズ10A,10B,10C、絞り11A,11B,11C、シャッタ12A,12B,12C、CCD13A,13B,13C、アナログフロントエンド(AFE)14A,14B,14CおよびA/D変換部15A,15B,15Cをそれぞれ備える。   The first to third imaging units 2A, 2B, and 2C include lenses 10A, 10B, and 10C, diaphragms 11A, 11B, and 11C, shutters 12A, 12B, and 12C, CCDs 13A, 13B, and 13C, an analog front end (AFE) 14A, and the like. 14B, 14C and A / D converters 15A, 15B, 15C, respectively.

レンズ10A,10B,10Cは、被写体にピントを合わせるためのフォーカスレンズ、ズーム機能を実現するためのズームレンズ等の複数の機能別レンズにより構成され、不図示のレンズ駆動部によりその位置が調整される。   The lenses 10A, 10B, and 10C are configured by 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 their positions are adjusted by a lens driving unit (not shown). The

絞り11A,11B,11Cは、不図示の絞り駆動部により、AE処理により得られる絞り値データに基づいて絞り径の調整が行われる。   The apertures 11A, 11B, and 11C are adjusted in aperture diameter based on aperture value data obtained by AE processing by an aperture drive unit (not shown).

シャッタ12A,12B,12Cはメカニカルシャッタであり、不図示のシャッタ駆動部により、AE処理により得られるシャッタスピードに応じて駆動される。   The shutters 12A, 12B, and 12C are mechanical shutters, and are driven by a shutter drive unit (not shown) according to the shutter speed obtained by the AE process.

CCD13A,13B,13Cは、多数の受光素子を2次元的に配列した光電面を有しており、被写体光がこの光電面に結像して光電変換されてアナログ撮像信号が取得される。また、CCD13B,13Cの前面にはR,G,B各色のフィルタが規則的に配列されたカラーフィルタが配設されている。   The CCDs 13A, 13B, and 13C have a photoelectric surface in which a large number of light receiving elements are two-dimensionally arranged, and subject light is imaged on the photoelectric surface and subjected to photoelectric conversion to acquire an analog imaging signal. In addition, color filters in which R, G, and B color filters are regularly arranged are arranged on the front surfaces of the CCDs 13B and 13C.

AFE14A,14B,14Cは、CCD13A,13B,13Cから出力されるアナログ撮像信号に対して、アナログ撮像信号のノイズを除去する処理、およびアナログ撮像信号のゲインを調節する処理(以下アナログ処理とする)を施す。   The AFEs 14A, 14B, and 14C perform processing for removing noise of the analog imaging signal and processing for adjusting the gain of the analog imaging signal (hereinafter referred to as analog processing) for the analog imaging signals output from the CCDs 13A, 13B, and 13C. Apply.

A/D変換部15A,15B,15Cは、AFE14A,14B,14Cによりアナログ処理が施されたアナログ撮像信号をデジタル信号に変換する。なお、撮像部2B,2CのCCD13B,13Cにおいて取得され、デジタル信号に変換されることにより得られる画像データは、画素毎にR,G,Bの濃度値を持つデータである。なお、撮像部2Bにより取得される画像データにより表される画像が基準画像G1であり、撮像部2Cにより取得される画像データにより表される画像が参照画像G2である。   The A / D converters 15A, 15B, and 15C convert the analog imaging signals that have been subjected to the analog processing by the AFEs 14A, 14B, and 14C into digital signals. Note that the image data obtained by the CCDs 13B and 13C of the imaging units 2B and 2C and converted into digital signals is data having R, G, and B density values for each pixel. Note that the image represented by the image data acquired by the imaging unit 2B is the standard image G1, and the image represented by the image data acquired by the imaging unit 2C is the reference image G2.

また、撮像部2Aは、測距光照射部3が発光する測距光を変調するための変調部18を備える。また、CCD13A、AFE14Aおよび変調部18の駆動を制御するための駆動制御部19を備える。具体的には、駆動制御部19は、CPU33からの指示により、変調部18に変調の指示を行って測距光照射部3を変調発光させ、これとタイミングを合わせて撮像部2Aの各部を駆動して、距離画像用のデータを取得させる。   Further, the imaging unit 2A includes a modulation unit 18 for modulating the distance measuring light emitted from the distance measuring light irradiation unit 3. Further, a drive control unit 19 for controlling the drive of the CCD 13A, the AFE 14A, and the modulation unit 18 is provided. Specifically, in response to an instruction from the CPU 33, the drive control unit 19 instructs the modulation unit 18 to perform modulation, causes the ranging light irradiation unit 3 to emit modulated light, and adjusts the timing of each unit of the imaging unit 2A. Drive to obtain data for distance image.

図6は第1の実施形態による立体撮像装置1の内部構成を示す概略ブロック図である。立体撮像装置1は、撮像制御部22、画像処理部23、圧縮/伸長処理部24、フレームメモリ25、メディア制御部26、内部メモリ27、および表示制御部28を備える。   FIG. 6 is a schematic block diagram showing the internal configuration of the stereoscopic imaging apparatus 1 according to the first embodiment. The stereoscopic imaging device 1 includes an imaging control 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は、AF処理部およびAE処理部からなる。AF処理部はレリーズボタン4の半押し操作により撮像部2B,2Cが取得した画像(プレ基準画像、プレ参照画像)に基づいてレンズ10A,10B,10Cの焦点距離を決定し、撮像部2A,2B,2Cに出力する。AE処理部は、プレ画像に基づいて絞り値とシャッタ速度とを決定し、撮像部2A,2B,2Cに出力する。   The imaging control unit 22 includes an AF processing unit and an AE processing unit. The AF processing unit determines the focal lengths of the lenses 10A, 10B, and 10C based on images (pre-standard images and pre-reference images) acquired by the imaging units 2B and 2C by half-pressing the release button 4, and the imaging units 2A and 2C Output to 2B and 2C. The AE processing unit determines an aperture value and a shutter speed based on the pre-image, and outputs them to the imaging units 2A, 2B, and 2C.

画像処理部23は、撮像部2B,2Cが取得したデジタルの画像データに対して、ホワイトバランスを調整する処理、階調補正、シャープネス補正、および色補正等の画像処理を施す。なお、画像処理部23における処理後の基準画像および参照画像についても、処理前の参照符号G1,G2を用いるものとする。   The image processing unit 23 performs image processing such as white balance adjustment processing, tone correction, sharpness correction, and color correction on the digital image data acquired by the imaging units 2B and 2C. Note that reference codes G1 and G2 before processing are also used for the standard image and the reference image after processing in the image processing unit 23.

圧縮/伸長処理部24は、画像処理部23によって画像処理が施された基準画像G1および参照画像G2を表す画像データ並びに後述するように生成された距離画像の画像データに対して、例えば、JPEG等の圧縮形式で圧縮処理を行い、画像ファイルを生成する。この画像ファイルには、Exifフォーマット等に基づいて、撮影日時等の付帯情報が格納されたタグが付加される。   The compression / decompression processing unit 24 applies, for example, JPEG to image data representing the base image G1 and the reference image G2 that have been subjected to image processing by the image processing unit 23 and image data of a distance image generated as described later. The image file is generated by performing compression processing in a compression format such as. 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は、撮像部2Aが取得した距離画像用のデータ、および撮像部2B,2Cが取得した基準画像G1および参照画像G2を表す画像データに対して、前述の画像処理を含む各種処理を行う際に使用する作業用メモリである。   The frame memory 25 performs various processes including the above-described image processing on the distance image data acquired by the imaging unit 2A and the image data representing the reference image G1 and the reference image G2 acquired by the imaging units 2B and 2C. This is a working memory used when performing.

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

内部メモリ27は、立体撮像装置1において設定される各種定数、およびCPU33が実行するプログラム等を記憶する。   The internal memory 27 stores various constants set in the stereoscopic imaging apparatus 1, a program executed by the CPU 33, and the like.

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

また、立体撮像装置1は、第1の距離画像生成部30、ステレオマッチング部31、第2の距離画像生成部32、およびCPU33を備える。   In addition, the stereoscopic imaging device 1 includes a first distance image generation unit 30, a stereo matching unit 31, a second distance image generation unit 32, and a CPU 33.

第1の距離画像生成部30は、撮像部2Aが取得した距離画像用のデータを用いて被写体上の各点の立体撮像装置1からの距離を算出して距離画像を生成する。具体的には、被写体により反射された測距光の反射光を撮像することにより得られた距離画像用のデータから、測距光照射部3の発光光と反射光との位相差を算出し、この位相差に基づいて撮像部2Aから被写体までの距離を算出する。そして算出された距離をCCD13Aの各画素と対応づけて第1の距離画像D1を生成する。なお、第1の距離画像D1の各画素の画素値が撮像部2Aから被写体までの距離を表すものとなる。   The first distance image generation unit 30 calculates the distance from the stereoscopic imaging device 1 at each point on the subject using the distance image data acquired by the imaging unit 2A to generate a distance image. Specifically, the phase difference between the emitted light and the reflected light of the distance measuring light irradiation unit 3 is calculated from the distance image data obtained by imaging the reflected light of the distance measuring light reflected by the subject. Based on this phase difference, the distance from the imaging unit 2A to the subject is calculated. Then, the calculated distance is associated with each pixel of the CCD 13A to generate the first distance image D1. The pixel value of each pixel in the first distance image D1 represents the distance from the imaging unit 2A to the subject.

ステレオマッチング部31は、図7に示すように、基準画像G1上のある点Paに写像される実空間上の点は、点P1,P2,P3というように点O2からの視線上に複数存在するため、実空間上の点P1 ,P2 ,P3 等の写像である直線(エピポーラ線)上に、点Paに対応する参照画像R上の点Pa′が存在するということに基づいて、基準画像G1と参照画像G2との対応点を参照画像G2上において探索する。なお、図7において点O2は基準カメラとなる撮像部2Bの視点、点O3は参照カメラとなる撮像部2Cの視点である。ここで、視点とはCCDの中心である。   As shown in FIG. 7, the stereo matching unit 31 has a plurality of points in the real space mapped to a certain point Pa on the reference image G1 on the line of sight from the point O2, such as points P1, P2, and P3. Therefore, based on the fact that the point Pa ′ on the reference image R corresponding to the point Pa exists on a straight line (epipolar line) that is a map of the points P1, P2, P3, etc. in the real space, the reference image Corresponding points between G1 and the reference image G2 are searched on the reference image G2. In FIG. 7, the point O2 is the viewpoint of the imaging unit 2B that is the reference camera, and the point O3 is the viewpoint of the imaging unit 2C that is the reference camera. Here, the viewpoint is the center of the CCD.

また、ステレオマッチング部31は、対応点の探索を行う際に、基準画像G1および参照画像G2において、距離画像D1上においてあらかじめ定められた距離を基準とした所定の距離範囲内にある領域を、対応点の探索範囲に設定する。以下、対応点の探索範囲の設定について詳細に説明する。   Further, when searching for the corresponding points, the stereo matching unit 31 searches the standard image G1 and the reference image G2 for regions within a predetermined distance range based on a predetermined distance on the distance image D1. Set the corresponding point search range. The setting of the corresponding point search range will be described in detail below.

図8は撮像部2B,2Cの関係を説明するための図である。なお、ここでは、撮像部2B,2Cの光軸と基準画像G1および参照画像G2が得られる面となる画像面との交点である視点O2,O3を原点とし、画像面上における撮像部2B,2Cの座標系をそれぞれ(u,v)、(u′,v′)とする。また、撮像部2B,2Cの光軸は平行であり、画像面におけるu軸およびu′軸が同一直線上において同一方向を向いているものとする。また、撮像部2B,2Cの焦点距離をf、基線長をbとする。なお、焦点距離fおよび基線長bはキャリブレーションパラメータとしてあらかじめ算出されて内部メモリ27に記憶されている。   FIG. 8 is a diagram for explaining the relationship between the imaging units 2B and 2C. Here, the viewpoints O2 and O3, which are the intersections of the optical axes of the imaging units 2B and 2C, and the image plane that is the plane from which the base image G1 and the reference image G2 are obtained, are used as the origin, and the imaging units 2B and 2B on the image plane Let 2C coordinate systems be (u, v) and (u ', v'), respectively. In addition, it is assumed that the optical axes of the imaging units 2B and 2C are parallel, and the u-axis and u′-axis on the image plane face the same direction on the same straight line. Further, the focal length of the imaging units 2B and 2C is assumed to be f, and the baseline length is assumed to be b. The focal length f and the baseline length b are calculated in advance as calibration parameters and stored in the internal memory 27.

このとき、3次元空間上における位置(X,Y,Z)は、撮像部2Bの座標系を基準とすると、下記の式(1)〜(3)により表される。   At this time, the position (X, Y, Z) in the three-dimensional space is expressed by the following formulas (1) to (3) with reference to the coordinate system of the imaging unit 2B.

X=b・u/(u−u′) (1)
Y=b・v/(u−u′) (2)
Z=b・f/(u−u′) (3)
ここでu−u′は、撮像部2B,2Cの画像面上における投影点の横方向のずれ量(視差)である。また、式(3)より、奥行きである距離Zは視差に反比例することが分かる。
X = b · u / (u−u ′) (1)
Y = b · v / (u−u ′) (2)
Z = b · f / (u−u ′) (3)
Here, u−u ′ is a lateral shift amount (parallax) of the projection point on the image plane of the imaging units 2B and 2C. Further, it can be seen from the expression (3) that the distance Z, which is the depth, is inversely proportional to the parallax.

図9は探索範囲の設定を説明するための図である。ここで、距離画像D1上においてあらかじめ定められた距離をLaとし、距離Laを基準とした所定の距離範囲をL0〜L1とする。具体的には、例えば距離範囲L0〜L1は、距離Laを基準とした前後10cm程度の値を用いることができる。なお、あらかじめ定められた距離Laは、ユーザがあらかじめ設定した値であってもよく、距離画像D1の全体または中央部分の領域における距離の平均値等の代表値を用いてもよい。   FIG. 9 is a diagram for explaining the setting of the search range. Here, it is assumed that a predetermined distance on the distance image D1 is La, and a predetermined distance range based on the distance La is L0 to L1. Specifically, for example, the distance range L0 to L1 can use a value of about 10 cm before and after the distance La as a reference. Note that the predetermined distance La may be a value set in advance by the user, or a representative value such as an average value of distances in the entire distance image D1 or in the central area may be used.

ここで、撮像部2Bの画面上における対応点探索の対象となる対象点Ptの座標のu軸方向の値がutであったとすると、撮像部2Cの画像面上における対象点Ptの対応点P1は、u′軸上にあることとなる。本実施形態においては、距離Laを基準とした距離範囲L0〜L1において対応点を探索する。このため、距離L0,L1に対応する撮像部2Cの画像面におけるu′座標u0,u1をそれぞれ求める。すなわち、上記式(3)より、
L0=b・f/(ut−u0) (4)
L1=b・f/(ut−u1) (5)
であるため、
u0=−b.f/L0+ut (6)
u1=−b.f/L1+ut (7)
として座標u0,u1を求めることができる。したがって、ステレオマッチング部31は、参照画像G2上において、式(6)、(7)により算出したu0〜u1の範囲を対応点の探索範囲に設定する。
Here, if the value in the u-axis direction of the coordinates of the target point Pt to be searched for corresponding points on the screen of the imaging unit 2B is ut, the corresponding point P1 of the target point Pt on the image plane of the imaging unit 2C. Is on the u ′ axis. In the present embodiment, the corresponding points are searched in the distance ranges L0 to L1 with the distance La as a reference. For this reason, u ′ coordinates u0 and u1 on the image plane of the imaging unit 2C corresponding to the distances L0 and L1 are obtained, respectively. That is, from the above equation (3),
L0 = b · f / (ut−u0) (4)
L1 = b · f / (ut−u1) (5)
Because
u0 = -b. f / L0 + ut (6)
u1 = -b. f / L1 + ut (7)
The coordinates u0 and u1 can be obtained as follows. Therefore, the stereo matching unit 31 sets the range of u0 to u1 calculated by the equations (6) and (7) as the corresponding point search range on the reference image G2.

第2の距離画像生成部32は、ステレオマッチング部31が求めた対応点を用いて、上記式(1)〜(3)により、撮像部2B,2Cから被写体までの距離を算出し、算出された距離をCCD13B,13Cの各画素と対応づけて第2の距離画像D2を生成する。なお、第2の距離画像D2の各画素の画素値が撮像部2B,2Cから被写体までの距離を表すものとなる。生成された距離画像D2は記録メディア29に記録される。   The second distance image generation unit 32 uses the corresponding points obtained by the stereo matching unit 31 to calculate the distances from the imaging units 2B and 2C to the subject by the above formulas (1) to (3). The second distance image D2 is generated by associating the determined distance with the pixels of the CCDs 13B and 13C. The pixel value of each pixel of the second distance image D2 represents the distance from the imaging units 2B and 2C to the subject. The generated distance image D2 is recorded on the recording medium 29.

なお、距離画像D2を生成する際に参照画像G2上において対応点が見つからない場合がある。このような場合、第2の距離画像生成部32は、距離画像D2上において対応点が見つからなかった未対応画素に対して、距離画像D1における対応する画素の画素値(すなわち距離)を適用して、第3の距離画像D3を生成する。この場合、記録メディア29には第3の距離画像D3が記録される。   Note that when the distance image D2 is generated, the corresponding point may not be found on the reference image G2. In such a case, the second distance image generation unit 32 applies the pixel value (that is, the distance) of the corresponding pixel in the distance image D1 to the uncorresponding pixel for which the corresponding point is not found on the distance image D2. Thus, the third distance image D3 is generated. In this case, the third distance image D3 is recorded on the recording medium 29.

CPU33は、レリーズボタン4を含む入力部34からの信号に応じて立体撮像装置1の各部を制御する。   The CPU 33 controls each unit of the stereoscopic imaging device 1 in accordance with a signal from the input unit 34 including the release button 4.

データバス35は、立体撮像装置1を構成する各部およびCPU33に接続されており、立体撮像装置1における各種データおよび各種情報のやり取りを行う。   The data bus 35 is connected to each unit constituting the stereoscopic imaging device 1 and the CPU 33, and exchanges various data and various information in the stereoscopic imaging device 1.

次いで、第1の実施形態において行われる処理について説明する。図10は第1の実施形態において行われる処理を示すフローチャートである。なお、レリーズボタン4の半押し操作に基づく撮像制御部22におけるAF処理およびAE処理はすでに行われているものとし、ここではレリーズボタン4が全押しされて撮像の指示が行われた以降の処理について説明する。   Next, processing performed in the first embodiment will be described. FIG. 10 is a flowchart showing processing performed in the first embodiment. It is assumed that AF processing and AE processing in the imaging control unit 22 based on the half-pressing operation of the release button 4 has already been performed, and here, processing after the release button 4 is fully pressed and imaging is performed. Will be described.

レリーズボタン4が全押しされることによりCPU33が処理を開始し、撮像部2AがCPU33からの指示により測距光照射部3から測距光を被写体に向けて照射し(ステップST1)、さらに測距光の被写体による反射光を撮像して、距離画像用のデータを取得する(ステップST2)。そして、第1の距離画像生成部30が距離画像用のデータから第1の距離画像D1を生成する(ステップST3)。   When the release button 4 is fully pressed, the CPU 33 starts processing, and the imaging unit 2A emits distance measuring light toward the subject from the distance measuring light irradiation unit 3 according to an instruction from the CPU 33 (step ST1). The reflected light from the subject of the distance light is imaged, and data for the distance image is acquired (step ST2). Then, the first distance image generation unit 30 generates a first distance image D1 from the distance image data (step ST3).

一方、撮像部2B,2CがCPU33からの指示により被写体を撮像し、さらに取得した画像データに画像処理部23が画像処理を施して基準画像G1および参照画像G2を取得する(ステップST4)。なお、ステップST1〜3およびステップST4の処理は並列に行ってもよく順次行ってもよい。本実施形態においては並列に行うものとする。   On the other hand, the imaging units 2B and 2C image the subject according to an instruction from the CPU 33, and the image processing unit 23 performs image processing on the acquired image data to acquire the reference image G1 and the reference image G2 (step ST4). Note that the processes of steps ST1 to ST3 and step ST4 may be performed in parallel or sequentially. In the present embodiment, it is performed in parallel.

次いで、ステレオマッチング部31が、距離画像D1上においてあらかじめ定められた距離Laを基準とした所定の距離範囲L0〜L1内にある領域を、対応点の探索範囲に設定し(ステップST5)、設定した探索範囲において対応点を探索する(ステップST6)。なお、ステップST5の処理は、距離画像D1が生成されるまで行うことができないため、基準画像G1および参照画像G2を取得した時点において距離画像D1が生成されていない場合には、距離画像D1の生成が完了するまでステップST5の処理を待つ必要がある。   Next, the stereo matching unit 31 sets an area within a predetermined distance range L0 to L1 with reference to a predetermined distance La on the distance image D1 as a corresponding point search range (step ST5). Corresponding points are searched in the searched range (step ST6). In addition, since the process of step ST5 cannot be performed until the distance image D1 is generated, when the distance image D1 is not generated at the time when the standard image G1 and the reference image G2 are acquired, the process of the distance image D1 is performed. It is necessary to wait for the process of step ST5 until the generation is completed.

そして、第2の距離画像生成部32が、探索した対応点に基づいて第2の距離画像D2を生成する(ステップST7)。さらに、距離画像D2上において対応点が見つからなかった画素があるか否かを判定し(ステップST8)、ステップST8が肯定されると、距離画像D2における対応点が見つからなかった画素の画素値に対して、距離画像D1における対応する画素の画素値を適用して第3の距離画像D3を生成する(ステップST9)。ステップST8が否定されるとステップST10に進む。   And the 2nd distance image generation part 32 produces | generates the 2nd distance image D2 based on the searched corresponding point (step ST7). Further, it is determined whether or not there is a pixel for which no corresponding point is found on the distance image D2 (step ST8). When step ST8 is affirmed, the pixel value of the pixel for which no corresponding point is found in the distance image D2 is set. On the other hand, the pixel value of the corresponding pixel in the distance image D1 is applied to generate the third distance image D3 (step ST9). If step ST8 is negative, the process proceeds to step ST10.

そして、CPU33からの指示によりメディア制御部26が基準画像G1、参照画像G2および距離画像D2またはD3を記録メディア29に記録し(画像記録:ステップST10)、処理を終了する。   Then, in response to an instruction from the CPU 33, the media control unit 26 records the standard image G1, the reference image G2, and the distance image D2 or D3 on the recording medium 29 (image recording: step ST10), and the process ends.

このように、第1の実施形態においては、第1の距離画像D1上におけるあらかじめ定められた距離Laを基準とした所定の距離範囲L0〜L1内にある領域を対応点の探索範囲に設定して、対応点を探索するようにしたものである。このように、第1の距離画像D1を対応点の探索範囲の設定に使用しているため、撮像しようとする被写体の大きさに依存することなく、基準画像G1および参照画像G2におけるあらかじめ定められた距離範囲にある領域のみを対応点の探索範囲に設定することができる。したがって、対応点の探索範囲を確実に狭くすることができ、その結果、対応点探索のための演算時間を短縮することができる。また、探索範囲は基準画像G1および参照画像G2上の画素単位で設定することができるため、対応点の探索を精度良く行うことができる。   As described above, in the first embodiment, an area within the predetermined distance range L0 to L1 with the predetermined distance La on the first distance image D1 as a reference is set as the corresponding point search range. Thus, the corresponding points are searched. As described above, since the first distance image D1 is used for setting the search range of the corresponding points, the reference image G1 and the reference image G2 are determined in advance without depending on the size of the subject to be imaged. Only a region within a certain distance range can be set as a corresponding point search range. Therefore, the search range for corresponding points can be reliably narrowed, and as a result, the calculation time for searching for corresponding points can be shortened. Further, since the search range can be set in units of pixels on the standard image G1 and the reference image G2, the corresponding points can be searched with high accuracy.

また、第2の距離画像D2において対応点が見つからなかった画素については、第1の距離画像D1における対応する画素の画素値を適用して第3の距離画像D3を生成するようにしたため、精度良く距離画像を生成することができる。   In addition, for the pixel for which no corresponding point is found in the second distance image D2, the pixel value of the corresponding pixel in the first distance image D1 is applied to generate the third distance image D3. A range image can be generated well.

次いで、本発明の第2の実施形態について説明する。図11は本発明の第2の実施形態による立体撮像装置の外観構成を示す前面側斜視図である。なお、第2の実施形態において第1の実施形態と同一の構成については同一の参照番号を付与し、詳細な説明は省略する。第2の実施形態による立体撮像装置1Aは、撮像部2B,2Cが立体撮像装置1Aの左右にスライド可能なマウント6B,6Cに取付けられており、マウント6B,6Cを図12に示すように左右にスライドさせることにより、撮像部2B,2Cの基線長を変更可能とした点が第1の実施形態と異なる。   Next, a second embodiment of the present invention will be described. FIG. 11 is a front perspective view showing an external configuration of a stereoscopic imaging apparatus according to the second embodiment of the present invention. 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. In the stereoscopic imaging apparatus 1A according to the second embodiment, the imaging units 2B and 2C are attached to the mounts 6B and 6C that can slide to the left and right of the stereoscopic imaging apparatus 1A, and the mounts 6B and 6C are left and right as shown in FIG. This is different from the first embodiment in that the base line length of the imaging units 2B and 2C can be changed by sliding the image pickup unit 2B.

図13は第2の実施形態による立体撮像装置の内部構成を示す概略ブロック図である。図13に示すように第2の実施形態による立体撮像装置1Aは、マウント6B,6Cをスライドさせるための駆動機構36と、駆動機構36の駆動を制御するマウント駆動制御部37とを備えた点が第1の実施形態による立体撮像装置1とは異なる。なお、駆動機構36およびマウント駆動制御部37が基線長変更手段に対応する。   FIG. 13 is a schematic block diagram showing the internal configuration of the stereoscopic imaging apparatus according to the second embodiment. As shown in FIG. 13, the stereoscopic imaging apparatus 1 </ b> A according to the second embodiment includes a drive mechanism 36 for sliding the mounts 6 </ b> B and 6 </ b> C and a mount drive control unit 37 for controlling the drive of the drive mechanism 36. Is different from the stereoscopic imaging apparatus 1 according to the first embodiment. The drive mechanism 36 and the mount drive control unit 37 correspond to the baseline length changing unit.

駆動機構36は、不図示のモータおよびスライド機構を有し、マウント駆動制御部37からの指示により撮像部2B,2Cの基線長を変更するようにマウント6B,6Cをスライドさせる。なお、撮像部2B,2Cの基線長の変更は、自動または手動のいずれかにより行うことができる。手動の場合はユーザが入力部34を操作することにより基線長を変更する。また、撮像部2B,2Cの基線長を自動で変更するか手動で変更するかは、あらかじめユーザにより設定されているものとする。   The drive mechanism 36 includes a motor and a slide mechanism (not shown), and slides the mounts 6B and 6C so as to change the base line length of the imaging units 2B and 2C according to an instruction from the mount drive control unit 37. Note that the base line length of the imaging units 2B and 2C can be changed either automatically or manually. In the case of manual operation, the user changes the baseline length by operating the input unit 34. Further, it is assumed that whether the base line length of the imaging units 2B and 2C is changed automatically or manually is set in advance by the user.

なお、マウント駆動制御部37の機能については、以下の第2の実施形態において行われる処理において説明する。   The function of the mount drive control unit 37 will be described in the process performed in the second embodiment below.

図14は第2の実施形態において行われる処理を示すフローチャートである。なお、レリーズボタン4の半押し操作に基づく撮像制御部22におけるAF処理およびAE処理はすでに行われているものとし、ここではレリーズボタン4が全押しされて撮像の指示が行われた以降の処理について説明する。   FIG. 14 is a flowchart showing processing performed in the second embodiment. It is assumed that AF processing and AE processing in the imaging control unit 22 based on the half-pressing operation of the release button 4 has already been performed, and here, processing after the release button 4 is fully pressed and imaging is performed. Will be described.

レリーズボタン4が全押しされることによりCPU33が処理を開始し、撮像部2B,2Cの現在の基線長である基線長初期値を内部メモリ27に記憶する(ステップST21)。次いで、レリーズボタン4が全押しされると、撮像部2AがCPU33からの指示により測距光照射部3から測距光を被写体に向けて照射し(ステップST22)、さらに測距光の被写体による反射光を撮像して、距離画像用のデータを取得する(ステップST23)。そして、第1の距離画像生成部30が距離画像用のデータから第1の距離画像D1を生成する(ステップST24)。   When the release button 4 is fully pressed, the CPU 33 starts processing, and stores an initial baseline length value, which is the current baseline length of the imaging units 2B and 2C, in the internal memory 27 (step ST21). Next, when the release button 4 is fully pressed, the imaging unit 2A irradiates distance measuring light toward the subject from the distance measuring light irradiation unit 3 according to an instruction from the CPU 33 (step ST22), and further depends on the subject of the distance measuring light. The reflected light is imaged to acquire distance image data (step ST23). Then, the first distance image generation unit 30 generates the first distance image D1 from the distance image data (step ST24).

一方、撮像部2B,2CがCPU33からの指示により被写体を撮像して、さらに取得した画像データに画像処理部23が画像処理を施して基準画像G1および参照画像G2を取得する(ステップST25)。なお、ステップST22〜24およびステップST25の処理は並列に行ってもよく順次行ってもよい。本実施形態においては並列に行うものとする。   On the other hand, the imaging units 2B and 2C image a subject according to an instruction from the CPU 33, and the image processing unit 23 performs image processing on the acquired image data to acquire the reference image G1 and the reference image G2 (step ST25). Note that the processes of steps ST22 to 24 and step ST25 may be performed in parallel or sequentially. In the present embodiment, it is performed in parallel.

そして、マウント駆動制御部37が基線長変更処理を行う(ステップST26)。なお、基線長変更処理は、距離画像D1が生成されるまで行うことができないため、基準画像G1および参照画像G2を取得した時点において距離画像D1が生成されていない場合には、距離画像D1の生成が完了するまでステップST26の処理を待つ必要がある。   Then, the mount drive control unit 37 performs a baseline length change process (step ST26). Since the base line length changing process cannot be performed until the distance image D1 is generated, if the distance image D1 is not generated at the time when the base image G1 and the reference image G2 are acquired, the baseline length change process is performed. It is necessary to wait for the process of step ST26 until the generation is completed.

図15は基線長変更処理のフローチャートである。まず、マウント駆動制御部37は、距離画像D1に基づいて、立体撮像装置1Aから被写体までの距離である被写体距離および距離画像D1における被写体が含まれる範囲である被写体範囲を算出する(ステップST41)。具体的には、距離画像D1を複数の領域(例えば3×3)に分割し、中央の領域における距離の平均値等の代表値を被写体距離として算出する。そして、距離画像D1において、算出した被写体距離を基準とした例えば±10%の距離範囲にある画素からなる領域を被写体領域として算出する。   FIG. 15 is a flowchart of the base line length changing process. First, the mount drive control unit 37 calculates a subject distance that is a distance from the stereoscopic imaging apparatus 1A to the subject and a subject range that is a range including the subject in the distance image D1 based on the distance image D1 (step ST41). . Specifically, the distance image D1 is divided into a plurality of regions (for example, 3 × 3), and a representative value such as an average value of the distance in the center region is calculated as the subject distance. Then, in the distance image D1, an area including pixels within a distance range of, for example, ± 10% with respect to the calculated subject distance is calculated as the subject area.

なお、距離画像D1をモニタ5に表示し、ユーザに被写体領域を選択させ、さらに選択させた被写体領域内の距離の平均値等の代表値を被写体距離として算出するようにしてもよい。   The distance image D1 may be displayed on the monitor 5, the user may select a subject area, and a representative value such as an average value of distances in the selected subject area may be calculated as the subject distance.

次いで、マウント駆動制御部37は、算出した被写体距離があらかじめ定められた所定距離TL1より大きいか否かを判定する(ステップST42)。なお、所定距離TL1はあらかじめユーザにより設定され内部メモリ27に記憶されている。ステップST42が肯定されると、基線長を自動で変更する設定となっているか否かを判定する(ステップST43)。ステップST43が否定されると、ユーザによる入力部34を用いての基線長の変更の操作を受け付ける(ステップST44)。そして、あらかじめ設定した制限範囲まで基線長を変更したか否かを判定する(ステップST45)。   Next, the mount drive control unit 37 determines whether or not the calculated subject distance is greater than a predetermined distance TL1 determined in advance (step ST42). The predetermined distance TL1 is set in advance by the user and stored in the internal memory 27. If step ST42 is affirmed, it is determined whether or not the base line length is set to be automatically changed (step ST43). If step ST43 is negative, an operation to change the baseline length using the input unit 34 by the user is accepted (step ST44). Then, it is determined whether or not the baseline length has been changed to a preset limit range (step ST45).

図16(a)は基線長の変更前の基準画像G1および参照画像G2を、図16(b)は基線長を変更した際の基準画像G1および参照画像G2を示す図である。図16(a)に示すように基準画像G1および参照画像G2の略中央に位置している被写体Hは、基線長を大きくするように変更することにより、徐々に基準画像G1および参照画像G2の端部に移動する。ここで、基準画像G1および参照画像G2の端部は、撮像部2B,2Cのレンズの歪みおよびCCD13B,13Cの歪み等により、画像が歪んでいることが多い。このため、第2の実施形態においては、基準画像G1および参照画像G2の周囲における所定範囲内の領域(図16(b)に示す斜線部)に被写体Hが位置しないように、基線長の変更範囲を制限している。   FIG. 16A shows the base image G1 and the reference image G2 before the change of the base line length, and FIG. 16B shows the base image G1 and the reference image G2 when the base line length is changed. As shown in FIG. 16 (a), the subject H located at the approximate center of the base image G1 and the reference image G2 is gradually changed so that the base line length is increased, so that the base image G1 and the reference image G2 are gradually changed. Move to the end. Here, the ends of the base image G1 and the reference image G2 are often distorted due to the distortion of the lenses of the imaging units 2B and 2C and the distortion of the CCDs 13B and 13C. For this reason, in the second embodiment, the base line length is changed so that the subject H is not located in a region within the predetermined range around the base image G1 and the reference image G2 (the hatched portion shown in FIG. 16B). The range is limited.

したがって、マウント駆動制御部37は、基準画像G1および参照画像G2から被写体を検出し、検出した被写体が基準画像G1および参照画像G2の周囲における所定範囲内の領域に位置するか否かを判定することにより、ステップST45の処理を行う。   Accordingly, the mount drive control unit 37 detects a subject from the standard image G1 and the reference image G2, and determines whether or not the detected subject is located in a region within a predetermined range around the standard image G1 and the reference image G2. Thus, the process of step ST45 is performed.

そして、ステップST45が否定されると、ユーザによる基線長の変更の操作終了指示がなされたか否かを判定する(ステップST46)。なお、この判定は、例えば「基線長の変更を終了しますか」の問い合わせ表示をモニタ5に行い、問い合わせ表示に対するYESの入力がユーザにより行われたか否かを判定することにより行う。ステップST46が否定されるとステップST44に戻ってステップST44以降の処理を繰り返す。ステップST46が肯定されると、その位置においてマウント6B,6Cを固定し(ステップST47)、図14のステップST22,25の処理に進む。また、ステップST45が肯定された場合もステップST47の処理に進む。   If step ST45 is negative, it is determined whether or not the user has instructed to end the operation for changing the baseline length (step ST46). This determination is performed by, for example, performing an inquiry display of “Do you want to end the change of the baseline length” on the monitor 5 and determining whether or not the user has input YES to the inquiry display. If step ST46 is negative, the process returns to step ST44 and the processes after step ST44 are repeated. If step ST46 is positive, the mounts 6B and 6C are fixed at that position (step ST47), and the process proceeds to steps ST22 and 25 of FIG. Moreover, also when step ST45 is affirmed, it progresses to the process of step ST47.

一方、ステップST43が肯定されると、マウント駆動制御部37が駆動機構36を駆動して、あらかじめ設定した制限範囲まで基線長を大きくするよう変更し(ステップST48)、ステップST47の処理に進む。   On the other hand, if step ST43 is affirmed, the mount drive control unit 37 drives the drive mechanism 36 to change the base line length to a preset limit range (step ST48), and the process proceeds to step ST47.

また、ステップST42が否定されると、基線長が初期値と異なるか否かを判定する(ステップST49)。ステップST49が肯定されると、現在の基線長に基づいてキャリブレーションパラメータを変更し(ステップST50)、図14に示すステップST27の処理に進む。また、ステップST49が否定された場合もステップST27の処理に進む。   If step ST42 is negative, it is determined whether the baseline length is different from the initial value (step ST49). If step ST49 is positive, the calibration parameter is changed based on the current baseline length (step ST50), and the process proceeds to step ST27 shown in FIG. Moreover, also when step ST49 is denied, it progresses to the process of step ST27.

図14に戻り、CPU33はステップST27〜ステップST32の処理を行い、処理を終了する。なお、ステップST27〜ステップST32の処理は、第1の実施形態におけるステップST5〜ステップST10の処理と同一であるため、ここでは詳細な説明は省略する。   Returning to FIG. 14, the CPU 33 performs the processes of step ST27 to step ST32 and ends the process. In addition, since the process of step ST27-step ST32 is the same as the process of step ST5-step ST10 in 1st Embodiment, detailed description is abbreviate | omitted here.

このように、第2の実施形態においては、被写体距離が所定距離TL1より大きい場合に、撮像部2B,2C間の距離である基線長を大きくするよう変更するようにしたものである。ここで、基線長を大きくすると、撮像部2B,2Cから離れた位置にある被写体についての距離算出の精度を向上させることができる。このため、基準画像G1および参照画像G2を用いての距離画像D2の生成の精度を向上させることができる。   As described above, in the second embodiment, when the subject distance is larger than the predetermined distance TL1, the base line length, which is the distance between the image capturing units 2B and 2C, is changed. Here, when the base line length is increased, it is possible to improve the accuracy of distance calculation for a subject located at a position away from the imaging units 2B and 2C. For this reason, it is possible to improve the accuracy of generation of the distance image D2 using the standard image G1 and the reference image G2.

次いで、本発明の第3の実施形態について説明する。なお、第3の実施形態による立体撮像装置の外観構成は、第1の実施形態による立体撮像装置1の外観構成と同一であるため、ここでは詳細な説明は省略する。図17は第3の実施形態による立体撮像装置の内部構成を示す概略ブロック図である。図17に示すように第3の実施形態による立体撮像装置1Bは、撮像部2B,2Cのレンズ10B,10Cのズームレンズの駆動を制御するズーム倍率変更部38を備えた点が第1の実施形態による立体撮像装置1とは異なる。   Next, a third embodiment of the present invention will be described. Note that the external configuration of the stereoscopic imaging device according to the third embodiment is the same as the external configuration of the stereoscopic imaging device 1 according to the first embodiment, and thus detailed description thereof is omitted here. FIG. 17 is a schematic block diagram showing the internal configuration of the stereoscopic imaging apparatus according to the third embodiment. As shown in FIG. 17, the stereoscopic imaging apparatus 1 </ b> B according to the third embodiment is provided with a zoom magnification changing unit 38 that controls driving of the zoom lenses of the lenses 10 </ b> B and 10 </ b> C of the imaging units 2 </ b> B and 2 </ b> C. It differs from the stereoscopic imaging device 1 according to the form.

なお、ズーム倍率変更部38の機能については、以下の第3の実施形態において行われる処理において説明する。   The function of the zoom magnification changing unit 38 will be described in the processing performed in the third embodiment below.

図18は第3の実施形態において行われる処理を示すフローチャートである。なお、レリーズボタン4の半押し操作に基づく撮像制御部22におけるAF処理およびAE処理はすでに行われているものとし、ここではレリーズボタン4が全押しされて撮像の指示が行われた以降の処理について説明する。   FIG. 18 is a flowchart showing processing performed in the third embodiment. It is assumed that AF processing and AE processing in the imaging control unit 22 based on the half-pressing operation of the release button 4 has already been performed, and here, processing after the release button 4 is fully pressed and imaging is performed. Will be described.

レリーズボタン4が全押しされることによりCPU33が処理を開始し、撮像部2B,2Cのレンズ10B,10Cのズームレンズの現在のズーム位置であるズーム初期値を内部メモリ27に記憶する(ステップST61)。次いで、レリーズボタン4が全押しされると、撮像部2AがCPU33からの指示により測距光照射部3から測距光を被写体に向けて照射し(ステップST62)、さらに測距光の被写体による反射光を撮像して、距離画像用のデータを取得する(ステップST63)。そして、第1の距離画像生成部30が距離画像用のデータから第1の距離画像D1を生成する(ステップST64)。   When the release button 4 is fully pressed, the CPU 33 starts processing, and stores in the internal memory 27 the initial zoom value that is the current zoom position of the zoom lenses 10B and 10C of the imaging units 2B and 2C (step ST61). ). Next, when the release button 4 is fully pressed, the imaging unit 2A irradiates distance measuring light toward the subject from the distance measuring light irradiation unit 3 according to an instruction from the CPU 33 (step ST62), and further depends on the subject of the distance measuring light. The reflected light is imaged to acquire distance image data (step ST63). Then, the first distance image generation unit 30 generates the first distance image D1 from the distance image data (step ST64).

さらに、撮像部2B,2CがCPU33からの指示により被写体を撮像して、さらに取得した画像データに画像処理部23が画像処理を施して基準画像G1および参照画像G2を取得する(ステップST65)。なお、ステップST62〜64およびステップST65の処理は並列に行ってもよく順次行ってもよい。本実施形態においては並列に行うものとする。   Further, the imaging units 2B and 2C capture the subject according to an instruction from the CPU 33, and the image processing unit 23 performs image processing on the acquired image data to acquire the reference image G1 and the reference image G2 (step ST65). Note that the processes of steps ST62 to ST64 and step ST65 may be performed in parallel or sequentially. In the present embodiment, it is performed in parallel.

そして、ズーム倍率変更部38がズーム倍率変更処理を行う(ステップST66)。なお、ズーム倍率変更処理は、距離画像D1が生成されるまで行うことができないため、基準画像G1および参照画像G2を取得した時点において距離画像D1が生成されていない場合には、距離画像D1の生成が完了するまでステップST66の処理を待つ必要がある。   Then, the zoom magnification changing unit 38 performs zoom magnification changing processing (step ST66). Since the zoom magnification changing process cannot be performed until the distance image D1 is generated, if the distance image D1 has not been generated at the time when the standard image G1 and the reference image G2 are acquired, the distance image D1 is displayed. It is necessary to wait for the process of step ST66 until the generation is completed.

図19はズーム倍率変更処理のフローチャートである。まず、ズーム倍率変更部38は、第2の実施形態におけるマウント駆動制御部37と同様に、距離画像D1に基づいて立体撮像装置1Aから被写体までの距離である被写体距離および距離画像D1における被写体が含まれる範囲である被写体範囲を算出する(ステップST81)。   FIG. 19 is a flowchart of zoom magnification change processing. First, similarly to the mount drive control unit 37 in the second embodiment, the zoom magnification changing unit 38 determines the subject distance that is the distance from the stereoscopic imaging apparatus 1A to the subject and the subject in the distance image D1 based on the distance image D1. A subject range that is an included range is calculated (step ST81).

次いで、ズーム倍率変更部38は、算出した被写体距離があらかじめ定められた所定距離TL2よりも大きいか否かを判定する(ステップST82)。なお、所定距離TL2はあらかじめユーザにより設定され内部メモリ27に記憶されている。ステップST82が肯定されると、ズーム倍率を自動で変更する設定となっているか否かを判定する(ステップST83)。ステップST83が否定されると、ユーザによる入力部34を用いてのズーム倍率の変更の操作を受け付ける(ステップST84)。そして、あらかじめ設定した制限範囲までズーム倍率を変更したか否かを判定する(ステップST85)。具体的には、上記第2の実施形態と同様に、基準画像G1および参照画像G2から被写体を検出し、検出した被写体が基準画像G1および参照画像G2の周囲における所定範囲内の領域に位置するか否かを判定することにより、ステップST85の処理を行う。   Next, the zoom magnification changing unit 38 determines whether or not the calculated subject distance is larger than a predetermined distance TL2 determined in advance (step ST82). The predetermined distance TL2 is set in advance by the user and stored in the internal memory 27. If step ST82 is affirmed, it is determined whether or not the zoom magnification is automatically changed (step ST83). If step ST83 is negative, a zoom magnification change operation by the user using the input unit 34 is accepted (step ST84). Then, it is determined whether or not the zoom magnification has been changed to a preset limit range (step ST85). Specifically, as in the second embodiment, a subject is detected from the base image G1 and the reference image G2, and the detected subject is located in a region within a predetermined range around the base image G1 and the reference image G2. By determining whether or not, the process of step ST85 is performed.

そして、ステップST85が否定されると、ユーザによるズーム倍率の変更の操作終了指示がなされたか否かを判定する(ステップST86)。なお、この判定は、例えば「ズーム倍率の変更を終了しますか」の問い合わせ表示をモニタ5に行い、問い合わせ表示に対するYESの入力がユーザにより行われたか否かを判定することにより行う。ステップST86が否定されるとステップST84に戻ってステップST84以降の処理を繰り返す。ステップST86が肯定されると、ズームをその位置に固定し(ステップST87)、図18に示すステップST62,65の処理に進む。また、ステップST85が肯定された場合もステップST87の処理に進む。   If step ST85 is negative, it is determined whether or not the user has instructed to end the zoom magnification change operation (step ST86). This determination is made by, for example, performing an inquiry display “Do you want to end the zoom magnification change?” On the monitor 5 and determining whether or not the user has entered YES for the inquiry display. If step ST86 is negative, the process returns to step ST84 and the processes after step ST84 are repeated. If step ST86 is positive, the zoom is fixed at that position (step ST87), and the process proceeds to steps ST62 and 65 shown in FIG. Moreover, also when step ST85 is affirmed, it progresses to the process of step ST87.

一方、ステップST83が肯定されると、ズーム倍率変更部38が制限範囲までズーム倍率を大きくするよう変更し(ステップST88)、ステップST87の処理に進む。   On the other hand, if step ST83 is affirmed, the zoom magnification changing unit 38 changes the zoom magnification to the limit range (step ST88), and the process proceeds to step ST87.

また、ステップST82が否定されると、ズーム倍率が初期値と異なるか否かを判定する(ステップST89)。ステップST89が肯定されると、現在のズーム倍率に基づいてキャリブレーションパラメータを変更し(ステップST90)、図18に示すステップST67の処理に進む。また、ステップST89が否定された場合もステップST67の処理に進む。   If step ST82 is negative, it is determined whether the zoom magnification is different from the initial value (step ST89). If step ST89 is positive, the calibration parameter is changed based on the current zoom magnification (step ST90), and the process proceeds to step ST67 shown in FIG. Moreover, also when step ST89 is denied, it progresses to the process of step ST67.

図18に戻り、CPU33はステップST67〜ステップST72の処理を行い、処理を終了する。なお、ステップST67〜ステップST72の処理は、第1の実施形態におけるステップST5〜ステップST10の処理と同一であるため、ここでは詳細な説明は省略する。   Returning to FIG. 18, the CPU 33 performs the processes of step ST67 to step ST72 and ends the process. In addition, since the process of step ST67-step ST72 is the same as the process of step ST5-step ST10 in 1st Embodiment, detailed description is abbreviate | omitted here.

このように、第3の実施形態においては、被写体距離が所定距離TL2よりも大きい場合に、撮像部2B,2Cのズーム倍率を大きくするよう変更するようにしたものである。ここで、ズーム倍率を大きくすると、撮像部2B,2Cから離れた位置にある被写体についての、距離算出の精度を向上させることができる。このため、基準画像G1および参照画像G2を用いての距離画像D2の生成の精度を向上させることができる。   As described above, in the third embodiment, when the subject distance is larger than the predetermined distance TL2, the zoom magnification of the imaging units 2B and 2C is changed to be increased. Here, if the zoom magnification is increased, it is possible to improve the accuracy of distance calculation for a subject located at a position away from the imaging units 2B and 2C. For this reason, it is possible to improve the accuracy of generation of the distance image D2 using the standard image G1 and the reference image G2.

次いで、本発明の第4の実施形態について説明する。なお、第4の実施形態による立体撮像装置の外観構成は、第1の実施形態による立体撮像装置1の外観構成と同一であるため、ここでは詳細な説明は省略する。図20は第4の実施形態による立体撮像装置の内部構成を示す概略ブロック図である。図20に示すように第4の実施形態による立体撮像装置1Cは、顔検出部39を備え、撮像部2A〜2Cのすべてにより撮像を行う前に、撮像部2B,2Cにより被写体を撮像してプレ基準画像およびプレ参照画像を取得し、プレ基準画像およびプレ参照画像に人物の顔が含まれるか否かを判定し、顔が含まれる場合には、撮像部2Aを用いての撮像を禁止するようにした点が第1の実施形態と異なる。なお、プレ基準画像およびプレ参照画像は、基準画像G1および参照画像G2よりも画素数を少なくすることにより、顔が含まれるか否かの判定を迅速に行うことができる。   Next, a fourth embodiment of the present invention will be described. Note that the external configuration of the stereoscopic imaging device according to the fourth embodiment is the same as the external configuration of the stereoscopic imaging device 1 according to the first embodiment, and thus detailed description thereof is omitted here. FIG. 20 is a schematic block diagram showing the internal configuration of the stereoscopic imaging apparatus according to the fourth embodiment. As shown in FIG. 20, the stereoscopic imaging apparatus 1C according to the fourth embodiment includes a face detection unit 39, and images the subject with the imaging units 2B and 2C before imaging with all of the imaging units 2A to 2C. A pre-standard image and a pre-reference image are obtained, and it is determined whether or not a human face is included in the pre-standard image and the pre-reference image. If a face is included, imaging using the imaging unit 2A is prohibited. This is different from the first embodiment. Note that the pre-standard image and the pre-reference image can be quickly determined whether or not a face is included by reducing the number of pixels as compared with the standard image G1 and the reference image G2.

顔検出部39は、テンプレートマッチングによる手法や、顔の多数のサンプル画像を用いてマシンラーニング学習により得られた顔判別器を用いる手法等により、プレ基準画像およびプレ参照画像上における顔を囲む所定範囲の領域を顔領域として検出する。なお、顔領域の検出結果は、プレ基準画像およびプレ参照画像に顔が含まれるか否かを表す情報、顔が含まれる場合の顔の数およびプレ基準画像およびプレ参照画像上における顔領域の位置を表す座標値を含む。   The face detection unit 39 uses a template matching method, a method using a face discriminator obtained by machine learning learning using a large number of sample images of a face, and the like to enclose a face on the pre-standard image and the pre-reference image. A range area is detected as a face area. The detection result of the face area includes information indicating whether or not a face is included in the pre-standard image and the pre-reference image, the number of faces when the face is included, and the face area on the pre-standard image and the pre-reference image. Contains the coordinate value representing the position.

次いで、第4の実施形態において行われる処理について説明する。図21は第4の実施形態において行われる処理を示すフローチャートである。立体撮像装置1Cの電源をオンとすることによりCPU33が処理を開始し、レリーズボタン4が半押しされたか否かの監視を開始する(ステップST101)。ステップST101が肯定されると、CPU33からの指示により撮像部2B,2Cが被写体を撮像してプレ基準画像およびプレ参照画像を取得する(ステップST102)。次いで、顔検出部39がプレ基準画像およびプレ参照画像から顔領域を検出して検出結果を生成し、検出結果を内部メモリ27に記憶する(ステップST103)。なお、撮像制御部22が、プレ基準画像およびプレ参照画像の少なくとも一方に基づいて、AF処理およびAE処理を行う。続いて、レリーズボタン4が全押しされたか否かを判定し(ステップST104)、ステップST104が否定されると、ステップST101に戻り、ステップST101以降の処理を繰り返す。   Next, processing performed in the fourth embodiment will be described. FIG. 21 is a flowchart showing processing performed in the fourth embodiment. The CPU 33 starts processing by turning on the power of the stereoscopic imaging apparatus 1C, and starts monitoring whether or not the release button 4 is half-pressed (step ST101). If step ST101 is affirmed, the imaging units 2B and 2C capture the subject in accordance with an instruction from the CPU 33 to obtain a pre-standard image and a pre-reference image (step ST102). Next, the face detection unit 39 detects a face area from the pre-standard image and the pre-reference image, generates a detection result, and stores the detection result in the internal memory 27 (step ST103). Note that the imaging control unit 22 performs AF processing and AE processing based on at least one of the pre-standard image and the pre-reference image. Subsequently, it is determined whether or not the release button 4 has been fully pressed (step ST104). If step ST104 is negative, the process returns to step ST101, and the processes after step ST101 are repeated.

ステップST104が肯定されると、CPU33は顔検出部39の検出結果に基づいて、プレ基準画像およびプレ参照画像に顔領域が含まれるか否かを判定する(ステップST105)。ステップST105が否定されると、撮像部2A〜2Cを用いての距離画像D2またはD3の生成処理を行い(ステップST106)、処理を終了する。なお、ステップST106の処理は、上記第1の実施形態におけるステップST1〜ステップST10の処理と同一であるため、ここでは詳細な説明は省略する。   If step ST104 is affirmed, the CPU 33 determines whether or not a face region is included in the pre-standard image and the pre-reference image based on the detection result of the face detection unit 39 (step ST105). If step ST105 is negative, the distance image D2 or D3 is generated using the imaging units 2A to 2C (step ST106), and the process ends. Note that the process in step ST106 is the same as the process in steps ST1 to ST10 in the first embodiment, and thus detailed description thereof is omitted here.

一方、ステップST105が肯定されると、CPU33からの指示により、撮像部2B,2Cのみが被写体を撮像して、さらに取得した画像データに画像処理部23が画像処理を施して基準画像G1および参照画像G2を取得する(ステップST107)。次いで、ステレオマッチング部31が、基準画像G1および参照画像G2に含まれる顔領域同士の対応関係を検出する(ステップST108)。なお、基準画像G1および参照画像G2の顔領域の位置は、プレ基準画像およびプレ参照画像についての顔領域の検出結果を用いてもよく、顔検出部39に顔領域を検出させることにより取得してもよい。   On the other hand, when step ST105 is affirmed, only the imaging units 2B and 2C image the subject according to an instruction from the CPU 33, and the image processing unit 23 performs image processing on the acquired image data, and the reference image G1 and the reference Image G2 is acquired (step ST107). Next, the stereo matching unit 31 detects the correspondence between the face areas included in the standard image G1 and the reference image G2 (step ST108). Note that the positions of the face areas of the standard image G1 and the reference image G2 may be obtained by detecting the face areas of the pre-standard image and the pre-reference image by causing the face detection unit 39 to detect the face areas. May be.

図22は顔領域の対応関係を説明するための図である。図22(a)に示すように、基準画像G1および参照画像G2にそれぞれ1つの顔領域F1,F2のみが含まれる場合には、基準画像G1および参照画像G2の顔領域F1,F2がそれぞれ対応づけられる。一方、図22(b)に示すように、基準画像G1および参照画像G2に複数の顔領域が含まれる場合には、サイズが等しい顔領域同士が対応づけられる。具体的には、基準画像G1の顔領域F11が参照画像G2の顔領域F12と、基準画像G1の顔領域F13が参照画像G2の顔領域F14とそれぞれ対応づけられる。また、図22(c)に示すように、基準画像G1および参照画像G2に複数の顔領域が含まれ、かつ複数の顔領域のサイズが同一の場合には、顔領域の位置関係に基づいて顔領域同士が対応づけられる。具体的には、基準画像G1の顔領域F21が参照画像G2の顔領域F22と、基準画像G1の顔領域F23が参照画像G2の顔領域F24と、基準画像G1の顔領域F25が参照画像G2の顔領域F26とそれぞれ対応づけられる。   FIG. 22 is a diagram for explaining the correspondence between face areas. As shown in FIG. 22 (a), when the standard image G1 and the reference image G2 include only one face area F1, F2, respectively, the face areas F1, F2 of the standard image G1 and the reference image G2 correspond to each other. It is attached. On the other hand, as shown in FIG. 22B, when a plurality of face areas are included in the standard image G1 and the reference image G2, face areas having the same size are associated with each other. Specifically, the face area F11 of the standard image G1 is associated with the face area F12 of the reference image G2, and the face area F13 of the standard image G1 is associated with the face area F14 of the reference image G2. In addition, as shown in FIG. 22C, when a plurality of face areas are included in the standard image G1 and the reference image G2 and the sizes of the plurality of face areas are the same, based on the positional relationship between the face areas. Face areas are associated with each other. Specifically, the face area F21 of the reference image G1 is the face area F22 of the reference image G2, the face area F23 of the reference image G1 is the face area F24 of the reference image G2, and the face area F25 of the reference image G1 is the reference image G2. Are respectively associated with the face area F26.

次いで、ステレオマッチング部31が、図23に示すように、基準画像G1および参照画像G2における顔領域の中心線C1,C2を設定し、中心線C1,C2のずれを視差dとして算出するとともに、視差dを用いて立体撮像装置1Cから顔領域の中心線C1,C2までの距離を算出する(ステップST109)。そして、算出した距離を基準とした所定の距離範囲内にある領域を対応点の探索範囲に設定し(ステップST110)、設定した探索範囲において対応点を探索する(ステップST111)。なお、この場合の距離範囲としては、顔の中心線は人物の鼻の近傍を通るため、顔全体が距離範囲に収まるように、算出した距離の手前5cm〜後20cm程度を距離範囲とすることが好ましい。なお、ステップST109において算出した視差dの範囲を対応点の探索範囲として設定してもよい。   Next, as shown in FIG. 23, the stereo matching unit 31 sets the center lines C1 and C2 of the face area in the standard image G1 and the reference image G2, calculates the shift between the center lines C1 and C2 as the parallax d, Using the parallax d, the distance from the stereoscopic imaging device 1C to the center lines C1 and C2 of the face area is calculated (step ST109). Then, an area within a predetermined distance range based on the calculated distance is set as a corresponding point search range (step ST110), and a corresponding point is searched in the set search range (step ST111). As the distance range in this case, since the center line of the face passes near the nose of the person, the distance range should be about 5 cm before and 20 cm after the calculated distance so that the entire face falls within the distance range. Is preferred. Note that the range of the parallax d calculated in step ST109 may be set as the corresponding point search range.

そして、第2の距離画像生成部32が、探索した対応点に基づいて第2の距離画像D2を生成する(ステップST112)。そして、CPU33からの指示によりメディア制御部26が、基準画像G1、参照画像G2および距離画像D2を記録メディア29に記録し(画像記録:ステップST113)、処理を終了する。   And the 2nd distance image generation part 32 produces | generates the 2nd distance image D2 based on the searched corresponding point (step ST112). Then, in response to an instruction from the CPU 33, the media control unit 26 records the standard image G1, the reference image G2, and the distance image D2 on the recording medium 29 (image recording: step ST113), and ends the process.

このように、第4の実施形態においては、プレ基準画像およびプレ参照画像から顔領域が検出された場合に、撮像部2Aを用いての撮像を行わないようにしたものである。このため、人物に測距光が照射されることがなくなり、その結果、被写体である人物が測距光により煩わしい思いをすることを防止することができる。   As described above, in the fourth embodiment, when a face area is detected from the pre-standard image and the pre-reference image, imaging using the imaging unit 2A is not performed. For this reason, the person is not irradiated with the distance measuring light, and as a result, it is possible to prevent the person who is the subject from being bothered by the distance measuring light.

なお、上記第4の実施形態においてはプレ基準画像およびプレ参照画像から顔領域を検出しているが、検出する被写体としては顔に限定されるものではない。   Although the face area is detected from the pre-standard image and the pre-reference image in the fourth embodiment, the subject to be detected is not limited to the face.

また、上記第4の実施形態においては、検出した顔領域の中心線のずれを視差dとして算出し、算出した視差dを用いて距離画像D2を生成しているが、基準画像G1および参照画像G2の対応点を探索し、探索した対応点に基づいて距離画像D2を生成するようにしてもよい。   Further, in the fourth embodiment, the deviation of the center line of the detected face area is calculated as the parallax d, and the distance image D2 is generated using the calculated parallax d. However, the reference image G1 and the reference image are generated. A corresponding point of G2 may be searched, and the distance image D2 may be generated based on the searched corresponding point.

また、上記第4の実施形態においては、ステップST106において、第1の実施形態と同様の処理により距離画像D2またはD3を生成しているが、その際に、第1の距離画像D1も併せて記録メディア29に記録するようにしてもよい。また、距離画像D1を用いて対応点の探索範囲を設定することなく対応点を探索して、第2の距離画像D2を生成するようにしてもよい。   In the fourth embodiment, the distance image D2 or D3 is generated in step ST106 by the same process as in the first embodiment. At this time, the first distance image D1 is also generated. You may make it record on the recording medium 29. FIG. Alternatively, the second distance image D2 may be generated by searching for the corresponding point without setting the corresponding point search range using the distance image D1.

ところで、上述したように生成した距離画像D2,D3は、ステレオマッチングに固有の問題のために、画素の誤対応が生じる場合がある。画素の誤対応が生じる原因としては、撮像部2B,2Cがそれぞれ異なる位置において同一の被写体を撮像しているため、撮像部2Bからは臨むことができるが、撮像部2Cからは臨むことができない隠れ点が発生することによるもの、および被写体が単純な色の場合に対応点が複数発生してしまうことによるもの等が挙げられる。このように誤対応が生じると、距離画像D2またはD3を精度良く生成することができない。以下、この問題を解決するための実施形態を第5の実施形態として説明する。   By the way, the distance images D2 and D3 generated as described above may cause erroneous pixel correspondence due to problems inherent in stereo matching. The cause of pixel miscorrespondence is that the imaging units 2B and 2C are capturing the same subject at different positions, and thus can be viewed from the imaging unit 2B, but cannot be viewed from the imaging unit 2C. For example, a hidden point may be generated, or a plurality of corresponding points may be generated when the subject has a simple color. Thus, when an erroneous correspondence occurs, the distance image D2 or D3 cannot be generated with high accuracy. Hereinafter, an embodiment for solving this problem will be described as a fifth embodiment.

図24は第5の実施形態による立体撮像装置の内部構成を示す概略ブロック図である。図24に示すように第5の実施形態による立体撮像装置1Dは、画素値変更部40を備えた点が第1の実施形態と異なる。なお、画素値変更部40の機能については、以下の第5の実施形態において行われる処理において説明する。   FIG. 24 is a schematic block diagram showing the internal configuration of the stereoscopic imaging apparatus according to the fifth embodiment. As shown in FIG. 24, the stereoscopic imaging apparatus 1D according to the fifth embodiment is different from the first embodiment in that a pixel value changing unit 40 is provided. The function of the pixel value changing unit 40 will be described in the process performed in the following fifth embodiment.

図25は第5の実施形態において行われる処理を示すフローチャートである。なお、第5の実施形態においては、距離画像D2または距離画像D3の生成までの処理は、第1の実施形態におけるステップST1〜ステップST9の処理と同一であるため、ここでは第1の実施形態におけるステップST9以降の処理についてのみ説明する。   FIG. 25 is a flowchart showing processing performed in the fifth embodiment. Note that in the fifth embodiment, the processing up to the generation of the distance image D2 or the distance image D3 is the same as the processing in steps ST1 to ST9 in the first embodiment, so here the first embodiment. Only the processes after step ST9 will be described.

ステップST9の処理に続いて、画素値変更部40が、距離画像D1および距離画像D2またはD3の対応する画素の画素値の差分値の絶対値を算出する(ステップST121)。そして、算出した差分値の絶対値が所定のしきい値Th1以上となる画素が存在するか否かを判定する(ステップST122)。   Following the processing in step ST9, the pixel value changing unit 40 calculates the absolute value of the difference value between the pixel values of the corresponding pixels in the distance image D1 and the distance image D2 or D3 (step ST121). Then, it is determined whether or not there is a pixel whose absolute value of the calculated difference value is equal to or greater than a predetermined threshold value Th1 (step ST122).

ステップST122が否定されると、距離画像D2または距離画像D3には画素の誤対応はないものとして、基準画像G1、参照画像G2および距離画像D2またはD3を記録メディア29に記録し(画像記録:ステップST123)、処理を終了する。   If step ST122 is negative, the base image G1, the reference image G2, and the distance image D2 or D3 are recorded on the recording medium 29, assuming that there is no pixel miscorrespondence to the distance image D2 or the distance image D3 (image recording: Step ST123), the process ends.

一方、ステップST122が肯定されると、差分値の絶対値がしきい値Th1以上となった画素を誤対応画素として画素値変更処理を行う(ステップST124)。ここで、画素値変更処理は、誤対応画素の画素値を削除する処理、誤対応画素の画素値を距離画像D1の対応する画素の画素値と置換する処理、および誤対応画素の周囲の画素の画素値により誤対応画素の画素値を補間する処理のいずれかの処理を行う。   On the other hand, when step ST122 is affirmed, the pixel value changing process is performed with the pixel having the absolute value of the difference value equal to or greater than the threshold Th1 as an erroneously-corresponding pixel (step ST124). Here, the pixel value changing process includes a process of deleting the pixel value of the erroneously corresponding pixel, a process of replacing the pixel value of the erroneously corresponding pixel with the pixel value of the corresponding pixel of the distance image D1, and pixels around the erroneously corresponding pixel. Any one of the processes of interpolating the pixel value of the erroneously-corresponding pixel by the pixel value is performed.

そして、CPU33からの指示によりメディア制御部26が、画素値変更処理が施された距離画像(D4とする)を基準画像G1および参照画像G3とともに記録メディア29に記録し(ステップST125)、処理を終了する。   Then, in response to an instruction from the CPU 33, the media control unit 26 records the distance image (D4) on which the pixel value changing process has been performed, on the recording medium 29 together with the reference image G1 and the reference image G3 (step ST125), and performs the processing. finish.

このように、第5の実施形態においては、距離画像D1および距離画像D2またはD3における対応する画素の画素値の差分値の絶対値を算出し、差分値の絶対値がしきい値Th1を超える誤対応画素を検出し、誤対応画素の画素値を所定の画素値に変更するようにしたため、誤対応画素の画素値を補正して、精度良く距離画像D4を生成することができる。   As described above, in the fifth embodiment, the absolute value of the difference value between the corresponding pixels in the distance image D1 and the distance image D2 or D3 is calculated, and the absolute value of the difference value exceeds the threshold value Th1. Since the miscorresponding pixel is detected and the pixel value of the miscorresponding pixel is changed to a predetermined pixel value, the pixel value of the miscorresponding pixel can be corrected and the distance image D4 can be generated with high accuracy.

なお、上記第5の実施形態においては、第1の実施形態におけるステップST9の処理の後に画素値変更処理を行っているが、第2から第4の実施形態においても画素値変更処理を行うことができることはもちろんである。   In the fifth embodiment, the pixel value changing process is performed after the process of step ST9 in the first embodiment. However, the pixel value changing process is also performed in the second to fourth embodiments. Of course you can.

また、上記第1から第5の実施形態においては、参照画像G2を取得するための第3の撮像部2Cを1つのみ設けているが、第3の撮像部2Cを複数設け、複数の参照画像を取得して第2の距離画像D2を生成するようにしてもよい。   In the first to fifth embodiments, only one third imaging unit 2C for obtaining the reference image G2 is provided. However, a plurality of third imaging units 2C are provided, and a plurality of references are provided. An image may be acquired to generate the second distance image D2.

以上、本発明の実施形態に係る立体撮像装置1,1A,1B,1C,1Dについて説明したが、コンピュータを、上記の第1の距離画像生成部30、ステレオマッチング部31、第2の距離画像生成部32、マウント駆動制御部37、ズーム倍率変更部38、顔検出部39および画素値変更部40に対応する手段として機能させ、図10,14,15,18,19,21,25に示すような処理を行わせるプログラムも、本発明の実施形態の1つである。また、そのようなプログラムを記録したコンピュータ読取り可能な記録媒体も、本発明の実施形態の1つである。   The stereoscopic imaging apparatuses 1, 1A, 1B, 1C, and 1D according to the embodiments of the present invention have been described above. However, the computer includes the first distance image generation unit 30, the stereo matching unit 31, and the second distance image. 10, 14, 15, 18, 19, 21, 25 are made to function as means corresponding to the generation unit 32, the mount drive control unit 37, the zoom magnification change unit 38, the face detection unit 39, and the pixel value change unit 40. A program for performing such processing 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 front perspective view showing an external configuration of a stereoscopic imaging apparatus according to a first embodiment of the present invention. 本発明の第1の実施形態による立体撮像装置の外観構成を示す背面側斜視図1 is a rear perspective view showing an external configuration of a stereoscopic imaging apparatus according to a first embodiment of the present invention. 第1から第3の撮像部の撮像範囲を示す図The figure which shows the imaging range of the 1st to 3rd imaging part 第1の撮像部の内部構成を示す図The figure which shows the internal structure of a 1st imaging part. 第2および第3の撮像部の内部構成を示す図The figure which shows the internal structure of the 2nd and 3rd imaging part. 第1の実施形態による立体撮像装置の内部構成を示す概略ブロック図1 is a schematic block diagram showing an internal configuration of a stereoscopic imaging device according to a first embodiment. ステレオマッチングを説明するための図Diagram for explaining stereo matching 第2および第3の撮像部の関係を説明するための図The figure for demonstrating the relationship between the 2nd and 3rd imaging part. 探索範囲の設定を説明するための図Diagram for explaining setting of search range 第1の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 1st Embodiment. 本発明の第2の実施形態による立体撮像装置の外観構成を示す前面側斜視図(その1)Front perspective view showing the external structure of a stereoscopic imaging apparatus according to a second embodiment of the present invention (No. 1) 本発明の第2の実施形態による立体撮像装置の外観構成を示す前面側斜視図(その2)Front perspective view showing the external structure of a stereoscopic imaging apparatus according to a second embodiment of the present invention (No. 2) 第2の実施形態による立体撮像装置の内部構成を示す概略ブロック図Schematic block diagram showing the internal configuration of the stereoscopic imaging apparatus according to the second embodiment 第2の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 2nd Embodiment. 第2の実施形態における基線長変更処理を示すフローチャートThe flowchart which shows the baseline length change process in 2nd Embodiment 基線長変更の制限範囲を説明するための図Diagram for explaining the limitation range of baseline length change 第3の実施形態による立体撮像装置の内部構成を示す概略ブロック図The schematic block diagram which shows the internal structure of the stereo imaging device by 3rd Embodiment. 第3の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 3rd Embodiment 第3の実施形態におけるズーム倍率変更処理を示すフローチャートThe flowchart which shows the zoom magnification change process in 3rd Embodiment. 第4の実施形態による立体撮像装置の内部構成を示す概略ブロック図Schematic block diagram showing the internal configuration of a stereoscopic imaging apparatus according to the fourth embodiment 第4の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 4th Embodiment 顔領域の対応関係を説明するための図A diagram for explaining the correspondence between face areas 第4の実施形態における視差の算出を説明するための図The figure for demonstrating calculation of the parallax in 4th Embodiment. 第5の実施形態による立体撮像装置の内部構成を示す概略ブロック図Schematic block diagram showing the internal configuration of a stereoscopic imaging apparatus according to the fifth embodiment 第5の実施形態において行われる処理を示すフローチャートThe flowchart which shows the process performed in 5th Embodiment

符号の説明Explanation of symbols

1,1A,1B,1C,1D 立体撮像装置
2A,2B,2C 撮像部
3 測距光照射部
4 レリーズボタン
5 モニタ
13A,13B,13C CCD
30 第1の距離画像生成部
31 ステレオマッチング部
32 第2の距離画像生成部
33 CPU
36 駆動機構
37 マウント駆動制御部
38 ズーム倍率変更部
39 顔検出部
40 画素値変更部
1, 1A, 1B, 1C, 1D Stereoscopic imaging device 2A, 2B, 2C Imaging unit 3 Ranging light irradiation unit 4 Release button 5 Monitor 13A, 13B, 13C CCD
30 1st distance image generation part 31 Stereo matching part 32 2nd distance image generation part 33 CPU
36 Drive mechanism 37 Mount drive control unit 38 Zoom magnification change unit 39 Face detection unit 40 Pixel value change unit

Claims (4)

測距光を被写体に照射し、該被写体による前記測距光の反射光を撮像して、前記被写体の立体形状を表す距離画像用のデータを取得する第1の撮像手段と、
前記距離画像用のデータに基づいて、前記被写体の立体形状を表す第1の距離画像を生成する第1の距離画像生成手段と、
前記被写体を撮像することにより、第2の距離画像の算出のための該被写体の基準画像を取得する第2の撮像手段と、
前記第2の撮像手段と異なる位置から前記被写体を撮像することにより、前記第2の距離画像の算出のための該被写体の参照画像を取得する少なくとも1つの第3の撮像手段と、
前記基準画像および前記参照画像間における画素の対応点を探索する対応点探索手段と、
該探索した対応点に基づいて前記被写体の立体形状を表す前記第2の距離画像を生成する第2の距離画像生成手段と、
前記第1の撮像手段による撮像前に、前記第2および前記第3の撮像手段に撮像を行わせ、該撮像により取得した画像から所定被写体を検出し、該所定被写体の検出結果を出力する所定被写体検出手段と、
該所定被写体が検出された場合には、前記第2および前記第3の撮像手段にのみ撮像を行わせ、前記第2の距離画像生成手段にのみ前記第2の距離画像を生成させるよう、前記第2および前記第3の撮像手段、前記対応点探索手段、並びに前記第2の距離画像生成手段を制御する制御手段とをさらに備えたことを特徴とする立体撮像装置。
First imaging means for irradiating a subject with distance measuring light, imaging reflected light of the distance measuring light from the subject, and obtaining data for a distance image representing the three-dimensional shape of the subject;
First distance image generation means for generating a first distance image representing the three-dimensional shape of the subject based on the distance image data;
Second imaging means for acquiring a reference image of the subject for calculating a second distance image by imaging the subject;
At least one third imaging means for acquiring a reference image of the subject for calculation of the second distance image by imaging the subject from a position different from the second imaging means;
Corresponding point search means for searching for corresponding points of pixels between the reference image and the reference image;
Second distance image generation means for generating the second distance image representing the three-dimensional shape of the subject based on the searched corresponding points;
Before imaging by the first imaging unit, the second and third imaging units perform imaging, a predetermined subject is detected from an image acquired by the imaging, and a detection result of the predetermined subject is output Subject detection means;
When the predetermined subject is detected, only the second and third imaging means perform imaging, and only the second distance image generating means generates the second distance image. A stereoscopic imaging apparatus further comprising second and third imaging means, the corresponding point searching means, and a control means for controlling the second distance image generating means.
前記対応点探索手段は、前記所定被写体が検出された場合、前記基準画像および前記参照画像における前記所定被写体を含む距離範囲を前記対応点の探索範囲に設定する手段であることを特徴とする請求項1記載の立体撮像装置。   The corresponding point search means is a means for setting, when the predetermined subject is detected, a distance range including the predetermined subject in the reference image and the reference image as the corresponding point search range. Item 3. The stereoscopic imaging device according to Item 1. 測距光を被写体に照射し、該被写体による前記測距光の反射光を撮像して、前記被写体の立体形状を表す距離画像用のデータを取得する第1の撮像手段と、
前記距離画像用のデータに基づいて、前記被写体の立体形状を表す第1の距離画像を生成する第1の距離画像生成手段と、
前記被写体を撮像することにより、第2の距離画像の算出のための該被写体の基準画像を取得する第2の撮像手段と、
前記第2の撮像手段と異なる位置から前記被写体を撮像することにより、前記第2の距離画像の算出のための該被写体の参照画像を取得する少なくとも1つの第3の撮像手段と、
前記基準画像および前記参照画像間における画素の対応点を探索する対応点探索手段と、
該探索した対応点に基づいて前記被写体の立体形状を表す前記第2の距離画像を生成する第2の距離画像生成手段とを備えた立体撮像装置の制御方法であって、
前記第1の撮像手段による撮像前に、前記第2および前記第3の撮像手段に撮像を行わせ、
該撮像により取得した画像から所定被写体を検出して該所定被写体の検出結果を出力し、
該所定被写体が検出された場合には、前記第2および前記第3の撮像手段にのみ撮像を行わせ、
前記第2の距離画像生成手段にのみ前記第2の距離画像を生成させることを特徴とする立体撮像装置の制御方法。
First imaging means for irradiating a subject with distance measuring light, imaging reflected light of the distance measuring light from the subject, and obtaining data for a distance image representing the three-dimensional shape of the subject;
First distance image generation means for generating a first distance image representing the three-dimensional shape of the subject based on the distance image data;
Second imaging means for acquiring a reference image of the subject for calculating a second distance image by imaging the subject;
At least one third imaging means for acquiring a reference image of the subject for calculation of the second distance image by imaging the subject from a position different from the second imaging means;
Corresponding point search means for searching for corresponding points of pixels between the reference image and the reference image;
A control method for a stereoscopic imaging apparatus, comprising: a second distance image generation unit configured to generate the second distance image representing the stereoscopic shape of the subject based on the searched corresponding points;
Prior to imaging by the first imaging means, the second and third imaging means perform imaging,
Detecting a predetermined subject from an image acquired by the imaging and outputting a detection result of the predetermined subject;
When the predetermined subject is detected, only the second and third imaging means perform imaging,
A control method for a stereoscopic imaging apparatus, wherein only the second distance image generation means generates the second distance image.
測距光を被写体に照射し、該被写体による前記測距光の反射光を撮像して、前記被写体の立体形状を表す距離画像用のデータを取得する第1の撮像手段と、
前記距離画像用のデータに基づいて、前記被写体の立体形状を表す第1の距離画像を生成する第1の距離画像生成手段と、
前記被写体を撮像することにより、第2の距離画像の算出のための該被写体の基準画像を取得する第2の撮像手段と、
前記第2の撮像手段と異なる位置から前記被写体を撮像することにより、前記第2の距離画像の算出のための該被写体の参照画像を取得する少なくとも1つの第3の撮像手段と、
前記基準画像および前記参照画像間における画素の対応点を探索する対応点探索手段と、
該探索した対応点に基づいて前記被写体の立体形状を表す前記第2の距離画像を生成する第2の距離画像生成手段とを備えた立体撮像装置の制御方法をコンピュータに実行させるためのプログラムであって、
前記第1の撮像手段による撮像前に、前記第2および前記第3の撮像手段に撮像を行わせる手順と、
該撮像により取得した画像から所定被写体を検出して該所定被写体の検出結果を出力する手順と、
該所定被写体が検出された場合には、前記第2および前記第3の撮像手段にのみ撮像を行わせる手順と、
前記第2の距離画像生成手段にのみ前記第2の距離画像を生成させる手順とを有することを特徴とするプログラム。
First imaging means for irradiating a subject with distance measuring light, imaging reflected light of the distance measuring light from the subject, and obtaining data for a distance image representing the three-dimensional shape of the subject;
First distance image generation means for generating a first distance image representing the three-dimensional shape of the subject based on the distance image data;
Second imaging means for acquiring a reference image of the subject for calculating a second distance image by imaging the subject;
At least one third imaging means for acquiring a reference image of the subject for calculation of the second distance image by imaging the subject from a position different from the second imaging means;
Corresponding point search means for searching for corresponding points of pixels between the reference image and the reference image;
A program for causing a computer to execute a control method of a stereoscopic imaging apparatus including second distance image generation means for generating the second distance image representing the stereoscopic shape of the subject based on the searched corresponding points. There,
A procedure for causing the second and third imaging means to perform imaging before imaging by the first imaging means;
A procedure for detecting a predetermined subject from an image acquired by the imaging and outputting a detection result of the predetermined subject;
A procedure for causing only the second and third imaging means to perform imaging when the predetermined subject is detected;
A program that causes only the second distance image generating means to generate the second distance image.
JP2007212562A 2007-08-17 2007-08-17 Stereoscopic imaging device, control method of stereoscopic imaging device, and program Abandoned JP2009047497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007212562A JP2009047497A (en) 2007-08-17 2007-08-17 Stereoscopic imaging device, control method of stereoscopic imaging device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007212562A JP2009047497A (en) 2007-08-17 2007-08-17 Stereoscopic imaging device, control method of stereoscopic imaging device, and program

Publications (1)

Publication Number Publication Date
JP2009047497A true JP2009047497A (en) 2009-03-05

Family

ID=40499860

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007212562A Abandoned JP2009047497A (en) 2007-08-17 2007-08-17 Stereoscopic imaging device, control method of stereoscopic imaging device, and program

Country Status (1)

Country Link
JP (1) JP2009047497A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102540689A (en) * 2009-04-15 2012-07-04 奥林巴斯映像株式会社 Image pickup apparatus
JP2012522231A (en) * 2009-03-31 2012-09-20 アルカテル−ルーセント Method for determining the relative position of a first image device and a second image device and these devices
US20140028804A1 (en) * 2011-04-07 2014-01-30 Panasonic Corporation 3d imaging apparatus
US8670593B2 (en) 2010-11-03 2014-03-11 Samsung Electronics Co., Ltd. Apparatus and method for dynamically controlling integration time of depth camera for accuracy improvement
JP2016099140A (en) * 2014-11-18 2016-05-30 朝日航洋株式会社 Water bottom observation system
JP2016529491A (en) * 2013-12-24 2016-09-23 ソフトキネティク センサーズ エヌブイ Time-of-flight camera system
CN108693514A (en) * 2017-04-07 2018-10-23 发那科株式会社 The filming apparatus that the exception of image of adjusting the distance is detected
JP2018196107A (en) * 2017-05-15 2018-12-06 立普思股▲ふん▼有限公司LIPS Corporation Expandable double lens device
JP2019215364A (en) * 2014-11-18 2019-12-19 朝日航洋株式会社 Water-bottom observation system
JP2020057924A (en) * 2018-10-01 2020-04-09 株式会社リコー Imaging device and image processing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005077130A (en) * 2003-08-28 2005-03-24 Olympus Corp Object recognition device
JP2006177937A (en) * 2004-11-26 2006-07-06 Denso It Laboratory Inc Distance measuring device and distance measurement method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005077130A (en) * 2003-08-28 2005-03-24 Olympus Corp Object recognition device
JP2006177937A (en) * 2004-11-26 2006-07-06 Denso It Laboratory Inc Distance measuring device and distance measurement method

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012522231A (en) * 2009-03-31 2012-09-20 アルカテル−ルーセント Method for determining the relative position of a first image device and a second image device and these devices
CN102540689B (en) * 2009-04-15 2014-08-13 奥林巴斯映像株式会社 Image pickup apparatus
CN102540689A (en) * 2009-04-15 2012-07-04 奥林巴斯映像株式会社 Image pickup apparatus
US8670593B2 (en) 2010-11-03 2014-03-11 Samsung Electronics Co., Ltd. Apparatus and method for dynamically controlling integration time of depth camera for accuracy improvement
US9807369B2 (en) 2011-04-07 2017-10-31 Panasonic Intellectual Property Management Co., Ltd. 3D imaging apparatus
US20140028804A1 (en) * 2011-04-07 2014-01-30 Panasonic Corporation 3d imaging apparatus
JP2016529491A (en) * 2013-12-24 2016-09-23 ソフトキネティク センサーズ エヌブイ Time-of-flight camera system
US11863734B2 (en) 2013-12-24 2024-01-02 Sony Depthsensing Solutions Sa/Nv Time-of-flight camera system
US11172186B2 (en) 2013-12-24 2021-11-09 Sony Depthsensing Solutions Sa/Nv Time-Of-Flight camera system
US10397552B2 (en) 2013-12-24 2019-08-27 Sony Depthsensing Solutions Sa/Nv Time-of-flight camera system
US10638118B2 (en) 2013-12-24 2020-04-28 Sony Depthsensing Solutions Sa/Nv Time-of-flight camera system
JP2019215364A (en) * 2014-11-18 2019-12-19 朝日航洋株式会社 Water-bottom observation system
JP2016099140A (en) * 2014-11-18 2016-05-30 朝日航洋株式会社 Water bottom observation system
CN108693514A (en) * 2017-04-07 2018-10-23 发那科株式会社 The filming apparatus that the exception of image of adjusting the distance is detected
US10469823B2 (en) 2017-04-07 2019-11-05 Fanuc Corporation Image apparatus for detecting abnormality of distance image
JP2018179654A (en) * 2017-04-07 2018-11-15 ファナック株式会社 Imaging device for detecting abnormality of distance image
JP2018196107A (en) * 2017-05-15 2018-12-06 立普思股▲ふん▼有限公司LIPS Corporation Expandable double lens device
JP2020057924A (en) * 2018-10-01 2020-04-09 株式会社リコー Imaging device and image processing method
JP7131268B2 (en) 2018-10-01 2022-09-06 株式会社リコー Imaging device and imaging processing method

Similar Documents

Publication Publication Date Title
US10997696B2 (en) Image processing method, apparatus and device
JP2009047497A (en) Stereoscopic imaging device, control method of stereoscopic imaging device, and program
KR102480245B1 (en) Automated generation of panning shots
JP5178553B2 (en) Imaging device
US9344701B2 (en) Methods, systems, and computer-readable storage media for identifying a rough depth map in a scene and for determining a stereo-base distance for three-dimensional (3D) content creation
JP4886716B2 (en) Image processing apparatus and method, and program
JP2011166264A (en) Image processing apparatus, imaging device and image processing method, and program
JP6214233B2 (en) Information processing apparatus, information processing system, information processing method, and program.
JP2009047498A (en) Stereoscopic imaging device, control method of stereoscopic imaging device, and program
JP2009047496A (en) Stereoscopic imaging device, control method of stereoscopic imaging device, and program
WO2011014421A2 (en) Methods, systems, and computer-readable storage media for generating stereoscopic content via depth map creation
WO2012002157A1 (en) Image capture device for stereoscopic viewing-use and control method of same
JP2011087128A (en) Pantoscopic camera and method for discrimination of object
JP2008172342A (en) Three-dimensional image recorder and three-dimensional image recording method
JP2009047495A (en) Stereoscopic imaging device, control method of stereoscopic imaging device, and program
JP2009258005A (en) Three-dimensional measuring device and three-dimensional measuring method
JP6395429B2 (en) Image processing apparatus, control method thereof, and storage medium
JP2010154306A (en) Device, program and method for imaging control
JP2010081357A (en) Image processing apparatus, image processing method, image processing program, and imaging device
JP5190882B2 (en) Compound eye photographing apparatus, control method therefor, and program
JP2018182700A (en) Image processing apparatus, control method of the same, program, and storage medium
CN116456191A (en) Image generation method, device, equipment and computer readable storage medium
JP5453552B2 (en) Imaging apparatus, method and program
KR101599434B1 (en) Space detecting apparatus for image pickup apparatus using auto focusing and the method thereof
JP6486453B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100225

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

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110906

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20110914