JP2014022806A - Image pickup device and image pickup device control method - Google Patents

Image pickup device and image pickup device control method Download PDF

Info

Publication number
JP2014022806A
JP2014022806A JP2012157315A JP2012157315A JP2014022806A JP 2014022806 A JP2014022806 A JP 2014022806A JP 2012157315 A JP2012157315 A JP 2012157315A JP 2012157315 A JP2012157315 A JP 2012157315A JP 2014022806 A JP2014022806 A JP 2014022806A
Authority
JP
Japan
Prior art keywords
camera
image
parallax
focus position
focus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012157315A
Other languages
Japanese (ja)
Inventor
Shigeki Mukai
成樹 向井
Yasutaka Wakabayashi
保孝 若林
Kenichi Iwauchi
謙一 岩内
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2012157315A priority Critical patent/JP2014022806A/en
Publication of JP2014022806A publication Critical patent/JP2014022806A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image pickup device and image pickup device control method which can photograph an image in a short photographing time while at the same time realizing it with a simple configuration at low cost, thereby making it possible to synthesize a bright and clear image having an increased depth of field.SOLUTION: An image pickup device of the present invention has at least a first camera and a second camera for photographing an image. The image pickup device comprises: a subject position detection unit for detecting the subject position; a focus adjustment unit for determining the photographing focus position of the first camera and the photographing focus position of the second camera according to the subject position detected by the subject position detection unit; a parallax calculation unit for calculating parallax information from the image photographed at the photographing focus position of the first camera and the image photographed at the photographing focus position of the second camera; and an image synthesis unit for synthesizing the image of the first camera and the image of the second camera on the basis of the parallax information.

Description

本発明は、複数のカメラで合焦位置を変えて被写体を撮影し、被写界深度の深い画像を合成する撮像装置、および撮像装置制御方法に関する。   The present invention relates to an imaging apparatus that shoots a subject by changing a focus position with a plurality of cameras and synthesizes an image having a deep depth of field, and an imaging apparatus control method.

イメージセンサは小型化が進み、多くの携帯電話やタブレット端末などをはじめとするモバイル性の高い機器に搭載されるようになった。それに伴い、人間は幅広いシーンでカメラを活用するようになったが、カメラの焦点ぼけによる不満も多くなった。例えば、景色と人物を同時に撮影する場合、近景の人物に合焦させると背景がぼけ、遠景に合焦させると人物がぼけてしまい、景色と人物が共に合焦した画像の撮影が困難であった。こういう理由から近景から遠景までの広い範囲において合焦した(ピントの合った)被写界深度の深い画像が求められるようになった。   Image sensors have become smaller in size, and are now mounted on highly mobile devices such as many mobile phones and tablet terminals. Along with that, humans began to use the camera in a wide range of scenes, but there were many complaints due to the camera's defocusing. For example, when shooting a landscape and a person at the same time, focusing on a person in the foreground will blur the background, and focusing on a distant view will blur the person, making it difficult to capture an image in which the scene and the person are both in focus. It was. For this reason, an image with a deep depth of field that is in focus (in focus) in a wide range from a foreground to a distant view has been demanded.

しかしながら、一般的なカメラはレンズの特性から焦点が1点に決まると合焦位置から離れた領域ほどぼけが生じてしまうため、被写界深度の深い画像の取得が困難であった。そこで、従来より、合焦位置の異なる複数の画像を用いて、被写界深度の深い画像を合成する方法が多く提案されている。   However, in a general camera, when the focal point is determined to be one point from the characteristic of the lens, blurring occurs in a region far from the in-focus position, and thus it is difficult to acquire an image having a deep depth of field. Therefore, conventionally, many methods for synthesizing an image having a deep depth of field using a plurality of images having different in-focus positions have been proposed.

特許文献1では、合焦位置が異なる複数の画像からぼけ関数を推定し、それぞれ推定されたぼけ関数に基づき決定される係数を使ったフィルタ処理を施した後に加算することで被写界深度の深い画像を合成する方法について提案されている。   In Patent Document 1, a blur function is estimated from a plurality of images with different in-focus positions, and after adding a filter process using a coefficient determined based on each estimated blur function, the depth of field is increased. A method for synthesizing deep images has been proposed.

また、特許文献2では、被写体からレンズ系を通った光をハーフミラーで複数の光に分割し、光軸に沿ってずらして配置された複数のCCD(Charge Coupled Device Image Sensor)撮像素子に入射させることで合焦位置の異なる複数の画像を記録し、その複数の画像から鮮鋭度が高い画素を抽出して高速に被写界深度の深い画像を合成する方法について提案されている。   Further, in Patent Document 2, light passing through a lens system from a subject is divided into a plurality of lights by a half mirror and incident on a plurality of CCD (Charge Coupled Device Image Sensor) imaging elements arranged so as to be shifted along the optical axis. A method has been proposed in which a plurality of images with different in-focus positions are recorded, pixels with high sharpness are extracted from the plurality of images, and an image with a deep depth of field is synthesized at high speed.

特開2000−251060号公報Japanese Patent Laid-Open No. 2000-251600 特開平10−257369号公報JP-A-10-257369

しかしながら、特許文献1に記載の装置では、単眼カメラで複数の画像を撮影するため、撮影時間が長くなり、撮影中に被写体が動いてしまうと撮影した各画像間で被写体の位置がずれ、合成画像の画質が劣化すると言う課題があった。   However, since the apparatus described in Patent Document 1 captures a plurality of images with a monocular camera, the capturing time becomes long, and if the subject moves during the capturing, the positions of the subjects are shifted between the captured images, and the images are combined. There was a problem that the image quality deteriorated.

また、特許文献2に記載の装置では、高速に合成画像を取得できるが、複数のCCDを持ち、ハーフミラー等を用いるカメラ構成が必要となるため、コストが高く、しかも、ハーフミラーを用いていることで光量が減少してしまうという課題もあった。   In addition, the apparatus described in Patent Document 2 can acquire a composite image at high speed, but requires a camera configuration using a plurality of CCDs and using a half mirror or the like, which is expensive and uses a half mirror. There was also a problem that the amount of light was reduced.

本発明は、斯かる事情に鑑みてなされたものであり、簡易な構成で低いコストで実現できると同時に、短い撮影時間で画像を撮影することで、明るく鮮明で被写界深度の深い画像を合成することを可能とした撮像装置および撮像装置制御方法を提供する。   The present invention has been made in view of such circumstances, and can be realized with a simple configuration at a low cost, and at the same time, by capturing an image with a short shooting time, a bright and clear image having a deep depth of field can be obtained. An imaging device and an imaging device control method that can be combined are provided.

本発明の一観点によれば、画像を撮影する第一のカメラおよび第二のカメラを少なくとも備える撮像装置が提供される。本発明の撮像装置は、被写体位置の検出を行う被写体位置検出部と、前記被写体位置検出部により検出した前記被写体位置に応じて、前記第一のカメラの撮影合焦位置および前記第二のカメラの撮影合焦位置を決定する焦点調整部と、前記第一のカメラの前記撮影合焦位置において撮影された画像と、前記第二のカメラの前記撮影合焦位置において撮影された画像とから視差情報を算出する視差算出部と、前記視差情報に基づいて前記第一のカメラの画像及び前記第二のカメラの画像を合成する画像合成部とを備える。前記焦点調整部は、前記被写体位置に基づいて、前記第一のカメラと前記第二のカメラの撮影合焦位置と撮影回数を決定することを特徴とする。   According to an aspect of the present invention, an imaging apparatus including at least a first camera and a second camera that capture an image is provided. An imaging apparatus according to the present invention includes a subject position detection unit that detects a subject position, and a shooting focus position of the first camera and the second camera according to the subject position detected by the subject position detection unit. A parallax from a focus adjustment unit that determines a shooting focus position of the first camera, an image shot at the shooting focus position of the first camera, and an image shot at the shooting focus position of the second camera A parallax calculation unit that calculates information; and an image synthesis unit that synthesizes the image of the first camera and the image of the second camera based on the parallax information. The focus adjustment unit is configured to determine a shooting focus position and the number of shooting times of the first camera and the second camera based on the subject position.

また、本発明の他の観点によれば、画像を撮影する第一のカメラおよび第二のカメラを少なくとも備える撮像装置における撮像装置制御方法が提供される。本発明の撮像装置制御方法は、被写体位置の検出を行う被写体位置検出ステップと、前記被写体位置検出ステップにより検出した前記被写体位置に応じて、前記第一のカメラの撮影合焦位置および前記第二のカメラの撮影合焦位置を決定する焦点調整ステップと、前記第一のカメラの前記撮影合焦位置において撮影された画像と、前記第二のカメラの前記撮影合焦位置において撮影された画像とから視差情報を算出する視差算出ステップと、前記視差情報に基づいて前記第一のカメラの画像及び前記第二のカメラの画像を合成する画像合成ステップとを備え、前記焦点調整ステップにおいて、前記被写体位置に基づいて、前記第一のカメラと前記第二のカメラの撮影合焦位置と撮影回数を決定することを特徴とする。   According to another aspect of the present invention, there is provided an imaging apparatus control method in an imaging apparatus including at least a first camera and a second camera that capture an image. The imaging apparatus control method of the present invention includes a subject position detection step for detecting a subject position, and a focus position of the first camera and the second position according to the subject position detected by the subject position detection step. A focus adjustment step for determining a shooting focus position of the first camera; an image shot at the shooting focus position of the first camera; and an image shot at the shooting focus position of the second camera; A parallax calculating step for calculating parallax information from the image, and an image synthesizing step for synthesizing the image of the first camera and the image of the second camera based on the parallax information. Based on the position, the photographing focus positions and the number of photographing times of the first camera and the second camera are determined.

また、本発明は、上述の撮像装置制御方法を情報処理装置に実行させるためのプログラムであってもよいし、当該プログラムを記録するコンピュータ読み取り可能な記録媒体であってもよい。さらに、プログラムは、インターネットなどの伝送媒体によって取得されるものでもよい。   Further, the present invention may be a program for causing an information processing apparatus to execute the above-described imaging device control method, or a computer-readable recording medium for recording the program. Furthermore, the program may be acquired by a transmission medium such as the Internet.

本発明によれば、2つのカメラを用いて合焦位置を変えて撮影することで被写界深度の深い画像を取得するのに必要な画像を短時間で撮影することができる。   According to the present invention, it is possible to capture an image necessary for acquiring an image with a deep depth of field in a short time by changing the in-focus position using two cameras.

第1実施形態における画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus in 1st Embodiment. 第1実施形態に係る撮像装置の構成例を示すフローチャートである。3 is a flowchart illustrating a configuration example of an imaging apparatus according to the first embodiment. 被写体位置検出部における動作を模式的に示す説明図である。It is explanatory drawing which shows typically the operation | movement in a to-be-photographed object position detection part. 被写界深度を説明するための模式図である。It is a schematic diagram for demonstrating the depth of field. 撮影合焦位置の決定方法を模式的に示す説明図である。It is explanatory drawing which shows typically the determination method of an imaging | photography focus position. 画像合成部における合成方法を模式的に示す説明図である。It is explanatory drawing which shows typically the synthetic | combination method in an image synthetic | combination part. 第2実施形態における画像処理装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the image processing apparatus in 2nd Embodiment. 第2実施形態における撮像装置の構成例を示すフローチャートである。It is a flowchart which shows the structural example of the imaging device in 2nd Embodiment. 被写体位置検出部における動作を模式的に示す説明図である。It is explanatory drawing which shows typically the operation | movement in a to-be-photographed object position detection part. 合焦位置と被写界深度の関係を示す図である。It is a figure which shows the relationship between a focus position and a depth of field. 撮影回数が偶数の場合に関する例を示す図である。It is a figure which shows the example regarding the case where the frequency | count of imaging | photography is an even number. 撮影回数が奇数の場合に関する例を示す図である。It is a figure which shows the example regarding the case where the frequency | count of imaging | photography is an odd number. 統合視差マップの合成例を示す図である。It is a figure which shows the example of a synthesis | combination of an integrated parallax map. 合焦位置と被写界深度の関係を視差値に表した図である。It is the figure which represented the relationship between a focus position and depth of field to the parallax value.

以下、添付図面を参照して本発明の実施形態について説明する。なお、添付図面は本発明の原理に則った具体的な実施形態と実装例を示しているが、これらは本発明の理解のためのものであり、決して本発明を限定的に解釈するために用いられるものではない。   Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. The attached drawings show specific embodiments and implementation examples based on the principle of the present invention, but these are for understanding the present invention and are not intended to limit the present invention. Not used.

<第1実施形態>
以下、図面を参照して第1実施形態における撮像装置を具体的に説明する。図1は、本実施形態における撮像装置の構成例である。
<First Embodiment>
Hereinafter, the imaging apparatus according to the first embodiment will be specifically described with reference to the drawings. FIG. 1 is a configuration example of an imaging apparatus according to this embodiment.

撮像装置100は、第一カメラ101と、第二カメラ102と、被写体位置検出部103と、パラメータ記憶部104と、焦点調整部105と、位置合わせ部106と、視差算出部107と、画像合成部108とを有する。   The imaging apparatus 100 includes a first camera 101, a second camera 102, a subject position detection unit 103, a parameter storage unit 104, a focus adjustment unit 105, a position adjustment unit 106, a parallax calculation unit 107, and an image composition. Part 108.

第一カメラ101および第二カメラ102は、それぞれ、レンズを含む撮像光学系と、レンズを通った光を撮像素子で受け、デジタル信号に変換するセンサ(図示せず)とを有する。また、各カメラ101,102は、光軸が略平行になるように配置されている他、レンズ位置を任意の距離にある被写体に合焦する位置に移動させることができ、個別に制御できる。   Each of the first camera 101 and the second camera 102 includes an imaging optical system including a lens, and a sensor (not shown) that receives light passing through the lens with an imaging element and converts it into a digital signal. In addition, the cameras 101 and 102 are arranged so that their optical axes are substantially parallel, and the lens position can be moved to a position that focuses on a subject at an arbitrary distance, and can be individually controlled.

撮像装置100は、被写体位置検出部103により、第二カメラ102から画像を取得し、カメラから最も近い被写体までの合焦位置を求める。そして、焦点調整部105は、被写体位置検出部103で検出された合焦位置を基にパラメータ記憶部104からカメラの合焦位置制御に関するパラメータを読み込み、読み込まれたパラメータを用いて撮影合焦位置を算出する。この合焦位置制御に関するパラメータについては、後述する。   The imaging apparatus 100 uses the subject position detection unit 103 to acquire an image from the second camera 102 and obtains a focus position from the camera to the closest subject. Then, the focus adjustment unit 105 reads a parameter related to the focus position control of the camera from the parameter storage unit 104 based on the focus position detected by the subject position detection unit 103, and uses the read parameter for the shooting focus position. Is calculated. The parameters relating to the focus position control will be described later.

撮像装置100は、焦点調整部105において算出した合焦位置に従い、各カメラ101,102を撮影合焦位置に移動させ、撮影を行う。位置合わせ部106は、焦点調整部105の制御によって撮影された第一カメラ101と第二カメラ102の画像に対してパラメータ記憶部104から位置合わせ用のパラメータを読み込み、それぞれ位置合わせを行う。   The imaging apparatus 100 performs shooting by moving the cameras 101 and 102 to the shooting focus position according to the focus position calculated by the focus adjustment unit 105. The alignment unit 106 reads alignment parameters from the parameter storage unit 104 with respect to the images of the first camera 101 and the second camera 102 captured by the control of the focus adjustment unit 105, and performs alignment.

視差算出部107は、位置合わせ部106による位置合わせ処理の後の第一カメラ101および第二カメラ102の画像から視差マップを算出する。そして、画像合成部108は、算出した視差マップを用いてマスクを作成し、被写界深度の深い画像の合成を行う。ここで、視差とは、視点の異なる各撮影画像間で同一の被写体が撮影されている位置のずれ量である。そして、視差マップとは、撮影画像の全て、あるいは一部の画素において算出した視差をまとめた情報である。   The parallax calculation unit 107 calculates a parallax map from the images of the first camera 101 and the second camera 102 after the alignment processing by the alignment unit 106. Then, the image synthesis unit 108 creates a mask using the calculated parallax map and synthesizes an image with a deep depth of field. Here, the parallax is a shift amount of a position where the same subject is photographed between photographed images with different viewpoints. The parallax map is information that summarizes parallaxes calculated in all or some of the captured images.

図2は、第1実施形態に係る撮像装置の制御法を示すフローチャートである。以下では、図2のフローチャートに従って撮像装置制御方法の詳細について説明する。   FIG. 2 is a flowchart illustrating a control method of the imaging apparatus according to the first embodiment. Hereinafter, details of the imaging apparatus control method will be described with reference to the flowchart of FIG.

まず、ステップS10において、被写体位置検出部103は、第二カメラ102によって近景被写体位置を検出する。この際、第二カメラ102は、最短撮影距離から無限遠距離に向かって、合焦位置を探索する。無限遠とは、カメラの光学系においてその距離以降焦点調節が不要となる距離のことを指し、無限遠距離は、無限遠に合焦するレンズ位置に対応する距離のことを指す。また、最短撮影距離は、カメラのレンズの焦点が合う範囲のうち、最も手前に合焦するレンズ位置に対応するカメラからの距離のことである。以降、無限遠距離のことをINF、最短撮影距離をMODと呼ぶ。   First, in step S <b> 10, the subject position detection unit 103 detects the foreground subject position by the second camera 102. At this time, the second camera 102 searches for the in-focus position from the shortest shooting distance toward infinity. The infinity refers to a distance that does not require focus adjustment after that distance in the camera optical system, and the infinity distance refers to a distance corresponding to a lens position that focuses on infinity. In addition, the shortest shooting distance is a distance from the camera corresponding to the lens position that is closest to the lens in the focusing range of the camera lens. Hereinafter, the infinite distance is called INF, and the shortest shooting distance is called MOD.

図3に示すように、第二カメラ102では合焦位置の探索開始点をMODに設定し、MODからINF方向に合焦位置の探索を行う。本例では、合焦位置の探索にコントラスト検出法を用いる。コントラスト検出法は、レンズを移動させながら画像を取得し、各画像においてコントラスト値を計算していき、コントラスト値が高くなる画像を撮影したレンズ位置を合焦位置として決める方法である。最初にコントラストが高くなった時点、つまり第二カメラ102が被写体Aのある合焦位置Dにレンズを移動した時点で終了する。ここで、コントラストの検出範囲は、画像全体とし、画像全体を複数の領域に分けてそれぞれのコントラスト値を計算することで合焦位置を検出する。また、コントラストが高くなったかどうかの判断は、あらかじめ閾値を決めておき、コントラスト値が閾値以上になったかどうかで判定する等の方法で判断できる。例えば、複数の領域のうち1つでも閾値を超えた時点で判断する。合焦位置が検出された場合、被写体位置検出部103は、第二カメラ102の合焦位置を近景被写体位置として決定する。 As shown in FIG. 3, the second camera 102 sets the focus position search start point to MOD, and searches for the focus position in the INF direction from MOD. In this example, a contrast detection method is used for searching for a focus position. The contrast detection method is a method of acquiring an image while moving a lens, calculating a contrast value in each image, and determining a lens position where an image with a high contrast value is taken as a focus position. First time the contrast is increased, i.e. the second camera 102 is completed at the time of moving the lens to a position D A focus of the subject A. Here, the contrast detection range is the entire image, and the entire image is divided into a plurality of regions, and the contrast value is calculated to detect the in-focus position. Whether the contrast has increased can be determined by a method of determining a threshold value in advance and determining whether the contrast value is equal to or higher than the threshold value. For example, the determination is made when at least one of the plurality of areas exceeds the threshold. When the in-focus position is detected, the subject position detection unit 103 determines the in-focus position of the second camera 102 as the foreground subject position.

本例では、コントラスト検出法による合焦位置検出を用いた場合を想定して説明したが、オートフォーカスで使用される位相差検出方式やコントラストと位相差を両方用いるハイブリッド方式等の焦点検出手段を用いてもよい。以上のように、予め被写体位置を検出しておくことによって、画像撮影時に被写体が存在しない範囲で撮影しないようにすることができ、被写体の存在する範囲で被写界深度の深い画像を合成することが可能となる。   In this example, the case of using the focus position detection by the contrast detection method has been described, but focus detection means such as a phase difference detection method used in autofocus and a hybrid method using both contrast and phase difference are used. It may be used. As described above, by detecting the position of the subject in advance, it is possible to prevent shooting in a range where the subject does not exist at the time of image shooting, and to synthesize an image having a deep depth of field in the range where the subject exists. It becomes possible.

次に、図2に示すステップS11において、焦点調整部105は、被写体位置検出部103により検出された被写体位置に従って、パラメータ記憶部104からパラメータを読み込み、撮影合焦位置の算出および決定を行う。パラメータ記憶部104には、撮影合焦位置を求めるためのパラメータが記憶されている。ここで記憶されているパラメータは、例えば、レンズ位置と合焦位置の対応関係を示す情報、レンズの焦点距離、カメラのF値、レンズの許容錯乱円直径、ぼけの許容度(何画素ずれからボケとして扱うかの許容度)である。以下の説明では、レンズ位置と合焦位置の対応関係はパラメータ記憶部104に記憶されており、焦点調整部105は被写体位置検出部103により被写体位置が検出された際のレンズ位置を合焦位置に変換して制御を行う。また、焦点調節する場合は合焦位置からレンズ位置に変換を行った後、制御を行う。   Next, in step S <b> 11 shown in FIG. 2, the focus adjustment unit 105 reads parameters from the parameter storage unit 104 according to the subject position detected by the subject position detection unit 103, and calculates and determines the shooting focus position. The parameter storage unit 104 stores parameters for obtaining the shooting focus position. The parameters stored here include, for example, information indicating the correspondence between the lens position and the in-focus position, the focal length of the lens, the F value of the camera, the allowable confusion circle diameter of the lens, the blur tolerance (from how many pixel deviations It is the tolerance of whether to treat as blur. In the following description, the correspondence relationship between the lens position and the focus position is stored in the parameter storage unit 104, and the focus adjustment unit 105 determines the lens position when the subject position is detected by the subject position detection unit 103 as the focus position. Convert to and control. Also, when adjusting the focus, control is performed after conversion from the in-focus position to the lens position.

図4は、被写界深度を説明するための模式図であり、横軸は第二カメラ102からの距離である。図4に示すように、Lを前方被写界深度、Lを後方被写界深度とすると、カメラの被写界深度Lは(1)式のように示される。ここで、前方被写界深度とは、合焦位置より前方側で合焦したように見える範囲のことを指し、後方被写界深度とは合焦位置より後方側で合焦したように見える範囲のことを指す。
= L+L ・・・(1)
FIG. 4 is a schematic diagram for explaining the depth of field, and the horizontal axis is the distance from the second camera 102. As shown in FIG. 4, the forward depth of field and L 1, when the L 2 and rear depth of field, depth of field L f of the camera is shown as equation (1). Here, the front depth of field refers to a range that appears to be in focus on the front side from the focus position, and the rear depth of field appears to be focused on the rear side from the focus position. Refers to a range.
L f = L 1 + L 2 (1)

また、レンズの焦点距離をf、カメラのF値をF、レンズの許容錯乱円直径をδ、ぼけの許容度(何画素ずれからボケとして扱うかの許容度)をp、カメラからの距離をlとすると、式(2)および(3)の関係がそれぞれ成り立つ。したがって、式(1)、式(2)、式(3)により、式(4)を求めることができる。
=δpFl/(f+δpFl) ・・・(2)
=δpFl/(f−δpFl) ・・・(3)
=δpFl/(f+δpFl) +δpFl/(f−δpFl) ・・・(4)
Further, the focal length of the lens is f, the F value of the camera is F, the allowable circle of confusion diameter of the lens is δ, the tolerance of blur (the tolerance of how many pixel shifts are treated as blur) is p, and the distance from the camera is If it is set to l, the relationship of Formula (2) and (3) will respectively hold. Therefore, Expression (4) can be obtained from Expression (1), Expression (2), and Expression (3).
L 1 = δpFl 2 / (f 2 + δpFl) (2)
L 2 = δpFl 2 / (f 2 −δpFl) (3)
L f = δpFl 2 / (f 2 + δpFl) + δpFl 2 / (f 2 −δpFl) (4)

図5は、撮影合焦位置の決定方法を模式的に示す説明図である。図5に示すように、被写体位置検出部103で検出した近景被写体位置Dが前方被写界深度に含まれる合焦位置fを、上記の式を使って決定する。式(2)を用いて、まず、カメラからの距離lの初期値を近景被写体位置Dとし、カメラからの距離lをINF方向に向かってを一定値毎に変えていき、各距離での前方被写界深度を算出していく。近景被写体位置Dと前方被写界深度が最も近くなった距離を合焦位置fと決定する。決定した合焦位置fを第二カメラ102の撮影合焦位置とする。 FIG. 5 is an explanatory diagram schematically showing a method for determining the photographing focus position. As shown in FIG. 5, the in-focus position f A which foreground object position D A detected by the object position detection unit 103 is included in the forward depth of field, determined using the above equation. Using equation (2), first, the initial value of the distance l from the camera as the foreground subject position D A, will change the toward the distance l from the camera in the INF direction every fixed value, for each distance The forward depth of field is calculated. Foreground object position D A and the forward depth of field is determined as the focusing position f A distance became closest. The determined focus position f A and photographic focal position of the second camera 102.

次に、式(3)を用いて、決定した第二カメラ102の撮影合焦位置fから後方被写界深度を求める。そして、式(2)を用いて、求めた撮影合焦位置fの後方被写界深度を初期値とし、撮影合焦位置fの後方被写界深度からINF位置に向かってカメラからの距離lを一定値毎に変えていき、各距離を合焦位置とした時の前方被写界深度を算出していく。撮影合焦位置fの後方被写界深度とfの前方被写界深度が最も近くなった合焦位置を合焦位置fと決める。決定した合焦位置fを第一カメラ101の撮影合焦位置とする。以上の方針で撮影合焦位置を決定することで、深い被写界深度を包含する2つの画像を得ることができる。本例では、撮影合焦位置fの後方被写界深度とfの前方被写界深度が最も近くなった合焦位置をfと決定しているが、必ずしも最も近くなった合焦位置をfと決定する必要はなく、撮影合焦位置fの後方被写界深度にfの前方被写界深度の少なくとも一部が含まれるならば、その合焦位置をfと決定してもよい。最も近くする事で後述する合成画像の被写界深度が最も深くなるが、少なくとも一部が含まれれば、単眼の画像に比べて合成画像の被写界深度は深くなる為である。 Next, using the expression (3), the rear depth of field is obtained from the determined shooting focus position f A of the second camera 102. Then, using equation (2), the imaging focus position f A of obtaining the backward depth of field as the initial value, from the camera from the rear depth of field of the taking-focus position f A toward the INF position The distance l is changed for every fixed value, and the forward depth of field when each distance is set to the in-focus position is calculated. The focus position forward depth of field becomes closest to the rear depth of field and f B photographing focus position f A decide focus position f B. The determined focus position f B and imaging focus position of the first camera 101. By determining the shooting focus position according to the above policy, two images including a deep depth of field can be obtained. Focusing in this embodiment, although the focus position forward depth of field becomes closest to the rear depth of field and f B photographing focus position f A is determined as f B, which necessarily closest The position need not be determined as f B, and if at least a part of the front depth of field of f B is included in the rear depth of field of the shooting focus position f A , the focus position is determined as f B. You may decide. This is because the depth of field of a composite image, which will be described later, becomes the deepest by being closest, but if at least a portion is included, the depth of field of the composite image is deeper than a monocular image.

次に、ステップS12において、焦点調整部105は、算出した2つの撮影合焦位置f,fに各カメラ101,102の合焦位置を移動させ、焦点を合わせて撮影を行う。すなわち、本実施例では、焦点調整部105は、算出した2つの撮影合焦位置f,fで撮影を行うため、撮影回数は2回となる。 Next, in step S12, the focus adjustment unit 105 moves the in-focus positions of the cameras 101 and 102 to the two calculated in-focus positions f A and f B , and performs imaging while focusing. That is, in the present embodiment, the focus adjustment unit 105 performs imaging at the two calculated imaging focus positions f A and f B , so the number of imaging is two.

次に、ステップS13において、位置合わせ部106は、パラメータ記憶部104から位置合わせ用のパラメータを読み込む。位置合わせ用のパラメータは、合焦位置が変化することによる画角の違い(画像の大きさ)を補正するパラメータである。合焦位置がINF側にいくほど画角が小さくなるため撮像される像は拡大され、この後のステップで行う視差の算出や、全焦点画像の合成が困難になる。本実施形態のように第一および第二カメラ101,102が平行に配置されており、画角の違い(画像の大きさ)のみを補正すればよい場合には、パラメータ記憶部104に合焦位置を変えて撮影した画像間の拡大率を保持しておき、それをパラメータとして位置合わせ部106が読み込む。   Next, in step S <b> 13, the alignment unit 106 reads parameters for alignment from the parameter storage unit 104. The alignment parameter is a parameter for correcting a difference in angle of view (image size) due to a change in the focus position. Since the angle of view becomes smaller as the in-focus position is closer to the INF side, the captured image is enlarged, and it becomes difficult to calculate parallax and synthesize an omnifocal image in subsequent steps. When the first and second cameras 101 and 102 are arranged in parallel as in the present embodiment and only the difference in the angle of view (image size) needs to be corrected, the parameter storage unit 104 is focused. An enlargement ratio between images photographed at different positions is held, and the alignment unit 106 reads it as a parameter.

次に、ステップS14において、位置合わせ部106は、読み込んだパラメータを用いて各合焦位置f,fで撮影した画像に対して、画像の拡大縮小の処理を実行する。 Next, in step S < b > 14, the alignment unit 106 performs image enlargement / reduction processing on the images captured at the in-focus positions f A and f B using the read parameters.

次に、ステップS15において、視差算出部107は、位置合わせ部106で位置合わせを行った画像から視差マップを算出する。視差算出部107は、異なる合焦位置f,fで撮影した、第一カメラ101の画像を基準画像、第二カメラ102の画像を参照画像としてブロックマッチングを行い、両画素ブロックの相関度を求め、相関度に基づいて視差マップを算出する。なお、相関度は、例えばSAD(Sum of Absolute Difference)法による相関値演算により求めることができ、基準画像の各画素において参照画像上で相関度が最も高くなる位置を検出する事により、視差を算出できる。また、SAD以外にもSSD(Sum of Squared Difference)やZNCC(Zero−mean Normalized Cross−Correlation)等の別の相関度を用いて視差マップを求めてもよい。 Next, in step S <b> 15, the parallax calculation unit 107 calculates a parallax map from the image that has been registered by the registration unit 106. The parallax calculation unit 107 performs block matching using the image of the first camera 101 taken as a reference image and the image of the second camera 102 taken at different in-focus positions f A and f B as a reference image, and the degree of correlation between both pixel blocks And a parallax map is calculated based on the degree of correlation. The correlation degree can be obtained, for example, by a correlation value calculation by the SAD (Sum of Absolute Difference) method. By detecting a position where the correlation degree is highest on the reference image in each pixel of the standard image, the parallax can be obtained. It can be calculated. In addition to SAD, a parallax map may be obtained using another degree of correlation such as SSD (Sum of Squared Difference) or ZNCC (Zero-mean Normalized Cross-Correlation).

次に、ステップS16において、画像合成部108は、視差算出部107で得た視差マップを用いて、第一カメラ101の合焦位置におけるマスクを作成し、それを基に画像の合成を行う。画像の合成は、視差マップを2つの視差範囲に分割することでマスクを作成し、第一カメラ101で撮影した画像に対しマスク範囲に対応した第二カメラ102の画像の一部を貼り合わせて合成を行う。視差範囲を分割するには、距離と視差の対応がとれていることが必要となるため、視差と距離の対応を求める。距離から視差値の変換は、視差値をd、カメラの焦点距離をf、カメラの基線長をB、δをレンズの許容錯乱円直径、距離をDとすると、式5の関係が成り立つ。
d=f・B/δ・D ・・・(5)
Next, in step S <b> 16, the image composition unit 108 creates a mask at the in-focus position of the first camera 101 using the parallax map obtained by the parallax calculation unit 107, and performs image synthesis based on the mask. For image synthesis, a mask is created by dividing the parallax map into two parallax ranges, and a part of the image of the second camera 102 corresponding to the mask range is pasted to the image shot by the first camera 101. Perform synthesis. In order to divide the parallax range, it is necessary to have correspondence between the distance and the parallax. The distance-to-parallax value conversion is expressed by the following equation (5), where d is the parallax value, f is the focal length of the camera, B is the base length of the camera, δ is the allowable circle of confusion circle diameter of the lens, and D is the distance.
d = f · B / δ · D (5)

式(5)を用いて合焦位置と被写界深度に対応した視差値を求めることができる。視差範囲の分割は、式(5)を用い、例えば第一カメラ101の合焦位置の被写界深度に対応する視差値の範囲が25〜72であった場合、視差値が72以下の範囲と視差値が73以上の範囲に分け、視差値が73以上の範囲を第二カメラ102での合焦位置のマスクとする。   Using equation (5), a parallax value corresponding to the in-focus position and the depth of field can be obtained. The parallax range is divided using Equation (5). For example, when the range of the parallax value corresponding to the depth of field at the in-focus position of the first camera 101 is 25 to 72, the range of the parallax value is 72 or less. And the parallax value is 73 or more, and the range where the parallax value is 73 or more is used as a mask for the in-focus position of the second camera 102.

図6は、画像合成部における合成方法を模式的に示す説明図である。図6に示すように、画像の合成は、作成したマスクを用いて第二カメラ102で撮影した画像202から視差値分をキャンセルした後、マスク203を抜き出して、第一カメラ101で撮影した画像201の対応画素と置き換えて行う。これにより、被写界深度の深い画像204を合成することができる。
以上の処理によって、マスク生成から画像合成までの処理を行う。
FIG. 6 is an explanatory diagram schematically showing a composition method in the image composition unit. As shown in FIG. 6, the image synthesis is performed by canceling the parallax value from the image 202 captured by the second camera 102 using the created mask, and then extracting the mask 203 and capturing the image by the first camera 101. This is performed by replacing the corresponding pixel 201. Thereby, the image 204 with a deep depth of field can be synthesized.
Through the above processing, processing from mask generation to image composition is performed.

なお、本実施形態の構成では、2つのカメラ101,102で同時に撮影し被写界深度の深い画像を合成することができるため、動画にも対応できる。また、ハーフミラー等の特殊な装置を用いていないので光量を十分に確保できる上、一般的なカメラで構成できるのでコストも安い。   Note that in the configuration of the present embodiment, an image with a deep depth of field can be synthesized by two cameras 101 and 102 at the same time, so that it can also handle moving images. In addition, since a special device such as a half mirror is not used, a sufficient amount of light can be secured, and a general camera can be used, so that the cost is low.

なお、本実施形態では、被写体位置検出部103が第二カメラ102を用いて近景被写体位置を検出したが、第二カメラ102を用いることを限定しているわけではなく、どちらのカメラを用いてもよい。
なお、ここでは2つのカメラを使用する例を示したが、3つ以上のカメラを用いても良い。また、1つのカメラを用いて異なる合焦位置で撮影する場合においても、被写体位置を考慮すると共に、あらかじめぼけ量に基づいて算出した被写界深度が重複するように撮影合焦位置を決定する事で、少ない回数で効果的に全焦点画像を生成するための画像を取得する事ができる。
なお、本実施形態では、算出した2つの撮影合焦位置f,fで2つのカメラ101、102によって撮影する例を示したが、3つ以上のカメラによって、それぞれ異なる撮影合焦位置で撮影するようにしてもよく、撮影回数は、算出された撮影合焦位置に応じて決定される。
In this embodiment, the subject position detection unit 103 detects the foreground subject position using the second camera 102. However, the use of the second camera 102 is not limited, and which camera is used. Also good.
Although an example in which two cameras are used is shown here, three or more cameras may be used. Also, even when shooting at different in-focus positions using a single camera, the in-focus position is determined so that the subject position is considered and the depth of field calculated based on the amount of blur overlaps in advance. Thus, an image for generating an omnifocal image effectively can be acquired with a small number of times.
In this embodiment, an example is shown in which the two cameras 101 and 102 are used to capture images at the two calculated in-focus positions f A and f B. However, three or more cameras have different in-focus positions. You may make it image | photograph, and the frequency | count of imaging | photography is determined according to the imaging | photography focusing position calculated.

<第2実施形態>
以下、図面を参照して第2実施形態における撮像装置を具体的に説明する。図7は、本実施形態における撮像装置の構成例である。
Second Embodiment
Hereinafter, the imaging apparatus according to the second embodiment will be specifically described with reference to the drawings. FIG. 7 is a configuration example of the imaging apparatus in the present embodiment.

撮像装置300は、第一カメラ301と、第二カメラ302と、被写体位置検出部303と、パラメータ記憶部304と、焦点調整部305と、位置合わせ部306と、視差算出部307と、視差統合部308と、画像合成部309とを有する。   The imaging apparatus 300 includes a first camera 301, a second camera 302, a subject position detection unit 303, a parameter storage unit 304, a focus adjustment unit 305, a position adjustment unit 306, a parallax calculation unit 307, and parallax integration. A unit 308 and an image composition unit 309.

第一カメラ301および第二カメラ302は、それぞれ、レンズを含む撮像光学系と、レンズを通った光を撮像素子で受け、デジタル信号に変換するセンサ(図示せず)とを有する。また、各カメラ301,302は、光軸が平行になるように配置されている他、レンズ位置を任意の距離にある被写体に合焦する位置に移動させることができ、個別に制御できる。   Each of the first camera 301 and the second camera 302 includes an imaging optical system including a lens, and a sensor (not shown) that receives light passing through the lens with an imaging device and converts the light into a digital signal. The cameras 301 and 302 are arranged so that their optical axes are parallel to each other, and the lens position can be moved to a position for focusing on a subject at an arbitrary distance and can be individually controlled.

撮像装置300は、被写体位置検出部303により、第一カメラ301と第二カメラ302とから画像を取得し、各カメラ301,302から最も近い被写体までの合焦位置と最も遠い被写体との合焦位置を検出することにより、被写体位置を決定する。   The imaging apparatus 300 acquires images from the first camera 301 and the second camera 302 by the subject position detection unit 303, and focuses the in-focus position from each camera 301, 302 to the closest subject and the farthest subject. The subject position is determined by detecting the position.

焦点調整部305は、被写体位置検出部303で検出された被写体位置を基にパラメータ記憶部304から合焦位置と被写界深度との関係に関するテーブル情報を参照し、撮影合焦位置と撮影回数などのパラメータを決定する。テーブル情報については後述する。   The focus adjustment unit 305 refers to the table information regarding the relationship between the in-focus position and the depth of field from the parameter storage unit 304 based on the subject position detected by the subject position detection unit 303, and determines the in-focus position and the number of times of shooting. Determine parameters such as. The table information will be described later.

撮像装置300は、決定したパラメータに従って、各カメラ301,302を撮影合焦位置に移動させ、撮影を行う。位置合わせ部306は、焦点調整部305により撮影された画像に対してパラメータ記憶部304から位置合わせ用パラメータを読み込み、位置合わせを行う。   The imaging apparatus 300 performs imaging by moving the cameras 301 and 302 to the imaging focus position according to the determined parameters. The alignment unit 306 reads alignment parameters from the parameter storage unit 304 for the image captured by the focus adjustment unit 305 and performs alignment.

視差算出部307は、位置合わせ部306による位置合わせ処理の後の第一カメラ301および第二カメラ302の画像から、視差情報である視差マップを算出する。視差マップとは、全ての画素において視差を求めた画像のことを指す。   The parallax calculation unit 307 calculates a parallax map that is parallax information from the images of the first camera 301 and the second camera 302 after the alignment processing by the alignment unit 306. The parallax map refers to an image for which parallax is obtained for all pixels.

視差統合部308は、視差算出部307から与えられる複数の視差マップから後述する統合視差マップを合成する。画像合成部309は、統合視差マップを用いてマスクを作成し、全焦点画像を合成する。全焦点画像とは、ここでは被写体全てにピントの合った被写界深度の深い鮮明な画像である。ピントの合った鮮明な画像とは、あらかじめ設定したぼけの許容度より大きいぼけが無いことを意味する。   The parallax integration unit 308 synthesizes an integrated parallax map described later from the plurality of parallax maps given from the parallax calculation unit 307. The image synthesis unit 309 creates a mask using the integrated parallax map and synthesizes the omnifocal image. Here, the omnifocal image is a clear image having a deep depth of field in which all the subjects are in focus. A clear and focused image means that there is no blur larger than the preset blur tolerance.

図8は、第2実施形態に係る撮像装置の制御法を示すフローチャートである。以下では、図8のフローチャートに従って撮像装置制御方法の詳細について説明する。   FIG. 8 is a flowchart illustrating a control method of the imaging apparatus according to the second embodiment. Hereinafter, the details of the imaging apparatus control method will be described with reference to the flowchart of FIG.

まず、ステップS20において、被写体位置検出部303により被写体位置を決定する。図9は、被写体位置検出部303における動作を模式的に示す説明図である。図9における横軸は、各カメラ301,302のレンズ面からの距離である。
第一カメラ301はINFからMODに向かって、一方、第二カメラ302はMODからINFに向かって、合焦位置を探索する。
First, in step S20, the subject position detection unit 303 determines the subject position. FIG. 9 is an explanatory diagram schematically showing the operation of the subject position detection unit 303. The horizontal axis in FIG. 9 is the distance from the lens surfaces of the cameras 301 and 302.
The first camera 301 searches from the INF toward MOD, while the second camera 302 searches for the in-focus position from MOD toward INF.

図9に示すように、第一カメラ301の合焦位置の探索開始点をINFに設定し、MOD方向に合焦位置の探索を行う。第二カメラ302では、合焦位置の探索開始点をMODに設定し、MODからINF方向に合焦位置の探索を行う。本例では、合焦位置の探索にコントラスト検出法を用いる。最初にコントラストが高くなった時点、つまり、第一カメラ301が、被写体BがあるDの合焦位置にレンズを移動した時点、第二カメラ302が、被写体AがあるDの合焦位置にレンズを移動した時点で終了する。ここで、コントラストの検出範囲は、第一カメラ301と第二カメラ302で異なる。MODから検出を行う第一カメラ301の場合は撮影画像中の中央領域をコントラストの検出範囲とし、INFから検出を行う第二カメラ302の場合は周辺領域をコントラストの検出範囲としている。これは、カメラを撮影する際に近景被写体は画像の中心になる傾向が強く、また遠景被写体は画像の周辺部となる傾向が強いからである。例えば、人物と景色を同時に撮影する場合、人物を画像の中心に、景色を背景面とするような構図で撮影することが多い。コントラストが高くなったかどうかの判断は、あらかじめ閾値を決めておき、コントラスト値が閾値以上になったかどうかで判定する等の方法で判断できる。それぞれ合焦位置が検出された場合、第一カメラ301の合焦位置Dを遠景被写体位置、第二カメラ302の合焦位置Dを近景被写体位置として決定する。
ここでは、第一カメラ301、第二カメラ302のコントラスト検出範囲をそれぞれ中央領域、周辺領域としているが、検出範囲をそれぞれ画像全体とするか、あるいはユーザーが検出範囲を設定できるようにするなど、ここで記載する範囲に限定するものではない。
As shown in FIG. 9, the search start point of the focus position of the first camera 301 is set to INF, and the focus position is searched in the MOD direction. In the second camera 302, the in-focus position search start point is set to MOD, and the in-focus position is searched from MOD to INF. In this example, a contrast detection method is used for searching for a focus position. First time the contrast is increased, i.e., the first camera 301, when the user moves the lens to the focus position of D B with the subject B, the second camera 302, the focus position of the D A which is subject A The process ends when the lens is moved to. Here, the contrast detection range differs between the first camera 301 and the second camera 302. In the case of the first camera 301 that detects from the MOD, the central area in the captured image is the contrast detection range, and in the case of the second camera 302 that detects from the INF, the peripheral area is the contrast detection range. This is because the foreground subject has a strong tendency to be the center of the image when the camera is photographed, and the distant view subject has a strong tendency to become the peripheral portion of the image. For example, when a person and a landscape are photographed at the same time, the photograph is often photographed with a composition in which the person is the center of the image and the landscape is the background surface. Whether the contrast has increased can be determined by a method of determining a threshold value in advance and determining whether the contrast value is equal to or higher than the threshold value. If the focus position has been detected, respectively, to determine the focus position D A of the first camera 301 distant object position, the focus position D B of the second camera 302 as a foreground subject position.
Here, the contrast detection ranges of the first camera 301 and the second camera 302 are the center region and the peripheral region, respectively. However, the detection range is the entire image, or the user can set the detection range. It is not limited to the range described here.

本例では、コントラスト検出法による合焦位置検出を用いた場合を想定して説明したが、オートフォーカスで使用される位相差検出方式やコントラストと位相差を両方用いるハイブリッド方式等の焦点検出手段を用いてもよい。また、二眼カメラのうち一方のカメラで近い側の合焦位置を検出し、もう一方のカメラで遠い側の合焦位置を検出するよう各カメラで分担することにより、すばやく被写体位置を決定する事が可能となる。
以上のように、予め近景被写体位置と遠景被写体位置を検出しておくことによって、画像撮影時に被写体が存在しない範囲で撮影しないようにすることができ、少ない撮影回数で全焦点画像を合成することが可能となる。
In this example, the case of using the focus position detection by the contrast detection method has been described, but focus detection means such as a phase difference detection method used in autofocus and a hybrid method using both contrast and phase difference are used. It may be used. Also, the subject position can be quickly determined by detecting the in-focus position of one of the two cameras and detecting the in-focus position of the far side with the other camera. Things will be possible.
As described above, by detecting the foreground subject position and the foreground subject position in advance, it is possible to prevent shooting in a range where no subject exists during image shooting, and to synthesize an omnifocal image with a small number of shooting times. Is possible.

次に、図8に示すステップS21において、焦点調整部305は、被写体位置検出部303により決定された被写体位置に従って、パラメータ記憶部304から撮影合焦位置と撮影回数を求めるためのテーブル情報を参照して撮影合焦位置と撮影回数を決定する。パラメータ記憶部304では、レンズ位置と合焦位置の関係を示す情報、被写体位置に対応した撮影合焦位置、撮影回数を求めるためのテーブル情報と位置合わせ用のパラメータとが記憶されている。焦点調整部305は、このテーブル情報を参照し、撮影回数と撮影合焦位置との決定を行う。撮影回数は、第一カメラ301と第二カメラ302とで撮影する回数の合計を表し、撮影合焦位置は、被写体位置に基づきテーブル情報から求めた実際に撮影する回数分の合焦位置を表す。撮影する各合焦位置の間隔は、MOD側ほど小さく、INF側ほど大きくなるように設定している。これは、MOD側ほど被写界深度が浅く、INF側ほど被写界深度が深くなるレンズの特性を考慮しているからである。以下の説明では、レンズ位置と合焦位置の対応関係はパラメータ記憶部304に記憶されており、焦点調整部305は、被写体位置検出部303により被写体位置が検出された際のレンズ位置を合焦位置に変換して制御を行う。また、焦点調節する場合は合焦位置からレンズ位置に変換を行った後、制御を行う。   Next, in step S <b> 21 shown in FIG. 8, the focus adjustment unit 305 refers to the table information for obtaining the shooting focus position and the number of shootings from the parameter storage unit 304 according to the subject position determined by the subject position detection unit 303. Then, the photographing focus position and the number of photographing are determined. The parameter storage unit 304 stores information indicating the relationship between the lens position and the in-focus position, the in-focus position corresponding to the subject position, table information for obtaining the number of times of imaging, and alignment parameters. The focus adjustment unit 305 refers to this table information and determines the number of shooting times and the shooting focus position. The number of times of photographing represents the total number of times of photographing with the first camera 301 and the second camera 302, and the photographing focus position represents the focus position corresponding to the number of times of actual photographing obtained from the table information based on the subject position. . The interval between the in-focus positions to be photographed is set to be smaller on the MOD side and larger on the INF side. This is because consideration is given to the characteristics of a lens in which the depth of field is shallower toward the MOD side and the depth of field is deeper toward the INF side. In the following description, the correspondence between the lens position and the focus position is stored in the parameter storage unit 304, and the focus adjustment unit 305 focuses the lens position when the subject position is detected by the subject position detection unit 303. Convert to position and control. Also, when adjusting the focus, control is performed after conversion from the in-focus position to the lens position.

テーブル情報は、第1実施形態で述べた式(4)に基づいて、被写界深度を考慮して作成される。レンズの焦点距離を4.50mm、F値を3.5、レンズの許容錯乱円直径を1.4μm、ぼけの許容度を2画素とした場合、図10に示すテーブル情報が得られる。ここで、各合焦位置は、MODを270mm、INFを5000mmとした場合、各合焦位置のMODからINFの範囲を全て包含するような合焦位置、300mm、350mm、450mm、600mm、1000mm、2066mmの6点を設定した。なお、ここでの包含とは、各合焦位置の被写界深度が重複するように設定され、MODからINFの範囲を全て含んでいることを示す。また、図10では、合焦位置を300mmに設定した場合、前方被写界深度の270mmから後方被写界深度の351mmの範囲(被写界深度)までが合焦していることを示している。この図10のテーブル情報が、あらかじめパラメータ記憶部304に記憶されており、このテーブル情報から撮影回数と撮影合焦位置を求める。   The table information is created in consideration of the depth of field based on Expression (4) described in the first embodiment. When the focal length of the lens is 4.50 mm, the F value is 3.5, the allowable confusion circle diameter of the lens is 1.4 μm, and the blur tolerance is 2 pixels, the table information shown in FIG. 10 is obtained. Here, each in-focus position is an in-focus position that includes the entire range from MOD to INF at each in-focus position when the MOD is 270 mm and the INF is 5000 mm, 300 mm, 350 mm, 450 mm, 600 mm, 1000 mm, Six points of 2066 mm were set. Note that the inclusion here indicates that the depth of field at each in-focus position is set to overlap, and the entire range from MOD to INF is included. FIG. 10 shows that when the in-focus position is set to 300 mm, the range from 270 mm of the front depth of field to 351 mm of the rear depth of field (depth of field) is in focus. Yes. The table information of FIG. 10 is stored in advance in the parameter storage unit 304, and the number of times of photographing and the photographing focus position are obtained from this table information.

図9で示した近景被写体位置Dを360mm、遠景被写体位置Dを900mmとした場合、図10より近景被写体位置の360mmは350mmの被写界深度である299mmから421mmに含まれ、被写界深度内に含む合焦位置の中で350mmは最小となるので撮影合焦位置は350mmに決定される。また、遠景被写体位置の900mmは1000mmの被写界深度である674mmから1938mmに含まれ、被写界深度内に含む合焦位置の中で1000mmが最大となるので撮影合焦位置は1000mmに決定される。よって、合成後の全焦点画像において、360mmから900mmまでの距離を全て包含するような被写界深度を得るには、撮影合焦位置は350mm、450mm、600mm、1000mmの位置となり、撮影回数は4回となる。図10において複数の合焦位置の被写界深度に含まれる距離がありこの場合はどちらの合焦位置を選択してもよいが、近景被写体位置ならば前方被写界深度内に含まれる合焦位置を選択し、遠景被写体位置ならば後方被写界深度に含まれる合焦位置を選択する。このようにすることによって、より少ない撮影回数で全焦点画像を撮影することができる。 360mm the foreground object position D B shown in FIG. 9, when the distant object position D A and 900 mm, 360mm of foreground object position from FIG. 10 is included in 421mm from 299mm is the depth of field of 350 mm, the photographic Of the in-focus positions included in the depth of field, 350 mm is the smallest, so the in-focus position is determined to be 350 mm. Further, 900 mm of the far-field subject position is included in the depth of field of 1000 mm from 674 mm to 1938 mm, and 1000 mm is the maximum among the focus positions included in the depth of field, so the shooting focus position is determined to be 1000 mm. Is done. Therefore, in order to obtain a depth of field that includes all the distances from 360 mm to 900 mm in the synthesized omnifocal image, the shooting focus positions are 350 mm, 450 mm, 600 mm, and 1000 mm, and the number of shootings is 4 times. In FIG. 10, there are distances included in the depth of field at a plurality of in-focus positions, and in this case, either focus position may be selected. A focus position is selected, and if it is a distant subject position, a focus position included in the rear depth of field is selected. In this way, an omnifocal image can be taken with a smaller number of times.

また、近景被写体位置Dを460mm、遠景被写体位置Dを900mmとした場合、図10より近景被写体位置の460mmは450mmの被写界深度である370mmから575mmに含まれ、被写界深度内に含む合焦位置の中で450mmは最小となるので撮影合焦位置は450mmに決定される。また、遠景被写体位置の900mmは1000mmの被写界深度である674mmから1938mmに含まれ、被写界深度内に含む合焦位置の中で1000mmが最大となるので撮影合焦位置は1000mmに決定される。よって、合成後の全焦点画像において、460mmから900mmまでの距離を全て包含するような被写界深度を得るには、撮影合焦位置は450mm、600mm、1000mmの位置となり、撮影回数は3回となる。
以上の処理に従って、テーブル情報を参照して撮影合焦位置と撮影回数を決定する。
Furthermore, 460 mm the foreground object position D B, when the distant object position D A and 900 mm, 460 mm in the foreground object position from FIG. 10 is included in 575mm from 370mm is the depth of field of 450 mm, the depth of field Since 450 mm is the smallest among the in-focus positions included in, the photographing in-focus position is determined to be 450 mm. Further, 900 mm of the far-field subject position is included in the depth of field of 1000 mm from 674 mm to 1938 mm, and 1000 mm is the maximum among the focus positions included in the depth of field, so the shooting focus position is determined to be 1000 mm. Is done. Therefore, in order to obtain a depth of field that encompasses all the distances from 460 mm to 900 mm in the combined omnifocal image, the shooting focus positions are 450 mm, 600 mm, and 1000 mm, and the number of shootings is 3 times. It becomes.
According to the above processing, the shooting focus position and the number of shootings are determined with reference to the table information.

次に、ステップS22において、焦点調整部305は、決定された撮影合焦位置と撮影回数に従って各カメラ301,302の合焦位置を変化させ、撮影を行う。
以上のように、あらかじめ設定したぼけの許容度を考慮し、全ての距離において各合焦位置の被写界深度が包含するように合焦位置を設定し、撮影合焦位置と撮影回数を決定することで、可能な限り少ない撮影回数で全焦点画像を合成することができる。
Next, in step S22, the focus adjustment unit 305 changes the focus position of each of the cameras 301 and 302 according to the determined shooting focus position and the number of shooting times, and performs shooting.
As described above, considering the preset blur tolerance, the focus position is set so that the depth of field of each focus position is included at all distances, and the shooting focus position and the number of shooting times are determined. By doing so, it is possible to synthesize an omnifocal image with the smallest possible number of shootings.

図11は、撮影合焦位置と撮影回数の設定に関して具体的な例をあげて模式的に示した図である。被写体位置検出部303で求めた近景被写体位置を360mm、遠景被写体位置を900mmとした場合、図10より必要な撮影回数は4回となり、撮影合焦位置は350mm、450mm、600mm、1000mmとなる。図11に示すように、まず、第二カメラ302で合焦位置を350mm、第一カメラ301で合焦位置450mmとして撮影する。次に、第二カメラ302を合焦位置600mm、第一カメラ301を合焦位置1000mmに移動させて撮影する。   FIG. 11 is a diagram schematically showing a specific example regarding the setting of the photographing focus position and the number of photographing times. When the foreground subject position obtained by the subject position detection unit 303 is 360 mm and the foreground subject position is 900 mm, the required number of times of shooting is four times as shown in FIG. As shown in FIG. 11, first, the second camera 302 is photographed with the in-focus position set at 350 mm and the first camera 301 at the in-focus position 450 mm. Next, the second camera 302 is moved to the in-focus position 600 mm, and the first camera 301 is moved to the in-focus position 1000 mm to take an image.

また、図12は、撮影合焦位置と撮影回数の設定に関する別の例を示した図である。図12のように、第一カメラ301の近景被写体位置を460mm、第二カメラ302の遠景被写体位置を900mmとした場合、必要な撮影回数は3回となる。したがって、図12を示すように、まず、第二カメラ302で合焦位置を450mm、第一カメラ301で合焦位置600mmとして撮影する。次に、第二カメラ302のみを合焦位置1000mmに移動させて撮影する。   FIG. 12 is a diagram showing another example regarding the setting of the shooting focus position and the number of shootings. As shown in FIG. 12, when the foreground object position of the first camera 301 is 460 mm and the distant object position of the second camera 302 is 900 mm, the required number of times of shooting is three. Therefore, as shown in FIG. 12, first, the second camera 302 is photographed with the in-focus position set to 450 mm, and the first camera 301 with the in-focus position 600 mm. Next, only the second camera 302 is moved to the in-focus position 1000 mm for shooting.

また、全焦点画像を撮影する場合、各カメラで近景被写体側と遠景被写体側に合焦位置を合わせて撮影する方法などもあるが、近景被写体側の合焦位置と遠景被写体側の合焦位置間の距離によって各合焦位置での被写界深度が大きく異なってしまうことがある。そのような場合、各撮影画像でのぼけ具合が大きく異なり、左右の画像間の対応点がとれなくなってしまうことで、視差の算出が困難になる。ここでは、第一カメラ301と第二カメラ302の合焦位置の移動を近景被写体側から遠景被写体側に向かい、被写界深度に合わせて交互に撮影している。このようにすることで後述する視差マップの精度を保ちつつ、合焦調節にかかる時間も短くすることができる。   In addition, when taking an omnifocal image, there is a method to shoot with the focus position on the foreground subject side and the far view subject side with each camera, but the focus position on the near view subject side and the focus position on the far view subject side are also available. Depending on the distance between them, the depth of field at each in-focus position may vary greatly. In such a case, the degree of blur in each captured image is greatly different, and corresponding points between the left and right images cannot be taken, making it difficult to calculate parallax. Here, the movement of the in-focus position of the first camera 301 and the second camera 302 is directed from the foreground subject side to the distant subject side, and images are taken alternately according to the depth of field. By doing so, it is possible to shorten the time required for focusing adjustment while maintaining the accuracy of the parallax map described later.

次に、ステップS23において、位置合わせ部306は、パラメータ記憶部304から位置合わせ用のパラメータを読み込む。位置合わせ用のパラメータは、カメラの内部パラメータおよび外部パラメータからなり、第一カメラ301と第二カメラ302の光軸に合わせて、画像の平行化や大きさ合わせを行うレクティフィケーションと呼ばれる処理を行うためのものである。合焦位置がINF側にいくほど画角が小さくなるため撮像される像は拡大されてしまい、この後のステップで行う視差の算出や、全焦点画像の合成が困難になる。そのため、各合焦位置(本例では、合焦位置を300mm、350mm、450mm、600mm、1000mm、2066mmとして設定)でそれぞれカメラキャリブレーションを行うことでカメラパラメータを算出し、パラメータ記憶部304に記憶しておく。   Next, in step S <b> 23, the alignment unit 306 reads alignment parameters from the parameter storage unit 304. The alignment parameters include internal parameters and external parameters of the camera, and a process called rectification that performs parallelization and size adjustment of images according to the optical axes of the first camera 301 and the second camera 302 is performed. Is to do. As the in-focus position is closer to the INF side, the angle of view becomes smaller and the captured image is enlarged, which makes it difficult to calculate parallax and synthesize an omnifocal image in subsequent steps. Therefore, camera parameters are calculated by performing camera calibration at each in-focus position (in this example, the in-focus positions are set as 300 mm, 350 mm, 450 mm, 600 mm, 1000 mm, and 2066 mm), and stored in the parameter storage unit 304. Keep it.

次に、ステップS24において、位置合わせ部306は、各合焦位置で撮影した画像に対して、ステップS23で読み込んだパラメータを基にレクティフィケーション処理を行い、画像に映る被写体の大きさと位置を補正する位置あわせを行う。
なお、ここでは、カメラパラメータを用いてレクティフィケーション処理を行うとして説明しているが、カメラが平行に配置されており画角の違い(画像の大きさ)のみを補正すればよい場合には、パラメータ記憶部304に合焦位置を変えて撮影した画像間の拡大率を保持しておき、それをパラメータとして位置合わせ部306で画像の拡大縮小を行うようにしてもよい。
Next, in step S24, the alignment unit 306 performs rectification processing on the image captured at each in-focus position based on the parameters read in step S23, and determines the size and position of the subject appearing in the image. Adjust the position to be corrected.
In this example, the rectification process is performed using the camera parameters. However, when the cameras are arranged in parallel and only the difference in the angle of view (image size) needs to be corrected. Alternatively, the enlargement ratio between images taken by changing the in-focus position may be held in the parameter storage unit 304, and the image may be enlarged or reduced by the alignment unit 306 using this as a parameter.

次に、ステップS25において、視差算出部307は、位置合わせ部306で位置合わせを行った画像から視差マップを算出する。視差算出部307は、異なる合焦位置で撮影した第一カメラ301と第二カメラ302の画像の撮影回数が偶数であった場合、第一カメラ301の画像を基準画像、第二カメラ302の画像を参照画像としてブロックマッチングを行って両画素ブロックの相関度を求め、相関度に基づいて視差マップを算出する。例えば、図11で示したように、撮影合焦位置を350mm、450mm、600mm、1000mmとして4回撮影する場合、第二カメラ302で合焦位置を350mmとして撮影した画像と第一カメラ301で合焦位置を450mmとして撮影した画像間で視差マップを求め、次に、第二カメラ302で合焦位置を600mmとして撮影した画像と第一カメラ301で合焦位置を450mmとして撮影した画像間で視差マップを求める。そして、第二カメラ302で合焦位置を600mmとして撮影した画像と第一カメラ301で合焦位置を1000mmとして撮影した画像間で視差マップを求める。ここでは、計3枚の視差マップを求めることができる。   Next, in step S <b> 25, the parallax calculation unit 307 calculates a parallax map from the image that has been registered by the registration unit 306. The parallax calculation unit 307 determines that the image of the first camera 301 is the reference image and the image of the second camera 302 when the number of times the first camera 301 and the second camera 302 are captured at different in-focus positions is an even number. Is used as a reference image to obtain a correlation between both pixel blocks, and a disparity map is calculated based on the correlation. For example, as shown in FIG. 11, when shooting is performed four times with the focus position being 350 mm, 450 mm, 600 mm, and 1000 mm, the first camera 301 is aligned with the image shot with the focus position being 350 mm. A parallax map is obtained between images shot with a focal position of 450 mm, and then a parallax between an image shot with a focus position of 600 mm by the second camera 302 and an image shot with the focus position of 450 mm by the first camera 301. Ask for a map. And a parallax map is calculated | required between the image image | photographed with the focus position set to 1000 mm with the 1st camera 301, and the image image | photographed with the focus position set to 600 mm with the 2nd camera 302. FIG. Here, a total of three parallax maps can be obtained.

また、視差算出部307は、撮影回数が奇数であった場合、第二カメラ302の画像を基準画像、第一カメラ301の画像を参照画像としてブロックマッチングを行い両画素ブロックの相関度を求め、相関度に基づいて視差マップを算出する。
例えば図12に示したように、撮影合焦位置を450mm、600mm、1000mmとして3回撮影したと想定すると、第二カメラ302で合焦位置を450mmとして撮影した画像と第一カメラ301で合焦位置を600mmとして撮影した画像間で視差マップを求め、次に、第一カメラ301で合焦位置を600mmとして撮影した画像と第二カメラ302で合焦位置を1000mmとして撮影した画像間で視差マップを求める。ここでは、計2枚の視差マップを求めることができる。
ここで、基準画像は、視差マップを算出する際の2枚の画像のうち、遠景側の撮影合焦位置の画像を含むカメラで撮影された画像のことを指し、撮影回数が偶数、奇数によって基準画像が変わる。これは、後述する全焦点合成処理において合焦位置を遠景被写体側として撮影した画像を基に合成するためである。
Further, when the number of times of shooting is an odd number, the parallax calculation unit 307 performs block matching using the image of the second camera 302 as a reference image and the image of the first camera 301 as a reference image, and obtains the degree of correlation between both pixel blocks. A parallax map is calculated based on the degree of correlation.
For example, as shown in FIG. 12, assuming that the in-focus position is 450 mm, 600 mm, and 1000 mm, and the in-focus position is 450 mm, the image captured by the second camera 302 and the in-focus position is 450 mm. A parallax map is obtained between images shot at a position of 600 mm, and then a parallax map between an image shot by the first camera 301 at a focus position of 600 mm and an image shot by the second camera 302 at a focus position of 1000 mm Ask for. Here, a total of two parallax maps can be obtained.
Here, the reference image refers to an image shot by a camera including an image at the shooting focus position on the distant side, out of the two images when calculating the parallax map. The reference image changes. This is because the image is synthesized based on an image taken with the in-focus position on the far-field subject side in an all-focus synthesis process described later.

なお、相関度は、第1実施形態と同様に、SAD(Sum of Absolute Difference)法による相関値演算により求めることができ、基準画像の各画素において参照画像上で相関度が最も高くなる位置を検出する事により、視差を算出できる。また、SAD以外にもSSD(Sum of Squared Difference)やZNCC(Zero−mean Normalized Cross−Correlation)等の別の相関度を用いて視差マップを求めてもよい。   Similar to the first embodiment, the degree of correlation can be obtained by calculating a correlation value by a SAD (Sum of Absolute Difference) method, and the position where the degree of correlation is highest on the reference image in each pixel of the standard image is determined. By detecting, the parallax can be calculated. In addition to SAD, a parallax map may be obtained using another degree of correlation such as SSD (Sum of Squared Difference) or ZNCC (Zero-mean Normalized Cross-Correlation).

次に、ステップS26において、視差統合部308は、視差算出部307で求めた各合焦位置での視差マップを用いて、以下の方針に従って1つの統合した視差マップ(以後、統合視差マップと呼ぶ)を合成する。   Next, in step S <b> 26, the parallax integration unit 308 uses the parallax map at each in-focus position obtained by the parallax calculation unit 307 to perform one integrated parallax map (hereinafter referred to as an integrated parallax map). ).

統合視差マップは、各合焦位置での視差マップからヒストグラムをそれぞれ求め、注目した画素における視差値の数を比較することで、その画素において正しい視差値であるかを判定して得られたマップである。   The integrated parallax map is a map obtained by obtaining a histogram from the parallax map at each in-focus position and comparing the number of parallax values at the pixel of interest to determine whether the pixel has the correct parallax value. It is.

図13は、3つの視差マップから統合視差マップを合成する場合の説明図である。前述のように、撮影合焦位置を350mm、450mm、600mm、1000mmとして4回撮影する場合、3枚の視差マップが得られる。それぞれ合焦位置を350mm、450mmとして撮影した画像間での視差マップの一部が視差マップ400である。また、合焦位置を450mm、600mmとして撮影した画像間での視差マップの一部が視差マップ401である。また、合焦位置を600mm、1000mmとして撮影した画像間での視差マップの一部が視差マップ402である。視差マップ400,401,402に対応するヒストグラムは、それぞれ、ヒストグラム404、ヒストグラム405、ヒストグラム406である。   FIG. 13 is an explanatory diagram in the case of synthesizing an integrated parallax map from three parallax maps. As described above, when shooting is performed four times with the shooting focus positions being 350 mm, 450 mm, 600 mm, and 1000 mm, three parallax maps are obtained. A part of the parallax map between the images taken with the in-focus positions set to 350 mm and 450 mm is the parallax map 400. Also, a part of the parallax map between images taken with the in-focus position being 450 mm and 600 mm is a parallax map 401. In addition, a part of the parallax map between images taken with the focus position set to 600 mm and 1000 mm is a parallax map 402. The histograms corresponding to the parallax maps 400, 401, and 402 are a histogram 404, a histogram 405, and a histogram 406, respectively.

これらの視差マップ400,401,402を用いて統合視差マップ403を合成する。各視差マップの一部400,401,402である3×3画素のブロックの中にそれぞれ視差値が求まっている。この3つの視差マップ400,401,402において同じ視差値となる場合は、ヒストグラム404,405,406に関係なく、この視差値を統合視差マップ403の視差値として採用する。次に3つの視差マップ400,401,402において異なる視差値である場合、ヒストグラム404,405,406に基づき視差値の数が多い方を信頼度が高いとみなし、統合視差マップ403の視差値として採用する。   The integrated parallax map 403 is synthesized using these parallax maps 400, 401, and 402. Disparity values are obtained in blocks of 3 × 3 pixels, which are parts 400, 401, and 402 of each disparity map. When the three parallax maps 400, 401, and 402 have the same parallax value, this parallax value is adopted as the parallax value of the integrated parallax map 403 regardless of the histograms 404, 405, and 406. Next, when the parallax values are different in the three parallax maps 400, 401, and 402, the parallax value of the integrated parallax map 403 is regarded as having high reliability based on the histograms 404, 405, and 406 as the parallax value of the integrated parallax map 403. adopt.

ここでは、丸で囲んだ画素においてそれぞれ、視差値120、140、50が求まっているが、それぞれの視差に対応するヒストグラム404、ヒストグラム405、ヒストグラム406を比較すると、ヒストグラム404での視差値120の数が最も多いので、統合視差マップ403の視差値として採用する。また、二重丸で囲んだ画素においても同様の処理を行い、ヒストグラム406での視差値10の数が最も多いため、統合視差マップ403の視差値として採用する。   Here, the parallax values 120, 140, and 50 are obtained for the circled pixels, but when the histogram 404, the histogram 405, and the histogram 406 corresponding to each parallax are compared, the parallax values 120 in the histogram 404 are compared. Since the number is the largest, it is adopted as the parallax value of the integrated parallax map 403. Further, the same processing is performed for the pixels surrounded by double circles, and is employed as the parallax value of the integrated parallax map 403 because the number of parallax values 10 in the histogram 406 is the largest.

また、注目した画素において、全ての視差マップで視差値が求まっていない場合、統合視差マップ403における8近傍の視差値(求まっていない視差値は除く)の平均値を統合視差マップ403の視差値として採用する。   In addition, when the parallax value is not obtained for all the parallax maps in the pixel of interest, the average value of the 8 neighboring parallax values (excluding the parallax values not obtained) in the integrated parallax map 403 is used as the parallax value of the integrated parallax map 403. Adopt as.

合焦位置の異なる位置で撮影した画像から求めた視差マップのヒストグラムは、合焦位置に近づけば近づくほど、その合焦位置に対応する視差値が増える傾向にある。一方で合焦位置から離れるほどぼけてしまうので他の視差値は減る。そのような理由から、ヒストグラムを用いて視差値を比較することで適切な視差値を選ぶことができる。
本例では、視差のヒストグラムから視差マップを合成しているが、図10より合焦位置が既知であることから合焦位置に対応する視差値を求め、統合視差マップを合成する際に各合焦位置での被写界深度を基に視差マップの合成範囲を分け、統合視差マップを求めてもよい。
In the histogram of the parallax map obtained from images taken at different in-focus positions, the closer to the in-focus position, the more the parallax value corresponding to the in-focus position tends to increase. On the other hand, as the distance from the in-focus position increases, the other parallax values decrease. For such a reason, an appropriate parallax value can be selected by comparing parallax values using a histogram.
In this example, the parallax map is synthesized from the parallax histogram, but since the in-focus position is known from FIG. 10, the parallax value corresponding to the in-focus position is obtained, and each synthesizing map is synthesized. An integrated parallax map may be obtained by dividing the synthesis range of parallax maps based on the depth of field at the focal position.

次に、ステップS27において、画像合成部309は、視差統合部308で得た統合視差マップ403を用いて、各合焦位置におけるマスクを作成し、それを基に全焦点画像を合成する。
全焦点画像の合成は、視差マップを撮影回数分の視差範囲に分割して各合焦位置で撮影した画像を貼り合わせて合成を行う。視差範囲を分割するには、距離と視差の対応がとれていることが必要となるため、第1実施形態で示した式(5)を用いて視差と距離の対応表を求める。前述のように、レンズの焦点距離を4.50mm、レンズの許容錯乱円直径を1.4μmとしているので、第一カメラ301と第二カメラ302の基線長が15mmであるとすると、図14に示すように、合焦位置と被写界深度の関係を視差値として表すことができる。
各合焦位置におけるマスクは、図14を用いて、視差値を基に統合視差マップ403から視差範囲を抜き出し作成する。なお、撮影回数が偶数か奇数かによって処理方法及びベース画像が異なる。ここで、ベース画像とは遠景被写体位置側の撮影合焦位置で撮影した画像であり、この画像を基に全焦点画像を合成する。
Next, in step S27, the image synthesis unit 309 creates a mask at each in-focus position using the integrated parallax map 403 obtained by the parallax integration unit 308, and synthesizes an omnifocal image based on the mask.
In the synthesis of the omnifocal image, the parallax map is divided into parallax ranges corresponding to the number of times of photographing, and the images photographed at the respective in-focus positions are bonded together. In order to divide the parallax range, it is necessary that correspondence between the distance and the parallax is obtained. Therefore, a correspondence table between the parallax and the distance is obtained using the equation (5) shown in the first embodiment. As described above, since the focal length of the lens is 4.50 mm and the allowable circle of confusion diameter of the lens is 1.4 μm, if the baseline length of the first camera 301 and the second camera 302 is 15 mm, FIG. As shown, the relationship between the in-focus position and the depth of field can be expressed as a parallax value.
The mask at each in-focus position is created by extracting the parallax range from the integrated parallax map 403 based on the parallax values using FIG. Note that the processing method and the base image differ depending on whether the number of times of shooting is an even number or an odd number. Here, the base image is an image shot at the shooting focus position on the far-field subject position side, and an omnifocal image is synthesized based on this image.

撮影回数が偶数であった場合、遠景被写体位置側の第一カメラ301の画像を全焦点画像のベース画像とする。視差範囲は、第一カメラ301で撮影された合焦位置と被写界深度を主にして図14を用いて分割する。図11で示したように、撮影合焦位置が350mm、450mm、600mm、1000mmであった場合、図14からその合焦位置での視差値はそれぞれ順に138、107、80、48となる。ベース画像は、第一カメラ301で合焦位置を1000mmとして撮影した画像になる。ここで、まず、ベース画像となる1000mm位置の視差範囲を図14を用いて72〜25と決定する。次に、ベース画像を撮影するカメラ画像である合焦位置450mm位置の視差範囲を130〜84と決定する。そして、残りの視差範囲を第二カメラ302で撮影された合焦位置350mm、600mmの視差範囲に割り当てていく。これにより、合焦位置300mmでの視差範囲は161〜131となり、合焦位置600mmでの視差範囲は83〜73となる。   When the number of times of shooting is an even number, the image of the first camera 301 on the distant subject position side is set as the base image of the omnifocal image. The parallax range is divided using FIG. 14 mainly based on the in-focus position and the depth of field captured by the first camera 301. As shown in FIG. 11, when the imaging focus positions are 350 mm, 450 mm, 600 mm, and 1000 mm, the parallax values at the focus positions are 138, 107, 80, and 48, respectively, from FIG. The base image is an image captured by the first camera 301 with the in-focus position set at 1000 mm. Here, first, a parallax range at a position of 1000 mm serving as a base image is determined as 72 to 25 using FIG. Next, a parallax range at a focusing position of 450 mm, which is a camera image for capturing a base image, is determined as 130 to 84. Then, the remaining parallax range is allocated to the parallax ranges of the focusing positions 350 mm and 600 mm taken by the second camera 302. Thereby, the parallax range at the focusing position 300 mm is 161 to 131, and the parallax range at the focusing position 600 mm is 83 to 73.

上記の決定に従って、第一カメラ301で撮影した450mm位置の視差値が84から130の視差範囲を統合視差マップ403から抜き出し、合焦位置450mmでのマスクを作成する。また、第二カメラ302で撮影した350mm位置の視差値131から161の視差範囲、600mm位置の視差値73から83の視差範囲をそれぞれ統合視差マップから抜き出し、それぞれ合焦位置350mm、600mmでのマスクを作成する。   In accordance with the above determination, a parallax range with a parallax value of 84 to 130 taken at the 450 mm position photographed by the first camera 301 is extracted from the integrated parallax map 403 to create a mask at the in-focus position 450 mm. In addition, the parallax range of parallax values 131 to 161 at the 350 mm position and the parallax range of parallax values 73 to 83 at the 600 mm position captured by the second camera 302 are extracted from the integrated parallax map, respectively, and masks at the focusing positions of 350 mm and 600 mm, respectively. Create

撮影回数が奇数であった場合、遠景被写体位置側の第二カメラ302の画像を全焦点画像のベース画像とする。視差範囲は第二カメラで撮影された合焦位置と被写界深度を主にして図14を用いて分割する。図12に示すように撮影合焦位置を450mm、600mm、1000mmであった場合、図14からそのときの視差値はそれぞれ順に107、80、48となる。ベース画像は第二カメラ302で合焦位置1000mmとして撮影した画像になる。ここでも、上記と同様の流れで各合焦位置での視差範囲を決定する。この決定に従って、第一カメラ301で撮影した第600mm位置の視差値が73から83の視差範囲を統合視差マップから抜き出し、合焦位置600mmでのマスクを作成する。また、第二カメラ302で撮影した450mm位置の視差値84から130の視差範囲を統合視差マップから抜き出し、450mmの合焦位置でのマスクを作成する。   When the number of times of photographing is an odd number, the image of the second camera 302 on the distant subject position side is set as the base image of the omnifocal image. The parallax range is divided using FIG. 14 mainly based on the focus position and the depth of field captured by the second camera. As shown in FIG. 12, when the photographing focus positions are 450 mm, 600 mm, and 1000 mm, the parallax values at that time are 107, 80, and 48 in this order from FIG. The base image is an image photographed by the second camera 302 at a focusing position of 1000 mm. Again, the parallax range at each in-focus position is determined in the same flow as described above. In accordance with this determination, a parallax range having a parallax value of 73 to 83 at the 600 mm position taken by the first camera 301 is extracted from the integrated parallax map, and a mask at the in-focus position 600 mm is created. Further, a parallax range of parallax values 84 to 130 at a 450 mm position photographed by the second camera 302 is extracted from the integrated parallax map, and a mask at a focusing position of 450 mm is created.

全焦点画像合成は、作成したマスクを用いて各合焦位置で撮影した画像からマスク範囲を抜き出して、ベース画像に貼り合わせることで行う。また、全焦点画像合成は、ベース画像と同じカメラで撮影された画像は視差が無いため視差をキャンセルする必要がなく、そのままベース画像の対応画素を置き換えればよいが、ベース画像と異なるカメラで撮影された画像は視差があるので視差値をキャンセルしてからベース画像の対応画素を置き換える必要がある。   The omnifocal image synthesis is performed by extracting a mask range from an image photographed at each in-focus position using the created mask and pasting it on the base image. In addition, omnifocal image composition does not require parallax cancellation because the image captured with the same camera as the base image has no parallax, and the corresponding pixel of the base image can be replaced as it is, but it is captured with a camera different from the base image. Since the processed image has parallax, it is necessary to cancel the parallax value and replace the corresponding pixel of the base image.

以下では、撮影回数が偶数であった場合の、全焦点画像合成について具体的な例を挙げて説明する。図11のように撮影回数が4回であった場合、第一カメラ301で合焦位置1000mmとして撮影した画像をベース画像とし、合焦位置450mmのマスクに重なる領域に対して、ベース画像の画素値を、それぞれ合焦位置450mmとして撮影した画像の画素値に置きかえる。また、合焦位置350mm、600mmのマスクに重なる領域に対しては視差値分をキャンセルした後、合焦位置1000mmの画素値を、それぞれ合焦位置を350mm、600mmとして撮影した画像の画素値に置きかえる。以上の処理を行うことで全焦点画像を合成することができる。   Below, a specific example is given and demonstrated about the omnifocal image composition in case the frequency | count of imaging | photography is an even number. As shown in FIG. 11, when the number of times of photographing is four, an image photographed at the in-focus position of 1000 mm by the first camera 301 is used as a base image, and a pixel of the base image with respect to an area overlapping the mask at the in-focus position of 450 mm. The value is replaced with the pixel value of the image captured at the focusing position of 450 mm. In addition, after canceling the parallax value for the region overlapping the mask at the focusing position 350 mm and 600 mm, the pixel value at the focusing position 1000 mm is changed to the pixel value of the image taken with the focusing position being 350 mm and 600 mm, respectively. Replace. An omnifocal image can be synthesized by performing the above processing.

以下では、撮影回数が奇数であった場合の、全焦点画像合成について具体的な例を挙げて説明する。図12のように撮影回数が3回であった場合、第二カメラ302で合焦位置1000mmとして撮影した画像をベース画像とし、合焦位置450mmのマスクに重なる領域に対して、ベース画像の画素値を、合焦位置450mmとして撮影した画像の画素値に置きかえる。また、合焦位置600mmのマスクに重なる領域に対しては視差値分をキャンセルした後、合焦位置1000mmの画素値を、合焦位置を600mmとして撮影した画像の画素値に置きかえる。以上の処理を行うことでマスク生成から全焦点画像合成までの処理を行う。   Below, a specific example is given and demonstrated about the omnifocal image composition when the frequency | count of imaging | photography is an odd number. When the number of times of photographing is three as shown in FIG. 12, an image photographed at the in-focus position of 1000 mm by the second camera 302 is used as a base image, and the pixel of the base image with respect to an area overlapping the mask at the in-focus position of 450 mm. The value is replaced with the pixel value of the image taken as the in-focus position 450 mm. Further, after canceling the parallax value for the area overlapping the mask at the focus position 600 mm, the pixel value at the focus position 1000 mm is replaced with the pixel value of the image taken with the focus position 600 mm. By performing the above processing, processing from mask generation to omnifocal image synthesis is performed.

マスク生成において、各合焦位置での視差範囲は、ベース画像を撮影するカメラ画像を基準として被写界深度の視差値から範囲を決定し、残りの範囲を片方のカメラ画像から決定する。このようにする理由としては、ベース画像に対して視差のない同カメラで撮影された画像から広い範囲のマスクを作成したほうが、合成処理の際に視差の影響があるカメラ画像の画素値を置き換える量が減り、全体的に合成画像の破綻が少なくなるからである。また、ベース画像を遠景被写体位置側の合焦位置として撮影画像とするのは、近景より遠景のほうが画像を占める割合が多くなる傾向にあるため、最も遠景側にある合焦位置での撮影画像を基にすることで画像合成の際に視差の影響があるカメラ画像の画素値を置き換える量が減り、合成画像の破綻が少なくすることができる。   In the mask generation, the parallax range at each in-focus position is determined from the parallax value of the depth of field with reference to the camera image capturing the base image, and the remaining range is determined from one camera image. The reason for this is that if a mask with a wider range is created from an image taken with the same camera with no parallax with respect to the base image, the pixel value of the camera image that is affected by the parallax will be replaced during the synthesis process. This is because the amount is reduced and the breakdown of the composite image is reduced as a whole. In addition, the base image is taken as the in-focus position on the far-sighted subject position side, and the captured image at the in-focus position on the farthest far side tends to occupy a larger proportion of the image in the distant view than in the close-up view. Based on this, the amount of replacement of the pixel value of the camera image having the influence of parallax during image synthesis is reduced, and the failure of the composite image can be reduced.

なお、ステップS20において、第一カメラ301と第二カメラ302が同被写体面に合焦した(図3においてD=Dとなる)場合は、第一カメラ301の合焦位置をDとし、撮影画像を全焦点画像として出力すればよい。 In step S20, when the first camera 301 and the second camera 302 are focused on the same subject surface (D A = D B in FIG. 3), the focusing position of the first camera 301 is set to D A. The captured image may be output as an omnifocal image.

また、本実施形態では、カメラの仕様である焦点距離や最短撮影距離MOD等を具体的な数値で示したが、これらはここで示した値に限定するものではなく、設計に応じて様々な値をとりうる。
また、ここでは被写体位置検出部303により被写体のある位置に限定しているが、必ずしもこの処理を行わなくてもよい。前述のように、これにより撮影する合焦位置を限定する事で撮影回数を最適化できるが、例えば、被写体が広い範囲に分布している事があらかじめわかっている場合や、即座に撮影を開始したい場合などは、近景被写体位置をMOD,遠景被写体位置をINFに設定し、全ての範囲で撮影するようにしても良い。
In the present embodiment, the focal length, the shortest shooting distance MOD, and the like, which are the specifications of the camera, are shown by specific numerical values, but these values are not limited to the values shown here, and various values may be used depending on the design. Can take a value.
In addition, here, the subject position detection unit 303 limits the subject to a certain position, but this process is not necessarily performed. As described above, this allows you to optimize the number of shots by limiting the focus position for shooting, but for example, if you know in advance that the subject is distributed over a wide range, or start shooting immediately For example, if the foreground subject position is set to MOD and the foreground subject position is set to INF, shooting may be performed over the entire range.

また、本実施形態では、合焦撮影位置と撮影回数をテーブルを参照して決定する構成としたが、テーブルではなく式(4)に示す計算式をパラメータ記憶部304に保持しておき、検出した近景被写体位置、遠景被写体位置に応じて都度合焦撮影位置と撮影回数を決めるようにしても実現可能である。また、ぼけの許容度を2画素と設定して説明しているが、この値に限定するものではない。許容度は小さいほど視差の生成が確実となり、生成される全焦点画像も鮮明となるが、許容度を大きくすると合焦位置の間隔が広くなることで少ない撮影回数にする事が可能となる。被写体が動く場合などは、撮影に時間がかかると被写体の動きによるぼけ量が大きくなるため、許容度を大きくして撮影回数を減らす事で、より鮮明な全焦点画像を取得できる場合がある。そのため、状況に応じて適宜変更できるようにしてよい。   In the present embodiment, the in-focus photographing position and the number of photographing times are determined with reference to the table. However, instead of the table, the calculation formula shown in the equation (4) is held in the parameter storage unit 304 and detected. This can also be realized by determining the in-focus shooting position and the number of times of shooting each time according to the near-field subject position and the far-field subject position. In addition, although the blur tolerance is set to 2 pixels, the present invention is not limited to this value. The smaller the tolerance is, the more reliably the parallax is generated, and the generated omnifocal image is clearer. However, when the tolerance is increased, the interval between the in-focus positions is widened so that the number of photographing can be reduced. When the subject moves, the amount of blur due to the movement of the subject increases when shooting takes a long time. Therefore, a clearer omnifocal image may be acquired by increasing the tolerance and reducing the number of shootings. Therefore, it may be changed as appropriate according to the situation.

また、ここでは統合視差マップ403を作成し、マスクを作成して全焦点画像を合成するものとして説明したが、各合焦位置と対応がとれた複数の視差マップを用いて、距離毎に正確な視差が求まっている視差範囲について各合焦位置で撮影した画像から画素を抜き出し、ベース画像に貼り合わせて全焦点画像を合成してもよい。   In addition, here, the integrated parallax map 403 is created, and a mask is created to synthesize an omnifocal image. However, a plurality of parallax maps corresponding to each in-focus position can be used to accurately detect each distance. It is also possible to extract pixels from an image photographed at each in-focus position for a parallax range for which a particular parallax is obtained, and combine them with a base image to synthesize an omnifocal image.

以上のように、本実施形態によれば、予め近景被写体位置と遠景被写体位置を検出しておくことによって、画像撮影時に被写体が存在しない範囲で撮影しないようにすることができ、少ない撮影回数で全焦点画像を合成することが可能となる。また、合焦位置と被写界深度との関係が格納されたテーブルの情報を参照して撮影合焦位置と撮影回数を決定することで、可能な限り少ない撮影回数で全焦点画像を合成することができる。   As described above, according to the present embodiment, by detecting the foreground subject position and the foreground subject position in advance, it is possible to prevent shooting in a range where no subject exists at the time of image shooting. It becomes possible to synthesize omnifocal images. In addition, by determining the shooting focus position and the number of times of shooting with reference to the information in the table storing the relationship between the focus position and the depth of field, the omnifocal image is synthesized with as few times as possible. be able to.

なお、本発明は、上述した実施形態によって限定的に解釈されるものではなく、特許請求の範囲に記載した事項の範囲内で、種々の変更が可能であり本発明の技術的範囲に含まれる。   The present invention is not construed as being limited by the above-described embodiments, and various modifications are possible within the scope of the matters described in the claims, and are included in the technical scope of the present invention. .

本発明の撮像装置は、デジタルカメラなどの撮像装置に限られず、撮像機能が組み込まれた情報処理装置に適用することができる。例えば、本発明は、第一のカメラおよび第二のカメラを少なくとも備える情報処理装置(例えば、コンピュータ、携帯端末、タブレット端末、スマートフォンなど)にも適用することができる。   The imaging apparatus of the present invention is not limited to an imaging apparatus such as a digital camera, and can be applied to an information processing apparatus incorporating an imaging function. For example, the present invention can also be applied to an information processing apparatus (for example, a computer, a mobile terminal, a tablet terminal, a smartphone, or the like) that includes at least a first camera and a second camera.

また、本発明による撮像装置の各種機能を、ソフトウェアのプログラムコードで実現してもよい。プログラムコードは、その処理時に一時的に記憶媒体に蓄積され、必要に応じてCPUなどの演算装置が読み出し、実行するようにして本発明を実現してもよい。記憶媒体とは、フレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるメモリ、ハードディスク等の記憶装置のことをいう。   Further, various functions of the imaging apparatus according to the present invention may be realized by software program codes. The program code may be temporarily stored in a storage medium during the processing, and the present invention may be realized by an arithmetic device such as a CPU reading and executing the program code as necessary. The storage medium refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, and a CD-ROM, a memory built in a computer system, and a hard disk.

また、上述した実施形態における撮像装置の一部、または全部をハードウェア構成で実現してもよく、典型的には集積回路であるLSIとして実現してもよい。撮像装置の各機能ブロックは個別にチップ化してもよいし、一部、または全部を集積してチップ化してもよい。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いることも可能である。   In addition, a part or all of the imaging device in the above-described embodiment may be realized by a hardware configuration, and typically may be realized as an LSI that is an integrated circuit. Each functional block of the imaging apparatus may be individually formed into a chip, or a part or all of them may be integrated into a chip. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. In addition, when an integrated circuit technology that replaces LSI appears due to progress in semiconductor technology, an integrated circuit based on the technology can also be used.

100 撮像装置
101 第一カメラ
102 第二カメラ
103 被写体位置検出部
104 パラメータ記憶部
105 焦点調整部
106 位置合わせ部
107 視差算出部
108 画像合成部
300 撮像装置
301 第一カメラ
302 第二カメラ
303 被写体位置検出部
304 パラメータ記憶部
305 焦点調整部
306 位置合わせ部
307 視差算出部
308 視差統合部
309 画像合成部
DESCRIPTION OF SYMBOLS 100 Imaging device 101 1st camera 102 2nd camera 103 Subject position detection part 104 Parameter storage part 105 Focus adjustment part 106 Position adjustment part 107 Parallax calculation part 108 Image composition part 300 Imaging apparatus 301 1st camera 302 2nd camera 303 Subject position Detection unit 304 Parameter storage unit 305 Focus adjustment unit 306 Position adjustment unit 307 Parallax calculation unit 308 Parallax integration unit 309 Image composition unit

Claims (9)

画像を撮影する第一のカメラおよび第二のカメラを少なくとも備える撮像装置であって、
被写体位置の検出を行う被写体位置検出部と、
前記被写体位置検出部により検出した前記被写体位置に応じて、前記第一のカメラの撮影合焦位置および前記第二のカメラの撮影合焦位置を決定する焦点調整部と、
前記第一のカメラの前記撮影合焦位置において撮影された画像と、前記第二のカメラの前記撮影合焦位置において撮影された画像とから視差情報を算出する視差算出部と、
前記視差情報に基づいて前記第一のカメラの画像及び前記第二のカメラの画像を合成する画像合成部とを備え、
前記焦点調整部は、前記被写体位置に基づいて、前記第一のカメラと前記第二のカメラの撮影合焦位置と撮影回数を決定することを特徴とする撮像装置。
An imaging device comprising at least a first camera and a second camera for taking an image,
A subject position detector for detecting the subject position;
A focus adjusting unit that determines a shooting focus position of the first camera and a shooting focus position of the second camera according to the subject position detected by the subject position detection unit;
A parallax calculation unit that calculates parallax information from an image shot at the shooting focus position of the first camera and an image shot at the shooting focus position of the second camera;
An image combining unit that combines the image of the first camera and the image of the second camera based on the parallax information;
The focus adjustment unit determines an imaging focus position and the number of imaging times of the first camera and the second camera based on the subject position.
前記焦点調整部は、前記第一のカメラおよび前記第二のカメラの合焦撮影位置を、各カメラの被写界深度が重複するように決定すること
を特徴とする請求項1に記載の撮像装置。
2. The imaging according to claim 1, wherein the focus adjustment unit determines in-focus shooting positions of the first camera and the second camera so that depths of field of the respective cameras overlap each other. apparatus.
前記被写体位置検出部は、前記第一のカメラおよび第二のカメラのそれぞれによって近景被写体位置および遠景被写体位置を検出し、
前記焦点調整部は、前記近景被写体位置から前記遠景被写体位置までの距離が、前記第一のカメラ及び前記第二のカメラによって撮影される画像の少なくとも一つの被写界深度に包含されるように、前記第一のカメラおよび第二のカメラの撮影合焦位置と撮影回数を決定することを特徴とする請求項1または2に記載の撮像装置。
The subject position detection unit detects a foreground subject position and a foreground subject position by each of the first camera and the second camera;
The focus adjustment unit is configured such that a distance from the foreground subject position to the distant subject position is included in at least one depth of field of an image captured by the first camera and the second camera. The imaging apparatus according to claim 1, wherein the imaging focus positions and the number of imaging times of the first camera and the second camera are determined.
前記焦点調整部は、前記撮影回数が3以上の場合、前記第一のカメラの撮影合焦位置と前記第二のカメラの撮影合焦位置が交互になるように決定することを特徴とする請求項1から3のいずれか1項に記載の撮像装置。   The focus adjustment unit may determine that the shooting focus position of the first camera and the shooting focus position of the second camera are alternated when the number of shootings is 3 or more. Item 4. The imaging device according to any one of Items 1 to 3. 前記視差算出部は、
前記撮影合焦位置と前記撮影回数に基づいて前記第一のカメラおよび前記第二のカメラによって撮影された複数の画像から、前記第一のカメラの画像と前記第二のカメラの画像の複数の組み合わせを選択し、
前記複数の組み合わせのそれぞれについて、前記視差情報を算出することを特徴とする請求項1から4のいずれか1項に記載の撮像装置。
The parallax calculation unit
From a plurality of images photographed by the first camera and the second camera based on the photographing focus position and the number of photographing times, a plurality of images of the first camera and a second camera Select a combination
The imaging apparatus according to claim 1, wherein the parallax information is calculated for each of the plurality of combinations.
前記画像合成部は、合成に使用するベース画像を遠景被写体側の合焦位置での画像とすることを特徴とする請求項1から5のいずれか1項に記載の撮像装置。   6. The imaging apparatus according to claim 1, wherein the image composition unit uses a base image used for composition as an image at a focus position on a distant subject side. 前記視差算出部は、
視差を算出する際の基準画像を、前記ベース画像を撮影したカメラで撮影された画像とすることを特徴とする請求項6に記載の撮像装置。
The parallax calculation unit
The imaging apparatus according to claim 6, wherein a reference image for calculating parallax is an image captured by a camera that captured the base image.
前記視差算出部により算出した複数の視差情報から1つの視差情報を統合する視差統合部を更に備え、
前記視差統合部は、前記複数の視差情報から視差情報のヒストグラムをそれぞれ求め、ヒストグラムの分布に基づいて1つの視差情報を統合することを特徴とする請求項4から7のいずれか1項に記載の撮像装置。
A parallax integration unit that integrates one piece of parallax information from a plurality of pieces of parallax information calculated by the parallax calculation unit;
The parallax integration unit obtains a histogram of parallax information from each of the plurality of parallax information, and integrates one piece of parallax information based on a distribution of the histogram. Imaging device.
画像を撮影する第一のカメラおよび第二のカメラを少なくとも備える撮像装置における撮像制御方法であって、
被写体位置の検出を行う被写体位置検出ステップと、
前記被写体位置検出ステップにより検出した前記被写体位置に応じて、前記第一のカメラの撮影合焦位置および前記第二のカメラの撮影合焦位置を決定する焦点調整ステップと、
前記第一のカメラの前記撮影合焦位置において撮影された画像と、前記第二のカメラの前記撮影合焦位置において撮影された画像とから視差情報を算出する視差算出ステップと、
前記視差情報に基づいて前記第一のカメラの画像及び前記第二のカメラの画像を合成する画像合成ステップとを備え、
前記焦点調整ステップにおいて、前記被写体位置に基づいて、前記第一のカメラと前記第二のカメラの撮影合焦位置と撮影回数を決定することを特徴とする撮像制御方法。
An imaging control method in an imaging apparatus including at least a first camera and a second camera for capturing an image,
A subject position detection step for detecting the subject position;
A focus adjustment step for determining a shooting focus position of the first camera and a shooting focus position of the second camera according to the subject position detected by the subject position detection step;
A parallax calculation step of calculating parallax information from an image shot at the shooting focus position of the first camera and an image shot at the shooting focus position of the second camera;
An image combining step of combining the image of the first camera and the image of the second camera based on the parallax information;
In the focus adjustment step, an imaging focus position and the number of times of imaging of the first camera and the second camera are determined based on the subject position.
JP2012157315A 2012-07-13 2012-07-13 Image pickup device and image pickup device control method Pending JP2014022806A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012157315A JP2014022806A (en) 2012-07-13 2012-07-13 Image pickup device and image pickup device control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012157315A JP2014022806A (en) 2012-07-13 2012-07-13 Image pickup device and image pickup device control method

Publications (1)

Publication Number Publication Date
JP2014022806A true JP2014022806A (en) 2014-02-03

Family

ID=50197278

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012157315A Pending JP2014022806A (en) 2012-07-13 2012-07-13 Image pickup device and image pickup device control method

Country Status (1)

Country Link
JP (1) JP2014022806A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016035387A1 (en) * 2014-09-03 2016-03-10 三菱電機株式会社 Image processing device, image processing method, image reading device, and program
WO2018040444A1 (en) * 2016-08-31 2018-03-08 宇龙计算机通信科技(深圳)有限公司 Dual-camera image capturing control method, image capturing control device, and terminal
WO2018179622A1 (en) * 2017-03-30 2018-10-04 ソニーセミコンダクタソリューションズ株式会社 Image capturing device, image capturing module and control method of image capturing device
JP2019154734A (en) * 2018-03-12 2019-09-19 ソニー・オリンパスメディカルソリューションズ株式会社 Medical image processing apparatus, medical observation apparatus, and image processing method
JP2019165506A (en) * 2015-12-07 2019-09-26 グーグル エルエルシー Systems and methods for multiscopic noise reduction and high-dynamic range

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016035387A1 (en) * 2014-09-03 2016-03-10 三菱電機株式会社 Image processing device, image processing method, image reading device, and program
JP2019165506A (en) * 2015-12-07 2019-09-26 グーグル エルエルシー Systems and methods for multiscopic noise reduction and high-dynamic range
WO2018040444A1 (en) * 2016-08-31 2018-03-08 宇龙计算机通信科技(深圳)有限公司 Dual-camera image capturing control method, image capturing control device, and terminal
WO2018179622A1 (en) * 2017-03-30 2018-10-04 ソニーセミコンダクタソリューションズ株式会社 Image capturing device, image capturing module and control method of image capturing device
KR20190129684A (en) * 2017-03-30 2019-11-20 소니 세미컨덕터 솔루션즈 가부시키가이샤 Imaging Device, Imaging Module, and Control Method of Imaging Device
US10848660B2 (en) 2017-03-30 2020-11-24 Sony Semiconductor Solutions Corporation Imaging apparatus, imaging module, and control method of imaging apparatus
KR102540722B1 (en) 2017-03-30 2023-06-07 소니 세미컨덕터 솔루션즈 가부시키가이샤 Imaging device, imaging module, and control method of imaging device
JP2019154734A (en) * 2018-03-12 2019-09-19 ソニー・オリンパスメディカルソリューションズ株式会社 Medical image processing apparatus, medical observation apparatus, and image processing method
JP7143092B2 (en) 2018-03-12 2022-09-28 ソニー・オリンパスメディカルソリューションズ株式会社 Medical image processing device, medical observation device, and image processing method
US11699516B2 (en) 2018-03-12 2023-07-11 Sony Olympus Medical Solutions Inc. Medical image processing apparatus, medical observation apparatus, and image processing method

Similar Documents

Publication Publication Date Title
US9313419B2 (en) Image processing apparatus and image pickup apparatus where image processing is applied using an acquired depth map
TWI538512B (en) Method for adjusting focus position and electronic apparatus
US8810634B2 (en) Method and apparatus for generating image with shallow depth of field
WO2011158498A1 (en) Image capture device and image capture method
CN108462830B (en) Image pickup apparatus and control method of image pickup apparatus
JP2011029905A (en) Imaging device, method and program
US9619886B2 (en) Image processing apparatus, imaging apparatus, image processing method and program
JP6316534B2 (en) Imaging apparatus and imaging apparatus control method
JP2016129289A (en) Image processing device, imaging device, image processing method, program, and storage medium
JP2012514886A (en) Video data acquisition method and apparatus
JP2013044844A (en) Image processing device and image processing method
JP2018174502A (en) Imaging apparatus, image processing apparatus, control method of imaging apparatus, and program
JP2014022806A (en) Image pickup device and image pickup device control method
JP2020174331A (en) Image capturing apparatus, image processing apparatus, control method, and program
JP2013143712A (en) Image processing device, image pickup device having image processing device, image processing method and program, and storage medium having program stored therein
JP2012195797A (en) Pan-focus image generating device
JP6645711B2 (en) Image processing apparatus, image processing method, and program
JP5889022B2 (en) Imaging apparatus, image processing apparatus, image processing method, and program
JP2011242652A (en) Focus detector and control method thereof
JP6652294B2 (en) Image processing device, imaging device, image processing method, program, and storage medium
JP2016099322A (en) Imaging device, control method of imaging device, and program
JP2012103285A (en) Focus detecting device and method for controlling the same
JP6900228B2 (en) Imaging device, imaging system, imaging device control method, and program
WO2016047220A1 (en) Imaging device and imaging method
JP6882016B2 (en) Imaging device, imaging system, imaging device control method, and program