JP6391304B2 - Imaging apparatus, control method, and program - Google Patents
Imaging apparatus, control method, and program Download PDFInfo
- Publication number
- JP6391304B2 JP6391304B2 JP2014117118A JP2014117118A JP6391304B2 JP 6391304 B2 JP6391304 B2 JP 6391304B2 JP 2014117118 A JP2014117118 A JP 2014117118A JP 2014117118 A JP2014117118 A JP 2014117118A JP 6391304 B2 JP6391304 B2 JP 6391304B2
- Authority
- JP
- Japan
- Prior art keywords
- imaging
- subject
- image
- depth
- lens
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Focusing (AREA)
- Automatic Focus Adjustment (AREA)
- Adjustment Of Camera Lenses (AREA)
- Studio Devices (AREA)
Description
本発明は、フォーカスレンズのレンズ位置を異ならせて連続して被写体を撮像する撮像装置と、その制御方法およびプログラムに関する。 The present invention relates to an imaging apparatus that continuously images a subject by changing the lens position of a focus lens, and a control method and program thereof.
従来、フォーカスレンズを含む撮影レンズを備え、当該フォーカスレンズのレンズ位置を異ならせて連続して被写体を撮像する所謂フォーカスブラケット撮影をおこなう撮像装置がある。 2. Description of the Related Art Conventionally, there is an image pickup apparatus that includes a photographing lens including a focus lens and performs so-called focus bracket photographing in which a subject is continuously photographed by changing the lens position of the focus lens.
特許文献1では、カメラから被写体までの被写体距離と絞り値に基づいて、ズームレンズのピント位置の刻み間隔と撮影枚数を自動的に設定してフォーカスブラケット撮影をおこなうカメラについて提案されている。 Patent Document 1 proposes a camera that performs focus bracket shooting by automatically setting the step interval and the number of shots of the zoom lens based on the subject distance from the camera to the subject and the aperture value.
ここで、特許文献1に記載の技術は、絞り値が開放状態に近い(被写界深度が浅い)場合は、複数の被写体に合焦した状態の画像を取得するために、連続して被写体を撮像する回数が増加してしまう。一方、画像を一時的に記録するRAM(Random Access Memory)などの記憶素子の容量によって、被写体を連続して撮像できる回数は限られてしまう。 Here, in the technique described in Patent Document 1, when the aperture value is close to the open state (the depth of field is shallow), in order to acquire an image in a state of focusing on a plurality of subjects, The number of times of imaging will increase. On the other hand, the number of times that a subject can be continuously captured is limited by the capacity of a storage element such as a RAM (Random Access Memory) that temporarily records an image.
しかしながら、特許文献1では、これらの記憶素子の容量については言及されていないため、フォーカスブラケット撮影によって連続して被写体を撮像する回数が増加すると、意図した数の画像を取得できない。この場合、意図した数の画像を取得できないので、複数の被写体に合焦した状態の画像を取得できない。 However, since Patent Document 1 does not mention the capacities of these storage elements, the intended number of images cannot be acquired if the number of times the subject is continuously imaged by focus bracket imaging is increased. In this case, since the intended number of images cannot be acquired, it is not possible to acquire images that are in focus on a plurality of subjects.
本発明の目的は、限られた撮像回数であっても、複数の被写体に対して合焦した状態の画像を取得することである。 An object of the present invention is to acquire an image in a focused state with respect to a plurality of subjects even with a limited number of times of imaging.
上記目的を達成するための本発明に係る撮像装置は、フォーカスレンズを含む撮像レンズを備え、前記フォーカスレンズの光軸方向でのレンズ位置を異ならせて連続して撮像して複数の画像を取得する撮像手段と、撮像対象であるそれぞれの被写体の光軸方向での被写体距離を検出する検出手段と、前記フォーカスレンズの光軸方向でのレンズ位置を異ならせて連続して撮像する撮像回数、およびそれぞれの撮像の際の被写界深度を設定する設定手段と、を有し、前記設定手段は、前記検出手段によって検出した前記被写体距離と設定した撮像回数に基づいて、前記複数の画像のそれぞれを取得する際の前記フォーカスレンズの光軸方向のレンズ位置と被写界深度を設定するものであって、前記撮像手段が前記被写体距離に応じた位置に合焦させて撮像する際の被写界深度を、前記撮像手段が前記被写体距離に応じた位置とは異なる位置に合焦させて撮像する際の被写界深度よりも、浅く設定することを特徴とする。 In order to achieve the above object, an imaging apparatus according to the present invention includes an imaging lens including a focus lens, and obtains a plurality of images by continuously capturing images with different lens positions in the optical axis direction of the focus lens. Imaging means, detection means for detecting the subject distance in the optical axis direction of each subject to be imaged, and the number of times of imaging for continuous imaging with different lens positions in the optical axis direction of the focus lens, And setting means for setting the depth of field at the time of each imaging, the setting means, based on the subject distance detected by the detection means and the set number of imaging, the plurality of images The lens position in the optical axis direction of the focus lens and the depth of field at the time of acquiring each are set, and the imaging unit focuses on a position corresponding to the subject distance. The depth of field when allowed by imaging, and wherein the imaging means than the depth of field of imaging by focusing on a position different from the position corresponding to the object distance is set shallower To do.
本発明によれば、限られた撮像回数であっても、複数の被写体に対して合焦した状態の画像を取得することである。 According to the present invention, even when the number of times of imaging is limited, an image in a focused state with respect to a plurality of subjects is acquired.
(第1実施形態)
本発明に係る第1実施形態としての撮像装置であるデジタルカメラ(以下、単にカメラと称す)100の基本構成について図1を参照して説明する。図1は、本発明を実施した撮像装置の第1実施形態であるカメラ100の構成を説明するブロック図である。
(First embodiment)
A basic configuration of a digital camera (hereinafter simply referred to as a camera) 100 that is an imaging apparatus according to a first embodiment of the present invention will be described with reference to FIG. FIG. 1 is a block diagram illustrating the configuration of a camera 100 that is a first embodiment of an imaging apparatus embodying the present invention.
撮像レンズ群101は、ズームレンズ102、フォーカスレンズ103、防振レンズ104、絞り105から構成される撮像レンズ群である。ズームレンズ102は焦点距離を調節することで光学的に画角を変更する撮像レンズである。 The imaging lens group 101 is an imaging lens group including a zoom lens 102, a focus lens 103, an anti-vibration lens 104, and a diaphragm 105. The zoom lens 102 is an imaging lens that optically changes the angle of view by adjusting the focal length.
フォーカスレンズ103は焦点位置を調節する撮像レンズである。本実施形態では、フォーカスレンズ103のレンズ位置を光軸方向に動作させることによって、焦点位置を変更することができる。 The focus lens 103 is an imaging lens that adjusts the focal position. In the present embodiment, the focal position can be changed by operating the lens position of the focus lens 103 in the optical axis direction.
防振レンズ104は手ぶれなどの種々の要因によって生じる像振れを補正する撮像レンズである。絞り105は、後述する撮像素子106に入射する光量を調節する光量調節部材である。本実施形態では、絞り105に機械的なシャッタ(不図示)が設けられており、当該シャッタの駆動を制御することで、撮像素子106に光を露光する時間(露光時間)を制御することができる。なお、複数の撮像レンズが設けられていない場合は、上述した各撮像レンズが有する、ズームやフォーカス、防振などの機能を一つの撮像レンズによって実現するような構成であってもよい。 The anti-vibration lens 104 is an imaging lens that corrects image blur caused by various factors such as camera shake. The diaphragm 105 is a light amount adjustment member that adjusts the amount of light incident on the image sensor 106 described later. In this embodiment, the diaphragm 105 is provided with a mechanical shutter (not shown), and the time (exposure time) for exposing the image sensor 106 to light can be controlled by controlling the driving of the shutter. it can. In the case where a plurality of imaging lenses are not provided, a configuration in which functions such as zooming, focusing, and image stabilization included in each imaging lens described above are realized by one imaging lens may be used.
撮像素子106は、電荷を蓄積することで画像を生成することが可能なCCDやCMOSなどの固体撮像素子からなる電荷蓄積型の撮像素子であって、2次元的に撮像用の画素が配列されている。撮像レンズ群101を透過した被写体の光学像が撮像素子106に結像すると、当該被写体の光学像に応じた電気信号(画像データ)が出力される。 The image sensor 106 is a charge storage type image sensor made up of a solid-state image sensor such as a CCD or CMOS capable of generating an image by accumulating charges, and pixels for imaging are arranged two-dimensionally. ing. When the optical image of the subject that has passed through the imaging lens group 101 is formed on the image sensor 106, an electrical signal (image data) corresponding to the optical image of the subject is output.
画像処理部107は、撮像素子106から出力された画像データに対して画素補間処理や色変換処理や、当該画像データに基づいて被写体の輝度値(輝度情報)を取得する画像処理手段である。なお、画像処理部107には不図示のAFE(Analog Front End)が設けられており、画像データに対するゲイン量の調整や、レンズの収差補正やサンプリングをおこなうことができる。また、画像処理部107に出入力される画像データは、適宜、デジタル画像データに変換されるものとする。 The image processing unit 107 is an image processing unit that acquires pixel luminance values (luminance information) of a subject based on pixel interpolation processing, color conversion processing, and image data output from the image sensor 106. The image processing unit 107 is provided with an AFE (Analog Front End) (not shown), which can adjust the gain amount for the image data, correct the aberration of the lens, and perform sampling. In addition, image data input / output to / from the image processing unit 107 is appropriately converted into digital image data.
メモリ108は、電気的に消去や記憶が可能な記憶手段であり、例えば、フラッシュメモリ等に代表されるEEPROMなどである。メモリ108には、本実施形態において使用される種々のデータが格納されている。例えば、カメラ100において実行されるプログラムや動作用の定数、種々の露出条件、カメラ100内の処理で使用する算出式などがメモリ108に予め格納されている。なお、カメラ100において実行されるプログラムとは、後述する図2に示すフローと同様の動作を指示するためのプログラムである。また、メモリ108には、RAM(Random Access Memory)などの記録素子によって構成された画像データの記録領域を有している。当該RAMは、所定枚数の静止画や所定時間の動画、音声データを記録することができる記憶容量を備え、取得されたデジタル画像データの記録ができる。 The memory 108 is a storage means that can be electrically erased and stored, and is, for example, an EEPROM represented by a flash memory or the like. The memory 108 stores various data used in the present embodiment. For example, a program executed in the camera 100, operation constants, various exposure conditions, calculation formulas used for processing in the camera 100, and the like are stored in the memory 108 in advance. The program executed in the camera 100 is a program for instructing an operation similar to the flow shown in FIG. Further, the memory 108 has a recording area for image data constituted by a recording element such as a RAM (Random Access Memory). The RAM has a storage capacity capable of recording a predetermined number of still images, a moving image of predetermined time, and audio data, and can record the acquired digital image data.
さらに、メモリ108は、画像表示用メモリ(ビデオメモリ)、カメラ100の各部の作業領域や、後述する記録メモリ111の記録用バッファとしても使用される。 Further, the memory 108 is also used as an image display memory (video memory), a work area of each part of the camera 100, and a recording buffer of the recording memory 111 described later.
表示部109は、TFT型LCD(薄膜トランジスタ駆動型液晶表示器)などで構成され、表示用にアナログ画像データに変換された画像データを表示する表示手段である。本実施形態では、当該画像データを表示部109に逐次表示することで、被写体を撮像した画像データのライブビュー表示をおこなうことができる。なお、電子ビューファインダ(不図示)を用いてライブビュー表示をおこなうような構成であってもよい。 The display unit 109 is configured by a TFT LCD (Thin Film Transistor Driven Liquid Crystal Display) or the like, and is a display unit that displays image data converted into analog image data for display. In the present embodiment, by sequentially displaying the image data on the display unit 109, it is possible to perform live view display of image data obtained by imaging the subject. Note that a configuration in which live view display is performed using an electronic viewfinder (not shown) may be used.
圧縮伸長処理部110は、メモリ108に記録されている画像データを、画像フォーマットに応じて圧縮伸長する処理部である。記録メモリ111は、圧縮伸長処理部110によって圧縮伸長された画像データの記録が可能なメモリーカードやハードディスクなどの不揮発性の記録媒体である。なお、本実施形態では記録メモリ111として、カメラ100に対して挿抜可能なものを採用するが、DVD−RWディスク等の光学ディスクやハードディスク等の磁気ディスクを採用するような構成であってもよい。また、記録メモリ111を予めカメラ100に内蔵するような構成であってもよい。 The compression / decompression processing unit 110 is a processing unit that compresses / decompresses image data recorded in the memory 108 according to an image format. The recording memory 111 is a non-volatile recording medium such as a memory card or a hard disk capable of recording image data compressed and expanded by the compression / decompression processing unit 110. In the present embodiment, a recording memory 111 that can be inserted into and removed from the camera 100 is used. However, an optical disk such as a DVD-RW disk or a magnetic disk such as a hard disk may be used. . Further, the recording memory 111 may be built in the camera 100 in advance.
絞り駆動部112は、設定された絞り値および露光時間に基づいて絞り105およびシャッタ(不図示)を駆動する駆動手段である。なお、絞り値および露光時間は、画像処理部107によって取得された被写体の輝度情報(輝度値)に基づいて、後述するシステム制御部120によって設定される。すなわち、本実施形態における自動露出(AE)制御は、システム制御部120からの指示に応じて、絞り駆動部112が絞り105やシャッタを駆動することでおこなわれる。なお、AE制御としては、画像処理部107においてゲイン量を調整することでもおこなわれる。 The aperture driving unit 112 is a driving unit that drives the aperture 105 and a shutter (not shown) based on the set aperture value and exposure time. The aperture value and the exposure time are set by the system control unit 120 described later based on the subject luminance information (luminance value) acquired by the image processing unit 107. That is, automatic exposure (AE) control in the present embodiment is performed by driving the diaphragm 105 and the shutter by the diaphragm driving unit 112 in accordance with an instruction from the system control unit 120. Note that the AE control is also performed by adjusting the gain amount in the image processing unit 107.
防振レンズ駆動部113は、角速度センサ130やジャイロセンサ131の情報に基づいてカメラ100に加わる振れの量を演算し、その振れを打ち消すように防振レンズ104を駆動する駆動制御手段である。なお、カメラ100に加わる振れの量の演算は、システム制御部120によって演算するような構成であってもよい。 The anti-vibration lens driving unit 113 is a drive control unit that calculates the amount of shake applied to the camera 100 based on information from the angular velocity sensor 130 and the gyro sensor 131 and drives the anti-vibration lens 104 so as to cancel the shake. Note that the calculation of the amount of shake applied to the camera 100 may be calculated by the system control unit 120.
フォーカスレンズ駆動部114はフォーカスレンズ103を駆動するレンズ駆動手段である。本実施形態では、後述するコントラスト評価値取得部121によって取得する焦点検出用の評価値(コントラスト評価値)に基づいて、フォーカスレンズ駆動部114がフォーカスレンズ103の駆動を制御する。このフォーカスレンズ駆動部114によってフォーカスレンズ103を駆動することによって、フォーカスレンズ103のレンズ位置を異ならせて連続して被写体を撮像することができる。すなわち、後述するフォーカスブラケット撮影が可能となる。なお、位相差方式や他の方式のフォーカス制御と組み合わせてフォーカスレンズ103の駆動制御をおこなうような構成であってもよい。 The focus lens driving unit 114 is a lens driving unit that drives the focus lens 103. In the present embodiment, the focus lens driving unit 114 controls driving of the focus lens 103 based on an evaluation value (contrast evaluation value) for focus detection acquired by a contrast evaluation value acquiring unit 121 described later. By driving the focus lens 103 by the focus lens driving unit 114, the subject can be continuously imaged by changing the lens position of the focus lens 103. That is, focus bracket shooting described later can be performed. Note that the driving control of the focus lens 103 may be performed in combination with phase control or other types of focus control.
ズームレンズ駆動部115は、ユーザによるズーム操作指示に従ってズームレンズ102を駆動する駆動手段である。 The zoom lens driving unit 115 is a driving unit that drives the zoom lens 102 in accordance with a zoom operation instruction from the user.
操作部116は、カメラ100に対して、ユーザが各種の指示や設定を行うためのスイッチ、ボタン、ダイヤルなどの操作部材によって構成される入力デバイス群であって、レリーズスイッチ117、メニュー操作ボタン118を含む。 The operation unit 116 is an input device group including operation members such as switches, buttons, and dials for the user to perform various instructions and settings for the camera 100. The operation unit 116 includes a release switch 117 and a menu operation button 118. including.
ユーザの操作によって、レリーズスイッチ117がSW1状態(例えば、半押し状態)になると、測光演算や露出制御、フォーカス制御などの撮像前準備が指示される。また、レリーズスイッチ117がSW2状態(例えば、全押状態)になると被写体の本撮像が指示される。 When the release switch 117 is in the SW1 state (for example, half-pressed state) by a user operation, preparations before imaging such as photometric calculation, exposure control, and focus control are instructed. In addition, when the release switch 117 is in the SW2 state (for example, fully pressed state), the main imaging of the subject is instructed.
ユーザは、メニュー操作ボタン(モード設定手段)118を操作することによって、被写体を撮像する際の撮像モードや動作モード、被写体を撮像して取得する画像の画質やサイズなどを設定することができる。また、ユーザは、メニュー操作ボタン118を操作することによって、フォーカスブラケット撮影をおこなう際の被写体の撮像回数を設定することもできる。 By operating the menu operation button (mode setting means) 118, the user can set an imaging mode and an operation mode when imaging a subject, an image quality and a size of an image acquired by imaging the subject, and the like. In addition, the user can set the number of times of imaging of the subject when performing the focus bracket shooting by operating the menu operation button 118.
なお、上述した撮像モードとしては、フォーカスブラケット撮影をおこなうフォーカスブラケットモードの他のモードを設定することもできる。また、カメラ100の動作モードとして、通常モード(第1のモード)と、当該通常モードよりも電力の消費が少ない省電力モード(第2のモード)などを設定することができる。 Note that, as the imaging mode described above, another mode of the focus bracket mode in which focus bracket shooting is performed can be set. As the operation mode of the camera 100, a normal mode (first mode), a power saving mode (second mode) that consumes less power than the normal mode, and the like can be set.
例えば、通常モードでは、カメラ100の状態が、電源をオンした状態から約1分間の無操作を検知すると待機状態に変更されるのに対して、省電力モードでは、電源をオンした状態から約10秒間の無操作を検知すると待機状態に変更される。また、省電力モードでは、カメラ100の内部処理によって生じる負荷が通常モードよりも常に小さくなるように設定されている。 For example, in the normal mode, the state of the camera 100 is changed to the standby state when no operation is detected for about 1 minute from the state where the power is turned on, whereas in the power saving mode, the state is changed from the state where the power is turned on. When no operation for 10 seconds is detected, the standby state is changed. In the power saving mode, the load caused by the internal processing of the camera 100 is always set to be smaller than that in the normal mode.
システム制御部(CPU)120は、カメラ100の全体的な動作を統括的に制御する制御手段である。CPU120は、ユーザの操作指示に応じてカメラ100の各部に動作を指示することでカメラ100全体を制御することができる。なお、CPU120は、メモリ108に格納されているプログラムを実行し、当該プログラムの処理に応じたカメラ100の動作や処理を制御することもできる。例えば、撮像素子106の制御や露出制御、フォーカス制御、ズーム制御などをおこなうためのプログラムを実行する。 The system control unit (CPU) 120 is a control unit that comprehensively controls the overall operation of the camera 100. The CPU 120 can control the entire camera 100 by instructing each unit of the camera 100 to perform an operation in accordance with a user operation instruction. Note that the CPU 120 can execute a program stored in the memory 108 and control the operation and processing of the camera 100 according to the processing of the program. For example, a program for performing control of the image sensor 106, exposure control, focus control, zoom control, and the like is executed.
また、CPU120には、特徴検出部122、コントラスト評価値取得部121、被写体検出部123、フォーカスブラケット制御部124、合成部125が設けられている。以下、この詳細を説明する。 Further, the CPU 120 includes a feature detection unit 122, a contrast evaluation value acquisition unit 121, a subject detection unit 123, a focus bracket control unit 124, and a synthesis unit 125. The details will be described below.
コントラスト評価値取得部(評価値取得手段)121は、画像のコントラスト情報に基づいて、焦点検出用の評価値(以下、コントラスト評価値と称す)を取得するための取得部である。具体的には、コントラスト評価値取得部121は、フォーカスレンズ103を駆動しながら画像データを所定の間隔で取得し、当該取得した画像に基づいて一画面中におけるコントラス評価値の推移に関する情報を取得する。 A contrast evaluation value acquisition unit (evaluation value acquisition means) 121 is an acquisition unit for acquiring an evaluation value for focus detection (hereinafter referred to as a contrast evaluation value) based on image contrast information. Specifically, the contrast evaluation value acquisition unit 121 acquires image data at predetermined intervals while driving the focus lens 103, and acquires information on the transition of the contrast evaluation value in one screen based on the acquired image. To do.
特徴検出部122は、取得した画像を複数のブロックに分割し、ブロックごとに顔や人物に関わる特徴量を抽出する。そして、特徴検出部122は、抽出した特徴量と予めメモリ108に格納されている顔、人体検出用の特徴量との差異が一定の閾値を超える領域を、人物が存在する領域として判定する。この判定を、分割したブロックのサイズ、配置、配置角度の組み合わせを様々に変更しながら繰り返せば、一画面に含まれる人物を検出することができる。 The feature detection unit 122 divides the acquired image into a plurality of blocks, and extracts feature amounts related to a face and a person for each block. Then, the feature detection unit 122 determines an area where the difference between the extracted feature quantity and the face and human body detection feature quantity stored in advance in the memory 108 exceeds a certain threshold as an area where a person exists. If this determination is repeated while changing the combinations of the size, arrangement, and arrangement angle of the divided blocks, a person included in one screen can be detected.
なお、特徴検出部122は、上述した人物検出以外にも、画像の色情報輝度情報や先に取得したコントラスト評価値などを用いて、人物以外の被写体を検出することもできる。また、特徴検出部122は、検出した被写体の動きベクトルを算出することにより、被写体の移動量や移動速度を算出することもできる。 In addition to the person detection described above, the feature detection unit 122 can also detect a subject other than a person using the color information luminance information of the image, the contrast evaluation value acquired in advance, or the like. The feature detection unit 122 can also calculate the movement amount and movement speed of the subject by calculating the motion vector of the detected subject.
被写体検出部123は、コントラスト評価値取得部121で取得したコントラスト評価値に基づいて、被写体までの距離(以下、被写体距離と称す)に関する情報を検出する距離検出手段である。この際、コントラスト評価値の他に、特徴検出部122で検出した被写体に関する情報を用いて、被写体距離に関する情報を検出するような構成であってもよい。 The subject detection unit 123 is a distance detection unit that detects information related to the distance to the subject (hereinafter referred to as subject distance) based on the contrast evaluation value acquired by the contrast evaluation value acquisition unit 121. At this time, in addition to the contrast evaluation value, information related to the subject distance may be detected using information related to the subject detected by the feature detection unit 122.
また、被写体検出部123は、先に算出した被写体距離に関する情報と特徴検出部122で検出した被写体に関する情報に基づいて、フォーカスブラケット撮影をおこなう領域(以下、被写体領域)を算出する。本実施形態では、この被写体領域の全領域に合焦した状態の画像を取得するために、当該被写体距離に合わせてフォーカスブラケット撮影をおこなう。 In addition, the subject detection unit 123 calculates a region (hereinafter referred to as a subject region) where focus bracket shooting is performed based on the information on the subject distance calculated previously and the information on the subject detected by the feature detection unit 122. In the present embodiment, in order to acquire an image focused on the entire subject area, focus bracket shooting is performed in accordance with the subject distance.
なお、本実施形態では、撮像素子106から被写体までの距離に関する情報を被写体距離とするが、これに限定されるものではない。例えば、撮像レンズ群101から被写体までの距離に関する情報を被写体距離とするような構成であってもよい。また、測距センサ用いた位相差方式など、上述した方法以外の公知の方法で被写体距離を検出するような構成であってもよい。 In the present embodiment, information on the distance from the image sensor 106 to the subject is the subject distance, but the present invention is not limited to this. For example, the configuration may be such that information on the distance from the imaging lens group 101 to the subject is the subject distance. In addition, the subject distance may be detected by a known method other than the method described above, such as a phase difference method using a distance measuring sensor.
フォーカスブラケット制御部124は、取得する画像のデータ量とメモリ108の容量に基づいて、フォーカスブラケット撮影における、一度の連続した撮像で被写体を撮像する撮像回数を設定する。撮像回数の設定方法についての詳細は後述する。 The focus bracket control unit 124 sets the number of times the subject is imaged by one continuous imaging in the focus bracket imaging based on the amount of image data to be acquired and the capacity of the memory 108. Details of the method for setting the number of times of imaging will be described later.
また、フォーカスブラケット制御部124は、コントラスト評価値や被写体距離(または被写体領域)や撮像回数などの情報に基づいて、フォーカスブラケット撮影をおこなう際の撮影条件を設定する。撮影条件の設定方法についての詳細は後述する。 In addition, the focus bracket control unit 124 sets shooting conditions for performing focus bracket shooting based on information such as a contrast evaluation value, a subject distance (or subject region), and the number of times of imaging. Details of the method for setting the shooting conditions will be described later.
本実施形態では、設定した撮像回数と撮像条件に関する情報に基づき、フォーカスレンズ103や絞り105およびシャッタを駆動することで、複数の被写体に対して合焦した状態の画像をそれぞれ取得することができる。 In this embodiment, by driving the focus lens 103, the diaphragm 105, and the shutter based on the set information regarding the number of times of imaging and the imaging conditions, it is possible to acquire images in a focused state with respect to a plurality of subjects. .
合成部125は、取得した複数の画像を合成し、被写体領域の全領域に合焦した状態の画像データ(以下、全焦点画像と称す)を生成する合成手段である。具体的に、合成部125は、フォーカスブラケット処理によって取得した複数の画像をメモリ108から読み出す。次に、合成部125は、コントラスト評価値取得部121で取得した各画像のコントラスト評価値を比較し、各画像の画素単位で最も鮮明な画素部分を抽出する。そして、抽出した各画像の画素部分を合成することで全焦点画像を生成する。以上説明した、被写体距離の検出から全焦点画像の取得までの一連の処理を、本実施形態ではフォーカスブラケット処理と称す。以上が、カメラ100の基本的な構成である。 The synthesizing unit 125 is a synthesizing unit that synthesizes a plurality of acquired images and generates image data (hereinafter, referred to as an omnifocal image) in a state where the whole area of the subject area is focused. Specifically, the composition unit 125 reads a plurality of images acquired by the focus bracket process from the memory 108. Next, the synthesizing unit 125 compares the contrast evaluation values of the images acquired by the contrast evaluation value acquiring unit 121, and extracts the clearest pixel portion for each pixel of each image. Then, an omnifocal image is generated by combining the pixel portions of the extracted images. A series of processing from detection of the subject distance to acquisition of the omnifocal image described above is referred to as focus bracket processing in the present embodiment. The above is the basic configuration of the camera 100.
以下、上述したフォーカスブラケット処理の詳細について図2を参照して説明する。図2は、本発明を実施した撮像装置の第1実施形態であるカメラ100のフォーカスブラケット処理を説明するフローチャートである。なお、本実施形態では、ユーザがメニュー操作ボタン118を操作することによって、事前にフォーカスブラケットモードが設定されている場合について説明する。また、以下に説明する各ステップで取得する情報は、適宜、メモリ108への記録と、メモリ108からの読み出しがおこなわれるものとする。 Hereinafter, the details of the above-described focus bracket process will be described with reference to FIG. FIG. 2 is a flowchart illustrating the focus bracket process of the camera 100 that is the first embodiment of the imaging apparatus embodying the present invention. In the present embodiment, a case where the focus bracket mode is set in advance by the user operating the menu operation button 118 will be described. In addition, information acquired in each step described below is appropriately recorded in the memory 108 and read out from the memory 108.
ユーザによってレリーズスイッチ117がSW1状態にされると、フォーカスブラケット処理が開始され、CPU120は撮像素子106を用いてスルー画像を取得する。当該スルー画像は画像処理部107において上述した種々の処理を施した後にメモリ108に一時的に記録される。 When the release switch 117 is set to the SW1 state by the user, the focus bracketing process is started, and the CPU 120 acquires a through image using the image sensor 106. The through image is temporarily recorded in the memory 108 after the image processing unit 107 performs the various processes described above.
また、画像処理部107は、当該スルー画像に基づいて測光演算をおこない、スルー画像の輝度値(輝度情報)を取得する。本実施形態では、取得したスルー画像(一画面分)を複数のブロックに分割し、これらのブロックごとに平均輝度値を算出する。そして、全ブロックの平均輝度値を積分して代表輝度値を算出し、当該代表輝度値を被写体の輝度値として以降の処理に用いる。なお、測光演算の方法としてはこれに限定されるものではなく、その他の公知の方法によって輝度値を算出するような構成であってもよい。 Further, the image processing unit 107 performs a photometric calculation based on the through image, and acquires a luminance value (luminance information) of the through image. In the present embodiment, the obtained through image (for one screen) is divided into a plurality of blocks, and an average luminance value is calculated for each of these blocks. Then, the average luminance value of all the blocks is integrated to calculate a representative luminance value, and the representative luminance value is used as the luminance value of the subject for subsequent processing. Note that the photometric calculation method is not limited to this, and the luminance value may be calculated by another known method.
ステップS101でコントラスト評価値取得部121は、スルー画像に基づいて、一画面中のコントラスト評価値を取得する。また、特徴検出部122は、スルー画像に基づいて、一画面中に存在する被写体を検出する。 In step S101, the contrast evaluation value acquisition unit 121 acquires the contrast evaluation value in one screen based on the through image. Further, the feature detection unit 122 detects a subject existing in one screen based on the through image.
なお、人物のみをフォーカスブラケット撮影の撮像対象とするような場合は、特徴検出部122によって、一画面中の人物領域を特定し、当該人物領域に基づいてフォーカスブラケット撮影をおこなう。 When only a person is an imaging target for focus bracket shooting, the feature detection unit 122 identifies a person area in one screen and performs focus bracket shooting based on the person area.
次に、ステップS102で被写体検出部123は、先に取得したコントラスト評価値に基づいて被写体距離に関する情報を検出する。そして、ステップS103で被写体検出部123は、被写体距離に関する情報と特徴検出部122で検出した被写体に関する情報に基づいて被写体領域を設定する。 Next, in step S102, the subject detection unit 123 detects information related to the subject distance based on the previously acquired contrast evaluation value. In step S <b> 103, the subject detection unit 123 sets a subject region based on information on the subject distance and information on the subject detected by the feature detection unit 122.
次に、ステップS104でフォーカスブラケット制御部(第1の設定手段)124は、取得する画像のデータ量とメモリ108の容量に関する情報に基づいて撮像回数を設定する。 Next, in step S <b> 104, the focus bracket control unit (first setting unit) 124 sets the number of times of imaging based on information on the amount of acquired image data and the capacity of the memory 108.
ここで、撮像回数の設定方法について詳細を説明する。一般的に、取得する画像のデータ量(例えば、サイズや画質など)に応じて、メモリ(記憶手段)108のバッファメモリに一時的な記憶ができる画像の数には限度がある。例えば、本実施形態のバッファメモリであるメモリ108のRAMの容量が1メガバイト(1024バイト)であって、取得する画像1枚あたりのデータ量が約220キロバイトの場合を仮定する。この場合、フォーカスブラケット処理における一度の連続した撮像が可能な回数(以下、撮像可能回数と称す)は4回となる(RAMの容量を画像一つあたりデータ容量で割ると1024÷220≒4.65となるので)。 Here, the details of the method of setting the number of times of imaging will be described. In general, there is a limit to the number of images that can be temporarily stored in the buffer memory of the memory (storage means) 108 in accordance with the amount of data of the image to be acquired (for example, size and image quality). For example, it is assumed that the capacity of the RAM of the memory 108 which is the buffer memory of this embodiment is 1 megabyte (1024 bytes) and the amount of data to be acquired is about 220 kilobytes. In this case, the number of times that continuous imaging can be performed once in the focus bracket process (hereinafter referred to as the number of imaging possible) is 4 (1024 ÷ 220≈4.4 when the RAM capacity is divided by the data capacity per image). 65)
そこで、フォーカスブラケット(データ量検出手段)制御部124は、取得する画像のデータ量に関する情報と、メモリ108のRAMの容量を検出する。そして、フォーカスブラケット制御部(算出手段)124は、検出した取得する画像のデータ量に関する情報とメモリ108のRAMの容量に基づいて撮像可能回数を算出する。 Therefore, the focus bracket (data amount detection means) control unit 124 detects information regarding the data amount of the acquired image and the capacity of the RAM of the memory 108. Then, the focus bracket control unit (calculation unit) 124 calculates the number of images that can be captured based on the detected information regarding the data amount of the acquired image and the capacity of the RAM of the memory 108.
本実施形態で、フォーカスブラケット制御部124は、当該撮像可能回数以下の回数を、フォーカスブラケット処理における一度の連続した撮像回数として設定する。なお、以下の説明では、撮像可能回数が4回であって、撮像回数を4回に設定する場合を想定する。 In the present embodiment, the focus bracket control unit 124 sets the number of times that is less than or equal to the number of times that imaging is possible as the number of consecutive imaging times in the focus bracket process. In the following description, it is assumed that the number of images that can be captured is four and the number of imaging is set to four.
なお、画像のデータ量に関する情報は、取得する画像のサイズ(記録画素数)と画質に基づいてフォーカスブラケット制御部(算出部)124が検出する。たとえば、取得する画像の画質は、通常の画質(例示的にノーマル画質と称す)よりも高い画質(ファイン画質)が設定されている場合に、画像のデータ量が大きくなる。 Note that the information regarding the data amount of the image is detected by the focus bracket control unit (calculation unit) 124 based on the size of the image to be acquired (number of recording pixels) and the image quality. For example, when the image quality to be acquired is set to a higher image quality (fine image quality) than the normal image quality (exemplarily referred to as normal image quality), the data amount of the image increases.
また、取得する画像のサイズが、通常のサイズ(例示的にミドルサイズと称す)よりも大きいサイズ(例示的にラージサイズと称す)が設定されている場合に、画像のデータ量が大きくなる。 In addition, when the size of an image to be acquired is set to a size (exemplarily referred to as a large size) larger than a normal size (exemplarily referred to as a middle size), the data amount of the image increases.
以上説明したように、本実施形態では、上述した画像の画質とサイズに基づいて画像のデータ量を検出する。なお、画像のデータ量に関する情報は、上述した画像のサイズや画質以外のパラメータに基づいて検出するような構成であってもよい。 As described above, in the present embodiment, the data amount of the image is detected based on the image quality and size of the image described above. The information related to the data amount of the image may be detected based on the parameters other than the image size and image quality described above.
また、本実施形態では、撮像可能回数をフォーカスブラケット処理における撮像回数として設定するような構成であるが、少なくとも、撮像可能回数以下の数を撮像回数として設定するような構成であればよい。 Further, in the present embodiment, the number of images that can be captured is set as the number of images that can be captured in the focus bracket process, but at least a number that is less than or equal to the number of images that can be captured may be set.
以下、図3を参照して、フォーカスブラケット撮影時の絞り値について説明する。図3は、本発明を実施した撮像装置の第1実施形態であるカメラ100のフォーカスブラケット処理における撮像回数と被写界深度の関係を例示的に説明する図である。なお、同一の絞り値であっても、被写体距離に応じて被写界深度は変化するため、図3の横軸は対数に換算した被写体距離を示している。 Hereinafter, the aperture value at the time of focus bracket shooting will be described with reference to FIG. FIG. 3 is a diagram for exemplarily explaining the relationship between the number of times of imaging and the depth of field in the focus bracket process of the camera 100 which is the first embodiment of the imaging apparatus embodying the present invention. Note that even with the same aperture value, since the depth of field changes according to the subject distance, the horizontal axis in FIG. 3 indicates the subject distance converted to logarithm.
図3(a)は、撮像対象とする被写体として、画面中(画角内)に人物1、人物2、木が存在する場合の、コントラスト評価値と被写体距離との関係を例示的に説明した図である。それぞれの被写体距離は、人物1が約0.5mの位置、人物2が約3mの位置、木が約50mの位置に存在しており、被写体距離L1は、カメラ100から最も近い被写体である人物1の被写体距離を示している。また、L2は、カメラ100から最も遠い被写体である木の被写体距離を示している。 FIG. 3A exemplarily illustrates the relationship between the contrast evaluation value and the subject distance when the subject 1, the person 2, and the tree are present in the screen (within the angle of view) as the subject to be imaged. FIG. Each subject distance exists at a position where the person 1 is about 0.5 m, a person 2 is about 3 m, and a tree is about 50 m. The subject distance L1 is the person who is the closest subject from the camera 100. 1 shows the subject distance. L2 indicates the object distance of the tree that is the object farthest from the camera 100.
本実施形態では、人物1から木までの領域を、前述した被写体領域Dとして設定する。そして、被写体領域Dの全域に合焦するようにフォーカスレンズ103のレンズ位置を変更してフォーカスブラケット撮影をおこない、取得した画像を合成することで全焦点画像を生成する。 In the present embodiment, the area from the person 1 to the tree is set as the subject area D described above. Then, focus bracket shooting is performed by changing the lens position of the focus lens 103 so that the entire area of the subject region D is in focus, and an omnifocal image is generated by combining the acquired images.
ここで、被写体領域Dに合わせてフォーカスブラケット撮影をおこなう場合は、先に設定されている撮像回数と被写体領域Dに基づいて、絞り値を設定する。以下、この詳細について図4を参照して説明する。図4は、被写界深度と画像の解像度との関係を例示的に説明した図であって、図4(a)は、小絞り側の絞り値としてF10を設定した場合を示している。また、図4(b)は、開放側の絞り値としてF3.5を設定した場合を示している。さらに、図4において、フォーカスレンズの焦点310と、撮像素子が位置する面311は、図4(a)と図4(b)でそれぞれ同じ位置に存在し、図4(a)、(b)の右図はそれぞれの絞り値で取得した画像を例示している。 Here, when focus bracket shooting is performed in accordance with the subject area D, the aperture value is set based on the previously set number of times of imaging and the subject area D. The details will be described below with reference to FIG. FIG. 4 exemplarily illustrates the relationship between the depth of field and the resolution of the image. FIG. 4A illustrates a case where F10 is set as the aperture value on the small aperture side. FIG. 4B shows a case where F3.5 is set as the aperture value on the open side. Furthermore, in FIG. 4, the focal point 310 of the focus lens and the surface 311 on which the image sensor is located are present at the same positions in FIGS. 4 (a) and 4 (b), and FIGS. 4 (a) and 4 (b). The right figure shows an example of an image acquired at each aperture value.
一般的に、開放側の絞り値を設定して被写体を撮像した場合は、被写界深度が浅く解像度の高い画像が取得される。また、小絞り側の絞り値を設定して被写体を撮像した場合は、被写界深度が深く解像度が低い画像が取得される。 Generally, when a subject is imaged with an aperture value on the open side set, an image with a shallow depth of field and a high resolution is acquired. Also, when the subject is imaged with the aperture value on the small aperture side set, an image with a deep depth of field and a low resolution is acquired.
例えば、図4に図示するように、絞り値F10と絞り値F3.5のどちらも、錯乱円径(312a、312b)が撮像素子の許容錯乱円径313よりも小さいため、被写体に合焦した状態の画像317が取得できる。 For example, as shown in FIG. 4, both the aperture value F10 and the aperture value F3.5 are focused on the subject because the circle of confusion (312a, 312b) is smaller than the allowable circle of confusion 313 of the image sensor. A state image 317 can be acquired.
また、図4(a)、(b)に図示するように、同一の被写体距離において、絞り値F10は絞り値F3.5より焦点深度が深くなる(316a>316b)。この焦点深度を被写体側に換算して置き換えたものが被写界深度となるので、同一の被写体距離において、絞り値F10は絞り値F3.5より被写界深度が深くなる。したがって、絞り値F10の場合は、絞り値F3.5の場合よりも、1度の撮像で広い範囲に合焦させることができる。 As shown in FIGS. 4A and 4B, the aperture value F10 has a greater depth of focus than the aperture value F3.5 at the same subject distance (316a> 316b). Since the depth of field is obtained by converting the focal depth to the subject side, the aperture value F10 is deeper than the aperture value F3.5 at the same subject distance. Therefore, in the case of the aperture value F10, it is possible to focus on a wider range with one imaging than in the case of the aperture value F3.5.
この場合、被写体側では1回の撮像で取得できる画像の被写界深度が深くなるので、同一の被写体領域に対してフォーカスブラケット撮影をおこなう場合に、絞り値F10の方が絞り値F3.5よりも、撮像回数を減らすことができる。 In this case, since the depth of field of the image that can be acquired by one imaging is deep on the subject side, the aperture value F10 is the aperture value F3.5 when performing the focus bracket photographing on the same subject region. As a result, the number of imaging can be reduced.
しかしながら、絞り値F10の場合は、絞り値F3.5の場合よりも、絞り105の絞り径が小さいので、光の回折現象の影響により、取得した画像の解像度が低くなってしまう(図4(a)、(b)の右図を参照)。この場合、取得した画像同士を合成して生成した全焦点画像の品質は低下してしまう。すなわち、同一の被写体領域に対してフォーカスブラケット撮影をおこなう場合に、絞り値F3.5の方が絞り値F10よりも、品質の高い画像を取得することができる。 However, in the case of the aperture value F10, the aperture diameter of the aperture 105 is smaller than in the case of the aperture value F3.5, so that the resolution of the acquired image is lowered due to the influence of the light diffraction phenomenon (FIG. 4 ( (Refer to the right figure of a) and (b)). In this case, the quality of the omnifocal image generated by combining the acquired images is deteriorated. That is, when focus bracket shooting is performed on the same subject area, an image with a higher aperture value F3.5 than the aperture value F10 can be acquired.
例えば、比較的開放側の絞り値かつ少ない撮像回数が設定されている場合、被写体領域の大きさによっては、設定された撮像回数で被写体領域の全域に合焦した状態の画像を取得できない場合がある。この場合、被写体領域の全域に合焦させた状態の全焦点画像を生成することができない。 For example, when a relatively wide aperture value and a small number of imaging are set, depending on the size of the subject area, it may not be possible to acquire an image that is focused on the entire subject area with the set number of imaging times. is there. In this case, it is not possible to generate an omnifocal image that is focused on the entire subject area.
そこで、本実施形態では、撮像対象とする被写体の被写体距離に関する情報と撮像回数に応じて絞り値を設定することで、限られた撮像回数であっても、取得する画像の品質が低下することを抑制しつつ、複数の被写体に対して合焦した状態の画像を取得する。 Therefore, in this embodiment, by setting the aperture value according to the information regarding the subject distance of the subject to be imaged and the number of times of imaging, the quality of the acquired image is reduced even if the number of times of imaging is limited. In this way, an image focused on a plurality of subjects is acquired.
図2に戻り、ステップS105でフォーカスブラケット制御部(第2の設定手段)124は、先に設定された撮像回数に基づいて、フォーカスブラケット処理における絞り値Fを算出する。まず、先に求めた撮像枚数をn、被写体領域をDとすると、被写界深度Kは式(1)を用いて、 Returning to FIG. 2, in step S <b> 105, the focus bracket control unit (second setting unit) 124 calculates an aperture value F in the focus bracket process based on the previously set number of times of imaging. First, assuming that the number of images to be obtained is n and the subject area is D, the depth of field K is calculated using Equation (1):
を満たす条件であればよい。 It is sufficient if the condition is satisfied.
被写界深度Kは、前方被写界深度をKf、後方被写界深度をKrとして式(2)を用いて、
K=Kf+Kr ・・・(2)
を満たせばよい。前方被写界深度Kf、後方被写界深度Krは、許容錯乱円をδ、被写体距離をL、フォーカスレンズ103の焦点距離をfとすると、式(3)〜(4)を用いて、
Depth of field K is calculated using equation (2) where Kf is the depth of front and Kr is the depth of field behind.
K = Kf + Kr (2)
Should be satisfied. The forward depth of field Kf and the backward depth of field Kr are expressed by using equations (3) to (4), where δ is the allowable circle of confusion, L is the subject distance, and f is the focal length of the focus lens 103.
として算出できる。そして、式(2)に式(3)及び式(4)を代入して、絞り値Fを算出する。 Can be calculated as Then, the aperture value F is calculated by substituting the equations (3) and (4) into the equation (2).
なお、同一の絞り値の場合、カメラ100から近いほど被写界深度は浅くなるので、式(3)〜(4)で用いる被写体距離Lは、カメラ100から最も近い被写体に対応したものを用いる。本実施形態では、図3(a)に図示する人物1に対応した被写体距離L1を用いる。この構成によって、設定された撮像回数と被写体領域Dに基づいて設定できる、最も小さい絞り値を算出することができる。 In the case of the same aperture value, the closer to the camera 100, the shallower the depth of field, so the subject distance L used in equations (3) to (4) corresponds to the subject closest to the camera 100. . In the present embodiment, a subject distance L1 corresponding to the person 1 illustrated in FIG. With this configuration, the smallest aperture value that can be set based on the set number of times of imaging and the subject area D can be calculated.
例えば、被写体距離や被写体領域、輝度値が同一の条件下であって、撮像回数が多い方から順に20回(第2の回数)、10回(第1の回数)、5回(第3の回数)に、それぞれ設定した場合を想定する。この場合、上述した式(1)〜(4)によれば、撮像回数が10回(第1の回数)の場合は、撮像回数が20回(第2の回数)の場合に設定される絞り値よりも小絞り側の絞り値が設定される。また、撮像回数が10回(第1の回数)の場合は、撮像回数が5回(第3の回数)の場合よりも開放側の絞り値を設定する。 For example, the subject distance, the subject area, and the luminance value are the same, and the number of times of imaging is 20 times (second number), 10 times (first number), 5 times (third number) in descending order. The number of times is assumed to be set respectively. In this case, according to the above formulas (1) to (4), when the number of times of imaging is 10 (first number), the aperture set when the number of times of imaging is 20 (second number). An aperture value on the smaller aperture side than the value is set. Further, when the number of times of imaging is 10 (first number), the aperture value on the open side is set more than when the number of times of imaging is 5 times (third number).
次にステップS106でフォーカスブラケット制御部124は、先に算出した撮像回数と被写体領域Dに関する情報に基づいて、フォーカスブラケット処理におけるフォーカスレンズ103のレンズ位置(以下、フォーカス位置と称す)Pnを設定する。 In step S106, the focus bracket control unit 124 sets a lens position (hereinafter referred to as a focus position) Pn of the focus lens 103 in the focus bracket process based on the previously calculated number of times of imaging and information on the subject area D. .
本実施形態では、先に設定された撮像回数に応じて設定できる最も小さい絞り値が設定されるため、当該絞り値と被写体距離とに応じた被写界深度の深さに基づいてフォーカス位置Pnの位置を決定することができる。 In the present embodiment, since the smallest aperture value that can be set according to the previously set number of imaging is set, the focus position Pn is based on the depth of field according to the aperture value and the subject distance. Can be determined.
具体的にフォーカスブラケット制御部124は、先に算出された絞り値と撮像回数に基づき、取得した複数の画像の被写界深度の範囲で被写体領域Dの全域をカバーできるような位置をフォーカス位置Pnとして設定する。すなわち、複数の画像の少なくとも一つの被写界深度内に被写体が含まれるようにフォーカス位置Pnを設定する。 Specifically, the focus bracket control unit 124 determines a position at which the entire area of the subject area D can be covered within the range of the depth of field of the plurality of acquired images based on the previously calculated aperture value and the number of imaging. Set as Pn. That is, the focus position Pn is set so that the subject is included within at least one depth of field of the plurality of images.
例えば、図3(b)に図示するように、4回の撮像をおこなうフォーカスブラケット処理では、設定された絞り値で4回の撮像をおこなう際の被写界深度の何れかに、人物1、人物2、木が含まれるようにフォーカス位置P1〜P4を設定する。図3(b)は、図3(a)の被写体領域Dに対応したフォーカス位置Pnを例示的に説明する図である。 For example, as illustrated in FIG. 3B, in the focus bracketing process in which imaging is performed four times, the person 1, any one of the depths of field when the imaging is performed four times with the set aperture value, The focus positions P1 to P4 are set so that the person 2 and the tree are included. FIG. 3B is a diagram for exemplarily explaining the focus position Pn corresponding to the subject region D in FIG.
図2に戻り、ステップS107でCPU120は、先に算出した絞り値Fに基づいて、絞り駆動部112を介して絞り105を駆動する。そして、ステップS108でCPU120は、レリーズスイッチ117がSW2状態にされたか否かを判定する。ステップS117の処理は、レリーズスイッチ117がSW2状態となるまで繰り返される。 Returning to FIG. 2, in step S <b> 107, the CPU 120 drives the aperture 105 via the aperture drive unit 112 based on the previously calculated aperture value F. In step S108, the CPU 120 determines whether the release switch 117 is in the SW2 state. The process of step S117 is repeated until the release switch 117 is in the SW2 state.
次に、ステップS109でフォーカスブラケット制御部124は、先に設定されたフォーカス位置に基づいて、順次被写体を撮像し、取得した画像をメモリ108にそれぞれ記録する。 Next, in step S109, the focus bracket control unit 124 sequentially captures the subject based on the previously set focus position, and records the acquired images in the memory 108, respectively.
次に、ステップS110で合成部(合成手段)125は、メモリ108から先に取得した複数の画像を読み出し、当該複数の画像の画素単位で最も鮮明な画素部分を抽出する。そして、合成部125は、抽出した各画像の画素部分を合成することで、複数枚の画像データから複数の被写体に合焦した状態の全焦点画像を生成し、メモリ108に当該全焦点画像を記録し、フォーカスブラケット処理を終了する。なお、生成した全焦点画像は、表示部109にレビュー表示するような構成でもよい。 Next, in step S110, the synthesizing unit (synthesizing unit) 125 reads the plurality of images acquired previously from the memory 108, and extracts the clearest pixel portion in pixel units of the plurality of images. The synthesizing unit 125 generates an omnifocal image in which a plurality of subjects are focused from a plurality of pieces of image data by synthesizing the pixel portions of the extracted images, and the omnifocal image is stored in the memory 108. Record and finish the focus bracketing process. The generated omnifocal image may be displayed on the display unit 109 for review.
以上説明したように、本実施形態のカメラ100は、被写体距離と撮像回数に基づいてフォーカスブラケット処理で用いる絞り値を設定するため、設定した撮像回数で、被写体領域に含まれる被写体に合焦した状態の画像を取得することができる。 As described above, the camera 100 according to the present embodiment sets the aperture value used in the focus bracket process based on the subject distance and the number of times of imaging. Therefore, the camera 100 is focused on the subject included in the subject area with the set number of times of imaging. An image of the state can be acquired.
この際、取得する画像のデータ量とメモリ108の容量とに応じて撮像回数として設定するため、一度の連続した撮像で設定できる絞り値のうち、できるだけ小さな絞り値を設定することができる。本実施形態のカメラ100は、この構成によって、一度の連続した撮像によって、品質の低下を抑制しつつ、被写体領域の全域に合焦した全焦点画像を生成することができる複数の画像を取得することができる。したがって、本実施形態のカメラ100は、限られた撮像回数であっても、複数の被写体に対して合焦した状態の画像を取得することができる。 At this time, since the number of times of imaging is set according to the data amount of the image to be acquired and the capacity of the memory 108, an aperture value as small as possible can be set among aperture values that can be set by one continuous imaging. With this configuration, the camera 100 according to the present embodiment acquires a plurality of images that can generate an omnifocal image focused on the entire area of the subject region while suppressing deterioration in quality by one continuous imaging. be able to. Therefore, the camera 100 according to the present embodiment can acquire images in focus on a plurality of subjects even with a limited number of imaging times.
なお、本実施形態において、フォーカスブラケット処理の撮像可能回数は、取得する画像のデータ量とメモリ108の容量とに基づいて設定するような構成であるが、これに限定されるものではない。例えば、設定されている動作モードに基づいて撮像可能回数を設定するような構成であってもよい。この場合、カメラ100の動作モードが省電力モードである場合は、カメラ100の動作モードが通常モードである場合よりも撮像可能回数が少なくなる。 In the present embodiment, the number of times that the focus bracketing process can be performed is set based on the amount of image data to be acquired and the capacity of the memory 108, but is not limited thereto. For example, the configuration may be such that the number of possible imaging is set based on the set operation mode. In this case, when the operation mode of the camera 100 is the power saving mode, the number of images that can be imaged is smaller than when the operation mode of the camera 100 is the normal mode.
また、本実施形態では、カメラ100に設けられた合成部125によって全焦点画像を取得するような構成であるが、これ限定されるものではない。例えば、カメラ100で、全焦点画像を生成するための複数の画像を取得し、当該複数の画像の合成をカメラ100の外部に設けられた装置(不図示)で実行するような構成であってもよい。 In the present embodiment, the omnifocal image is acquired by the combining unit 125 provided in the camera 100, but the configuration is not limited thereto. For example, the camera 100 is configured to acquire a plurality of images for generating an omnifocal image and to combine the plurality of images with an apparatus (not shown) provided outside the camera 100. Also good.
また、本実施形態では全焦点画像を生成するためにフォーカスブラケット撮影をおこなう場合について説明したが、これに限定されるものではない。例えば、全焦点画像を生成することを目的とせずにフォーカスブラケット撮影をおこなうような構成であってもよい。 Further, in the present embodiment, the case where the focus bracket photographing is performed in order to generate the omnifocal image has been described, but the present invention is not limited to this. For example, the configuration may be such that focus bracket shooting is performed without the purpose of generating an omnifocal image.
また、本実施形態では、フォーカスブラケット処理に用いる絞り値を、前述した式(1)〜(4)に基づいて算出するような構成であったが、これに限定されるものではない。例えば、撮像可能回数と被写体距離領域に基づいて絞り値を算出できるテーブルデータをメモリ108に予め格納しておき、当該テーブルデータに基づいて絞り値を算出するような構成であってもよい。この他、撮像回数と被写体距離に関する情報に基づいて、被写体領域の全域で合焦した状態の全焦点画像を生成することができる絞り値の算出方法であれば、どの様な方法で絞り値を算出してもよい。 In the present embodiment, the aperture value used for the focus bracket process is calculated based on the above-described equations (1) to (4). However, the present invention is not limited to this. For example, a configuration may be adopted in which table data that can calculate the aperture value based on the number of times that the image can be captured and the subject distance area is stored in the memory 108 in advance, and the aperture value is calculated based on the table data. In addition, the aperture value can be calculated by any method as long as the aperture value calculation method can generate an omnifocal image that is focused on the entire area of the subject area based on information on the number of times of imaging and the subject distance. It may be calculated.
(第2実施形態)
前述した実施形態では、被写体距離に基づいて被写体領域を算出し、当該被写体領域の全域に合焦した状態の複数の画像を取得する場合について説明した。本実施形態では、撮像する被写体間の距離が離れている場合に、被写体が存在する領域を撮像する際と被写体が存在しない領域を撮像する際の絞り値をそれぞれ変更するデジタルカメラ(以下、単にカメラと称す)100について図5〜7を参照して説明する。
(Second Embodiment)
In the above-described embodiment, a case has been described in which a subject area is calculated based on the subject distance, and a plurality of images that are in focus on the entire subject area are acquired. In this embodiment, when the distance between subjects to be imaged is large, a digital camera (hereinafter simply referred to as “aperture value”) that changes the aperture value when capturing an area where the subject exists and when capturing an area where the subject does not exist is described. The camera 100 will be described with reference to FIGS.
なお、カメラ100の構成について、前述した第1実施形態と同様のものは説明を省略し、前述した第1実施形態と異なる構成についてのみ説明する。また、メモリ108に後述する図6に示すフローと同様の動作を指示するためのプログラムが予め格納されているものとする。 In addition, about the structure of the camera 100, the thing similar to 1st Embodiment mentioned above is abbreviate | omitted, and only a different structure from 1st Embodiment mentioned above is demonstrated. Further, it is assumed that a program for instructing an operation similar to the flow shown in FIG.
本実施形態のコントラスト評価値取得部121は、一画面中におけるコントラス評価値の推移に関する情報を取得した後に、当該コントラス評価値が予め設定されておる所定の閾値よりも大きいか否かを判定する。 The contrast evaluation value acquisition unit 121 of the present embodiment determines whether or not the contrast evaluation value is greater than a predetermined threshold value after acquiring information on the transition of the contrast evaluation value in one screen. .
そして、被写体検出部123は、一画面中において、コントラスト評価値が閾値よりも大きいと判定された位置に被写体が存在すると判定する。その後、被写体検出部(距離検出手段)123は、検出した被写体に基づく被写体距離に関する情報を検出する。なお、特徴検出部122によって被写体の特徴を検出し、当該検出結果に基づいて、撮像する被写体を検出するような構成であってもよい。 Then, the subject detection unit 123 determines that the subject exists at a position where the contrast evaluation value is determined to be larger than the threshold value in one screen. Thereafter, the subject detection unit (distance detection means) 123 detects information related to the subject distance based on the detected subject. Note that the feature detection unit 122 may detect the feature of the subject and detect the subject to be imaged based on the detection result.
図5は、本発明を実施した撮像装置の第2実施形態であるカメラ100のフォーカスブラケット処理で撮像する被写体と撮影条件との関係を例示的に説明する図であって、カメラ100から遠ざかる方向に人物1、2が順に存在する場合を説明している。図5において、被写体距離L3は人物3に対応する被写体距離であって、被写体距離L4は人物4に対応する被写体距離を示している。以降の説明では、検出された撮像可能回数が3回であって、人物3と人物4との被写体間の距離は十分に距離が離れている場合を想定する。 FIG. 5 is a diagram for exemplarily explaining the relationship between the subject to be imaged by the focus bracket process of the camera 100 which is the second embodiment of the imaging apparatus embodying the present invention and the imaging condition, and the direction away from the camera 100. The case where the persons 1 and 2 exist in order is described. In FIG. 5, a subject distance L3 is a subject distance corresponding to the person 3, and a subject distance L4 indicates a subject distance corresponding to the person 4. In the following description, it is assumed that the detected number of possible images is 3 and the distance between the subjects of the person 3 and the person 4 is sufficiently long.
図5に図示するように、人物3と人物4との距離が十分に離れて位置している場合、人物3から人物4までの領域を同じ絞り値で撮像すると、被写体が存在しない領域に対して無駄な撮像が行われてしまう。特に、検出した被写体の数が多い、または撮像可能回数が少ない場合は、できるだけ無駄な撮像が行われることを抑制して、被写体に合焦した画像を取得することが望ましい。 As shown in FIG. 5, when the person 3 and the person 4 are sufficiently separated from each other, if the area from the person 3 to the person 4 is imaged with the same aperture value, the area where the subject does not exist is captured. And wasteful imaging is performed. In particular, when the number of detected subjects is large or the number of images that can be captured is small, it is desirable to suppress the useless imaging as much as possible and acquire an image focused on the subject.
そこで、本実施形態では、一画面中に複数の被写体が存在する場合であって被写体間の距離が十分に離れている場合は、被写体が存在しない領域の絞り値を、被写体が存在する領域の絞り値よりも小絞り側に設定する。 Therefore, in this embodiment, when there are a plurality of subjects in one screen and the distance between the subjects is sufficiently large, the aperture value of the region where the subject does not exist is set as the aperture value of the region where the subject exists. Set to a smaller aperture than the aperture value.
例えば、図5に図示するように、人物3と人物4との間であって、被写体が存在しない領域を撮像する際の絞り値は、人物3および人物4を撮像する歳の絞り値よりも小絞り側のものを設定する。この構成によって、前述した第1実施形態よりも撮像回数を抑制することができる。以下この詳細について図6を参照して説明する。 For example, as illustrated in FIG. 5, the aperture value for imaging an area between the person 3 and the person 4 where no subject exists is larger than the aperture value for the age at which the person 3 and the person 4 are imaged. Set the small aperture. With this configuration, it is possible to suppress the number of times of imaging compared to the first embodiment described above. The details will be described below with reference to FIG.
図6は、本発明を実施した撮像装置の第2実施形態であるカメラ100のフォーカスブラケット処理を説明するフローチャートである。なお、本実施形態では、ユーザがメニュー操作ボタン118を操作することによって、事前にフォーカスブラケットモードが設定されている場合について説明する。また、以下に説明する各ステップで取得する情報は、適宜、メモリ108への記録と、メモリ108からの読み出しがおこなわれるものとする。 FIG. 6 is a flowchart for explaining the focus bracketing process of the camera 100 which is the second embodiment of the imaging apparatus embodying the present invention. In the present embodiment, a case where the focus bracket mode is set in advance by the user operating the menu operation button 118 will be described. In addition, information acquired in each step described below is appropriately recorded in the memory 108 and read out from the memory 108.
ユーザによってレリーズスイッチ117がSW1状態にされると、フォーカスブラケット処理が開始され、CPU120は撮像素子106を用いてスルー画像の取得と記録をおこない、画像処理部107は当該スルー画像の輝度値(輝度情報)を取得する。 When the user sets the release switch 117 to the SW1 state, the focus bracketing process is started, the CPU 120 acquires and records a through image using the image sensor 106, and the image processing unit 107 detects the brightness value (brightness of the through image). Information).
ステップS201でコントラスト評価値取得部(評価値取得手段)121は、スルー画像に基づいて、一画面中のコントラスト評価値を取得する。また、特徴検出部122は、スルー画像に基づいて、一画面中に存在する被写体を検出する。 In step S201, the contrast evaluation value acquisition unit (evaluation value acquisition means) 121 acquires a contrast evaluation value in one screen based on the through image. Further, the feature detection unit 122 detects a subject existing in one screen based on the through image.
次に、ステップS202で被写体検出部(距離情報検出手段)123は、先に取得したコントラスト評価値と特徴検出部122からの検出結果に応じて被写体距離に関する情報を検出する。 Next, in step S <b> 202, the subject detection unit (distance information detection unit) 123 detects information related to the subject distance according to the contrast evaluation value acquired previously and the detection result from the feature detection unit 122.
次に、ステップS203でフォーカスブラケット制御部(算出手段)124は、取得する画像のデータ量と、メモリ108の容量に関する情報に基づいて撮像可能回数Nmaxを算出する。撮像可能回数Nmaxの検出方法は前述した第1実施形態と同様なので説明は省略する。 Next, in step S <b> 203, the focus bracket control unit (calculation unit) 124 calculates the number of possible images Nmax based on the data amount of the acquired image and information on the capacity of the memory 108. Since the method for detecting the number of possible imaging Nmax is the same as in the first embodiment described above, the description thereof is omitted.
次に、ステップS204で被写体検出部123は、取得したコントラスト評価値が、予め設定された閾値よりも大きくなる位置に撮像する被写体が存在すると判定する。そして、当該判定に基づいて、被写体検出部(被写体検出手段)123は、一画面中に存在する被写体数Mを検出する。 Next, in step S204, the subject detection unit 123 determines that there is a subject to be imaged at a position where the acquired contrast evaluation value is larger than a preset threshold value. Based on this determination, the subject detection unit (subject detection means) 123 detects the number M of subjects present in one screen.
以下、ステップS203で撮像可能数Nmaxが3回、ステップS204で被写体数Mが2つと検出された場合について、この詳細を説明する。前述したように、本実施形態では、無駄な撮像を抑制するために、一画面中で被写体が存在すると判定された領域と被写体が存在しないと判定された領域とで、フォーカスブラケット撮影時の絞り値を変更する。 Hereinafter, the details will be described for the case where the number of possible images Nmax is detected three times in step S203 and the number of subjects M is two in step S204. As described above, in this embodiment, in order to suppress wasteful imaging, the aperture at the time of focus bracket shooting is divided into an area determined to have a subject in one screen and an area determined to have no subject in one screen. Change the value.
この際、被写体が存在しない被写体間の領域は、無駄な撮像を抑制するために、一度の撮像で当該領域の全域に対して合焦した状態の画像を取得することが望ましい。すなわち、被写体が存在する領域(第1の領域)と、被写体間の領域(第2の領域)に対して、それぞれ1回ずつ撮像をおこなうようなフォーカスブラケット撮影が望ましい。 At this time, in order to suppress useless imaging, it is desirable to acquire an image in a state where the entire area of the area is in focus with a single imaging in a region between subjects where no subject exists. In other words, it is desirable to perform focus bracket shooting in which an image is taken once for each of the region where the subject exists (first region) and the region between the subjects (second region).
しかしながら、撮像可能回数Nmaxが少ない、または被写体数Mが多い場合は、上述したような回数でフォーカスブラケット撮影ができない場合がある。そこで、本実施形態では、撮像可能回数Nmaxと被写体数Mとに基づいて、第1の領域と第2の領域に対して、それぞれ1回ずつ撮像をおこなうことができるか否かをステップS205〜S206で判定する。 However, when the number of possible images Nmax is small or the number of subjects M is large, focus bracket photographing may not be performed with the number of times described above. Therefore, in the present embodiment, whether or not the first area and the second area can be imaged once each is determined based on the possible number of times Nmax and the number of subjects M in steps S205 to S205. The determination is made at S206.
図6に戻り、ステップS205でフォーカスブラケット制御部124は、先に取得した撮像可能回数Nmaxが被写体数Mよりも少ないか否かを判定する。 Returning to FIG. 6, in step S <b> 205, the focus bracket control unit 124 determines whether or not the previously obtained number of possible images Nmax is smaller than the number of subjects M.
撮像可能回数Nmaxが被写体数M以上の数である(ステップS205でYES)と判定された場合はステップS206に進む。そして、ステップS206でフォーカスブラケット制御部124は、撮像可能数Nmaxが、被写体数Mを2倍した数から1を減算した数(2M−1の数)以上であるか否かを判定する。 If it is determined that the number of possible images Nmax is equal to or greater than the number of subjects M (YES in step S205), the process proceeds to step S206. In step S206, the focus bracket control unit 124 determines whether or not the number Nmax of images that can be captured is equal to or greater than the number obtained by subtracting 1 from the number obtained by doubling the number M of subjects (the number 2M−1).
撮像可能数Nmaxが2M−1の数以上である(ステップS206でYES)と判定された場合は、第1の領域と第2の領域に対してそれぞれ1回ずつ撮像をおこなうことが可能な撮像回数を設定できる。この場合は、撮像回数を2M−1以下に仮決定しステップS207に進む。 When it is determined that the number of possible images Nmax is equal to or greater than the number of 2M−1 (YES in step S206), the first region and the second region can be imaged once each. You can set the number of times. In this case, the number of times of imaging is provisionally determined to be 2M-1 or less, and the process proceeds to step S207.
次に、ステップS207でフォーカスブラケット制御部(第2の設定手段)124は、第1の領域を撮像する際の絞り値(第1の絞り値)Faを設定する。この際、第1の絞り値Faは、設定可能な絞り値の中で、最も開放側の絞り値を設定する。 Next, in step S207, the focus bracket control unit (second setting unit) 124 sets an aperture value (first aperture value) Fa for imaging the first region. At this time, the first aperture value Fa is set to the most open aperture value among the settable aperture values.
次に、ステップS208でフォーカスブラケット制御部124は、撮像対象とする被写体が存在する領域において、先に設定した第1の絞り値Faで検出した被写体を撮像した場合の被写界深度に含まれない領域を判定する。なお、撮像対象とする被写体が存在する領域とは、検出した被写体の内、カメラ100に対して最も至近側に存在する被写体と最も無限遠側に存在する被写体との間の領域である。そして、ステップS209でフォーカスブラケット制御部124は、第2の領域を撮像する際の絞り値(第2の絞り値)Fbを設定する。 Next, in step S208, the focus bracket control unit 124 is included in the depth of field when the subject detected with the first aperture value Fa previously set is captured in the region where the subject to be imaged exists. Judge no area. Note that the area where the subject to be imaged is the area between the subject closest to the camera 100 and the subject closest to the infinity among the detected subjects. In step S209, the focus bracket control unit 124 sets an aperture value (second aperture value) Fb for imaging the second area.
前述したように、本実施形態では、第2の領域に撮像対象とする被写体が存在しないため、取得する画像の解像度が低下しても影響は小さい。すなわち、第2の領域を撮像する場合は、小絞り側の絞り値を設定して被写体を撮像しても影響が小さい。そこで、第2の絞り値Fbとしては、少なくとも、第1の絞り値Faで被写体を撮像した際に、当該第1の絞り値Faに対応した被写界深度に含まれない範囲をカバーするように設定すればよい。 As described above, in this embodiment, since there is no subject to be imaged in the second area, the influence is small even if the resolution of the acquired image is reduced. In other words, when imaging the second area, setting the aperture value on the small aperture side and imaging the subject has little effect. Therefore, the second aperture value Fb covers at least a range not included in the depth of field corresponding to the first aperture value Fa when the subject is imaged with the first aperture value Fa. Should be set.
したがって、少なくとも2M−1回の撮像回数が確保されている状況でha、第1の絞り値Faとしてできるだけ開放側の絞り値を設定し、第1の絞り値Faで被写体を撮像した際に被写界深度に含まれない領域をカバーするように第2の絞り値Fbを設定する。 Therefore, in a situation where the number of times of imaging is at least 2M−1, ha, the aperture value on the open side as much as possible is set as the first aperture value Fa, and the subject is captured when the subject is imaged with the first aperture value Fa. The second aperture value Fb is set so as to cover an area not included in the depth of field.
この際、第1の絞り値Faで被写体を撮像した際に当該第1の絞り値Faに対応した被写界深度に第2の領域が含まれるような場合は、当該第2の領域に対して新たに撮像を行う必要はない。したがって、本実施形態では、第1の絞り値Faで被写体を撮像した際の被写界深度に含まれない第2の領域に対してのみ、第2の絞り値Fbで新たに撮像をおこなう。 At this time, when the second area is included in the depth of field corresponding to the first aperture value Fa when the subject is imaged with the first aperture value Fa, the second area is compared with the second area. There is no need to perform new imaging. Therefore, in the present embodiment, new imaging is performed with the second aperture value Fb only for the second region that is not included in the depth of field when the subject is imaged with the first aperture value Fa.
ステップS210でフォーカスブラケット制御部(第1の設定手段)124は、撮像対象とする被写体と、ステップS208で判定された第2の領域に合わせて撮像回数を設定する。前述したように、2M−1回以下の撮像回数が設定される。 In step S210, the focus bracket control unit (first setting unit) 124 sets the number of times of imaging according to the subject to be imaged and the second area determined in step S208. As described above, the number of times of imaging of 2M-1 times or less is set.
次にステップS211でフォーカスブラケット制御部124は、先に算出した撮像回数、被写体数M、第1の絞り値Faと第2の絞り値Fbなどに関する情報に基づいて、フォーカス位置Pnを設定する。なお、フォーカス位置Pnの設定方法は、カメラ100からの距離と第1の絞り値Faおよび第2の絞り値Fbに応じた被写界深度の深さに基づいてフォーカス位置Pnの位置を設定することができる。 Next, in step S211, the focus bracket control unit 124 sets the focus position Pn based on the information regarding the number of times of imaging, the number M of subjects, the first aperture value Fa, the second aperture value Fb, and the like calculated previously. The focus position Pn is set by setting the position of the focus position Pn based on the distance from the camera 100 and the depth of field according to the first aperture value Fa and the second aperture value Fb. be able to.
次に、撮像可能数Nmaxが2M−1の数よりも少ない(ステップS206でNO)と判定された場合は、ステップS212でフォーカスブラケット(第1の設定手段)制御部124は、撮像回数を被写体数Mと同じ回数(M回)に設定する。 Next, when it is determined that the number Nmax of images that can be captured is less than the number of 2M-1 (NO in step S206), the focus bracket (first setting means) control unit 124 determines the number of imaging in step S212. Set to the same number (M times) as number M.
ステップS212に進む場合は、被写体数Mが撮像可能回数Nmaxよりも少ないため、第1の領域に合わせて撮像することができる。しかし、撮像可能数Nmaxが2M−1の数よりも少ないため、第2の領域に対して撮像をおこなうことができない。 In the case of proceeding to step S212, since the number M of subjects is smaller than the number of possible images Nmax, it is possible to image in accordance with the first area. However, since the number Nmax that can be imaged is smaller than the number of 2M−1, it is not possible to image the second area.
そこで、ステップS213でフォーカスブラケット制御部(第2の設定手段)124は、第1の領域に合わせて撮像をおこない、その際の絞り値(第3の絞り値)Fcは前述した第1の絞り値Faよりも小絞り側の絞り値を設定する。なお、第3の絞り値Fcの設定方法は、前述した第1実施形態の式(1)〜(4)を用いて算出する。ステップS214の処理は、前述した第1実施形態のステップS106と同様なので説明は省略する。 Therefore, in step S213, the focus bracket control unit (second setting means) 124 performs imaging in accordance with the first area, and the aperture value (third aperture value) Fc at that time is the first aperture value described above. An aperture value on the smaller aperture side than the value Fa is set. The method for setting the third aperture value Fc is calculated using the equations (1) to (4) of the first embodiment described above. Since the process of step S214 is the same as that of step S106 of 1st Embodiment mentioned above, description is abbreviate | omitted.
次に、撮像可能回数Nmaxが被写体数Mよりも少ない(ステップS205でNO)と判定された場合は、ステップS215でフォーカスブラケット制御部(第1の設定手段)124は、撮像回数を撮像可能回数Nmaxと同じ回数(Nmax回)に設定する。 Next, when it is determined that the number Nmax of images that can be captured is smaller than the number M of subjects (NO in step S205), in step S215, the focus bracket control unit (first setting unit) 124 Set to the same number of times as Nmax (Nmax times).
ステップS215に進む場合は、被写体数Mが撮像可能回数以上の場合である。したがって、ステップS216でフォーカスブラケット制御部(第2の設定手段)124は、Nmax回の撮像で、検出した被写体に合焦するような第4の絞り値Fdを設定する。なお、第4の絞り値Fdは、前述した第1実施形態の式(1)〜(4)を用いて算出する。また、第4の絞り値は、第1の絞り値Faと第3の絞り値Fcよりも小絞り側の絞り値を設定する。ステップS217の処理は、前述した第1実施形態のステップS106と同様なので説明は省略する。 The case where the process proceeds to step S215 is a case where the number M of subjects is equal to or greater than the number of images that can be captured. Accordingly, in step S216, the focus bracket control unit (second setting unit) 124 sets the fourth aperture value Fd so as to focus on the detected subject in Nmax times of imaging. Note that the fourth aperture value Fd is calculated using the equations (1) to (4) of the first embodiment described above. As the fourth aperture value, an aperture value on the smaller aperture side than the first aperture value Fa and the third aperture value Fc is set. Since the process of step S217 is the same as that of step S106 of 1st Embodiment mentioned above, description is abbreviate | omitted.
次に、ステップS218でCPU120は、ステップS205とステップS206の判定の結果と、先に算出した絞り値Fa〜Fbに基づいて、絞り駆動部112を介して絞り105を駆動する。以降のステップS219〜S221の処理は、前述した第1実施形態のステップS108〜S110と同様の処理なので説明は省略する。 Next, in step S218, the CPU 120 drives the aperture 105 via the aperture driver 112 based on the determination results in steps S205 and S206 and the previously calculated aperture values Fa to Fb. The subsequent processes in steps S219 to S221 are the same as the processes in steps S108 to S110 of the first embodiment described above, and thus the description thereof is omitted.
なお、撮像回数が2M−1回に設定されている場合は、ステップS218で第1の絞り値Faとなるように絞り105を駆動する。その後、設定されたフォーカス位置に合わせて適宜絞り105を駆動しつつ、順番に被写体を撮像する。この構成によって、第1の領域と第2の領域とで絞り値を変更してフォーカスブラケット撮影をおこなうことができる。以上が、本実施形態のフォーカスブラケット処理の説明である。 If the number of times of imaging is set to 2M-1 times, the aperture 105 is driven so as to become the first aperture value Fa in step S218. Thereafter, the subject is imaged in order while driving the aperture 105 appropriately in accordance with the set focus position. With this configuration, focus bracket photography can be performed by changing the aperture value between the first region and the second region. The above is the description of the focus bracket process of the present embodiment.
以上説明したように、本実施形態のカメラ100は、一画面中で被写体が存在すると判定された領域と被写体が存在しないと判定された領域とで、フォーカスブラケット撮影時の絞り値を変更する。すなわち、被写体が存在する領域と被写体が存在しない被写体間の領域に対して、それぞれ1回ずつ撮像をおこなう。 As described above, the camera 100 according to the present embodiment changes the aperture value at the time of focus bracket shooting between the area where it is determined that a subject exists and the area where it is determined that no subject exists in one screen. That is, imaging is performed once for each of a region where a subject exists and a region between subjects where no subject exists.
また、被写体が存在する領域と被写体が存在しない被写体間の領域に対してそれぞれ1回ずつ撮像をおこなうことができない場合であっても、被写体数が撮像可能回数よりも少ない場合は、被写体数を撮像回数として設定する。 In addition, even if it is impossible to capture one time for each of the region where the subject exists and the region between the subjects where the subject does not exist, if the number of subjects is less than the number of possible images, the number of subjects is set. Set as the number of imaging.
さらに、被写体が存在する領域と被写体が存在しない被写体間の領域に対してそれぞれ1回ずつ撮像をおこなうことができない場合であって、被写体数が撮像可能回数以上の場合は、撮像可能回数を撮像回数として設定する。 Furthermore, if it is not possible to take an image once for each of the region where the subject exists and the region between the subjects where the subject does not exist, and if the number of subjects is equal to or greater than the number of images that can be captured, the number of possible images is captured. Set as number of times.
本実施形態のカメラ100は、以上説明したような構成によって、無駄な撮像が行われることを抑制してフォーカスブラケット撮影をおこなうことができるため、被写体に合焦した画像を取得することができる。したがって、本実施形態のカメラ100は、限られた撮像回数であっても、複数の被写体に対して合焦した状態の画像を取得することができる。 With the configuration described above, the camera 100 according to the present embodiment can perform focus bracket imaging while suppressing unnecessary imaging, and thus can acquire an image focused on a subject. Therefore, the camera 100 according to the present embodiment can acquire images in focus on a plurality of subjects even with a limited number of imaging times.
なお、本実施形態では、図5に図示するように被写体間の領域を撮像するような構成であったが、これに限定されるものではない。例えば、図7に図示する変形例ように、検出した被写体が存在する領域以外を撮像しないような構成であってもよい。図7は、本発明を実施した撮像装置の第2実施形態であるカメラ100のフォーカスブラケット処理における撮像をおこなう位置の変形例を説明する図である。 In the present embodiment, as shown in FIG. 5, the area between the subjects is imaged. However, the present invention is not limited to this. For example, as in the modification illustrated in FIG. 7, a configuration may be employed in which images other than the area where the detected subject exists are not captured. FIG. 7 is a diagram illustrating a modification of the position at which imaging is performed in the focus bracket process of the camera 100 which is the second embodiment of the imaging apparatus embodying the present invention.
この構成であれば、被写体を撮像する回数を更に少なくすることができるので、フォーカスブラケット撮影をおこなう際に更に開放側の絞り値を設定することができる。したがって、被写体が存在する領域の解像度を更に向上させた全焦点画像を生成することができる。 With this configuration, it is possible to further reduce the number of times the subject is imaged, so that it is possible to set a further open aperture value when performing focus bracket photography. Therefore, it is possible to generate an omnifocal image in which the resolution of the area where the subject exists is further improved.
以上、本発明の好ましい実施形態について説明したが、本発明はこれらの実施形態に限定されず、その要旨の範囲内で種々の変形及び変更が可能である。例えば、前述した実施形態では、カメラ100が自動的に撮像回数を設定するような構成であったが、メニュー操作ボタン118を用いてユーザが事前に設定するような構成であってもよい。 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. For example, in the above-described embodiment, the configuration is such that the camera 100 automatically sets the number of times of imaging. However, the configuration may be such that the user uses the menu operation buttons 118 to set in advance.
この際、ユーザによって設定された撮像回数が撮像可能回数よりも多い場合は、撮像可能回数で撮像をおこない、その際の絞り値は、撮像する領域をカバーできるような小絞り側の絞り値を設定する。すなわち、ユーザによって設定された撮像回数が撮像可能回数よりも多い場合は、当該撮像回数が撮像可能回数よりも少ない場合よりも小絞り側の絞り値を設定する。 At this time, if the number of times of imaging set by the user is larger than the number of images that can be captured, imaging is performed at the number of images that can be captured. Set. In other words, when the number of times of imaging set by the user is larger than the number of times of imaging, the aperture value on the small aperture side is set as compared with the case where the number of times of imaging is smaller than the number of times of imaging.
なお、前述した実施形態では、カメラ100の内部に設けられた制御部や処理部などが互いに連携して動作することによって、カメラ100の動作を制御するような構成であるが、これに限定されるものではない。前述した図2や図6のフローに従ったプログラムを予めメモリ108に格納しておき、当該プログラムをCPU120が実行することで、カメラ100の動作を制御するような構成であってもよい。 In the embodiment described above, the configuration is such that the control unit and the processing unit provided in the camera 100 operate in cooperation with each other to control the operation of the camera 100. However, the present invention is not limited to this. It is not something. The program according to the flow of FIG. 2 or FIG. 6 described above may be stored in the memory 108 in advance, and the CPU 120 may execute the program to control the operation of the camera 100.
また、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。また、プログラムを供給するための記録媒体としては、例えば、ハードディスク、磁気テープ等の磁気記録媒体、光/光磁気記録媒体でもあってもよい。 Moreover, as long as it has the function of a program, it does not ask | require the form of programs, such as an object code, the program run by an interpreter, the script data supplied to OS. The recording medium for supplying the program may be, for example, a magnetic recording medium such as a hard disk or a magnetic tape, or an optical / magneto-optical recording medium.
なお、前述した実施形態では、本発明を実施する撮像装置の一例としてデジタルカメラを採用した場合について説明したが、これに限定されるものではない。例えば、デジタルビデオカメラやスマートフォンなどの可搬型デバイスなど、本発明はその要旨の範囲内で種々の撮像装置に適用することができる。 In the above-described embodiment, the case where a digital camera is employed as an example of an imaging apparatus that implements the present invention has been described. However, the present invention is not limited to this. For example, the present invention can be applied to various imaging devices within the scope of the gist such as a portable device such as a digital video camera or a smartphone.
(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。すなわち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワークまたは各種記録媒体を介してシステム或いは装置に供給する。そして、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various recording media. Then, the computer (or CPU, MPU, etc.) of the system or apparatus reads out and executes the program.
100 デジタルカメラ(撮像装置)
101 撮像レンズ群(撮像レンズ)
103 フォーカスレンズ
114 フォーカスレンズ駆動部(レンズ駆動手段)
123 被写体検出部(距離情報検出手段)
124 フォーカスブラケット制御部(第1、第2の設定手段)
100 Digital camera (imaging device)
101 Imaging lens group (imaging lens)
103 focus lens 114 focus lens drive unit (lens drive means)
123 Subject detection unit (distance information detection means)
124 focus bracket control unit (first and second setting means)
Claims (16)
撮像対象であるそれぞれの被写体の光軸方向での被写体距離を検出する検出手段と、
前記フォーカスレンズの光軸方向でのレンズ位置を異ならせて連続して撮像する撮像回数、およびそれぞれの撮像の際の被写界深度を設定する設定手段と、
を有し、
前記設定手段は、前記検出手段によって検出した前記被写体距離と設定した撮像回数に基づいて、前記複数の画像のそれぞれを取得する際の前記フォーカスレンズの光軸方向のレンズ位置と被写界深度を設定するものであって、前記撮像手段が前記被写体距離に応じた位置に合焦させて撮像する際の被写界深度を、前記撮像手段が前記被写体距離に応じた位置とは異なる位置に合焦させて撮像する際の被写界深度よりも、浅く設定することを特徴とする撮像装置。 Imaging means for acquiring a plurality of images a focus lens having an imaging lens comprising, in the image shooting continuously at different lens positions in the optical axis direction of the focusing lens,
A detecting means that detect the object distance in the optical axis direction of each object which is an imaging target,
And setting means to set the depth of field at the time of the focus lens of the imaging count for image shooting continuously at different lens positions in the optical axis direction, and each of the imaging,
Have
Before Ki設 constant means, before said detected by dangerous detecting means on the basis of the imaging count set as a subject distance, the lens position in the optical axis direction of the focus lens when acquiring each of the plurality of images The depth of field when the imaging means focuses on a position corresponding to the subject distance, and the imaging means determines a position corresponding to the subject distance. An imaging device characterized in that the depth of field is set to be shallower than the depth of field when imaging is performed by focusing on a different position .
前記合成手段は、前記複数の画像から合焦している領域を抽出して合成することで全焦点画像を生成することを特徴とする請求項1に記載の撮像装置。The imaging apparatus according to claim 1, wherein the synthesizing unit generates an omnifocal image by extracting and synthesizing a focused region from the plurality of images.
前記データ量検出手段によって検出した画像のデータ容量に基づいて、前記フォーカスレンズの光軸方向でのレンズ位置を異ならせて一度に連続して被写体を撮像可能な回数を算出する算出手段を有し、
前記設定手段は、前記算出手段によって算出された前記撮像可能な回数以下の回数を前記撮像回数として設定することを特徴とする請求項1乃至5の何れか一項に記載の撮像装置。 A data amount detecting means for detecting a data amount of an image to be acquired;
Based on the data volume of the image detected by the data amount detection unit, the calculation unit calculates a number of times that the subject can be imaged continuously at a time by changing the lens position in the optical axis direction of the focus lens. ,
Before Ki設 constant means, the imaging apparatus according the number of following the imageable number calculated by the calculation means to any one of claims 1 to 5, characterized in that to set as the number of times of imaging.
前記モード設定手段によって設定された動作モードに基づいて、前記フォーカスレンズの光軸方向でのレンズ位置を異ならせて一度に連続して被写体を撮像可能な回数を算出する算出手段と、を有し、
前記算出手段は、前記モード設定手段によって前記第2のモードが設定されている場合に、前記第1のモードが設定されている場合よりも前記撮像回数を少なく設定することを特徴とする請求項1乃至5の何れか一項に記載の撮像装置。 As the operation mode of the imaging device, a mode setting means capable of setting a power second mode consumes less than the first mode and the first mode,
On the basis of the set operation mode by said mode setting means, a calculation means for calculating a Zoka number ability of kite a subject at different lens positions in the optical axis direction of the focus lens sequentially at a time, Have
The calculation means, when the second mode is set by the mode setting means, sets the number of imaging times smaller than when the first mode is set. The imaging device according to any one of 1 to 5 .
前記設定手段は、前記評価値が第1の評価値に対応した被写体を撮像する場合よりも、前記第1の評価値よりも前記評価値が高い第2の評価値に対応した被写体を撮像する場合の方が、前記被写界深度を浅く設定することを特徴とする請求項1乃至13の何れか一項に記載の撮像装置。 Having an evaluation value acquisition means for acquiring an evaluation value based on the contrast information of the acquired image;
Before Ki設 constant means, it said than if the evaluation value is imaging an object corresponding to the first evaluation value, the object corresponding to the second evaluation value the evaluation value is higher than the first evaluation value The imaging apparatus according to any one of claims 1 to 13 , wherein the depth of field is set shallower when imaging.
フォーカスレンズを含む撮像レンズを備え、前記フォーカスレンズの光軸方向でのレンズ位置を異ならせて連続して撮像して複数の画像を取得する撮像工程と、
撮像対象であるそれぞれの被写体の光軸方向での被写体距離を検出する検出工程と、
前記フォーカスレンズの光軸方向でのレンズ位置を異ならせて連続して撮像する撮像回数、およびそれぞれの撮像の際の被写界深度を設定する設定工程と、
を有し、
前記設定工程は、前記検出工程によって検出した前記被写体距離と設定した撮像回数に基づいて、前記複数の画像のそれぞれを取得する際の前記フォーカスレンズの光軸方向のレンズ位置と被写界深度を設定するものであって、前記撮像工程が前記被写体距離に応じた位置に合焦させて撮像する際の被写界深度を、前記撮像工程が前記被写体距離に応じた位置とは異なる位置に合焦させて撮像する際の被写界深度よりも、浅く設定することを特徴とする撮像装置。 A method for controlling an imaging apparatus,
An imaging step of acquiring a plurality of images including an image pickup lens, and an image shooting continuously at different lens positions in the optical axis direction of the focus lens including a focus lens,
A detection step that detect the object distance in the optical axis direction of each object which is an imaging target,
And configuration process to set the depth of field at the time of the focus lens of the imaging count for image shooting continuously at different lens positions in the optical axis direction, and each of the imaging,
Have
Before Ki設 constant step, before dangerous out based on the imaging count set as the object distance detected by the process, the lens position in the optical axis direction of the focus lens when acquiring each of the plurality of images The depth of field when the imaging step focuses on a position corresponding to the subject distance, and the imaging step determines the depth of field. An imaging device characterized in that the depth of field is set to be shallower than the depth of field when imaging is performed by focusing on a different position .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014117118A JP6391304B2 (en) | 2014-06-05 | 2014-06-05 | Imaging apparatus, control method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014117118A JP6391304B2 (en) | 2014-06-05 | 2014-06-05 | Imaging apparatus, control method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015230414A JP2015230414A (en) | 2015-12-21 |
JP6391304B2 true JP6391304B2 (en) | 2018-09-19 |
Family
ID=54887198
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014117118A Active JP6391304B2 (en) | 2014-06-05 | 2014-06-05 | Imaging apparatus, control method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6391304B2 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6838994B2 (en) * | 2017-02-22 | 2021-03-03 | キヤノン株式会社 | Imaging device, control method and program of imaging device |
JP6800797B2 (en) * | 2017-03-31 | 2020-12-16 | キヤノン株式会社 | Image pickup device, image processing device, control method and program of image pickup device |
JP7520507B2 (en) * | 2018-12-28 | 2024-07-23 | キヤノン株式会社 | Image processing device and method for controlling image processing device |
US11381731B2 (en) | 2019-03-15 | 2022-07-05 | Canon Kabushiki Kaisha | Imaging apparatus, imaging control method, and storage medium |
WO2022201782A1 (en) * | 2021-03-26 | 2022-09-29 | 富士フイルム株式会社 | Imaging device, imaging method, and program |
CN115484383B (en) * | 2021-07-31 | 2023-09-26 | 华为技术有限公司 | Shooting method and related device |
WO2023157056A1 (en) * | 2022-02-15 | 2023-08-24 | 日本電気株式会社 | Information processing system, information processing method, and recording medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0829828A (en) * | 1994-07-20 | 1996-02-02 | Nikon Corp | Camera capable of bracketing-photographic and bracketing photographic method |
JP4890370B2 (en) * | 2007-06-20 | 2012-03-07 | 株式会社リコー | Imaging device |
JP5429588B2 (en) * | 2007-09-04 | 2014-02-26 | 株式会社リコー | Imaging apparatus and imaging method |
JP2010282079A (en) * | 2009-06-05 | 2010-12-16 | Canon Inc | Imaging apparatus and control method thereof |
JP2011211523A (en) * | 2010-03-30 | 2011-10-20 | Fujifilm Corp | Image processing method, and imaging device |
US9288377B2 (en) * | 2012-05-02 | 2016-03-15 | Semiconductor Components Industries, Llc | System and method for combining focus bracket images |
-
2014
- 2014-06-05 JP JP2014117118A patent/JP6391304B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2015230414A (en) | 2015-12-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6391304B2 (en) | Imaging apparatus, control method, and program | |
US20130016245A1 (en) | Imaging apparatus | |
JP2013013050A (en) | Imaging apparatus and display method using imaging apparatus | |
JP2016009998A (en) | Imaging apparatus, imaging method and program | |
JP6634298B2 (en) | Imaging device and imaging method | |
JP2009177503A (en) | Imaging apparatus | |
JP2016143022A (en) | Imaging device and imaging method | |
JP2010279054A (en) | Image pickup device, image processing device, image pickup method, and image processing method | |
JP2011217311A (en) | Imaging apparatus and method of controlling the same | |
US20150226934A1 (en) | Focus adjustment apparatus having frame-out preventive control, and control method therefor | |
JP2015204470A (en) | Imaging apparatus, control method thereof, and program | |
JP4645413B2 (en) | Imaging device | |
JP2009175442A (en) | Imaging apparatus | |
JP6758950B2 (en) | Imaging device, its control method and program | |
JP2011217334A (en) | Imaging apparatus and method of controlling the same | |
JP2016032180A (en) | Imaging apparatus, control method and program | |
JP4888829B2 (en) | Movie processing device, movie shooting device, and movie shooting program | |
JP2008263478A (en) | Imaging apparatus | |
JP2015232620A (en) | Imaging device, control method and program | |
KR20110125077A (en) | Digital imaging device, control method thereof, and computer readable storage medium | |
JP6429497B2 (en) | Imaging apparatus, control method, and program | |
KR101905813B1 (en) | Device for comparing image files | |
JP2014138378A (en) | Image pickup device, control method thereof, and control program thereof | |
JP5245644B2 (en) | Exposure calculator | |
JP2015040939A (en) | Image-capturing device, control method therefor, and control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170526 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171213 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20171219 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180216 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20180724 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180821 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6391304 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |