JP2011077850A - Image processing apparatus, image processing method, and program - Google Patents
Image processing apparatus, image processing method, and program Download PDFInfo
- Publication number
- JP2011077850A JP2011077850A JP2009227623A JP2009227623A JP2011077850A JP 2011077850 A JP2011077850 A JP 2011077850A JP 2009227623 A JP2009227623 A JP 2009227623A JP 2009227623 A JP2009227623 A JP 2009227623A JP 2011077850 A JP2011077850 A JP 2011077850A
- Authority
- JP
- Japan
- Prior art keywords
- image
- subject
- background
- predetermined
- unit
- 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.)
- Granted
Links
Images
Abstract
Description
本発明は、複数の画像を合成する画像処理装置、画像処理方法及びプログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and a program for combining a plurality of images.
従来、被写体画像と背景画像やフレーム画像を合成することにより合成画像を生成する技術が知られている(例えば、特許文献1参照)。 Conventionally, a technique for generating a composite image by combining a subject image with a background image or a frame image is known (see, for example, Patent Document 1).
しかしながら、上記従来の技術は、背景画像の指定された位置に被写体画像を合成するのみなので、合成対象の背景画像や被写体画像の内容、合成位置、合成サイズによっては、効果的な合成画像にならないという問題があった。 However, since the above conventional technique only synthesizes the subject image at the designated position of the background image, depending on the background image to be synthesized, the content of the subject image, the synthesis position, and the synthesis size, it does not become an effective synthesized image. There was a problem.
そこで、本発明の課題は、背景画像と前景画像とを合成する際、効果的な合成画像を得ることができる画像処理装置、画像処理方法及びプログラムを提供することである。 Therefore, an object of the present invention is to provide an image processing apparatus, an image processing method, and a program capable of obtaining an effective composite image when combining a background image and a foreground image.
上記課題を解決するため、請求項1に記載の発明の画像処理装置は、
背景画像に前景画像を合成する合成手段を備えた画像処理装置において、前記背景画像における前記前景画像を合成すべき領域を特定する特定手段と、この特定手段により特定された前記前景画像を合成すべき領域に基づいて、当該前景画像及び前記背景画像の少なくとも一方に所定の処理を施す画像処理手段と、を備え、前記合成手段は、前記画像処理手段によって少なくとも一方に所定の処理が施された前記前景画像と前記背景画像とを合成することを特徴としている。
In order to solve the above problem, an image processing apparatus according to
In an image processing apparatus including a synthesis unit that synthesizes a foreground image with a background image, a specifying unit that specifies a region in the background image to be combined with the foreground image, and the foreground image specified by the specification unit are combined. Image processing means for performing a predetermined process on at least one of the foreground image and the background image based on a power region, and the synthesizing means is subjected to the predetermined process on at least one of the image processing means. The foreground image and the background image are synthesized.
請求項2に記載の発明は、請求項1に記載の画像処理装置において、
前記前景画像と所定の処理とを対応付けて記憶する記憶手段を更に備え、前記画像処理手段は、前記特定手段により特定された前記前景画像を合成すべき領域に基づいて、前記記憶手段に前記前景画像と対応付けて記憶されている前記所定の処理を、当該前景画像及び前記背景画像の少なくとも一方に施すことを特徴としている。
The invention according to
The image processing device further comprises storage means for storing the foreground image and a predetermined process in association with each other, and the image processing means stores the foreground image in the storage means based on an area to be combined with the foreground image specified by the specifying means. The predetermined processing stored in association with the foreground image is performed on at least one of the foreground image and the background image.
請求項3に記載の発明は、請求項1又は2に記載の画像処理装置において、
前記特定手段により前記前景画像を合成すべき領域として前記背景画像における所定領域が特定されたか否かを判定する判定手段を更に備え、前記画像処理手段は、前記判定手段により前記背景画像における所定領域が特定されたと判定された場合に、前記前景画像及び前記背景画像の少なくとも一方に所定の処理を施すことを特徴としている。
The invention according to claim 3 is the image processing apparatus according to
And a determination unit configured to determine whether or not a predetermined region in the background image is specified as a region to be combined with the foreground image by the specifying unit, and the image processing unit is configured to determine the predetermined region in the background image by the determination unit. When it is determined that the image is identified, a predetermined process is performed on at least one of the foreground image and the background image.
請求項4に記載の発明は、請求項3に記載の画像処理装置において、
前記画像処理手段は、前記判定手段により前記背景画像における所定領域が特定されたと判定された場合に、前記背景画像における前記所定領域の画像部分を前記前景画像に対して優先的に表示させるように、前記前景画像及び前記背景画像の少なくとも一方に所定の処理を施すことを特徴としている。
The invention according to
The image processing unit preferentially displays an image portion of the predetermined region in the background image with respect to the foreground image when the determination unit determines that the predetermined region in the background image is specified. A predetermined process is performed on at least one of the foreground image and the background image.
請求項5に記載の発明は、請求項3又は4に記載の画像処理装置において、
前記背景画像は、複数のフレーム画像からなる連写画像若しくは動画像であり、前記判定手段は、前記連写画像若しくは動画像を構成する各フレーム画像毎に、当該フレーム画像における所定領域が前記特定手段により特定されたか否かを判定し、前記画像処理手段は、前記複数のフレーム画像のうち、前記判定手段により所定領域が特定されたと判定されたフレーム画像及び前記前景画像の少なくとも一方に所定の処理を施すことを特徴としている。
The invention according to
The background image is a continuous shot image or a moving image composed of a plurality of frame images, and the determining means determines the predetermined area in the frame image for each frame image constituting the continuous shot image or the moving image. The image processing means determines whether or not a predetermined image of at least one of the frame image and the foreground image determined by the determining means to be specified from the plurality of frame images. It is characterized by processing.
請求項6に記載の発明は、請求項3〜5の何れか一項に記載の画像処理装置において、
前記所定領域は、前記背景画像から検出された顔画像領域であることを特徴としている。
The invention according to claim 6 is the image processing apparatus according to any one of claims 3 to 5,
The predetermined area is a face image area detected from the background image.
請求項7に記載の発明の画像処理装置は、
背景画像に前景画像を合成する合成手段を備えた画像処理装置において、前記前景画像と所定の処理とを対応付けて記憶する記憶手段と、この記憶手段に前記前景画像と対応付けて記憶されている前記所定の処理を、当該前景画像及び前記背景画像の少なくとも一方に施す画像処理手段と、を備え、前記合成手段は、前記画像処理手段によって少なくとも一方に所定の処理が施された前記前景画像と前記背景画像とを合成することを特徴としている。
An image processing apparatus according to a seventh aspect of the present invention provides:
In an image processing apparatus including a synthesis unit that synthesizes a foreground image with a background image, a storage unit that stores the foreground image and a predetermined process in association with each other, and a storage unit that stores the foreground image in association with the foreground image. Image processing means for performing the predetermined processing on at least one of the foreground image and the background image, and the synthesizing means has the foreground image on which at least one of the predetermined processing has been performed by the image processing means. And the background image.
請求項8に記載の発明は、請求項7に記載の画像処理装置において、
前記背景画像における前記前景画像を合成すべき領域を特定する特定手段を更に備え、前記画像処理手段は、前記特定手段により前記前景画像を合成すべき領域として特定された前記背景画像における所定領域から所定の範囲内の前記背景画像に所定の処理を施すことを特徴としている。
The invention according to
The image processing means further includes a specifying unit that specifies a region in the background image to be combined with the foreground image, and the image processing unit is configured to select a predetermined region in the background image specified as the region to be combined with the foreground image. A predetermined process is performed on the background image within a predetermined range.
請求項9に記載の発明の画像処理方法は、
背景画像における前景画像を合成すべき領域を特定するステップと、上記ステップにて特定された前記前景画像を合成すべき領域に基づいて、当該前景画像及び前記背景画像の少なくとも一方に所定の処理を施すステップと、上記ステップにて少なくとも一方に所定の処理を施された前記前景画像と前記背景画像とを合成するステップとを含むことを特徴としている。
The image processing method of the invention according to
Based on the step of specifying the region in the background image where the foreground image is to be combined and the region where the foreground image specified in the above step is to be combined, predetermined processing is performed on at least one of the foreground image and the background image. And a step of synthesizing the foreground image and the background image that have been subjected to predetermined processing in at least one of the steps.
請求項10に記載の発明の画像処理方法は、
予め前景画像と所定の処理とを対応付けて記憶し、当該前景画像と対応付けて記憶されている前記所定の処理を、当該前景画像及び当該前景画像が合成される背景画像の少なくとも一方に施すステップと、上記ステップにて少なくとも一方に所定の処理を施された前記前景画像と前記背景画像とを合成するステップとを含むことを特徴としている。
An image processing method according to the invention of
A foreground image and a predetermined process are stored in association with each other in advance, and the predetermined process stored in association with the foreground image is applied to at least one of the foreground image and the background image with which the foreground image is synthesized. And a step of synthesizing the foreground image and the background image that have been subjected to predetermined processing in at least one of the steps.
請求項11に記載の発明のプログラムは、
画像処理装置のコンピュータを、背景画像における前景画像を合成すべき領域を特定する特定手段、この特定手段により特定された前記前景画像を合成すべき領域に基づいて、当該前景画像及び前記背景画像の少なくとも一方に所定の処理を施す画像処理手段、この画像処理手段によって少なくとも一方に所定の処理が施された前記前景画像と前記背景画像とを合成する合成手段として機能させることを特徴としている。
The program of the invention described in
The computer of the image processing apparatus is configured to specify a region for combining the foreground image in the background image, based on the region to be combined with the foreground image specified by the specifying unit. The image processing means for performing a predetermined process on at least one, and a combining means for combining the foreground image and the background image on which the predetermined process has been applied to at least one by the image processing means.
請求項12に記載の発明のプログラムは、
前景画像と所定の処理とを対応付けて記憶させる記憶部を有する画像処理装置のコンピュータを、前記記憶部に前景画像と対応付けて記憶されている前記所定の処理を、当該前景画像及び前記背景画像の少なくとも一方に施す画像処理手段、この画像処理手段によって少なくとも一方に所定の処理が施された前記前景画像及び前記背景画像を合成する合成手段として機能させることを特徴としている。
The program of the invention described in
A computer of an image processing apparatus having a storage unit that stores a foreground image and a predetermined process in association with each other. The predetermined process stored in the storage unit in association with a foreground image is stored in the foreground image and the background. The image processing means is applied to at least one of the images, and the image processing means functions as a synthesis means for synthesizing the foreground image and the background image on which at least one of the images has been subjected to predetermined processing.
本発明によれば、背景画像と前景画像とを合成する際、効果的な合成画像を得ることができる。 According to the present invention, an effective composite image can be obtained when a background image and a foreground image are combined.
以下に、本発明について、図面を用いて具体的な態様を説明する。ただし、発明の範囲は、図示例に限定されない。
図1は、本発明を適用した一実施形態の撮像装置100の概略構成を示すブロック図である。
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.
FIG. 1 is a block diagram illustrating a schematic configuration of an
本実施形態の撮像装置100は、背景画像B(図7(a)等参照)における被写体画像(前景画像)G(図7(a)等参照)を合成すべき合成領域を特定して、当該被写体画像Gを合成すべき合成領域に基づいて、当該被写体画像G及び背景画像Bのうち、少なくとも何れか一方に所定の画像処理を施して被写体合成画像Pを生成する。
具体的には、図1に示すように、撮像装置100は、レンズ部1と、電子撮像部2と、撮像制御部3と、画像データ生成部4と、画像メモリ5と、特徴量演算部6と、ブロックマッチング部7と、画像処理部8と、記録媒体9と、表示制御部10と、表示部11と、操作入力部12と、CPU13とを備えている。
また、撮像制御部3と、特徴量演算部6と、ブロックマッチング部7と、画像処理部8と、CPU13は、例えば、カスタムLSI1Aとして設計されている。
The
Specifically, as illustrated in FIG. 1, the
In addition, the imaging control unit 3, the feature amount calculation unit 6, the block matching unit 7, the
レンズ部1は、複数のレンズから構成され、ズームレンズやフォーカスレンズ等を備えている。
また、レンズ部1は、図示は省略するが、被写体の撮像の際に、ズームレンズを光軸方向に移動させるズーム駆動部、フォーカスレンズを光軸方向に移動させる合焦駆動部等を備えていても良い。
The
Although not shown, the
電子撮像部2は、例えば、CCD(Charge Coupled Device)やCMOS(Complementary Metal-oxide Semiconductor)等のイメージセンサから構成され、レンズ部1の各種レンズを通過した光学像を二次元の画像信号に変換する。
The
撮像制御部3は、図示は省略するが、タイミング発生器、ドライバなどを備えている。そして、撮像制御部3は、タイミング発生器、ドライバにより電子撮像部2を走査駆動して、所定周期毎に光学像を電子撮像部2により二次元の画像信号に変換させ、当該電子撮像部2の撮像領域から1画面分ずつ画像フレームを読み出して画像データ生成部4に出力させる。
また、撮像制御部3は、AF(自動合焦処理)、AE(自動露出処理)、AWB(自動ホワイトバランス)等の被写体を撮像する際の条件の調整制御を行う。
Although not shown, the imaging control unit 3 includes a timing generator, a driver, and the like. Then, the imaging control unit 3 scans and drives the
In addition, the imaging control unit 3 performs adjustment control of conditions when imaging a subject such as AF (automatic focusing process), AE (automatic exposure process), and AWB (automatic white balance).
このように構成されたレンズ部1、電子撮像部2及び撮像制御部3は、画像合成処理に係る背景画像B(図7(a)参照)や被写体存在画像(図示略)を撮像する。
The
画像データ生成部4は、電子撮像部2から転送された画像フレームのアナログ値の信号に対してRGBの各色成分毎に適宜ゲイン調整した後に、サンプルホールド回路(図示略)でサンプルホールドしてA/D変換器(図示略)でデジタルデータに変換し、カラープロセス回路(図示略)で画素補間処理及びγ補正処理を含むカラープロセス処理を行った後、デジタル値の輝度信号Y及び色差信号Cb,Cr(YUVデータ)を生成する。
カラープロセス回路から出力される輝度信号Y及び色差信号Cb,Crは、図示しないDMAコントローラを介して、バッファメモリとして使用される画像メモリ5にDMA転送される。
The image
The luminance signal Y and the color difference signals Cb and Cr output from the color process circuit are DMA-transferred to an
画像メモリ5は、例えば、DRAM等により構成され、特徴量演算部6と、ブロックマッチング部7と、画像処理部8と、CPU13等によって処理されるデータ等を一時記憶する。
The
撮像された被写体存在画像から被写体切り抜き画像を生成する場合、特徴量演算部6は、比較すべき被写体非存在画像を基準として、当該被写体非存在画像から特徴点を抽出する特徴抽出処理を行う。具体的には、特徴量演算部6は、被写体非存在画像のYUVデータに基づいて、所定数(或いは、所定数以上)の特徴の高いブロック領域(特徴点)を選択して、当該ブロックの内容をテンプレート(例えば、16×16画素の正方形)として抽出する。
ここで、特徴抽出処理とは、多数の候補ブロックから追跡に都合の良い特徴性の高いものを選択する処理である。
When generating a subject cut-out image from the captured subject existing image, the feature amount calculation unit 6 performs feature extraction processing for extracting feature points from the subject non-existing image with reference to the subject non-existing image to be compared. Specifically, the feature amount calculation unit 6 selects a predetermined number (or a predetermined number or more) of highly featured block regions (feature points) based on the YUV data of the subject nonexistent image, and The contents are extracted as a template (for example, a square of 16 × 16 pixels).
Here, the feature extraction process is a process of selecting a feature having a high characteristic convenient for tracking from a large number of candidate blocks.
ブロックマッチング部7は、被写体非存在画像と被写体存在画像の位置合わせのためのブロックマッチング処理を行う。具体的には、ブロックマッチング部7は、特徴抽出処理にて抽出されたテンプレートが被写体存在画像内のどこに対応するか、つまり、被写体存在画像内にてテンプレートの画素値が最適にマッチする位置(対応領域)を探索する。そして、画素値の相違度の評価値(例えば、差分二乗和(SSD)や差分絶対値和(SAD)等)が最も良かった被写体非存在画像と被写体存在画像間の最適なオフセットを当該テンプレートの動きベクトルとして算出する。 The block matching unit 7 performs block matching processing for aligning the subject non-existing image and the subject existing image. Specifically, the block matching unit 7 corresponds to where in the subject existing image the template extracted by the feature extraction processing corresponds, that is, the position where the pixel value of the template optimally matches in the subject existing image ( Search the corresponding area. Then, an optimal offset between the subject non-existing image and the subject existing image having the best evaluation value (for example, the sum of squared differences (SSD), the sum of absolute differences (SAD), etc.) Calculate as a motion vector.
画像処理部8は、切抜画像生成部8aと、顔検出部8bと、合成領域特定部8cと、領域判定部8dと、加工処理部8eと、画像合成部8fとを具備している。
The
切抜画像生成部8aは、被写体切り抜き画像の画像データを生成する。具体的には、切抜画像生成部8aは、位置合わせ部と、被写体画像抽出部と、位置情報生成部等(何れも図示略)を備えている。
位置合わせ部は、被写体非存在画像から抽出した特徴点に基づいて、被写体非存在画像に対する被写体存在画像の各画素の座標変換式(射影変換行列)を算出し、当該座標変換式に従って被写体存在画像を座標変換して被写体非存在画像と位置合わせを行う。
被写体画像抽出部は、位置合わせ部により位置合わせされた被写体存在画像と被写体非存在画像との間で対応する各画素の差分情報を生成し、当該差分情報を基準として被写体存在画像から被写体が含まれる被写体画像(前景画像)Gを抽出する。
位置情報生成部は、被写体存在画像から抽出された被写体画像Gの位置を特定して、被写体存在画像における被写体画像Gの位置を示す位置情報(例えば、アルファマップ)を生成する。ここで、アルファマップとは、被写体存在画像の各画素について、被写体画像Gを所定の背景に対してアルファブレンディングする際の重みをアルファ値(0≦α≦1)として表したものである。
切抜画像生成部8aは、位置情報生成部により生成されたアルファマップに基づいて、被写体存在画像の各画素のうち、アルファ値が1の画素を所定の単一色画像(図示略)に対して透過させずに、且つ、アルファ値が0の画素を透過させるように、被写体画像Gを所定の単一色画像と合成して被写体切り抜き画像の画像データを生成する。
The cutout
The alignment unit calculates a coordinate conversion formula (projection conversion matrix) of each pixel of the subject existing image with respect to the subject nonexistent image based on the feature points extracted from the subject nonexistent image, and the subject existing image according to the coordinate conversion formula Is coordinate-converted with the subject non-existing image.
The subject image extraction unit generates difference information of each corresponding pixel between the subject presence image and the subject non-existence image aligned by the alignment unit, and includes the subject from the subject presence image based on the difference information. Subject image (foreground image) G is extracted.
The position information generating unit specifies the position of the subject image G extracted from the subject existing image, and generates position information (for example, an alpha map) indicating the position of the subject image G in the subject existing image. Here, the alpha map represents a weight when alpha blending the subject image G with respect to a predetermined background for each pixel of the subject existing image as an alpha value (0 ≦ α ≦ 1).
Based on the alpha map generated by the position information generation unit, the cut-out
顔検出部8bは、背景画像Bから所定の顔検出方法を用いて顔を検出する。具体的には、顔検出部8bは、合成画像生成処理(後述)にて、ユーザによる操作入力部12の選択決定ボタン12bの所定操作に基づいて指定された背景画像B内から顔画像領域Aを検出し、その検出した各領域内から目、鼻、口等に相当する特徴部(顔パーツ)を検出する。この顔検出処理は、公知の技術であるので、ここでは詳細な説明を省略する。
The face detection unit 8b detects a face from the background image B using a predetermined face detection method. Specifically, the face detection unit 8b performs a face image region A from the background image B designated based on a predetermined operation of the
合成領域特定部8cは、背景画像Bにおける被写体切り抜き画像の被写体画像Gを合成すべき合成領域を特定する。具体的には、合成画像生成処理にて、ユーザによる操作入力部12の選択決定ボタン12bの所定操作に基づいて背景画像B上の被写体画像Gの合成位置が指定されると、合成領域特定部8cは、当該合成位置にて背景画像B上の被写体画像Gが重畳された領域を背景画像Bにおける被写体切り抜き画像の被写体画像Gを合成すべき合成領域として特定する。
ここで、合成領域特定部8cは、背景画像Bにおける被写体画像(前景画像)Gを合成すべき領域を特定する特定手段を構成している。
The synthesis area specifying unit 8c specifies a synthesis area in which the subject image G of the subject cutout image in the background image B is to be synthesized. Specifically, in the composite image generation process, when the composite position of the subject image G on the background image B is specified based on a predetermined operation of the
Here, the synthesis area specifying unit 8c constitutes specifying means for specifying an area in which the subject image (foreground image) G in the background image B is to be synthesized.
領域判定部8dは、背景画像Bにおける被写体画像Gの合成領域と当該背景画像Bにおける所定領域とが重なるか否かを判定する。具体的には、領域判定部8dは、合成領域特定部8cにより特定された被写体画像Gの合成領域と顔検出部8bにより背景画像Bから検出された顔画像領域(所定領域)Aとが重なるか否かを判定する。
ここで、領域判定部8dは、合成領域特定部8cにより被写体画像(前景画像)Gを合成すべき合成領域として背景画像Bにおける所定領域が特定されたか否かを判定する判定手段を構成している。
The
Here, the
加工処理部8eは、背景画像Bにおける被写体画像Gの合成領域に基づいて、背景画像Bに所定の画像処理を施す。具体的には、加工処理部8eは、被写体画像Gの合成領域にて、処理内容テーブルT(図2参照)に被写体画像Gと対応付けて登録されている所定の画像処理を背景画像Bに施す。
処理内容テーブルTは、記憶手段として、被写体画像Gと所定の画像処理とを対応付けて記憶する。具体的には、図2に示すように、処理内容テーブルTは、背景画像Bと合成される被写体画像(前景画像)Gに係る被写体画像名(例えば、「感嘆符」、「ライト」、「水滴」、「ボール」等)と、被写体画像Gの画像データと、背景画像Bに対する画像処理の処理内容とを対応付けて記憶している。例えば、被写体画像Gとしての「感嘆符」は、画像処理の処理内容として「顔画像領域をびっくりした表情にする」と対応付けられており、加工処理部8eは、背景画像Bの顔画像領域Aの目の白目部分を顔の外側方向に拡大するとともに、黒目部分を顔の内側方向に縮小するような画像処理を施す。また、被写体画像Gとしての「ライト」は、画像処理の処理内容として「合成領域を中心に明るくする」と対応付けられており、加工処理部8eは、背景画像Bの合成領域以外の部分の明るさやコントラストや色調等を調整して合成領域の近傍ほど明るくするような画像処理を施す。また、被写体画像Gとしての「水滴」は、画像処理の処理内容として「合成位置を中心に波紋が広がるような処理」と対応付けられており、加工処理部8eは、背景画像Bの合成領域以外の領域に所定径の環状部を想定して、当該環状部と重なる部分が波立つような画像処理を施す。また、被写体画像Gとしての「ボール」は、画像処理の処理内容として「合成位置を中心に凹ませるような処理」と対応付けられており、加工処理部8eは、背景画像Bの合成領域の近傍ほど歪むような画像処理を施す。
なお、上記した処理内容テーブルTは、一例であって被写体画像Gの種類や処理内容等はこれらに限られるものではなく、これらの内容は予め処理内容テーブルTに登録されていても良いし、後述する被写体切り抜き処理によって登録できるようにしても良い。
また、上記した処理内容テーブルTは、画像メモリ5に予め記憶されていてもよいし、記録媒体9の所定の記憶領域や画像ファイルごとの所定の記憶領域に記憶するようにしてもよい。
The
The processing content table T stores the subject image G and predetermined image processing in association with each other as storage means. Specifically, as illustrated in FIG. 2, the processing content table T includes a subject image name (for example, “exclamation mark”, “light”, “ Water droplets ”,“ balls ”, etc.), image data of the subject image G, and processing contents of image processing for the background image B are stored in association with each other. For example, “exclamation mark” as the subject image G is associated with “the face image area is made a surprised expression” as the processing content of the image processing, and the
Note that the processing content table T described above is an example, and the type and processing content of the subject image G are not limited to these. These content may be registered in the processing content table T in advance. Registration may be performed by subject clipping processing described later.
Further, the processing content table T described above may be stored in the
また、加工処理部8eは、領域判定部8dにより被写体画像Gの合成領域として背景画像Bにおける所定領域が特定された場合、即ち、被写体画像Gの合成領域と顔検出部8bにより背景画像Bから検出された顔画像領域Aとが重なったと判定された場合に、背景画像Bに所定の画像処理を施す。具体的には、加工処理部8eは、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なったと判定されると、被写体画像Gの合成領域にて、処理内容テーブルTに当該被写体画像Gと対応付けて登録されている所定の画像処理を背景画像Bに施す。
Further, when the predetermined region in the background image B is specified as the composite region of the subject image G by the
なお、加工処理部8eは、上記のような背景画像Bに対する画像処理とともに、或いは、背景画像Bに対する画像処理に替えて、被写体画像Gに対して所定の画像処理を施すようにしても良い。
ここで、加工処理部8eは、合成領域特定部8cにより特定された背景画像Bにおける被写体画像(前景画像)Gを合成すべき合成領域に基づいて、当該被写体画像G及び背景画像Bのうち、少なくとも何れか一方に所定の処理を施す画像処理手段を構成している。
The
Here, the
また、画像処理部8は、被写体切り抜き画像と背景画像Bとを合成する画像合成部(合成手段)8fを具備している。
画像合成部8fは、加工処理部8eにより所定の画像処理が施された背景画像Bと被写体切り抜き画像とを合成して被写体合成画像Pを生成する。具体的には、画像合成部8fは、画像処理後の背景画像Bの各画素のうち、アルファ値が0の画素は透過させ、アルファ値が1の画素は被写体切り抜き画像の対応する画素の画素値で上書きし、さらに、背景画像Bの各画素のうち、アルファ値が0<α<1の画素は1の補数(1−α)を用いて被写体領域を切り抜いた画像(背景画像×(1−α))を生成した後、アルファマップにおける1の補数(1−α)を用いて被写体切り抜き画像を生成した際に単一背景色とブレンドした値を計算し、当該値を被写体切り抜き画像から減算し、それを被写体領域を切り抜いた画像(背景画像×(1−α))と合成する。
The
The
記録媒体9は、例えば、不揮発性メモリ(フラッシュメモリ)等により構成され、画像処理部8の圧縮部(図示略)により符号化された背景画像Bや被写体切り抜き画像の画像データを記憶する。
また、被写体切り抜き画像の画像データは、画像処理部8の位置情報生成部により生成されたアルファマップと対応付けられて、当該被写体切り抜き画像の画像データの拡張子を「.jpe」とした複数の画像ファイルからなるグループが保存されている。
The
In addition, the image data of the subject clipped image is associated with the alpha map generated by the position information generation unit of the
表示制御部10は、画像メモリ5に一時的に記憶されている表示用の画像データを読み出して表示部11に表示させる制御を行う。
具体的には、表示制御部10は、VRAM、VRAMコントローラ、デジタルビデオエンコーダなどを備えている。そして、デジタルビデオエンコーダは、CPU13の制御下にて画像メモリ5から読み出されてVRAM(図示略)に記憶されている輝度信号Y及び色差信号Cb,Crを、VRAMコントローラを介してVRAMから定期的に読み出して、これらのデータを元にビデオ信号を発生して表示部11に出力する。
The
Specifically, the
表示部11は、例えば、液晶表示装置であり、表示制御部10からのビデオ信号に基づいて画像や文字などを表示画面に表示する。具体的には、表示部11は、撮像モードにて、レンズ部1、電子撮像部2及び撮像制御部3による被写体の撮像により生成された複数の画像フレームに基づいてライブビュー画像を表示したり、本撮像画像として撮像されたレックビュー画像を表示する。
The
操作入力部12は、当該撮像装置100の所定操作を行うためのものである。具体的には、操作入力部12は、被写体の撮影指示に係るシャッタボタン12a、撮像モードや機能等の選択指示や被写体切り抜き画像の被写体画像Gの合成位置の設定指示に係る選択決定ボタン12b、ズーム量の調整指示に係るズームボタン(図示略)等を備え、これらのボタンの操作に応じて所定の操作信号をCPU13に出力する。
The
CPU13は、撮像装置100の各部を制御するものである。具体的には、CPU13は、撮像装置100用の各種処理プログラム(図示略)に従って各種の制御動作を行うものである。
The
次に、撮像装置100による背景画像生成処理について、図3を参照して説明する。
図3は、背景画像生成処理に係る動作の一例を示すフローチャートである。
Next, background image generation processing by the
FIG. 3 is a flowchart illustrating an example of an operation related to the background image generation process.
背景画像生成処理は、通常の静止画像の撮像処理であり、ユーザによる操作入力部12の選択決定ボタン12bの所定操作に基づいて、メニュー画面に表示された複数の撮像モードの中から静止画撮像モードが選択指示された場合に実行される処理である。
図3に示すように、先ず、表示制御部10は、レンズ部1、電子撮像部2及び撮像制御部3による背景画像Bの撮像により生成された複数の画像フレームに基づいてライブビュー画像を表示部11の表示画面に表示させる(ステップS1)。
The background image generation process is a normal still image capturing process, and based on a predetermined operation of the
As shown in FIG. 3, first, the
次に、CPU13は、ユーザによる操作入力部12のシャッタボタン12aの所定操作に基づいて撮像指示が入力されたか否かを判定する(ステップS2)。ここで、撮像指示が入力されたと判定されると(ステップS2;YES)、撮像制御部3は、フォーカスレンズの合焦位置や露出条件(シャッター速度、絞り、増幅率等)やホワイトバランス等の条件を調整させて、背景画像B(図7(a)等参照)の光学像を所定の条件で電子撮像部2により撮像させる(ステップS3)。
Next, the
続けて、画像データ生成部4は、電子撮像部2から転送された背景画像Bの画像フレームのYUVデータを生成した後、当該背景画像BのYUVデータを記録媒体9の所定の記憶領域に記憶させる(ステップS4)。
これにより、背景画像生成処理を終了する。
Subsequently, the image
Thereby, the background image generation process is terminated.
次に、撮像装置100による被写体切り抜き処理について、図4を参照して説明する。
図4は、被写体切り抜き処理に係る動作の一例を示すフローチャートである。
Next, the subject clipping process performed by the
FIG. 4 is a flowchart illustrating an example of an operation related to the subject clipping process.
被写体切り抜き処理は、ユーザによる操作入力部12の選択決定ボタン12bの所定操作に基づいて、メニュー画面に表示された複数の撮像モードの中から被写体切り抜きモードが選択指示された場合に実行される処理である。
図4に示すように、先ず、表示制御部10は、レンズ部1、電子撮像部2及び撮像制御部3による被写体の撮像により生成された複数の画像フレームに基づいてライブビュー画像を表示部11の表示画面に表示させるとともに、当該ライブビュー画像に重畳させて、被写体存在画像の撮像指示メッセージを表示部11の表示画面に表示させる(ステップS11)。
The subject clipping process is executed when a subject clipping mode is selected from a plurality of imaging modes displayed on the menu screen based on a predetermined operation of the
As shown in FIG. 4, first, the
次に、CPU13は、ユーザにより操作入力部12のシャッタボタン12aの所定操作に基づいて撮像指示が入力されたか否かを判定する(ステップS12)。ここで、撮像指示が入力されたと判定されると(ステップS12;YES)、撮像制御部3は、フォーカスレンズの合焦位置や露出条件(シャッター速度、絞り、増幅率等)やホワイトバランス等の条件を調整させて、被写体存在画像(図示略)の光学像を所定の条件で電子撮像部2により撮像させる(ステップS13)。
Next, the
続けて、画像データ生成部4は、電子撮像部2から転送された被写体存在画像の画像フレームのYUVデータを生成した後、当該被写体存在画像のYUVデータを画像メモリ5に一時記憶させる。
また、撮像制御部3は、当該被写体存在画像の撮像の際の合焦位置や露出条件やホワイトバランス等の条件を固定した状態を維持する。
Subsequently, the image
Further, the imaging control unit 3 maintains a state in which conditions such as a focus position, an exposure condition, and a white balance at the time of imaging the subject existing image are fixed.
そして、表示制御部10は、レンズ部1、電子撮像部2及び撮像制御部3による被写体の撮像により生成された複数の画像フレームに基づいてライブビュー画像を表示部11の表示画面に表示させるとともに、当該ライブビュー画像に重畳させて、被写体存在画像の半透過の表示態様の画像と被写体非存在画像の撮像指示メッセージを表示部11の表示画面に表示させる(ステップS14)。
この後、CPU13は、ユーザにより操作入力部12のシャッタボタン12aの所定操作に基づいて撮像指示が入力されたか否かを判定する(ステップS15)。そして、ユーザは、被写体を画角外に移動させるか、或いは被写体が移動するのを待った後、ユーザにより被写体非存在画像が被写体存在画像の半透過の画像と重なるようにカメラ位置が調整されて、操作入力部12のシャッタボタン12aの所定操作に基づいて撮像指示が入力されたと判定されると(ステップS15;YES)、撮像制御部3は、被写体非存在画像の光学像を被写体存在画像の撮像後に固定された条件で電子撮像部2により撮像させる(ステップS16)。
その後、画像データ生成部4は、電子撮像部2から転送された被写体非存在画像の画像フレームに基づいて、被写体非存在画像のYUVデータを生成した後、当該YUVデータを画像メモリ5に一時記憶させる。
The
Thereafter, the
Thereafter, the image
次に、CPU13は、特徴量演算部6、ブロックマッチング部7及び画像処理部8の切抜画像生成部8aに、画像メモリ5に一時記憶されている被写体非存在画像のYUVデータを基準として、被写体存在画像のYUVデータを射影変換させるための射影変換行列を所定の画像変換モデル(例えば、相似変換モデル、或いは合同変換モデル)で算出させる(ステップS17)。
具体的には、特徴量演算部6は、被写体非存在画像のYUVデータに基づいて、所定数(或いは、所定数以上)の特徴の高いブロック領域(特徴点)を選択して、当該ブロックの内容をテンプレートとして抽出する。そして、ブロックマッチング部7は、特徴抽出処理にて抽出されたテンプレートの画素値が最適にマッチする位置を被写体存在画像内にて探索して、画素値の相違度の評価値が最も良かった被写体非存在画像と被写体存在画像間の最適なオフセットを当該テンプレートの動きベクトルとして算出する。そして、切抜画像生成部8aの位置合わせ部は、ブロックマッチング部7により算出された複数のテンプレートの動きベクトルに基づいて全体の動きベクトルを統計的に算出し、当該動きベクトルに係る特徴点対応を用いて被写体存在画像の射影変換行列を算出する。
Next, the
Specifically, the feature amount calculation unit 6 selects a predetermined number (or a predetermined number or more) of highly featured block regions (feature points) based on the YUV data of the subject nonexistent image, and Extract the contents as a template. Then, the block matching unit 7 searches the subject existing image for a position where the pixel value of the template extracted in the feature extraction process is optimally matched, and the subject with the highest evaluation value of the pixel value difference is obtained. An optimum offset between the non-existing image and the subject existing image is calculated as a motion vector of the template. Then, the alignment unit of the cut-out
次に、切抜画像生成部8aの位置合わせ部は、算出された射影変換行例に基づいて被写体存在画像を射影変換することで、被写体存在画像のYUVデータと被写体非存在画像のYUVデータとを位置合わせする処理を行わせる(ステップS18)。
Next, the alignment unit of the cutout
そして、切抜画像生成部8aの被写体領域抽出部は、被写体存在画像から被写体が含まれる被写体領域(被写体画像)を抽出する処理を行う(ステップS19)。
具体的には、被写体領域抽出部は、被写体存在画像のYUVデータと被写体非存在画像のYUVデータの各々に対してローパスフィルタをかけて各画像の高周波成分を除去する。その後、被写体領域抽出部は、ローパスフィルタをかけた被写体存在画像と被写体非存在画像との間で対応する各画素について相違度を算出して相違度マップを生成する。続けて、被写体領域抽出部は、各画素に係る相違度マップを所定の閾値で2値化した後、相違度マップから細かいノイズや手ぶれにより相違が生じた領域を除去するために収縮処理を行う。その後、被写体領域抽出部は、ラベリング処理を行って、所定値以下の領域や最大領域以外の領域を除去した後、一番大きな島のパターンを被写体領域として特定し、収縮分を修正するための膨張処理を行う。
Then, the subject area extraction unit of the cutout
Specifically, the subject region extraction unit applies a low-pass filter to each of the YUV data of the subject existing image and the YUV data of the subject nonexistent image to remove the high frequency component of each image. Thereafter, the subject area extraction unit calculates a difference for each pixel corresponding to the subject existing image and the subject non-existing image subjected to the low-pass filter to generate a difference map. Subsequently, the subject region extraction unit binarizes the dissimilarity map relating to each pixel with a predetermined threshold, and then performs a contraction process to remove a region in which the dissimilarity is caused by fine noise or camera shake from the dissimilarity map. . After that, the subject region extraction unit performs a labeling process, removes a region below a predetermined value or a region other than the maximum region, identifies the largest island pattern as the subject region, and corrects the contraction Perform expansion treatment.
次に、切抜画像生成部8aの位置情報生成部は、抽出された被写体領域の被写体存在画像内での位置を示すアルファマップを生成する(ステップS20)。
Next, the position information generation unit of the cutout
その後、切抜画像生成部8aは、被写体の画像を所定の単一色画像と合成した被写体切り抜き画像(図示略)の画像データを生成する処理を行わせる(ステップS21)。
具体的には、切抜画像生成部8aは、被写体存在画像、単一色画像及びアルファマップを読み出して画像メモリ5に展開した後、被写体存在画像の全ての画素について、アルファ値が0の画素については(α=0)、透過させ、アルファ値が0<α<1の画素については(0<α<1)、所定の単一色とブレンディングを行い、アルファ値が1の画素については(α=1)、何もせずに所定の単一色に対して透過させないようにする。
Thereafter, the cut-out
Specifically, the cut-out
その後、CPU13は、被写体切り抜き画像のYUVデータを、切抜画像生成部8aの位置情報生成部により生成されたアルファマップがExif情報として付帯されたExif形式の画像ファイルとし、例えば、当該被写体切り抜き画像の画像データの拡張子を「.jpe」とする一ファイルで記録媒体9の所定の記憶領域に記憶させる(ステップS22)。
なお、画像ファイルを記録媒体9の所定の記憶領域に記憶する際に、所定の処理内容を対応付けて記憶する。例えば、「明度を上げる」、「輝度を低くする」、「ボカシ処理を加える」などの処理内容が画像メモリ5に記憶されていて、この中から任意の画像処理内容を選択するようにし、選択した処理内容を当該画像ファイルと対応付けて記録媒体9の所定の記憶領域に記憶させる。
これにより、被写体切り抜き処理を終了する。
After that, the
When the image file is stored in a predetermined storage area of the
Thereby, the subject clipping process is completed.
次に、合成画像生成処理について図5〜図7を参照して詳細に説明する。
図5は、合成画像生成処理に係る動作の一例を示すフローチャートである。また、図6は、合成画像生成処理における画像合成処理に係る動作の一例を示すフローチャートである。
Next, the composite image generation process will be described in detail with reference to FIGS.
FIG. 5 is a flowchart illustrating an example of an operation related to the composite image generation process. FIG. 6 is a flowchart illustrating an example of an operation related to the image composition processing in the composite image generation processing.
合成画像生成処理は、ユーザによる操作入力部12の選択決定ボタン12bの所定操作に基づいて、メニュー画面に表示された複数の撮像モードの中から画像合成モードが選択指示された場合に実行される処理である。
図5に示すように、ユーザによる操作入力部12の所定操作に基づいて、記録媒体9に記録されている複数の画像の中で合成画像の背景となる所望の背景画像B(図7(a)等参照)が選択して指定されると(ステップS31)、画像処理部8は、指定された背景画像Bの画像データを読み出して画像メモリ5に展開して、画像処理部8の顔検出部8bが、当該画像データに対する顔検出処理を行って背景画像B内から顔画像領域Aを検出する(ステップS32)。
The composite image generation processing is executed when an image combination mode is selected from a plurality of imaging modes displayed on the menu screen based on a predetermined operation of the
As shown in FIG. 5, based on a predetermined operation of the
次に、ユーザによる操作入力部12の所定操作に基づいて、記録媒体9に記録されている複数の画像の中で所望の被写体切り抜き画像が選択して指定されると(ステップS33)、画像処理部8は、指定された被写体切り抜き画像の画像データを読み出して画像メモリ5に展開する。
Next, when a desired subject cut-out image is selected and designated from among a plurality of images recorded on the
続けて、ユーザによる操作入力部12の選択決定ボタン12bの所定操作に基づいて、背景画像Bにおける被写体切り抜き画像の被写体画像Gの合成位置が指定されると(ステップS34;図7(a)等参照)、画像処理部8の合成領域特定部8cは、背景画像B上の被写体画像Gが重畳された領域を背景画像Bにおける被写体切り抜き画像の被写体画像Gを合成すべき合成領域として特定する(ステップS35)。
Subsequently, when the synthesis position of the subject image G of the subject cut-out image in the background image B is designated based on a predetermined operation of the
続けて、画像処理部8の領域判定部8dは、顔検出部8bにより検出された顔画像領域Aと合成領域特定部8cにより特定された被写体画像Gの合成領域とが重なるか否かを判定する(ステップS36)。
ここで、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なる(図7(b)参照)と判定されると(ステップS36;YES)、画像処理部8の加工処理部8eは、処理内容テーブルTに当該被写体画像Gと対応付けて登録されている所定の画像処理内容を取得して(ステップS37)、取得した画像処理内容に従って背景画像Bに対する画像処理を行う(ステップS38)。
例えば、被写体画像「感嘆符」が選択指定されている場合に、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なると、加工処理部8eは、処理内容テーブルTから画像処理内容「顔画像領域をびっくりした表情にする」を取得して、顔画像領域Aの目の白目部分を顔の外側方向に拡大するとともに、黒目部分を顔の内側方向に縮小するような画像処理を施す。また例えば、被写体画像Gとして処理テーブルTの「ライト」が選択されている場合は、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なると、加工処理部8eは、処理内容テーブルTから画像処理内容「合成領域を中心に明るくする」を取得して、当該合成領域を中心に背景画像Bが明るくなるような画像処理を施す。
Subsequently, the
If it is determined that the face image area A of the background image B and the composite area of the subject image G overlap (see FIG. 7B) (step S36; YES), the
For example, when the subject image “exclamation mark” is selected and designated, if the face image area A of the background image B overlaps with the composite area of the subject image G, the
次に、画像処理部8は、ユーザによる操作入力部12の選択決定ボタン12bの所定操作に基づいて、背景画像Bにおける被写体切り抜き画像の被写体画像Gの合成位置が再指定されたか否かを判定する(ステップS39)。
ここで、被写体画像Gの合成位置が再指定されたと判定されると(ステップS39;YES)、画像処理部8は、処理をステップS35に移行して、それ以降の処理を実行する。
ステップS35以降の処理は、ステップS39にて、被写体画像Gの合成位置が再指定されていないと判定されるまで(ステップS39;NO)、繰り返し行われる。
そして、ステップS39にて、被写体画像Gの合成位置が再指定されていないと判定されると(ステップS39;NO)、画像処理部8の画像合成部8fは、背景画像Bと被写体切り抜き画像とを合成する画像合成処理を行う(ステップS40)。
また、ステップS36にて、被写体画像Gの合成領域と顔画像領域Aとが重なっていない(図7(a)、図7(c)等参照)と判定された場合にも(ステップS36;NO)、画像合成部8fは、画像合成処理を行う。
Next, the
Here, if it is determined that the synthesis position of the subject image G has been redesignated (step S39; YES), the
The processing after step S35 is repeatedly performed until it is determined in step S39 that the composition position of the subject image G has not been designated again (step S39; NO).
When it is determined in step S39 that the composition position of the subject image G has not been designated again (step S39; NO), the
Further, when it is determined in step S36 that the composite area of the subject image G and the face image area A do not overlap (see FIG. 7A, FIG. 7C, etc.) (step S36; NO) ), The
ここで、画像合成処理について図6を参照して詳細に説明する。
画像合成処理は、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なっている場合には、ステップS38にて所定の画像処理が施された背景画像Bを対象画像として行われ、一方、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なっていない場合には、所定の画像処理が施されていない背景画像Bを対象画像として行われる。
なお、以下の説明にあっては、処理対象となる背景画像Bは所定の画像処理が施されているか否かに関わらず、単に背景画像Bと言う。
Here, the image composition processing will be described in detail with reference to FIG.
When the face image area A of the background image B and the composition area of the subject image G overlap, the image composition processing is performed using the background image B subjected to the predetermined image processing in step S38 as the target image. On the other hand, when the face image area A of the background image B and the composite area of the subject image G do not overlap, the background image B that has not been subjected to the predetermined image processing is performed as the target image.
In the following description, the background image B to be processed is simply referred to as the background image B regardless of whether or not predetermined image processing has been performed.
図6に示すように、画像合成部8fは、被写体切り抜き画像と対応付けて保存されているアルファマップを読み出して画像メモリ5に展開する(ステップS51)。
なお、図5のステップS34やステップS39にて背景画像Bにおける被写体切り抜き画像の被写体画像Gの合成位置が指定された際に、背景画像Bとアルファマップとがずれてしまいアルファマップの範囲外となる領域については、α=0としてアルファ値が存在しない領域を生じさせないようにする。
As shown in FIG. 6, the
In addition, when the synthesis position of the subject image G of the subject cutout image in the background image B is designated in step S34 or step S39 in FIG. 5, the background image B and the alpha map are shifted, and are outside the range of the alpha map. For such a region, α = 0 is set so as not to generate a region having no alpha value.
次に、画像合成部8fは、背景画像Bの何れか一の画素(例えば、左上隅部の画素)を指定して(ステップS52)、当該画素について、アルファマップのアルファ値に基づいて処理を分岐させる(ステップS53)。具体的には、画像合成部8fは、背景画像Bの何れか一の画素のうち、アルファ値が1の画素については(ステップS53;α=1)、被写体切り抜き画像の対応する画素の画素値で上書きし(ステップS54)、アルファ値が0<α<1の画素については(ステップS53;0<α<1)、1の補数(1−α)を用いて被写体領域を切り抜いた画像(背景画像×(1−α))を生成した後、アルファマップにおける1の補数(1−α)を用いて被写体切り抜き画像を生成した際に単一背景色とブレンドした値を計算し、当該値を被写体切り抜き画像から減算し、それを被写体領域を切り抜いた画像(背景画像×(1−α))と合成し(ステップS55、アルファ値が0の画素については(ステップS53;α=0)、何もせずに背景画像Bを透過させるようにする。
Next, the
続けて、画像合成部8fは、背景画像Bの全ての画素について処理したか否かを判定する(ステップS56)。
ここで、全ての画素について処理していないと判定されると(ステップS56;NO)、画像合成部8fは、処理対象として次の画素を指定して当該画素に処理対象を移動させて(ステップS57)、処理をステップS53に移行させる。
上記の処理を、ステップS56にて全ての画素について処理したと判定されるまで(ステップS56;YES)、繰り返すことで、画像合成部8fは、被写体切り抜き画像と背景画像Bとを合成した被写体合成画像Pの画像データを生成させる。
これにより、画像合成処理を終了する。
Subsequently, the
If it is determined that all the pixels have not been processed (step S56; NO), the
By repeating the above process until it is determined in step S56 that all pixels have been processed (step S56; YES), the
Thereby, the image composition process is terminated.
その後、図5に示すように、表示制御部10は、画像合成部8fにより生成された被写体合成画像Pの画像データに基づいて、背景画像Bに被写体画像Gが重畳された被写体合成画像Pを表示部11の表示画面に表示させる(ステップS41)。
具体的には、表示制御部10は、例えば、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なっている場合には、所定の画像処理が施された背景画像Bに被写体画像Gが重畳された被写体合成画像Pb(図7(b)参照)を表示部11に表示させる。一方、表示制御部10は、例えば、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なっていない場合には、所定の画像処理が施されていない背景画像Bに被写体画像Gが重畳された被写体合成画像Pa、Pc(図7(a)、図7(c)等参照)を表示部11に表示させる。
これにより、合成画像生成処理を終了する。
After that, as shown in FIG. 5, the
Specifically, for example, when the face image area A of the background image B and the composite area of the subject image G overlap, the
Thus, the composite image generation process is finished.
以上のように、本実施形態の撮像装置100によれば、背景画像Bにおける被写体切り抜き画像の被写体画像Gを合成すべき合成領域に基づいて、当該被写体画像G及び背景画像Bのうち、少なくとも何れか一方に所定の画像処理を施すので、従来のように被写体画像Gと背景画像Bとを単に合成するのではなく、被写体画像Gや背景画像Bに所定の画像処理を施された斬新な態様の被写体合成画像Pbを生成することができ、被写体合成画像Pbに違和感を生じさせて当該被写体合成画像Pbの興趣性の向上を図ることができる。
特に、背景画像Bにおける被写体画像Gを合成すべき合成領域として当該背景画像Bにおける顔画像領域Aが特定された場合に、処理内容テーブルTに被写体画像Gと対応付けて記憶されている所定の画像処理を被写体画像G及び背景画像Bのうち、少なくとも何れか一方に施すので、例えば、被写体画像Gと背景画像Bの顔画像領域Aとが重なってしまい顔画像領域A全体の視認が制限されてしまうような場合に、当該顔画像領域Aに対して所定の画像処理を施すことで、被写体合成画像Pbに違和感を生じさせて当該被写体合成画像Pbの興趣性の向上を図ることができる。
このように、背景画像Bと被写体画像Gとを合成して、効果的な被写体合成画像Pを得ることができる。
As described above, according to the
In particular, when the face image area A in the background image B is specified as a synthesis area in which the subject image G in the background image B is to be synthesized, a predetermined content stored in the processing content table T in association with the subject image G is stored. Since the image processing is performed on at least one of the subject image G and the background image B, for example, the subject image G and the face image area A of the background image B overlap, and the visual recognition of the entire face image area A is restricted. In such a case, by applying predetermined image processing to the face image area A, it is possible to create a sense of incongruity in the subject composite image Pb and improve the interest of the subject composite image Pb.
In this way, an effective subject composite image P can be obtained by combining the background image B and the subject image G.
なお、本発明は、上記実施形態に限定されることなく、本発明の趣旨を逸脱しない範囲において、種々の改良並びに設計の変更を行っても良い。
以下に、撮像装置100の変形例について説明する。
ここで、撮像装置100の変形例は、以下に詳細に説明する以外の点で上記実施形態の撮像装置100と略同様の構成を成し、その説明は省略する
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.
Below, the modification of the
Here, the modified example of the
<変形例1>
変形例1の撮像装置100は、被写体画像Gの合成領域と背景画像Bにおける所定領域とが重なったと判定された場合に、加工処理部8eは、背景画像Bにおける当該所定領域の画像部分を被写体画像Gに対して優先的に表示させるように、被写体画像Gや背景画像Bに対して所定の画像処理を施す。
即ち、加工処理部8eは、領域判定部8dにより被写体画像Gの合成領域と顔画像領域(所定領域)Aとが重なったと判定された場合に、被写体画像Gを半透過の表示態様で表示されるように当該被写体画像Gに対して画像処理を施す。
なお、被写体画像Gの半透過の表示態様とは、被写体画像Gが透明と不透明の中間で表示された状態であり、当該被写体画像Gに重畳して後側に表示される背景画像Bの輪郭や色彩や明暗などを透過する程度の表示態様のことである。
<
When it is determined that the composite region of the subject image G and the predetermined region in the background image B overlap with each other, the
That is, the
The semi-transparent display mode of the subject image G is a state in which the subject image G is displayed in the middle of transparent and opaque, and the outline of the background image B displayed on the rear side superimposed on the subject image G. In other words, the display mode is such that the color, color, brightness, and the like are transmitted.
これにより、背景画像Bにおける当該顔画像領域Aの画像部分が被写体画像Gに対して優先的に表示される(図8参照)。
なお、背景画像Bにおける当該顔画像領域Aの画像部分を被写体画像Gに対して優先的に表示させる際に、被写体画像Gに所定の画像処理を施すようにしたが、これに限られるものではなく、背景画像Bに対して所定の画像処理を施すようにしても良い。また、背景画像Bの優先的な表示態様として、被写体画像Gの半透過の表示態様を例示したが、これに限られるものではなく、例えば、被写体画像Gの背景画像Bの顔画像領域Aと重なる部分を切り欠いたような表示態様や、被写体画像Gに対して背景画像Bの顔画像領域Aの方がより目立つように、これらの画像の明るさやコントラストや色調等を調整した表示態様などが挙げられる。
Thereby, the image portion of the face image area A in the background image B is preferentially displayed with respect to the subject image G (see FIG. 8).
Note that when the image portion of the face image area A in the background image B is displayed preferentially with respect to the subject image G, the subject image G is subjected to predetermined image processing. However, the present invention is not limited to this. Alternatively, predetermined image processing may be performed on the background image B. Further, as the preferential display mode of the background image B, the semi-transparent display mode of the subject image G has been exemplified, but the present invention is not limited to this. For example, the face image region A of the background image B of the subject image G Display mode in which overlapping portions are cut out, display mode in which the brightness, contrast, color tone, etc. of these images are adjusted so that the face image area A of the background image B is more conspicuous than the subject image G Is mentioned.
従って、変形例1の撮像装置100によれば、背景画像Bにおける被写体画像Gを合成すべき合成領域として当該背景画像Bにおける顔画像領域Aが特定された場合に、当該顔画像領域Aの画像部分を被写体画像Gに対して優先的に表示することができる。
Therefore, according to the
<変形例2>
変形例2の撮像装置100は、複数(例えば、20枚)の背景画像Bを含む連写背景画像と被写体画像Gとを合成する際に、加工処理部8eは、連写背景画像を構成する複数の背景画像B、…のうち、被写体画像Gの合成領域として顔画像領域Aが特定された背景画像Bの各々に所定の画像処理を施す。
<
When the
連写背景画像は、図示は省略するが、レンズ部1、電子撮像部2及び撮像制御部3により所定の撮像フレームレートで連続して撮像された複数の背景画像(フレーム画像)B、…からなる。
画像処理部8の顔検出部8bは、連写背景画像を構成する複数の背景画像B、…の各々に対する顔検出処理を行って顔画像領域Aを検出する。また、画像処理部8の合成領域特定部8cは、連写背景画像を構成する複数の背景画像B、…の各々における被写体切り抜き画像の被写体画像Gを合成すべき合成領域を特定する。
そして、画像処理部8の領域判定部8dは、合成領域特定部8cにより特定された各背景画像Bにおける被写体画像Gの合成領域と顔検出部8bにより各背景画像Bから検出された顔画像領域(所定領域)Aとが重なるか否かを判定する。即ち、領域判定部8dは、連写背景画像を構成する各背景画像(構成画像)B毎に、当該背景画像Bにおける顔画像領域(所定領域)Aが合成領域特定部8cにより特定されたか否かを判定する。
Although the continuous shooting background image is not shown in the drawing, from a plurality of background images (frame images) B,... Successively captured at a predetermined imaging frame rate by the
The face detection unit 8b of the
Then, the
加工処理部8eは、連写背景画像を構成する複数の背景画像B、…のうち、領域判定部8dにより被写体画像Gの合成領域と顔画像領域(所定領域)Aとが重なると判定された背景画像Bの各々に所定の画像処理を施す。
なお、加工処理部8eは、上記のような連写背景画像を構成する複数の背景画像B、…に対する画像処理とともに、或いは、各背景画像Bに対する画像処理に替えて、被写体画像Gに対して所定の画像処理を施すようにしても良い。
The
The
次に、変形例2の撮像装置100による合成画像生成処理について、図9を参照して説明する。
図9は、合成画像生成処理に係る動作の一例を示すフローチャートである。
Next, a composite image generation process performed by the
FIG. 9 is a flowchart illustrating an example of an operation related to the composite image generation process.
図9に示すように、先ず、上記実施形態と略同様に、ユーザによる操作入力部12の所定操作に基づいて、記録媒体9に記録されている複数の画像の中で所望の被写体切り抜き画像が選択して指定されると(ステップS61)、画像処理部8は、指定された被写体切り抜き画像の画像データを読み出して画像メモリ5に展開する。
As shown in FIG. 9, first, in substantially the same manner as in the above-described embodiment, a desired subject cut-out image is selected from a plurality of images recorded on the
次に、ユーザによる操作入力部12の所定操作に基づいて、記録媒体9に記録されている複数の画像の中で合成画像の背景となる所望の連写背景画像(図示略)が選択して指定されると(ステップS62)、画像処理部8は、指定された連写背景画像の画像データを読み出して画像メモリ5に展開して、当該連写背景画像を構成する最初の背景画像Bを指定する(ステップS63)。また、画像処理部8は、連写背景画像の連写枚数に応じて被写体切り抜き画像を複製して、各背景画像Bに対応する被写体切り抜き画像を画像メモリ5に記憶しておく。
続けて、画像処理部8の顔検出部8bが、最初の背景画像Bの画像データに対する顔検出処理を行って当該背景画像B内から顔画像領域Aを検出する(ステップS64)。
Next, based on a predetermined operation of the
Subsequently, the face detection unit 8b of the
続けて、ユーザによる操作入力部12の選択決定ボタン12bの所定操作に基づいて、最初の背景画像Bにおける被写体切り抜き画像の被写体画像Gの合成位置が指定されると(ステップS65)、画像処理部8の合成領域特定部8cは、最初の背景画像B上の被写体画像Gが重畳された領域を背景画像Bにおける被写体切り抜き画像の被写体画像Gを合成すべき合成領域として特定する(ステップS66)。
Subsequently, when the combination position of the subject image G of the subject cutout image in the first background image B is designated based on a predetermined operation of the
続けて、画像処理部8の領域判定部8dは、顔検出部8bにより検出された顔画像領域Aと合成領域特定部8cにより特定された被写体画像Gの合成領域とが重なるか否かを判定する(ステップS67)。
ここで、背景画像Bにおける顔画像領域Aと被写体画像Gの合成領域とが重なる(図7(b)参照)と判定されると(ステップS67;YES)、画像処理部8の加工処理部8eは、処理内容テーブルTに当該被写体画像Gと対応付けて登録されている所定の画像処理内容を取得して(ステップS68)、取得した画像処理内容に従って処理対象の背景画像Bに対する画像処理を行う(ステップS69)。
なお、画像処理の具体的な内容は、上記実施形態にて説明したものと同一であり、その詳細な説明は省略する。
Subsequently, the
If it is determined that the face image area A in the background image B and the composite area of the subject image G overlap (see FIG. 7B) (step S67; YES), the
The specific contents of the image processing are the same as those described in the above embodiment, and a detailed description thereof is omitted.
次に、画像処理部8は、連写背景画像を構成する複数の背景画像B、…の中で処理対象となっている背景画像Bが最初の背景画像Bであるか否かを判定する(ステップS70)。また、ステップS67にて、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なっていないと判定された場合にも(ステップS67;NO)、画像処理部8は、処理をステップS70に移行して、処理対象の背景画像Bが最初の背景画像Bであるか否かを判定する。
Next, the
ステップS70にて、処理対象の背景画像Bが最初の背景画像Bであると判定されると(ステップS70;YES)、画像処理部8は、ユーザによる操作入力部12の選択決定ボタン12bの所定操作に基づいて、最初の背景画像Bにおける被写体切り抜き画像の被写体画像Gの合成位置が再指定されたか否かを判定する(ステップS71)。
ここで、被写体画像Gの合成位置が再指定されたと判定されると(ステップS71;YES)、画像処理部8は、処理をステップS66に移行して、それ以降の処理を実行する。
ステップS66以降の処理は、ステップS71にて、被写体画像Gの合成位置が再指定されていないと判定されるまで(ステップS71;NO)、繰り返し行われる。
そして、ステップS71にて、被写体画像Gの合成位置が再指定されていないと判定されると(ステップS71;NO)、画像処理部8の画像合成部8fは、処理対象の背景画像Bと被写体切り抜き画像とを合成する画像合成処理を行う(ステップS40)。
When it is determined in step S70 that the background image B to be processed is the first background image B (step S70; YES), the
Here, if it is determined that the composition position of the subject image G has been redesignated (step S71; YES), the
The processing after step S66 is repeatedly performed until it is determined in step S71 that the composition position of the subject image G has not been designated again (step S71; NO).
When it is determined in step S71 that the composition position of the subject image G has not been designated again (step S71; NO), the
画像合成処理は、連写背景画像の中から指定された背景画像B(例えば、最初の背景画像B等)を処理対象として実行する以外は、上記実施形態と略同様であり、詳細な説明は省略する。
これにより、処理対象の背景画像B(例えば、最初の背景画像B)に被写体切り抜き画像の被写体画像Gが重畳された被写体合成画像Pが生成される。なお、生成された被写体合成画像Pの画像データは、画像メモリ5に一時記憶される。
The image composition process is substantially the same as the above embodiment except that the background image B (for example, the first background image B, etc.) designated from the continuous shot background image is executed as a processing target. Omitted.
As a result, a subject composite image P in which the subject image G of the subject cutout image is superimposed on the background image B to be processed (for example, the first background image B) is generated. Note that the generated image data of the subject composite image P is temporarily stored in the
次に、画像処理部8は、連写背景画像を構成する複数の背景画像B、…の全てについて処理したか否かを判定する(ステップS72)。
ここで、背景画像Bの全てについて処理していないと判定されると(ステップS72;NO)、画像処理部8は、処理対象として次の背景画像B(例えば、二枚目の背景画像B)を指定して当該背景画像Bに処理対象を移動させる(ステップS73)。続けて、画像処理部8の顔検出部8bは、処理対象の背景画像Bの画像データに対する顔検出処理を行って当該背景画像B内から顔画像領域Aを検出した後(ステップS74)、処理をステップS66に移行させる。
Next, the
Here, when it is determined that all the background images B have not been processed (step S72; NO), the
画像処理部8は、上記の処理をステップS72にて複数の背景画像B、…の全てについて処理したと判定されるまで(ステップS72;YES)、繰り返す。
ここで、処理対象が二枚目以降の背景画像Bに指定された場合、ステップS70にて、処理対象の背景画像Bが最初の背景画像Bでないと判定されることから(ステップS70;NO)、画像処理部8は、ステップS71の処理をとばして、画像合成部8fが、処理対象の背景画像Bと被写体切り抜き画像とを合成する画像合成処理を行う(ステップS40)。
The
Here, when the processing target is designated as the second and subsequent background images B, it is determined in step S70 that the processing target background image B is not the first background image B (step S70; NO). The
そして、ステップS72にて、複数の背景画像B、…の全てについて処理したと判定されると(ステップS72;YES)、表示制御部10は、画像合成部8fにより生成された複数の被写体合成画像P、…の画像データに基づいて、被写体合成動画像を表示部11の表示画面に表示させる(ステップS75)。
具体的には、表示制御部10は、画像メモリ5から複数の被写体合成画像P、…の画像データを取得して、複数の被写体合成画像P、…を所定の表示フレームレートで切り換えて表示部11の表示画面に再生表示させることで、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なっている場合には、所定の画像処理が施された背景画像Bに被写体画像Gが重畳された被写体合成画像Pを表示部11に表示させ、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なっていない場合には、所定の画像処理が施されていない背景画像Bに被写体画像Gが重畳された被写体合成画像Pを表示部11に表示させる。
これにより、合成画像生成処理を終了する。
If it is determined in step S72 that all of the plurality of background images B,... Have been processed (step S72; YES), the
Specifically, the
Thus, the composite image generation process is finished.
従って、変形例2の撮像装置100によれば、連写背景画像を構成する複数の背景画像B、…のうち、被写体画像Gの合成領域として顔画像領域Aが特定された背景画像Bの各々に所定の画像処理を施すので、背景画像Bの顔画像領域Aと被写体画像Gの合成領域とが重なっているか否かに応じて、被写体画像Gが所定の画像処理が施された背景画像Bに重畳された被写体合成画像Pと所定の画像処理が施されていない背景画像Bに重畳された被写体合成画像Pとを切り替えて表示することができ、斬新な態様の被写体合成動画像を生成することができ、被写体合成動画像に違和感を生じさせて当該被写体合成動画像の興趣性の向上を図ることができる。
Therefore, according to the
なお、上記変形例2にあっては、背景画像Bとして、複数の背景画像B、…を含む連写背景画像を例示したが、処理対象画像はこれに限られるものではなく、複数の画像フレーム(構成画像)を含む動画像であっても良い。 In the second modification, a continuous background image including a plurality of background images B,... Is exemplified as the background image B. However, the processing target image is not limited to this, and a plurality of image frames. It may be a moving image including (composition image).
また、上記実施形態にあっては、合成画像生成処理にて、背景画像Bにおける被写体画像Gの合成領域として当該背景画像Bにおける顔画像領域(所定領域)Aが特定された場合に、背景画像Bや被写体画像Gに対して所定の画像処理を施すようにしたが、画像処理の実行タイミングはこれに限られるものではない。
例えば、背景画像Bにおける被写体画像Gの合成領域が特定された場合に、当該被写体画像Gの合成領域に基づいて、背景画像Bや被写体画像Gに対して所定の画像処理を施すようにしても良い。即ち、例えば、略中央部近傍に比較的重要な被写体が配置された構図で静止画撮像される場合があるが、被写体画像Gの合成領域が背景画像Bの略中央部近傍である場合には、被写体画像Gと背景画像Bにおける比較的重要な被写体が重なった状態となる虞がある。そこで、かかる場合を考慮して、背景画像Bにおける被写体画像Gを合成すべき合成領域に基づいて、背景画像Bや被写体画像Gに対して所定の画像処理を施すようにしても良い。
さらに、例えば、背景画像Bにおける被写体画像Gの合成領域が特定された後、画像合成処理にて実際に背景画像Bと被写体画像Gとを合成する際に、背景画像Bや被写体画像Gに対して所定の画像処理を施すようにしても良い。
In the above embodiment, when the face image region (predetermined region) A in the background image B is specified as the composite region of the subject image G in the background image B in the composite image generation process, the background image Although predetermined image processing is performed on B and subject image G, the execution timing of image processing is not limited to this.
For example, when the composite region of the subject image G in the background image B is specified, predetermined image processing may be performed on the background image B or the subject image G based on the composite region of the subject image G. good. That is, for example, a still image may be taken with a composition in which a relatively important subject is arranged in the vicinity of the approximate center, but when the composite area of the subject image G is in the vicinity of the approximate center of the background image B, for example. There is a possibility that a relatively important subject in the subject image G and the background image B overlaps each other. Therefore, in consideration of such a case, predetermined image processing may be performed on the background image B or the subject image G based on the synthesis region in which the subject image G in the background image B is to be synthesized.
Further, for example, after the synthesis region of the subject image G in the background image B is specified, when the background image B and the subject image G are actually synthesized in the image synthesis process, the background image B and the subject image G are combined. Then, predetermined image processing may be performed.
また、上記実施形態にあっては、背景画像Bにおける所定領域として顔画像領域Aを例示したが、所定領域の種類はこれに限られるものではない。例えば、背景画像Bに対して画像認識処理を行って、例えば、色、明るさ、コントラスト、高周波成分情報などの画像の各種情報を利用して主要被写体の画素集合の輪郭を抽出して、当該主要被写体の画像部分を所定領域としても良い。
さらに、この所定領域は被写体画像Gごとに設定できるようにしても良い。図2に示した処理内容テーブルTを例にとると、被写体画像Gとしての「感嘆符」は、画像処理の処理内容として「顔画像領域をびっくりした表情にする」と対応付けられているが、これに加えて所定領域として「顔画像領域」が対応付けられているものとする。つまり、「感嘆符」の合成領域が背景画像Bにおける顔画像領域と重なる場合に、当該顔画像領域を「びっくりした表示にする」処理を施すようにする。また、被写体画像Gとしての「ライト」は、画像処理の処理内容として「合成領域を中心に明るくする」に加えて所定領域として「暗い領域」が対応付けられており、「ライト」の合成領域が背景画像Bにおける暗い領域(例えば輝度が所定値以下である領域)と重なる場合に、「合成領域を中心に明るくする」処理を施すようにしても良い。
また、処理内容テーブルTには被写体画像Gごとに、加工処理部8eによる背景画像Bや被写体画像Gに対する所定の画像処理の処理範囲を対応付けて記憶できるようにしても良い。
また、被写体画像Gの種類に関係なく、背景画像における所定領域と処理内容とを対応付けて記録できるようにしてもよい。例えば、所定領域として「顔画像領域」が記憶されていて、処理内容として「顔画像領域をびっくりした表示にする」と対応付けられている場合は、いかなる被写体画像Gであっても、合成領域が顔画像領域と重なった場合は当該顔画像領域をびっくりした表示にするように画像処理を施すようにしても良い。
Moreover, in the said embodiment, although the face image area | region A was illustrated as a predetermined area | region in the background image B, the kind of predetermined area | region is not restricted to this. For example, an image recognition process is performed on the background image B, and for example, the outline of the pixel set of the main subject is extracted using various information of the image such as color, brightness, contrast, and high frequency component information. The image portion of the main subject may be a predetermined area.
Further, this predetermined area may be set for each subject image G. Taking the processing content table T shown in FIG. 2 as an example, the “exclamation mark” as the subject image G is associated with “make the face image area a surprising expression” as the processing content of the image processing. In addition to this, it is assumed that a “face image area” is associated as a predetermined area. That is, when the composite area of “exclamation mark” overlaps with the face image area in the background image B, the face image area is subjected to the process of “displaying it astonishingly”. In addition, “light” as the subject image G is associated with “dark area” as a predetermined area in addition to “brighten around the synthesis area” as the processing content of the image processing. May overlap with a dark area in the background image B (for example, an area having a luminance equal to or lower than a predetermined value), a process of “brightening around the combined area” may be performed.
Further, the processing content table T may store a processing range of predetermined image processing for the background image B and the subject image G by the
Further, regardless of the type of the subject image G, the predetermined area in the background image and the processing content may be recorded in association with each other. For example, when “face image area” is stored as the predetermined area and associated with “display the face image area astonishingly” as the processing content, any subject image G can be combined. When the face image area overlaps with the face image area, image processing may be performed so that the face image area is displayed in an astonishing manner.
さらに、上記実施形態にあっては、被写体切り抜き画像の被写体画像Gを前景画像として背景画像Bと合成するようにしたが、前景画像の種類はこれに限られるものではなく、背景画像Bに重畳して合成される画像であれば如何なる画像であっても良い。 Furthermore, in the above embodiment, the subject image G of the subject cutout image is combined with the background image B as a foreground image. However, the type of the foreground image is not limited to this, and is superimposed on the background image B. Any image may be used as long as it is an image to be synthesized.
また、上記実施形態にあっては、加工処理部8eは、背景画像Bや被写体画像Gに対する所定の画像処理を背景画像Bにおける被写体画像Gの合成領域を基準として行うようにしたが、所定の画像処理の基準はこれに限られるものではない。
即ち、加工処理部8eは、処理内容テーブルT(図2参照)に被写体画像Gと対応付けて登録されている所定の画像処理を、背景画像B及び被写体画像Gのうち、少なくとも何れか一方に画像処理を施すようにしても良い。
このような構成としても、従来のように被写体画像Gと背景画像Bとを単に合成するのではなく、被写体画像Gや背景画像Bに所定の画像処理を施された斬新な態様の被写体合成画像Pを生成することができ、当該被写体合成画像Pの興趣性の向上を図ることができる。
In the above embodiment, the
That is, the
Even in such a configuration, the subject image G and the background image B are not simply synthesized as in the prior art, but the subject composite image in a novel form in which the subject image G and the background image B are subjected to predetermined image processing. P can be generated, and the interest of the subject composite image P can be improved.
さらに、撮像装置100の構成は、上記実施形態に例示したものは一例であり、これに限られるものではない。即ち、画像処理装置として、撮像装置100を例示したが、これに限られるものではない。例えば、背景画像Bや被写体画像Gの生成は、当該撮像装置100とは異なる撮像装置(図示略)にて行い、この撮像装置から転送された画像データを記録して合成画像生成処理を実行する画像処理装置であっても良い。
Furthermore, the configuration of the
加えて、上記実施形態にあっては、CPU13の制御下にて、画像処理部8の合成領域特定部8cや加工処理部8eが駆動することにより本発明が実現される構成としたが、これに限られるものではなく、CPU13によって所定のプログラム等が実行されることにより実現される構成としても良い。
即ち、プログラムを記憶するプログラムメモリ(図示略)に、特定処理ルーチン、画像処理ルーチン及び合成処理ルーチンを含むプログラム、或いは画像処理ルーチン及び合成処理ルーチンを含むプログラムを記憶しておく。そして、特定処理ルーチンによりCPU13を、背景画像Bにおける被写体画像(前景画像)Gを合成すべき領域を特定する特定手段として機能させるようにしても良い。また、画像処理ルーチンによりCPU13を、特定手段により特定された前景画像を合成すべき領域に基づいて、当該前景画像及び背景画像Bの少なくとも一方に所定の処理を施す画像処理手段として機能させるようにしても良い。また、合成処理ルーチンによりCPU13を、画像処理手段によって少なくとも一方に所定の処理が施された前景画像と背景画像とを合成する合成手段として機能っせるようにしても良い。
また、画像処理ルーチンによりCPU13を、記憶部に前景画像と対応付けて記憶されている所定の処理を、当該前景画像及び背景画像Bの少なくとも一方に施す画像処理手段として機能させるようにしても良い。また、合成処理ルーチンによりCPU13を、画像処理手段によって少なくとも一方に所定の処理が施された前景画像と背景画像とを合成する合成手段として機能させるようにしても良い。
In addition, in the above embodiment, the present invention is realized by driving the synthesis region specifying unit 8c and the
That is, a program including a specific processing routine, an image processing routine, and a composition processing routine, or a program including an image processing routine and a composition processing routine is stored in a program memory (not shown) that stores the program. Then, the
Further, the
100 撮像装置
1 レンズ部
2 電子撮像部
3 撮像制御部
8 画像処理部
8b 顔検出部
8c 合成領域特定部
8d 領域判定部
8e 加工処理部
8f 画像合成部
13 CPU
T 処理内容テーブル
DESCRIPTION OF
T processing contents table
Claims (12)
前記背景画像における前記前景画像を合成すべき領域を特定する特定手段と、
この特定手段により特定された前記前景画像を合成すべき領域に基づいて、当該前景画像及び前記背景画像の少なくとも一方に所定の処理を施す画像処理手段と、
を備え、
前記合成手段は、前記画像処理手段によって少なくとも一方に所定の処理が施された前記前景画像と前記背景画像とを合成することを特徴とする画像処理装置。 In an image processing apparatus provided with a combining unit that combines a foreground image with a background image,
Specifying means for specifying an area in the background image to be combined with the foreground image;
Image processing means for performing a predetermined process on at least one of the foreground image and the background image based on the region to be combined with the foreground image specified by the specifying means;
With
The image processing apparatus, wherein the synthesizing unit synthesizes the foreground image and the background image that have been subjected to predetermined processing on at least one of the image processing units.
前記画像処理手段は、前記特定手段により特定された前記前景画像を合成すべき領域に基づいて、前記記憶手段に前記前景画像と対応付けて記憶されている前記所定の処理を、当該前景画像及び前記背景画像の少なくとも一方に施すことを特徴とする請求項1に記載の画像処理装置。 Storage means for storing the foreground image and a predetermined process in association with each other;
The image processing means performs the predetermined processing stored in the storage means in association with the foreground image based on the region to be synthesized with the foreground image specified by the specifying means. The image processing apparatus according to claim 1, wherein the image processing apparatus is applied to at least one of the background images.
前記画像処理手段は、前記判定手段により前記背景画像における所定領域が特定されたと判定された場合に、前記前景画像及び前記背景画像の少なくとも一方に所定の処理を施すことを特徴とする請求項1又は2に記載の画像処理装置。 Determination means for determining whether or not a predetermined area in the background image is specified as an area to be combined with the foreground image by the specifying means;
The image processing means performs a predetermined process on at least one of the foreground image and the background image when the determination means determines that a predetermined area in the background image is specified. Or the image processing apparatus of 2.
前記判定手段は、前記連写画像若しくは動画像を構成する各フレーム画像毎に、当該フレーム画像における所定領域が前記特定手段により特定されたか否かを判定し、
前記画像処理手段は、前記複数のフレーム画像のうち、前記判定手段により所定領域が特定されたと判定されたフレーム画像及び前記前景画像の少なくとも一方に所定の処理を施すことを特徴とする請求項3又は4に記載の画像処理装置。 The background image is a continuous image or a moving image composed of a plurality of frame images,
The determination means determines, for each frame image constituting the continuous shot image or moving image, whether or not a predetermined area in the frame image is specified by the specifying means,
The image processing means performs a predetermined process on at least one of the frame image and the foreground image determined to have specified a predetermined area by the determination means among the plurality of frame images. Or the image processing apparatus of 4.
前記前景画像と所定の処理とを対応付けて記憶する記憶手段と、
この記憶手段に前記前景画像と対応付けて記憶されている前記所定の処理を、当該前景画像及び前記背景画像の少なくとも一方に施す画像処理手段と、
を備え、
前記合成手段は、前記画像処理手段によって少なくとも一方に所定の処理が施された前記前景画像と前記背景画像とを合成することを特徴とする画像処理装置。 In an image processing apparatus provided with a combining unit that combines a foreground image with a background image,
Storage means for storing the foreground image and predetermined processing in association with each other;
Image processing means for applying the predetermined processing stored in the storage means in association with the foreground image to at least one of the foreground image and the background image;
With
The image processing apparatus, wherein the synthesizing unit synthesizes the foreground image and the background image that have been subjected to predetermined processing on at least one of the image processing units.
前記画像処理手段は、前記特定手段により前記前景画像を合成すべき領域として特定された前記背景画像における所定領域から所定の範囲内の前記背景画像に所定の処理を施すことを特徴とする請求項7に記載の画像処理装置。 A specifying unit for specifying a region in the background image to be combined with the foreground image;
The image processing means performs a predetermined process on the background image within a predetermined range from a predetermined area in the background image specified as an area to be synthesized with the foreground image by the specifying means. 8. The image processing apparatus according to 7.
上記ステップにて特定された前記前景画像を合成すべき領域に基づいて、当該前景画像及び前記背景画像の少なくとも一方に所定の処理を施すステップと、
上記ステップにて少なくとも一方に所定の処理を施された前記前景画像と前記背景画像とを合成するステップと
を含むことを特徴とする画像処理方法。 Identifying a region in the background image where the foreground image is to be synthesized;
Performing a predetermined process on at least one of the foreground image and the background image based on the region to be combined with the foreground image specified in the step;
And a step of synthesizing the foreground image and the background image that have been subjected to a predetermined process in at least one of the steps.
上記ステップにて少なくとも一方に所定の処理を施された前記前景画像と前記背景画像とを合成するステップと
を含むことを特徴とする画像処理方法。 A foreground image and a predetermined process are stored in association with each other in advance, and the predetermined process stored in association with the foreground image is applied to at least one of the foreground image and the background image with which the foreground image is synthesized. Steps,
And a step of synthesizing the foreground image and the background image that have been subjected to a predetermined process in at least one of the steps.
背景画像における前景画像を合成すべき領域を特定する特定手段、
この特定手段により特定された前記前景画像を合成すべき領域に基づいて、当該前景画像及び前記背景画像の少なくとも一方に所定の処理を施す画像処理手段、
この画像処理手段によって少なくとも一方に所定の処理が施された前記前景画像と前記背景画像とを合成する合成手段
として機能させることを特徴とするプログラム。 The computer of the image processing device
A specifying means for specifying a region in the background image to be synthesized with the foreground image;
Image processing means for performing a predetermined process on at least one of the foreground image and the background image based on the region to be combined with the foreground image specified by the specifying means;
A program that functions as a combining unit that combines the foreground image and the background image that have been subjected to predetermined processing on at least one of them by the image processing unit.
前記記憶部に前景画像と対応付けて記憶されている前記所定の処理を、当該前景画像及び前記背景画像の少なくとも一方に施す画像処理手段、
この画像処理手段によって少なくとも一方に所定の処理が施された前記前景画像及び前記背景画像を合成する合成手段
として機能させることを特徴とするプログラム。 A computer of an image processing apparatus having a storage unit that stores a foreground image and a predetermined process in association with each other,
Image processing means for applying the predetermined processing stored in the storage unit in association with the foreground image to at least one of the foreground image and the background image;
A program that functions as a combining unit that combines the foreground image and the background image that have been subjected to predetermined processing on at least one of them by the image processing unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009227623A JP5636660B2 (en) | 2009-09-30 | 2009-09-30 | Image processing apparatus, image processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009227623A JP5636660B2 (en) | 2009-09-30 | 2009-09-30 | Image processing apparatus, image processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011077850A true JP2011077850A (en) | 2011-04-14 |
JP5636660B2 JP5636660B2 (en) | 2014-12-10 |
Family
ID=44021344
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009227623A Active JP5636660B2 (en) | 2009-09-30 | 2009-09-30 | Image processing apparatus, image processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5636660B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013246189A (en) * | 2012-05-23 | 2013-12-09 | Casio Comput Co Ltd | Imaging device and imaging processing method, and program |
JP2015211395A (en) * | 2014-04-28 | 2015-11-24 | オリンパス株式会社 | Information apparatus, image processing method, and program |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07175587A (en) * | 1993-10-28 | 1995-07-14 | Hitachi Ltd | Information processor |
JPH11102434A (en) * | 1997-07-31 | 1999-04-13 | Sony Corp | Image processor and its method |
JPH11306375A (en) * | 1998-04-23 | 1999-11-05 | Internatl Business Mach Corp <Ibm> | Method and device for picture composition processing |
JPH11317909A (en) * | 1998-02-02 | 1999-11-16 | Matsushita Electric Ind Co Ltd | Picture synthesis method/device and data recording medium |
JP2005260630A (en) * | 2004-03-12 | 2005-09-22 | Seiko Epson Corp | Image composition by superposing images together to generate composite image |
JP2005270378A (en) * | 2004-03-25 | 2005-10-06 | Nobutaka Nishikata | Information output device, communication system and computer program |
JP2006060719A (en) * | 2004-08-23 | 2006-03-02 | Make Softwear:Kk | Apparatus and method for image editing |
-
2009
- 2009-09-30 JP JP2009227623A patent/JP5636660B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07175587A (en) * | 1993-10-28 | 1995-07-14 | Hitachi Ltd | Information processor |
JPH11102434A (en) * | 1997-07-31 | 1999-04-13 | Sony Corp | Image processor and its method |
JPH11317909A (en) * | 1998-02-02 | 1999-11-16 | Matsushita Electric Ind Co Ltd | Picture synthesis method/device and data recording medium |
JPH11306375A (en) * | 1998-04-23 | 1999-11-05 | Internatl Business Mach Corp <Ibm> | Method and device for picture composition processing |
JP2005260630A (en) * | 2004-03-12 | 2005-09-22 | Seiko Epson Corp | Image composition by superposing images together to generate composite image |
JP2005270378A (en) * | 2004-03-25 | 2005-10-06 | Nobutaka Nishikata | Information output device, communication system and computer program |
JP2006060719A (en) * | 2004-08-23 | 2006-03-02 | Make Softwear:Kk | Apparatus and method for image editing |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013246189A (en) * | 2012-05-23 | 2013-12-09 | Casio Comput Co Ltd | Imaging device and imaging processing method, and program |
JP2015211395A (en) * | 2014-04-28 | 2015-11-24 | オリンパス株式会社 | Information apparatus, image processing method, and program |
Also Published As
Publication number | Publication date |
---|---|
JP5636660B2 (en) | 2014-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5051156B2 (en) | Image processing apparatus and program | |
JP5105550B2 (en) | Image composition apparatus and program | |
JP4760973B2 (en) | Imaging apparatus and image processing method | |
JP5359856B2 (en) | Image composition apparatus, image composition method, and program | |
JP4798236B2 (en) | Imaging apparatus, image processing method, and program | |
US20170272660A1 (en) | Imaging device configured to control a region of imaging | |
JP6541501B2 (en) | IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, AND IMAGE PROCESSING METHOD | |
JP2011066827A (en) | Image processing apparatus, image processing method and program | |
JP5267279B2 (en) | Image composition apparatus and program | |
JP5402166B2 (en) | Image composition apparatus and program | |
JP5636660B2 (en) | Image processing apparatus, image processing method, and program | |
JP6024135B2 (en) | Subject tracking display control device, subject tracking display control method and program | |
JP5402148B2 (en) | Image composition apparatus, image composition method, and program | |
JP5493839B2 (en) | Imaging apparatus, image composition method, and program | |
JP5476900B2 (en) | Image composition apparatus, image composition method, and program | |
JP2011182014A (en) | Image pickup device, image processing method and program | |
JP2011041041A (en) | Imaging apparatus, imaging method and program | |
JP2011003057A (en) | Image composition device, image specifying method, image composition method, and program | |
JP5494537B2 (en) | Image processing apparatus and program | |
JP2010278701A (en) | Image combining device, and image combining method and program | |
JP5381207B2 (en) | Image composition apparatus and program | |
JP5565227B2 (en) | Image processing apparatus, image processing method, and program | |
JP6213619B2 (en) | Camera and program | |
JP4803319B2 (en) | Imaging apparatus, image processing method, and program | |
JP2011135619A (en) | Image processing apparatus and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120926 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20120926 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130813 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130917 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140708 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140902 |
|
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: 20140924 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141007 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5636660 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |