JP2017009942A - Imaging device - Google Patents

Imaging device Download PDF

Info

Publication number
JP2017009942A
JP2017009942A JP2015128185A JP2015128185A JP2017009942A JP 2017009942 A JP2017009942 A JP 2017009942A JP 2015128185 A JP2015128185 A JP 2015128185A JP 2015128185 A JP2015128185 A JP 2015128185A JP 2017009942 A JP2017009942 A JP 2017009942A
Authority
JP
Japan
Prior art keywords
image
main subject
generation position
background
image generation
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
JP2015128185A
Other languages
Japanese (ja)
Inventor
能登 悟郎
Goro Noto
悟郎 能登
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2015128185A priority Critical patent/JP2017009942A/en
Publication of JP2017009942A publication Critical patent/JP2017009942A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an imaging device that can acquire a photographing image having an entire area of a specific subject (a main subject) tilting toward a depth direction of an imaging screen focused, and having a background other than the main subject naturally blurred.SOLUTION: An imaging device comprises: first determination means that determines a main subject by pupil division means on an image pick-up element; second determination means that determines other than the main subject as a background; computation means that computes a tilt of an image formation plane where an entire area of the main subject falls within a depth of field from a defocus map; image generation position setting means that sets an image generation position; angle-of-incidence determination means that determines an angle of incidence upon each pixel; image generation means that determines an amount of shift of an image signal corresponding to the image generation position for each pupil area to shaft the image signal, in accordance with the image generation position set by the image generation position setting means and information on the angle-of-incident determination means, and adds the image signals; and background generation position determination means that determines the image generation position of the background determined by the second determination means as a position with continuity to the image generation position of the main subject determined by the first determination means.SELECTED DRAWING: Figure 1

Description

本発明は、デジタルカメラに代表される撮像装置に関し、特に撮影画面内の主被写体と背景、それぞれの像生成に関する。   The present invention relates to an imaging apparatus typified by a digital camera, and more particularly to image generation of a main subject and a background in a shooting screen.

従来、流し撮り等の撮影シーンで、主被写体には合焦していて、背景はボカしたい場合には、絞りを開放や開放に近い値にして撮影している。そのようなシーンで主被写体が画面奥行き方向に傾いていた場合、手前側が合焦している場合は、主被写体の奥側は被写界深度外になって合焦していない状態となってしまう事がある。   Conventionally, in a shooting scene such as a panning shot, when the main subject is in focus and the background is to be blurred, shooting is performed with the aperture set to a value close to or fully open. In such a scene, if the main subject is tilted in the depth direction of the screen and the near side is in focus, the back side of the main subject is out of depth of field and is not in focus. It may end up.

そこで、特許文献1にあるように、複数位置のデフォーカス量のデータに基づいて撮像素子により得られた受光信号を合成する事で、撮影画面内の複数の被写体にピントの合った合成画像を得る技術を応用すれば、前述のように画面奥行き方向に傾いた主被写体であっても、手前側も奥側もピントの合った合成画像を得られることが考えられる。   Therefore, as described in Patent Document 1, by combining the received light signals obtained by the image sensor based on the defocus amount data at a plurality of positions, a composite image focused on a plurality of subjects in the shooting screen is obtained. By applying the obtained technology, it is conceivable that a composite image in which the near side and the far side are in focus can be obtained even with the main subject tilted in the depth direction of the screen as described above.

特開2010−213038号公報JP 2010-213038 A

しかしながら、特許文献1で開示された技術を応用して主被写体の全域のピントが合った合成画像を得る場合においては、主被写体とデフォーカス量が等しい主被写体以外、例えば背景にもピントが合った合成画像となってしまい、撮影者が意図している背景をボカした撮影画像を得ることが出来ないという場合がある。   However, in the case of obtaining a composite image in which the entire area of the main subject is in focus by applying the technique disclosed in Patent Document 1, the background is also in focus other than the main subject having the same defocus amount as the main subject. In some cases, it becomes impossible to obtain a photographed image with a blurred background intended by the photographer.

そこで、本発明の目的は、撮影画面の奥行き方向に傾いた特定の被写体(主被写体)の全域が合焦し、かつ、主被写体以外の背景は自然にボケた撮影画像が取得可能な撮像装置を提供することにある。   SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide an imaging apparatus capable of acquiring a shot image in which the entire area of a specific subject (main subject) tilted in the depth direction of the shooting screen is in focus and the background other than the main subject is naturally blurred. Is to provide.

本発明に係る撮像装置は、
撮影レンズを含む撮影光学系と、前記撮影レンズを介して入射される被写体の光学像を光電変換して画像信号を出力する撮像素子とを含む撮像装置において、
前記撮像素子上の各画素に入射する前記被写体の光学像の光束を前記撮影レンズの特定の瞳領域からの光束のみに制限する瞳分割手段と、
異なる瞳領域を通過した像の相関を計算する相関計算手段と、
前記相関計算手段の結果から主被写体を判定する第一の判定手段と、
前記第一の判定手段から、主被写体以外の被写体の光学像を背景と判定する第二の判定手段と、
前記第二の判定手段により判定された背景のデフォーカスマップを作成すると共に、前記第一の判定手段により判定された主被写体のデフォーカスマップを生成し、該主被写体の全域が深度内となる結像面の傾きを演算する演算手段と、
前記画像信号から被写体像を生成する像生成位置を前記演算手段の結果に基づいて設定する像生成位置設定手段と、
前記撮像素子上の各画素への入射角度を決定する入射角決定手段と、
前記像生成位置設定手段で設定された像生成位置と前記入射角決定手段の情報とに基づいて、前記像生成位置に対応する前記画像信号のシフト量を前記瞳領域ごとに決定して前記画像信号をシフトし、その電気信号を加算する像生成手段と、
前記第二の判定手段により判定された背景の像生成位置を前記第一の判定手段により判定された主被写体の像生成位置と連続性がある位置に決定する背景生成位置決定手段と、を備えたことを特徴とする。
An imaging apparatus according to the present invention
In an imaging apparatus including an imaging optical system including an imaging lens, and an imaging element that photoelectrically converts an optical image of a subject incident through the imaging lens and outputs an image signal,
Pupil dividing means for restricting a light beam of the optical image of the subject incident on each pixel on the image sensor to only a light beam from a specific pupil region of the photographing lens;
Correlation calculation means for calculating the correlation of images passing through different pupil regions;
First determination means for determining a main subject from the result of the correlation calculation means;
Second determination means for determining an optical image of a subject other than the main subject as a background from the first determination means;
A defocus map of the background determined by the second determination unit is created, and a defocus map of the main subject determined by the first determination unit is generated, and the entire area of the main subject is within the depth. Computing means for computing the tilt of the imaging plane;
Image generation position setting means for setting an image generation position for generating a subject image from the image signal based on a result of the calculation means;
Incident angle determining means for determining an incident angle to each pixel on the image sensor;
Based on the image generation position set by the image generation position setting means and the information of the incident angle determination means, the shift amount of the image signal corresponding to the image generation position is determined for each pupil region and the image Image generating means for shifting the signals and adding the electrical signals;
Background generation position determination means for determining the background image generation position determined by the second determination means to be a position that is continuous with the image generation position of the main subject determined by the first determination means. It is characterized by that.

本発明によれば、撮影画面の奥行き方向に傾いた特定の被写体(主被写体)の全域が合焦し、かつ、主被写体以外の背景は自然にボケた撮影画像が取得可能な撮像装置を提供することが出来る。   According to the present invention, there is provided an imaging apparatus capable of acquiring a captured image in which the entire area of a specific subject (main subject) tilted in the depth direction of the shooting screen is in focus and the background other than the main subject is naturally blurred. I can do it.

カメラシステムのブロック図Block diagram of the camera system カメラ100の背面図Rear view of camera 100 実施例における撮像装置の光学系の模式図Schematic diagram of optical system of imaging device in embodiment 撮影時の表示部258の表示例を示す図The figure which shows the example of a display of the display part 258 at the time of imaging | photography. 実施例における合成撮影時の動作フロー図Operation flow diagram during composite shooting in the embodiment 実施例における像の生成動作を示す模式図Schematic diagram showing image generation operation in the embodiment 像の生成動作と被写体像との関係の説明図Explanatory diagram of relationship between image generation operation and subject image 実施例における合成撮影時の背景像生成位置に関する動作サブフロー図Operation sub-flow diagram regarding background image generation position at the time of composite shooting in the embodiment 実施例における合成撮影時の背景像生成位置と被写体像との関係の説明図Explanatory drawing of the relationship between the background image generation position and subject image at the time of composite shooting in the embodiment 実施例における相関演算の動作フロー図Operation flow diagram of correlation calculation in the embodiment 実施例における像生成手段の動作フロー図Operation flow diagram of image generating means in embodiment

以下、本発明を実施するための形態を図面に基づいて説明する。
[実施例]
図1から図11を参照して、本発明の撮像装置について説明する。図1は撮像装置であるデジタルカメラおよびレンズの電気的構成を示すブロック図である。カメラ100およびレンズ102からなるカメラシステムは、撮像系、画像処理系、記録再生系、制御系を有する。撮像系は、撮影光学系101 、撮像素子252を含み、画像処理系は、画像処理部150を含む。また、記録再生系は、メモリ197、表示部258を含み、制御系は、ボディCPU109、およびレンズCPU103、レンズ駆動手段であるズームレンズ駆動部111及びAFレンズ駆動部121を含む。
Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
[Example]
The imaging apparatus of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram showing an electrical configuration of a digital camera and a lens which are imaging devices. A camera system including the camera 100 and the lens 102 includes an imaging system, an image processing system, a recording / reproducing system, and a control system. The imaging system includes a photographing optical system 101 and an imaging element 252, and the image processing system includes an image processing unit 150. The recording / reproducing system includes a memory 197 and a display unit 258, and the control system includes a body CPU 109, a lens CPU 103, a zoom lens driving unit 111 that is a lens driving unit, and an AF lens driving unit 121.

図2は同カメラシステムの背面図である。本実施形態におけるカメラシステムは、カメラ100に対して着脱可能なレンズ102内に撮影光学系101が設けられている。撮像系は、物体からの光を、撮影光学系101を介して撮像素子252の撮像面に結像する光学処理系である。   FIG. 2 is a rear view of the camera system. In the camera system according to the present embodiment, a photographing optical system 101 is provided in a lens 102 that can be attached to and detached from the camera 100. The imaging system is an optical processing system that forms an image of light from an object on the imaging surface of the imaging element 252 via the imaging optical system 101.

撮影光学系101はズームレンズ110を有しており、超音波モータやステッピングモータを駆動源とするズームレンズ駆動部111によって光軸方向に駆動可能である。ズームレンズ電圧ドライバ113は、ズームレンズ駆動部111を駆動制御する電圧を発生する。   The photographing optical system 101 includes a zoom lens 110, and can be driven in the optical axis direction by a zoom lens driving unit 111 using an ultrasonic motor or a stepping motor as a driving source. The zoom lens voltage driver 113 generates a voltage for driving and controlling the zoom lens driving unit 111.

ズーム位置検出部112は、光軸Iに沿ったズームレンズ110の位置を検出するズームエンコーダである。ズーム位置検出部112は、焦点距離値に応じたパルス信号をズームレンズ制御部105に出力する。   The zoom position detection unit 112 is a zoom encoder that detects the position of the zoom lens 110 along the optical axis I. The zoom position detection unit 112 outputs a pulse signal corresponding to the focal length value to the zoom lens control unit 105.

ズームレンズ制御部105は、ズームレンズ駆動部111を制御し、例えば撮影者がカメラ100もしくはレンズ102に不図示のスイッチにより設定した焦点距離になる光軸I上の位置にズームレンズ110が駆動されるように追従制御を行う部分である。またズームレンズ制御部105は、ズーム位置検出部112が出力するパルス信号を取り込む。ズームレンズ制御部105は、撮影者が設定した焦点距離になる光軸I上の位置(目標位置)、ズームレンズ110の現在位置情報などに基づいて駆動信号を演算し、このデジタル駆動信号をズームレンズ電圧ドライバ113に出力する。   The zoom lens control unit 105 controls the zoom lens driving unit 111 so that, for example, the zoom lens 110 is driven to a position on the optical axis I that becomes a focal length set by the photographer with the camera 100 or the lens 102 using a switch (not shown). This is the part that performs tracking control. Further, the zoom lens control unit 105 takes in the pulse signal output from the zoom position detection unit 112. The zoom lens control unit 105 calculates a drive signal based on the position (target position) on the optical axis I that becomes the focal length set by the photographer, the current position information of the zoom lens 110, and the like, and zooms the digital drive signal. Output to the lens voltage driver 113.

ズームレンズ電圧ドライバ113は、入力された駆動信号(駆動電圧)に応じて、ズームレンズ駆動部111に電力を供給するドライバ部である。ズームレンズ電圧ドライバ113は、駆動信号に対し、スイッチングを行い、ズームレンズ駆動部111に電圧を印加し、ズームレンズ駆動部111の駆動を行う。   The zoom lens voltage driver 113 is a driver unit that supplies power to the zoom lens driving unit 111 in accordance with an input driving signal (driving voltage). The zoom lens voltage driver 113 switches the drive signal, applies a voltage to the zoom lens drive unit 111, and drives the zoom lens drive unit 111.

また撮影光学系101は、AFレンズ120を有しており、超音波モータやステッピングモータを駆動源とするAFレンズ駆動部121によって光軸方向に駆動可能である。AFレンズ電圧ドライバ123は、AFレンズ駆動部121を駆動制御する電圧を発生する。   The photographing optical system 101 includes an AF lens 120 and can be driven in the optical axis direction by an AF lens driving unit 121 using an ultrasonic motor or a stepping motor as a driving source. The AF lens voltage driver 123 generates a voltage for driving and controlling the AF lens driving unit 121.

フォーカス位置検出部122は、光軸Iに沿ったAFレンズ120の位置を検出するフォーカスエンコーダである。フォーカス位置検出部122は、被写体距離値に応じたパルス信号をAFレンズ制御部104に出力する。   The focus position detection unit 122 is a focus encoder that detects the position of the AF lens 120 along the optical axis I. The focus position detection unit 122 outputs a pulse signal corresponding to the subject distance value to the AF lens control unit 104.

AFレンズ制御部104は、AFレンズ駆動部121を制御し、例えば撮影者のカメラ100のレリーズスイッチ191の操作により検出された被写体距離になる光軸I上の位置にAFレンズ120が駆動されるように追従制御を行う部分である。またAFレンズ制御部104は、フォーカス位置検出部122が出力するパルス信号を取り込む。AFレンズ制御部104は、被写体距離になる光軸I上の位置(目標位置)、AFレンズ120の現在位置情報などに基づいて駆動信号を演算し、このデジタル駆動信号をAFレンズ電圧ドライバ123に出力する。   The AF lens control unit 104 controls the AF lens driving unit 121 so that the AF lens 120 is driven to a position on the optical axis I at which the subject distance is detected by operating the release switch 191 of the camera 100 of the photographer, for example. This is the part that performs the follow-up control. The AF lens control unit 104 captures a pulse signal output from the focus position detection unit 122. The AF lens control unit 104 calculates a drive signal based on the position (target position) on the optical axis I that is the subject distance, the current position information of the AF lens 120, and the like, and this digital drive signal is sent to the AF lens voltage driver 123. Output.

AFレンズ電圧ドライバ123は、入力された駆動信号(駆動電圧)に応じて、AFレンズ駆動部121に電力を供給するドライバ部である。AFレンズ電圧ドライバ123は、駆動信号に対し、スイッチングを行い、AFレンズ駆動部121に電圧を印加し、AFレンズ駆動部121の駆動を行う。   The AF lens voltage driver 123 is a driver unit that supplies power to the AF lens driving unit 121 in accordance with an input driving signal (driving voltage). The AF lens voltage driver 123 performs switching on the driving signal, applies a voltage to the AF lens driving unit 121, and drives the AF lens driving unit 121.

また撮影光学系101は、絞り140を有しており、ステッピングモータ等を駆動源とする絞り駆動部141によって絞り140の開口の大きさが変化する。絞り制御部106は、絞り駆動部141を制御し、例えば撮影する被写体の明るさに応じて適正露光量となる絞りの値を演算するとともに、該絞り値となる駆動信号を演算し、絞り駆動部141に出力する。   The photographing optical system 101 has a diaphragm 140, and the size of the aperture of the diaphragm 140 is changed by a diaphragm driving unit 141 using a stepping motor or the like as a driving source. The aperture control unit 106 controls the aperture drive unit 141, for example, calculates an aperture value that is an appropriate exposure amount according to the brightness of the subject to be photographed, calculates a drive signal that is the aperture value, and performs aperture drive. Output to the unit 141.

または、後述するように、撮影者が絞り設定スイッチ194にて設定した絞り値に応じて駆動信号を演算し、絞り駆動部141に出力する。レンズCPU103は、レンズ102側の種々の制御を行う中央処理部である。レンズCPU103内には、ズームレンズ制御部105と、AFレンズ制御部104及び絞り制御部106が設けられている。   Alternatively, as described later, a drive signal is calculated according to the aperture value set by the photographer with the aperture setting switch 194 and output to the aperture drive unit 141. The lens CPU 103 is a central processing unit that performs various controls on the lens 102 side. In the lens CPU 103, a zoom lens control unit 105, an AF lens control unit 104, and an aperture control unit 106 are provided.

レンズCPU103は、レンズ102とカメラ100との間に設けられたレンズ接点190を介して、ボディCPU109との間で通信が可能である。EEPROM131は、レンズ102に関する種々の固有情報であるレンズデータなどを格納する不揮発性の記憶部である。   The lens CPU 103 can communicate with the body CPU 109 via a lens contact 190 provided between the lens 102 and the camera 100. The EEPROM 131 is a non-volatile storage unit that stores lens data that is various kinds of unique information regarding the lens 102.

ボディCPU109は、カメラシステム全体の種々の制御を行う中央処理部である。ボディCPU109には、レリーズスイッチ191の情報が入力され、レリーズスイッチ191が半押し、又は、全押しされたことを検知する事が出来る。これにより、撮像素子252の駆動、画像処理部150の動作、メモリ197の圧縮処理などを制御する。さらに表示部258によって液晶モニタ等に情報表示を行う情報表示装置の各セグメントの状態を制御する。   The body CPU 109 is a central processing unit that performs various controls of the entire camera system. Information on the release switch 191 is input to the body CPU 109, and it can be detected that the release switch 191 is half-pressed or fully pressed. Thereby, driving of the image sensor 252, operation of the image processing unit 150, compression processing of the memory 197, and the like are controlled. Further, the state of each segment of the information display device that displays information on a liquid crystal monitor or the like is controlled by the display unit 258.

また、ボディCPU109は、後述するように、撮影者が撮影時に主被写体としている被写体を判定する機能と、主被写体以外の被写体を背景と判定する機能とを有している。よって、ボディCPU109が本発明の第一の判定手段及び第二の判定手段に相当する。   As will be described later, the body CPU 109 has a function of determining a subject that is a main subject at the time of shooting by a photographer and a function of determining a subject other than the main subject as a background. Therefore, the body CPU 109 corresponds to the first determination unit and the second determination unit of the present invention.

画像処理部150は、内部にA/D変換器、ホワイトバランス回路、ガンマ補正回路、補間演算回路等を有しており、記録用の画像を生成することができる。また、本発明の要部である、像生成手段、相関計算手段等を含める事も出来る(本実施例ではこれらの要素はボディCPU109内に配置する場合を想定して記載する)。   The image processing unit 150 includes an A / D converter, a white balance circuit, a gamma correction circuit, an interpolation calculation circuit, and the like, and can generate a recording image. In addition, image generation means, correlation calculation means, and the like, which are the main parts of the present invention, can be included (in this embodiment, these elements are described assuming that they are arranged in the body CPU 109).

撮像素子252は、具体的には、増幅型固体撮像素子の1つであるCMOSプロセスコンパチブルのセンサ(以降CMOSセンサと略す)である。CMOSセンサの特長の1つに、エリアセンサ部のMOSトランジスタと撮像装置駆動回路、AD変換回路、画像処理回路といった周辺回路を同一工程で形成できるため、マスク枚数、プロセス工程がCCDと比較して大幅に削減できる。また、任意の画素へのランダムアクセスが可能といった特長も有し、ディスプレイ用に間引いた読み出しが容易であって、表示部258において高い表示レートでリアルタイム表示が行える。   Specifically, the image sensor 252 is a CMOS process compatible sensor (hereinafter abbreviated as a CMOS sensor) which is one of amplification type solid-state image sensors. One of the features of the CMOS sensor is that the MOS transistors in the area sensor and the peripheral circuits such as the imaging device drive circuit, AD converter circuit, and image processing circuit can be formed in the same process. It can be greatly reduced. Further, it has a feature that random access to an arbitrary pixel is possible, reading that is thinned for display is easy, and real-time display can be performed at a high display rate on the display unit 258.

撮像素子252は、上述した特長を利用し、ディスプレイ画像出力動作(撮像素子252の受光領域のうち一部を間引いた領域での読み出し)および高精彩画像出力動作(全受光領域での読み出し)を行う。   The image sensor 252 utilizes the above-described features, and performs a display image output operation (reading in a region where a part of the light receiving region of the image sensor 252 is thinned) and a high-definition image output operation (reading in the entire light receiving region). Do.

また撮像素子252表面にはマイクロレンズが格子状に配置してあり、いわゆるマイクロレンズアレイ(以下 MLA20)を形成している。MLA20は本実施例において、瞳分割手段を構成する。MLA20の機能や配置の詳細については図3を用いて後述する。後述するように、撮像素子252からピント評価量/適当な露光量が得られるので、この信号に基づいて適切に撮影光学系101が調整されることで、適切な光量の物体光を撮像素子252に露光するとともに、撮像素子252近傍で被写体像が結像する。   Microlenses are arranged in a lattice pattern on the surface of the image sensor 252 to form a so-called microlens array (hereinafter referred to as MLA20). In this embodiment, the MLA 20 constitutes pupil dividing means. Details of the functions and arrangement of the MLA 20 will be described later with reference to FIG. As will be described later, since the focus evaluation amount / appropriate exposure amount can be obtained from the image sensor 252, the imaging optical system 101 is appropriately adjusted based on this signal, so that an appropriate amount of object light is captured by the image sensor 252. And an object image is formed near the image sensor 252.

なお、ボディCPU109は、後述するように、画像処理部150を動作させて撮像素子252に結像した被写体像から撮影画像のデフォーカス量を求める事で、背景320と主被写体310のデフォーカスマップを作成し、主被写体310の全域が深度内となる結像面の傾きを演算するので、本発明の演算手段にも相当する。   As will be described later, the body CPU 109 operates the image processing unit 150 to obtain the defocus amount of the captured image from the subject image formed on the image sensor 252 so that the defocus map between the background 320 and the main subject 310 is obtained. And the inclination of the image plane where the entire area of the main subject 310 is within the depth is calculated, and thus corresponds to the calculation means of the present invention.

また、ボディCPU109は、後述するように、画像処理部150を動作させて撮像素子252に結像した被写体像の像生成位置を前記演算結果に基づいて設定するので、本発明の像生成位置設定手段にも相当する。   Further, as will be described later, the body CPU 109 operates the image processing unit 150 to set the image generation position of the subject image formed on the image sensor 252 based on the calculation result, so that the image generation position setting of the present invention is performed. It also corresponds to means.

さらには、ボディCPU109は、後述するように、背景320の像生成位置を主被写体310の像生成位置と連続性がある位置に決定するので、本発明の背景生成位置決定手段にも相当する。   Furthermore, as will be described later, the body CPU 109 determines the image generation position of the background 320 to be a position that is continuous with the image generation position of the main subject 310, and therefore corresponds to the background generation position determination means of the present invention.

図3は本実施例における撮影光学系の要部を説明する図である。本発明を適用するためには、いわゆる光線空間情報等といわれる光線の位置に加えて角度の情報を取得する必要がある。本実施例では、角度情報の取得のために撮影光学系101の結像面近傍にMLA20を配置するとともに、MLA20を構成する1つのレンズに対して複数の画素を対応させている。   FIG. 3 is a diagram for explaining a main part of the photographing optical system in the present embodiment. In order to apply the present invention, it is necessary to acquire angle information in addition to the position of light rays, so-called light space information. In this embodiment, the MLA 20 is disposed in the vicinity of the imaging plane of the photographing optical system 101 for obtaining angle information, and a plurality of pixels are associated with one lens constituting the MLA 20.

図3(a)は撮像素子252とMLA20の関係模式的に示す図である。図3(b)は撮像素子252の画素とMLA20の対応を示す模式図である。図3(c)はMLA20によってMLA20の下に設けられた画素が特定の瞳領域と対応付けられる事を示す図である。   FIG. 3A is a diagram schematically showing the relationship between the image sensor 252 and the MLA 20. FIG. 3B is a schematic diagram showing the correspondence between the pixels of the image sensor 252 and the MLA 20. FIG. 3C is a diagram illustrating that pixels provided below the MLA 20 are associated with a specific pupil region by the MLA 20.

図3(a)に示すように、撮像素子252上にはMLA20が設けられており、MLA20の前側主点は撮影光学系101の結像面近傍になるように配置されている。図3(a)は撮像装置の横からと、正面からMLA20を見た状態を示しており、撮像装置正面から見るとMLA20のレンズが撮像素子252上の画素を覆うように配置されている。なお、図3(a)ではMLA20を構成する各マイクロレンズを見やすくするために、大きく記載したが、実際には各マイクロレンズは画素の数倍程度の大きさしかない(実際の大きさについては図3(b)を用いて説明する)。   As shown in FIG. 3A, the MLA 20 is provided on the image sensor 252, and the front principal point of the MLA 20 is arranged in the vicinity of the imaging plane of the photographing optical system 101. FIG. 3A shows a state where the MLA 20 is viewed from the side and from the front of the imaging device, and the lens of the MLA 20 is disposed so as to cover the pixels on the imaging element 252 when viewed from the front of the imaging device. In FIG. 3A, the microlenses constituting the MLA 20 are illustrated in large size so that they can be easily seen. However, in actuality, each microlens is only about several times as large as a pixel (for the actual size). This will be described with reference to FIG.

図3(b)は図3(a)の装置正面からの図を一部拡大した図である。図3(b)に示す格子状の枠は、撮像素子252の各画素を示している。一方MLA20を構成する各マイクロレンズは太い円20a,20b,20c,20dで示した。図3(b)から明らかなように、マイクロレンズ1つに対して複数の画素が割り当てられており、図3(b)の例では、5行X5列=25個の画素が1つのマイクロレンズに対して設けられている(すなわち各マイクロレンズの大きさは画素の大きさの5倍X5倍の大きさである)。   FIG. 3B is a partially enlarged view from the front of the apparatus of FIG. A grid-like frame shown in FIG. 3B indicates each pixel of the image sensor 252. On the other hand, each microlens constituting the MLA 20 is indicated by thick circles 20a, 20b, 20c, and 20d. As apparent from FIG. 3B, a plurality of pixels are assigned to one microlens. In the example of FIG. 3B, 5 rows × 5 columns = 25 pixels are one microlens. (That is, the size of each microlens is 5 × 5 times the size of the pixel).

図3(c)は撮像素子252を、マイクロレンズ光軸を含み、撮像素子252の長手方向が図の横方向になるように切断した図である。図3(c)の21、22、23、24、25は撮像素子252の画素(1つの光電変換部)を示している。   FIG. 3C is a diagram in which the image sensor 252 is cut so that the micro lens optical axis is included and the longitudinal direction of the image sensor 252 is in the horizontal direction of the drawing. 3, 21, 22, 23, 24, and 25 indicate pixels (one photoelectric conversion unit) of the image sensor 252.

一方、図3(c)の上方に示した図は撮影光学系101の射出瞳面を示している。実際には、図3(c)の下方に示した撮像素子252の図と方向を合わせると、射出瞳面は図3(c)の紙面垂直方向になるが、説明のために投影方向を変化させている。また、図3(c)においては、説明を簡単にするために、1次元の投影/信号処理について説明する。実際の装置においては、これを容易に2次元に拡張する事が出来る。   On the other hand, the figure shown above FIG. 3C shows the exit pupil plane of the photographing optical system 101. Actually, when the direction is aligned with the image sensor 252 shown in the lower part of FIG. 3C, the exit pupil plane is perpendicular to the plane of FIG. 3C, but the projection direction is changed for the sake of explanation. I am letting. In FIG. 3C, one-dimensional projection / signal processing will be described to simplify the description. In an actual apparatus, this can be easily extended to two dimensions.

図3(c)の画素21、22、23、24、25は図3(b)の21a、22a、23a、24a、25aとそれぞれ対応する位置関係にある。図3(c)に示すように、マイクロレンズによって各画素は撮影光学系101の射出瞳面上の特定の領域と共役になるように設計されている。図3(c)の例では画素21と領域31が、画素22と領域32が、画素23と領域33が、画素24と領域34が、画素25と領域35がそれぞれ対応している。すなわち画素21には撮影光学系101の射出瞳面上の領域31を通過した光束のみが入射する。他の画素も同様である。結果として、瞳面上での通過領域と撮像素子252上の位置関係から角度の情報を取得する事が可能となる。   Pixels 21, 22, 23, 24, and 25 in FIG. 3C are in a positional relationship corresponding to 21a, 22a, 23a, 24a, and 25a in FIG. As shown in FIG. 3C, each pixel is designed to be conjugate with a specific region on the exit pupil plane of the photographing optical system 101 by the microlens. In the example of FIG. 3C, the pixel 21 and the region 31 correspond to the pixel 22 and the region 32, the pixel 23 and the region 33, the pixel 24 and the region 34, and the pixel 25 and the region 35, respectively. That is, only the light beam that has passed through the region 31 on the exit pupil plane of the photographing optical system 101 enters the pixel 21. The same applies to the other pixels. As a result, angle information can be acquired from the passing area on the pupil plane and the positional relationship on the image sensor 252.

ここで後ほどの説明を簡単にするために記号を導入する。図3(c)に示すように、撮像素子252の画素ピッチをΔX、角度分解能をΔθとする。さらに角度の分割数をNθ(図3の例ではNθ=5)とする。画素ピッチは撮像素子252の形状によって決定され、Δθは光線の角度を取得する範囲と角度分割数Nθで決定される。すなわち、物理的な構造(撮像素子252およびMLA20の構造)のみによってこれらのパラメータは決定される。 Here, symbols are introduced to simplify the explanation later. As shown in FIG. 3C, the pixel pitch of the image sensor 252 is ΔX, and the angular resolution is Δθ. Further, the number of angle divisions is N θ (N θ = 5 in the example of FIG. 3). The pixel pitch is determined by the shape of the image sensor 252, and Δθ is determined by the range for acquiring the angle of the light beam and the number of angle divisions N θ . That is, these parameters are determined only by the physical structure (the structures of the image sensor 252 and the MLA 20).

よって、ボディCPU109は、撮影光学系101の射出瞳位置の情報をレンズ102から受け取る事により撮像素子252上での角度の情報、つまり各画素への入射角度を決定する事が出来るので、入射角決定手段にも相当する。   Therefore, the body CPU 109 can determine the angle information on the image sensor 252 by receiving the information of the exit pupil position of the photographing optical system 101 from the lens 102, that is, the incident angle to each pixel. It also corresponds to a determination means.

レリーズスイッチ191は、前述の通り、図示しないレリーズボタンの半押し動作(SW1のON)を検出して、一連の撮影準備動作(測光動作や焦点調節動作等)を開始させ、レリーズボタンの全押し動作(SW2のON)を検出して、撮影動作(撮像素子252から読み出された画像データの記録媒体への記録)を開始させるスイッチである。   As described above, the release switch 191 detects a half-press operation of the release button (not shown) (ON of SW1), starts a series of shooting preparation operations (photometry operation, focus adjustment operation, etc.), and fully presses the release button. This switch detects an operation (ON of SW2) and starts a photographing operation (recording of image data read from the image sensor 252 on a recording medium).

192は任意方向の操作が可能な選択スイッチで、不図示の公知の撮影メニューの項目を選択したり、後述するように、撮影者が主被写体を選択したりする時に用いるスイッチである。193は決定スイッチで、不図示の公知の撮影メニューの決定をしたり、後述するように、撮影者が主被写体を決定したりする時に用いるスイッチである。194は絞り設定スイッチで、不図示の操作ダイヤルを撮影者が操作する事で、撮影者が絞り値を設定する事が出来るスイッチである。   Reference numeral 192 denotes a selection switch that can be operated in an arbitrary direction, and is a switch that is used when a well-known shooting menu item (not shown) is selected or when a photographer selects a main subject as will be described later. Reference numeral 193 denotes a determination switch which is used when a known shooting menu (not shown) is determined or when a photographer determines a main subject as will be described later. An aperture setting switch 194 is a switch that allows the photographer to set an aperture value by operating the operation dial (not shown).

195はカメラ100を起動させるためのメインスイッチである。また、図2に示したように、メインスイッチ195は2ポジション(195−1,195−2)が選択可能なスイッチである。ポジション195−1にメインスイッチ195をセットした時は「OFF」で、後述のように、カメラ100はスリープ状態となる。またポジション195−2にメインスイッチ195をセットした時は「ON」で、後述のように、カメラ100はスリープ状態から駆動状態となり、各種スイッチの操作等を受け付けて静止画や動画の撮影のための動作を行う状態となる。   Reference numeral 195 denotes a main switch for starting up the camera 100. As shown in FIG. 2, the main switch 195 is a switch capable of selecting two positions (195-1, 195-2). When the main switch 195 is set to the position 195-1, it is “OFF”, and the camera 100 enters a sleep state as will be described later. When the main switch 195 is set to the position 195-2, it is “ON”, and as will be described later, the camera 100 changes from the sleep state to the drive state, and accepts various switch operations and the like for taking a still image or a moving image. It will be in the state which performs operation | movement of.

196はカメラ100の撮影モードを設定するためのモードスイッチで、後述する「合成撮影モード」を設定する事が出来る。197はメモリで、実際の記憶部に加えて記録に必要な処理回路を備えている。メモリ手段は、記録部へ出力を行うとともに、表示部258に出力する像を生成、保存する。また、メモリ197 は、予め定められた方法を用いて画像、動画、音声などの圧縮を行う。   Reference numeral 196 denotes a mode switch for setting a shooting mode of the camera 100, which can set a “composite shooting mode” to be described later. A memory 197 includes a processing circuit necessary for recording in addition to an actual storage unit. The memory means outputs to the recording unit and generates and stores an image to be output to the display unit 258. In addition, the memory 197 compresses images, moving images, sounds, and the like using a predetermined method.

表示部258はカメラ100の背面に取り付けられており、撮影者は表示部258での表示を直接観察できるようになっている。表示部258を、有機EL空間変調素子や液晶空間変調素子、微粒子の電気泳動を利用した空間変調素子などで構成すれば、消費電力を小さくでき、かつ表示部258の薄型化を図る事が出来る。これにより、カメラ100の省電力化および小型化を図る事が出来る。   The display unit 258 is attached to the back of the camera 100 so that the photographer can directly observe the display on the display unit 258. If the display unit 258 is formed of an organic EL spatial modulation element, a liquid crystal spatial modulation element, a spatial modulation element using microparticle electrophoresis, power consumption can be reduced, and the display unit 258 can be thinned. . Thereby, the power saving and size reduction of the camera 100 can be achieved.

図4はいわゆるライブビュー撮影時に表示部258に表示される被写体像の様子を示した図である。図4において、表示部258には、被写体像258aと撮影条件(シャッタ速度、絞り値、ISO感度等)や露出レベル表示、電池残量表示等の撮影情報258bが表示されている。   FIG. 4 is a diagram illustrating a state of a subject image displayed on the display unit 258 during so-called live view shooting. In FIG. 4, the display unit 258 displays a subject image 258a and shooting information (258b) such as shooting conditions (shutter speed, aperture value, ISO sensitivity, etc.), exposure level display, and battery level display.

また被写体像258a表示部内には、複数の測距点(測距領域)301が設けられており、撮像素子252からのピント検出結果に基づいて選択された測距点302を別の表示形態(色違いでの表示等)にする事により、撮影者に合焦している主被写体部を知らせる事が出来る。なお、カメラ100の選択スイッチ192と決定スイッチ193を用いて測距部253の検出結果によらずに複数の測距点301の中から合焦させたい任意の位置のものを撮影者が選択可能である。その際は、撮影者が選択した測距点302に基づいて撮像素子252からのピント検出結果から主被写体までの距離を演算する事でピンボケ写真になるのを防止する。   In the subject image 258a display section, a plurality of distance measuring points (ranging areas) 301 are provided, and the distance measuring points 302 selected based on the focus detection result from the image sensor 252 are displayed in another display form ( By displaying in different colors, etc., it is possible to inform the photographer of the main subject portion in focus. In addition, the photographer can select an arbitrary position to be focused from among a plurality of distance measuring points 301 by using the selection switch 192 and the determination switch 193 of the camera 100 regardless of the detection result of the distance measuring unit 253. It is. In that case, the photographer can prevent the image from being out of focus by calculating the distance to the main subject from the focus detection result from the image sensor 252 based on the distance measuring point 302 selected by the photographer.

図5は本発明のカメラシステムが深度合成撮影する時の動作を説明するためのフローチャートであるので、これらを用いて、以下、合成撮影時のカメラ100及びレンズ102の動作について説明する。なお、ここで言う合成撮影とは、本発明の特徴である、主被写体310の背景320はボケているが、主被写体310は全域(≒全深度)ピントが合っている画像が得られる撮影の事である。   FIG. 5 is a flowchart for explaining the operation when the camera system of the present invention performs the depth composite photographing, and the operation of the camera 100 and the lens 102 during the composite photographing will be described below using these. Note that the composite photography referred to here is a feature of the present invention, in which the background 320 of the main subject 310 is blurred, but the main subject 310 is an image that can obtain an image in which the entire area (≈full depth) is in focus. It is a thing.

ステップ(以下、Sとする)1010では、メインスイッチ195がポジション195−2にセットされてONになっているかどうかの判定がボディCPU109によって行われる。メインスイッチ195がポジション195−1にセットされたまま(OFFのまま)であれば、カメラ100はスリープ状態のままであり、メインスイッチ195がポジション195−2にセットされてONになればS1020に進む。   In step (hereinafter referred to as S) 1010, the body CPU 109 determines whether or not the main switch 195 is set to the position 195-2 and turned ON. If the main switch 195 is set to the position 195-1 (off), the camera 100 remains in the sleep state, and if the main switch 195 is set to the position 195-2 and turned on, the process proceeds to S1020. move on.

S1020では、カメラ100がモードスイッチ196によって合成撮影モードに設定されているかどうかの判定がボディCPU109によって行われる。YesであればS1030に進む。一方、NoであればS1250に進み、通常の静止画撮影動作を行う。S1250の動作は公知の動作であり、また本発明の内容とは異なるので詳細な説明を省略する。   In S1020, the body CPU 109 determines whether or not the camera 100 is set to the composite shooting mode by the mode switch 196. If it is Yes, it will progress to S1030. On the other hand, if No, the process proceeds to S1250, and a normal still image shooting operation is performed. The operation of S1250 is a known operation and is different from the contents of the present invention, and thus detailed description thereof is omitted.

S1030では、レリーズスイッチ191が半押し動作が行われたかどうかの判断をボディCPU109が行う。YESならばS1040に進む。S1040では、撮影者が絞り設定スイッチ194にて設定した絞り値をボディCPU109が読み込み、レンズ接点190を介してレンズCPU103に送信する。そして、その絞り値に応じて絞り制御部106は絞り駆動部141を駆動制御し、絞り140を撮影者の設定した絞り値に相当する開口径にする。   In S1030, the body CPU 109 determines whether or not the release switch 191 has been half-pressed. If YES, the process proceeds to S1040. In S1040, the body CPU 109 reads the aperture value set by the photographer using the aperture setting switch 194, and transmits it to the lens CPU 103 via the lens contact 190. Then, the aperture controller 106 drives and controls the aperture driver 141 according to the aperture value so that the aperture 140 has an aperture diameter corresponding to the aperture value set by the photographer.

S1050では、撮像素子252を適当な時間露光して、読み出す(A/D変換する)事によりデータを取得する。   In S1050, the image sensor 252 is exposed for an appropriate time and read (A / D converted) to acquire data.

この時の露光時間と露光量から撮影において適当な露出量を計算する事も出来るが、本発明の要部ではないので説明は割愛する。S1060では相関計算手段を動作させて結果を得る。相関計算手段の動作の詳細は図10を用いて後述するが、このステップで、いわゆる位相差AFによるピント位置を求める事が出来る。   Although an appropriate exposure amount can be calculated from the exposure time and exposure amount at this time, the description is omitted because it is not a main part of the present invention. In S1060, the correlation calculation means is operated to obtain a result. Details of the operation of the correlation calculating means will be described later with reference to FIG. 10, but at this step, the focus position by so-called phase difference AF can be obtained.

S1070では、S1060の演算結果をボディCPU109からレンズ接点190を介してレンズCPU103が受け取り、その後、AFレンズ120をAFレンズ駆動部121により駆動してS1060により測距点302で主被写体310が合焦状態となる位置にAFレンズ120を移動するとともに、S1050同様に、そのAFレンズ120の位置で通過した瞳領域毎の画像データを取得する。   In S1070, the lens CPU 103 receives the calculation result of S1060 from the body CPU 109 via the lens contact 190, and then the AF lens 120 is driven by the AF lens driving unit 121, and the main subject 310 is focused at the distance measuring point 302 in S1060. The AF lens 120 is moved to a position to be in a state, and image data for each pupil region that has passed at the position of the AF lens 120 is acquired as in S1050.

S1080では、各測距点301でのデフォーカス量を算出する。なお、撮影範囲内(図4で被写体像258aとして表示されているエリア内の事)で測距領域外(測距点301が配置されていない所)にいる被写体に対してもS1060の処理によりデフォーカス量が求まっている。   In S1080, the defocus amount at each distance measuring point 301 is calculated. It should be noted that the subject in the shooting range (in the area displayed as the subject image 258a in FIG. 4) and outside the distance measuring area (where the distance measuring point 301 is not arranged) is also processed by S1060. The amount of defocus is determined.

S1090では、S1080で求めた各測距点301でのデフォーカス量から撮影者が主被写体としている被写体をボディCPU109が判定する。具体的には、例えば各測距点301でのデフォーカス量の分布状況やその絶対値の差から、ある特定の値及びその近傍のデフォーカス量となっている測距点301の数が多いエリアを特定し、そのエリア内の被写体を主被写体310と判定すると共に、そのエリアで一番デフォーカス量が小さいものをピント位置の測距点302として表示する(図4参照)。   In S1090, the body CPU 109 determines the subject that the photographer is the main subject from the defocus amount at each distance measuring point 301 obtained in S1080. Specifically, for example, the number of distance measurement points 301 having a specific value and a defocus amount in the vicinity thereof is large from the distribution state of the defocus amount at each distance measurement point 301 and the difference between the absolute values. The area is specified, and the subject in the area is determined to be the main subject 310, and the smallest defocus amount in the area is displayed as the focus point 302 at the focus position (see FIG. 4).

あるいは、前述のように、カメラ100の選択スイッチ192と決定スイッチ193を用いて、撮影者が複数の測距点301の中から合焦させたい任意の位置の測距点302を指定した場合は、その測距点302にある被写体を主被写体310と判定する。あるいはまた、撮影者が指定した測距点302におけるデフォーカス量と等しいか、あるいはその近傍のデフォーカス量となっている測距点301が分布しているエリア内の被写体をボディCPU109は主被写体310と判定しても良い。   Alternatively, as described above, when the photographer designates the distance measuring point 302 at an arbitrary position to be focused from among the plurality of distance measuring points 301 using the selection switch 192 and the determination switch 193 of the camera 100. The subject at the distance measuring point 302 is determined as the main subject 310. Alternatively, the body CPU 109 selects the subject in the area where the distance measuring points 301 that are equal to or near the defocus amount at the distance measuring point 302 designated by the photographer are distributed. You may determine with 310.

なお、その際には、撮影者がカメラ100の選択スイッチ192と決定スイッチ193を用いて主被写体310を指定する場合は、表示部258内に例えば「主被写体を選択/決定して下さい」等の表示が行って撮影者の補助をすれば、撮影者にとっては利便性が向上する。また、いずれの方法で主被写体310と判定しても、測距点302は、ボディCPU109が主被写体310を認識してAFレンズ120を駆動して撮影光学系101のピント位置を調整する基準位置となる。   In this case, when the photographer designates the main subject 310 using the selection switch 192 and the decision switch 193 of the camera 100, for example, “select / determine the main subject” in the display unit 258, etc. If the display is performed to assist the photographer, convenience for the photographer is improved. Regardless of which method is used as the main subject 310, the distance measuring point 302 is a reference position at which the body CPU 109 recognizes the main subject 310 and drives the AF lens 120 to adjust the focus position of the photographing optical system 101. It becomes.

S1100では、S1090でボディCPU109が判定した主被写体310が撮影範囲内で写る範囲(以下、主被写体エリア311−図7参照−と呼ぶ)を演算する。具体的には、主被写体310上の測距点302におけるデフォーカス量と等しいか、あるいはその近傍のデフォーカス量となっている画素の範囲を主被写体エリア311として演算する。   In S1100, a range in which the main subject 310 determined by the body CPU 109 in S1090 is captured within the shooting range (hereinafter referred to as main subject area 311—see FIG. 7) is calculated. Specifically, a range of pixels that are equal to or near the defocus amount at the distance measuring point 302 on the main subject 310 is calculated as the main subject area 311.

これは、主被写体310が撮影範囲内に写っている部分(もしくは全体)では、そのデフォーカス量はほぼ連続的に変化しているので、S1060及びS1080で求めた撮影範囲内でのデフォーカス量演算結果から、主被写体310のデフォーカス量と、背景320等(図4参照)のデフォーカス量を比較する事で、デフォーカス量が大きく変化している隣接画素の境界を主被写体310のエッジと判定する事で、主被写体エリア311が演算出来る。なお、前述のように、主被写体エリア311内でのデフォーカス量が演算出来ているので、ボディCPU109は、主被写体エリア311内でのデフォーカスマップを作成する。   This is because the defocus amount changes substantially continuously in the portion (or the whole) in which the main subject 310 is within the shooting range, so the defocus amount within the shooting range obtained in S1060 and S1080. By comparing the defocus amount of the main subject 310 with the defocus amount of the background 320 or the like (see FIG. 4) based on the calculation result, the boundary of adjacent pixels where the defocus amount has changed greatly is used as the edge of the main subject 310. The main subject area 311 can be calculated. As described above, since the defocus amount in the main subject area 311 can be calculated, the body CPU 109 creates a defocus map in the main subject area 311.

なお、ここで言うデフォーカスマップとは、測距点302を基準とした時に、主被写体エリア311内で主被写体310の各部分が前ピン側なのか後ピン側にあるのかの分布状態が分かるモノである。またS1100では、例えば公知の被写体のコントラスト変化や色変化からエッジ検出をするなどして、主被写体エリア311を演算しても良い(主被写体エリア311の演算は前記デフォーカス量を利用したものには限定しない)。   The defocus map here refers to a distribution state indicating whether each part of the main subject 310 is on the front pin side or the rear pin side in the main subject area 311 when the distance measuring point 302 is used as a reference. It is a thing. In S1100, the main subject area 311 may be calculated by, for example, detecting an edge from a known subject contrast change or color change (the main subject area 311 is calculated using the defocus amount). Is not limited).

S1110では、後述の合成撮影(画像取得)をする際に、主被写体エリア311の全域が深度内に入る、つまり、S1100での演算結果である、主被写体エリア311内でのデフォーカスマップとズーム位置検出部112の検出結果である撮影光学系101の焦点距離情報から、主被写体310の全体にピントが合う結像面の傾きの演算をボディCPU109が行う。   In S1110, when performing composite photography (image acquisition), which will be described later, the entire area of the main subject area 311 falls within the depth, that is, the defocus map and zoom in the main subject area 311 that are the calculation results in S1100. From the focal length information of the photographing optical system 101 that is the detection result of the position detection unit 112, the body CPU 109 performs the calculation of the tilt of the imaging plane that focuses on the entire main subject 310.

S1120では、S1090でボディCPU109が判定した背景320を演算する。具体的には、撮影範囲からS1100において演算された主被写体エリア311を除いた領域を背景320として演算する。なお、前述のように、S1080において背景320でのデフォーカス量が演算出来ているので、ボディCPU109は、背景320内でのデフォーカスマップを作成する。この時もS1100同様に、測距点302を基準とした時に、背景320内の被写体の各部分が前ピン側なのか後ピン側にあるのかの分布状態が分かるモノである。   In S1120, the background 320 determined by the body CPU 109 in S1090 is calculated. Specifically, the area excluding the main subject area 311 calculated in S1100 from the shooting range is calculated as the background 320. As described above, since the defocus amount in the background 320 can be calculated in S1080, the body CPU 109 creates a defocus map in the background 320. At this time, as in S1100, the distribution state of whether each part of the subject in the background 320 is on the front pin side or the rear pin side when the distance measuring point 302 is used as a reference is known.

S1130では、後述のサブフロー(図8)で説明するように、合成撮影(画像取得)をする際に行う、主被写体エリア311のデフォーカスマップに応じた背景320の像生成位置の演算をボディCPU109が行う。S1140では、画像処理部150が有する像生成手段を動作させて結果を得る。像生成手段の動作の詳細は図11を用いて後述するが、これにより、撮像素子252に結像した主被写体310の像(測距点302において合焦している像)がメモリ197に生成される。   In S1130, as will be described in a later-described subflow (FIG. 8), the body CPU 109 calculates the image generation position of the background 320 according to the defocus map of the main subject area 311 that is performed when performing composite shooting (image acquisition). Do. In step S1140, the image generation unit included in the image processing unit 150 is operated to obtain a result. The details of the operation of the image generation means will be described later with reference to FIG. 11, whereby an image of the main subject 310 imaged on the image sensor 252 (image focused at the distance measuring point 302) is generated in the memory 197. Is done.

なお、S1140では、S1110及びS1130での演算結果に基づいた主被写体310及び背景320を合成した像をメモリ197に生成しても良い。S1150では、S1140にて生成された主被写体310に合焦した画像を撮影前のプレビュー画像として表示部258に表示する。   In S1140, an image obtained by combining the main subject 310 and the background 320 based on the calculation results in S1110 and S1130 may be generated in the memory 197. In S1150, the image focused on the main subject 310 generated in S1140 is displayed on the display unit 258 as a preview image before photographing.

S1140及びS1150での処理を、S1080からS1130における処理に先んじて行い、S1150でのプレビュー画像表示中にS1080からS1130の処理を行っても良い。この場合、S1030でのレリーズスイッチ191が半押し動作からプレビュー動作がS1080からS1130での演算中に測距点302に合焦している画像をプレビュー画像で確認出来るので、撮影者はより早く、表示部258でこれから撮影しようとする構図等を確認する事が出来る。   The processing in S1140 and S1150 may be performed prior to the processing in S1080 to S1130, and the processing in S1080 to S1130 may be performed while the preview image is displayed in S1150. In this case, since the release switch 191 in S1030 can be confirmed by the preview image from the half-press operation to the preview operation during the calculation from S1080 to S1130, the photographer can A composition or the like to be photographed from now on can be confirmed on the display unit 258.

S1160では、レリーズスイッチ191が全部押し込まれたか(SW2がオンになったかどうか)の判断をボディCPU109が行う。NoならばS1050に戻り、一連の動作を繰り返す。YesならばS1170に進む。S1170では、公知の撮影動作を行う。S1180では、S1100での演算結果である主被写体エリア311に該当する画素の画像データを用いて像生成手段を動作させて結果を得る。この動作については後述するが、S1180では、S1110にて演算した、傾いた結像面での光束を用いた被写体像が得られる。   In S1160, the body CPU 109 determines whether the release switch 191 has been fully depressed (whether SW2 is turned on). If No, the process returns to S1050 and a series of operations are repeated. If Yes, the process proceeds to S1170. In S1170, a known shooting operation is performed. In S1180, the image generation unit is operated using the image data of the pixel corresponding to the main subject area 311 which is the calculation result in S1100, and the result is obtained. Although this operation will be described later, in S1180, a subject image using the light flux on the tilted image plane calculated in S1110 is obtained.

これにより、例えば、図7に示したように、主被写体エリア311に囲まれた主被写体310は、S1180での処理の結果、測距点302付近から、測距点302よりも光軸方向で図面上奥にある後輪312あたりまで、及び測距点よりも光軸方向で図面上手前にある前輪313や測距点303付近までピントの合った画像となる。   As a result, for example, as shown in FIG. 7, the main subject 310 surrounded by the main subject area 311 is closer to the optical axis direction than the distance measuring point 302 from the vicinity of the distance measuring point 302 as a result of the processing in S1180. The image is in focus up to the rear wheel 312 in the back of the drawing and to the vicinity of the front wheel 313 and the distance measuring point 303 near the front of the drawing in the optical axis direction from the distance measuring point.

S1190では、S1120での演算結果である背景320に該当する画素の画像データとS1130での演算結果である像生成位置を用いて像生成手段を動作させて背景320の結果を得る。   In S1190, the image generation unit is operated using the image data of the pixel corresponding to the background 320, which is the calculation result in S1120, and the image generation position, which is the calculation result in S1130, to obtain the result of the background 320.

これにより、背景320は、S1190での処理の結果、主被写体310に比べると「ボケた」画像となるとともに、主被写体310の像生成位置と連続性がある位置で背景320の像が生成されるので、主被写体310が不自然に浮き上がってしまうような事が防止される。   As a result, the background 320 becomes a “blurred” image as compared with the main subject 310 as a result of the processing in S1190, and an image of the background 320 is generated at a position continuous with the image generation position of the main subject 310. Therefore, it is possible to prevent the main subject 310 from floating unnaturally.

S1200では、S1180で処理した主被写体310の全域、つまり主被写体エリア311の光束が到達した画素と、S1190で処理した主被写体310以外の被写体、つまり、主被写体エリア311以外の光束が到達した画素とを合成する。これにより、図7(b)に示したように、主被写体310は全域(≒全深度)ピントが合っている画像であるにも拘らず、主被写体310の背景320はボケている画像を得る事が出来る。   In S1200, the pixels that have reached the entire area of the main subject 310 processed in S1180, that is, the light beam in the main subject area 311 and the subjects other than the main subject 310 processed in S1190, that is, pixels that have reached the light beam outside the main subject area 311. And synthesize. As a result, as shown in FIG. 7B, the background 320 of the main subject 310 is blurred even though the main subject 310 is an image in which the entire area (≈full depth) is in focus. I can do it.

S1210では、S1200で生成した画像をメモリ197もしくは不図示の記録媒体に記録するとともに、表示部258に表示する。S1220では、レリーズスイッチ191が全部押し込まれた状態(SW2がオンになった状態)が継続しているかどうかの判断をボディCPU109が行う。YesならばS1050に戻り、一連の動作を繰り返す。NoならばS1230に進む。   In S1210, the image generated in S1200 is recorded on the memory 197 or a recording medium (not shown) and displayed on the display unit 258. In S1220, the body CPU 109 determines whether or not the state where the release switch 191 is fully depressed (the state where SW2 is turned on) continues. If Yes, the process returns to S1050 to repeat a series of operations. If No, the process proceeds to S1230.

S1230では、レリーズスイッチ191が押し込まれた状態(SW1がオンになった状態)かどうかの判断をボディCPU109が行う。YesならばS1040に戻り、一連の動作を繰り返す。NoならばS1240に進む。S1240では、メインスイッチ195がOFFになったかどうかの判断をボディCPU109が行う。Noの場合はS1030に戻って一連の撮影動作を行う。S1240でYesの場合は、撮影動作を終了する。   In S1230, the body CPU 109 determines whether or not the release switch 191 is pressed (SW1 is turned on). If Yes, the process returns to S1040 to repeat a series of operations. If No, the process proceeds to S1240. In S1240, the body CPU 109 determines whether or not the main switch 195 is turned off. In the case of No, the process returns to S1030 to perform a series of shooting operations. If Yes in S1240, the shooting operation is terminated.

ここで、S1180での処理について、図6及び図7を用いて説明する。図3で説明したように、本実施例の撮影光学系は、各画素に入射する光束を特定の瞳領域に限定しているために、入射角度が既知である。この角度に沿って、像を構成する面での各画素の位置を構成する。具体的にはX1,iのように瞳領域の添え字が1のものは図6(d)において41に示すような角度で入射しているとする。以下瞳領域の添え字2,3,4,5はそれぞれ42,43,44,45に対応しているとする。 Here, the processing in S1180 will be described with reference to FIGS. As described with reference to FIG. 3, the imaging optical system of the present embodiment limits the luminous flux incident on each pixel to a specific pupil region, and thus the incident angle is known. Along this angle, the position of each pixel on the plane constituting the image is constructed. Specifically, it is assumed that a pupil region with a subscript of 1 such as X 1, i is incident at an angle as indicated by 41 in FIG. Hereinafter, it is assumed that the subscripts 2, 3, 4, and 5 of the pupil region correspond to 42, 43, 44, and 45, respectively.

図6(b)は測距点302に対応した位置、つまり、測距点302に合焦する位置に撮像素子252が存在して画像を取得した面を示している。   FIG. 6B shows a surface where the image sensor 252 is present at the position corresponding to the distance measuring point 302, that is, the position where the distance measuring point 302 is focused, and the image is acquired.

図6(b)において、X1,i、X2,i 、X3,i 、X4,i 、X5,i 、はそれぞれ瞳領域1、2、3、4、5を通過してマイクロレンズXiに入射して得られたデータを示している。すなわち、添え字のうち前半は通過する瞳領域を、後半は画素の番号を示している。また、図6(b)においても説明を明瞭にするために、データを1次元的な広がりしか持たないものとして記述している。物理的な位置との関係においては、X1,i は図3(c)の21領域から得られるデータを、X2,i は図3(c)の22領域から得られるデータを、以下添え字の3、4、5は領域23、24、25に対応していることを示している。 In FIG. 6B, X 1, i , X 2, i , X 3, i , X 4, i , X 5, i pass through the pupil regions 1, 2, 3, 4, 5 respectively and are microscopic. Data obtained by entering the lens X i is shown. That is, of the subscripts, the first half indicates the passing pupil region, and the second half indicates the pixel number. In FIG. 6B, the data is described as having only one-dimensional expansion for the sake of clarity. In relation to the physical position, X 1, i is attached with data obtained from the 21 area in FIG. 3C, and X 2, i is attached with data obtained from the 22 area in FIG. The letters 3, 4, and 5 indicate that they correspond to the areas 23, 24, and 25, respectively.

取得面での画像を生成するためには、図6(b)にあるように、マイクロレンズXiに入射したデータを加算すればよい。具体的には、Si = X1,i +X2,i +X3,i +X4,i +X5,iでXiに入射した光の角度方向の積分値を得る事が出来る。これにより通常のカメラと同様に、測距点302に合焦した被写体の像が生成される。 In order to generate an image on the acquisition surface, data incident on the microlens X i may be added as shown in FIG. Specifically, the integrated value in the angular direction of the light incident on X i can be obtained with S i = X 1, i + X 2, i + X 3, i + X 4, i + X 5, i . As a result, an image of the subject focused on the distance measuring point 302 is generated as in a normal camera.

次に、主被写体310の傾きによって測距点302よりも前ピンとなる主被写体310の部分(例えば、図7に示した測距点303に相当する位置の主被写体310の部分:バイクの前照灯が該当する)における像生成について、図6(a)を用いて説明する。主被写体310が傾いている場合、測距点302よりも前ピン側にある主被写体310の部分(例えば、図7における測距点303に相当する部分)は、ボケる。そこで、測距点302よりも前ピン側にある主被写体310の部分がボケないように、その部分については、図6(a)にあるように被写体像の生成をすれば良い。   Next, due to the inclination of the main subject 310, the portion of the main subject 310 that becomes the front pin from the distance measuring point 302 (for example, the portion of the main subject 310 at a position corresponding to the distance measuring point 303 shown in FIG. Image generation in the case of a lamp will be described with reference to FIG. When the main subject 310 is tilted, a portion of the main subject 310 that is on the front pin side of the distance measuring point 302 (for example, a portion corresponding to the distance measuring point 303 in FIG. 7) is blurred. Therefore, it is only necessary to generate a subject image as shown in FIG. 6A so that the portion of the main subject 310 on the front pin side of the distance measuring point 302 is not blurred.

図6(a)において、図6(b)同様、X1,i、X2,i 、X3,i 、X4,i 、X5,i 、はそれぞれ瞳領域1、2、3、4、5を通過してマイクロレンズXiに入射して得られたデータを示している。 6A, as in FIG. 6B, X 1, i , X 2, i , X 3, i , X 4, i , X 5, i are respectively pupil regions 1, 2, 3, 4 5 shows data obtained by passing through 5 and entering the microlens X i .

図6(a)にあるように、マイクロレンズXiに入射した光束は、測距点302よりも前ピン側にある主被写体310の部分においては、Xi-2からXi+2に分散して入射していることになる。 As shown in FIG. 6A, the light beam incident on the micro lens X i is dispersed from X i −2 to X i + 2 in the portion of the main subject 310 on the front pin side of the distance measuring point 302. Is incident.

より具体的には、X1,i-2、X2,i-1、X3,i、X4,i+1、X5,i+2に分散している。Xiに限らず前ピン側にある主被写体310の部分をボケないように像を復元するためには、入射角度に応じて像をシフトさせて加算すれば良いことが分かる。前ピン側にある主被写体310の部分での像を生成するためには、瞳領域の添え字が1のものは右に2画素シフト、瞳領域の添え字が2のものは右に1画素シフト、瞳領域の添え字が3のものはシフトなし、瞳領域の添え字が4のものは左に1画素シフト、瞳領域の添え字が5のものは左に2画素シフトすることで入射角度に応じたシフトを与える事が出来る。 More specifically, it is distributed in X1 , i-2 , X2 , i-1 , X3 , i , X4 , i + 1 , and X5 , i + 2 . In order to restore the image without blurring the portion of the main subject 310 on the front pin side, not limited to X i , it is understood that the image may be shifted and added according to the incident angle. In order to generate an image of the main subject 310 on the front pin side, one with a pupil region subscript of 1 shifts to the right by two pixels, and one with a pupil region subscript of 2 shifts to the right with one pixel. Shift, pupil area subscript 3 has no shift, pupil area subscript 4 has 1 pixel shift to the left, pupil area subscript 5 has a shift of 2 pixels to the left Shift according to the angle can be given.

その後、主被写体310の傾きに応じて、図6(a)の右斜め下方向に加算する事で前ピン側にある主被写体310の部分のデータを得る事が出来る。具体的には、Si = X1,i-2 + X2,i-1 + X3,i + X4,i+1 + X5,i+2で前ピン側にある主被写体310の部分において、Xiに入射した光の角度方向の積分値を得る事が出来る。 Thereafter, the data of the portion of the main subject 310 on the front pin side can be obtained by adding in the diagonally lower right direction of FIG. 6A according to the inclination of the main subject 310. Specifically, Si = X1 , i-2 + X2 , i-1 + X3 , i + X4 , i + 1 + X5 , i + 2 of main subject 310 on the front pin side In the portion, the integral value in the angular direction of the light incident on X i can be obtained.

上記一連の処理を、前ピン側にある主被写体310の各部分で、S1110での演算結果である主被写体310の傾きに応じて像のシフト量を変化させる事により、前ピン側にある主被写体310の部分のボケない画像が得られる。   The above-described series of processing is performed at each part of the main subject 310 on the front pin side by changing the image shift amount in accordance with the inclination of the main subject 310 as the calculation result in S1110. An image with no blur of the subject 310 is obtained.

次に、主被写体310の傾きによって測距点302よりも後ピンとなる主被写体310の部分(例えば、図7に示した測距点304に相当する位置の主被写体310の部分:ライダーのブーツの下あたりのバイクのボディが該当する)における像生成について、図6(c)を用いて説明する。   Next, due to the inclination of the main subject 310, the portion of the main subject 310 that becomes a pin behind the distance measuring point 302 (for example, the portion of the main subject 310 at a position corresponding to the distance measuring point 304 shown in FIG. 7: the rider's boot) Image generation in the lower motorcycle body will be described with reference to FIG.

主被写体310が傾いている場合、測距点302よりも後ピン側にある主被写体310の部分(例えば、図7における測距点304に相当する部分)は、ボケる。そこで、測距点302よりも後ピン側にある主被写体310の部分がボケないように、その部分については、図6(c)にあるように被写体像の生成をすれば良い。   When the main subject 310 is inclined, a portion of the main subject 310 that is on the rear pin side of the distance measuring point 302 (for example, a portion corresponding to the distance measuring point 304 in FIG. 7) is blurred. In view of this, the subject image may be generated as shown in FIG. 6C so that the portion of the main subject 310 on the rear pin side of the distance measuring point 302 is not blurred.

図6(c)から分かるように、測距点302よりも後ピン側にある主被写体310の部分においても、測距点302よりも前ピン側にある主被写体310の部分と同様に像を生成する事が出来る。取得面に対して光軸方向の位置が異なると(取得面に対して前側か後側か、という意味)、画素をシフトさせる方向を反転させるとともに、主被写体310の傾きに応じて加算する方向を反対にすれば良いだけである。   As can be seen from FIG. 6 (c), an image is also obtained at the portion of the main subject 310 on the rear pin side of the distance measuring point 302 in the same manner as the portion of the main subject 310 on the front pin side of the distance measuring point 302. Can be generated. If the position in the optical axis direction is different from the acquisition plane (meaning whether it is the front side or the rear side with respect to the acquisition plane), the direction in which the pixel is shifted is reversed and the direction to be added according to the inclination of the main subject 310 It is only necessary to reverse.

つまり、主被写体310の傾きに応じて、図6(c)の左斜め下方向に加算する事で後ピン側にある主被写体310の部分のデータを得る事が出来る。具体的には、Si = X1,i+2 + X2,i+1 + X3,i + X4,i-1 + X5,i-2で後ピン側にある主被写体310の部分において、Xiに入射した光の角度方向の積分値を得る事が出来る。 That is, the data of the portion of the main subject 310 on the rear pin side can be obtained by adding in the diagonally lower left direction of FIG. 6C according to the inclination of the main subject 310. Specifically, S i = X 1, i + 2 + X 2, i + 1 + X 3, i + X 4, i-1 + X 5, i-2 of the main subject 310 on the rear pin side In the portion, the integral value in the angular direction of the light incident on X i can be obtained.

上記一連の処理を、後ピン側にある主被写体310の各部分で、S1110での演算結果である主被写体310の傾きに応じて像のシフト量を変化させる事により、後ピン側にある主被写体310の部分のボケない画像が得られる。   The above-described series of processing is performed at each part of the main subject 310 on the rear pin side by changing the image shift amount according to the inclination of the main subject 310 as the calculation result in S1110. An image with no blur of the subject 310 is obtained.

次に、S1130での処理について、図8のサブフローを用いて説明する。S1310では、S1080にて算出した撮影範囲内(図4で被写体像258aとして表示されているエリア内の事)のデフォーカス量から、主被写体エリア311と背景320それぞれのデフォーカス量を確認する。S1320では、S1310で確認した背景320のデフォーカス量と主被写体エリア311のデフォーカス量と比較する。   Next, the processing in S1130 will be described using the subflow of FIG. In S1310, the defocus amounts of the main subject area 311 and the background 320 are confirmed from the defocus amounts within the photographing range calculated in S1080 (in the area displayed as the subject image 258a in FIG. 4). In S1320, the defocus amount of the background 320 confirmed in S1310 is compared with the defocus amount of the main subject area 311.

S1330では、S1320での比較結果から、主被写体エリア311と背景320とのデフォーカス量に連続性がある点かどうかの判定をボディCPU109が行う。連続性があるとボディCPU109が判定した場合はS1340に進み、連続性がないと判定した場合はS1370に進む。   In S1330, the body CPU 109 determines whether or not the defocus amount between the main subject area 311 and the background 320 has continuity from the comparison result in S1320. If the body CPU 109 determines that there is continuity, the process proceeds to S1340. If it is determined that there is no continuity, the process proceeds to S1370.

S1340では、S1330でボディCPU109が判定した連続性が、被写体エリア311と背景320との境界に2点以上有るかどうかの判定をボディCPU109が行う。連続性が有る境界が2点以上有る場合はS1350に進み、連続性が有る境界が1点しかない場合は、S1360に進む。   In S1340, the body CPU 109 determines whether the continuity determined by the body CPU 109 in S1330 is two or more at the boundary between the subject area 311 and the background 320. If there are two or more boundaries with continuity, the process proceeds to S1350. If there is only one boundary with continuity, the process proceeds to S1360.

S1350では、S1330で判定した結果、2点以上有る主被写体エリア311と背景320とのデフォーカス量に連続性のある境界の中から、一番手前の(撮影者に近い)境界を背景320の像生成位置の基準として選択する。例えば図7のシーンでは、タイヤの前輪313と後輪312のあたりに主被写体エリア311と背景320とのデフォーカス量が連続性のある境界となるが、この場合、S1350では撮影者に近い前輪313のあたりを背景320の像生成位置の基準として選択する事になる。   In S 1350, as a result of the determination in S 1330, the boundary closest to the photographer (closest to the photographer) is selected from the boundaries where the defocus amount between the main subject area 311 having two or more points and the background 320 is continuous. It is selected as a reference for the image generation position. For example, in the scene of FIG. 7, the defocus amount between the main subject area 311 and the background 320 becomes a continuous boundary around the front wheel 313 and the rear wheel 312 of the tire. In this case, in S1350, the front wheel close to the photographer The area around 313 is selected as a reference for the image generation position of the background 320.

S1350での処理終了後、呼び出し元(S1130)に戻る。S1360では、主被写体エリア311と背景320とのデフォーカス量に連続性のある境界が1つしかないので、その境界を背景320の像生成位置の基準として選択する。S1360での処理終了後、呼び出し元(S1130)に戻る。   After the processing in S1350 is completed, the process returns to the caller (S1130). In S 1360, since there is only one continuous boundary in the defocus amount between the main subject area 311 and the background 320, the boundary is selected as a reference for the image generation position of the background 320. After the processing in S1360 is completed, the process returns to the caller (S1130).

S1370では、S1330で主被写体エリア311と背景320とのデフォーカス量に連続性のある境界がないと判定されたので(例えば、図9に示したようなシーンの場合)、主被写体エリア311内にある測距点302を背景320の像生成位置の基準として選択する。S1370での処理終了後、呼び出し元(S1130)に戻る。   In S1370, since it is determined in S1330 that there is no continuous boundary in the defocus amount between the main subject area 311 and the background 320 (for example, in the case of a scene as shown in FIG. 9), Is selected as a reference for the image generation position of the background 320. After the processing in S1370 is completed, the process returns to the caller (S1130).

以下、図10を用いて、S1060で行われる相関演算のサブフローについて説明する。S1410は画像処理部150が有する相関計算手段の動作開始を示している。   Hereinafter, the sub-flow of the correlation calculation performed in S1060 will be described using FIG. S1410 indicates the start of the operation of the correlation calculation means included in the image processing unit 150.

S1420からS1520はループを形成している。S1420では、評価位置の数(いわゆる測距視野数)に対応して繰り返し演算を行う。測距視野数は多くなると画面全体を覆うことが可能となるが評価に時間が掛るという問題がある。撮影者の設定などにより適切に設定する。   S1420 to S1520 form a loop. In S1420, calculation is repeatedly performed in accordance with the number of evaluation positions (so-called distance measurement visual field number). When the number of distance measuring fields increases, the entire screen can be covered, but there is a problem that it takes time to evaluate. Set appropriately according to the photographer's settings.

S1430では、評価を行う評価点の数と、評価枠の大きさを設定する。ここでいう評価点の数とは、S1440で行う相関値を求める点数であり、撮影条件やレンズ102の種類などに応じて適切に設定される。また、評価点の数は像をシフトさせながら相関を求める場合のシフト量に対応しており、これは撮像装置においては焦点合わせの探索を行うピントの深さに対応している。   In S1430, the number of evaluation points to be evaluated and the size of the evaluation frame are set. The number of evaluation points here is the number of points for obtaining the correlation value performed in S1440, and is appropriately set according to the shooting conditions, the type of the lens 102, and the like. The number of evaluation points corresponds to the shift amount in the case of obtaining the correlation while shifting the image, and this corresponds to the focus depth at which the focus search is performed in the imaging apparatus.

一方、評価枠の大きさは、大きくすると局所的にはあまりパターンを有していないテクスチャであってもピントを合わせる事が可能となるが、あまりにも大きくなると距離の異なる被写体の像を同時に評価する、いわゆる遠近競合が発生してしまう。これらの問題を解決できるように評価枠の大きさを適切に設定する。   On the other hand, if the size of the evaluation frame is increased, it is possible to focus even on textures that do not have a pattern locally, but if it is too large, images of subjects with different distances can be evaluated simultaneously. So-called perspective conflict will occur. The size of the evaluation frame is set appropriately so that these problems can be solved.

S1440からS1490はループを形成している。S1440では、S1430で決定された評価数に対応した評価値を得るように繰り返し演算を行う。S1450からS1470はループを形成している。S1450では、S1430で決定された評価枠の大きさに応じた画素数の範囲で相関計算を行う。相関計算はS1460にあるように、例えばΣ|A−B|で計算すれば良い。 S1440 to S1490 form a loop. In S1440, calculation is repeatedly performed so as to obtain an evaluation value corresponding to the evaluation number determined in S1430. S1450 to S1470 form a loop. In S1450, correlation calculation is performed in the range of the number of pixels corresponding to the size of the evaluation frame determined in S1430. Correlation calculation may be performed by, for example, Σ | A i −B i | as in S1460.

ここで、Aは特定の瞳領域を通過したi番目の画素の輝度を示している。BはAとは異なる瞳領域を通過したi番目の画素の輝度を示している。例えば図3において、画素22に対応する画素のみ並べたものをA、画素24に対応する画素のみ並べたものをBとすれば良い。どの瞳領域の画素を選択するかは、基線長の長さ、瞳面のケラレ状況、等によって決定すれば良い。 Here, A i indicates the luminance of the i-th pixel that has passed through a specific pupil region. B i indicates the luminance of the i-th pixel that has passed through a pupil region different from A i . For example, in FIG. 3, it is only necessary to set A i for the pixels corresponding to the pixels 22 and B i for only the pixels corresponding to the pixels 24. Which pixel of the pupil region to select may be determined according to the length of the base line length, the vignetting situation of the pupil surface, and the like.

上記のように設定する事で、異なる瞳領域を通過した像の相関を計算出来、いわゆる位相差AFに基づく評価量を得る事が出来る。S1480では、得られた相関値を評価量として格納する。   By setting as described above, the correlation between images passing through different pupil regions can be calculated, and an evaluation amount based on so-called phase difference AF can be obtained. In S1480, the obtained correlation value is stored as an evaluation amount.

上記に示したΣ|A− B|という評価式においては、相関値が小さくなった個所が最もピント状態が良い個所に対応している。ここでは差分絶対値を加算する方法で相関計算を行ったが、最大値を加算する方法、最小値を加算する方法、差分2乗値を加算する方法など他の計算方法によって相関計算を行っても良い
S1500では、相関評価値が最良となる(前述したようにS1460の式においては相関値が小さくなった個所だが、その他の指標も併用して最良を決定しても良い)点を相関量評価に基づく最良ピント位置として格納する。この演算を各視野で行い、最終的に相関量評価に基づく最良ピント位置を得てS1520に進み、呼び出し元(S1080)に戻る。
In the evaluation formula Σ | A i −B i | shown above, the location where the correlation value is small corresponds to the location with the best focus state. Here, the correlation calculation is performed by the method of adding the difference absolute value, but the correlation calculation is performed by other calculation methods such as the method of adding the maximum value, the method of adding the minimum value, the method of adding the square difference value, and the like. In S1500, the correlation evaluation value is the best (the point where the correlation value is small in the formula of S1460, as described above, but the best may be determined using other indicators as well). Store as the best focus position based on the evaluation. This calculation is performed for each field of view, and finally the best focus position based on the correlation amount evaluation is obtained, the process proceeds to S1520, and the process returns to the caller (S1080).

次に、図11を用いて画像処理部150が有する像生成手段の動作の詳細を説明する。S1610は像生成手段の動作開始を示している。S1620では、S1650での加算のための領域のデータを初期化する(0で埋める)。この時のデータ領域の大きさはMLA20の数量あれば良く、データの諧調は元のデータの諧調と瞳分割数の積を格納できるだけあれば都合が良い。例えば元のデータが8bitで25分割の場合、13bit(>8bit+log25)あればデータの桁あふれを考慮する必要が無い。 Next, details of the operation of the image generating means included in the image processing unit 150 will be described with reference to FIG. S1610 indicates the start of the operation of the image generating means. In S1620, the area data for addition in S1650 is initialized (filled with 0). The size of the data area at this time may be the quantity of MLA 20, and the gradation of data is convenient if it can store the product of the gradation of the original data and the number of pupil divisions. For example, when the original data is 8 bits and divided into 25, if 13 bits (> 8 bits + log 2 25), it is not necessary to consider overflow of data.

S1630からS1670はループを形成している。S1630では、MLA20を構成するマイクロレンズの数に応じてループ計算が実行される。例えば、図3に示した例では、元の撮像素子の画素数÷25(瞳分割数)がマイクロレンズの数となる。S1640からS1660はループを形成している。S1640では、瞳分割数に応じた数だけループ計算が実行される。例えば、図3に示した例では、5X5=25個に分割されていたので、25個のそれぞれの瞳位置からの光束がS1650で加算される。シフト量が画素の整数倍でない場合は、S1650において、適切に内分されながら加算される(重なっている面積に応じて適切に加算すれば良い)。   S1630 to S1670 form a loop. In S1630, loop calculation is executed in accordance with the number of microlenses constituting the MLA 20. For example, in the example illustrated in FIG. 3, the number of microlens is the number of pixels of the original image sensor ÷ 25 (number of pupil divisions). S1640 to S1660 form a loop. In S1640, the loop calculation is executed by the number corresponding to the number of pupil divisions. For example, in the example shown in FIG. 3, since it is divided into 5 × 5 = 25, the luminous fluxes from the 25 pupil positions are added in S1650. If the shift amount is not an integral multiple of the pixel, in S1650, addition is performed while being appropriately divided (addition may be appropriately performed according to the overlapping area).

S1680において、呼び出し元のS1140(もしくはS1180,1190)に戻る。   In S1680, the process returns to the calling source S1140 (or S1180, 1190).

以上、説明したように、撮影画面の奥行き方向に傾いた特定の被写体がいる場合でも、それを主被写体と撮影者が選択した場合は、主被写体の全域が合焦し、かつ、主被写体以外の背景は自然にボケた撮影画像が取得可能な撮像装置を提供する事が出来る。   As described above, even when there is a specific subject tilted in the depth direction of the shooting screen, when the main subject and the photographer select it, the entire area of the main subject is in focus and other than the main subject Therefore, it is possible to provide an imaging apparatus capable of acquiring a naturally blurred photographed image.

以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。   As mentioned above, although preferable embodiment of this invention was described, this invention is not limited to these embodiment, A various deformation | transformation and change are possible within the range of the summary.

例えば、本発明では画像処理部150が有する相関計算手段によりピント位置を求めているが、これに限定せず、カメラ100が公知のサブミラーと測距手段を有し、サブミラーからの撮影光学系の光束を受光して位相差検出方式によってピント位置を求める方式でも、本発明と同様の効果を得る事が出来る。   For example, in the present invention, the focus position is obtained by the correlation calculation unit included in the image processing unit 150. However, the present invention is not limited to this, and the camera 100 includes a known submirror and a distance measuring unit, and the imaging optical system from the submirror is used. The same effect as that of the present invention can be obtained by a method of receiving a light beam and obtaining a focus position by a phase difference detection method.

なお、本発明ではカメラ100とレンズ102が着脱可能であるとしたが、これに限定せず、カメラ100とレンズ102が一体化しているカメラでも上記で説明したのと同様な効果が得られる事は言うまでもない。   In the present invention, the camera 100 and the lens 102 are detachable. However, the present invention is not limited to this, and the same effect as described above can be obtained even with a camera in which the camera 100 and the lens 102 are integrated. Needless to say.

20 マイクロレンズアレイ(MLA)、100 カメラ、102 レンズ、
109 ボディCPU、120 AFレンズ、192 選択スイッチ、
193 決定スイッチ、196 モードスイッチ、252 撮像素子、258 表示部、
301,302,303 測距点、310 主被写体、311 主被写体エリア、
320 背景
20 micro lens array (MLA), 100 cameras, 102 lenses,
109 body CPU, 120 AF lens, 192 selection switch,
193 determination switch, 196 mode switch, 252 image sensor, 258 display unit,
301, 302, 303 Distance measuring points, 310 Main subject, 311 Main subject area,
320 Background

Claims (4)

撮影レンズを含む撮影光学系と、
前記撮影レンズを介して入射される被写体の光学像を光電変換して画像信号を出力する撮像素子と、を含む撮像装置において、
前記撮像素子上の各画素に入射する前記被写体の光学像の光束を前記撮影レンズの特定の瞳領域からの光束のみに制限する瞳分割手段と、
異なる瞳領域を通過した像の相関を計算する相関計算手段と、
前記相関計算手段の結果から主被写体を判定する第一の判定手段と、
前記第一の判定手段から、主被写体以外の被写体の光学像を背景と判定する第二の判定手段と、
前記第二の判定手段により判定された背景のデフォーカスマップを作成すると共に、前記第一の判定手段により判定された主被写体のデフォーカスマップを生成し、該主被写体の全域が深度内となる結像面の傾きを演算する演算手段と、
前記画像信号から被写体像を生成する像生成位置を前記演算手段の結果に基づいて設定する像生成位置設定手段と、
前記撮像素子上の各画素への入射角度を決定する入射角決定手段と、
前記像生成位置設定手段で設定された像生成位置と前記入射角決定手段の情報とに基づいて、前記像生成位置に対応する前記画像信号のシフト量を前記瞳領域ごとに決定して前記画像信号をシフトし、その電気信号を加算する像生成手段と、
前記第二の判定手段により判定された背景の像生成位置を前記第一の判定手段により判定された主被写体の像生成位置と連続性がある位置に決定する背景生成位置決定手段と、を備えたことを特徴とする撮像装置。
A taking optical system including a taking lens;
In an imaging device including an imaging device that photoelectrically converts an optical image of a subject incident through the photographing lens and outputs an image signal,
Pupil dividing means for restricting a light beam of the optical image of the subject incident on each pixel on the image sensor to only a light beam from a specific pupil region of the photographing lens;
Correlation calculation means for calculating the correlation of images passing through different pupil regions;
First determination means for determining a main subject from the result of the correlation calculation means;
Second determination means for determining an optical image of a subject other than the main subject as a background from the first determination means;
A defocus map of the background determined by the second determination unit is created, and a defocus map of the main subject determined by the first determination unit is generated, and the entire area of the main subject is within the depth. Computing means for computing the tilt of the imaging plane;
Image generation position setting means for setting an image generation position for generating a subject image from the image signal based on a result of the calculation means;
Incident angle determining means for determining an incident angle to each pixel on the image sensor;
Based on the image generation position set by the image generation position setting means and the information of the incident angle determination means, the shift amount of the image signal corresponding to the image generation position is determined for each pupil region and the image Image generating means for shifting the signals and adding the electrical signals;
Background generation position determination means for determining the background image generation position determined by the second determination means to be a position that is continuous with the image generation position of the main subject determined by the first determination means. An imaging apparatus characterized by that.
前記第一の判定手段は撮影画面内で所定範囲内のデフォーカス量が分布しているエリアが一番大きいところを主被写体として判定することを特徴とする請求項1に記載の撮像装置。 The imaging apparatus according to claim 1, wherein the first determination unit determines, as a main subject, a place where an area in which a defocus amount within a predetermined range is distributed in a shooting screen is the largest. 前記背景生成位置決定手段は、前記第二の判定手段により判定された背景のデフォーカス量と前記第一の判定手段により判定された主被写体のデフォーカス量に連続性がある位置が複数ある場合は、光軸方向で該撮像装置に近い位置を背景の像生成位置に決定することを特徴とする請求項1に記載の撮像装置。 The background generation position determination unit has a plurality of positions where the background defocus amount determined by the second determination unit and the defocus amount of the main subject determined by the first determination unit are continuous. The image pickup apparatus according to claim 1, wherein a position close to the image pickup apparatus in the optical axis direction is determined as a background image generation position. 前記背景生成位置決定手段は、前記第二の判定手段により判定された背景のデフォーカス量と前記第一の判定手段により判定された主被写体のデフォーカス量に連続性がない場合は、前期相関計算手段によって算出された該主被写体のピント位置を背景の像生成位置に決定することを特徴とする請求項1に記載の撮像装置。 The background generation position determination unit determines whether the background defocus amount determined by the second determination unit and the defocus amount of the main subject determined by the first determination unit are not continuous. The imaging apparatus according to claim 1, wherein the focus position of the main subject calculated by the calculation unit is determined as a background image generation position.
JP2015128185A 2015-06-26 2015-06-26 Imaging device Pending JP2017009942A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015128185A JP2017009942A (en) 2015-06-26 2015-06-26 Imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015128185A JP2017009942A (en) 2015-06-26 2015-06-26 Imaging device

Publications (1)

Publication Number Publication Date
JP2017009942A true JP2017009942A (en) 2017-01-12

Family

ID=57761535

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015128185A Pending JP2017009942A (en) 2015-06-26 2015-06-26 Imaging device

Country Status (1)

Country Link
JP (1) JP2017009942A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024024375A1 (en) * 2022-07-27 2024-02-01 ソニーグループ株式会社 Imaging device, imaging method, and imaging program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024024375A1 (en) * 2022-07-27 2024-02-01 ソニーグループ株式会社 Imaging device, imaging method, and imaging program

Similar Documents

Publication Publication Date Title
US9279955B2 (en) Image pickup apparatus, control method thereof, and program
US8471952B2 (en) Image pickup apparatus
JP5054583B2 (en) Imaging device
JP5914192B2 (en) Imaging apparatus and control method thereof
JP2008209762A (en) Photoelectric detector of image forming optical system, focus detector, and imaging apparatus
JP6220148B2 (en) Imaging apparatus and control method thereof
JP6518452B2 (en) Imaging apparatus and imaging method
JP5130178B2 (en) Focal length detection apparatus, imaging apparatus, imaging method, and camera
JP6702777B2 (en) Imaging device, imaging method, and program
JP6041871B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2008104069A (en) Digital camera and program of digital camera
JP2013080093A (en) Imaging apparatus
JP5832353B2 (en) Imaging device
JP2013161065A (en) Imaging device
JP6198395B2 (en) Imaging apparatus and control method thereof
JP2017009942A (en) Imaging device
JP6336316B2 (en) Imaging apparatus, control method, and program
JP2011248376A (en) Imaging apparatus, focusing method and program
JP5415208B2 (en) Imaging device
JP2017011628A (en) Imaging device
JP2016219888A (en) Image processing apparatus, image processing method, and imaging device
US10382740B2 (en) Image processing apparatus, method for controlling the same, and image capture apparatus
JP2008187332A (en) Image tracking device and image pickup device
JP2014056595A (en) Image composition device and program
JP2005064749A (en) Camera