JP6260652B2 - Image generating apparatus, image generating method, and program - Google Patents

Image generating apparatus, image generating method, and program Download PDF

Info

Publication number
JP6260652B2
JP6260652B2 JP2016139862A JP2016139862A JP6260652B2 JP 6260652 B2 JP6260652 B2 JP 6260652B2 JP 2016139862 A JP2016139862 A JP 2016139862A JP 2016139862 A JP2016139862 A JP 2016139862A JP 6260652 B2 JP6260652 B2 JP 6260652B2
Authority
JP
Japan
Prior art keywords
image
focus
focus position
shooting
imaging
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.)
Expired - Fee Related
Application number
JP2016139862A
Other languages
Japanese (ja)
Other versions
JP2016208530A (en
Inventor
康佑 松本
康佑 松本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2016139862A priority Critical patent/JP6260652B2/en
Publication of JP2016208530A publication Critical patent/JP2016208530A/en
Application granted granted Critical
Publication of JP6260652B2 publication Critical patent/JP6260652B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像生成装置、画像生成方法及びプログラムに関する。 The present invention relates to an image generation apparatus, an image generation method, and a program.

従来、画像生成装置は、後方から前方までの各被写体の全てに焦点を合わせた画像(以下、「全焦点画像」という)を生成する場合、超深度レンズ(通称「虫の目レンズ」)といった特殊なレンズを使用して撮像を行ってる。
しかしながら、虫の目レンズは、全長が非常に長いため、携帯に不便である。
そのため、通常のレンズを搭載した画像生成装置が、一回のシャッタ操作により、同一の構図の被写体を所定の複数のフォーカス位置でほぼ同時に複数撮影し、その結果得られる複数の撮像画像のデータを合成することによって、全焦点画像のデータを生成する技術が開示されている(特許文献1を参照)。
Conventionally, an image generating apparatus, an image focused on all the subjects from the rear to the front (hereinafter referred to as "all-in-focus images") when generating, such ultra-deep lenses (commonly known as "worms eye lens") Ru performing imaging using a special lens.
However, the insect lens is very inconvenient to carry because of its very long overall length.
For this reason, an image generation apparatus equipped with a normal lens shoots a plurality of subjects having the same composition at a predetermined plurality of focus positions almost simultaneously by a single shutter operation, and obtains data of a plurality of captured images obtained as a result. A technique for generating omnifocal image data by synthesizing is disclosed (see Patent Document 1).

特開2007−282152号公報JP 2007-282152 A

しかしながら、特許文献1においては、全焦点画像のデータの生成に用いる撮像画像は、同一の構図の被写体を所定の複数のフォーカス位置でほぼ同時に複数撮影しているために、撮影する領域の被写体を考慮せずに、撮影を行う。このため、全焦点画像のデータの生成に適さない撮像画像を取得して合成してしまうため、生成される全焦点画像の画質に影響してしまう等の問題があった。 However, in Patent Document 1, the captured image used for generating the data of the omnifocal image captures a plurality of subjects having the same composition at a plurality of predetermined focus positions almost simultaneously. Take a picture without considering it. For this reason, since a captured image that is not suitable for generation of omnifocal image data is acquired and synthesized , there is a problem in that the image quality of the generated omnifocal image is affected .

本発明は、このような状況に鑑みてなされたものであり、画質を考量した全焦点画像を生成することを目的とする。 The present invention has been made in view of such a situation, and an object thereof is to generate an omnifocal image taking image quality into consideration.

記目的を達成するため、本発明に係る画像生成装置の一態様は、
全焦点画像を生成する画像生成装置であって、
撮像手段と、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定手段と、
前記測定手段により測定されて得られた前記被写体のフォーカス位置が、1回の撮影で得られる撮影画像で前記撮像手段が有するレンズの被写界深度の範囲に含まれる場合には、前記1回の撮影のみい保存画像として記憶し、一方、含まれない場合には、複数の異なるフォーカス位置による撮影で得られる複数の撮影画像を合成して前記全焦点画像を生成して保存画像として記憶する画像生成手段と、
を備える
ことを特徴とする。
また、前記目的を達成するため、本発明に係る画像生成装置の一態様は、
全焦点画像を生成する画像生成装置であって、
撮像手段と、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定手段と、
前記測定手段により測定されて得られた前記被写体のフォーカス位置に基づき、前記全焦点画像を生成する撮影のためのフォーカス位置を決定する決定手段と、
前記決定手段により決定された撮影のためのフォーカス位置が1箇所である場合には、前記決定手段により決定された撮影のためのフォーカス位置で1回の撮影のみを行い保存画像として記憶し、一方、異なる複数箇所である場合には、前記決定手段により決定された異なる複数の撮影のためのフォーカス位置による撮影で得られる複数の撮影画像を合成して、前記全焦点画像を生成して保存画像として記憶する画像生成手段と、
を備える、
ことを特徴とする。
また、前記目的を達成するため、本発明に係る画像生成方法の一態様は、
撮像手段を備え、全焦点画像を生成する画像生成装置で実行される画像生成方法において、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定処理と、
前記測定処理において測定されて得られた前記被写体のフォーカス位置が、1回の撮影で得られる撮影画像で前記撮像手段が有するレンズの被写界深度の範囲に含まれる場合には、前記1回の撮影のみを行い保存画像として記憶し、一方、含まれない場合には、複数の異なるフォーカス位置による撮影で得られる複数の撮影画像を合成して前記全焦点画像を生成して保存画像として記憶する画像生成処理と、
を含む、
ことを特徴とする。
また、前記目的を達成するため、本発明に係る画像生成方法の一態様は、
撮像手段を備え、全焦点画像を生成する画像生成装置で実行される画像生成方法において、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定処理と、
前記測定処理において測定されて得られた前記被写体のフォーカス位置に基づき、前記全焦点画像を生成する撮影のためのフォーカス位置を決定する決定処理と、
前記決定処理において決定された撮影のためのフォーカス位置が1箇所である場合には、前記決定処理において決定された撮影のためのフォーカス位置で1回の撮影のみを行い保存画像として記憶し、一方、異なる複数箇所である場合には、前記決定処理において決定された異なる複数の撮影のためのフォーカス位置による撮影で得られる複数の撮影画像を合成して、前記全焦点画像を生成して保存画像として記憶する画像生成処理と、
を含む、
ことを特徴とする。
また、前記目的を達成するため、本発明に係るプログラムの一態様は、
撮像手段を備え、全焦点画像を生成する画像生成装置を制御するコンピュータに、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定機能、
前記測定機能により測定されて得られた前記被写体のフォーカス位置が、1回の撮影で得られる撮影画像で前記撮像手段が有するレンズの被写界深度の範囲に含まれる場合には、前記1回の撮影のみを行い保存画像として記憶し、一方、含まれない場合には、複数の異なるフォーカス位置による撮影で得られる複数の撮影画像を合成して前記全焦点画像を生成して保存画像として記憶する画像生成機能、
を実現させる、
ことを特徴とする。
また、前記目的を達成するため、本発明に係るプログラムの一態様は、
撮像手段を備え、全焦点画像を生成する画像生成装置を制御するコンピュータに、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定機能、
前記測定機能により測定されて得られた前記被写体のフォーカス位置に基づき、前記全焦点画像を生成する撮影のためのフォーカス位置を決定する決定機能、
前記決定機能により決定された撮影のためのフォーカス位置が1箇所である場合には、前記決定機能により決定された撮影のためのフォーカス位置で1回の撮影のみを行い保存画像として記憶し、一方、異なる複数箇所である場合には、前記決定機能により決定された異なる複数の撮影のためのフォーカス位置による撮影で得られる複数の撮影画像を合成して、前記全焦点画像を生成して保存画像として記憶する画像生成機能、
を実現させる、
ことを特徴とする。
To achieve the pre-Symbol purpose, one aspect of the images generating device according to the present invention,
An image generation device that generates an omnifocal image,
Imaging means;
Measuring means for measuring the focus positions of a plurality of subjects included in the captured image captured by the imaging means;
The focus position of the object obtained by being measured by the measuring means, when included in the scope of a single depth of field of the lens included in the imaging means photographed image obtained by photographing, the one storing the captured only as a line had stored image, whereas, if not included, as the stored image to generate the total-focus image synthesized and a plurality of captured images obtained by shooting by a plurality of different focus position Image generation means for storing ;
Equipped with a,
It is characterized by that.
In order to achieve the above object, one aspect of the image generating apparatus according to the present invention is:
An image generation device that generates an omnifocal image,
Imaging means;
Measuring means for measuring the focus positions of a plurality of subjects included in the captured image captured by the imaging means;
Determining means for determining a focus position for photographing that generates the omnifocal image based on the focus position of the subject obtained by measurement by the measuring means;
When the focus position for shooting determined by the determining means is one, only one shooting is performed at the focus position for shooting determined by the determining means and stored as a stored image, When there are a plurality of different locations, a plurality of captured images obtained by shooting at different focus positions determined by the determining means are combined to generate the omnifocal image and save image Image generating means for storing as,
Comprising
It is characterized by that.
In order to achieve the above object, one aspect of the image generation method according to the present invention is:
In an image generation method executed by an image generation apparatus that includes an imaging unit and generates an omnifocal image,
A measurement process for measuring focus positions of a plurality of subjects included in the captured image captured by the imaging unit;
When the focus position of the subject obtained by measurement in the measurement process is included in the range of the depth of field of the lens included in the imaging unit in a photographed image obtained by one photographing, the one time If not included, a plurality of captured images obtained by shooting at a plurality of different focus positions are combined to generate the omnifocal image and store it as a stored image. Image generation processing to
including,
It is characterized by that.
In order to achieve the above object, one aspect of the image generation method according to the present invention is:
In an image generation method executed by an image generation apparatus that includes an imaging unit and generates an omnifocal image,
A measurement process for measuring focus positions of a plurality of subjects included in the captured image captured by the imaging unit;
A determination process for determining a focus position for shooting to generate the omnifocal image based on the focus position of the subject obtained by measurement in the measurement process;
When the focus position for shooting determined in the determination process is one place, only one shooting is performed at the focus position for shooting determined in the determination process and stored as a saved image. In the case where there are a plurality of different locations, a plurality of captured images obtained by shooting at different focus positions determined in the determination process are combined to generate the omnifocal image and save image Image generation processing stored as
including,
It is characterized by that.
In order to achieve the above object, one aspect of the program according to the present invention is as follows:
A computer that includes an imaging unit and controls an image generation apparatus that generates an omnifocal image,
A measurement function for measuring the focus positions of a plurality of subjects included in the captured image captured by the imaging unit;
When the focus position of the subject obtained by the measurement function is included in the range of the depth of field of the lens included in the imaging unit in a photographed image obtained by one photographing, the one time If not included, a plurality of captured images obtained by shooting at a plurality of different focus positions are combined to generate the omnifocal image and store it as a stored image. Image generation function,
To realize,
It is characterized by that.
In order to achieve the above object, one aspect of the program according to the present invention is as follows:
A computer that includes an imaging unit and controls an image generation apparatus that generates an omnifocal image,
A measurement function for measuring the focus positions of a plurality of subjects included in the captured image captured by the imaging unit;
A determination function for determining a focus position for photographing that generates the omnifocal image based on the focus position of the subject obtained by measurement by the measurement function;
When the focus position for shooting determined by the determination function is one location, only one shooting is performed at the focus position for shooting determined by the determination function and stored as a saved image. In the case of a plurality of different locations, a plurality of captured images obtained by shooting at different focus positions determined by the determination function are combined to generate the omnifocal image and save image As an image generation function,
To realize,
It is characterized by that.

本発明によれば、画質を考量した全焦点画像を生成することができる。 According to the present invention, it is possible to generate an omnifocal image that takes image quality into consideration.

本実施形態におけるフォーカスブラケティング撮影の概要について説明する模式図である。It is a schematic diagram explaining the outline | summary of focus bracketing imaging | photography in this embodiment. 本発明の一実施形態に係る撮像装置のハードウェアの構成を示すブロック図である。It is a block diagram which shows the structure of the hardware of the imaging device which concerns on one Embodiment of this invention. 図2の撮像装置の機能的構成のうち、全焦点画像生成処理を実行するための機能的構成を示す機能ブロック図である。It is a functional block diagram which shows the functional structure for performing an omnifocal image generation process among the functional structures of the imaging device of FIG. 撮影位置及び撮影枚数の決定の手法の具体例を示す模式図である。It is a schematic diagram which shows the specific example of the method of determination of an imaging position and the imaging | photography number. 被写界深度の配置及び撮影位置の決定の手法の具体例を示す図である。It is a figure which shows the specific example of the method of arrangement | positioning of a depth of field, and the determination of an imaging position. 図1とは異なる撮影領域とした場合の撮影位置及び撮影枚数の決定の他の具体例を示す模式図である。It is a schematic diagram which shows the other specific example of determination of the imaging | photography position and imaging | photography number at the time of setting it as the imaging | photography area | region different from FIG. 図3の機能的構成を有する図2の撮像装置が実行する全焦点画像生成処理の流れを説明するフローチャートである。4 is a flowchart for explaining a flow of omnifocal image generation processing executed by the imaging apparatus of FIG. 2 having the functional configuration of FIG. 3. 頻度分布における重み付けの具体例について説明する模式図である。It is a schematic diagram explaining the specific example of the weighting in frequency distribution.

以下、本発明の一実施形態に係る撮像装置について、図面を参照して説明する。   Hereinafter, an imaging apparatus according to an embodiment of the present invention will be described with reference to the drawings.

本実施形態における全焦点画像の生成は、フォーカスブラケティング撮影により複数の全焦点画像を構成する撮像画像を取得して、当該撮像画像を合成することにより行う。
ここで、「フォーカスブラケティング撮影」とは、撮像装置に搭載される入力手段であるシャッタボタンを一回押すだけで、任意の被写体にフォーカスが合った位置(所定のフォーカス位置)と、レンズの駆動手段を駆動調整してその前後にフォーカスをずらした位置(所定のフォーカス位置からずらしたフォーカス位置)との各々で複数枚の撮像画像を連写して撮像画像を取得する撮影手法である。
本実施形態においては、フォーカスブラケティング撮影は、所定の間隔でのフォーカス位置で撮像画像を撮影するのではなく、撮影領域に含まれる被写体の距離、即ち、被写体にフォーカスが合う位置を考慮して決定されたフォーカス位置で撮影する。
The generation of the omnifocal image in the present embodiment is performed by acquiring captured images constituting a plurality of omnifocal images by focus bracketing imaging and synthesizing the captured images.
Here, “focus bracketing shooting” refers to a position where a subject is focused (predetermined focus position) by simply pressing a shutter button, which is an input means mounted on the imaging device, and a lens. This is an imaging technique in which a plurality of captured images are continuously captured at each of positions where the driving means is driven and the focus is shifted before and after that (focus position shifted from a predetermined focus position).
In the present embodiment, focus bracketing shooting does not take a captured image at a focus position at a predetermined interval, but considers the distance of the subject included in the shooting region, that is, the position where the subject is focused. Shoot at the determined focus position.

図1は、本実施形態におけるフォーカスブラケティング撮影の概要について説明する模式図である。なお、図1の例では、「公園」で「花」や「草」を撮影する場合について説明する。   FIG. 1 is a schematic diagram for explaining an overview of focus bracketing shooting in the present embodiment. In the example of FIG. 1, a case where “flowers” and “grass” are photographed in “park” will be described.

図1(a)に示すような撮影領域を撮影する場合、「公園」の景色をバックに手前に咲く「花」や「草」が含まれたものとなり、近くの「花」や「草」と、「花」や「草」の奥の「タイル」と、遠くの「木々」とが特定可能な被写体となる。   When shooting a shooting area as shown in FIG. 1 (a), “flowers” and “grass” blooming in front of the “park” scenery are included, and nearby “flowers” and “grass”. Then, “tiles” behind “flowers” and “grass” and distant “trees” can be identified.

図1(a)の例のような撮影領域での全焦点画像は、被写体として特定可能な「花」、「草」、「タイル」、「木々」にフォーカスがあっている画像であることが好ましい。
即ち、図1(b)に示すように、「花」にフォーカスが合った領域R1と、「草」にフォーカスが合った領域R2と、「タイル」にフォーカスが合った領域R3と、「木々」にフォーカスが合った領域R4のそれぞれの領域にフォーカスが合った撮像画像を全焦点画像とすることが望ましい。
The omnifocal image in the shooting region as in the example of FIG. 1A is an image in which “flowers”, “grass”, “tiles”, and “trees” that can be specified as subjects are in focus. preferable.
That is, as shown in FIG. 1B, a region R1 focused on “flower”, a region R2 focused on “grass”, a region R3 focused on “tile”, and “trees” It is desirable that the captured image in which each region of the region R4 in focus is set as the omnifocal image.

しかしながら、従来のフォーカスブラケティング撮影の場合は、撮影する状況に関係なく、フォーカスブラケティング撮影を行うように設定されていた。具体的には、従来の手法は、フォーカス位置を所定の間隔ずらして、所定の枚数の撮影を行っていた。そして、当該撮影により取得した撮像画像を合成して、全焦点画像を生成していた。   However, in the case of conventional focus bracketing shooting, it is set to perform focus bracketing shooting regardless of the shooting situation. Specifically, in the conventional method, a predetermined number of images are taken with the focus position shifted by a predetermined interval. Then, an omnifocal image is generated by synthesizing the captured images acquired by the imaging.

このような従来の手法の場合、撮影対象に関わらず、所定のフォーカス位置で撮影を行うために、フォーカスが合っていない箇所があるような質の悪い全焦点画像を生成してしまったり、最悪の場合には、全焦点画像を生成できなかったりというような問題があった。   In the case of such a conventional method, in order to shoot at a predetermined focus position regardless of the shooting target, a poor-quality omnifocal image that has an out-of-focus part is generated, or the worst In this case, there is a problem that an omnifocal image cannot be generated.

しかしながら、本実施形態におけるフォーカスブラケティング撮影においては、図1(b)に示すように、撮像対象を考慮して、フォーカス位置及び撮影枚数を決定するために、質の高い全焦点画像を生成することができ、さらには、不要な撮影を行わなくて済むために、全焦点画像を生成の処理を高速化したり、画質が良く処理負担を軽減したりすることができるようになる。 However, in the focus bracketing shooting according to the present embodiment, as shown in FIG. 1B, a high-quality omnifocal image is generated in order to determine the focus position and the number of shots in consideration of the imaging target. it can, further, in order to eliminate the need to perform unnecessary shooting, or to speed the process of generating the all-focus image, it is possible or to reduce the image quality is good processing load.

次に、上述したようなフォーカスブラケティング撮影を行って、好適な全焦点画像の生成を行う機能を有する撮像装置について説明する。
図2は、本発明の一実施形態に係る撮像装置1のハードウェアの構成を示すブロック図である。
撮像装置1は、例えばデジタルカメラとして構成される。
Next, an imaging apparatus having a function of performing a focus bracketing shooting as described above and generating a suitable omnifocal image will be described.
FIG. 2 is a block diagram illustrating a hardware configuration of the imaging apparatus 1 according to an embodiment of the present invention.
The imaging device 1 is configured as a digital camera, for example.

撮像装置1は、図2に示すように、CPU(Central Processing Unit)11と、ROM(Read Only Memory)12と、RAM(Random Access Memory)13と、バス14と、入出力インターフェース15と、撮像部16と、入力部17と、出力部18と、記憶部19と、通信部20と、ドライブ21と、を備えている。   As shown in FIG. 2, the imaging apparatus 1 includes a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, a bus 14, an input / output interface 15, and an imaging. A unit 16, an input unit 17, an output unit 18, a storage unit 19, a communication unit 20, and a drive 21 are provided.

CPU11は、ROM12に記録されているプログラム、又は、記憶部19からRAM13にロードされたプログラムに従って各種の処理を実行する。   The CPU 11 executes various processes according to a program recorded in the ROM 12 or a program loaded from the storage unit 19 to the RAM 13.

RAM13には、CPU11が各種の処理を実行する上において必要なデータ等も適宜記憶される。   The RAM 13 appropriately stores data necessary for the CPU 11 to execute various processes.

CPU11、ROM12及びRAM13は、バス14を介して相互に接続されている。このバス14にはまた、入出力インターフェース15も接続されている。入出力インターフェース15には、撮像部16、入力部17、出力部18、記憶部19、通信部20及びドライブ21が接続されている。   The CPU 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output interface 15 is also connected to the bus 14. An imaging unit 16, an input unit 17, an output unit 18, a storage unit 19, a communication unit 20, and a drive 21 are connected to the input / output interface 15.

撮像部16は、光学レンズ部41と、イメージセンサ42と、レンズ駆動部43と、を備えている。   The imaging unit 16 includes an optical lens unit 41, an image sensor 42, and a lens driving unit 43.

光学レンズ部41は、被写体を撮影するために、フォーカスレンズやズームレンズ等の各種レンズで構成される。
フォーカスレンズは、後述のレンズ駆動部43によって駆動され、後述のイメージセンサ42の受光面に被写体の像を結像させるレンズである。ズームレンズは、フォーカスの距離を一定の範囲で自在に変化させるレンズである。
The optical lens unit 41 includes various lenses such as a focus lens and a zoom lens in order to photograph a subject.
The focus lens is a lens that is driven by a lens driving unit 43 described later and forms an image of a subject on a light receiving surface of an image sensor 42 described later. The zoom lens is a lens that freely changes the focus distance within a certain range.

イメージセンサ42は、光電変換素子や、AFE(Analog Front End)等から構成される。
光電変換素子は、例えばCMOS(Complementary Metal Oxide Semiconductor)型の光電変換素子等から構成される。光電変換素子には、光学レンズ部41から被写体像が入射される。そこで、光電変換素子は、被写体像を光電変換(撮像)して画像信号を一定時間蓄積し、蓄積した画像信号をアナログ信号としてAFEに順次供給する。
AFEは、このアナログの画像信号に対して、A/D(Analog/Digital)変換処理等の各種信号処理を実行する。AFEは、各種信号処理によって、デジタル信号が生成され、撮像部16の出力信号として出力される。このような撮像部16の出力信号が撮像画像のデータとなる。撮像画像のデータは、CPU11等に適宜供給される。また、撮像画像のデータには、メタデータとして、撮像された順番の情報と、撮像された時点におけるフォーカス位置の情報とが付加される。なお、以下、特に断りのない限り、メタデータが付加された撮像画像のデータを、単に「撮像画像のデータ」と呼ぶ。
The image sensor 42 includes a photoelectric conversion element, an AFE (Analog Front End), and the like.
The photoelectric conversion element is composed of, for example, a CMOS (Complementary Metal Oxide Semiconductor) type photoelectric conversion element or the like. A subject image is incident on the photoelectric conversion element from the optical lens unit 41. Therefore, the photoelectric conversion element photoelectrically converts (captures) the subject image, accumulates the image signal for a predetermined time, and sequentially supplies the accumulated image signal as an analog signal to the AFE.
The AFE performs various signal processing such as A / D (Analog / Digital) conversion processing on the analog image signal. The AFE generates a digital signal by various signal processing and outputs it as an output signal of the imaging unit 16. Such an output signal of the imaging unit 16 becomes captured image data. The captured image data is appropriately supplied to the CPU 11 or the like. In addition, information on the order of imaging and information on the focus position at the time of imaging are added to the captured image data as metadata. Hereinafter, unless otherwise specified, captured image data to which metadata is added is simply referred to as “captured image data”.

レンズ駆動部43は、CPU11によるAF(Auto Focus)処理の結果に基づいて、光学レンズ部41のフォーカスレンズを駆動させ、フォーカス位置を変化させることで所定の被写体にフォーカスさせる。
このようなフォーカスの機構を有する撮像装置1では、撮影最短距離側方向、即ち、手前側の被写体にフォーカスを合わせての撮影と、無限遠方向、即ち、ピント調節が不要となるほどの遠い距離の対象を被写体とする撮影とが可能である。
また、レンズ駆動部43は、フォーカス位置を、AF処理によって決定された位置から変化させながら、順次フォーカス位置の異なる撮像を行うフォーカスブラケティング撮影が可能となるように駆動する。
The lens driving unit 43 drives the focus lens of the optical lens unit 41 based on the result of AF (Auto Focus) processing by the CPU 11 and changes the focus position to focus on a predetermined subject.
In the image pickup apparatus 1 having such a focus mechanism, shooting in the shortest distance side direction, that is, in front of the subject, and infinite distance, that is, a distance far enough to eliminate the need for focus adjustment. It is possible to shoot with the subject as a subject.
Further, the lens driving unit 43 is driven so that focus bracketing imaging that sequentially performs imaging with different focus positions can be performed while changing the focus position from the position determined by the AF processing.

入力部17は、シャッタボタンを含む各種ボタン等で構成され、ユーザの指示操作に応じて各種情報を入力する。
出力部18は、ディスプレイやスピーカ等で構成され、画像や音声を出力する。
記憶部19は、ハードディスク或いはDRAM(Dynamic Random Access Memory)等で構成され、各種画像のデータを記憶する。
通信部20は、インターネットを含むネットワークを介して他の装置(図示せず)との間で行う通信を制御する。
The input unit 17 includes various buttons including a shutter button, and inputs various types of information according to user instruction operations.
The output unit 18 includes a display, a speaker, and the like, and outputs images and sounds.
The storage unit 19 is composed of a hard disk, a DRAM (Dynamic Random Access Memory), or the like, and stores various image data.
The communication unit 20 controls communication performed with other devices (not shown) via a network including the Internet.

ドライブ21には、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリ等よりなる、リムーバブルメディア31が適宜装着される。ドライブ21によってリムーバブルメディア31から読み出されたプログラムは、必要に応じて記憶部19にインストールされる。また、リムーバブルメディア31は、記憶部19に記憶されている画像のデータ等の各種データも、記憶部19と同様に記憶することができる。   A removable medium 31 made of a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is appropriately attached to the drive 21. The program read from the removable medium 31 by the drive 21 is installed in the storage unit 19 as necessary. The removable medium 31 can also store various data such as image data stored in the storage unit 19 in the same manner as the storage unit 19.

次に、撮像装置1の機能的構成のうち、全焦点画像生成処理を実行するための機能的構成について説明する。
「全焦点画像生成処理」とは、撮影領域の被写体を考慮して決定された撮影位置及び撮影枚数でフォーカスブラケティング撮影を行い、取得した複数の撮像画像のデータを合成して、撮影領域に含まれる複数の被写体にフォーカスが合った全焦点画像のデータを生成して出力するまでの一連の処理をいう。
図3は、撮像装置1の機能的構成のうち、全焦点画像生成処理を実行するための機能的構成を示す機能ブロック図である。
また、本実施形態の撮像装置1は、フォーカスブラケティング撮影と、フォーカスブラケティング撮影における撮影位置及び撮影枚数を決定するためのマルチエリアAF撮影を行う。ここで、「マルチエリアAF撮影」とは、撮像画像を複数のフォーカス領域に分割し、フォーカス領域毎に各フォーカス領域に含まれる被写体にフォーカスが合う距離を被写体フォーカス位置として検出する撮影手法である。被写体フォーカス位置は被写体にフォーカスが合う距離を値として表したもので、マクロ(例えば、「10cm」)から無限遠「∞」として表したものである。
なお、被写体フォーカス位置は、コントラストAF、位相差AFといったAFの方式やレンズの駆動方法等で測定されるものに限定されるものではなく、超音波等により、直接被写体までの距離を測定するものであってもよい。
Next, a functional configuration for executing the omnifocal image generation process among the functional configurations of the imaging apparatus 1 will be described.
“All-focus image generation processing” is a method of performing focus bracketing shooting at the shooting position and the number of shots determined in consideration of the subject in the shooting area, and combining the acquired multiple captured image data into the shooting area. This is a series of processes from generation and output of omnifocal image data in which a plurality of included subjects are in focus.
FIG. 3 is a functional block diagram illustrating a functional configuration for executing the omnifocal image generation process among the functional configurations of the imaging apparatus 1.
In addition, the imaging apparatus 1 according to the present embodiment performs focus bracketing shooting and multi-area AF shooting for determining the shooting position and the number of shots in focus bracketing shooting. Here, “multi-area AF shooting” is a shooting method in which a captured image is divided into a plurality of focus areas, and the distance at which the subject included in each focus area is in focus is detected as the subject focus position for each focus area. . The subject focus position represents the distance at which the subject is focused as a value, and is represented as “∞” from a macro (for example, “10 cm”).
Note that the subject focus position is not limited to those measured by an AF method such as contrast AF or phase difference AF, or a lens driving method, but directly measures the distance to the subject using ultrasonic waves. It may be.

撮像装置1が全焦点画像生成処理を実行する場合には、図3に示すように、CPU11において、撮像制御部51と、撮像画像取得部52と、フォーカス情報取得部53と、頻度分布算出部54と、撮影位置決定部55と、撮影枚数決定部56と、画像合成部57と、が機能する。   When the imaging device 1 executes the omnifocal image generation process, as shown in FIG. 3, in the CPU 11, the imaging control unit 51, the captured image acquisition unit 52, the focus information acquisition unit 53, and the frequency distribution calculation unit. 54, the shooting position determination unit 55, the number of shots determination unit 56, and the image composition unit 57 function.

また、記憶部19の一領域として、撮像情報記憶部71と、撮影条件記憶部72と、合成画像記憶部73と、が設けられる。   In addition, as one area of the storage unit 19, an imaging information storage unit 71, a shooting condition storage unit 72, and a composite image storage unit 73 are provided.

撮像情報記憶部71には、撮像部16から出力され撮像画像取得部52によって取得された撮像画像のデータが記憶される。詳細には、撮像情報記憶部71には、マルチエリアAF撮影で取得した撮像画像のデータと、フォーカスブラケティング撮影で取得した撮像画像のデータが記憶される。
また、撮像情報記憶部71には、撮像画像のデータの他に、フォーカス情報取得部53によって取得された撮像画像における各領域の被写体フォーカス位置の情報が記憶される。
In the imaging information storage unit 71, data of a captured image output from the imaging unit 16 and acquired by the captured image acquisition unit 52 is stored. More specifically, the imaging information storage unit 71 stores captured image data acquired by multi-area AF imaging and captured image data acquired by focus bracketing imaging.
In addition to the captured image data, the captured information storage unit 71 stores information on the subject focus position of each region in the captured image acquired by the focus information acquisition unit 53.

撮影条件記憶部72には、フォーカスブラケティング撮影における撮影条件が記憶される。具体的には、撮影条件記憶部72には、フォーカスブラケティング撮影における撮影条件として、フォーカスレンズの停止位置(以下、「撮影位置」という)と、当該撮影位置から算出される撮影枚数の撮影条件が記憶される。
また、撮影条件記憶部72には、レンズの被写界深度の特性等の撮影条件の設定に用いる情報が記憶されている。レンズの被写界深度の特性は、テーブルデータとして撮影条件記憶部72に記憶されている。
The shooting condition storage unit 72 stores shooting conditions in focus bracketing shooting. Specifically, in the shooting condition storage unit 72, as shooting conditions in focus bracketing shooting, the stop position of the focus lens (hereinafter referred to as “shooting position”) and the shooting conditions of the number of shots calculated from the shooting position are stored. Is memorized.
The shooting condition storage unit 72 stores information used for setting shooting conditions such as the characteristics of the depth of field of the lens. The characteristics of the depth of field of the lens are stored in the imaging condition storage unit 72 as table data.

合成画像記憶部73は、画像合成部57により撮像画像を画像合成した結果、生成される全焦点画像のデータを記憶する。   The synthesized image storage unit 73 stores data of the omnifocal image generated as a result of image synthesis of the captured image by the image synthesizing unit 57.

撮像制御部51は、入力部17からの撮像に係る指示に基づいて、レンズ駆動部43等を含む撮像部16での撮像を制御する。具体的には、撮像制御部51は、入力部17のシャッタボタンに対して、半押し操作があった場合には、マルチエリアAF撮影の指示があったとして、マルチエリアAF撮影を行うようにレンズ駆動部43等を含む撮像部16を制御する。また、撮像制御部51は、入力部17のシャッタボタンに対して、全押し操作があった場合には、フォーカスブラケティング撮影の指示があったとして、フォーカスブラケティング撮影を行うようにレンズ駆動部43等を含む撮像部16を制御する。   The imaging control unit 51 controls imaging in the imaging unit 16 including the lens driving unit 43 and the like based on an instruction related to imaging from the input unit 17. Specifically, the imaging control unit 51 performs multi-area AF shooting when there is an instruction for multi-area AF shooting when the shutter button of the input unit 17 is half-pressed. The imaging unit 16 including the lens driving unit 43 and the like is controlled. In addition, when the shutter button of the input unit 17 is fully pressed, the imaging control unit 51 determines that there is an instruction for focus bracketing shooting and performs a lens bracketing unit so as to perform focus bracketing shooting. The imaging unit 16 including 43 and the like is controlled.

撮像画像取得部52は、マルチエリアAF撮影による撮影条件決定用の撮像画像のデータや、フォーカスブラケティング撮影による画像合成用(全焦点画像生成用)の撮像画像のデータを取得し、これらの撮像画像のデータを撮像情報記憶部71に記憶させる。   The captured image acquisition unit 52 acquires captured image data for shooting condition determination by multi-area AF shooting, and captured image data for image synthesis (for generation of an omnifocal image) by focus bracketing shooting. Image data is stored in the imaging information storage unit 71.

フォーカス情報取得部53は、撮像画像取得部52による撮像画像の取得に際して、撮像画像の分割した領域の被写体フォーカス位置の情報を取得する。また、フォーカス情報取得部53は、被写体フォーカス位置のうち、最終的にフォーカスを合わせたフォーカス領域(以下、「AF領域」という)の情報も取得する。撮像画像取得部52は、これらの情報も取得した撮影条件決定用の撮像画像のデータに対応付けて撮像情報記憶部71に記憶させる。   When the captured image acquisition unit 52 acquires the captured image, the focus information acquisition unit 53 acquires information on the subject focus position of the divided area of the captured image. The focus information acquisition unit 53 also acquires information on a focus area (hereinafter referred to as “AF area”) that is finally focused out of the subject focus positions. The captured image acquisition unit 52 stores these pieces of information in the imaging information storage unit 71 in association with the acquired captured image data for determining imaging conditions.

頻度分布算出部54は、撮像情報記憶部71に記憶されるフォーカス情報取得部53によって取得された撮像画像の全フォーカス領域の被写体フォーカス位置の情報に基づいて、マクロから無限遠までの間の被写体フォーカス位置の頻度の分布(以下「頻度分布」という)を計算する。頻度分布算出部54は、計算した頻度分布を撮影位置決定部55に出力する。   The frequency distribution calculation unit 54 determines the subject from macro to infinity based on the subject focus position information of all the focus areas of the captured image acquired by the focus information acquisition unit 53 stored in the imaging information storage unit 71. The frequency distribution of the focus position (hereinafter referred to as “frequency distribution”) is calculated. The frequency distribution calculation unit 54 outputs the calculated frequency distribution to the imaging position determination unit 55.

撮影位置決定部55は、頻度分布算出部54により計算された頻度分布と、撮影条件記憶部72に記憶されレンズの被写界深度の特性に基づいて、撮影位置を決定する。撮影位置決定部55は、例えば、被写体フォーカス位置の頻度が多い被写体フォーカス位置を重点的に撮影位置とするように、撮影位置を決定する。このように撮影位置を決定することで、少なくとも主要な被写体に対してフォーカスが合った撮像画像を得ることができるようになる。撮影位置決定部55は、決定した撮影位置を撮影枚数決定部56に出力する。   The shooting position determination unit 55 determines the shooting position based on the frequency distribution calculated by the frequency distribution calculation unit 54 and the characteristics of the depth of field of the lens stored in the shooting condition storage unit 72. For example, the shooting position determination unit 55 determines the shooting position so that a subject focus position with a high frequency of subject focus positions is set as a focus. By determining the shooting position in this way, it is possible to obtain a captured image in which at least a main subject is in focus. The shooting position determination unit 55 outputs the determined shooting position to the shooting number determination unit 56.

撮影枚数決定部56は、撮影位置決定部55により決定された撮影位置をカウントして、撮影枚数を決定する。即ち、撮影枚数決定部56は、例えば、決定された撮影位置が5箇所ある場合には、撮影枚数が5枚となる。
また、撮影枚数決定部56は、撮影位置決定部55により決定された撮影位置の情報と決定した撮影枚数の情報を撮影条件記憶部72に出力して、記憶させる。
The shooting number determining unit 56 counts the shooting positions determined by the shooting position determining unit 55 to determine the shooting number. That is, for example, when there are five determined shooting positions, the number of shots determination unit 56 sets the number of shots to five.
In addition, the number-of-photographing number determination unit 56 outputs the information on the photographing position determined by the photographing position determination unit 55 and the information on the determined number of photographings to the photographing condition storage unit 72 for storage.

画像合成部57は、撮像情報記憶部71に記憶されるフォーカスブラケティング撮影によって取得した複数の撮像画像のデータを合成する。画像合成部57は、複数の撮像画像のフォーカスの領域を合成できればよく加算合成等の種々の手法を用いて合成画像である全焦点画像のデータを生成する。画像合成部57は、生成した全焦点画像のデータを合成画像記憶部73に記憶させる。   The image synthesis unit 57 synthesizes data of a plurality of captured images acquired by focus bracketing shooting stored in the imaging information storage unit 71. The image synthesis unit 57 only needs to be able to synthesize the focus areas of a plurality of captured images, and generates omnifocal image data that is a synthesized image using various methods such as addition synthesis. The image composition unit 57 stores the generated omnifocal image data in the composite image storage unit 73.

ここで、撮影位置及び撮影枚数の決定の手法の詳細について説明する。
図4は、撮影位置及び撮影枚数の決定の手法の具体例を示す模式図である。なお、図4の例では、図1の撮影領域を撮影する場合を例として用いる。
Here, details of the method for determining the shooting position and the number of shots will be described.
FIG. 4 is a schematic diagram showing a specific example of a method for determining the shooting position and the number of shots. In the example of FIG. 4, the case where the imaging region of FIG. 1 is imaged is used as an example.

撮影位置及び撮影枚数の決定においては、図4(a)に示すようなマルチエリアAF撮影により、撮像画像の各フォーカス領域FRにおける被写体フォーカス位置を取得する。
本実施形態においては、フォーカス領域FRは、格子状に縦5×横5の領域に区画されて、撮像画像において合計25箇所のフォーカス領域FRに分割される。当該フォーカス領域FRの各々において、マクロから無限遠の間の被写体フォーカス位置が決定されることとなる。
なお、図4(a)において、実線で示す領域は、フォーカス領域FRのうち最終的にフォーカスを合わせた領域となるAF領域AFRであり、破線で示す領域は、フォーカス領域FRのうちAF領域AFRではないフォーカス領域FRを示している。
In determining the shooting position and the number of shots, the subject focus position in each focus area FR of the captured image is acquired by multi-area AF shooting as shown in FIG.
In the present embodiment, the focus area FR is partitioned into 5 × 5 areas in a grid pattern and is divided into a total of 25 focus areas FR in the captured image. In each of the focus areas FR, the subject focus position between the macro and infinity is determined.
In FIG. 4A, a region indicated by a solid line is an AF region AFR that is finally focused in the focus region FR, and a region indicated by a broken line is an AF region AFR of the focus region FR. A focus area FR that is not is shown.

本例の撮像画像における各フォーカス領域FRの被写体フォーカス位置は、「無限遠∞」,「3m」,「2m」,「1m」,「50cm」,「30cm」,「20cm」,「10cm」となっている。
このような撮像画像においては、図4(b)に示すように、「無限遠∞」が被写体フォーカス位置になっているフォーカス領域FRは、図1(b)の「木々」にフォーカスが合った領域R4に相当し、「3m」,「2m」及び「1m」が被写体フォーカス位置になっているフォーカス領域FRは、図1(b)の「タイル」にフォーカスが合った領域R3に相当し、「50cm」,「30cm」及び「20cm」が被写体フォーカス位置になっているフォーカス領域FRは、図1(b)の「草」にフォーカスが合った領域R2に相当し、「10cm」が被写体フォーカス位置になっているフォーカス領域FRは、図1(b)の「花」にフォーカスが合った領域R1に結果的に相当することとなり、実際の撮影対象と被写体フォーカス位置とが合致していることがわかる。
The subject focus position of each focus area FR in the captured image of this example is “infinity ∞”, “3 m”, “2 m”, “1 m”, “50 cm”, “30 cm”, “20 cm”, “10 cm”. It has become.
In such a captured image, as shown in FIG. 4B, the focus area FR in which “infinity ∞” is the subject focus position is focused on the “trees” in FIG. The focus area FR corresponding to the area R4, in which “3m”, “2m”, and “1m” are the subject focus positions, corresponds to the area R3 focused on the “tile” in FIG. The focus area FR in which “50 cm”, “30 cm”, and “20 cm” are subject focus positions corresponds to the area R2 focused on “grass” in FIG. 1B, and “10 cm” is the subject focus. As a result, the focus area FR at the position corresponds to the area R1 focused on the “flower” in FIG. 1B, and the actual shooting target matches the subject focus position. It can be seen that you are.

次に、撮影位置及び撮影枚数の決定においては、頻度分布として、図4(b)に示すように、フォーカス領域FR毎に被写体フォーカス位置順に並べて、同一被写体フォーカス位置となるフォーカス領域FRは、重ねて頻度として表される。   Next, in the determination of the shooting position and the number of shots, as shown in FIG. 4B, the focus areas FR arranged in the order of the subject focus position for each focus area FR are overlapped as a frequency distribution. Expressed as a frequency.

具体的には、頻度分布は、被写体フォーカス位置「10cm」は5箇所、被写体フォーカス位置「20cm」は1箇所、被写体フォーカス位置「30cm」は3箇所、被写体フォーカス位置「50cm」は1箇所、被写体フォーカス位置「1m」は3箇所、被写体フォーカス位置「2m」は1箇所、被写体フォーカス位置「3m」は2箇所、被写体フォーカス位置「無限遠∞」は9箇所となる。   Specifically, the frequency distribution includes five subject focus positions “10 cm”, one subject focus position “20 cm”, three subject focus positions “30 cm”, one subject focus position “50 cm”, and one subject. There are three focus positions “1 m”, one subject focus position “2 m”, two subject focus positions “3 m”, and nine subject focus positions “infinity ∞”.

本実施形態においては、所定数(3箇所)以上の頻度がある被写体フォーカス位置は、撮影位置に重点的に設定されるピーク位置PKとなる。図4(b)の場合では、被写体フォーカス位置「10cm」,被写体フォーカス位置「30cm」,被写体フォーカス位置「1m」及び被写体フォーカス位置「無限遠∞」がピーク位置PK1乃至PK4となる(図4(c)参照)。   In the present embodiment, the subject focus position having a frequency equal to or greater than a predetermined number (three places) is the peak position PK that is preferentially set to the shooting position. In the case of FIG. 4B, the subject focus position “10 cm”, the subject focus position “30 cm”, the subject focus position “1 m”, and the subject focus position “infinity ∞” are the peak positions PK1 to PK4 (FIG. 4 ( c)).

このような頻度分布において、図4(c)に示すように、ピーク位置PK1乃至PK4を含む位置に被写界深度DOF1乃至DOF4が配置され、配置された被写界深度DOF1乃至DOF4の各々において、ピーク位置PK1乃至PK4及び他の被写体フォーカス位置をカバーする位置に撮影位置SP1乃至SP4が決定されることとなる。なお、被写界深度の配置及び撮影位置の決定の手法については後述する。   In such a frequency distribution, as shown in FIG. 4C, the depths of field DOF1 to DOF4 are arranged at positions including the peak positions PK1 to PK4, and in each of the arranged depths of field DOF1 to DOF4. The photographing positions SP1 to SP4 are determined as positions that cover the peak positions PK1 to PK4 and other subject focus positions. A method for determining the depth of field and the shooting position will be described later.

図4(c)の例においては、被写体フォーカス位置に応じて、4箇所が撮影位置として決定された。その結果、例えば、従来の手法のようにフォーカスブラケティング撮影を5枚撮像する場合に比べて、撮影枚数を減らすことができる。撮影枚数を減らすことは、単に撮影の処理負担を減らすだけでなく、撮影時間を短縮することになり、撮影中の手振れに晒される時間を短くすることができ、より良質な撮像画像の取得に寄与することになる。また、枚数が少ないことで、画像の合成時間も短縮することができ、撮影時間の短縮と画像の合成時間の短縮の両面から最終的な全焦点画像の生成までに要する時間を短縮することができる。 In the example of FIG. 4C, four locations are determined as shooting positions according to the subject focus position. As a result, for example, as compared with a case where five shooting image focus bracketing photographing as in the conventional technique, it is possible to reduce the number of shots. Reducing the number of shots not only reduces the processing load of shooting, but also shortens the shooting time, shortens the time exposed to camera shake during shooting, and obtains higher quality captured images. Will contribute. In addition, since the number of images can be reduced, the image synthesis time can be shortened, and the time required to generate the final omnifocal image can be shortened from the viewpoint of shortening the shooting time and the image synthesis time. it can.

次に、被写界深度の配置及び撮影位置の決定の手法について説明する。
図5は、撮影時の絞り値における被写界深度の配置及び撮影位置の決定の手法の具体例を示す図である。なお、本実施形態におけるレンズの被写界深度の特性は、マクロ(Macro)から無限遠(∞)に行くに従って被写界深度の範囲が広くなるような特性を有する。
Next, a method of determining the depth of field and the shooting position will be described.
FIG. 5 is a diagram showing a specific example of a technique for determining the arrangement of the depth of field and the shooting position at the aperture value at the time of shooting. Note that the depth-of-field characteristic of the lens in this embodiment has such a characteristic that the depth-of-field range becomes wider from macro to infinity (∞).

まず、本実施形態においては、ピーク位置PK1乃至PK4のうち、最も頻度の多いピーク位置PK1の撮影位置を決定する。この場合、ピーク位置PK1を含んで、最も広い範囲をカバーする被写界深度である被写界深度DOF1を選択する。そして、当該被写界深度の範囲内に属するピーク位置PK1を重視し、かつ、被写界深度DOF1の範囲内に属する他の被写体フォーカス位置をカバーする位置に、撮影位置SP1を決定する。   First, in the present embodiment, the imaging position of the peak position PK1 having the highest frequency among the peak positions PK1 to PK4 is determined. In this case, the depth of field DOF1, which is the depth of field covering the widest range including the peak position PK1, is selected. Then, the imaging position SP1 is determined as a position that emphasizes the peak position PK1 belonging to the range of the depth of field and covers another subject focus position belonging to the range of the depth of field DOF1.

次に、ピーク位置PK2乃至PK4のうち、次に頻度の多いピーク位置PK2の撮影位置を決定する。この場合、ピーク位置PK2を含んで、最も広い範囲をカバーする被写界深度である被写界深度DOF2を選択する。そして、当該被写界深度の範囲内に属するピーク位置PK2を重視し、かつ、被写界深度DOF2の範囲内に属する他の被写体フォーカス位置をカバーする位置に、撮影位置SP2を決定する。   Next, of the peak positions PK2 to PK4, the imaging position of the next most frequent peak position PK2 is determined. In this case, the depth of field DOF2, which is the depth of field covering the widest range including the peak position PK2, is selected. Then, the imaging position SP2 is determined as a position that emphasizes the peak position PK2 belonging to the range of the depth of field and covers another subject focus position belonging to the range of the depth of field DOF2.

次に、ピーク位置PK3及びPK4のうち、頻度の多いピーク位置の撮影位置を決定する。本例の場合では、ピーク位置PK3とピーク位置PK4の頻度が4箇所と同じである。頻度が同数の場合は、被写界深度が深い方の被写界深度に属するピーク位置の決定を優先的に行う。本例のレンズの被写界深度の特性は、被写体フォーカス位置が遠くなればなるほどフォーカスの範囲が広く被写界深度としては深くなるため、被写体フォーカス位置がピーク位置PK4よりも遠い位置のピーク位置PK3の決定をする。
ここでは、ピーク位置PK3を含んで、最も広い範囲をカバーする被写界深度の深い被写界深度DOF3を選択する。そして、当該被写界深度の範囲内に属するピーク位置PK3をカバーし、かつ、他の被写体フォーカス位置をカバーする位置に、撮影位置SP3を決定する。
Next, of the peak positions PK3 and PK4, the photographing position of the peak position with the highest frequency is determined. In the case of this example, the frequency of the peak position PK3 and the peak position PK4 is the same as four places. When the frequency is the same, the peak position belonging to the deeper depth of field is preferentially determined. Since the depth of field of the lens of this example is such that the farther the subject focus position is, the wider the focus range and the deeper the depth of field, the peak position at which the subject focus position is farther than the peak position PK4. Determine PK3.
Here, a depth of field DOF3 having a deep depth of field that covers the widest range including the peak position PK3 is selected. Then, the photographing position SP3 is determined to be a position that covers the peak position PK3 belonging to the range of the depth of field and covers the other subject focus position.

最後に、ピーク位置PK3と頻度が同じで、被写界深度が浅い位置に属するピーク位置PK4を含んで、最も広い範囲をカバーする被写界深度の深い被写界深度DOF4を選択する。そして、当該被写界深度の範囲内に属するピーク位置PK4をカバーし、かつ、他の被写体フォーカス位置をカバーする位置に、撮影位置SP4を決定する。
なお、所定のピーク位置PKを含むように選択した被写界深度DOFが他のピーク位置PKを含む場合には、所定のピーク位置PKのみを含む被写界深度DOFを再度選択する。そして、当該選択した被写界深度DOFの範囲内において、ピーク位置PKを重視し、かつ、属する他の被写体フォーカス位置をカバーできる位置に撮影位置SPを決定する。
Finally, the depth of field DOF4 having the same depth as the peak position PK3 and including the peak position PK4 belonging to the position where the depth of field is shallow and covering the widest range is selected. Then, the shooting position SP4 is determined as a position that covers the peak position PK4 that falls within the range of the depth of field and covers the other subject focus positions.
When the depth of field DOF selected to include the predetermined peak position PK includes another peak position PK, the depth of field DOF including only the predetermined peak position PK is selected again. Then, within the range of the selected depth of field DOF, the imaging position SP is determined to be a position that emphasizes the peak position PK and can cover other subject focus positions to which it belongs.

結果的に、本実施形態においては、ピーク位置PK1乃至PK4の頻度の多い(1)乃至(4)の順に4箇所の撮影位置を決定し、かつ、8箇所の全ての被写体フォーカス位置をカバーする位置に撮影位置が決定されることとなる。
なお、本例では、所定数(3箇所)以上の頻度がある被写体フォーカス位置をピーク位置として、撮影位置を決定する位置としたがこれに限られない。全ての被写体フォーカス位置について被写体フォーカス位置の頻度分布(例えば、頻度が多い順)に応じて撮影位置を決定してもよい。この場合には、上述したように撮影位置の判断をした被写体フォーカス位置を含み、さらに、被写界深度で他の被写体フォーカス位置をカバーできるように撮影位置を決定した場合には、当該カバーされた他の被写体フォーカス位置の撮影位置の判断を行わないように構成する。
As a result, in the present embodiment, four shooting positions are determined in the order of (1) to (4) in which the peak positions PK1 to PK4 are frequent, and all eight subject focus positions are covered. The shooting position is determined at the position.
In this example, the subject focus position having a frequency equal to or higher than the predetermined number (three places) is set as the peak position, and the position for determining the photographing position is set, but the present invention is not limited to this. The shooting positions may be determined according to the frequency distribution of the subject focus positions (for example, in descending order of frequency) for all the subject focus positions. In this case, when the shooting position is determined so as to cover the other subject focus positions with the depth of field, including the subject focus position for which the shooting position has been determined as described above, this is covered. In addition, it is configured not to determine the shooting position of another subject focus position.

次に、上述した図1とは異なる撮影領域とした場合の撮影位置及び撮影枚数の決定の他の具体例について説明する。
図6は、図1とは異なる撮影領域とした場合の撮影位置及び撮影枚数の決定の他の具体例を示す模式図である。
Next, another specific example of determining the shooting position and the number of shots when the shooting area is different from that in FIG. 1 will be described.
FIG. 6 is a schematic diagram showing another specific example of determining the shooting position and the number of shots when the shooting area is different from that in FIG.

図6(a)の例では、図1(a)の場合とは異なり崖から海を撮影しようとするものであり、手前に「草」があり、遠くに「海」と「島」がありその先に地平線があり、地平線を挟んで「空」が広がっている。   In the example of FIG. 6 (a), unlike the case of FIG. 1 (a), an attempt is made to photograph the sea from a cliff, with “grass” in the foreground and “sea” and “island” in the distance. There is a horizon ahead, and the “sky” spreads across the horizon.

各フォーカス領域FRの被写体フォーカス位置は、図6(b)に示すように、「草」を含むフォーカス領域FRが「3m」となっており、それ以外の「海」「島」及び「空」を含むフォーカス領域FRが「無限遠∞」となっている。なお、AF領域AFRは、被写体フォーカス位置「3m」の「草」を含むフォーカス領域FRである。 As shown in FIG. 6B, the focus area FR including “grass” is “3 m” as the subject focus position of each focus area FR, and other “sea” , “island”, and “sky” "Is included in the focus area FR is" infinity infinity ". The AF area AFR is a focus area FR including “grass” at the subject focus position “3 m”.

各被写体フォーカス位置の頻度分布は、図6(c)に示すように、被写体フォーカス位置「3m」が5箇所で、被写体フォーカス位置「無限遠∞」が20箇所となっている。   As shown in FIG. 6C, the frequency distribution of each subject focus position has five subject focus positions “3m” and 20 subject focus positions “infinity ∞”.

このような状態において、撮影位置の決定は、図6(d)に示すように、最も範囲の広い被写界深度DOFが選択される。
本例では、最も範囲の広い被写界深度DOFが選択されたことで、全ての被写体フォーカス位置をカバーすることになる。即ち。選択された被写界深度DOFで被写体フォーカス位置「3m」と被写体フォーカス位置「無限遠∞」をカバーする。
このため、撮影位置は、ピーク位置PKとなる被写体フォーカス位置「3m」と被写体フォーカス位置「無限遠∞」とが重視されるような位置に決定される。
結果として、図6(a)のような撮影領域では、過焦点位置のみの1箇所の撮影位置で、全焦点画像を生成することができることになる。
In such a state, the shooting position is determined by selecting the depth of field DOF having the widest range, as shown in FIG.
In this example, all the subject focus positions are covered by selecting the widest depth of field DOF. That is. The subject focus position “3 m” and the subject focus position “infinity ∞” are covered by the selected depth of field DOF.
For this reason, the photographing position is determined to be a position where importance is placed on the subject focus position “3 m” and the subject focus position “infinity ∞” as the peak position PK.
As a result, in the photographing region as shown in FIG. 6A, an omnifocal image can be generated at one photographing position only at the hyperfocal position.

このようにして、撮影場所によって、撮影位置と、撮影枚数を決定することができるために、全焦点画像を好適に生成することができる。   In this way, since the shooting position and the number of shots can be determined depending on the shooting location, an omnifocal image can be suitably generated.

次に、このような機能的構成を有する撮像装置1が実行する全焦点画像生成処理の流れについて説明する。
図7は、図3の機能的構成を有する図2の撮像装置1が実行する全焦点画像生成処理の流れを説明するフローチャートである。なお、図7のフローチャートでは、図1を撮影領域とした場合の例を説明する。
Next, a flow of omnifocal image generation processing executed by the imaging apparatus 1 having such a functional configuration will be described.
FIG. 7 is a flowchart for explaining the flow of omnifocal image generation processing executed by the imaging apparatus 1 of FIG. 2 having the functional configuration of FIG. In the flowchart of FIG. 7, an example in which FIG. 1 is used as an imaging region will be described.

全焦点画像生成処理は、ユーザが入力部17を用いて全焦点画像生成処理を実行する所定の操作をした場合、その操作を契機として開始される。   When the user performs a predetermined operation for executing the omnifocal image generation process using the input unit 17, the omnifocal image generation process is started with the operation.

ステップS11において、撮像制御部51は、ユーザからの入力部17のシャッタボタンへの半押しの操作を検出する。シャッタボタンへの半押し操作により、マルチエリアAF撮影が行われることとなる。   In step S <b> 11, the imaging control unit 51 detects a half-press operation to the shutter button of the input unit 17 from the user. Multi-area AF shooting is performed by half-pressing the shutter button.

ステップS12において、撮像制御部51は、マルチエリアAF撮影をするように撮像部16を制御する。これにより、撮像画像取得部52は、撮影条件決定用の撮像画像のデータを取得して、撮像情報記憶部71に記憶させる。そして、フォーカス情報取得部53は、取得した撮像画像におけるフォーカス領域FRの各々の被写体フォーカス位置も合わせて取得する。また、フォーカス情報取得部53は、最終的にフォーカスを合わせた領域(AF領域)の情報も取得する。フォーカス情報取得部53は、フォーカス領域の各々の被写体フォーカス位置やAF領域の情報を撮影条件決定用の撮像画像のデータに対応付けて撮像情報記憶部71に記憶させる。
撮像情報記憶部71には、例えば、図1(a)に示すような撮像画像と、図4(a)に示すような撮像画像のフォーカス領域の各々における被写体フォーカス位置及びAF領域の情報を記憶することになる。
In step S12, the imaging control unit 51 controls the imaging unit 16 to perform multi-area AF shooting. As a result, the captured image acquisition unit 52 acquires captured image data for determining imaging conditions and stores the acquired data in the imaging information storage unit 71. Then, the focus information acquisition unit 53 also acquires the subject focus position of each focus area FR in the acquired captured image. In addition, the focus information acquisition unit 53 also acquires information on an area that is finally focused (AF area). The focus information acquisition unit 53 stores the subject focus position and AF area information of each focus area in the imaging information storage unit 71 in association with captured image data for determining the imaging conditions.
The imaging information storage unit 71 stores, for example, information on the subject focus position and AF area in each of the captured image as shown in FIG. 1A and the focus area of the captured image as shown in FIG. Will do.

ステップS13において、頻度分布算出部54は、被写体フォーカス位置の頻度分布を計算する。即ち、頻度分布算出部54は、撮像情報記憶部71に記憶された各フォーカス領域の被写体フォーカス位置の情報に基づいて、被写体フォーカス位置の頻度分布を算出する。本実施形態においては、例えば、図4(b)に示すように、マクロ(Macro)から無限遠(∞)までの被写体フォーカス位置の頻度をカウントして被写体フォーカス位置毎に分布させる。   In step S13, the frequency distribution calculator 54 calculates the frequency distribution of the subject focus position. That is, the frequency distribution calculation unit 54 calculates the frequency distribution of the subject focus position based on the information on the subject focus position of each focus area stored in the imaging information storage unit 71. In the present embodiment, for example, as shown in FIG. 4B, the frequency of the subject focus position from macro to infinity (∞) is counted and distributed for each subject focus position.

ステップS14において、撮影位置決定部55及び撮影枚数決定部56は、各フォーカス位置の被写界深度と被写体フォーカス位置の頻度分布に基づいて、撮影位置と撮影枚数を決定する。
詳細には、撮影位置決定部55は、図4(c)に示すように、頻度分布算出部54により計算された所定数以上の被写体フォーカス位置であるピーク位置PK1乃至PK4の分布と、撮影条件記憶部72に記憶されるレンズの被写界深度の特性に基づいて、被写界深度DOFを選択して、当該被写界深度DOFに含まれるピーク位置PKを重視し、かつ、属する他の被写体フォーカス位置をカバーする位置に撮影位置SPを決定する。
そして、撮影枚数決定部56は、撮影位置決定部55により決定された撮影位置SP1乃至SP4の数をカウントして撮影枚数(4枚)を決定する。その後、撮影位置決定部55により決定された撮影位置の情報と決定した撮影枚数の情報は、撮影枚数決定部56から出力されて、撮影条件記憶部72に記憶される。
本例では、通常、5枚撮影する必要があるところを、4枚の撮影枚数で撮影することができるようになる。その結果、5枚撮影する場合に比べて、撮影時間が短くなり手振れ等の影響を受けることなく、かつ、画質が良く、合成の処理負担も減るために合成時間も短くすることができるために、全焦点画像の生成の時間を短くすることができる。
In step S14, the shooting position determination unit 55 and the shooting number determination unit 56 determine the shooting position and the number of shots based on the depth of field at each focus position and the frequency distribution of the subject focus position.
Specifically, as shown in FIG. 4C, the shooting position determination unit 55 determines the distribution of peak positions PK1 to PK4 that are subject focus positions calculated by the frequency distribution calculation unit 54, and the shooting conditions. Based on the characteristics of the depth of field of the lens stored in the storage unit 72, the depth of field DOF is selected, the peak position PK included in the depth of field DOF is emphasized, and other The shooting position SP is determined to be a position that covers the subject focus position.
Then, the number-of-shots determination unit 56 counts the number of shooting positions SP1 to SP4 determined by the shooting position determination unit 55 to determine the number of shots (four). Thereafter, information on the shooting position determined by the shooting position determination unit 55 and information on the determined number of shots are output from the shot number determination unit 56 and stored in the shooting condition storage unit 72.
In this example, it is usually possible to shoot four shots where it is necessary to shoot five. As a result, compared to the case of shooting five images, the shooting time is shortened and is not affected by camera shake, etc., and the image quality is good and the processing time for combining is reduced, so the combining time can be shortened. The generation time of the omnifocal image can be shortened.

ステップS15において、撮像制御部51は、ユーザからの入力部17のシャッタボタンへの全押しの操作を検出する。シャッタボタンへの全押し操作により、フォーカスブラケティング撮影が行われることとなる。   In step S <b> 15, the imaging control unit 51 detects an operation of fully pressing the shutter button of the input unit 17 from the user. Focus bracketing shooting is performed by fully pressing the shutter button.

ステップS16において、撮像制御部51は、撮像部16を制御してフォーカスブラケティング撮影をする。撮像制御部51は、撮影条件記憶部72に記憶される撮影条件の設定(撮影位置及び撮影枚数)に基づいて、設定される撮影位置での撮影を設定枚数分行うように撮像部16を制御する。その後、撮像画像取得部52は、フォーカスブラケティング撮影により撮像部16から出力される撮像画像のデータを取得して、撮像情報記憶部71に記憶させる。   In step S16, the imaging control unit 51 controls the imaging unit 16 to perform focus bracketing imaging. The imaging control unit 51 controls the imaging unit 16 to perform shooting at the set shooting position based on the setting of the shooting conditions (shooting position and number of shots) stored in the shooting condition storage unit 72. To do. Thereafter, the captured image acquisition unit 52 acquires captured image data output from the imaging unit 16 by focus bracketing imaging, and stores the captured image data in the imaging information storage unit 71.

ステップS17において、画像合成部57は、決定された撮影条件(撮影位置及び撮影枚数)で撮影されて、撮像情報記憶部71に記憶されるフォーカスブラケティング撮影によって取得した撮像画像のデータを合成する処理(画像合成処理)をする。画像合成部57は、例えば、撮像画像のフォーカス位置近傍の画像を逐次合成して合成画像を生成する。その結果、1枚の全焦点画像のデータが生成される。その後、画像合成部57は、生成した全焦点画像のデータを合成画像記憶部73に記憶させる。これにより、全焦点画像生成処理は終了する。   In step S <b> 17, the image composition unit 57 synthesizes the captured image data obtained by the focus bracketing photographing that is photographed under the determined photographing conditions (the photographing position and the number of photographs) and stored in the photographing information storage unit 71. Processing (image composition processing) is performed. For example, the image composition unit 57 sequentially composes images near the focus position of the captured image to generate a composite image. As a result, data for one omnifocal image is generated. Thereafter, the image composition unit 57 stores the generated omnifocal image data in the composite image storage unit 73. Thereby, the omnifocal image generation process ends.

<変形例>
上述した実施形態においては、撮影領域に含まれる被写体の位置に応じて撮影位置と撮影枚数とを決定していた。
本例では、撮影領域に含まれる被写体がどのような被写体であるかを考慮して撮影位置と撮影枚数とを決定する。即ち、優先的にフォーカス位置を決定するように構成する。
<Modification>
In the embodiment described above, the shooting position and the number of shots are determined according to the position of the subject included in the shooting area.
In this example, the shooting position and the number of shots are determined in consideration of the type of subject included in the shooting area. That is, the focus position is determined with priority.

具体的には、想定される撮影対象に合わせた撮影モードを設ける。当該撮影モードでは、撮影対象に対応して、被写体フォーカス位置の頻度の重み付けを変更することにより、撮影対象に合わせて優先的にフォーカス位置(撮影位置)を決定することができる。
このような撮影モードに対応するフォーカス位置及び撮影枚数を決定するための重み付けの設定の情報は、撮像情報記憶部71に記憶される。そして、頻度分布算出部54において、当該重み付けを加味した被写体フォーカス位置の頻度分布が算出されることになる。
Specifically, a shooting mode that matches the assumed shooting target is provided. In the shooting mode, the focus position (shooting position) can be preferentially determined according to the shooting target by changing the weighting of the frequency of the subject focus position corresponding to the shooting target.
Information on setting of weights for determining the focus position and the number of shots corresponding to such a shooting mode is stored in the imaging information storage unit 71. Then, the frequency distribution calculation unit 54 calculates the frequency distribution of the subject focus position in consideration of the weighting.

図8は、頻度分布における重み付けの具体例について説明する模式図である。
撮影モードは、図8(a)に示すように、例えば、「風景」の撮影モード,「花」の撮影モード,「人物」の撮影モード,「自分撮り」の撮影モード,「中央重点測光」の撮影モード等のモードが設定される。ユーザは、これらの撮影モードのうち、撮影を行う予定の状況に合わせてモードを変更する。
FIG. 8 is a schematic diagram illustrating a specific example of weighting in the frequency distribution.
As shown in FIG. 8A, the shooting modes include, for example, “landscape” shooting mode, “flower” shooting mode, “person” shooting mode, “selfie” shooting mode, and “center-weighted metering”. A mode such as a shooting mode is set. Of these shooting modes, the user changes the mode according to the situation where shooting is scheduled.

「風景」の撮影モードは、風景を撮影する場合に設定するモードであり、無限遠の被写体フォーカス位置に優先的に撮影位置が決定されるように重み付けが設定される。   The “landscape” shooting mode is a mode set when shooting a landscape, and weighting is set so that a shooting position is preferentially determined at an object focus position at infinity.

「花」の撮影モードは、花等を接写して撮影する場合に設定するモードであり、無限遠を除くマクロ端側の領域数が多い被写体フォーカス位置に優先的に撮影位置が決定されるように重み付けが設定される。   The “flower” shooting mode is set when shooting close-ups of flowers, etc., so that the shooting position is preferentially determined at the subject focus position with a large number of areas on the macro end side excluding infinity. Is assigned a weight.

「人物」の撮影モードは、人物を撮影する場合に設定するモードであり、被写体フォーカス位置の領域数によらず顔検出したフォーカス位置に優先的に撮影位置が決定されるように重み付けが設定される。なお、「人物」の撮影モードでは、複数の顔が検出された場合には、検出された顔の領域数が多い被写体フォーカス位置を優先する。   The “person” shooting mode is set when shooting a person, and weighting is set so that the shooting position is preferentially determined to the focus position where the face is detected regardless of the number of areas of the subject focus position. The In the “person” shooting mode, when a plurality of faces are detected, priority is given to a subject focus position having a large number of detected face areas.

「自分撮り」の撮影モードは、自分を撮影する場合に設定するモードであり、被写体フォーカス位置の領域数によらず顔検出したフォーカス位置に優先的に撮影位置が決定されるように重み付けが設定される。   “Self-portrait” shooting mode is set when shooting yourself, and weighting is set so that the shooting position is preferentially determined to the focus position where the face is detected regardless of the number of areas of the subject focus position. Is done.

「中央重点測光」の撮影モードは、撮像画像の中央部に重点を置いて露出を決定した撮影をする場合に設定するモードであり、画像の中央のフォーカス位置に優先的に撮影位置が決定されるように重み付けが設定される。   The “Center-weighted metering” shooting mode is a mode that is set when shooting is performed with an emphasis on the center of the captured image, and the shooting position is determined preferentially at the focus position at the center of the image. The weighting is set so that

また、大抵の場合撮影領域の中央に主要被写体を位置させて撮影させる傾向が強いため、特に中央部を重視した重み付けを設定するように構成してもよい。この場合、図8(b)に示すように、例えば、中央部の被写体フォーカス位置FPの重み付けを高くし、中央から離れるほど重み付けを低くするように設定する。即ち、中央部の被写体フォーカス位置FPは4つ分のカウントがされ、その周囲の被写体フォーカス位置FPは、2つ分のカウントがされ、さらにその周囲は通常のカウントがされる。   Further, in most cases, there is a strong tendency to place the main subject in the center of the shooting area and shoot, so that weighting that emphasizes the central portion may be set. In this case, as shown in FIG. 8B, for example, the weight of the subject focus position FP at the center is increased, and the weight is set lower as the distance from the center increases. That is, the subject focus position FP at the center is counted for four, the subject focus position FP around it is counted for two, and the surroundings are counted as normal.

また、隣接する被写体フォーカス位置FPが同じ値を示す場合には、同一の被写体が含まれる場合が多いために、例えば、隣接した被写体フォーカス位置の数分の重み付けを設定するように構成してもよい。
この場合、図8(c)に示すように、「無限遠∞」は隣接する被写体フォーカス位置FPが10つあるため10つ分のカウントがされ、「10cm」は隣接する被写体フォーカス位置が6つあるため6つ分のカウントがされ、「30cm」は隣接する被写体フォーカス位置FPが3つあるため3つ分のカウントがされ、「1m」は隣接する被写体フォーカス位置FPが2つあるため2つ分のカウントがされる。それ以外の「2m」及び「3m」は隣接する被写体フォーカス位置FPがないために通常のカウントがされる。
In addition, when adjacent subject focus positions FP indicate the same value, the same subject is often included, and therefore, for example, weighting corresponding to the number of adjacent subject focus positions may be set. Good.
In this case, as shown in FIG. 8C, “infinity infinity” is counted for 10 because there are 10 adjacent subject focus positions FP, and “10 cm” has 6 adjacent subject focus positions. Therefore, 6 counts are performed, “30 cm” is counted for 3 because there are 3 adjacent subject focus positions FP, and “1 m” is 2 because there are 2 adjacent subject focus positions FP. A minute is counted. The other “2 m” and “3 m” are counted normally because there is no adjacent subject focus position FP.

以上のような撮像装置1によれば、撮像部16と、フォーカス情報取得部53と、頻度分布算出部54と、撮影位置決定部55と、を備える。
フォーカス情報取得部53は、撮像部16により撮像された撮像画像の撮影画面を分割した複数の領域毎に被写体フォーカス位置を取得する。
頻度分布算出部54は、フォーカス情報取得部53により取得された各被写体フォーカス位置に対応する領域数を計数する。
撮影位置決定部55は、頻度分布算出部54により計数された各被写体フォーカス位置に対応する領域数に応じて、撮像部16の被写界深度に基づいた撮影位置(フォーカス停止位置,撮影のためのフォーカス位置)を決定する。
従って、撮像装置1においては、撮影領域に含まれる被写体を考慮したフォーカス位置の決定を行うことができる。なお、撮影領域に含まれる各被写体全体を考慮して、撮影のためのフォーカス位置を決定する場合には、撮影のためのフォーカス位置の数は、被写体フォーカス位置の数よりも少なくなる。
これにより、撮像装置1においては、全焦点画像に用いる撮像画像の取得のためのフォーカスブラケッティング撮影の際の適切なフォーカス位置を決定することができる。
また、撮像装置1においては、当該決定を用いて、ユーザが撮像を行うか否かの判断の材料とすることができる。
According to the imaging apparatus 1 as described above, the imaging unit 16, the focus information acquisition unit 53, the frequency distribution calculation unit 54, and the imaging position determination unit 55 are provided.
The focus information acquisition unit 53 acquires the subject focus position for each of a plurality of areas obtained by dividing the shooting screen of the captured image captured by the imaging unit 16.
The frequency distribution calculation unit 54 counts the number of regions corresponding to each subject focus position acquired by the focus information acquisition unit 53.
The shooting position determination unit 55 sets the shooting position (focus stop position, for shooting) based on the depth of field of the imaging unit 16 according to the number of areas corresponding to each subject focus position counted by the frequency distribution calculation unit 54. Focus position).
Therefore, the imaging apparatus 1 can determine the focus position in consideration of the subject included in the shooting area. Note that when the focus position for shooting is determined in consideration of the entire subjects included in the shooting area, the number of focus positions for shooting is smaller than the number of subject focus positions.
Thus, in the imaging apparatus 1, it is possible to determine an appropriate focus position when the focus brackets computing imaging for the acquisition of the captured image used in the all-focus image.
In the imaging apparatus 1, the determination can be used as a material for determining whether or not the user performs imaging.

また、撮像装置1では、撮影位置決定部55により決定した撮影のためのフォーカス位置に応じてフォーカスブラケッティング撮影の撮影枚数を決定する撮影枚数決定部56を備える。
これにより、撮像装置1においては、例えば、不要な撮影を減らすことができて全焦点画像の生成にかかる時間も短縮できる。
In addition, the imaging apparatus 1 includes an imaging number determination unit 56 that determines the number of images for focus bracketing imaging according to the focus position for imaging determined by the imaging position determination unit 55.
Thereby, in the imaging device 1, for example, unnecessary shooting can be reduced, and the time taken to generate an omnifocal image can be shortened.

また、撮影位置決定部55は、頻度分布算出部54により計数された被写体フォーカス位置を優先して、その被写体フォーカス位置に対応する撮影のためのフォーカス位置を決定する。
これにより、撮像装置1においては、高品質な全焦点画像の生成を行うことができる撮像画像を取得することが可能になる。
In addition, the shooting position determination unit 55 gives priority to the subject focus position counted by the frequency distribution calculation unit 54 and determines a focus position for shooting corresponding to the subject focus position.
Thereby, in the imaging device 1, it becomes possible to acquire the captured image which can produce | generate a high quality omnifocal image.

撮影位置決定部55は、各被写体距離におけるフォーカス状態が所定状態となるように撮像部16の被写界深度の重なりを考慮して、複数の撮影のためのフォーカス位置を決定する。
これにより、撮像装置1においては、例えば、被写界深度が重複した位置でのフォーカス位置が決定されないために、不要な撮影を減らすことができて全焦点画像の生成にかかる時間も短縮できる。
The shooting position determination unit 55 determines the focus positions for a plurality of shootings in consideration of overlapping depth of field of the imaging unit 16 so that the focus state at each subject distance becomes a predetermined state.
Thereby, in the imaging device 1, for example, since the focus position at the position where the depth of field overlaps is not determined, unnecessary shooting can be reduced, and the time required for generating the omnifocal image can also be shortened.

撮影位置決定部55は、撮影モードに応じて優先するフォーカス位置を決定する。
これにより、撮像装置1においては、予め分かる撮影の状況を考慮した撮影位置の決定が行えるために、より高品質な全焦点画像の生成に用いる撮像画像、即ち、適切な位置にフォーカス位置が決定されている撮像画像を取得することができる。
The shooting position determination unit 55 determines a focus position that has priority according to the shooting mode.
As a result, since the imaging apparatus 1 can determine the shooting position in consideration of the shooting situation that can be understood in advance, the captured image used for generating a higher quality omnifocal image, that is, the focus position is determined at an appropriate position It is possible to acquire a captured image.

撮影位置決定部55は、撮影モードのうち、人物を撮影するモードでは、顔を検出し、検出した顔のフォーカス位置を優先する。
これにより、撮像装置1においては、人物を撮影する場合に適して顔にフォーカスが合った撮像画像を取得することができ、高品質な全焦点画像を生成することができる。
The shooting position determination unit 55 detects a face in a shooting mode among the shooting modes, and prioritizes the focus position of the detected face.
Thereby, in the imaging device 1, it is possible to acquire a captured image in which the face is in focus suitable for photographing a person, and a high-quality omnifocal image can be generated.

撮影位置決定部55は、顔が複数検出された場合は、領域数が多いフォーカス位置を優先する。
これにより、撮像装置1においては、複数の人物を撮影する場合により手前やより大きな顔にフォーカスが合った撮像画像を取得することができ、高品質な全焦点画像を生成することができる。
When a plurality of faces are detected, the shooting position determination unit 55 gives priority to a focus position with a large number of areas.
As a result, the imaging apparatus 1 can acquire a captured image focused on the front or a larger face when photographing a plurality of persons, and can generate a high-quality omnifocal image.

撮影位置決定部55は、同じフォーカス位置の領域の分布状況に応じた重み付けをした被写体フォーカス位置を優先して、撮影のためのフォーカス位置を決定する。
これにより、撮像装置1においては、例えば、同じフォーカス位置の領域である場合には同一の被写体である場合が高いために、当該被写体を考慮した撮像画像を取得することができ、高品質な全焦点画像を生成することができる。
The shooting position determination unit 55 determines the focus position for shooting by giving priority to the subject focus position weighted according to the distribution state of the region of the same focus position.
As a result, in the imaging apparatus 1, for example, in the case of the same focus position, the same subject is likely to be the same subject, so that a captured image considering the subject can be acquired, and high quality all A focus image can be generated.

撮影位置決定部55は、同じフォーカス位置の領域が隣接している場合は、高い重み付けをすること。
これにより、撮像装置1においては、同じフォーカス位置の領域が隣接しているときに同一の被写体である可能性が高いために、当該被写体を考慮した撮像画像を取得することができ、高品質な全焦点画像を生成することができる。
The shooting position determination unit 55 performs high weighting when the areas having the same focus position are adjacent to each other.
Thereby, in the imaging device 1, since it is highly likely that the same subject is the same subject when the regions of the same focus position are adjacent to each other, a captured image that takes the subject into consideration can be acquired, and high quality An omnifocal image can be generated.

また、撮像装置1は、画像を合成する画像合成部57と、を備える。
画像合成部57は、所定のフォーカスブラケットで撮影(フォーカスブラケティング撮影)された撮像画像を合成して全焦点画像を生成する。
これにより、撮像装置1においては、撮影領域の状態に応じたフォーカスブラケティング撮影を行うことができるため、例えば、不要な撮影を減らすことができて全焦点画像の生成にかかる時間も短縮できたり、適切な位置にフォーカス位置が決定されている撮像画像を取得して高品質な全焦点画像を生成できたりするようになる。
In addition, the imaging apparatus 1 includes an image composition unit 57 that synthesizes images.
The image composition unit 57 synthesizes captured images photographed with a predetermined focus bracket (focus bracketing photographing) to generate an omnifocal image.
Thereby, since the imaging apparatus 1 can perform focus bracketing imaging according to the state of the imaging region, for example, unnecessary imaging can be reduced and the time required to generate an omnifocal image can be reduced. Then, it is possible to acquire a captured image in which the focus position is determined at an appropriate position and generate a high-quality omnifocal image.

なお、本発明は、上述の実施形態に限定されるものではなく、本発明の目的を達成できる範囲での変形、改良等は本発明に含まれるものである。   In addition, this invention is not limited to the above-mentioned embodiment, The deformation | transformation in the range which can achieve the objective of this invention, improvement, etc. are included in this invention.

上述の実施形態では、撮影位置決定部55は、全ての被写体フォーカス位置を考慮してフォーカス停止位置を決定したがこれに限られない。撮影位置決定部55は、例えば、閾値を設けて、所定数の被写体フォーカス位置以上の被写体フォーカス位置だけを考慮して撮影位置(フォーカス停止位置)を決定するように構成してもよい。
具体的には、撮影位置決定部55は、領域数の閾値を設け、閾値以上の領域でフォーカス位置を優先して撮影位置(フォーカス停止位置)を決定するように構成する。
これにより、撮像装置1においては、例えば、被写界深度が重複した位置でのフォーカス位置が決定されないために、不要な撮影を減らすことができて全焦点画像の生成にかかる時間も短縮できる。
In the above-described embodiment, the shooting position determination unit 55 determines the focus stop position in consideration of all subject focus positions, but is not limited thereto. For example, the shooting position determination unit 55 may be configured to determine a shooting position (focus stop position) by providing a threshold and considering only subject focus positions equal to or greater than a predetermined number of subject focus positions.
Specifically, the shooting position determination unit 55 is configured to provide a threshold value for the number of areas and to determine the shooting position (focus stop position) with priority given to the focus position in an area equal to or greater than the threshold value.
Thereby, in the imaging device 1, for example, since the focus position at the position where the depth of field overlaps is not determined, unnecessary shooting can be reduced, and the time required for generating the omnifocal image can also be shortened.

また、上述の実施形態では、被写体フォーカス位置の頻度を優先して、フォーカス停止位置である撮影位置を決定していたがこれに限られない。例えば、最も被写界深度の範囲が広い被写界深度に属するフォーカス位置の撮影位置を決定し、次に、AFされたフォーカス位置やユーザが任意に設定したフォーカス位置の撮影位置を決定し、その後、フォーカス位置の頻度に応じて撮影位置を決定するように構成してもよい。また、被写界深度の広いフォーカス位置を優先して撮影位置(フォーカス停止位置)を決定するように構成してもよい。
このように構成することにより、撮像装置1においては、例えば、被写界深度が重複した位置でのフォーカス位置が決定されないために、不要な撮影を減らすことができて全焦点画像の生成にかかる時間も短縮できる。
In the above-described embodiment, the shooting position that is the focus stop position is determined by giving priority to the frequency of the subject focus position. However, the present invention is not limited to this. For example, determine the shooting position of the focus position belonging to the depth of field with the widest range of depth of field, and then determine the AF position of focus and the shooting position of the focus position arbitrarily set by the user, Thereafter, the photographing position may be determined according to the frequency of the focus position. Alternatively, the photographing position (focus stop position) may be determined by giving priority to a focus position with a wide depth of field.
With this configuration, in the imaging device 1, for example, since the focus position at a position where the depth of field overlaps is not determined, unnecessary shooting can be reduced and it is necessary to generate an omnifocal image. Time can be shortened.

また、上述の実施形態では、決定された撮影位置及び撮影枚数に基づいて、全焦点画像を生成するように構成したがこれに限られない。例えば、決定された撮影位置及び撮影枚数に基づいて、全焦点画像が生成可能か否かの判断結果を出力部18で表示出力させてユーザに報知するように構成してもよい。この場合、撮像画像から判断して全焦点画像が生成できない旨や、好適な全焦点画像が生成できる旨を報知する。
また、逐次取得されるライブビュー画像を全焦点画像の生成の判断に使用して、ライブビュー画像取得毎に全焦点画像の生成の判断を行うように構成してもよい。この場合、ユーザは、所定の方向に撮像装置を向けることで、全焦点画像の生成の判断(撮影位置及び撮影枚数の決定)が行われて、出力部18から判断結果が出力される。ユーザは、この判断の結果を受けて、全焦点画像生成処理の実行をするか否かの判断を行うことができる。また、判断結果が全焦点画像の生成ができないという結果である場合には、全焦点画像生成処理実行しないことで不要な処理を実行しないでよくなる。
具体的には、撮影位置決定部55等により決定された撮影位置に基づいて、全焦点画像の生成に適する撮像画像が取得可能か否かを判断する判断手段を設け、さらに、判断手段の判断結果を報知出力するように出力部18を制御する出力制御手段を設けることで構成することができる。
これにより、現在の撮影予定の領域が全焦点画像に適している否かをユーザに報知することができる。
なお、出力部18における出力は、画面表示、音、ランプの点灯等で行うことができる。
In the above-described embodiment, the omnifocal image is generated based on the determined shooting position and the number of shots. However, the present invention is not limited to this. For example, based on the determined shooting position and the number of shots, the output unit 18 may display and output a determination result as to whether or not an omnifocal image can be generated and notify the user. In this case, it is notified that an omnifocal image cannot be generated based on the captured image, or that a suitable omnifocal image can be generated.
Further, it may be configured such that a live view image acquired sequentially is used for determination of generation of an omnifocal image, and generation of an omnifocal image is determined every time a live view image is acquired. In this case, the user determines the generation of the omnifocal image (determination of the shooting position and the number of shots) by pointing the imaging device in a predetermined direction, and the determination result is output from the output unit 18. The user can determine whether or not to execute the omnifocal image generation process based on the result of this determination. Further, if the determination result is the result that can not generate a full-focus image it is better not perform unnecessary processing by not performing a full focus image generation processing.
Specifically, a determination unit is provided for determining whether a captured image suitable for generating an omnifocal image can be acquired based on the shooting position determined by the shooting position determination unit 55 or the like. It can be configured by providing an output control means for controlling the output unit 18 so as to notify and output the result.
Accordingly, it is possible to notify the user whether or not the current shooting scheduled area is suitable for the omnifocal image.
The output in the output unit 18 can be performed by screen display, sound, lamp lighting, or the like.

また、上述の実施形態では、本発明が適用される撮像装置1は、デジタルカメラを例として説明したが、特にこれに限定されない。また、本発明は、撮像の機能を有さずに、外部で撮像された画像に基づいて全焦点画像生成処理を行う画像処理装置でも適用可能である。
例えば、本発明は、全焦点画像生成処理機能を有する電子機器一般に適用することができる。具体的には、例えば、本発明は、ノート型のパーソナルコンピュータ、プリンタ、テレビジョン受像機、ビデオカメラ、携帯型ナビゲーション装置、携帯電話機、スマートフォン(smartphone)、ポータブルゲーム機等に適用可能である。
In the above-described embodiment, the imaging apparatus 1 to which the present invention is applied has been described using a digital camera as an example, but is not particularly limited thereto. The present invention can also be applied to an image processing apparatus that does not have an imaging function and performs an omnifocal image generation process based on an image captured externally.
For example, the present invention can be applied to general electronic devices having an omnifocal image generation processing function. Specifically, for example, the present invention can be applied to a notebook personal computer, a printer, a television receiver, a video camera, a portable navigation device, a mobile phone, a smart phone, a portable game machine, and the like.

上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウェアにより実行させることもできる。
換言すると、図3の機能的構成は例示に過ぎず、特に限定されない。即ち、上述した一連の処理を全体として実行できる機能が撮像装置1に備えられていれば足り、この機能を実現するためにどのような機能ブロックを用いるのかは特に図3の例に限定されない。
また、1つの機能ブロックは、ハードウェア単体で構成してもよいし、ソフトウェア単体で構成してもよいし、それらの組み合わせで構成してもよい。
The series of processes described above can be executed by hardware or can be executed by software.
In other words, the functional configuration of FIG. 3 is merely an example, and is not particularly limited. That is, it is sufficient that the imaging apparatus 1 has a function capable of executing the above-described series of processing as a whole, and what functional blocks are used to realize this function is not particularly limited to the example of FIG.
In addition, one functional block may be constituted by hardware alone, software alone, or a combination thereof.

一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、コンピュータ等にネットワークや記録媒体からインストールされる。
コンピュータは、専用のハードウェアに組み込まれているコンピュータであってもよい。また、コンピュータは、各種のプログラムをインストールすることで、各種の機能を実行することが可能なコンピュータ、例えば汎用のパーソナルコンピュータであってもよい。
When a series of processing is executed by software, a program constituting the software is installed on a computer or the like from a network or a recording medium.
The computer may be a computer incorporated in dedicated hardware. The computer may be a computer capable of executing various functions by installing various programs, for example, a general-purpose personal computer.

このようなプログラムを含む記録媒体は、ユーザにプログラムを提供するために装置本体とは別に配布される図2のリムーバブルメディア31により構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに提供される記録媒体等で構成される。リムーバブルメディア31は、例えば、磁気ディスク(フロッピディスクを含む)、光ディスク、又は光磁気ディスク等により構成される。光ディスクは、例えば、CD−ROM(Compact Disk−Read Only Memory),DVD(Digital Versatile Disk)、BD(Blu−ray(登録商標) Disc)等により構成される。光磁気ディスクは、MD(Mini−Disk)等により構成される。また、装置本体に予め組み込まれた状態でユーザに提供される記録媒体は、例えば、プログラムが記録されている図2のROM12や、図2の記憶部19に含まれるハードディスク等で構成される。   The recording medium including such a program is not only constituted by the removable medium 31 of FIG. 2 distributed separately from the apparatus main body in order to provide the program to the user, but also in a state of being incorporated in the apparatus main body in advance. It is comprised with the recording medium etc. which are provided in this. The removable medium 31 is composed of, for example, a magnetic disk (including a floppy disk), an optical disk, a magneto-optical disk, or the like. The optical disc is configured by, for example, a CD-ROM (Compact Disk-Read Only Memory), a DVD (Digital Versatile Disc), a BD (Blu-ray (registered trademark) Disc), or the like. The magneto-optical disk is configured by an MD (Mini-Disk) or the like. In addition, the recording medium provided to the user in a state of being preliminarily incorporated in the apparatus main body is configured by, for example, the ROM 12 in FIG.

なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、その順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的或いは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in time series along the order, but is not necessarily performed in time series, either in parallel or individually. The process to be executed is also included.

以上、本発明のいくつかの実施形態について説明したが、これらの実施形態は、例示に過ぎず、本発明の技術的範囲を限定するものではない。本発明はその他の様々な実施形態を取ることが可能であり、さらに、本発明の要旨を逸脱しない範囲で、省略や置換等種々の変更を行うことができる。これら実施形態やその変形は、本明細書等に記載された発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   As mentioned above, although several embodiment of this invention was described, these embodiment is only an illustration and does not limit the technical scope of this invention. The present invention can take other various embodiments, and various modifications such as omission and replacement can be made without departing from the gist of the present invention. These embodiments and modifications thereof are included in the scope and gist of the invention described in this specification and the like, and are included in the invention described in the claims and the equivalent scope thereof.

以下に、本願の出願当初の特許請求の範囲に記載された発明を付記する。
[付記1]
撮像手段と、
前記撮像手段により撮像された撮像画像を分割した複数の領域毎に被写体のフォーカス位置を測定する測定手段と、
前記測定手段により測定して得られた各被写体のフォーカス位置に対応する領域数を計数する計数手段と、
前記計数手段により計数された各被写体のフォーカス位置に対応する領域数に応じて、前記撮像手段の被写界深度に基づいた撮影のためのフォーカス位置を決定する決定手段と、
を備えることを特徴とする撮像装置。
[付記2]
前記撮影のためのフォーカス位置の数は、前記被写体のフォーカス位置の数よりも少ないこと、
を特徴とする付記1に記載の撮像装置。
[付記3]
前記決定手段により決定した撮影のためのフォーカス位置に応じてフォーカスブラケットの撮影枚数を算出する算出手段を備えること、
を特徴とする付記1又は2に記載の撮像装置。
[付記4]
前記決定手段は、前記計数手段により計数された領域数が多い被写体のフォーカス位置を優先して、その被写体のフォーカス位置に対応する撮影のためのフォーカス位置を決定すること、
を特徴とする付記1乃至3の何れか1つに記載の撮像装置。
[付記5]
前記決定手段は、各被写体距離におけるフォーカス状態が所定状態となるように前記撮像手段の被写界深度の重なりを考慮して、複数の撮影のためのフォーカス位置を決定すること、
を特徴とする付記1乃至4の何れか1つに記載の撮像装置。
[付記6]
前記決定手段は、領域数の閾値を設け、閾値以上の領域の被写体のフォーカス位置を優先して撮影のためのフォーカス位置を決定すること、
を特徴とする付記1乃至5の何れか1つに記載の撮像装置。
[付記7]
前記決定手段は、被写界深度の広い被写体のフォーカス位置を優先して撮影のためのフォーカス位置決定すること、
を特徴とする付記1乃至6の何れか1つに記載の撮像装置。
[付記8]
前記決定手段は、撮影モードに応じた被写体のフォーカス位置を優先して撮影ためのフォーカス位置を決定すること、
を特徴とする付記1乃至7の何れか1つに記載の撮像装置。
[付記9]
前記決定手段は、前記撮影モードのうち、人物を撮影するモードでは、顔を検出し、検出した顔のフォーカス位置を優先して、撮影ためのフォーカス位置を決定すること、
を特徴とする付記8に記載の撮像装置。
[付記10]
前記決定手段は、顔が複数検出された場合は、領域数が多い顔のフォーカス位置を優先すること、
を特徴とする付記9に記載の撮像装置。
[付記11]
前記決定手段は、同じ被写体のフォーカス位置の領域の分布状況に応じた重み付けをした被写体のフォーカス位置を優先して撮影のためのフォーカス位置を決定すること、
を特徴とする付記1乃至10の何れか1つに記載の撮像装置。
[付記12]
前記決定手段は、同じ被写体のフォーカス位置の領域が隣接している場合は、高い重み付けをすること、
を特徴とする付記11に記載の撮像装置。
[付記13]
前記決定手段により決定された撮影のためのフォーカス位置に基づいて、全焦点画像の生成に適する撮像画像が取得可能か否かを判断する判断手段と、
前記判断手段の判断結果を出力するように出力手段を制御する出力制御手段と、
を備えることを特徴とする付記1乃至12の何れか1つに記載の撮像装置。
[付記14]
画像を合成する画像合成手段と、を備え、
前記画像合成手段は、所定のフォーカスブラケットで撮影された画像を合成して全焦点画像を生成すること、
を特徴とする付記1乃至13の何れか1つに記載の撮像装置。
[付記15]
撮像手段を備える撮像装置で実行される撮像方法において、
前記撮像手段により撮像された撮像画像を分割した複数の領域毎に被写体のフォーカス位置を測定する測定ステップと、
前記測定ステップにより測定して得られた各被写体のフォーカス位置に対応する領域数を計数する計数ステップと、
前記計数ステップにより計数された各被写体のフォーカス位置に対応する領域数に応じて、前記撮像手段の被写界深度に基づいた撮影のためのフォーカス位置を決定する決定ステップと、
を含むことを特徴とする撮像方法。
[付記16]
撮像手段を備える撮像装置を制御するコンピュータを、
前記撮像手段により撮像された撮像画像を分割した複数の領域毎に被写体のフォーカス位置を測定する測定手段、
前記測定手段により測定して得られた各被写体のフォーカス位置に対応する領域数を計数する計数手段、
前記計数手段により計数された各被写体のフォーカス位置に対応する領域数に応じて、前記撮像手段の被写界深度に基づいた撮影のためのフォーカス位置を決定する決定手段、
として機能させることを特徴とするプログラム。
The invention described in the scope of claims at the beginning of the filing of the present application will be appended.
[Appendix 1]
Imaging means;
Measuring means for measuring the focus position of the subject for each of a plurality of areas obtained by dividing the captured image captured by the imaging means;
Counting means for counting the number of areas corresponding to the focus position of each subject obtained by measurement by the measuring means;
A determining unit that determines a focus position for shooting based on a depth of field of the imaging unit according to the number of areas corresponding to the focus position of each subject counted by the counting unit;
An imaging apparatus comprising:
[Appendix 2]
The number of focus positions for shooting is less than the number of focus positions of the subject;
The imaging apparatus according to appendix 1, characterized by:
[Appendix 3]
A calculating means for calculating the number of shots of the focus bracket according to the focus position for shooting determined by the determining means;
The imaging apparatus according to appendix 1 or 2, characterized by:
[Appendix 4]
The determination means prioritizes a focus position of a subject having a large number of areas counted by the counting means, and determines a focus position for photographing corresponding to the focus position of the subject;
The imaging apparatus according to any one of supplementary notes 1 to 3, wherein:
[Appendix 5]
The determining unit determines a focus position for a plurality of photographing in consideration of an overlap of depth of field of the imaging unit so that a focus state at each subject distance becomes a predetermined state;
The imaging apparatus according to any one of appendices 1 to 4, characterized by:
[Appendix 6]
The determining means provides a threshold value for the number of areas, and determines a focus position for shooting by giving priority to a focus position of a subject in an area equal to or greater than the threshold;
The imaging apparatus according to any one of appendices 1 to 5, characterized by:
[Appendix 7]
The determination means prioritizes a focus position of a subject having a large depth of field to determine a focus position for shooting;
The imaging apparatus according to any one of appendices 1 to 6, characterized by:
[Appendix 8]
The determining means determines a focus position for shooting by giving priority to a focus position of a subject according to a shooting mode;
The imaging apparatus according to any one of appendices 1 to 7, characterized by:
[Appendix 9]
The determining means detects a face in the shooting mode among the shooting modes, determines a focus position for shooting by giving priority to the focus position of the detected face,
The imaging apparatus according to appendix 8, characterized by:
[Appendix 10]
The determination means prioritizes a focus position of a face having a large number of areas when a plurality of faces are detected;
The imaging apparatus according to appendix 9, characterized by:
[Appendix 11]
The determining means determines a focus position for photographing with priority given to a focus position of a subject weighted according to a distribution situation of a focus position area of the same subject;
The imaging apparatus according to any one of appendices 1 to 10, characterized by:
[Appendix 12]
The determining means performs high weighting when the focus position areas of the same subject are adjacent to each other,
The imaging apparatus according to appendix 11, characterized by:
[Appendix 13]
Determination means for determining whether or not a captured image suitable for generating an omnifocal image can be acquired based on the focus position for shooting determined by the determination means;
Output control means for controlling the output means so as to output the determination result of the determination means;
The imaging apparatus according to any one of supplementary notes 1 to 12, further comprising:
[Appendix 14]
Image combining means for combining images, and
The image synthesizing means generates an omnifocal image by synthesizing images taken with a predetermined focus bracket;
The imaging device according to any one of appendices 1 to 13, characterized by:
[Appendix 15]
In an imaging method executed by an imaging device including an imaging unit,
A measurement step of measuring the focus position of the subject for each of a plurality of areas obtained by dividing the captured image captured by the imaging unit;
A counting step of counting the number of areas corresponding to the focus position of each subject obtained by the measurement step;
A determination step for determining a focus position for photographing based on a depth of field of the imaging means according to the number of areas corresponding to the focus position of each subject counted in the counting step;
An imaging method comprising:
[Appendix 16]
A computer for controlling an imaging apparatus including an imaging means;
Measuring means for measuring the focus position of the subject for each of a plurality of areas obtained by dividing the captured image captured by the imaging means;
Counting means for counting the number of regions corresponding to the focus position of each subject obtained by measurement by the measuring means;
Determining means for determining a focus position for photographing based on the depth of field of the imaging means according to the number of areas corresponding to the focus position of each subject counted by the counting means;
A program characterized by functioning as

1・・・撮像装置,11・・・CPU,12・・・ROM,13・・・RAM,14・・・バス,15・・・入出力インターフェース,16・・・撮像部,17・・・入力部,18・・・出力部,19・・・記憶部,20・・・通信部,21・・・ドライブ,31・・・リムーバブルメディア,41・・・光学レンズ部,42・・・イメージセンサ,43・・・レンズ駆動部,51・・・撮像制御部,52・・・撮像画像取得部,53・・・フォーカス情報取得部,54・・・頻度分布算出部,55・・・撮影位置決定部,56・・・撮影枚数決定部,57・・・画像合成部,71・・・撮像情報記憶部,72・・・撮影条件記憶部,73・・・合成画像記憶部   DESCRIPTION OF SYMBOLS 1 ... Imaging device, 11 ... CPU, 12 ... ROM, 13 ... RAM, 14 ... Bus, 15 ... Input-output interface, 16 ... Imaging part, 17 ... Input unit 18 ... Output unit 19 ... Storage unit 20 ... Communication unit 21 ... Drive 31 ... Removable media 41 ... Optical lens unit 42 ... Image Sensor, 43... Lens drive unit, 51... Imaging control unit, 52... Captured image acquisition unit, 53... Focus information acquisition unit, 54. Position determining unit 56... Shooting number determining unit 57... Image compositing unit 71... Imaging information storage unit 72.

Claims (12)

全焦点画像を生成する画像生成装置であって、
撮像手段と、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定手段と、
前記測定手段により測定されて得られた前記被写体のフォーカス位置が、1回の撮影で得られる撮影画像で前記撮像手段が有するレンズの被写界深度の範囲に含まれる場合には、前記1回の撮影のみい保存画像として記憶し、一方、含まれない場合には、複数の異なるフォーカス位置による撮影で得られる複数の撮影画像を合成して前記全焦点画像を生成して保存画像として記憶する画像生成手段と、
を備える
ことを特徴とする画像生成装置。
An image generation device that generates an omnifocal image,
Imaging means;
Measuring means for measuring the focus positions of a plurality of subjects included in the captured image captured by the imaging means;
The focus position of the object obtained by being measured by the measuring means, when included in the scope of a single depth of field of the lens included in the imaging means photographed image obtained by photographing, the one storing the captured only as a line had stored image, whereas, if not included, as the stored image to generate the total-focus image synthesized and a plurality of captured images obtained by shooting by a plurality of different focus position Image generation means for storing ;
Equipped with a,
An image generation apparatus characterized by that.
前記画像生成手段は、前記測定手段により測定されて得られた前記被写体のフォーカス位置が異なる複数であっても、異なる複数の前記被写体のフォーカス位置が、前記1回の撮影で得られる撮影画像で前記撮像手段が有する前記レンズの前記被写界深度の範囲に含まれる場合には、前記1回の撮影のみ行う、
ことを特徴とする請求項1に記載の画像生成装置。
The image generating unit may be a plurality of focus positions of the object obtained is measured by the measuring means are different, the focus position of the plurality of subjects different is, the photographed image obtained by the one shot in the case included in the scope of the depth of field of the lens in which the imaging means comprises performs only the one shot,
The image generating apparatus according to claim 1.
前記画像生成手段は、前記測定手段により測定されて得られた前記被写体のフォーカス位置とは異なる撮影のためのフォーカス位置で、前記全焦点画像を生成するための撮影を行う、
ことを特徴とする請求項1又は2に記載の画像生成装置。
It said image generation means, the focus position for different shooting the focus position of the object obtained is measured by the measuring means performs the photographing for generating the all-focus image,
The image generation apparatus according to claim 1, wherein the image generation apparatus is an image generation apparatus.
前記画像生成手段は、前記測定手段により測定されて得られた前記被写体のフォーカス位置が異なる複数である場合に、異なる複数の前記被写体のフォーカス位置のうちの優先度の高い前記被写体のフォーカス位置を優先するように、撮影のためのフォーカス位置を決定して、前記全焦点画像を生成するための撮影を行う、
ことを特徴とする請求項1乃至3の何れか1項に記載の画像生成装置。
The image generating unit, when the focus position of the object obtained is measured by the measuring means is a plurality of different focus position of higher priority the subject of the focus positions of the plurality of the subjects different the so preferentially determines a focus position for photographing, performs photographing for generating the all-focus image,
The image generation apparatus according to claim 1, wherein the image generation apparatus is an image generation apparatus.
全焦点画像を生成する画像生成装置であって、
撮像手段と、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定手段と、
前記測定手段により測定されて得られた前記被写体のフォーカス位置に基づき、前記全焦点画像を生成する撮影のためのフォーカス位置を決定する決定手段と、
前記決定手段により決定された撮影のためのフォーカス位置が1箇所である場合には、前記決定手段により決定された撮影のためのフォーカス位置で1回の撮影のみい保存画像として記憶し、一方、異なる複数箇所である場合には、前記決定手段により決定された異なる複数の撮影のためのフォーカス位置による撮影で得られる複数の撮影画像を合成して、前記全焦点画像を生成して保存画像として記憶する画像生成手段と、
を備える
ことを特徴とする画像生成装置。
An image generation device that generates an omnifocal image,
Imaging means;
Measuring means for measuring the focus positions of a plurality of subjects included in the captured image captured by the imaging means;
A determination unit based on said focus position of the object obtained is measured by the measuring means, to determine a focus position for photographing for generating the all-focus image,
Wherein when the focus position for photographing determined by the determining means is one, and stored as a row have stored images only one shot at a focus position for the determined photographing by the determining means, on the other hand, if it is different from a plurality of locations combines the plurality of captured images obtained by the shooting by the focus position for the different imaging determined by the determination means, generates the all-focus image storage Image generating means for storing as an image;
Equipped with a,
An image generation apparatus characterized by that.
前記決定手段は、前記撮像手段が有するレンズの被写界深度に含まれるように、前記測定手段により測定して得られた前記被写体のフォーカス位置とは異なる、撮影のためのフォーカス位置を決定する、
ことを特徴とする請求項5に記載の画像生成装置。
It said determining means, to be included in the depth of field of the lens, wherein the imaging means comprises different from the focus position of the object obtained by measuring by the measuring means, to determine a focus position for shooting ,
The image generating apparatus according to claim 5.
前記決定手段は、前記測定手段により測定されて得られた前記被写体のフォーカス位置が異なる複数であっても、複数の異なる前記被写体のフォーカス位置が、1回の撮影で得られる撮影画像で前記撮像手段が有する前記レンズの前記被写界深度の範囲に含まれる場合には、撮影のためのフォーカス位置を1箇所のみ決定する、
ことを特徴とする請求項6に記載の画像生成装置。
Said determining means, said also focus position of the object obtained is measured a plurality of different by measuring means, the focus position of the several different the subject, the photographing image obtained in one shooting If included in the scope of the depth of field of the lens included in the imaging means, a focus position determining only one place for the shooting,
The image generation apparatus according to claim 6.
前記決定手段は、前記測定手段により測定されて得られた前記被写体のフォーカス位置が複数の異なる位置である場合に、複数の異なる前記被写体のフォーカス位置のうちの優先度の高い前記被写体のフォーカス位置を優先するように、撮影のためのフォーカス位置を決定する、
ことを特徴とする請求項5乃至7の何れか1項に記載の画像生成装置。
The determination unit, when the focus position of the object obtained is measured by the measuring means is a plurality of different positions, the focus of the high priority the subject of the focus position of different the subject of several Determine the focus position for shooting so that priority is given to the position.
The image generation apparatus according to claim 5, wherein the image generation apparatus is an image generation apparatus.
撮像手段を備え、全焦点画像を生成する画像生成装置で実行される画像生成方法において、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定処理と、
前記測定処理において測定されて得られた前記被写体のフォーカス位置が、1回の撮影で得られる撮影画像で前記撮像手段が有するレンズの被写界深度の範囲に含まれる場合には、前記1回の撮影のみい保存画像として記憶し、一方、含まれない場合には、複数の異なるフォーカス位置による撮影で得られる複数の撮影画像を合成して前記全焦点画像を生成して保存画像として記憶する画像生成処理と、
を含む
ことを特徴とする画像生成方法。
In an image generation method executed by an image generation apparatus that includes an imaging unit and generates an omnifocal image,
A measurement process for measuring focus positions of a plurality of subjects included in the captured image captured by the imaging unit;
The focus position of the object obtained by being measured in the measurement process, when included in the scope of a single depth of field of the lens included in the imaging means photographed image obtained by photographing, the one storing the captured only as a line had stored image, whereas, if not included, as the stored image to generate the total-focus image synthesized and a plurality of captured images obtained by shooting by a plurality of different focus position An image generation process to be stored ;
Including,
An image generation method characterized by the above.
撮像手段を備え、全焦点画像を生成する画像生成装置で実行される画像生成方法において、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定処理と、
前記測定処理において測定されて得られた前記被写体のフォーカス位置に基づき、前記全焦点画像を生成する撮影のためのフォーカス位置を決定する決定処理と、
前記決定処理において決定された撮影のためのフォーカス位置が1箇所である場合には、前記決定処理において決定された撮影のためのフォーカス位置で1回の撮影のみい保存画像として記憶し、一方、異なる複数箇所である場合には、前記決定処理において決定された異なる複数の撮影のためのフォーカス位置による撮影で得られる複数の撮影画像を合成して、前記全焦点画像を生成して保存画像として記憶する画像生成処理と、
を含む
ことを特徴とする画像生成方法。
In an image generation method executed by an image generation apparatus that includes an imaging unit and generates an omnifocal image,
A measurement process for measuring focus positions of a plurality of subjects included in the captured image captured by the imaging unit;
A determination process based on said focus position of the object obtained by being measured in the measurement process, to determine the focus position for photographing for generating the all-focus image,
Wherein when the focus position for the determining process has been determined photographed in is one, stores only one shot at a focus position for the determined photographing in the decision process as a line had stored image, on the other hand, if it is different from a plurality of locations combines the plurality of captured images obtained by the shooting by the focus position for different photographing determined in said determining process to generate the entire focal image storage Image generation processing stored as an image;
Including,
An image generation method characterized by the above.
撮像手段を備え、全焦点画像を生成する画像生成装置を制御するコンピュータに、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定機能、
前記測定機能により測定されて得られた前記被写体のフォーカス位置が、1回の撮影で得られる撮影画像で前記撮像手段が有するレンズの被写界深度の範囲に含まれる場合には、前記1回の撮影のみい保存画像として記憶し、一方、含まれない場合には、複数の異なるフォーカス位置による撮影で得られる複数の撮影画像を合成して前記全焦点画像を生成して保存画像として記憶する画像生成機能、
を実現させる
ことを特徴とするプログラム。
A computer that includes an imaging unit and controls an image generation apparatus that generates an omnifocal image,
A measurement function for measuring the focus positions of a plurality of subjects included in the captured image captured by the imaging unit;
The focus position of the object obtained by being measured by the measurement function, if included in the scope of a single depth of field of the lens included in the imaging means photographed image obtained by photographing, the one storing the captured only as a line had stored image, whereas, if not included, as the stored image to generate the total-focus image synthesized and a plurality of captured images obtained by shooting by a plurality of different focus position Image generation function to memorize ,
To realize ,
A program characterized by that.
撮像手段を備え、全焦点画像を生成する画像生成装置を制御するコンピュータに、
前記撮像手段により撮像された撮像画像に含まれる複数の被写体のフォーカス位置を測定する測定機能、
前記測定機能により測定されて得られた前記被写体のフォーカス位置に基づき、前記全焦点画像を生成する撮影のためのフォーカス位置を決定する決定機能、
前記決定機能により決定された撮影のためのフォーカス位置が1箇所である場合には、前記決定機能により決定された撮影のためのフォーカス位置で1回の撮影のみい保存画像として記憶し、一方、異なる複数箇所である場合には、前記決定機能により決定された異なる複数の撮影のためのフォーカス位置による撮影で得られる複数の撮影画像を合成して、前記全焦点画像を生成して保存画像として記憶する画像生成機能、
を実現させる
ことを特徴とするプログラム。
A computer that includes an imaging unit and controls an image generation apparatus that generates an omnifocal image,
A measurement function for measuring the focus positions of a plurality of subjects included in the captured image captured by the imaging unit;
The measurement function by on the basis of the focus position of the object obtained by the measuring, determining function for determining a focus position for photographing for generating the all-focus image,
Wherein when determining functional focus position for the determined shot by is one, stores only one shot at a focus position for photographing determined by the determination function as a row have stored image, on the other hand, if it is different from a plurality of locations combines the plurality of captured images obtained by the shooting by the focus position for the different imaging determined by the determination function, to generate the total focal image storage Image generation function to store as an image,
To realize ,
A program characterized by that.
JP2016139862A 2016-07-15 2016-07-15 Image generating apparatus, image generating method, and program Expired - Fee Related JP6260652B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016139862A JP6260652B2 (en) 2016-07-15 2016-07-15 Image generating apparatus, image generating method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016139862A JP6260652B2 (en) 2016-07-15 2016-07-15 Image generating apparatus, image generating method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2015137381A Division JP5979288B2 (en) 2015-07-09 2015-07-09 Imaging apparatus, imaging method, and program

Publications (2)

Publication Number Publication Date
JP2016208530A JP2016208530A (en) 2016-12-08
JP6260652B2 true JP6260652B2 (en) 2018-01-17

Family

ID=57488129

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016139862A Expired - Fee Related JP6260652B2 (en) 2016-07-15 2016-07-15 Image generating apparatus, image generating method, and program

Country Status (1)

Country Link
JP (1) JP6260652B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3668080B1 (en) * 2018-12-12 2021-08-18 Axis AB A method for assisting camera tilt angle adjustment
WO2022269999A1 (en) * 2021-06-25 2022-12-29 ソニーグループ株式会社 Control device, control method, and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4081806B2 (en) * 1999-10-18 2008-04-30 富士フイルム株式会社 Autofocus camera and photographing method
JP2001333316A (en) * 2000-05-19 2001-11-30 Minolta Co Ltd Image pickup device, image processing unit, image processing method and recording medium
JP2003114378A (en) * 2001-10-05 2003-04-18 Nikon Gijutsu Kobo:Kk Camera
JP2006308813A (en) * 2005-04-27 2006-11-09 Victor Co Of Japan Ltd Imaging apparatus with focus bracket function
JP2008058553A (en) * 2006-08-31 2008-03-13 Casio Comput Co Ltd Imaging apparatus, imaging method, and imaging control program

Also Published As

Publication number Publication date
JP2016208530A (en) 2016-12-08

Similar Documents

Publication Publication Date Title
JP5786847B2 (en) Imaging apparatus, imaging method, and program
JP6288952B2 (en) Imaging apparatus and control method thereof
KR101495584B1 (en) Image processing apparatus, image processing method and storage medium for acquiring an omnifocal image
JP4562182B2 (en) Image processing apparatus, image processing method, and program
JP5664626B2 (en) Image processing apparatus, image processing method, and program
JP4533252B2 (en) IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2017098631A (en) Image combination processing device
JP2009053448A (en) Electronic camera
JP2007124282A (en) Imaging apparatus
US20180167565A1 (en) Imaging apparatus and image synthesis method
JP2017005689A (en) Image processing system and image processing method
JP6833801B2 (en) Imaging equipment, imaging methods, programs and recording media
JP6260652B2 (en) Image generating apparatus, image generating method, and program
JP7142507B2 (en) Image processing device, image processing method, and imaging device
JP2007124278A (en) Imaging apparatus
JP5440626B2 (en) Imaging apparatus, composite image creation method, and program
JP5979288B2 (en) Imaging apparatus, imaging method, and program
JP2010200253A (en) Imaging apparatus
JP2019114919A (en) Imaging apparatus, imaging method, and recording medium with recorded program
JP5157116B2 (en) Imaging apparatus, composite image creation method, and program
JP2015041865A (en) Image processing apparatus and image processing method
JP5403087B2 (en) Image processing device
JP6357922B2 (en) Image processing apparatus, image processing method, and program
JP2020077964A (en) Imaging apparatus and control method thereof
JP6610713B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170420

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170516

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170713

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20171114

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171127

R150 Certificate of patent or registration of utility model

Ref document number: 6260652

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees