JP2012138957A - Image processing device, image processing method, and imaging apparatus - Google Patents

Image processing device, image processing method, and imaging apparatus Download PDF

Info

Publication number
JP2012138957A
JP2012138957A JP2012084545A JP2012084545A JP2012138957A JP 2012138957 A JP2012138957 A JP 2012138957A JP 2012084545 A JP2012084545 A JP 2012084545A JP 2012084545 A JP2012084545 A JP 2012084545A JP 2012138957 A JP2012138957 A JP 2012138957A
Authority
JP
Japan
Prior art keywords
image
subject
composition
arrangement
images
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
Application number
JP2012084545A
Other languages
Japanese (ja)
Other versions
JP5055462B2 (en
Inventor
Koji Endo
恒史 遠藤
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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2012084545A priority Critical patent/JP5055462B2/en
Publication of JP2012138957A publication Critical patent/JP2012138957A/en
Application granted granted Critical
Publication of JP5055462B2 publication Critical patent/JP5055462B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing device, an image processing method, and an imaging apparatus which are capable of creating an image appropriate to an arrangement scene by combining an image for combination with a captured image on the basis of a subject in the captured image.SOLUTION: The image processing device detects a subject in a captured image, determines arrangement of the subject by an operation, selects an image for combination to be combined with the captured image in accordance with the arrangement of the subject, determines arrangement of the selected image for combination so that this image does not overlap another image for combination and the subject, and combines the image for combination with the captured image.

Description

本発明は、画像処理装置,画像処理方法及び撮像装置に関し、具体的には、撮像した画像に合成用画像を合成して表示する画像処理装置,画像処理方法及び撮像装置に関する。   The present invention relates to an image processing apparatus, an image processing method, and an imaging apparatus, and more particularly, to an image processing apparatus, an image processing method, and an imaging apparatus that combine and display a composite image on a captured image.

従来、撮影時に合成用画像を撮影画像に合成することが可能な技術としては、例えば、下記特許文献に記載されたものがある。
特許文献1は、撮影時に撮影位置をサーバーに送信し,撮影エリアごとの付加画像の中からランダムでクリップアートを受け取り,画像に合成する。同じ撮影エリアでも撮影ごとに異なる画像が合成されるため,ユーザに意外性,アミューズメント性を提供する。
Conventionally, as a technique capable of synthesizing a synthesis image with a photographed image at the time of photographing, for example, there is a technique described in the following patent document.
In Patent Document 1, the shooting position is transmitted to a server at the time of shooting, and clip art is randomly received from the additional images for each shooting area and combined with the image. Even in the same shooting area, different images are combined for each shooting, providing users with unexpectedness and amusement.

特許文献2は、被写体の位置を自動的に検出し,その動きに合わせてテロップ(被写体の名前,説明文等の文字列や説明図形)を画面内に表示する。   Patent Document 2 automatically detects the position of a subject, and displays a telop (a character string or explanatory figure such as a subject name or a description) on the screen in accordance with the movement.

特許文献3は、撮影者の選択したテンプレート画像をスルー画に重ねて表示し,撮影者が構図を決定して撮影を行うと,テンプレート画像を合成した撮影画像とテンプレートを合成しない撮影画像が保存される。   In Patent Document 3, a template image selected by a photographer is displayed superimposed on a through image, and when the photographer decides the composition and takes a photograph, a photographed image obtained by combining the template image and the photographed image not synthesized is saved. Is done.

特許文献4は、撮影された画像から特定のオブジェクトを抽出し,抽出したオブジェクトを予め登録されている置換用オブジェクトと置換した合成画像を作成し,出力する。   Patent Document 4 extracts a specific object from a photographed image, and creates and outputs a composite image in which the extracted object is replaced with a replacement object registered in advance.

特開2004−248037号公報JP 2004-2448037 A 特開2003−78818号公報JP 2003-78818 A 特開2004−153345号公報JP 2004-153345 A 特開2005−157762号公報JP-A-2005-157762

ところで、被写体の配置(位置,大きさ,方向)や数や、被写体同士の配置の関係に適応するように合成用画像を選択することができなかった。また、被写体の位置や、複数の被写体の位置関係に応じて、合成用画像の配置を決定することができなかった。このため、撮影した画像のシーンにそぐわない合成用画像が合成されたり、合成用画像が被写体や他の合成用画像が重なったりする可能性があった。   By the way, it has been impossible to select a compositing image so as to adapt to the arrangement (position, size, direction) and number of subjects and the relationship between the arrangement of subjects. In addition, the arrangement of the composition image cannot be determined according to the position of the subject or the positional relationship between the plurality of subjects. For this reason, there is a possibility that a compositing image that does not match the scene of the photographed image is composited, or that the compositing image overlaps the subject or another compositing image.

本発明は、上記事情に鑑みてなされたもので、その目的は、撮影された画像の被写体に基づいて合成用画像を合成し、配置シーンに適した画像を作成することができる画像処理装置,画像処理方法及び撮像装置を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an image processing apparatus that can synthesize an image for synthesis based on a subject of a captured image and create an image suitable for an arrangement scene. An object is to provide an image processing method and an imaging apparatus.

本発明の上記目的は、下記構成によって達成される。
(1)撮影画像中の被写体を検出する被写体検出手段と、
前記被写体の配置を演算によって判断する被写体位置解析手段と、
前記被写体の配置に応じて前記画像に合成する合成用画像を選択する画像選択手段と、
選択された前記合成用画像の配置を、他の合成用画像及び前記被写体と重ならないように決定する画像配置手段と、
前記合成用画像を合成する画像合成手段とを備え、前記被写体の数が複数である場合に、前記画像配置手段が被写体同士の配置に基づいて前記合成用画像を選択する画像処理装置。
(2)前記画像配置手段が、配置する前記合成用画像ごとに予め設定された画像サイズの範囲の中からランダムに大きさを選択する上記(1)に記載の画像処理装置。
(3)前記画像配置手段が、配置する前記合成用画像ごとに予め設定された画像の傾きの範囲の中からランダムに傾きを選択する上記(1)又は(2)に記載の画像処理装置。
(4)前記被写体同士の距離に応じて前記合成用画像を選択する上記(1)から(3)のいずれか1つに記載の画像処理装置。
(5)前記画像合成手段が連続的に撮影された各撮影画像に前記合成用画像を合成する場合に、今回の撮影画像における前記少なくとも1つの被写体の配置が前回の撮影画像における前記少なくとも1つの被写体の配置と同じである場合に、前回の撮影画像と合成された少なくとも1つの合成用画像と同じ少なくとも1つの合成用画像が、前回の撮影画像における少なくとも1つの被写体と該前回の撮影画像と合成された少なくとも1つの合成用画像との間の位置関係と同じ位置関係を今回の撮影画像における前記少なくとも1つの被写体と有するように配置される上記(1)から(4)のいずれか1つに記載の画像処理装
置。
(6)前記画像合成手段が連続的に撮影された各撮影画像に前記合成用画像を合成する場合に、前記連続的に撮影された画像の1枚目を撮影してから所定の時間が経過するまでの間、又は、所定数の前記撮影画像を処理するまでの間は、前回の撮影画像と合成された少なくとも1つの合成用画像と同じ少なくとも1つの合成用画像が、前回の撮影画像における少なくとも1つの被写体と該前回の撮影画像と合成された少なくとも1つの合成用画像との間の位置関係と同じ位置関係を今回の撮影画像における前記少なくとも1つの被写体と有するように配置される上記(1)から(4)のいずれか1つに記載の画像処理装置。
(7)前記被写体が人間の顔である上記(1)から(6)のいずれか1つに記載の画像処理装置。
(8)上記(1)から(7)に記載の画像処理装置を備えた撮像装置。
(9)撮影画像中の被写体を検出するステップと、
前記被写体の配置を演算によって判断するステップと、
前記被写体の配置に応じて前記画像に合成する合成用画像を選択する画像選択するステップと、
選択された前記合成用画像の配置を、他の合成用画像及び前記被写体と重ならないように決定するステップと、
前記合成用画像を合成するステップとを有し、前記被写体の数が複数である場合に、被写体同士の配置に基づいて前記合成用画像を選択する画像処理方法。
(10)配置する前記合成用画像ごとに予め設定された画像サイズの範囲の中からランダムに大きさを選択する上記(9)に記載の画像処理方法。
(11)配置する前記合成用画像ごとに予め設定された画像の傾きの範囲の中からランダムに傾きを選択する上記(9)又は(10)に記載の画像処理方法。
(12)前記被写体同士の距離に応じて前記合成用画像を選択する上記(9)から(11)のいずれか1つに記載の画像処理方法。
(13)合成用画像を合成するステップでは、連続的に撮影された各撮影画像に前記合成用画像を合成する場合に、今回の撮影画像における前記少なくとも1つの被写体の配置が前回の撮影画像における前記少なくとも1つの被写体の配置と同じである場合に、前回の撮影画像と合成された少なくとも1つの合成用画像と同じ少なくとも1つの合成用画像を、前回の撮影画像における少なくとも1つの被写体と該前回の撮影画像と合成された少なくとも1つの合成用画像との間の位置関係と同じ位置関係を今回の撮影画像における前記少なくとも1つの被写体と有するように配置する上記(9)から(12)のいずれか1つに記載の画像処理方法。
(14)合成用画像を合成するステップでは、連続的に撮影された各撮影画像に前記合成用画像を合成する場合に、前記連続的に撮影された画像の1枚目を撮影してから所定の時間が経過するまでの間、又は、所定数の前記撮影画像を処理するまでの間は、前回の撮影画像と合成された少なくとも1つの合成用画像と同じ少なくとも1つの合成用画像を、前回の撮影画像における少なくとも1つの被写体と該前回の撮影画像と合成された少なくとも1つの合成用画像との間の位置関係と同じ位置関係を今回の撮影画像における前記少なくとも1つの被写体と有するように配置する上記(9)から(12)のいずれか1つに記載の画像処理方法。
(15)前記被写体が人間の顔である上記(9)から(14)のいずれか1つに記載の画像処理方法。
The above object of the present invention is achieved by the following configurations.
(1) subject detection means for detecting a subject in a captured image;
Subject position analysis means for judging the placement of the subject by calculation;
Image selecting means for selecting a composition image to be combined with the image according to the arrangement of the subject;
Image placement means for determining the placement of the selected composition image so as not to overlap with another composition image and the subject;
An image processing apparatus comprising: an image composition unit configured to compose the composition image; and when the number of subjects is plural, the image placement unit selects the composition image based on the placement of subjects.
(2) The image processing apparatus according to (1), wherein the image placement unit randomly selects a size from a range of image sizes set in advance for each of the composition images to be placed.
(3) The image processing apparatus according to (1) or (2), wherein the image placement unit randomly selects a tilt from a range of tilts of an image set in advance for each of the composition images to be placed.
(4) The image processing apparatus according to any one of (1) to (3), wherein the composition image is selected according to a distance between the subjects.
(5) When the image synthesizing unit synthesizes the composition image with each of the continuously photographed images, the arrangement of the at least one subject in the current photographed image is the at least one object in the previous photographed image. When the subject arrangement is the same, at least one compositing image that is the same as at least one compositing image synthesized with the previous photographed image includes at least one subject in the previous photographed image and the previous photographed image. Any one of the above (1) to (4) arranged so as to have the same positional relationship as at least one combined image with the at least one subject in the current captured image An image processing apparatus according to 1.
(6) When the image synthesizing unit synthesizes the composition image with each of the continuously photographed images, a predetermined time has elapsed since the first image of the continuously photographed images was photographed. Until the predetermined number of the captured images is processed, at least one compositing image that is the same as at least one compositing image combined with the previous captured image is included in the previous captured image. The above (positioned so as to have the same positional relationship as the positional relationship between at least one subject and the at least one composition image combined with the previous captured image with the at least one subject in the current captured image) The image processing apparatus according to any one of 1) to (4).
(7) The image processing apparatus according to any one of (1) to (6), wherein the subject is a human face.
(8) An imaging device including the image processing device according to (1) to (7).
(9) detecting a subject in the captured image;
Determining the placement of the subject by calculation;
Selecting an image for selecting a synthesis image to be synthesized with the image according to the arrangement of the subject;
Determining the arrangement of the selected composition image so as not to overlap with another composition image and the subject;
An image processing method for selecting the composition image based on the arrangement of the subjects when the number of subjects is plural.
(10) The image processing method according to (9), wherein a size is randomly selected from a range of image sizes set in advance for each of the synthesis images to be arranged.
(11) The image processing method according to (9) or (10), wherein an inclination is randomly selected from an image inclination range set in advance for each of the composition images to be arranged.
(12) The image processing method according to any one of (9) to (11), wherein the composition image is selected according to the distance between the subjects.
(13) In the step of synthesizing the synthesis image, when the synthesis image is synthesized with each of the continuously photographed images, the arrangement of the at least one subject in the current photographed image is the same as that in the previous photographed image. When the arrangement of the at least one subject is the same, at least one compositing image that is the same as the at least one compositing image synthesized with the previous captured image is used as at least one subject in the previous captured image. Any one of (9) to (12) above is arranged so as to have the same positional relationship as the positional relationship between the captured image and at least one combined image with the at least one subject in the current captured image The image processing method as described in any one.
(14) In the step of synthesizing the image for synthesis, when the image for synthesis is synthesized with each of the continuously photographed images, the first image of the continuously photographed image is photographed and predetermined. Until the predetermined time elapses or until a predetermined number of the photographed images are processed, at least one composition image that is the same as at least one composition image synthesized with the previous photographed image is Arranged so as to have the same positional relationship as the positional relationship between at least one subject in the captured image and at least one composition image combined with the previous captured image with the at least one subject in the current captured image The image processing method according to any one of (9) to (12) above.
(15) The image processing method according to any one of (9) to (14), wherein the subject is a human face.

本発明によれば、被写体の配置を判断し、その被写体の配置の情報に基づいて合成する合成用画像を選択するとともに、選択された合成用画像を被写体の配置に応じて重ならない範囲で配置することができる。撮影画像に対して完全にランダムに合成用画像を配置する場合には、被写体と合成用画像との重なり合いが生じるおそれがある。しかし、本願によれば被写体の配置に基づいて合成用画像の配置を決定するため、被写体と合成用画像との重なり合いが生じることを回避することができ、合成後の画像が、撮像画像のシーンに即するように表示される。   According to the present invention, the arrangement of a subject is determined, a synthesis image to be synthesized is selected based on information on the arrangement of the subject, and the selected synthesis image is arranged within a range that does not overlap according to the arrangement of the subject. can do. When the composition image is arranged completely at random with respect to the photographed image, there is a possibility that the subject and the composition image overlap. However, according to the present application, since the arrangement of the compositing image is determined based on the arrangement of the subject, it is possible to avoid the overlap between the subject and the compositing image, and the synthesized image is the scene of the captured image. Will be displayed in line with

さらに、連続的に撮影された撮影画像に合成を行う場合に、被写体の配置が前回の被写体の配置と同じときに、前回と同じ合成用画像を前回の被写体と該前回の合成用画像との位置関係と同じ位置関係になるように配置すれば、例えば、スルー画や動画の表示がみやすくなる。   Further, when performing composition on continuously photographed images, when the subject arrangement is the same as the previous subject arrangement, the same composition image as the previous one is combined with the previous subject and the previous composition image. If it is arranged so as to have the same positional relationship as the positional relationship, for example, display of a through image and a moving image becomes easy to see.

本発明によれば、撮影された画像の被写体に基づいて合成用画像を合成し、配置シーンに適した画像を作成することができる画像処理装置,画像処理方法及び撮像装置を提供できる。   According to the present invention, it is possible to provide an image processing apparatus, an image processing method, and an imaging apparatus that can synthesize a composition image based on a subject of a photographed image and create an image suitable for an arrangement scene.

本発明にかかる画像処理装置及び撮像装置の一例を示す構成図である。1 is a configuration diagram illustrating an example of an image processing apparatus and an imaging apparatus according to the present invention. 撮像画像に合成用画像を合成するときの制御を示すブロック部である。It is a block part which shows the control when synthesize | combining the image for a synthesis | combination with a captured image. 本発明にかかる第1実施形態の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of 1st Embodiment concerning this invention. 顔位置の検出を行っている状態を示す図である。It is a figure which shows the state which is detecting the face position. 顔位置の判定を行っている状態を示す図である。It is a figure which shows the state which is determining the face position. 合成用画像の一例を示す図である。It is a figure which shows an example of the image for a synthesis | combination. 撮像画像に合成エリアを設定する状態を示す図である。It is a figure which shows the state which sets a synthetic | combination area to a captured image. 合成エリアに合成用画像を配置した状態を示す図である。It is a figure which shows the state which has arrange | positioned the image for a synthesis | combination in a synthetic | combination area. 合成用画像ごとに大きさ及びその傾きが設定されている状態を示す図である。It is a figure which shows the state in which the magnitude | size and its inclination are set for every image for a synthesis | combination. 第1実施形態の処理により作成された合成画像の一例を示す図である。It is a figure which shows an example of the synthesized image produced by the process of 1st Embodiment. 第1実施形態の処理を実行せずに作成された合成画像を示す図である。It is a figure which shows the synthesized image produced without performing the process of 1st Embodiment. 第1実施形態の処理により作成された合成画像の他の例を示す図である。It is a figure which shows the other example of the synthesized image produced by the process of 1st Embodiment. 第2実施形態の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of 2nd Embodiment. 被写体配置の関係の判定を行っている状態を示す図である。It is a figure which shows the state which is determining the relationship of to-be-photographed object arrangement | positioning. 合成用画像の一例を示す図である。It is a figure which shows an example of the image for a synthesis | combination. 撮像画像に合成エリアを設定する状態を示す図である。It is a figure which shows the state which sets a synthetic | combination area to a captured image. 合成エリアに合成用画像を配置した状態を示す図である。It is a figure which shows the state which has arrange | positioned the image for a synthesis | combination in a synthetic | combination area. 第2実施形態の処理により作成された合成画像の一例を示す図である。It is a figure which shows an example of the synthesized image produced by the process of 2nd Embodiment. 第2実施形態の処理により作成された合成画像の他の例を示す図である。It is a figure which shows the other example of the synthesized image produced by the process of 2nd Embodiment. 第3実施形態の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of 3rd Embodiment. 連続したフレームで合成用画像が被写体に追従することを説明する図である。It is a figure explaining that the image for a composition follows a to-be-photographed object by a continuous frame. 第4実施形態の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of 4th Embodiment.

以下、本発明の実施形態を図面に基づいて詳しく説明する。
図1は、本発明にかかる画像処理装置及び撮像装置の一例を示す構成図である。以下の実施形態では、デジタルカメラの構成を例に説明するが、本発明にかかる画像処理装置及び撮像装置は特にこれに限定されない。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a configuration diagram illustrating an example of an image processing apparatus and an imaging apparatus according to the present invention. In the following embodiments, the configuration of a digital camera will be described as an example, but the image processing apparatus and the imaging apparatus according to the present invention are not particularly limited thereto.

デジタルカメラ1は、被写体を撮像する撮像部を備えている。撮像部には、レンズ11と、絞り12と、フィルタ13と、入射光に応じて画像データを生成する固体撮像素子(CCD)14と、固体撮像素子14で生成されたアナログ信号の画像データが入力されるアナログ信号処理部15と、信号処理されたアナログ信号をデジタル信号に変換するA/D変換部16と、を備えている。また、レンズ11を駆動するレンズ駆動部17と、絞り12を駆動する絞り駆動部18と、固体撮像素子14に駆動信号を供給するCCD駆動部19と、を備えている。また、レンズ駆動部17、絞り駆動部18、CCD駆動部19は、CPU20に接続されている。本実施形態では撮像素子としてCCDを用いた構成を示しているが、特に限定されず、CMOSイメージセンサーを用いてもよい。   The digital camera 1 includes an imaging unit that images a subject. In the imaging unit, the lens 11, the diaphragm 12, the filter 13, a solid-state imaging device (CCD) 14 that generates image data according to incident light, and analog signal image data generated by the solid-state imaging device 14 are stored. An input analog signal processing unit 15 and an A / D conversion unit 16 that converts the signal-processed analog signal into a digital signal are provided. In addition, a lens driving unit 17 that drives the lens 11, a diaphragm driving unit 18 that drives the diaphragm 12, and a CCD driving unit 19 that supplies a driving signal to the solid-state imaging device 14 are provided. The lens driving unit 17, the aperture driving unit 18, and the CCD driving unit 19 are connected to the CPU 20. In the present embodiment, a configuration using a CCD as an image sensor is shown, but there is no particular limitation, and a CMOS image sensor may be used.

デジタルカメラ1には、使用者が撮影時に操作可能な操作部21が設けられ、該操作部21がCPU20に接続されている。   The digital camera 1 is provided with an operation unit 21 that can be operated by a user during photographing, and the operation unit 21 is connected to the CPU 20.

また、デジタルカメラ1には、A/D変換部16及びCPU20とバスを介して、メモリ制御部22と、デジタル信号処理部24と、圧縮伸張処理部25と、積算部26と、外部メモリ制御部27と、表示制御部29と、画像処理部31とが、それぞれ接続されている。メモリ制御部22にはメインメモリ23が接続されている。外部メモリ制御部27には外部メモリ28が接続されている。また、表示制御部29には、LCDなどの表示部30が接続されており、撮像画像や、合成用画像を合成した撮像画像を表示される。   Further, the digital camera 1 includes a memory control unit 22, a digital signal processing unit 24, a compression / decompression processing unit 25, an integration unit 26, and an external memory control via the A / D conversion unit 16 and the CPU 20 and a bus. The unit 27, the display control unit 29, and the image processing unit 31 are connected to each other. A main memory 23 is connected to the memory control unit 22. An external memory 28 is connected to the external memory control unit 27. The display control unit 29 is connected to a display unit 30 such as an LCD, and displays a captured image or a captured image obtained by synthesizing a synthesis image.

本実施形態のデジタルカメラ1には、撮像画像において所定の被写体(本実施形態では人間の顔とした。)を検出する被写体検出手段として機能する顔検出部42と、被写体の配置を演算によって判断する被写体位置解析手段として機能する顔位置解析部44と、被写体の配置に応じて画像に合成する合成用画像をランダムに選択する画像選択手段として機能する画像選択部46と、選択された合成用画像の配置を他の合成用画像及び被写体と重ならないようにランダムに決定する画像配置手段として機能する画像配置部48と、合成用画像を合成する画像合成手段として機能する画像合成部50と、を備えている。また、合成用画像を予め記憶する合成用画像記憶部52が設けられている。   The digital camera 1 of the present embodiment includes a face detection unit 42 that functions as a subject detection unit that detects a predetermined subject (a human face in the present embodiment) in a captured image, and determines the placement of the subject by calculation. A face position analyzing unit 44 that functions as a subject position analyzing unit, an image selecting unit 46 that functions as an image selecting unit that randomly selects a composite image to be combined with an image according to the arrangement of the subject, and the selected combining unit An image arrangement unit 48 that functions as an image arrangement unit that randomly determines the arrangement of images so as not to overlap with other synthesis images and subjects; an image synthesis unit 50 that functions as an image synthesis unit that synthesizes the synthesis image; It has. Also, a composition image storage unit 52 that stores a composition image in advance is provided.

図2は、撮像画像に合成用画像を合成するときの制御を示すブロック部である。撮像時に撮像された撮像画像の撮像画像の情報(図2では、スルー画としているが静止画でもよい。)がCCD20で生成され、該撮像画像の情報が顔検出部42と画像合成部50にそれぞれ入力される。顔検出部42は、撮像画像の情報から所望の被写体を検出する。本実施形態では、人間の顔を検出する被写体としているがこれに限定されず、その他の物体や人物全体像を被写体としてもよい。顔検出部42で検出された顔位置の情報が、顔位置解析部44と画像配置部48とにそれぞれ供給される。   FIG. 2 is a block unit illustrating control when a composite image is combined with a captured image. Information of the captured image of the captured image captured at the time of imaging (in FIG. 2, a through image is used but may be a still image) is generated by the CCD 20, and the information of the captured image is transmitted to the face detection unit 42 and the image composition unit 50. Each is entered. The face detection unit 42 detects a desired subject from information of the captured image. In the present embodiment, a subject for detecting a human face is used. However, the present invention is not limited to this. Other objects and a whole person image may be used as a subject. Information on the face position detected by the face detection unit 42 is supplied to the face position analysis unit 44 and the image placement unit 48, respectively.

顔位置解析部44は、顔位置の情報に基づいて、撮像画像中において顔位置がどのように配置されているかを演算して、顔位置解析結果を画像選択部46に供給する。   The face position analysis unit 44 calculates how the face position is arranged in the captured image based on the face position information, and supplies the face position analysis result to the image selection unit 46.

画像選択部46は、顔位置解析結果に基づいて画像に合成する合成用画像をランダムに選択する。このとき、合成用画像は、予め顔位置の配置に応じて設定された合成用画像を記憶する合成用画像記憶部52から読み出される。画像選択部46から画像選択情報が画像配置部48に供給される。画像配置部48は、顔位置の情報と、画像選択情報と、合成用画像記憶部53から供給される合成用画像とに基づいて、選択された合成用画像の配置を、他の合成用画像及び被写体の顔と重ならないように、ランダムに決定する。そして、合成用画像の決定された配置を画像配置情報として画像合成部50に供給する。   The image selection unit 46 randomly selects a synthesis image to be synthesized with the image based on the face position analysis result. At this time, the compositing image is read from the compositing image storage unit 52 that stores the compositing image set in advance according to the face position arrangement. Image selection information is supplied from the image selection unit 46 to the image arrangement unit 48. The image arrangement unit 48 arranges the arrangement of the selected composition image based on the face position information, the image selection information, and the composition image supplied from the composition image storage unit 53, as another composition image. Also, it is determined at random so as not to overlap the face of the subject. Then, the determined arrangement of the composition image is supplied to the image composition unit 50 as image arrangement information.

画像合成部50は、CCDから供給された撮像画像と、画像配置部48から供給された画像配置情報と、合成用画像記憶部52から供給された合成用画像とに基づいて、撮像画像に合成用画像を合成する。そして、合成画像を表示部30に出力し、表示部30で合成画像を表示する。   The image composition unit 50 synthesizes the captured image based on the captured image supplied from the CCD, the image arrangement information supplied from the image arrangement unit 48, and the composition image supplied from the composition image storage unit 52. Composite images. Then, the composite image is output to the display unit 30 and the display unit 30 displays the composite image.

次に、本発明にかかる画像処理の手順を図面に基づいて説明する。図3は、本発明にかかる第1実施形態の処理手順を示すフローチャートである。   Next, an image processing procedure according to the present invention will be described with reference to the drawings. FIG. 3 is a flowchart showing a processing procedure of the first embodiment according to the present invention.

先ず、取得した撮影画像から顔位置の検出を行う。図4は、顔位置の検出を行っている状態を示しており、図4(a)は、顔位置が撮像画像の中央部にある状態を示し、図4(b)は、顔位置が撮像画像の周辺部にある状態を示している。なお、図中では、顔位置を破線で囲んだ領域で示している。顔位置を検出した後、顔位置が中央部にあるか否かの判定を行う。   First, the face position is detected from the acquired photographed image. 4 shows a state where the face position is detected, FIG. 4A shows a state where the face position is in the center of the captured image, and FIG. 4B shows a state where the face position is captured. The state in the peripheral part of the image is shown. In the drawing, the face position is indicated by a region surrounded by a broken line. After detecting the face position, it is determined whether or not the face position is in the center.

図5は、顔位置の判定を行っている状態を示しており、図5(a)は、顔位置が撮像画像の中央部にある状態を示し、図5(b)は、顔位置が撮像画像の周辺部にある状態を示している。なお、図中では、顔位置を破線で囲んだ領域で示している。   FIG. 5 shows a state where the face position is determined, FIG. 5A shows a state where the face position is in the center of the captured image, and FIG. 5B shows a state where the face position is captured. The state in the peripheral part of the image is shown. In the drawing, the face position is indicated by a region surrounded by a broken line.

顔位置の判定の具体例としては、図5に示すように、撮像画面の周辺端部から一定幅Wの周辺部判定領域を設定し、顔位置が周辺部判定領域と重なっている場合を周辺部とし、重なっていない場合を中央部と判定することができる。   As a specific example of the determination of the face position, as shown in FIG. 5, a peripheral determination area having a constant width W is set from the peripheral edge of the imaging screen, and the face position overlaps with the peripheral determination area. It is possible to determine that the center portion is a portion that does not overlap.

次に、判定された顔位置により予め設定された合成用画像の中から適切な画像を0個以上ランダムで選択する。図6(a)は、合成用画像の一例を示す図であり、図6(b)は、選択された合成用画像の個数を示す図である。ここで、「0個以上」としたのは、合成用画像を選択せず、つまり、合成をしないという場合もあることを意味する。図6(a)に示すように、合成用画像を予め中央部用と周辺部用として別々に用意しておき、顔位置の判定により適切な画像の中からランダムで0個以上の画像を選ぶ。合成用画像は、予め撮像した画像や、外部から取得した画像を用いることができる。また、合成用画像を選択する場合には、図6(b)に示すように同じ合成用画像が複数個選択されてもよいし、一つも選択されない画像があってもよい。また、使用者が予め最大画像数を設定しておき、その数以下の画像を選択してもよい。   Next, 0 or more appropriate images are randomly selected from the images for synthesis set in advance according to the determined face position. FIG. 6A is a diagram illustrating an example of a composition image, and FIG. 6B is a diagram illustrating the number of selected composition images. Here, “0 or more” means that there is a case in which the image for synthesis is not selected, that is, the image is not synthesized. As shown in FIG. 6 (a), images for synthesis are separately prepared for the central portion and the peripheral portion in advance, and 0 or more images are randomly selected from appropriate images by determining the face position. . As the synthesis image, an image captured in advance or an image acquired from the outside can be used. When selecting a composition image, a plurality of the same composition images may be selected as shown in FIG. 6B, or there may be images in which none is selected. Alternatively, the user may set the maximum number of images in advance and select an image equal to or less than that number.

合成用画像を選択した後、さらに,顔位置の判定に基づいて適切な合成エリアを設定する。図7は、撮像画像に合成エリアを設定する状態を示す図であり、図7(a)は、撮像画像の中央部に顔位置がある場合に合成エリアを設定する状態を示し、図7(b)は、撮像画像の周辺部に顔位置がある場合に合成エリアを設定する状態を示している。図7(a),(b)に示すように、本実施形態では、顔位置に応じて、合成エリアの位置と形状を設定している。合成エリアの形状は任意であるが,ここでは被写体(顔領域)と重ならない領域を合成エリアとしている。   After selecting the composition image, an appropriate composition area is set based on the determination of the face position. FIG. 7 is a diagram illustrating a state in which a composite area is set in the captured image. FIG. 7A illustrates a state in which the composite area is set when the face position is in the center of the captured image. b) shows a state in which a synthesis area is set when the face position is in the periphery of the captured image. As shown in FIGS. 7A and 7B, in the present embodiment, the position and shape of the synthesis area are set according to the face position. The shape of the composite area is arbitrary, but here, the area that does not overlap the subject (face area) is defined as the composite area.

続いて、設定された合成エリア内に、合成用画像を一つずつランダムに配置する。図8は、合成エリアに合成用画像を配置した状態を示す図であり、図8(a)は、撮像画像の中央部に顔位置がある場合に合成エリアに合成用画像を配置した状態を示し、図8(b)は、撮像画像の周辺部に顔位置がある場合に合成エリアに合成用画像を配置した状態を示している。合成用画像の位置,大きさ,方向はランダムに決定されるが、合成エリア内に収まるように、かつ、合成用画像同士が重ならないように配置が選択される。   Subsequently, the composition images are randomly arranged one by one in the set composition area. FIG. 8 is a diagram illustrating a state in which the composition image is arranged in the composition area. FIG. 8A illustrates a state in which the composition image is disposed in the composition area when the face position is in the center of the captured image. FIG. 8B shows a state in which the compositing image is arranged in the compositing area when the face position is in the periphery of the captured image. The position, size, and direction of the compositing image are determined at random, but the arrangement is selected so as to be within the compositing area and so that the compositing images do not overlap.

図9は、合成用画像ごとに大きさ及びその傾きが設定されている状態を示している。図10は、撮像画像に合成用画像を合成した状態を示す図であり、図10(a)は、撮像画像の中央部に顔位置がある場合に、合成用画像を合成した状態を示し、図10(b)は、撮像画像の周辺部に顔位置がある場合に、合成用画像を合成した状態を示している。図9に示すように、合成用画像の大きさは、「最小サイズ」と「最大サイズ」を合成用画像ごとに定義しておき、その範囲内でランダムな大きさを選択することができる。こうすれば、撮像画像に合成した後で、合成用画像が小さすぎて見えなくなることや不自然に大きくなりすぎることを防ぐことができる。合成用画像の方向に関しても同様に、撮像画像に対する傾きの範囲(例えば、−30°から30°等)を画像ごとに定義しておくことにより、撮像画像のシーンに対して不自然な方向で配置されることを防ぐことができる。   FIG. 9 shows a state in which the size and the inclination thereof are set for each compositing image. FIG. 10 is a diagram illustrating a state in which the composite image is combined with the captured image. FIG. 10A illustrates a state in which the composite image is combined when the face position is in the center of the captured image. FIG. 10B shows a state in which the synthesis image is synthesized when the face position is in the periphery of the captured image. As shown in FIG. 9, as the size of the composition image, “minimum size” and “maximum size” are defined for each composition image, and a random size can be selected within the range. In this way, it is possible to prevent the composite image from becoming too small to be seen or becoming unnaturally large after being combined with the captured image. Similarly, with respect to the direction of the image for synthesis, by defining a range of inclination with respect to the captured image (for example, −30 ° to 30 °, etc.) for each image, the direction of the captured image is unnatural. It can prevent being arranged.

撮像画像に所定の合成用画像を全て配置して合成し、合成画像を作成することで本実施形態の処理が終了する。上記の画像処理を実行することにより、被写体の配置に応じて、適切な合成用画像が適切な配置で合成することができる。   The processing of this embodiment is completed by arranging and synthesizing all the predetermined images for synthesis on the captured image and creating a synthesized image. By executing the above image processing, it is possible to synthesize an appropriate composition image with an appropriate arrangement according to the arrangement of the subject.

図11は、本実施形態の処理を実行せずに作成された合成画像を示す図である。被写体(顔)の配置を判断し、その被写体の配置の情報に基づいて合成する合成用画像をランダムに選択するとともに、選択された合成用画像を被写体の配置に応じて重ならない範囲でランダムに配置するため、図11に示す、撮影画像に対して完全にランダムに合成用画像を配置する場合のように、被写体と合成用画像との重なり合いが生じることを回避できる。本実施形態によれば、被写体の配置情報を合成用画像の選択と、合成用画像の合成場所の決定に用いることで、完全なランダムではなく被写体の配置により画像選択,画像配置に一定の制限をかけている。これによって、被写体の配置に基づいて合成用画像の配置を決定するため、被写体と合成用画像との重なり合いが生じることを回避することができ、合成後の画像が、撮像画像のシーンに即するように表示される。   FIG. 11 is a diagram illustrating a composite image created without executing the processing of the present embodiment. Judgment is made on the subject (face) arrangement, and a composition image to be synthesized is randomly selected based on the subject arrangement information, and the selected composition image is randomly selected in a range that does not overlap depending on the subject arrangement. Because of the arrangement, it is possible to avoid the overlap between the subject and the image for synthesis as in the case where the image for synthesis is arranged completely at random with respect to the photographed image shown in FIG. According to the present embodiment, subject placement information is used to select a composition image and to determine a composition location of the composition image, so that certain restrictions are imposed on image selection and image placement by subject placement rather than complete randomness. It is over. As a result, the arrangement of the composition image is determined based on the arrangement of the subject, so that it is possible to avoid the overlap between the subject and the composition image, and the composite image matches the scene of the captured image. Is displayed.

また、図10(b)に示すように、顔位置が撮像画像のフレームからはみ出てしまった場合に、顔位置が中央部にある場合(図10(a)参照)とは異なる注意を促すような表示を行うことが可能である。   Also, as shown in FIG. 10B, when the face position protrudes from the frame of the captured image, a different caution than when the face position is in the center (see FIG. 10A) is urged. Display is possible.

図12は、本実施形態の処理により作成された合成画像の他の例を示す図である。選択される合成用画像の配置,数,種類がランダムであるため、同じシーンであっても撮影するたびに合成画像が変化する。例えば、顔位置が中央部にある図10(a)と同じシーンを全く同じ条件で再度撮影した場合でも、図10(a)の合成画像とは異なった合成用画像の配置を有する図12のような画像が得られる可能性がある。このように、撮影ごとに合成される画像が変化するため、使用者は意外性のある撮影を楽しむことができる。   FIG. 12 is a diagram showing another example of the composite image created by the processing of the present embodiment. Since the arrangement, number, and type of images for synthesis to be selected are random, the synthesized image changes every time the image is taken even in the same scene. For example, even when the same scene as in FIG. 10A in which the face position is in the center is re-photographed under exactly the same conditions, the composition image in FIG. 12 has a layout different from the composite image in FIG. 10A. Such an image may be obtained. As described above, since the image to be combined is changed every time shooting is performed, the user can enjoy unexpected shooting.

なお、本実施形態は一例であり、適宜変更可能である。例えば、顔以外の被写体を対象として同様の処理を行うことも考えられる。また、本実施形態では被写体の配置として顔の位置のみを判定基準に合成用画像の選択や合成エリアの定義を行っているが、顔の大きさや方向に応じてそれらを変化させてもよい。さらに、本実施形態では、合成エリアを定義してからそのエリアに収まるように合成用画像の配置を行ったが、合成エリアを定義せず、合成用画像を配置してからその配置が適切かどうかを判定し、適切でない場合は配置をやり直すといった処理とすることで同様の効果を得ることができる。したがって、本実施形態において合成エリアの定義をする手順は必須の処理ではない。   This embodiment is an example and can be changed as appropriate. For example, it is conceivable to perform the same processing on a subject other than the face. In this embodiment, the composition image is selected and the composition area is defined based on only the position of the face as the subject arrangement in the present embodiment, but they may be changed according to the size and direction of the face. Furthermore, in this embodiment, the composition image is arranged so that it fits in the area after defining the composition area. However, the composition area is not defined and the composition image is arranged and then the arrangement is appropriate. A similar effect can be obtained by determining whether or not to re-arrange the layout if it is not appropriate. Therefore, the procedure for defining a composite area in this embodiment is not an essential process.

次に、本発明にかかる第2実施形態を図面に基づいて説明する。
図13は、本実施形態の処理手順を示すフローチャートである。本実施形態では、1個の被写体の配置だけでなく、被写体間の関係を考慮して処理を行う。
Next, 2nd Embodiment concerning this invention is described based on drawing.
FIG. 13 is a flowchart showing the processing procedure of the present embodiment. In the present embodiment, processing is performed in consideration of not only the arrangement of one subject but also the relationship between subjects.

先ず、撮影シーンから顔位置と顔の数を検出する。図14は、撮像画像に2個の顔がある場合の状態を示す図であり、図14(a)は、顔同士の距離が近い場合の状態を示しており、図14(b)は、顔同士の距離が遠い場合の状態を示している。そして、顔数が2個であるか否かを判定し、2個でない場合は処理を終了する。顔数が2個である場合は続いて顔間の距離が閾値THより小さいか否かを判定する。閾値THは、例えば二つの顔の大きさから決定される値で、二つの顔の幅の平均を閾値THとするなどが考えられる。   First, the face position and the number of faces are detected from the shooting scene. FIG. 14 is a diagram illustrating a state where there are two faces in the captured image, FIG. 14A illustrates a state where the distance between the faces is short, and FIG. The state when the distance between the faces is long is shown. Then, it is determined whether or not the number of faces is two. If not, the process is terminated. When the number of faces is two, it is subsequently determined whether or not the distance between the faces is smaller than the threshold value TH. The threshold value TH is a value determined from the size of two faces, for example, and the average of the widths of the two faces can be considered as the threshold value TH.

次に判定された顔距離により予め設定された合成用画像の中から適切な画像を0個以上ランダムで選択する。図15は合成用画像の一例を示す図である。図15に示すように、合成用画像を、顔距離が近い場合と遠い場合で別々に予め用意しておき、顔距離の判定に応じて適切な画像の中からランダムで0個以上の画像を選ぶ。なお、本実施形態において、上記実施形態と同様に同じ画像が複数個選択されてもよく、または、合成用画像が一つも選択されなくてもよい。また、合成用画像ごとに予め最大画像数を設定しておき、その数以下の画像を選択してもよい。   Next, 0 or more appropriate images are randomly selected from the images for synthesis set in advance according to the determined face distance. FIG. 15 is a diagram illustrating an example of a composition image. As shown in FIG. 15, images for synthesis are separately prepared for cases where the face distance is short and far, and zero or more images are randomly selected from appropriate images according to the determination of the face distance. Choose. In the present embodiment, a plurality of the same images may be selected as in the above embodiment, or no image for synthesis may be selected. Alternatively, the maximum number of images may be set in advance for each image for synthesis, and images less than that number may be selected.

次に、顔距離の判定に基づいて適切な合成エリアを設定する。図16は、撮像画像に合成エリアを設定する状態を示す図であり、図16(a)は、顔距離が近い場合に合成エリアを設定する状態を示し、図16(b)は、顔距離が遠い場合に合成エリアを設定する状態を示している。なお、合成エリアの形状は任意であるが,ここでは被写体(顔領域)と重ならない領域を合成エリアとしている。   Next, an appropriate composition area is set based on the determination of the face distance. FIG. 16 is a diagram illustrating a state in which a composite area is set in a captured image. FIG. 16A illustrates a state in which a composite area is set when the face distance is short, and FIG. 16B illustrates a face distance. This shows a state in which the composition area is set when is far away. The shape of the synthesis area is arbitrary, but here, the area that does not overlap the subject (face area) is defined as the synthesis area.

続いて、合成エリア内に合成用画像を一つずつランダムに配置する。図17は、合成エリアに合成用画像を配置した状態を示す図であり、図17(a)は、顔距離が近い場合に合成エリアに合成用画像を配置した状態を示し、図17(b)は、顔距離が遠い場合に合成エリアに合成用画像を配置した状態を示している。合成用画像の位置,大きさ,方向はランダムであるが、合成エリア内に収まるように、かつ、合成画像同士が重ならないような配置を選択する。合成用画像の大きさには、図9に示したように、「最小サイズ」と「最大サイズ」を合成用画像ごとに定義しておき、その範囲内でランダムな大きさを選択することにより合成用画像が小さすぎて見えなくなることや不自然に大きくなりすぎることを防ぐことができる。合成用画像の方向に関しても同様に、傾きの最大値を画像ごとに定義しておくことにより、方向性を持つ画像が不自然な方向で配置されることを防ぐことができる。撮像画像に所定の合成用画像を全て配置して合成し、合成画像を作成することで本実施形態の処理が終了する。   Subsequently, the synthesis images are randomly arranged one by one in the synthesis area. FIG. 17 is a diagram illustrating a state in which a composition image is arranged in the composition area. FIG. 17A illustrates a state in which the composition image is disposed in the composition area when the face distance is short, and FIG. ) Shows a state in which the compositing image is arranged in the compositing area when the face distance is long. Although the position, size, and direction of the image for synthesis are random, an arrangement is selected so that the images are within the synthesis area and do not overlap with each other. As shown in FIG. 9, the “minimum size” and “maximum size” are defined for each composition image, and a random size is selected within the range. It is possible to prevent the composite image from being too small to be seen or unnaturally large. Similarly, with respect to the direction of the composition image, by defining the maximum value of the inclination for each image, it is possible to prevent an image having directionality from being arranged in an unnatural direction. The processing of this embodiment is completed by arranging and synthesizing all the predetermined images for synthesis on the captured image and creating a synthesized image.

図18は、本実施形態の処理により作成された合成画像の一例を示す図であり、図18(a)は、顔距離が近い撮像画像に合成用画像を合成した状態を示し、図18(b)は、顔距離が遠い撮像画像に合成用画像を合成した状態を示している。
本実施形態では、被写体の配置の関係に応じて,適切な合成用画像が適切な配置で合成されることにより、例えば顔距離が近い場合(図18(a))と顔距離が遠い場合(図18(b))で、それぞれ所定の合成用画像を合成するため、視覚的な効果が異なる表示を行うことが可能である。また、選択される合成用画像の配置,数,種類はランダムであるため、同じシーンであっても撮影するたびに合成画像が変化する。例えば、顔位置が遠い場合である、図18(b)と同じシーンを同じ条件で再度撮影した場合であっても、図19に示すような合成画像が得られる可能性がある。このように撮影ごとに作成される合成画像が変化するため、使用者は意外性のある撮影を楽しむことができる。
FIG. 18 is a diagram illustrating an example of a composite image created by the processing of the present embodiment. FIG. 18A illustrates a state in which a composite image is combined with a captured image with a close face distance. b) shows a state in which a compositing image is combined with a captured image having a long face distance.
In the present embodiment, an appropriate compositing image is synthesized with an appropriate arrangement in accordance with the relationship of the arrangement of subjects, for example, when the face distance is short (FIG. 18 (a)) and when the face distance is long ( In FIG. 18 (b)), since predetermined images for synthesis are synthesized, it is possible to perform display with different visual effects. In addition, since the arrangement, number, and type of the composition images to be selected are random, the composition image changes every time a photograph is taken even in the same scene. For example, even when the same scene as in FIG. 18B is taken again under the same conditions, which is a case where the face position is far away, a composite image as shown in FIG. 19 may be obtained. In this way, the composite image created for each shooting changes, so that the user can enjoy unexpected shooting.

なお、本実施形態の手順は一例であり、例えば顔以外の被写体を対象として同様の処理を行うこともできる。また、本実施形態では被写体の配置として顔の位置関係のみを判定基準に用いて合成用画像の選択や合成エリアの定義を行っているが、顔の大きさや方向の関係に応じてそれらを変化させてもよい。さらに、本実施形態では合成エリアを定義してからそのエリアに収まるように合成用画像の配置を行ったが、合成エリアを定義せず、合成用画像を配置してからその配置が適切かどうかを判定し、適切でない場合は配置をやり直すといった処理で本実施形態と同様の効果を得られる。このため、本実施形態において合成エリアの定義は必須の処理ではない。   Note that the procedure of the present embodiment is an example, and the same processing can be performed for a subject other than the face, for example. Also, in this embodiment, only the positional relationship of the face is used as the criterion for the subject arrangement, and the composition image is selected and the composition area is defined. However, these are changed according to the relationship between the size and direction of the face. You may let them. Furthermore, in this embodiment, the composition image is arranged so that it fits in the area after defining the composition area. However, the composition area is not defined, and the composition image is arranged and then the arrangement is appropriate. If it is not appropriate, the same effect as this embodiment can be obtained by processing such as re-arranging. For this reason, in this embodiment, the definition of the composite area is not an essential process.

次に、本発明の第3実施形態を図面に基づいて説明する。図20は本実施形態の処理手順を示すフローチャートである。本実施形態では、連続的に撮影された撮影画像に合成を行うときの処理の一例を説明する。   Next, 3rd Embodiment of this invention is described based on drawing. FIG. 20 is a flowchart showing the processing procedure of this embodiment. In the present embodiment, an example of processing when composition is performed on continuously captured images will be described.

図20に示すように、顔位置の検出するステップ、顔位置の配置を演算によって判断するステップ、被写体の配置に応じて画像に合成する合成用画像をランダムに選択するステップ、及び、選択された合成用画像の配置を、他の合成用画像及び被写体と重ならないようにランダムに決定するステップは、上記実施形態と同じである。   As shown in FIG. 20, the step of detecting the face position, the step of judging the arrangement of the face position by calculation, the step of randomly selecting the image for synthesis to be combined with the image according to the arrangement of the subject, and the selected The step of randomly determining the arrangement of the composition image so as not to overlap with other composition images and the subject is the same as in the above embodiment.

本実施形態では、連続的に撮影された画像に対して合成を行う際に、一つ前のフレームの被写体配置を参照し、被写体配置が同一であった場合は前フレームと同じ画像を前フレームの被写体と合成用画像との位置関係と同じ位置関係になるよう配置して合成する。   In this embodiment, when combining continuously captured images, the subject arrangement of the previous frame is referred to, and if the subject arrangement is the same, the same image as the previous frame is used as the previous frame. Are arranged so as to have the same positional relationship as the positional relationship between the subject and the composition image.

図21は、連続的に撮影された画像を説明する図であり、図21(a)は、前フレームで撮影された画像を示し、図21(b)は図21(a)の次に撮影された画像を示している。ここで、処理対象のフレームをtフレームとし、一つ前のフレームをt-1フレームとすると、図20に示すように、顔位置を解析し、顔位置が撮影画像の中央部又は周辺部のいずれに位置するかを判別した後で、t-1フレームの顔位置を参照する。そして、tフレームの判定結果と一致した場合に、「処理A」を行い、一致しない場合には上記第1実施形態と同じ処理を行う。なお、連続撮影の最初のフレームは前フレームの顔位置が存在しないため、必ず「No」の判定となる。   FIG. 21 is a diagram for explaining images continuously shot. FIG. 21 (a) shows an image shot in the previous frame, and FIG. 21 (b) is shot after FIG. 21 (a). Is shown. Here, assuming that the frame to be processed is a t frame and the previous frame is a t-1 frame, as shown in FIG. 20, the face position is analyzed, and the face position is the center or peripheral portion of the captured image. After determining the position, the face position of the t-1 frame is referred to. Then, “Processing A” is performed when the determination result of the t frame matches, and the same processing as in the first embodiment is performed when they do not match. Note that since the face position of the previous frame does not exist in the first frame of continuous shooting, the determination is always “No”.

処理Aでは、t-1フレームの合成に用いられた画像と同一の合成用画像を、t-1フレーム内での顔位置と合成用画像の位置関係と等しい位置関係となるように配置する。具体的には各合成用画像に対してtフレームでの配置(xt, yt)を顔位置(fxt, fyt)およびt-1フレームでの合成位置(xt-1, yt-1) と顔位置(fxt-1, fyt-1)から次式により求めることができる。 In the process A, the same composition image as that used for composition of the t-1 frame is arranged so as to have a positional relationship equal to the positional relationship between the face position and the composition image in the t-1 frame. Specifically, for each image for synthesis, the arrangement (x t , y t ) in t frame is changed to the face position (fx t , fy t ) and the synthesis position (x t-1 , y t in t-1 frame). -1 ) and the face position (fx t-1 , fy t-1 ) can be obtained by the following equation.

Figure 2012138957
・・・(1)
Figure 2012138957
... (1)

図21に示すように、t-1フレームの顔位置と合成用画像の位置関係とtフレームでの顔位置と合成用画像の位置関係が等しくなっている。なお、顔位置と合成用画像の位置はそれぞれの領域の左上の座標としている。位置関係が維持されているため、フレーム間で被写体が移動した場合であっても、合成用画像が被写体に追随して移動する。   As shown in FIG. 21, the positional relationship between the face position of the t-1 frame and the composition image and the positional relationship between the face position and the composition image in the t frame are equal. Note that the position of the face and the position of the composition image are the upper left coordinates of each region. Since the positional relationship is maintained, even when the subject moves between frames, the composition image moves following the subject.

画像合成後には顔位置と合成用画像の位置を記憶部などに記録する。これは次のフレームの処理に顔位置及び合成用画像の位置が必要となるためである。   After the image composition, the face position and the position of the composition image are recorded in a storage unit or the like. This is because the face position and the position of the compositing image are required for the processing of the next frame.

上記本実施形態は一例であり、適宜変更可能である。例えば、顔以外の被写体を対象として同様の処理を行うことも考えられる。また、本実施形態では被写体の配置として顔と合成用画像の位置関係のみを維持する処理を行っているが、大きさや方向に関しても同様の処理を行うことが望ましい。さらに、被写体が複数の場合は被写体同士の関係に関して前のフレームと同一の解析結果となるかの判定を行い、上記と同様の処理を行うこともできる。
また、本実施形態では、被写体の絶対位置と合成用画像の絶対位置を記録して次のフレームで参照したが、被写体配置の解析結果と合成用画像の被写体に対する相対的な位置を用いても同様の効果を得ることができる。
The above-described embodiment is an example, and can be changed as appropriate. For example, it is conceivable to perform the same processing on a subject other than the face. Further, in the present embodiment, processing for maintaining only the positional relationship between the face and the composition image is performed as the subject arrangement, but it is desirable to perform similar processing regarding the size and direction. Further, when there are a plurality of subjects, it can be determined whether the same analysis result as the previous frame is obtained with respect to the relationship between the subjects, and the same processing as described above can be performed.
In this embodiment, the absolute position of the subject and the absolute position of the composition image are recorded and referred to in the next frame, but the analysis result of the subject arrangement and the relative position of the composition image with respect to the subject may be used. Similar effects can be obtained.

次に、本発明にかかる第4実施形態を図面に基づいて説明する。
図22は、本実施形態の処理手順を示すフローチャートである。本実施形態では、連続的に撮影された画像に対して合成を行う際に一枚のフレーム画像に対して合成処理を行う例を説明する。なお、顔位置の検出するステップ、顔位置の配置を演算によって判断するステップ、被写体の配置に応じて画像に合成する合成用画像をランダムに選択するステップ、及び、選択された合成用画像の配置を、他の合成用画像及び被写体と重ならないようにランダムに決定するステップは、上記実施形態と同じである。
Next, 4th Embodiment concerning this invention is described based on drawing.
FIG. 22 is a flowchart showing the processing procedure of this embodiment. In the present embodiment, an example will be described in which a composition process is performed on a single frame image when composition is performed on continuously captured images. The step of detecting the face position, the step of determining the arrangement of the face position by calculation, the step of randomly selecting a synthesis image to be synthesized with the image according to the arrangement of the subject, and the arrangement of the selected synthesis image The step of randomly determining the image so as not to overlap other images for synthesis and the subject is the same as in the above embodiment.

本実施形態においては、連続的に撮影された画像に対して合成を行う際に,一定時間が経過するまで、もしくは、特定数のフレームを処理するまでは前フレームと同じ画像を前フレームの被写体と合成用画像との位置関係と同じ位置関係になるよう配置して合成する。   In the present embodiment, when combining continuously captured images, the same image as the previous frame is used until the predetermined time elapses or until a specific number of frames are processed. Are arranged so as to have the same positional relationship as the positional relationship between the image and the image for synthesis.

図22に示すように、処理枚数カウンタIが定数α未満の場合には上記第3実施形態と同様に「処理A」を行い、処理枚数カウンタIがα以上の場合には処理枚数カウンタIを0に初期化してから上記第1実施形態で説明した処理を行う。例えば、定数αを30と設定すれば30フレームおきに上記第1実施形態の合成処理が行われて合成画像が変化する。一方で、Iが30未満のフレームでは「処理A」が行われるため、合成用画像が被写体に追随して移動する。本実施形態において、合成処理を実行した後に処理枚数カウンタIを更新し(図22では、I=I+1に設定している。)、次のフレームの処理に移る。   As shown in FIG. 22, when the processing number counter I is less than the constant α, “processing A” is performed as in the third embodiment, and when the processing number counter I is equal to or larger than α, the processing number counter I is set. After initialization to 0, the processing described in the first embodiment is performed. For example, if the constant α is set to 30, the composite image of the first embodiment is performed every 30 frames and the composite image changes. On the other hand, since “processing A” is performed in a frame in which I is less than 30, the composition image moves following the subject. In this embodiment, the number of processed sheets counter I is updated after executing the combining process (in FIG. 22, I = I + 1 is set), and the process proceeds to the next frame.

連続撮影された画像(スルー画や動画)の各フレームに対して上記第1実施形態にように合成処理を実行すると、フレームごとに合成結果が大きく異なり、画面がちらつくため大変見づらく、実用性に欠ける。そこで、本実施形態によれば合成画像の更新は一定間隔となり、その間は合成用画像が被写体に追随するため、画面が安定する。また、被写体配置が変化した場合や、撮影をやり直した場合にはランダムな画像合成により毎回異なる合成結果が得られ、意外性のある撮影を楽しむことができる。   When combining processing is performed on each frame of a continuously shot image (through image or moving image) as in the first embodiment, the combining result varies greatly from frame to frame and the screen flickers, making it very difficult to see and practical. Lack. Therefore, according to the present embodiment, the composite image is updated at regular intervals, and during that time, the composite image follows the subject, so the screen is stabilized. Further, when the subject arrangement is changed or when photographing is performed again, a different composition result is obtained each time by random image composition, so that unexpected photographing can be enjoyed.

1 デジタルカメラ(撮像装置)
42 顔検出部
44 顔位置解析部
46 画像選択部
48 画像配置部
50 画像合成部
52 合成用画像記憶部
1 Digital camera (imaging device)
42 face detection unit 44 face position analysis unit 46 image selection unit 48 image placement unit 50 image composition unit 52 image storage unit for composition

Claims (9)

撮影画像中の被写体を検出する被写体検出手段と、
前記被写体の配置を演算によって判断する被写体位置解析手段と、
前記被写体の配置に応じて前記画像に合成する合成用画像を選択する画像選択手段と、
選択された前記合成用画像の配置を、他の合成用画像及び前記被写体と重ならないように決定する画像配置手段と、
前記合成用画像を合成する画像合成手段とを備え、前記被写体の数が複数である場合に、前記画像配置手段が被写体同士の配置に基づいて前記合成用画像を選択する画像処理装置。
Subject detection means for detecting a subject in the captured image;
Subject position analysis means for judging the placement of the subject by calculation;
Image selecting means for selecting a composition image to be combined with the image according to the arrangement of the subject;
Image placement means for determining the placement of the selected composition image so as not to overlap with another composition image and the subject;
An image processing apparatus comprising: an image composition unit configured to compose the composition image; and when the number of subjects is plural, the image placement unit selects the composition image based on the placement of subjects.
前記画像配置手段が、配置する前記合成用画像ごとに予め設定された画像サイズの範囲の中からランダムに大きさを選択する請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the image placement unit randomly selects a size from a range of image sizes set in advance for each of the composition images to be placed. 前記画像配置手段が、配置する前記合成用画像ごとに予め設定された画像の傾きの範囲の中からランダムに傾きを選択する請求項1又は2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the image placement unit randomly selects a tilt from a range of tilts of the image set in advance for each of the composition images to be placed. 前記被写体同士の距離に応じて前記合成用画像を選択する請求項1から3のいずれか1つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the composition image is selected according to a distance between the subjects. 前記画像合成手段が連続的に撮影された各撮影画像に前記合成用画像を合成する場合に、今回の撮影画像における前記少なくとも1つの被写体の配置が前回の撮影画像における前記少なくとも1つの被写体の配置と同じである場合に、
前回の撮影画像と合成された少なくとも1つの合成用画像と同じ少なくとも1つの合成用画像が、前回の撮影画像における少なくとも1つの被写体と該前回の撮影画像と合成された少なくとも1つの合成用画像との間の位置関係と同じ位置関係を今回の撮影画像における前記少なくとも1つの被写体と有するように配置される請求項1から4のいずれか1つに記載の画像処理装置。
When the image synthesizing unit synthesizes the composition image with each of the continuously photographed images, the arrangement of the at least one subject in the current photographed image is the placement of the at least one subject in the previous photographed image. Is the same as
At least one compositing image that is the same as at least one compositing image synthesized with the previous photographed image is composed of at least one subject in the previous photographed image and at least one composition image synthesized with the previous photographed image. 5. The image processing apparatus according to claim 1, wherein the image processing apparatus is arranged so as to have the same positional relationship as the positional relationship between the at least one subject in the current captured image.
前記画像合成手段が連続的に撮影された各撮影画像に前記合成用画像を合成する場合に、前記連続的に撮影された画像の1枚目を撮影してから所定の時間が経過するまでの間、又は、所定数の前記撮影画像を処理するまでの間は、
前回の撮影画像と合成された少なくとも1つの合成用画像と同じ少なくとも1つの合成用画像が、前回の撮影画像における少なくとも1つの被写体と該前回の撮影画像と合成された少なくとも1つの合成用画像との間の位置関係と同じ位置関係を今回の撮影画像における前記少なくとも1つの被写体と有するように配置される請求項1から4のいずれか1つに記載の画像処理装置。
When the image synthesizing unit synthesizes the image for synthesis with each of the continuously photographed images, a predetermined time elapses after the first image of the continuously photographed images is photographed. Or until processing a predetermined number of the captured images,
At least one compositing image that is the same as at least one compositing image synthesized with the previous photographed image is composed of at least one subject in the previous photographed image and at least one composition image synthesized with the previous photographed image. 5. The image processing apparatus according to claim 1, wherein the image processing apparatus is arranged so as to have the same positional relationship as the positional relationship between the at least one subject in the current captured image.
前記被写体が人間の顔である請求項1から6のいずれか1つに記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the subject is a human face. 上記請求項1から7に記載の画像処理装置を備えた撮像装置。   An imaging device comprising the image processing device according to claim 1. 撮影画像中の被写体を検出するステップと、
前記被写体の配置を演算によって判断するステップと、
前記被写体の配置に応じて前記画像に合成する合成用画像を選択する画像選択するステップと、
選択された前記合成用画像の配置を、他の合成用画像及び前記被写体と重ならないように決定するステップと、
前記合成用画像を合成するステップとを有し、前記被写体の数が複数である場合に、被写体同士の配置に基づいて前記合成用画像を選択する画像処理方法。
Detecting a subject in the captured image;
Determining the placement of the subject by calculation;
Selecting an image for selecting a synthesis image to be synthesized with the image according to the arrangement of the subject;
Determining the arrangement of the selected composition image so as not to overlap with another composition image and the subject;
An image processing method for selecting the composition image based on the arrangement of the subjects when the number of subjects is plural.
JP2012084545A 2012-04-03 2012-04-03 Image processing apparatus, image processing method, and imaging apparatus Active JP5055462B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012084545A JP5055462B2 (en) 2012-04-03 2012-04-03 Image processing apparatus, image processing method, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012084545A JP5055462B2 (en) 2012-04-03 2012-04-03 Image processing apparatus, image processing method, and imaging apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2008033368A Division JP4970302B2 (en) 2008-02-14 2008-02-14 Image processing apparatus, image processing method, and imaging apparatus

Publications (2)

Publication Number Publication Date
JP2012138957A true JP2012138957A (en) 2012-07-19
JP5055462B2 JP5055462B2 (en) 2012-10-24

Family

ID=46675953

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012084545A Active JP5055462B2 (en) 2012-04-03 2012-04-03 Image processing apparatus, image processing method, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP5055462B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015023382A (en) * 2013-07-18 2015-02-02 株式会社デジタル・スタンダード Information processing device, method, and program

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000022929A (en) * 1998-06-30 2000-01-21 Omron Corp Person image processor
JP2002204422A (en) * 2000-12-28 2002-07-19 Canon Inc Image recorder, image recording method and recording medium
JP2003346170A (en) * 2002-05-28 2003-12-05 Casio Comput Co Ltd Image delivery server, image delivery program and image delivery method
JP2004171543A (en) * 2002-11-07 2004-06-17 Matsushita Electric Ind Co Ltd Method and device for image processing
JP2004179845A (en) * 2002-11-26 2004-06-24 Matsushita Electric Ind Co Ltd Image processing method and apparatus thereof
JP2005159971A (en) * 2003-11-28 2005-06-16 Seiko Epson Corp Apparatus and method for processing image
JP2009118084A (en) * 2007-11-05 2009-05-28 Olympus Imaging Corp Digital camera
JP2009194644A (en) * 2008-02-14 2009-08-27 Fujifilm Corp Image processor, image processing method and image pick-up device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000022929A (en) * 1998-06-30 2000-01-21 Omron Corp Person image processor
JP2002204422A (en) * 2000-12-28 2002-07-19 Canon Inc Image recorder, image recording method and recording medium
JP2003346170A (en) * 2002-05-28 2003-12-05 Casio Comput Co Ltd Image delivery server, image delivery program and image delivery method
JP2004171543A (en) * 2002-11-07 2004-06-17 Matsushita Electric Ind Co Ltd Method and device for image processing
JP2004179845A (en) * 2002-11-26 2004-06-24 Matsushita Electric Ind Co Ltd Image processing method and apparatus thereof
JP2005159971A (en) * 2003-11-28 2005-06-16 Seiko Epson Corp Apparatus and method for processing image
JP2009118084A (en) * 2007-11-05 2009-05-28 Olympus Imaging Corp Digital camera
JP2009194644A (en) * 2008-02-14 2009-08-27 Fujifilm Corp Image processor, image processing method and image pick-up device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015023382A (en) * 2013-07-18 2015-02-02 株式会社デジタル・スタンダード Information processing device, method, and program

Also Published As

Publication number Publication date
JP5055462B2 (en) 2012-10-24

Similar Documents

Publication Publication Date Title
JP4970302B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP5206095B2 (en) Composition determination apparatus, composition determination method, and program
JP4902562B2 (en) Imaging apparatus, image processing apparatus, control method, and program
JP2008109552A (en) Imaging device with chasing function
KR20150119621A (en) display apparatus and image composition method thereof
KR20160057867A (en) Display apparatus and image processing method thereby
JP2009086703A (en) Image display device, image display method and image display program
KR102529479B1 (en) Control apparatus, control method, and storage medium
JP5952782B2 (en) Image processing apparatus, control method therefor, program, and storage medium
JP2019135810A (en) Image processing apparatus, image processing method, and program
JP2016213674A (en) Display control system, display control unit, display control method, and program
JP2009171428A (en) Control method and program for digital camera apparatus and electronic zoom
JP2010072813A (en) Image processing device and image processing program
JP2016144049A (en) Image processing apparatus, image processing method, and program
JP5479850B2 (en) Moving image creating apparatus and moving image creating method
JP2009258005A (en) Three-dimensional measuring device and three-dimensional measuring method
JP5055462B2 (en) Image processing apparatus, image processing method, and imaging apparatus
JP5718502B2 (en) Image creating apparatus and image creating method
JP6545229B2 (en) IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, CONTROL METHOD OF IMAGE PROCESSING APPARATUS, AND PROGRAM
JP5967422B2 (en) Imaging apparatus, imaging processing method, and program
JP6103826B2 (en) Image processing apparatus, image processing method, and program
JP5477025B2 (en) Image display device and program
JP2020145660A (en) Information processor, control method thereof, and program
JP2018112991A (en) Image processor, image processing system, method for image processing, and program
KR101515404B1 (en) Method and apparatus for controlling of virtual camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120418

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120730

R150 Certificate of patent or registration of utility model

Ref document number: 5055462

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150803

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250