JP2018098764A - Imaging apparatus and image composition method - Google Patents
Imaging apparatus and image composition method Download PDFInfo
- Publication number
- JP2018098764A JP2018098764A JP2017143357A JP2017143357A JP2018098764A JP 2018098764 A JP2018098764 A JP 2018098764A JP 2017143357 A JP2017143357 A JP 2017143357A JP 2017143357 A JP2017143357 A JP 2017143357A JP 2018098764 A JP2018098764 A JP 2018098764A
- Authority
- JP
- Japan
- Prior art keywords
- subject
- image
- image data
- focus
- area
- 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
Links
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
【課題】複数の画像を合成してより深い被写界深度の画像を自動生成する撮像装置を提供する。【解決手段】撮像装置100は、合焦位置を変化させながら被写体像を撮像して複数の画像データを生成する撮像部140と、撮像部により生成された複数の画像データを合成して、複数の画像データの被写界深度より深い被写界深度を有する静止画データを生成する画像処理部160と、画像処理部を制御する制御部180と、を備える。制御部180は、複数の画像データの中の1つの画像データが示す画像から主要被写体を検出し、検出した主要被写体の位置に基づき、複数の画像データを合成する範囲を決定し、決定した範囲内で合焦する画像データを合成して静止画データを生成するように、画像処理部160を制御する。【選択図】図1Kind Code: A1 An imaging apparatus is provided that synthesizes a plurality of images to automatically generate an image with a deeper depth of field. An imaging device (100) includes an imaging unit (140) for capturing a subject image while changing a focus position to generate a plurality of image data, and synthesizing the plurality of image data generated by the imaging unit to obtain a plurality of images. and an image processing unit 160 that generates still image data having a deeper depth of field than the depth of field of the image data of the image processing unit 160, and a control unit 180 that controls the image processing unit. The control unit 180 detects a main subject from an image represented by one image data out of a plurality of image data, determines a range for synthesizing the plurality of image data based on the position of the detected main subject, and determines the determined range. The image processing unit 160 is controlled so as to synthesize the image data focused inside and generate the still image data. [Selection drawing] Fig. 1
Description
本開示は、複数の画像を合成し、深い被写界深度の画像を生成する機能を有する撮像装置、および画像合成方法に関する。 The present disclosure relates to an imaging device having a function of combining a plurality of images and generating an image having a deep depth of field, and an image combining method.
特許文献1は、フォーカスを変えた複数の画像を撮像し、撮像された画像に基づいて、被写界深度を拡大した画像を生成する撮像装置を開示する。特許文献1の撮像装置では、操作者は合焦したい被写体を複数選択し、操作者により選択された被写体それぞれの合焦位置に基づいて画像が撮像される。これらの画像を合成することにより、操作者の意図に沿った合成画像が得られる。 Patent Document 1 discloses an imaging device that captures a plurality of images with different focus and generates an image with an expanded depth of field based on the captured images. In the imaging apparatus of Patent Document 1, the operator selects a plurality of subjects to be focused, and images are captured based on the focus positions of the subjects selected by the operator. By synthesizing these images, a synthesized image in accordance with the operator's intention can be obtained.
本開示は、複数の画像を合成して、より深い被写界深度の画像を自動生成する撮像装置を提供する。また本開示は、複数の画像を合成して、より深い被写界深度の画像を自動生成する画像合成方法を提供する。 The present disclosure provides an imaging apparatus that automatically generates an image with a deeper depth of field by combining a plurality of images. The present disclosure also provides an image composition method for automatically generating an image having a deeper depth of field by combining a plurality of images.
本開示の一態様である撮像装置は、合焦位置を変化させながら被写体像を撮像して複数の画像データを生成する撮像部と、前記撮像部により生成された前記複数の画像データを合成して、前記複数の画像データそれぞれの被写界深度より深い被写界深度を有する静止画データを生成する画像処理部と、前記画像処理部を制御する制御部と、を備える。前記制御部は、前記複数の画像データの中の1つの画像データが示す画像から主要被写体を検出し、検出した前記主要被写体の位置に基づき、を含むように前記複数の画像データを合成する範囲を決定し、前記複数の画像データのうち決定した前記範囲内で合焦する画像データを合成して前記静止画データを生成するように、前記画像処理部を制御する。 An imaging apparatus according to an aspect of the present disclosure combines an imaging unit that captures a subject image while changing a focus position and generates a plurality of image data, and the plurality of image data generated by the imaging unit. An image processing unit that generates still image data having a depth of field deeper than the depth of field of each of the plurality of image data, and a control unit that controls the image processing unit. The control unit detects a main subject from an image indicated by one image data of the plurality of image data, and based on the detected position of the main subject, a range in which the plurality of image data are combined to include And the image processing unit is controlled to generate the still image data by synthesizing image data to be focused within the determined range among the plurality of image data.
本開示の他の一態様である画像合成方法は、複数の画像データを合成して、前記複数の画像データのそれぞれにおける主要被写体の被写界深度よりも静止画データにおける前記主要被写体の被写界深度の方が深くなるように前記静止画データを生成する、画像合成方法である。前記画像合成方法では、前記複数の画像データのそれぞれの画像上において、第1の被写体と第2の被写体とを含む場合に、前記第1の被写体と前記第2の被写体の前記画像上における面積が異なり、かつ前記第1の被写体と前記第2の被写体の合焦位置が異なり、かつ前記第1の被写体と前記第2の被写体の前記画像上の中心位置が等しいとき、前記第1の被写体と前記第2の被写体のうち、前記画像上における前記面積がより大きい方を前記主要被写体とする。また前記画像合成方法では、前記第1の被写体と前記第2の被写体の前記画像上における前記面積が等しく、かつ前記第1の被写体と前記第2の被写体の前記合焦位置が異なり、かつ前記第1の被写体と前記第2の被写体の前記画像上の前記中心位置が異なるとき、前記第1の被写体と前記第2の被写体のうち、前記画像の中心により近い方を前記主要被写体とする。 According to another aspect of the present disclosure, an image composition method combines a plurality of pieces of image data so that the subject image of the main subject in the still image data is larger than the depth of field of the main subject in each of the plurality of image data. In the image composition method, the still image data is generated so that the depth of field becomes deeper. In the image composition method, when each of the plurality of image data includes a first subject and a second subject, areas of the first subject and the second subject on the image are included. And the first subject and the second subject have different in-focus positions, and the first subject and the second subject have the same center position on the image, the first subject And the second subject having the larger area on the image is set as the main subject. In the image composition method, the areas of the first subject and the second subject on the image are equal, the in-focus positions of the first subject and the second subject are different, and the When the center position of the first subject and the second subject on the image is different, the one closer to the center of the image is selected as the main subject between the first subject and the second subject.
本開示の撮像装置および画像合成方法によれば、画像から主要被写体を検出し、その主要被写体の位置に基づいて合成範囲を決定し、決定された合成範囲内で合焦する複数の画像データを合成して、被写界深度の深い画像を得ることができる。 According to the imaging apparatus and the image composition method of the present disclosure, a main subject is detected from an image, a composition range is determined based on the position of the main subject, and a plurality of pieces of image data to be focused within the determined composition range are obtained. By combining, an image with a deep depth of field can be obtained.
以下、適宜図面を参照しながら、実施の形態を詳細に説明する。但し、必要以上に詳細な説明は省略する場合がある。例えば、既によく知られた事項の詳細説明および実質的に同一の構成に対する重複説明を省略する場合がある。これは、以下の説明が不必要に冗長になるのを避け、当業者の理解を容易にするためである。なお、添付図面及び以下の説明は、当業者が本開示を十分に理解するために、提供されるものであって、これらによって特許請求の範囲に記載の主題を限定することは意図されていない。 Hereinafter, embodiments will be described in detail with reference to the drawings as appropriate. However, more detailed description than necessary may be omitted. For example, a detailed description of already well-known matters and a redundant description of substantially the same configuration may be omitted. This is to avoid the following description from becoming unnecessarily redundant and to facilitate understanding by those skilled in the art. The accompanying drawings and the following description are provided for those skilled in the art to fully understand the present disclosure, and are not intended to limit the claimed subject matter. .
以下、図面を用いて本開示に係る撮像装置の実施の形態を説明する。 Hereinafter, an embodiment of an imaging device according to the present disclosure will be described with reference to the drawings.
(実施の形態1)
[1.構成]
実施の形態1に係るデジタルカメラ(撮像装置の一例)の電気的構成について図1を用いて説明する。図1は、デジタルカメラ100の構成を示すブロック図である。デジタルカメラ100は、1つ又は複数のレンズからなる光学系110により形成された被写体像を、撮像部としてのCCD(Charge Coupled Device)140で撮像する撮像装置である。CCD140で生成された画像データは、画像処理部160で各種処理が施され、メモリカード200に格納される。以下、デジタルカメラ100の構成を詳細に説明する。
(Embodiment 1)
[1. Constitution]
An electrical configuration of the digital camera (an example of an imaging device) according to Embodiment 1 will be described with reference to FIG. FIG. 1 is a block diagram showing a configuration of the digital camera 100. The digital camera 100 is an imaging device that captures a subject image formed by an optical system 110 including one or a plurality of lenses with a CCD (Charge Coupled Device) 140 as an imaging unit. The image data generated by the CCD 140 is subjected to various processes by the image processing unit 160 and stored in the memory card 200. Hereinafter, the configuration of the digital camera 100 will be described in detail.
光学系110は、フォーカスレンズ111、ズームレンズ112、及び手振れ補正レンズ113を含む。ズームレンズ112を光軸に沿って移動させることにより、被写体像の拡大又は縮小をすることができる。また、フォーカスレンズ111を光軸に沿って移動させることにより、被写体像のピント(合焦状態)を調整することができる。また、手振れ補正レンズ113は、デジタルカメラ100のブレによる画像のブレを補正する。 The optical system 110 includes a focus lens 111, a zoom lens 112, and a camera shake correction lens 113. The subject image can be enlarged or reduced by moving the zoom lens 112 along the optical axis. Further, the focus (in-focus state) of the subject image can be adjusted by moving the focus lens 111 along the optical axis. Further, the camera shake correction lens 113 corrects image blur due to blur of the digital camera 100.
レンズ駆動部120は、光学系110に含まれる各種レンズ(例えばズームレンズ112及びフォーカスレンズ111)を駆動させる。レンズ駆動部120は、例えばズームレンズ112を駆動するズームモータ、およびフォーカスレンズ111を駆動するフォーカスモータを含む。 The lens driving unit 120 drives various lenses (for example, the zoom lens 112 and the focus lens 111) included in the optical system 110. The lens driving unit 120 includes, for example, a zoom motor that drives the zoom lens 112 and a focus motor that drives the focus lens 111.
絞り部300は、ユーザの設定に応じて又は自動で開口部の大きさを調整し、開口部を透過する光の量を調整する。 The diaphragm unit 300 adjusts the amount of light transmitted through the opening by adjusting the size of the opening in accordance with a user setting or automatically.
シャッタ130は、CCD140に透過させる光を遮光するための手段である。シャッタ130は、光学系110及び絞り部300とともに、被写体像を示す光学情報を制御する。また、光学系110及び絞り部300はレンズ鏡筒内に収納される。 The shutter 130 is a means for shielding the light transmitted through the CCD 140. The shutter 130 controls the optical information indicating the subject image together with the optical system 110 and the diaphragm unit 300. The optical system 110 and the diaphragm unit 300 are housed in a lens barrel.
CCD140は、光学系110で形成された被写体像を撮像して、画像データを生成する。CCD140は、カラーフィルタと、受光素子と、AGC(Auto Gain Controller)とを含む。受光素子は、光学系110によって集光された光学的信号を電気信号に変換し、画像情報を生成する。AGCは、受光素子から出力された電気信号を増幅する。 The CCD 140 captures the subject image formed by the optical system 110 and generates image data. The CCD 140 includes a color filter, a light receiving element, and an AGC (Auto Gain Controller). The light receiving element converts the optical signal collected by the optical system 110 into an electrical signal, and generates image information. The AGC amplifies the electric signal output from the light receiving element.
ADC(A/Dコンバータ:アナログ−デジタル変換器)150は、CCD140で生成されたアナログ画像データをデジタル画像データに変換する。 An ADC (A / D converter: analog-digital converter) 150 converts analog image data generated by the CCD 140 into digital image data.
画像処理部160は、CCD140で生成され、変換されたデジタル画像データに対して、コントローラ180の制御を受け、各種処理を施す。画像処理部160は、表示モニタ220に表示するための画像データを生成したり、メモリカード200に格納するための画像データを生成したりする。例えば、画像処理部160は、CCD140で生成された画像データに対して、ガンマ補正、ホワイトバランス補正、傷補正などの各種処理を行う。また、画像処理部160は、CCD140で生成された画像データを、H.264規格およびMPEG2規格に準拠した圧縮形式等により圧縮する。また、画像処理部160は、CCD140で生成された画像データに基づいて、例えば、画素数4000×2000前後の動画の画像データ(4K動画データ)を生成することができる。画像処理部160は、生成した4K動画データに対して後述する種々の処理を行うことができる。例えば、画像処理部160は、生成した4K動画データを構成するフレーム画像を用いて深度合成(焦点合成)処理を行う(詳細は後述)。 The image processing unit 160 performs various processes on the digital image data generated and converted by the CCD 140 under the control of the controller 180. The image processing unit 160 generates image data to be displayed on the display monitor 220 or generates image data to be stored in the memory card 200. For example, the image processing unit 160 performs various processes such as gamma correction, white balance correction, and flaw correction on the image data generated by the CCD 140. Further, the image processing unit 160 converts the image data generated by the CCD 140 into H.264. It compresses by the compression format etc. based on H.264 standard and MPEG2 standard. Further, the image processing unit 160 can generate, for example, moving image data (4K moving image data) having about 4000 × 2000 pixels based on the image data generated by the CCD 140. The image processing unit 160 can perform various processes described later on the generated 4K moving image data. For example, the image processing unit 160 performs a depth synthesis (focus synthesis) process using frame images constituting the generated 4K moving image data (details will be described later).
コントローラ180は、デジタルカメラ100の全体を制御する制御手段である。コントローラ180は、半導体素子などで実現可能である。 The controller 180 is a control unit that controls the entire digital camera 100. The controller 180 can be realized by a semiconductor element or the like.
画像処理部160およびコントローラ180は、ハードウェアのみで構成されてもよいし、ハードウェアとソフトウェアとを組み合わせることにより実現されてもよい。コントローラ180は、マイクロコントローラ、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、DSP(Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、またはFPGA(Field‐Programmable Gate Array)などで実現される。 The image processing unit 160 and the controller 180 may be configured only by hardware, or may be realized by combining hardware and software. The controller 180 may be a microcontroller, a CPU (Central Processing Unit), an MPU (Micro Processing Unit), a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Cycle F), or an FP (Aggregated Circuit). .
バッファ170は、画像処理部160及びコントローラ180のワークメモリとして機能する。バッファ170は、例えば、DRAM(Dynamic Random Access Memory)、強誘電体メモリなどで実現される。 The buffer 170 functions as a work memory for the image processing unit 160 and the controller 180. The buffer 170 is realized by, for example, a DRAM (Dynamic Random Access Memory), a ferroelectric memory, or the like.
カードスロット190は、メモリカード200をデジタルカメラ100に装着するための手段である。カードスロット190は、機械的及び電気的にメモリカード200とデジタルカメラ100を接続可能である。 The card slot 190 is a means for attaching the memory card 200 to the digital camera 100. The card slot 190 can connect the memory card 200 and the digital camera 100 mechanically and electrically.
メモリカード200は、フラッシュメモリまたは強誘電体メモリなどを内部に含み、画像処理部160で生成された画像ファイル等のデータを格納可能である。 The memory card 200 includes a flash memory or a ferroelectric memory, and can store data such as an image file generated by the image processing unit 160.
内蔵メモリ240は、フラッシュメモリまたは強誘電体メモリなどで構成される。内蔵メモリ240は、デジタルカメラ100全体を制御するための制御プログラムおよびデータ等を記憶している。 The built-in memory 240 is configured by a flash memory or a ferroelectric memory. The built-in memory 240 stores a control program and data for controlling the entire digital camera 100.
操作部材210は、ユーザからの操作を受け付けるユーザーインターフェースの総称である。操作部材210は、ユーザからの操作を受け付けるボタン、レバー、ダイヤル、タッチパネル、およびスイッチ等の少なくとも一つを含む。また、操作部材210は、レンズ鏡筒の外周に設けられたフォーカスリングを含む。フォーカスリングは、フォーカスレンズ111を移動させるためにユーザにより回転操作される部材である。 The operation member 210 is a generic name for a user interface that receives an operation from a user. The operation member 210 includes at least one of a button, a lever, a dial, a touch panel, and a switch that receives an operation from the user. The operation member 210 includes a focus ring provided on the outer periphery of the lens barrel. The focus ring is a member that is rotated by the user to move the focus lens 111.
表示モニタ220は、CCD140で生成された画像データが示す画像(スルー画像)、およびメモリカード200から読み出した画像データが示す画像を表示可能である。また、表示モニタ220は、デジタルカメラ100の各種設定を行うための各種メニュー画面等も表示可能である。表示モニタ220は、液晶表示デバイス、または有機EL(Electro Luminescence)表示デバイスで構成される。 The display monitor 220 can display an image (through image) indicated by image data generated by the CCD 140 and an image indicated by image data read from the memory card 200. The display monitor 220 can also display various menu screens for performing various settings of the digital camera 100. The display monitor 220 includes a liquid crystal display device or an organic EL (Electro Luminescence) display device.
ジャイロセンサ250は、デジタルカメラ100のブレ(動き)を検出するセンサである。ジャイロセンサ250からの出力信号に基づき手振れ補正動作および静止判定が行われる。 The gyro sensor 250 is a sensor that detects a shake (movement) of the digital camera 100. Based on the output signal from the gyro sensor 250, a camera shake correction operation and stillness determination are performed.
図2は、デジタルカメラ100の背面を示す図である。図2では、操作部材210の例として、レリーズボタン211、選択ボタン213、決定ボタン214、およびタッチパネル222が示されている。操作部材210は、ユーザによる操作を受け付けると、コントローラ180に種々の指示信号を送信する。 FIG. 2 is a view showing the back surface of the digital camera 100. In FIG. 2, a release button 211, a selection button 213, a determination button 214, and a touch panel 222 are shown as examples of the operation member 210. When the operation member 210 receives an operation by the user, the operation member 210 transmits various instruction signals to the controller 180.
レリーズボタン211は、二段押下式の押下式ボタンである。レリーズボタン211がユーザにより半押し操作されると、コントローラ180はオートフォーカス制御(AF制御)およびオート露出制御(AE制御)などを実行する。また、レリーズボタン211がユーザにより全押し操作されると、コントローラ180は、押下操作のタイミングに撮像された画像データを記録画像としてメモリカード200等に記録する。 The release button 211 is a two-stage push button. When the release button 211 is pressed halfway by the user, the controller 180 executes autofocus control (AF control), auto exposure control (AE control), and the like. When the release button 211 is fully pressed by the user, the controller 180 records image data captured at the timing of the pressing operation on the memory card 200 or the like as a recorded image.
選択ボタン213は、決定ボタン214の上下左右方向にそれぞれ設けられた複数の押下式ボタンである。ユーザは、上下左右方向のいずれかの選択ボタン213を押下することにより、カーソルおよび後述する枠を移動させたり、表示モニタ220に表示される各種条件項目を選択したりすることができる。 The selection buttons 213 are a plurality of push buttons provided respectively in the up / down / left / right directions of the determination button 214. The user can move a cursor and a frame to be described later, or select various condition items displayed on the display monitor 220 by pressing one of the selection buttons 213 in the up / down / left / right directions.
決定ボタン214は、押下式ボタンである。デジタルカメラ100が撮影モードあるいは再生モードにあるときに、決定ボタン214がユーザにより押下されると、コントローラ180は表示モニタ220にメニュー画面を表示する。メニュー画面は、撮影(記録)および再生のための各種条件を設定するための画面である。決定ボタン214が各種条件の設定項目が選択されているときに押下されると、コントローラ180は、選択された項目の設定を確定する。 The decision button 214 is a push button. When the determination button 214 is pressed by the user while the digital camera 100 is in the shooting mode or the playback mode, the controller 180 displays a menu screen on the display monitor 220. The menu screen is a screen for setting various conditions for photographing (recording) and reproduction. When the determination button 214 is pressed when a setting item for various conditions is selected, the controller 180 finalizes the setting of the selected item.
タッチパネル222は、表示モニタ220の表示画面と重畳して配置され、ユーザの指による表示画面上へのタッチ操作を検出する。これにより、ユーザは、表示モニタ220に表示された画像に対して領域を指定する等の操作を行える。 The touch panel 222 is arranged so as to overlap with the display screen of the display monitor 220, and detects a touch operation on the display screen by the user's finger. As a result, the user can perform an operation such as designating an area for the image displayed on the display monitor 220.
[2.動作]
以上のような構成を有するデジタルカメラ100の動作を説明する。デジタルカメラ100は、深度合成(焦点合成)機能を有する。深度合成機能とは、それぞれ異なる合焦位置(以下、フォーカスレンズ位置ともいう)で撮影された複数の画像を合成して擬似的に深い被写界深度を有する1つの静止画を生成する機能である。以下、デジタルカメラ100の深度合成機能を用いた深度合成動作について説明する。
[2. Operation]
The operation of the digital camera 100 having the above configuration will be described. The digital camera 100 has a depth synthesis (focus synthesis) function. The depth synthesis function is a function for synthesizing a plurality of images taken at different in-focus positions (hereinafter also referred to as focus lens positions) to generate one still image having a pseudo deep depth of field. is there. Hereinafter, the depth composition operation using the depth composition function of the digital camera 100 will be described.
[2−1.深度合成]
図3は、デジタルカメラ100の深度合成動作を実行する時の処理の流れを説明する図である。デジタルカメラ100は、深度合成に使用するための複数の静止画を得るために、合焦位置(焦点位置)を変更させながら動画を記録する処理を行う(S1)。つまりデジタルカメラ100のコントローラ180は、フォーカスレンズ111を光軸に沿って移動させながらCCD140に撮像させ、動画データを生成させる。その後、デジタルカメラ100は、記録した動画に含まれるフレーム画像(静止画)を用いて後述の深度合成処理(S2)を実行し、深い被写界深度の静止画を生成する。なお、深度合成処理(S2)は、動画の記録処理(S1)に続いて連続して実行されてもよい。または、深度合成処理(S2)は、動画の記録処理(S1)の完了後、任意のタイミングで、例えば、ユーザにより所定の操作(メニュー画面の操作または操作ボタンによる操作)がなされたときに実行されてもよい。
[2-1. Depth composition]
FIG. 3 is a diagram for explaining the flow of processing when the depth synthesis operation of the digital camera 100 is executed. The digital camera 100 performs a process of recording a moving image while changing a focus position (focus position) in order to obtain a plurality of still images for use in depth synthesis (S1). That is, the controller 180 of the digital camera 100 causes the CCD 140 to capture an image while moving the focus lens 111 along the optical axis, and generates moving image data. Thereafter, the digital camera 100 performs a depth synthesis process (S2) described later using a frame image (still image) included in the recorded moving image, and generates a still image having a deep depth of field. It should be noted that the depth synthesis process (S2) may be executed continuously following the moving image recording process (S1). Alternatively, the depth synthesis process (S2) is executed at an arbitrary timing after the completion of the moving image recording process (S1), for example, when a predetermined operation (operation on the menu screen or operation by an operation button) is performed by the user. May be.
[2−1−1.深度合成のための動画の記録]
図4〜図7A、図7Bを参照して、深度合成に使用するための動画の記録処理(S1)について説明する。この処理では、それぞれ異なる合焦位置を有する複数の静止画(フレーム画像)を得るために、合焦位置を連続的に変化させながら動画を記録する。以下このようにして記録される動画を「マルチフォーカス動画」という。デジタルカメラ100においては、このマルチフォーカス動画を記録するための特定の撮影モードを有している。ユーザは、例えばメニュー画面または操作ダイヤルを操作することにより、デジタルカメラ100をその特定の撮影モードに設定できる。
[2-1-1. Recording video for depth composition]
With reference to FIG. 4 to FIG. 7A and FIG. 7B, the moving image recording process (S1) for use in depth synthesis will be described. In this process, in order to obtain a plurality of still images (frame images) having different in-focus positions, a moving image is recorded while continuously changing the in-focus positions. Hereinafter, the moving image recorded in this way is referred to as “multi-focus moving image”. The digital camera 100 has a specific shooting mode for recording this multifocus moving image. For example, the user can set the digital camera 100 to the specific shooting mode by operating a menu screen or an operation dial.
マルチフォーカス動画は、合焦位置(すなわち、フォーカスレンズ位置)を連続的に変化させながら記録される動画である。マルチフォーカス動画として、例えば、画素数4000×2000前後の高解像度の4K動画が記録される。この4K動画を構成するフレーム画像に含まれる複数のフレーム画像を用いて深度合成処理が実行される。このようにして深度合成された画像は、4K動画に基づいているため、高い画質を有している。 A multi-focus moving image is a moving image that is recorded while continuously changing the focus position (that is, the focus lens position). As a multi-focus moving image, for example, a high-resolution 4K moving image having about 4000 × 2000 pixels is recorded. The depth synthesis process is executed using a plurality of frame images included in the frame images constituting the 4K moving image. Since the images synthesized in this way are based on 4K moving images, they have high image quality.
マルチフォーカス動画の記録では、図4に示すように至近端側から無限端側(またはその逆)に向かってフォーカスレンズ111を移動させながら、すなわち、合焦位置を変化させながら動画撮影を行う。このようにして記録されたマルチフォーカス動画は、図5に示すように、それぞれ異なる合焦位置で記録された複数フレーム画像Pnを含む。深度合成処理において、デジタルカメラ100により深度合成の範囲が自動で設定される。そして、撮影された複数フレーム画像Pnの中から、自動設定された合成範囲で合焦したフレーム画像(図中、ハッチングされた画像)が選択され、合成される。以下、合成範囲を、深度合成範囲ともいう。合成範囲の自動設定の詳細は後述する。 In recording a multi-focus moving image, moving image shooting is performed while moving the focus lens 111 from the closest end to the infinite end (or vice versa) as shown in FIG. 4, that is, while changing the in-focus position. . The multi-focus moving image recorded in this way includes a plurality of frame images Pn recorded at different in-focus positions as shown in FIG. In the depth synthesis process, the range of depth synthesis is automatically set by the digital camera 100. Then, a frame image (hatched image in the figure) focused in the automatically set composition range is selected from the photographed plural frame images Pn and synthesized. Hereinafter, the synthesis range is also referred to as a depth synthesis range. Details of the automatic setting of the synthesis range will be described later.
実施の形態1のデジタルカメラ100では、オートフォーカス動作に関して、図6の(A)に示すように画像領域400において複数のAF(Auto Focus)領域が設定されている。実施の形態1では49個(7行×7列)のAF領域が設定されている。AF領域毎に、各AF領域を特定するための番号(1〜49)が付加されている。AF領域毎に、そのAF領域内の被写体に合焦しているフレーム(以下「合焦フレーム」という)が特定され、特定された合焦フレームに関する情報が合焦情報テーブル(後述)に記録される。なお、デジタルカメラ100は、マルチフォーカス動画を記録(撮影)する前にフォーカスサーチ動作を行い、各AF領域の合焦位置を検出して合焦情報テーブルを生成する。 In the digital camera 100 of the first embodiment, a plurality of AF (Auto Focus) areas are set in the image area 400 as shown in FIG. In the first embodiment, 49 (7 rows × 7 columns) AF areas are set. For each AF area, a number (1-49) for specifying each AF area is added. For each AF area, a frame in focus on the subject in the AF area (hereinafter referred to as “focus frame”) is specified, and information regarding the specified focus frame is recorded in a focus information table (described later). The Note that the digital camera 100 performs a focus search operation before recording (capturing) a multifocus moving image, and detects the in-focus position of each AF area to generate an in-focus information table.
図7A、図7Bは、それぞれ合焦情報テーブル60及び合焦情報テーブル61のデータ構造を示す図である。合焦情報テーブル60は、フォーカスサーチ動作において最も至近端側でピントがあったときのフォーカスレンズ位置(Pnear)を示す情報(最近合焦レンズ位置)と、最も無限端側でピントがあったときのフォーカスレンズ位置(Pfar)を示す情報(最遠合焦レンズ位置)とを格納する(図7A参照)。さらに、合焦情報テーブル61は、各AF領域に対して、各AF領域に合焦するときのフォーカスレンズ111の位置と、各AF領域において合焦状態を有するフレームのフレーム番号とを対応づけて管理する(図7B参照)。 7A and 7B are diagrams showing the data structures of the focusing information table 60 and the focusing information table 61, respectively. The in-focus information table 60 has information (recently in-focus lens position) indicating the focus lens position (Pnear) when the focus is closest to the closest end in the focus search operation and the focus is closest to the infinite end. The information (the farthest focusing lens position) indicating the current focus lens position (Pfar) is stored (see FIG. 7A). Further, the focusing information table 61 associates each AF area with the position of the focus lens 111 when focusing on each AF area and the frame number of the frame having the focusing state in each AF area. Manage (see FIG. 7B).
例えば、フォーカスサーチ動作において、フォーカスレンズ111を移動させながらAF領域毎にコントラスト値を算出する。例えば、図6の(A)に示す第19AF領域41において、図6の(B)に示すように、フォーカスレンズ位置Pにおいてコントラスト値のピークが検出されるとする。その場合、図7Bに示す合焦情報テーブル61の第19AF領域の欄には、フォーカスレンズ位置Pが記録される。その後、マルチフォーカス動画の記録動作において、フォーカスレンズ位置Pのときに撮影されたフレームのフレーム番号(この例では、「50」)を、フォーカスレンズ111の位置(この例では「P」)と対応させて合焦情報テーブル61に記録する。合焦情報テーブル60及び合焦情報テーブル61は、例えば動画撮影により得られた動画データのヘッダ部に格納される。 For example, in the focus search operation, the contrast value is calculated for each AF area while moving the focus lens 111. For example, in the 19th AF area 41 shown in FIG. 6A, it is assumed that the peak of the contrast value is detected at the focus lens position P as shown in FIG. In that case, the focus lens position P is recorded in the column of the 19th AF area of the focusing information table 61 shown in FIG. 7B. Thereafter, in the multifocus moving image recording operation, the frame number of the frame shot at the focus lens position P (in this example, “50”) corresponds to the position of the focus lens 111 (in this example, “P”). And recorded in the focusing information table 61. The in-focus information table 60 and the in-focus information table 61 are stored, for example, in a header portion of moving image data obtained by moving image shooting.
図8のフローチャートを参照し、深度合成に使用するためのマルチフォーカス動画の記録処理(S1)の詳細を説明する。 Details of the multifocus moving image recording process (S1) for use in depth synthesis will be described with reference to the flowchart of FIG.
デジタルカメラ100において、マルチフォーカス動画を記録するための特定の撮影モードに設定された状態で、ユーザのズームレンズ112の操作等により所望の画角が設定される。画角が設定された後、ユーザによりレリーズボタン211が半押しされると(S11でYES)、コントローラ180は、画像のAF領域のそれぞれについて合焦位置を検出して合焦情報テーブル60及び合焦情報テーブル61を作成するためのフォーカスサーチを行う(S12)。 In the digital camera 100, a desired angle of view is set by a user's operation of the zoom lens 112 or the like in a state where a specific shooting mode for recording a multi-focus moving image is set. After the angle of view is set, when the user presses the release button 211 halfway (YES in S11), the controller 180 detects the in-focus position for each of the AF areas of the image to detect the in-focus information table 60 and the in-focus information table 60. A focus search for creating the focus information table 61 is performed (S12).
フォーカスサーチでは、コントローラ180は、フォーカスレンズ111を至近端から無限端に(またはその逆に)移動させながら、AF領域毎にコントラスト値を検出する(図6の(A)及び(B)参照)。 In the focus search, the controller 180 detects the contrast value for each AF area while moving the focus lens 111 from the closest end to the infinite end (or vice versa) (see FIGS. 6A and 6B). ).
そして、コントローラ180は、検出したコントラスト値に基づき合焦情報テーブル61を作成する。具体的には、コントローラ180は、フォーカスレンズ111を至近端から無限端に移動させたときに、AF領域毎に、複数の画像の中でコントラスト値が最大となるときのフォーカスレンズ111の位置を算出し(図6の(B)参照)、そのフォーカスレンズ111の位置を合焦情報テーブル61(図7Bのc行参照)に記録する。一のAF領域について、いずれの画像のコントラスト値も所定の閾値よりも低い場合、当該AF領域については、合焦位置が定まらないとし、合焦情報テーブル61には合焦位置が不明であることを示す所定の値が記録される。 Then, the controller 180 creates the focusing information table 61 based on the detected contrast value. Specifically, the controller 180 moves the focus lens 111 from the closest end to the infinite end, and the position of the focus lens 111 when the contrast value is maximum in a plurality of images for each AF area. Is calculated (see FIG. 6B), and the position of the focus lens 111 is recorded in the focusing information table 61 (see line c in FIG. 7B). When the contrast value of any image is lower than a predetermined threshold value for one AF area, the in-focus position is not determined for the AF area, and the in-focus position is unknown in the in-focus information table 61. A predetermined value indicating is recorded.
コントローラ180は全AF領域でフォーカスサーチを実行した後、さらに、フォーカスレンズ111を至近端から無限端に移動させたときに算出された合焦位置において、最も至近端に近い合焦位置(Pnear)と、最も無限端に近い合焦位置(Pfar)とを合焦情報テーブル60に記録する(図7Aのa行参照)。以上によりフォーカスサーチは終了する。なお、この状態では、合焦情報テーブル61において未だフレーム番号の情報は含まれていない。 After executing the focus search in the entire AF area, the controller 180 further moves the focus lens 111 from the closest end to the infinite end, and the in-focus position closest to the closest end ( Pnea) and the focus position (Pfar) closest to the infinite end are recorded in the focus information table 60 (see line a in FIG. 7A). Thus, the focus search ends. In this state, the focusing information table 61 does not yet include frame number information.
フォーカスサーチ終了後、コントローラ180は、ユーザによりレリーズボタン211の半押しが継続されているか否かを判断する(S13)。 After the focus search is completed, the controller 180 determines whether or not the release button 211 is half-pressed by the user (S13).
フォーカスサーチ終了後、ユーザによるレリーズボタン211の半押しがなされていない場合(S13でNO)、コントローラ180は、処理をステップS11に戻す。これにより、ユーザがフォーカスサーチをやり直すことができるようになる。 If the user has not pressed the release button 211 halfway after the focus search ends (NO in S13), the controller 180 returns the process to step S11. As a result, the user can redo the focus search.
フォーカスサーチ終了後も、ユーザによりレリーズボタン211の半押しが継続されている場合(S13でYES)、コントローラ180は引き続きレリーズボタン211が全押しされたか否かを判断する(S14)。 If the user continues to press the release button 211 halfway after the focus search is completed (YES in S13), the controller 180 continues to determine whether or not the release button 211 has been fully pressed (S14).
その後、ユーザによりレリーズボタン211が全押しされると(S14でYES)、マルチフォーカス動画を記録する動画記録動作が開始される(S15)。 Thereafter, when release button 211 is fully pressed by the user (YES in S14), a moving image recording operation for recording a multifocus moving image is started (S15).
すなわち、コントローラ180は、フォーカスレンズ111を至近端側に戻し、図9に示すように、フォーカスレンズ111を、最近フォーカスレンズ位置(Pnear)から最遠フォーカスレンズ位置(Pfar)まで移動させながら動画(マルチフォーカス動画)を記録する(S15)。動画記録時のフォーカスレンズ111の移動範囲を、フォーカスサーチで得られた範囲(Pnear〜Pfar)に制限することにより、合焦が得られない範囲においての動画記録が行われなくなる。その結果、動画記録にかかる時間を短縮できる。なお、動画記録は、動画データ用の所定のフォーマットに従い動画が記録される。例えば、MP4規格(H.264/MPEG‐4 AVC方式)に従い動画が記録される。動画記録実行中、表示モニタ220には、例えば、動画記録中であることを示すアイコンまたはメッセージ等を表示してもよい。 That is, the controller 180 returns the focus lens 111 to the closest end, and moves the focus lens 111 from the latest focus lens position (Pnear) to the farthest focus lens position (Pfar) as shown in FIG. (Multi-focus video) is recorded (S15). By limiting the moving range of the focus lens 111 during moving image recording to a range (Pnear to Pfar) obtained by the focus search, moving image recording is not performed in a range where focus cannot be obtained. As a result, the time required for moving image recording can be shortened. In the moving image recording, a moving image is recorded according to a predetermined format for moving image data. For example, a moving image is recorded according to the MP4 standard (H.264 / MPEG-4 AVC format). During execution of moving image recording, for example, an icon or a message indicating that moving image recording is in progress may be displayed on the display monitor 220.
また、コントローラ180は、動画記録中、各AF領域について、フォーカスレンズ111の位置と、動画を構成する各フレームのフレーム番号との対応づけを行う。すなわち、各AF領域について、合焦情報テーブル61のフォーカスレンズ位置(図7Bのc行参照)が示すフォーカスレンズ位置で撮影されたフレームの番号を特定し、フォーカスレンズ位置と対応づけて合焦情報テーブル61に記録する。これにより、合焦情報テーブル61において各AF領域に対してフレーム番号の対応づけがなされる(図7Bのb行参照)。 Further, the controller 180 associates the position of the focus lens 111 with the frame number of each frame constituting the moving image for each AF area during moving image recording. That is, for each AF area, the number of the frame shot at the focus lens position indicated by the focus lens position (see line c in FIG. 7B) of the focus information table 61 is specified, and the focus information is associated with the focus lens position. Record in table 61. Thus, the frame number is associated with each AF area in the focusing information table 61 (see the b line in FIG. 7B).
動画の記録実行中、表示モニタ220には記録中の画像が表示されるが、その際、画像における合焦領域に対して、合焦領域をユーザに認識させるための強調表示を行ってもよい。この強調表示を行うことで、ユーザは画像において合焦された領域を容易に把握することが可能になる。 During the recording of the moving image, the image being recorded is displayed on the display monitor 220. At that time, highlighting may be performed for the user to recognize the in-focus area with respect to the in-focus area in the image. . By performing this highlighting, the user can easily grasp the focused area in the image.
図8に戻り、動画の記録(S15)が終了すると、ヘッダ部に合焦情報テーブル60及び合焦情報テーブル61が記録された動画データをメモリカード200に記録する(S16)。これにより動画(マルチフォーカス動画)の記録処理(S1)が終了する。 Returning to FIG. 8, when the moving image recording (S15) is completed, the moving image data in which the focusing information table 60 and the focusing information table 61 are recorded in the header portion is recorded in the memory card 200 (S16). Thereby, the recording process (S1) of the moving image (multifocus moving image) ends.
動画記録(S1)の終了後、深度合成処理(S2)が実行される。 After the moving image recording (S1) is completed, a depth synthesis process (S2) is executed.
[2−1−2.深度合成処理]
以下、深度合成処理(S2)を説明する。図10は、深度合成処理を示すフローチャートである。深度合成処理では、コントローラ180は、まず、動画データを構成するフレーム画像を用いた深度合成処理における深度合成範囲(合成範囲)を自動設定し(S21)、設定された合成範囲に基づき合成処理を行う(S22)。以下、各処理(S21、S22)について説明する。
[2-1-2. Depth synthesis process]
Hereinafter, the depth synthesis process (S2) will be described. FIG. 10 is a flowchart showing the depth synthesis process. In the depth synthesis process, the controller 180 first automatically sets the depth synthesis range (synthesis range) in the depth synthesis process using the frame images constituting the moving image data (S21), and performs the synthesis process based on the set synthesis range. Perform (S22). Hereinafter, each process (S21, S22) will be described.
[2−1−2−1.深度合成範囲の設定]
図11〜図21を参照し、深度合成範囲の自動設定について説明する。
[2-1-2-1. Depth composition range setting]
The automatic setting of the depth synthesis range will be described with reference to FIGS.
図11は、深度合成範囲の設定処理を示すフローチャートである。深度合成範囲の設定処理において、コントローラ180は、まず、合焦情報テーブル61を参照して、AF領域毎に、各AF領域に含まれる被写体を特定する(S31)。すなわち、各AF領域が、画像中に含まれる複数の被写体のうちのいずれの被写体を含むかを特定する。例えば、マルチフォーカス動画を構成するフレーム画像が図12Aに示すように複数の被写体を含む場合、AF領域毎にそのAF領域に含まれる被写体を特定する。次に、コントローラ180は、AF領域毎に、被写体の重要度を特定する(S32)。ここで、被写体の重要度は被写体の画像中の位置に応じて設定される。次にコントローラ180は、被写体毎の累積重要度を算出する(S33)。累積重要度の算出方法については、後述する。次に、コントローラ180は深度合成の合成範囲を設定する(S34)。具体的には、コントローラ180は、被写体の累積重要度に基づき主要な被写体(以下、主要被写体という)を決定し、決定された主要被写体が合成範囲の中心となるように合成範囲を設定する。以下、上記の各処理(S31〜S34)について具体的に説明する。 FIG. 11 is a flowchart showing the setting process of the depth synthesis range. In the depth composition range setting process, the controller 180 first refers to the focus information table 61 and identifies the subject included in each AF area for each AF area (S31). That is, it is specified which of the plurality of subjects included in the image each AF region includes. For example, when the frame image constituting the multifocus moving image includes a plurality of subjects as shown in FIG. 12A, the subject included in the AF region is specified for each AF region. Next, the controller 180 specifies the importance of the subject for each AF area (S32). Here, the importance of the subject is set according to the position of the subject in the image. Next, the controller 180 calculates the cumulative importance for each subject (S33). A method for calculating the cumulative importance will be described later. Next, the controller 180 sets a synthesis range for depth synthesis (S34). Specifically, the controller 180 determines a main subject (hereinafter referred to as “main subject”) based on the cumulative importance of the subject, and sets the composite range so that the determined main subject is the center of the composite range. Hereinafter, each process (S31 to S34) will be described in detail.
最初に、各処理(S31〜S34)において使用する、被写体判定情報テーブルと、判定閾値テーブルと、重みテーブルとについて説明する。 First, a subject determination information table, a determination threshold table, and a weight table used in each process (S31 to S34) will be described.
図13は、被写体判定情報テーブル70の構成例を示す図である。被写体判定情報テーブル70は、各AF領域が、画像中に含まれる複数の被写体のうちのどの被写体(被写体の全部あるいは一部分)を含んでいるかを管理する情報である。図13に示すように、被写体判定情報テーブル70は、AF領域のフォーカスレンズ位置と、AF領域を示すAF領域番号と、AF領域に含まれる被写体を示す被写体番号と、AF領域に含まれる被写体の重要度を示す重要度とを互いに関連づけて管理する。被写体判定情報テーブル70において、各データはフォーカスレンズ位置の順にソートされている。 FIG. 13 is a diagram illustrating a configuration example of the subject determination information table 70. The subject determination information table 70 is information for managing which subject (all or a part of the subject) of a plurality of subjects included in the image is included in each AF area. As shown in FIG. 13, the subject determination information table 70 includes a focus lens position in the AF area, an AF area number indicating the AF area, a subject number indicating the subject included in the AF area, and a subject number included in the AF area. The importance level indicating the importance level is managed in association with each other. In the subject determination information table 70, each data is sorted in the order of the focus lens position.
図13は、図12Aに示すようにフレーム画像が複数の被写体1〜被写体8を含む場合の、被写体判定情報テーブル70の例を示している。被写体1は、図12Aに示すフレーム画像上における右下の花を示す。被写体2は、画像上において、被写体1の花よりも上側に配置された花を示す。被写体3は、画像上における中央の人物を示す。被写体4は、画像上における左下の花を示す。被写体5は、画像上における左側の人物を示す。被写体6は、画像上における右上の木々を示す。被写体7は、画像上における上側の空を示す。被写体8は、画像上における左上の雲を示す。図13に示す被写体番号1は、被写体1を示す。被写体番号2〜被写体番号8も同様に、被写体2〜被写体8とそれぞれ対応している。 FIG. 13 shows an example of the subject determination information table 70 when the frame image includes a plurality of subjects 1 to 8 as shown in FIG. 12A. The subject 1 shows the lower right flower on the frame image shown in FIG. 12A. The subject 2 shows a flower arranged above the flower of the subject 1 on the image. The subject 3 shows a central person on the image. The subject 4 shows the flower on the lower left on the image. A subject 5 shows a person on the left side of the image. The subject 6 shows the trees on the upper right on the image. The subject 7 shows the upper sky on the image. The subject 8 shows the upper left cloud on the image. A subject number 1 shown in FIG. Similarly, subject number 2 to subject number 8 correspond to subject 2 to subject 8, respectively.
図14は、判定閾値テーブル72の構成例を説明する図である。判定閾値テーブル72は、同一被写体であるか否かを判定するときのフォーカスレンズ位置の差(閾値)をフォーカスレンズ位置の所定範囲毎に管理する。判定閾値は、フォーカスレンズ位置の所定範囲毎に異なるよう設定されている。例えば、フォーカスレンズ位置が0以上100未満のときは、判定閾値は10に設定される。すなわち、隣接する2つのAF領域について、それぞれの領域のフォーカスレンズ位置がいずれも0〜100未満の範囲にある場合に、それらのAF領域のフォーカスレンズ位置の差が10(判定閾値)以内であれば、それら2つのAF領域の被写体は同じ被写体であると判定し、同一の被写体番号を付与する。判定閾値は、フォーカスレンズ位置の値が大きくなるほど(無限端に近くなるほど)、より大きな値に設定されている。また、所定範囲について、フォーカスレンズ位置がより無限端に近くなるほど、その幅が大きくなるように設定されている。このように設定することより、フォーカスレンズが至近端に近い位置にある場合、2つの領域においてフォーカスレンズ位置に少しでも差があれば、2つの領域の被写体は、別の被写体であると判定される。一方で、フォーカスレンズが無限端に近い位置にある場合、2つの領域においてフォーカスレンズ位置の差が大きくても、2つの領域の被写体は同一の被写体であると判定される。 FIG. 14 is a diagram illustrating a configuration example of the determination threshold value table 72. The determination threshold table 72 manages the difference (threshold) of the focus lens position when determining whether or not the subject is the same subject for each predetermined range of the focus lens position. The determination threshold is set to be different for each predetermined range of the focus lens position. For example, when the focus lens position is 0 or more and less than 100, the determination threshold is set to 10. That is, for two adjacent AF areas, when the focus lens positions of the respective areas are in the range of 0 to less than 100, the difference between the focus lens positions of those AF areas should be within 10 (determination threshold). For example, it is determined that the subjects in the two AF areas are the same subject, and the same subject number is assigned. The determination threshold is set to a larger value as the value of the focus lens position increases (closer to the infinite end). In addition, the predetermined range is set so that the width of the focus lens position increases as the focus lens position approaches the infinite end. By setting in this way, when the focus lens is close to the close end, if there is any difference in the focus lens position in the two areas, the subject in the two areas is determined to be another subject. Is done. On the other hand, when the focus lens is at a position close to the infinity end, it is determined that the subjects in the two areas are the same subject even if the difference between the focus lens positions in the two areas is large.
図15A及び図15Bを参照して重みテーブルについて説明する。重みテーブルは、各AF領域に含まれる被写体の重要度(重み)をAF領域毎に管理するテーブルである。実施の形態1では、図15Aに示すように、AF領域毎に、被写体の重要度を示す重みを設定している。特に、図15Aの例では、重み(重要度)は、画像の中心により近いほど、その値がより大きくなるように設定されている。これは、通常、撮影者が重要であると考える被写体は画像の中央の領域に配置されることが多いと考えられるからである。図15Bは、図15Aに示すように重みがAF領域毎に設定された場合の重みテーブル74の構成を示す図である。重みの設定の仕方は図15Aに示す態様に限定されるものではない。 The weight table will be described with reference to FIGS. 15A and 15B. The weight table is a table for managing the importance (weight) of the subject included in each AF area for each AF area. In the first embodiment, as shown in FIG. 15A, the weight indicating the importance of the subject is set for each AF area. In particular, in the example of FIG. 15A, the weight (importance) is set so that the value becomes larger as it is closer to the center of the image. This is because the subject considered to be important by the photographer is usually considered to be placed in the central area of the image. FIG. 15B is a diagram showing the configuration of the weight table 74 when the weight is set for each AF area as shown in FIG. 15A. The way of setting the weight is not limited to the mode shown in FIG. 15A.
図16のフローチャートを参照して、図11のフローチャートにおけるAF領域毎の被写体の算出処理(ステップS31)を具体的に説明する。コントローラ180は、まず、合焦情報テーブル61を参照し、被写体判定情報テーブル70において、「フォーカスレンズ位置(合焦位置)」と「AF領域番号」とに値を格納する(S41)。その際、コントローラ180は、合焦情報テーブル61のデータを、フォーカスレンズ位置(合焦位置)の小さい順(昇順)に並べ換えて、被写体判定情報テーブル70の“フォーカスレンズ位置(合焦位置)”と“AF領域番号”にそれぞれの値を格納する。 With reference to the flowchart of FIG. 16, the subject calculation processing (step S31) for each AF area in the flowchart of FIG. 11 will be specifically described. First, the controller 180 refers to the focus information table 61 and stores values in the “focus lens position (focus position)” and “AF area number” in the subject determination information table 70 (S41). At that time, the controller 180 rearranges the data in the focus information table 61 in ascending order of the focus lens position (focus position) (ascending order), and “focus lens position (focus position)” in the subject determination information table 70. And “AF area number” are stored.
このため、コントローラ180は、合焦情報テーブル61(図7B参照)からフォーカスレンズ位置順(昇順)にデータを読み出し、被写体判定情報テーブル70において、フォーカスレンズ位置と対応づけてAF領域番号を格納していく。ステップS41の処理の完了時点では、被写体判定情報テーブル70は未だ被写体番号と重要度が格納されておらず、未完成である。 For this reason, the controller 180 reads data from the focus information table 61 (see FIG. 7B) in the order of focus lens position (ascending order), and stores the AF area number in association with the focus lens position in the subject determination information table 70. To go. At the time of completion of the processing in step S41, the subject determination information table 70 has not yet been stored with the subject number and importance, and is incomplete.
次に、コントローラ180は、被写体判定情報テーブル70において被写体番号を格納するための処理を行う(S42〜S50)。コントローラ180は、まず、カウンタi及び変数「被写体No」のそれぞれを「1」に初期化する(S42)。 Next, the controller 180 performs processing for storing the subject number in the subject determination information table 70 (S42 to S50). First, the controller 180 initializes each of the counter i and the variable “subject No” to “1” (S42).
次に、コントローラ180は、被写体判定情報テーブル70におけるi番目のフォーカスレンズ位置(合焦位置)の値を、変数「基準位置」に設定する(S43)。 Next, the controller 180 sets the value of the i-th focus lens position (focus position) in the subject determination information table 70 to the variable “reference position” (S43).
次に、コントローラ180は、判定閾値テーブル72を参照して、同一被写体であるか否かを判定する際の判定基準となる閾値を取得する(S44)。実施の形態1では、コントローラ180は、同一被写体であるか否かを、フォーカスレンズ位置に基づいて判断する。具体的には、ある一つの被写体の合焦位置と、その被写体に隣接する他の被写体の合焦位置との差が閾値以下である場合、それらの被写体は同一の被写体であると判定する。このときの閾値が判定閾値テーブル72により提供される。前述のように、判定閾値テーブル72において、閾値は、フォーカスレンズ位置の所定の範囲毎に設定されている。 Next, the controller 180 refers to the determination threshold value table 72 and acquires a threshold value that serves as a determination criterion when determining whether or not the subject is the same subject (S44). In the first embodiment, the controller 180 determines whether or not the subject is the same subject based on the focus lens position. Specifically, if the difference between the in-focus position of one subject and the in-focus position of another subject adjacent to the subject is equal to or less than a threshold value, the subjects are determined to be the same subject. The threshold value at this time is provided by the determination threshold value table 72. As described above, in the determination threshold value table 72, the threshold value is set for each predetermined range of the focus lens position.
コントローラ180は、被写体判定情報テーブル70におけるi番目のフォーカスレンズ位置(合焦位置)の値を、変数「現在位置」に設定する(S45)。次に、コントローラ180は、現在位置と基準位置の差が閾値以下であるか否かを判定する(S46)。 The controller 180 sets the value of the i-th focus lens position (focus position) in the subject determination information table 70 to the variable “current position” (S45). Next, the controller 180 determines whether or not the difference between the current position and the reference position is equal to or less than a threshold value (S46).
現在位置と基準位置の差が閾値以下である場合(S46でYES)、コントローラ180は、被写体判定情報テーブル70におけるi番目の被写体番号の値に、被写体Noの値を設定する(S47)。これは、現在位置と基準位置の差分が閾値未満である場合、現在位置にある被写体と基準位置にある被写体は、互いのフォーカスレンズ位置が近いため、同一被写体であると判断できるからである。 If the difference between the current position and the reference position is equal to or smaller than the threshold (YES in S46), the controller 180 sets the value of the subject No as the value of the i-th subject number in the subject determination information table 70 (S47). This is because if the difference between the current position and the reference position is less than the threshold, the subject at the current position and the subject at the reference position can be determined to be the same subject because the focus lens positions are close to each other.
そしてカウンタiの値を1だけインクリメントする(S48)。その後、ステップS49でカウンタiの値が49以下か否かを判断する。カウンタiの値が49以下の場合(ステップS49でYES)は、ステップS45に戻る。カウンタiの値が49を超える場合(ステップS49でNO)は、処理を終了する。 Then, the value of the counter i is incremented by 1 (S48). Thereafter, in step S49, it is determined whether or not the value of the counter i is 49 or less. If the value of counter i is 49 or less (YES in step S49), the process returns to step S45. If the value of counter i exceeds 49 (NO in step S49), the process ends.
一方、ステップS46で、現在位置と基準位置の差分が閾値より大きい場合(S46でNO)、コントローラ180は、被写体Noを1だけインクリメントし(S50)、ステップS43に戻る。 On the other hand, if the difference between the current position and the reference position is larger than the threshold value in step S46 (NO in S46), the controller 180 increments the subject number by 1 (S50) and returns to step S43.
以上の処理により被写体判定情報テーブル70において、フォーカスレンズ位置(合焦位置)、AF領域番号、および被写体番号が設定される。これにより、図12Bに示すように、AF領域毎のフォーカスレンズ位置に基づいてフレーム画像から複数の被写体1〜被写体8が具体的に抽出される。しかし、この時点では、被写体判定情報テーブル70において重要度は未だ設定されていない。 With the above processing, the focus lens position (focus position), the AF area number, and the subject number are set in the subject determination information table 70. As a result, as shown in FIG. 12B, a plurality of subjects 1 to 8 are specifically extracted from the frame image based on the focus lens position for each AF area. However, at this time, the importance level is not yet set in the subject determination information table 70.
次に、図17のフローチャートを参照して、図11のフローチャートにおける、各AF領域に含まれる被写体の重要度の特定処理(ステップS32)と被写体毎の累積重要度の算出処理(ステップS33)とを具体的に説明する。 Next, referring to the flowchart of FIG. 17, in the flowchart of FIG. 11, the process of specifying the importance of the subject included in each AF area (step S32) and the process of calculating the cumulative importance for each subject (step S33) Will be described in detail.
コントローラ180はまず、被写体判定情報テーブル70の「重要度」を設定する(S51)。具体的には、コントローラ180は、重みテーブル74から各AF領域の「重み」を取得し、被写体判定情報テーブル70における“重要度”に格納する。これにより、図13に示すように、すべての値が格納された被写体判定情報テーブル70が完成される。ステップS51が、図11のステップS32の詳細なステップである。 First, the controller 180 sets “importance” in the subject determination information table 70 (S51). Specifically, the controller 180 acquires the “weight” of each AF area from the weight table 74 and stores it in “importance” in the subject determination information table 70. Thereby, as shown in FIG. 13, the subject determination information table 70 in which all values are stored is completed. Step S51 is a detailed step of step S32 in FIG.
次に、コントローラ180は、被写体毎の累積重要度を算出するための処理を行う(S52〜S60)。そのため、コントローラ180は、まず、カウンタiを「1」に、変数「累積重要度」を「0」に初期化する(S52)。 Next, the controller 180 performs processing for calculating the cumulative importance for each subject (S52 to S60). Therefore, the controller 180 first initializes the counter i to “1” and the variable “cumulative importance” to “0” (S52).
その後、コントローラ180は、被写体判定情報テーブル70におけるi番目のフォーカスレンズ位置(合焦位置)に対応する「被写体番号」の値を、変数「基準被写体No」に設定する(S53)。さらに、コントローラ180は、i番目のフォーカスレンズ位置(合焦位置)に対応する「被写体番号」の値を、変数「現在被写体No」に設定する(S54)。 Thereafter, the controller 180 sets the value of “subject number” corresponding to the i-th focus lens position (focus position) in the subject determination information table 70 to the variable “reference subject No” (S53). Further, the controller 180 sets the value of “subject number” corresponding to the i-th focus lens position (focus position) to the variable “current subject No” (S54).
次に、コントローラ180は、基準被写体Noと現在被写体Noとを比較する(S55)。基準被写体Noと現在被写体Noとが等しい場合(S55でYES)、コントローラ180は、変数「累積重要度」の値に、被写体判定情報テーブル70のi番目のフォーカスレンズ位置に対応する重要度の値を加算する(S56)。つまり、ステップS56では、被写体判定情報テーブル70において同じ被写体番号を有するAF領域に対して、重要度が合算される。このように同じ被写体番号を有するAF領域の重要度を合算することにより、画像上における面積の大きい被写体ほど、累積重要度が高い値を有することになる。また、各AF領域の重要度について、画像内の被写体の位置に基づいて重みづけられた値を用いている。このように、実施の形態1では、被写体の累積重要度を、被写体の画像上における面積および位置に基づいて設定している。 Next, the controller 180 compares the reference subject No with the current subject No (S55). When the reference subject No and the current subject No are equal (YES in S55), the controller 180 sets the importance value corresponding to the i-th focus lens position of the subject determination information table 70 to the value of the variable “cumulative importance”. Are added (S56). That is, in step S56, the importance is added to the AF areas having the same subject number in the subject determination information table 70. By summing the importance of AF areas having the same subject number in this way, a subject having a larger area on the image has a higher cumulative importance. For the importance of each AF area, a value weighted based on the position of the subject in the image is used. As described above, in the first embodiment, the cumulative importance of the subject is set based on the area and position of the subject on the image.
その後、コントローラ11は、カウンタiを1だけインクリメントし(S57)、カウンタiが49以下か否かを判断する(S58)。カウンタiの値が49以下の場合(ステップS58でYES)、ステップS54に戻る。カウンタiの値が49を超える場合(ステップS58でNO)、処理を終了する。 Thereafter, the controller 11 increments the counter i by 1 (S57), and determines whether the counter i is 49 or less (S58). If the value of counter i is 49 or less (YES in step S58), the process returns to step S54. If the value of counter i exceeds 49 (NO in step S58), the process ends.
一方、基準被写体Noと現在被写体Noとが等しくない場合(S55でNO)、コントローラ180は、変数「基準被写体No」が示す値(被写体番号)と、変数「累積重要度」の現在の値とを対応づけて、被写体毎の累積重要度を管理する被写体重要度テーブルに格納する(S59)。図18は、被写体重要度テーブルの構成例を示す図である。被写体重要度テーブル76は、被写体番号と、累積重要度とを対応付けて管理する。 On the other hand, when the reference subject No and the current subject No are not equal (NO in S55), the controller 180 determines the value (subject number) indicated by the variable “reference subject No” and the current value of the variable “cumulative importance”. Are stored in a subject importance table for managing the cumulative importance for each subject (S59). FIG. 18 is a diagram illustrating a configuration example of the subject importance degree table. The subject importance level table 76 manages subject numbers and cumulative importance in association with each other.
その後、変数「累積重要度」の値を0にリセットし(S60)、ステップS53に戻る。これにより、累積重要度が算出される対象が、被写体判定情報テーブル70において次の被写体番号が示す被写体に移行する。 Thereafter, the value of the variable “cumulative importance” is reset to 0 (S60), and the process returns to step S53. As a result, the target whose cumulative importance is calculated shifts to the subject indicated by the next subject number in the subject determination information table 70.
上記の処理を繰り返すことで、被写体判定情報テーブル70に記録された被写体番号が示す全ての被写体のそれぞれに対して累積重要度が算出され、算出結果が被写体重要度テーブル76に格納される。これらのステップS52〜S60は、図11のステップS33の詳細なステップである。 By repeating the above processing, the cumulative importance is calculated for each of all subjects indicated by the subject numbers recorded in the subject determination information table 70, and the calculation result is stored in the subject importance table 76. These steps S52 to S60 are detailed steps of step S33 in FIG.
以上のようにして記録した被写体重要度テーブル76を参照し、深度合成処理において使用する画像の範囲を設定する。図19は、図11のフローチャートにおける、深度合成範囲の算出処理(ステップS34)の詳細な処理を示すフローチャートである。本処理では、深度合成処理において使用する画像の範囲を設定する。 With reference to the subject importance degree table 76 recorded as described above, the range of the image used in the depth synthesis process is set. FIG. 19 is a flowchart showing a detailed process of the depth synthesis range calculation process (step S34) in the flowchart of FIG. In this process, the range of the image used in the depth synthesis process is set.
コントローラ180は、被写体重要度テーブル76を参照し、最も高い累積重要度に対応する被写体番号を取得する(S61)。例えば、図18に示す例では、コントローラ180は、最も高い累積重要度「101」に対応する被写体番号「3」を取得する。このように、最も高い累積重要度に対応する被写体番号を特定することで、ユーザが重要であると考える主要被写体を検出している。 The controller 180 refers to the subject importance degree table 76 and acquires the subject number corresponding to the highest cumulative importance (S61). For example, in the example illustrated in FIG. 18, the controller 180 acquires the subject number “3” corresponding to the highest cumulative importance “101”. Thus, the main subject that the user considers important is detected by specifying the subject number corresponding to the highest cumulative importance.
次に、コントローラ180は、被写体判定情報テーブル70を参照し、取得した被写体番号(すなわち、主要被写体)に対応づけられたフォーカスレンズ位置(合焦位置)の中で、最も至近端側にあるフォーカスレンズ位置(以下「最近フォーカス位置」という)と、最も無限端側のフォーカスレンズ位置(以下「最遠フォーカス位置」という)とを取得する(S62)。例えば、最も高い累積重要度に対応する被写体番号として「3」が取得された場合(すなわち、「被写体3」が主要被写体として検出された場合)、被写体判定情報テーブル70(図13)から、被写体番号「3」に対応づけられたフォーカスレンズ位置の中で、最近フォーカス位置として「400」が、最遠フォーカス位置として「470」が取得される。 Next, the controller 180 refers to the subject determination information table 70, and is located closest to the focus lens position (focus position) associated with the acquired subject number (that is, the main subject). The focus lens position (hereinafter referred to as “most recent focus position”) and the focus lens position closest to the infinite end (hereinafter referred to as “farthest focus position”) are acquired (S62). For example, when “3” is acquired as the subject number corresponding to the highest cumulative importance (that is, when “subject 3” is detected as the main subject), the subject is determined from the subject determination information table 70 (FIG. 13). Among the focus lens positions associated with the number “3”, “400” is acquired as the most recent focus position and “470” is acquired as the farthest focus position.
次に、コントローラ180は、最近フォーカス位置と最遠フォーカス位置から、合成範囲の中心となるフォーカスレンズ位置(以下「合成範囲の中心位置」という)を算出する(S63)。具体的には、コントローラ180は、最近フォーカス位置と最遠フォーカス位置の中間値に最も近いフォーカスレンズ位置を被写体判定情報テーブル70から取得する。なお、被写体判定情報テーブル70において、中間値に最も近いフォーカスレンズ位置の候補が、中間値よりも至近端側及び無限端側の双方にある場合、AF領域の数が多い方を、中間値に最も近いフォーカスレンズ位置とする。つまり、中間値に最も近い至近端側のフォーカスレンズ位置が記録されたAF領域の数と、中間値に最も近い無限端側のフォーカスレンズ位置が記録されたAF領域の数とを比較して、数が多い方に対応するフォーカスレンズ位置を、中間値に最も近いフォーカスレンズ位置として設定する。なお、中間値に最も近いフォーカスレンズ位置を、AF領域の数によらず、単純に至近端側および無限遠側のいずれかにおいて最も近いフォーカスレンズ位置に決めてもよい。そして、コントローラ180は、中間値に最も近いフォーカスレンズ位置を合成範囲の中心位置に設定する。 Next, the controller 180 calculates a focus lens position (hereinafter referred to as “the center position of the synthesis range”) that is the center of the synthesis range from the latest focus position and the farthest focus position (S63). Specifically, the controller 180 acquires from the subject determination information table 70 the focus lens position that is closest to the intermediate value between the latest focus position and the farthest focus position. In the subject determination information table 70, when the focus lens position candidate closest to the intermediate value is on both the near end side and the infinite end side with respect to the intermediate value, the one with the larger number of AF areas is set to the intermediate value. The focus lens position closest to. That is, the number of AF areas in which the focus lens position closest to the intermediate value is recorded is compared with the number of AF areas in which the focus lens position closest to the intermediate value is recorded. The focus lens position corresponding to the larger number is set as the focus lens position closest to the intermediate value. Note that the focus lens position closest to the intermediate value may be simply determined as the closest focus lens position on either the closest end side or the infinity side, regardless of the number of AF areas. Then, the controller 180 sets the focus lens position closest to the intermediate value as the center position of the synthesis range.
例えば、図13に示す被写体判定情報テーブル70から、被写体番号「3」に対応づけられた最至近端側のフォーカスレンズ位置として「400」が、最無限端側のフォーカスレンズ位置として「470」が取得された場合、その中間値は「435」と算出される。この場合、中間値「435」に最も近いフォーカスレンズ位置の候補として、至近端側のフォーカスレンズ位置「430」と無限遠側のフォーカスレンズ位置「440」がある。フォーカスレンズ位置が「430」となるAF領域としては、AF領域番号「11」を持つ領域の1つのみである。これに対し、フォーカスレンズ位置が「440」となるAF領域として、AF領域番号「17」、「19」、および「32」を持つ3つの領域がある。よって、フォーカスレンズ位置が「440」となるAF領域の方が、フォーカスレンズ位置が「430」となるAF領域よりも数が多いため、中間値に最も近いフォーカスレンズ位置は「440」となる。このようにして、被写体判定情報テーブル70において中間値「435」に最も近いフォーカスレンズ位置として「440」が算出される。このフォーカスレンズ位置「440」が合成範囲の中心位置として設定される。 For example, from the subject determination information table 70 shown in FIG. 13, “400” is the closest focus lens position associated with the subject number “3”, and “470” is the most infinite focus lens position. Is acquired, the intermediate value is calculated as “435”. In this case, the focus lens position “430” on the closest end side and the focus lens position “440” on the infinity side are candidates for the focus lens position closest to the intermediate value “435”. The AF area where the focus lens position is “430” is only one area having the AF area number “11”. On the other hand, there are three areas having AF area numbers “17”, “19”, and “32” as AF areas where the focus lens position is “440”. Therefore, since there are more AF areas where the focus lens position is “440” than there are AF areas where the focus lens position is “430”, the focus lens position closest to the intermediate value is “440”. In this way, “440” is calculated as the focus lens position closest to the intermediate value “435” in the subject determination information table 70. This focus lens position “440” is set as the center position of the synthesis range.
図19に戻り、次に、コントローラ180は、合成範囲の中心位置に基づき深度の合成範囲を設定する(S64)。具体的には、コントローラ180は、合成範囲の中心位置におけるフォーカスレンズ位置から至近端側へ所定値だけ離れた位置を、合成範囲として設定可能な範囲(以下、設定可能範囲という)の下限として算出する。さらに、コントローラ180は、合成範囲の中心位置におけるフォーカスレンズ位置から無限端側へフォーカスレンズ位置が所定値だけ離れた位置を設定可能範囲の上限として算出する。 Returning to FIG. 19, the controller 180 then sets the depth synthesis range based on the center position of the synthesis range (S <b> 64). Specifically, the controller 180 sets, as a lower limit of a range that can be set as a synthesis range (hereinafter referred to as a settable range), a position that is a predetermined value away from the focus lens position toward the closest end at the center position of the synthesis range. calculate. Further, the controller 180 calculates a position where the focus lens position is separated by a predetermined value from the focus lens position at the center position of the synthesis range toward the infinite end as an upper limit of the settable range.
ここで、前述の所定値は、画像を合成したときに合成画像が破綻しないような距離に設定される。一つの画像において隣接する2つの領域を深度の合成範囲とする場合に、2つの領域間のフォーカスレンズ位置(合焦位置)の差が大きいと、不自然な合成画像が得られる場合がある。これは、2つの領域間のフォーカスレンズ位置(合焦位置)の差が大きいと、それぞれの領域での合焦状態(ボケ方)が大きく異なるためである。つまり、それらの2つの領域を結合したときに境界近傍でつながり具合が滑らかにならないためである。そこで、実施の形態1では、深度合成する際に、フォーカスレンズ位置(合焦位置)の差が所定値より大きい領域間で合成がなされないよう、合成範囲に対応するフォーカスレンズ位置の範囲を制限する。 Here, the above-mentioned predetermined value is set to such a distance that the combined image does not fail when the images are combined. In the case where two adjacent areas in one image are set as the depth synthesis range, if the difference in focus lens position (focus position) between the two areas is large, an unnatural synthesized image may be obtained. This is because when the difference in focus lens position (focus position) between the two areas is large, the focus state (blurring method) in each area is greatly different. That is, when these two regions are combined, the connection is not smooth in the vicinity of the boundary. In the first embodiment, therefore, the range of the focus lens position corresponding to the synthesis range is limited so that the synthesis is not performed between the areas where the difference in focus lens position (focus position) is larger than a predetermined value when performing the depth synthesis. To do.
そして、コントローラ180は、被写体判定情報テーブル70を参照し、合成範囲として設定可能な範囲内に対応する、至近端に最も近いフォーカスレンズ位置(以下「合成範囲の始点位置」という)を特定する。また、コントローラ180は、被写体判定情報テーブル70を参照し、合成範囲として設定可能な範囲内に対応する、無限端に最も近いフォーカスレンズ位置(以下「合成範囲の終点位置」という)を特定する。これにより、主要被写体を中心とした所定範囲が合成範囲として設定される。 Then, the controller 180 refers to the subject determination information table 70 and identifies a focus lens position closest to the closest end (hereinafter referred to as “composition range start point position”) corresponding to a range that can be set as the composition range. . Further, the controller 180 refers to the subject determination information table 70 and specifies the focus lens position closest to the infinite end (hereinafter referred to as “composition range end point position”) corresponding to the range that can be set as the composition range. As a result, a predetermined range centered on the main subject is set as the synthesis range.
図20を参照し、上述した合成範囲の設定処理を、具体例を用いて説明する。合成範囲の中心のフォーカスレンズ位置(合焦位置)が「440」、破綻を起こさないための所定値が「300」である場合の例を説明する。この場合、合成範囲として設定可能な範囲の下限として「140」(=440−300)が、合成範囲として設定可能な範囲の上限として「740」(=440+300)が算出される。被写体判定情報テーブル70を参照すると、設定可能範囲(140から740の間の範囲)において、最近フォーカスレンズ位置として「150」が、最遠フォーカスレンズ位置として「640」が特定される。よって、深度合成処理の合成範囲として、150から640のフォーカスレンズ位置(合焦位置)の範囲が設定される。 With reference to FIG. 20, the above-described synthesis range setting process will be described using a specific example. An example will be described in which the focus lens position (focus position) at the center of the synthesis range is “440” and the predetermined value for preventing failure is “300”. In this case, “140” (= 440−300) is calculated as the lower limit of the range that can be set as the synthesis range, and “740” (= 440 + 300) is calculated as the upper limit of the range that can be set as the synthesis range. Referring to the subject determination information table 70, “150” is specified as the closest focus lens position and “640” is specified as the farthest focus lens position in the settable range (range between 140 and 740). Accordingly, the range of the focus lens position (focus position) from 150 to 640 is set as the synthesis range of the depth synthesis process.
図21の(A)〜(C)は、主要被写体に対して設定される深度合成処理の合成範囲を説明する図である。例えば、実施の形態1では、被写体3が主要被写体として特定されている。この場合、図21の(A)に示すように、被写体3を中心として合成範囲が設定される。図12Bに示す被写体2が主要被写体である場合は、図21の(B)に示すように、被写体2を中心として合成範囲が設定される。図12Bに示す被写体4が主要被写体である場合は、図21の(C)に示すように、被写体4を中心として合成範囲が設定される。図21の(A)〜(C)において、非合成域とは、深度合成したときに画像が破綻する可能性が高い領域である。すなわち、合成範囲の領域と非合成域との境界では、フォーカスレンズ位置(合焦位置)の差が非常に大きくなり、深度合成したときに不自然な画像が生成される可能性が高い。このため、実施の形態1では、至近端側および無限端側それぞれにおいて、合成範囲の中心位置におけるフォーカスレンズ位置からフォーカスレンズ位置が所定値以上離れた領域を、合成処理には使用しない非合成域として設定している。 FIGS. 21A to 21C are diagrams for explaining the synthesis range of the depth synthesis process set for the main subject. For example, in the first embodiment, the subject 3 is specified as the main subject. In this case, as shown in FIG. 21A, a composition range is set with the subject 3 as the center. When the subject 2 shown in FIG. 12B is a main subject, a synthesis range is set around the subject 2 as shown in FIG. When the subject 4 shown in FIG. 12B is the main subject, a synthesis range is set around the subject 4 as shown in FIG. In (A) to (C) of FIG. 21, the non-compositing area is an area where there is a high possibility that an image will fail when depth synthesis is performed. That is, the difference between the focus lens positions (in-focus positions) becomes very large at the boundary between the synthesis range area and the non-synthesis area, and it is highly possible that an unnatural image is generated when the depth synthesis is performed. For this reason, in the first embodiment, on each of the closest end side and the infinite end side, a region where the focus lens position is a predetermined value or more away from the focus lens position at the center position of the synthesis range is not used for the synthesis process. It is set as an area.
[2−1−2−2.合成処理]
以上のようにして深度合成処理の合成範囲(すなわち、始点位置と終点位置)が設定されると、合成範囲内で合焦するフレーム画像が深度合成され、合成画像が生成される。このため、コントローラ180は、図7Bに示す合焦情報テーブル61を参照して、合成範囲の始点位置(フォーカスレンズ位置)と、合成範囲の終点位置(フォーカスレンズ位置)のそれぞれに対応するフレーム番号を特定する。コントローラ180は、特定した2つのフレーム番号が示すフレーム画像と、それらの間にあるフレーム画像との全部または一部のフレーム画像を用いて深度合成処理を行う。深度合成処理については公知の技術が使用できる。
[2-1-2-2. Compositing process]
When the synthesis range (that is, the start point position and the end point position) of the depth synthesis process is set as described above, the frame images that are focused within the synthesis range are depth-synthesized, and a synthesized image is generated. For this reason, the controller 180 refers to the focus information table 61 shown in FIG. 7B, and the frame number corresponding to each of the start point position (focus lens position) of the composite range and the end point position (focus lens position) of the composite range. Is identified. The controller 180 performs the depth synthesis process using all or part of the frame images indicated by the two specified frame numbers and the frame image between them. A known technique can be used for the depth synthesis process.
[3.効果等]
以上のように、実施の形態1のデジタルカメラ100(撮像装置の一例)は、合焦位置を変化させながら被写体像を撮像して複数の画像データを生成するCCD140(撮像部の一例)と、CCD140により生成された複数のフレーム画像データ(複数の画像データの一例)を合成して複数の画像データの被写界深度より深い被写界深度を有する静止画データを生成する画像処理部160(画像処理部の一例)と、画像処理部160を制御するコントローラ180(制御部の一例)と、を備える。コントローラ180は、複数のフレーム画像データの中の1つのフレーム画像データが示す画像から主要被写体を検出し、検出した主要被写体の位置を基準に、複数の画像データを合成する範囲を決定し、前記複数の画像データのうち決定した範囲内で合焦する画像データを合成して静止画データを生成するように、画像処理部160を制御する。
[3. Effect]
As described above, the digital camera 100 (an example of an imaging device) according to the first embodiment includes the CCD 140 (an example of an imaging unit) that captures a subject image while changing a focus position and generates a plurality of image data. An image processing unit 160 that combines a plurality of frame image data (an example of a plurality of image data) generated by the CCD 140 to generate still image data having a depth of field deeper than the depth of field of the plurality of image data. An example of an image processing unit), and a controller 180 (an example of a control unit) that controls the image processing unit 160. The controller 180 detects a main subject from an image indicated by one frame image data among the plurality of frame image data, determines a range in which the plurality of image data are combined based on the detected position of the main subject, The image processing unit 160 is controlled so as to generate still image data by combining image data to be focused within a determined range among a plurality of image data.
以上の構成を有するデジタルカメラ100は、画像から主要被写体を自動で検出し、主要被写体を中心として深度合成範囲を設定し、設定した範囲内で合焦する画像データを用いて深度合成処理を実施する。このため、ユーザは、深度合成範囲の指定などの作業を省略でき、合成時の画像破綻が発生しない範囲で、最も被写界深度の深い画像を手軽に得ることができる。 The digital camera 100 having the above configuration automatically detects a main subject from an image, sets a depth composition range around the main subject, and performs a depth composition process using image data that is focused within the set range. To do. For this reason, the user can omit operations such as designating the depth synthesis range, and can easily obtain an image with the deepest depth of field within a range in which image failure does not occur during synthesis.
また実施の形態1では、デジタルカメラ100において、コントローラ180は、1つのフレーム画像データが示す画像に含まれる複数の被写体のそれぞれについて重要度(例えば図18に示す累積重要度)を算出し、算出した重要度に基づき複数の被写体の中から主要被写体を設定する。これにより、主要被写体を中心とした合成画像を生成できるため、ユーザがより重要と考える被写体を中心に合焦した画像が得られる。 In the first embodiment, in the digital camera 100, the controller 180 calculates the importance (for example, the cumulative importance shown in FIG. 18) for each of a plurality of subjects included in the image indicated by one frame image data. Based on the importance, the main subject is set from among a plurality of subjects. As a result, a composite image centered on the main subject can be generated, so that an image focused on the subject considered more important by the user can be obtained.
重要度(累積重要度)は、被写体の画像上における面積、位置、および種類等のうちいずれか一つのパラメータに基づいて算出されてもよく、複数のパラメータに基づいて算出されてもよい。実施の形態1では、重要度は、被写体の画像上における面積が大きい程、より高い値に設定される。さらに実施の形態1では、重要度は、被写体の位置が画像の中心により近い程、より高い値に設定される。このように被写体の画像上における面積と位置の双方に基づき重要度を設定することで、ユーザがより重要と考える被写体を中心に合焦した画像がより効率よく得られる。 The importance (cumulative importance) may be calculated based on any one parameter among the area, position, type, and the like of the subject on the image, or may be calculated based on a plurality of parameters. In the first embodiment, the importance is set to a higher value as the area of the subject on the image is larger. Further, in the first embodiment, the importance is set to a higher value as the position of the subject is closer to the center of the image. By setting the importance based on both the area and the position of the subject on the image in this way, an image focused on the subject that the user considers more important can be obtained more efficiently.
また実施の形態1では、コントローラ180は、画像を複数のAF領域(領域の一例)に分割して識別する。そしてコントローラ180は、複数の領域のうち、隣接する2つの領域(例えば第1の領域と第2の領域)の合焦位置の差が図14に示す判定閾値(所定値の一例)以下である場合に、隣接する2つの領域は、少なくとも一つの同じ被写体を含むと判定する。このようにしてコントローラ180は被写体の異同を判定することできる。 In the first embodiment, the controller 180 identifies the image by dividing it into a plurality of AF areas (an example of areas). Then, the controller 180 has a difference in focus position between two adjacent areas (for example, the first area and the second area) of the plurality of areas equal to or less than the determination threshold value (an example of the predetermined value) illustrated in FIG. In this case, it is determined that two adjacent areas include at least one same subject. In this way, the controller 180 can determine the difference between subjects.
また実施の形態1では、判定閾値は、合焦位置に応じて異なるように設定される(判定閾値テーブル72参照)。例えば、合焦位置が至近端に近いほど、判定閾値はより小さく設定され、合焦位置が至近端から遠ざかるほど(すなわち無限端に近いほど)、判定閾値はより大きく設定されてもよい(図14参照)。至近側で異なる合焦位置で撮影した画像は画像のぼけ量が多いため、画像合成時に破綻する可能性が高い。このため、至近側では判定閾値はより小さく設定される。一方、遠側の合焦位置で撮影した画像は、画像全体にフォーカスが合うため、画像合成時に破綻する可能性が低い。このため、遠側では、判定閾値は大きく設定される。この判定閾値は撮影に利用するレンズに応じて変更されても良い。 In the first embodiment, the determination threshold is set to be different depending on the in-focus position (see determination threshold table 72). For example, the determination threshold may be set smaller as the in-focus position is closer to the close end, and the determination threshold may be set to be larger as the in-focus position is farther from the close end (that is, closer to the infinite end). (See FIG. 14). Since images taken at different in-focus positions on the close side have a large amount of blurring of the image, there is a high possibility that the image will fail during image synthesis. For this reason, the determination threshold is set smaller on the close side. On the other hand, an image taken at the far-in-focus position is in focus on the entire image, and is therefore less likely to fail during image composition. For this reason, the determination threshold is set large on the far side. This determination threshold value may be changed according to the lens used for photographing.
また実施の形態1では、コントローラ180は、主要被写体を検出する際に、フレーム番号(複数の画像データをそれぞれ特定する情報の一例)と、複数の画像データのそれぞれにおける合焦されたAF領域を示す情報と、複数の画像データのそれぞれを生成する際のフォーカスレンズ位置(合焦位置)とを対応づけた合焦情報テーブル61とを用いて主要被写体を検出する。合焦情報テーブル61を参照することで、フォーカスレンズ位置(合焦位置)と、フレーム画像との対応づけが可能となる。 In the first embodiment, the controller 180 detects the frame number (an example of information for specifying a plurality of image data) and the focused AF area in each of the plurality of image data when detecting the main subject. The main subject is detected using the focusing information table 61 that associates the information shown with the focus lens position (focusing position) when generating each of the plurality of image data. By referring to the focusing information table 61, it is possible to associate the focus lens position (focusing position) with the frame image.
また実施の形態1では、CCD140(撮像部の一例)は、被写体像を撮像して動画データを生成する。複数の画像データは、動画データを構成する複数のフレーム画像のデータである。これにより実施の形態1では、短時間で複数の画像データを得ることができ、合成処理に要する時間を短縮できる。 In the first embodiment, the CCD 140 (an example of an imaging unit) captures a subject image and generates moving image data. The plurality of image data is data of a plurality of frame images constituting the moving image data. Thus, in the first embodiment, a plurality of image data can be obtained in a short time, and the time required for the synthesis process can be shortened.
[4.主要被写体の自動設定における具体例]
実施の形態1では、深度合成範囲を設定する際、主要被写体を設定する。そして実施の形態1では、主要被写体を設定する際に、被写体の面積と位置とに基づいて重要度を算出し、この重要度に基づいて主要被写体を設定している。以下、この主要被写体の設定について、他の具体例を用いて説明する。
[4. Specific example of automatic main subject setting]
In the first embodiment, the main subject is set when setting the depth synthesis range. In the first embodiment, when setting the main subject, the importance is calculated based on the area and position of the subject, and the main subject is set based on the importance. Hereinafter, the setting of the main subject will be described using another specific example.
図22Aは、複数の被写体を含むフレーム画像の例を示す図である。これらの被写体の画像上における面積は、互いに異なる。図22Bは図22Aのフレーム画像にAF領域を示す枠を重畳した図である。 FIG. 22A is a diagram illustrating an example of a frame image including a plurality of subjects. The areas of these subjects on the image are different from each other. FIG. 22B is a diagram in which a frame indicating an AF area is superimposed on the frame image of FIG. 22A.
図22Aでは、画像上において、被写体としてトンネル81と自動車82が配置されている。画像上において、トンネル81の面積は自動車82の面積よりも大きい。例えば図22Bに示すように、トンネル81の面積は、領域91の大きさに相当し、18個のAF領域分である。自動車82の面積は、領域92の大きさに相当し、1個のAF領域分である。また画像上において、トンネル81と自動車82の合焦位置は充分に異なる。合焦位置が充分に異なるとは、合成すると画像破綻が生じる範囲として予め定められた範囲以上に離れていることを意味する。そしてトンネル81の合焦位置は至近端側により近く、自動車82の合焦位置は無限端側により近い。またトンネル81と自動車82の画像上における中心位置はいずれも画像の中央であり、等しい。 In FIG. 22A, a tunnel 81 and an automobile 82 are arranged as subjects on the image. On the image, the area of the tunnel 81 is larger than the area of the automobile 82. For example, as shown in FIG. 22B, the area of the tunnel 81 corresponds to the size of the region 91 and is equivalent to 18 AF regions. The area of the automobile 82 corresponds to the size of the area 92 and is equivalent to one AF area. On the image, the in-focus positions of the tunnel 81 and the automobile 82 are sufficiently different. That the in-focus positions are sufficiently different means that they are separated from a predetermined range or more as a range in which image breakdown occurs when combined. The in-focus position of the tunnel 81 is closer to the closest end side, and the in-focus position of the automobile 82 is closer to the infinite end side. Further, the center positions of the tunnel 81 and the car 82 on the image are the center of the image and are equal.
以上のような図22Aの画像が撮像された場合、実施の形態1のデジタルカメラ100は、画像上における面積がより大きいトンネル81を主要被写体とする。そしてこのトンネル81を中心に、深度合成範囲を設定する。 When the image of FIG. 22A as described above is captured, the digital camera 100 of Embodiment 1 uses the tunnel 81 having a larger area on the image as a main subject. A depth synthesis range is set around the tunnel 81.
図23Aは、中心位置の異なる複数の被写体を含むフレーム画像の例を示す図である。図23Bは図22Aのフレーム画像にAF領域を示す枠を重畳した図である。 FIG. 23A is a diagram illustrating an example of a frame image including a plurality of subjects having different center positions. FIG. 23B is a diagram in which a frame indicating an AF area is superimposed on the frame image of FIG. 22A.
図23Aでは、画像上において、被写体として大型船83と小型船84とが配置されている。大型船83の画像上における面積と小型船84の画像上における面積とは等しい。例えば図23Bに示すように、大型船83の面積は、領域93の大きさに相当し、8個のAF領域分である。小型船84の面積は、領域94の大きさに相当し、8個のAF領域分である。また画像上において、大型船83と小型船84の合焦位置は充分に異なる。充分に異なるとは、前述のとおり、合成すると画像破綻が生じる範囲として予め定められた範囲以上に離れていることを意味する。また大型船83と小型船84の画像上における中心位置は異なる。大型船83は画像上における左端に位置し、小型船84は大型船83より画像の中心に近い位置に位置する。 In FIG. 23A, a large ship 83 and a small ship 84 are arranged as subjects on the image. The area of the large ship 83 on the image is equal to the area of the small ship 84 on the image. For example, as shown in FIG. 23B, the area of the large ship 83 corresponds to the size of the region 93 and is equivalent to eight AF regions. The area of the small boat 84 corresponds to the size of the region 94 and is equivalent to eight AF regions. On the image, the focal positions of the large ship 83 and the small ship 84 are sufficiently different. As described above, “sufficiently different” means that the image is broken beyond a predetermined range as a range in which image breakdown occurs when the images are combined. The center positions of the large ship 83 and the small ship 84 on the image are different. The large ship 83 is located at the left end on the image, and the small ship 84 is located closer to the center of the image than the large ship 83.
図23Aの画像が撮像された場合、実施の形態1のデジタルカメラ100は、画像上における中心位置がより画像の中心に近い小型船84を主要被写体とする。そしてこの小型船84を中心に、深度合成範囲を設定する。 When the image of FIG. 23A is captured, the digital camera 100 according to Embodiment 1 uses the small ship 84 whose center position on the image is closer to the center of the image as a main subject. A depth synthesis range is set around the small ship 84.
以上のように、実施の形態1のデジタルカメラ(撮像装置の一例)を別の側面で表現すれば、デジタルカメラは、複数の画像データを合成して、複数の画像データのそれぞれにおける主要被写体の被写界深度よりも静止画データにおける主要被写体の被写界深度の方が深くなるように静止画データを生成する。デジタルカメラは、複数の画像データのそれぞれの画像上において、第1の被写体と第2の被写体とが配置される場合に、第1の被写体と第2の被写体の画像上における面積が異なり、かつ第1の被写体と第2の被写体の合焦位置が異なり、かつ第1の被写体と第2の被写体の画像上の中心位置が等しいとき、第1の被写体と第2の被写体のうち、画像上における面積がより大きい方を主要被写体とする。またこのデジタルカメラは、複数の画像データのそれぞれの画像上において、第1の被写体と第2の被写体とが配置される場合に、第1の被写体と第2の被写体の画像上における面積が等しく、かつ第1の被写体と第2の被写体の合焦位置が異なり、かつ第1の被写体と第2の被写体の画像上の中心位置が異なるとき、第1の被写体と第2の被写体のうち、画像の中心により近い方を主要被写体とする。 As described above, if the digital camera of the first embodiment (an example of an imaging device) is expressed in another aspect, the digital camera combines a plurality of image data, and the main subject in each of the plurality of image data. Still image data is generated so that the depth of field of the main subject in the still image data is deeper than the depth of field. In the digital camera, when the first subject and the second subject are arranged on each image of the plurality of image data, the areas of the first subject and the second subject on the image are different, and When the in-focus positions of the first subject and the second subject are different and the center positions on the images of the first subject and the second subject are equal, the first subject and the second subject The larger subject area is the main subject. In addition, in the digital camera, when the first subject and the second subject are arranged on each of the plurality of image data, the areas of the first subject and the second subject on the image are equal. And when the in-focus positions of the first subject and the second subject are different and the center positions on the images of the first subject and the second subject are different, of the first subject and the second subject, The one closer to the center of the image is the main subject.
実施の形態1のデジタルカメラ100は、深度の合成範囲を自動で設定するにあたり、ユーザがより重要と考える被写体を中心に合成範囲を設定できる。よって、ユーザの求める被写界深度の深い画像を手軽に得ることが出来る。 The digital camera 100 according to the first embodiment can set the synthesis range centering on the subject that the user considers more important when automatically setting the depth synthesis range. Therefore, it is possible to easily obtain an image with a deep depth of field desired by the user.
(他の実施の形態)
以上のように、本出願において開示する技術の例示として、実施の形態1を説明した。しかしながら、本開示における技術は、これに限定されず、適宜、変更、置き換え、付加、省略などを行った実施の形態にも適用可能である。また、上記実施の形態1で説明した各構成要素を組み合わせて、新たな実施の形態とすることも可能である。そこで、以下、他の実施の形態を例示する。
(Other embodiments)
As described above, the first embodiment has been described as an example of the technique disclosed in the present application. However, the technology in the present disclosure is not limited to this, and can also be applied to an embodiment in which changes, replacements, additions, omissions, and the like are appropriately performed. Moreover, it is also possible to combine each component demonstrated in the said Embodiment 1, and it can also be set as a new embodiment. Therefore, other embodiments will be exemplified below.
(1)上記の実施の形態1では、マルチフォーカス動画を構成するフレーム画像を用いて深度合成を行ったが、動画を構成するフレーム画像ではなく、連写撮影により生成された複数の静止画を用いて深度合成を行ってもよい。 (1) In Embodiment 1 described above, depth synthesis is performed using frame images that constitute a multi-focus moving image. However, a plurality of still images generated by continuous shooting are used instead of frame images that constitute a moving image. Depth synthesis may be performed.
(2)上記の実施の形態1においては、被写体の画像上における面積および画像内の位置の双方に基づき被写体の重要度(累積重要度)を設定したが、いずれか一方の条件に基づき重要度を設定してもよい。または、被写体の画像上における面積および画像内の位置に加えて又はそれらに代えて、他の条件に基づき重要度を設定してもよい。例えば、被写体の種類に応じて重要度を設定してもよい。具体的には、被写体が人の顔である場合に重要度が高くなるように設定し、そうでない場合に重要度が低くなるように設定してもよい。さらには、被写体の合焦位置に応じて重要度を設定してもよい。具体的には、最も至近端側で合焦する被写体の重要度が高くなるように設定してもよい。また実施の形態1においては、主要被写体の中心を深度合成範囲の中心としたが、主要被写体の中心を深度合成範囲の始点または終点としてもよい。例えば最も至近端側の合焦位置を始点とし、深度合成範囲を定めてもよい。 (2) In Embodiment 1 described above, the importance level (cumulative importance level) of the subject is set based on both the area of the subject on the image and the position in the image. However, the importance level is set based on one of the conditions. May be set. Alternatively, the importance may be set based on other conditions in addition to or instead of the area of the subject on the image and the position in the image. For example, the importance may be set according to the type of subject. Specifically, when the subject is a person's face, the importance may be set to be high, and when it is not, the importance may be set to be low. Furthermore, the importance may be set according to the focus position of the subject. Specifically, it may be set so that the degree of importance of the subject focused on the closest end side becomes high. In the first embodiment, the center of the main subject is the center of the depth synthesis range, but the center of the main subject may be the start point or the end point of the depth synthesis range. For example, the depth composition range may be determined using the in-focus position closest to the end as a starting point.
(3)上記の実施の形態1に開示した思想は、レンズ交換式カメラ及びレンズ一体型カメラの双方の種類のデジタルカメラに対して適用できる。 (3) The idea disclosed in the first embodiment can be applied to both types of digital cameras, that is, an interchangeable lens camera and a lens-integrated camera.
(4)上記の実施の形態1では、撮像装置の一例としてデジタルカメラを用いて説明したが、撮像装置はこれに限定されない。本開示の思想は、デジタルビデオカメラ、スマートフォン、ウェアラブルカメラ等の動画が撮影できる種々の撮像装置に対して適用することができる。 (4) In Embodiment 1 described above, the digital camera is used as an example of the imaging apparatus, but the imaging apparatus is not limited to this. The idea of the present disclosure can be applied to various imaging devices capable of shooting moving images, such as a digital video camera, a smartphone, and a wearable camera.
(5)上記の実施の形態では、撮像部としての撮像素子をCCDで構成したが、撮像素子はこれに限定されない。撮像素子はNMOS(n‐Channel Metal‐Oxide Semiconductor)イメージセンサまたはCMOS(Complementary Metal Oxide Semiconductor)イメージセンサで構成してもよい。 (5) In the above embodiment, the image pickup device as the image pickup unit is configured by the CCD, but the image pickup device is not limited to this. The imaging device may be configured by an NMOS (n-Channel Metal-Oxide Semiconductor) image sensor or a CMOS (Complementary Metal Oxide Semiconductor) image sensor.
以上のように、本開示における技術の例示として、実施の形態を説明した。そのために、添付図面および詳細な説明を提供した。したがって、添付図面および詳細な説明に記載された構成要素の中には、課題解決のために必須な構成要素だけでなく、上記技術を例示するために、課題解決のためには必須でない構成要素も含まれ得る。そのため、それらの必須ではない構成要素が添付図面または詳細な説明に記載されていることをもって、直ちに、それらの必須ではない構成要素が必須であるとの認定をするべきではない。また、上述の実施の形態は、本開示における技術を例示するためのものであるから、特許請求の範囲またはその均等の範囲において種々の変更、置き換え、付加、省略などを行うことができる。 As described above, the embodiments have been described as examples of the technology in the present disclosure. For this purpose, the accompanying drawings and detailed description are provided. Accordingly, among the components described in the accompanying drawings and the detailed description, not only the components essential for solving the problem, but also the components not essential for solving the problem in order to illustrate the above technique. May also be included. Therefore, it should not be immediately recognized that these non-essential components are essential as those non-essential components are described in the accompanying drawings or the detailed description. Moreover, since the above-mentioned embodiment is for demonstrating the technique in this indication, a various change, replacement, addition, abbreviation, etc. can be performed in a claim or its equivalent range.
本開示は、動画を撮影できる撮像装置に対して適用可能である。具体的には、デジタルカメラ、デジタルビデオカメラ、スマートフォン、ウェアラブルカメラ等の動画が撮影できる種々の撮像装置に対して適用することができる。 The present disclosure is applicable to an imaging apparatus that can capture a moving image. Specifically, the present invention can be applied to various imaging devices that can shoot moving images, such as digital cameras, digital video cameras, smartphones, and wearable cameras.
60 合焦情報テーブル
61 合焦情報テーブル
70 被写体判定情報テーブル
72 判定閾値テーブル
74 重みテーブル
81 トンネル
82 自動車
83 大型船
84 小型船
91 領域
92 領域
93 領域
94 領域
100 デジタルカメラ(撮像装置)
110 光学系
111 フォーカスレンズ
112 ズームレンズ
113 手振れ補正レンズ
120 レンズ駆動部
130 シャッタ
140 CCD(撮像部)
150 A/Dコンバータ
160 画像処理部
170 バッファ
180 コントローラ(制御部)
190 カードスロット
200 メモリカード
210 操作部材
220 表示モニタ
240 内蔵メモリ
300 絞り部
400 画像領域
60 Focus Information Table 61 Focus Information Table 70 Subject Determination Information Table 72 Determination Threshold Table 74 Weight Table 81 Tunnel 82 Automobile 83 Large Ship 84 Small Ship 91 Area 92 Area 93 Area 94 Area 100 Digital Camera (Imaging Device)
DESCRIPTION OF SYMBOLS 110 Optical system 111 Focus lens 112 Zoom lens 113 Camera shake correction lens 120 Lens drive part 130 Shutter 140 CCD (imaging part)
150 A / D converter 160 Image processing unit 170 Buffer 180 Controller (control unit)
190 card slot 200 memory card 210 operation member 220 display monitor 240 built-in memory 300 aperture unit 400 image area
Claims (9)
前記撮像部により生成された前記複数の画像データを合成して、前記複数の画像データそれぞれの被写界深度より深い被写界深度を有する静止画データを生成する画像処理部と、
前記画像処理部を制御する制御部と、を備え、
前記制御部は、
前記複数の画像データの中の1つの画像データが示す画像から主要被写体を検出し、検出した前記主要被写体の位置に基づき、前記複数の画像データを合成する範囲を決定し、前記複数の画像データのうち決定した前記範囲内で合焦する画像データを合成して前記静止画データを生成するように、前記画像処理部を制御する
撮像装置。 An imaging unit that captures a subject image while changing a focus position and generates a plurality of image data;
An image processing unit that synthesizes the plurality of image data generated by the imaging unit and generates still image data having a depth of field deeper than a depth of field of each of the plurality of image data;
A control unit for controlling the image processing unit,
The controller is
A main subject is detected from an image indicated by one image data of the plurality of image data, a range in which the plurality of image data is combined is determined based on the detected position of the main subject, and the plurality of image data An image pickup apparatus that controls the image processing unit so as to generate the still image data by combining image data that is focused within the determined range.
前記複数の画像データは前記動画データを構成する複数のフレーム画像のデータである、請求項1記載の撮像装置。 The imaging unit captures the subject image to generate moving image data,
The imaging apparatus according to claim 1, wherein the plurality of image data is data of a plurality of frame images constituting the moving image data.
前記複数の画像データのそれぞれの画像上において、第1の被写体と第2の被写体とが配置される場合に、
前記第1の被写体と前記第2の被写体の前記画像上における面積が異なり、かつ前記第1の被写体と前記第2の被写体の合焦位置が異なり、かつ前記第1の被写体と前記第2の被写体の前記画像上の中心位置が等しいとき、前記第1の被写体と前記第2の被写体のうち、前記画像上における前記面積がより大きい方を前記主要被写体とし、
かつ、
前記第1の被写体と前記第2の被写体の前記画像上における前記面積が等しく、かつ前記第1の被写体と前記第2の被写体の前記合焦位置が異なり、かつ前記第1の被写体と前記第2の被写体の前記画像上の前記中心位置が異なるとき、前記第1の被写体と前記第2の被写体のうち、前記画像の中心により近い方を前記主要被写体とする、
画像合成方法。 Combining a plurality of image data, the still image data is converted so that the depth of field of the main subject in the still image data is deeper than the depth of field of the main subject in each of the plurality of image data. An image composition method for generating,
When a first subject and a second subject are arranged on each of the plurality of image data,
The areas of the first subject and the second subject on the image are different, the in-focus positions of the first subject and the second subject are different, and the first subject and the second subject are different. When the center position of the subject on the image is equal, the larger of the area on the image of the first subject and the second subject is the main subject,
And,
The areas of the first subject and the second subject on the image are equal, the in-focus positions of the first subject and the second subject are different, and the first subject and the first subject are different. When the center positions of the two subjects on the image are different, the one closer to the center of the image of the first subject and the second subject is the main subject.
Image composition method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/801,082 US10412321B2 (en) | 2016-12-12 | 2017-11-01 | Imaging apparatus and image synthesis method |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016240449 | 2016-12-12 | ||
| JP2016240449 | 2016-12-12 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2018098764A true JP2018098764A (en) | 2018-06-21 |
Family
ID=62633153
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017143357A Pending JP2018098764A (en) | 2016-12-12 | 2017-07-25 | Imaging apparatus and image composition method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2018098764A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2021097350A (en) * | 2019-12-18 | 2021-06-24 | キヤノン株式会社 | Image processing device, imaging device, image processing method, program, and recording medium |
-
2017
- 2017-07-25 JP JP2017143357A patent/JP2018098764A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2021097350A (en) * | 2019-12-18 | 2021-06-24 | キヤノン株式会社 | Image processing device, imaging device, image processing method, program, and recording medium |
| JP7409604B2 (en) | 2019-12-18 | 2024-01-09 | キヤノン株式会社 | Image processing device, imaging device, image processing method, program and recording medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10282825B2 (en) | Image processing apparatus and imaging apparatus | |
| WO2013088917A1 (en) | Image processing device, image processing method, and recording medium | |
| US10234653B2 (en) | Imaging device with focus lens stopped at each of focus positions during video capturing | |
| JP6621027B2 (en) | Imaging device | |
| US10477101B2 (en) | Focus detection apparatus, control method and storage medium | |
| US11010030B2 (en) | Electronic apparatus capable of performing display control based on display mode, control method thereof, and non-transitory computer readable medium | |
| JP6598028B2 (en) | Imaging device | |
| US10412321B2 (en) | Imaging apparatus and image synthesis method | |
| JP4657960B2 (en) | Imaging method and apparatus | |
| JP2018046543A (en) | Image processor and imaging apparatus | |
| JP6300076B2 (en) | Imaging apparatus, imaging method, and program | |
| US10277801B2 (en) | Image capture device | |
| JP2013210572A (en) | Imaging device and control program of the same | |
| JP6865395B2 (en) | Imaging device | |
| US20170264819A1 (en) | Imaging device | |
| WO2020044844A1 (en) | Signal processing device, signal processing method, signal processing program, and image capture device | |
| JP6603892B2 (en) | Imaging device | |
| JP2018098764A (en) | Imaging apparatus and image composition method | |
| JP6347056B2 (en) | Imaging apparatus and still image generation method | |
| WO2015182021A1 (en) | Image pickup control apparatus, image pickup apparatus, and image pickup control method | |
| JP4823964B2 (en) | Imaging apparatus and imaging method | |
| JP2017058563A (en) | Automatic focusing apparatus, imaging apparatus, and automatic focusing method | |
| JP2017167518A (en) | Imaging device | |
| JP2018046542A (en) | Image processor and imaging apparatus | |
| JP2017152759A (en) | Imaging device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20190121 |