JP5673454B2 - Image processing apparatus, image processing method, and program - Google Patents

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

Info

Publication number
JP5673454B2
JP5673454B2 JP2011194554A JP2011194554A JP5673454B2 JP 5673454 B2 JP5673454 B2 JP 5673454B2 JP 2011194554 A JP2011194554 A JP 2011194554A JP 2011194554 A JP2011194554 A JP 2011194554A JP 5673454 B2 JP5673454 B2 JP 5673454B2
Authority
JP
Japan
Prior art keywords
image
subject
region
unit
contour
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2011194554A
Other languages
Japanese (ja)
Other versions
JP2013058823A (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 JP2011194554A priority Critical patent/JP5673454B2/en
Publication of JP2013058823A publication Critical patent/JP2013058823A/en
Application granted granted Critical
Publication of JP5673454B2 publication Critical patent/JP5673454B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

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

従来、略等しい構図でピント位置が異なる複数の画像に基づいて、各画像を分割した複数の領域のぼかし量を決定し、当該ぼかし量に応じたぼかし処理を施した画像を生成する撮像装置が開示されている(例えば、特許文献1参照)。
例えば、被写体にピントを合わせた被写体合焦画像と、ピント位置を後ろにずらした背景合焦画像を撮像した後、各画像に対して所定のエッジ検出用フィルタを施して対応する位置の画素の評価値を算出する。そして、算出された評価値に基づいて、背景領域を特定して当該背景領域のぼかしを強調するぼかし処理を行ったり、被写体領域を特定して当該被写体領域を抽出する処理を行う。
2. Description of the Related Art Conventionally, an imaging apparatus that determines a blur amount of a plurality of regions obtained by dividing each image based on a plurality of images having substantially the same composition and different focus positions, and generates an image subjected to a blur process according to the blur amount. It is disclosed (for example, see Patent Document 1).
For example, after capturing a subject in-focus image in which the subject is in focus and a background in-focus image in which the focus position is shifted backward, a predetermined edge detection filter is applied to each image, and pixels at corresponding positions are captured. An evaluation value is calculated. Then, based on the calculated evaluation value, a background process is performed to identify a background area and perform a blurring process for enhancing the blur of the background area, or a process for identifying a subject area and extracting the subject area.

特開2011−10194号公報JP 2011-10194 A

しかしながら、ピントが合っていない前景や背景に存する物の光学像は、ぼけた状態となって当該光学像が拡がってしまう。特に、例えば、蛍光灯などの高輝度の物から放たれて撮像素子に入射する光の強度が強いと、回折限界や収差に起因する撮像レンズの解像力によっては被写体合焦画像上に当該物の拡がった光学像の輪郭部分が明確に表れてしまう。この結果、被写体合焦画像内で当該物の光学像のエッジの誤検出が生じて、背景領域であるにも拘わらず被写体領域であると特定されてしまうといった問題がある。   However, an optical image of an object in the foreground or background that is not in focus is blurred and the optical image is spread. In particular, for example, when the intensity of light emitted from a high-luminance object such as a fluorescent lamp and incident on the image sensor is strong, depending on the resolving power of the imaging lens due to diffraction limits and aberrations, The contour portion of the spread optical image appears clearly. As a result, there is a problem in that an edge of the optical image of the object is erroneously detected in the focused subject image, and the subject region is specified although it is the background region.

そこで、本発明の課題は、被写体合焦画像内で被写体領域の特定を適正に行うことができる画像処理装置、画像処理方法及びプログラムを提供することである。   Accordingly, an object of the present invention is to provide an image processing apparatus, an image processing method, and a program capable of appropriately specifying a subject area in a subject focused image.

上記課題を解決するため、本発明に係る画像処理装置は、
背景内の所定の被写体にピントを合わせて撮像手段により撮像された被写体合焦画像を取得する第1取得手段と、前記撮像手段により前記被写体合焦画像の撮像条件とは異なる所定の撮像条件で撮像され、前記被写体合焦画像と略等しい構図を有する一の画像を取得する第2取得手段と、前記被写体合焦画像及び前記一の画像の各々の画像情報に基づいて、前記被写体合焦画像内で、被写界深度外に存する物に対応し、輪郭部分が前記一の画像における当該物の対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域を推定する推定手段と、この推定手段による前記輪郭拡大領域の推定結果を基準として、前記被写体合焦画像内で前記所定の被写体が含まれる被写体領域を特定する特定手段と、を備えたことを特徴としている。
In order to solve the above problems, an image processing apparatus according to the present invention provides:
A first acquisition unit that acquires a subject focused image captured by the imaging unit while focusing on a predetermined subject in the background, and a predetermined imaging condition that is different from the imaging condition of the subject focused image by the imaging unit Second acquisition means for acquiring one image that is captured and has a composition substantially equal to the subject focused image; and the subject focused image based on image information of each of the subject focused image and the one image An estimation means for estimating a contour expansion region corresponding to an object outside the depth of field and having a contour portion enlarged from the contour portion of the corresponding region of the object in the one image, and the estimation And specifying means for specifying a subject area including the predetermined subject in the subject in-focus image based on the estimation result of the contour enlargement region by the means.

また、本発明に係る画像処理方法は、
画像処理装置を用いた画像処理方法であって、背景内の所定の被写体にピントを合わせて撮像装置により撮像された被写体合焦画像を取得する処理と、前記撮像装置により前記被写体合焦画像の撮像条件とは異なる所定の撮像条件で撮像され、前記被写体合焦画像と略等しい構図を有する一の画像を取得する処理と、前記被写体合焦画像及び前記一の画像の各々の画像情報に基づいて、前記被写体合焦画像内で、被写界深度外に存する物に対応し、輪郭部分が前記一の画像における当該物の対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域を推定する処理と、前記輪郭拡大領域の推定結果を基準として、前記被写体合焦画像内で前記所定の被写体が含まれる被写体領域を特定する処理と、を含むことを特徴としている。
The image processing method according to the present invention includes:
An image processing method using an image processing device, a process of obtaining a subject in-focus image captured by an imaging device while focusing on a predetermined subject in a background, and a process of acquiring the subject in-focus image by the imaging device Based on a process of obtaining one image that is imaged under a predetermined imaging condition different from the imaging condition and has a composition that is substantially equal to the subject focused image, and image information of each of the subject focused image and the one image In the in-focus image of the subject, an enlarged contour region corresponding to an object that exists outside the depth of field and whose contour portion is larger than the contour portion of the corresponding region of the object in the one image is estimated. And a process of identifying a subject area in which the predetermined subject is included in the subject focused image based on the estimation result of the contour enlargement region.

また、本発明に係るプログラムは、
画像処理装置のコンピュータを、背景内の所定の被写体にピントを合わせて撮像装置により撮像された被写体合焦画像を取得する第1取得手段、前記撮像装置により前記被写体合焦画像の撮像条件とは異なる所定の撮像条件で撮像され、前記被写体合焦画像と略等しい構図を有する一の画像を取得する第2取得手段、前記被写体合焦画像及び前記一の画像の各々の画像情報に基づいて、前記被写体合焦画像内で、被写界深度外に存する物に対応し、輪郭部分が前記一の画像における当該物の対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域を推定する推定手段、この推定手段による前記輪郭拡大領域の推定結果を基準として、前記被写体合焦画像内で前記所定の被写体が含まれる被写体領域を特定する特定手段、として機能させることを特徴としている。
The program according to the present invention is
The first acquisition means for acquiring a subject in-focus image captured by the image capturing apparatus by focusing a predetermined subject in the background on the computer of the image processing apparatus, and the image capturing condition of the object in-focus image by the image capturing apparatus Based on image information of each of the second acquisition means for acquiring one image captured under different predetermined imaging conditions and having a composition substantially equal to the subject focused image, the subject focused image and the one image, Estimating a contour expansion region corresponding to an object existing outside the depth of field in the in-focus image of the subject and having a contour portion enlarged from the contour portion of the corresponding region of the object in the one image. And an identifying means for identifying a subject area in which the predetermined subject is included in the subject in-focus image based on the estimation result of the contour enlargement area by the estimating means. It is characterized by a door.

本発明によれば、被写体合焦画像内で被写体領域の特定を適正に行うことができる。   According to the present invention, it is possible to appropriately specify a subject area in a subject focused image.

本発明を適用した一実施形態の撮像装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the imaging device of one Embodiment to which this invention is applied. 図1の撮像装置による画像生成処理に係る動作の一例を示すフローチャートである。3 is a flowchart illustrating an example of an operation related to an image generation process performed by the imaging apparatus in FIG. 1. 図2の画像生成処理における輝度変化領域推定処理に係る動作の一例を示すフローチャートである。3 is a flowchart illustrating an example of an operation related to a luminance change region estimation process in the image generation process of FIG. 2. 図2の画像生成処理に係る画像の一例を模式的に示す図である。It is a figure which shows typically an example of the image which concerns on the image generation process of FIG. 図2の画像生成処理に係る画像の一例を模式的に示す図である。It is a figure which shows typically an example of the image which concerns on the image generation process of FIG. 図2の画像生成処理を説明するための図である。It is a figure for demonstrating the image generation process of FIG.

以下に、本発明について、図面を用いて具体的な態様を説明する。ただし、発明の範囲は、図示例に限定されない。   Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples.

本実施形態の撮像装置100は、背景内の所定の被写体Sにピントを合わせて撮像された被写体合焦画像P1及び被写体合焦画像P1の撮像条件とは異なる所定の撮像条件で撮像され、被写体合焦画像P1と略等しい構図を有する一の画像(被写体非合焦画像P2)の各々の画像情報に基づいて、被写体合焦画像P1内で、被写界深度外に存する物に対応し、輪郭部分が一の画像における当該物の対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域Aを推定する。そして、撮像装置100は、当該輪郭拡大領域Aの推定結果を基準として、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定する。   The imaging apparatus 100 according to the present embodiment is imaged under a predetermined imaging condition that is different from the imaging conditions of the subject focused image P1 and the subject focused image P1 captured by focusing on the predetermined subject S in the background. Based on each image information of one image (subject unfocused image P2) having a composition substantially equal to the focused image P1, corresponding to an object outside the depth of field in the focused subject image P1, A contour enlarged region A is estimated in which the contour portion is enlarged from the contour portion of the corresponding region of the object in one image. Then, the imaging apparatus 100 specifies a subject region B that includes the predetermined subject S in the subject focused image P1 with reference to the estimation result of the contour enlarged region A.

図1は、本発明を適用した一実施形態の撮像装置100の概略構成を示すブロック図である。
図1に示すように、撮像装置100は、具体的には、撮像部1と、撮像制御部2と、画像データ生成部3と、メモリ4と、画像処理部5と、表示制御部6と、表示部7と、記録媒体制御部8と、操作入力部9と、中央制御部10とを備えている。
また、撮像部1、撮像制御部2、画像データ生成部3、メモリ4、画像処理部5、表示制御部6、記録媒体制御部8及び中央制御部10は、バスライン11を介して接続されている。
FIG. 1 is a block diagram illustrating a schematic configuration of an imaging apparatus 100 according to an embodiment to which the present invention is applied.
As shown in FIG. 1, the imaging device 100 specifically includes an imaging unit 1, an imaging control unit 2, an image data generation unit 3, a memory 4, an image processing unit 5, and a display control unit 6. , A display unit 7, a recording medium control unit 8, an operation input unit 9, and a central control unit 10.
The imaging unit 1, the imaging control unit 2, the image data generation unit 3, the memory 4, the image processing unit 5, the display control unit 6, the recording medium control unit 8, and the central control unit 10 are connected via a bus line 11. ing.

撮像部1は、撮像手段として、所定の被写体Sを撮像してフレーム画像を生成する。
具体的には、撮像部1は、レンズ部1aと、電子撮像部1bと、レンズ駆動部1cとを備えている。
The imaging unit 1 captures a predetermined subject S as an imaging unit and generates a frame image.
Specifically, the imaging unit 1 includes a lens unit 1a, an electronic imaging unit 1b, and a lens driving unit 1c.

レンズ部1aは、例えば、ズームレンズやフォーカスレンズ等の複数のレンズから構成されている。
電子撮像部1bは、例えば、CCD(Charge Coupled Device)やCMOS(Complementary Metal-oxide Semiconductor)等のイメージセンサ(撮像素子)から構成されている。そして、電子撮像部1bは、レンズ部1aの各種レンズを通過した光学像を二次元の画像信号に変換する。
レンズ駆動部1cは、例えば、図示は省略するが、ズームレンズを光軸方向に移動させるズーム駆動部、フォーカスレンズを光軸方向に移動させる合焦駆動部等を備えている。
なお、撮像部1は、レンズ部1a、電子撮像部1b及びレンズ駆動部1cに加えて、レンズ部1aを通過する光の量を調整する絞り(図示略)を備えても良い。
The lens unit 1a includes a plurality of lenses such as a zoom lens and a focus lens, for example.
The electronic imaging unit 1b includes, for example, an image sensor (imaging device) such as a charge coupled device (CCD) or a complementary metal-oxide semiconductor (CMOS). Then, the electronic imaging unit 1b converts the optical image that has passed through the various lenses of the lens unit 1a into a two-dimensional image signal.
For example, although not shown, the lens driving unit 1c includes a zoom driving unit that moves the zoom lens in the optical axis direction, a focusing driving unit that moves the focus lens in the optical axis direction, and the like.
The imaging unit 1 may include a diaphragm (not shown) that adjusts the amount of light passing through the lens unit 1a in addition to the lens unit 1a, the electronic imaging unit 1b, and the lens driving unit 1c.

撮像制御部2は、撮像部1による被写体の撮像を制御する。即ち、撮像制御部2は、図示は省略するが、タイミング発生器、ドライバなどを備えている。そして、撮像制御部2は、タイミング発生器、ドライバにより電子撮像部1bを走査駆動して、レンズを通過した光学像を電子撮像部1bにより所定周期毎に二次元の画像信号に変換させ、当該電子撮像部1bの撮像領域から1画面分ずつフレーム画像を読み出して画像データ生成部3に出力させる。
また、撮像制御部2は、被写体の撮像の際に、レンズ駆動部1cの合焦駆動部の駆動を制御して、フォーカスレンズを光軸方向に移動させてレンズ部1aの合焦位置を調整する。具体的には、撮像制御部2は、被写体合焦画像P1(図4(a)参照)の撮像の際に、合焦駆動部によりフォーカスレンズを光軸方向に移動させてピントを背景内の所定の被写体S(例えば、ぬいぐるみ等)に合わせる。また、撮像制御部2は、被写体非合焦画像P2(図4(b)参照)の撮像の際に、合焦駆動部によりフォーカスレンズを所定の被写体Sに対する前後方向に移動させて所定の被写体Sが被写界深度外に存するようにピントを合わせる。
被写体合焦画像P1と被写体非合焦画像P2の撮像は、所定の時間間隔を空けて連続して行われる。より具体的には、被写体合焦画像P1と被写体非合焦画像P2の撮像は、当該撮像装置100本体と所定の被写体Sとの距離、レンズ部1aの焦点距離(画角)を変えることなく所定の時間間隔を空けて連続して行われる。これにより、被写体合焦画像P1と被写体非合焦画像P2は、略等しい構図を有することとなる。
ここで、被写体合焦画像P1と被写体非合焦画像P2の撮像は、構図のずれを生じさせないように当該装置本体が三脚などに固定されて行われるのが好ましい。また、当該装置本体を手持ちで撮像する場合には、被写体非合焦画像P2の撮像の際に、被写体合焦画像P1の半透過の画像をライブビュー画像に重畳表示させるようなガイド表示を行っても良い。
The imaging control unit 2 controls the imaging of the subject by the imaging unit 1. That is, the imaging control unit 2 includes a timing generator, a driver, and the like, although not illustrated. Then, the imaging control unit 2 scans and drives the electronic imaging unit 1b with a timing generator and a driver, and converts the optical image that has passed through the lens into a two-dimensional image signal for each predetermined period by the electronic imaging unit 1b. A frame image is read out for each screen from the imaging area of the electronic imaging unit 1b and output to the image data generation unit 3.
Further, the imaging control unit 2 controls the driving of the focusing driving unit of the lens driving unit 1c when imaging the subject, and moves the focus lens in the optical axis direction to adjust the focusing position of the lens unit 1a. To do. Specifically, the imaging control unit 2 moves the focus lens in the optical axis direction by the focusing drive unit when the subject focused image P1 (see FIG. 4A) is captured, and focuses on the background. Match to a predetermined subject S (for example, a stuffed animal). Further, the imaging control unit 2 moves the focus lens in the front-rear direction with respect to the predetermined subject S by the focus driving unit when imaging the subject non-focus image P2 (see FIG. 4B). Focus so that S is outside the depth of field.
Imaging of the subject focused image P1 and the subject non-focused image P2 is continuously performed with a predetermined time interval. More specifically, the imaging of the subject focused image P1 and the subject non-focused image P2 is performed without changing the distance between the main body of the imaging apparatus 100 and the predetermined subject S and the focal length (angle of view) of the lens unit 1a. It is performed continuously with a predetermined time interval. As a result, the subject focused image P1 and the subject non-focused image P2 have substantially the same composition.
Here, it is preferable to capture the subject focused image P1 and the subject non-focused image P2 while the apparatus main body is fixed to a tripod or the like so as not to cause a compositional shift. When the apparatus main body is imaged by hand, a guide display is performed so that a semi-transparent image of the subject focused image P1 is superimposed on the live view image when the subject non-focused image P2 is captured. May be.

なお、撮像制御部2は、レンズ部1aのフォーカスレンズに代えて、電子撮像部1bを光軸方向に移動させてレンズ部1aの合焦位置を調整するようにしても良い。
また、撮像制御部2は、AF(自動合焦処理)に加えて、AE(自動露出処理)、AWB(自動ホワイトバランス)等の被写体を撮像する際の条件の調整制御を行っても良い。
The imaging control unit 2 may adjust the in-focus position of the lens unit 1a by moving the electronic imaging unit 1b in the optical axis direction instead of the focus lens of the lens unit 1a.
Further, in addition to AF (automatic focusing process), the imaging control unit 2 may perform adjustment control of conditions when imaging a subject such as AE (automatic exposure process) and AWB (automatic white balance).

画像データ生成部3は、電子撮像部1bから転送されたフレーム画像のアナログ値の信号に対してRGBの各色成分毎に適宜ゲイン調整した後に、サンプルホールド回路(図示略)でサンプルホールドしてA/D変換器(図示略)でデジタルデータに変換し、カラープロセス回路(図示略)で画素補間処理及びγ補正処理を含むカラープロセス処理を行った後、デジタル値の輝度信号Y及び色差信号Cb,Cr(YUVデータ)を生成する。
カラープロセス回路から出力される輝度信号Y及び色差信号Cb,Crは、図示しないDMAコントローラを介して、バッファメモリとして使用されるメモリ4にDMA転送される。
The image data generation unit 3 appropriately adjusts the gain for each RGB color component with respect to the analog value signal of the frame image transferred from the electronic imaging unit 1b, and then performs sample holding by a sample hold circuit (not shown). The digital signal is converted into digital data by a / D converter (not shown), color processing including pixel interpolation processing and γ correction processing is performed by a color process circuit (not shown), and then a digital luminance signal Y and color difference signal Cb , Cr (YUV data).
The luminance signal Y and the color difference signals Cb and Cr output from the color process circuit are DMA-transferred to a memory 4 used as a buffer memory via a DMA controller (not shown).

メモリ4は、例えば、DRAM(Dynamic Random Access Memory)等により構成され、画像処理部5や中央制御部10等によって処理されるデータ等を一時的に格納する。   The memory 4 is composed of, for example, a DRAM (Dynamic Random Access Memory) or the like, and temporarily stores data processed by the image processing unit 5 or the central control unit 10.

画像処理部5は、第1画像取得部5aと、第2画像取得部5bと、輪郭拡大領域推定部5cと、エッジ検出部5dと、被写体領域特定部5eと、画像生成部5fとを具備している。
なお、画像処理部5の各部は、例えば、所定のロジック回路から構成されているが、当該構成は一例であってこれに限られるものではない。
The image processing unit 5 includes a first image acquisition unit 5a, a second image acquisition unit 5b, an enlarged contour region estimation unit 5c, an edge detection unit 5d, a subject region specification unit 5e, and an image generation unit 5f. doing.
Note that each unit of the image processing unit 5 includes, for example, a predetermined logic circuit, but the configuration is an example and the present invention is not limited thereto.

第1画像取得部5aは、被写体合焦画像P1を取得する。
即ち、第1画像取得部5aは、第1取得手段として、背景内の所定の被写体Sにピントを合わせて撮像部1により撮像された被写体合焦画像P1(図4(a)参照)を取得する。具体的には、第1画像取得部5aは、背景内の所定の被写体S(例えば、ぬいぐるみ等)にピントを合わせた状態で撮像部1により撮像され、画像データ生成部3により生成された被写体合焦画像P1の画像データ(YUVデータ)を、メモリ4から取得する。
The first image acquisition unit 5a acquires the subject focused image P1.
That is, the first image acquisition unit 5a acquires, as a first acquisition unit, a subject focused image P1 (see FIG. 4A) captured by the imaging unit 1 while focusing on a predetermined subject S in the background. To do. Specifically, the first image acquisition unit 5a captures an image captured by the image capturing unit 1 while being focused on a predetermined subject S (for example, a stuffed animal) in the background, and is generated by the image data generating unit 3. Image data (YUV data) of the focused image P <b> 1 is acquired from the memory 4.

第2画像取得部5bは、被写体非合焦画像P2を取得する。
即ち、第2画像取得部5bは、第2取得手段として、撮像部1により被写体合焦画像P1の撮像条件とは異なる所定の撮像条件で撮像され、被写体合焦画像P1と略等しい構図を有する被写体非合焦画像P2(一の画像;図4(b)参照)を取得する。具体的には、第2画像取得部5bは、背景内の所定の被写体Sが被写界深度外に存するようにピントを合わせた状態で撮像部1により撮像され、画像データ生成部3により生成された被写体非合焦画像P2の画像データ(YUVデータ)を、メモリ4から取得する。
なお、図4(b)に示す被写体非合焦画像P2は、ピントを合わせる位置を所定の被写体Sに対する後方向に移動させて撮像された画像(背景合焦画像)であるが、一例であってこれに限られるものではなく、例えば、ピントを合わせる位置を所定の被写体Sに対する前方向に移動させて撮像された画像(前景合焦画像;図示略)であっても良い。
The second image acquisition unit 5b acquires the subject non-focus image P2.
In other words, the second image acquisition unit 5b, as the second acquisition unit, is imaged by the imaging unit 1 under a predetermined imaging condition different from the imaging condition of the subject focused image P1, and has a composition substantially equal to the subject focused image P1. A subject non-focus image P2 (one image; see FIG. 4B) is acquired. Specifically, the second image acquisition unit 5b is picked up by the image pickup unit 1 while being focused so that the predetermined subject S in the background exists outside the depth of field, and is generated by the image data generation unit 3. Image data (YUV data) of the subject non-focused image P <b> 2 is acquired from the memory 4.
Note that the subject non-focused image P2 shown in FIG. 4B is an image (background focused image) picked up by moving the focusing position backward with respect to the predetermined subject S, but is an example. However, the present invention is not limited to this. For example, an image (foreground focused image; not shown) captured by moving the focusing position in the forward direction with respect to the predetermined subject S may be used.

輪郭拡大領域推定部5cは、被写体合焦画像P1内で輪郭拡大領域Aを推定する。
ここで、輪郭拡大領域Aは、被写体合焦画像P1内で、所定の被写体Sに焦点を合わせたときの被写界深度外に存する物に対応する領域である。即ち、輪郭拡大領域Aは、ピントが合っていないぼけた領域であるため、当該被写体合焦画像P1内の輪郭拡大領域Aの輪郭部分は、被写体非合焦画像(一の画像)P2における当該輪郭拡大領域Aに対応する対応領域C(図4(b)参照)の輪郭部分よりも拡大された状態となる。
また、輪郭拡大領域Aは、例えば、輪郭部分の色及び明るさのうちの少なくとも一方が周辺領域に対して急峻な変化を有している。ここで、急峻な変化とは、被写体合焦画像P1に対してエッジ検出処理(詳細後述)を行った場合に、輪郭拡大領域Aの輪郭部分にてエッジが検出される程度の変化のことを言う。例えば、輪郭拡大領域Aとしては、撮像部1のCCDやCMOS等の撮像素子に入射する光の輝度レベルが検出可能範囲の上限よりも大きい高輝度の物(例えば、蛍光灯などの光源等)に対応する輝度変化領域A1等が挙げられる。輝度変化領域A1は、例えば、蛍光灯などの光源等の高輝度の物を逆光状態で撮像した場合に、撮像部1の露出条件によっては撮像された画像内で白とびした状態となる領域を含む。
つまり、仮に、被写体合焦画像P1に対してエッジ検出処理を行った場合には、ピントが合っている所定の被写体Sだけでなく、ピントが合っていない輪郭拡大領域Aに対応する物のエッジも検出される。同様に、被写体非合焦画像P2に対してエッジ検出処理を行った場合には、ピントが合っている輪郭拡大領域Aに対応する対応領域Cの物のエッジが検出されるが、当該エッジは被写体合焦画像P1における輪郭拡大領域Aに対応する物のエッジよりも縮小した状態となり、大きさに相違が生じる。
The contour expansion region estimation unit 5c estimates the contour expansion region A in the subject focused image P1.
Here, the contour expansion region A is a region corresponding to an object outside the depth of field when the predetermined subject S is focused in the subject focused image P1. That is, since the contour enlarged region A is a blurred region that is not in focus, the contour portion of the contour enlarged region A in the subject focused image P1 is the subject in the subject non-focused image (one image) P2. It will be in the state expanded rather than the outline part of the corresponding | compatible area | region C (refer FIG.4 (b)) corresponding to the outline expansion area | region A. FIG.
Further, in the contour enlarged region A, for example, at least one of the color and brightness of the contour portion has a steep change with respect to the peripheral region. Here, the steep change refers to a change to such an extent that an edge is detected in the contour portion of the contour enlarged region A when the edge detection process (described later in detail) is performed on the subject focused image P1. say. For example, as the contour expansion region A, a high-luminance object (for example, a light source such as a fluorescent lamp) whose luminance level of light incident on an image sensor such as a CCD or CMOS of the imaging unit 1 is larger than the upper limit of the detectable range. Brightness change area A1 corresponding to. The luminance change area A1 is, for example, an area in which a high brightness object such as a light source such as a fluorescent lamp is imaged in a backlight state and is in an overexposed state in the captured image depending on the exposure condition of the imaging unit 1. Including.
In other words, if edge detection processing is performed on the subject focused image P1, not only the predetermined subject S that is in focus but also the edge of an object that corresponds to the contour expansion area A that is not in focus. Is also detected. Similarly, when the edge detection process is performed on the subject non-focused image P2, the edge of the object in the corresponding region C corresponding to the focused contour enlarged region A is detected. The object is in a state of being reduced more than the edge of the object corresponding to the contour enlargement area A in the subject focused image P1, and the size differs.

また、輪郭拡大領域推定部5cは、被写体合焦画像P1及び被写体非合焦画像P2の各々の輝度情報に基づいて、被写体合焦画像P1内で輪郭部分の輝度値が周辺領域に対して急峻に変化した輝度変化領域A1を輪郭拡大領域Aとして推定する。具体的には、輪郭拡大領域推定部5cは、第1判定部c1と、第2判定部c2とを具備しており、当該第1判定部c1及び第2判定部c2の判定結果に基づいて輝度変化領域A1を推定する。   Further, the contour enlarged region estimation unit 5c has a sharp brightness value of the contour portion in the subject focused image P1 with respect to the surrounding region based on the brightness information of the subject focused image P1 and the subject non-focused image P2. The brightness change area A1 that has changed to is estimated as the contour enlarged area A. Specifically, the contour enlargement area estimation unit 5c includes a first determination unit c1 and a second determination unit c2, and based on the determination results of the first determination unit c1 and the second determination unit c2. The brightness change area A1 is estimated.

第1判定部c1は、第1判定手段として、被写体合焦画像P1と被写体非合焦画像P2の間で対応する各画素の輝度値の差分が第1判定値よりも大きいか否かを判定する。
具体的には、第1判定部c1は、第1画像取得部5aにより取得された被写体合焦画像P1のYUVデータのうちの輝度信号(Y1)を取得するとともに、第2画像取得部5bにより取得された被写体非合焦画像P2のうちの輝度信号(Y2)を取得する。そして、第1判定部c1は、被写体合焦画像P1と被写体非合焦画像P2の間で対応する複数の画素(x,y)の各々について輝度値の差分を算出し、当該輝度値の差分が第1判定値Thr1よりも大きいか否かを下記式(1)に従って判定する。
Y1(x,y)−Y2(x,y)>Thr1 …式(1)
なお、第1判定値Thr1の値は、ユーザによる操作入力部9の所定操作に基づいて設定されても良いし、デフォルトとして予め定められている所定の値や設定されたホワイトバランスのモード(例えば、蛍光灯下や太陽光下等)を基準とする所定の値に自動的に設定されても良い。
The first determination unit c1 determines, as a first determination unit, whether or not a difference in luminance value of each corresponding pixel between the subject focused image P1 and the subject non-focused image P2 is larger than the first determination value. To do.
Specifically, the first determination unit c1 acquires the luminance signal (Y1) of the YUV data of the subject focused image P1 acquired by the first image acquisition unit 5a, and the second image acquisition unit 5b. A luminance signal (Y2) in the acquired subject non-focused image P2 is acquired. Then, the first determination unit c1 calculates a luminance value difference for each of a plurality of corresponding pixels (x, y) between the subject focused image P1 and the subject non-focused image P2, and the luminance value difference is calculated. Is greater than the first determination value Thr1 according to the following equation (1).
Y1 (x, y) -Y2 (x, y)> Thr1 Formula (1)
Note that the value of the first determination value Thr1 may be set based on a predetermined operation of the operation input unit 9 by the user, or a predetermined value set as a default or a set white balance mode (for example, , Under a fluorescent lamp, under sunlight, etc.) may be automatically set to a predetermined value.

第2判定部c2は、第2判定手段として、被写体合焦画像P1の各画素の輝度値が第2判定値よりも大きいか否かを判定する。
具体的には、第2判定部c2は、第1画像取得部5aにより取得された被写体合焦画像P1のYUVデータのうちの輝度信号(Y1)を取得する。そして、第2判定部c2は、被写体合焦画像P1の複数の画素(x,y)のうち、第1判定部c1によって輝度値の差分が第1判定値Thr1よりも大きいと判定された各画素を特定した後、当該画素の各々について、輝度値が第2判定値Thr2よりも大きいか否かを下記式(2)に従って判定する。
Y1(x,y)>Thr2 …式(2)
なお、第2判定値Thr1の値は、第1判定値Thr1と同様に、ユーザによる操作入力部9の所定操作に基づいて設定されても良いし、デフォルトとして予め定められている所定の値や設定されたホワイトバランスのモード(例えば、蛍光灯下や太陽光下等)を基準とする所定の値に自動的に設定されても良い。
The 2nd determination part c2 determines whether the luminance value of each pixel of the to-be-photographed object P1 is larger than a 2nd determination value as a 2nd determination means.
Specifically, the second determination unit c2 acquires a luminance signal (Y1) in the YUV data of the subject focused image P1 acquired by the first image acquisition unit 5a. The second determination unit c2 determines each of the plurality of pixels (x, y) in the subject focused image P1 that the difference in luminance value is larger than the first determination value Thr1 by the first determination unit c1. After specifying the pixel, it is determined according to the following formula (2) whether or not the luminance value is larger than the second determination value Thr2 for each of the pixels.
Y1 (x, y)> Thr2 Formula (2)
Note that the value of the second determination value Thr1 may be set based on a predetermined operation of the operation input unit 9 by the user, similarly to the first determination value Thr1, or may be a predetermined value or a predetermined value set as a default. It may be automatically set to a predetermined value based on the set white balance mode (for example, under fluorescent light or sunlight).

また、輪郭拡大領域推定部5cは、第1判定部c1及び第2判定部c2の両方の判定結果に基づいて、上記式(1)及び式(2)の両方を満たす画素を含む領域を特定する。
そして、輪郭拡大領域推定部5cは、上記式(1)及び式(2)の両方を満たす画素(図5(a)中、白で表す領域)を第1の画素値「1」とし、当該画素以外の画素(図5(a)中、黒で表す領域)を第2の画素値「0」として表す二値画像等の輝度変化領域情報M(図5(a)参照)を生成する。
即ち、輝度変化領域情報Mのうち、第1の画素値「1」を有する画素が、被写体合焦画像P1内の、例えば、蛍光灯などの光源等の高輝度の物に対応する輝度変化領域A1の縁部に対応することとなる。
Further, the contour enlargement region estimation unit 5c identifies a region including pixels that satisfy both of the above expressions (1) and (2) based on the determination results of both the first determination unit c1 and the second determination unit c2. To do.
Then, the contour enlargement area estimation unit 5c sets a pixel that satisfies both the above formulas (1) and (2) (a white area in FIG. 5A) as the first pixel value “1”, and Luminance change region information M (see FIG. 5A) such as a binary image representing a pixel other than the pixel (region represented by black in FIG. 5A) as the second pixel value “0” is generated.
That is, in the luminance change area information M, a pixel having the first pixel value “1” corresponds to a luminance change area corresponding to a high-luminance object such as a light source such as a fluorescent lamp in the subject focused image P1. It corresponds to the edge of A1.

なお、輪郭拡大領域Aとして、例えば、蛍光灯などの光源等の高輝度の物に対応する輝度変化領域A1を例示して説明したが、例えば、色や濃度等が周辺領域に対して急峻な変化を有する領域であっても良い。
このように、輪郭拡大領域推定部5cは、被写体合焦画像P1及び被写体非合焦画像(一の画像)P2の各々の画像情報に基づいて、被写体合焦画像P1内で、被写界深度外に存する物に対応し、輪郭部分が一の画像における当該物に対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域Aを推定する推定手段を構成している。
Note that, as the contour expansion region A, for example, the luminance change region A1 corresponding to a high-luminance object such as a light source such as a fluorescent lamp has been described as an example. It may be a region having a change.
As described above, the contour enlargement area estimation unit 5c determines the depth of field in the subject focused image P1 based on the image information of the subject focused image P1 and the subject non-focused image (one image) P2. Corresponding to an object existing outside, an estimation means for estimating an enlarged contour area A in which the contour portion is enlarged from the contour portion of the region corresponding to the object in one image is configured.

エッジ検出部5dは、被写体合焦画像P1内のエッジを検出する。
即ち、エッジ検出部5dは、検出手段として、被写体合焦画像P1内に存する物に係るエッジを検出する。具体的には、エッジ検出部5dは、第1画像取得部5aにより取得された被写体合焦画像P1のYUVデータに対して所定の微分フィルタ(例えば、ハイパスフィルタ等)を用いて微分演算を行って、輝度値や色や濃度に急峻な変化があるところをエッジとして検出するエッジ検出処理を行う。
これにより、エッジ検出部5dは、例えば、被写体合焦画像P1内で、ピントが合っている所定の被写体Sのエッジとともに、ピントが合っていない輪郭拡大領域A(輝度変化領域A1)に対応する物のエッジも検出する。
The edge detection unit 5d detects an edge in the subject focused image P1.
That is, the edge detection unit 5d detects an edge related to an object in the subject focused image P1 as detection means. Specifically, the edge detection unit 5d performs a differentiation operation on the YUV data of the subject focused image P1 acquired by the first image acquisition unit 5a using a predetermined differential filter (for example, a high-pass filter). Thus, an edge detection process is performed to detect a sharp change in luminance value, color, or density as an edge.
Thereby, for example, the edge detection unit 5d corresponds to the edge of the predetermined subject S that is in focus in the subject focused image P1 and the contour expansion region A (luminance change region A1) that is not in focus. It also detects the edges of objects.

被写体領域特定部5eは、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定する。
即ち、被写体領域特定部5eは、特定手段として、輪郭拡大領域推定部5cによる輪郭拡大領域Aの推定結果を基準として、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定する。具体的には、被写体領域特定部5eは、輪郭拡大領域推定部5cにより生成された輝度変化領域情報Mを取得して、エッジ検出部5dにより検出された全てのエッジ(即ち、所定の被写体S及び輝度変化領域A1に係るエッジ)のうち、輝度変化領域A1に対応する各エッジの評価値を低下させて被写体領域Bを特定する。
例えば、被写体領域特定部5eは、各エッジの強度や所定数のエッジにより囲まれる候補領域内に存する画素数等に応じて評価値を算出し、評価値が最も高くなった候補領域を所定の被写体Sが含まれる被写体領域Bとして特定する。
このとき、被写体領域特定部5eは、例えば、複数の候補領域のうち、輝度変化領域A1に対応する各エッジや当該エッジにより囲まれる候補領域の評価値(信頼度)を低下させて、被写体領域Bとして特定され難くする。また、被写体領域特定部5eは、例えば、輝度変化領域A1に対応するエッジにより囲まれる候補領域の大きさを小さく(収縮)することで、各候補領域を構成する画素数に応じて算出される評価値を相対的に低下させて、被写体領域Bとして特定され難くする。
The subject area specifying unit 5e specifies a subject area B in which a predetermined subject S is included in the subject focused image P1.
That is, the subject region specifying unit 5e specifies, as a specifying unit, a subject region B that includes the predetermined subject S in the subject focused image P1 based on the estimation result of the contour enlarged region A by the contour enlarged region estimation unit 5c. To do. Specifically, the subject region specifying unit 5e acquires the luminance change region information M generated by the contour enlargement region estimation unit 5c, and all the edges detected by the edge detection unit 5d (that is, the predetermined subject S). And the edge corresponding to the luminance change area A1), the subject area B is specified by reducing the evaluation value of each edge corresponding to the luminance change area A1.
For example, the subject area specifying unit 5e calculates an evaluation value according to the strength of each edge, the number of pixels existing in a candidate area surrounded by a predetermined number of edges, and the candidate area having the highest evaluation value is determined as a predetermined value. A subject area B including the subject S is specified.
At this time, the subject area specifying unit 5e reduces, for example, the evaluation value (reliability) of each edge corresponding to the luminance change area A1 and the candidate area surrounded by the edges among the plurality of candidate areas. It is difficult to be specified as B. Further, the subject area specifying unit 5e is calculated according to the number of pixels constituting each candidate area, for example, by reducing (shrinking) the size of the candidate area surrounded by the edge corresponding to the luminance change area A1. The evaluation value is relatively lowered to make it difficult to identify the subject area B.

なお、被写体領域特定部5eは、被写体合焦画像P1内の被写体領域Bの特定に、輪郭拡大領域推定部5cによる輝度変化領域A1の推定結果を基準として行うようにしたが、例えば、輪郭拡大領域Aとしての色や濃度等が周辺領域に対して急峻な変化を有する領域の推定結果を用いても良い。   Note that the subject area specifying unit 5e performs the specification of the subject area B in the subject focused image P1 on the basis of the estimation result of the luminance change area A1 by the contour enlargement area estimation unit 5c. An estimation result of an area where the color, density, or the like as the area A has a steep change relative to the surrounding area may be used.

画像生成部5fは、被写体合焦画像P1内の被写体領域B以外の背景領域をぼかしたぼかし画像P3を生成する。
即ち、画像生成部5fは、画像生成手段として、被写体合焦画像P1に対してぼかし処理を施して、当該被写体合焦画像P1内の被写体領域B以外の背景領域をぼかしたぼかし画像P3(図5(b)参照)を生成する。具体的には、画像生成部5fは、被写体領域特定部5eにより特定された被写体領域Bのアルファ値を「1」とし、それ以外の背景領域のアルファ値を「0」とする二値情報を生成する。そして、画像生成部5fは、当該二値情報に対してローパスフィルタを施して境界領域に中間値(0≦α≦1)を生じさせ、被写体合焦画像P1内で被写体領域Bの位置を示す位置情報としてのアルファマップ(図示略)を生成する。そして、画像生成部5fは、生成されたアルファマップを利用して、被写体合焦画像P1に対してぼかし処理を施して、当該被写体合焦画像P1内の背景領域及び境界領域をそれぞれ所定の強度でぼかしたぼかし画像P3を生成する。
なお、ほかし処理としては、例えば、被写体合焦画像P1の画像データにガウス型のボカシフィルターをかけることで行う方法が挙げられるが、一例であってこれに限られるものではなく、公知の手法であれば適宜任意に変更可能である。
The image generation unit 5f generates a blurred image P3 in which the background region other than the subject region B in the subject focused image P1 is blurred.
That is, the image generation unit 5f performs blur processing on the subject focused image P1 as an image generation unit, and blurs a background region other than the subject region B in the subject focused image P1 (see FIG. 5 (b)). Specifically, the image generating unit 5f sets binary information in which the alpha value of the subject region B specified by the subject region specifying unit 5e is “1” and the alpha value of the other background region is “0”. Generate. Then, the image generation unit 5f applies a low-pass filter to the binary information to generate an intermediate value (0 ≦ α ≦ 1) in the boundary region, and indicates the position of the subject region B in the subject focused image P1. An alpha map (not shown) as position information is generated. Then, the image generation unit 5f performs blurring processing on the subject focused image P1 using the generated alpha map, and each of the background region and the boundary region in the subject focused image P1 has a predetermined intensity. A blurred image P3 blurred by is generated.
As the other processing, for example, there is a method performed by applying a Gaussian blur filter to the image data of the subject in-focus image P1, but this is an example, and the method is not limited to this. If so, it can be arbitrarily changed as appropriate.

表示制御部6は、メモリ4に一時的に格納されている表示用の画像データを読み出して表示部7に表示させる制御を行う。
具体的には、表示制御部6は、VRAM(Video Random Access Memory)、VRAMコントローラ、デジタルビデオエンコーダなどを備えている。そして、デジタルビデオエンコーダは、中央制御部10の制御下にてメモリ4から読み出されてVRAM(図示略)に格納されている輝度信号Y及び色差信号Cb,Crを、VRAMコントローラを介してVRAMから定期的に読み出して、これらのデータを元にビデオ信号を発生して表示部7に出力する。
The display control unit 6 performs control to read out the display image data temporarily stored in the memory 4 and display it on the display unit 7.
Specifically, the display control unit 6 includes a VRAM (Video Random Access Memory), a VRAM controller, a digital video encoder, and the like. The digital video encoder reads the luminance signal Y and the color difference signals Cb and Cr read from the memory 4 and stored in the VRAM (not shown) under the control of the central control unit 10 through the VRAM controller. Are periodically read out, and a video signal is generated based on these data and output to the display unit 7.

表示部7は、例えば、液晶表示パネルであり、表示制御部6からのビデオ信号に基づいて電子撮像部1bにより撮像された画像などを表示画面に表示する。具体的には、表示部7は、静止画撮像モードや動画撮像モードにて、撮像部1及び撮像制御部2による被写体の撮像により生成された複数のフレーム画像を所定のフレームレートで逐次更新しながらライブビュー画像を表示する。また、表示部7は、静止画として記録される画像(レックビュー画像)を表示したり、動画として記録中の画像を表示する。   The display unit 7 is, for example, a liquid crystal display panel, and displays an image captured by the electronic imaging unit 1b based on a video signal from the display control unit 6 on a display screen. Specifically, the display unit 7 sequentially updates a plurality of frame images generated by imaging the subject by the imaging unit 1 and the imaging control unit 2 at a predetermined frame rate in the still image capturing mode and the moving image capturing mode. While displaying the live view image. The display unit 7 displays an image (rec view image) recorded as a still image or an image being recorded as a moving image.

記録媒体制御部8は、記録媒体Rが着脱自在に構成され、装着された記録媒体Rからのデータの読み出しや記録媒体Rに対するデータの書き込みを制御する。
即ち、記録媒体制御部8は、画像処理部5の符号化部(図示略)により所定の圧縮形式(例えば、JPEG形式等)で符号化された記録用の画像データを記録媒体Rに記録させる。
なお、記録媒体Rは、例えば、不揮発性メモリ(フラッシュメモリ)等により構成されるが、一例であってこれに限られるものではなく、適宜任意に変更可能である。
The recording medium control unit 8 is configured such that the recording medium R is detachable, and controls reading of data from the loaded recording medium R and writing of data to the recording medium R.
That is, the recording medium control unit 8 records the recording image data encoded in a predetermined compression format (for example, JPEG format) by the encoding unit (not shown) of the image processing unit 5 on the recording medium R. .
The recording medium R is composed of, for example, a non-volatile memory (flash memory) or the like.

操作入力部9は、当該撮像装置100の所定操作を行うためのものである。具体的には、操作入力部9は、被写体の撮像指示に係るシャッタボタン、撮像モードや機能等の選択指示に係る選択決定ボタン、ズーム量の調整指示に係るズームボタン等(何れも図示略)の操作部を備え、当該操作部の各ボタンの操作に応じて所定の操作信号を中央制御部10に出力する。   The operation input unit 9 is for performing a predetermined operation of the imaging apparatus 100. Specifically, the operation input unit 9 includes a shutter button related to an imaging instruction of a subject, a selection determination button related to an instruction to select an imaging mode and a function, a zoom button related to an instruction to adjust the zoom amount, and the like (all not shown). And outputs a predetermined operation signal to the central control unit 10 in accordance with the operation of each button of the operation unit.

中央制御部10は、撮像装置100の各部を制御するものである。具体的には、中央制御部10は、図示は省略するが、CPU(Central Processing Unit)等を備え、撮像装置100用の各種処理プログラム(図示略)に従って各種の制御動作を行う。   The central control unit 10 controls each unit of the imaging device 100. Specifically, although not shown, the central control unit 10 includes a CPU (Central Processing Unit) and the like, and performs various control operations according to various processing programs (not shown) for the imaging apparatus 100.

次に、撮像装置100による画像生成処理について、図2〜図6を参照して説明する。
図2は、画像生成処理に係る動作の一例を示すフローチャートである。図3は、画像生成処理における輝度変化領域推定処理に係る動作の一例を示すフローチャートである。
Next, image generation processing by the imaging apparatus 100 will be described with reference to FIGS.
FIG. 2 is a flowchart illustrating an example of an operation related to the image generation process. FIG. 3 is a flowchart illustrating an example of an operation related to the luminance change region estimation process in the image generation process.

画像生成処理は、ユーザによる操作入力部9の選択決定ボタンの所定操作に基づいて、メニュー画面に表示された複数の動作モードの中からぼかし画像生成モードが選択指示された場合に、中央制御部10の制御下にて当該撮像装置100の各部により実行される処理である。
また、図2に示す画像生成処理にあっては、輪郭拡大領域Aとして輝度変化領域A1を推定して、当該輝度変化領域A1の推定結果を基準として被写体領域Bを特定するものとする。
The image generation processing is performed when the blur control image generation mode is selected from a plurality of operation modes displayed on the menu screen based on a predetermined operation of the selection determination button of the operation input unit 9 by the user. 10 is a process executed by each unit of the imaging apparatus 100 under the control of 10.
In the image generation process shown in FIG. 2, the luminance change area A1 is estimated as the contour expansion area A, and the subject area B is specified based on the estimation result of the luminance change area A1.

図2に示すように、先ず、表示制御部6は、撮像部1による被写体の撮像により生成された複数のフレーム画像に基づいてライブビュー画像を表示部7の表示画面に表示させる(ステップS1)。
具体的には、撮像制御部2は、レンズ部1aを通過した光学像を所定周期毎に電子撮像部1bにより二次元の画像信号(RGB画像データ)に変換させ、画像データ生成部3は、電子撮像部1bから出力されて入力される二次元の画像信号を所定周期毎にデジタルの画像信号に変換して各フレーム画像のYUVデータを生成する。画像データ生成部3により生成された各フレーム画像のYUVデータは、順次メモリ4に出力され、当該メモリ4に格納される。表示制御部6は、メモリ4に一時的に格納されている表示用の画像データを読み出して表示部7にライブビュー画像を表示させる制御を行う。
As shown in FIG. 2, first, the display control unit 6 displays a live view image on the display screen of the display unit 7 based on a plurality of frame images generated by imaging the subject by the imaging unit 1 (step S1). .
Specifically, the imaging control unit 2 causes the electronic imaging unit 1b to convert the optical image that has passed through the lens unit 1a into a two-dimensional image signal (RGB image data) at predetermined intervals, and the image data generation unit 3 The two-dimensional image signal output and input from the electronic imaging unit 1b is converted into a digital image signal at predetermined intervals to generate YUV data for each frame image. The YUV data of each frame image generated by the image data generation unit 3 is sequentially output to the memory 4 and stored in the memory 4. The display control unit 6 performs control to read the display image data temporarily stored in the memory 4 and display the live view image on the display unit 7.

次に、中央制御部10のCPUは、ユーザによる操作入力部9のシャッタボタンの所定操作(例えば、全押し操作)に基づいて、当該操作入力部9から出力される撮像指示が入力されたか否かを判定する(ステップS2)。
ここで、撮像指示が入力されていないと判定されると(ステップS2;NO)、中央制御部10のCPUは、処理をステップS1に戻し、ステップS2にて、撮像指示が入力されたと判定されるまで(ステップS2;YES)、表示制御部6は、ライブビュー画像を表示部8の表示画面に表示させる制御を行う。
Next, the CPU of the central control unit 10 determines whether or not an imaging instruction output from the operation input unit 9 is input based on a predetermined operation (for example, full pressing operation) of the shutter button of the operation input unit 9 by the user. Is determined (step S2).
Here, if it is determined that the imaging instruction is not input (step S2; NO), the CPU of the central control unit 10 returns the process to step S1, and determines that the imaging instruction is input in step S2. (Step S2; YES), the display control unit 6 performs control to display the live view image on the display screen of the display unit 8.

そして、ユーザによる所定の被写体Sの構図等の調整が終了した後、ユーザによって操作入力部9のシャッタボタンが所定操作(例えば、全押し操作)されることにより、中央制御部10のCPUにより撮像指示が入力されたと判定されると(ステップS2;YES)、撮像制御部2は、レンズ駆動部1cの合焦駆動部によりフォーカスレンズを光軸方向に移動させてピントを背景内の所定の被写体S(例えば、ぬいぐるみ等)に合わせ、被写体合焦画像P1(図4(a)参照)を撮像させる(ステップS3)。画像データ生成部3は、被写体合焦画像P1の画像信号をデジタルの画像信号に変換して当該被写体合焦画像P1のYUVデータを生成する。
画像データ生成部3により生成された被写体合焦画像P1のYUVデータは、メモリ4に出力され、当該メモリ4に一時的に格納される。
Then, after the adjustment of the composition of the predetermined subject S by the user is completed, the CPU of the central control unit 10 captures an image when the shutter button of the operation input unit 9 is predetermined (for example, fully pressed) by the user. If it is determined that an instruction has been input (step S2; YES), the imaging control unit 2 moves the focus lens in the optical axis direction by the focus driving unit of the lens driving unit 1c to focus on a predetermined subject in the background. A subject focused image P1 (see FIG. 4A) is imaged in accordance with S (for example, a stuffed animal) (step S3). The image data generation unit 3 converts the image signal of the subject focused image P1 into a digital image signal and generates YUV data of the subject focused image P1.
The YUV data of the subject focused image P1 generated by the image data generation unit 3 is output to the memory 4 and temporarily stored in the memory 4.

続けて、撮像制御部2は、合焦駆動部によりフォーカスレンズを所定の被写体Sに対する前後方向に移動させて所定の被写体Sが被写界深度外に存するようにピントを合わせ、被写体合焦画像P1と略等しい構図を有する被写体非合焦画像P2(図4(b)参照)を撮像させる(ステップS4)。画像データ生成部3は、被写体非合焦画像P2の画像信号をデジタルの画像信号に変換して当該被写体非合焦画像P2のYUVデータを生成する。
画像データ生成部3により生成された被写体非合焦画像P2のYUVデータは、メモリ4に出力され、当該メモリ4に一時的に格納される。
Subsequently, the imaging control unit 2 moves the focus lens in the front-rear direction with respect to the predetermined subject S by the focus driving unit to focus the predetermined subject S so that it is outside the depth of field. A subject non-focus image P2 (see FIG. 4B) having a composition substantially equal to P1 is captured (step S4). The image data generation unit 3 converts the image signal of the subject non-focus image P2 into a digital image signal, and generates YUV data of the subject non-focus image P2.
The YUV data of the subject non-focused image P <b> 2 generated by the image data generation unit 3 is output to the memory 4 and temporarily stored in the memory 4.

次に、画像処理部5は、被写体合焦画像P1内で、輪郭部分の輝度値が周辺領域に対して急峻に変化した輝度変化領域A1を推定する輝度変化領域推定処理(図3参照)を行う(ステップS5)。
ここで、図3を参照して、輝度変化領域推定処理について詳細に説明する。
Next, the image processing unit 5 performs a luminance change region estimation process (see FIG. 3) for estimating a luminance change region A1 in which the luminance value of the contour portion changes sharply with respect to the peripheral region in the subject focused image P1. This is performed (step S5).
Here, with reference to FIG. 3, the brightness change region estimation processing will be described in detail.

図3に示すように、画像処理部5の第1画像取得部5aは、メモリ4に格納されている被写体合焦画像P1の画像データ(YUVデータ)を取得する(ステップS51)。続けて、第2画像取得部5bは、メモリ4に格納されている被写体非合焦画像P2の画像データ(YUVデータ)を取得する(ステップS52)。
なお、被写体合焦画像P1の画像データの取得後に被写体非合焦画像(一の画像)P2の画像データの取得を行うようにしたが、これらの画像の取得処理の順序は一例であってこれに限られるものではなく、順序を逆、即ち、被写体非合焦画像P2の画像データの取得後に被写体合焦画像P1の画像データの取得を行うようにしても良い。
As shown in FIG. 3, the first image acquisition unit 5a of the image processing unit 5 acquires the image data (YUV data) of the subject focused image P1 stored in the memory 4 (step S51). Subsequently, the second image acquisition unit 5b acquires image data (YUV data) of the subject non-focus image P2 stored in the memory 4 (step S52).
Note that the image data of the subject non-focused image (one image) P2 is acquired after the acquisition of the image data of the subject focused image P1, but the order of the acquisition processing of these images is only an example. However, the order may be reversed, that is, the image data of the subject focused image P1 may be acquired after the image data of the subject non-focused image P2 is acquired.

次に、輪郭拡大領域推定部5cの第1判定部c1は、被写体合焦画像P1と被写体非合焦画像P2の間で対応する各画素の輝度値の差分が第1判定値よりも大きいか否かを判定する(ステップS53)。
具体的には、第1判定部c1は、被写体合焦画像P1のYUVデータのうちの輝度信号(Y1)及び被写体非合焦画像P2のうちの輝度信号(Y2)を取得した後、被写体合焦画像P1と被写体非合焦画像P2の間で対応する複数の画素(x,y)の各々について、輝度値の差分が第1判定値Thr1よりも大きいか否かを下記式(1)に従って判定する。
Y1(x,y)−Y2(x,y)>Thr1 …式(1)
Next, the first determination unit c1 of the contour enlargement area estimation unit 5c determines whether the difference in luminance value of each corresponding pixel between the subject focused image P1 and the subject non-focused image P2 is larger than the first determination value. It is determined whether or not (step S53).
Specifically, the first determination unit c1 acquires the luminance signal (Y1) in the YUV data of the subject focused image P1 and the luminance signal (Y2) in the subject non-focused image P2, and then adjusts the subject alignment. Whether each of the plurality of pixels (x, y) corresponding to the focus image P1 and the subject non-focus image P2 has a luminance value difference larger than the first determination value Thr1 is determined according to the following formula (1). judge.
Y1 (x, y) -Y2 (x, y)> Thr1 Formula (1)

ステップS53にて、輝度値の差分が第1判定値Thr1よりも大きいと判定されると(ステップS53;YES)、輪郭拡大領域推定部5cの第2判定部c2は、被写体合焦画像P1の複数の画素のうち、第1判定部c1により輝度値の差分が第1判定値Thr1よりも大きいと判定された画素の輝度値が第2判定値よりも大きいか否かを判定する(ステップS54)。
具体的には、第2判定部c2は、被写体合焦画像P1のYUVデータのうちの輝度信号(Y1)を取得した後、被写体合焦画像P1の複数の画素(x,y)のうち、輝度値の差分が第1判定値Thr1よりも大きいと判定された画素の各々について、輝度値が第2判定値Thr2よりも大きいか否かを下記式(2)に従って判定する。
Y1(x,y)>Thr2 …式(2)
If it is determined in step S53 that the difference in luminance value is greater than the first determination value Thr1 (step S53; YES), the second determination unit c2 of the contour enlargement area estimation unit 5c determines the subject in-focus image P1. Among the plurality of pixels, it is determined whether or not the luminance value of the pixel determined by the first determination unit c1 that the difference in luminance value is greater than the first determination value Thr1 is greater than the second determination value (step S54). ).
Specifically, the second determination unit c2 acquires the luminance signal (Y1) in the YUV data of the subject focused image P1, and then, among the plurality of pixels (x, y) of the subject focused image P1, For each pixel that is determined to have a luminance value difference greater than the first determination value Thr1, it is determined whether the luminance value is greater than the second determination value Thr2 according to the following equation (2).
Y1 (x, y)> Thr2 Formula (2)

ステップS54にて、輝度値が第2判定値Thr2よりも大きいと判定されると(ステップS54;YES)、輪郭拡大領域推定部5cは、被写体合焦画像P1内で、輝度値が第2判定値Thr2よりも大きいと判定された画素を含む領域を特定する(ステップS55)。即ち、輪郭拡大領域推定部5cは、被写体合焦画像P1内で、上記式(1)及び式(2)の両方を満たす画素を含む領域を特定する。
そして、輪郭拡大領域推定部5cは、上記式(1)及び式(2)の両方を満たす画素(図5(a)中、白で表す領域)を第1の画素値「1」とし、当該画素以外の画素(図5(a)中、黒で表す領域)を第2の画素値「0」として表す二値画像等の輝度変化領域情報M(図5(a)参照)を生成して(ステップS56)、輝度変化領域推定処理を終了する。
なお、生成された輝度変化領域情報Mは、所定の格納手段(例えば、メモリ4等)に一時的に格納される。
If it is determined in step S54 that the luminance value is greater than the second determination value Thr2 (step S54; YES), the contour enlargement area estimation unit 5c determines that the luminance value is the second determination in the subject focused image P1. A region including a pixel determined to be larger than the value Thr2 is specified (step S55). That is, the contour enlargement area estimation unit 5c specifies an area including pixels that satisfy both the above expressions (1) and (2) in the subject focused image P1.
Then, the contour enlargement area estimation unit 5c sets a pixel that satisfies both the above formulas (1) and (2) (a white area in FIG. 5A) as the first pixel value “1”, and Generate luminance change area information M (see FIG. 5A) such as a binary image representing pixels other than the pixels (area represented by black in FIG. 5A) as the second pixel value “0”. (Step S56), the luminance change region estimation process is terminated.
The generated luminance change area information M is temporarily stored in a predetermined storage unit (for example, the memory 4).

一方、ステップS53にて、輝度値の差分が第1判定値Thr1よりも大きくないと判定された場合(ステップS53;NO)、或いは、ステップS54にて、輝度値が第2判定値Thr2よりも大きくないと判定された場合(ステップS54;NO)には、画像処理部5は、ステップS55、S56の各処理をスキップして、輝度変化領域推定処理を終了する。   On the other hand, when it is determined in step S53 that the difference in luminance value is not greater than the first determination value Thr1 (step S53; NO), or in step S54, the luminance value is greater than the second determination value Thr2. If it is determined that it is not large (step S54; NO), the image processing unit 5 skips steps S55 and S56 and ends the luminance change region estimation process.

図2に戻り、画像処理部5のエッジ検出部5dは、被写体合焦画像P1内のエッジを検出するエッジ検出処理を行う(ステップS6)。
具体的には、エッジ検出部5dは、例えば、被写体合焦画像P1のYUVデータに対してハイパスフィルタをかけて、輝度値や色や濃度等に急峻な変化があるところをエッジとして検出する。
Returning to FIG. 2, the edge detection unit 5d of the image processing unit 5 performs an edge detection process for detecting an edge in the subject focused image P1 (step S6).
Specifically, the edge detection unit 5d applies, for example, a high-pass filter to the YUV data of the subject focused image P1, and detects a sharp change in luminance value, color, density, or the like as an edge.

続けて、画像処理部5は、所定の格納手段(例えば、メモリ4等)に輝度変化領域情報Mが格納されているか否かに応じて、輝度変化領域推定処理にて輝度変化領域情報Mが生成されたか否かを判定する(ステップS7)。
ここで、輝度変化領域情報Mが生成されたと判定されると(ステップS7;YES)、被写体領域特定部5eは、輪郭拡大領域推定部5cによる輝度変化領域A1の推定結果を基準として、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定する(ステップS8)。具体的には、被写体領域特定部5eは、輪郭拡大領域推定部5cにより生成された輝度変化領域情報Mを取得して、エッジ検出部5dにより検出された全てのエッジ(即ち、所定の被写体S及び輝度変化領域A1に係るエッジ)の強度や所定数のエッジにより囲まれる候補領域内に存する画素数等に応じて評価値を算出する。このとき、被写体領域特定部5eは、輝度変化領域A1に対応する各エッジの評価値を低下させることで、輝度変化領域A1が被写体領域Bとして特定され難くする。そして、被写体領域特定部5eは、評価値が最も高くなった候補領域を所定の被写体Sが含まれる被写体領域Bとして特定する。
Subsequently, the image processing unit 5 determines whether the luminance change area information M is obtained in the luminance change area estimation process according to whether or not the luminance change area information M is stored in a predetermined storage unit (for example, the memory 4). It is determined whether or not it has been generated (step S7).
Here, if it is determined that the brightness change area information M has been generated (step S7; YES), the subject area specifying unit 5e uses the estimation result of the brightness change area A1 by the contour enlargement area estimation unit 5c as a reference. A subject area B including a predetermined subject S is specified in the focused image P1 (step S8). Specifically, the subject region specifying unit 5e acquires the luminance change region information M generated by the contour enlargement region estimation unit 5c, and all the edges detected by the edge detection unit 5d (that is, the predetermined subject S). In addition, the evaluation value is calculated according to the intensity of the edge of the luminance change area A1, the number of pixels existing in the candidate area surrounded by the predetermined number of edges, and the like. At this time, the subject area specifying unit 5e reduces the evaluation value of each edge corresponding to the brightness change area A1, thereby making it difficult to specify the brightness change area A1 as the subject area B. Then, the subject area specifying unit 5e specifies the candidate area having the highest evaluation value as the subject area B including the predetermined subject S.

次に、画像生成部5fは、被写体合焦画像P1に対してぼかし処理を施して、当該被写体合焦画像P1内の被写体領域B以外の背景領域をぼかしたぼかし画像P3(図5(b)参照)を生成する(ステップS9)。
具体的には、画像生成部5fは、被写体合焦画像P1内で被写体領域Bの位置を示す位置情報としてのアルファマップを利用して、被写体合焦画像P1に対してぼかし処理を施して、当該被写体合焦画像P1内の背景領域及び境界領域をそれぞれ所定の強度でぼかしたぼかし画像P3を生成する。
Next, the image generation unit 5f performs a blurring process on the subject focused image P1, and blurs a background region other than the subject region B in the subject focused image P1 (FIG. 5B). Reference) is generated (step S9).
Specifically, the image generation unit 5f performs a blurring process on the subject focused image P1 using an alpha map as position information indicating the position of the subject region B in the subject focused image P1. A blurred image P3 is generated by blurring the background area and the boundary area in the subject focused image P1 with a predetermined intensity.

一方、ステップS7にて、輝度変化領域情報Mが生成されていないと判定されると(ステップS7;NO)、被写体領域特定部5eは、輝度変化領域A1を考慮せずに、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定する(ステップS10)。具体的には、被写体領域特定部5eは、エッジ検出部5dにより検出された全てのエッジ(即ち、所定の被写体S及び輝度変化領域A1に係るエッジ)の強度や所定数のエッジにより囲まれる候補領域内に存する画素数等に応じて評価値を算出する。そして、被写体領域特定部5eは、評価値が最も高くなった候補領域を所定の被写体Sが含まれる被写体領域Bとして特定する(ステップS10)。
その後、画像処理部5は、処理をステップS9に移行して、画像生成部5fは、上記と略同様に、被写体合焦画像P1内にて、ステップS10にて特定された被写体領域B以外の背景領域をぼかしたぼかし画像(図示略)を生成する(ステップS9)。
On the other hand, if it is determined in step S7 that the brightness change area information M has not been generated (step S7; NO), the subject area specifying unit 5e does not consider the brightness change area A1 and the subject focused image. A subject area B including a predetermined subject S in P1 is specified (step S10). Specifically, the subject area specifying unit 5e is a candidate surrounded by the strength of all edges detected by the edge detection unit 5d (that is, the edges related to the predetermined subject S and the luminance change area A1) or a predetermined number of edges. An evaluation value is calculated according to the number of pixels existing in the region. Then, the subject area specifying unit 5e specifies the candidate area having the highest evaluation value as the subject area B including the predetermined subject S (step S10).
Thereafter, the image processing unit 5 shifts the processing to step S9, and the image generation unit 5f performs a process other than the subject region B specified in step S10 in the subject focused image P1 in substantially the same manner as described above. A blurred image (not shown) with a blurred background region is generated (step S9).

そして、記録媒体制御部8は、画像生成部5fにより生成され、画像処理部5の符号化部により所定の圧縮形式(例えば、JPEG形式等)で符号化されたぼかし画像P3のYUVデータを取得して、記録媒体Rに記録させて(ステップS11)、画像生成処理を終了する。   Then, the recording medium control unit 8 obtains the YUV data of the blurred image P3 generated by the image generation unit 5f and encoded in a predetermined compression format (for example, JPEG format) by the encoding unit of the image processing unit 5. Then, the image is recorded on the recording medium R (step S11), and the image generation process is terminated.

以上のように、本実施形態の撮像装置100によれば、被写体合焦画像P1及び被写体非合焦画像(一の画像)P2の各々の画像情報に基づいて、被写体合焦画像P1内で、被写界深度外に存する物に対応し、輪郭部分が一の画像における当該物に対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域Aを推定して、当該輪郭拡大領域Aの推定結果を基準として、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定するので、被写体合焦画像P1内に被写界深度外に存する物の拡がった光学像の輪郭部分が明確に表れた輪郭拡大領域Aが含まれている場合であっても、当該輪郭拡大領域Aの推定結果を基準として、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定することで、被写界深度外に存する物の光学像のエッジの誤検出を生じさせ難くして被写体領域Bの特定を適正に行うことができる。   As described above, according to the imaging apparatus 100 of the present embodiment, in the subject focused image P1, based on the respective image information of the subject focused image P1 and the subject non-focused image (one image) P2, Estimating a contour expansion region A corresponding to an object existing outside the depth of field and having a contour portion enlarged from the contour portion of the region corresponding to the object in one image. Since the subject region B including the predetermined subject S is specified in the subject focused image P1 on the basis of the result, the contour portion of the optical image in which an object existing outside the depth of field is expanded in the subject focused image P1. Even when the contour enlargement area A in which is clearly shown is included, the subject area B including the predetermined subject S in the subject focused image P1 is determined based on the estimation result of the contour enlargement area A. By specifying, outside the depth of field To hardly cause erroneous detection of an edge of the optical image of the object a particular subject region B can be properly carried out.

具体的には、例えば、蛍光灯などの高輝度の物から放たれて電子撮像部1bに入射する光の輝度レベルが検出可能範囲の上限よりも大きかったり(光の強度が強かったり)、レンズ部1aの解像力が低い場合には、被写体合焦画像P1上に当該物の拡がった光学像の輪郭部分が明確に表れてしまう。即ち、被写体合焦画像P1における輪郭拡大領域A(輝度変化領域A1)の輪郭部分は、被写体非合焦画像(一の画像)P2における当該輪郭拡大領域Aに対応する対応領域Cの輪郭部分よりも拡大されてしまい、高輝度の物の光学像のエッジの誤検出を生じさせる虞がある。
このような場合であっても、予め被写体合焦画像P1内で輪郭部分の輝度値が急峻に変化した輝度変化領域A1を推定しておくことで、被写体合焦画像P1内から検出された全てのエッジ(所定の被写体S及び輝度変化領域A1に係るエッジ)のうち、輝度変化領域A1に対応するエッジの評価値を低下させることで、高輝度の物の光学像のエッジの誤検出を生じさせ難くして被写体合焦画像P1内で被写体領域Bの特定を適正に行うことができる。
Specifically, for example, the luminance level of light emitted from a high-luminance object such as a fluorescent lamp and incident on the electronic imaging unit 1b is larger than the upper limit of the detectable range (the light intensity is high), a lens When the resolution of the portion 1a is low, the contour portion of the optical image in which the object is spread appears clearly on the subject focused image P1. That is, the contour portion of the contour enlarged region A (luminance change region A1) in the subject focused image P1 is more than the contour portion of the corresponding region C corresponding to the contour magnified region A in the subject non-focused image (one image) P2. May also be magnified, which may cause false detection of the edge of an optical image of a high-brightness object.
Even in such a case, it is possible to estimate all the brightness change areas A1 in which the brightness value of the contour portion has sharply changed in the subject focused image P1 in advance, thereby detecting all of the detected in the subject focused image P1. Of the edge of the optical image of the high-luminance object is caused by lowering the evaluation value of the edge corresponding to the luminance change area A1 among the edges (the edges related to the predetermined subject S and the luminance change area A1) Therefore, it is possible to appropriately specify the subject area B in the subject focused image P1.

また、背景内の所定の被写体Sに合焦させて撮像された被写体合焦画像P1及びピントを合わせる位置を所定の被写体Sに対する前後方向に移動させて撮像された被写体非合焦画像P2の各々の輝度情報に基づいて、被写体合焦画像P1内で輝度変化領域A1を推定するので、輪郭拡大領域Aとしての輪郭部分の輝度値が急峻に変化した輝度変化領域A1の推定を適正に行うことができる。
具体的には、被写体合焦画像P1内で、当該被写体合焦画像P1と被写体非合焦画像P2の間で対応する各画素の輝度値の差分が第1判定値よりも大きく、且つ、輝度値が第2判定値よりも大きい画素を含む領域を輝度変化領域A1として推定するので、被写体合焦画像P1と被写体非合焦画像P2の間で対応する各画素の輝度値の差分だけでなく、被写体合焦画像P1の各画素の輝度値自体も考慮して、当該被写体合焦画像P1内で輝度変化領域A1を適正に推定することができる。つまり、輝度値の差分が第1判定値よりも大きい画素であっても、輝度値が第2判定値よりも大きくない画素を除外することができることとなって、例えば、蛍光灯などの高輝度の物に対応する領域を輝度変化領域A1として適正に推定することができる。
In addition, each of the subject focused image P1 captured by focusing on a predetermined subject S in the background and the subject non-focused image P2 captured by moving the focusing position in the front-rear direction with respect to the predetermined subject S. Since the brightness change area A1 is estimated in the subject focused image P1 based on the brightness information of the subject, the brightness change area A1 in which the brightness value of the contour portion as the contour enlargement area A has sharply changed is appropriately estimated. Can do.
Specifically, in the subject focused image P1, the difference between the luminance values of corresponding pixels between the subject focused image P1 and the subject non-focused image P2 is larger than the first determination value, and the luminance Since the region including pixels whose values are larger than the second determination value is estimated as the luminance change region A1, not only the difference in luminance value of each corresponding pixel between the subject focused image P1 and the subject non-focused image P2 Considering the luminance value of each pixel of the subject focused image P1, the luminance change area A1 can be appropriately estimated in the subject focused image P1. That is, even if the difference in luminance value is larger than the first determination value, pixels whose luminance value is not larger than the second determination value can be excluded. For example, high luminance such as a fluorescent lamp An area corresponding to the object can be appropriately estimated as the luminance change area A1.

また、被写体合焦画像P1内の被写体領域B以外の背景領域をぼかしたぼかし画像P3を生成した場合に、被写体領域Bと背景領域の判別を適正に行うことができなかったために背景領域であるにも拘わらず被写体領域Bと特定されてしまい不自然なぼかし画像P4(図6参照)が生成されることがなくなる。
即ち、図6に示すぼかし画像P4は、輪郭拡大領域A(輝度変化領域A1)が背景領域であるにも拘わらず被写体領域であると判定されてしまい、輪郭拡大領域Aのぼけ度合が他の背景領域に比べて全体的に小さくなっている。特に、輪郭拡大領域Aの中心部は、全くぼけていないような状態となっている。これに対して、本実施形態の撮像装置100によれば、輪郭拡大領域Aに対して他の背景領域と略同等のぼけ度合を付与することができ、被写体領域B以外の背景領域全域に亘って自然なぼけが付与されたぼかし画像P3(図5(b)参照)を生成することができる。
In addition, when the blurred image P3 in which the background region other than the subject region B in the subject focused image P1 is blurred is generated, the subject region B and the background region cannot be properly determined, so that the background region is the background region. Nevertheless, the subject region B is identified and an unnatural blurred image P4 (see FIG. 6) is not generated.
That is, the blurred image P4 shown in FIG. 6 is determined to be a subject region even though the contour enlargement region A (luminance change region A1) is the background region, and the degree of blur of the contour enlargement region A is other than It is smaller overall than the background area. In particular, the central portion of the contour enlarged region A is in a state that is not blurred at all. On the other hand, according to the imaging apparatus 100 of the present embodiment, the contour expansion region A can be given a degree of blur substantially the same as that of other background regions, and the entire background region other than the subject region B can be applied. A blurred image P3 (see FIG. 5B) to which natural blur is added can be generated.

なお、本発明は、上記実施形態に限定されることなく、本発明の趣旨を逸脱しない範囲において、種々の改良並びに設計の変更を行っても良い。
例えば、一の画像としての被写体非合焦画像P2を用いて輪郭拡大領域A(輝度変化領域A1)を推定するようにしたが、一例であってこれに限られるものではなく、輪郭拡大領域Aの推定に用いられる一の画像は適宜任意に変更可能である。
即ち、一の画像は、被写体合焦画像P1の撮像条件とは異なる所定の撮像条件で撮像され、被写体合焦画像P1と略等しい構図を有する画像であれば良く、例えば、一の画像として、撮像部1の電子撮像部1bの露光時間を被写体合焦画像P1よりも短くして当該撮像部1により撮像された短時間露光画像を用いても良い。そして、輪郭拡大領域推定部5cは、被写体合焦画像P1及び短時間露光画像の各々の輝度情報に基づいて、被写体合焦画像P1内で輪郭部分の輝度値が急峻に変化した輝度変化領域A1を輪郭拡大領域Aとして推定するようにしても良い。つまり、例えば、蛍光灯などの光源等の高輝度の物は、電子撮像部1bに入射する光の強度が強いため、電子撮像部1bの露光時間を短時間としても電荷の蓄積を行うことができる。これにより、電子撮像部1bの露光時間を被写体合焦画像P1よりも短くして撮像された短時間露光画像のうち、電子撮像部1bの電荷が蓄積されている画素に対応する領域が高輝度の物に対応する可能性が高いと考えられる。
そこで、輪郭拡大領域推定部5cは、短時間露光画像のうちの輝度信号を取得して、当該短時間露光画像内で高輝度の物に対応する高輝度領域を特定する。そして、輪郭拡大領域推定部5cは、被写体合焦画像P1のYUVデータのうちの輝度信号を取得して、当該被写体合焦画像P1内で、短時間露光画像の高輝度領域に対応する領域を輝度変化領域A1(輪郭拡大領域A)として推定する。
The present invention is not limited to the above-described embodiment, and various improvements and design changes may be made without departing from the spirit of the present invention.
For example, although the contour enlargement area A (luminance change area A1) is estimated using the subject non-focus image P2 as one image, this is an example and the present invention is not limited to this. One image used for the estimation can be arbitrarily changed as appropriate.
That is, one image may be an image that is captured under a predetermined imaging condition different from the imaging condition of the subject focused image P1 and has a composition that is substantially equal to the subject focused image P1, for example, as one image, The exposure time of the electronic imaging unit 1b of the imaging unit 1 may be shorter than the subject focused image P1, and a short-time exposure image captured by the imaging unit 1 may be used. Then, the contour enlargement area estimation unit 5c, based on the brightness information of the subject focused image P1 and the short-time exposure image, changes the brightness change area A1 in which the brightness value of the contour portion in the subject focused image P1 has changed sharply. May be estimated as the contour enlarged region A. That is, for example, a high-brightness object such as a light source such as a fluorescent lamp has a high intensity of light incident on the electronic imaging unit 1b. Therefore, charges can be accumulated even if the exposure time of the electronic imaging unit 1b is short. it can. As a result, in the short-time exposure image captured with the exposure time of the electronic imaging unit 1b shorter than that of the subject focused image P1, the region corresponding to the pixel in which the charge of the electronic imaging unit 1b is accumulated has high brightness. It is considered that there is a high possibility of dealing with
Therefore, the contour enlargement area estimation unit 5c acquires a luminance signal in the short-time exposure image and specifies a high-luminance area corresponding to a high-luminance object in the short-time exposure image. Then, the contour enlargement area estimation unit 5c acquires a luminance signal in the YUV data of the subject focused image P1, and determines an area corresponding to the high luminance area of the short-time exposure image in the subject focused image P1. It is estimated as the luminance change area A1 (contour enlarged area A).

このような構成としても、輪郭拡大領域Aの推定結果を基準として、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定することで、被写界深度外に存する物の光学像のエッジの誤検出を生じさせ難くして被写体領域Bの特定を適正に行うことができる。   Even in such a configuration, by specifying the subject region B including the predetermined subject S in the subject focused image P1 on the basis of the estimation result of the contour enlarged region A, an object outside the depth of field can be identified. The subject area B can be specified appropriately by making it difficult to cause erroneous detection of the edge of the optical image.

また、上記実施形態にあっては、第1判定部c1による判定処理後に第2判定部c2による判定処理を行うようにしたが、これらの判定処理の順序は一例であってこれに限られるものではなく、順序を逆、即ち、第2判定部c2による判定処理後に第1判定部c1による判定処理を行うようにしても良い。
さらに、輪郭拡大領域推定部5cは、第1判定部c1及び第2判定部c2の両方の判定結果に基づいて、即ち、上記式(1)及び式(2)の両方を満たす画素を含む領域を輝度変化領域A1として推定するようにしたが、一例であってこれに限られるものではなく、第1判定部c1及び第2判定部c2のうちの何れか一方を具備し、上記式(1)及び式(2)のうちの何れか一方のみを満たす画素を含む領域を輝度変化領域A1として推定しても良い。
具体的には、輪郭拡大領域推定部5cは、第1判定部c1による判定処理のみを行って、被写体合焦画像P1内で、輝度値の差分が第1判定値Thr1よりも大きい画素(上記式(1)のみを満たす画素)を特定した場合には、当該画素を含む領域を輝度変化領域A1として推定する。また、輪郭拡大領域推定部5cは、第2判定部c2による判定処理のみを行って、被写体合焦画像P1内で、輝度値が第2判定値Thr2よりも大きい画素(上記式(2)のみを満たす画素)を特定した場合には、当該画素を含む領域を輝度変化領域A1として推定する。
Moreover, in the said embodiment, although the determination process by the 2nd determination part c2 was performed after the determination process by the 1st determination part c1, the order of these determination processes is an example, and is restricted to this. Instead, the order may be reversed, that is, the determination process by the first determination unit c1 may be performed after the determination process by the second determination unit c2.
Furthermore, the contour enlarged region estimation unit 5c is based on the determination results of both the first determination unit c1 and the second determination unit c2, that is, a region including pixels that satisfy both the above expressions (1) and (2). Is estimated as the luminance change region A1, but it is an example and not limited to this, and includes either one of the first determination unit c1 and the second determination unit c2, and the above formula (1 ) And formula (2), a region including pixels that satisfy only one of the two may be estimated as the luminance change region A1.
Specifically, the contour enlargement area estimation unit 5c performs only the determination processing by the first determination unit c1, and the pixel (the above-described difference in luminance value is larger than the first determination value Thr1 in the subject focused image P1). When a pixel that satisfies only equation (1) is specified, an area including the pixel is estimated as the luminance change area A1. In addition, the contour enlargement area estimation unit 5c performs only the determination process by the second determination unit c2, and the pixel whose luminance value is larger than the second determination value Thr2 in the subject focused image P1 (only the above equation (2)). When a pixel satisfying the above is specified, an area including the pixel is estimated as the luminance change area A1.

また、上記実施形態にあっては、被写体合焦画像P1内のエッジの検出結果を利用して、被写体領域Bを特定するようにしたが、被写体合焦画像P1内のエッジを利用するか否かは適宜任意に変更可能である。即ち、撮像装置100は、必ずしもエッジ検出部5dを具備する必要はなく、輪郭拡大領域Aの推定結果を基準として、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定可能であれば如何なる構成であっても良い。   In the above embodiment, the subject region B is specified using the detection result of the edge in the subject focused image P1, but whether or not the edge in the subject focused image P1 is used. These can be arbitrarily changed as appropriate. That is, the imaging apparatus 100 does not necessarily include the edge detection unit 5d, and can specify a subject region B that includes the predetermined subject S in the subject focused image P1 based on the estimation result of the contour enlargement region A. Any configuration may be used.

さらに、上記実施形態にあっては、画像生成部5fが被写体合焦画像P1内の被写体領域B以外の背景領域をぼかしたぼかし画像P3を生成するようにしたが、必ずしも画像生成部5fを具備する必要はなく、ぼかし画像P3を生成するか否かは適宜任意に変更可能である。
また、撮像装置100による被写体領域Bの特定後の後処理は、ぼかし画像P3の生成に限られるものではなく、一例であって適宜任意に変更可能である。即ち、撮像装置100は、特定された被写体領域Bを利用して、当該所定の被写体Sに対する前後方向にピントの位置を変えた複数の画像の撮像、所謂、フォーカスブラケット撮像を行うようにしても良いし、被写体合焦画像P1から被写体領域Bが含まれる画像を切り抜く処理を行うようにしても良い。
Furthermore, in the above embodiment, the image generation unit 5f generates the blurred image P3 in which the background region other than the subject region B in the subject focused image P1 is blurred. However, the image generation unit 5f is not necessarily provided. It is not necessary to do so, and whether or not to generate the blurred image P3 can be arbitrarily changed as appropriate.
Further, the post-processing after the subject area B is specified by the imaging apparatus 100 is not limited to the generation of the blurred image P3, but is an example and can be arbitrarily changed as appropriate. That is, the imaging apparatus 100 may perform a so-called focus bracket imaging by using the specified subject region B to capture a plurality of images in which the focus position is changed in the front-rear direction with respect to the predetermined subject S. Alternatively, a process of cutting out an image including the subject region B from the subject focused image P1 may be performed.

さらに、撮像装置100の構成は、上記実施形態に例示したものは一例であり、これに限られるものではない。また、画像処理装置として、撮像装置100を例示したが、これに限られるものではなく、本発明に係る画像処理を実行可能なものであれば如何なる構成であっても良い。   Furthermore, the configuration of the imaging apparatus 100 is merely an example illustrated in the above embodiment, and is not limited thereto. Further, although the imaging apparatus 100 has been exemplified as the image processing apparatus, the present invention is not limited to this, and any configuration may be used as long as the image processing according to the present invention can be executed.

加えて、上記実施形態にあっては、第1取得手段、第2取得手段、推定手段、特定手段としての機能を、中央制御部10の制御下にて、第1画像取得部5a、第2画像取得部5b、輪郭拡大領域推定部5c、被写体領域特定部5eが駆動することにより実現される構成としたが、これに限られるものではなく、中央制御部10によって所定のプログラム等が実行されることにより実現される構成としても良い。
即ち、プログラムを記憶するプログラムメモリ(図示略)に、第1取得処理ルーチン、第2取得処理ルーチン、推定処理ルーチン、特定処理ルーチンを含むプログラムを記憶しておく。そして、第1取得処理ルーチンにより中央制御部10のCPUを、背景内の所定の被写体Sにピントを合わせて撮像装置により撮像された被写体合焦画像P1を取得する第1取得手段として機能させるようにしても良い。また、第2取得処理ルーチンにより中央制御部10のCPUを、撮像装置により被写体合焦画像P1の撮像条件とは異なる所定の撮像条件で撮像され、被写体合焦画像P1と略等しい構図を有する一の画像を取得する第2取得手段として機能させるようにしても良い。また、推定処理ルーチンにより中央制御部10のCPUを、被写体合焦画像P1及び一の画像の各々の画像情報に基づいて、被写体合焦画像P1内で、被写界深度外に存する物に対応し、輪郭部分が一の画像における当該物に対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域Aを推定する推定手段として機能させるようにしても良い。また、特定処理ルーチンにより中央制御部10のCPUを、推定手段による輪郭拡大領域Aの推定結果を基準として、被写体合焦画像P1内で所定の被写体Sが含まれる被写体領域Bを特定する特定手段として機能させるようにしても良い。
In addition, in the above embodiment, the functions of the first acquisition unit, the second acquisition unit, the estimation unit, and the identification unit are controlled by the central control unit 10 in the first image acquisition unit 5a, the second image acquisition unit 5a, and the second image acquisition unit 5a. The image acquisition unit 5b, the contour enlarged region estimation unit 5c, and the subject region specification unit 5e are configured to be driven. However, the configuration is not limited to this, and a predetermined program or the like is executed by the central control unit 10. It is good also as a structure implement | achieved by doing.
In other words, a program including a first acquisition processing routine, a second acquisition processing routine, an estimation processing routine, and a specific processing routine is stored in a program memory (not shown) that stores the program. Then, the first acquisition processing routine causes the CPU of the central control unit 10 to function as a first acquisition unit that acquires the focused image P1 captured by the imaging device while focusing on the predetermined subject S in the background. Anyway. In addition, the CPU of the central control unit 10 is imaged under a predetermined imaging condition different from the imaging condition of the subject focused image P1 by the imaging device by the second acquisition processing routine, and has a composition substantially equal to the subject focused image P1. You may make it function as the 2nd acquisition means which acquires the image of this. Further, the CPU of the central control unit 10 corresponds to an object outside the depth of field in the subject focused image P1 based on the image information of the subject focused image P1 and one image by the estimation processing routine. Then, the contour portion may be made to function as an estimation means for estimating the contour enlargement region A formed by enlarging the contour portion of the region corresponding to the object in one image. In addition, the CPU of the central control unit 10 by the specifying process routine specifies the subject region B including the predetermined subject S in the subject focused image P1 based on the estimation result of the contour enlarged region A by the estimating unit. You may make it function as.

同様に、第1判定手段、第2判定手段、検出手段、画像生成手段についても、中央制御部10のCPUによって所定のプログラム等が実行されることにより実現される構成としても良い。   Similarly, the first determination unit, the second determination unit, the detection unit, and the image generation unit may be realized by executing a predetermined program or the like by the CPU of the central control unit 10.

さらに、上記の各処理を実行するためのプログラムを格納したコンピュータ読み取り可能な媒体として、ROMやハードディスク等の他、フラッシュメモリ等の不揮発性メモリ、CD−ROM等の可搬型記録媒体を適用することも可能である。また、プログラムのデータを所定の通信回線を介して提供する媒体としては、キャリアウェーブ(搬送波)も適用される。   Furthermore, as a computer-readable medium storing a program for executing each of the above processes, a non-volatile memory such as a flash memory or a portable recording medium such as a CD-ROM is applied in addition to a ROM or a hard disk. Is also possible. A carrier wave is also used as a medium for providing program data via a predetermined communication line.

本発明のいくつかの実施形態を説明したが、本発明の範囲は、上述の実施の形態に限定するものではなく、特許請求の範囲に記載された発明の範囲とその均等の範囲を含む。
以下に、この出願の願書に最初に添付した特許請求の範囲に記載した発明を付記する。付記に記載した請求項の項番は、この出願の願書に最初に添付した特許請求の範囲の通りである。
〔付記〕
<請求項1>
背景内の所定の被写体にピントを合わせて撮像手段により撮像された被写体合焦画像を取得する第1取得手段と、
前記撮像手段により前記被写体合焦画像の撮像条件とは異なる所定の撮像条件で撮像され、前記被写体合焦画像と略等しい構図を有する一の画像を取得する第2取得手段と、
前記被写体合焦画像及び前記一の画像の各々の画像情報に基づいて、前記被写体合焦画像内で、被写界深度外に存する物に対応し、輪郭部分が前記一の画像における当該物に対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域を推定する推定手段と、
この推定手段による前記輪郭拡大領域の推定結果を基準として、前記被写体合焦画像内で前記所定の被写体が含まれる被写体領域を特定する特定手段と、
を備えたことを特徴とする画像処理装置。
<請求項2>
前記一の画像は、ピントを合わせる位置を前記所定の被写体に対する前後方向に移動させて前記撮像手段により撮像された被写体非合焦画像を含み、
前記推定手段は、更に、
前記被写体合焦画像及び前記被写体非合焦画像の各々の輝度情報に基づいて、前記被写体合焦画像内で輪郭部分の輝度値が急峻に変化した輝度変化領域を前記輪郭拡大領域として推定することを特徴とする請求項1に記載の画像処理装置。
<請求項3>
前記推定手段は、
前記被写体合焦画像と前記被写体非合焦画像の間で対応する各画素の輝度値の差分が第1判定値よりも大きいか否かを判定する第1判定手段を更に有し、この第1判定手段による判定結果に基づいて、輝度値の差分が前記第1判定値よりも大きい画素を含む領域を前記輝度変化領域として推定することを特徴とする請求項2に記載の画像処理装置。
<請求項4>
前記推定手段は、
前記被写体合焦画像の各画素の輝度値が第2判定値よりも大きいか否かを判定する第2判定手段を更に有し、この第2判定手段による判定結果に基づいて、輝度値が前記第2判定値よりも大きい画素を含む領域を前記輝度変化領域として推定することを特徴とする請求項2又は3に記載の画像処理装置。
<請求項5>
前記一の画像は、前記撮像手段の露光時間を前記被写体合焦画像よりも短くして当該撮像手段により撮像された短時間露光画像を含み、
前記推定手段は、更に、
前記被写体合焦画像及び前記短時間露光画像の各々の輝度情報に基づいて、前記被写体合焦画像内で輪郭部分の輝度値が急峻に変化した輝度変化領域を前記輪郭拡大領域として推定することを特徴とする請求項1に記載の画像処理装置。
<請求項6>
前記輝度変化領域は、前記撮像手段の撮像素子に入射する光の輝度レベルが検出可能範囲の上限よりも大きい高輝度の物に対応する領域であることを特徴とする請求項2〜5の何れか一項に記載の画像処理装置。
<請求項7>
前記被写体合焦画像内のエッジを検出する検出手段を更に備え、
前記特定手段は、
前記検出手段により検出されたエッジのうち、前記推定手段により推定された前記輪郭拡大領域に対応するエッジの評価値を低下させて前記被写体領域を特定することを特徴とする請求項1〜6の何れか一項に記載の画像処理装置。
<請求項8>
前記被写体合焦画像に対してぼかし処理を施して、当該被写体合焦画像内の前記被写体領域以外の背景領域をぼかしたぼかし画像を生成する画像生成手段を更に備えることを特徴とする請求項1〜7の何れか一項に記載の画像処理装置。
<請求項9>
画像処理装置を用いた画像処理方法であって、
背景内の所定の被写体にピントを合わせて撮像装置により撮像された被写体合焦画像を取得する処理と、
前記撮像装置により前記被写体合焦画像の撮像条件とは異なる所定の撮像条件で撮像され、前記被写体合焦画像と略等しい構図を有する一の画像を取得する処理と、
前記被写体合焦画像及び前記一の画像の各々の画像情報に基づいて、前記被写体合焦画像内で、被写界深度外に存する物に対応し、輪郭部分が前記一の画像における当該物に対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域を推定する処理と、
前記輪郭拡大領域の推定結果を基準として、前記被写体合焦画像内で前記所定の被写体が含まれる被写体領域を特定する処理と、
を含むことを特徴とする画像処理方法。
<請求項10>
画像処理装置のコンピュータを、
背景内の所定の被写体にピントを合わせて撮像装置により撮像された被写体合焦画像を取得する第1取得手段、
前記撮像装置により前記被写体合焦画像の撮像条件とは異なる所定の撮像条件で撮像され、前記被写体合焦画像と略等しい構図を有する一の画像を取得する第2取得手段、
前記被写体合焦画像及び前記一の画像の各々の画像情報に基づいて、前記被写体合焦画像内で、被写界深度外に存する物に対応し、輪郭部分が前記一の画像における当該物に対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域を推定する推定手段、
この推定手段による前記輪郭拡大領域の推定結果を基準として、前記被写体合焦画像内で前記所定の被写体が含まれる被写体領域を特定する特定手段、
として機能させることを特徴とするプログラム。
Although several embodiments of the present invention have been described, the scope of the present invention is not limited to the above-described embodiments, but includes the scope of the invention described in the claims and equivalents thereof.
The invention described in the scope of claims attached to the application of this application will be added below. The item numbers of the claims described in the appendix are as set forth in the claims attached to the application of this application.
[Appendix]
<Claim 1>
First acquisition means for acquiring a focused subject image captured by the imaging means while focusing on a predetermined subject in the background;
Second acquisition means for acquiring one image captured by the imaging means under a predetermined imaging condition different from the imaging condition of the subject focused image and having a composition substantially equal to the subject focused image;
Based on the image information of each of the subject in-focus image and the one image, the object in the subject in-focus image corresponds to an object existing outside the depth of field, and the contour portion corresponds to the object in the one image. An estimation means for estimating a contour expansion region that is enlarged from the contour portion of the corresponding region;
Specifying means for specifying a subject area in which the predetermined subject is included in the subject focused image with reference to the estimation result of the contour enlarged region by the estimating means;
An image processing apparatus comprising:
<Claim 2>
The one image includes a subject non-focused image captured by the imaging means by moving a focusing position in the front-rear direction with respect to the predetermined subject,
The estimating means further includes:
Based on the luminance information of each of the subject focused image and the subject non-focused image, a luminance change region in which the luminance value of the contour portion has sharply changed in the subject focused image is estimated as the contour enlarged region. The image processing apparatus according to claim 1.
<Claim 3>
The estimation means includes
First determination means is further provided for determining whether or not a difference in luminance value of each corresponding pixel between the subject focused image and the subject non-focused image is greater than a first determination value. The image processing apparatus according to claim 2, wherein an area including a pixel having a luminance value difference larger than the first determination value is estimated as the luminance change area based on a determination result by the determination unit.
<Claim 4>
The estimation means includes
Second determination means for determining whether or not the luminance value of each pixel of the subject focused image is larger than a second determination value, and based on the determination result by the second determination means, the luminance value is The image processing apparatus according to claim 2, wherein an area including pixels larger than a second determination value is estimated as the luminance change area.
<Claim 5>
The one image includes a short-time exposure image captured by the imaging unit with an exposure time of the imaging unit shorter than that of the subject focused image,
The estimating means further includes:
Estimating, as the enlarged contour region, a luminance change region in which a luminance value of a contour portion has sharply changed in the subject focused image based on luminance information of each of the subject focused image and the short-time exposure image. The image processing apparatus according to claim 1, wherein:
<Claim 6>
6. The brightness change area is an area corresponding to a high brightness object in which a brightness level of light incident on an image sensor of the imaging means is larger than an upper limit of a detectable range. An image processing apparatus according to claim 1.
<Claim 7>
Detecting means for detecting an edge in the subject focused image;
The specifying means is:
7. The subject area is specified by reducing an evaluation value of an edge corresponding to the contour enlargement area estimated by the estimation means among edges detected by the detection means. The image processing apparatus according to any one of the above.
<Claim 8>
2. The image processing apparatus according to claim 1, further comprising: an image generation unit configured to perform a blurring process on the subject focused image to generate a blurred image in which a background region other than the subject region in the subject focused image is blurred. The image processing device according to any one of?
<Claim 9>
An image processing method using an image processing apparatus,
Processing to obtain a subject in-focus image captured by the imaging device while focusing on a predetermined subject in the background;
Processing for obtaining one image having a composition that is imaged by the imaging device under a predetermined imaging condition different from the imaging condition of the subject focused image and having substantially the same composition as the subject focused image;
Based on the image information of each of the subject in-focus image and the one image, the object in the subject in-focus image corresponds to an object existing outside the depth of field, and the contour portion corresponds to the object in the one image. A process for estimating a contour enlargement region that is enlarged from the contour portion of the corresponding region;
A process of specifying a subject area that includes the predetermined subject in the subject focused image with reference to the estimation result of the contour enlargement region;
An image processing method comprising:
<Claim 10>
The computer of the image processing device
First acquisition means for acquiring a focused subject image captured by the imaging apparatus while focusing on a predetermined subject in the background;
A second acquisition unit configured to acquire an image captured by the imaging apparatus under a predetermined imaging condition different from an imaging condition of the subject focused image and having a composition substantially equal to the subject focused image;
Based on the image information of each of the subject in-focus image and the one image, the object in the subject in-focus image corresponds to an object existing outside the depth of field, and the contour portion corresponds to the object in the one image. An estimation means for estimating a contour expansion region that is enlarged from the contour portion of the corresponding region;
Specifying means for specifying a subject area including the predetermined subject in the subject focused image with reference to the estimation result of the contour enlargement region by the estimating means;
A program characterized by functioning as

100 撮像装置
1 撮像部
2 撮像制御部
5 画像処理部
5a 第1画像取得部
5b 第2画像取得部
5c 輪郭拡大領域推定部
c1 第1判定部
c2 第2判定部
5d エッジ検出部
5e 被写体領域特定部
5f 画像生成部
10 中央制御部
DESCRIPTION OF SYMBOLS 100 Imaging device 1 Imaging part 2 Imaging control part 5 Image processing part 5a 1st image acquisition part 5b 2nd image acquisition part 5c Outline expansion area estimation part c1 1st determination part c2 2nd determination part 5d Edge detection part 5e Subject area specification Part 5f image generation part 10 central control part

Claims (10)

背景内の所定の被写体にピントを合わせて撮像手段により撮像された被写体合焦画像を取得する第1取得手段と、
前記撮像手段により前記被写体合焦画像の撮像条件とは異なる所定の撮像条件で撮像され、前記被写体合焦画像と略等しい構図を有する一の画像を取得する第2取得手段と、
前記被写体合焦画像及び前記一の画像の各々の画像情報に基づいて、前記被写体合焦画像内で、被写界深度外に存する物に対応し、輪郭部分が前記一の画像における当該物に対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域を推定する推定手段と、
この推定手段による前記輪郭拡大領域の推定結果を基準として、前記被写体合焦画像内で前記所定の被写体が含まれる被写体領域を特定する特定手段と、
を備えたことを特徴とする画像処理装置。
First acquisition means for acquiring a focused subject image captured by the imaging means while focusing on a predetermined subject in the background;
Second acquisition means for acquiring one image captured by the imaging means under a predetermined imaging condition different from the imaging condition of the subject focused image and having a composition substantially equal to the subject focused image;
Based on the image information of each of the subject in-focus image and the one image, the object in the subject in-focus image corresponds to an object existing outside the depth of field, and the contour portion corresponds to the object in the one image. An estimation means for estimating a contour expansion region that is enlarged from the contour portion of the corresponding region;
Specifying means for specifying a subject area in which the predetermined subject is included in the subject focused image with reference to the estimation result of the contour enlarged region by the estimating means;
An image processing apparatus comprising:
前記一の画像は、ピントを合わせる位置を前記所定の被写体に対する前後方向に移動させて前記撮像手段により撮像された被写体非合焦画像を含み、
前記推定手段は、更に、
前記被写体合焦画像及び前記被写体非合焦画像の各々の輝度情報に基づいて、前記被写体合焦画像内で輪郭部分の輝度値が急峻に変化した輝度変化領域を前記輪郭拡大領域として推定することを特徴とする請求項1に記載の画像処理装置。
The one image includes a subject non-focused image captured by the imaging means by moving a focusing position in the front-rear direction with respect to the predetermined subject,
The estimating means further includes:
Based on the luminance information of each of the subject focused image and the subject non-focused image, a luminance change region in which the luminance value of the contour portion has sharply changed in the subject focused image is estimated as the contour enlarged region. The image processing apparatus according to claim 1.
前記推定手段は、
前記被写体合焦画像と前記被写体非合焦画像の間で対応する各画素の輝度値の差分が第1判定値よりも大きいか否かを判定する第1判定手段を更に有し、この第1判定手段による判定結果に基づいて、輝度値の差分が前記第1判定値よりも大きい画素を含む領域を前記輝度変化領域として推定することを特徴とする請求項2に記載の画像処理装置。
The estimation means includes
First determination means is further provided for determining whether or not a difference in luminance value of each corresponding pixel between the subject focused image and the subject non-focused image is greater than a first determination value. The image processing apparatus according to claim 2, wherein an area including a pixel having a luminance value difference larger than the first determination value is estimated as the luminance change area based on a determination result by the determination unit.
前記推定手段は、
前記被写体合焦画像の各画素の輝度値が第2判定値よりも大きいか否かを判定する第2判定手段を更に有し、この第2判定手段による判定結果に基づいて、輝度値が前記第2判定値よりも大きい画素を含む領域を前記輝度変化領域として推定することを特徴とする請求項2又は3に記載の画像処理装置。
The estimation means includes
Second determination means for determining whether or not the luminance value of each pixel of the subject focused image is larger than a second determination value, and based on the determination result by the second determination means, the luminance value is The image processing apparatus according to claim 2, wherein an area including pixels larger than a second determination value is estimated as the luminance change area.
前記一の画像は、前記撮像手段の露光時間を前記被写体合焦画像よりも短くして当該撮像手段により撮像された短時間露光画像を含み、
前記推定手段は、更に、
前記被写体合焦画像及び前記短時間露光画像の各々の輝度情報に基づいて、前記被写体合焦画像内で輪郭部分の輝度値が急峻に変化した輝度変化領域を前記輪郭拡大領域として推定することを特徴とする請求項1に記載の画像処理装置。
The one image includes a short-time exposure image captured by the imaging unit with an exposure time of the imaging unit shorter than that of the subject focused image,
The estimating means further includes:
Estimating, as the enlarged contour region, a luminance change region in which a luminance value of a contour portion has sharply changed in the subject focused image based on luminance information of each of the subject focused image and the short-time exposure image. The image processing apparatus according to claim 1, wherein:
前記輝度変化領域は、前記撮像手段の撮像素子に入射する光の輝度レベルが検出可能範囲の上限よりも大きい高輝度の物に対応する領域であることを特徴とする請求項2〜5の何れか一項に記載の画像処理装置。   6. The brightness change area is an area corresponding to a high brightness object in which a brightness level of light incident on an image sensor of the imaging means is larger than an upper limit of a detectable range. An image processing apparatus according to claim 1. 前記被写体合焦画像内のエッジを検出する検出手段を更に備え、
前記特定手段は、
前記検出手段により検出されたエッジのうち、前記推定手段により推定された前記輪郭拡大領域に対応するエッジの評価値を低下させて前記被写体領域を特定することを特徴とする請求項1〜6の何れか一項に記載の画像処理装置。
Detecting means for detecting an edge in the subject focused image;
The specifying means is:
7. The subject area is specified by reducing an evaluation value of an edge corresponding to the contour enlargement area estimated by the estimation means among edges detected by the detection means. The image processing apparatus according to any one of the above.
前記被写体合焦画像に対してぼかし処理を施して、当該被写体合焦画像内の前記被写体領域以外の背景領域をぼかしたぼかし画像を生成する画像生成手段を更に備えることを特徴とする請求項1〜7の何れか一項に記載の画像処理装置。   2. The image processing apparatus according to claim 1, further comprising: an image generation unit configured to perform a blurring process on the subject focused image to generate a blurred image in which a background region other than the subject region in the subject focused image is blurred. The image processing device according to any one of? 画像処理装置を用いた画像処理方法であって、
背景内の所定の被写体にピントを合わせて撮像装置により撮像された被写体合焦画像を取得する処理と、
前記撮像装置により前記被写体合焦画像の撮像条件とは異なる所定の撮像条件で撮像され、前記被写体合焦画像と略等しい構図を有する一の画像を取得する処理と、
前記被写体合焦画像及び前記一の画像の各々の画像情報に基づいて、前記被写体合焦画像内で、被写界深度外に存する物に対応し、輪郭部分が前記一の画像における当該物に対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域を推定する処理と、
前記輪郭拡大領域の推定結果を基準として、前記被写体合焦画像内で前記所定の被写体が含まれる被写体領域を特定する処理と、
を含むことを特徴とする画像処理方法。
An image processing method using an image processing apparatus,
Processing to obtain a subject in-focus image captured by the imaging device while focusing on a predetermined subject in the background;
Processing for obtaining one image having a composition that is imaged by the imaging device under a predetermined imaging condition different from the imaging condition of the subject focused image and having substantially the same composition as the subject focused image;
Based on the image information of each of the subject in-focus image and the one image, the object in the subject in-focus image corresponds to an object existing outside the depth of field, and the contour portion corresponds to the object in the one image. A process for estimating a contour enlargement region that is enlarged from the contour portion of the corresponding region;
A process of specifying a subject area that includes the predetermined subject in the subject focused image with reference to the estimation result of the contour enlargement region;
An image processing method comprising:
画像処理装置のコンピュータを、
背景内の所定の被写体にピントを合わせて撮像装置により撮像された被写体合焦画像を取得する第1取得手段、
前記撮像装置により前記被写体合焦画像の撮像条件とは異なる所定の撮像条件で撮像され、前記被写体合焦画像と略等しい構図を有する一の画像を取得する第2取得手段、
前記被写体合焦画像及び前記一の画像の各々の画像情報に基づいて、前記被写体合焦画像内で、被写界深度外に存する物に対応し、輪郭部分が前記一の画像における当該物に対応する領域の輪郭部分よりも拡大されてなる輪郭拡大領域を推定する推定手段、
この推定手段による前記輪郭拡大領域の推定結果を基準として、前記被写体合焦画像内で前記所定の被写体が含まれる被写体領域を特定する特定手段、
として機能させることを特徴とするプログラム。
The computer of the image processing device
First acquisition means for acquiring a focused subject image captured by the imaging apparatus while focusing on a predetermined subject in the background;
A second acquisition unit configured to acquire an image captured by the imaging apparatus under a predetermined imaging condition different from an imaging condition of the subject focused image and having a composition substantially equal to the subject focused image;
Based on the image information of each of the subject in-focus image and the one image, the object in the subject in-focus image corresponds to an object existing outside the depth of field, and the contour portion corresponds to the object in the one image. An estimation means for estimating a contour expansion region that is enlarged from the contour portion of the corresponding region;
Specifying means for specifying a subject area including the predetermined subject in the subject focused image with reference to the estimation result of the contour enlargement region by the estimating means;
A program characterized by functioning as
JP2011194554A 2011-09-07 2011-09-07 Image processing apparatus, image processing method, and program Active JP5673454B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011194554A JP5673454B2 (en) 2011-09-07 2011-09-07 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011194554A JP5673454B2 (en) 2011-09-07 2011-09-07 Image processing apparatus, image processing method, and program

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2014265471A Division JP6003974B2 (en) 2014-12-26 2014-12-26 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2013058823A JP2013058823A (en) 2013-03-28
JP5673454B2 true JP5673454B2 (en) 2015-02-18

Family

ID=48134340

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011194554A Active JP5673454B2 (en) 2011-09-07 2011-09-07 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP5673454B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6157238B2 (en) * 2013-06-25 2017-07-05 オリンパス株式会社 Image processing apparatus, image processing method, and image processing program
JP6314281B1 (en) * 2017-10-26 2018-04-18 アキュートロジック株式会社 Image processing method and foreground region acquisition method
CN114286004A (en) * 2021-12-28 2022-04-05 维沃移动通信有限公司 Focusing method, shooting device, electronic equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002298137A (en) * 2001-03-30 2002-10-11 Minolta Co Ltd Image processing method, image processor, recording medium and program
JP2006166226A (en) * 2004-12-09 2006-06-22 Seiko Epson Corp Digital camera, image processing method and program, and image processing system
JP2010252293A (en) * 2009-03-23 2010-11-04 Sanyo Electric Co Ltd Image processing apparatus and imaging apparatus
KR101643613B1 (en) * 2010-02-01 2016-07-29 삼성전자주식회사 Digital image process apparatus, method for image processing and storage medium thereof

Also Published As

Publication number Publication date
JP2013058823A (en) 2013-03-28

Similar Documents

Publication Publication Date Title
JP7145208B2 (en) Method and Apparatus and Storage Medium for Dual Camera Based Imaging
KR102266649B1 (en) Image processing method and device
JP5434361B2 (en) Image processing apparatus and image processing method
JP2014029353A (en) Focus adjustment device, and focus adjustment method
JP2013029656A (en) Image pickup apparatus
JP4868046B2 (en) Image processing apparatus, image processing method, and program
JP2010054730A (en) Focusing position detecting device, imaging apparatus, and focusing position detecting method
KR20160044945A (en) Image photographing appratus
KR20150096224A (en) Solid image sensor, digital camera and method for preforming autofocus
JP2009218704A (en) Image processing apparatus and image processing method
JP5673454B2 (en) Image processing apparatus, image processing method, and program
JP5949559B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2007104249A (en) Image correcting apparatus, image correcting method, program and recording medium
JP2011066827A (en) Image processing apparatus, image processing method and program
JP5045538B2 (en) Imaging apparatus and program
JP5446847B2 (en) Image processing apparatus and method, and program
JP6003974B2 (en) Image processing apparatus, image processing method, and program
JP2012220890A (en) Focus adjustment device
JP4043499B2 (en) Image correction apparatus and image correction method
CN106464783B (en) Image pickup control apparatus, image pickup apparatus, and image pickup control method
JP2006293196A (en) Focus detector
JP5979040B2 (en) Imaging apparatus, imaging method, and program
JP5561392B2 (en) Imaging apparatus, focusing method, and program
JP5644180B2 (en) Imaging apparatus, imaging method, and program
JP6029464B2 (en) Imaging device, control method thereof, and control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140227

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141028

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: 20141202

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141215

R150 Certificate of patent or registration of utility model

Ref document number: 5673454

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150